diff --git a/attribute/attribute_test.mbt b/attribute/attribute_test.mbt index f7992e09..52710324 100644 --- a/attribute/attribute_test.mbt +++ b/attribute/attribute_test.mbt @@ -4,6 +4,46 @@ let dummy_loc : @basic.Location = { { start: pos, end: pos } } +///| +test "attribute payload accepts extend soft keyword" { + let pos = dummy_loc.start + let tokens : Array[(@tokens.Token, @basic.Position, @basic.Position)] = [ + (@tokens.Token::LPAREN, pos, pos), + (@tokens.Token::EXTEND, pos, pos), + (@tokens.Token::COMMA, pos, pos), + (@tokens.Token::EXTEND, pos, pos), + (@tokens.Token::EQUAL, pos, pos), + (@tokens.Token::TRUE, pos, pos), + (@tokens.Token::COMMA, pos, pos), + (@tokens.Token::EXTEND, pos, pos), + (@tokens.Token::LPAREN, pos, pos), + (@tokens.Token::EXTEND, pos, pos), + (@tokens.Token::RPAREN, pos, pos), + (@tokens.Token::COMMA, pos, pos), + (@tokens.Token::EXTEND, pos, pos), + (@tokens.Token::DOT_LIDENT("field"), pos, pos), + (@tokens.Token::RPAREN, pos, pos), + (@tokens.Token::EOF, pos, pos), + ] + try payloads(tokens, initial_pos=pos) catch { + _ => fail("expected extend soft keyword in attribute payload to parse") + } noraise { + props => + debug_inspect( + props, + content=( + #|)), + #| Expr(Ident(extend.field)), + #| ]> + ), + ) + } +} + ///| test "attribute" { let attr = Attribute::new(loc=dummy_loc, ("qual", Some("name"), "(a,b,c)")) diff --git a/attribute/parser.mbt b/attribute/parser.mbt index fc023bc4..bdb0f49d 100644 --- a/attribute/parser.mbt +++ b/attribute/parser.mbt @@ -75,6 +75,7 @@ priv enum YYSymbol { T_MULTILINE_STRING T_MULTILINE_INTERP T_INTERP + T_BYTES_INTERP T_REGEX_LITERAL T_REGEX_INTERP T_ATTRIBUTE @@ -129,8 +130,10 @@ priv enum YYSymbol { T_COLON T_SEMI T_LBRACKET + T_LBRACKET_BAR T_PLUS T_RBRACKET + T_BAR_RBRACKET T_UNDERSCORE T_BAR T_LBRACE @@ -144,6 +147,7 @@ priv enum YYSymbol { T_PIPE T_PIPE_LEFT T_LT_PLUS + T_LT_QUESTION T_ELSE T_FN T_IF @@ -189,7 +193,10 @@ priv enum YYSymbol { T_TRY_EXCLAMATION T_LEXMATCH T_LEXMATCH_QUESTION + T_LEXSCAN + T_EXTEND T_PACKAGE + NT_lident_string NT_payloads NT_property NT_expr @@ -207,42 +214,55 @@ fn init { } // file:///./parser.mbty -// 163| EOF { @list.empty() } +// 173| EOF { @list.empty() } fn yy_action_0(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { YYObj_List_Prop_({(); @list.empty() }) } // file:///./parser.mbty -// 164| properties { $1 } +// 174| properties { $1 } fn yy_action_1(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj_List_Prop_(_dollar1) YYObj_List_Prop_({(); _dollar1 }) } // file:///./parser.mbty -// 181| "(" ")" { @list.empty() } +// 191| "(" ")" { @list.empty() } fn yy_action_2(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { YYObj_List_Prop_({(); @list.empty() }) } // file:///./parser.mbty -// 182| "(" non_empty_properties ")" { $2 } +// 192| "(" non_empty_properties ")" { $2 } fn yy_action_3(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[1].0 is YYObj_List_Prop_(_dollar2) YYObj_List_Prop_({(); _dollar2 }) } // file:///./parser.mbty -// 167| name=LIDENT "=" expr { Labeled(name, $3) } +// 169| LIDENT { $1 } fn yy_action_4(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj_String(_dollar1) + YYObj_String({(); _dollar1 }) +} + +// file:///./parser.mbty +// 170| "extend" { "extend" } +fn yy_action_5(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + YYObj_String({(); "extend" }) +} + +// file:///./parser.mbty +// 177| name=lident_string "=" expr { Labeled(name, $3) } +fn yy_action_6(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj_String(name) guard _args[2].0 is YYObj_Expr(_dollar3) YYObj_Prop({(); Labeled(name, _dollar3) }) } // file:///./parser.mbty -// 175| qual=LIDENT name=DOT_LIDENT props=properties { Apply({qual: Some(qual), name}, props) } -fn yy_action_5(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 185| qual=lident_string name=DOT_LIDENT props=properties { Apply({qual: Some(qual), name}, props) } +fn yy_action_7(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj_String(qual) guard _args[1].0 is YYObj_String(name) guard _args[2].0 is YYObj_List_Prop_(props) @@ -250,74 +270,74 @@ fn yy_action_5(_last_pos : Position, _args : ArrayView[(YYObj, Position, Positio } // file:///./parser.mbty -// 173| qual=LIDENT name=DOT_LIDENT { Ident({qual: Some(qual), name}) } -fn yy_action_6(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 183| qual=lident_string name=DOT_LIDENT { Ident({qual: Some(qual), name}) } +fn yy_action_8(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj_String(qual) guard _args[1].0 is YYObj_String(name) YYObj_Expr({(); Ident({qual: Some(qual), name}) }) } // file:///./parser.mbty -// 174| name=LIDENT props=properties { Apply({qual: None, name}, props) } -fn yy_action_7(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 184| name=lident_string props=properties { Apply({qual: None, name}, props) } +fn yy_action_9(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj_String(name) guard _args[1].0 is YYObj_List_Prop_(props) YYObj_Expr({(); Apply({qual: None, name}, props) }) } // file:///./parser.mbty -// 171| name=LIDENT { Ident({qual: None, name}) } -fn yy_action_8(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 181| name=lident_string { Ident({qual: None, name}) } +fn yy_action_10(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj_String(name) YYObj_Expr({(); Ident({qual: None, name}) }) } // file:///./parser.mbty -// 168| expr { Expr($1) } -fn yy_action_9(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 178| expr { Expr($1) } +fn yy_action_11(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj_Expr(_dollar1) YYObj_Prop({(); Expr(_dollar1) }) } // file:///./parser.mbty -// 172| name=UIDENT { Ident({qual: None, name}) } -fn yy_action_10(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 182| name=UIDENT { Ident({qual: None, name}) } +fn yy_action_12(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj_String(name) YYObj_Expr({(); Ident({qual: None, name}) }) } // file:///./parser.mbty -// 176| STRING { String($1) } -fn yy_action_11(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 186| STRING { String($1) } +fn yy_action_13(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj_StringLiteral(_dollar1) YYObj_Expr({(); String(_dollar1) }) } // file:///./parser.mbty -// 177| TRUE { Bool(true) } -fn yy_action_12(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 187| TRUE { Bool(true) } +fn yy_action_14(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { YYObj_Expr({(); Bool(true) }) } // file:///./parser.mbty -// 178| FALSE { Bool(false) } -fn yy_action_13(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 188| FALSE { Bool(false) } +fn yy_action_15(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { YYObj_Expr({(); Bool(false) }) } // file:///./parser.mbty -// 186| x=property "," xs=non_empty_properties{ xs.add(x) } -fn yy_action_14(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 196| x=property "," xs=non_empty_properties{ xs.add(x) } +fn yy_action_16(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj_Prop(x) guard _args[2].0 is YYObj_List_Prop_(xs) YYObj_List_Prop_({(); xs.add(x) }) } // file:///./parser.mbty -// 185| property { @list.from_array([$1]) } -fn yy_action_15(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 195| property { @list.List([$1]) } +fn yy_action_17(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj_Prop(_dollar1) - YYObj_List_Prop_({(); @list.from_array([_dollar1]) }) + YYObj_List_Prop_({(); @list.List([_dollar1]) }) } fn yy_input(token : Token, _start_pos : Position, _end_pos : Position) -> (YYSymbol, YYObj) { @@ -332,6 +352,7 @@ fn yy_input(token : Token, _start_pos : Position, _end_pos : Position) -> (YYSym MULTILINE_STRING(data) => (T_MULTILINE_STRING, YYObj_String(data)) MULTILINE_INTERP(data) => (T_MULTILINE_INTERP, YYObj_InterpLiteral(data)) INTERP(data) => (T_INTERP, YYObj_InterpLiteral(data)) + BYTES_INTERP(data) => (T_BYTES_INTERP, YYObj_InterpLiteral(data)) REGEX_LITERAL(data) => (T_REGEX_LITERAL, YYObj_String(data)) REGEX_INTERP(data) => (T_REGEX_INTERP, YYObj_InterpLiteral(data)) ATTRIBUTE(data) => (T_ATTRIBUTE, YYObj__String__String___String_(data)) @@ -386,8 +407,10 @@ fn yy_input(token : Token, _start_pos : Position, _end_pos : Position) -> (YYSym COLON => (T_COLON, YYObj_Void) SEMI(data) => (T_SEMI, YYObj_Bool(data)) LBRACKET => (T_LBRACKET, YYObj_Void) + LBRACKET_BAR => (T_LBRACKET_BAR, YYObj_Void) PLUS => (T_PLUS, YYObj_Void) RBRACKET => (T_RBRACKET, YYObj_Void) + BAR_RBRACKET => (T_BAR_RBRACKET, YYObj_Void) UNDERSCORE => (T_UNDERSCORE, YYObj_Void) BAR => (T_BAR, YYObj_Void) LBRACE => (T_LBRACE, YYObj_Void) @@ -401,6 +424,7 @@ fn yy_input(token : Token, _start_pos : Position, _end_pos : Position) -> (YYSym PIPE => (T_PIPE, YYObj_Void) PIPE_LEFT => (T_PIPE_LEFT, YYObj_Void) LT_PLUS => (T_LT_PLUS, YYObj_Void) + LT_QUESTION => (T_LT_QUESTION, YYObj_Void) ELSE => (T_ELSE, YYObj_Void) FN => (T_FN, YYObj_Void) IF => (T_IF, YYObj_Void) @@ -446,44 +470,48 @@ fn yy_input(token : Token, _start_pos : Position, _end_pos : Position) -> (YYSym TRY_EXCLAMATION => (T_TRY_EXCLAMATION, YYObj_Void) LEXMATCH => (T_LEXMATCH, YYObj_Void) LEXMATCH_QUESTION => (T_LEXMATCH_QUESTION, YYObj_Void) + LEXSCAN => (T_LEXSCAN, YYObj_Void) + EXTEND => (T_EXTEND, YYObj_Void) PACKAGE => (T_PACKAGE, YYObj_Void) } } -// [0, payloads → • EOF, $] -// [1, payloads → • properties, $] -// [12, properties → • LPAREN RPAREN, $] -// [13, properties → • LPAREN non_empty_properties RPAREN, $] -// [16, payloads_prime → • payloads, $] +// [2, payloads → • EOF, $] +// [3, payloads → • properties, $] +// [14, properties → • LPAREN RPAREN, $] +// [15, properties → • LPAREN non_empty_properties RPAREN, $] +// [18, payloads_prime → • payloads, $] fn yy_state_0(_lookahead : YYSymbol) -> YYDecision { match _lookahead { NT_payloads => Shift(yy_state_1) T_LPAREN => Shift(yy_state_2) - NT_properties => Shift(yy_state_21) - T_EOF => Shift(yy_state_22) + NT_properties => Shift(yy_state_23) + T_EOF => Shift(yy_state_24) _ => Error } } -// [16, payloads_prime → payloads •, $] +// [18, payloads_prime → payloads •, $] fn yy_state_1(_lookahead : YYSymbol) -> YYDecision { Accept } -// [2, property → • LIDENT EQUAL expr, RPAREN / COMMA] -// [3, property → • expr, RPAREN / COMMA] -// [4, expr → • LIDENT, RPAREN / COMMA] -// [5, expr → • UIDENT, RPAREN / COMMA] -// [6, expr → • LIDENT DOT_LIDENT, RPAREN / COMMA] -// [7, expr → • LIDENT properties, RPAREN / COMMA] -// [8, expr → • LIDENT DOT_LIDENT properties, RPAREN / COMMA] -// [9, expr → • STRING, RPAREN / COMMA] -// [10, expr → • TRUE, RPAREN / COMMA] -// [11, expr → • FALSE, RPAREN / COMMA] -// [12, properties → LPAREN • RPAREN, $ / RPAREN / COMMA] -// [13, properties → LPAREN • non_empty_properties RPAREN, $ / RPAREN / COMMA] -// [14, non_empty_properties → • property, RPAREN] -// [15, non_empty_properties → • property COMMA non_empty_properties, RPAREN] +// [0, lident_string → • LIDENT, EQUAL / LPAREN / RPAREN / COMMA / DOT_LIDENT] +// [1, lident_string → • EXTEND, EQUAL / LPAREN / RPAREN / COMMA / DOT_LIDENT] +// [4, property → • lident_string EQUAL expr, RPAREN / COMMA] +// [5, property → • expr, RPAREN / COMMA] +// [6, expr → • lident_string, RPAREN / COMMA] +// [7, expr → • UIDENT, RPAREN / COMMA] +// [8, expr → • lident_string DOT_LIDENT, RPAREN / COMMA] +// [9, expr → • lident_string properties, RPAREN / COMMA] +// [10, expr → • lident_string DOT_LIDENT properties, RPAREN / COMMA] +// [11, expr → • STRING, RPAREN / COMMA] +// [12, expr → • TRUE, RPAREN / COMMA] +// [13, expr → • FALSE, RPAREN / COMMA] +// [14, properties → LPAREN • RPAREN, $ / RPAREN / COMMA] +// [15, properties → LPAREN • non_empty_properties RPAREN, $ / RPAREN / COMMA] +// [16, non_empty_properties → • property, RPAREN] +// [17, non_empty_properties → • property COMMA non_empty_properties, RPAREN] fn yy_state_2(_lookahead : YYSymbol) -> YYDecision { match _lookahead { NT_property => Shift(yy_state_3) @@ -492,36 +520,40 @@ fn yy_state_2(_lookahead : YYSymbol) -> YYDecision { T_STRING => Shift(yy_state_8) T_UIDENT => Shift(yy_state_9) NT_expr => Shift(yy_state_10) - T_LIDENT => Shift(yy_state_11) - NT_non_empty_properties => Shift(yy_state_18) - T_RPAREN => Shift(yy_state_20) + NT_lident_string => Shift(yy_state_11) + T_EXTEND => Shift(yy_state_18) + T_LIDENT => Shift(yy_state_19) + NT_non_empty_properties => Shift(yy_state_20) + T_RPAREN => Shift(yy_state_22) _ => Error } } -// [14, non_empty_properties → property •, RPAREN] -// [15, non_empty_properties → property • COMMA non_empty_properties, RPAREN] +// [16, non_empty_properties → property •, RPAREN] +// [17, non_empty_properties → property • COMMA non_empty_properties, RPAREN] fn yy_state_3(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_COMMA => Shift(yy_state_4) - T_RPAREN => Reduce(1, NT_non_empty_properties, yy_action_15) + T_RPAREN => Reduce(1, NT_non_empty_properties, yy_action_17) _ => Error } } -// [2, property → • LIDENT EQUAL expr, RPAREN / COMMA] -// [3, property → • expr, RPAREN / COMMA] -// [4, expr → • LIDENT, RPAREN / COMMA] -// [5, expr → • UIDENT, RPAREN / COMMA] -// [6, expr → • LIDENT DOT_LIDENT, RPAREN / COMMA] -// [7, expr → • LIDENT properties, RPAREN / COMMA] -// [8, expr → • LIDENT DOT_LIDENT properties, RPAREN / COMMA] -// [9, expr → • STRING, RPAREN / COMMA] -// [10, expr → • TRUE, RPAREN / COMMA] -// [11, expr → • FALSE, RPAREN / COMMA] -// [14, non_empty_properties → • property, RPAREN] -// [15, non_empty_properties → • property COMMA non_empty_properties, RPAREN] -// [15, non_empty_properties → property COMMA • non_empty_properties, RPAREN] +// [0, lident_string → • LIDENT, EQUAL / LPAREN / RPAREN / COMMA / DOT_LIDENT] +// [1, lident_string → • EXTEND, EQUAL / LPAREN / RPAREN / COMMA / DOT_LIDENT] +// [4, property → • lident_string EQUAL expr, RPAREN / COMMA] +// [5, property → • expr, RPAREN / COMMA] +// [6, expr → • lident_string, RPAREN / COMMA] +// [7, expr → • UIDENT, RPAREN / COMMA] +// [8, expr → • lident_string DOT_LIDENT, RPAREN / COMMA] +// [9, expr → • lident_string properties, RPAREN / COMMA] +// [10, expr → • lident_string DOT_LIDENT properties, RPAREN / COMMA] +// [11, expr → • STRING, RPAREN / COMMA] +// [12, expr → • TRUE, RPAREN / COMMA] +// [13, expr → • FALSE, RPAREN / COMMA] +// [16, non_empty_properties → • property, RPAREN] +// [17, non_empty_properties → • property COMMA non_empty_properties, RPAREN] +// [17, non_empty_properties → property COMMA • non_empty_properties, RPAREN] fn yy_state_4(_lookahead : YYSymbol) -> YYDecision { match _lookahead { NT_property => Shift(yy_state_3) @@ -531,149 +563,165 @@ fn yy_state_4(_lookahead : YYSymbol) -> YYDecision { T_STRING => Shift(yy_state_8) T_UIDENT => Shift(yy_state_9) NT_expr => Shift(yy_state_10) - T_LIDENT => Shift(yy_state_11) + NT_lident_string => Shift(yy_state_11) + T_EXTEND => Shift(yy_state_18) + T_LIDENT => Shift(yy_state_19) _ => Error } } -// [15, non_empty_properties → property COMMA non_empty_properties •, RPAREN] +// [17, non_empty_properties → property COMMA non_empty_properties •, RPAREN] fn yy_state_5(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_non_empty_properties, yy_action_14) + ReduceNoLookahead(3, NT_non_empty_properties, yy_action_16) } -// [11, expr → FALSE •, RPAREN / COMMA] +// [13, expr → FALSE •, RPAREN / COMMA] fn yy_state_6(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_expr, yy_action_13) + ReduceNoLookahead(1, NT_expr, yy_action_15) } -// [10, expr → TRUE •, RPAREN / COMMA] +// [12, expr → TRUE •, RPAREN / COMMA] fn yy_state_7(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_expr, yy_action_12) + ReduceNoLookahead(1, NT_expr, yy_action_14) } -// [9, expr → STRING •, RPAREN / COMMA] +// [11, expr → STRING •, RPAREN / COMMA] fn yy_state_8(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_expr, yy_action_11) + ReduceNoLookahead(1, NT_expr, yy_action_13) } -// [5, expr → UIDENT •, RPAREN / COMMA] +// [7, expr → UIDENT •, RPAREN / COMMA] fn yy_state_9(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_expr, yy_action_10) + ReduceNoLookahead(1, NT_expr, yy_action_12) } -// [3, property → expr •, RPAREN / COMMA] +// [5, property → expr •, RPAREN / COMMA] fn yy_state_10(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_property, yy_action_9) + ReduceNoLookahead(1, NT_property, yy_action_11) } -// [2, property → LIDENT • EQUAL expr, RPAREN / COMMA] -// [4, expr → LIDENT •, RPAREN / COMMA] -// [6, expr → LIDENT • DOT_LIDENT, RPAREN / COMMA] -// [7, expr → LIDENT • properties, RPAREN / COMMA] -// [8, expr → LIDENT • DOT_LIDENT properties, RPAREN / COMMA] -// [12, properties → • LPAREN RPAREN, RPAREN / COMMA] -// [13, properties → • LPAREN non_empty_properties RPAREN, RPAREN / COMMA] +// [4, property → lident_string • EQUAL expr, RPAREN / COMMA] +// [6, expr → lident_string •, RPAREN / COMMA] +// [8, expr → lident_string • DOT_LIDENT, RPAREN / COMMA] +// [9, expr → lident_string • properties, RPAREN / COMMA] +// [10, expr → lident_string • DOT_LIDENT properties, RPAREN / COMMA] +// [14, properties → • LPAREN RPAREN, RPAREN / COMMA] +// [15, properties → • LPAREN non_empty_properties RPAREN, RPAREN / COMMA] fn yy_state_11(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_LPAREN => Shift(yy_state_2) NT_properties => Shift(yy_state_12) T_DOT_LIDENT => Shift(yy_state_13) T_EQUAL => Shift(yy_state_15) - T_RPAREN | T_COMMA => Reduce(1, NT_expr, yy_action_8) + T_RPAREN | T_COMMA => Reduce(1, NT_expr, yy_action_10) _ => Error } } -// [7, expr → LIDENT properties •, RPAREN / COMMA] +// [9, expr → lident_string properties •, RPAREN / COMMA] fn yy_state_12(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(2, NT_expr, yy_action_7) + ReduceNoLookahead(2, NT_expr, yy_action_9) } -// [6, expr → LIDENT DOT_LIDENT •, RPAREN / COMMA] -// [8, expr → LIDENT DOT_LIDENT • properties, RPAREN / COMMA] -// [12, properties → • LPAREN RPAREN, RPAREN / COMMA] -// [13, properties → • LPAREN non_empty_properties RPAREN, RPAREN / COMMA] +// [8, expr → lident_string DOT_LIDENT •, RPAREN / COMMA] +// [10, expr → lident_string DOT_LIDENT • properties, RPAREN / COMMA] +// [14, properties → • LPAREN RPAREN, RPAREN / COMMA] +// [15, properties → • LPAREN non_empty_properties RPAREN, RPAREN / COMMA] fn yy_state_13(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_LPAREN => Shift(yy_state_2) NT_properties => Shift(yy_state_14) - T_RPAREN | T_COMMA => Reduce(2, NT_expr, yy_action_6) + T_RPAREN | T_COMMA => Reduce(2, NT_expr, yy_action_8) _ => Error } } -// [8, expr → LIDENT DOT_LIDENT properties •, RPAREN / COMMA] +// [10, expr → lident_string DOT_LIDENT properties •, RPAREN / COMMA] fn yy_state_14(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_expr, yy_action_5) -} - -// [2, property → LIDENT EQUAL • expr, RPAREN / COMMA] -// [4, expr → • LIDENT, RPAREN / COMMA] -// [5, expr → • UIDENT, RPAREN / COMMA] -// [6, expr → • LIDENT DOT_LIDENT, RPAREN / COMMA] -// [7, expr → • LIDENT properties, RPAREN / COMMA] -// [8, expr → • LIDENT DOT_LIDENT properties, RPAREN / COMMA] -// [9, expr → • STRING, RPAREN / COMMA] -// [10, expr → • TRUE, RPAREN / COMMA] -// [11, expr → • FALSE, RPAREN / COMMA] + ReduceNoLookahead(3, NT_expr, yy_action_7) +} + +// [0, lident_string → • LIDENT, LPAREN / RPAREN / COMMA / DOT_LIDENT] +// [1, lident_string → • EXTEND, LPAREN / RPAREN / COMMA / DOT_LIDENT] +// [4, property → lident_string EQUAL • expr, RPAREN / COMMA] +// [6, expr → • lident_string, RPAREN / COMMA] +// [7, expr → • UIDENT, RPAREN / COMMA] +// [8, expr → • lident_string DOT_LIDENT, RPAREN / COMMA] +// [9, expr → • lident_string properties, RPAREN / COMMA] +// [10, expr → • lident_string DOT_LIDENT properties, RPAREN / COMMA] +// [11, expr → • STRING, RPAREN / COMMA] +// [12, expr → • TRUE, RPAREN / COMMA] +// [13, expr → • FALSE, RPAREN / COMMA] fn yy_state_15(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_FALSE => Shift(yy_state_6) T_TRUE => Shift(yy_state_7) T_STRING => Shift(yy_state_8) T_UIDENT => Shift(yy_state_9) - T_LIDENT => Shift(yy_state_16) + NT_lident_string => Shift(yy_state_16) NT_expr => Shift(yy_state_17) + T_EXTEND => Shift(yy_state_18) + T_LIDENT => Shift(yy_state_19) _ => Error } } -// [4, expr → LIDENT •, RPAREN / COMMA] -// [6, expr → LIDENT • DOT_LIDENT, RPAREN / COMMA] -// [7, expr → LIDENT • properties, RPAREN / COMMA] -// [8, expr → LIDENT • DOT_LIDENT properties, RPAREN / COMMA] -// [12, properties → • LPAREN RPAREN, RPAREN / COMMA] -// [13, properties → • LPAREN non_empty_properties RPAREN, RPAREN / COMMA] +// [6, expr → lident_string •, RPAREN / COMMA] +// [8, expr → lident_string • DOT_LIDENT, RPAREN / COMMA] +// [9, expr → lident_string • properties, RPAREN / COMMA] +// [10, expr → lident_string • DOT_LIDENT properties, RPAREN / COMMA] +// [14, properties → • LPAREN RPAREN, RPAREN / COMMA] +// [15, properties → • LPAREN non_empty_properties RPAREN, RPAREN / COMMA] fn yy_state_16(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_LPAREN => Shift(yy_state_2) NT_properties => Shift(yy_state_12) T_DOT_LIDENT => Shift(yy_state_13) - T_RPAREN | T_COMMA => Reduce(1, NT_expr, yy_action_8) + T_RPAREN | T_COMMA => Reduce(1, NT_expr, yy_action_10) _ => Error } } -// [2, property → LIDENT EQUAL expr •, RPAREN / COMMA] +// [4, property → lident_string EQUAL expr •, RPAREN / COMMA] fn yy_state_17(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_property, yy_action_4) + ReduceNoLookahead(3, NT_property, yy_action_6) } -// [13, properties → LPAREN non_empty_properties • RPAREN, $ / RPAREN / COMMA] +// [1, lident_string → EXTEND •, EQUAL / LPAREN / RPAREN / COMMA / DOT_LIDENT] fn yy_state_18(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_lident_string, yy_action_5) +} + +// [0, lident_string → LIDENT •, EQUAL / LPAREN / RPAREN / COMMA / DOT_LIDENT] +fn yy_state_19(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_lident_string, yy_action_4) +} + +// [15, properties → LPAREN non_empty_properties • RPAREN, $ / RPAREN / COMMA] +fn yy_state_20(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RPAREN => Shift(yy_state_19) + T_RPAREN => Shift(yy_state_21) _ => Error } } -// [13, properties → LPAREN non_empty_properties RPAREN •, $ / RPAREN / COMMA] -fn yy_state_19(_lookahead : YYSymbol) -> YYDecision { +// [15, properties → LPAREN non_empty_properties RPAREN •, $ / RPAREN / COMMA] +fn yy_state_21(_lookahead : YYSymbol) -> YYDecision { ReduceNoLookahead(3, NT_properties, yy_action_3) } -// [12, properties → LPAREN RPAREN •, $ / RPAREN / COMMA] -fn yy_state_20(_lookahead : YYSymbol) -> YYDecision { +// [14, properties → LPAREN RPAREN •, $ / RPAREN / COMMA] +fn yy_state_22(_lookahead : YYSymbol) -> YYDecision { ReduceNoLookahead(2, NT_properties, yy_action_2) } -// [1, payloads → properties •, $] -fn yy_state_21(_lookahead : YYSymbol) -> YYDecision { +// [3, payloads → properties •, $] +fn yy_state_23(_lookahead : YYSymbol) -> YYDecision { ReduceNoLookahead(1, NT_payloads, yy_action_1) } -// [0, payloads → EOF •, $] -fn yy_state_22(_lookahead : YYSymbol) -> YYDecision { +// [2, payloads → EOF •, $] +fn yy_state_24(_lookahead : YYSymbol) -> YYDecision { ReduceNoLookahead(1, NT_payloads, yy_action_0) } @@ -788,7 +836,7 @@ fn error(stack : @list.List[YYState], token : Token?, loc : (Position, Position) } go(stack) } - for term in ([(T_CHAR, TK_CHAR), (T_INT, TK_INT), (T_BYTE, TK_BYTE), (T_BYTES, TK_BYTES), (T_FLOAT, TK_FLOAT), (T_DOUBLE, TK_DOUBLE), (T_STRING, TK_STRING), (T_MULTILINE_STRING, TK_MULTILINE_STRING), (T_MULTILINE_INTERP, TK_MULTILINE_INTERP), (T_INTERP, TK_INTERP), (T_REGEX_LITERAL, TK_REGEX_LITERAL), (T_REGEX_INTERP, TK_REGEX_INTERP), (T_ATTRIBUTE, TK_ATTRIBUTE), (T_LIDENT, TK_LIDENT), (T_UIDENT, TK_UIDENT), (T_POST_LABEL, TK_POST_LABEL), (T_COMMENT, TK_COMMENT), (T_NEWLINE, TK_NEWLINE), (T_INFIX1, TK_INFIX1), (T_INFIX2, TK_INFIX2), (T_INFIX3, TK_INFIX3), (T_INFIX4, TK_INFIX4), (T_AUGMENTED_ASSIGNMENT, TK_AUGMENTED_ASSIGNMENT), (T_PLUS_EQUAL, TK_PLUS_EQUAL), (T_EOF, TK_EOF), (T_FALSE, TK_FALSE), (T_TRUE, TK_TRUE), (T_PUB, TK_PUB), (T_PRIV, TK_PRIV), (T_READONLY, TK_READONLY), (T_IMPORT, TK_IMPORT), (T_EXTERN, TK_EXTERN), (T_BREAK, TK_BREAK), (T_CONTINUE, TK_CONTINUE), (T_STRUCT, TK_STRUCT), (T_ENUM, TK_ENUM), (T_TRAIT, TK_TRAIT), (T_DERIVE, TK_DERIVE), (T_IMPL, TK_IMPL), (T_WITH, TK_WITH), (T_RAISE, TK_RAISE), (T_THROW, TK_THROW), (T_TRY, TK_TRY), (T_CATCH, TK_CATCH), (T_ASYNC, TK_ASYNC), (T_TYPEALIAS, TK_TYPEALIAS), (T_TRAITALIAS, TK_TRAITALIAS), (T_FNALIAS, TK_FNALIAS), (T_EQUAL, TK_EQUAL), (T_EQ_TILDE, TK_EQ_TILDE), (T_LPAREN, TK_LPAREN), (T_RPAREN, TK_RPAREN), (T_COMMA, TK_COMMA), (T_MINUS, TK_MINUS), (T_QUESTION, TK_QUESTION), (T_EXCLAMATION, TK_EXCLAMATION), (T_DOT_LIDENT, TK_DOT_LIDENT), (T_DOT_UIDENT, TK_DOT_UIDENT), (T_DOT_INT, TK_DOT_INT), (T_DOT_LPAREN, TK_DOT_LPAREN), (T_COLONCOLON, TK_COLONCOLON), (T_COLON, TK_COLON), (T_SEMI, TK_SEMI), (T_LBRACKET, TK_LBRACKET), (T_PLUS, TK_PLUS), (T_RBRACKET, TK_RBRACKET), (T_UNDERSCORE, TK_UNDERSCORE), (T_BAR, TK_BAR), (T_LBRACE, TK_LBRACE), (T_RBRACE, TK_RBRACE), (T_AMPERAMPER, TK_AMPERAMPER), (T_AMPER, TK_AMPER), (T_CARET, TK_CARET), (T_BARBAR, TK_BARBAR), (T_PACKAGE_NAME, TK_PACKAGE_NAME), (T_AS, TK_AS), (T_PIPE, TK_PIPE), (T_PIPE_LEFT, TK_PIPE_LEFT), (T_LT_PLUS, TK_LT_PLUS), (T_ELSE, TK_ELSE), (T_FN, TK_FN), (T_IF, TK_IF), (T_LET, TK_LET), (T_PROOF_ASSERT, TK_PROOF_ASSERT), (T_PROOF_LET, TK_PROOF_LET), (T_CONST, TK_CONST), (T_MATCH, TK_MATCH), (T_USING, TK_USING), (T_MUTABLE, TK_MUTABLE), (T_TYPE, TK_TYPE), (T_FAT_ARROW, TK_FAT_ARROW), (T_THIN_ARROW, TK_THIN_ARROW), (T_WHILE, TK_WHILE), (T_RETURN, TK_RETURN), (T_DOTDOT, TK_DOTDOT), (T_RANGE_INCLUSIVE, TK_RANGE_INCLUSIVE), (T_RANGE_LT_INCLUSIVE, TK_RANGE_LT_INCLUSIVE), (T_RANGE_EXCLUSIVE, TK_RANGE_EXCLUSIVE), (T_RANGE_INCLUSIVE_REV, TK_RANGE_INCLUSIVE_REV), (T_RANGE_EXCLUSIVE_REV, TK_RANGE_EXCLUSIVE_REV), (T_ELLIPSIS, TK_ELLIPSIS), (T_TEST, TK_TEST), (T_LOOP, TK_LOOP), (T_GUARD, TK_GUARD), (T_DEFER, TK_DEFER), (T_FOR, TK_FOR), (T_IN, TK_IN), (T_IS, TK_IS), (T_SUBERROR, TK_SUBERROR), (T_AND, TK_AND), (T_FORALL, TK_FORALL), (T_EXISTS, TK_EXISTS), (T_IMPLIES, TK_IMPLIES), (T_LETREC, TK_LETREC), (T_ENUMVIEW, TK_ENUMVIEW), (T_EXTENUM, TK_EXTENUM), (T_DECLARE, TK_DECLARE), (T_NORAISE, TK_NORAISE), (T_NOBREAK, TK_NOBREAK), (T_WHERE, TK_WHERE), (T_TRY_QUESTION, TK_TRY_QUESTION), (T_TRY_EXCLAMATION, TK_TRY_EXCLAMATION), (T_LEXMATCH, TK_LEXMATCH), (T_LEXMATCH_QUESTION, TK_LEXMATCH_QUESTION), (T_PACKAGE, TK_PACKAGE)] : Array[(YYSymbol, TokenKind)]) { + for term in ([(T_CHAR, TK_CHAR), (T_INT, TK_INT), (T_BYTE, TK_BYTE), (T_BYTES, TK_BYTES), (T_FLOAT, TK_FLOAT), (T_DOUBLE, TK_DOUBLE), (T_STRING, TK_STRING), (T_MULTILINE_STRING, TK_MULTILINE_STRING), (T_MULTILINE_INTERP, TK_MULTILINE_INTERP), (T_INTERP, TK_INTERP), (T_BYTES_INTERP, TK_BYTES_INTERP), (T_REGEX_LITERAL, TK_REGEX_LITERAL), (T_REGEX_INTERP, TK_REGEX_INTERP), (T_ATTRIBUTE, TK_ATTRIBUTE), (T_LIDENT, TK_LIDENT), (T_UIDENT, TK_UIDENT), (T_POST_LABEL, TK_POST_LABEL), (T_COMMENT, TK_COMMENT), (T_NEWLINE, TK_NEWLINE), (T_INFIX1, TK_INFIX1), (T_INFIX2, TK_INFIX2), (T_INFIX3, TK_INFIX3), (T_INFIX4, TK_INFIX4), (T_AUGMENTED_ASSIGNMENT, TK_AUGMENTED_ASSIGNMENT), (T_PLUS_EQUAL, TK_PLUS_EQUAL), (T_EOF, TK_EOF), (T_FALSE, TK_FALSE), (T_TRUE, TK_TRUE), (T_PUB, TK_PUB), (T_PRIV, TK_PRIV), (T_READONLY, TK_READONLY), (T_IMPORT, TK_IMPORT), (T_EXTERN, TK_EXTERN), (T_BREAK, TK_BREAK), (T_CONTINUE, TK_CONTINUE), (T_STRUCT, TK_STRUCT), (T_ENUM, TK_ENUM), (T_TRAIT, TK_TRAIT), (T_DERIVE, TK_DERIVE), (T_IMPL, TK_IMPL), (T_WITH, TK_WITH), (T_RAISE, TK_RAISE), (T_THROW, TK_THROW), (T_TRY, TK_TRY), (T_CATCH, TK_CATCH), (T_ASYNC, TK_ASYNC), (T_TYPEALIAS, TK_TYPEALIAS), (T_TRAITALIAS, TK_TRAITALIAS), (T_FNALIAS, TK_FNALIAS), (T_EQUAL, TK_EQUAL), (T_EQ_TILDE, TK_EQ_TILDE), (T_LPAREN, TK_LPAREN), (T_RPAREN, TK_RPAREN), (T_COMMA, TK_COMMA), (T_MINUS, TK_MINUS), (T_QUESTION, TK_QUESTION), (T_EXCLAMATION, TK_EXCLAMATION), (T_DOT_LIDENT, TK_DOT_LIDENT), (T_DOT_UIDENT, TK_DOT_UIDENT), (T_DOT_INT, TK_DOT_INT), (T_DOT_LPAREN, TK_DOT_LPAREN), (T_COLONCOLON, TK_COLONCOLON), (T_COLON, TK_COLON), (T_SEMI, TK_SEMI), (T_LBRACKET, TK_LBRACKET), (T_LBRACKET_BAR, TK_LBRACKET_BAR), (T_PLUS, TK_PLUS), (T_RBRACKET, TK_RBRACKET), (T_BAR_RBRACKET, TK_BAR_RBRACKET), (T_UNDERSCORE, TK_UNDERSCORE), (T_BAR, TK_BAR), (T_LBRACE, TK_LBRACE), (T_RBRACE, TK_RBRACE), (T_AMPERAMPER, TK_AMPERAMPER), (T_AMPER, TK_AMPER), (T_CARET, TK_CARET), (T_BARBAR, TK_BARBAR), (T_PACKAGE_NAME, TK_PACKAGE_NAME), (T_AS, TK_AS), (T_PIPE, TK_PIPE), (T_PIPE_LEFT, TK_PIPE_LEFT), (T_LT_PLUS, TK_LT_PLUS), (T_LT_QUESTION, TK_LT_QUESTION), (T_ELSE, TK_ELSE), (T_FN, TK_FN), (T_IF, TK_IF), (T_LET, TK_LET), (T_PROOF_ASSERT, TK_PROOF_ASSERT), (T_PROOF_LET, TK_PROOF_LET), (T_CONST, TK_CONST), (T_MATCH, TK_MATCH), (T_USING, TK_USING), (T_MUTABLE, TK_MUTABLE), (T_TYPE, TK_TYPE), (T_FAT_ARROW, TK_FAT_ARROW), (T_THIN_ARROW, TK_THIN_ARROW), (T_WHILE, TK_WHILE), (T_RETURN, TK_RETURN), (T_DOTDOT, TK_DOTDOT), (T_RANGE_INCLUSIVE, TK_RANGE_INCLUSIVE), (T_RANGE_LT_INCLUSIVE, TK_RANGE_LT_INCLUSIVE), (T_RANGE_EXCLUSIVE, TK_RANGE_EXCLUSIVE), (T_RANGE_INCLUSIVE_REV, TK_RANGE_INCLUSIVE_REV), (T_RANGE_EXCLUSIVE_REV, TK_RANGE_EXCLUSIVE_REV), (T_ELLIPSIS, TK_ELLIPSIS), (T_TEST, TK_TEST), (T_LOOP, TK_LOOP), (T_GUARD, TK_GUARD), (T_DEFER, TK_DEFER), (T_FOR, TK_FOR), (T_IN, TK_IN), (T_IS, TK_IS), (T_SUBERROR, TK_SUBERROR), (T_AND, TK_AND), (T_FORALL, TK_FORALL), (T_EXISTS, TK_EXISTS), (T_IMPLIES, TK_IMPLIES), (T_LETREC, TK_LETREC), (T_ENUMVIEW, TK_ENUMVIEW), (T_EXTENUM, TK_EXTENUM), (T_DECLARE, TK_DECLARE), (T_NORAISE, TK_NORAISE), (T_NOBREAK, TK_NOBREAK), (T_WHERE, TK_WHERE), (T_TRY_QUESTION, TK_TRY_QUESTION), (T_TRY_EXCLAMATION, TK_TRY_EXCLAMATION), (T_LEXMATCH, TK_LEXMATCH), (T_LEXMATCH_QUESTION, TK_LEXMATCH_QUESTION), (T_LEXSCAN, TK_LEXSCAN), (T_EXTEND, TK_EXTEND), (T_PACKAGE, TK_PACKAGE)] : Array[(YYSymbol, TokenKind)]) { try_add(term.0, term.1) } match token { diff --git a/attribute/parser.mbty b/attribute/parser.mbty index 0d866d26..75c9856e 100644 --- a/attribute/parser.mbty +++ b/attribute/parser.mbty @@ -17,6 +17,7 @@ %token MULTILINE_STRING %token MULTILINE_INTERP %token INTERP +%token BYTES_INTERP %token REGEX_LITERAL %token REGEX_INTERP %token<(String, String?, String)> ATTRIBUTE @@ -71,8 +72,10 @@ %token COLON ":" %token SEMI %token LBRACKET "[" +%token LBRACKET_BAR "[|" %token PLUS "+" %token RBRACKET "]" +%token BAR_RBRACKET "|]" %token UNDERSCORE "_" %token BAR "|" %token LBRACE "{" @@ -86,6 +89,7 @@ %token PIPE "|>" %token PIPE_LEFT "<|" %token LT_PLUS "<+" +%token LT_QUESTION " String: + | LIDENT { $1 } + | "extend" { "extend" } + payloads -> List[Prop]: | EOF { @list.empty() } | properties { $1 } property -> Prop: - | name=LIDENT "=" expr { Labeled(name, $3) } + | name=lident_string "=" expr { Labeled(name, $3) } | expr { Expr($1) } expr -> Expr: - | name=LIDENT { Ident({qual: None, name}) } - | name=UIDENT { Ident({qual: None, name}) } - | qual=LIDENT name=DOT_LIDENT { Ident({qual: Some(qual), name}) } - | name=LIDENT props=properties { Apply({qual: None, name}, props) } - | qual=LIDENT name=DOT_LIDENT props=properties { Apply({qual: Some(qual), name}, props) } - | STRING { String($1) } - | TRUE { Bool(true) } - | FALSE { Bool(false) } + | name=lident_string { Ident({qual: None, name}) } + | name=UIDENT { Ident({qual: None, name}) } + | qual=lident_string name=DOT_LIDENT { Ident({qual: Some(qual), name}) } + | name=lident_string props=properties { Apply({qual: None, name}, props) } + | qual=lident_string name=DOT_LIDENT props=properties { Apply({qual: Some(qual), name}, props) } + | STRING { String($1) } + | TRUE { Bool(true) } + | FALSE { Bool(false) } properties -> List[Prop]: | "(" ")" { @list.empty() } | "(" non_empty_properties ")" { $2 } non_empty_properties -> List[Prop]: - | property { @list.from_array([$1]) } + | property { @list.List([$1]) } | x=property "," xs=non_empty_properties{ xs.add(x) } diff --git a/fmt/README.mbt.md b/fmt/README.mbt.md index 296031cc..228e8d17 100644 --- a/fmt/README.mbt.md +++ b/fmt/README.mbt.md @@ -45,7 +45,7 @@ test { #|///| #|/// Greet a person #|pub fn hello(name : String) -> Unit { - #| let str = "hello, name!" + #| let str = "hello, \{name}!" #| println(str) #|} #| diff --git a/fmt/internal/comment/mapper_visitor.mbt b/fmt/internal/comment/mapper_visitor.mbt index 67caa842..732e3576 100644 --- a/fmt/internal/comment/mapper_visitor.mbt +++ b/fmt/internal/comment/mapper_visitor.mbt @@ -19,10 +19,20 @@ impl IterVisitor for Mapper with fn visit_Impl(self, top) { } ///| -impl IterVisitor for Mapper with fn visit_Expr_Array(self, exprs~, loc~) { +impl IterVisitor for Mapper with fn visit_Expr_Array( + self, + exprs~, + is_iter~, + loc~, +) { self.attach(Node(loc)) self.cursor_advance(loc.start) - let lbracket = self.cursor_find(TK_LBRACKET) + let (lbracket_kind, rbracket_kind) : (TokenKind, TokenKind) = if is_iter { + (TK_LBRACKET_BAR, TK_BAR_RBRACKET) + } else { + (TK_LBRACKET, TK_RBRACKET) + } + let lbracket = self.cursor_find(lbracket_kind) let commas = [] for elem in exprs { self.visit_Expr(elem) @@ -30,7 +40,7 @@ impl IterVisitor for Mapper with fn visit_Expr_Array(self, exprs~, loc~) { let comma = self.cursor_find(TK_COMMA, before_pos=loc.end) commas.push(comma) } - let rbracket = self.cursor_find(TK_RBRACKET) + let rbracket = self.cursor_find(rbracket_kind) self.table[Node(loc)] = NodeTable::new({ "lbracket": Token(lbracket), "comma": TokenArray(commas), diff --git a/fmt/internal/comment/mapper_visitor_wbtest.mbt b/fmt/internal/comment/mapper_visitor_wbtest.mbt new file mode 100644 index 00000000..c3f34551 --- /dev/null +++ b/fmt/internal/comment/mapper_visitor_wbtest.mbt @@ -0,0 +1,99 @@ +///| +priv struct IterArrayFinder { + mut loc : Location? +} + +///| +impl IterVisitor for IterArrayFinder with fn visit_Expr_Array( + self, + exprs~, + is_iter~, + loc~, +) { + if is_iter { + self.loc = Some(loc) + } + self.base().visit_Expr_Array(exprs~, is_iter~, loc~) +} + +///| +fn parse_impls(source : String) -> (@syntax.Impls, @tokens.Triples) raise { + let { tokens, errors, .. } = @lexer.tokens_from_string(comment=true, source) + if errors.length() != 0 { + fail("expected fixture to lex without diagnostics") + } + let (impls, reports) = @handrolled_parser.parse(tokens) + if reports.length() != 0 { + fail("expected fixture to parse without diagnostics") + } + (impls, tokens) +} + +///| +fn find_iter_array_loc(impls : @syntax.Impls) -> Location raise { + let finder = { loc: None } + impls.map(item => finder.visit_Impl(item)) |> ignore + match finder.loc { + Some(loc) => loc + None => fail("expected fixture to contain iter array") + } +} + +///| +fn token_kind_at(tokens : @tokens.Triples, key : Key) -> TokenKind? { + let loc = key.loc() + for triple in tokens { + match triple { + (tok, start, end) => + if loc.start == start && loc.end == end { + return Some(tok.kind()) + } + } + } + None +} + +///| +fn assert_token_kind( + tokens : @tokens.Triples, + key : Key?, + expected : TokenKind, + name : String, +) -> Unit raise { + match key { + Some(key) => + match token_kind_at(tokens, key) { + Some(kind) if kind == expected => () + Some(kind) => fail("expected \{name} to be \{expected}, got \{kind}") + None => fail("expected \{name} to point at a source token") + } + None => fail("expected \{name} token to be recorded") + } +} + +///| +test "iter array token table records iter delimiters" { + let source = + #|fn f() -> Unit { + #| [| // open + #| a, // item + #| |] // close + #|} + #| + let (impls, tokens) = parse_impls(source) + let loc = find_iter_array_loc(impls) + let table = Mapper::new(tokens, impls).get_table(loc) + assert_token_kind( + tokens, + table.get_token("lbracket"), + TK_LBRACKET_BAR, + "lbracket", + ) + assert_token_kind(tokens, table.get_array("comma")[0], TK_COMMA, "comma") + assert_token_kind( + tokens, + table.get_token("rbracket"), + TK_BAR_RBRACKET, + "rbracket", + ) +} diff --git a/fmt/internal/comment/moon.pkg b/fmt/internal/comment/moon.pkg index d868254b..1af3879b 100644 --- a/fmt/internal/comment/moon.pkg +++ b/fmt/internal/comment/moon.pkg @@ -7,3 +7,8 @@ import { "moonbitlang/core/sorted_map", "moonbitlang/core/debug", } + +import { + "moonbitlang/lexer", + "moonbitlang/parser/handrolled_parser", +} for "wbtest" diff --git a/fmt/internal/format/combinator_wbtest.mbt b/fmt/internal/format/combinator_wbtest.mbt new file mode 100644 index 00000000..4191b690 --- /dev/null +++ b/fmt/internal/format/combinator_wbtest.mbt @@ -0,0 +1,52 @@ +///| +test "catifflat renders compact, mixed, and expanded layouts" { + let integer = fn(x : Int) { text(x.to_string()) } + let numbers = @list.List([111111, 22222222, 33333333, 444444444]) + let left = group( + nest(break_(0) + separate_map(numbers, comma + break_(1), integer) + comma), + ) + let flat = group( + space + + text("fn(){") + + nest(break_(1) + text("expressions;")) + + break_(1) + + text("}"), + ) + let not_flat = nest( + break_(1) + + text("fn(){") + + nest(break_(1) + text("expressions")) + + break_(1), + ) + + text("}") + + break_(0) + let layout = text("call(") + + catifflat(left~, right=text(")"), flat, not_flat) + + comma + inspect( + @pp.render(layout, width=80), + content="call(111111, 22222222, 33333333, 444444444, fn(){ expressions; }),", + ) + inspect( + @pp.render(layout, width=45), + content=( + #|call(111111, 22222222, 33333333, 444444444, fn(){ + #| expressions; + #|}), + ), + ) + inspect( + @pp.render(layout, width=20), + content=( + #|call( + #| 111111, + #| 22222222, + #| 33333333, + #| 444444444, + #| fn(){ + #| expressions + #| } + #|), + ), + ) +} diff --git a/fmt/internal/format/config_format.mbt b/fmt/internal/format/config_format.mbt new file mode 100644 index 00000000..1c2ab26c --- /dev/null +++ b/fmt/internal/format/config_format.mbt @@ -0,0 +1,311 @@ +///| +fn json_string_literal(value : String) -> String { + Json::string(value).stringify() +} + +///| +fn config_label(label : String) -> String { + if label.contains("-") || label.contains("\"") || label.contains("\n") { + json_string_literal(label) + } else { + label + } +} + +///| +fn sorted_json_fields(fields : Map[String, Json]) -> Array[(String, Json)] { + let items = fields.to_array() + items.sort_by(fn(a, b) { a.0.compare(b.0) }) + items +} + +///| +fn json_inline(value : Json) -> String { + match value { + Null => "\"\"" + True => "true" + False => "false" + String(value) => json_string_literal(value) + Number(number, repr~) => repr.unwrap_or(number.to_string()) + Array(items) => + if items.length() == 0 { + "[]" + } else { + "[ " + items.map(json_inline)[:].join(", ") + " ]" + } + Object(fields) => { + let items = sorted_json_fields(fields) + if items.length() == 0 { + "{}" + } else { + "{ " + + items.map(fn(item) { + let (key, value) = item + "\{config_label(key)}: \{json_inline(value)}" + })[:].join(", ") + + " }" + } + } + } +} + +///| +fn json_top_value(value : Json) -> String { + match value { + Array(items) => + if items.length() == 0 { + "[]" + } else { + "[\n" + + items.map(item => " \{json_inline(item)},")[:].join("\n") + + "\n]" + } + _ => json_inline(value) + } +} + +///| +fn object_get(fields : Map[String, Json], key : String) -> Json? { + fields.get(key) +} + +///| +fn first_field(fields : Map[String, Json], keys : Array[String]) -> Json? { + for key in keys { + match object_get(fields, key) { + Some(value) => return Some(value) + None => () + } + } + None +} + +///| +fn render_assignment(name : String, value : Json) -> String { + "\{name} = \{json_top_value(value)}" +} + +///| +fn split_dep_spec(spec : String) -> (String, String) { + match spec.rev_find("@") { + Some(index) if index > 0 => + ( + spec.unsafe_substring(start=0, end=index), + spec.unsafe_substring(start=index + 1, end=spec.length()), + ) + _ => (spec, "") + } +} + +///| +fn render_dep_spec(name : String, value : Json) -> String { + match value { + String(version) if version != "" => "\{name}@\{version}" + _ => name + } +} + +///| +fn render_import_block(deps : Json) -> String? { + match deps { + Object(fields) => { + let items = sorted_json_fields(fields) + if items.length() == 0 { + None + } else { + let specs = items.map(fn(item) { + let (name, value) = item + " \{json_string_literal(render_dep_spec(name, value))}," + }) + Some("import {\n\{specs[:].join("\n")}\n}") + } + } + _ => None + } +} + +///| +fn render_options(fields : Map[String, Json], known : Array[String]) -> String? { + let options : Array[(String, Json)] = [] + for item in sorted_json_fields(fields) { + let (key, value) = item + if !known.contains(key) { + options.push((key, value)) + } + } + if options.length() == 0 { + None + } else { + let lines = options.map(fn(item) { + let (key, value) = item + " \{config_label(key)}: \{json_inline(value)}," + }) + Some("options(\n\{lines[:].join("\n")}\n)") + } +} + +///| +fn render_moon_pkg_json(json : Json) -> String { + match json { + Object(fields) => { + let sections : Array[String] = [] + match first_field(fields, ["warn-list", "warnings"]) { + Some(value) => sections.push(render_assignment("warnings", value)) + None => () + } + match first_field(fields, ["supported-targets", "supported_targets"]) { + Some(value) => + sections.push(render_assignment("supported_targets", value)) + None => () + } + let known = [ + "import", "test-import", "wbtest-import", "warn-list", "warnings", "supported-targets", + "supported_targets", "dev_build", "formatter", "rule", + ] + match render_options(fields, known) { + Some(options) => sections.push(options) + None => () + } + sections[:].join("\n\n") + } + _ => "" + } +} + +///| +fn render_moon_mod_json(json : Json) -> String { + match json { + Object(fields) => { + let sections : Array[String] = [] + match object_get(fields, "name") { + Some(value) => sections.push(render_assignment("name", value)) + None => () + } + match object_get(fields, "version") { + Some(value) => sections.push(render_assignment("version", value)) + None => () + } + match first_field(fields, ["deps", "import"]) { + Some(value) => + match render_import_block(value) { + Some(imports) => sections.push(imports) + None => () + } + None => () + } + match first_field(fields, ["warn-list", "warnings"]) { + Some(value) => sections.push(render_assignment("warnings", value)) + None => () + } + for + key in [ + "readme", "repository", "license", "keywords", "description", "source", + ] { + match object_get(fields, key) { + Some(value) => sections.push(render_assignment(key, value)) + None => () + } + } + match first_field(fields, ["supported-targets", "supported_targets"]) { + Some(value) => + sections.push(render_assignment("supported_targets", value)) + None => () + } + match first_field(fields, ["preferred-target", "preferred_target"]) { + Some(value) => + sections.push(render_assignment("preferred_target", value)) + None => () + } + let known = [ + "name", "version", "deps", "import", "warn-list", "warnings", "readme", "repository", + "license", "keywords", "description", "source", "supported-targets", "supported_targets", + "preferred-target", "preferred_target", "rule", + ] + match render_options(fields, known) { + Some(options) => sections.push(options) + None => () + } + sections[:].join("\n\n") + } + _ => "" + } +} + +///| +fn apply_dependency_edits( + json : Json, + add_dependencies : ArrayView[String], + remove_dependencies : ArrayView[String], +) -> Json { + match json { + Object(fields) => { + let result : Map[String, Json] = {} + for item in fields.to_array() { + let (key, value) = item + if key != "deps" { + result[key] = value + } + } + let deps : Map[String, Json] = match object_get(fields, "deps") { + Some(Object(existing)) => { + let copy : Map[String, Json] = {} + for item in existing.to_array() { + let (key, value) = item + copy[key] = value + } + copy + } + _ => {} + } + for spec in remove_dependencies { + let (name, _) = split_dep_spec(spec) + deps.remove(name) + } + for spec in add_dependencies { + let (name, version) = split_dep_spec(spec) + deps[name] = Json::string(version) + } + if !deps.is_empty() { + result["deps"] = Json::object(deps) + } + Json::object(result) + } + _ => json + } +} + +///| +pub fn format_moon_pkg(source : String) -> String { + let (ast, reports) = @moon_config.parse_moon_pkg(source) + if reports.length() != 0 { + source + } else { + render_moon_pkg_json(ast.to_json()) + } +} + +///| +pub fn format_moon_mod( + source : String, + add_dependencies? : ArrayView[String] = [], + remove_dependencies? : ArrayView[String] = [], +) -> String { + let (ast, reports) = @moon_config.parse_moon_mod(source) + if reports.length() != 0 { + source + } else { + ast.to_json() + |> apply_dependency_edits(add_dependencies, remove_dependencies) + |> render_moon_mod_json + } +} + +///| +pub fn format_json_to_moon_pkg(source : String) -> String raise { + @json.parse(source) |> render_moon_pkg_json +} + +///| +pub fn format_json_to_moon_mod(source : String) -> String raise { + @json.parse(source) |> render_moon_mod_json +} diff --git a/fmt/internal/format/context.mbt b/fmt/internal/format/context.mbt index 3ce3ddf4..f10b1a6a 100644 --- a/fmt/internal/format/context.mbt +++ b/fmt/internal/format/context.mbt @@ -18,7 +18,7 @@ fn precedence_of_operator(op : String) -> Int { "|" => 3 "^" => 4 "&" => 5 - ">" | "<" | "==" | "!=" | "<=" | "=>" => 300 + ">" | "<" | "==" | "!=" | "<=" | ">=" => 300 "<<" | ">>" => 400 "+" | "-" => 500 "*" | "/" | "%" => 600 @@ -115,6 +115,7 @@ fn @syntax.Expr::classify(expr : Self) -> ExprKind { | Constant(_) | MultilineString(_) | Interp(_) + | BytesInterp(_) | Constraint(_) | Constr(_) | Ident(_) @@ -139,11 +140,13 @@ fn @syntax.Expr::classify(expr : Self) -> ExprKind { _ => panic() } Pipe(_) | RevPipe(_) => PipeKind - TemplateWriting(_) => PostfixKind("<+") + TemplateWriting(is_conditional~, ..) => + PostfixKind(if is_conditional { " PrefixKind Implies(_) => PostfixKind("→") Match(_) | LexMatch(_) + | LexScan(_) | If(_) | For(_) | ForEach(_) diff --git a/fmt/internal/format/format.mbt b/fmt/internal/format/format.mbt index c9741ddf..a090f34b 100644 --- a/fmt/internal/format/format.mbt +++ b/fmt/internal/format/format.mbt @@ -6,15 +6,50 @@ pub fn impls_to_string(impls : @syntax.Impls) -> String { |> @pp.render(width=80) } +///| +priv struct RecoveredHoleDetector { + mut found : Bool +} + +///| +impl IterVisitor for RecoveredHoleDetector with fn visit_Expr_Hole( + self, + loc~, + kind~, +) { + ignore(loc) + match kind { + Synthesized => self.found = true + Incomplete | Todo => () + } +} + +///| +fn has_recovered_hole(impls : @syntax.Impls) -> Bool { + let detector = { found: false } + impls.map(item => detector.visit_Impl(item)) |> ignore + detector.found +} + ///| pub fn format(source : String, block_line? : Bool = true) -> String { - let { tokens, docstrings, .. } = @lexer.tokens_from_string( + let { tokens, docstrings, errors } = @lexer.tokens_from_string( comment=true, source, ) + if errors.length() != 0 { + return source + } let (impls, diag) = @handrolled_parser.parse(tokens) + // Recovered parser output can omit invalid source text, so diagnostics make + // formatting unsafe even when an AST is returned. + if diag.length() != 0 { + return source + } + if has_recovered_hole(impls) { + return source + } attach_docstrings(docstrings, impls) - ignore(diag) impls |> RemoveGroup::process |> x => { Fmt::new(block_line~).impls(x) } diff --git a/fmt/internal/format/import.mbt b/fmt/internal/format/import.mbt index 1c263504..c73607d2 100644 --- a/fmt/internal/format/import.mbt +++ b/fmt/internal/format/import.mbt @@ -22,7 +22,7 @@ using @basic {type Location} using @list {type List} ///| -using @syntax {trait MapVisitor} +using @syntax {trait IterVisitor, trait MapVisitor} ///| using @attribute {type Attribute} diff --git a/fmt/internal/format/moon.pkg b/fmt/internal/format/moon.pkg index 37eb7e69..23bf2fe4 100644 --- a/fmt/internal/format/moon.pkg +++ b/fmt/internal/format/moon.pkg @@ -9,6 +9,8 @@ import { "moonbitlang/parser/attribute", "moonbitlang/core/cmp", "moonbitlang/core/list", + "moonbitlang/moon_config", + "moonbitlang/core/json", } import { diff --git a/fmt/internal/format/pkg.generated.mbti b/fmt/internal/format/pkg.generated.mbti index 16b750e1..7061baca 100644 --- a/fmt/internal/format/pkg.generated.mbti +++ b/fmt/internal/format/pkg.generated.mbti @@ -13,6 +13,18 @@ pub fn debug_comment(String) -> (String, String) pub fn format(String, block_line? : Bool) -> String +pub fn format_json_to_moon_mod(String) -> String raise + +pub fn format_json_to_moon_pkg(String) -> String raise + +pub fn format_markdown(String, name? : String, block_line? : Bool) -> String + +pub fn format_moon_mod(String, add_dependencies? : ArrayView[String], remove_dependencies? : ArrayView[String]) -> String + +pub fn format_moon_pkg(String) -> String + +pub fn format_nth_impl_from_source(String, Int, is_markdown? : Bool) -> (Int, Int, String)? + pub fn impls_to_string(@list.List[@syntax.Impl]) -> String pub fn parse(String) -> (@list.List[@syntax.Impl], Array[@basic.Report], Array[(@tokens.Token, @basic.Position, @basic.Position)]) diff --git a/fmt/internal/format/source_format.mbt b/fmt/internal/format/source_format.mbt new file mode 100644 index 00000000..5feb28aa --- /dev/null +++ b/fmt/internal/format/source_format.mbt @@ -0,0 +1,346 @@ +///| +priv struct MarkdownBlock { + open_line : Int + content_start : Int + close_line : Int + indent : String + content : String +} + +///| +fn split_lines(source : String) -> Array[String] { + source.split("\n").map(line => line.to_owned()).to_array() +} + +///| +fn line_join(lines : Array[String]) -> String { + lines[:].join("\n") +} + +///| +fn strip_prefix_or_self(line : String, prefix : String) -> String { + if line.has_prefix(prefix) { + line.unsafe_substring(start=prefix.length(), end=line.length()) + } else { + line + } +} + +///| +fn check_fence_indent(line : String) -> String? { + match line.find("```") { + None => None + Some(index) => { + let info = line + .unsafe_substring(start=index + 3, end=line.length()) + .trim() + .to_owned() + if info == "mbt check" { + Some(line.unsafe_substring(start=0, end=index)) + } else { + None + } + } + } +} + +///| +fn is_closing_fence(line : String, indent : String) -> Bool { + if !line.has_prefix(indent) { + return false + } + let rest = line + .unsafe_substring(start=indent.length(), end=line.length()) + .trim() + .to_owned() + rest.has_prefix("```") +} + +///| +fn markdown_blocks(source : String) -> Array[MarkdownBlock] { + let lines = split_lines(source) + let blocks : Array[MarkdownBlock] = [] + let mut i = 0 + while i < lines.length() { + match check_fence_indent(lines[i]) { + None => i += 1 + Some(indent) => { + let mut j = i + 1 + while j < lines.length() && !is_closing_fence(lines[j], indent) { + j += 1 + } + if j < lines.length() { + let content_lines : Array[String] = [] + for k in (i + 1).. String { + let lines = split_lines(formatted.trim_end().to_owned()) + lines + .map(line => { + if line == "" { + indent.trim_end().to_owned() + } else { + indent + line + } + }) + .join("\n") +} + +///| +fn impl_docstring(item : @syntax.Impl) -> @syntax.DocString { + match item { + TopExpr(_) => @syntax.DocString::empty() + TopTypeDef({ doc, .. }) => doc + TopFuncDef(fun_decl={ doc, .. }, ..) => doc + TopLetDef(doc~, ..) + | TopTest(doc~, ..) + | TopTrait({ doc, .. }) + | TopImpl(doc~, ..) + | TopView(doc~, ..) + | TopImplRelation(doc~, ..) + | TopUsing(doc~, ..) => doc + } +} + +///| +fn impl_start_line(item : @syntax.Impl) -> Int { + let doc = impl_docstring(item) + if doc.content.length() == 0 { + item.loc().start.lnum + } else { + doc.loc.start.lnum + } +} + +///| +fn header_line_comment( + item : @syntax.Impl, + tokens : @tokens.Triples, +) -> String? { + let loc = item.loc() + for triple in tokens { + match triple { + (COMMENT(comment), start, _) if start.lnum == loc.start.lnum && + start > loc.start => return Some(comment.content) + _ => () + } + } + None +} + +///| +fn restore_header_line_comment( + formatted : String, + item : @syntax.Impl, + tokens : @tokens.Triples, +) -> String { + match header_line_comment(item, tokens) { + None => formatted + Some(comment) => + if formatted.contains(comment) { + formatted + } else { + match formatted.split_once("\n") { + Some((head, tail)) => { + let head = head.to_owned() + if head.contains("{") { + head + " " + comment + "\n" + tail.to_owned() + } else { + formatted + } + } + None => formatted + } + } + } +} + +///| +fn insert_header_comment(formatted : String, comment : String) -> String { + if formatted.contains(comment) { + return formatted + } + let lines = split_lines(formatted) + for i, line in lines { + if line.contains("{") { + lines[i] = line + " " + comment + return line_join(lines) + } + } + formatted +} + +///| +fn source_header_comment(source : String, line_number : Int) -> String? { + let lines = split_lines(source) + match lines.get(line_number - 1) { + None => None + Some(line) => + match (line.find("{"), line.find("//")) { + (Some(brace), Some(comment_start)) if comment_start > brace => + Some( + line + .unsafe_substring(start=comment_start, end=line.length()) + .trim() + .to_owned(), + ) + _ => None + } + } +} + +///| +fn restore_source_header_comment( + formatted : String, + source : String, + line_number : Int, +) -> String { + match source_header_comment(source, line_number) { + Some(comment) => insert_header_comment(formatted, comment) + None => formatted + } +} + +///| +fn format_single_impl( + item : @syntax.Impl, + impls : @syntax.Impls, + tokens : @tokens.Triples, + block_line? : Bool = true, +) -> String { + let mapper = @comment.Mapper::new(tokens, impls) + let doc = impl_docstring(item) + if doc.content.length() != 0 { + let overlaps_doc = fn(c : @comment.Comment) { + c.start >= doc.loc.start && c.end <= doc.loc.end + } + mapper.consume_comments(Some(Node(item.loc())), overlaps_doc) |> ignore + let table = mapper.get_table(item.loc()) + for + name in [ + "async", "const", "declare", "enum", "enumview", "extern", "fn", "impl", + "let", "priv", "pub", "struct", "suberror", "test", "trait", "typealias", + "using", + ] { + mapper.consume_comments(table.get_token(name), overlaps_doc) |> ignore + } + } + let formatted = Fmt::new(mapper~, block_line~).impl_(item) + |> @pp.render(width=80) + |> s => { s.trim().to_owned() } + restore_header_line_comment(formatted, item, tokens) +} + +///| +fn format_nth_plain_impl(source : String, index : Int) -> (Int, Int, String)? { + let (impls, reports, tokens) = parse(source) + if reports.length() != 0 { + return None + } + let items = impls.to_array() + match items.get(index) { + None => None + Some(item) => { + let loc = item.loc() + let line_start = impl_start_line(item) + let raw = format_single_impl(item, impls, tokens, block_line=true) + let formatted = restore_source_header_comment(raw, source, loc.start.lnum) + Some((line_start, loc.end.lnum, formatted)) + } + } +} + +///| +fn format_nth_markdown_impl( + source : String, + index : Int, +) -> (Int, Int, String)? { + let blocks = markdown_blocks(source) + let mut remaining = index + for block in blocks { + let (impls, reports, tokens) = parse(block.content) + if reports.length() == 0 { + let items = impls.to_array() + if remaining < items.length() { + let item = items[remaining] + let loc = item.loc() + let line_start = block.content_start + impl_start_line(item) - 1 + let line_end = block.content_start + loc.end.lnum - 1 + let raw = format_single_impl(item, impls, tokens, block_line=true) + let formatted = restore_source_header_comment( + raw, + block.content, + loc.start.lnum, + ) + return Some( + (line_start, line_end, reindent_formatted(formatted, block.indent)), + ) + } + remaining -= items.length() + } + } + None +} + +///| +pub fn format_nth_impl_from_source( + source : String, + index : Int, + is_markdown? : Bool = false, +) -> (Int, Int, String)? { + if is_markdown { + format_nth_markdown_impl(source, index) + } else { + format_nth_plain_impl(source, index) + } +} + +///| +pub fn format_markdown( + source : String, + name? : String = "", + block_line? : Bool = false, +) -> String { + ignore(name) + let lines = split_lines(source) + let blocks = markdown_blocks(source) + let out : Array[String] = [] + let mut block_index = 0 + let mut line = 1 + while line <= lines.length() { + if block_index < blocks.length() && line == blocks[block_index].open_line { + let block = blocks[block_index] + out.push(lines[line - 1]) + let formatted = format(block.content, block_line~).trim_end().to_owned() + for formatted_line in split_lines(formatted) { + out.push(block.indent + formatted_line) + } + out.push(lines[block.close_line - 1]) + line = block.close_line + 1 + block_index += 1 + } else { + out.push(lines[line - 1]) + line += 1 + } + } + line_join(out) +} diff --git a/fmt/internal/format/syntax2doc.mbt b/fmt/internal/format/syntax2doc.mbt index 9768efdb..6b6b94a8 100644 --- a/fmt/internal/format/syntax2doc.mbt +++ b/fmt/internal/format/syntax2doc.mbt @@ -209,6 +209,7 @@ fn Fmt::impl_(fmt : Self, toplevel : @syntax.Impl) -> Doc { trait_~, method_name~, quantifiers~, + method_quantifiers~, params~, ret_ty~, err_ty~, @@ -235,6 +236,19 @@ fn Fmt::impl_(fmt : Self, toplevel : @syntax.Impl) -> Doc { Some(ty) => space + text("for") + space + fmt.ty(ty) } let with_ = space + text("with") + let method_quantifiers = if method_quantifiers.is_empty() { + empty + } else { + space + + text("fn") + + fmt.type_var_binders( + method_quantifiers, + lbracket=None, + commas=@comment.NodeArray::empty(), + tvar_tables=@comment.NodeTableArray::empty(), + rbracket=None, + ) + } let method_name = space + text(method_name.name) let params = group( fmt.parameters( @@ -276,6 +290,7 @@ fn Fmt::impl_(fmt : Self, toplevel : @syntax.Impl) -> Doc { trait_ + for_part + with_ + + method_quantifiers + method_name + params + result + @@ -683,7 +698,7 @@ fn Fmt::docstring( Empty => text("///|") + hardline More(first_line, tail~) => if first_line.trim(char_set=" \t\n") == "" { - let first_line = text("///|") + text(first_line) + hardline + let first_line = text("///|") + hardline let remain_lines = concat_map(tail, x => { text("///") + text(x) + hardline }) @@ -1093,7 +1108,7 @@ fn Fmt::arguments(fmt : Fmt, args : List[@syntax.Argument]) -> Doc { let leading_args = arr.map(x => fmt.argument(x)) fn trailing_block_style() { let leading_doc = series1( - @list.from_array(leading_args), + @list.List(leading_args), comma, trailing=AlwaysPresent, ) @@ -1104,7 +1119,7 @@ fn Fmt::arguments(fmt : Fmt, args : List[@syntax.Argument]) -> Doc { fn fallback_style() { leading_args.push(fmt.argument(trailing_arg)) - group(parens(series1(@list.from_array(leading_args), comma))) + group(parens(series1(@list.List(leading_args), comma))) } fn switch_trailing_block(leading_req, total_req) { @@ -1199,7 +1214,7 @@ fn Fmt::pattern(fmt : Self, pat : @syntax.Pattern) -> Doc { let args = args.map(constr_pat_arg2doc) let args = if is_open { // Replace deprecated @list.of usage with from_array - args.concat(@list.from_array([text("..")])) + args.concat(@list.List([text("..")])) } else { args } @@ -1238,7 +1253,7 @@ fn Fmt::pattern(fmt : Self, pat : @syntax.Pattern) -> Doc { Underscore => elems.push(text(".._")) } elems.push_iter(right.map(array_pattern2doc).iter()) - let elems = @list.from_array(elems) + let elems = @list.List(elems) group(brackets(series(elems, comma, x => x))) } } @@ -1268,7 +1283,7 @@ fn Fmt::pattern(fmt : Self, pat : @syntax.Pattern) -> Doc { if is_closed { elems.push(text("..")) } - let elems = @list.from_array(elems) + let elems = @list.List(elems) group(braces(series(elems, comma, x => x))) } Map(elems~, is_closed~, loc=_) => { @@ -1284,7 +1299,7 @@ fn Fmt::pattern(fmt : Self, pat : @syntax.Pattern) -> Doc { if is_closed { elems.push(text("..")) } - let elems = @list.from_array(elems) + let elems = @list.List(elems) group(braces(series(elems, comma, x => x))) } Constraint(pat~, ty~, loc=_) => { @@ -1301,7 +1316,7 @@ fn Fmt::pattern(fmt : Self, pat : @syntax.Pattern) -> Doc { } Or(pat1~, pat2~, loc=_) => { let sep = line + char('|') + space - let pats = for acc = @list.from_array([pat1]), cur = pat2 { + let pats = for acc = @list.List([pat1]), cur = pat2 { match cur { Or(pat1~, pat2~, loc=_) => continue acc.add(pat1), pat2 pat => break acc.add(pat).rev() @@ -1632,8 +1647,9 @@ fn Fmt::lex_pattern(fmt : Self, pat : @syntax.LexPattern) -> Doc { fn elem2doc(elem : @syntax.InterpElem) -> Doc { match elem { Literal(repr~, loc=_) => text(repr) - Expr(expr~, loc=_) => fmt.compose(expr, Expr) - Source({ source, loc: _ }) => text(source) + Expr(expr~, loc=_) => + text("\\{") + fmt.compose(expr, Expr) + text("}") + Source({ source, loc: _ }) => text("\\{") + text(source) + text("}") } } @@ -1696,6 +1712,30 @@ fn Fmt::lex_case(fmt : Self, case_ : @syntax.LexCase) -> Doc { group(group(pattern) + guard_ + body) } +///| +fn Fmt::lex_scan_case_pattern( + fmt : Self, + pat : @syntax.LexScanCasePattern, +) -> Doc { + match pat { + Pattern(p) => fmt.regex_pattern(p) + Binder(b) => fmt.binder(b) + Wildcard(loc=_) => text("_") + } +} + +///| +fn Fmt::lex_scan_case(fmt : Self, case_ : @syntax.LexScanCase) -> Doc { + let { pat, guard_, body } = case_ + let pattern = fmt.lex_scan_case_pattern(pat) + let guard_ = match guard_ { + None => empty + Some(expr) => space + text("if") + space + fmt.compose(expr, Infix(Other)) + } + let body = space + text("=>") + fmt.compose_case_rhs(body, ExprStmt) + group(group(pattern) + guard_ + body) +} + ///| fn Fmt::lex_strategy(fmt : Self, strategy : @syntax.Label?) -> Doc { match strategy { @@ -1974,13 +2014,22 @@ fn Fmt::expr(fmt : Self, expr : @syntax.Expr) -> RawExprDoc { let layout = group(op + expr) Normal(layout) } - Array(exprs~, loc~) => { + Array(exprs~, is_iter~, loc~) => { let before_comment = fmt.before_comment(Some(Node(loc))) - let doc = group(brackets(series(exprs, comma, e => fmt.compose(e, Expr)))) + let elems = series(exprs, comma, e => fmt.compose(e, Expr)) + let doc = if is_iter { + if exprs.is_empty() { + text("[||]") + } else { + group(text("[|") + space + elems + space + text("|]")) + } + } else { + group(brackets(elems)) + } let after_comment = fmt.after_comment(Some(Node(loc))) BlockLike(before_comment + doc + after_comment) } - ArraySpread(elems~, loc=_) => { + ArraySpread(elems~, is_iter~, loc=_) => { fn spreadable2doc(elem : @syntax.SpreadableElem) -> Doc { match elem { Regular(expr) => fmt.compose(expr, Expr) @@ -1988,10 +2037,19 @@ fn Fmt::expr(fmt : Self, expr : @syntax.Expr) -> RawExprDoc { } } - let doc = group(brackets(series(elems, comma, spreadable2doc))) + let elems_doc = series(elems, comma, spreadable2doc) + let doc = if is_iter { + if elems.is_empty() { + text("[||]") + } else { + group(text("[|") + space + elems_doc + space + text("|]")) + } + } else { + group(brackets(elems_doc)) + } Normal(doc) } - ListComprehension(kind~, guard_~, body~, loc=_) => { + ListComprehension(kind~, guard_~, body~, is_iter~, loc=_) => { let kind = fmt.list_comprehension_kind(kind) let guard_doc = match guard_ { None => empty @@ -1999,7 +2057,13 @@ fn Fmt::expr(fmt : Self, expr : @syntax.Expr) -> RawExprDoc { space + text("if") + space + fmt.compose(expr, Infix(Other)) } let body = space + text("=>") + space + fmt.compose(body, Expr) - Normal(group(brackets(kind + guard_doc + body))) + let inner = kind + guard_doc + body + let doc = if is_iter { + text("[|") + space + inner + space + text("|]") + } else { + brackets(inner) + } + Normal(group(doc)) } ArrayGet(array~, index~, loc=_) => { let array = fmt.compose(array, Simple) @@ -2046,8 +2110,9 @@ fn Fmt::expr(fmt : Self, expr : @syntax.Expr) -> RawExprDoc { fn elem2doc(elem : @syntax.InterpElem) -> Doc { match elem { Literal(repr~, loc=_) => text(repr) - Expr(expr~, loc=_) => fmt.compose(expr, Expr) - Source({ source, loc: _ }) => text(source) + Expr(expr~, loc=_) => + text("\\{") + fmt.compose(expr, Expr) + text("}") + Source({ source, loc: _ }) => text("\\{") + text(source) + text("}") } } @@ -2055,6 +2120,20 @@ fn Fmt::expr(fmt : Self, expr : @syntax.Expr) -> RawExprDoc { let doc = double_quoted(elems) Normal(doc) } + BytesInterp(elems~, loc=_) => { + fn elem2doc(elem : @syntax.InterpElem) -> Doc { + match elem { + Literal(repr~, loc=_) => text(repr) + Expr(expr~, loc=_) => + text("\\{") + fmt.compose(expr, Expr) + text("}") + Source({ source, loc: _ }) => text("\\{") + text(source) + text("}") + } + } + + let elems = concat_map(elems, elem2doc) + let doc = text("b") + double_quoted(elems) + Normal(doc) + } Constraint(expr~, ty~, loc=_) => { let expr = fmt.compose(expr, Expr) let ty = fmt.ty(ty) @@ -2075,7 +2154,7 @@ fn Fmt::expr(fmt : Self, expr : @syntax.Expr) -> RawExprDoc { let body = space + fmt.expr_block(loop_body) let else_ = match while_else { None => empty - Some(e) => space + fmt.expr_block(e) + Some(e) => space + text("nobreak") + space + fmt.expr_block(e) } let doc = while_ + label + cond + body + else_ Normal(doc) @@ -2462,7 +2541,6 @@ fn Fmt::expr(fmt : Self, expr : @syntax.Expr) -> RawExprDoc { Empty => None More(_) => Some( - space + series( continue_block, comma, @@ -2474,7 +2552,7 @@ fn Fmt::expr(fmt : Self, expr : @syntax.Expr) -> RawExprDoc { let body = space + fmt.expr_block(body) let for_else = match for_else { None => empty - Some(e) => space + text("else") + space + fmt.expr_block(e) + Some(e) => space + text("nobreak") + space + fmt.expr_block(e) } let semi_or_newline = switch(semi + space, softline) let header = match (condition, continue_block) { @@ -2503,8 +2581,8 @@ fn Fmt::expr(fmt : Self, expr : @syntax.Expr) -> RawExprDoc { ForEach( binders~, expr~, - init=_, - continue_block=_, + init~, + continue_block~, body~, else_block~, where_clause~, @@ -2519,18 +2597,40 @@ fn Fmt::expr(fmt : Self, expr : @syntax.Expr) -> RawExprDoc { Some(x) => fmt.binder(x) } } + fn binder_expr2doc(pair : (@syntax.Binder, @syntax.Expr)) -> Doc { + let (binder, expr) = pair + fmt.binder(binder) + + space + + equal + + space + + fmt.compose(expr, Infix(Other)) + } let binders = space + group(series(binders, comma, foreach_binder2doc, trailing=AlwaysHidden)) let in_ = space + text("in") let expr = space + fmt.compose(expr, Infix(Other)) + let semi_or_newline = switch(semi + space, softline) + let init = match init { + Empty => empty + More(_) => + semi_or_newline + + series(init, comma, binder_expr2doc, trailing=AlwaysHidden) + } + let continue_block = match continue_block { + Empty => empty + More(_) => + semi_or_newline + + series(continue_block, comma, binder_expr2doc, trailing=AlwaysHidden) + } let body = space + fmt.expr_block(body) let else_block = match else_block { None => empty - Some(e) => fmt.expr_block(e) + Some(e) => space + text("nobreak") + space + fmt.expr_block(e) } let where_ = fmt.where_clause(where_clause) - let doc = label + for_ + binders + in_ + expr + body + else_block + where_ + let header = group(for_ + binders + in_ + expr + init + continue_block) + let doc = label + header + body + else_block + where_ Normal(doc) } Try( @@ -2571,10 +2671,11 @@ fn Fmt::expr(fmt : Self, expr : @syntax.Expr) -> RawExprDoc { let doc = group(braces(series(elems, comma, map_expr_elem2doc))) Normal(doc) } - TemplateWriting(expr~, template~, loc=_) => { + TemplateWriting(expr~, template~, is_conditional~, loc=_) => { let expr = fmt.compose(expr, Infix(Other)) let template = fmt.compose(template, Infix(Other)) - Normal(group(expr + space + text("<+") + space + template)) + let op = if is_conditional { " { let expr = fmt.compose(expr, Expr) @@ -2597,6 +2698,18 @@ fn Fmt::expr(fmt : Self, expr : @syntax.Expr) -> RawExprDoc { ) Collapsible(lexmatch_ + cond + strategy, cases) } + LexScan(expr~, match_loc=_, cases~, loc=_) => { + let lexscan_ = text("lexscan") + let cond = space + fmt.compose(expr, Infix(Other)) + let cases = space + + group( + braces( + series1(cases.map(x => fmt.lex_scan_case(x)), empty), + force_newline=true, + ), + ) + Collapsible(lexscan_ + cond, cases) + } Group(expr~, ..) => abort(expr.to_json().stringify(indent=2)) StaticAssert(_) => panic() } diff --git a/fmt/internal/format/utils.mbt b/fmt/internal/format/utils.mbt index c2260df1..7fb4820a 100644 --- a/fmt/internal/format/utils.mbt +++ b/fmt/internal/format/utils.mbt @@ -99,6 +99,26 @@ let hardline : Doc = @pp.hardline ///| let line : Doc = @pp.line +///| +fn break_(n : Int) -> Doc { + switch(text(String::make(n, ' ')), hardline) +} + +///| +fn catifflat(left~ : Doc, right~ : Doc, flat : Doc, not_flat : Doc) -> Doc { + dynamic(fn(ctx) { + let lr_req = left.requirement() + right.requirement() + let mid = if ctx.current_remain() >= lr_req { flat } else { not_flat } + left + mid + right + }) +} + +///| +fn init { + ignore(break_) + ignore(catifflat(left=empty, right=empty, empty, empty)) +} + ///| let comma : Doc = char(',') diff --git a/fmt/internal/format/utils_wbtest.mbt b/fmt/internal/format/utils_wbtest.mbt index 84d2845f..2b234001 100644 --- a/fmt/internal/format/utils_wbtest.mbt +++ b/fmt/internal/format/utils_wbtest.mbt @@ -1,7 +1,7 @@ ///| test "series" { let integer = fn(x : Int) { text(x.to_string()) } - let r1 = series(@list.from_array([1, 2, 3, 4]), comma, integer) + let r1 = series(@list.List([1, 2, 3, 4]), comma, integer) inspect( r1, content=( @@ -12,7 +12,7 @@ test "series" { ), ) let r2 = series( - @list.from_array([1, 2, 3, 4]), + @list.List([1, 2, 3, 4]), comma, integer, trailing=AlwaysHidden, @@ -26,7 +26,7 @@ test "series" { #|4 ), ) - let r3 = group(series(@list.from_array([1, 2, 3, 4]), comma, integer)) + let r3 = group(series(@list.List([1, 2, 3, 4]), comma, integer)) inspect(r3, content="1, 2, 3, 4") } diff --git a/fmt/internal/testsuite/comment_test/comment_test.mbt b/fmt/internal/testsuite/comment_test/comment_test.mbt index 35a33552..663092ee 100644 --- a/fmt/internal/testsuite/comment_test/comment_test.mbt +++ b/fmt/internal/testsuite/comment_test/comment_test.mbt @@ -1,8 +1,6 @@ ///| -fn read_fixture(path : String) -> String { - @fs.read_file_to_string(path) catch { - _ => @fs.read_file_to_string(path) catch { _ => "" } - } +fn read_fixture(path : String) -> String raise { + @fs.read_file_to_string(path) } ///| @@ -23,6 +21,159 @@ fn @test.Test::run(t : Self) -> Unit raise { t.snapshot(filename="\{name}.output") } +///| +test "block line style normalizes top-level docstrings" { + let source = + #| + #|enum Foo { + #| Bar + #| Baz + #|} + #| + #|/// comment + #|fn f(x: Int) -> Unit { + #| println(x) + #|} + #| + #|__DOC_MARKER__ + #|/// This is a comment + #|fn g(x: Foo) -> Unit { + #| println(x) + #|} + #| + #|fn h(x: Foo) -> Unit { + #| println(x) + #|} + #| + #|///| This is a comment + #|fn h2(x: Foo) -> Unit { + #| println(x) + #|} + let source = source.replace_all(old="__DOC_MARKER__", new="///| ") + inspect( + @format.format(source, block_line=true).trim_end(), + content=( + #|///| + #|enum Foo { + #| Bar + #| Baz + #|} + #| + #|///| + #|/// comment + #|fn f(x : Int) -> Unit { + #| println(x) + #|} + #| + #|///| + #|/// This is a comment + #|fn g(x : Foo) -> Unit { + #| println(x) + #|} + #| + #|///| + #|fn h(x : Foo) -> Unit { + #| println(x) + #|} + #| + #|///| + #|/// This is a comment + #|fn h2(x : Foo) -> Unit { + #| println(x) + #|} + ), + ) +} + +///| +test "block line style handles doc comments without license header" { + let source = + #|/// doc1 + #|/// doc2 + #|enum Foo { + #| Bar + #| Baz + #|} + inspect( + @format.format(source, block_line=true).trim_end(), + content=( + #|///| + #|/// doc1 + #|/// doc2 + #|enum Foo { + #| Bar + #| Baz + #|} + ), + ) +} + +///| +test "block line style handles legacy inline doc marker" { + let source = + #|///| doc1 + #|/// doc2 + #|enum Foo { + #| Bar + #| Baz + #|} + inspect( + @format.format(source, block_line=true).trim_end(), + content=( + #|///| + #|/// doc1 + #|/// doc2 + #|enum Foo { + #| Bar + #| Baz + #|} + ), + ) +} + +///| +test "block line style attaches doc comments separated by blank line" { + let source = + #|/// doc comment + #|/// doc comment + #| + #|enum Foo { + #| Bar + #| Baz + #|} + inspect( + @format.format(source, block_line=true).trim_end(), + content=( + #|///| + #|/// doc comment + #|/// doc comment + #|enum Foo { + #| Bar + #| Baz + #|} + ), + ) +} + +///| +test "block line style adds marker to bare top-level" { + let source = + #|enum Foo { + #| Bar + #| Baz + #|} + inspect( + @format.format(source, block_line=true).trim_end(), + content=( + #|///| + #|enum Foo { + #| Bar + #| Baz + #|} + ), + ) +} + ///| test "expr_sequence" (t : @test.Test) { t.run() diff --git a/fmt/internal/testsuite/style_test/__snapshot__/docstring.output b/fmt/internal/testsuite/style_test/__snapshot__/docstring.output index 3b128dbb..390e1e09 100644 --- a/fmt/internal/testsuite/style_test/__snapshot__/docstring.output +++ b/fmt/internal/testsuite/style_test/__snapshot__/docstring.output @@ -59,7 +59,7 @@ fn with_block_line() -> Unit { ... } -///| +///| /// doc fn with_doc() -> Unit { ... diff --git a/fmt/internal/testsuite/style_test/__snapshot__/for_where.output b/fmt/internal/testsuite/style_test/__snapshot__/for_where.output index 561759d4..6b21ff28 100644 --- a/fmt/internal/testsuite/style_test/__snapshot__/for_where.output +++ b/fmt/internal/testsuite/style_test/__snapshot__/for_where.output @@ -1,7 +1,7 @@ // generated file, do not edit! ///| fn f() -> Unit { - for i = 0; i < 10; i = i + 1 { + for i = 0; i < 10; i = i + 1 { println(i.to_string()) } where { proof_invariant: i >= 0, proof_reasoning: "i starts at 0" } } diff --git a/fmt/internal/testsuite/style_test/__snapshot__/loop_nobreak.output b/fmt/internal/testsuite/style_test/__snapshot__/loop_nobreak.output new file mode 100644 index 00000000..aa1bf85c --- /dev/null +++ b/fmt/internal/testsuite/style_test/__snapshot__/loop_nobreak.output @@ -0,0 +1,20 @@ +// generated file, do not edit! +///| +fn loop_nobreak(a : Int, b : Int, c : Bool, xs : Array[Int]) -> Unit { + while a >= b && c { + println("while") + } nobreak { + println("while nobreak") + } + for i = 0; i < xs.length(); i = i + 1 { + println(i.to_string()) + } nobreak { + println("for nobreak") + } + for x in xs; i = 0; i = i + 1 { + println(x.to_string()) + } nobreak { + println(i.to_string()) + } +} + diff --git a/fmt/internal/testsuite/style_test/__snapshot__/new_parser_syntax.output b/fmt/internal/testsuite/style_test/__snapshot__/new_parser_syntax.output new file mode 100644 index 00000000..db5f393a --- /dev/null +++ b/fmt/internal/testsuite/style_test/__snapshot__/new_parser_syntax.output @@ -0,0 +1,10 @@ +// generated file, do not edit! +///| +fn f(writer : Writer, x : Int, xs : Array[Int]) -> Unit { + let iter_values = [| 1, 2, 3 |] + let ys = [| for x in xs if x > 0 => x |] + writer Self + add(Self,Self) -> Self sub(lhs~ : Self, rhs~ : Self) -> Self - mul(Self, Self) -> Self = _ - div(Self, Self) -> Self raise DivError + mul(Self,Self) -> Self = _ + div(Self,Self) -> Self raise DivError async from_string(String) -> Self } -///| -trait LineWrap1 : - Trait1____ + - Trait2____ + - Trait3____ + - Trait4____ + - Trait5____ + - Trait6____ { - f( - Ty1______________, - Ty2______________, - Ty3______________, - Ty4______________, - ) -> Self - g( - Ty1______________, - Ty2______________, - Ty3______________, - Ty4______________, - ) -> Self +trait LineWrap1 : Trait1____ + Trait2____ + Trait3____ + Trait4____ + Trait5____ + Trait6____ { + f(Ty1______________, Ty2______________, Ty3______________, Ty4______________) -> Self + g(Ty1______________, Ty2______________, Ty3______________, Ty4______________) -> Self } -///| + impl Trait for Type with method(self, arg1, arg2) { ... } -///| impl Trait for Type with labeled(self, label1~, label2~) { ... } -///| -impl Trait for Type with type_annotation( - self : Self, - label1~ : Int, - label2~ : Bool, -) -> Unit raise Error { +impl Trait for Type with type_annotation(self : Self, label1~ : Int, label2~ : Bool) -> Unit raise Error { ... } -///| impl Trait with f() { ... } -///| pub impl Trait with f() { ... } -///| -pub impl[T1 : Trait1, T2 : Trait2] Trait for Type with f() { +pub impl[T1 : Trait1, T2 : Trait2] Trait for Type with f() { ... } -///| impl Trait for Type - -///| impl[T1, T2] Trait for Type[T1, T2] -///| -pub impl[T1 : Trait1 + Trait2, T2 : Trait1 + Trait2 + Trait3] Trait for Type[ - T1__________, - T2__________, - T3__________, - T4__________, - T5__________, - T6__________, -] with line_wrap_test( - self : Self, - label1____~ : Int, - label2____~ : Bool, - label3____~ : Bool, - label4____~ : Bool, +pub impl[T1 : Trait1 + Trait2, T2 : Trait1 + Trait2 + Trait3] Trait for Type[T1__________, T2__________, T3__________, T4__________, T5__________, T6__________] with line_wrap_test( + self : Self, label1____~ : Int, label2____~ : Bool, label3____~ : Bool, label4____~ : Bool ) -> Unit raise Error { ... } - diff --git a/fmt/internal/testsuite/style_test/__snapshot__/typedecl_alias.output b/fmt/internal/testsuite/style_test/__snapshot__/typedecl_alias.output index 702637cb..330a76b8 100644 --- a/fmt/internal/testsuite/style_test/__snapshot__/typedecl_alias.output +++ b/fmt/internal/testsuite/style_test/__snapshot__/typedecl_alias.output @@ -1,5 +1,2 @@ // generated file, do not edit! -fn init{ - _ -} - +typealias (Int, Bool) as IntBoolPair diff --git a/fmt/internal/testsuite/style_test/__snapshot__/typedecl_suberror.output b/fmt/internal/testsuite/style_test/__snapshot__/typedecl_suberror.output index f4e5818f..d4bd612e 100644 --- a/fmt/internal/testsuite/style_test/__snapshot__/typedecl_suberror.output +++ b/fmt/internal/testsuite/style_test/__snapshot__/typedecl_suberror.output @@ -2,24 +2,12 @@ ///| suberror SubErr0 -///| -suberror SubErr1 - -///| -suberror SubErr2 - ///| suberror SubErr3 { Constr1 Constr2(Int, mut label~ : Int) } -///| -suberror PayloadLineWrap1 - -///| -suberror PayloadLineWrap2 - ///| suberror PayloadLineWrap2 { Ctor1(Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7, Ty8) diff --git a/fmt/internal/testsuite/style_test/fixtures/loop_nobreak.input b/fmt/internal/testsuite/style_test/fixtures/loop_nobreak.input new file mode 100644 index 00000000..17a9fbc3 --- /dev/null +++ b/fmt/internal/testsuite/style_test/fixtures/loop_nobreak.input @@ -0,0 +1,7 @@ +fn loop_nobreak(a : Int, b : Int, c : Bool, xs : Array[Int]) -> Unit { + while a>=b&&c { println("while") } nobreak { println("while nobreak") } + + for i=0;i Unit { + let iter_values = [| 1, 2, 3 |] + let ys = [| for x in xs if x > 0 => x |] + writer Unit raise Error { ... } - - diff --git a/fmt/internal/testsuite/style_test/fixtures/typedecl_suberror.input b/fmt/internal/testsuite/style_test/fixtures/typedecl_suberror.input index 098b2d6f..a76fdce0 100644 --- a/fmt/internal/testsuite/style_test/fixtures/typedecl_suberror.input +++ b/fmt/internal/testsuite/style_test/fixtures/typedecl_suberror.input @@ -1,14 +1,10 @@ suberror SubErr0 -suberror SubErr1 Int -suberror SubErr2 (Bool, Int) suberror SubErr3 { Constr1 Constr2(Int, mut label~ : Int) } -suberror PayloadLineWrap1 (Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7, Ty8) -suberror PayloadLineWrap2 (Ty1______, Ty2______, Ty3______, Ty4______, Ty5______, Ty6______, Ty7______, Ty8______) suberror PayloadLineWrap2 { Ctor1(Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7, Ty8) Ctor2(Ty1______, Ty2______, Ty3______, Ty4______, Ty5______, Ty6______, Ty7______, mut label~ : Ty8______) @@ -17,4 +13,3 @@ suberror PayloadLineWrap2 { - diff --git a/fmt/internal/testsuite/style_test/style_test.mbt b/fmt/internal/testsuite/style_test/style_test.mbt index 78dfcc5a..c10cea3d 100644 --- a/fmt/internal/testsuite/style_test/style_test.mbt +++ b/fmt/internal/testsuite/style_test/style_test.mbt @@ -1,7 +1,18 @@ ///| -fn read_fixture(path : String) -> String { - @fs.read_file_to_string(path) catch { - _ => @fs.read_file_to_string(path) catch { _ => "" } +fn read_fixture(path : String) -> String raise { + @fs.read_file_to_string(path) +} + +///| +fn inspect_nth( + source : String, + index : Int, + is_markdown? : Bool = false, +) -> String { + match @format.format_nth_impl_from_source(source, index, is_markdown~) { + None => "none" + Some((line_start, line_end, formatted)) => + "old loc: (\{line_start}-\{line_end})\n\{formatted}" } } @@ -84,6 +95,281 @@ fn ast_check(name~ : String, source~ : String, round1~ : String) -> Unit raise { } } +///| +test "format nth impl returns one-based source range" { + let source = + #| + #|enum Foo { + #| Bar; Baz + #|} + #| + #|/// doc + #|fn f(x: Int) -> Unit { println(x) } + #| + #|fn h(x: Foo) -> Unit { //comment4 + #| println(x) //comment5 + #|} + inspect( + inspect_nth(source, 0), + content=( + #|old loc: (2-4) + #|///| + #|enum Foo { + #| Bar + #| Baz + #|} + ), + ) + inspect( + inspect_nth(source, 1), + content=( + #|old loc: (6-7) + #|///| + #|/// doc + #|fn f(x : Int) -> Unit { + #| println(x) + #|} + ), + ) + inspect( + inspect_nth(source, 2), + content=( + #|old loc: (9-11) + #|///| + #|fn h(x : Foo) -> Unit { //comment4 + #| println(x) //comment5 + #|} + ), + ) + inspect(inspect_nth(source, 3), content="none") +} + +///| +test "format nth impl rejects any full-file parse diagnostic" { + let source = + #|enum Foo { + #| Bar + #| Baz + #|} + #| + #|fn f(x: Int*syntax error!!!*) -> Unit { println(x) } + inspect(inspect_nth(source, 0), content="none") + inspect(inspect_nth(source, 1), content="none") +} + +///| +test "format keeps invalid source unchanged" { + let source = + #|fn broken() -> Unit { + #| let x = + #|} + inspect(@format.format(source, block_line=false), content=source) +} + +///| +test "format keeps source unchanged when parser reports diagnostics" { + let source = + #|enum Foo { + #| Bar + #| Baz + #|} + #| + #|fn f(x: Int*syntax error!!!*) -> Unit { println(x) } + inspect(@format.format(source, block_line=false), content=source) +} + +///| +test "format keeps lexically invalid source unchanged" { + let source = + #|fn broken() -> Unit { + #| let s = "unterminated + #|} + inspect(@format.format(source, block_line=false), content=source) +} + +///| +test "format nth impl in markdown check fences keeps indentation" { + let quote = + #|> Quote + #|> + #|> ```mbt check + #|> fn f(x: Int) -> Unit { println(x) } + #|> ``` + inspect( + inspect_nth(quote, 0, is_markdown=true), + content=( + #|old loc: (4-4) + #|> ///| + #|> fn f(x : Int) -> Unit { + #|> println(x) + #|> } + ), + ) + let list = + #|- item + #| + #| ```mbt check + #| fn g(x: Int) -> Unit { println(x) } + #| ``` + inspect( + inspect_nth(list, 0, is_markdown=true), + content=( + #|old loc: (4-4) + #| ///| + #| fn g(x : Int) -> Unit { + #| println(x) + #| } + ), + ) +} + +///| +test "format markdown formats closed mbt check fences only" { + let source = + #|# Heading + #| + #|```mbt check + #|fn f(x: Int) -> Unit { println(x) } + #|``` + #| + #|```moonbit + #|fn g(x: Int) -> Unit { println(x) } + #|``` + inspect( + @format.format_markdown(source).trim_end(), + content=( + #|# Heading + #| + #|```mbt check + #|fn f(x : Int) -> Unit { + #| println(x) + #|} + #|``` + #| + #|```moonbit + #|fn g(x: Int) -> Unit { println(x) } + #|``` + ), + ) +} + +///| +test "format json moon.pkg migrates known keys and options" { + let input = + #|{ + #| "is-main": true, + #| "warn-list": "+s1+s2-s3-s4@s5", + #| "supported-targets": "+wasm" + #|} + inspect( + @format.format_json_to_moon_pkg(input), + content=( + #|warnings = "+s1+s2-s3-s4@s5" + #| + #|supported_targets = "+wasm" + #| + #|options( + #| "is-main": true, + #|) + ), + ) +} + +///| +test "format json moon.mod migrates deps and metadata" { + let input = + #|{ + #| "name": "path/to/module", + #| "version": "0.1.0", + #| "deps": { + #| "path/to/dependency1": "1.2.3", + #| "path/to/dependency2": "4.5.6", + #| "module/name": { + #| "path": "../local_path/to/dependency" + #| } + #| }, + #| "warn-list": "+w1-w2@w3", + #| "readme": "README.md", + #| "include": ["src/", "lib/"], + #| "license": "MIT" + #|} + inspect( + @format.format_json_to_moon_mod(input), + content=( + #|name = "path/to/module" + #| + #|version = "0.1.0" + #| + #|import { + #| "module/name", + #| "path/to/dependency1@1.2.3", + #| "path/to/dependency2@4.5.6", + #|} + #| + #|warnings = "+w1-w2@w3" + #| + #|readme = "README.md" + #| + #|license = "MIT" + #| + #|options( + #| include: [ "src/", "lib/" ], + #|) + ), + ) +} + +///| +test "format current moon.mod applies dependency edits" { + let source = + #|name = "example/app" + #|version = "0.1.0" + #| + #|import { + #| "a@1.0.0", + #| "b@2.0.0", + #|} + inspect( + @format.format_moon_mod( + source, + add_dependencies=["c@3.0.0"][:], + remove_dependencies=["a"][:], + ).trim_end(), + content=( + #|name = "example/app" + #| + #|version = "0.1.0" + #| + #|import { + #| "b@2.0.0", + #| "c@3.0.0", + #|} + ), + ) +} + +///| +test "format current moon.pkg normalizes DSL config" { + let source = + #|warnings = "+w1" + #|supported_targets = "+wasm" + #|options( + #| "is-main": true, + #|) + inspect( + @format.format_moon_pkg(source).trim_end(), + content=( + #|warnings = "+w1" + #| + #|supported_targets = "+wasm" + #| + #|options( + #| "is-main": true, + #|) + ), + ) +} + // ///| // test "compose_case_rhs" (t : @test.T) { // t.run() @@ -204,6 +490,11 @@ test "for_where" (t : @test.Test) { t.run(enable_ast_check=false) } +///| +test "loop_nobreak" (t : @test.Test) { + t.run() +} + ///| test "struct_constructor" (t : @test.Test) { t.run(enable_ast_check=false) @@ -223,3 +514,8 @@ test "lexmatch" (t : @test.Test) { test "async_toplevel" (t : @test.Test) { t.run(enable_ast_check=false) } + +///| +test "new_parser_syntax" (t : @test.Test) { + t.run() +} diff --git a/handrolled_parser/core.mbt b/handrolled_parser/core.mbt index f639e9f1..fc97b271 100644 --- a/handrolled_parser/core.mbt +++ b/handrolled_parser/core.mbt @@ -300,6 +300,10 @@ fn State::expect_lident(state : Self, context~ : String) -> String { state.skip() name } + EXTEND => { + state.skip() + "extend" + } UIDENT(name) => { let loc = state.peek_location() state.skip() @@ -311,7 +315,7 @@ fn State::expect_lident(state : Self, context~ : String) -> String { } other => { let loc = state.peek_location() - state.report_unexpected(other, [TK_LIDENT], loc) + state.report_unexpected(other, [TK_LIDENT, TK_EXTEND], loc) state.panic() |> ignore "" } @@ -330,9 +334,13 @@ fn State::expect_luident(state : Self, context~ : String) -> String { state.skip() name } + EXTEND => { + state.skip() + "extend" + } other => { let loc = state.peek_location() - state.report_unexpected(other, [TK_LIDENT, TK_UIDENT], loc) + state.report_unexpected(other, [TK_LIDENT, TK_EXTEND, TK_UIDENT], loc) state.panic() |> ignore "" } diff --git a/handrolled_parser/first_set.mbt b/handrolled_parser/first_set.mbt index b42ef07d..b50df5e3 100644 --- a/handrolled_parser/first_set.mbt +++ b/handrolled_parser/first_set.mbt @@ -1,8 +1,12 @@ ///| -let first_qual_lident : Array[TokenKind] = [TK_LIDENT, TK_PACKAGE_NAME] +let first_qual_lident : Array[TokenKind] = [ + TK_LIDENT, + TK_EXTEND, + TK_PACKAGE_NAME, +] ///| -let first_luident : Array[TokenKind] = [TK_LIDENT, TK_UIDENT] +let first_luident : Array[TokenKind] = [TK_LIDENT, TK_EXTEND, TK_UIDENT] ///| let first_constr : Array[TokenKind] = first_luident @@ -42,14 +46,17 @@ let first_simple_expr : Array[TokenKind] = [ TK_MULTILINE_STRING, TK_MULTILINE_INTERP, TK_BYTE, + TK_BYTES_INTERP, TK_INTERP, TK_PACKAGE_NAME, TK_ASYNC, TK_FN, TK_LIDENT, + TK_EXTEND, TK_UIDENT, TK_LPAREN, TK_LBRACKET, + TK_LBRACKET_BAR, TK_LBRACE, TK_UNDERSCORE, TK_EXCLAMATION, @@ -76,6 +83,8 @@ let first_expr : Array[TokenKind] = [ TK_UNDERSCORE, TK_LPAREN, TK_LIDENT, + TK_EXTEND, + TK_LEXSCAN, TK_EXCLAMATION, ] @@ -116,6 +125,7 @@ let first_simple_pattern : Array[TokenKind] = [ TK_STRING, TK_UNDERSCORE, TK_LIDENT, + TK_EXTEND, TK_PACKAGE_NAME, TK_UIDENT, TK_LPAREN, diff --git a/handrolled_parser/parser.mbt b/handrolled_parser/parser.mbt index 66fbf545..f7b6c0d8 100644 --- a/handrolled_parser/parser.mbt +++ b/handrolled_parser/parser.mbt @@ -23,7 +23,7 @@ fn State::parse_attributes(self : Self) -> List[Attribute] { result.push(Attribute::new(loc~, content)) self.skip() } - @list.from_array(result) + @list.List(result) } ///| @@ -53,7 +53,7 @@ fn State::parse_toplevel(self : Self) -> Impls { self.pop_syncs(first_impl_) } self.pop_sync(TK_EOF) - @list.from_array(result) + @list.List(result) } ///| @@ -69,6 +69,10 @@ fn State::parse_qual_lident( self.skip() Ident(name=id) } + EXTEND => { + self.skip() + Ident(name="extend") + } UIDENT(_) => { // error recovery self.skip() @@ -196,6 +200,10 @@ fn State::parse_luident(self : Self) -> String { self.skip() id } + EXTEND => { + self.skip() + "extend" + } other => { let loc = self.peek_location() self.report_unexpected(other, first_luident, loc) @@ -259,9 +267,9 @@ fn State::parse_fun_binder(self : Self) -> (@syntax.TypeName?, @syntax.Binder) { match self.peek_token() { PACKAGE_NAME(_) | UIDENT(_) | AMPER => parse_qual_with_coloncolon() - LIDENT(_) if self.peek_token(nth=1) is COLONCOLON => + LIDENT(_) | EXTEND if self.peek_token(nth=1) is COLONCOLON => parse_qual_with_coloncolon() - LIDENT(_) => { + LIDENT(_) | EXTEND => { let id = self.parse_binder(context="name of `fn`") (None, id) } @@ -287,11 +295,7 @@ fn State::parse_var(self : Self) -> @syntax.Var { ///| fn State::parse_tvar_binder(self : Self) -> @syntax.TypeVarBinder { if self.mode is Panic(loc~, ..) { - return { - name: "?tvar_name", - name_loc: loc, - constraints: @list.from_array([]), - } + return { name: "?tvar_name", name_loc: loc, constraints: @list.List([]) } } let spos = self.peek_spos() let name = self.expect_uident(context="type variable name") @@ -305,7 +309,7 @@ fn State::parse_tvar_binder(self : Self) -> @syntax.TypeVarBinder { let trait_ = state.parse_qual_type_ident(context="trait name") { trait_, loc } }) - |> @list.from_array + |> @list.List }, ) let constraints = match constraints { @@ -413,7 +417,7 @@ fn State::parse_opt_type_params_no_constraints( ) }) .unwrap_or([]) - |> @list.from_array + |> @list.List } ///| @@ -456,7 +460,7 @@ fn State::parse_fun_decl( delim=TK_COMMA, State::parse_parameter, ) - |> @list.from_array + |> @list.List }) let params_loc = match decl_params { Some(_) => self.loc_start_with(param_loc_start) @@ -569,7 +573,7 @@ fn State::parse_trait_decl( let trait_ = state.parse_qual_type_ident(context="trait name") @syntax.TypeVarConstraint::{ trait_, loc } }) - |> @list.from_array + |> @list.List }) } else { @list.new() @@ -580,7 +584,7 @@ fn State::parse_trait_decl( follow_set=[TK_RBRACE], State::parse_trait_method_decl, ) - let methods = @list.from_array(methods) + let methods = @list.List(methods) self.expect_token(TK_RBRACE) let loc = self.loc_start_with(spos) { @@ -616,14 +620,16 @@ fn State::parse_visibility(self : Self) -> @syntax.Visibility { state.skip() "readonly" } - LIDENT(attr) => { - state.skip() - attr - } + LIDENT(_) | EXTEND => + state.expect_lident(context="visibility attribute") tok => { let loc = state.peek_location() state.panic() |> ignore - state.report_unexpected(tok, [TK_READONLY, TK_LIDENT], loc) + state.report_unexpected( + tok, + [TK_READONLY, TK_LIDENT, TK_EXTEND], + loc, + ) "" } } @@ -658,7 +664,7 @@ fn State::parse_test_block( delim=TK_COMMA, State::parse_parameter, ) - Some(@list.from_array(params)) + Some(@list.List(params)) } else { None } @@ -697,7 +703,7 @@ fn State::parse_top_func( self.skip() } DeclStubs( - Embedded(language=None, code=CodeMultilineString(@list.from_array(xs))), + Embedded(language=None, code=CodeMultilineString(@list.List(xs))), ) } else { let name1 = self.expect_string() @@ -750,7 +756,7 @@ fn State::parse_top(self : Self) -> @syntax.Impl { delim=TK_SEMI, State::parse_constr_decl, ) - |> @list.from_array + |> @list.List Error(EnumPayload(cs)) } _ => { @@ -836,7 +842,7 @@ fn State::parse_top(self : Self) -> @syntax.Impl { State::parse_type, ) self.expect_token(TK_RPAREN) - TupleStruct(@list.from_array(ts)) + TupleStruct(@list.List(ts)) } _ => self.parse_struct_body(allow_constr=true) } @@ -867,7 +873,7 @@ fn State::parse_top(self : Self) -> @syntax.Impl { delim=TK_SEMI, State::parse_constr_decl, ) - |> @list.from_array + |> @list.List let deriving = self.parse_deriving_directive_list() let loc = self.loc_start_with(spos) TopTypeDef({ @@ -900,7 +906,7 @@ fn State::parse_top(self : Self) -> @syntax.Impl { delim=TK_SEMI, State::parse_constr_decl, ) - |> @list.from_array + |> @list.List ExtendEnum(target~, constructors~) } else { let constrs = self.surround_series( @@ -910,7 +916,7 @@ fn State::parse_top(self : Self) -> @syntax.Impl { delim=TK_SEMI, State::parse_constr_decl, ) - |> @list.from_array + |> @list.List ExtensibleEnum(constrs) } let deriving = self.parse_deriving_directive_list() @@ -976,7 +982,7 @@ fn State::parse_top(self : Self) -> @syntax.Impl { decl_body=DeclStubs( Embedded( language=Some(language), - code=CodeMultilineString(@list.from_array(xs)), + code=CodeMultilineString(@list.List(xs)), ), ), where_clause=None, @@ -1048,8 +1054,11 @@ fn State::parse_top(self : Self) -> @syntax.Impl { if self.peek_token() is WITH { self.skip() self.push_sync(TK_LBRACE) - if self.peek_token() is FN { + let method_quantifiers = if self.peek_token() is FN { self.skip() + self.parse_opt_typ_params() + } else { + @list.empty() } let method_name = self.parse_binder(context="name of method") let params = self.surround_series( @@ -1058,7 +1067,7 @@ fn State::parse_top(self : Self) -> @syntax.Impl { delim=TK_COMMA, State::parse_parameter, ) - |> @list.from_array + |> @list.List let (ret_ty, err_ty) = self.parse_func_return_type() self.pop_sync(TK_LBRACE) let body : @syntax.DeclBody = if self.peek_token() is EQUAL { @@ -1074,6 +1083,7 @@ fn State::parse_top(self : Self) -> @syntax.Impl { trait_~, method_name~, quantifiers~, + method_quantifiers~, params~, ret_ty~, err_ty~, @@ -1100,8 +1110,11 @@ fn State::parse_top(self : Self) -> @syntax.Impl { self.pop_sync(TK_WITH) self.skip() self.push_sync(TK_LBRACE) - if self.peek_token() is FN { + let method_quantifiers = if self.peek_token() is FN { self.skip() + self.parse_opt_typ_params() + } else { + @list.empty() } let method_name = self.parse_binder(context="name of method") let params = self.surround_series( @@ -1110,7 +1123,7 @@ fn State::parse_top(self : Self) -> @syntax.Impl { delim=TK_COMMA, State::parse_parameter, ) - |> @list.from_array + |> @list.List let (ret_ty, err_ty) = self.parse_func_return_type() self.pop_sync(TK_LBRACE) let body : @syntax.DeclBody = if self.peek_token() is EQUAL { @@ -1126,6 +1139,7 @@ fn State::parse_top(self : Self) -> @syntax.Impl { trait_~, method_name~, quantifiers~, + method_quantifiers~, params~, ret_ty~, err_ty~, @@ -1147,6 +1161,7 @@ fn State::parse_top(self : Self) -> @syntax.Impl { trait_~, method_name={ name: "", loc: @syntax.no_location }, quantifiers=@list.new(), + method_quantifiers=@list.empty(), params=@list.new(), ret_ty=None, err_ty=NoErrorType, @@ -1171,7 +1186,7 @@ fn State::parse_top(self : Self) -> @syntax.Impl { delim=TK_SEMI, State::parse_constr_decl, ) - |> @list.from_array + |> @list.List self.expect_token(TK_FOR) let source_ty = self.parse_type() self.expect_token(TK_WITH) @@ -1183,7 +1198,7 @@ fn State::parse_top(self : Self) -> @syntax.Impl { delim=TK_COMMA, State::parse_parameter, ) - |> @list.from_array + |> @list.List let params_loc = self.loc_start_with(params_spos) let body = self.parse_block_expr() let loc = self.loc_start_with(spos) @@ -1257,7 +1272,7 @@ fn State::parse_top(self : Self) -> @syntax.Impl { delim=TK_COMMA, fn(state) { match state.peek_token() { - LIDENT(_) => { + LIDENT(_) | EXTEND => { let target = parse_alias_target(state, true, "value name") (target, @syntax.UsingKind::Value) } @@ -1279,7 +1294,7 @@ fn State::parse_top(self : Self) -> @syntax.Impl { let other_loc = state.peek_location() state.report_unexpected( other, - [TK_LIDENT, TK_UIDENT, TK_TYPE, TK_TRAIT], + [TK_LIDENT, TK_EXTEND, TK_UIDENT, TK_TYPE, TK_TRAIT], other_loc, ) let loc = state.panic() @@ -1291,7 +1306,7 @@ fn State::parse_top(self : Self) -> @syntax.Impl { } }, ) - |> @list.from_array() + |> @list.List() let loc = self.loc_start_with(spos) @syntax.Impl::TopUsing( pkg~, @@ -1378,7 +1393,7 @@ fn State::parse_deriving_directive_list( delim=TK_COMMA, State::parse_deriving_directive, ) - @list.from_array(directives) + @list.List(directives) } else { @list.new() } @@ -1402,7 +1417,7 @@ fn State::parse_deriving_directive(self : Self) -> @syntax.DerivingDirective { delim=TK_COMMA, State::parse_argument, ) - |> @list.from_array + |> @list.List } else { @list.new() } @@ -1433,7 +1448,7 @@ fn State::parse_trait_method_params(self : State) -> @syntax.Parameters { let typ = state.parse_type() Labelled(binder~, ty=Some(typ)) } - LIDENT(_) => { + LIDENT(_) | EXTEND => { let binder_loc = state.peek_location() let binder_name = state.expect_lident(context="parameter name") let binder : @syntax.Binder = { name: binder_name, loc: binder_loc } @@ -1467,7 +1482,7 @@ fn State::parse_trait_method_params(self : State) -> @syntax.Parameters { } }, ) - params |> @list.from_array + params |> @list.List } ///| @@ -1593,7 +1608,7 @@ fn State::parse_constr_decl(self : Self) -> @syntax.ConstrDecl { } }, ) - Some(@list.from_array(xs)) + Some(@list.List(xs)) } else { None } @@ -1684,28 +1699,36 @@ fn State::parse_constr_pattern(self : Self) -> @syntax.Pattern { ConstrArgRelatedness::Arg(args) } }) - |> @list.from_array + |> @list.List } fn parse_constr_args_no_open() { self.surround_series(left=TK_LPAREN, right=TK_RPAREN, delim=TK_COMMA, _ => { self.parse_constr_pat_argument() }) - |> @list.from_array + |> @list.List } match self.peek_token() { // bitstring constr pattern `i32(args)` // To disambiguate with pattern variable, the args list must be present. LIDENT(name) if self.peek_token(nth=1) is LPAREN => { - self.skip() // skip lident let name_loc = self.peek_location() + self.skip() // skip lident let binder : @syntax.Binder = { name, loc: name_loc } let args = parse_constr_args_no_open() let loc = self.loc_start_with(spos) @syntax.Pattern::SpecialConstr(binder~, args~, loc~) } - PACKAGE_NAME(_) | UIDENT(_) | LIDENT(_) => { + EXTEND if self.peek_token(nth=1) is LPAREN => { + let name_loc = self.peek_location() + self.skip() // skip extend + let binder : @syntax.Binder = { name: "extend", loc: name_loc } + let args = parse_constr_args_no_open() + let loc = self.loc_start_with(spos) + @syntax.Pattern::SpecialConstr(binder~, args~, loc~) + } + PACKAGE_NAME(_) | UIDENT(_) | LIDENT(_) | EXTEND => { let constr = self.parse_constr() let maybe_args = self.optional([TK_LPAREN], _ => parse_constr_args()) let mut is_open = false @@ -1822,11 +1845,12 @@ fn State::parse_simple_pattern(self : Self) -> @syntax.Pattern { self.expect_token(TK_UNDERSCORE) Any(loc~) } - LIDENT(_) if !(self.peek_token(nth=1) is (COLONCOLON | LPAREN)) => { + LIDENT(_) | EXTEND if !(self.peek_token(nth=1) is (COLONCOLON | LPAREN)) => { let binder = self.parse_binder(context="") Var(binder) } - PACKAGE_NAME(_) | UIDENT(_) | LIDENT(_) => self.parse_constr_pattern() + PACKAGE_NAME(_) | UIDENT(_) | LIDENT(_) | EXTEND => + self.parse_constr_pattern() LPAREN => { let spos = self.peek_spos() let result = self.surround(left=TK_LPAREN, right=TK_RPAREN, fn(state) { @@ -1843,7 +1867,7 @@ fn State::parse_simple_pattern(self : Self) -> @syntax.Pattern { first } else { Tuple( - pats=@list.from_array([first, ..pats]), + pats=@list.List([first, ..pats]), loc=state.loc_start_with(spos), ) } @@ -1928,7 +1952,7 @@ fn State::parse_simple_pattern(self : Self) -> @syntax.Pattern { }) NoDotDot => dotdot = match self.peek_token() { - LIDENT(_) => { + LIDENT(_) | EXTEND => { let binder = self.parse_binder(context="") WithBinder(binder) } @@ -1950,8 +1974,8 @@ fn State::parse_simple_pattern(self : Self) -> @syntax.Pattern { } }, ) - let pats1 = @list.from_array(pats1) - let pats2 = @list.from_array(pats2) + let pats1 = @list.List(pats1) + let pats2 = @list.List(pats2) let pats : @syntax.ArrayPatterns = match dotdot { NoDotDot => Closed(pats1) NoBinder => Open(pats1, pats2, NoBinder) @@ -2021,7 +2045,7 @@ fn State::parse_simple_pattern(self : Self) -> @syntax.Pattern { } BYTES(x) => parse_map_elem_pat(Bytes(x)) STRING(x) => parse_map_elem_pat(String(x)) - LIDENT(_) => { + LIDENT(_) | EXTEND => { if kind is Unknown { kind = Record } @@ -2029,9 +2053,9 @@ fn State::parse_simple_pattern(self : Self) -> @syntax.Pattern { } other => { let expected : Array[TokenKind] = match kind { - Unknown => [TK_LIDENT, ..first_map_pattern_key] + Unknown => [TK_LIDENT, TK_EXTEND, ..first_map_pattern_key] Map => first_map_pattern_key - Record => [TK_LIDENT] + Record => [TK_LIDENT, TK_EXTEND] } self.report_unexpected(other, expected, self.peek_location()) self.panic() |> ignore @@ -2199,6 +2223,13 @@ fn State::parse_constr_pat_argument(self : Self) -> @syntax.ConstrPatArg { let pat = self.parse_pattern() { pat, kind: Labelled(label) } } + EXTEND if self.peek_token(nth=1) is EQUAL => { + let label : @syntax.Label = { name: "extend", loc: self.peek_location() } + self.skip() // extend + self.expect_token(TK_EQUAL) + let pat = self.parse_pattern() + { pat, kind: Labelled(label) } + } _ => { let pat = self.parse_pattern() { pat, kind: Positional } @@ -2389,9 +2420,14 @@ fn State::parse_foreach_binder(self : State) -> @syntax.Binder? { self.skip() Some({ name, loc }) } + EXTEND => { + let loc = self.peek_location() + self.skip() + Some({ name: "extend", loc }) + } other => { let loc = self.peek_location() - self.report_unexpected(other, [TK_LIDENT, TK_UNDERSCORE], loc) + self.report_unexpected(other, [TK_LIDENT, TK_EXTEND, TK_UNDERSCORE], loc) self.panic() |> ignore None } @@ -2409,7 +2445,7 @@ fn State::parse_where_clause(self : State) -> @syntax.WhereClause? { follow_set=[TK_RBRACE], State::parse_field_def, ) - let fields = @list.from_array(fields) + let fields = @list.List(fields) self.expect_token(TK_RBRACE) let loc = self.loc_start_with(spos) Some({ fields, loc }) @@ -2462,7 +2498,7 @@ fn State::parse_for_expr(self : Self, label~ : @syntax.Label?) -> @syntax.Expr { // but it is very likely a `for .. in` loop, // so we treat it as `for .. in` for better error message & recovery. self.parse_foreach_loop(spos~, label~) - LIDENT(_) => + LIDENT(_) | EXTEND => match self.peek_token(nth=1) { EQUAL => self.parse_for_loop(spos~, label~) COMMA | IN => self.parse_foreach_loop(spos~, label~) @@ -2471,7 +2507,7 @@ fn State::parse_for_expr(self : Self, label~ : @syntax.Label?) -> @syntax.Expr { handle_error([TK_EQUAL, TK_COMMA, TK_IN]) } } - _ => handle_error([TK_LIDENT, TK_SEMI, TK_LBRACE]) + _ => handle_error([TK_LIDENT, TK_EXTEND, TK_SEMI, TK_LBRACE]) } } @@ -2485,8 +2521,7 @@ fn State::parse_foreach_loop( return Hole(loc~, kind=Synthesized) } let binders = self.with_follow(follow_set=[TK_IN], fn(state) { - state.sepby1(delim=TK_COMMA, State::parse_foreach_binder) - |> @list.from_array + state.sepby1(delim=TK_COMMA, State::parse_foreach_binder) |> @list.List }) self.expect_token(TK_IN) let expr = self.parse_expr() @@ -2497,7 +2532,7 @@ fn State::parse_foreach_loop( follow_set=[TK_SEMI, TK_LBRACE], State::parse_loop_binder_with_value, ) - let init = @list.from_array(init) + let init = @list.List(init) let continue_block = if self.peek_token() is SEMI(_) { self.skip() let (continue_block, _) = self.series_with_follow( @@ -2505,7 +2540,7 @@ fn State::parse_foreach_loop( follow_set=[TK_LBRACE], State::parse_loop_binder_with_value, ) - @list.from_array(continue_block) + @list.List(continue_block) } else { @list.empty() } @@ -2549,7 +2584,7 @@ fn State::parse_for_loop( follow_set=[TK_SEMI, TK_LBRACE], State::parse_loop_binder_with_value, ) - let binders = @list.from_array(binders) + let binders = @list.List(binders) let (condition, continue_block) = match self.peek_token() { LBRACE => (None, @list.new()) SEMI(_) => { @@ -2566,7 +2601,7 @@ fn State::parse_for_loop( follow_set=[TK_LBRACE], State::parse_loop_binder_with_value, ) - @list.from_array(continue_block) + @list.List(continue_block) } self.pop_sync(TK_LBRACE) (condition, continue_block) @@ -2661,7 +2696,7 @@ fn State::parse_try_expr(self : Self) -> @syntax.Expr { delim=TK_SEMI, State::parse_case, ) - |> @list.from_array + |> @list.List let (try_else, else_loc) = if self.peek_token() is NORAISE { let else_spos = self.peek_spos() self.skip() @@ -2675,7 +2710,7 @@ fn State::parse_try_expr(self : Self) -> @syntax.Expr { delim=TK_SEMI, State::parse_case, ) - |> @list.from_array + |> @list.List (Some(try_else_cases), else_loc) } else { (None, @syntax.no_location) @@ -2767,7 +2802,7 @@ fn State::parse_match_expr(self : Self) -> @syntax.Expr { delim=TK_SEMI, State::parse_case, ) - |> @list.from_array + |> @list.List let loc = self.loc_start_with(spos) Match(expr~, cases~, match_loc~, loc~) } @@ -2855,7 +2890,7 @@ fn State::parse_lexmatch_expr(self : State) -> @syntax.Expr { follow_set=[TK_RBRACE], State::parse_lexmatch_case, ) - @list.from_array(cases) + @list.List(cases) } let cases = self.surround(left=TK_LBRACE, right=TK_RBRACE, parse_body) @@ -2888,6 +2923,74 @@ fn State::parse_lexmatch_case(self : State) -> @syntax.LexCase { } } +///| +fn State::parse_lexscan_expr(self : State) -> @syntax.Expr { + let spos = self.peek_spos() + self.expect_token(TK_LEXSCAN) + let expr = self.with_follow(follow_set=[TK_LBRACE], fn(state) { + state.try_parse_condition_expr() + }) + let match_loc = @basic.Location::{ start: spos, end: self.peek_epos() } + fn parse_body(state : State) -> @list.List[@syntax.LexScanCase] { + let (cases, _) = state.series_with_follow( + invalid_delims=[TK_COMMA], + delim=TK_SEMI, + follow_set=[TK_RBRACE], + State::parse_lexscan_case, + ) + @list.List(cases) + } + + let cases = self.surround(left=TK_LBRACE, right=TK_RBRACE, parse_body) + let loc = self.loc_start_with(spos) + @syntax.Expr::LexScan(expr~, match_loc~, cases~, loc~) +} + +///| +fn State::parse_lexscan_case(self : State) -> @syntax.LexScanCase { + match self.peek_token() { + ELLIPSIS => { + let loc = self.peek_location() + self.skip() + @syntax.LexScanCase::{ + pat: @syntax.LexScanCasePattern::Wildcard(loc~), + guard_: None, + body: Hole(loc~, kind=Todo), + } + } + _ => { + let pat = self.with_syncs( + [TK_FAT_ARROW, TK_IF], + State::parse_lexscan_case_pattern, + ) + let guard_ = self.parse_lex_case_guard() + let body = self.parse_fat_arrow_action() + { pat, guard_, body } + } + } +} + +///| +fn State::parse_lexscan_case_pattern( + self : State, +) -> @syntax.LexScanCasePattern { + match self.peek_token() { + UNDERSCORE => { + let loc = self.peek_location() + self.skip() + @syntax.LexScanCasePattern::Wildcard(loc~) + } + LIDENT(_) | EXTEND => { + let binder = self.parse_binder(context="lexscan binder") + @syntax.LexScanCasePattern::Binder(binder) + } + _ => { + let pat = self.parse_regex_as_pattern() + @syntax.LexScanCasePattern::Pattern(pat) + } + } +} + ///| fn State::parse_lex_case_guard(self : State) -> @syntax.Expr? { match self.peek_token() { @@ -2928,12 +3031,12 @@ fn State::parse_lex_pattern( let pats = self.with_follow(follow_set=[TK_RPAREN], state => { state.sepby1(delim=TK_COMMA, State::parse_lex_top_pattern) }) - |> @list.from_array + |> @list.List self.expect_token(TK_RPAREN) let loc = self.loc_start_with(spos) (pats, loc) } - LIDENT(_) => { + LIDENT(_) | EXTEND => { let loc = self.peek_location() let name = self.expect_lident(context="lex rest binder") (@list.singleton(Binder({ name, loc })), loc) @@ -2965,7 +3068,7 @@ fn State::parse_lex_pattern( ///| fn State::parse_lex_top_pattern(self : State) -> @syntax.LexTopPattern { match self.peek_token() { - LIDENT(_) => { + LIDENT(_) | EXTEND => { let loc = self.peek_location() let name = self.expect_lident(context="lex rest binder") Binder({ name, loc }) @@ -3027,7 +3130,7 @@ fn State::parse_lex_pattern_sequence( _ => break () } } - @list.from_array(pats) + @list.List(pats) } ///| @@ -3148,7 +3251,7 @@ fn State::parse_tuple_or_constraint(self : Self) -> @syntax.Expr { if rest.length() == 0 { Group(expr=first, group=Paren, loc~) } else { - let rest = @list.from_array(rest) + let rest = @list.List(rest) Tuple(exprs=rest.add(first), loc~) } } @@ -3201,7 +3304,7 @@ fn State::handle_lparen(self : Self) -> @syntax.Expr { Expr(expr) => (as_binder(expr), None) } }) - |> @list.from_array + |> @list.List let body = self.parse_expr_stmt_no_break_continue_return() let loc = self.loc_start_with(spos) Function( @@ -3231,7 +3334,7 @@ fn State::handle_lparen(self : Self) -> @syntax.Expr { Expr(expr) => expr } }) - |> @list.from_array + |> @list.List let loc = self.loc_start_with(spos) handle_expr(Tuple(exprs~, loc~)) } @@ -3308,6 +3411,7 @@ fn State::parse_expr(self : Self) -> @syntax.Expr { } } LEXMATCH => self.parse_lexmatch_expr() + LEXSCAN => self.parse_lexscan_expr() FOR => self.parse_for_expr(label=None) WHILE => self.parse_while_loop(label=None) TRY => self.parse_try_expr() @@ -3317,10 +3421,10 @@ fn State::parse_expr(self : Self) -> @syntax.Expr { MATCH => self.parse_match_expr() FORALL | EXISTS => self.parse_quantifier_expr() LPAREN => self.handle_lparen() - LIDENT(_) | UNDERSCORE if self.peek_token(nth=1) is FAT_ARROW => { + LIDENT(_) | EXTEND | UNDERSCORE if self.peek_token(nth=1) is FAT_ARROW => { let spos = self.peek_spos() let p : @syntax.ArrowFnParam = match self.peek_token() { - LIDENT(_) => { + LIDENT(_) | EXTEND => { let binder = self.parse_binder(context="") Named(binder) } @@ -3336,7 +3440,7 @@ fn State::parse_expr(self : Self) -> @syntax.Expr { let body = self.parse_expr_stmt_no_break_continue_return() let loc = self.loc_start_with(spos) let func = @syntax.make_arrow_fn( - @list.from_array([(p, None)]), + @list.List([(p, None)]), body, params_loc~, loc~, @@ -3372,7 +3476,7 @@ fn State::parse_simple_try_expr( delim=TK_SEMI, State::parse_case, ) - |> @list.from_array + |> @list.List let (try_else, else_loc) = if self.peek_token() is NORAISE { let else_spos = self.peek_spos() self.skip() @@ -3386,7 +3490,7 @@ fn State::parse_simple_try_expr( delim=TK_SEMI, State::parse_case, ) - |> @list.from_array + |> @list.List (Some(try_else_cases), else_loc) } else { (None, @syntax.no_location) @@ -3467,7 +3571,7 @@ fn State::try_parse_arrow_fn_expr( func=@syntax.make_arrow_fn( params_loc~, loc~, - @list.from_array(parameters), + @list.List(parameters), body, ), loc~, @@ -3497,14 +3601,14 @@ fn State::try_parse_arrow_fn_expr( } }) let loc = self.loc_start_with(spos) - Err(Some(@syntax.Expr::Tuple(exprs=@list.from_array(exprs), loc~))) + Err(Some(@syntax.Expr::Tuple(exprs=@list.List(exprs), loc~))) } } } - LIDENT(_) | UNDERSCORE if self.peek_token(nth=1) is FAT_ARROW => { + LIDENT(_) | EXTEND | UNDERSCORE if self.peek_token(nth=1) is FAT_ARROW => { let spos = self.peek_spos() let p : @syntax.ArrowFnParam = match self.peek_token() { - LIDENT(_) => Named(self.parse_binder(context="")) + LIDENT(_) | EXTEND => Named(self.parse_binder(context="")) UNDERSCORE => { self.expect_token(TK_UNDERSCORE) Unnamed(self.peek_location()) @@ -3542,11 +3646,13 @@ fn State::parse_pipe_expr(self : Self, parsed~ : @syntax.Expr?) -> @syntax.Expr match self.peek_token() { PIPE => { self.skip() - let rhs = if self.peek_token() is LIDENT(binder) && + let rhs = if ( + self.peek_token() is LIDENT(_) || self.peek_token() is EXTEND + ) && self.peek_token(nth=1) is FAT_ARROW { let binder_loc = self.peek_location() let spos = self.peek_spos() - self.skip() + let binder = self.expect_lident(context="pipe binder") self.skip() let body = if self.peek_token() is LBRACE { self.parse_block_expr() @@ -3675,7 +3781,7 @@ fn State::parse_infix_expr( let first_spos = self.peek_spos_with_parsed(parsed~) let first_expr = self.parse_postfix_expr(parsed~) - let (_, expr) = go(@list.from_array([(first_spos, first_expr)]), @list.new()) + let (_, expr) = go(@list.List([(first_spos, first_expr)]), @list.new()) expr } @@ -3691,6 +3797,13 @@ fn State::parse_regex_match_binding( let binder = self.parse_binder(context="regex match binding") (label, Some(binder)) } + EXTEND if self.peek_token(nth=1) is EQUAL => { + let label : @syntax.Label = { name: "extend", loc: self.peek_location() } + self.skip() + self.expect_token(TK_EQUAL) + let binder = self.parse_binder(context="regex match binding") + (label, Some(binder)) + } POST_LABEL(name) => { let label : @syntax.Label = { name, loc: self.peek_location() } self.skip() @@ -3789,7 +3902,7 @@ fn State::parse_regex_match_rhs( follow_set=[TK_RPAREN], State::parse_regex_match_binding, ) - @list.from_array(bindings) + @list.List(bindings) } else { @list.empty() } @@ -3845,7 +3958,13 @@ fn State::parse_postfix_expr( self.expect_token(TK_LT_PLUS) let template = self.parse_template_literal_expr() let loc = self.loc_start_with(spos) - TemplateWriting(expr~, template~, loc~) + TemplateWriting(expr~, template~, is_conditional=false, loc~) + } + LT_QUESTION => { + self.expect_token(TK_LT_QUESTION) + let template = self.parse_template_literal_expr() + let loc = self.loc_start_with(spos) + TemplateWriting(expr~, template~, is_conditional=true, loc~) } _ => expr } @@ -3945,7 +4064,7 @@ fn State::parse_prefix_expr( delim=TK_COMMA, State::parse_argument, ) - |> @list.from_array + |> @list.List let loc = self.loc_start_with(spos) go(Apply(func=left, args~, loc~)) } @@ -4005,7 +4124,7 @@ fn State::parse_prefix_expr( delim=TK_COMMA, State::parse_argument, ) - |> @list.from_array + |> @list.List let loc = self.loc_start_with(spos) let expr : @syntax.Expr = DotApply( self=left, @@ -4036,7 +4155,7 @@ fn State::parse_prefix_expr( delim=TK_COMMA, State::parse_argument, ) - |> @list.from_array + |> @list.List let loc = self.loc_start_with(spos) let expr : @syntax.Expr = DotApply( self=left, @@ -4124,8 +4243,23 @@ fn State::parse_argument(self : Self) -> @syntax.Argument { let value = self.parse_expr() { value, kind } } + EXTEND if self.peek_token(nth=1) is EQUAL || + (self.peek_token(nth=1) is QUESTION && self.peek_token(nth=2) is EQUAL) => { + let label : @syntax.Label = { name: "extend", loc: self.peek_location() } + self.skip() // extend + let kind : @syntax.ArgumentKind = if self.peek_token() is QUESTION { + let question_loc = self.peek_location() + self.skip() + LabelledOption(label~, question_loc~) + } else { + Labelled(label) + } + self.expect_token(TK_EQUAL) // `=` + let value = self.parse_expr() + { value, kind } + } // label~ - POST_LABEL(label_name) => { + POST_LABEL(label_name) if !(self.peek_token(nth=1) is COLON) => { let spos = self.peek_spos() self.skip() let label : @syntax.Label = { @@ -4164,6 +4298,16 @@ fn State::parse_argument(self : Self) -> @syntax.Argument { let value = @syntax.label_to_expr(loc=label.loc, label) { value, kind } } + EXTEND if self.peek_token(nth=1) is QUESTION && + (self.peek_token(nth=2) is COMMA || self.peek_token(nth=2) is RPAREN) => { + let label : @syntax.Label = { name: "extend", loc: self.peek_location() } + self.skip() // extend + let question_loc = self.peek_location() + self.expect_token(TK_QUESTION) // `?` + let kind = @syntax.LabelledOptionPun(label~, question_loc~) + let value = @syntax.label_to_expr(loc=label.loc, label) + { value, kind } + } _ => { let value = self.parse_expr() { value, kind: Positional } @@ -4201,7 +4345,7 @@ fn State::parse_func(self : Self, is_async~ : Location?) -> @syntax.Func { let block = self.parse_block_expr() let func_loc = @syntax.no_location @syntax.Func::{ // Will be set by caller - parameters: @list.from_array(params), + parameters: @list.List(params), params_loc, body: block, return_type, @@ -4280,6 +4424,24 @@ fn State::parse_parameter(self : Self) -> @syntax.Parameter { _ => QuestionOptional(binder=param_binder, ty=param_annot) } } + EXTEND if self.peek_token(nth=1) is QUESTION => { + let param_binder : @syntax.Binder = { + name: "extend", + loc: self.peek_location(), + } + self.skip() // skip extend + self.skip() // skip QUESTION + let param_annot = self.parse_opt_annot() + match self.peek_token() { + // default value + EQUAL if self.mode is Normal => { + self.skip() + let default = self.parse_expr() + Optional(default~, binder=param_binder, ty=param_annot) + } + _ => QuestionOptional(binder=param_binder, ty=param_annot) + } + } // `param : Type` LIDENT(param_name) => { let param_binder : @syntax.Binder = { @@ -4302,6 +4464,27 @@ fn State::parse_parameter(self : Self) -> @syntax.Parameter { Positional(binder=param_binder, ty=param_annot) } } + EXTEND => { + let param_binder : @syntax.Binder = { + name: "extend", + loc: self.peek_location(), + } + self.skip() + let param_annot = self.parse_opt_annot() + if self.peek_token() is EQUAL && self.mode is Normal { + // error recovery for `param : Type = expr` + let eq_loc = self.peek_location() + self.skip() + let default = self.parse_expr() + self.report_error({ + loc: eq_loc, + msg: "Only labeled argument can have default value", + }) + Optional(default~, binder=param_binder, ty=param_annot) + } else { + Positional(binder=param_binder, ty=param_annot) + } + } other => { let other_loc = self.peek_location() self.report_failed_to_parse(other, "parameter name or label", other_loc) @@ -4311,6 +4494,45 @@ fn State::parse_parameter(self : Self) -> @syntax.Parameter { } } +///| +fn State::parse_array_expr(self : Self, is_iter~ : Bool) -> @syntax.Expr { + if self.peek_token(nth=1) is FOR { + return self.parse_list_comprehension(is_iter~) + } + let left : TokenKind = if is_iter { TK_LBRACKET_BAR } else { TK_LBRACKET } + let right : TokenKind = if is_iter { TK_BAR_RBRACKET } else { TK_RBRACKET } + let spos = self.peek_spos() + let mut to_spread = false + let elems = self.surround_series(left~, right~, delim=TK_COMMA, fn( + state, + ) -> @syntax.SpreadableElem { + match state.peek_token() { + DOTDOT => { + to_spread = true + let spread_spos = state.peek_spos() + state.expect_token(TK_DOTDOT) + let expr = state.parse_expr() + let loc = state.loc_start_with(spread_spos) + Spread(expr~, loc~) + } + _ => Regular(state.parse_expr()) + } + }) + |> @list.List + let loc = self.loc_start_with(spos) + if to_spread { + ArraySpread(elems~, is_iter~, loc~) + } else { + let exprs = elems.map(elem => { + match elem { + Regular(e) => e + Spread(_) => panic() + } + }) + Array(exprs~, is_iter~, loc~) + } +} + ///| fn State::parse_simple_expr( self : Self, @@ -4373,6 +4595,11 @@ fn State::parse_simple_expr( self.expect_token(TK_BYTES) Constant(c=Bytes(x), loc~) } + BYTES_INTERP(xs) => { + let loc = self.peek_location() + self.skip() + @syntax.make_bytes_interp_expr(loc~, xs) + } MULTILINE_STRING(_) | MULTILINE_INTERP(_) => { let spos = self.peek_spos() let elems : Array[@syntax.MultilineStringElem] = [] @@ -4391,13 +4618,13 @@ fn State::parse_simple_expr( InterpSource(source) => @syntax.InterpElem::Source(source) } }) - elems.push(Interp(@list.from_array(converted))) + elems.push(Interp(@list.List(converted))) } _ => break } } let loc = self.loc_start_with(spos) - MultilineString(elems=@list.from_array(elems), loc~) + MultilineString(elems=@list.List(elems), loc~) } INTERP(xs) => { let loc = self.peek_location() @@ -4423,10 +4650,10 @@ fn State::parse_simple_expr( Ident(id={ name, loc }, loc~) } } - LIDENT(_) | UIDENT(_) if self.peek_token(nth=1) is COLONCOLON => + LIDENT(_) | EXTEND | UIDENT(_) if self.peek_token(nth=1) is COLONCOLON => self.parse_coloncolon_expr() AMPER => self.parse_coloncolon_expr() - LIDENT(_) => { + LIDENT(_) | EXTEND => { let spos = self.peek_spos() let var_ = self.parse_var() let loc = self.loc_start_with(spos) @@ -4455,51 +4682,15 @@ fn State::parse_simple_expr( Function(func~, loc~) } LPAREN => self.parse_tuple_or_constraint() - LBRACKET => { - if self.peek_token(nth=1) is FOR { - return self.parse_list_comprehension() - } - let spos = self.peek_spos() - let mut to_spread = false - let elems = self.surround_series( - left=TK_LBRACKET, - right=TK_RBRACKET, - delim=TK_COMMA, - fn(state) -> @syntax.SpreadableElem { - match state.peek_token() { - DOTDOT => { - to_spread = true - let spread_spos = state.peek_spos() - state.expect_token(TK_DOTDOT) - let expr = state.parse_expr() - let loc = state.loc_start_with(spread_spos) - Spread(expr~, loc~) - } - _ => Regular(state.parse_expr()) - } - }, - ) - |> @list.from_array - let loc = self.loc_start_with(spos) - if to_spread { - ArraySpread(elems~, loc~) - } else { - let exprs = elems.map(elem => { - match elem { - Regular(e) => e - Spread(_) => panic() - } - }) - Array(exprs~, loc~) - } - } + LBRACKET => self.parse_array_expr(is_iter=false) + LBRACKET_BAR => self.parse_array_expr(is_iter=true) LBRACE => { // to parse a block expr or a record expr ? // things got a little bit tricky here ... let spos = self.peek_spos() match self.peek_token(nth=1) { DOTDOT => self.parse_record_expr(type_name=None) - LIDENT(_) => + LIDENT(_) | EXTEND => match self.peek_token(nth=2) { // In cases `{ x: ... }` `{ x, }` `{ x; }` `{ x }` the result is a record expression. SEMI(_) if self.peek_token(nth=3) is RBRACE => @@ -4554,7 +4745,7 @@ fn State::parse_coloncolon_expr(self : Self) -> @syntax.Expr { let type_name = self.parse_type_name() self.expect_token(TK_COLONCOLON) match self.peek_token() { - LIDENT(_) => { + LIDENT(_) | EXTEND => { // TypeName::method let method_name = self.parse_label(context="") let loc = self.loc_start_with(spos) @@ -4589,6 +4780,37 @@ fn State::parse_coloncolon_expr(self : Self) -> @syntax.Expr { } } +///| +fn State::parse_template_object_expr(self : Self) -> @syntax.Expr { + let spos = self.peek_spos() + let elems = self.surround_series( + left=TK_LBRACE, + right=TK_RBRACE, + delim=TK_COMMA, + fn(state) -> @syntax.MapExprElem { + let elem_spos = state.peek_spos() + let key_loc = state.peek_location() + let key = match state.peek_token() { + STRING(x) => { + state.expect_token(TK_STRING) + x + } + other => { + state.report_unexpected(other, [TK_STRING], key_loc) + state.panic() |> ignore + "" + } + } + state.expect_token(TK_COLON) + let expr = state.parse_expr() + let loc = state.loc_start_with(elem_spos) + { key: @syntax.Constant::String(key), expr, key_loc, loc } + }, + ) + let loc = self.loc_start_with(spos) + Map(elems=@list.List(elems), loc~) +} + ///| fn State::parse_template_literal_expr(self : Self) -> @syntax.Expr { match self.peek_token() { @@ -4597,11 +4819,21 @@ fn State::parse_template_literal_expr(self : Self) -> @syntax.Expr { self.expect_token(TK_STRING) Constant(c=String(x), loc~) } + BYTES(x) => { + let loc = self.peek_location() + self.expect_token(TK_BYTES) + Constant(c=Bytes(x), loc~) + } INTERP(xs) => { let loc = self.peek_location() self.skip() @syntax.make_interp_expr(loc~, xs) } + BYTES_INTERP(xs) => { + let loc = self.peek_location() + self.skip() + @syntax.make_bytes_interp_expr(loc~, xs) + } MULTILINE_STRING(_) | MULTILINE_INTERP(_) => { let spos = self.peek_spos() let elems : Array[@syntax.MultilineStringElem] = [] @@ -4620,14 +4852,15 @@ fn State::parse_template_literal_expr(self : Self) -> @syntax.Expr { InterpSource(source) => @syntax.InterpElem::Source(source) } }) - elems.push(Interp(@list.from_array(converted))) + elems.push(Interp(@list.List(converted))) } _ => break } } let loc = self.loc_start_with(spos) - MultilineString(elems=@list.from_array(elems), loc~) + MultilineString(elems=@list.List(elems), loc~) } + LBRACE => self.parse_template_object_expr() other => { let loc = self.peek_location() self.report_failed_to_parse(other, "template string", loc) @@ -4641,7 +4874,7 @@ fn State::parse_template_literal_expr(self : Self) -> @syntax.Expr { fn State::next_is_foreach_comprehension(self : Self) -> Bool { let mut nth = 0 match self.peek_token(nth~) { - LIDENT(_) | UNDERSCORE => () + LIDENT(_) | EXTEND | UNDERSCORE => () _ => return false } while true { @@ -4651,7 +4884,7 @@ fn State::next_is_foreach_comprehension(self : Self) -> Bool { COMMA => { nth = nth + 1 match self.peek_token(nth~) { - LIDENT(_) | UNDERSCORE => continue + LIDENT(_) | EXTEND | UNDERSCORE => continue _ => return false } } @@ -4662,14 +4895,19 @@ fn State::next_is_foreach_comprehension(self : Self) -> Bool { } ///| -fn State::parse_list_comprehension(self : Self) -> @syntax.Expr { +fn State::parse_list_comprehension( + self : Self, + is_iter~ : Bool, +) -> @syntax.Expr { + let left : TokenKind = if is_iter { TK_LBRACKET_BAR } else { TK_LBRACKET } + let right : TokenKind = if is_iter { TK_BAR_RBRACKET } else { TK_RBRACKET } let spos = self.peek_spos() - self.expect_token(TK_LBRACKET) + self.expect_token(left) let for_spos = self.peek_spos() self.expect_token(TK_FOR) let kind : @syntax.ListComprehensionKind = if self.next_is_foreach_comprehension() { let binders = self.sepby1(delim=TK_COMMA, State::parse_foreach_binder) - |> @list.from_array + |> @list.List self.expect_token(TK_IN) let expr = self.parse_infix_expr(parsed=None) let (init, continue_block) = if self.peek_token() is SEMI(_) { @@ -4679,7 +4917,7 @@ fn State::parse_list_comprehension(self : Self) -> @syntax.Expr { follow_set=[TK_SEMI, TK_IF, TK_FAT_ARROW], State::parse_loop_binder_with_infix_value, ) - let init = @list.from_array(init) + let init = @list.List(init) let continue_block = if self.peek_token() is SEMI(_) { self.skip() let (continue_block, _) = self.series_with_follow( @@ -4687,7 +4925,7 @@ fn State::parse_list_comprehension(self : Self) -> @syntax.Expr { follow_set=[TK_IF, TK_FAT_ARROW], State::parse_loop_binder_with_infix_value, ) - @list.from_array(continue_block) + @list.List(continue_block) } else { @list.empty() } @@ -4702,7 +4940,7 @@ fn State::parse_list_comprehension(self : Self) -> @syntax.Expr { follow_set=[TK_SEMI, TK_IF, TK_FAT_ARROW], State::parse_loop_binder_with_infix_value, ) - let binders = @list.from_array(binders) + let binders = @list.List(binders) let (condition, continue_block) = if self.peek_token() is SEMI(_) { self.skip() let condition = match self.peek_token() { @@ -4716,7 +4954,7 @@ fn State::parse_list_comprehension(self : Self) -> @syntax.Expr { follow_set=[TK_IF, TK_FAT_ARROW], State::parse_loop_binder_with_infix_value, ) - @list.from_array(continue_block) + @list.List(continue_block) } else { @list.empty() } @@ -4735,9 +4973,9 @@ fn State::parse_list_comprehension(self : Self) -> @syntax.Expr { } self.expect_token(TK_FAT_ARROW) let body = self.parse_expr() - self.expect_token(TK_RBRACKET) + self.expect_token(right) let loc = self.loc_start_with(spos) - ListComprehension(kind~, guard_~, body~, loc~) + ListComprehension(kind~, guard_~, body~, is_iter~, loc~) } ///| @@ -4790,7 +5028,7 @@ fn State::parse_semi_trailing_record(self : Self) -> @syntax.Expr { self.expect_token(TK_SEMI) self.expect_token(TK_RBRACE) let loc = self.loc_start_with(spos) - Record(type_name=None, fields=@list.from_array([field]), trailing=Semi, loc~) + Record(type_name=None, fields=@list.List([field]), trailing=Semi, loc~) } ///| @@ -4813,7 +5051,7 @@ fn State::parse_record_expr( follow_set=[TK_RBRACE], State::parse_field_def, ) - (@list.from_array(fields), trailing) + (@list.List(fields), trailing) } else { (@list.new(), false) } @@ -4824,7 +5062,7 @@ fn State::parse_record_expr( follow_set=[TK_RBRACE], State::parse_field_def, ) - (None, @list.from_array(fields), trailing_semi) + (None, @list.List(fields), trailing_semi) } self.expect_token(TK_RBRACE) let loc = self.loc_start_with(spos) @@ -4902,7 +5140,7 @@ fn State::parse_map_expr(self : Self) -> @syntax.Expr { ) let elems = elems.filter_map(elem => elem) // TODO: add catMaybes to core? let loc = self.loc_start_with(spos) - Map(elems=@list.from_array(elems), loc~) + Map(elems=@list.List(elems), loc~) } ///| @@ -4931,7 +5169,7 @@ fn State::parse_block_expr(self : Self) -> @syntax.Expr { fn(s) -> Statement { s.parse_stmt() }, ) let loc = self.loc_start_with(loc_start) - Statement::compact_rev(@list.from_array(stmts).rev(), loc~) + Statement::compact_rev(@list.List(stmts).rev(), loc~) } ///| @@ -4976,21 +5214,16 @@ fn State::parse_letand_func(self : Self) -> @syntax.Func { self.expect_token(TK_FAT_ARROW) let body = self.parse_expr_stmt_no_break_continue_return() let loc = self.loc_start_with(spos) - @syntax.make_arrow_fn( - @list.from_array(parameters), - body, - params_loc~, - loc~, - ) + @syntax.make_arrow_fn(@list.List(parameters), body, params_loc~, loc~) } - LIDENT(_) | UNDERSCORE => { + LIDENT(_) | EXTEND | UNDERSCORE => { let param = parse_arrow_fn_param() let params_loc = self.loc_start_with(spos) self.expect_token(TK_FAT_ARROW) let body = self.parse_expr_stmt_no_break_continue_return() let loc = self.loc_start_with(spos) @syntax.make_arrow_fn( - @list.from_array([(param, None)]), + @list.List([(param, None)]), body, params_loc~, loc~, @@ -5051,9 +5284,10 @@ fn State::parse_stmt(self : Self) -> Statement { (binder, ty_opt, func) }) let loc = self.loc_start_with(spos) - StmtLetand(bindings=@list.from_array(bindings), loc~) + StmtLetand(bindings=@list.List(bindings), loc~) } - ASYNC if self.peek_token(nth=1) is FN && self.peek_token(nth=2) is LIDENT(_) => { + ASYNC if self.peek_token(nth=1) is FN && + (self.peek_token(nth=2) is LIDENT(_) || self.peek_token(nth=2) is EXTEND) => { let is_async = Some(self.peek_location()) let spos = self.peek_spos() self.skip() // async @@ -5063,7 +5297,8 @@ fn State::parse_stmt(self : Self) -> Statement { let loc = self.loc_start_with(spos) StmtFunc(binder~, func~, loc~) } - FN if self.peek_token(nth=1) is LIDENT(_) => { + FN if self.peek_token(nth=1) is LIDENT(_) || + self.peek_token(nth=1) is EXTEND => { let spos = self.peek_spos() self.expect_token(TK_FN) let binder = self.parse_binder(context="") @@ -5129,7 +5364,7 @@ fn State::handle_unexpected_expr_or_statement( | StmtDefer(loc~, ..) | StmtGuard(loc~, ..) => loc } - Statement::compact_rev(@list.from_array([stmt]), loc~) + Statement::compact_rev(@list.List([stmt]), loc~) } let (actual, expr) = match token { @@ -5291,7 +5526,7 @@ fn State::parse_expr_stmt(self : Self) -> @syntax.Expr { first_set=first_expr, State::parse_expr, ) - |> @list.from_array + |> @list.List Continue(args~, loc=self.loc_start_with(spos), label~) } RETURN => { @@ -5454,7 +5689,7 @@ fn State::parse_type_aux(self : Self) -> (Bool, @syntax.Type) { delim=TK_COMMA, State::parse_type, ) - |> @list.from_array + |> @list.List }) let loc = self.loc_start_with(spos) let ty = @syntax.Type::Name( @@ -5473,7 +5708,7 @@ fn State::parse_type_aux(self : Self) -> (Bool, @syntax.Type) { delim=TK_COMMA, State::parse_type, ) - |> @list.from_array + |> @list.List self.expect_token(TK_THIN_ARROW) let (ty_res, ty_err) = self.parse_return_type() let loc = self.loc_start_with(spos) @@ -5486,7 +5721,7 @@ fn State::parse_type_aux(self : Self) -> (Bool, @syntax.Type) { delim=TK_COMMA, State::parse_type, ) - |> @list.from_array + |> @list.List if tys is Empty { self.expect_token(TK_THIN_ARROW) let (ty_res, ty_err) = self.parse_return_type() @@ -5561,7 +5796,7 @@ fn State::parse_opt_typ_params( ) }) .unwrap_or([]) - |> @list.from_array + |> @list.List } ///| @@ -5595,6 +5830,6 @@ pub fn parse_expr(tokens : Array[Triple]) -> (@syntax.Expr, Array[Report]) { s.parse_stmt() }) let loc = self.loc_start_with(loc_start) - let expr = Statement::compact_rev(@list.from_array(stmts).rev(), loc~) + let expr = Statement::compact_rev(@list.List(stmts).rev(), loc~) (expr, self.diagnostics) } diff --git a/lexer/asi.mbt b/lexer/asi.mbt index 30ae6d4b..9ac43998 100644 --- a/lexer/asi.mbt +++ b/lexer/asi.mbt @@ -11,6 +11,7 @@ fn can_occur_before_semicolon(token : Token) -> Bool { | INT(_) | BYTE(_) | BYTES(_) + | BYTES_INTERP(_) | TRUE | FALSE | STRING(_) @@ -23,6 +24,7 @@ fn can_occur_before_semicolon(token : Token) -> Bool { | RBRACE | RPAREN | RBRACKET + | BAR_RBRACKET | UNDERSCORE | BREAK | CONTINUE @@ -39,6 +41,7 @@ fn can_occur_before_semicolon(token : Token) -> Bool { | PIPE | ELLIPSIS | NORAISE + | EXTEND | POST_LABEL(_) => true // --------------------------- // | EXCEPT @@ -65,6 +68,7 @@ fn can_occur_before_semicolon(token : Token) -> Bool { | AND | CONST | LBRACKET + | LBRACKET_BAR | LBRACE | INFIX1(_) | INFIX4(_) @@ -125,6 +129,8 @@ fn can_occur_before_semicolon(token : Token) -> Bool { | USING | LEXMATCH | LEXMATCH_QUESTION + | LEXSCAN + | LT_QUESTION | WHERE | PIPE_LEFT | NOBREAK => false @@ -141,6 +147,7 @@ fn can_occur_after_semicolon(token : Token) -> Bool { | INT(_) | BYTE(_) | BYTES(_) + | BYTES_INTERP(_) | TRUE | FALSE | STRING(_) @@ -153,6 +160,7 @@ fn can_occur_after_semicolon(token : Token) -> Bool { | LBRACE | LPAREN | LBRACKET + | LBRACKET_BAR | UNDERSCORE | BREAK | CONTINUE @@ -204,7 +212,9 @@ fn can_occur_after_semicolon(token : Token) -> Bool { | POST_LABEL(_) | ATTRIBUTE(_) | USING - | LEXMATCH => true + | LEXMATCH + | LEXSCAN + | EXTEND => true // the lexer should skip these two tokens before trying to insert semi COMMENT(_) | NEWLINE => true // [MINUS] is both a binary operator and a unary operator. @@ -261,6 +271,7 @@ fn can_occur_after_semicolon(token : Token) -> Bool { | COLONCOLON | RPAREN | RBRACKET + | BAR_RBRACKET | SEMI(_) | FAT_ARROW | THIN_ARROW @@ -280,6 +291,7 @@ fn can_occur_after_semicolon(token : Token) -> Bool { | AS | IS | LT_PLUS + | LT_QUESTION | DOTDOT | DERIVE | WITH diff --git a/lexer/keywords.mbt b/lexer/keywords.mbt index 195c1875..d0d9cbc6 100644 --- a/lexer/keywords.mbt +++ b/lexer/keywords.mbt @@ -49,9 +49,11 @@ let keyword_table : @hashmap.HashMap[String, Token] = [ ("and", AND), ("letrec", LETREC), ("enumview", ENUMVIEW), + ("extend", EXTEND), ("noraise", NORAISE), ("defer", DEFER), ("lexmatch", LEXMATCH), + ("lexscan", LEXSCAN), ("where", WHERE), ("declare", DECLARE), ("nobreak", NOBREAK), @@ -61,8 +63,8 @@ let keyword_table : @hashmap.HashMap[String, Token] = [ ///| let reserved_keyword_table : @hashset.HashSet[String] = [ - "module", "move", "ref", "static", "super", "unsafe", "use", "where", "await", - "dyn", "abstract", "do", "final", "macro", "override", "typeof", "virtual", "yield", + "module", "move", "ref", "static", "super", "unsafe", "use", "await", "dyn", + "abstract", "do", "final", "macro", "override", "typeof", "virtual", "yield", "local", "method", "alias", "assert", ] |> @hashset.from_array() diff --git a/lexer/lex_error.mbt b/lexer/lex_error.mbt index 3c09f1f1..11b71bba 100644 --- a/lexer/lex_error.mbt +++ b/lexer/lex_error.mbt @@ -8,6 +8,7 @@ pub enum LexicalError { InterpInvalidAttribute InterpMissingExpression InvalidDotInt(String) + MissingIdentifierAfterDot InvalidByteLiteral(String) Reserved_keyword(String) InvalidMetavarSyntax(String) @@ -27,6 +28,7 @@ pub impl Show for LexicalError with fn output(self, logger) { "(unterminated string in variable interpolation)" UnterminatedString => "(unterminated string)" IllegalCharacter(c) => "unrecognized character u32: \{c}" + MissingIdentifierAfterDot => "missing identifier after dot" InvalidByteLiteral(s) => "invalid byte literal: \{s}" Reserved_keyword(s) => "reserved keyword: \{s}" InvalidMetavarSyntax(s) => "invalid metavariable syntax: \{s}" diff --git a/lexer/lexer.mbt b/lexer/lexer.mbt index 0fe0a79f..1ff21167 100644 --- a/lexer/lexer.mbt +++ b/lexer/lexer.mbt @@ -264,12 +264,12 @@ fn lex_tokens( base~, env~, end_with_newline=false, - allow_interp=false, + allow_interp=true, start_pos~, ) let tok : @tokens.Token = match interps { [InterpLit(repr~, ..)] => BYTES(repr) - _interps => panic() // byte strings don't support interpolation + interps => BYTES_INTERP(interps) } env.add_token_with_loc( tok, @@ -525,6 +525,14 @@ fn lex_tokens( ) lex_tokens(rest, base~, env~, preserve_comment~) } + ("\|\]", rest) => { + env.add_token_with_loc( + @tokens.Token::BAR_RBRACKET, + start=env.calc_offset(input, base~), + end=env.calc_offset(rest, base~), + ) + lex_tokens(rest, base~, env~, preserve_comment~) + } ("<\|", rest) => { env.add_token_with_loc( @tokens.Token::PIPE_LEFT, @@ -541,6 +549,14 @@ fn lex_tokens( ) lex_tokens(rest, base~, env~, preserve_comment~) } + ("<\?", rest) => { + env.add_token_with_loc( + @tokens.Token::LT_QUESTION, + start=env.calc_offset(input, base~), + end=env.calc_offset(rest, base~), + ) + lex_tokens(rest, base~, env~, preserve_comment~) + } ("try\?", rest) => { env.add_token_with_loc( @tokens.Token::TRY_QUESTION, @@ -782,9 +798,17 @@ fn lex_tokens( rest ) => { let name = ident.to_owned() + let dot_start = env.calc_offset(input, base~) let start_pos = env.calc_offset(input, base~) + 1 env.register_surrogate_pair(ident) let end_pos = env.calc_offset(rest, base~) + if name == "" { + env.add_lexing_error( + MissingIdentifierAfterDot, + start=dot_start, + end=end_pos, + ) + } env.add_token_with_loc( @tokens.Token::DOT_LIDENT(name), start=start_pos, @@ -938,6 +962,14 @@ fn lex_tokens( ) lex_tokens(rest, base~, env~, preserve_comment~) } + ("\[\|", rest) => { + env.add_token_with_loc( + @tokens.Token::LBRACKET_BAR, + start=env.calc_offset(input, base~), + end=env.calc_offset(rest, base~), + ) + lex_tokens(rest, base~, env~, preserve_comment~) + } ("\[", rest) => { env.add_token_with_loc( @tokens.Token::LBRACKET, @@ -1203,7 +1235,7 @@ fn lex_tokens( } // Package name @package/name - ("@[a-zA-Z_][a-zA-Z0-9_]*(/[a-zA-Z_][a-zA-Z0-9_]*)*" as raw, rest) => { + ("@[a-zA-Z_][a-zA-Z0-9_\-]*(/[a-zA-Z_][a-zA-Z0-9_\-]*)*" as raw, rest) => { let pkg_name_without_at = raw.sub(start=1, end=raw.length()).to_owned() env.add_token_with_loc( @tokens.Token::PACKAGE_NAME(pkg_name_without_at), @@ -1348,7 +1380,7 @@ fn scan_interpolation_source( buf~, brace_depth~, preserve~, - allow_interp=false, + allow_interp=true, escaped=false, ) } @@ -1651,16 +1683,17 @@ fn lex_invalid_byte( start~ : Int, ) -> StringView { let invalid_byte_repr_buf = StringBuilder::new() + fn add_invalid_byte(rest : StringView) -> StringView { + let payload = invalid_byte_repr_buf.to_string() + let end_pos = env.calc_offset(base~, rest) + env.add_lexing_error(InvalidByteLiteral(payload), start~, end=end_pos) + env.add_token_with_loc(BYTE(payload), start~, end=end_pos) + rest + } + fn process_invalid_byte(input : StringView) -> StringView { lexmatch input with longest { - ("'", rest) => { - env.add_lexing_error( - InvalidByteLiteral(invalid_byte_repr_buf.to_string()), - start~, - end=env.calc_offset(base~, rest), - ) - rest - } + ("'", rest) => add_invalid_byte(rest) ("\r|\n", _) => { env.add_lexing_error( start=env.calc_offset(base~, input), @@ -1669,14 +1702,7 @@ fn lex_invalid_byte( ) input } - "" => { - env.add_lexing_error( - InvalidByteLiteral(invalid_byte_repr_buf.to_string()), - start~, - end=env.calc_offset(base~, input), - ) - input - } + "" => add_invalid_byte(input) ("." as c, rest) => { env.register_surrogate_pair_for_char(c) invalid_byte_repr_buf.write_char(c) diff --git a/lexer/lexer_test.mbt b/lexer/lexer_test.mbt new file mode 100644 index 00000000..c07a2b20 --- /dev/null +++ b/lexer/lexer_test.mbt @@ -0,0 +1,70 @@ +///| +test "reference keyword handling: where is a keyword without lexical error" { + let result = tokens_from_string("where", comment=false) + guard result.errors.length() == 0 else { + fail("where should not be reported as a reserved keyword") + } + guard result.tokens[0].0 is WHERE else { + fail("where should tokenize as WHERE") + } +} + +///| +test "reference keyword handling: package remains a keyword" { + let result = tokens_from_string("package", comment=false) + guard result.errors.length() == 0 else { + fail("package in normal source should not be a lexical error") + } + guard result.tokens[0].0 is PACKAGE else { + fail("package should tokenize as PACKAGE") + } +} + +///| +test "reference byte literal recovery keeps a BYTE token after invalid contents" { + let result = tokens_from_string("b'🐰'", comment=false) + guard result.errors.length() == 1 else { + fail("invalid byte literal should report exactly one lexical error") + } + guard result.errors[0].2 is InvalidByteLiteral(payload) && payload == "🐰" else { + fail("invalid byte literal should report InvalidByteLiteral") + } + guard result.tokens[0].0 is BYTE(payload) && payload == "🐰" else { + fail("invalid byte literal should still emit BYTE for parser recovery") + } +} + +///| +test "reference interpolation scanner handles nested bytes interpolation" { + let source = "\"\\{b\"\\{\"}\"}\"}\"" + let result = tokens_from_string(source, comment=false) + guard result.errors.length() == 0 else { + fail("nested bytes interpolation should not produce lexer errors") + } + guard result.tokens[0].0 is INTERP(elems) else { + fail("outer literal should tokenize as INTERP") + } + guard elems.length() == 1 else { + fail("outer literal should contain one interpolation source") + } + guard elems[0] is InterpSource({ source, .. }) else { + fail("outer interpolation should be captured as source") + } + guard source == "b\"\\{\"}\"}\"" else { + fail("unexpected captured interpolation source: \{source}") + } +} + +///| +test "reference dot recovery reports a missing identifier after dot" { + let result = tokens_from_string(".", comment=false) + guard result.errors.length() == 1 else { + fail("standalone dot should report exactly one lexical error") + } + guard result.errors[0].2 is MissingIdentifierAfterDot else { + fail("standalone dot should report MissingIdentifierAfterDot") + } + guard result.tokens[0].0 is DOT_LIDENT("") else { + fail("standalone dot should still emit an empty DOT_LIDENT for recovery") + } +} diff --git a/lexer/moon.mod b/lexer/moon.mod index d61ac4cb..bfd6e810 100644 --- a/lexer/moon.mod +++ b/lexer/moon.mod @@ -1,6 +1,6 @@ name = "moonbitlang/lexer" -version = "0.3.7" +version = "0.3.8" repository = "https://github.com/moonbitlang/parser" diff --git a/lexer/pkg.generated.mbti b/lexer/pkg.generated.mbti index bf2e790e..bc55dd4b 100644 --- a/lexer/pkg.generated.mbti +++ b/lexer/pkg.generated.mbti @@ -30,6 +30,7 @@ pub enum LexicalError { InterpInvalidAttribute InterpMissingExpression InvalidDotInt(String) + MissingIdentifierAfterDot InvalidByteLiteral(String) Reserved_keyword(String) InvalidMetavarSyntax(String) diff --git a/lexer/tokens/expect_string.mbt b/lexer/tokens/expect_string.mbt index 443aa65b..cf8a4136 100644 --- a/lexer/tokens/expect_string.mbt +++ b/lexer/tokens/expect_string.mbt @@ -16,6 +16,7 @@ pub fn TokenKind::to_expect_string(self : Self) -> String { TK_MULTILINE_STRING => "`#|...`" TK_MULTILINE_INTERP => "`$|...`" TK_INTERP => "string interpolation" + TK_BYTES_INTERP => "bytes interpolation" TK_ATTRIBUTE => "`#attribute`" TK_LIDENT => "id (lowercase start)" TK_UIDENT => "id (uppercase start)" @@ -65,8 +66,10 @@ pub fn TokenKind::to_expect_string(self : Self) -> String { TK_COLON => "`:`" TK_SEMI => "`;`" TK_LBRACKET => "`[`" + TK_LBRACKET_BAR => "`[|`" TK_PLUS => "`+`" TK_RBRACKET => "`]`" + TK_BAR_RBRACKET => "`|]`" TK_UNDERSCORE => "`_`" TK_BAR => "`|`" TK_LBRACE => "`{`" @@ -80,6 +83,7 @@ pub fn TokenKind::to_expect_string(self : Self) -> String { TK_PIPE => "`|>`" TK_PIPE_LEFT => "`<|`" TK_LT_PLUS => "`<+`" + TK_LT_QUESTION => "` "`else`" TK_FN => "`fn`" TK_IF => "`if`" @@ -118,6 +122,8 @@ pub fn TokenKind::to_expect_string(self : Self) -> String { TK_TRY_EXCLAMATION => "`try!`" TK_LEXMATCH => "lexmatch" TK_LEXMATCH_QUESTION => "lexmatch?" + TK_LEXSCAN => "`lexscan`" + TK_EXTEND => "`extend`" TK_REGEX_LITERAL => "regex" TK_REGEX_INTERP => "regex interp" TK_DECLARE => "declare" diff --git a/lexer/tokens/parser.mbty b/lexer/tokens/parser.mbty index 3d463c82..a1558fd3 100644 --- a/lexer/tokens/parser.mbty +++ b/lexer/tokens/parser.mbty @@ -18,6 +18,7 @@ %token MULTILINE_STRING %token MULTILINE_INTERP %token INTERP +%token BYTES_INTERP %token REGEX_LITERAL %token REGEX_INTERP %token<(String, String?, String)> ATTRIBUTE @@ -72,8 +73,10 @@ %token COLON ":" %token SEMI %token LBRACKET "[" +%token LBRACKET_BAR "[|" %token PLUS "+" %token RBRACKET "]" +%token BAR_RBRACKET "|]" %token UNDERSCORE "_" %token BAR "|" %token LBRACE "{" @@ -87,6 +90,7 @@ %token PIPE "|>" %token PIPE_LEFT "<|" %token LT_PLUS "<+" +%token LT_QUESTION " Parameter let binder = Binder::{ name: $1, loc: mk_loc($loc($1)).trim_last_char() } Optional(binder~, ty = $2, default = $4) } - | LIDENT "?" opt_annot "=" expr { + | lident_string "?" opt_annot "=" expr { let binder = Binder::{ name: $1, loc: mk_loc($loc($1)) } Optional(binder~, ty = $3, default = $5) } - | LIDENT "?" opt_annot { + | lident_string "?" opt_annot { let binder = Binder::{ name: $1, loc: mk_loc($loc($1)) } QuestionOptional(binder~, ty = $3) } @@ -324,8 +330,13 @@ optional_type_parameters_no_constraints -> List[TypeDeclBinder] } ; -luident -> String +%inline lident_string -> String : LIDENT { $1 } + | "extend" { "extend" } + ; + +luident -> String + : lident_string { $1 } | UIDENT { $1 } ; @@ -698,13 +709,14 @@ structure_item -> Impl doc = DocString::empty() ) } - | attributes visibility "impl" optional_type_parameters type_name "for" type_ "with" option("fn") binder parameters func_return_type impl_body { + | attributes visibility "impl" optional_type_parameters type_name "for" type_ "with" impl_optional_fn binder parameters func_return_type impl_body { let (ret_ty, err_ty) = $12 TopImpl( self_ty = Some($7), trait_ = $5, method_name = $10, quantifiers = $4, + method_quantifiers = $9, params = $11, ret_ty~, err_ty~, @@ -715,13 +727,14 @@ structure_item -> Impl doc = DocString::empty() ) } - | attributes visibility "impl" optional_type_parameters type_name "with" option("fn") binder parameters func_return_type impl_body { + | attributes visibility "impl" optional_type_parameters type_name "with" impl_optional_fn binder parameters func_return_type impl_body { let (ret_ty, err_ty) = $10 TopImpl( self_ty = None, trait_ = $5, method_name = $8, quantifiers = $4, + method_quantifiers = $7, params = $9, ret_ty~, err_ty~, @@ -776,6 +789,11 @@ structure_item -> Impl } ; +impl_optional_fn -> List[TypeVarBinder] + : { @list.empty() } + | "fn" optional_type_parameters { $2 } + ; + %inline attributes -> List[Attribute] : { @list.empty() } | non_empty_list(attribute) { $1 } @@ -794,7 +812,7 @@ structure_item -> Impl pub_attr -> String? : { None } | "(" "readonly" ")" { Some("readonly") } - | "(" LIDENT ")" { Some($2) } + | "(" lident_string ")" { Some($2) } ; %inline is_declare -> Bool @@ -861,25 +879,25 @@ batch_type_alias_target(UIDENT_MAYBE_DOT) -> AliasTarget ; func_alias_targets -> (Label?, Label?, Bool, List[AliasTarget]) - : ioption(func_alias_type_name(LIDENT, UIDENT)) func_alias_target(LIDENT) { + : ioption(func_alias_type_name(lident_string, UIDENT)) func_alias_target(lident_string) { (None, $1, false, @list.singleton($2)) } | PACKAGE_NAME func_alias_target(DOT_LIDENT) { let pkg = Label::{ name: $1, loc: mk_loc($loc($1)) } (Some(pkg), None, false, @list.singleton($2)) } - | PACKAGE_NAME func_alias_type_name(DOT_LIDENT, DOT_UIDENT) func_alias_target(LIDENT) { + | PACKAGE_NAME func_alias_type_name(DOT_LIDENT, DOT_UIDENT) func_alias_target(lident_string) { let pkg = Label::{ name: $1, loc: mk_loc($loc($1)) } (Some(pkg), Some($2), false, @list.singleton($3)) } - | option(func_alias_type_name(LIDENT, UIDENT)) "(" non_empty_list_commas(func_alias_target(LIDENT)) ")" { + | option(func_alias_type_name(lident_string, UIDENT)) "(" non_empty_list_commas(func_alias_target(lident_string)) ")" { (None, $1, true, $3) } - | PACKAGE_NAME ".(" non_empty_list_commas(func_alias_target(LIDENT)) ")" { + | PACKAGE_NAME ".(" non_empty_list_commas(func_alias_target(lident_string)) ")" { let pkg = Label::{ name: $1, loc: mk_loc($loc($1)) } (Some(pkg), None, true, $3) } - | PACKAGE_NAME func_alias_type_name(DOT_LIDENT, DOT_UIDENT) "(" non_empty_list_commas(func_alias_target(LIDENT)) ")" { + | PACKAGE_NAME func_alias_type_name(DOT_LIDENT, DOT_UIDENT) "(" non_empty_list_commas(func_alias_target(lident_string)) ")" { let pkg = Label::{ name: $1, loc: mk_loc($loc($1)) } (Some(pkg), Some($2), true, $4) } @@ -906,7 +924,13 @@ func_alias_target(LIDENT_MAYBE_DOT) -> AliasTarget ; using_binder -> (AliasTarget, UsingKind): - | LIDENT + | lident_string { + let binder = Binder::{ + name : $1, + loc : mk_loc($loc($1)) + } + ({ binder, target : None }, UsingKind::Value) + } | UIDENT { let binder = Binder::{ name : $1, @@ -914,7 +938,17 @@ using_binder -> (AliasTarget, UsingKind): } ({ binder, target : None }, UsingKind::Value) } - | LIDENT "as" LIDENT + | lident_string "as" lident_string { + let binder = Binder::{ + name : $3, + loc : mk_loc($loc($3)) + } + let target = Label::{ + name : $1, + loc : mk_loc($loc($1)) + } + ({ binder, target : Some(target) }, UsingKind::Value) + } | UIDENT "as" UIDENT { let binder = Binder::{ name : $3, @@ -1010,12 +1044,12 @@ trait_method_param -> Parameter ; qual_ident -> LongIdent - : LIDENT { Ident(name = $1) } + : lident_string { Ident(name = $1) } | PACKAGE_NAME DOT_LIDENT { Dot(pkg = $1, id = $2) } ; qual_ident_simple_expr -> LongIdent - : LIDENT %prec prec_apply_non_ident_fn { Ident(name = $1) } + : lident_string %prec prec_apply_non_ident_fn { Ident(name = $1) } | PACKAGE_NAME DOT_LIDENT { Dot(pkg = $1, id = $2) } ; @@ -1121,12 +1155,32 @@ template_rhs -> Expr : INTERP { make_interp_expr(loc = mk_loc($sloc), $1) } + | BYTES { + Expr::Constant(c = @syntax.Constant::Bytes($1), loc = mk_loc($sloc)) + } + | BYTES_INTERP { + make_bytes_interp_expr(loc = mk_loc($sloc), $1) + } | STRING { Expr::Constant(c = @syntax.Constant::String($1), loc = mk_loc($sloc)) } | non_empty_list(multiline_string) { Expr::MultilineString(elems = $1, loc = mk_loc($sloc)) } + | "{" list_commas(template_object_elem) "}" { + Map(elems = $2, loc = mk_loc($sloc)) + } + ; + +template_object_elem -> MapExprElem + : STRING ":" expr { + MapExprElem::{ + key: @syntax.Constant::String($1), + expr: $3, + key_loc: mk_loc($loc($1)), + loc: mk_loc($sloc) + } + } ; expr_statement_no_break_continue_return -> Expr @@ -1280,6 +1334,34 @@ lexmatch_header -> (Expr, Label?): ($2, Some($4)) } +lexscan_expr -> Expr: + | lexscan_header list_semis(lexscan_case) "}" { + LexScan(expr=$1, match_loc=mk_loc($loc($1)), cases=$2, loc=mk_loc($sloc)) + } + +lexscan_header -> Expr: + | "lexscan" infix_expr "{" { $2 } + +lexscan_case -> LexScanCase: + | lexscan_case_pattern "=>" expr_statement { + LexScanCase::{ pat: $1, guard_: None, body: $3 } + } + | lexscan_case_pattern "if" infix_expr "=>" expr_statement { + LexScanCase::{ pat: $1, guard_: Some($3), body: $5 } + } + | "..." { + LexScanCase::{ + pat: LexScanCasePattern::Wildcard(loc = mk_loc($loc($1))), + guard_: None, + body: Hole(loc = mk_loc($sloc), kind = Todo) + } + } + +lexscan_case_pattern -> LexScanCasePattern: + | regex_as_pattern { LexScanCasePattern::Pattern($1) } + | binder { LexScanCasePattern::Binder($1) } + | "_" { LexScanCasePattern::Wildcard(loc = mk_loc($sloc)) } + lex_case -> LexCase : | lex_pattern "=>" expr_statement { LexCase::{ @@ -1466,6 +1548,7 @@ expr -> Expr | if_expr { $1 } | match_expr { $1 } | lexmatch_expr { $1 } + | lexscan_expr { $1 } | simple_try_expr { $1 } | quantifier_expr { $1 } | arrow_fn_expr { Function(func = $1, loc = mk_loc($sloc)) } @@ -1618,7 +1701,10 @@ postfix_expr -> Expr RegexMatch(expr = $1, pat~, bindings~, loc = mk_loc($sloc)) } | range_expr "<+" template_rhs { - TemplateWriting(expr = $1, template = $3, loc = mk_loc($sloc)) + TemplateWriting(expr = $1, template = $3, is_conditional = false, loc = mk_loc($sloc)) + } + | range_expr " (RegexPattern, List[(Label, Binder?)]) ; regex_match_binding -> (Label, Binder?) - : LIDENT "=" binder { + : lident_string "=" binder { let label = Label::{ name : $1, loc : mk_loc($loc($1)) } (label, Some($3)) } @@ -1879,7 +1965,7 @@ simple_expr -> Expr loc = mk_loc($sloc) ) } - | simple_expr ".." LIDENT "(" list_commas(argument) ")" { + | simple_expr ".." lident_string "(" list_commas(argument) ")" { let method_name = Label::{ name: $3, loc: mk_loc($loc($3)) } DotApply( self = $1, @@ -1889,10 +1975,10 @@ simple_expr -> Expr loc = mk_loc($sloc) ) } - | simple_expr accessor %prec prec_field { + | simple_expr accessor %prec prec_field { Field(record = $1, accessor = $2, loc = mk_loc($sloc)) } - | type_name "::" LIDENT { + | type_name "::" lident_string { let method_name = Label::{ name: $3, loc: mk_loc($loc($3)) } Method(type_name = $1, method_name~, loc = mk_loc($sloc)) } @@ -1902,6 +1988,17 @@ simple_expr -> Expr kind = Foreach(binders = $3, expr = $5, init~, continue_block~), guard_ = $7, body = $9, + is_iter = false, + loc = mk_loc($sloc) + ) + } + | "[|" "for" non_empty_list_commas(foreach_binder) "in" infix_expr foreach_optional_loop_vars_infix option(preceded("if", infix_expr)) "=>" expr "|]" { + let (init, continue_block) = $6 + ListComprehension( + kind = Foreach(binders = $3, expr = $5, init~, continue_block~), + guard_ = $7, + body = $9, + is_iter = true, loc = mk_loc($sloc) ) } @@ -1911,15 +2008,27 @@ simple_expr -> Expr kind = For(binders~, condition~, continue_block~, for_loc~), guard_ = $4, body = $6, + is_iter = false, + loc = mk_loc($sloc) + ) + } + | "[|" "for" list_comp_for_header option(preceded("if", infix_expr)) "=>" expr "|]" { + let (binders, condition, continue_block, for_loc) = $3 + ListComprehension( + kind = For(binders~, condition~, continue_block~, for_loc~), + guard_ = $4, + body = $6, + is_iter = true, loc = mk_loc($sloc) ) } - | "[" list_commas(spreadable_elem) "]" { @syntax.make_array_expr(loc = mk_loc($sloc), $2) } + | "[" list_commas(spreadable_elem) "]" { @syntax.make_array_expr(loc = mk_loc($sloc), is_iter = false, $2) } + | "[|" list_commas(spreadable_elem) "|]" { @syntax.make_array_expr(loc = mk_loc($sloc), is_iter = true, $2) } | tuple_expr { $1 } ; %inline label -> Label - : LIDENT { Label::{ name: $1, loc: mk_loc($sloc) } } + : lident_string { Label::{ name: $1, loc: mk_loc($sloc) } } ; %inline accessor -> Accessor @@ -1934,7 +2043,7 @@ simple_expr -> Expr ; %inline binder -> Binder - : LIDENT { Binder::{ name: $1, loc: mk_loc($sloc) } } + : lident_string { Binder::{ name: $1, loc: mk_loc($sloc) } } ; tvar_binder -> TypeVarBinder @@ -1977,6 +2086,7 @@ atomic_expr -> Expr MultilineString(elems = $1, loc = mk_loc($sloc)) } | INTERP { make_interp_expr(loc = mk_loc($sloc), $1) } + | BYTES_INTERP { make_bytes_interp_expr(loc = mk_loc($sloc), $1) } ; simple_constant -> Constant @@ -2041,7 +2151,7 @@ argument -> Argument let arg_value = @syntax.make_ident_expr(loc = mk_loc($loc($1)), Var::{ name: Ident(name = $1), loc: mk_loc($loc($1)) }) Argument::{ value: arg_value, kind: LabelledPun(label) } } - | LIDENT "?" { + | lident_string "?" { let loc = mk_loc($loc($1)) let label = Label::{ name: $1, loc } let arg_value = @syntax.make_ident_expr(loc~, Var::{ name: Ident(name = $1), loc }) @@ -2234,7 +2344,7 @@ type_ -> Type ; record_decl_field -> FieldDecl - : attributes visibility option("mut") LIDENT ":" type_ { + : attributes visibility option("mut") lident_string ":" type_ { FieldDecl::{ name: FieldName::{ label: $4, loc: mk_loc($loc($4)) }, ty: $6, diff --git a/lexer/tokens/pkg.generated.mbti b/lexer/tokens/pkg.generated.mbti index 14a37a86..eadb0c69 100644 --- a/lexer/tokens/pkg.generated.mbti +++ b/lexer/tokens/pkg.generated.mbti @@ -45,6 +45,7 @@ pub(all) enum Token { MULTILINE_STRING(String) MULTILINE_INTERP(Array[InterpElem]) INTERP(Array[InterpElem]) + BYTES_INTERP(Array[InterpElem]) REGEX_LITERAL(String) REGEX_INTERP(Array[InterpElem]) ATTRIBUTE((String, String?, String)) @@ -99,8 +100,10 @@ pub(all) enum Token { COLON SEMI(Bool) LBRACKET + LBRACKET_BAR PLUS RBRACKET + BAR_RBRACKET UNDERSCORE BAR LBRACE @@ -114,6 +117,7 @@ pub(all) enum Token { PIPE PIPE_LEFT LT_PLUS + LT_QUESTION ELSE FN IF @@ -159,6 +163,8 @@ pub(all) enum Token { TRY_EXCLAMATION LEXMATCH LEXMATCH_QUESTION + LEXSCAN + EXTEND PACKAGE } derive(@debug.Debug) pub fn Token::kind(Self) -> TokenKind @@ -176,6 +182,7 @@ pub(all) enum TokenKind { TK_MULTILINE_STRING TK_MULTILINE_INTERP TK_INTERP + TK_BYTES_INTERP TK_REGEX_LITERAL TK_REGEX_INTERP TK_ATTRIBUTE @@ -230,8 +237,10 @@ pub(all) enum TokenKind { TK_COLON TK_SEMI TK_LBRACKET + TK_LBRACKET_BAR TK_PLUS TK_RBRACKET + TK_BAR_RBRACKET TK_UNDERSCORE TK_BAR TK_LBRACE @@ -245,6 +254,7 @@ pub(all) enum TokenKind { TK_PIPE TK_PIPE_LEFT TK_LT_PLUS + TK_LT_QUESTION TK_ELSE TK_FN TK_IF @@ -290,6 +300,8 @@ pub(all) enum TokenKind { TK_TRY_EXCLAMATION TK_LEXMATCH TK_LEXMATCH_QUESTION + TK_LEXSCAN + TK_EXTEND TK_PACKAGE } derive(Compare, Eq, Hash) pub fn TokenKind::to_expect_string(Self) -> String diff --git a/lexer/tokens/token_to_json.mbt b/lexer/tokens/token_to_json.mbt index 54be3437..708ffd78 100644 --- a/lexer/tokens/token_to_json.mbt +++ b/lexer/tokens/token_to_json.mbt @@ -60,6 +60,7 @@ pub impl ToJson for Token with fn to_json(self) { PIPE => "PIPE" PIPE_LEFT => "PIPE_LEFT" LT_PLUS => "LT_PLUS" + LT_QUESTION => "LT_QUESTION" AS => "AS" PACKAGE_NAME(str) => ["PACKAGE_NAME", str] BARBAR => "BARBAR" @@ -70,8 +71,10 @@ pub impl ToJson for Token with fn to_json(self) { LBRACE => "LBRACE" BAR => "BAR" UNDERSCORE => "UNDERSCORE" + BAR_RBRACKET => "BAR_RBRACKET" RBRACKET => "RBRACKET" PLUS => "PLUS" + LBRACKET_BAR => "LBRACKET_BAR" LBRACKET => "LBRACKET" SEMI(boolean) => ["SEMI", boolean] COLON => "COLON" @@ -129,6 +132,7 @@ pub impl ToJson for Token with fn to_json(self) { { "id": id, "dot_id": dot_id.unwrap_or(""), "raw_payload": raw_payload }, ] INTERP(interp) => ["INTERP", interp.to_string_repr()] + BYTES_INTERP(interp) => ["BYTES_INTERP", interp.to_string_repr()] MULTILINE_INTERP(interp) => ["MULTILINE_INTERP", interp.to_string_repr()] MULTILINE_STRING(str) => ["MULTILINE_STRING", str] STRING(str) => ["STRING", str] @@ -141,6 +145,8 @@ pub impl ToJson for Token with fn to_json(self) { TRY_EXCLAMATION => "TRY_EXCLAMATION" LEXMATCH => "LEXMATCH" LEXMATCH_QUESTION => "LEXMATCH_QUESTION" + LEXSCAN => "LEXSCAN" + EXTEND => "EXTEND" REGEX_LITERAL(str) => ["REGEX_LITERAL", str] REGEX_INTERP(interp) => ["REGEX_INTERP", interp.to_string_repr()] DECLARE => "DECLARE" diff --git a/lexer/tokens/tokens.mbt b/lexer/tokens/tokens.mbt index 343ddbda..8252a937 100644 --- a/lexer/tokens/tokens.mbt +++ b/lexer/tokens/tokens.mbt @@ -9,6 +9,7 @@ pub(all) enum Token { MULTILINE_STRING(String) MULTILINE_INTERP(InterpLiteral) INTERP(InterpLiteral) + BYTES_INTERP(InterpLiteral) REGEX_LITERAL(String) REGEX_INTERP(InterpLiteral) ATTRIBUTE((String, String?, String)) @@ -63,8 +64,10 @@ pub(all) enum Token { COLON SEMI(Bool) LBRACKET + LBRACKET_BAR PLUS RBRACKET + BAR_RBRACKET UNDERSCORE BAR LBRACE @@ -78,6 +81,7 @@ pub(all) enum Token { PIPE PIPE_LEFT LT_PLUS + LT_QUESTION ELSE FN IF @@ -123,6 +127,8 @@ pub(all) enum Token { TRY_EXCLAMATION LEXMATCH LEXMATCH_QUESTION + LEXSCAN + EXTEND PACKAGE } derive(Debug) @@ -138,6 +144,7 @@ pub fn Token::kind(self : Token) -> TokenKind { MULTILINE_STRING(_) => TK_MULTILINE_STRING MULTILINE_INTERP(_) => TK_MULTILINE_INTERP INTERP(_) => TK_INTERP + BYTES_INTERP(_) => TK_BYTES_INTERP REGEX_LITERAL(_) => TK_REGEX_LITERAL REGEX_INTERP(_) => TK_REGEX_INTERP ATTRIBUTE(_) => TK_ATTRIBUTE @@ -192,8 +199,10 @@ pub fn Token::kind(self : Token) -> TokenKind { COLON => TK_COLON SEMI(_) => TK_SEMI LBRACKET => TK_LBRACKET + LBRACKET_BAR => TK_LBRACKET_BAR PLUS => TK_PLUS RBRACKET => TK_RBRACKET + BAR_RBRACKET => TK_BAR_RBRACKET UNDERSCORE => TK_UNDERSCORE BAR => TK_BAR LBRACE => TK_LBRACE @@ -207,6 +216,7 @@ pub fn Token::kind(self : Token) -> TokenKind { PIPE => TK_PIPE PIPE_LEFT => TK_PIPE_LEFT LT_PLUS => TK_LT_PLUS + LT_QUESTION => TK_LT_QUESTION ELSE => TK_ELSE FN => TK_FN IF => TK_IF @@ -252,6 +262,8 @@ pub fn Token::kind(self : Token) -> TokenKind { TRY_EXCLAMATION => TK_TRY_EXCLAMATION LEXMATCH => TK_LEXMATCH LEXMATCH_QUESTION => TK_LEXMATCH_QUESTION + LEXSCAN => TK_LEXSCAN + EXTEND => TK_EXTEND PACKAGE => TK_PACKAGE } } @@ -267,6 +279,7 @@ pub(all) enum TokenKind { TK_MULTILINE_STRING TK_MULTILINE_INTERP TK_INTERP + TK_BYTES_INTERP TK_REGEX_LITERAL TK_REGEX_INTERP TK_ATTRIBUTE @@ -321,8 +334,10 @@ pub(all) enum TokenKind { TK_COLON TK_SEMI TK_LBRACKET + TK_LBRACKET_BAR TK_PLUS TK_RBRACKET + TK_BAR_RBRACKET TK_UNDERSCORE TK_BAR TK_LBRACE @@ -336,6 +351,7 @@ pub(all) enum TokenKind { TK_PIPE TK_PIPE_LEFT TK_LT_PLUS + TK_LT_QUESTION TK_ELSE TK_FN TK_IF @@ -381,6 +397,8 @@ pub(all) enum TokenKind { TK_TRY_EXCLAMATION TK_LEXMATCH TK_LEXMATCH_QUESTION + TK_LEXSCAN + TK_EXTEND TK_PACKAGE } derive(Eq, Hash, Compare) @@ -397,6 +415,7 @@ pub impl Show for TokenKind with fn output(self, logger) { TK_MULTILINE_STRING => "MULTILINE_STRING" TK_MULTILINE_INTERP => "MULTILINE_INTERP" TK_INTERP => "INTERP" + TK_BYTES_INTERP => "BYTES_INTERP" TK_REGEX_LITERAL => "REGEX_LITERAL" TK_REGEX_INTERP => "REGEX_INTERP" TK_ATTRIBUTE => "ATTRIBUTE" @@ -451,8 +470,10 @@ pub impl Show for TokenKind with fn output(self, logger) { TK_COLON => "\":\"" TK_SEMI => "SEMI" TK_LBRACKET => "\"[\"" + TK_LBRACKET_BAR => "\"[|\"" TK_PLUS => "\"+\"" TK_RBRACKET => "\"]\"" + TK_BAR_RBRACKET => "\"|]\"" TK_UNDERSCORE => "\"_\"" TK_BAR => "\"|\"" TK_LBRACE => "\"{\"" @@ -466,6 +487,7 @@ pub impl Show for TokenKind with fn output(self, logger) { TK_PIPE => "\"|>\"" TK_PIPE_LEFT => "\"<|\"" TK_LT_PLUS => "\"<+\"" + TK_LT_QUESTION => "\" "\"else\"" TK_FN => "\"fn\"" TK_IF => "\"if\"" @@ -511,6 +533,8 @@ pub impl Show for TokenKind with fn output(self, logger) { TK_TRY_EXCLAMATION => "\"try!\"" TK_LEXMATCH => "\"lexmatch\"" TK_LEXMATCH_QUESTION => "\"lexmatch?\"" + TK_LEXSCAN => "\"lexscan\"" + TK_EXTEND => "\"extend\"" TK_PACKAGE => "\"package\"" } ) @@ -528,6 +552,7 @@ pub impl Debug for TokenKind with fn to_repr(self) { TK_MULTILINE_STRING => to_repr("MULTILINE_STRING") TK_MULTILINE_INTERP => to_repr("MULTILINE_INTERP") TK_INTERP => to_repr("INTERP") + TK_BYTES_INTERP => to_repr("BYTES_INTERP") TK_REGEX_LITERAL => to_repr("REGEX_LITERAL") TK_REGEX_INTERP => to_repr("REGEX_INTERP") TK_ATTRIBUTE => to_repr("ATTRIBUTE") @@ -582,8 +607,10 @@ pub impl Debug for TokenKind with fn to_repr(self) { TK_COLON => to_repr(":") TK_SEMI => to_repr("SEMI") TK_LBRACKET => to_repr("[") + TK_LBRACKET_BAR => to_repr("[|") TK_PLUS => to_repr("+") TK_RBRACKET => to_repr("]") + TK_BAR_RBRACKET => to_repr("|]") TK_UNDERSCORE => to_repr("_") TK_BAR => to_repr("|") TK_LBRACE => to_repr("{") @@ -597,6 +624,7 @@ pub impl Debug for TokenKind with fn to_repr(self) { TK_PIPE => to_repr("|>") TK_PIPE_LEFT => to_repr("<|") TK_LT_PLUS => to_repr("<+") + TK_LT_QUESTION => to_repr(" to_repr("else") TK_FN => to_repr("fn") TK_IF => to_repr("if") @@ -642,6 +670,8 @@ pub impl Debug for TokenKind with fn to_repr(self) { TK_TRY_EXCLAMATION => to_repr("try!") TK_LEXMATCH => to_repr("lexmatch") TK_LEXMATCH_QUESTION => to_repr("lexmatch?") + TK_LEXSCAN => to_repr("lexscan") + TK_EXTEND => to_repr("extend") TK_PACKAGE => to_repr("package") } } diff --git a/mbti_ast/mbti_ast.mbt b/mbti_ast/mbti_ast.mbt index 2595686e..620a0fd7 100644 --- a/mbti_ast/mbti_ast.mbt +++ b/mbti_ast/mbti_ast.mbt @@ -85,6 +85,7 @@ pub(all) enum AliasSig { ///| pub(all) struct TraitMethodSig { name : Name + type_params : @list.List[TypeParamWithConstraints] params : @list.List[Parameter] is_async : Location? has_default : Bool diff --git a/mbti_ast/pkg.generated.mbti b/mbti_ast/pkg.generated.mbti index 7f88f80b..cefb1ed4 100644 --- a/mbti_ast/pkg.generated.mbti +++ b/mbti_ast/pkg.generated.mbti @@ -86,6 +86,7 @@ pub fn Sig::attrs(Self) -> @list.List[@attribute.Attribute] pub(all) struct TraitMethodSig { name : Name + type_params : @list.List[TypeParamWithConstraints] params : @list.List[@syntax.Parameter] is_async : @basic.Location? has_default : Bool diff --git a/mbti_parser/mbti_parser.mbt b/mbti_parser/mbti_parser.mbt index b1d68557..baa1e994 100644 --- a/mbti_parser/mbti_parser.mbt +++ b/mbti_parser/mbti_parser.mbt @@ -275,6 +275,7 @@ priv enum YYSymbol { T_MULTILINE_STRING T_MULTILINE_INTERP T_INTERP + T_BYTES_INTERP T_REGEX_LITERAL T_REGEX_INTERP T_ATTRIBUTE @@ -329,8 +330,10 @@ priv enum YYSymbol { T_COLON T_SEMI T_LBRACKET + T_LBRACKET_BAR T_PLUS T_RBRACKET + T_BAR_RBRACKET T_UNDERSCORE T_BAR T_LBRACE @@ -344,6 +347,7 @@ priv enum YYSymbol { T_PIPE T_PIPE_LEFT T_LT_PLUS + T_LT_QUESTION T_ELSE T_FN T_IF @@ -389,6 +393,8 @@ priv enum YYSymbol { T_TRY_EXCLAMATION T_LEXMATCH T_LEXMATCH_QUESTION + T_LEXSCAN + T_EXTEND T_PACKAGE NT_mbti NT_imports @@ -477,7 +483,7 @@ fn init { } // file:///./mbti_parser.mbty -// 143| PACKAGE STRING ioption(";") imports sigs EOF { Mbti::{package_name: $2, imports: $4, sigs: $5, loc : mk_loc($sloc), base_pos: mk_base_pos($loc($1).0)} } +// 149| PACKAGE STRING ioption(";") imports sigs EOF { Mbti::{package_name: $2, imports: $4, sigs: $5, loc : mk_loc($sloc), base_pos: mk_base_pos($loc($1).0)} } fn yy_action_0(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { let _sub_action_0_result = yy_action_1(_args[1].2, _args[2:2]) guard _args[1].0 is YYObj_StringLiteral(_dollar2) @@ -497,7 +503,7 @@ fn yy_action_1(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Pos } // file:///./mbti_parser.mbty -// 143| PACKAGE STRING ioption(";") imports sigs EOF { Mbti::{package_name: $2, imports: $4, sigs: $5, loc : mk_loc($sloc), base_pos: mk_base_pos($loc($1).0)} } +// 149| PACKAGE STRING ioption(";") imports sigs EOF { Mbti::{package_name: $2, imports: $4, sigs: $5, loc : mk_loc($sloc), base_pos: mk_base_pos($loc($1).0)} } fn yy_action_2(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { let _sub_action_0_result = yy_action_3(_args[1].2, _args[2:3]) guard _args[1].0 is YYObj_StringLiteral(_dollar2) @@ -518,7 +524,7 @@ fn yy_action_3(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Pos } // file:///./mbti_parser.mbty -// 159| sig_ ";" sigs { $3.add(($1, mk_loc($loc($1)))) } +// 165| sig_ ";" sigs { $3.add(($1, mk_loc($loc($1)))) } fn yy_action_4(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { guard _args[2].0 is YYObj__list_List__Sig__Location__(_dollar3) guard _args[0].0 is YYObj_Sig(_dollar1) @@ -528,7 +534,7 @@ fn yy_action_4(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Pos } // file:///./mbti_parser.mbty -// 158| sig_ { @list.singleton(($1, mk_loc($sloc))) } +// 164| sig_ { @list.singleton(($1, mk_loc($sloc))) } fn yy_action_5(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { guard _args[0].0 is YYObj_Sig(_dollar1) let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) @@ -537,56 +543,56 @@ fn yy_action_5(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Pos } // file:///./mbti_parser.mbty -// 163| func_sig { Func($1) } +// 169| func_sig { Func($1) } fn yy_action_6(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { guard _args[0].0 is YYObj_FuncSig(_dollar1) YYObj_Sig({(); Func(_dollar1) }) } // file:///./mbti_parser.mbty -// 164| type_sig { Type($1) } +// 170| type_sig { Type($1) } fn yy_action_7(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { guard _args[0].0 is YYObj_TypeSig(_dollar1) YYObj_Sig({(); Type(_dollar1) }) } // file:///./mbti_parser.mbty -// 165| alias_sig { Alias($1) } +// 171| alias_sig { Alias($1) } fn yy_action_8(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { guard _args[0].0 is YYObj_AliasSig(_dollar1) YYObj_Sig({(); Alias(_dollar1) }) } // file:///./mbti_parser.mbty -// 166| trait_sig { Trait($1) } +// 172| trait_sig { Trait($1) } fn yy_action_9(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { guard _args[0].0 is YYObj_TraitSig(_dollar1) YYObj_Sig({(); Trait(_dollar1) }) } // file:///./mbti_parser.mbty -// 167| impl_sig { Impl($1) } +// 173| impl_sig { Impl($1) } fn yy_action_10(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { guard _args[0].0 is YYObj_ImplSig(_dollar1) YYObj_Sig({(); Impl(_dollar1) }) } // file:///./mbti_parser.mbty -// 168| const_sig { Const($1) } +// 174| const_sig { Const($1) } fn yy_action_11(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { guard _args[0].0 is YYObj_ConstSig(_dollar1) YYObj_Sig({(); Const(_dollar1) }) } // file:///./mbti_parser.mbty -// 169| value_sig { Value($1) } +// 175| value_sig { Value($1) } fn yy_action_12(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { guard _args[0].0 is YYObj_ValueSig(_dollar1) YYObj_Sig({(); Value(_dollar1) }) } // file:///./mbti_parser.mbty -// 173| attributes vis "const" uident ":" type_ "=" constant { ConstSig::{name: $4, type_: $6, value: $8, attrs: $1} } +// 179| attributes vis "const" uident ":" type_ "=" constant { ConstSig::{name: $4, type_: $6, value: $8, attrs: $1} } fn yy_action_13(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { let _sub_action_0_result = yy_action_14(_last_pos, _args[0:0]) let _sub_action_1_result = yy_action_15(_last_pos, _args[0:0]) @@ -598,7 +604,7 @@ fn yy_action_13(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Po } // file:///./mbti_parser.mbty -// 173| attributes vis "const" uident ":" type_ "=" constant { ConstSig::{name: $4, type_: $6, value: $8, attrs: $1} } +// 179| attributes vis "const" uident ":" type_ "=" constant { ConstSig::{name: $4, type_: $6, value: $8, attrs: $1} } fn yy_action_16(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { let _sub_action_0_result = yy_action_14(_last_pos, _args[0:0]) let _sub_action_1_result = yy_action_17(_last_pos, _args[0:1]) @@ -610,7 +616,7 @@ fn yy_action_16(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Po } // file:///./mbti_parser.mbty -// 177| attributes vis "let" lident ":" type_ { ValueSig::{ attrs: $1, name: $4, type_: $6 } } +// 183| attributes vis "let" lident ":" type_ { ValueSig::{ attrs: $1, name: $4, type_: $6 } } fn yy_action_18(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { let _sub_action_0_result = yy_action_14(_last_pos, _args[0:0]) let _sub_action_1_result = yy_action_17(_last_pos, _args[0:1]) @@ -621,10 +627,10 @@ fn yy_action_18(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Po } // file:///./mbti_parser.mbty -// 206| attributes vis is_async FN loption(type_params_with_constraints) func_name delimited("(", separated_list(",", parameter), ")") "->" return_type { -// 207| let (type_name, name) = $6 -// 208| FuncSig::{ attrs: $1, is_async : $3, type_name, name, type_params: $5, params: $7, return_: $9} -// 209| } +// 212| attributes vis is_async FN loption(type_params_with_constraints) func_name delimited("(", separated_list(",", parameter), ")") "->" return_type { +// 213| let (type_name, name) = $6 +// 214| FuncSig::{ attrs: $1, is_async : $3, type_name, name, type_params: $5, params: $7, return_: $9} +// 215| } fn yy_action_19(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { let _sub_action_0_result = yy_action_14(_last_pos, _args[0:0]) let _sub_action_1_result = yy_action_17(_last_pos, _args[0:1]) @@ -643,10 +649,10 @@ fn yy_action_19(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Po } // file:///./mbti_parser.mbty -// 206| attributes vis is_async FN loption(type_params_with_constraints) func_name delimited("(", separated_list(",", parameter), ")") "->" return_type { -// 207| let (type_name, name) = $6 -// 208| FuncSig::{ attrs: $1, is_async : $3, type_name, name, type_params: $5, params: $7, return_: $9} -// 209| } +// 212| attributes vis is_async FN loption(type_params_with_constraints) func_name delimited("(", separated_list(",", parameter), ")") "->" return_type { +// 213| let (type_name, name) = $6 +// 214| FuncSig::{ attrs: $1, is_async : $3, type_name, name, type_params: $5, params: $7, return_: $9} +// 215| } fn yy_action_22(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { let _sub_action_0_result = yy_action_14(_last_pos, _args[0:0]) let _sub_action_1_result = yy_action_17(_last_pos, _args[0:1]) @@ -665,9 +671,9 @@ fn yy_action_22(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Po } // file:///./mbti_parser.mbty -// 223| attributes vis "type" type_decl_name_with_params optional_derive { -// 224| TypeSig::{attrs : $1, vis: $2, name: $4.0, type_params: $4.1, components: Abstract, derives: $5} -// 225| } +// 232| attributes vis "type" type_decl_name_with_params optional_derive { +// 233| TypeSig::{attrs : $1, vis: $2, name: $4.0, type_params: $4.1, components: Abstract, derives: $5} +// 234| } fn yy_action_24(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { let _sub_action_0_result = yy_action_14(_last_pos, _args[0:0]) let _sub_action_1_result = yy_action_17(_last_pos, _args[0:1]) @@ -681,9 +687,9 @@ fn yy_action_24(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Po } // file:///./mbti_parser.mbty -// 281| attributes vis "type" type_decl_name_with_params "=" type_ { -// 282| TypeAlias(attrs = $1, vis=$2, name=$4.0, type_params=$4.1, type_=$6) -// 283| } +// 290| attributes vis "type" type_decl_name_with_params "=" type_ { +// 291| TypeAlias(attrs = $1, vis=$2, name=$4.0, type_params=$4.1, type_=$6) +// 292| } fn yy_action_25(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { let _sub_action_0_result = yy_action_14(_last_pos, _args[0:0]) let _sub_action_1_result = yy_action_17(_last_pos, _args[0:1]) @@ -697,9 +703,9 @@ fn yy_action_25(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Po } // file:///./mbti_parser.mbty -// 226| attributes vis "suberror" uident optional_derive { -// 227| TypeSig::{attrs : $1, vis: $2, name: $4, type_params: @list.empty(), components: Error(NoPayload), derives: $5} -// 228| } +// 235| attributes vis "suberror" uident optional_derive { +// 236| TypeSig::{attrs : $1, vis: $2, name: $4, type_params: @list.empty(), components: Error(NoPayload), derives: $5} +// 237| } fn yy_action_26(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { let _sub_action_0_result = yy_action_14(_last_pos, _args[0:0]) let _sub_action_1_result = yy_action_17(_last_pos, _args[0:1]) @@ -713,9 +719,9 @@ fn yy_action_26(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Po } // file:///./mbti_parser.mbty -// 229| attributes vis "suberror" uident "{" separated_list(";", enum_constructor) "}" optional_derive { -// 230| TypeSig::{attrs : $1, vis: $2, name: $4, type_params: @list.empty(), components: Error(EnumPayload($6)), derives: $8} -// 231| } +// 238| attributes vis "suberror" uident "{" separated_list(";", enum_constructor) "}" optional_derive { +// 239| TypeSig::{attrs : $1, vis: $2, name: $4, type_params: @list.empty(), components: Error(EnumPayload($6)), derives: $8} +// 240| } fn yy_action_27(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { let _sub_action_0_result = yy_action_14(_last_pos, _args[0:0]) let _sub_action_1_result = yy_action_17(_last_pos, _args[0:1]) @@ -730,9 +736,9 @@ fn yy_action_27(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Po } // file:///./mbti_parser.mbty -// 232| attributes vis "struct" type_decl_name_with_params "{" record_decl_body "}" optional_derive { -// 233| TypeSig::{attrs : $1, vis: $2, name: $4.0, type_params: $4.1, components: $6, derives: $8 } -// 234| } +// 241| attributes vis "struct" type_decl_name_with_params "{" record_decl_body "}" optional_derive { +// 242| TypeSig::{attrs : $1, vis: $2, name: $4.0, type_params: $4.1, components: $6, derives: $8 } +// 243| } fn yy_action_28(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { let _sub_action_0_result = yy_action_14(_last_pos, _args[0:0]) let _sub_action_1_result = yy_action_17(_last_pos, _args[0:1]) @@ -747,9 +753,9 @@ fn yy_action_28(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Po } // file:///./mbti_parser.mbty -// 235| attributes vis "struct" type_decl_name_with_params "(" separated_list(",", type_) ")" optional_derive { -// 236| TypeSig::{attrs : $1, vis: $2, name: $4.0, type_params: $4.1, components: TupleStruct($6), derives: $8} -// 237| } +// 244| attributes vis "struct" type_decl_name_with_params "(" separated_list(",", type_) ")" optional_derive { +// 245| TypeSig::{attrs : $1, vis: $2, name: $4.0, type_params: $4.1, components: TupleStruct($6), derives: $8} +// 246| } fn yy_action_29(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { let _sub_action_0_result = yy_action_14(_last_pos, _args[0:0]) let _sub_action_1_result = yy_action_17(_last_pos, _args[0:1]) @@ -764,9 +770,9 @@ fn yy_action_29(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Po } // file:///./mbti_parser.mbty -// 238| attributes vis "enum" type_decl_name_with_params "{" separated_list(";", enum_constructor) "}" optional_derive { -// 239| TypeSig::{attrs : $1, vis: $2, name: $4.0, type_params: $4.1, components: Variant($6), derives: $8} -// 240| } +// 247| attributes vis "enum" type_decl_name_with_params "{" separated_list(";", enum_constructor) "}" optional_derive { +// 248| TypeSig::{attrs : $1, vis: $2, name: $4.0, type_params: $4.1, components: Variant($6), derives: $8} +// 249| } fn yy_action_30(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { let _sub_action_0_result = yy_action_14(_last_pos, _args[0:0]) let _sub_action_1_result = yy_action_17(_last_pos, _args[0:1]) @@ -781,9 +787,9 @@ fn yy_action_30(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Po } // file:///./mbti_parser.mbty -// 241| attributes vis "extenum" type_decl_name_with_params "{" separated_list(";", enum_constructor) "}" optional_derive { -// 242| TypeSig::{attrs : $1, vis: $2, name: $4.0, type_params: $4.1, components: ExtensibleEnum($6), derives: $8} -// 243| } +// 250| attributes vis "extenum" type_decl_name_with_params "{" separated_list(";", enum_constructor) "}" optional_derive { +// 251| TypeSig::{attrs : $1, vis: $2, name: $4.0, type_params: $4.1, components: ExtensibleEnum($6), derives: $8} +// 252| } fn yy_action_31(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { let _sub_action_0_result = yy_action_14(_last_pos, _args[0:0]) let _sub_action_1_result = yy_action_17(_last_pos, _args[0:1]) @@ -798,10 +804,10 @@ fn yy_action_31(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Po } // file:///./mbti_parser.mbty -// 244| attributes vis "extenum" extensible_enum_extension_target "+=" "{" separated_list(";", enum_constructor) "}" optional_derive { -// 245| let (name, type_params, target) = $4 -// 246| TypeSig::{attrs : $1, vis: $2, name, type_params, components: ExtendEnum(target~, constructors = $7), derives: $9} -// 247| } +// 253| attributes vis "extenum" extensible_enum_extension_target "+=" "{" separated_list(";", enum_constructor) "}" optional_derive { +// 254| let (name, type_params, target) = $4 +// 255| TypeSig::{attrs : $1, vis: $2, name, type_params, components: ExtendEnum(target~, constructors = $7), derives: $9} +// 256| } fn yy_action_32(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { let _sub_action_0_result = yy_action_14(_last_pos, _args[0:0]) let _sub_action_1_result = yy_action_17(_last_pos, _args[0:1]) @@ -817,9 +823,9 @@ fn yy_action_32(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Po } // file:///./mbti_parser.mbty -// 256| attributes vis "impl" type_params_with_constraints qualified_uident "for" type_ { -// 257| ImplSig::{type_params : $4, trait_name : $5, type_ : $7, attrs : $1} -// 258| } +// 265| attributes vis "impl" type_params_with_constraints qualified_uident "for" type_ { +// 266| ImplSig::{type_params : $4, trait_name : $5, type_ : $7, attrs : $1} +// 267| } fn yy_action_33(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { let _sub_action_0_result = yy_action_14(_last_pos, _args[0:0]) let _sub_action_1_result = yy_action_17(_last_pos, _args[0:1]) @@ -833,9 +839,9 @@ fn yy_action_33(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Po } // file:///./mbti_parser.mbty -// 259| attributes vis "impl" qualified_uident "for" type_ { -// 260| ImplSig::{type_params : @list.empty(), trait_name : $4, type_ : $6, attrs : $1} -// 261| } +// 268| attributes vis "impl" qualified_uident "for" type_ { +// 269| ImplSig::{type_params : @list.empty(), trait_name : $4, type_ : $6, attrs : $1} +// 270| } fn yy_action_34(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { let _sub_action_0_result = yy_action_14(_last_pos, _args[0:0]) let _sub_action_1_result = yy_action_17(_last_pos, _args[0:1]) @@ -848,9 +854,9 @@ fn yy_action_34(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Po } // file:///./mbti_parser.mbty -// 265| attributes vis "trait" uident loption(preceded(":", separated_nonempty_list("+", qualified_uident))) trait_body { -// 266| TraitSig::{ attrs : $1, vis: $2, name: $4, super_traits: $5, methods: $6} -// 267| } +// 274| attributes vis "trait" uident loption(preceded(":", separated_nonempty_list("+", qualified_uident))) trait_body { +// 275| TraitSig::{ attrs : $1, vis: $2, name: $4, super_traits: $5, methods: $6} +// 276| } fn yy_action_35(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { let _sub_action_0_result = yy_action_14(_last_pos, _args[0:0]) let _sub_action_1_result = yy_action_17(_last_pos, _args[0:1]) @@ -865,9 +871,9 @@ fn yy_action_35(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Po } // file:///./mbti_parser.mbty -// 284| attributes vis "fnalias" uident "::" lident { -// 285| FuncAlias(attrs = $1,name=$6, type_name=$4) -// 286| } +// 293| attributes vis "fnalias" uident "::" lident { +// 294| FuncAlias(attrs = $1,name=$6, type_name=$4) +// 295| } fn yy_action_36(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { let _sub_action_0_result = yy_action_14(_last_pos, _args[0:0]) let _sub_action_1_result = yy_action_17(_last_pos, _args[0:1]) @@ -880,10 +886,10 @@ fn yy_action_36(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Po } // file:///./mbti_parser.mbty -// 287| attributes vis "using" PACKAGE_NAME "{" "type" uident using_binder "}" { -// 288| let pkg = Name::{ name : $4, loc : mk_loc($loc($4)) } -// 289| Using(pkg~, target = $7, name = $8, kind = Type, attrs = $1) -// 290| } +// 296| attributes vis "using" PACKAGE_NAME "{" "type" uident using_binder "}" { +// 297| let pkg = Name::{ name : $4, loc : mk_loc($loc($4)) } +// 298| Using(pkg~, target = $7, name = $8, kind = Type, attrs = $1) +// 299| } fn yy_action_37(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { let _sub_action_0_result = yy_action_14(_last_pos, _args[0:0]) let _sub_action_1_result = yy_action_17(_last_pos, _args[0:1]) @@ -900,10 +906,10 @@ fn yy_action_37(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Po } // file:///./mbti_parser.mbty -// 291| attributes vis "using" PACKAGE_NAME "{" "trait" uident using_binder "}" { -// 292| let pkg = Name::{ name : $4, loc : mk_loc($loc($4)) } -// 293| Using(pkg~, target = $7, name = $8, kind = Trait, attrs = $1) -// 294| } +// 300| attributes vis "using" PACKAGE_NAME "{" "trait" uident using_binder "}" { +// 301| let pkg = Name::{ name : $4, loc : mk_loc($loc($4)) } +// 302| Using(pkg~, target = $7, name = $8, kind = Trait, attrs = $1) +// 303| } fn yy_action_38(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { let _sub_action_0_result = yy_action_14(_last_pos, _args[0:0]) let _sub_action_1_result = yy_action_17(_last_pos, _args[0:1]) @@ -920,7 +926,7 @@ fn yy_action_38(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Po } // file:///./mbti_parser.mbty -// 173| attributes vis "const" uident ":" type_ "=" constant { ConstSig::{name: $4, type_: $6, value: $8, attrs: $1} } +// 179| attributes vis "const" uident ":" type_ "=" constant { ConstSig::{name: $4, type_: $6, value: $8, attrs: $1} } fn yy_action_39(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { let _sub_action_0_result = yy_action_14(_last_pos, _args[0:0]) let _sub_action_1_result = yy_action_40(_last_pos, _args[0:2]) @@ -932,7 +938,7 @@ fn yy_action_39(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Po } // file:///./mbti_parser.mbty -// 177| attributes vis "let" lident ":" type_ { ValueSig::{ attrs: $1, name: $4, type_: $6 } } +// 183| attributes vis "let" lident ":" type_ { ValueSig::{ attrs: $1, name: $4, type_: $6 } } fn yy_action_41(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { let _sub_action_0_result = yy_action_14(_last_pos, _args[0:0]) let _sub_action_1_result = yy_action_40(_last_pos, _args[0:2]) @@ -943,10 +949,10 @@ fn yy_action_41(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Po } // file:///./mbti_parser.mbty -// 206| attributes vis is_async FN loption(type_params_with_constraints) func_name delimited("(", separated_list(",", parameter), ")") "->" return_type { -// 207| let (type_name, name) = $6 -// 208| FuncSig::{ attrs: $1, is_async : $3, type_name, name, type_params: $5, params: $7, return_: $9} -// 209| } +// 212| attributes vis is_async FN loption(type_params_with_constraints) func_name delimited("(", separated_list(",", parameter), ")") "->" return_type { +// 213| let (type_name, name) = $6 +// 214| FuncSig::{ attrs: $1, is_async : $3, type_name, name, type_params: $5, params: $7, return_: $9} +// 215| } fn yy_action_42(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { let _sub_action_0_result = yy_action_14(_last_pos, _args[0:0]) let _sub_action_1_result = yy_action_40(_last_pos, _args[0:2]) @@ -965,10 +971,10 @@ fn yy_action_42(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Po } // file:///./mbti_parser.mbty -// 206| attributes vis is_async FN loption(type_params_with_constraints) func_name delimited("(", separated_list(",", parameter), ")") "->" return_type { -// 207| let (type_name, name) = $6 -// 208| FuncSig::{ attrs: $1, is_async : $3, type_name, name, type_params: $5, params: $7, return_: $9} -// 209| } +// 212| attributes vis is_async FN loption(type_params_with_constraints) func_name delimited("(", separated_list(",", parameter), ")") "->" return_type { +// 213| let (type_name, name) = $6 +// 214| FuncSig::{ attrs: $1, is_async : $3, type_name, name, type_params: $5, params: $7, return_: $9} +// 215| } fn yy_action_43(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { let _sub_action_0_result = yy_action_14(_last_pos, _args[0:0]) let _sub_action_1_result = yy_action_40(_last_pos, _args[0:2]) @@ -987,9 +993,9 @@ fn yy_action_43(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Po } // file:///./mbti_parser.mbty -// 223| attributes vis "type" type_decl_name_with_params optional_derive { -// 224| TypeSig::{attrs : $1, vis: $2, name: $4.0, type_params: $4.1, components: Abstract, derives: $5} -// 225| } +// 232| attributes vis "type" type_decl_name_with_params optional_derive { +// 233| TypeSig::{attrs : $1, vis: $2, name: $4.0, type_params: $4.1, components: Abstract, derives: $5} +// 234| } fn yy_action_44(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { let _sub_action_0_result = yy_action_14(_last_pos, _args[0:0]) let _sub_action_1_result = yy_action_40(_last_pos, _args[0:2]) @@ -1003,9 +1009,9 @@ fn yy_action_44(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Po } // file:///./mbti_parser.mbty -// 281| attributes vis "type" type_decl_name_with_params "=" type_ { -// 282| TypeAlias(attrs = $1, vis=$2, name=$4.0, type_params=$4.1, type_=$6) -// 283| } +// 290| attributes vis "type" type_decl_name_with_params "=" type_ { +// 291| TypeAlias(attrs = $1, vis=$2, name=$4.0, type_params=$4.1, type_=$6) +// 292| } fn yy_action_45(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { let _sub_action_0_result = yy_action_14(_last_pos, _args[0:0]) let _sub_action_1_result = yy_action_40(_last_pos, _args[0:2]) @@ -1019,9 +1025,9 @@ fn yy_action_45(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Po } // file:///./mbti_parser.mbty -// 226| attributes vis "suberror" uident optional_derive { -// 227| TypeSig::{attrs : $1, vis: $2, name: $4, type_params: @list.empty(), components: Error(NoPayload), derives: $5} -// 228| } +// 235| attributes vis "suberror" uident optional_derive { +// 236| TypeSig::{attrs : $1, vis: $2, name: $4, type_params: @list.empty(), components: Error(NoPayload), derives: $5} +// 237| } fn yy_action_46(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { let _sub_action_0_result = yy_action_14(_last_pos, _args[0:0]) let _sub_action_1_result = yy_action_40(_last_pos, _args[0:2]) @@ -1035,9 +1041,9 @@ fn yy_action_46(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Po } // file:///./mbti_parser.mbty -// 229| attributes vis "suberror" uident "{" separated_list(";", enum_constructor) "}" optional_derive { -// 230| TypeSig::{attrs : $1, vis: $2, name: $4, type_params: @list.empty(), components: Error(EnumPayload($6)), derives: $8} -// 231| } +// 238| attributes vis "suberror" uident "{" separated_list(";", enum_constructor) "}" optional_derive { +// 239| TypeSig::{attrs : $1, vis: $2, name: $4, type_params: @list.empty(), components: Error(EnumPayload($6)), derives: $8} +// 240| } fn yy_action_47(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { let _sub_action_0_result = yy_action_14(_last_pos, _args[0:0]) let _sub_action_1_result = yy_action_40(_last_pos, _args[0:2]) @@ -1052,9 +1058,9 @@ fn yy_action_47(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Po } // file:///./mbti_parser.mbty -// 232| attributes vis "struct" type_decl_name_with_params "{" record_decl_body "}" optional_derive { -// 233| TypeSig::{attrs : $1, vis: $2, name: $4.0, type_params: $4.1, components: $6, derives: $8 } -// 234| } +// 241| attributes vis "struct" type_decl_name_with_params "{" record_decl_body "}" optional_derive { +// 242| TypeSig::{attrs : $1, vis: $2, name: $4.0, type_params: $4.1, components: $6, derives: $8 } +// 243| } fn yy_action_48(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { let _sub_action_0_result = yy_action_14(_last_pos, _args[0:0]) let _sub_action_1_result = yy_action_40(_last_pos, _args[0:2]) @@ -1069,9 +1075,9 @@ fn yy_action_48(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Po } // file:///./mbti_parser.mbty -// 235| attributes vis "struct" type_decl_name_with_params "(" separated_list(",", type_) ")" optional_derive { -// 236| TypeSig::{attrs : $1, vis: $2, name: $4.0, type_params: $4.1, components: TupleStruct($6), derives: $8} -// 237| } +// 244| attributes vis "struct" type_decl_name_with_params "(" separated_list(",", type_) ")" optional_derive { +// 245| TypeSig::{attrs : $1, vis: $2, name: $4.0, type_params: $4.1, components: TupleStruct($6), derives: $8} +// 246| } fn yy_action_49(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { let _sub_action_0_result = yy_action_14(_last_pos, _args[0:0]) let _sub_action_1_result = yy_action_40(_last_pos, _args[0:2]) @@ -1086,9 +1092,9 @@ fn yy_action_49(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Po } // file:///./mbti_parser.mbty -// 238| attributes vis "enum" type_decl_name_with_params "{" separated_list(";", enum_constructor) "}" optional_derive { -// 239| TypeSig::{attrs : $1, vis: $2, name: $4.0, type_params: $4.1, components: Variant($6), derives: $8} -// 240| } +// 247| attributes vis "enum" type_decl_name_with_params "{" separated_list(";", enum_constructor) "}" optional_derive { +// 248| TypeSig::{attrs : $1, vis: $2, name: $4.0, type_params: $4.1, components: Variant($6), derives: $8} +// 249| } fn yy_action_50(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { let _sub_action_0_result = yy_action_14(_last_pos, _args[0:0]) let _sub_action_1_result = yy_action_40(_last_pos, _args[0:2]) @@ -1103,9 +1109,9 @@ fn yy_action_50(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Po } // file:///./mbti_parser.mbty -// 241| attributes vis "extenum" type_decl_name_with_params "{" separated_list(";", enum_constructor) "}" optional_derive { -// 242| TypeSig::{attrs : $1, vis: $2, name: $4.0, type_params: $4.1, components: ExtensibleEnum($6), derives: $8} -// 243| } +// 250| attributes vis "extenum" type_decl_name_with_params "{" separated_list(";", enum_constructor) "}" optional_derive { +// 251| TypeSig::{attrs : $1, vis: $2, name: $4.0, type_params: $4.1, components: ExtensibleEnum($6), derives: $8} +// 252| } fn yy_action_51(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { let _sub_action_0_result = yy_action_14(_last_pos, _args[0:0]) let _sub_action_1_result = yy_action_40(_last_pos, _args[0:2]) @@ -1120,10 +1126,10 @@ fn yy_action_51(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Po } // file:///./mbti_parser.mbty -// 244| attributes vis "extenum" extensible_enum_extension_target "+=" "{" separated_list(";", enum_constructor) "}" optional_derive { -// 245| let (name, type_params, target) = $4 -// 246| TypeSig::{attrs : $1, vis: $2, name, type_params, components: ExtendEnum(target~, constructors = $7), derives: $9} -// 247| } +// 253| attributes vis "extenum" extensible_enum_extension_target "+=" "{" separated_list(";", enum_constructor) "}" optional_derive { +// 254| let (name, type_params, target) = $4 +// 255| TypeSig::{attrs : $1, vis: $2, name, type_params, components: ExtendEnum(target~, constructors = $7), derives: $9} +// 256| } fn yy_action_52(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { let _sub_action_0_result = yy_action_14(_last_pos, _args[0:0]) let _sub_action_1_result = yy_action_40(_last_pos, _args[0:2]) @@ -1139,9 +1145,9 @@ fn yy_action_52(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Po } // file:///./mbti_parser.mbty -// 256| attributes vis "impl" type_params_with_constraints qualified_uident "for" type_ { -// 257| ImplSig::{type_params : $4, trait_name : $5, type_ : $7, attrs : $1} -// 258| } +// 265| attributes vis "impl" type_params_with_constraints qualified_uident "for" type_ { +// 266| ImplSig::{type_params : $4, trait_name : $5, type_ : $7, attrs : $1} +// 267| } fn yy_action_53(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { let _sub_action_0_result = yy_action_14(_last_pos, _args[0:0]) let _sub_action_1_result = yy_action_40(_last_pos, _args[0:2]) @@ -1155,9 +1161,9 @@ fn yy_action_53(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Po } // file:///./mbti_parser.mbty -// 259| attributes vis "impl" qualified_uident "for" type_ { -// 260| ImplSig::{type_params : @list.empty(), trait_name : $4, type_ : $6, attrs : $1} -// 261| } +// 268| attributes vis "impl" qualified_uident "for" type_ { +// 269| ImplSig::{type_params : @list.empty(), trait_name : $4, type_ : $6, attrs : $1} +// 270| } fn yy_action_54(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { let _sub_action_0_result = yy_action_14(_last_pos, _args[0:0]) let _sub_action_1_result = yy_action_40(_last_pos, _args[0:2]) @@ -1170,9 +1176,9 @@ fn yy_action_54(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Po } // file:///./mbti_parser.mbty -// 265| attributes vis "trait" uident loption(preceded(":", separated_nonempty_list("+", qualified_uident))) trait_body { -// 266| TraitSig::{ attrs : $1, vis: $2, name: $4, super_traits: $5, methods: $6} -// 267| } +// 274| attributes vis "trait" uident loption(preceded(":", separated_nonempty_list("+", qualified_uident))) trait_body { +// 275| TraitSig::{ attrs : $1, vis: $2, name: $4, super_traits: $5, methods: $6} +// 276| } fn yy_action_55(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { let _sub_action_0_result = yy_action_14(_last_pos, _args[0:0]) let _sub_action_1_result = yy_action_40(_last_pos, _args[0:2]) @@ -1187,9 +1193,9 @@ fn yy_action_55(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Po } // file:///./mbti_parser.mbty -// 284| attributes vis "fnalias" uident "::" lident { -// 285| FuncAlias(attrs = $1,name=$6, type_name=$4) -// 286| } +// 293| attributes vis "fnalias" uident "::" lident { +// 294| FuncAlias(attrs = $1,name=$6, type_name=$4) +// 295| } fn yy_action_56(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { let _sub_action_0_result = yy_action_14(_last_pos, _args[0:0]) let _sub_action_1_result = yy_action_40(_last_pos, _args[0:2]) @@ -1202,10 +1208,10 @@ fn yy_action_56(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Po } // file:///./mbti_parser.mbty -// 287| attributes vis "using" PACKAGE_NAME "{" "type" uident using_binder "}" { -// 288| let pkg = Name::{ name : $4, loc : mk_loc($loc($4)) } -// 289| Using(pkg~, target = $7, name = $8, kind = Type, attrs = $1) -// 290| } +// 296| attributes vis "using" PACKAGE_NAME "{" "type" uident using_binder "}" { +// 297| let pkg = Name::{ name : $4, loc : mk_loc($loc($4)) } +// 298| Using(pkg~, target = $7, name = $8, kind = Type, attrs = $1) +// 299| } fn yy_action_57(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { let _sub_action_0_result = yy_action_14(_last_pos, _args[0:0]) let _sub_action_1_result = yy_action_40(_last_pos, _args[0:2]) @@ -1222,10 +1228,10 @@ fn yy_action_57(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Po } // file:///./mbti_parser.mbty -// 291| attributes vis "using" PACKAGE_NAME "{" "trait" uident using_binder "}" { -// 292| let pkg = Name::{ name : $4, loc : mk_loc($loc($4)) } -// 293| Using(pkg~, target = $7, name = $8, kind = Trait, attrs = $1) -// 294| } +// 300| attributes vis "using" PACKAGE_NAME "{" "trait" uident using_binder "}" { +// 301| let pkg = Name::{ name : $4, loc : mk_loc($loc($4)) } +// 302| Using(pkg~, target = $7, name = $8, kind = Trait, attrs = $1) +// 303| } fn yy_action_58(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { let _sub_action_0_result = yy_action_14(_last_pos, _args[0:0]) let _sub_action_1_result = yy_action_40(_last_pos, _args[0:2]) @@ -1242,7 +1248,7 @@ fn yy_action_58(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Po } // file:///./mbti_parser.mbty -// 173| attributes vis "const" uident ":" type_ "=" constant { ConstSig::{name: $4, type_: $6, value: $8, attrs: $1} } +// 179| attributes vis "const" uident ":" type_ "=" constant { ConstSig::{name: $4, type_: $6, value: $8, attrs: $1} } fn yy_action_59(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { let _sub_action_0_result = yy_action_60(_last_pos, _args[0:1]) let _sub_action_1_result = yy_action_15(_args[0].2, _args[1:1]) @@ -1254,7 +1260,7 @@ fn yy_action_59(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Po } // file:///./mbti_parser.mbty -// 173| attributes vis "const" uident ":" type_ "=" constant { ConstSig::{name: $4, type_: $6, value: $8, attrs: $1} } +// 179| attributes vis "const" uident ":" type_ "=" constant { ConstSig::{name: $4, type_: $6, value: $8, attrs: $1} } fn yy_action_61(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { let _sub_action_0_result = yy_action_60(_last_pos, _args[0:1]) let _sub_action_1_result = yy_action_17(_args[0].2, _args[1:2]) @@ -1266,7 +1272,7 @@ fn yy_action_61(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Po } // file:///./mbti_parser.mbty -// 177| attributes vis "let" lident ":" type_ { ValueSig::{ attrs: $1, name: $4, type_: $6 } } +// 183| attributes vis "let" lident ":" type_ { ValueSig::{ attrs: $1, name: $4, type_: $6 } } fn yy_action_62(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { let _sub_action_0_result = yy_action_60(_last_pos, _args[0:1]) let _sub_action_1_result = yy_action_17(_args[0].2, _args[1:2]) @@ -1277,10 +1283,10 @@ fn yy_action_62(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Po } // file:///./mbti_parser.mbty -// 206| attributes vis is_async FN loption(type_params_with_constraints) func_name delimited("(", separated_list(",", parameter), ")") "->" return_type { -// 207| let (type_name, name) = $6 -// 208| FuncSig::{ attrs: $1, is_async : $3, type_name, name, type_params: $5, params: $7, return_: $9} -// 209| } +// 212| attributes vis is_async FN loption(type_params_with_constraints) func_name delimited("(", separated_list(",", parameter), ")") "->" return_type { +// 213| let (type_name, name) = $6 +// 214| FuncSig::{ attrs: $1, is_async : $3, type_name, name, type_params: $5, params: $7, return_: $9} +// 215| } fn yy_action_63(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { let _sub_action_0_result = yy_action_60(_last_pos, _args[0:1]) let _sub_action_1_result = yy_action_17(_args[0].2, _args[1:2]) @@ -1299,10 +1305,10 @@ fn yy_action_63(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Po } // file:///./mbti_parser.mbty -// 206| attributes vis is_async FN loption(type_params_with_constraints) func_name delimited("(", separated_list(",", parameter), ")") "->" return_type { -// 207| let (type_name, name) = $6 -// 208| FuncSig::{ attrs: $1, is_async : $3, type_name, name, type_params: $5, params: $7, return_: $9} -// 209| } +// 212| attributes vis is_async FN loption(type_params_with_constraints) func_name delimited("(", separated_list(",", parameter), ")") "->" return_type { +// 213| let (type_name, name) = $6 +// 214| FuncSig::{ attrs: $1, is_async : $3, type_name, name, type_params: $5, params: $7, return_: $9} +// 215| } fn yy_action_64(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { let _sub_action_0_result = yy_action_60(_last_pos, _args[0:1]) let _sub_action_1_result = yy_action_17(_args[0].2, _args[1:2]) @@ -1321,9 +1327,9 @@ fn yy_action_64(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Po } // file:///./mbti_parser.mbty -// 223| attributes vis "type" type_decl_name_with_params optional_derive { -// 224| TypeSig::{attrs : $1, vis: $2, name: $4.0, type_params: $4.1, components: Abstract, derives: $5} -// 225| } +// 232| attributes vis "type" type_decl_name_with_params optional_derive { +// 233| TypeSig::{attrs : $1, vis: $2, name: $4.0, type_params: $4.1, components: Abstract, derives: $5} +// 234| } fn yy_action_65(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { let _sub_action_0_result = yy_action_60(_last_pos, _args[0:1]) let _sub_action_1_result = yy_action_17(_args[0].2, _args[1:2]) @@ -1337,9 +1343,9 @@ fn yy_action_65(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Po } // file:///./mbti_parser.mbty -// 281| attributes vis "type" type_decl_name_with_params "=" type_ { -// 282| TypeAlias(attrs = $1, vis=$2, name=$4.0, type_params=$4.1, type_=$6) -// 283| } +// 290| attributes vis "type" type_decl_name_with_params "=" type_ { +// 291| TypeAlias(attrs = $1, vis=$2, name=$4.0, type_params=$4.1, type_=$6) +// 292| } fn yy_action_66(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { let _sub_action_0_result = yy_action_60(_last_pos, _args[0:1]) let _sub_action_1_result = yy_action_17(_args[0].2, _args[1:2]) @@ -1353,9 +1359,9 @@ fn yy_action_66(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Po } // file:///./mbti_parser.mbty -// 226| attributes vis "suberror" uident optional_derive { -// 227| TypeSig::{attrs : $1, vis: $2, name: $4, type_params: @list.empty(), components: Error(NoPayload), derives: $5} -// 228| } +// 235| attributes vis "suberror" uident optional_derive { +// 236| TypeSig::{attrs : $1, vis: $2, name: $4, type_params: @list.empty(), components: Error(NoPayload), derives: $5} +// 237| } fn yy_action_67(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { let _sub_action_0_result = yy_action_60(_last_pos, _args[0:1]) let _sub_action_1_result = yy_action_17(_args[0].2, _args[1:2]) @@ -1369,9 +1375,9 @@ fn yy_action_67(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Po } // file:///./mbti_parser.mbty -// 229| attributes vis "suberror" uident "{" separated_list(";", enum_constructor) "}" optional_derive { -// 230| TypeSig::{attrs : $1, vis: $2, name: $4, type_params: @list.empty(), components: Error(EnumPayload($6)), derives: $8} -// 231| } +// 238| attributes vis "suberror" uident "{" separated_list(";", enum_constructor) "}" optional_derive { +// 239| TypeSig::{attrs : $1, vis: $2, name: $4, type_params: @list.empty(), components: Error(EnumPayload($6)), derives: $8} +// 240| } fn yy_action_68(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { let _sub_action_0_result = yy_action_60(_last_pos, _args[0:1]) let _sub_action_1_result = yy_action_17(_args[0].2, _args[1:2]) @@ -1386,9 +1392,9 @@ fn yy_action_68(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Po } // file:///./mbti_parser.mbty -// 232| attributes vis "struct" type_decl_name_with_params "{" record_decl_body "}" optional_derive { -// 233| TypeSig::{attrs : $1, vis: $2, name: $4.0, type_params: $4.1, components: $6, derives: $8 } -// 234| } +// 241| attributes vis "struct" type_decl_name_with_params "{" record_decl_body "}" optional_derive { +// 242| TypeSig::{attrs : $1, vis: $2, name: $4.0, type_params: $4.1, components: $6, derives: $8 } +// 243| } fn yy_action_69(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { let _sub_action_0_result = yy_action_60(_last_pos, _args[0:1]) let _sub_action_1_result = yy_action_17(_args[0].2, _args[1:2]) @@ -1403,9 +1409,9 @@ fn yy_action_69(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Po } // file:///./mbti_parser.mbty -// 235| attributes vis "struct" type_decl_name_with_params "(" separated_list(",", type_) ")" optional_derive { -// 236| TypeSig::{attrs : $1, vis: $2, name: $4.0, type_params: $4.1, components: TupleStruct($6), derives: $8} -// 237| } +// 244| attributes vis "struct" type_decl_name_with_params "(" separated_list(",", type_) ")" optional_derive { +// 245| TypeSig::{attrs : $1, vis: $2, name: $4.0, type_params: $4.1, components: TupleStruct($6), derives: $8} +// 246| } fn yy_action_70(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { let _sub_action_0_result = yy_action_60(_last_pos, _args[0:1]) let _sub_action_1_result = yy_action_17(_args[0].2, _args[1:2]) @@ -1420,9 +1426,9 @@ fn yy_action_70(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Po } // file:///./mbti_parser.mbty -// 238| attributes vis "enum" type_decl_name_with_params "{" separated_list(";", enum_constructor) "}" optional_derive { -// 239| TypeSig::{attrs : $1, vis: $2, name: $4.0, type_params: $4.1, components: Variant($6), derives: $8} -// 240| } +// 247| attributes vis "enum" type_decl_name_with_params "{" separated_list(";", enum_constructor) "}" optional_derive { +// 248| TypeSig::{attrs : $1, vis: $2, name: $4.0, type_params: $4.1, components: Variant($6), derives: $8} +// 249| } fn yy_action_71(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { let _sub_action_0_result = yy_action_60(_last_pos, _args[0:1]) let _sub_action_1_result = yy_action_17(_args[0].2, _args[1:2]) @@ -1437,9 +1443,9 @@ fn yy_action_71(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Po } // file:///./mbti_parser.mbty -// 241| attributes vis "extenum" type_decl_name_with_params "{" separated_list(";", enum_constructor) "}" optional_derive { -// 242| TypeSig::{attrs : $1, vis: $2, name: $4.0, type_params: $4.1, components: ExtensibleEnum($6), derives: $8} -// 243| } +// 250| attributes vis "extenum" type_decl_name_with_params "{" separated_list(";", enum_constructor) "}" optional_derive { +// 251| TypeSig::{attrs : $1, vis: $2, name: $4.0, type_params: $4.1, components: ExtensibleEnum($6), derives: $8} +// 252| } fn yy_action_72(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { let _sub_action_0_result = yy_action_60(_last_pos, _args[0:1]) let _sub_action_1_result = yy_action_17(_args[0].2, _args[1:2]) @@ -1454,10 +1460,10 @@ fn yy_action_72(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Po } // file:///./mbti_parser.mbty -// 244| attributes vis "extenum" extensible_enum_extension_target "+=" "{" separated_list(";", enum_constructor) "}" optional_derive { -// 245| let (name, type_params, target) = $4 -// 246| TypeSig::{attrs : $1, vis: $2, name, type_params, components: ExtendEnum(target~, constructors = $7), derives: $9} -// 247| } +// 253| attributes vis "extenum" extensible_enum_extension_target "+=" "{" separated_list(";", enum_constructor) "}" optional_derive { +// 254| let (name, type_params, target) = $4 +// 255| TypeSig::{attrs : $1, vis: $2, name, type_params, components: ExtendEnum(target~, constructors = $7), derives: $9} +// 256| } fn yy_action_73(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { let _sub_action_0_result = yy_action_60(_last_pos, _args[0:1]) let _sub_action_1_result = yy_action_17(_args[0].2, _args[1:2]) @@ -1473,9 +1479,9 @@ fn yy_action_73(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Po } // file:///./mbti_parser.mbty -// 256| attributes vis "impl" type_params_with_constraints qualified_uident "for" type_ { -// 257| ImplSig::{type_params : $4, trait_name : $5, type_ : $7, attrs : $1} -// 258| } +// 265| attributes vis "impl" type_params_with_constraints qualified_uident "for" type_ { +// 266| ImplSig::{type_params : $4, trait_name : $5, type_ : $7, attrs : $1} +// 267| } fn yy_action_74(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { let _sub_action_0_result = yy_action_60(_last_pos, _args[0:1]) let _sub_action_1_result = yy_action_17(_args[0].2, _args[1:2]) @@ -1489,9 +1495,9 @@ fn yy_action_74(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Po } // file:///./mbti_parser.mbty -// 259| attributes vis "impl" qualified_uident "for" type_ { -// 260| ImplSig::{type_params : @list.empty(), trait_name : $4, type_ : $6, attrs : $1} -// 261| } +// 268| attributes vis "impl" qualified_uident "for" type_ { +// 269| ImplSig::{type_params : @list.empty(), trait_name : $4, type_ : $6, attrs : $1} +// 270| } fn yy_action_75(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { let _sub_action_0_result = yy_action_60(_last_pos, _args[0:1]) let _sub_action_1_result = yy_action_17(_args[0].2, _args[1:2]) @@ -1504,9 +1510,9 @@ fn yy_action_75(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Po } // file:///./mbti_parser.mbty -// 265| attributes vis "trait" uident loption(preceded(":", separated_nonempty_list("+", qualified_uident))) trait_body { -// 266| TraitSig::{ attrs : $1, vis: $2, name: $4, super_traits: $5, methods: $6} -// 267| } +// 274| attributes vis "trait" uident loption(preceded(":", separated_nonempty_list("+", qualified_uident))) trait_body { +// 275| TraitSig::{ attrs : $1, vis: $2, name: $4, super_traits: $5, methods: $6} +// 276| } fn yy_action_76(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { let _sub_action_0_result = yy_action_60(_last_pos, _args[0:1]) let _sub_action_1_result = yy_action_17(_args[0].2, _args[1:2]) @@ -1521,9 +1527,9 @@ fn yy_action_76(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Po } // file:///./mbti_parser.mbty -// 284| attributes vis "fnalias" uident "::" lident { -// 285| FuncAlias(attrs = $1,name=$6, type_name=$4) -// 286| } +// 293| attributes vis "fnalias" uident "::" lident { +// 294| FuncAlias(attrs = $1,name=$6, type_name=$4) +// 295| } fn yy_action_77(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { let _sub_action_0_result = yy_action_60(_last_pos, _args[0:1]) let _sub_action_1_result = yy_action_17(_args[0].2, _args[1:2]) @@ -1536,10 +1542,10 @@ fn yy_action_77(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Po } // file:///./mbti_parser.mbty -// 287| attributes vis "using" PACKAGE_NAME "{" "type" uident using_binder "}" { -// 288| let pkg = Name::{ name : $4, loc : mk_loc($loc($4)) } -// 289| Using(pkg~, target = $7, name = $8, kind = Type, attrs = $1) -// 290| } +// 296| attributes vis "using" PACKAGE_NAME "{" "type" uident using_binder "}" { +// 297| let pkg = Name::{ name : $4, loc : mk_loc($loc($4)) } +// 298| Using(pkg~, target = $7, name = $8, kind = Type, attrs = $1) +// 299| } fn yy_action_78(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { let _sub_action_0_result = yy_action_60(_last_pos, _args[0:1]) let _sub_action_1_result = yy_action_17(_args[0].2, _args[1:2]) @@ -1556,10 +1562,10 @@ fn yy_action_78(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Po } // file:///./mbti_parser.mbty -// 291| attributes vis "using" PACKAGE_NAME "{" "trait" uident using_binder "}" { -// 292| let pkg = Name::{ name : $4, loc : mk_loc($loc($4)) } -// 293| Using(pkg~, target = $7, name = $8, kind = Trait, attrs = $1) -// 294| } +// 300| attributes vis "using" PACKAGE_NAME "{" "trait" uident using_binder "}" { +// 301| let pkg = Name::{ name : $4, loc : mk_loc($loc($4)) } +// 302| Using(pkg~, target = $7, name = $8, kind = Trait, attrs = $1) +// 303| } fn yy_action_79(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { let _sub_action_0_result = yy_action_60(_last_pos, _args[0:1]) let _sub_action_1_result = yy_action_17(_args[0].2, _args[1:2]) @@ -1576,7 +1582,7 @@ fn yy_action_79(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Po } // file:///./mbti_parser.mbty -// 426| "priv" { Priv(loc=mk_loc($sloc)) } +// 435| "priv" { Priv(loc=mk_loc($sloc)) } fn yy_action_17(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } @@ -1584,7 +1590,7 @@ fn yy_action_17(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Po } // file:///./mbti_parser.mbty -// 173| attributes vis "const" uident ":" type_ "=" constant { ConstSig::{name: $4, type_: $6, value: $8, attrs: $1} } +// 179| attributes vis "const" uident ":" type_ "=" constant { ConstSig::{name: $4, type_: $6, value: $8, attrs: $1} } fn yy_action_80(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { let _sub_action_0_result = yy_action_60(_last_pos, _args[0:1]) let _sub_action_1_result = yy_action_40(_args[0].2, _args[1:3]) @@ -1596,89 +1602,89 @@ fn yy_action_80(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Po } // file:///./mbti_parser.mbty -// 410| TRUE { Bool(true) } +// 419| TRUE { Bool(true) } fn yy_action_81(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { YYObj_Constant({(); Bool(true) }) } // file:///./mbti_parser.mbty -// 411| FALSE { Bool(false) } +// 420| FALSE { Bool(false) } fn yy_action_82(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { YYObj_Constant({(); Bool(false) }) } // file:///./mbti_parser.mbty -// 412| BYTE { Byte($1) } +// 421| BYTE { Byte($1) } fn yy_action_83(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { guard _args[0].0 is YYObj_CharLiteral(_dollar1) YYObj_Constant({(); Byte(_dollar1) }) } // file:///./mbti_parser.mbty -// 413| BYTES { Bytes($1) } +// 422| BYTES { Bytes($1) } fn yy_action_84(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { guard _args[0].0 is YYObj_StringLiteral(_dollar1) YYObj_Constant({(); Bytes(_dollar1) }) } // file:///./mbti_parser.mbty -// 414| CHAR { Char($1) } +// 423| CHAR { Char($1) } fn yy_action_85(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { guard _args[0].0 is YYObj_CharLiteral(_dollar1) YYObj_Constant({(); Char(_dollar1) }) } // file:///./mbti_parser.mbty -// 415| INT { make_int_literal($1) } +// 424| INT { make_int_literal($1) } fn yy_action_86(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { guard _args[0].0 is YYObj_String(_dollar1) YYObj_Constant({(); make_int_literal(_dollar1) }) } // file:///./mbti_parser.mbty -// 416| "-" INT { make_int_literal("-" + $2) } +// 425| "-" INT { make_int_literal("-" + $2) } fn yy_action_87(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { guard _args[1].0 is YYObj_String(_dollar2) YYObj_Constant({(); make_int_literal("-" + _dollar2) }) } // file:///./mbti_parser.mbty -// 418| "-" FLOAT { make_float_literal("-" + $2) } +// 427| "-" FLOAT { make_float_literal("-" + $2) } fn yy_action_88(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { guard _args[1].0 is YYObj_String(_dollar2) YYObj_Constant({(); make_float_literal("-" + _dollar2) }) } // file:///./mbti_parser.mbty -// 420| "-" DOUBLE { Double("-" + $2) } +// 429| "-" DOUBLE { Double("-" + $2) } fn yy_action_89(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { guard _args[1].0 is YYObj_String(_dollar2) YYObj_Constant({(); Double("-" + _dollar2) }) } // file:///./mbti_parser.mbty -// 417| FLOAT { make_float_literal($1) } +// 426| FLOAT { make_float_literal($1) } fn yy_action_90(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { guard _args[0].0 is YYObj_String(_dollar1) YYObj_Constant({(); make_float_literal(_dollar1) }) } // file:///./mbti_parser.mbty -// 419| DOUBLE { Double($1) } +// 428| DOUBLE { Double($1) } fn yy_action_91(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { guard _args[0].0 is YYObj_String(_dollar1) YYObj_Constant({(); Double(_dollar1) }) } // file:///./mbti_parser.mbty -// 421| STRING { String($1) } +// 430| STRING { String($1) } fn yy_action_92(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { guard _args[0].0 is YYObj_StringLiteral(_dollar1) YYObj_Constant({(); String(_dollar1) }) } // file:///./mbti_parser.mbty -// 177| attributes vis "let" lident ":" type_ { ValueSig::{ attrs: $1, name: $4, type_: $6 } } +// 183| attributes vis "let" lident ":" type_ { ValueSig::{ attrs: $1, name: $4, type_: $6 } } fn yy_action_93(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { let _sub_action_0_result = yy_action_60(_last_pos, _args[0:1]) let _sub_action_1_result = yy_action_40(_args[0].2, _args[1:3]) @@ -1689,10 +1695,10 @@ fn yy_action_93(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Po } // file:///./mbti_parser.mbty -// 206| attributes vis is_async FN loption(type_params_with_constraints) func_name delimited("(", separated_list(",", parameter), ")") "->" return_type { -// 207| let (type_name, name) = $6 -// 208| FuncSig::{ attrs: $1, is_async : $3, type_name, name, type_params: $5, params: $7, return_: $9} -// 209| } +// 212| attributes vis is_async FN loption(type_params_with_constraints) func_name delimited("(", separated_list(",", parameter), ")") "->" return_type { +// 213| let (type_name, name) = $6 +// 214| FuncSig::{ attrs: $1, is_async : $3, type_name, name, type_params: $5, params: $7, return_: $9} +// 215| } fn yy_action_94(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { let _sub_action_0_result = yy_action_60(_last_pos, _args[0:1]) let _sub_action_1_result = yy_action_40(_args[0].2, _args[1:3]) @@ -1711,10 +1717,10 @@ fn yy_action_94(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Po } // file:///./mbti_parser.mbty -// 206| attributes vis is_async FN loption(type_params_with_constraints) func_name delimited("(", separated_list(",", parameter), ")") "->" return_type { -// 207| let (type_name, name) = $6 -// 208| FuncSig::{ attrs: $1, is_async : $3, type_name, name, type_params: $5, params: $7, return_: $9} -// 209| } +// 212| attributes vis is_async FN loption(type_params_with_constraints) func_name delimited("(", separated_list(",", parameter), ")") "->" return_type { +// 213| let (type_name, name) = $6 +// 214| FuncSig::{ attrs: $1, is_async : $3, type_name, name, type_params: $5, params: $7, return_: $9} +// 215| } fn yy_action_95(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { let _sub_action_0_result = yy_action_60(_last_pos, _args[0:1]) let _sub_action_1_result = yy_action_40(_args[0].2, _args[1:3]) @@ -1733,9 +1739,9 @@ fn yy_action_95(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Po } // file:///./mbti_parser.mbty -// 223| attributes vis "type" type_decl_name_with_params optional_derive { -// 224| TypeSig::{attrs : $1, vis: $2, name: $4.0, type_params: $4.1, components: Abstract, derives: $5} -// 225| } +// 232| attributes vis "type" type_decl_name_with_params optional_derive { +// 233| TypeSig::{attrs : $1, vis: $2, name: $4.0, type_params: $4.1, components: Abstract, derives: $5} +// 234| } fn yy_action_96(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { let _sub_action_0_result = yy_action_60(_last_pos, _args[0:1]) let _sub_action_1_result = yy_action_40(_args[0].2, _args[1:3]) @@ -1749,9 +1755,9 @@ fn yy_action_96(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Po } // file:///./mbti_parser.mbty -// 281| attributes vis "type" type_decl_name_with_params "=" type_ { -// 282| TypeAlias(attrs = $1, vis=$2, name=$4.0, type_params=$4.1, type_=$6) -// 283| } +// 290| attributes vis "type" type_decl_name_with_params "=" type_ { +// 291| TypeAlias(attrs = $1, vis=$2, name=$4.0, type_params=$4.1, type_=$6) +// 292| } fn yy_action_97(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { let _sub_action_0_result = yy_action_60(_last_pos, _args[0:1]) let _sub_action_1_result = yy_action_40(_args[0].2, _args[1:3]) @@ -1765,9 +1771,9 @@ fn yy_action_97(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Po } // file:///./mbti_parser.mbty -// 226| attributes vis "suberror" uident optional_derive { -// 227| TypeSig::{attrs : $1, vis: $2, name: $4, type_params: @list.empty(), components: Error(NoPayload), derives: $5} -// 228| } +// 235| attributes vis "suberror" uident optional_derive { +// 236| TypeSig::{attrs : $1, vis: $2, name: $4, type_params: @list.empty(), components: Error(NoPayload), derives: $5} +// 237| } fn yy_action_98(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { let _sub_action_0_result = yy_action_60(_last_pos, _args[0:1]) let _sub_action_1_result = yy_action_40(_args[0].2, _args[1:3]) @@ -1781,9 +1787,9 @@ fn yy_action_98(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Po } // file:///./mbti_parser.mbty -// 229| attributes vis "suberror" uident "{" separated_list(";", enum_constructor) "}" optional_derive { -// 230| TypeSig::{attrs : $1, vis: $2, name: $4, type_params: @list.empty(), components: Error(EnumPayload($6)), derives: $8} -// 231| } +// 238| attributes vis "suberror" uident "{" separated_list(";", enum_constructor) "}" optional_derive { +// 239| TypeSig::{attrs : $1, vis: $2, name: $4, type_params: @list.empty(), components: Error(EnumPayload($6)), derives: $8} +// 240| } fn yy_action_99(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { let _sub_action_0_result = yy_action_60(_last_pos, _args[0:1]) let _sub_action_1_result = yy_action_40(_args[0].2, _args[1:3]) @@ -1798,9 +1804,9 @@ fn yy_action_99(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Po } // file:///./mbti_parser.mbty -// 232| attributes vis "struct" type_decl_name_with_params "{" record_decl_body "}" optional_derive { -// 233| TypeSig::{attrs : $1, vis: $2, name: $4.0, type_params: $4.1, components: $6, derives: $8 } -// 234| } +// 241| attributes vis "struct" type_decl_name_with_params "{" record_decl_body "}" optional_derive { +// 242| TypeSig::{attrs : $1, vis: $2, name: $4.0, type_params: $4.1, components: $6, derives: $8 } +// 243| } fn yy_action_100(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { let _sub_action_0_result = yy_action_60(_last_pos, _args[0:1]) let _sub_action_1_result = yy_action_40(_args[0].2, _args[1:3]) @@ -1815,9 +1821,9 @@ fn yy_action_100(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.P } // file:///./mbti_parser.mbty -// 235| attributes vis "struct" type_decl_name_with_params "(" separated_list(",", type_) ")" optional_derive { -// 236| TypeSig::{attrs : $1, vis: $2, name: $4.0, type_params: $4.1, components: TupleStruct($6), derives: $8} -// 237| } +// 244| attributes vis "struct" type_decl_name_with_params "(" separated_list(",", type_) ")" optional_derive { +// 245| TypeSig::{attrs : $1, vis: $2, name: $4.0, type_params: $4.1, components: TupleStruct($6), derives: $8} +// 246| } fn yy_action_101(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { let _sub_action_0_result = yy_action_60(_last_pos, _args[0:1]) let _sub_action_1_result = yy_action_40(_args[0].2, _args[1:3]) @@ -1832,9 +1838,9 @@ fn yy_action_101(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.P } // file:///./mbti_parser.mbty -// 238| attributes vis "enum" type_decl_name_with_params "{" separated_list(";", enum_constructor) "}" optional_derive { -// 239| TypeSig::{attrs : $1, vis: $2, name: $4.0, type_params: $4.1, components: Variant($6), derives: $8} -// 240| } +// 247| attributes vis "enum" type_decl_name_with_params "{" separated_list(";", enum_constructor) "}" optional_derive { +// 248| TypeSig::{attrs : $1, vis: $2, name: $4.0, type_params: $4.1, components: Variant($6), derives: $8} +// 249| } fn yy_action_102(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { let _sub_action_0_result = yy_action_60(_last_pos, _args[0:1]) let _sub_action_1_result = yy_action_40(_args[0].2, _args[1:3]) @@ -1849,9 +1855,9 @@ fn yy_action_102(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.P } // file:///./mbti_parser.mbty -// 241| attributes vis "extenum" type_decl_name_with_params "{" separated_list(";", enum_constructor) "}" optional_derive { -// 242| TypeSig::{attrs : $1, vis: $2, name: $4.0, type_params: $4.1, components: ExtensibleEnum($6), derives: $8} -// 243| } +// 250| attributes vis "extenum" type_decl_name_with_params "{" separated_list(";", enum_constructor) "}" optional_derive { +// 251| TypeSig::{attrs : $1, vis: $2, name: $4.0, type_params: $4.1, components: ExtensibleEnum($6), derives: $8} +// 252| } fn yy_action_103(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { let _sub_action_0_result = yy_action_60(_last_pos, _args[0:1]) let _sub_action_1_result = yy_action_40(_args[0].2, _args[1:3]) @@ -1866,10 +1872,10 @@ fn yy_action_103(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.P } // file:///./mbti_parser.mbty -// 244| attributes vis "extenum" extensible_enum_extension_target "+=" "{" separated_list(";", enum_constructor) "}" optional_derive { -// 245| let (name, type_params, target) = $4 -// 246| TypeSig::{attrs : $1, vis: $2, name, type_params, components: ExtendEnum(target~, constructors = $7), derives: $9} -// 247| } +// 253| attributes vis "extenum" extensible_enum_extension_target "+=" "{" separated_list(";", enum_constructor) "}" optional_derive { +// 254| let (name, type_params, target) = $4 +// 255| TypeSig::{attrs : $1, vis: $2, name, type_params, components: ExtendEnum(target~, constructors = $7), derives: $9} +// 256| } fn yy_action_104(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { let _sub_action_0_result = yy_action_60(_last_pos, _args[0:1]) let _sub_action_1_result = yy_action_40(_args[0].2, _args[1:3]) @@ -1885,9 +1891,9 @@ fn yy_action_104(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.P } // file:///./mbti_parser.mbty -// 256| attributes vis "impl" type_params_with_constraints qualified_uident "for" type_ { -// 257| ImplSig::{type_params : $4, trait_name : $5, type_ : $7, attrs : $1} -// 258| } +// 265| attributes vis "impl" type_params_with_constraints qualified_uident "for" type_ { +// 266| ImplSig::{type_params : $4, trait_name : $5, type_ : $7, attrs : $1} +// 267| } fn yy_action_105(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { let _sub_action_0_result = yy_action_60(_last_pos, _args[0:1]) let _sub_action_1_result = yy_action_40(_args[0].2, _args[1:3]) @@ -1901,9 +1907,9 @@ fn yy_action_105(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.P } // file:///./mbti_parser.mbty -// 259| attributes vis "impl" qualified_uident "for" type_ { -// 260| ImplSig::{type_params : @list.empty(), trait_name : $4, type_ : $6, attrs : $1} -// 261| } +// 268| attributes vis "impl" qualified_uident "for" type_ { +// 269| ImplSig::{type_params : @list.empty(), trait_name : $4, type_ : $6, attrs : $1} +// 270| } fn yy_action_106(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { let _sub_action_0_result = yy_action_60(_last_pos, _args[0:1]) let _sub_action_1_result = yy_action_40(_args[0].2, _args[1:3]) @@ -1916,9 +1922,9 @@ fn yy_action_106(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.P } // file:///./mbti_parser.mbty -// 265| attributes vis "trait" uident loption(preceded(":", separated_nonempty_list("+", qualified_uident))) trait_body { -// 266| TraitSig::{ attrs : $1, vis: $2, name: $4, super_traits: $5, methods: $6} -// 267| } +// 274| attributes vis "trait" uident loption(preceded(":", separated_nonempty_list("+", qualified_uident))) trait_body { +// 275| TraitSig::{ attrs : $1, vis: $2, name: $4, super_traits: $5, methods: $6} +// 276| } fn yy_action_107(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { let _sub_action_0_result = yy_action_60(_last_pos, _args[0:1]) let _sub_action_1_result = yy_action_40(_args[0].2, _args[1:3]) @@ -1933,9 +1939,9 @@ fn yy_action_107(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.P } // file:///./mbti_parser.mbty -// 284| attributes vis "fnalias" uident "::" lident { -// 285| FuncAlias(attrs = $1,name=$6, type_name=$4) -// 286| } +// 293| attributes vis "fnalias" uident "::" lident { +// 294| FuncAlias(attrs = $1,name=$6, type_name=$4) +// 295| } fn yy_action_108(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { let _sub_action_0_result = yy_action_60(_last_pos, _args[0:1]) let _sub_action_1_result = yy_action_40(_args[0].2, _args[1:3]) @@ -1948,10 +1954,10 @@ fn yy_action_108(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.P } // file:///./mbti_parser.mbty -// 287| attributes vis "using" PACKAGE_NAME "{" "type" uident using_binder "}" { -// 288| let pkg = Name::{ name : $4, loc : mk_loc($loc($4)) } -// 289| Using(pkg~, target = $7, name = $8, kind = Type, attrs = $1) -// 290| } +// 296| attributes vis "using" PACKAGE_NAME "{" "type" uident using_binder "}" { +// 297| let pkg = Name::{ name : $4, loc : mk_loc($loc($4)) } +// 298| Using(pkg~, target = $7, name = $8, kind = Type, attrs = $1) +// 299| } fn yy_action_109(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { let _sub_action_0_result = yy_action_60(_last_pos, _args[0:1]) let _sub_action_1_result = yy_action_40(_args[0].2, _args[1:3]) @@ -1968,10 +1974,10 @@ fn yy_action_109(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.P } // file:///./mbti_parser.mbty -// 291| attributes vis "using" PACKAGE_NAME "{" "trait" uident using_binder "}" { -// 292| let pkg = Name::{ name : $4, loc : mk_loc($loc($4)) } -// 293| Using(pkg~, target = $7, name = $8, kind = Trait, attrs = $1) -// 294| } +// 300| attributes vis "using" PACKAGE_NAME "{" "trait" uident using_binder "}" { +// 301| let pkg = Name::{ name : $4, loc : mk_loc($loc($4)) } +// 302| Using(pkg~, target = $7, name = $8, kind = Trait, attrs = $1) +// 303| } fn yy_action_110(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { let _sub_action_0_result = yy_action_60(_last_pos, _args[0:1]) let _sub_action_1_result = yy_action_40(_args[0].2, _args[1:3]) @@ -1988,7 +1994,7 @@ fn yy_action_110(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.P } // file:///./mbti_parser.mbty -// 427| "pub" pub_attr { Pub(attr=$2, loc=mk_loc($sloc)) } +// 436| "pub" pub_attr { Pub(attr=$2, loc=mk_loc($sloc)) } fn yy_action_40(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { guard _args[1].0 is YYObj_String_(_dollar2) let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) @@ -1997,26 +2003,26 @@ fn yy_action_40(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Po } // file:///./mbti_parser.mbty -// 432| "(" "readonly" ")" { Some("readonly") } +// 441| "(" "readonly" ")" { Some("readonly") } fn yy_action_111(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { YYObj_String_({(); Some("readonly") }) } // file:///./mbti_parser.mbty -// 433| "(" LIDENT ")" { Some($2) } +// 442| "(" lident ")" { Some($2.name) } fn yy_action_112(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { - guard _args[1].0 is YYObj_String(_dollar2) - YYObj_String_({(); Some(_dollar2) }) + guard _args[1].0 is YYObj_Name(_dollar2) + YYObj_String_({(); Some(_dollar2.name) }) } // file:///./mbti_parser.mbty -// 431| { None } +// 440| { None } fn yy_action_113(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { YYObj_String_({(); None }) } // file:///./mbti_parser.mbty -// 177| attributes vis "let" lident ":" type_ { ValueSig::{ attrs: $1, name: $4, type_: $6 } } +// 183| attributes vis "let" lident ":" type_ { ValueSig::{ attrs: $1, name: $4, type_: $6 } } fn yy_action_114(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { let _sub_action_0_result = yy_action_60(_last_pos, _args[0:1]) let _sub_action_1_result = yy_action_15(_args[0].2, _args[1:1]) @@ -2027,10 +2033,10 @@ fn yy_action_114(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.P } // file:///./mbti_parser.mbty -// 206| attributes vis is_async FN loption(type_params_with_constraints) func_name delimited("(", separated_list(",", parameter), ")") "->" return_type { -// 207| let (type_name, name) = $6 -// 208| FuncSig::{ attrs: $1, is_async : $3, type_name, name, type_params: $5, params: $7, return_: $9} -// 209| } +// 212| attributes vis is_async FN loption(type_params_with_constraints) func_name delimited("(", separated_list(",", parameter), ")") "->" return_type { +// 213| let (type_name, name) = $6 +// 214| FuncSig::{ attrs: $1, is_async : $3, type_name, name, type_params: $5, params: $7, return_: $9} +// 215| } fn yy_action_115(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { let _sub_action_0_result = yy_action_60(_last_pos, _args[0:1]) let _sub_action_1_result = yy_action_15(_args[0].2, _args[1:1]) @@ -2049,10 +2055,10 @@ fn yy_action_115(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.P } // file:///./mbti_parser.mbty -// 206| attributes vis is_async FN loption(type_params_with_constraints) func_name delimited("(", separated_list(",", parameter), ")") "->" return_type { -// 207| let (type_name, name) = $6 -// 208| FuncSig::{ attrs: $1, is_async : $3, type_name, name, type_params: $5, params: $7, return_: $9} -// 209| } +// 212| attributes vis is_async FN loption(type_params_with_constraints) func_name delimited("(", separated_list(",", parameter), ")") "->" return_type { +// 213| let (type_name, name) = $6 +// 214| FuncSig::{ attrs: $1, is_async : $3, type_name, name, type_params: $5, params: $7, return_: $9} +// 215| } fn yy_action_116(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { let _sub_action_0_result = yy_action_60(_last_pos, _args[0:1]) let _sub_action_1_result = yy_action_15(_args[0].2, _args[1:1]) @@ -2071,9 +2077,9 @@ fn yy_action_116(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.P } // file:///./mbti_parser.mbty -// 223| attributes vis "type" type_decl_name_with_params optional_derive { -// 224| TypeSig::{attrs : $1, vis: $2, name: $4.0, type_params: $4.1, components: Abstract, derives: $5} -// 225| } +// 232| attributes vis "type" type_decl_name_with_params optional_derive { +// 233| TypeSig::{attrs : $1, vis: $2, name: $4.0, type_params: $4.1, components: Abstract, derives: $5} +// 234| } fn yy_action_117(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { let _sub_action_0_result = yy_action_60(_last_pos, _args[0:1]) let _sub_action_1_result = yy_action_15(_args[0].2, _args[1:1]) @@ -2087,9 +2093,9 @@ fn yy_action_117(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.P } // file:///./mbti_parser.mbty -// 281| attributes vis "type" type_decl_name_with_params "=" type_ { -// 282| TypeAlias(attrs = $1, vis=$2, name=$4.0, type_params=$4.1, type_=$6) -// 283| } +// 290| attributes vis "type" type_decl_name_with_params "=" type_ { +// 291| TypeAlias(attrs = $1, vis=$2, name=$4.0, type_params=$4.1, type_=$6) +// 292| } fn yy_action_118(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { let _sub_action_0_result = yy_action_60(_last_pos, _args[0:1]) let _sub_action_1_result = yy_action_15(_args[0].2, _args[1:1]) @@ -2103,9 +2109,9 @@ fn yy_action_118(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.P } // file:///./mbti_parser.mbty -// 226| attributes vis "suberror" uident optional_derive { -// 227| TypeSig::{attrs : $1, vis: $2, name: $4, type_params: @list.empty(), components: Error(NoPayload), derives: $5} -// 228| } +// 235| attributes vis "suberror" uident optional_derive { +// 236| TypeSig::{attrs : $1, vis: $2, name: $4, type_params: @list.empty(), components: Error(NoPayload), derives: $5} +// 237| } fn yy_action_119(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { let _sub_action_0_result = yy_action_60(_last_pos, _args[0:1]) let _sub_action_1_result = yy_action_15(_args[0].2, _args[1:1]) @@ -2119,9 +2125,9 @@ fn yy_action_119(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.P } // file:///./mbti_parser.mbty -// 229| attributes vis "suberror" uident "{" separated_list(";", enum_constructor) "}" optional_derive { -// 230| TypeSig::{attrs : $1, vis: $2, name: $4, type_params: @list.empty(), components: Error(EnumPayload($6)), derives: $8} -// 231| } +// 238| attributes vis "suberror" uident "{" separated_list(";", enum_constructor) "}" optional_derive { +// 239| TypeSig::{attrs : $1, vis: $2, name: $4, type_params: @list.empty(), components: Error(EnumPayload($6)), derives: $8} +// 240| } fn yy_action_120(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { let _sub_action_0_result = yy_action_60(_last_pos, _args[0:1]) let _sub_action_1_result = yy_action_15(_args[0].2, _args[1:1]) @@ -2136,9 +2142,9 @@ fn yy_action_120(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.P } // file:///./mbti_parser.mbty -// 232| attributes vis "struct" type_decl_name_with_params "{" record_decl_body "}" optional_derive { -// 233| TypeSig::{attrs : $1, vis: $2, name: $4.0, type_params: $4.1, components: $6, derives: $8 } -// 234| } +// 241| attributes vis "struct" type_decl_name_with_params "{" record_decl_body "}" optional_derive { +// 242| TypeSig::{attrs : $1, vis: $2, name: $4.0, type_params: $4.1, components: $6, derives: $8 } +// 243| } fn yy_action_121(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { let _sub_action_0_result = yy_action_60(_last_pos, _args[0:1]) let _sub_action_1_result = yy_action_15(_args[0].2, _args[1:1]) @@ -2153,9 +2159,9 @@ fn yy_action_121(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.P } // file:///./mbti_parser.mbty -// 235| attributes vis "struct" type_decl_name_with_params "(" separated_list(",", type_) ")" optional_derive { -// 236| TypeSig::{attrs : $1, vis: $2, name: $4.0, type_params: $4.1, components: TupleStruct($6), derives: $8} -// 237| } +// 244| attributes vis "struct" type_decl_name_with_params "(" separated_list(",", type_) ")" optional_derive { +// 245| TypeSig::{attrs : $1, vis: $2, name: $4.0, type_params: $4.1, components: TupleStruct($6), derives: $8} +// 246| } fn yy_action_122(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { let _sub_action_0_result = yy_action_60(_last_pos, _args[0:1]) let _sub_action_1_result = yy_action_15(_args[0].2, _args[1:1]) @@ -2170,9 +2176,9 @@ fn yy_action_122(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.P } // file:///./mbti_parser.mbty -// 238| attributes vis "enum" type_decl_name_with_params "{" separated_list(";", enum_constructor) "}" optional_derive { -// 239| TypeSig::{attrs : $1, vis: $2, name: $4.0, type_params: $4.1, components: Variant($6), derives: $8} -// 240| } +// 247| attributes vis "enum" type_decl_name_with_params "{" separated_list(";", enum_constructor) "}" optional_derive { +// 248| TypeSig::{attrs : $1, vis: $2, name: $4.0, type_params: $4.1, components: Variant($6), derives: $8} +// 249| } fn yy_action_123(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { let _sub_action_0_result = yy_action_60(_last_pos, _args[0:1]) let _sub_action_1_result = yy_action_15(_args[0].2, _args[1:1]) @@ -2187,9 +2193,9 @@ fn yy_action_123(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.P } // file:///./mbti_parser.mbty -// 241| attributes vis "extenum" type_decl_name_with_params "{" separated_list(";", enum_constructor) "}" optional_derive { -// 242| TypeSig::{attrs : $1, vis: $2, name: $4.0, type_params: $4.1, components: ExtensibleEnum($6), derives: $8} -// 243| } +// 250| attributes vis "extenum" type_decl_name_with_params "{" separated_list(";", enum_constructor) "}" optional_derive { +// 251| TypeSig::{attrs : $1, vis: $2, name: $4.0, type_params: $4.1, components: ExtensibleEnum($6), derives: $8} +// 252| } fn yy_action_124(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { let _sub_action_0_result = yy_action_60(_last_pos, _args[0:1]) let _sub_action_1_result = yy_action_15(_args[0].2, _args[1:1]) @@ -2204,10 +2210,10 @@ fn yy_action_124(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.P } // file:///./mbti_parser.mbty -// 244| attributes vis "extenum" extensible_enum_extension_target "+=" "{" separated_list(";", enum_constructor) "}" optional_derive { -// 245| let (name, type_params, target) = $4 -// 246| TypeSig::{attrs : $1, vis: $2, name, type_params, components: ExtendEnum(target~, constructors = $7), derives: $9} -// 247| } +// 253| attributes vis "extenum" extensible_enum_extension_target "+=" "{" separated_list(";", enum_constructor) "}" optional_derive { +// 254| let (name, type_params, target) = $4 +// 255| TypeSig::{attrs : $1, vis: $2, name, type_params, components: ExtendEnum(target~, constructors = $7), derives: $9} +// 256| } fn yy_action_125(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { let _sub_action_0_result = yy_action_60(_last_pos, _args[0:1]) let _sub_action_1_result = yy_action_15(_args[0].2, _args[1:1]) @@ -2223,9 +2229,9 @@ fn yy_action_125(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.P } // file:///./mbti_parser.mbty -// 256| attributes vis "impl" type_params_with_constraints qualified_uident "for" type_ { -// 257| ImplSig::{type_params : $4, trait_name : $5, type_ : $7, attrs : $1} -// 258| } +// 265| attributes vis "impl" type_params_with_constraints qualified_uident "for" type_ { +// 266| ImplSig::{type_params : $4, trait_name : $5, type_ : $7, attrs : $1} +// 267| } fn yy_action_126(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { let _sub_action_0_result = yy_action_60(_last_pos, _args[0:1]) let _sub_action_1_result = yy_action_15(_args[0].2, _args[1:1]) @@ -2239,9 +2245,9 @@ fn yy_action_126(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.P } // file:///./mbti_parser.mbty -// 259| attributes vis "impl" qualified_uident "for" type_ { -// 260| ImplSig::{type_params : @list.empty(), trait_name : $4, type_ : $6, attrs : $1} -// 261| } +// 268| attributes vis "impl" qualified_uident "for" type_ { +// 269| ImplSig::{type_params : @list.empty(), trait_name : $4, type_ : $6, attrs : $1} +// 270| } fn yy_action_127(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { let _sub_action_0_result = yy_action_60(_last_pos, _args[0:1]) let _sub_action_1_result = yy_action_15(_args[0].2, _args[1:1]) @@ -2254,9 +2260,9 @@ fn yy_action_127(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.P } // file:///./mbti_parser.mbty -// 265| attributes vis "trait" uident loption(preceded(":", separated_nonempty_list("+", qualified_uident))) trait_body { -// 266| TraitSig::{ attrs : $1, vis: $2, name: $4, super_traits: $5, methods: $6} -// 267| } +// 274| attributes vis "trait" uident loption(preceded(":", separated_nonempty_list("+", qualified_uident))) trait_body { +// 275| TraitSig::{ attrs : $1, vis: $2, name: $4, super_traits: $5, methods: $6} +// 276| } fn yy_action_128(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { let _sub_action_0_result = yy_action_60(_last_pos, _args[0:1]) let _sub_action_1_result = yy_action_15(_args[0].2, _args[1:1]) @@ -2271,9 +2277,9 @@ fn yy_action_128(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.P } // file:///./mbti_parser.mbty -// 284| attributes vis "fnalias" uident "::" lident { -// 285| FuncAlias(attrs = $1,name=$6, type_name=$4) -// 286| } +// 293| attributes vis "fnalias" uident "::" lident { +// 294| FuncAlias(attrs = $1,name=$6, type_name=$4) +// 295| } fn yy_action_129(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { let _sub_action_0_result = yy_action_60(_last_pos, _args[0:1]) let _sub_action_1_result = yy_action_15(_args[0].2, _args[1:1]) @@ -2286,10 +2292,10 @@ fn yy_action_129(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.P } // file:///./mbti_parser.mbty -// 287| attributes vis "using" PACKAGE_NAME "{" "type" uident using_binder "}" { -// 288| let pkg = Name::{ name : $4, loc : mk_loc($loc($4)) } -// 289| Using(pkg~, target = $7, name = $8, kind = Type, attrs = $1) -// 290| } +// 296| attributes vis "using" PACKAGE_NAME "{" "type" uident using_binder "}" { +// 297| let pkg = Name::{ name : $4, loc : mk_loc($loc($4)) } +// 298| Using(pkg~, target = $7, name = $8, kind = Type, attrs = $1) +// 299| } fn yy_action_130(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { let _sub_action_0_result = yy_action_60(_last_pos, _args[0:1]) let _sub_action_1_result = yy_action_15(_args[0].2, _args[1:1]) @@ -2306,10 +2312,10 @@ fn yy_action_130(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.P } // file:///./mbti_parser.mbty -// 291| attributes vis "using" PACKAGE_NAME "{" "trait" uident using_binder "}" { -// 292| let pkg = Name::{ name : $4, loc : mk_loc($loc($4)) } -// 293| Using(pkg~, target = $7, name = $8, kind = Trait, attrs = $1) -// 294| } +// 300| attributes vis "using" PACKAGE_NAME "{" "trait" uident using_binder "}" { +// 301| let pkg = Name::{ name : $4, loc : mk_loc($loc($4)) } +// 302| Using(pkg~, target = $7, name = $8, kind = Trait, attrs = $1) +// 303| } fn yy_action_131(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { let _sub_action_0_result = yy_action_60(_last_pos, _args[0:1]) let _sub_action_1_result = yy_action_15(_args[0].2, _args[1:1]) @@ -2326,7 +2332,7 @@ fn yy_action_131(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.P } // file:///./mbti_parser.mbty -// 177| attributes vis "let" lident ":" type_ { ValueSig::{ attrs: $1, name: $4, type_: $6 } } +// 183| attributes vis "let" lident ":" type_ { ValueSig::{ attrs: $1, name: $4, type_: $6 } } fn yy_action_132(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { let _sub_action_0_result = yy_action_14(_last_pos, _args[0:0]) let _sub_action_1_result = yy_action_15(_last_pos, _args[0:0]) @@ -2337,10 +2343,10 @@ fn yy_action_132(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.P } // file:///./mbti_parser.mbty -// 206| attributes vis is_async FN loption(type_params_with_constraints) func_name delimited("(", separated_list(",", parameter), ")") "->" return_type { -// 207| let (type_name, name) = $6 -// 208| FuncSig::{ attrs: $1, is_async : $3, type_name, name, type_params: $5, params: $7, return_: $9} -// 209| } +// 212| attributes vis is_async FN loption(type_params_with_constraints) func_name delimited("(", separated_list(",", parameter), ")") "->" return_type { +// 213| let (type_name, name) = $6 +// 214| FuncSig::{ attrs: $1, is_async : $3, type_name, name, type_params: $5, params: $7, return_: $9} +// 215| } fn yy_action_133(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { let _sub_action_0_result = yy_action_14(_last_pos, _args[0:0]) let _sub_action_1_result = yy_action_15(_last_pos, _args[0:0]) @@ -2359,9 +2365,9 @@ fn yy_action_133(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.P } // file:///./mbti_parser.mbty -// 181| UIDENT "::" { -// 182| MethodSelfType::{ name : $1, is_object : false, loc : mk_loc($loc($1)) } -// 183| } +// 187| UIDENT "::" { +// 188| MethodSelfType::{ name : $1, is_object : false, loc : mk_loc($loc($1)) } +// 189| } fn yy_action_134(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { guard _args[0].0 is YYObj_String(_dollar1) let _start_pos_of_item0 = _args[0].1 @@ -2372,9 +2378,9 @@ fn yy_action_134(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.P } // file:///./mbti_parser.mbty -// 184| "&" UIDENT "::" { -// 185| MethodSelfType::{ name : $2, is_object : true, loc : mk_loc($loc($2)) } -// 186| } +// 190| "&" UIDENT "::" { +// 191| MethodSelfType::{ name : $2, is_object : true, loc : mk_loc($loc($2)) } +// 192| } fn yy_action_135(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { guard _args[1].0 is YYObj_String(_dollar2) let _start_pos_of_item1 = _args[1].1 @@ -2385,28 +2391,28 @@ fn yy_action_135(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.P } // file:///./mbti_parser.mbty -// 195| luident { (None, $1) } +// 201| luident { (None, $1) } fn yy_action_136(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { guard _args[0].0 is YYObj_Name(_dollar1) YYObj__MethodSelfType___Name_({(); (None, _dollar1) }) } // file:///./mbti_parser.mbty -// 190| lident { $1 } +// 196| lident { $1 } fn yy_action_137(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { guard _args[0].0 is YYObj_Name(_dollar1) YYObj_Name({(); _dollar1 }) } // file:///./mbti_parser.mbty -// 191| uident { $1 } +// 197| uident { $1 } fn yy_action_138(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { guard _args[0].0 is YYObj_Name(_dollar1) YYObj_Name({(); _dollar1 }) } // file:///./mbti_parser.mbty -// 196| method_self_type_coloncolon luident { (Some($1), $2) } +// 202| method_self_type_coloncolon luident { (Some($1), $2) } fn yy_action_139(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { guard _args[0].0 is YYObj_MethodSelfType(_dollar1) guard _args[1].0 is YYObj_Name(_dollar2) @@ -2414,10 +2420,10 @@ fn yy_action_139(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.P } // file:///./mbti_parser.mbty -// 206| attributes vis is_async FN loption(type_params_with_constraints) func_name delimited("(", separated_list(",", parameter), ")") "->" return_type { -// 207| let (type_name, name) = $6 -// 208| FuncSig::{ attrs: $1, is_async : $3, type_name, name, type_params: $5, params: $7, return_: $9} -// 209| } +// 212| attributes vis is_async FN loption(type_params_with_constraints) func_name delimited("(", separated_list(",", parameter), ")") "->" return_type { +// 213| let (type_name, name) = $6 +// 214| FuncSig::{ attrs: $1, is_async : $3, type_name, name, type_params: $5, params: $7, return_: $9} +// 215| } fn yy_action_140(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { let _sub_action_0_result = yy_action_14(_last_pos, _args[0:0]) let _sub_action_1_result = yy_action_15(_last_pos, _args[0:0]) @@ -2435,24 +2441,11 @@ fn yy_action_140(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.P }) } -// file:///./stdlib.mbty -// 15| X { $1 } -fn yy_action_141(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { - guard _args[0].0 is YYObj__list_List_TypeParamWithConstraints_(_dollar1) - YYObj__list_List_TypeParamWithConstraints_({(); _dollar1 }) -} - -// file:///./stdlib.mbty -// 14| { @list.empty() } -fn yy_action_142(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { - YYObj__list_List_TypeParamWithConstraints_({(); @list.empty() }) -} - // file:///./mbti_parser.mbty -// 223| attributes vis "type" type_decl_name_with_params optional_derive { -// 224| TypeSig::{attrs : $1, vis: $2, name: $4.0, type_params: $4.1, components: Abstract, derives: $5} -// 225| } -fn yy_action_143(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { +// 232| attributes vis "type" type_decl_name_with_params optional_derive { +// 233| TypeSig::{attrs : $1, vis: $2, name: $4.0, type_params: $4.1, components: Abstract, derives: $5} +// 234| } +fn yy_action_141(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { let _sub_action_0_result = yy_action_14(_last_pos, _args[0:0]) let _sub_action_1_result = yy_action_15(_last_pos, _args[0:0]) guard _sub_action_0_result is YYObj__list_List_Attribute_(_dollar1) @@ -2465,10 +2458,10 @@ fn yy_action_143(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.P } // file:///./mbti_parser.mbty -// 281| attributes vis "type" type_decl_name_with_params "=" type_ { -// 282| TypeAlias(attrs = $1, vis=$2, name=$4.0, type_params=$4.1, type_=$6) -// 283| } -fn yy_action_144(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { +// 290| attributes vis "type" type_decl_name_with_params "=" type_ { +// 291| TypeAlias(attrs = $1, vis=$2, name=$4.0, type_params=$4.1, type_=$6) +// 292| } +fn yy_action_142(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { let _sub_action_0_result = yy_action_14(_last_pos, _args[0:0]) let _sub_action_1_result = yy_action_15(_last_pos, _args[0:0]) guard _sub_action_0_result is YYObj__list_List_Attribute_(_dollar1) @@ -2481,10 +2474,10 @@ fn yy_action_144(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.P } // file:///./mbti_parser.mbty -// 226| attributes vis "suberror" uident optional_derive { -// 227| TypeSig::{attrs : $1, vis: $2, name: $4, type_params: @list.empty(), components: Error(NoPayload), derives: $5} -// 228| } -fn yy_action_145(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { +// 235| attributes vis "suberror" uident optional_derive { +// 236| TypeSig::{attrs : $1, vis: $2, name: $4, type_params: @list.empty(), components: Error(NoPayload), derives: $5} +// 237| } +fn yy_action_143(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { let _sub_action_0_result = yy_action_14(_last_pos, _args[0:0]) let _sub_action_1_result = yy_action_15(_last_pos, _args[0:0]) guard _sub_action_0_result is YYObj__list_List_Attribute_(_dollar1) @@ -2497,10 +2490,10 @@ fn yy_action_145(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.P } // file:///./mbti_parser.mbty -// 229| attributes vis "suberror" uident "{" separated_list(";", enum_constructor) "}" optional_derive { -// 230| TypeSig::{attrs : $1, vis: $2, name: $4, type_params: @list.empty(), components: Error(EnumPayload($6)), derives: $8} -// 231| } -fn yy_action_146(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { +// 238| attributes vis "suberror" uident "{" separated_list(";", enum_constructor) "}" optional_derive { +// 239| TypeSig::{attrs : $1, vis: $2, name: $4, type_params: @list.empty(), components: Error(EnumPayload($6)), derives: $8} +// 240| } +fn yy_action_144(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { let _sub_action_0_result = yy_action_14(_last_pos, _args[0:0]) let _sub_action_1_result = yy_action_15(_last_pos, _args[0:0]) guard _sub_action_0_result is YYObj__list_List_Attribute_(_dollar1) @@ -2514,10 +2507,10 @@ fn yy_action_146(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.P } // file:///./mbti_parser.mbty -// 232| attributes vis "struct" type_decl_name_with_params "{" record_decl_body "}" optional_derive { -// 233| TypeSig::{attrs : $1, vis: $2, name: $4.0, type_params: $4.1, components: $6, derives: $8 } -// 234| } -fn yy_action_147(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { +// 241| attributes vis "struct" type_decl_name_with_params "{" record_decl_body "}" optional_derive { +// 242| TypeSig::{attrs : $1, vis: $2, name: $4.0, type_params: $4.1, components: $6, derives: $8 } +// 243| } +fn yy_action_145(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { let _sub_action_0_result = yy_action_14(_last_pos, _args[0:0]) let _sub_action_1_result = yy_action_15(_last_pos, _args[0:0]) guard _sub_action_0_result is YYObj__list_List_Attribute_(_dollar1) @@ -2531,10 +2524,10 @@ fn yy_action_147(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.P } // file:///./mbti_parser.mbty -// 319| separated_list(";", record_decl_field) { -// 320| Record(fields = $1, constr = None) -// 321| } -fn yy_action_148(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { +// 328| separated_list(";", record_decl_field) { +// 329| Record(fields = $1, constr = None) +// 330| } +fn yy_action_146(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { guard _args[0].0 is YYObj__list_List_FieldDecl_(_dollar1) YYObj_TypeDefinition({(); Record(fields = _dollar1, constr = None) @@ -2543,52 +2536,48 @@ fn yy_action_148(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.P // file:///./stdlib.mbty // 55| separated_nonempty_list(SEP, X) { $1 } -fn yy_action_149(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { +fn yy_action_147(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { guard _args[0].0 is YYObj__list_List_FieldDecl_(_dollar1) YYObj__list_List_FieldDecl_({(); _dollar1 }) } // file:///./mbti_parser.mbty -// 313| attributes boption("mut") LIDENT ":" type_ { -// 314| FieldDecl::{ name: FieldName::{ label: $3, loc : mk_loc($loc($3)) }, vis: Default, mut_: $2, ty: $5, loc: mk_loc($sloc), attrs: $1, doc: DocString::empty() } -// 315| } -fn yy_action_150(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { +// 322| attributes boption("mut") lident ":" type_ { +// 323| FieldDecl::{ name: FieldName::{ label: $3.name, loc : $3.loc }, vis: Default, mut_: $2, ty: $5, loc: mk_loc($sloc), attrs: $1, doc: DocString::empty() } +// 324| } +fn yy_action_148(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { let _sub_action_0_result = yy_action_14(_last_pos, _args[0:0]) - guard _args[1].0 is YYObj_String(_dollar3) - let _start_pos_of_item2 = _args[1].1 - let _end_pos_of_item2 = _args[1].2 + guard _args[1].0 is YYObj_Name(_dollar3) guard _args[0].0 is YYObj_Bool(_dollar2) guard _args[3].0 is YYObj_Type(_dollar5) let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } guard _sub_action_0_result is YYObj__list_List_Attribute_(_dollar1) - YYObj_FieldDecl({(); - FieldDecl::{ name: FieldName::{ label: _dollar3, loc : mk_loc((_start_pos_of_item2, _end_pos_of_item2)) }, vis: Default, mut_: _dollar2, ty: _dollar5, loc: mk_loc((_symbol_start_pos, _end_pos)), attrs: _dollar1, doc: DocString::empty() } + YYObj_FieldDecl({(); + FieldDecl::{ name: FieldName::{ label: _dollar3.name, loc : _dollar3.loc }, vis: Default, mut_: _dollar2, ty: _dollar5, loc: mk_loc((_symbol_start_pos, _end_pos)), attrs: _dollar1, doc: DocString::empty() } }) } // file:///./mbti_parser.mbty -// 313| attributes boption("mut") LIDENT ":" type_ { -// 314| FieldDecl::{ name: FieldName::{ label: $3, loc : mk_loc($loc($3)) }, vis: Default, mut_: $2, ty: $5, loc: mk_loc($sloc), attrs: $1, doc: DocString::empty() } -// 315| } -fn yy_action_151(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { +// 322| attributes boption("mut") lident ":" type_ { +// 323| FieldDecl::{ name: FieldName::{ label: $3.name, loc : $3.loc }, vis: Default, mut_: $2, ty: $5, loc: mk_loc($sloc), attrs: $1, doc: DocString::empty() } +// 324| } +fn yy_action_149(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { let _sub_action_0_result = yy_action_60(_last_pos, _args[0:1]) - guard _args[2].0 is YYObj_String(_dollar3) - let _start_pos_of_item2 = _args[2].1 - let _end_pos_of_item2 = _args[2].2 + guard _args[2].0 is YYObj_Name(_dollar3) guard _args[1].0 is YYObj_Bool(_dollar2) guard _args[4].0 is YYObj_Type(_dollar5) let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } guard _sub_action_0_result is YYObj__list_List_Attribute_(_dollar1) - YYObj_FieldDecl({(); - FieldDecl::{ name: FieldName::{ label: _dollar3, loc : mk_loc((_start_pos_of_item2, _end_pos_of_item2)) }, vis: Default, mut_: _dollar2, ty: _dollar5, loc: mk_loc((_symbol_start_pos, _end_pos)), attrs: _dollar1, doc: DocString::empty() } + YYObj_FieldDecl({(); + FieldDecl::{ name: FieldName::{ label: _dollar3.name, loc : _dollar3.loc }, vis: Default, mut_: _dollar2, ty: _dollar5, loc: mk_loc((_symbol_start_pos, _end_pos)), attrs: _dollar1, doc: DocString::empty() } }) } // file:///./stdlib.mbty // 60| X SEP separated_nonempty_list(SEP, X) { $3.add($1) } -fn yy_action_152(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { +fn yy_action_150(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { guard _args[2].0 is YYObj__list_List_FieldDecl_(_dollar3) guard _args[0].0 is YYObj_FieldDecl(_dollar1) YYObj__list_List_FieldDecl_({(); _dollar3.add(_dollar1) }) @@ -2596,22 +2585,22 @@ fn yy_action_152(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.P // file:///./stdlib.mbty // 59| X { @list.singleton($1) } -fn yy_action_153(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { +fn yy_action_151(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { guard _args[0].0 is YYObj_FieldDecl(_dollar1) YYObj__list_List_FieldDecl_({(); @list.singleton(_dollar1) }) } // file:///./stdlib.mbty // 54| { @list.empty() } -fn yy_action_154(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { +fn yy_action_152(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { YYObj__list_List_FieldDecl_({(); @list.empty() }) } // file:///./mbti_parser.mbty -// 235| attributes vis "struct" type_decl_name_with_params "(" separated_list(",", type_) ")" optional_derive { -// 236| TypeSig::{attrs : $1, vis: $2, name: $4.0, type_params: $4.1, components: TupleStruct($6), derives: $8} -// 237| } -fn yy_action_155(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { +// 244| attributes vis "struct" type_decl_name_with_params "(" separated_list(",", type_) ")" optional_derive { +// 245| TypeSig::{attrs : $1, vis: $2, name: $4.0, type_params: $4.1, components: TupleStruct($6), derives: $8} +// 246| } +fn yy_action_153(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { let _sub_action_0_result = yy_action_14(_last_pos, _args[0:0]) let _sub_action_1_result = yy_action_15(_last_pos, _args[0:0]) guard _sub_action_0_result is YYObj__list_List_Attribute_(_dollar1) @@ -2626,22 +2615,22 @@ fn yy_action_155(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.P // file:///./stdlib.mbty // 55| separated_nonempty_list(SEP, X) { $1 } -fn yy_action_156(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { +fn yy_action_154(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { guard _args[0].0 is YYObj__list_List_Type_(_dollar1) YYObj__list_List_Type_({(); _dollar1 }) } // file:///./stdlib.mbty // 54| { @list.empty() } -fn yy_action_157(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { +fn yy_action_155(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { YYObj__list_List_Type_({(); @list.empty() }) } // file:///./mbti_parser.mbty -// 238| attributes vis "enum" type_decl_name_with_params "{" separated_list(";", enum_constructor) "}" optional_derive { -// 239| TypeSig::{attrs : $1, vis: $2, name: $4.0, type_params: $4.1, components: Variant($6), derives: $8} -// 240| } -fn yy_action_158(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { +// 247| attributes vis "enum" type_decl_name_with_params "{" separated_list(";", enum_constructor) "}" optional_derive { +// 248| TypeSig::{attrs : $1, vis: $2, name: $4.0, type_params: $4.1, components: Variant($6), derives: $8} +// 249| } +fn yy_action_156(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { let _sub_action_0_result = yy_action_14(_last_pos, _args[0:0]) let _sub_action_1_result = yy_action_15(_last_pos, _args[0:0]) guard _sub_action_0_result is YYObj__list_List_Attribute_(_dollar1) @@ -2655,10 +2644,10 @@ fn yy_action_158(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.P } // file:///./mbti_parser.mbty -// 241| attributes vis "extenum" type_decl_name_with_params "{" separated_list(";", enum_constructor) "}" optional_derive { -// 242| TypeSig::{attrs : $1, vis: $2, name: $4.0, type_params: $4.1, components: ExtensibleEnum($6), derives: $8} -// 243| } -fn yy_action_159(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { +// 250| attributes vis "extenum" type_decl_name_with_params "{" separated_list(";", enum_constructor) "}" optional_derive { +// 251| TypeSig::{attrs : $1, vis: $2, name: $4.0, type_params: $4.1, components: ExtensibleEnum($6), derives: $8} +// 252| } +fn yy_action_157(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { let _sub_action_0_result = yy_action_14(_last_pos, _args[0:0]) let _sub_action_1_result = yy_action_15(_last_pos, _args[0:0]) guard _sub_action_0_result is YYObj__list_List_Attribute_(_dollar1) @@ -2672,11 +2661,11 @@ fn yy_action_159(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.P } // file:///./mbti_parser.mbty -// 244| attributes vis "extenum" extensible_enum_extension_target "+=" "{" separated_list(";", enum_constructor) "}" optional_derive { -// 245| let (name, type_params, target) = $4 -// 246| TypeSig::{attrs : $1, vis: $2, name, type_params, components: ExtendEnum(target~, constructors = $7), derives: $9} -// 247| } -fn yy_action_160(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { +// 253| attributes vis "extenum" extensible_enum_extension_target "+=" "{" separated_list(";", enum_constructor) "}" optional_derive { +// 254| let (name, type_params, target) = $4 +// 255| TypeSig::{attrs : $1, vis: $2, name, type_params, components: ExtendEnum(target~, constructors = $7), derives: $9} +// 256| } +fn yy_action_158(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { let _sub_action_0_result = yy_action_14(_last_pos, _args[0:0]) let _sub_action_1_result = yy_action_15(_last_pos, _args[0:0]) guard _args[1].0 is YYObj__Name___list_List_TypeParamNoConstraints___QualifiedName_(_dollar4) @@ -2691,52 +2680,52 @@ fn yy_action_160(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.P } // file:///./mbti_parser.mbty -// 252| "derive" "(" non_empty_list_commas(qualified_uident) ")" { $3 } -fn yy_action_161(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { +// 261| "derive" "(" non_empty_list_commas(qualified_uident) ")" { $3 } +fn yy_action_159(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { guard _args[2].0 is YYObj__list_List_QualifiedName_(_dollar3) YYObj__list_List_QualifiedName_({(); _dollar3 }) } // file:///./mbti_parser.mbty -// 139| non_empty_list_commas_rev(X) option(",") { $1.rev() } -fn yy_action_162(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { +// 145| non_empty_list_commas_rev(X) option(",") { $1.rev() } +fn yy_action_160(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { guard _args[0].0 is YYObj__list_List_QualifiedName_(_dollar1) YYObj__list_List_QualifiedName_({(); _dollar1.rev() }) } // file:///./mbti_parser.mbty -// 135| non_empty_list_commas_rev(X) "," X { $1.add($3) } -fn yy_action_163(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { +// 141| non_empty_list_commas_rev(X) "," X { $1.add($3) } +fn yy_action_161(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { guard _args[0].0 is YYObj__list_List_QualifiedName_(_dollar1) guard _args[2].0 is YYObj_QualifiedName(_dollar3) YYObj__list_List_QualifiedName_({(); _dollar1.add(_dollar3) }) } // file:///./mbti_parser.mbty -// 134| X { @list.singleton($1) } -fn yy_action_164(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { +// 140| X { @list.singleton($1) } +fn yy_action_162(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { guard _args[0].0 is YYObj_QualifiedName(_dollar1) YYObj__list_List_QualifiedName_({(); @list.singleton(_dollar1) }) } // file:///./mbti_parser.mbty -// 251| { @list.empty() } -fn yy_action_165(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { +// 260| { @list.empty() } +fn yy_action_163(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { YYObj__list_List_QualifiedName_({(); @list.empty() }) } // file:///./stdlib.mbty // 55| separated_nonempty_list(SEP, X) { $1 } -fn yy_action_166(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { +fn yy_action_164(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { guard _args[0].0 is YYObj__list_List_ConstrDecl_(_dollar1) YYObj__list_List_ConstrDecl_({(); _dollar1 }) } // file:///./mbti_parser.mbty -// 298| attributes UIDENT option(delimited("(", separated_nonempty_list(",", constructor_param), ")")) option(eq_tag) { -// 299| ConstrDecl::{name: ConstrName::{ name : $2, loc : mk_loc($loc($2)) }, args: $3, tag: $4, loc: mk_loc($sloc), attrs: $1, doc: DocString::empty()} -// 300| } -fn yy_action_167(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { +// 307| attributes UIDENT option(delimited("(", separated_nonempty_list(",", constructor_param), ")")) option(eq_tag) { +// 308| ConstrDecl::{name: ConstrName::{ name : $2, loc : mk_loc($loc($2)) }, args: $3, tag: $4, loc: mk_loc($sloc), attrs: $1, doc: DocString::empty()} +// 309| } +fn yy_action_165(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { let _sub_action_0_result = yy_action_14(_last_pos, _args[0:0]) guard _args[0].0 is YYObj_String(_dollar2) let _start_pos_of_item1 = _args[0].1 @@ -2752,10 +2741,10 @@ fn yy_action_167(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.P } // file:///./mbti_parser.mbty -// 298| attributes UIDENT option(delimited("(", separated_nonempty_list(",", constructor_param), ")")) option(eq_tag) { -// 299| ConstrDecl::{name: ConstrName::{ name : $2, loc : mk_loc($loc($2)) }, args: $3, tag: $4, loc: mk_loc($sloc), attrs: $1, doc: DocString::empty()} -// 300| } -fn yy_action_168(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { +// 307| attributes UIDENT option(delimited("(", separated_nonempty_list(",", constructor_param), ")")) option(eq_tag) { +// 308| ConstrDecl::{name: ConstrName::{ name : $2, loc : mk_loc($loc($2)) }, args: $3, tag: $4, loc: mk_loc($sloc), attrs: $1, doc: DocString::empty()} +// 309| } +fn yy_action_166(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { let _sub_action_0_result = yy_action_60(_last_pos, _args[0:1]) guard _args[1].0 is YYObj_String(_dollar2) let _start_pos_of_item1 = _args[1].1 @@ -2772,15 +2761,15 @@ fn yy_action_168(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.P // file:///./stdlib.mbty // 5| X { Some($1) } -fn yy_action_169(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { - let _sub_action_0_result = yy_action_170(_last_pos, _args[0:2]) +fn yy_action_167(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { + let _sub_action_0_result = yy_action_168(_last_pos, _args[0:2]) guard _sub_action_0_result is YYObj__String__Location_(_dollar1) YYObj_Option__String__Location__({(); Some(_dollar1) }) } // file:///./mbti_parser.mbty -// 304| "=" INT { ($2, mk_loc($loc($2))) } -fn yy_action_170(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { +// 313| "=" INT { ($2, mk_loc($loc($2))) } +fn yy_action_168(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { guard _args[1].0 is YYObj_String(_dollar2) let _start_pos_of_item1 = _args[1].1 let _end_pos_of_item1 = _args[1].2 @@ -2789,21 +2778,21 @@ fn yy_action_170(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.P // file:///./stdlib.mbty // 4| { None } -fn yy_action_171(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { +fn yy_action_169(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { YYObj_Option__String__Location__({(); None }) } // file:///./mbti_parser.mbty -// 308| boption("mut") type_ { ConstrParam::{mut_: $1, ty: $2, label: None} } -fn yy_action_172(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { +// 317| boption("mut") type_ { ConstrParam::{mut_: $1, ty: $2, label: None} } +fn yy_action_170(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { guard _args[0].0 is YYObj_Bool(_dollar1) guard _args[1].0 is YYObj_Type(_dollar2) YYObj_ConstrParam({(); ConstrParam::{mut_: _dollar1, ty: _dollar2, label: None} }) } // file:///./mbti_parser.mbty -// 309| boption("mut") post_label ":" type_ { ConstrParam::{mut_: $1, ty: $4, label: Some($2)} } -fn yy_action_173(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { +// 318| boption("mut") post_label ":" type_ { ConstrParam::{mut_: $1, ty: $4, label: Some($2)} } +fn yy_action_171(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { guard _args[0].0 is YYObj_Bool(_dollar1) guard _args[3].0 is YYObj_Type(_dollar4) guard _args[1].0 is YYObj_Label(_dollar2) @@ -2811,8 +2800,8 @@ fn yy_action_173(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.P } // file:///./mbti_parser.mbty -// 464| POST_LABEL { Label::{name: $1, loc: Location::trim_last_char(mk_loc($sloc))} } -fn yy_action_174(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { +// 474| POST_LABEL { Label::{name: $1, loc: Location::trim_last_char(mk_loc($sloc))} } +fn yy_action_172(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { guard _args[0].0 is YYObj_String(_dollar1) let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } @@ -2821,7 +2810,7 @@ fn yy_action_174(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.P // file:///./stdlib.mbty // 60| X SEP separated_nonempty_list(SEP, X) { $3.add($1) } -fn yy_action_175(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { +fn yy_action_173(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { guard _args[2].0 is YYObj__list_List_ConstrParam_(_dollar3) guard _args[0].0 is YYObj_ConstrParam(_dollar1) YYObj__list_List_ConstrParam_({(); _dollar3.add(_dollar1) }) @@ -2829,47 +2818,47 @@ fn yy_action_175(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.P // file:///./stdlib.mbty // 59| X { @list.singleton($1) } -fn yy_action_176(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { +fn yy_action_174(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { guard _args[0].0 is YYObj_ConstrParam(_dollar1) YYObj__list_List_ConstrParam_({(); @list.singleton(_dollar1) }) } // file:///./stdlib.mbty // 5| X { Some($1) } -fn yy_action_177(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { - let _sub_action_0_result = yy_action_178(_last_pos, _args[0:3]) +fn yy_action_175(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { + let _sub_action_0_result = yy_action_176(_last_pos, _args[0:3]) guard _sub_action_0_result is YYObj__list_List_ConstrParam_(_dollar1) YYObj_Option__list_List_ConstrParam__({(); Some(_dollar1) }) } // file:///./stdlib.mbty // 40| L X R { $2 } -fn yy_action_178(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { +fn yy_action_176(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { guard _args[1].0 is YYObj__list_List_ConstrParam_(_dollar2) YYObj__list_List_ConstrParam_({(); _dollar2 }) } // file:///./stdlib.mbty // 20| X { true } -fn yy_action_179(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { +fn yy_action_177(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { YYObj_Bool({(); true }) } // file:///./stdlib.mbty // 19| { false } -fn yy_action_180(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { +fn yy_action_178(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { YYObj_Bool({(); false }) } // file:///./stdlib.mbty // 4| { None } -fn yy_action_181(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { +fn yy_action_179(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { YYObj_Option__list_List_ConstrParam__({(); None }) } // file:///./stdlib.mbty // 60| X SEP separated_nonempty_list(SEP, X) { $3.add($1) } -fn yy_action_182(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { +fn yy_action_180(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { guard _args[2].0 is YYObj__list_List_ConstrDecl_(_dollar3) guard _args[0].0 is YYObj_ConstrDecl(_dollar1) YYObj__list_List_ConstrDecl_({(); _dollar3.add(_dollar1) }) @@ -2877,31 +2866,31 @@ fn yy_action_182(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.P // file:///./stdlib.mbty // 59| X { @list.singleton($1) } -fn yy_action_183(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { +fn yy_action_181(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { guard _args[0].0 is YYObj_ConstrDecl(_dollar1) YYObj__list_List_ConstrDecl_({(); @list.singleton(_dollar1) }) } // file:///./stdlib.mbty // 54| { @list.empty() } -fn yy_action_184(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { +fn yy_action_182(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { YYObj__list_List_ConstrDecl_({(); @list.empty() }) } // file:///./mbti_parser.mbty -// 352| uident optional_type_params_no_constraints { ($1, $2) } -fn yy_action_185(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { +// 361| uident optional_type_params_no_constraints { ($1, $2) } +fn yy_action_183(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { guard _args[0].0 is YYObj_Name(_dollar1) guard _args[1].0 is YYObj__list_List_TypeParamNoConstraints_(_dollar2) YYObj__Name___list_List_TypeParamNoConstraints__({(); (_dollar1, _dollar2) }) } // file:///./mbti_parser.mbty -// 356| uident optional_type_params_no_constraints { -// 357| let target = QualifiedName::{ name: Ident(name = $1.name), loc: $1.loc } -// 358| ($1, $2, target) -// 359| } -fn yy_action_186(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { +// 365| uident optional_type_params_no_constraints { +// 366| let target = QualifiedName::{ name: Ident(name = $1.name), loc: $1.loc } +// 367| ($1, $2, target) +// 368| } +fn yy_action_184(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { guard _args[0].0 is YYObj_Name(_dollar1) guard _args[1].0 is YYObj__list_List_TypeParamNoConstraints_(_dollar2) YYObj__Name___list_List_TypeParamNoConstraints___QualifiedName_({(); @@ -2911,29 +2900,29 @@ fn yy_action_186(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.P } // file:///./mbti_parser.mbty -// 339| "[" separated_list(",", type_param_no_constraints) "]" { $2 } -fn yy_action_187(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { +// 348| "[" separated_list(",", type_param_no_constraints) "]" { $2 } +fn yy_action_185(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { guard _args[1].0 is YYObj__list_List_TypeParamNoConstraints_(_dollar2) YYObj__list_List_TypeParamNoConstraints_({(); _dollar2 }) } // file:///./stdlib.mbty // 55| separated_nonempty_list(SEP, X) { $1 } -fn yy_action_188(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { +fn yy_action_186(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { guard _args[0].0 is YYObj__list_List_TypeParamNoConstraints_(_dollar1) YYObj__list_List_TypeParamNoConstraints_({(); _dollar1 }) } // file:///./mbti_parser.mbty -// 334| uident { Name($1) } -fn yy_action_189(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { +// 343| uident { Name($1) } +fn yy_action_187(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { guard _args[0].0 is YYObj_Name(_dollar1) YYObj_TypeParamNoConstraints({(); Name(_dollar1) }) } // file:///./mbti_parser.mbty -// 335| "_" { Underscore(mk_loc($sloc)) } -fn yy_action_190(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { +// 344| "_" { Underscore(mk_loc($sloc)) } +fn yy_action_188(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } YYObj_TypeParamNoConstraints({(); Underscore(mk_loc((_symbol_start_pos, _end_pos))) }) @@ -2941,7 +2930,7 @@ fn yy_action_190(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.P // file:///./stdlib.mbty // 60| X SEP separated_nonempty_list(SEP, X) { $3.add($1) } -fn yy_action_191(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { +fn yy_action_189(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { guard _args[2].0 is YYObj__list_List_TypeParamNoConstraints_(_dollar3) guard _args[0].0 is YYObj_TypeParamNoConstraints(_dollar1) YYObj__list_List_TypeParamNoConstraints_({(); _dollar3.add(_dollar1) }) @@ -2949,31 +2938,31 @@ fn yy_action_191(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.P // file:///./stdlib.mbty // 59| X { @list.singleton($1) } -fn yy_action_192(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { +fn yy_action_190(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { guard _args[0].0 is YYObj_TypeParamNoConstraints(_dollar1) YYObj__list_List_TypeParamNoConstraints_({(); @list.singleton(_dollar1) }) } // file:///./stdlib.mbty // 54| { @list.empty() } -fn yy_action_193(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { +fn yy_action_191(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { YYObj__list_List_TypeParamNoConstraints_({(); @list.empty() }) } // file:///./mbti_parser.mbty -// 344| type_params_no_constraints { $1 } -fn yy_action_194(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { +// 353| type_params_no_constraints { $1 } +fn yy_action_192(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { guard _args[0].0 is YYObj__list_List_TypeParamNoConstraints_(_dollar1) YYObj__list_List_TypeParamNoConstraints_({(); _dollar1 }) } // file:///./mbti_parser.mbty -// 360| PACKAGE_NAME DOT_UIDENT optional_type_params_no_constraints { -// 361| let name = Name::{ name: $2, loc: mk_loc($loc($2)) } -// 362| let target = QualifiedName::{ name: Dot(pkg = $1, id = $2), loc: mk_loc($sloc) } -// 363| (name, $3, target) -// 364| } -fn yy_action_195(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { +// 369| PACKAGE_NAME DOT_UIDENT optional_type_params_no_constraints { +// 370| let name = Name::{ name: $2, loc: mk_loc($loc($2)) } +// 371| let target = QualifiedName::{ name: Dot(pkg = $1, id = $2), loc: mk_loc($sloc) } +// 372| (name, $3, target) +// 373| } +fn yy_action_193(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { guard _args[1].0 is YYObj_String(_dollar2) let _start_pos_of_item1 = _args[1].1 let _end_pos_of_item1 = _args[1].2 @@ -2989,16 +2978,16 @@ fn yy_action_195(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.P } // file:///./mbti_parser.mbty -// 343| { @list.empty() } -fn yy_action_196(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { +// 352| { @list.empty() } +fn yy_action_194(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { YYObj__list_List_TypeParamNoConstraints_({(); @list.empty() }) } // file:///./mbti_parser.mbty -// 256| attributes vis "impl" type_params_with_constraints qualified_uident "for" type_ { -// 257| ImplSig::{type_params : $4, trait_name : $5, type_ : $7, attrs : $1} -// 258| } -fn yy_action_197(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { +// 265| attributes vis "impl" type_params_with_constraints qualified_uident "for" type_ { +// 266| ImplSig::{type_params : $4, trait_name : $5, type_ : $7, attrs : $1} +// 267| } +fn yy_action_195(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { let _sub_action_0_result = yy_action_14(_last_pos, _args[0:0]) let _sub_action_1_result = yy_action_15(_last_pos, _args[0:0]) guard _args[1].0 is YYObj__list_List_TypeParamWithConstraints_(_dollar4) @@ -3011,10 +3000,10 @@ fn yy_action_197(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.P } // file:///./mbti_parser.mbty -// 259| attributes vis "impl" qualified_uident "for" type_ { -// 260| ImplSig::{type_params : @list.empty(), trait_name : $4, type_ : $6, attrs : $1} -// 261| } -fn yy_action_198(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { +// 268| attributes vis "impl" qualified_uident "for" type_ { +// 269| ImplSig::{type_params : @list.empty(), trait_name : $4, type_ : $6, attrs : $1} +// 270| } +fn yy_action_196(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { let _sub_action_0_result = yy_action_14(_last_pos, _args[0:0]) let _sub_action_1_result = yy_action_15(_last_pos, _args[0:0]) guard _args[1].0 is YYObj_QualifiedName(_dollar4) @@ -3026,59 +3015,208 @@ fn yy_action_198(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.P } // file:///./mbti_parser.mbty -// 330| "[" separated_list(",", type_param_with_constraints) "]" { $2 } -fn yy_action_199(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { - guard _args[1].0 is YYObj__list_List_TypeParamWithConstraints_(_dollar2) - YYObj__list_List_TypeParamWithConstraints_({(); _dollar2 }) +// 274| attributes vis "trait" uident loption(preceded(":", separated_nonempty_list("+", qualified_uident))) trait_body { +// 275| TraitSig::{ attrs : $1, vis: $2, name: $4, super_traits: $5, methods: $6} +// 276| } +fn yy_action_197(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { + let _sub_action_0_result = yy_action_14(_last_pos, _args[0:0]) + let _sub_action_1_result = yy_action_15(_last_pos, _args[0:0]) + guard _sub_action_0_result is YYObj__list_List_Attribute_(_dollar1) + guard _sub_action_1_result is YYObj_Visibility(_dollar2) + guard _args[1].0 is YYObj_Name(_dollar4) + guard _args[2].0 is YYObj__list_List_QualifiedName_(_dollar5) + guard _args[3].0 is YYObj__list_List_TraitMethodSig_(_dollar6) + YYObj_TraitSig({(); + TraitSig::{ attrs : _dollar1, vis: _dollar2, name: _dollar4, super_traits: _dollar5, methods: _dollar6} + }) +} + +// file:///./mbti_parser.mbty +// 281| "{" separated_list(";", trait_method_sig) "}" { $2 } +fn yy_action_198(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { + guard _args[1].0 is YYObj__list_List_TraitMethodSig_(_dollar2) + YYObj__list_List_TraitMethodSig_({(); _dollar2 }) } // file:///./stdlib.mbty // 55| separated_nonempty_list(SEP, X) { $1 } +fn yy_action_199(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { + guard _args[0].0 is YYObj__list_List_TraitMethodSig_(_dollar1) + YYObj__list_List_TraitMethodSig_({(); _dollar1 }) +} + +// file:///./mbti_parser.mbty +// 219| attributes is_async "fn" loption(type_params_with_constraints) lident delimited("(", separated_list(",", parameter), ")") "->" return_type boption(eq_underscore) { +// 220| TraitMethodSig::{ attrs : $1, is_async: $2, type_params: $4, name: $5, params: $6, return_: $8, has_default: $9} +// 221| } fn yy_action_200(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { - guard _args[0].0 is YYObj__list_List_TypeParamWithConstraints_(_dollar1) - YYObj__list_List_TypeParamWithConstraints_({(); _dollar1 }) + let _sub_action_0_result = yy_action_14(_last_pos, _args[0:0]) + let _sub_action_1_result = yy_action_20(_last_pos, _args[0:1]) + let _sub_action_2_result = yy_action_21(_args[3].2, _args[4:7]) + guard _sub_action_0_result is YYObj__list_List_Attribute_(_dollar1) + guard _sub_action_1_result is YYObj_Location_(_dollar2) + guard _args[2].0 is YYObj__list_List_TypeParamWithConstraints_(_dollar4) + guard _args[3].0 is YYObj_Name(_dollar5) + guard _sub_action_2_result is YYObj__list_List_Parameter_(_dollar6) + guard _args[8].0 is YYObj__Type__ErrorType_(_dollar8) + guard _args[9].0 is YYObj_Bool(_dollar9) + YYObj_TraitMethodSig({(); + TraitMethodSig::{ attrs : _dollar1, is_async: _dollar2, type_params: _dollar4, name: _dollar5, params: _dollar6, return_: _dollar8, has_default: _dollar9} + }) } // file:///./mbti_parser.mbty -// 326| uident ":" separated_nonempty_list("+", type_constraint) { TypeParamWithConstraints::{name: $1, constraints: $3} } +// 222| attributes is_async lident delimited("(", separated_list(",", parameter), ")") "->" return_type boption(eq_underscore) { +// 223| TraitMethodSig::{ attrs : $1, is_async: $2, type_params: @list.empty(), name: $3, params: $4, return_: $6, has_default: $7} +// 224| } fn yy_action_201(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { - guard _args[0].0 is YYObj_Name(_dollar1) - guard _args[2].0 is YYObj__list_List_QualifiedName_(_dollar3) - YYObj_TypeParamWithConstraints({(); TypeParamWithConstraints::{name: _dollar1, constraints: _dollar3} }) + let _sub_action_0_result = yy_action_14(_last_pos, _args[0:0]) + let _sub_action_1_result = yy_action_20(_last_pos, _args[0:1]) + let _sub_action_2_result = yy_action_21(_args[1].2, _args[2:5]) + guard _sub_action_0_result is YYObj__list_List_Attribute_(_dollar1) + guard _sub_action_1_result is YYObj_Location_(_dollar2) + guard _args[1].0 is YYObj_Name(_dollar3) + guard _sub_action_2_result is YYObj__list_List_Parameter_(_dollar4) + guard _args[6].0 is YYObj__Type__ErrorType_(_dollar6) + guard _args[7].0 is YYObj_Bool(_dollar7) + YYObj_TraitMethodSig({(); + TraitMethodSig::{ attrs : _dollar1, is_async: _dollar2, type_params: @list.empty(), name: _dollar3, params: _dollar4, return_: _dollar6, has_default: _dollar7} + }) } // file:///./mbti_parser.mbty -// 348| qualified_uident { $1 } +// 219| attributes is_async "fn" loption(type_params_with_constraints) lident delimited("(", separated_list(",", parameter), ")") "->" return_type boption(eq_underscore) { +// 220| TraitMethodSig::{ attrs : $1, is_async: $2, type_params: $4, name: $5, params: $6, return_: $8, has_default: $9} +// 221| } fn yy_action_202(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { - guard _args[0].0 is YYObj_QualifiedName(_dollar1) - YYObj_QualifiedName({(); _dollar1 }) -} - -// file:///./stdlib.mbty -// 60| X SEP separated_nonempty_list(SEP, X) { $3.add($1) } -fn yy_action_203(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { - guard _args[2].0 is YYObj__list_List_QualifiedName_(_dollar3) + let _sub_action_0_result = yy_action_14(_last_pos, _args[0:0]) + let _sub_action_1_result = yy_action_23(_last_pos, _args[0:0]) + let _sub_action_2_result = yy_action_21(_args[2].2, _args[3:6]) + guard _sub_action_0_result is YYObj__list_List_Attribute_(_dollar1) + guard _sub_action_1_result is YYObj_Location_(_dollar2) + guard _args[1].0 is YYObj__list_List_TypeParamWithConstraints_(_dollar4) + guard _args[2].0 is YYObj_Name(_dollar5) + guard _sub_action_2_result is YYObj__list_List_Parameter_(_dollar6) + guard _args[7].0 is YYObj__Type__ErrorType_(_dollar8) + guard _args[8].0 is YYObj_Bool(_dollar9) + YYObj_TraitMethodSig({(); + TraitMethodSig::{ attrs : _dollar1, is_async: _dollar2, type_params: _dollar4, name: _dollar5, params: _dollar6, return_: _dollar8, has_default: _dollar9} + }) +} + +// file:///./mbti_parser.mbty +// 219| attributes is_async "fn" loption(type_params_with_constraints) lident delimited("(", separated_list(",", parameter), ")") "->" return_type boption(eq_underscore) { +// 220| TraitMethodSig::{ attrs : $1, is_async: $2, type_params: $4, name: $5, params: $6, return_: $8, has_default: $9} +// 221| } +fn yy_action_203(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { + let _sub_action_0_result = yy_action_60(_last_pos, _args[0:1]) + let _sub_action_1_result = yy_action_20(_args[0].2, _args[1:2]) + let _sub_action_2_result = yy_action_21(_args[4].2, _args[5:8]) + guard _sub_action_0_result is YYObj__list_List_Attribute_(_dollar1) + guard _sub_action_1_result is YYObj_Location_(_dollar2) + guard _args[3].0 is YYObj__list_List_TypeParamWithConstraints_(_dollar4) + guard _args[4].0 is YYObj_Name(_dollar5) + guard _sub_action_2_result is YYObj__list_List_Parameter_(_dollar6) + guard _args[9].0 is YYObj__Type__ErrorType_(_dollar8) + guard _args[10].0 is YYObj_Bool(_dollar9) + YYObj_TraitMethodSig({(); + TraitMethodSig::{ attrs : _dollar1, is_async: _dollar2, type_params: _dollar4, name: _dollar5, params: _dollar6, return_: _dollar8, has_default: _dollar9} + }) +} + +// file:///./mbti_parser.mbty +// 222| attributes is_async lident delimited("(", separated_list(",", parameter), ")") "->" return_type boption(eq_underscore) { +// 223| TraitMethodSig::{ attrs : $1, is_async: $2, type_params: @list.empty(), name: $3, params: $4, return_: $6, has_default: $7} +// 224| } +fn yy_action_204(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { + let _sub_action_0_result = yy_action_60(_last_pos, _args[0:1]) + let _sub_action_1_result = yy_action_20(_args[0].2, _args[1:2]) + let _sub_action_2_result = yy_action_21(_args[2].2, _args[3:6]) + guard _sub_action_0_result is YYObj__list_List_Attribute_(_dollar1) + guard _sub_action_1_result is YYObj_Location_(_dollar2) + guard _args[2].0 is YYObj_Name(_dollar3) + guard _sub_action_2_result is YYObj__list_List_Parameter_(_dollar4) + guard _args[7].0 is YYObj__Type__ErrorType_(_dollar6) + guard _args[8].0 is YYObj_Bool(_dollar7) + YYObj_TraitMethodSig({(); + TraitMethodSig::{ attrs : _dollar1, is_async: _dollar2, type_params: @list.empty(), name: _dollar3, params: _dollar4, return_: _dollar6, has_default: _dollar7} + }) +} + +// file:///./mbti_parser.mbty +// 219| attributes is_async "fn" loption(type_params_with_constraints) lident delimited("(", separated_list(",", parameter), ")") "->" return_type boption(eq_underscore) { +// 220| TraitMethodSig::{ attrs : $1, is_async: $2, type_params: $4, name: $5, params: $6, return_: $8, has_default: $9} +// 221| } +fn yy_action_205(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { + let _sub_action_0_result = yy_action_60(_last_pos, _args[0:1]) + let _sub_action_1_result = yy_action_23(_args[0].2, _args[1:1]) + let _sub_action_2_result = yy_action_21(_args[3].2, _args[4:7]) + guard _sub_action_0_result is YYObj__list_List_Attribute_(_dollar1) + guard _sub_action_1_result is YYObj_Location_(_dollar2) + guard _args[2].0 is YYObj__list_List_TypeParamWithConstraints_(_dollar4) + guard _args[3].0 is YYObj_Name(_dollar5) + guard _sub_action_2_result is YYObj__list_List_Parameter_(_dollar6) + guard _args[8].0 is YYObj__Type__ErrorType_(_dollar8) + guard _args[9].0 is YYObj_Bool(_dollar9) + YYObj_TraitMethodSig({(); + TraitMethodSig::{ attrs : _dollar1, is_async: _dollar2, type_params: _dollar4, name: _dollar5, params: _dollar6, return_: _dollar8, has_default: _dollar9} + }) +} + +// file:///./mbti_parser.mbty +// 339| "[" separated_list(",", type_param_with_constraints) "]" { $2 } +fn yy_action_206(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { + guard _args[1].0 is YYObj__list_List_TypeParamWithConstraints_(_dollar2) + YYObj__list_List_TypeParamWithConstraints_({(); _dollar2 }) +} + +// file:///./stdlib.mbty +// 55| separated_nonempty_list(SEP, X) { $1 } +fn yy_action_207(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { + guard _args[0].0 is YYObj__list_List_TypeParamWithConstraints_(_dollar1) + YYObj__list_List_TypeParamWithConstraints_({(); _dollar1 }) +} + +// file:///./mbti_parser.mbty +// 335| uident ":" separated_nonempty_list("+", type_constraint) { TypeParamWithConstraints::{name: $1, constraints: $3} } +fn yy_action_208(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { + guard _args[0].0 is YYObj_Name(_dollar1) + guard _args[2].0 is YYObj__list_List_QualifiedName_(_dollar3) + YYObj_TypeParamWithConstraints({(); TypeParamWithConstraints::{name: _dollar1, constraints: _dollar3} }) +} + +// file:///./mbti_parser.mbty +// 357| qualified_uident { $1 } +fn yy_action_209(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { + guard _args[0].0 is YYObj_QualifiedName(_dollar1) + YYObj_QualifiedName({(); _dollar1 }) +} + +// file:///./stdlib.mbty +// 60| X SEP separated_nonempty_list(SEP, X) { $3.add($1) } +fn yy_action_210(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { + guard _args[2].0 is YYObj__list_List_QualifiedName_(_dollar3) guard _args[0].0 is YYObj_QualifiedName(_dollar1) YYObj__list_List_QualifiedName_({(); _dollar3.add(_dollar1) }) } // file:///./stdlib.mbty // 59| X { @list.singleton($1) } -fn yy_action_204(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { +fn yy_action_211(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { guard _args[0].0 is YYObj_QualifiedName(_dollar1) YYObj__list_List_QualifiedName_({(); @list.singleton(_dollar1) }) } // file:///./mbti_parser.mbty -// 325| uident { TypeParamWithConstraints::{name: $1, constraints: @list.empty()} } -fn yy_action_205(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { +// 334| uident { TypeParamWithConstraints::{name: $1, constraints: @list.empty()} } +fn yy_action_212(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { guard _args[0].0 is YYObj_Name(_dollar1) YYObj_TypeParamWithConstraints({(); TypeParamWithConstraints::{name: _dollar1, constraints: @list.empty()} }) } // file:///./stdlib.mbty // 60| X SEP separated_nonempty_list(SEP, X) { $3.add($1) } -fn yy_action_206(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { +fn yy_action_213(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { guard _args[2].0 is YYObj__list_List_TypeParamWithConstraints_(_dollar3) guard _args[0].0 is YYObj_TypeParamWithConstraints(_dollar1) YYObj__list_List_TypeParamWithConstraints_({(); _dollar3.add(_dollar1) }) @@ -3086,55 +3224,37 @@ fn yy_action_206(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.P // file:///./stdlib.mbty // 59| X { @list.singleton($1) } -fn yy_action_207(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { +fn yy_action_214(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { guard _args[0].0 is YYObj_TypeParamWithConstraints(_dollar1) YYObj__list_List_TypeParamWithConstraints_({(); @list.singleton(_dollar1) }) } // file:///./stdlib.mbty // 54| { @list.empty() } -fn yy_action_208(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { +fn yy_action_215(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { YYObj__list_List_TypeParamWithConstraints_({(); @list.empty() }) } -// file:///./mbti_parser.mbty -// 265| attributes vis "trait" uident loption(preceded(":", separated_nonempty_list("+", qualified_uident))) trait_body { -// 266| TraitSig::{ attrs : $1, vis: $2, name: $4, super_traits: $5, methods: $6} -// 267| } -fn yy_action_209(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { - let _sub_action_0_result = yy_action_14(_last_pos, _args[0:0]) - let _sub_action_1_result = yy_action_15(_last_pos, _args[0:0]) - guard _sub_action_0_result is YYObj__list_List_Attribute_(_dollar1) - guard _sub_action_1_result is YYObj_Visibility(_dollar2) - guard _args[1].0 is YYObj_Name(_dollar4) - guard _args[2].0 is YYObj__list_List_QualifiedName_(_dollar5) - guard _args[3].0 is YYObj__list_List_TraitMethodSig_(_dollar6) - YYObj_TraitSig({(); - TraitSig::{ attrs : _dollar1, vis: _dollar2, name: _dollar4, super_traits: _dollar5, methods: _dollar6} - }) -} - -// file:///./mbti_parser.mbty -// 272| "{" separated_list(";", trait_method_sig) "}" { $2 } -fn yy_action_210(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { - guard _args[1].0 is YYObj__list_List_TraitMethodSig_(_dollar2) - YYObj__list_List_TraitMethodSig_({(); _dollar2 }) +// file:///./stdlib.mbty +// 15| X { $1 } +fn yy_action_216(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { + guard _args[0].0 is YYObj__list_List_TypeParamWithConstraints_(_dollar1) + YYObj__list_List_TypeParamWithConstraints_({(); _dollar1 }) } // file:///./stdlib.mbty -// 55| separated_nonempty_list(SEP, X) { $1 } -fn yy_action_211(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { - guard _args[0].0 is YYObj__list_List_TraitMethodSig_(_dollar1) - YYObj__list_List_TraitMethodSig_({(); _dollar1 }) +// 14| { @list.empty() } +fn yy_action_217(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { + YYObj__list_List_TypeParamWithConstraints_({(); @list.empty() }) } // file:///./mbti_parser.mbty -// 213| attributes is_async lident delimited("(", separated_list(",", parameter), ")") "->" return_type boption(eq_underscore) { -// 214| TraitMethodSig::{ attrs : $1, is_async: $2, name: $3, params: $4, return_: $6, has_default: $7} -// 215| } -fn yy_action_212(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { - let _sub_action_0_result = yy_action_14(_last_pos, _args[0:0]) - let _sub_action_1_result = yy_action_20(_last_pos, _args[0:1]) +// 222| attributes is_async lident delimited("(", separated_list(",", parameter), ")") "->" return_type boption(eq_underscore) { +// 223| TraitMethodSig::{ attrs : $1, is_async: $2, type_params: @list.empty(), name: $3, params: $4, return_: $6, has_default: $7} +// 224| } +fn yy_action_218(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { + let _sub_action_0_result = yy_action_60(_last_pos, _args[0:1]) + let _sub_action_1_result = yy_action_23(_args[0].2, _args[1:1]) let _sub_action_2_result = yy_action_21(_args[1].2, _args[2:5]) guard _sub_action_0_result is YYObj__list_List_Attribute_(_dollar1) guard _sub_action_1_result is YYObj_Location_(_dollar2) @@ -3142,16 +3262,23 @@ fn yy_action_212(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.P guard _sub_action_2_result is YYObj__list_List_Parameter_(_dollar4) guard _args[6].0 is YYObj__Type__ErrorType_(_dollar6) guard _args[7].0 is YYObj_Bool(_dollar7) - YYObj_TraitMethodSig({(); - TraitMethodSig::{ attrs : _dollar1, is_async: _dollar2, name: _dollar3, params: _dollar4, return_: _dollar6, has_default: _dollar7} + YYObj_TraitMethodSig({(); + TraitMethodSig::{ attrs : _dollar1, is_async: _dollar2, type_params: @list.empty(), name: _dollar3, params: _dollar4, return_: _dollar6, has_default: _dollar7} }) } // file:///./mbti_parser.mbty -// 213| attributes is_async lident delimited("(", separated_list(",", parameter), ")") "->" return_type boption(eq_underscore) { -// 214| TraitMethodSig::{ attrs : $1, is_async: $2, name: $3, params: $4, return_: $6, has_default: $7} -// 215| } -fn yy_action_213(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { +// 479| nonempty_list(attribute) { $1 } +fn yy_action_60(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { + guard _args[0].0 is YYObj__list_List_Attribute_(_dollar1) + YYObj__list_List_Attribute_({(); _dollar1 }) +} + +// file:///./mbti_parser.mbty +// 222| attributes is_async lident delimited("(", separated_list(",", parameter), ")") "->" return_type boption(eq_underscore) { +// 223| TraitMethodSig::{ attrs : $1, is_async: $2, type_params: @list.empty(), name: $3, params: $4, return_: $6, has_default: $7} +// 224| } +fn yy_action_219(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { let _sub_action_0_result = yy_action_14(_last_pos, _args[0:0]) let _sub_action_1_result = yy_action_23(_last_pos, _args[0:0]) let _sub_action_2_result = yy_action_21(_args[0].2, _args[1:4]) @@ -3161,46 +3288,8 @@ fn yy_action_213(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.P guard _sub_action_2_result is YYObj__list_List_Parameter_(_dollar4) guard _args[5].0 is YYObj__Type__ErrorType_(_dollar6) guard _args[6].0 is YYObj_Bool(_dollar7) - YYObj_TraitMethodSig({(); - TraitMethodSig::{ attrs : _dollar1, is_async: _dollar2, name: _dollar3, params: _dollar4, return_: _dollar6, has_default: _dollar7} - }) -} - -// file:///./mbti_parser.mbty -// 213| attributes is_async lident delimited("(", separated_list(",", parameter), ")") "->" return_type boption(eq_underscore) { -// 214| TraitMethodSig::{ attrs : $1, is_async: $2, name: $3, params: $4, return_: $6, has_default: $7} -// 215| } -fn yy_action_214(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { - let _sub_action_0_result = yy_action_60(_last_pos, _args[0:1]) - let _sub_action_1_result = yy_action_20(_args[0].2, _args[1:2]) - let _sub_action_2_result = yy_action_21(_args[2].2, _args[3:6]) - guard _sub_action_0_result is YYObj__list_List_Attribute_(_dollar1) - guard _sub_action_1_result is YYObj_Location_(_dollar2) - guard _args[2].0 is YYObj_Name(_dollar3) - guard _sub_action_2_result is YYObj__list_List_Parameter_(_dollar4) - guard _args[7].0 is YYObj__Type__ErrorType_(_dollar6) - guard _args[8].0 is YYObj_Bool(_dollar7) - YYObj_TraitMethodSig({(); - TraitMethodSig::{ attrs : _dollar1, is_async: _dollar2, name: _dollar3, params: _dollar4, return_: _dollar6, has_default: _dollar7} - }) -} - -// file:///./mbti_parser.mbty -// 213| attributes is_async lident delimited("(", separated_list(",", parameter), ")") "->" return_type boption(eq_underscore) { -// 214| TraitMethodSig::{ attrs : $1, is_async: $2, name: $3, params: $4, return_: $6, has_default: $7} -// 215| } -fn yy_action_215(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { - let _sub_action_0_result = yy_action_60(_last_pos, _args[0:1]) - let _sub_action_1_result = yy_action_23(_args[0].2, _args[1:1]) - let _sub_action_2_result = yy_action_21(_args[1].2, _args[2:5]) - guard _sub_action_0_result is YYObj__list_List_Attribute_(_dollar1) - guard _sub_action_1_result is YYObj_Location_(_dollar2) - guard _args[1].0 is YYObj_Name(_dollar3) - guard _sub_action_2_result is YYObj__list_List_Parameter_(_dollar4) - guard _args[6].0 is YYObj__Type__ErrorType_(_dollar6) - guard _args[7].0 is YYObj_Bool(_dollar7) - YYObj_TraitMethodSig({(); - TraitMethodSig::{ attrs : _dollar1, is_async: _dollar2, name: _dollar3, params: _dollar4, return_: _dollar6, has_default: _dollar7} + YYObj_TraitMethodSig({(); + TraitMethodSig::{ attrs : _dollar1, is_async: _dollar2, type_params: @list.empty(), name: _dollar3, params: _dollar4, return_: _dollar6, has_default: _dollar7} }) } @@ -3211,49 +3300,42 @@ fn yy_action_21(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Po YYObj__list_List_Parameter_({(); _dollar2 }) } -// file:///./mbti_parser.mbty -// 469| nonempty_list(attribute) { $1 } -fn yy_action_60(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { - guard _args[0].0 is YYObj__list_List_Attribute_(_dollar1) - YYObj__list_List_Attribute_({(); _dollar1 }) -} - // file:///./stdlib.mbty // 20| X { true } -fn yy_action_216(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { - let _sub_action_0_result = yy_action_217(_last_pos, _args[0:2]) +fn yy_action_220(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { + let _sub_action_0_result = yy_action_221(_last_pos, _args[0:2]) YYObj_Bool({(); true }) } // file:///./mbti_parser.mbty -// 219| "=" "_" {} -fn yy_action_217(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { +// 228| "=" "_" {} +fn yy_action_221(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { YYObj_Unit({(); }) } // file:///./stdlib.mbty // 19| { false } -fn yy_action_218(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { +fn yy_action_222(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { YYObj_Bool({(); false }) } // file:///./stdlib.mbty // 55| separated_nonempty_list(SEP, X) { $1 } -fn yy_action_219(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { +fn yy_action_223(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { guard _args[0].0 is YYObj__list_List_Parameter_(_dollar1) YYObj__list_List_Parameter_({(); _dollar1 }) } // file:///./mbti_parser.mbty -// 404| type_ { DiscardPositional(ty = Some($1), loc = @syntax.no_location) } -fn yy_action_220(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { +// 413| type_ { DiscardPositional(ty = Some($1), loc = @syntax.no_location) } +fn yy_action_224(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { guard _args[0].0 is YYObj_Type(_dollar1) YYObj_Parameter({(); DiscardPositional(ty = Some(_dollar1), loc = @syntax.no_location) }) } // file:///./mbti_parser.mbty -// 405| POST_LABEL ":" type_ { Labelled(binder = { name : $1, loc : mk_loc($loc($1)) }, ty = Some($3)) } -fn yy_action_221(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { +// 414| POST_LABEL ":" type_ { Labelled(binder = { name : $1, loc : mk_loc($loc($1)) }, ty = Some($3)) } +fn yy_action_225(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { guard _args[0].0 is YYObj_String(_dollar1) let _start_pos_of_item0 = _args[0].1 let _end_pos_of_item0 = _args[0].2 @@ -3262,10 +3344,10 @@ fn yy_action_221(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.P } // file:///./mbti_parser.mbty -// 378| is_async "(" type_ "," ioption(separated_nonempty_list(",", type_)) ")" "->" return_type { Arrow(args=$5.unwrap_or(@list.empty()).add($3), res=$8.0, err=$8.1, is_async=$1, loc=mk_loc($sloc)) } -fn yy_action_222(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { +// 387| is_async "(" type_ "," ioption(separated_nonempty_list(",", type_)) ")" "->" return_type { Arrow(args=$5.unwrap_or(@list.empty()).add($3), res=$8.0, err=$8.1, is_async=$1, loc=mk_loc($sloc)) } +fn yy_action_226(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { let _sub_action_0_result = yy_action_20(_last_pos, _args[0:1]) - let _sub_action_1_result = yy_action_223(_args[3].2, _args[4:4]) + let _sub_action_1_result = yy_action_227(_args[3].2, _args[4:4]) guard _sub_action_1_result is YYObj_Option__list_List_Type__(_dollar5) guard _args[2].0 is YYObj_Type(_dollar3) guard _args[6].0 is YYObj__Type__ErrorType_(_dollar8) @@ -3276,10 +3358,10 @@ fn yy_action_222(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.P } // file:///./mbti_parser.mbty -// 378| is_async "(" type_ "," ioption(separated_nonempty_list(",", type_)) ")" "->" return_type { Arrow(args=$5.unwrap_or(@list.empty()).add($3), res=$8.0, err=$8.1, is_async=$1, loc=mk_loc($sloc)) } -fn yy_action_224(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { +// 387| is_async "(" type_ "," ioption(separated_nonempty_list(",", type_)) ")" "->" return_type { Arrow(args=$5.unwrap_or(@list.empty()).add($3), res=$8.0, err=$8.1, is_async=$1, loc=mk_loc($sloc)) } +fn yy_action_228(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { let _sub_action_0_result = yy_action_20(_last_pos, _args[0:1]) - let _sub_action_1_result = yy_action_225(_args[3].2, _args[4:5]) + let _sub_action_1_result = yy_action_229(_args[3].2, _args[4:5]) guard _sub_action_1_result is YYObj_Option__list_List_Type__(_dollar5) guard _args[2].0 is YYObj_Type(_dollar3) guard _args[7].0 is YYObj__Type__ErrorType_(_dollar8) @@ -3290,8 +3372,8 @@ fn yy_action_224(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.P } // file:///./mbti_parser.mbty -// 380| is_async "(" type_ ")" "->" return_type { Arrow(args=@list.singleton($3), res=$6.0, err=$6.1, is_async=$1, loc=mk_loc($sloc)) } -fn yy_action_226(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { +// 389| is_async "(" type_ ")" "->" return_type { Arrow(args=@list.singleton($3), res=$6.0, err=$6.1, is_async=$1, loc=mk_loc($sloc)) } +fn yy_action_230(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { let _sub_action_0_result = yy_action_20(_last_pos, _args[0:1]) guard _args[2].0 is YYObj_Type(_dollar3) guard _args[5].0 is YYObj__Type__ErrorType_(_dollar6) @@ -3302,8 +3384,8 @@ fn yy_action_226(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.P } // file:///./mbti_parser.mbty -// 371| qualified_uident_ optional_type_arguments { Name(constr_id=$1, tys=$2, loc=mk_loc($sloc)) } -fn yy_action_227(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { +// 380| qualified_uident_ optional_type_arguments { Name(constr_id=$1, tys=$2, loc=mk_loc($sloc)) } +fn yy_action_231(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { guard _args[0].0 is YYObj_ConstrId(_dollar1) guard _args[1].0 is YYObj__list_List_Type_(_dollar2) let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) @@ -3312,25 +3394,25 @@ fn yy_action_227(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.P } // file:///./mbti_parser.mbty -// 399| delimited("[", separated_nonempty_list(",", type_), "]") { $1 } -fn yy_action_228(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { - let _sub_action_0_result = yy_action_229(_last_pos, _args[0:3]) +// 408| delimited("[", separated_nonempty_list(",", type_), "]") { $1 } +fn yy_action_232(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { + let _sub_action_0_result = yy_action_233(_last_pos, _args[0:3]) guard _sub_action_0_result is YYObj__list_List_Type_(_dollar1) YYObj__list_List_Type_({(); _dollar1 }) } // file:///./stdlib.mbty // 40| L X R { $2 } -fn yy_action_229(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { +fn yy_action_233(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { guard _args[1].0 is YYObj__list_List_Type_(_dollar2) YYObj__list_List_Type_({(); _dollar2 }) } // file:///./mbti_parser.mbty -// 378| is_async "(" type_ "," ioption(separated_nonempty_list(",", type_)) ")" "->" return_type { Arrow(args=$5.unwrap_or(@list.empty()).add($3), res=$8.0, err=$8.1, is_async=$1, loc=mk_loc($sloc)) } -fn yy_action_230(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { +// 387| is_async "(" type_ "," ioption(separated_nonempty_list(",", type_)) ")" "->" return_type { Arrow(args=$5.unwrap_or(@list.empty()).add($3), res=$8.0, err=$8.1, is_async=$1, loc=mk_loc($sloc)) } +fn yy_action_234(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { let _sub_action_0_result = yy_action_23(_last_pos, _args[0:0]) - let _sub_action_1_result = yy_action_225(_args[2].2, _args[3:4]) + let _sub_action_1_result = yy_action_229(_args[2].2, _args[3:4]) guard _sub_action_1_result is YYObj_Option__list_List_Type__(_dollar5) guard _args[1].0 is YYObj_Type(_dollar3) guard _args[6].0 is YYObj__Type__ErrorType_(_dollar8) @@ -3342,14 +3424,14 @@ fn yy_action_230(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.P // file:///./stdlib.mbty // 10| X { Some($1) } -fn yy_action_225(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { +fn yy_action_229(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { guard _args[0].0 is YYObj__list_List_Type_(_dollar1) YYObj_Option__list_List_Type__({(); Some(_dollar1) }) } // file:///./mbti_parser.mbty -// 369| "(" type_ "," separated_nonempty_list(",", type_) ")" { Tuple(tys=$4.add($2), loc=mk_loc($sloc)) } -fn yy_action_231(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { +// 378| "(" type_ "," separated_nonempty_list(",", type_) ")" { Tuple(tys=$4.add($2), loc=mk_loc($sloc)) } +fn yy_action_235(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { guard _args[3].0 is YYObj__list_List_Type_(_dollar4) guard _args[1].0 is YYObj_Type(_dollar2) let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) @@ -3358,10 +3440,10 @@ fn yy_action_231(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.P } // file:///./mbti_parser.mbty -// 378| is_async "(" type_ "," ioption(separated_nonempty_list(",", type_)) ")" "->" return_type { Arrow(args=$5.unwrap_or(@list.empty()).add($3), res=$8.0, err=$8.1, is_async=$1, loc=mk_loc($sloc)) } -fn yy_action_232(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { +// 387| is_async "(" type_ "," ioption(separated_nonempty_list(",", type_)) ")" "->" return_type { Arrow(args=$5.unwrap_or(@list.empty()).add($3), res=$8.0, err=$8.1, is_async=$1, loc=mk_loc($sloc)) } +fn yy_action_236(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { let _sub_action_0_result = yy_action_23(_last_pos, _args[0:0]) - let _sub_action_1_result = yy_action_223(_args[2].2, _args[3:3]) + let _sub_action_1_result = yy_action_227(_args[2].2, _args[3:3]) guard _sub_action_1_result is YYObj_Option__list_List_Type__(_dollar5) guard _args[1].0 is YYObj_Type(_dollar3) guard _args[5].0 is YYObj__Type__ErrorType_(_dollar8) @@ -3373,13 +3455,13 @@ fn yy_action_232(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.P // file:///./stdlib.mbty // 9| { None } -fn yy_action_223(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { +fn yy_action_227(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { YYObj_Option__list_List_Type__({(); None }) } // file:///./mbti_parser.mbty -// 380| is_async "(" type_ ")" "->" return_type { Arrow(args=@list.singleton($3), res=$6.0, err=$6.1, is_async=$1, loc=mk_loc($sloc)) } -fn yy_action_233(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { +// 389| is_async "(" type_ ")" "->" return_type { Arrow(args=@list.singleton($3), res=$6.0, err=$6.1, is_async=$1, loc=mk_loc($sloc)) } +fn yy_action_237(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { let _sub_action_0_result = yy_action_23(_last_pos, _args[0:0]) guard _args[1].0 is YYObj_Type(_dollar3) guard _args[4].0 is YYObj__Type__ErrorType_(_dollar6) @@ -3390,15 +3472,15 @@ fn yy_action_233(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.P } // file:///./mbti_parser.mbty -// 370| "(" type_ ")" { $2 } -fn yy_action_234(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { +// 379| "(" type_ ")" { $2 } +fn yy_action_238(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { guard _args[1].0 is YYObj_Type(_dollar2) YYObj_Type({(); _dollar2 }) } // file:///./mbti_parser.mbty -// 368| simple_type "?" { Option(ty=$1, loc=mk_loc($sloc), question_loc=mk_loc($loc($2))) } -fn yy_action_235(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { +// 377| simple_type "?" { Option(ty=$1, loc=mk_loc($sloc), question_loc=mk_loc($loc($2))) } +fn yy_action_239(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { guard _args[0].0 is YYObj_Type(_dollar1) let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } @@ -3408,8 +3490,8 @@ fn yy_action_235(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.P } // file:///./mbti_parser.mbty -// 385| simple_type "noraise" { ($1, Noraise(loc=mk_loc($sloc))) } -fn yy_action_236(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { +// 394| simple_type "noraise" { ($1, Noraise(loc=mk_loc($sloc))) } +fn yy_action_240(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { guard _args[0].0 is YYObj_Type(_dollar1) let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } @@ -3417,19 +3499,19 @@ fn yy_action_236(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.P } // file:///./mbti_parser.mbty -// 387| simple_type "raise" error_type { ($1, ErrorType(ty = $3)) } -fn yy_action_237(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { +// 396| simple_type "raise" error_type { ($1, ErrorType(ty = $3)) } +fn yy_action_241(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { guard _args[0].0 is YYObj_Type(_dollar1) guard _args[2].0 is YYObj_Type(_dollar3) YYObj__Type__ErrorType_({(); (_dollar1, ErrorType(ty = _dollar3)) }) } // file:///./mbti_parser.mbty -// 388| simple_type "raise" "?" { -// 389| let fake_error : Type = Name(constr_id={ id : QualifiedIdent::Ident(name="Error"), loc :@syntax.no_location }, tys=@list.empty(), loc=@syntax.no_location) -// 390| ($1, MaybeError(ty=fake_error)) -// 391| } -fn yy_action_238(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { +// 397| simple_type "raise" "?" { +// 398| let fake_error : Type = Name(constr_id={ id : QualifiedIdent::Ident(name="Error"), loc :@syntax.no_location }, tys=@list.empty(), loc=@syntax.no_location) +// 399| ($1, MaybeError(ty=fake_error)) +// 400| } +fn yy_action_242(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { guard _args[0].0 is YYObj_Type(_dollar1) YYObj__Type__ErrorType_({(); let fake_error : Type = Name(constr_id={ id : QualifiedIdent::Ident(name="Error"), loc :@syntax.no_location }, tys=@list.empty(), loc=@syntax.no_location) @@ -3438,8 +3520,8 @@ fn yy_action_238(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.P } // file:///./mbti_parser.mbty -// 395| qualified_uident_ { Name(constr_id=$1, tys=@list.empty(), loc=mk_loc($sloc)) } -fn yy_action_239(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { +// 404| qualified_uident_ { Name(constr_id=$1, tys=@list.empty(), loc=mk_loc($sloc)) } +fn yy_action_243(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { guard _args[0].0 is YYObj_ConstrId(_dollar1) let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } @@ -3447,8 +3529,8 @@ fn yy_action_239(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.P } // file:///./mbti_parser.mbty -// 386| simple_type "raise" { ($1, DefaultErrorType(loc=mk_loc($loc($2)))) } -fn yy_action_240(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { +// 395| simple_type "raise" { ($1, DefaultErrorType(loc=mk_loc($loc($2)))) } +fn yy_action_244(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { guard _args[0].0 is YYObj_Type(_dollar1) let _start_pos_of_item1 = _args[1].1 let _end_pos_of_item1 = _args[1].2 @@ -3456,15 +3538,15 @@ fn yy_action_240(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.P } // file:///./mbti_parser.mbty -// 377| simple_type { $1 } -fn yy_action_241(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { +// 386| simple_type { $1 } +fn yy_action_245(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { guard _args[0].0 is YYObj_Type(_dollar1) YYObj_Type({(); _dollar1 }) } // file:///./mbti_parser.mbty -// 379| is_async "(" ")" "->" return_type { Arrow(args=@list.empty(), res=$5.0, err=$5.1, is_async=$1, loc=mk_loc($sloc)) } -fn yy_action_242(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { +// 388| is_async "(" ")" "->" return_type { Arrow(args=@list.empty(), res=$5.0, err=$5.1, is_async=$1, loc=mk_loc($sloc)) } +fn yy_action_246(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { let _sub_action_0_result = yy_action_23(_last_pos, _args[0:0]) guard _args[3].0 is YYObj__Type__ErrorType_(_dollar5) guard _sub_action_0_result is YYObj_Location_(_dollar1) @@ -3474,14 +3556,14 @@ fn yy_action_242(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.P } // file:///./mbti_parser.mbty -// 438| { None } +// 447| { None } fn yy_action_23(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { YYObj_Location_({(); None }) } // file:///./stdlib.mbty // 60| X SEP separated_nonempty_list(SEP, X) { $3.add($1) } -fn yy_action_243(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { +fn yy_action_247(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { guard _args[2].0 is YYObj__list_List_Type_(_dollar3) guard _args[0].0 is YYObj_Type(_dollar1) YYObj__list_List_Type_({(); _dollar3.add(_dollar1) }) @@ -3489,35 +3571,35 @@ fn yy_action_243(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.P // file:///./stdlib.mbty // 59| X { @list.singleton($1) } -fn yy_action_244(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { +fn yy_action_248(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { guard _args[0].0 is YYObj_Type(_dollar1) YYObj__list_List_Type_({(); @list.singleton(_dollar1) }) } // file:///./mbti_parser.mbty -// 400| { @list.empty() } -fn yy_action_245(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { +// 409| { @list.empty() } +fn yy_action_249(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { YYObj__list_List_Type_({(); @list.empty() }) } // file:///./mbti_parser.mbty -// 372| "&" qualified_uident_ { Object($2) } -fn yy_action_246(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { +// 381| "&" qualified_uident_ { Object($2) } +fn yy_action_250(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { guard _args[1].0 is YYObj_ConstrId(_dollar2) YYObj_Type({(); Object(_dollar2) }) } // file:///./mbti_parser.mbty -// 373| "_" { Any(loc=mk_loc($sloc)) } -fn yy_action_247(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { +// 382| "_" { Any(loc=mk_loc($sloc)) } +fn yy_action_251(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } YYObj_Type({(); Any(loc=mk_loc((_symbol_start_pos, _end_pos))) }) } // file:///./mbti_parser.mbty -// 379| is_async "(" ")" "->" return_type { Arrow(args=@list.empty(), res=$5.0, err=$5.1, is_async=$1, loc=mk_loc($sloc)) } -fn yy_action_248(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { +// 388| is_async "(" ")" "->" return_type { Arrow(args=@list.empty(), res=$5.0, err=$5.1, is_async=$1, loc=mk_loc($sloc)) } +fn yy_action_252(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { let _sub_action_0_result = yy_action_20(_last_pos, _args[0:1]) guard _args[4].0 is YYObj__Type__ErrorType_(_dollar5) guard _sub_action_0_result is YYObj_Location_(_dollar1) @@ -3527,7 +3609,7 @@ fn yy_action_248(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.P } // file:///./mbti_parser.mbty -// 437| "async" { Some(mk_loc($loc($1))) } +// 446| "async" { Some(mk_loc($loc($1))) } fn yy_action_20(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { let _start_pos_of_item0 = _args[0].1 let _end_pos_of_item0 = _args[0].2 @@ -3535,23 +3617,23 @@ fn yy_action_20(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Po } // file:///./mbti_parser.mbty -// 384| type_ { ($1, NoErrorType) } -fn yy_action_249(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { +// 393| type_ { ($1, NoErrorType) } +fn yy_action_253(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { guard _args[0].0 is YYObj_Type(_dollar1) YYObj__Type__ErrorType_({(); (_dollar1, NoErrorType) }) } // file:///./mbti_parser.mbty -// 406| label "?" ":" type_ { QuestionOptional(binder = { name : $1.name, loc : $1.loc }, ty = Some($4)) } -fn yy_action_250(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { +// 415| label "?" ":" type_ { QuestionOptional(binder = { name : $1.name, loc : $1.loc }, ty = Some($4)) } +fn yy_action_254(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { guard _args[0].0 is YYObj_Label(_dollar1) guard _args[3].0 is YYObj_Type(_dollar4) YYObj_Parameter({(); QuestionOptional(binder = { name : _dollar1.name, loc : _dollar1.loc }, ty = Some(_dollar4)) }) } // file:///./mbti_parser.mbty -// 447| UIDENT { ConstrId::{ id: Ident(name=$1), loc: mk_loc($sloc)} } -fn yy_action_251(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { +// 456| UIDENT { ConstrId::{ id: Ident(name=$1), loc: mk_loc($sloc)} } +fn yy_action_255(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { guard _args[0].0 is YYObj_String(_dollar1) let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } @@ -3559,8 +3641,8 @@ fn yy_action_251(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.P } // file:///./mbti_parser.mbty -// 448| PACKAGE_NAME DOT_UIDENT { ConstrId::{ id: Dot(pkg=$1, id=$2), loc: mk_loc($sloc)} } -fn yy_action_252(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { +// 457| PACKAGE_NAME DOT_UIDENT { ConstrId::{ id: Dot(pkg=$1, id=$2), loc: mk_loc($sloc)} } +fn yy_action_256(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { guard _args[0].0 is YYObj_String(_dollar1) guard _args[1].0 is YYObj_String(_dollar2) let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) @@ -3569,17 +3651,15 @@ fn yy_action_252(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.P } // file:///./mbti_parser.mbty -// 460| LIDENT { Label::{name: $1, loc: mk_loc($sloc)} } -fn yy_action_253(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { - guard _args[0].0 is YYObj_String(_dollar1) - let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) - let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - YYObj_Label({(); Label::{name: _dollar1, loc: mk_loc((_symbol_start_pos, _end_pos))} }) +// 470| lident { Label::{name: $1.name, loc: $1.loc} } +fn yy_action_257(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { + guard _args[0].0 is YYObj_Name(_dollar1) + YYObj_Label({(); Label::{name: _dollar1.name, loc: _dollar1.loc} }) } // file:///./stdlib.mbty // 60| X SEP separated_nonempty_list(SEP, X) { $3.add($1) } -fn yy_action_254(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { +fn yy_action_258(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { guard _args[2].0 is YYObj__list_List_Parameter_(_dollar3) guard _args[0].0 is YYObj_Parameter(_dollar1) YYObj__list_List_Parameter_({(); _dollar3.add(_dollar1) }) @@ -3587,20 +3667,20 @@ fn yy_action_254(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.P // file:///./stdlib.mbty // 59| X { @list.singleton($1) } -fn yy_action_255(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { +fn yy_action_259(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { guard _args[0].0 is YYObj_Parameter(_dollar1) YYObj__list_List_Parameter_({(); @list.singleton(_dollar1) }) } // file:///./stdlib.mbty // 54| { @list.empty() } -fn yy_action_256(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { +fn yy_action_260(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { YYObj__list_List_Parameter_({(); @list.empty() }) } // file:///./stdlib.mbty // 60| X SEP separated_nonempty_list(SEP, X) { $3.add($1) } -fn yy_action_257(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { +fn yy_action_261(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { guard _args[2].0 is YYObj__list_List_TraitMethodSig_(_dollar3) guard _args[0].0 is YYObj_TraitMethodSig(_dollar1) YYObj__list_List_TraitMethodSig_({(); _dollar3.add(_dollar1) }) @@ -3608,26 +3688,26 @@ fn yy_action_257(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.P // file:///./stdlib.mbty // 59| X { @list.singleton($1) } -fn yy_action_258(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { +fn yy_action_262(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { guard _args[0].0 is YYObj_TraitMethodSig(_dollar1) YYObj__list_List_TraitMethodSig_({(); @list.singleton(_dollar1) }) } // file:///./stdlib.mbty // 54| { @list.empty() } -fn yy_action_259(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { +fn yy_action_263(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { YYObj__list_List_TraitMethodSig_({(); @list.empty() }) } // file:///./mbti_parser.mbty -// 271| { @list.empty() } -fn yy_action_260(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { +// 280| { @list.empty() } +fn yy_action_264(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { YYObj__list_List_TraitMethodSig_({(); @list.empty() }) } // file:///./mbti_parser.mbty -// 442| UIDENT { QualifiedName::{ name: Ident(name=$1), loc: mk_loc($sloc)} } -fn yy_action_261(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { +// 451| UIDENT { QualifiedName::{ name: Ident(name=$1), loc: mk_loc($sloc)} } +fn yy_action_265(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { guard _args[0].0 is YYObj_String(_dollar1) let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } @@ -3635,8 +3715,8 @@ fn yy_action_261(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.P } // file:///./mbti_parser.mbty -// 443| PACKAGE_NAME DOT_UIDENT { QualifiedName::{ name: Dot(pkg=$1, id=$2), loc: mk_loc($sloc)} } -fn yy_action_262(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { +// 452| PACKAGE_NAME DOT_UIDENT { QualifiedName::{ name: Dot(pkg=$1, id=$2), loc: mk_loc($sloc)} } +fn yy_action_266(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { guard _args[0].0 is YYObj_String(_dollar1) guard _args[1].0 is YYObj_String(_dollar2) let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) @@ -3646,7 +3726,7 @@ fn yy_action_262(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.P // file:///./stdlib.mbty // 60| X SEP separated_nonempty_list(SEP, X) { $3.add($1) } -fn yy_action_263(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { +fn yy_action_267(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { guard _args[2].0 is YYObj__list_List_QualifiedName_(_dollar3) guard _args[0].0 is YYObj_QualifiedName(_dollar1) YYObj__list_List_QualifiedName_({(); _dollar3.add(_dollar1) }) @@ -3654,37 +3734,37 @@ fn yy_action_263(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.P // file:///./stdlib.mbty // 59| X { @list.singleton($1) } -fn yy_action_264(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { +fn yy_action_268(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { guard _args[0].0 is YYObj_QualifiedName(_dollar1) YYObj__list_List_QualifiedName_({(); @list.singleton(_dollar1) }) } // file:///./stdlib.mbty // 15| X { $1 } -fn yy_action_265(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { - let _sub_action_0_result = yy_action_266(_last_pos, _args[0:2]) +fn yy_action_269(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { + let _sub_action_0_result = yy_action_270(_last_pos, _args[0:2]) guard _sub_action_0_result is YYObj__list_List_QualifiedName_(_dollar1) YYObj__list_List_QualifiedName_({(); _dollar1 }) } // file:///./stdlib.mbty // 32| L X { $2 } -fn yy_action_266(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { +fn yy_action_270(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { guard _args[1].0 is YYObj__list_List_QualifiedName_(_dollar2) YYObj__list_List_QualifiedName_({(); _dollar2 }) } // file:///./stdlib.mbty // 14| { @list.empty() } -fn yy_action_267(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { +fn yy_action_271(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { YYObj__list_List_QualifiedName_({(); @list.empty() }) } // file:///./mbti_parser.mbty -// 284| attributes vis "fnalias" uident "::" lident { -// 285| FuncAlias(attrs = $1,name=$6, type_name=$4) -// 286| } -fn yy_action_268(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { +// 293| attributes vis "fnalias" uident "::" lident { +// 294| FuncAlias(attrs = $1,name=$6, type_name=$4) +// 295| } +fn yy_action_272(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { let _sub_action_0_result = yy_action_14(_last_pos, _args[0:0]) let _sub_action_1_result = yy_action_15(_last_pos, _args[0:0]) guard _sub_action_0_result is YYObj__list_List_Attribute_(_dollar1) @@ -3696,8 +3776,8 @@ fn yy_action_268(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.P } // file:///./mbti_parser.mbty -// 456| LIDENT { Name::{name: $1, loc: mk_loc($sloc)} } -fn yy_action_269(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { +// 465| LIDENT { Name::{name: $1, loc: mk_loc($sloc)} } +fn yy_action_273(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { guard _args[0].0 is YYObj_String(_dollar1) let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } @@ -3705,11 +3785,19 @@ fn yy_action_269(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.P } // file:///./mbti_parser.mbty -// 287| attributes vis "using" PACKAGE_NAME "{" "type" uident using_binder "}" { -// 288| let pkg = Name::{ name : $4, loc : mk_loc($loc($4)) } -// 289| Using(pkg~, target = $7, name = $8, kind = Type, attrs = $1) -// 290| } -fn yy_action_270(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { +// 466| "extend" { Name::{name: "extend", loc: mk_loc($sloc)} } +fn yy_action_274(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { + let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) + let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } + YYObj_Name({(); Name::{name: "extend", loc: mk_loc((_symbol_start_pos, _end_pos))} }) +} + +// file:///./mbti_parser.mbty +// 296| attributes vis "using" PACKAGE_NAME "{" "type" uident using_binder "}" { +// 297| let pkg = Name::{ name : $4, loc : mk_loc($loc($4)) } +// 298| Using(pkg~, target = $7, name = $8, kind = Type, attrs = $1) +// 299| } +fn yy_action_275(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { let _sub_action_0_result = yy_action_14(_last_pos, _args[0:0]) let _sub_action_1_result = yy_action_15(_last_pos, _args[0:0]) guard _args[1].0 is YYObj_String(_dollar4) @@ -3725,18 +3813,18 @@ fn yy_action_270(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.P } // file:///./mbti_parser.mbty -// 277| "as" uident { Some($2) } -fn yy_action_271(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { +// 286| "as" uident { Some($2) } +fn yy_action_276(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { guard _args[1].0 is YYObj_Name(_dollar2) YYObj_Name_({(); Some(_dollar2) }) } // file:///./mbti_parser.mbty -// 291| attributes vis "using" PACKAGE_NAME "{" "trait" uident using_binder "}" { -// 292| let pkg = Name::{ name : $4, loc : mk_loc($loc($4)) } -// 293| Using(pkg~, target = $7, name = $8, kind = Trait, attrs = $1) -// 294| } -fn yy_action_272(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { +// 300| attributes vis "using" PACKAGE_NAME "{" "trait" uident using_binder "}" { +// 301| let pkg = Name::{ name : $4, loc : mk_loc($loc($4)) } +// 302| Using(pkg~, target = $7, name = $8, kind = Trait, attrs = $1) +// 303| } +fn yy_action_277(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { let _sub_action_0_result = yy_action_14(_last_pos, _args[0:0]) let _sub_action_1_result = yy_action_15(_last_pos, _args[0:0]) guard _args[1].0 is YYObj_String(_dollar4) @@ -3752,26 +3840,26 @@ fn yy_action_272(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.P } // file:///./mbti_parser.mbty -// 425| { Default } +// 434| { Default } fn yy_action_15(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { YYObj_Visibility({(); Default }) } // file:///./mbti_parser.mbty -// 468| { @list.empty() } +// 478| { @list.empty() } fn yy_action_14(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { YYObj__list_List_Attribute_({(); @list.empty() }) } // file:///./mbti_parser.mbty -// 276| { None } -fn yy_action_273(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { +// 285| { None } +fn yy_action_278(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { YYObj_Name_({(); None }) } // file:///./mbti_parser.mbty -// 452| UIDENT { Name::{name: $1, loc: mk_loc($sloc)} } -fn yy_action_274(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { +// 461| UIDENT { Name::{name: $1, loc: mk_loc($sloc)} } +fn yy_action_279(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { guard _args[0].0 is YYObj_String(_dollar1) let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } @@ -3780,8 +3868,8 @@ fn yy_action_274(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.P // file:///./stdlib.mbty // 50| X nonempty_list(X) { $2.add($1) } -fn yy_action_275(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { - let _sub_action_0_result = yy_action_276(_last_pos, _args[0:1]) +fn yy_action_280(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { + let _sub_action_0_result = yy_action_281(_last_pos, _args[0:1]) guard _args[1].0 is YYObj__list_List_Attribute_(_dollar2) guard _sub_action_0_result is YYObj_Attribute(_dollar1) YYObj__list_List_Attribute_({(); _dollar2.add(_dollar1) }) @@ -3789,15 +3877,15 @@ fn yy_action_275(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.P // file:///./stdlib.mbty // 49| X { @list.singleton($1) } -fn yy_action_277(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { - let _sub_action_0_result = yy_action_276(_last_pos, _args[0:1]) +fn yy_action_282(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { + let _sub_action_0_result = yy_action_281(_last_pos, _args[0:1]) guard _sub_action_0_result is YYObj_Attribute(_dollar1) YYObj__list_List_Attribute_({(); @list.singleton(_dollar1) }) } // file:///./mbti_parser.mbty -// 473| ATTRIBUTE { Attribute::new(loc=mk_loc($sloc), $1) } -fn yy_action_276(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { +// 483| ATTRIBUTE { Attribute::new(loc=mk_loc($sloc), $1) } +fn yy_action_281(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } guard _args[0].0 is YYObj__String__Option_String___String_(_dollar1) @@ -3805,43 +3893,43 @@ fn yy_action_276(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.P } // file:///./mbti_parser.mbty -// 157| { @list.empty() } -fn yy_action_278(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { +// 163| { @list.empty() } +fn yy_action_283(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { YYObj__list_List__Sig__Location__({(); @list.empty() }) } // file:///./mbti_parser.mbty -// 148| "import" "{" non_empty_list_commas(package_import) "}" ";" { $3 } -fn yy_action_279(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { +// 154| "import" "{" non_empty_list_commas(package_import) "}" ";" { $3 } +fn yy_action_284(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { guard _args[2].0 is YYObj__list_List_PackageImport_(_dollar3) YYObj__list_List_PackageImport_({(); _dollar3 }) } // file:///./mbti_parser.mbty -// 139| non_empty_list_commas_rev(X) option(",") { $1.rev() } -fn yy_action_280(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { +// 145| non_empty_list_commas_rev(X) option(",") { $1.rev() } +fn yy_action_285(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { guard _args[0].0 is YYObj__list_List_PackageImport_(_dollar1) YYObj__list_List_PackageImport_({(); _dollar1.rev() }) } // file:///./mbti_parser.mbty -// 153| STRING "as" PACKAGE_NAME { PackageImport::{name: $1, alias_: Some($3)} } -fn yy_action_281(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { +// 159| STRING "as" PACKAGE_NAME { PackageImport::{name: $1, alias_: Some($3)} } +fn yy_action_286(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { guard _args[0].0 is YYObj_StringLiteral(_dollar1) guard _args[2].0 is YYObj_String(_dollar3) YYObj_PackageImport({(); PackageImport::{name: _dollar1, alias_: Some(_dollar3)} }) } // file:///./mbti_parser.mbty -// 152| STRING { PackageImport::{name: $1, alias_: None} } -fn yy_action_282(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { +// 158| STRING { PackageImport::{name: $1, alias_: None} } +fn yy_action_287(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { guard _args[0].0 is YYObj_StringLiteral(_dollar1) YYObj_PackageImport({(); PackageImport::{name: _dollar1, alias_: None} }) } // file:///./mbti_parser.mbty -// 135| non_empty_list_commas_rev(X) "," X { $1.add($3) } -fn yy_action_283(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { +// 141| non_empty_list_commas_rev(X) "," X { $1.add($3) } +fn yy_action_288(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { guard _args[0].0 is YYObj__list_List_PackageImport_(_dollar1) guard _args[2].0 is YYObj_PackageImport(_dollar3) YYObj__list_List_PackageImport_({(); _dollar1.add(_dollar3) }) @@ -3849,27 +3937,27 @@ fn yy_action_283(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.P // file:///./stdlib.mbty // 5| X { Some($1) } -fn yy_action_284(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { +fn yy_action_289(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { let _dollar1 = () YYObj_Option_Unit_({(); Some(_dollar1) }) } // file:///./stdlib.mbty // 4| { None } -fn yy_action_285(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { +fn yy_action_290(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { YYObj_Option_Unit_({(); None }) } // file:///./mbti_parser.mbty -// 134| X { @list.singleton($1) } -fn yy_action_286(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { +// 140| X { @list.singleton($1) } +fn yy_action_291(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { guard _args[0].0 is YYObj_PackageImport(_dollar1) YYObj__list_List_PackageImport_({(); @list.singleton(_dollar1) }) } // file:///./mbti_parser.mbty -// 147| { @list.empty() } -fn yy_action_287(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { +// 153| { @list.empty() } +fn yy_action_292(_last_pos : @basic.Position, _args : ArrayView[(YYObj, @basic.Position, @basic.Position)]) -> YYObj { YYObj__list_List_PackageImport_({(); @list.empty() }) } @@ -3885,6 +3973,7 @@ fn yy_input(token : Token, _start_pos : @basic.Position, _end_pos : @basic.Posit MULTILINE_STRING(data) => (T_MULTILINE_STRING, YYObj_String(data)) MULTILINE_INTERP(data) => (T_MULTILINE_INTERP, YYObj_InterpLiteral(data)) INTERP(data) => (T_INTERP, YYObj_InterpLiteral(data)) + BYTES_INTERP(data) => (T_BYTES_INTERP, YYObj_InterpLiteral(data)) REGEX_LITERAL(data) => (T_REGEX_LITERAL, YYObj_String(data)) REGEX_INTERP(data) => (T_REGEX_INTERP, YYObj_InterpLiteral(data)) ATTRIBUTE(data) => (T_ATTRIBUTE, YYObj__String__Option_String___String_(data)) @@ -3939,8 +4028,10 @@ fn yy_input(token : Token, _start_pos : @basic.Position, _end_pos : @basic.Posit COLON => (T_COLON, YYObj_Void) SEMI(data) => (T_SEMI, YYObj_Bool(data)) LBRACKET => (T_LBRACKET, YYObj_Void) + LBRACKET_BAR => (T_LBRACKET_BAR, YYObj_Void) PLUS => (T_PLUS, YYObj_Void) RBRACKET => (T_RBRACKET, YYObj_Void) + BAR_RBRACKET => (T_BAR_RBRACKET, YYObj_Void) UNDERSCORE => (T_UNDERSCORE, YYObj_Void) BAR => (T_BAR, YYObj_Void) LBRACE => (T_LBRACE, YYObj_Void) @@ -3954,6 +4045,7 @@ fn yy_input(token : Token, _start_pos : @basic.Position, _end_pos : @basic.Posit PIPE => (T_PIPE, YYObj_Void) PIPE_LEFT => (T_PIPE_LEFT, YYObj_Void) LT_PLUS => (T_LT_PLUS, YYObj_Void) + LT_QUESTION => (T_LT_QUESTION, YYObj_Void) ELSE => (T_ELSE, YYObj_Void) FN => (T_FN, YYObj_Void) IF => (T_IF, YYObj_Void) @@ -3999,13 +4091,15 @@ fn yy_input(token : Token, _start_pos : @basic.Position, _end_pos : @basic.Posit TRY_EXCLAMATION => (T_TRY_EXCLAMATION, YYObj_Void) LEXMATCH => (T_LEXMATCH, YYObj_Void) LEXMATCH_QUESTION => (T_LEXMATCH_QUESTION, YYObj_Void) + LEXSCAN => (T_LEXSCAN, YYObj_Void) + EXTEND => (T_EXTEND, YYObj_Void) PACKAGE => (T_PACKAGE, YYObj_Void) } } // [0, mbti → • PACKAGE STRING imports sigs EOF, $] // [1, mbti → • PACKAGE STRING SEMI imports sigs EOF, $] -// [272, mbti_prime → • mbti, $] +// [277, mbti_prime → • mbti, $] fn yy_state_0(_lookahead : YYSymbol) -> YYDecision { match _lookahead { NT_mbti => Shift(yy_state_1) @@ -4014,7 +4108,7 @@ fn yy_state_0(_lookahead : YYSymbol) -> YYDecision { } } -// [272, mbti_prime → mbti •, $] +// [277, mbti_prime → mbti •, $] fn yy_state_1(_lookahead : YYSymbol) -> YYDecision { Accept } @@ -4036,8 +4130,8 @@ fn yy_state_3(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_IMPORT => Shift(yy_state_4) T_SEMI => Shift(yy_state_17) - NT_imports => Shift(yy_state_835) - T_ATTRIBUTE | T_EOF | T_PUB | T_PRIV | T_STRUCT | T_ENUM | T_TRAIT | T_IMPL | T_ASYNC | T_FNALIAS | T_FN | T_LET | T_CONST | T_TYPE | T_SUBERROR | T_USING | T_EXTENUM => Reduce(0, NT_imports, yy_action_287) + NT_imports => Shift(yy_state_872) + T_ATTRIBUTE | T_EOF | T_PUB | T_PRIV | T_STRUCT | T_ENUM | T_TRAIT | T_IMPL | T_ASYNC | T_FNALIAS | T_FN | T_LET | T_CONST | T_TYPE | T_SUBERROR | T_USING | T_EXTENUM => Reduce(0, NT_imports, yy_action_292) _ => Error } } @@ -4053,9 +4147,9 @@ fn yy_state_4(_lookahead : YYSymbol) -> YYDecision { // [3, imports → IMPORT LBRACE • non_empty_list_commas(package_import) RBRACE SEMI, ATTRIBUTE / EOF / PUB / PRIV / STRUCT / ENUM / TRAIT / IMPL / ASYNC / FNALIAS / FN / LET / CONST / TYPE / SUBERROR / USING / EXTENUM] // [4, package_import → • STRING, COMMA / RBRACE] // [5, package_import → • STRING AS PACKAGE_NAME, COMMA / RBRACE] -// [216, non_empty_list_commas(package_import) → • non_empty_list_commas_rev(package_import) option(COMMA), RBRACE] -// [254, non_empty_list_commas_rev(package_import) → • package_import, COMMA / RBRACE] -// [255, non_empty_list_commas_rev(package_import) → • non_empty_list_commas_rev(package_import) COMMA package_import, COMMA / RBRACE] +// [221, non_empty_list_commas(package_import) → • non_empty_list_commas_rev(package_import) option(COMMA), RBRACE] +// [259, non_empty_list_commas_rev(package_import) → • package_import, COMMA / RBRACE] +// [260, non_empty_list_commas_rev(package_import) → • non_empty_list_commas_rev(package_import) COMMA package_import, COMMA / RBRACE] fn yy_state_5(_lookahead : YYSymbol) -> YYDecision { match _lookahead { NT_package_import => Shift(yy_state_6) @@ -4066,40 +4160,40 @@ fn yy_state_5(_lookahead : YYSymbol) -> YYDecision { } } -// [254, non_empty_list_commas_rev(package_import) → package_import •, COMMA / RBRACE] +// [259, non_empty_list_commas_rev(package_import) → package_import •, COMMA / RBRACE] fn yy_state_6(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_non_empty_list_commas_rev_package_import_, yy_action_286) + ReduceNoLookahead(1, NT_non_empty_list_commas_rev_package_import_, yy_action_291) } -// [216, non_empty_list_commas(package_import) → non_empty_list_commas_rev(package_import) • option(COMMA), RBRACE] -// [255, non_empty_list_commas_rev(package_import) → non_empty_list_commas_rev(package_import) • COMMA package_import, COMMA / RBRACE] -// [256, option(COMMA) → •, RBRACE] -// [257, option(COMMA) → • COMMA, RBRACE] +// [221, non_empty_list_commas(package_import) → non_empty_list_commas_rev(package_import) • option(COMMA), RBRACE] +// [260, non_empty_list_commas_rev(package_import) → non_empty_list_commas_rev(package_import) • COMMA package_import, COMMA / RBRACE] +// [261, option(COMMA) → •, RBRACE] +// [262, option(COMMA) → • COMMA, RBRACE] fn yy_state_7(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_COMMA => Shift(yy_state_8) NT_option_COMMA_ => Shift(yy_state_13) - T_RBRACE => Reduce(0, NT_option_COMMA_, yy_action_285) + T_RBRACE => Reduce(0, NT_option_COMMA_, yy_action_290) _ => Error } } // [4, package_import → • STRING, COMMA / RBRACE] // [5, package_import → • STRING AS PACKAGE_NAME, COMMA / RBRACE] -// [255, non_empty_list_commas_rev(package_import) → non_empty_list_commas_rev(package_import) COMMA • package_import, COMMA / RBRACE] -// [257, option(COMMA) → COMMA •, RBRACE] +// [260, non_empty_list_commas_rev(package_import) → non_empty_list_commas_rev(package_import) COMMA • package_import, COMMA / RBRACE] +// [262, option(COMMA) → COMMA •, RBRACE] fn yy_state_8(_lookahead : YYSymbol) -> YYDecision { match _lookahead { NT_package_import => Shift(yy_state_9) T_STRING => Shift(yy_state_10) - T_RBRACE => Reduce(1, NT_option_COMMA_, yy_action_284) + T_RBRACE => Reduce(1, NT_option_COMMA_, yy_action_289) _ => Error } } -// [255, non_empty_list_commas_rev(package_import) → non_empty_list_commas_rev(package_import) COMMA package_import •, COMMA / RBRACE] +// [260, non_empty_list_commas_rev(package_import) → non_empty_list_commas_rev(package_import) COMMA package_import •, COMMA / RBRACE] fn yy_state_9(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_non_empty_list_commas_rev_package_import_, yy_action_283) + ReduceNoLookahead(3, NT_non_empty_list_commas_rev_package_import_, yy_action_288) } // [4, package_import → STRING •, COMMA / RBRACE] @@ -4107,7 +4201,7 @@ fn yy_state_9(_lookahead : YYSymbol) -> YYDecision { fn yy_state_10(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_AS => Shift(yy_state_11) - T_COMMA | T_RBRACE => Reduce(1, NT_package_import, yy_action_282) + T_COMMA | T_RBRACE => Reduce(1, NT_package_import, yy_action_287) _ => Error } } @@ -4122,12 +4216,12 @@ fn yy_state_11(_lookahead : YYSymbol) -> YYDecision { // [5, package_import → STRING AS PACKAGE_NAME •, COMMA / RBRACE] fn yy_state_12(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_package_import, yy_action_281) + ReduceNoLookahead(3, NT_package_import, yy_action_286) } -// [216, non_empty_list_commas(package_import) → non_empty_list_commas_rev(package_import) option(COMMA) •, RBRACE] +// [221, non_empty_list_commas(package_import) → non_empty_list_commas_rev(package_import) option(COMMA) •, RBRACE] fn yy_state_13(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(2, NT_non_empty_list_commas_package_import_, yy_action_280) + ReduceNoLookahead(2, NT_non_empty_list_commas_package_import_, yy_action_285) } // [3, imports → IMPORT LBRACE non_empty_list_commas(package_import) • RBRACE SEMI, ATTRIBUTE / EOF / PUB / PRIV / STRUCT / ENUM / TRAIT / IMPL / ASYNC / FNALIAS / FN / LET / CONST / TYPE / SUBERROR / USING / EXTENUM] @@ -4148,7 +4242,7 @@ fn yy_state_15(_lookahead : YYSymbol) -> YYDecision { // [3, imports → IMPORT LBRACE non_empty_list_commas(package_import) RBRACE SEMI •, ATTRIBUTE / EOF / PUB / PRIV / STRUCT / ENUM / TRAIT / IMPL / ASYNC / FNALIAS / FN / LET / CONST / TYPE / SUBERROR / USING / EXTENUM] fn yy_state_16(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(5, NT_imports, yy_action_279) + ReduceNoLookahead(5, NT_imports, yy_action_284) } // [1, mbti → PACKAGE STRING SEMI • imports sigs EOF, $] @@ -4158,7 +4252,7 @@ fn yy_state_17(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_IMPORT => Shift(yy_state_4) NT_imports => Shift(yy_state_18) - T_ATTRIBUTE | T_EOF | T_PUB | T_PRIV | T_STRUCT | T_ENUM | T_TRAIT | T_IMPL | T_ASYNC | T_FNALIAS | T_FN | T_LET | T_CONST | T_TYPE | T_SUBERROR | T_USING | T_EXTENUM => Reduce(0, NT_imports, yy_action_287) + T_ATTRIBUTE | T_EOF | T_PUB | T_PRIV | T_STRUCT | T_ENUM | T_TRAIT | T_IMPL | T_ASYNC | T_FNALIAS | T_FN | T_LET | T_CONST | T_TYPE | T_SUBERROR | T_USING | T_EXTENUM => Reduce(0, NT_imports, yy_action_292) _ => Error } } @@ -4198,151 +4292,151 @@ fn yy_state_17(_lookahead : YYSymbol) -> YYDecision { // [45, func_sig → • nonempty_list(attribute) PRIV FN loption(type_params_with_constraints) func_name LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type, EOF / SEMI] // [46, func_sig → • nonempty_list(attribute) PUB pub_attr ASYNC FN loption(type_params_with_constraints) func_name LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type, EOF / SEMI] // [47, func_sig → • nonempty_list(attribute) PUB pub_attr FN loption(type_params_with_constraints) func_name LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type, EOF / SEMI] -// [52, type_sig → • TYPE type_decl_name_with_params optional_derive, EOF / SEMI] -// [53, type_sig → • PRIV TYPE type_decl_name_with_params optional_derive, EOF / SEMI] -// [54, type_sig → • PUB pub_attr TYPE type_decl_name_with_params optional_derive, EOF / SEMI] -// [55, type_sig → • nonempty_list(attribute) TYPE type_decl_name_with_params optional_derive, EOF / SEMI] -// [56, type_sig → • nonempty_list(attribute) PRIV TYPE type_decl_name_with_params optional_derive, EOF / SEMI] -// [57, type_sig → • nonempty_list(attribute) PUB pub_attr TYPE type_decl_name_with_params optional_derive, EOF / SEMI] -// [58, type_sig → • SUBERROR uident optional_derive, EOF / SEMI] -// [59, type_sig → • PRIV SUBERROR uident optional_derive, EOF / SEMI] -// [60, type_sig → • PUB pub_attr SUBERROR uident optional_derive, EOF / SEMI] -// [61, type_sig → • nonempty_list(attribute) SUBERROR uident optional_derive, EOF / SEMI] -// [62, type_sig → • nonempty_list(attribute) PRIV SUBERROR uident optional_derive, EOF / SEMI] -// [63, type_sig → • nonempty_list(attribute) PUB pub_attr SUBERROR uident optional_derive, EOF / SEMI] -// [64, type_sig → • SUBERROR uident LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [65, type_sig → • PRIV SUBERROR uident LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [66, type_sig → • PUB pub_attr SUBERROR uident LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [67, type_sig → • nonempty_list(attribute) SUBERROR uident LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [68, type_sig → • nonempty_list(attribute) PRIV SUBERROR uident LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [69, type_sig → • nonempty_list(attribute) PUB pub_attr SUBERROR uident LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [70, type_sig → • STRUCT type_decl_name_with_params LBRACE record_decl_body RBRACE optional_derive, EOF / SEMI] -// [71, type_sig → • PRIV STRUCT type_decl_name_with_params LBRACE record_decl_body RBRACE optional_derive, EOF / SEMI] -// [72, type_sig → • PUB pub_attr STRUCT type_decl_name_with_params LBRACE record_decl_body RBRACE optional_derive, EOF / SEMI] -// [73, type_sig → • nonempty_list(attribute) STRUCT type_decl_name_with_params LBRACE record_decl_body RBRACE optional_derive, EOF / SEMI] -// [74, type_sig → • nonempty_list(attribute) PRIV STRUCT type_decl_name_with_params LBRACE record_decl_body RBRACE optional_derive, EOF / SEMI] -// [75, type_sig → • nonempty_list(attribute) PUB pub_attr STRUCT type_decl_name_with_params LBRACE record_decl_body RBRACE optional_derive, EOF / SEMI] -// [76, type_sig → • STRUCT type_decl_name_with_params LPAREN separated_list(COMMA,type_) RPAREN optional_derive, EOF / SEMI] -// [77, type_sig → • PRIV STRUCT type_decl_name_with_params LPAREN separated_list(COMMA,type_) RPAREN optional_derive, EOF / SEMI] -// [78, type_sig → • PUB pub_attr STRUCT type_decl_name_with_params LPAREN separated_list(COMMA,type_) RPAREN optional_derive, EOF / SEMI] -// [79, type_sig → • nonempty_list(attribute) STRUCT type_decl_name_with_params LPAREN separated_list(COMMA,type_) RPAREN optional_derive, EOF / SEMI] -// [80, type_sig → • nonempty_list(attribute) PRIV STRUCT type_decl_name_with_params LPAREN separated_list(COMMA,type_) RPAREN optional_derive, EOF / SEMI] -// [81, type_sig → • nonempty_list(attribute) PUB pub_attr STRUCT type_decl_name_with_params LPAREN separated_list(COMMA,type_) RPAREN optional_derive, EOF / SEMI] -// [82, type_sig → • ENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [83, type_sig → • PRIV ENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [84, type_sig → • PUB pub_attr ENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [85, type_sig → • nonempty_list(attribute) ENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [86, type_sig → • nonempty_list(attribute) PRIV ENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [87, type_sig → • nonempty_list(attribute) PUB pub_attr ENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [88, type_sig → • EXTENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [89, type_sig → • PRIV EXTENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [90, type_sig → • PUB pub_attr EXTENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [91, type_sig → • nonempty_list(attribute) EXTENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [92, type_sig → • nonempty_list(attribute) PRIV EXTENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [93, type_sig → • nonempty_list(attribute) PUB pub_attr EXTENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [94, type_sig → • EXTENUM extensible_enum_extension_target PLUS_EQUAL LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [95, type_sig → • PRIV EXTENUM extensible_enum_extension_target PLUS_EQUAL LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [96, type_sig → • PUB pub_attr EXTENUM extensible_enum_extension_target PLUS_EQUAL LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [97, type_sig → • nonempty_list(attribute) EXTENUM extensible_enum_extension_target PLUS_EQUAL LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [98, type_sig → • nonempty_list(attribute) PRIV EXTENUM extensible_enum_extension_target PLUS_EQUAL LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [99, type_sig → • nonempty_list(attribute) PUB pub_attr EXTENUM extensible_enum_extension_target PLUS_EQUAL LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [102, impl_sig → • IMPL type_params_with_constraints qualified_uident FOR type_, EOF / SEMI] -// [103, impl_sig → • PRIV IMPL type_params_with_constraints qualified_uident FOR type_, EOF / SEMI] -// [104, impl_sig → • PUB pub_attr IMPL type_params_with_constraints qualified_uident FOR type_, EOF / SEMI] -// [105, impl_sig → • nonempty_list(attribute) IMPL type_params_with_constraints qualified_uident FOR type_, EOF / SEMI] -// [106, impl_sig → • nonempty_list(attribute) PRIV IMPL type_params_with_constraints qualified_uident FOR type_, EOF / SEMI] -// [107, impl_sig → • nonempty_list(attribute) PUB pub_attr IMPL type_params_with_constraints qualified_uident FOR type_, EOF / SEMI] -// [108, impl_sig → • IMPL qualified_uident FOR type_, EOF / SEMI] -// [109, impl_sig → • PRIV IMPL qualified_uident FOR type_, EOF / SEMI] -// [110, impl_sig → • PUB pub_attr IMPL qualified_uident FOR type_, EOF / SEMI] -// [111, impl_sig → • nonempty_list(attribute) IMPL qualified_uident FOR type_, EOF / SEMI] -// [112, impl_sig → • nonempty_list(attribute) PRIV IMPL qualified_uident FOR type_, EOF / SEMI] -// [113, impl_sig → • nonempty_list(attribute) PUB pub_attr IMPL qualified_uident FOR type_, EOF / SEMI] -// [114, trait_sig → • TRAIT uident loption(preceded(COLON,separated_nonempty_list(PLUS,qualified_uident))) trait_body, EOF / SEMI] -// [115, trait_sig → • PRIV TRAIT uident loption(preceded(COLON,separated_nonempty_list(PLUS,qualified_uident))) trait_body, EOF / SEMI] -// [116, trait_sig → • PUB pub_attr TRAIT uident loption(preceded(COLON,separated_nonempty_list(PLUS,qualified_uident))) trait_body, EOF / SEMI] -// [117, trait_sig → • nonempty_list(attribute) TRAIT uident loption(preceded(COLON,separated_nonempty_list(PLUS,qualified_uident))) trait_body, EOF / SEMI] -// [118, trait_sig → • nonempty_list(attribute) PRIV TRAIT uident loption(preceded(COLON,separated_nonempty_list(PLUS,qualified_uident))) trait_body, EOF / SEMI] -// [119, trait_sig → • nonempty_list(attribute) PUB pub_attr TRAIT uident loption(preceded(COLON,separated_nonempty_list(PLUS,qualified_uident))) trait_body, EOF / SEMI] -// [124, alias_sig → • TYPE type_decl_name_with_params EQUAL type_, EOF / SEMI] -// [125, alias_sig → • PRIV TYPE type_decl_name_with_params EQUAL type_, EOF / SEMI] -// [126, alias_sig → • PUB pub_attr TYPE type_decl_name_with_params EQUAL type_, EOF / SEMI] -// [127, alias_sig → • nonempty_list(attribute) TYPE type_decl_name_with_params EQUAL type_, EOF / SEMI] -// [128, alias_sig → • nonempty_list(attribute) PRIV TYPE type_decl_name_with_params EQUAL type_, EOF / SEMI] -// [129, alias_sig → • nonempty_list(attribute) PUB pub_attr TYPE type_decl_name_with_params EQUAL type_, EOF / SEMI] -// [130, alias_sig → • FNALIAS uident COLONCOLON lident, EOF / SEMI] -// [131, alias_sig → • PRIV FNALIAS uident COLONCOLON lident, EOF / SEMI] -// [132, alias_sig → • PUB pub_attr FNALIAS uident COLONCOLON lident, EOF / SEMI] -// [133, alias_sig → • nonempty_list(attribute) FNALIAS uident COLONCOLON lident, EOF / SEMI] -// [134, alias_sig → • nonempty_list(attribute) PRIV FNALIAS uident COLONCOLON lident, EOF / SEMI] -// [135, alias_sig → • nonempty_list(attribute) PUB pub_attr FNALIAS uident COLONCOLON lident, EOF / SEMI] -// [136, alias_sig → • USING PACKAGE_NAME LBRACE TYPE uident using_binder RBRACE, EOF / SEMI] -// [137, alias_sig → • PRIV USING PACKAGE_NAME LBRACE TYPE uident using_binder RBRACE, EOF / SEMI] -// [138, alias_sig → • PUB pub_attr USING PACKAGE_NAME LBRACE TYPE uident using_binder RBRACE, EOF / SEMI] -// [139, alias_sig → • nonempty_list(attribute) USING PACKAGE_NAME LBRACE TYPE uident using_binder RBRACE, EOF / SEMI] -// [140, alias_sig → • nonempty_list(attribute) PRIV USING PACKAGE_NAME LBRACE TYPE uident using_binder RBRACE, EOF / SEMI] -// [141, alias_sig → • nonempty_list(attribute) PUB pub_attr USING PACKAGE_NAME LBRACE TYPE uident using_binder RBRACE, EOF / SEMI] -// [142, alias_sig → • USING PACKAGE_NAME LBRACE TRAIT uident using_binder RBRACE, EOF / SEMI] -// [143, alias_sig → • PRIV USING PACKAGE_NAME LBRACE TRAIT uident using_binder RBRACE, EOF / SEMI] -// [144, alias_sig → • PUB pub_attr USING PACKAGE_NAME LBRACE TRAIT uident using_binder RBRACE, EOF / SEMI] -// [145, alias_sig → • nonempty_list(attribute) USING PACKAGE_NAME LBRACE TRAIT uident using_binder RBRACE, EOF / SEMI] -// [146, alias_sig → • nonempty_list(attribute) PRIV USING PACKAGE_NAME LBRACE TRAIT uident using_binder RBRACE, EOF / SEMI] -// [147, alias_sig → • nonempty_list(attribute) PUB pub_attr USING PACKAGE_NAME LBRACE TRAIT uident using_binder RBRACE, EOF / SEMI] -// [252, nonempty_list(attribute) → • ATTRIBUTE, PUB / PRIV / STRUCT / ENUM / TRAIT / IMPL / ASYNC / FNALIAS / FN / LET / CONST / TYPE / SUBERROR / USING / EXTENUM] -// [253, nonempty_list(attribute) → • ATTRIBUTE nonempty_list(attribute), PUB / PRIV / STRUCT / ENUM / TRAIT / IMPL / ASYNC / FNALIAS / FN / LET / CONST / TYPE / SUBERROR / USING / EXTENUM] +// [56, type_sig → • TYPE type_decl_name_with_params optional_derive, EOF / SEMI] +// [57, type_sig → • PRIV TYPE type_decl_name_with_params optional_derive, EOF / SEMI] +// [58, type_sig → • PUB pub_attr TYPE type_decl_name_with_params optional_derive, EOF / SEMI] +// [59, type_sig → • nonempty_list(attribute) TYPE type_decl_name_with_params optional_derive, EOF / SEMI] +// [60, type_sig → • nonempty_list(attribute) PRIV TYPE type_decl_name_with_params optional_derive, EOF / SEMI] +// [61, type_sig → • nonempty_list(attribute) PUB pub_attr TYPE type_decl_name_with_params optional_derive, EOF / SEMI] +// [62, type_sig → • SUBERROR uident optional_derive, EOF / SEMI] +// [63, type_sig → • PRIV SUBERROR uident optional_derive, EOF / SEMI] +// [64, type_sig → • PUB pub_attr SUBERROR uident optional_derive, EOF / SEMI] +// [65, type_sig → • nonempty_list(attribute) SUBERROR uident optional_derive, EOF / SEMI] +// [66, type_sig → • nonempty_list(attribute) PRIV SUBERROR uident optional_derive, EOF / SEMI] +// [67, type_sig → • nonempty_list(attribute) PUB pub_attr SUBERROR uident optional_derive, EOF / SEMI] +// [68, type_sig → • SUBERROR uident LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [69, type_sig → • PRIV SUBERROR uident LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [70, type_sig → • PUB pub_attr SUBERROR uident LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [71, type_sig → • nonempty_list(attribute) SUBERROR uident LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [72, type_sig → • nonempty_list(attribute) PRIV SUBERROR uident LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [73, type_sig → • nonempty_list(attribute) PUB pub_attr SUBERROR uident LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [74, type_sig → • STRUCT type_decl_name_with_params LBRACE record_decl_body RBRACE optional_derive, EOF / SEMI] +// [75, type_sig → • PRIV STRUCT type_decl_name_with_params LBRACE record_decl_body RBRACE optional_derive, EOF / SEMI] +// [76, type_sig → • PUB pub_attr STRUCT type_decl_name_with_params LBRACE record_decl_body RBRACE optional_derive, EOF / SEMI] +// [77, type_sig → • nonempty_list(attribute) STRUCT type_decl_name_with_params LBRACE record_decl_body RBRACE optional_derive, EOF / SEMI] +// [78, type_sig → • nonempty_list(attribute) PRIV STRUCT type_decl_name_with_params LBRACE record_decl_body RBRACE optional_derive, EOF / SEMI] +// [79, type_sig → • nonempty_list(attribute) PUB pub_attr STRUCT type_decl_name_with_params LBRACE record_decl_body RBRACE optional_derive, EOF / SEMI] +// [80, type_sig → • STRUCT type_decl_name_with_params LPAREN separated_list(COMMA,type_) RPAREN optional_derive, EOF / SEMI] +// [81, type_sig → • PRIV STRUCT type_decl_name_with_params LPAREN separated_list(COMMA,type_) RPAREN optional_derive, EOF / SEMI] +// [82, type_sig → • PUB pub_attr STRUCT type_decl_name_with_params LPAREN separated_list(COMMA,type_) RPAREN optional_derive, EOF / SEMI] +// [83, type_sig → • nonempty_list(attribute) STRUCT type_decl_name_with_params LPAREN separated_list(COMMA,type_) RPAREN optional_derive, EOF / SEMI] +// [84, type_sig → • nonempty_list(attribute) PRIV STRUCT type_decl_name_with_params LPAREN separated_list(COMMA,type_) RPAREN optional_derive, EOF / SEMI] +// [85, type_sig → • nonempty_list(attribute) PUB pub_attr STRUCT type_decl_name_with_params LPAREN separated_list(COMMA,type_) RPAREN optional_derive, EOF / SEMI] +// [86, type_sig → • ENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [87, type_sig → • PRIV ENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [88, type_sig → • PUB pub_attr ENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [89, type_sig → • nonempty_list(attribute) ENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [90, type_sig → • nonempty_list(attribute) PRIV ENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [91, type_sig → • nonempty_list(attribute) PUB pub_attr ENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [92, type_sig → • EXTENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [93, type_sig → • PRIV EXTENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [94, type_sig → • PUB pub_attr EXTENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [95, type_sig → • nonempty_list(attribute) EXTENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [96, type_sig → • nonempty_list(attribute) PRIV EXTENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [97, type_sig → • nonempty_list(attribute) PUB pub_attr EXTENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [98, type_sig → • EXTENUM extensible_enum_extension_target PLUS_EQUAL LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [99, type_sig → • PRIV EXTENUM extensible_enum_extension_target PLUS_EQUAL LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [100, type_sig → • PUB pub_attr EXTENUM extensible_enum_extension_target PLUS_EQUAL LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [101, type_sig → • nonempty_list(attribute) EXTENUM extensible_enum_extension_target PLUS_EQUAL LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [102, type_sig → • nonempty_list(attribute) PRIV EXTENUM extensible_enum_extension_target PLUS_EQUAL LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [103, type_sig → • nonempty_list(attribute) PUB pub_attr EXTENUM extensible_enum_extension_target PLUS_EQUAL LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [106, impl_sig → • IMPL type_params_with_constraints qualified_uident FOR type_, EOF / SEMI] +// [107, impl_sig → • PRIV IMPL type_params_with_constraints qualified_uident FOR type_, EOF / SEMI] +// [108, impl_sig → • PUB pub_attr IMPL type_params_with_constraints qualified_uident FOR type_, EOF / SEMI] +// [109, impl_sig → • nonempty_list(attribute) IMPL type_params_with_constraints qualified_uident FOR type_, EOF / SEMI] +// [110, impl_sig → • nonempty_list(attribute) PRIV IMPL type_params_with_constraints qualified_uident FOR type_, EOF / SEMI] +// [111, impl_sig → • nonempty_list(attribute) PUB pub_attr IMPL type_params_with_constraints qualified_uident FOR type_, EOF / SEMI] +// [112, impl_sig → • IMPL qualified_uident FOR type_, EOF / SEMI] +// [113, impl_sig → • PRIV IMPL qualified_uident FOR type_, EOF / SEMI] +// [114, impl_sig → • PUB pub_attr IMPL qualified_uident FOR type_, EOF / SEMI] +// [115, impl_sig → • nonempty_list(attribute) IMPL qualified_uident FOR type_, EOF / SEMI] +// [116, impl_sig → • nonempty_list(attribute) PRIV IMPL qualified_uident FOR type_, EOF / SEMI] +// [117, impl_sig → • nonempty_list(attribute) PUB pub_attr IMPL qualified_uident FOR type_, EOF / SEMI] +// [118, trait_sig → • TRAIT uident loption(preceded(COLON,separated_nonempty_list(PLUS,qualified_uident))) trait_body, EOF / SEMI] +// [119, trait_sig → • PRIV TRAIT uident loption(preceded(COLON,separated_nonempty_list(PLUS,qualified_uident))) trait_body, EOF / SEMI] +// [120, trait_sig → • PUB pub_attr TRAIT uident loption(preceded(COLON,separated_nonempty_list(PLUS,qualified_uident))) trait_body, EOF / SEMI] +// [121, trait_sig → • nonempty_list(attribute) TRAIT uident loption(preceded(COLON,separated_nonempty_list(PLUS,qualified_uident))) trait_body, EOF / SEMI] +// [122, trait_sig → • nonempty_list(attribute) PRIV TRAIT uident loption(preceded(COLON,separated_nonempty_list(PLUS,qualified_uident))) trait_body, EOF / SEMI] +// [123, trait_sig → • nonempty_list(attribute) PUB pub_attr TRAIT uident loption(preceded(COLON,separated_nonempty_list(PLUS,qualified_uident))) trait_body, EOF / SEMI] +// [128, alias_sig → • TYPE type_decl_name_with_params EQUAL type_, EOF / SEMI] +// [129, alias_sig → • PRIV TYPE type_decl_name_with_params EQUAL type_, EOF / SEMI] +// [130, alias_sig → • PUB pub_attr TYPE type_decl_name_with_params EQUAL type_, EOF / SEMI] +// [131, alias_sig → • nonempty_list(attribute) TYPE type_decl_name_with_params EQUAL type_, EOF / SEMI] +// [132, alias_sig → • nonempty_list(attribute) PRIV TYPE type_decl_name_with_params EQUAL type_, EOF / SEMI] +// [133, alias_sig → • nonempty_list(attribute) PUB pub_attr TYPE type_decl_name_with_params EQUAL type_, EOF / SEMI] +// [134, alias_sig → • FNALIAS uident COLONCOLON lident, EOF / SEMI] +// [135, alias_sig → • PRIV FNALIAS uident COLONCOLON lident, EOF / SEMI] +// [136, alias_sig → • PUB pub_attr FNALIAS uident COLONCOLON lident, EOF / SEMI] +// [137, alias_sig → • nonempty_list(attribute) FNALIAS uident COLONCOLON lident, EOF / SEMI] +// [138, alias_sig → • nonempty_list(attribute) PRIV FNALIAS uident COLONCOLON lident, EOF / SEMI] +// [139, alias_sig → • nonempty_list(attribute) PUB pub_attr FNALIAS uident COLONCOLON lident, EOF / SEMI] +// [140, alias_sig → • USING PACKAGE_NAME LBRACE TYPE uident using_binder RBRACE, EOF / SEMI] +// [141, alias_sig → • PRIV USING PACKAGE_NAME LBRACE TYPE uident using_binder RBRACE, EOF / SEMI] +// [142, alias_sig → • PUB pub_attr USING PACKAGE_NAME LBRACE TYPE uident using_binder RBRACE, EOF / SEMI] +// [143, alias_sig → • nonempty_list(attribute) USING PACKAGE_NAME LBRACE TYPE uident using_binder RBRACE, EOF / SEMI] +// [144, alias_sig → • nonempty_list(attribute) PRIV USING PACKAGE_NAME LBRACE TYPE uident using_binder RBRACE, EOF / SEMI] +// [145, alias_sig → • nonempty_list(attribute) PUB pub_attr USING PACKAGE_NAME LBRACE TYPE uident using_binder RBRACE, EOF / SEMI] +// [146, alias_sig → • USING PACKAGE_NAME LBRACE TRAIT uident using_binder RBRACE, EOF / SEMI] +// [147, alias_sig → • PRIV USING PACKAGE_NAME LBRACE TRAIT uident using_binder RBRACE, EOF / SEMI] +// [148, alias_sig → • PUB pub_attr USING PACKAGE_NAME LBRACE TRAIT uident using_binder RBRACE, EOF / SEMI] +// [149, alias_sig → • nonempty_list(attribute) USING PACKAGE_NAME LBRACE TRAIT uident using_binder RBRACE, EOF / SEMI] +// [150, alias_sig → • nonempty_list(attribute) PRIV USING PACKAGE_NAME LBRACE TRAIT uident using_binder RBRACE, EOF / SEMI] +// [151, alias_sig → • nonempty_list(attribute) PUB pub_attr USING PACKAGE_NAME LBRACE TRAIT uident using_binder RBRACE, EOF / SEMI] +// [257, nonempty_list(attribute) → • ATTRIBUTE, PUB / PRIV / STRUCT / ENUM / TRAIT / IMPL / ASYNC / FNALIAS / FN / LET / CONST / TYPE / SUBERROR / USING / EXTENUM] +// [258, nonempty_list(attribute) → • ATTRIBUTE nonempty_list(attribute), PUB / PRIV / STRUCT / ENUM / TRAIT / IMPL / ASYNC / FNALIAS / FN / LET / CONST / TYPE / SUBERROR / USING / EXTENUM] fn yy_state_18(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_ATTRIBUTE => Shift(yy_state_19) T_USING => Shift(yy_state_21) T_FNALIAS => Shift(yy_state_35) - T_TRAIT => Shift(yy_state_40) - T_IMPL => Shift(yy_state_161) - T_EXTENUM => Shift(yy_state_183) - T_ENUM => Shift(yy_state_245) - T_STRUCT => Shift(yy_state_253) - T_SUBERROR => Shift(yy_state_278) - T_TYPE => Shift(yy_state_285) - T_FN => Shift(yy_state_290) - T_ASYNC => Shift(yy_state_309) - T_LET => Shift(yy_state_318) - NT_nonempty_list_attribute_ => Shift(yy_state_322) - T_PUB => Shift(yy_state_626) - T_PRIV => Shift(yy_state_722) - T_CONST => Shift(yy_state_817) - NT_value_sig => Shift(yy_state_823) - NT_const_sig => Shift(yy_state_824) - NT_impl_sig => Shift(yy_state_825) - NT_trait_sig => Shift(yy_state_826) - NT_alias_sig => Shift(yy_state_827) - NT_type_sig => Shift(yy_state_828) - NT_func_sig => Shift(yy_state_829) - NT_sig_ => Shift(yy_state_830) - NT_sigs => Shift(yy_state_833) - T_EOF => Reduce(0, NT_sigs, yy_action_278) - _ => Error - } -} - -// [252, nonempty_list(attribute) → • ATTRIBUTE, LIDENT / UIDENT / PUB / PRIV / STRUCT / ENUM / TRAIT / IMPL / ASYNC / FNALIAS / FN / LET / CONST / MUTABLE / TYPE / SUBERROR / USING / EXTENUM] -// [252, nonempty_list(attribute) → ATTRIBUTE •, LIDENT / UIDENT / PUB / PRIV / STRUCT / ENUM / TRAIT / IMPL / ASYNC / FNALIAS / FN / LET / CONST / MUTABLE / TYPE / SUBERROR / USING / EXTENUM] -// [253, nonempty_list(attribute) → • ATTRIBUTE nonempty_list(attribute), LIDENT / UIDENT / PUB / PRIV / STRUCT / ENUM / TRAIT / IMPL / ASYNC / FNALIAS / FN / LET / CONST / MUTABLE / TYPE / SUBERROR / USING / EXTENUM] -// [253, nonempty_list(attribute) → ATTRIBUTE • nonempty_list(attribute), LIDENT / UIDENT / PUB / PRIV / STRUCT / ENUM / TRAIT / IMPL / ASYNC / FNALIAS / FN / LET / CONST / MUTABLE / TYPE / SUBERROR / USING / EXTENUM] + T_TRAIT => Shift(yy_state_41) + T_IMPL => Shift(yy_state_213) + T_EXTENUM => Shift(yy_state_221) + T_ENUM => Shift(yy_state_283) + T_STRUCT => Shift(yy_state_291) + T_SUBERROR => Shift(yy_state_316) + T_TYPE => Shift(yy_state_323) + T_FN => Shift(yy_state_328) + T_ASYNC => Shift(yy_state_346) + T_LET => Shift(yy_state_355) + NT_nonempty_list_attribute_ => Shift(yy_state_359) + T_PUB => Shift(yy_state_663) + T_PRIV => Shift(yy_state_759) + T_CONST => Shift(yy_state_854) + NT_value_sig => Shift(yy_state_860) + NT_const_sig => Shift(yy_state_861) + NT_impl_sig => Shift(yy_state_862) + NT_trait_sig => Shift(yy_state_863) + NT_alias_sig => Shift(yy_state_864) + NT_type_sig => Shift(yy_state_865) + NT_func_sig => Shift(yy_state_866) + NT_sig_ => Shift(yy_state_867) + NT_sigs => Shift(yy_state_870) + T_EOF => Reduce(0, NT_sigs, yy_action_283) + _ => Error + } +} + +// [257, nonempty_list(attribute) → • ATTRIBUTE, LIDENT / UIDENT / PUB / PRIV / STRUCT / ENUM / TRAIT / IMPL / ASYNC / FNALIAS / FN / LET / CONST / MUTABLE / TYPE / SUBERROR / USING / EXTENUM / EXTEND] +// [257, nonempty_list(attribute) → ATTRIBUTE •, LIDENT / UIDENT / PUB / PRIV / STRUCT / ENUM / TRAIT / IMPL / ASYNC / FNALIAS / FN / LET / CONST / MUTABLE / TYPE / SUBERROR / USING / EXTENUM / EXTEND] +// [258, nonempty_list(attribute) → • ATTRIBUTE nonempty_list(attribute), LIDENT / UIDENT / PUB / PRIV / STRUCT / ENUM / TRAIT / IMPL / ASYNC / FNALIAS / FN / LET / CONST / MUTABLE / TYPE / SUBERROR / USING / EXTENUM / EXTEND] +// [258, nonempty_list(attribute) → ATTRIBUTE • nonempty_list(attribute), LIDENT / UIDENT / PUB / PRIV / STRUCT / ENUM / TRAIT / IMPL / ASYNC / FNALIAS / FN / LET / CONST / MUTABLE / TYPE / SUBERROR / USING / EXTENUM / EXTEND] fn yy_state_19(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_ATTRIBUTE => Shift(yy_state_19) NT_nonempty_list_attribute_ => Shift(yy_state_20) - T_LIDENT | T_UIDENT | T_PUB | T_PRIV | T_STRUCT | T_ENUM | T_TRAIT | T_IMPL | T_ASYNC | T_FNALIAS | T_FN | T_LET | T_CONST | T_MUTABLE | T_TYPE | T_SUBERROR | T_USING | T_EXTENUM => Reduce(1, NT_nonempty_list_attribute_, yy_action_277) + T_LIDENT | T_UIDENT | T_PUB | T_PRIV | T_STRUCT | T_ENUM | T_TRAIT | T_IMPL | T_ASYNC | T_FNALIAS | T_FN | T_LET | T_CONST | T_MUTABLE | T_TYPE | T_SUBERROR | T_USING | T_EXTENUM | T_EXTEND => Reduce(1, NT_nonempty_list_attribute_, yy_action_282) _ => Error } } -// [253, nonempty_list(attribute) → ATTRIBUTE nonempty_list(attribute) •, LIDENT / UIDENT / PUB / PRIV / STRUCT / ENUM / TRAIT / IMPL / ASYNC / FNALIAS / FN / LET / CONST / MUTABLE / TYPE / SUBERROR / USING / EXTENUM] +// [258, nonempty_list(attribute) → ATTRIBUTE nonempty_list(attribute) •, LIDENT / UIDENT / PUB / PRIV / STRUCT / ENUM / TRAIT / IMPL / ASYNC / FNALIAS / FN / LET / CONST / MUTABLE / TYPE / SUBERROR / USING / EXTENUM / EXTEND] fn yy_state_20(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(2, NT_nonempty_list_attribute_, yy_action_275) + ReduceNoLookahead(2, NT_nonempty_list_attribute_, yy_action_280) } -// [136, alias_sig → USING • PACKAGE_NAME LBRACE TYPE uident using_binder RBRACE, EOF / SEMI] -// [142, alias_sig → USING • PACKAGE_NAME LBRACE TRAIT uident using_binder RBRACE, EOF / SEMI] +// [140, alias_sig → USING • PACKAGE_NAME LBRACE TYPE uident using_binder RBRACE, EOF / SEMI] +// [146, alias_sig → USING • PACKAGE_NAME LBRACE TRAIT uident using_binder RBRACE, EOF / SEMI] fn yy_state_21(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_PACKAGE_NAME => Shift(yy_state_22) @@ -4350,8 +4444,8 @@ fn yy_state_21(_lookahead : YYSymbol) -> YYDecision { } } -// [136, alias_sig → USING PACKAGE_NAME • LBRACE TYPE uident using_binder RBRACE, EOF / SEMI] -// [142, alias_sig → USING PACKAGE_NAME • LBRACE TRAIT uident using_binder RBRACE, EOF / SEMI] +// [140, alias_sig → USING PACKAGE_NAME • LBRACE TYPE uident using_binder RBRACE, EOF / SEMI] +// [146, alias_sig → USING PACKAGE_NAME • LBRACE TRAIT uident using_binder RBRACE, EOF / SEMI] fn yy_state_22(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_LBRACE => Shift(yy_state_23) @@ -4359,8 +4453,8 @@ fn yy_state_22(_lookahead : YYSymbol) -> YYDecision { } } -// [136, alias_sig → USING PACKAGE_NAME LBRACE • TYPE uident using_binder RBRACE, EOF / SEMI] -// [142, alias_sig → USING PACKAGE_NAME LBRACE • TRAIT uident using_binder RBRACE, EOF / SEMI] +// [140, alias_sig → USING PACKAGE_NAME LBRACE • TYPE uident using_binder RBRACE, EOF / SEMI] +// [146, alias_sig → USING PACKAGE_NAME LBRACE • TRAIT uident using_binder RBRACE, EOF / SEMI] fn yy_state_23(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_TRAIT => Shift(yy_state_24) @@ -4369,8 +4463,8 @@ fn yy_state_23(_lookahead : YYSymbol) -> YYDecision { } } -// [142, alias_sig → USING PACKAGE_NAME LBRACE TRAIT • uident using_binder RBRACE, EOF / SEMI] -// [212, uident → • UIDENT, RBRACE / AS] +// [146, alias_sig → USING PACKAGE_NAME LBRACE TRAIT • uident using_binder RBRACE, EOF / SEMI] +// [216, uident → • UIDENT, RBRACE / AS] fn yy_state_24(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_UIDENT => Shift(yy_state_25) @@ -4379,24 +4473,24 @@ fn yy_state_24(_lookahead : YYSymbol) -> YYDecision { } } -// [212, uident → UIDENT •, PLUS_EQUAL / EOF / DERIVE / EQUAL / LPAREN / COMMA / COLONCOLON / COLON / SEMI / LBRACKET / RBRACKET / LBRACE / RBRACE / AS] +// [216, uident → UIDENT •, PLUS_EQUAL / EOF / DERIVE / EQUAL / LPAREN / COMMA / COLONCOLON / COLON / SEMI / LBRACKET / RBRACKET / LBRACE / RBRACE / AS] fn yy_state_25(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_uident, yy_action_274) + ReduceNoLookahead(1, NT_uident, yy_action_279) } -// [122, using_binder → •, RBRACE] -// [123, using_binder → • AS uident, RBRACE] -// [142, alias_sig → USING PACKAGE_NAME LBRACE TRAIT uident • using_binder RBRACE, EOF / SEMI] +// [126, using_binder → •, RBRACE] +// [127, using_binder → • AS uident, RBRACE] +// [146, alias_sig → USING PACKAGE_NAME LBRACE TRAIT uident • using_binder RBRACE, EOF / SEMI] fn yy_state_26(_lookahead : YYSymbol) -> YYDecision { match _lookahead { NT_using_binder => Shift(yy_state_27) T_AS => Shift(yy_state_29) - T_RBRACE => Reduce(0, NT_using_binder, yy_action_273) + T_RBRACE => Reduce(0, NT_using_binder, yy_action_278) _ => Error } } -// [142, alias_sig → USING PACKAGE_NAME LBRACE TRAIT uident using_binder • RBRACE, EOF / SEMI] +// [146, alias_sig → USING PACKAGE_NAME LBRACE TRAIT uident using_binder • RBRACE, EOF / SEMI] fn yy_state_27(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_RBRACE => Shift(yy_state_28) @@ -4404,13 +4498,13 @@ fn yy_state_27(_lookahead : YYSymbol) -> YYDecision { } } -// [142, alias_sig → USING PACKAGE_NAME LBRACE TRAIT uident using_binder RBRACE •, EOF / SEMI] +// [146, alias_sig → USING PACKAGE_NAME LBRACE TRAIT uident using_binder RBRACE •, EOF / SEMI] fn yy_state_28(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(7, NT_alias_sig, yy_action_272) + ReduceNoLookahead(7, NT_alias_sig, yy_action_277) } -// [123, using_binder → AS • uident, RBRACE] -// [212, uident → • UIDENT, RBRACE] +// [127, using_binder → AS • uident, RBRACE] +// [216, uident → • UIDENT, RBRACE] fn yy_state_29(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_UIDENT => Shift(yy_state_25) @@ -4419,13 +4513,13 @@ fn yy_state_29(_lookahead : YYSymbol) -> YYDecision { } } -// [123, using_binder → AS uident •, RBRACE] +// [127, using_binder → AS uident •, RBRACE] fn yy_state_30(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(2, NT_using_binder, yy_action_271) + ReduceNoLookahead(2, NT_using_binder, yy_action_276) } -// [136, alias_sig → USING PACKAGE_NAME LBRACE TYPE • uident using_binder RBRACE, EOF / SEMI] -// [212, uident → • UIDENT, RBRACE / AS] +// [140, alias_sig → USING PACKAGE_NAME LBRACE TYPE • uident using_binder RBRACE, EOF / SEMI] +// [216, uident → • UIDENT, RBRACE / AS] fn yy_state_31(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_UIDENT => Shift(yy_state_25) @@ -4434,19 +4528,19 @@ fn yy_state_31(_lookahead : YYSymbol) -> YYDecision { } } -// [122, using_binder → •, RBRACE] -// [123, using_binder → • AS uident, RBRACE] -// [136, alias_sig → USING PACKAGE_NAME LBRACE TYPE uident • using_binder RBRACE, EOF / SEMI] +// [126, using_binder → •, RBRACE] +// [127, using_binder → • AS uident, RBRACE] +// [140, alias_sig → USING PACKAGE_NAME LBRACE TYPE uident • using_binder RBRACE, EOF / SEMI] fn yy_state_32(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_AS => Shift(yy_state_29) NT_using_binder => Shift(yy_state_33) - T_RBRACE => Reduce(0, NT_using_binder, yy_action_273) + T_RBRACE => Reduce(0, NT_using_binder, yy_action_278) _ => Error } } -// [136, alias_sig → USING PACKAGE_NAME LBRACE TYPE uident using_binder • RBRACE, EOF / SEMI] +// [140, alias_sig → USING PACKAGE_NAME LBRACE TYPE uident using_binder • RBRACE, EOF / SEMI] fn yy_state_33(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_RBRACE => Shift(yy_state_34) @@ -4454,13 +4548,13 @@ fn yy_state_33(_lookahead : YYSymbol) -> YYDecision { } } -// [136, alias_sig → USING PACKAGE_NAME LBRACE TYPE uident using_binder RBRACE •, EOF / SEMI] +// [140, alias_sig → USING PACKAGE_NAME LBRACE TYPE uident using_binder RBRACE •, EOF / SEMI] fn yy_state_34(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(7, NT_alias_sig, yy_action_270) + ReduceNoLookahead(7, NT_alias_sig, yy_action_275) } -// [130, alias_sig → FNALIAS • uident COLONCOLON lident, EOF / SEMI] -// [212, uident → • UIDENT, COLONCOLON] +// [134, alias_sig → FNALIAS • uident COLONCOLON lident, EOF / SEMI] +// [216, uident → • UIDENT, COLONCOLON] fn yy_state_35(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_UIDENT => Shift(yy_state_25) @@ -4469,7 +4563,7 @@ fn yy_state_35(_lookahead : YYSymbol) -> YYDecision { } } -// [130, alias_sig → FNALIAS uident • COLONCOLON lident, EOF / SEMI] +// [134, alias_sig → FNALIAS uident • COLONCOLON lident, EOF / SEMI] fn yy_state_36(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_COLONCOLON => Shift(yy_state_37) @@ -4477,206 +4571,215 @@ fn yy_state_36(_lookahead : YYSymbol) -> YYDecision { } } -// [130, alias_sig → FNALIAS uident COLONCOLON • lident, EOF / SEMI] -// [213, lident → • LIDENT, EOF / SEMI] +// [134, alias_sig → FNALIAS uident COLONCOLON • lident, EOF / SEMI] +// [217, lident → • LIDENT, EOF / SEMI] +// [218, lident → • EXTEND, EOF / SEMI] fn yy_state_37(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LIDENT => Shift(yy_state_38) - NT_lident => Shift(yy_state_39) + T_EXTEND => Shift(yy_state_38) + T_LIDENT => Shift(yy_state_39) + NT_lident => Shift(yy_state_40) _ => Error } } -// [213, lident → LIDENT •, EOF / LPAREN / COLON / SEMI] +// [218, lident → EXTEND •, EOF / LPAREN / RPAREN / QUESTION / COLON / SEMI] fn yy_state_38(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_lident, yy_action_269) + ReduceNoLookahead(1, NT_lident, yy_action_274) } -// [130, alias_sig → FNALIAS uident COLONCOLON lident •, EOF / SEMI] +// [217, lident → LIDENT •, EOF / LPAREN / RPAREN / QUESTION / COLON / SEMI] fn yy_state_39(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(4, NT_alias_sig, yy_action_268) + ReduceNoLookahead(1, NT_lident, yy_action_273) } -// [114, trait_sig → TRAIT • uident loption(preceded(COLON,separated_nonempty_list(PLUS,qualified_uident))) trait_body, EOF / SEMI] -// [212, uident → • UIDENT, EOF / COLON / SEMI / LBRACE] +// [134, alias_sig → FNALIAS uident COLONCOLON lident •, EOF / SEMI] fn yy_state_40(_lookahead : YYSymbol) -> YYDecision { - match _lookahead { - T_UIDENT => Shift(yy_state_25) - NT_uident => Shift(yy_state_41) - _ => Error - } + ReduceNoLookahead(4, NT_alias_sig, yy_action_272) } -// [114, trait_sig → TRAIT uident • loption(preceded(COLON,separated_nonempty_list(PLUS,qualified_uident))) trait_body, EOF / SEMI] -// [230, loption(preceded(COLON,separated_nonempty_list(PLUS,qualified_uident))) → •, EOF / SEMI / LBRACE] -// [231, loption(preceded(COLON,separated_nonempty_list(PLUS,qualified_uident))) → • COLON separated_nonempty_list(PLUS,qualified_uident), EOF / SEMI / LBRACE] +// [118, trait_sig → TRAIT • uident loption(preceded(COLON,separated_nonempty_list(PLUS,qualified_uident))) trait_body, EOF / SEMI] +// [216, uident → • UIDENT, EOF / COLON / SEMI / LBRACE] fn yy_state_41(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_COLON => Shift(yy_state_42) - NT_loption_preceded_COLON_separated_nonempty_list_PLUS_qualified_uident___ => Shift(yy_state_50) - T_EOF | T_SEMI | T_LBRACE => Reduce(0, NT_loption_preceded_COLON_separated_nonempty_list_PLUS_qualified_uident___, yy_action_267) + T_UIDENT => Shift(yy_state_25) + NT_uident => Shift(yy_state_42) _ => Error } } -// [208, qualified_uident → • UIDENT, EOF / SEMI / PLUS / LBRACE] -// [209, qualified_uident → • PACKAGE_NAME DOT_UIDENT, EOF / SEMI / PLUS / LBRACE] -// [228, separated_nonempty_list(PLUS,qualified_uident) → • qualified_uident, EOF / SEMI / LBRACE] -// [229, separated_nonempty_list(PLUS,qualified_uident) → • qualified_uident PLUS separated_nonempty_list(PLUS,qualified_uident), EOF / SEMI / LBRACE] -// [231, loption(preceded(COLON,separated_nonempty_list(PLUS,qualified_uident))) → COLON • separated_nonempty_list(PLUS,qualified_uident), EOF / SEMI / LBRACE] +// [118, trait_sig → TRAIT uident • loption(preceded(COLON,separated_nonempty_list(PLUS,qualified_uident))) trait_body, EOF / SEMI] +// [235, loption(preceded(COLON,separated_nonempty_list(PLUS,qualified_uident))) → •, EOF / SEMI / LBRACE] +// [236, loption(preceded(COLON,separated_nonempty_list(PLUS,qualified_uident))) → • COLON separated_nonempty_list(PLUS,qualified_uident), EOF / SEMI / LBRACE] fn yy_state_42(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_separated_nonempty_list_PLUS_qualified_uident_ => Shift(yy_state_43) - NT_qualified_uident => Shift(yy_state_44) - T_PACKAGE_NAME => Shift(yy_state_47) - T_UIDENT => Shift(yy_state_49) + T_COLON => Shift(yy_state_43) + NT_loption_preceded_COLON_separated_nonempty_list_PLUS_qualified_uident___ => Shift(yy_state_51) + T_EOF | T_SEMI | T_LBRACE => Reduce(0, NT_loption_preceded_COLON_separated_nonempty_list_PLUS_qualified_uident___, yy_action_271) _ => Error } } -// [231, loption(preceded(COLON,separated_nonempty_list(PLUS,qualified_uident))) → COLON separated_nonempty_list(PLUS,qualified_uident) •, EOF / SEMI / LBRACE] +// [212, qualified_uident → • UIDENT, EOF / SEMI / PLUS / LBRACE] +// [213, qualified_uident → • PACKAGE_NAME DOT_UIDENT, EOF / SEMI / PLUS / LBRACE] +// [233, separated_nonempty_list(PLUS,qualified_uident) → • qualified_uident, EOF / SEMI / LBRACE] +// [234, separated_nonempty_list(PLUS,qualified_uident) → • qualified_uident PLUS separated_nonempty_list(PLUS,qualified_uident), EOF / SEMI / LBRACE] +// [236, loption(preceded(COLON,separated_nonempty_list(PLUS,qualified_uident))) → COLON • separated_nonempty_list(PLUS,qualified_uident), EOF / SEMI / LBRACE] fn yy_state_43(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(2, NT_loption_preceded_COLON_separated_nonempty_list_PLUS_qualified_uident___, yy_action_265) -} - -// [228, separated_nonempty_list(PLUS,qualified_uident) → qualified_uident •, EOF / SEMI / LBRACE] -// [229, separated_nonempty_list(PLUS,qualified_uident) → qualified_uident • PLUS separated_nonempty_list(PLUS,qualified_uident), EOF / SEMI / LBRACE] -fn yy_state_44(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_PLUS => Shift(yy_state_45) - T_EOF | T_SEMI | T_LBRACE => Reduce(1, NT_separated_nonempty_list_PLUS_qualified_uident_, yy_action_264) + NT_separated_nonempty_list_PLUS_qualified_uident_ => Shift(yy_state_44) + NT_qualified_uident => Shift(yy_state_45) + T_PACKAGE_NAME => Shift(yy_state_48) + T_UIDENT => Shift(yy_state_50) _ => Error } } -// [208, qualified_uident → • UIDENT, EOF / SEMI / PLUS / LBRACE] -// [209, qualified_uident → • PACKAGE_NAME DOT_UIDENT, EOF / SEMI / PLUS / LBRACE] -// [228, separated_nonempty_list(PLUS,qualified_uident) → • qualified_uident, EOF / SEMI / LBRACE] -// [229, separated_nonempty_list(PLUS,qualified_uident) → • qualified_uident PLUS separated_nonempty_list(PLUS,qualified_uident), EOF / SEMI / LBRACE] -// [229, separated_nonempty_list(PLUS,qualified_uident) → qualified_uident PLUS • separated_nonempty_list(PLUS,qualified_uident), EOF / SEMI / LBRACE] +// [236, loption(preceded(COLON,separated_nonempty_list(PLUS,qualified_uident))) → COLON separated_nonempty_list(PLUS,qualified_uident) •, EOF / SEMI / LBRACE] +fn yy_state_44(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(2, NT_loption_preceded_COLON_separated_nonempty_list_PLUS_qualified_uident___, yy_action_269) +} + +// [233, separated_nonempty_list(PLUS,qualified_uident) → qualified_uident •, EOF / SEMI / LBRACE] +// [234, separated_nonempty_list(PLUS,qualified_uident) → qualified_uident • PLUS separated_nonempty_list(PLUS,qualified_uident), EOF / SEMI / LBRACE] fn yy_state_45(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_qualified_uident => Shift(yy_state_44) - NT_separated_nonempty_list_PLUS_qualified_uident_ => Shift(yy_state_46) - T_PACKAGE_NAME => Shift(yy_state_47) - T_UIDENT => Shift(yy_state_49) + T_PLUS => Shift(yy_state_46) + T_EOF | T_SEMI | T_LBRACE => Reduce(1, NT_separated_nonempty_list_PLUS_qualified_uident_, yy_action_268) _ => Error } } -// [229, separated_nonempty_list(PLUS,qualified_uident) → qualified_uident PLUS separated_nonempty_list(PLUS,qualified_uident) •, EOF / SEMI / LBRACE] +// [212, qualified_uident → • UIDENT, EOF / SEMI / PLUS / LBRACE] +// [213, qualified_uident → • PACKAGE_NAME DOT_UIDENT, EOF / SEMI / PLUS / LBRACE] +// [233, separated_nonempty_list(PLUS,qualified_uident) → • qualified_uident, EOF / SEMI / LBRACE] +// [234, separated_nonempty_list(PLUS,qualified_uident) → • qualified_uident PLUS separated_nonempty_list(PLUS,qualified_uident), EOF / SEMI / LBRACE] +// [234, separated_nonempty_list(PLUS,qualified_uident) → qualified_uident PLUS • separated_nonempty_list(PLUS,qualified_uident), EOF / SEMI / LBRACE] fn yy_state_46(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_separated_nonempty_list_PLUS_qualified_uident_, yy_action_263) -} - -// [209, qualified_uident → PACKAGE_NAME • DOT_UIDENT, EOF / RPAREN / COMMA / SEMI / PLUS / RBRACKET / LBRACE / FOR] -fn yy_state_47(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_DOT_UIDENT => Shift(yy_state_48) + NT_qualified_uident => Shift(yy_state_45) + NT_separated_nonempty_list_PLUS_qualified_uident_ => Shift(yy_state_47) + T_PACKAGE_NAME => Shift(yy_state_48) + T_UIDENT => Shift(yy_state_50) _ => Error } } -// [209, qualified_uident → PACKAGE_NAME DOT_UIDENT •, EOF / RPAREN / COMMA / SEMI / PLUS / RBRACKET / LBRACE / FOR] +// [234, separated_nonempty_list(PLUS,qualified_uident) → qualified_uident PLUS separated_nonempty_list(PLUS,qualified_uident) •, EOF / SEMI / LBRACE] +fn yy_state_47(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_separated_nonempty_list_PLUS_qualified_uident_, yy_action_267) +} + +// [213, qualified_uident → PACKAGE_NAME • DOT_UIDENT, EOF / RPAREN / COMMA / SEMI / PLUS / RBRACKET / LBRACE / FOR] fn yy_state_48(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(2, NT_qualified_uident, yy_action_262) + match _lookahead { + T_DOT_UIDENT => Shift(yy_state_49) + _ => Error + } } -// [208, qualified_uident → UIDENT •, EOF / RPAREN / COMMA / SEMI / PLUS / RBRACKET / LBRACE / FOR] +// [213, qualified_uident → PACKAGE_NAME DOT_UIDENT •, EOF / RPAREN / COMMA / SEMI / PLUS / RBRACKET / LBRACE / FOR] fn yy_state_49(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_qualified_uident, yy_action_261) + ReduceNoLookahead(2, NT_qualified_uident, yy_action_266) } -// [114, trait_sig → TRAIT uident loption(preceded(COLON,separated_nonempty_list(PLUS,qualified_uident))) • trait_body, EOF / SEMI] -// [120, trait_body → •, EOF / SEMI] -// [121, trait_body → • LBRACE separated_list(SEMI,trait_method_sig) RBRACE, EOF / SEMI] +// [212, qualified_uident → UIDENT •, EOF / RPAREN / COMMA / SEMI / PLUS / RBRACKET / LBRACE / FOR] fn yy_state_50(_lookahead : YYSymbol) -> YYDecision { - match _lookahead { - T_LBRACE => Shift(yy_state_51) - NT_trait_body => Shift(yy_state_160) - T_EOF | T_SEMI => Reduce(0, NT_trait_body, yy_action_260) - _ => Error - } + ReduceNoLookahead(1, NT_qualified_uident, yy_action_265) } -// [48, trait_method_sig → • ASYNC lident LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type boption(eq_underscore), SEMI / RBRACE] -// [49, trait_method_sig → • lident LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type boption(eq_underscore), SEMI / RBRACE] -// [50, trait_method_sig → • nonempty_list(attribute) ASYNC lident LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type boption(eq_underscore), SEMI / RBRACE] -// [51, trait_method_sig → • nonempty_list(attribute) lident LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type boption(eq_underscore), SEMI / RBRACE] -// [121, trait_body → LBRACE • separated_list(SEMI,trait_method_sig) RBRACE, EOF / SEMI] -// [213, lident → • LIDENT, LPAREN] -// [232, separated_list(SEMI,trait_method_sig) → •, RBRACE] -// [233, separated_list(SEMI,trait_method_sig) → • separated_nonempty_list(SEMI,trait_method_sig), RBRACE] -// [252, nonempty_list(attribute) → • ATTRIBUTE, LIDENT / ASYNC] -// [253, nonempty_list(attribute) → • ATTRIBUTE nonempty_list(attribute), LIDENT / ASYNC] -// [264, separated_nonempty_list(SEMI,trait_method_sig) → • trait_method_sig, RBRACE] -// [265, separated_nonempty_list(SEMI,trait_method_sig) → • trait_method_sig SEMI separated_nonempty_list(SEMI,trait_method_sig), RBRACE] +// [118, trait_sig → TRAIT uident loption(preceded(COLON,separated_nonempty_list(PLUS,qualified_uident))) • trait_body, EOF / SEMI] +// [124, trait_body → •, EOF / SEMI] +// [125, trait_body → • LBRACE separated_list(SEMI,trait_method_sig) RBRACE, EOF / SEMI] fn yy_state_51(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_ATTRIBUTE => Shift(yy_state_19) - T_LIDENT => Shift(yy_state_38) - NT_trait_method_sig => Shift(yy_state_52) - NT_nonempty_list_attribute_ => Shift(yy_state_55) - NT_lident => Shift(yy_state_142) - T_ASYNC => Shift(yy_state_149) - NT_separated_nonempty_list_SEMI_trait_method_sig_ => Shift(yy_state_157) - NT_separated_list_SEMI_trait_method_sig_ => Shift(yy_state_158) - T_RBRACE => Reduce(0, NT_separated_list_SEMI_trait_method_sig_, yy_action_259) - _ => Error - } -} - -// [264, separated_nonempty_list(SEMI,trait_method_sig) → trait_method_sig •, RBRACE] -// [265, separated_nonempty_list(SEMI,trait_method_sig) → trait_method_sig • SEMI separated_nonempty_list(SEMI,trait_method_sig), RBRACE] + T_LBRACE => Shift(yy_state_52) + NT_trait_body => Shift(yy_state_212) + T_EOF | T_SEMI => Reduce(0, NT_trait_body, yy_action_264) + _ => Error + } +} + +// [48, trait_method_sig → • ASYNC FN loption(type_params_with_constraints) lident LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type boption(eq_underscore), SEMI / RBRACE] +// [49, trait_method_sig → • FN loption(type_params_with_constraints) lident LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type boption(eq_underscore), SEMI / RBRACE] +// [50, trait_method_sig → • nonempty_list(attribute) ASYNC FN loption(type_params_with_constraints) lident LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type boption(eq_underscore), SEMI / RBRACE] +// [51, trait_method_sig → • nonempty_list(attribute) FN loption(type_params_with_constraints) lident LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type boption(eq_underscore), SEMI / RBRACE] +// [52, trait_method_sig → • ASYNC lident LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type boption(eq_underscore), SEMI / RBRACE] +// [53, trait_method_sig → • lident LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type boption(eq_underscore), SEMI / RBRACE] +// [54, trait_method_sig → • nonempty_list(attribute) ASYNC lident LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type boption(eq_underscore), SEMI / RBRACE] +// [55, trait_method_sig → • nonempty_list(attribute) lident LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type boption(eq_underscore), SEMI / RBRACE] +// [125, trait_body → LBRACE • separated_list(SEMI,trait_method_sig) RBRACE, EOF / SEMI] +// [217, lident → • LIDENT, LPAREN] +// [218, lident → • EXTEND, LPAREN] +// [237, separated_list(SEMI,trait_method_sig) → •, RBRACE] +// [238, separated_list(SEMI,trait_method_sig) → • separated_nonempty_list(SEMI,trait_method_sig), RBRACE] +// [257, nonempty_list(attribute) → • ATTRIBUTE, LIDENT / ASYNC / FN / EXTEND] +// [258, nonempty_list(attribute) → • ATTRIBUTE nonempty_list(attribute), LIDENT / ASYNC / FN / EXTEND] +// [269, separated_nonempty_list(SEMI,trait_method_sig) → • trait_method_sig, RBRACE] +// [270, separated_nonempty_list(SEMI,trait_method_sig) → • trait_method_sig SEMI separated_nonempty_list(SEMI,trait_method_sig), RBRACE] fn yy_state_52(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_SEMI => Shift(yy_state_53) - T_RBRACE => Reduce(1, NT_separated_nonempty_list_SEMI_trait_method_sig_, yy_action_258) + T_ATTRIBUTE => Shift(yy_state_19) + T_EXTEND => Shift(yy_state_38) + T_LIDENT => Shift(yy_state_39) + NT_trait_method_sig => Shift(yy_state_53) + NT_lident => Shift(yy_state_56) + NT_nonempty_list_attribute_ => Shift(yy_state_134) + T_FN => Shift(yy_state_183) + T_ASYNC => Shift(yy_state_192) + NT_separated_nonempty_list_SEMI_trait_method_sig_ => Shift(yy_state_209) + NT_separated_list_SEMI_trait_method_sig_ => Shift(yy_state_210) + T_RBRACE => Reduce(0, NT_separated_list_SEMI_trait_method_sig_, yy_action_263) _ => Error } } -// [48, trait_method_sig → • ASYNC lident LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type boption(eq_underscore), SEMI / RBRACE] -// [49, trait_method_sig → • lident LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type boption(eq_underscore), SEMI / RBRACE] -// [50, trait_method_sig → • nonempty_list(attribute) ASYNC lident LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type boption(eq_underscore), SEMI / RBRACE] -// [51, trait_method_sig → • nonempty_list(attribute) lident LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type boption(eq_underscore), SEMI / RBRACE] -// [213, lident → • LIDENT, LPAREN] -// [252, nonempty_list(attribute) → • ATTRIBUTE, LIDENT / ASYNC] -// [253, nonempty_list(attribute) → • ATTRIBUTE nonempty_list(attribute), LIDENT / ASYNC] -// [264, separated_nonempty_list(SEMI,trait_method_sig) → • trait_method_sig, RBRACE] -// [265, separated_nonempty_list(SEMI,trait_method_sig) → • trait_method_sig SEMI separated_nonempty_list(SEMI,trait_method_sig), RBRACE] -// [265, separated_nonempty_list(SEMI,trait_method_sig) → trait_method_sig SEMI • separated_nonempty_list(SEMI,trait_method_sig), RBRACE] +// [269, separated_nonempty_list(SEMI,trait_method_sig) → trait_method_sig •, RBRACE] +// [270, separated_nonempty_list(SEMI,trait_method_sig) → trait_method_sig • SEMI separated_nonempty_list(SEMI,trait_method_sig), RBRACE] fn yy_state_53(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_ATTRIBUTE => Shift(yy_state_19) - T_LIDENT => Shift(yy_state_38) - NT_trait_method_sig => Shift(yy_state_52) - NT_separated_nonempty_list_SEMI_trait_method_sig_ => Shift(yy_state_54) - NT_nonempty_list_attribute_ => Shift(yy_state_55) - NT_lident => Shift(yy_state_142) - T_ASYNC => Shift(yy_state_149) + T_SEMI => Shift(yy_state_54) + T_RBRACE => Reduce(1, NT_separated_nonempty_list_SEMI_trait_method_sig_, yy_action_262) _ => Error } } -// [265, separated_nonempty_list(SEMI,trait_method_sig) → trait_method_sig SEMI separated_nonempty_list(SEMI,trait_method_sig) •, RBRACE] +// [48, trait_method_sig → • ASYNC FN loption(type_params_with_constraints) lident LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type boption(eq_underscore), SEMI / RBRACE] +// [49, trait_method_sig → • FN loption(type_params_with_constraints) lident LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type boption(eq_underscore), SEMI / RBRACE] +// [50, trait_method_sig → • nonempty_list(attribute) ASYNC FN loption(type_params_with_constraints) lident LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type boption(eq_underscore), SEMI / RBRACE] +// [51, trait_method_sig → • nonempty_list(attribute) FN loption(type_params_with_constraints) lident LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type boption(eq_underscore), SEMI / RBRACE] +// [52, trait_method_sig → • ASYNC lident LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type boption(eq_underscore), SEMI / RBRACE] +// [53, trait_method_sig → • lident LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type boption(eq_underscore), SEMI / RBRACE] +// [54, trait_method_sig → • nonempty_list(attribute) ASYNC lident LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type boption(eq_underscore), SEMI / RBRACE] +// [55, trait_method_sig → • nonempty_list(attribute) lident LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type boption(eq_underscore), SEMI / RBRACE] +// [217, lident → • LIDENT, LPAREN] +// [218, lident → • EXTEND, LPAREN] +// [257, nonempty_list(attribute) → • ATTRIBUTE, LIDENT / ASYNC / FN / EXTEND] +// [258, nonempty_list(attribute) → • ATTRIBUTE nonempty_list(attribute), LIDENT / ASYNC / FN / EXTEND] +// [269, separated_nonempty_list(SEMI,trait_method_sig) → • trait_method_sig, RBRACE] +// [270, separated_nonempty_list(SEMI,trait_method_sig) → • trait_method_sig SEMI separated_nonempty_list(SEMI,trait_method_sig), RBRACE] +// [270, separated_nonempty_list(SEMI,trait_method_sig) → trait_method_sig SEMI • separated_nonempty_list(SEMI,trait_method_sig), RBRACE] fn yy_state_54(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_separated_nonempty_list_SEMI_trait_method_sig_, yy_action_257) -} - -// [50, trait_method_sig → nonempty_list(attribute) • ASYNC lident LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type boption(eq_underscore), SEMI / RBRACE] -// [51, trait_method_sig → nonempty_list(attribute) • lident LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type boption(eq_underscore), SEMI / RBRACE] -// [213, lident → • LIDENT, LPAREN] -fn yy_state_55(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LIDENT => Shift(yy_state_38) + T_ATTRIBUTE => Shift(yy_state_19) + T_EXTEND => Shift(yy_state_38) + T_LIDENT => Shift(yy_state_39) + NT_trait_method_sig => Shift(yy_state_53) + NT_separated_nonempty_list_SEMI_trait_method_sig_ => Shift(yy_state_55) NT_lident => Shift(yy_state_56) - T_ASYNC => Shift(yy_state_134) + NT_nonempty_list_attribute_ => Shift(yy_state_134) + T_FN => Shift(yy_state_183) + T_ASYNC => Shift(yy_state_192) _ => Error } } -// [51, trait_method_sig → nonempty_list(attribute) lident • LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type boption(eq_underscore), SEMI / RBRACE] +// [270, separated_nonempty_list(SEMI,trait_method_sig) → trait_method_sig SEMI separated_nonempty_list(SEMI,trait_method_sig) •, RBRACE] +fn yy_state_55(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_separated_nonempty_list_SEMI_trait_method_sig_, yy_action_261) +} + +// [53, trait_method_sig → lident • LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type boption(eq_underscore), SEMI / RBRACE] fn yy_state_56(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_LPAREN => Shift(yy_state_57) @@ -4684,36 +4787,40 @@ fn yy_state_56(_lookahead : YYSymbol) -> YYDecision { } } -// [51, trait_method_sig → nonempty_list(attribute) lident LPAREN • separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type boption(eq_underscore), SEMI / RBRACE] -// [167, simple_type → • simple_type QUESTION, RPAREN / COMMA / QUESTION] -// [168, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, RPAREN / COMMA / QUESTION] -// [169, simple_type → • LPAREN type_ RPAREN, RPAREN / COMMA / QUESTION] -// [170, simple_type → • qualified_uident_ optional_type_arguments, RPAREN / COMMA / QUESTION] -// [171, simple_type → • AMPER qualified_uident_, RPAREN / COMMA / QUESTION] -// [172, simple_type → • UNDERSCORE, RPAREN / COMMA / QUESTION] -// [173, type_ → • simple_type, RPAREN / COMMA] -// [174, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [175, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [176, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [177, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [178, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [179, type_ → • LPAREN RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [180, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [181, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [190, parameter → • type_, RPAREN / COMMA] -// [191, parameter → • POST_LABEL COLON type_, RPAREN / COMMA] -// [192, parameter → • label QUESTION COLON type_, RPAREN / COMMA] -// [210, qualified_uident_ → • UIDENT, RPAREN / COMMA / QUESTION / LBRACKET] -// [211, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, RPAREN / COMMA / QUESTION / LBRACKET] -// [214, label → • LIDENT, QUESTION] -// [219, separated_list(COMMA,parameter) → •, RPAREN] -// [220, separated_list(COMMA,parameter) → • separated_nonempty_list(COMMA,parameter), RPAREN] -// [258, separated_nonempty_list(COMMA,parameter) → • parameter, RPAREN] -// [259, separated_nonempty_list(COMMA,parameter) → • parameter COMMA separated_nonempty_list(COMMA,parameter), RPAREN] +// [53, trait_method_sig → lident LPAREN • separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type boption(eq_underscore), SEMI / RBRACE] +// [171, simple_type → • simple_type QUESTION, RPAREN / COMMA / QUESTION] +// [172, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, RPAREN / COMMA / QUESTION] +// [173, simple_type → • LPAREN type_ RPAREN, RPAREN / COMMA / QUESTION] +// [174, simple_type → • qualified_uident_ optional_type_arguments, RPAREN / COMMA / QUESTION] +// [175, simple_type → • AMPER qualified_uident_, RPAREN / COMMA / QUESTION] +// [176, simple_type → • UNDERSCORE, RPAREN / COMMA / QUESTION] +// [177, type_ → • simple_type, RPAREN / COMMA] +// [178, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [179, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [180, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [181, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [182, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [183, type_ → • LPAREN RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [184, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [185, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [194, parameter → • type_, RPAREN / COMMA] +// [195, parameter → • POST_LABEL COLON type_, RPAREN / COMMA] +// [196, parameter → • label QUESTION COLON type_, RPAREN / COMMA] +// [214, qualified_uident_ → • UIDENT, RPAREN / COMMA / QUESTION / LBRACKET] +// [215, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, RPAREN / COMMA / QUESTION / LBRACKET] +// [217, lident → • LIDENT, QUESTION] +// [218, lident → • EXTEND, QUESTION] +// [219, label → • lident, QUESTION] +// [224, separated_list(COMMA,parameter) → •, RPAREN] +// [225, separated_list(COMMA,parameter) → • separated_nonempty_list(COMMA,parameter), RPAREN] +// [263, separated_nonempty_list(COMMA,parameter) → • parameter, RPAREN] +// [264, separated_nonempty_list(COMMA,parameter) → • parameter COMMA separated_nonempty_list(COMMA,parameter), RPAREN] fn yy_state_57(_lookahead : YYSymbol) -> YYDecision { match _lookahead { + T_EXTEND => Shift(yy_state_38) + T_LIDENT => Shift(yy_state_39) NT_parameter => Shift(yy_state_58) - T_LIDENT => Shift(yy_state_61) + NT_lident => Shift(yy_state_61) T_PACKAGE_NAME => Shift(yy_state_62) T_UIDENT => Shift(yy_state_64) NT_label => Shift(yy_state_65) @@ -4727,50 +4834,54 @@ fn yy_state_57(_lookahead : YYSymbol) -> YYDecision { NT_type_ => Shift(yy_state_125) NT_separated_nonempty_list_COMMA_parameter_ => Shift(yy_state_126) NT_separated_list_COMMA_parameter_ => Shift(yy_state_127) - T_RPAREN => Reduce(0, NT_separated_list_COMMA_parameter_, yy_action_256) + T_RPAREN => Reduce(0, NT_separated_list_COMMA_parameter_, yy_action_260) _ => Error } } -// [258, separated_nonempty_list(COMMA,parameter) → parameter •, RPAREN] -// [259, separated_nonempty_list(COMMA,parameter) → parameter • COMMA separated_nonempty_list(COMMA,parameter), RPAREN] +// [263, separated_nonempty_list(COMMA,parameter) → parameter •, RPAREN] +// [264, separated_nonempty_list(COMMA,parameter) → parameter • COMMA separated_nonempty_list(COMMA,parameter), RPAREN] fn yy_state_58(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_COMMA => Shift(yy_state_59) - T_RPAREN => Reduce(1, NT_separated_nonempty_list_COMMA_parameter_, yy_action_255) - _ => Error - } -} - -// [167, simple_type → • simple_type QUESTION, RPAREN / COMMA / QUESTION] -// [168, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, RPAREN / COMMA / QUESTION] -// [169, simple_type → • LPAREN type_ RPAREN, RPAREN / COMMA / QUESTION] -// [170, simple_type → • qualified_uident_ optional_type_arguments, RPAREN / COMMA / QUESTION] -// [171, simple_type → • AMPER qualified_uident_, RPAREN / COMMA / QUESTION] -// [172, simple_type → • UNDERSCORE, RPAREN / COMMA / QUESTION] -// [173, type_ → • simple_type, RPAREN / COMMA] -// [174, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [175, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [176, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [177, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [178, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [179, type_ → • LPAREN RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [180, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [181, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [190, parameter → • type_, RPAREN / COMMA] -// [191, parameter → • POST_LABEL COLON type_, RPAREN / COMMA] -// [192, parameter → • label QUESTION COLON type_, RPAREN / COMMA] -// [210, qualified_uident_ → • UIDENT, RPAREN / COMMA / QUESTION / LBRACKET] -// [211, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, RPAREN / COMMA / QUESTION / LBRACKET] -// [214, label → • LIDENT, QUESTION] -// [258, separated_nonempty_list(COMMA,parameter) → • parameter, RPAREN] -// [259, separated_nonempty_list(COMMA,parameter) → • parameter COMMA separated_nonempty_list(COMMA,parameter), RPAREN] -// [259, separated_nonempty_list(COMMA,parameter) → parameter COMMA • separated_nonempty_list(COMMA,parameter), RPAREN] + T_RPAREN => Reduce(1, NT_separated_nonempty_list_COMMA_parameter_, yy_action_259) + _ => Error + } +} + +// [171, simple_type → • simple_type QUESTION, RPAREN / COMMA / QUESTION] +// [172, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, RPAREN / COMMA / QUESTION] +// [173, simple_type → • LPAREN type_ RPAREN, RPAREN / COMMA / QUESTION] +// [174, simple_type → • qualified_uident_ optional_type_arguments, RPAREN / COMMA / QUESTION] +// [175, simple_type → • AMPER qualified_uident_, RPAREN / COMMA / QUESTION] +// [176, simple_type → • UNDERSCORE, RPAREN / COMMA / QUESTION] +// [177, type_ → • simple_type, RPAREN / COMMA] +// [178, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [179, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [180, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [181, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [182, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [183, type_ → • LPAREN RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [184, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [185, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [194, parameter → • type_, RPAREN / COMMA] +// [195, parameter → • POST_LABEL COLON type_, RPAREN / COMMA] +// [196, parameter → • label QUESTION COLON type_, RPAREN / COMMA] +// [214, qualified_uident_ → • UIDENT, RPAREN / COMMA / QUESTION / LBRACKET] +// [215, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, RPAREN / COMMA / QUESTION / LBRACKET] +// [217, lident → • LIDENT, QUESTION] +// [218, lident → • EXTEND, QUESTION] +// [219, label → • lident, QUESTION] +// [263, separated_nonempty_list(COMMA,parameter) → • parameter, RPAREN] +// [264, separated_nonempty_list(COMMA,parameter) → • parameter COMMA separated_nonempty_list(COMMA,parameter), RPAREN] +// [264, separated_nonempty_list(COMMA,parameter) → parameter COMMA • separated_nonempty_list(COMMA,parameter), RPAREN] fn yy_state_59(_lookahead : YYSymbol) -> YYDecision { match _lookahead { + T_EXTEND => Shift(yy_state_38) + T_LIDENT => Shift(yy_state_39) NT_parameter => Shift(yy_state_58) NT_separated_nonempty_list_COMMA_parameter_ => Shift(yy_state_60) - T_LIDENT => Shift(yy_state_61) + NT_lident => Shift(yy_state_61) T_PACKAGE_NAME => Shift(yy_state_62) T_UIDENT => Shift(yy_state_64) NT_label => Shift(yy_state_65) @@ -4786,17 +4897,17 @@ fn yy_state_59(_lookahead : YYSymbol) -> YYDecision { } } -// [259, separated_nonempty_list(COMMA,parameter) → parameter COMMA separated_nonempty_list(COMMA,parameter) •, RPAREN] +// [264, separated_nonempty_list(COMMA,parameter) → parameter COMMA separated_nonempty_list(COMMA,parameter) •, RPAREN] fn yy_state_60(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_separated_nonempty_list_COMMA_parameter_, yy_action_254) + ReduceNoLookahead(3, NT_separated_nonempty_list_COMMA_parameter_, yy_action_258) } -// [214, label → LIDENT •, QUESTION] +// [219, label → lident •, QUESTION] fn yy_state_61(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_label, yy_action_253) + ReduceNoLookahead(1, NT_label, yy_action_257) } -// [211, qualified_uident_ → PACKAGE_NAME • DOT_UIDENT, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / LBRACKET / RBRACKET / RBRACE / NORAISE] +// [215, qualified_uident_ → PACKAGE_NAME • DOT_UIDENT, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / LBRACKET / RBRACKET / RBRACE / NORAISE] fn yy_state_62(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_DOT_UIDENT => Shift(yy_state_63) @@ -4804,17 +4915,17 @@ fn yy_state_62(_lookahead : YYSymbol) -> YYDecision { } } -// [211, qualified_uident_ → PACKAGE_NAME DOT_UIDENT •, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / LBRACKET / RBRACKET / RBRACE / NORAISE] +// [215, qualified_uident_ → PACKAGE_NAME DOT_UIDENT •, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / LBRACKET / RBRACKET / RBRACE / NORAISE] fn yy_state_63(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(2, NT_qualified_uident_, yy_action_252) + ReduceNoLookahead(2, NT_qualified_uident_, yy_action_256) } -// [210, qualified_uident_ → UIDENT •, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / LBRACKET / RBRACKET / RBRACE / NORAISE] +// [214, qualified_uident_ → UIDENT •, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / LBRACKET / RBRACKET / RBRACE / NORAISE] fn yy_state_64(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_qualified_uident_, yy_action_251) + ReduceNoLookahead(1, NT_qualified_uident_, yy_action_255) } -// [192, parameter → label • QUESTION COLON type_, RPAREN / COMMA] +// [196, parameter → label • QUESTION COLON type_, RPAREN / COMMA] fn yy_state_65(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_QUESTION => Shift(yy_state_66) @@ -4822,7 +4933,7 @@ fn yy_state_65(_lookahead : YYSymbol) -> YYDecision { } } -// [192, parameter → label QUESTION • COLON type_, RPAREN / COMMA] +// [196, parameter → label QUESTION • COLON type_, RPAREN / COMMA] fn yy_state_66(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_COLON => Shift(yy_state_67) @@ -4830,24 +4941,24 @@ fn yy_state_66(_lookahead : YYSymbol) -> YYDecision { } } -// [167, simple_type → • simple_type QUESTION, RPAREN / COMMA / QUESTION] -// [168, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, RPAREN / COMMA / QUESTION] -// [169, simple_type → • LPAREN type_ RPAREN, RPAREN / COMMA / QUESTION] -// [170, simple_type → • qualified_uident_ optional_type_arguments, RPAREN / COMMA / QUESTION] -// [171, simple_type → • AMPER qualified_uident_, RPAREN / COMMA / QUESTION] -// [172, simple_type → • UNDERSCORE, RPAREN / COMMA / QUESTION] -// [173, type_ → • simple_type, RPAREN / COMMA] -// [174, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [175, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [176, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [177, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [178, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [179, type_ → • LPAREN RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [180, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [181, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [192, parameter → label QUESTION COLON • type_, RPAREN / COMMA] -// [210, qualified_uident_ → • UIDENT, RPAREN / COMMA / QUESTION / LBRACKET] -// [211, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, RPAREN / COMMA / QUESTION / LBRACKET] +// [171, simple_type → • simple_type QUESTION, RPAREN / COMMA / QUESTION] +// [172, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, RPAREN / COMMA / QUESTION] +// [173, simple_type → • LPAREN type_ RPAREN, RPAREN / COMMA / QUESTION] +// [174, simple_type → • qualified_uident_ optional_type_arguments, RPAREN / COMMA / QUESTION] +// [175, simple_type → • AMPER qualified_uident_, RPAREN / COMMA / QUESTION] +// [176, simple_type → • UNDERSCORE, RPAREN / COMMA / QUESTION] +// [177, type_ → • simple_type, RPAREN / COMMA] +// [178, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [179, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [180, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [181, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [182, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [183, type_ → • LPAREN RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [184, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [185, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [196, parameter → label QUESTION COLON • type_, RPAREN / COMMA] +// [214, qualified_uident_ → • UIDENT, RPAREN / COMMA / QUESTION / LBRACKET] +// [215, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, RPAREN / COMMA / QUESTION / LBRACKET] fn yy_state_67(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_PACKAGE_NAME => Shift(yy_state_62) @@ -4863,15 +4974,15 @@ fn yy_state_67(_lookahead : YYSymbol) -> YYDecision { } } -// [192, parameter → label QUESTION COLON type_ •, RPAREN / COMMA] +// [196, parameter → label QUESTION COLON type_ •, RPAREN / COMMA] fn yy_state_68(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(4, NT_parameter, yy_action_250) + ReduceNoLookahead(4, NT_parameter, yy_action_254) } -// [174, type_ → ASYNC • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [175, type_ → ASYNC • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [178, type_ → ASYNC • LPAREN RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [180, type_ → ASYNC • LPAREN type_ RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [178, type_ → ASYNC • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [179, type_ → ASYNC • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [182, type_ → ASYNC • LPAREN RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [184, type_ → ASYNC • LPAREN type_ RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] fn yy_state_69(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_LPAREN => Shift(yy_state_70) @@ -4879,27 +4990,27 @@ fn yy_state_69(_lookahead : YYSymbol) -> YYDecision { } } -// [167, simple_type → • simple_type QUESTION, RPAREN / COMMA / QUESTION] -// [168, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, RPAREN / COMMA / QUESTION] -// [169, simple_type → • LPAREN type_ RPAREN, RPAREN / COMMA / QUESTION] -// [170, simple_type → • qualified_uident_ optional_type_arguments, RPAREN / COMMA / QUESTION] -// [171, simple_type → • AMPER qualified_uident_, RPAREN / COMMA / QUESTION] -// [172, simple_type → • UNDERSCORE, RPAREN / COMMA / QUESTION] -// [173, type_ → • simple_type, RPAREN / COMMA] -// [174, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [174, type_ → ASYNC LPAREN • type_ COMMA RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [175, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [175, type_ → ASYNC LPAREN • type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [176, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [177, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [178, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [178, type_ → ASYNC LPAREN • RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [179, type_ → • LPAREN RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [180, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [180, type_ → ASYNC LPAREN • type_ RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [181, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [210, qualified_uident_ → • UIDENT, RPAREN / COMMA / QUESTION / LBRACKET] -// [211, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, RPAREN / COMMA / QUESTION / LBRACKET] +// [171, simple_type → • simple_type QUESTION, RPAREN / COMMA / QUESTION] +// [172, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, RPAREN / COMMA / QUESTION] +// [173, simple_type → • LPAREN type_ RPAREN, RPAREN / COMMA / QUESTION] +// [174, simple_type → • qualified_uident_ optional_type_arguments, RPAREN / COMMA / QUESTION] +// [175, simple_type → • AMPER qualified_uident_, RPAREN / COMMA / QUESTION] +// [176, simple_type → • UNDERSCORE, RPAREN / COMMA / QUESTION] +// [177, type_ → • simple_type, RPAREN / COMMA] +// [178, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [178, type_ → ASYNC LPAREN • type_ COMMA RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [179, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [179, type_ → ASYNC LPAREN • type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [180, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [181, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [182, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [182, type_ → ASYNC LPAREN • RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [183, type_ → • LPAREN RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [184, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [184, type_ → ASYNC LPAREN • type_ RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [185, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [214, qualified_uident_ → • UIDENT, RPAREN / COMMA / QUESTION / LBRACKET] +// [215, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, RPAREN / COMMA / QUESTION / LBRACKET] fn yy_state_70(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_PACKAGE_NAME => Shift(yy_state_62) @@ -4916,7 +5027,7 @@ fn yy_state_70(_lookahead : YYSymbol) -> YYDecision { } } -// [178, type_ → ASYNC LPAREN RPAREN • THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [182, type_ → ASYNC LPAREN RPAREN • THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] fn yy_state_71(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_THIN_ARROW => Shift(yy_state_72) @@ -4924,29 +5035,29 @@ fn yy_state_71(_lookahead : YYSymbol) -> YYDecision { } } -// [167, simple_type → • simple_type QUESTION, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / RBRACKET / RBRACE / NORAISE] -// [168, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / RBRACKET / RBRACE / NORAISE] -// [169, simple_type → • LPAREN type_ RPAREN, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / RBRACKET / RBRACE / NORAISE] -// [170, simple_type → • qualified_uident_ optional_type_arguments, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / RBRACKET / RBRACE / NORAISE] -// [171, simple_type → • AMPER qualified_uident_, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / RBRACKET / RBRACE / NORAISE] -// [172, simple_type → • UNDERSCORE, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / RBRACKET / RBRACE / NORAISE] -// [173, type_ → • simple_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [174, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [175, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [176, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [177, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [178, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [178, type_ → ASYNC LPAREN RPAREN THIN_ARROW • return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [179, type_ → • LPAREN RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [180, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [181, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [182, return_type → • type_, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [183, return_type → • simple_type NORAISE, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [184, return_type → • simple_type RAISE, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [185, return_type → • simple_type RAISE error_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [186, return_type → • simple_type RAISE QUESTION, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [210, qualified_uident_ → • UIDENT, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / LBRACKET / RBRACKET / RBRACE / NORAISE] -// [211, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / LBRACKET / RBRACKET / RBRACE / NORAISE] +// [171, simple_type → • simple_type QUESTION, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / RBRACKET / RBRACE / NORAISE] +// [172, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / RBRACKET / RBRACE / NORAISE] +// [173, simple_type → • LPAREN type_ RPAREN, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / RBRACKET / RBRACE / NORAISE] +// [174, simple_type → • qualified_uident_ optional_type_arguments, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / RBRACKET / RBRACE / NORAISE] +// [175, simple_type → • AMPER qualified_uident_, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / RBRACKET / RBRACE / NORAISE] +// [176, simple_type → • UNDERSCORE, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / RBRACKET / RBRACE / NORAISE] +// [177, type_ → • simple_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [178, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [179, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [180, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [181, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [182, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [182, type_ → ASYNC LPAREN RPAREN THIN_ARROW • return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [183, type_ → • LPAREN RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [184, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [185, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [186, return_type → • type_, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [187, return_type → • simple_type NORAISE, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [188, return_type → • simple_type RAISE, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [189, return_type → • simple_type RAISE error_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [190, return_type → • simple_type RAISE QUESTION, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [214, qualified_uident_ → • UIDENT, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / LBRACKET / RBRACKET / RBRACE / NORAISE] +// [215, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / LBRACKET / RBRACKET / RBRACE / NORAISE] fn yy_state_72(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_PACKAGE_NAME => Shift(yy_state_62) @@ -4963,24 +5074,24 @@ fn yy_state_72(_lookahead : YYSymbol) -> YYDecision { } } -// [182, return_type → type_ •, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [186, return_type → type_ •, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] fn yy_state_73(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_return_type, yy_action_249) + ReduceNoLookahead(1, NT_return_type, yy_action_253) } -// [178, type_ → ASYNC LPAREN RPAREN THIN_ARROW return_type •, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [182, type_ → ASYNC LPAREN RPAREN THIN_ARROW return_type •, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] fn yy_state_74(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(5, NT_type_, yy_action_248) + ReduceNoLookahead(5, NT_type_, yy_action_252) } -// [172, simple_type → UNDERSCORE •, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / RBRACKET / RBRACE / NORAISE] +// [176, simple_type → UNDERSCORE •, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / RBRACKET / RBRACE / NORAISE] fn yy_state_75(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_simple_type, yy_action_247) + ReduceNoLookahead(1, NT_simple_type, yy_action_251) } -// [171, simple_type → AMPER • qualified_uident_, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / RBRACKET / RBRACE / NORAISE] -// [210, qualified_uident_ → • UIDENT, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / RBRACKET / RBRACE / NORAISE] -// [211, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / RBRACKET / RBRACE / NORAISE] +// [175, simple_type → AMPER • qualified_uident_, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / RBRACKET / RBRACE / NORAISE] +// [214, qualified_uident_ → • UIDENT, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / RBRACKET / RBRACE / NORAISE] +// [215, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / RBRACKET / RBRACE / NORAISE] fn yy_state_76(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_PACKAGE_NAME => Shift(yy_state_62) @@ -4990,43 +5101,43 @@ fn yy_state_76(_lookahead : YYSymbol) -> YYDecision { } } -// [171, simple_type → AMPER qualified_uident_ •, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / RBRACKET / RBRACE / NORAISE] +// [175, simple_type → AMPER qualified_uident_ •, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / RBRACKET / RBRACE / NORAISE] fn yy_state_77(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(2, NT_simple_type, yy_action_246) + ReduceNoLookahead(2, NT_simple_type, yy_action_250) } -// [170, simple_type → qualified_uident_ • optional_type_arguments, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / RBRACKET / RBRACE / NORAISE] -// [188, optional_type_arguments → • LBRACKET separated_nonempty_list(COMMA,type_) RBRACKET, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / RBRACKET / RBRACE / NORAISE] -// [189, optional_type_arguments → •, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / RBRACKET / RBRACE / NORAISE] +// [174, simple_type → qualified_uident_ • optional_type_arguments, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / RBRACKET / RBRACE / NORAISE] +// [192, optional_type_arguments → • LBRACKET separated_nonempty_list(COMMA,type_) RBRACKET, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / RBRACKET / RBRACE / NORAISE] +// [193, optional_type_arguments → •, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / RBRACKET / RBRACE / NORAISE] fn yy_state_78(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_LBRACKET => Shift(yy_state_79) NT_optional_type_arguments => Shift(yy_state_109) - T_EOF | T_RAISE | T_EQUAL | T_RPAREN | T_COMMA | T_QUESTION | T_SEMI | T_RBRACKET | T_RBRACE | T_NORAISE => Reduce(0, NT_optional_type_arguments, yy_action_245) - _ => Error - } -} - -// [167, simple_type → • simple_type QUESTION, COMMA / QUESTION / RBRACKET] -// [168, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, COMMA / QUESTION / RBRACKET] -// [169, simple_type → • LPAREN type_ RPAREN, COMMA / QUESTION / RBRACKET] -// [170, simple_type → • qualified_uident_ optional_type_arguments, COMMA / QUESTION / RBRACKET] -// [171, simple_type → • AMPER qualified_uident_, COMMA / QUESTION / RBRACKET] -// [172, simple_type → • UNDERSCORE, COMMA / QUESTION / RBRACKET] -// [173, type_ → • simple_type, COMMA / RBRACKET] -// [174, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, COMMA / RBRACKET] -// [175, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, COMMA / RBRACKET] -// [176, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, COMMA / RBRACKET] -// [177, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, COMMA / RBRACKET] -// [178, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, COMMA / RBRACKET] -// [179, type_ → • LPAREN RPAREN THIN_ARROW return_type, COMMA / RBRACKET] -// [180, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, COMMA / RBRACKET] -// [181, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, COMMA / RBRACKET] -// [188, optional_type_arguments → LBRACKET • separated_nonempty_list(COMMA,type_) RBRACKET, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / RBRACKET / RBRACE / NORAISE] -// [210, qualified_uident_ → • UIDENT, COMMA / QUESTION / LBRACKET / RBRACKET] -// [211, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, COMMA / QUESTION / LBRACKET / RBRACKET] -// [250, separated_nonempty_list(COMMA,type_) → • type_, RBRACKET] -// [251, separated_nonempty_list(COMMA,type_) → • type_ COMMA separated_nonempty_list(COMMA,type_), RBRACKET] + T_EOF | T_RAISE | T_EQUAL | T_RPAREN | T_COMMA | T_QUESTION | T_SEMI | T_RBRACKET | T_RBRACE | T_NORAISE => Reduce(0, NT_optional_type_arguments, yy_action_249) + _ => Error + } +} + +// [171, simple_type → • simple_type QUESTION, COMMA / QUESTION / RBRACKET] +// [172, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, COMMA / QUESTION / RBRACKET] +// [173, simple_type → • LPAREN type_ RPAREN, COMMA / QUESTION / RBRACKET] +// [174, simple_type → • qualified_uident_ optional_type_arguments, COMMA / QUESTION / RBRACKET] +// [175, simple_type → • AMPER qualified_uident_, COMMA / QUESTION / RBRACKET] +// [176, simple_type → • UNDERSCORE, COMMA / QUESTION / RBRACKET] +// [177, type_ → • simple_type, COMMA / RBRACKET] +// [178, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, COMMA / RBRACKET] +// [179, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, COMMA / RBRACKET] +// [180, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, COMMA / RBRACKET] +// [181, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, COMMA / RBRACKET] +// [182, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, COMMA / RBRACKET] +// [183, type_ → • LPAREN RPAREN THIN_ARROW return_type, COMMA / RBRACKET] +// [184, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, COMMA / RBRACKET] +// [185, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, COMMA / RBRACKET] +// [192, optional_type_arguments → LBRACKET • separated_nonempty_list(COMMA,type_) RBRACKET, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / RBRACKET / RBRACE / NORAISE] +// [214, qualified_uident_ → • UIDENT, COMMA / QUESTION / LBRACKET / RBRACKET] +// [215, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, COMMA / QUESTION / LBRACKET / RBRACKET] +// [255, separated_nonempty_list(COMMA,type_) → • type_, RBRACKET] +// [256, separated_nonempty_list(COMMA,type_) → • type_ COMMA separated_nonempty_list(COMMA,type_), RBRACKET] fn yy_state_79(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_PACKAGE_NAME => Shift(yy_state_62) @@ -5043,36 +5154,36 @@ fn yy_state_79(_lookahead : YYSymbol) -> YYDecision { } } -// [250, separated_nonempty_list(COMMA,type_) → type_ •, RPAREN / RBRACKET] -// [251, separated_nonempty_list(COMMA,type_) → type_ • COMMA separated_nonempty_list(COMMA,type_), RPAREN / RBRACKET] +// [255, separated_nonempty_list(COMMA,type_) → type_ •, RPAREN / RBRACKET] +// [256, separated_nonempty_list(COMMA,type_) → type_ • COMMA separated_nonempty_list(COMMA,type_), RPAREN / RBRACKET] fn yy_state_80(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_COMMA => Shift(yy_state_81) - T_RPAREN | T_RBRACKET => Reduce(1, NT_separated_nonempty_list_COMMA_type__, yy_action_244) - _ => Error - } -} - -// [167, simple_type → • simple_type QUESTION, RPAREN / COMMA / QUESTION / RBRACKET] -// [168, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, RPAREN / COMMA / QUESTION / RBRACKET] -// [169, simple_type → • LPAREN type_ RPAREN, RPAREN / COMMA / QUESTION / RBRACKET] -// [170, simple_type → • qualified_uident_ optional_type_arguments, RPAREN / COMMA / QUESTION / RBRACKET] -// [171, simple_type → • AMPER qualified_uident_, RPAREN / COMMA / QUESTION / RBRACKET] -// [172, simple_type → • UNDERSCORE, RPAREN / COMMA / QUESTION / RBRACKET] -// [173, type_ → • simple_type, RPAREN / COMMA / RBRACKET] -// [174, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, RPAREN / COMMA / RBRACKET] -// [175, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, RPAREN / COMMA / RBRACKET] -// [176, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, RPAREN / COMMA / RBRACKET] -// [177, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, RPAREN / COMMA / RBRACKET] -// [178, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, RPAREN / COMMA / RBRACKET] -// [179, type_ → • LPAREN RPAREN THIN_ARROW return_type, RPAREN / COMMA / RBRACKET] -// [180, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, RPAREN / COMMA / RBRACKET] -// [181, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, RPAREN / COMMA / RBRACKET] -// [210, qualified_uident_ → • UIDENT, RPAREN / COMMA / QUESTION / LBRACKET / RBRACKET] -// [211, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, RPAREN / COMMA / QUESTION / LBRACKET / RBRACKET] -// [250, separated_nonempty_list(COMMA,type_) → • type_, RPAREN / RBRACKET] -// [251, separated_nonempty_list(COMMA,type_) → • type_ COMMA separated_nonempty_list(COMMA,type_), RPAREN / RBRACKET] -// [251, separated_nonempty_list(COMMA,type_) → type_ COMMA • separated_nonempty_list(COMMA,type_), RPAREN / RBRACKET] + T_RPAREN | T_RBRACKET => Reduce(1, NT_separated_nonempty_list_COMMA_type__, yy_action_248) + _ => Error + } +} + +// [171, simple_type → • simple_type QUESTION, RPAREN / COMMA / QUESTION / RBRACKET] +// [172, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, RPAREN / COMMA / QUESTION / RBRACKET] +// [173, simple_type → • LPAREN type_ RPAREN, RPAREN / COMMA / QUESTION / RBRACKET] +// [174, simple_type → • qualified_uident_ optional_type_arguments, RPAREN / COMMA / QUESTION / RBRACKET] +// [175, simple_type → • AMPER qualified_uident_, RPAREN / COMMA / QUESTION / RBRACKET] +// [176, simple_type → • UNDERSCORE, RPAREN / COMMA / QUESTION / RBRACKET] +// [177, type_ → • simple_type, RPAREN / COMMA / RBRACKET] +// [178, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, RPAREN / COMMA / RBRACKET] +// [179, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, RPAREN / COMMA / RBRACKET] +// [180, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, RPAREN / COMMA / RBRACKET] +// [181, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, RPAREN / COMMA / RBRACKET] +// [182, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, RPAREN / COMMA / RBRACKET] +// [183, type_ → • LPAREN RPAREN THIN_ARROW return_type, RPAREN / COMMA / RBRACKET] +// [184, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, RPAREN / COMMA / RBRACKET] +// [185, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, RPAREN / COMMA / RBRACKET] +// [214, qualified_uident_ → • UIDENT, RPAREN / COMMA / QUESTION / LBRACKET / RBRACKET] +// [215, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, RPAREN / COMMA / QUESTION / LBRACKET / RBRACKET] +// [255, separated_nonempty_list(COMMA,type_) → • type_, RPAREN / RBRACKET] +// [256, separated_nonempty_list(COMMA,type_) → • type_ COMMA separated_nonempty_list(COMMA,type_), RPAREN / RBRACKET] +// [256, separated_nonempty_list(COMMA,type_) → type_ COMMA • separated_nonempty_list(COMMA,type_), RPAREN / RBRACKET] fn yy_state_81(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_PACKAGE_NAME => Shift(yy_state_62) @@ -5089,34 +5200,34 @@ fn yy_state_81(_lookahead : YYSymbol) -> YYDecision { } } -// [251, separated_nonempty_list(COMMA,type_) → type_ COMMA separated_nonempty_list(COMMA,type_) •, RPAREN / RBRACKET] +// [256, separated_nonempty_list(COMMA,type_) → type_ COMMA separated_nonempty_list(COMMA,type_) •, RPAREN / RBRACKET] fn yy_state_82(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_separated_nonempty_list_COMMA_type__, yy_action_243) -} - -// [167, simple_type → • simple_type QUESTION, RPAREN / COMMA / QUESTION] -// [168, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, RPAREN / COMMA / QUESTION] -// [168, simple_type → LPAREN • type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / RBRACKET / RBRACE / NORAISE] -// [169, simple_type → • LPAREN type_ RPAREN, RPAREN / COMMA / QUESTION] -// [169, simple_type → LPAREN • type_ RPAREN, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / RBRACKET / RBRACE / NORAISE] -// [170, simple_type → • qualified_uident_ optional_type_arguments, RPAREN / COMMA / QUESTION] -// [171, simple_type → • AMPER qualified_uident_, RPAREN / COMMA / QUESTION] -// [172, simple_type → • UNDERSCORE, RPAREN / COMMA / QUESTION] -// [173, type_ → • simple_type, RPAREN / COMMA] -// [174, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [175, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [176, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [176, type_ → LPAREN • type_ COMMA RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [177, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [177, type_ → LPAREN • type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [178, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [179, type_ → • LPAREN RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [179, type_ → LPAREN • RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [180, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [181, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [181, type_ → LPAREN • type_ RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [210, qualified_uident_ → • UIDENT, RPAREN / COMMA / QUESTION / LBRACKET] -// [211, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, RPAREN / COMMA / QUESTION / LBRACKET] + ReduceNoLookahead(3, NT_separated_nonempty_list_COMMA_type__, yy_action_247) +} + +// [171, simple_type → • simple_type QUESTION, RPAREN / COMMA / QUESTION] +// [172, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, RPAREN / COMMA / QUESTION] +// [172, simple_type → LPAREN • type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / RBRACKET / RBRACE / NORAISE] +// [173, simple_type → • LPAREN type_ RPAREN, RPAREN / COMMA / QUESTION] +// [173, simple_type → LPAREN • type_ RPAREN, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / RBRACKET / RBRACE / NORAISE] +// [174, simple_type → • qualified_uident_ optional_type_arguments, RPAREN / COMMA / QUESTION] +// [175, simple_type → • AMPER qualified_uident_, RPAREN / COMMA / QUESTION] +// [176, simple_type → • UNDERSCORE, RPAREN / COMMA / QUESTION] +// [177, type_ → • simple_type, RPAREN / COMMA] +// [178, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [179, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [180, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [180, type_ → LPAREN • type_ COMMA RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [181, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [181, type_ → LPAREN • type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [182, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [183, type_ → • LPAREN RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [183, type_ → LPAREN • RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [184, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [185, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [185, type_ → LPAREN • type_ RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [214, qualified_uident_ → • UIDENT, RPAREN / COMMA / QUESTION / LBRACKET] +// [215, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, RPAREN / COMMA / QUESTION / LBRACKET] fn yy_state_83(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_PACKAGE_NAME => Shift(yy_state_62) @@ -5133,7 +5244,7 @@ fn yy_state_83(_lookahead : YYSymbol) -> YYDecision { } } -// [179, type_ → LPAREN RPAREN • THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [183, type_ → LPAREN RPAREN • THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] fn yy_state_84(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_THIN_ARROW => Shift(yy_state_85) @@ -5141,29 +5252,29 @@ fn yy_state_84(_lookahead : YYSymbol) -> YYDecision { } } -// [167, simple_type → • simple_type QUESTION, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / RBRACKET / RBRACE / NORAISE] -// [168, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / RBRACKET / RBRACE / NORAISE] -// [169, simple_type → • LPAREN type_ RPAREN, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / RBRACKET / RBRACE / NORAISE] -// [170, simple_type → • qualified_uident_ optional_type_arguments, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / RBRACKET / RBRACE / NORAISE] -// [171, simple_type → • AMPER qualified_uident_, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / RBRACKET / RBRACE / NORAISE] -// [172, simple_type → • UNDERSCORE, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / RBRACKET / RBRACE / NORAISE] -// [173, type_ → • simple_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [174, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [175, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [176, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [177, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [178, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [179, type_ → • LPAREN RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [179, type_ → LPAREN RPAREN THIN_ARROW • return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [180, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [181, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [182, return_type → • type_, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [183, return_type → • simple_type NORAISE, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [184, return_type → • simple_type RAISE, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [185, return_type → • simple_type RAISE error_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [186, return_type → • simple_type RAISE QUESTION, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [210, qualified_uident_ → • UIDENT, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / LBRACKET / RBRACKET / RBRACE / NORAISE] -// [211, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / LBRACKET / RBRACKET / RBRACE / NORAISE] +// [171, simple_type → • simple_type QUESTION, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / RBRACKET / RBRACE / NORAISE] +// [172, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / RBRACKET / RBRACE / NORAISE] +// [173, simple_type → • LPAREN type_ RPAREN, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / RBRACKET / RBRACE / NORAISE] +// [174, simple_type → • qualified_uident_ optional_type_arguments, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / RBRACKET / RBRACE / NORAISE] +// [175, simple_type → • AMPER qualified_uident_, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / RBRACKET / RBRACE / NORAISE] +// [176, simple_type → • UNDERSCORE, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / RBRACKET / RBRACE / NORAISE] +// [177, type_ → • simple_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [178, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [179, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [180, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [181, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [182, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [183, type_ → • LPAREN RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [183, type_ → LPAREN RPAREN THIN_ARROW • return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [184, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [185, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [186, return_type → • type_, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [187, return_type → • simple_type NORAISE, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [188, return_type → • simple_type RAISE, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [189, return_type → • simple_type RAISE error_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [190, return_type → • simple_type RAISE QUESTION, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [214, qualified_uident_ → • UIDENT, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / LBRACKET / RBRACKET / RBRACE / NORAISE] +// [215, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / LBRACKET / RBRACKET / RBRACE / NORAISE] fn yy_state_85(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_PACKAGE_NAME => Shift(yy_state_62) @@ -5180,33 +5291,33 @@ fn yy_state_85(_lookahead : YYSymbol) -> YYDecision { } } -// [179, type_ → LPAREN RPAREN THIN_ARROW return_type •, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [183, type_ → LPAREN RPAREN THIN_ARROW return_type •, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] fn yy_state_86(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(4, NT_type_, yy_action_242) + ReduceNoLookahead(4, NT_type_, yy_action_246) } -// [167, simple_type → simple_type • QUESTION, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / RBRACKET / RBRACE / NORAISE] -// [173, type_ → simple_type •, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [183, return_type → simple_type • NORAISE, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [184, return_type → simple_type • RAISE, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [185, return_type → simple_type • RAISE error_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [186, return_type → simple_type • RAISE QUESTION, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [171, simple_type → simple_type • QUESTION, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / RBRACKET / RBRACE / NORAISE] +// [177, type_ → simple_type •, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [187, return_type → simple_type • NORAISE, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [188, return_type → simple_type • RAISE, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [189, return_type → simple_type • RAISE error_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [190, return_type → simple_type • RAISE QUESTION, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] fn yy_state_87(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_RAISE => Shift(yy_state_88) T_NORAISE => Shift(yy_state_92) T_QUESTION => Shift(yy_state_93) - T_EOF | T_EQUAL | T_RPAREN | T_COMMA | T_SEMI | T_RBRACKET | T_RBRACE => Reduce(1, NT_type_, yy_action_241) + T_EOF | T_EQUAL | T_RPAREN | T_COMMA | T_SEMI | T_RBRACKET | T_RBRACE => Reduce(1, NT_type_, yy_action_245) _ => Error } } -// [184, return_type → simple_type RAISE •, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [185, return_type → simple_type RAISE • error_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [186, return_type → simple_type RAISE • QUESTION, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [187, error_type → • qualified_uident_, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [210, qualified_uident_ → • UIDENT, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [211, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [188, return_type → simple_type RAISE •, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [189, return_type → simple_type RAISE • error_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [190, return_type → simple_type RAISE • QUESTION, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [191, error_type → • qualified_uident_, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [214, qualified_uident_ → • UIDENT, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [215, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] fn yy_state_88(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_PACKAGE_NAME => Shift(yy_state_62) @@ -5214,41 +5325,41 @@ fn yy_state_88(_lookahead : YYSymbol) -> YYDecision { NT_qualified_uident_ => Shift(yy_state_89) T_QUESTION => Shift(yy_state_90) NT_error_type => Shift(yy_state_91) - T_EOF | T_EQUAL | T_RPAREN | T_COMMA | T_SEMI | T_RBRACKET | T_RBRACE => Reduce(2, NT_return_type, yy_action_240) + T_EOF | T_EQUAL | T_RPAREN | T_COMMA | T_SEMI | T_RBRACKET | T_RBRACE => Reduce(2, NT_return_type, yy_action_244) _ => Error } } -// [187, error_type → qualified_uident_ •, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [191, error_type → qualified_uident_ •, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] fn yy_state_89(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_error_type, yy_action_239) + ReduceNoLookahead(1, NT_error_type, yy_action_243) } -// [186, return_type → simple_type RAISE QUESTION •, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [190, return_type → simple_type RAISE QUESTION •, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] fn yy_state_90(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_return_type, yy_action_238) + ReduceNoLookahead(3, NT_return_type, yy_action_242) } -// [185, return_type → simple_type RAISE error_type •, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [189, return_type → simple_type RAISE error_type •, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] fn yy_state_91(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_return_type, yy_action_237) + ReduceNoLookahead(3, NT_return_type, yy_action_241) } -// [183, return_type → simple_type NORAISE •, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [187, return_type → simple_type NORAISE •, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] fn yy_state_92(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(2, NT_return_type, yy_action_236) + ReduceNoLookahead(2, NT_return_type, yy_action_240) } -// [167, simple_type → simple_type QUESTION •, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / RBRACKET / RBRACE / NORAISE] +// [171, simple_type → simple_type QUESTION •, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / RBRACKET / RBRACE / NORAISE] fn yy_state_93(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(2, NT_simple_type, yy_action_235) + ReduceNoLookahead(2, NT_simple_type, yy_action_239) } -// [168, simple_type → LPAREN type_ • COMMA separated_nonempty_list(COMMA,type_) RPAREN, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / RBRACKET / RBRACE / NORAISE] -// [169, simple_type → LPAREN type_ • RPAREN, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / RBRACKET / RBRACE / NORAISE] -// [176, type_ → LPAREN type_ • COMMA RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [177, type_ → LPAREN type_ • COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [181, type_ → LPAREN type_ • RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [172, simple_type → LPAREN type_ • COMMA separated_nonempty_list(COMMA,type_) RPAREN, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / RBRACKET / RBRACE / NORAISE] +// [173, simple_type → LPAREN type_ • RPAREN, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / RBRACKET / RBRACE / NORAISE] +// [180, type_ → LPAREN type_ • COMMA RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [181, type_ → LPAREN type_ • COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [185, type_ → LPAREN type_ • RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] fn yy_state_94(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_RPAREN => Shift(yy_state_95) @@ -5257,39 +5368,39 @@ fn yy_state_94(_lookahead : YYSymbol) -> YYDecision { } } -// [169, simple_type → LPAREN type_ RPAREN •, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / RBRACKET / RBRACE / NORAISE] -// [181, type_ → LPAREN type_ RPAREN • THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [173, simple_type → LPAREN type_ RPAREN •, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / RBRACKET / RBRACE / NORAISE] +// [185, type_ → LPAREN type_ RPAREN • THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] fn yy_state_95(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_THIN_ARROW => Shift(yy_state_96) - T_EOF | T_RAISE | T_EQUAL | T_RPAREN | T_COMMA | T_QUESTION | T_SEMI | T_RBRACKET | T_RBRACE | T_NORAISE => Reduce(3, NT_simple_type, yy_action_234) - _ => Error - } -} - -// [167, simple_type → • simple_type QUESTION, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / RBRACKET / RBRACE / NORAISE] -// [168, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / RBRACKET / RBRACE / NORAISE] -// [169, simple_type → • LPAREN type_ RPAREN, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / RBRACKET / RBRACE / NORAISE] -// [170, simple_type → • qualified_uident_ optional_type_arguments, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / RBRACKET / RBRACE / NORAISE] -// [171, simple_type → • AMPER qualified_uident_, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / RBRACKET / RBRACE / NORAISE] -// [172, simple_type → • UNDERSCORE, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / RBRACKET / RBRACE / NORAISE] -// [173, type_ → • simple_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [174, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [175, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [176, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [177, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [178, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [179, type_ → • LPAREN RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [180, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [181, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [181, type_ → LPAREN type_ RPAREN THIN_ARROW • return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [182, return_type → • type_, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [183, return_type → • simple_type NORAISE, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [184, return_type → • simple_type RAISE, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [185, return_type → • simple_type RAISE error_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [186, return_type → • simple_type RAISE QUESTION, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [210, qualified_uident_ → • UIDENT, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / LBRACKET / RBRACKET / RBRACE / NORAISE] -// [211, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / LBRACKET / RBRACKET / RBRACE / NORAISE] + T_EOF | T_RAISE | T_EQUAL | T_RPAREN | T_COMMA | T_QUESTION | T_SEMI | T_RBRACKET | T_RBRACE | T_NORAISE => Reduce(3, NT_simple_type, yy_action_238) + _ => Error + } +} + +// [171, simple_type → • simple_type QUESTION, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / RBRACKET / RBRACE / NORAISE] +// [172, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / RBRACKET / RBRACE / NORAISE] +// [173, simple_type → • LPAREN type_ RPAREN, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / RBRACKET / RBRACE / NORAISE] +// [174, simple_type → • qualified_uident_ optional_type_arguments, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / RBRACKET / RBRACE / NORAISE] +// [175, simple_type → • AMPER qualified_uident_, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / RBRACKET / RBRACE / NORAISE] +// [176, simple_type → • UNDERSCORE, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / RBRACKET / RBRACE / NORAISE] +// [177, type_ → • simple_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [178, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [179, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [180, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [181, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [182, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [183, type_ → • LPAREN RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [184, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [185, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [185, type_ → LPAREN type_ RPAREN THIN_ARROW • return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [186, return_type → • type_, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [187, return_type → • simple_type NORAISE, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [188, return_type → • simple_type RAISE, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [189, return_type → • simple_type RAISE error_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [190, return_type → • simple_type RAISE QUESTION, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [214, qualified_uident_ → • UIDENT, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / LBRACKET / RBRACKET / RBRACE / NORAISE] +// [215, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / LBRACKET / RBRACKET / RBRACE / NORAISE] fn yy_state_96(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_PACKAGE_NAME => Shift(yy_state_62) @@ -5306,33 +5417,33 @@ fn yy_state_96(_lookahead : YYSymbol) -> YYDecision { } } -// [181, type_ → LPAREN type_ RPAREN THIN_ARROW return_type •, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [185, type_ → LPAREN type_ RPAREN THIN_ARROW return_type •, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] fn yy_state_97(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(5, NT_type_, yy_action_233) -} - -// [167, simple_type → • simple_type QUESTION, RPAREN / COMMA / QUESTION] -// [168, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, RPAREN / COMMA / QUESTION] -// [168, simple_type → LPAREN type_ COMMA • separated_nonempty_list(COMMA,type_) RPAREN, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / RBRACKET / RBRACE / NORAISE] -// [169, simple_type → • LPAREN type_ RPAREN, RPAREN / COMMA / QUESTION] -// [170, simple_type → • qualified_uident_ optional_type_arguments, RPAREN / COMMA / QUESTION] -// [171, simple_type → • AMPER qualified_uident_, RPAREN / COMMA / QUESTION] -// [172, simple_type → • UNDERSCORE, RPAREN / COMMA / QUESTION] -// [173, type_ → • simple_type, RPAREN / COMMA] -// [174, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [175, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [176, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [176, type_ → LPAREN type_ COMMA • RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [177, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [177, type_ → LPAREN type_ COMMA • separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [178, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [179, type_ → • LPAREN RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [180, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [181, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [210, qualified_uident_ → • UIDENT, RPAREN / COMMA / QUESTION / LBRACKET] -// [211, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, RPAREN / COMMA / QUESTION / LBRACKET] -// [250, separated_nonempty_list(COMMA,type_) → • type_, RPAREN] -// [251, separated_nonempty_list(COMMA,type_) → • type_ COMMA separated_nonempty_list(COMMA,type_), RPAREN] + ReduceNoLookahead(5, NT_type_, yy_action_237) +} + +// [171, simple_type → • simple_type QUESTION, RPAREN / COMMA / QUESTION] +// [172, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, RPAREN / COMMA / QUESTION] +// [172, simple_type → LPAREN type_ COMMA • separated_nonempty_list(COMMA,type_) RPAREN, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / RBRACKET / RBRACE / NORAISE] +// [173, simple_type → • LPAREN type_ RPAREN, RPAREN / COMMA / QUESTION] +// [174, simple_type → • qualified_uident_ optional_type_arguments, RPAREN / COMMA / QUESTION] +// [175, simple_type → • AMPER qualified_uident_, RPAREN / COMMA / QUESTION] +// [176, simple_type → • UNDERSCORE, RPAREN / COMMA / QUESTION] +// [177, type_ → • simple_type, RPAREN / COMMA] +// [178, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [179, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [180, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [180, type_ → LPAREN type_ COMMA • RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [181, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [181, type_ → LPAREN type_ COMMA • separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [182, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [183, type_ → • LPAREN RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [184, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [185, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [214, qualified_uident_ → • UIDENT, RPAREN / COMMA / QUESTION / LBRACKET] +// [215, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, RPAREN / COMMA / QUESTION / LBRACKET] +// [255, separated_nonempty_list(COMMA,type_) → • type_, RPAREN] +// [256, separated_nonempty_list(COMMA,type_) → • type_ COMMA separated_nonempty_list(COMMA,type_), RPAREN] fn yy_state_98(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_PACKAGE_NAME => Shift(yy_state_62) @@ -5350,7 +5461,7 @@ fn yy_state_98(_lookahead : YYSymbol) -> YYDecision { } } -// [176, type_ → LPAREN type_ COMMA RPAREN • THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [180, type_ → LPAREN type_ COMMA RPAREN • THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] fn yy_state_99(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_THIN_ARROW => Shift(yy_state_100) @@ -5358,29 +5469,29 @@ fn yy_state_99(_lookahead : YYSymbol) -> YYDecision { } } -// [167, simple_type → • simple_type QUESTION, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / RBRACKET / RBRACE / NORAISE] -// [168, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / RBRACKET / RBRACE / NORAISE] -// [169, simple_type → • LPAREN type_ RPAREN, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / RBRACKET / RBRACE / NORAISE] -// [170, simple_type → • qualified_uident_ optional_type_arguments, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / RBRACKET / RBRACE / NORAISE] -// [171, simple_type → • AMPER qualified_uident_, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / RBRACKET / RBRACE / NORAISE] -// [172, simple_type → • UNDERSCORE, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / RBRACKET / RBRACE / NORAISE] -// [173, type_ → • simple_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [174, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [175, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [176, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [176, type_ → LPAREN type_ COMMA RPAREN THIN_ARROW • return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [177, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [178, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [179, type_ → • LPAREN RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [180, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [181, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [182, return_type → • type_, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [183, return_type → • simple_type NORAISE, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [184, return_type → • simple_type RAISE, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [185, return_type → • simple_type RAISE error_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [186, return_type → • simple_type RAISE QUESTION, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [210, qualified_uident_ → • UIDENT, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / LBRACKET / RBRACKET / RBRACE / NORAISE] -// [211, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / LBRACKET / RBRACKET / RBRACE / NORAISE] +// [171, simple_type → • simple_type QUESTION, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / RBRACKET / RBRACE / NORAISE] +// [172, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / RBRACKET / RBRACE / NORAISE] +// [173, simple_type → • LPAREN type_ RPAREN, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / RBRACKET / RBRACE / NORAISE] +// [174, simple_type → • qualified_uident_ optional_type_arguments, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / RBRACKET / RBRACE / NORAISE] +// [175, simple_type → • AMPER qualified_uident_, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / RBRACKET / RBRACE / NORAISE] +// [176, simple_type → • UNDERSCORE, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / RBRACKET / RBRACE / NORAISE] +// [177, type_ → • simple_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [178, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [179, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [180, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [180, type_ → LPAREN type_ COMMA RPAREN THIN_ARROW • return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [181, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [182, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [183, type_ → • LPAREN RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [184, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [185, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [186, return_type → • type_, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [187, return_type → • simple_type NORAISE, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [188, return_type → • simple_type RAISE, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [189, return_type → • simple_type RAISE error_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [190, return_type → • simple_type RAISE QUESTION, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [214, qualified_uident_ → • UIDENT, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / LBRACKET / RBRACKET / RBRACE / NORAISE] +// [215, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / LBRACKET / RBRACKET / RBRACE / NORAISE] fn yy_state_100(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_PACKAGE_NAME => Shift(yy_state_62) @@ -5397,13 +5508,13 @@ fn yy_state_100(_lookahead : YYSymbol) -> YYDecision { } } -// [176, type_ → LPAREN type_ COMMA RPAREN THIN_ARROW return_type •, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [180, type_ → LPAREN type_ COMMA RPAREN THIN_ARROW return_type •, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] fn yy_state_101(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(6, NT_type_, yy_action_232) + ReduceNoLookahead(6, NT_type_, yy_action_236) } -// [168, simple_type → LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) • RPAREN, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / RBRACKET / RBRACE / NORAISE] -// [177, type_ → LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) • RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [172, simple_type → LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) • RPAREN, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / RBRACKET / RBRACE / NORAISE] +// [181, type_ → LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) • RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] fn yy_state_102(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_RPAREN => Shift(yy_state_103) @@ -5411,39 +5522,39 @@ fn yy_state_102(_lookahead : YYSymbol) -> YYDecision { } } -// [168, simple_type → LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN •, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / RBRACKET / RBRACE / NORAISE] -// [177, type_ → LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN • THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [172, simple_type → LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN •, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / RBRACKET / RBRACE / NORAISE] +// [181, type_ → LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN • THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] fn yy_state_103(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_THIN_ARROW => Shift(yy_state_104) - T_EOF | T_RAISE | T_EQUAL | T_RPAREN | T_COMMA | T_QUESTION | T_SEMI | T_RBRACKET | T_RBRACE | T_NORAISE => Reduce(5, NT_simple_type, yy_action_231) - _ => Error - } -} - -// [167, simple_type → • simple_type QUESTION, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / RBRACKET / RBRACE / NORAISE] -// [168, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / RBRACKET / RBRACE / NORAISE] -// [169, simple_type → • LPAREN type_ RPAREN, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / RBRACKET / RBRACE / NORAISE] -// [170, simple_type → • qualified_uident_ optional_type_arguments, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / RBRACKET / RBRACE / NORAISE] -// [171, simple_type → • AMPER qualified_uident_, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / RBRACKET / RBRACE / NORAISE] -// [172, simple_type → • UNDERSCORE, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / RBRACKET / RBRACE / NORAISE] -// [173, type_ → • simple_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [174, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [175, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [176, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [177, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [177, type_ → LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW • return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [178, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [179, type_ → • LPAREN RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [180, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [181, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [182, return_type → • type_, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [183, return_type → • simple_type NORAISE, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [184, return_type → • simple_type RAISE, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [185, return_type → • simple_type RAISE error_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [186, return_type → • simple_type RAISE QUESTION, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [210, qualified_uident_ → • UIDENT, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / LBRACKET / RBRACKET / RBRACE / NORAISE] -// [211, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / LBRACKET / RBRACKET / RBRACE / NORAISE] + T_EOF | T_RAISE | T_EQUAL | T_RPAREN | T_COMMA | T_QUESTION | T_SEMI | T_RBRACKET | T_RBRACE | T_NORAISE => Reduce(5, NT_simple_type, yy_action_235) + _ => Error + } +} + +// [171, simple_type → • simple_type QUESTION, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / RBRACKET / RBRACE / NORAISE] +// [172, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / RBRACKET / RBRACE / NORAISE] +// [173, simple_type → • LPAREN type_ RPAREN, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / RBRACKET / RBRACE / NORAISE] +// [174, simple_type → • qualified_uident_ optional_type_arguments, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / RBRACKET / RBRACE / NORAISE] +// [175, simple_type → • AMPER qualified_uident_, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / RBRACKET / RBRACE / NORAISE] +// [176, simple_type → • UNDERSCORE, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / RBRACKET / RBRACE / NORAISE] +// [177, type_ → • simple_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [178, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [179, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [180, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [181, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [181, type_ → LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW • return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [182, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [183, type_ → • LPAREN RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [184, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [185, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [186, return_type → • type_, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [187, return_type → • simple_type NORAISE, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [188, return_type → • simple_type RAISE, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [189, return_type → • simple_type RAISE error_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [190, return_type → • simple_type RAISE QUESTION, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [214, qualified_uident_ → • UIDENT, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / LBRACKET / RBRACKET / RBRACE / NORAISE] +// [215, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / LBRACKET / RBRACKET / RBRACE / NORAISE] fn yy_state_104(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_PACKAGE_NAME => Shift(yy_state_62) @@ -5460,22 +5571,22 @@ fn yy_state_104(_lookahead : YYSymbol) -> YYDecision { } } -// [177, type_ → LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type •, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [181, type_ → LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type •, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] fn yy_state_105(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(7, NT_type_, yy_action_230) + ReduceNoLookahead(7, NT_type_, yy_action_234) } -// [167, simple_type → simple_type • QUESTION, EOF / EQUAL / RPAREN / COMMA / QUESTION / SEMI / RBRACKET / RBRACE] -// [173, type_ → simple_type •, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [171, simple_type → simple_type • QUESTION, EOF / EQUAL / RPAREN / COMMA / QUESTION / SEMI / RBRACKET / RBRACE] +// [177, type_ → simple_type •, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] fn yy_state_106(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_QUESTION => Shift(yy_state_93) - T_EOF | T_EQUAL | T_RPAREN | T_COMMA | T_SEMI | T_RBRACKET | T_RBRACE => Reduce(1, NT_type_, yy_action_241) + T_EOF | T_EQUAL | T_RPAREN | T_COMMA | T_SEMI | T_RBRACKET | T_RBRACE => Reduce(1, NT_type_, yy_action_245) _ => Error } } -// [188, optional_type_arguments → LBRACKET separated_nonempty_list(COMMA,type_) • RBRACKET, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / RBRACKET / RBRACE / NORAISE] +// [192, optional_type_arguments → LBRACKET separated_nonempty_list(COMMA,type_) • RBRACKET, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / RBRACKET / RBRACE / NORAISE] fn yy_state_107(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_RBRACKET => Shift(yy_state_108) @@ -5483,19 +5594,19 @@ fn yy_state_107(_lookahead : YYSymbol) -> YYDecision { } } -// [188, optional_type_arguments → LBRACKET separated_nonempty_list(COMMA,type_) RBRACKET •, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / RBRACKET / RBRACE / NORAISE] +// [192, optional_type_arguments → LBRACKET separated_nonempty_list(COMMA,type_) RBRACKET •, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / RBRACKET / RBRACE / NORAISE] fn yy_state_108(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_optional_type_arguments, yy_action_228) + ReduceNoLookahead(3, NT_optional_type_arguments, yy_action_232) } -// [170, simple_type → qualified_uident_ optional_type_arguments •, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / RBRACKET / RBRACE / NORAISE] +// [174, simple_type → qualified_uident_ optional_type_arguments •, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / RBRACKET / RBRACE / NORAISE] fn yy_state_109(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(2, NT_simple_type, yy_action_227) + ReduceNoLookahead(2, NT_simple_type, yy_action_231) } -// [174, type_ → ASYNC LPAREN type_ • COMMA RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [175, type_ → ASYNC LPAREN type_ • COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [180, type_ → ASYNC LPAREN type_ • RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [178, type_ → ASYNC LPAREN type_ • COMMA RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [179, type_ → ASYNC LPAREN type_ • COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [184, type_ → ASYNC LPAREN type_ • RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] fn yy_state_110(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_RPAREN => Shift(yy_state_111) @@ -5504,7 +5615,7 @@ fn yy_state_110(_lookahead : YYSymbol) -> YYDecision { } } -// [180, type_ → ASYNC LPAREN type_ RPAREN • THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [184, type_ → ASYNC LPAREN type_ RPAREN • THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] fn yy_state_111(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_THIN_ARROW => Shift(yy_state_112) @@ -5512,29 +5623,29 @@ fn yy_state_111(_lookahead : YYSymbol) -> YYDecision { } } -// [167, simple_type → • simple_type QUESTION, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / RBRACKET / RBRACE / NORAISE] -// [168, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / RBRACKET / RBRACE / NORAISE] -// [169, simple_type → • LPAREN type_ RPAREN, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / RBRACKET / RBRACE / NORAISE] -// [170, simple_type → • qualified_uident_ optional_type_arguments, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / RBRACKET / RBRACE / NORAISE] -// [171, simple_type → • AMPER qualified_uident_, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / RBRACKET / RBRACE / NORAISE] -// [172, simple_type → • UNDERSCORE, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / RBRACKET / RBRACE / NORAISE] -// [173, type_ → • simple_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [174, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [175, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [176, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [177, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [178, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [179, type_ → • LPAREN RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [180, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [180, type_ → ASYNC LPAREN type_ RPAREN THIN_ARROW • return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [181, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [182, return_type → • type_, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [183, return_type → • simple_type NORAISE, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [184, return_type → • simple_type RAISE, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [185, return_type → • simple_type RAISE error_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [186, return_type → • simple_type RAISE QUESTION, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [210, qualified_uident_ → • UIDENT, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / LBRACKET / RBRACKET / RBRACE / NORAISE] -// [211, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / LBRACKET / RBRACKET / RBRACE / NORAISE] +// [171, simple_type → • simple_type QUESTION, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / RBRACKET / RBRACE / NORAISE] +// [172, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / RBRACKET / RBRACE / NORAISE] +// [173, simple_type → • LPAREN type_ RPAREN, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / RBRACKET / RBRACE / NORAISE] +// [174, simple_type → • qualified_uident_ optional_type_arguments, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / RBRACKET / RBRACE / NORAISE] +// [175, simple_type → • AMPER qualified_uident_, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / RBRACKET / RBRACE / NORAISE] +// [176, simple_type → • UNDERSCORE, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / RBRACKET / RBRACE / NORAISE] +// [177, type_ → • simple_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [178, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [179, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [180, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [181, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [182, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [183, type_ → • LPAREN RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [184, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [184, type_ → ASYNC LPAREN type_ RPAREN THIN_ARROW • return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [185, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [186, return_type → • type_, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [187, return_type → • simple_type NORAISE, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [188, return_type → • simple_type RAISE, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [189, return_type → • simple_type RAISE error_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [190, return_type → • simple_type RAISE QUESTION, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [214, qualified_uident_ → • UIDENT, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / LBRACKET / RBRACKET / RBRACE / NORAISE] +// [215, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / LBRACKET / RBRACKET / RBRACE / NORAISE] fn yy_state_112(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_PACKAGE_NAME => Shift(yy_state_62) @@ -5551,32 +5662,32 @@ fn yy_state_112(_lookahead : YYSymbol) -> YYDecision { } } -// [180, type_ → ASYNC LPAREN type_ RPAREN THIN_ARROW return_type •, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [184, type_ → ASYNC LPAREN type_ RPAREN THIN_ARROW return_type •, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] fn yy_state_113(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(6, NT_type_, yy_action_226) -} - -// [167, simple_type → • simple_type QUESTION, RPAREN / COMMA / QUESTION] -// [168, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, RPAREN / COMMA / QUESTION] -// [169, simple_type → • LPAREN type_ RPAREN, RPAREN / COMMA / QUESTION] -// [170, simple_type → • qualified_uident_ optional_type_arguments, RPAREN / COMMA / QUESTION] -// [171, simple_type → • AMPER qualified_uident_, RPAREN / COMMA / QUESTION] -// [172, simple_type → • UNDERSCORE, RPAREN / COMMA / QUESTION] -// [173, type_ → • simple_type, RPAREN / COMMA] -// [174, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [174, type_ → ASYNC LPAREN type_ COMMA • RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [175, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [175, type_ → ASYNC LPAREN type_ COMMA • separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [176, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [177, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [178, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [179, type_ → • LPAREN RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [180, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [181, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [210, qualified_uident_ → • UIDENT, RPAREN / COMMA / QUESTION / LBRACKET] -// [211, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, RPAREN / COMMA / QUESTION / LBRACKET] -// [250, separated_nonempty_list(COMMA,type_) → • type_, RPAREN] -// [251, separated_nonempty_list(COMMA,type_) → • type_ COMMA separated_nonempty_list(COMMA,type_), RPAREN] + ReduceNoLookahead(6, NT_type_, yy_action_230) +} + +// [171, simple_type → • simple_type QUESTION, RPAREN / COMMA / QUESTION] +// [172, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, RPAREN / COMMA / QUESTION] +// [173, simple_type → • LPAREN type_ RPAREN, RPAREN / COMMA / QUESTION] +// [174, simple_type → • qualified_uident_ optional_type_arguments, RPAREN / COMMA / QUESTION] +// [175, simple_type → • AMPER qualified_uident_, RPAREN / COMMA / QUESTION] +// [176, simple_type → • UNDERSCORE, RPAREN / COMMA / QUESTION] +// [177, type_ → • simple_type, RPAREN / COMMA] +// [178, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [178, type_ → ASYNC LPAREN type_ COMMA • RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [179, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [179, type_ → ASYNC LPAREN type_ COMMA • separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [180, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [181, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [182, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [183, type_ → • LPAREN RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [184, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [185, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [214, qualified_uident_ → • UIDENT, RPAREN / COMMA / QUESTION / LBRACKET] +// [215, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, RPAREN / COMMA / QUESTION / LBRACKET] +// [255, separated_nonempty_list(COMMA,type_) → • type_, RPAREN] +// [256, separated_nonempty_list(COMMA,type_) → • type_ COMMA separated_nonempty_list(COMMA,type_), RPAREN] fn yy_state_114(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_PACKAGE_NAME => Shift(yy_state_62) @@ -5594,7 +5705,7 @@ fn yy_state_114(_lookahead : YYSymbol) -> YYDecision { } } -// [175, type_ → ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) • RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [179, type_ → ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) • RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] fn yy_state_115(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_RPAREN => Shift(yy_state_116) @@ -5602,7 +5713,7 @@ fn yy_state_115(_lookahead : YYSymbol) -> YYDecision { } } -// [175, type_ → ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN • THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [179, type_ → ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN • THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] fn yy_state_116(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_THIN_ARROW => Shift(yy_state_117) @@ -5610,29 +5721,29 @@ fn yy_state_116(_lookahead : YYSymbol) -> YYDecision { } } -// [167, simple_type → • simple_type QUESTION, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / RBRACKET / RBRACE / NORAISE] -// [168, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / RBRACKET / RBRACE / NORAISE] -// [169, simple_type → • LPAREN type_ RPAREN, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / RBRACKET / RBRACE / NORAISE] -// [170, simple_type → • qualified_uident_ optional_type_arguments, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / RBRACKET / RBRACE / NORAISE] -// [171, simple_type → • AMPER qualified_uident_, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / RBRACKET / RBRACE / NORAISE] -// [172, simple_type → • UNDERSCORE, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / RBRACKET / RBRACE / NORAISE] -// [173, type_ → • simple_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [174, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [175, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [175, type_ → ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW • return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [176, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [177, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [178, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [179, type_ → • LPAREN RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [180, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [181, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [182, return_type → • type_, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [183, return_type → • simple_type NORAISE, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [184, return_type → • simple_type RAISE, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [185, return_type → • simple_type RAISE error_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [186, return_type → • simple_type RAISE QUESTION, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [210, qualified_uident_ → • UIDENT, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / LBRACKET / RBRACKET / RBRACE / NORAISE] -// [211, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / LBRACKET / RBRACKET / RBRACE / NORAISE] +// [171, simple_type → • simple_type QUESTION, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / RBRACKET / RBRACE / NORAISE] +// [172, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / RBRACKET / RBRACE / NORAISE] +// [173, simple_type → • LPAREN type_ RPAREN, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / RBRACKET / RBRACE / NORAISE] +// [174, simple_type → • qualified_uident_ optional_type_arguments, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / RBRACKET / RBRACE / NORAISE] +// [175, simple_type → • AMPER qualified_uident_, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / RBRACKET / RBRACE / NORAISE] +// [176, simple_type → • UNDERSCORE, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / RBRACKET / RBRACE / NORAISE] +// [177, type_ → • simple_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [178, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [179, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [179, type_ → ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW • return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [180, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [181, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [182, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [183, type_ → • LPAREN RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [184, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [185, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [186, return_type → • type_, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [187, return_type → • simple_type NORAISE, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [188, return_type → • simple_type RAISE, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [189, return_type → • simple_type RAISE error_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [190, return_type → • simple_type RAISE QUESTION, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [214, qualified_uident_ → • UIDENT, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / LBRACKET / RBRACKET / RBRACE / NORAISE] +// [215, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / LBRACKET / RBRACKET / RBRACE / NORAISE] fn yy_state_117(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_PACKAGE_NAME => Shift(yy_state_62) @@ -5649,12 +5760,12 @@ fn yy_state_117(_lookahead : YYSymbol) -> YYDecision { } } -// [175, type_ → ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type •, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [179, type_ → ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type •, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] fn yy_state_118(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(8, NT_type_, yy_action_224) + ReduceNoLookahead(8, NT_type_, yy_action_228) } -// [174, type_ → ASYNC LPAREN type_ COMMA RPAREN • THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [178, type_ → ASYNC LPAREN type_ COMMA RPAREN • THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] fn yy_state_119(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_THIN_ARROW => Shift(yy_state_120) @@ -5662,29 +5773,29 @@ fn yy_state_119(_lookahead : YYSymbol) -> YYDecision { } } -// [167, simple_type → • simple_type QUESTION, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / RBRACKET / RBRACE / NORAISE] -// [168, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / RBRACKET / RBRACE / NORAISE] -// [169, simple_type → • LPAREN type_ RPAREN, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / RBRACKET / RBRACE / NORAISE] -// [170, simple_type → • qualified_uident_ optional_type_arguments, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / RBRACKET / RBRACE / NORAISE] -// [171, simple_type → • AMPER qualified_uident_, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / RBRACKET / RBRACE / NORAISE] -// [172, simple_type → • UNDERSCORE, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / RBRACKET / RBRACE / NORAISE] -// [173, type_ → • simple_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [174, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [174, type_ → ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW • return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [175, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [176, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [177, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [178, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [179, type_ → • LPAREN RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [180, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [181, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [182, return_type → • type_, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [183, return_type → • simple_type NORAISE, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [184, return_type → • simple_type RAISE, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [185, return_type → • simple_type RAISE error_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [186, return_type → • simple_type RAISE QUESTION, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] -// [210, qualified_uident_ → • UIDENT, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / LBRACKET / RBRACKET / RBRACE / NORAISE] -// [211, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / LBRACKET / RBRACKET / RBRACE / NORAISE] +// [171, simple_type → • simple_type QUESTION, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / RBRACKET / RBRACE / NORAISE] +// [172, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / RBRACKET / RBRACE / NORAISE] +// [173, simple_type → • LPAREN type_ RPAREN, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / RBRACKET / RBRACE / NORAISE] +// [174, simple_type → • qualified_uident_ optional_type_arguments, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / RBRACKET / RBRACE / NORAISE] +// [175, simple_type → • AMPER qualified_uident_, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / RBRACKET / RBRACE / NORAISE] +// [176, simple_type → • UNDERSCORE, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / RBRACKET / RBRACE / NORAISE] +// [177, type_ → • simple_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [178, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [178, type_ → ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW • return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [179, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [180, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [181, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [182, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [183, type_ → • LPAREN RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [184, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [185, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [186, return_type → • type_, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [187, return_type → • simple_type NORAISE, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [188, return_type → • simple_type RAISE, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [189, return_type → • simple_type RAISE error_type, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [190, return_type → • simple_type RAISE QUESTION, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [214, qualified_uident_ → • UIDENT, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / LBRACKET / RBRACKET / RBRACE / NORAISE] +// [215, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, EOF / RAISE / EQUAL / RPAREN / COMMA / QUESTION / SEMI / LBRACKET / RBRACKET / RBRACE / NORAISE] fn yy_state_120(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_PACKAGE_NAME => Shift(yy_state_62) @@ -5701,12 +5812,12 @@ fn yy_state_120(_lookahead : YYSymbol) -> YYDecision { } } -// [174, type_ → ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type •, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] +// [178, type_ → ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type •, EOF / EQUAL / RPAREN / COMMA / SEMI / RBRACKET / RBRACE] fn yy_state_121(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(7, NT_type_, yy_action_222) + ReduceNoLookahead(7, NT_type_, yy_action_226) } -// [191, parameter → POST_LABEL • COLON type_, RPAREN / COMMA] +// [195, parameter → POST_LABEL • COLON type_, RPAREN / COMMA] fn yy_state_122(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_COLON => Shift(yy_state_123) @@ -5714,24 +5825,24 @@ fn yy_state_122(_lookahead : YYSymbol) -> YYDecision { } } -// [167, simple_type → • simple_type QUESTION, RPAREN / COMMA / QUESTION] -// [168, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, RPAREN / COMMA / QUESTION] -// [169, simple_type → • LPAREN type_ RPAREN, RPAREN / COMMA / QUESTION] -// [170, simple_type → • qualified_uident_ optional_type_arguments, RPAREN / COMMA / QUESTION] -// [171, simple_type → • AMPER qualified_uident_, RPAREN / COMMA / QUESTION] -// [172, simple_type → • UNDERSCORE, RPAREN / COMMA / QUESTION] -// [173, type_ → • simple_type, RPAREN / COMMA] -// [174, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [175, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [176, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [177, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [178, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [179, type_ → • LPAREN RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [180, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [181, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [191, parameter → POST_LABEL COLON • type_, RPAREN / COMMA] -// [210, qualified_uident_ → • UIDENT, RPAREN / COMMA / QUESTION / LBRACKET] -// [211, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, RPAREN / COMMA / QUESTION / LBRACKET] +// [171, simple_type → • simple_type QUESTION, RPAREN / COMMA / QUESTION] +// [172, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, RPAREN / COMMA / QUESTION] +// [173, simple_type → • LPAREN type_ RPAREN, RPAREN / COMMA / QUESTION] +// [174, simple_type → • qualified_uident_ optional_type_arguments, RPAREN / COMMA / QUESTION] +// [175, simple_type → • AMPER qualified_uident_, RPAREN / COMMA / QUESTION] +// [176, simple_type → • UNDERSCORE, RPAREN / COMMA / QUESTION] +// [177, type_ → • simple_type, RPAREN / COMMA] +// [178, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [179, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [180, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [181, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [182, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [183, type_ → • LPAREN RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [184, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [185, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [195, parameter → POST_LABEL COLON • type_, RPAREN / COMMA] +// [214, qualified_uident_ → • UIDENT, RPAREN / COMMA / QUESTION / LBRACKET] +// [215, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, RPAREN / COMMA / QUESTION / LBRACKET] fn yy_state_123(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_PACKAGE_NAME => Shift(yy_state_62) @@ -5747,22 +5858,22 @@ fn yy_state_123(_lookahead : YYSymbol) -> YYDecision { } } -// [191, parameter → POST_LABEL COLON type_ •, RPAREN / COMMA] +// [195, parameter → POST_LABEL COLON type_ •, RPAREN / COMMA] fn yy_state_124(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_parameter, yy_action_221) + ReduceNoLookahead(3, NT_parameter, yy_action_225) } -// [190, parameter → type_ •, RPAREN / COMMA] +// [194, parameter → type_ •, RPAREN / COMMA] fn yy_state_125(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_parameter, yy_action_220) + ReduceNoLookahead(1, NT_parameter, yy_action_224) } -// [220, separated_list(COMMA,parameter) → separated_nonempty_list(COMMA,parameter) •, RPAREN] +// [225, separated_list(COMMA,parameter) → separated_nonempty_list(COMMA,parameter) •, RPAREN] fn yy_state_126(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_separated_list_COMMA_parameter_, yy_action_219) + ReduceNoLookahead(1, NT_separated_list_COMMA_parameter_, yy_action_223) } -// [51, trait_method_sig → nonempty_list(attribute) lident LPAREN separated_list(COMMA,parameter) • RPAREN THIN_ARROW return_type boption(eq_underscore), SEMI / RBRACE] +// [53, trait_method_sig → lident LPAREN separated_list(COMMA,parameter) • RPAREN THIN_ARROW return_type boption(eq_underscore), SEMI / RBRACE] fn yy_state_127(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_RPAREN => Shift(yy_state_128) @@ -5770,7 +5881,7 @@ fn yy_state_127(_lookahead : YYSymbol) -> YYDecision { } } -// [51, trait_method_sig → nonempty_list(attribute) lident LPAREN separated_list(COMMA,parameter) RPAREN • THIN_ARROW return_type boption(eq_underscore), SEMI / RBRACE] +// [53, trait_method_sig → lident LPAREN separated_list(COMMA,parameter) RPAREN • THIN_ARROW return_type boption(eq_underscore), SEMI / RBRACE] fn yy_state_128(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_THIN_ARROW => Shift(yy_state_129) @@ -5778,29 +5889,29 @@ fn yy_state_128(_lookahead : YYSymbol) -> YYDecision { } } -// [51, trait_method_sig → nonempty_list(attribute) lident LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW • return_type boption(eq_underscore), SEMI / RBRACE] -// [167, simple_type → • simple_type QUESTION, RAISE / EQUAL / QUESTION / SEMI / RBRACE / NORAISE] -// [168, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, RAISE / EQUAL / QUESTION / SEMI / RBRACE / NORAISE] -// [169, simple_type → • LPAREN type_ RPAREN, RAISE / EQUAL / QUESTION / SEMI / RBRACE / NORAISE] -// [170, simple_type → • qualified_uident_ optional_type_arguments, RAISE / EQUAL / QUESTION / SEMI / RBRACE / NORAISE] -// [171, simple_type → • AMPER qualified_uident_, RAISE / EQUAL / QUESTION / SEMI / RBRACE / NORAISE] -// [172, simple_type → • UNDERSCORE, RAISE / EQUAL / QUESTION / SEMI / RBRACE / NORAISE] -// [173, type_ → • simple_type, EQUAL / SEMI / RBRACE] -// [174, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EQUAL / SEMI / RBRACE] -// [175, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EQUAL / SEMI / RBRACE] -// [176, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EQUAL / SEMI / RBRACE] -// [177, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EQUAL / SEMI / RBRACE] -// [178, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, EQUAL / SEMI / RBRACE] -// [179, type_ → • LPAREN RPAREN THIN_ARROW return_type, EQUAL / SEMI / RBRACE] -// [180, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, EQUAL / SEMI / RBRACE] -// [181, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, EQUAL / SEMI / RBRACE] -// [182, return_type → • type_, EQUAL / SEMI / RBRACE] -// [183, return_type → • simple_type NORAISE, EQUAL / SEMI / RBRACE] -// [184, return_type → • simple_type RAISE, EQUAL / SEMI / RBRACE] -// [185, return_type → • simple_type RAISE error_type, EQUAL / SEMI / RBRACE] -// [186, return_type → • simple_type RAISE QUESTION, EQUAL / SEMI / RBRACE] -// [210, qualified_uident_ → • UIDENT, RAISE / EQUAL / QUESTION / SEMI / LBRACKET / RBRACE / NORAISE] -// [211, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, RAISE / EQUAL / QUESTION / SEMI / LBRACKET / RBRACE / NORAISE] +// [53, trait_method_sig → lident LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW • return_type boption(eq_underscore), SEMI / RBRACE] +// [171, simple_type → • simple_type QUESTION, RAISE / EQUAL / QUESTION / SEMI / RBRACE / NORAISE] +// [172, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, RAISE / EQUAL / QUESTION / SEMI / RBRACE / NORAISE] +// [173, simple_type → • LPAREN type_ RPAREN, RAISE / EQUAL / QUESTION / SEMI / RBRACE / NORAISE] +// [174, simple_type → • qualified_uident_ optional_type_arguments, RAISE / EQUAL / QUESTION / SEMI / RBRACE / NORAISE] +// [175, simple_type → • AMPER qualified_uident_, RAISE / EQUAL / QUESTION / SEMI / RBRACE / NORAISE] +// [176, simple_type → • UNDERSCORE, RAISE / EQUAL / QUESTION / SEMI / RBRACE / NORAISE] +// [177, type_ → • simple_type, EQUAL / SEMI / RBRACE] +// [178, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EQUAL / SEMI / RBRACE] +// [179, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EQUAL / SEMI / RBRACE] +// [180, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EQUAL / SEMI / RBRACE] +// [181, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EQUAL / SEMI / RBRACE] +// [182, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, EQUAL / SEMI / RBRACE] +// [183, type_ → • LPAREN RPAREN THIN_ARROW return_type, EQUAL / SEMI / RBRACE] +// [184, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, EQUAL / SEMI / RBRACE] +// [185, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, EQUAL / SEMI / RBRACE] +// [186, return_type → • type_, EQUAL / SEMI / RBRACE] +// [187, return_type → • simple_type NORAISE, EQUAL / SEMI / RBRACE] +// [188, return_type → • simple_type RAISE, EQUAL / SEMI / RBRACE] +// [189, return_type → • simple_type RAISE error_type, EQUAL / SEMI / RBRACE] +// [190, return_type → • simple_type RAISE QUESTION, EQUAL / SEMI / RBRACE] +// [214, qualified_uident_ → • UIDENT, RAISE / EQUAL / QUESTION / SEMI / LBRACKET / RBRACE / NORAISE] +// [215, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, RAISE / EQUAL / QUESTION / SEMI / LBRACKET / RBRACE / NORAISE] fn yy_state_129(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_PACKAGE_NAME => Shift(yy_state_62) @@ -5817,19 +5928,19 @@ fn yy_state_129(_lookahead : YYSymbol) -> YYDecision { } } -// [51, trait_method_sig → nonempty_list(attribute) lident LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type • boption(eq_underscore), SEMI / RBRACE] -// [221, boption(eq_underscore) → •, SEMI / RBRACE] -// [222, boption(eq_underscore) → • EQUAL UNDERSCORE, SEMI / RBRACE] +// [53, trait_method_sig → lident LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type • boption(eq_underscore), SEMI / RBRACE] +// [226, boption(eq_underscore) → •, SEMI / RBRACE] +// [227, boption(eq_underscore) → • EQUAL UNDERSCORE, SEMI / RBRACE] fn yy_state_130(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_EQUAL => Shift(yy_state_131) NT_boption_eq_underscore_ => Shift(yy_state_133) - T_SEMI | T_RBRACE => Reduce(0, NT_boption_eq_underscore_, yy_action_218) + T_SEMI | T_RBRACE => Reduce(0, NT_boption_eq_underscore_, yy_action_222) _ => Error } } -// [222, boption(eq_underscore) → EQUAL • UNDERSCORE, SEMI / RBRACE] +// [227, boption(eq_underscore) → EQUAL • UNDERSCORE, SEMI / RBRACE] fn yy_state_131(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_UNDERSCORE => Shift(yy_state_132) @@ -5837,27 +5948,34 @@ fn yy_state_131(_lookahead : YYSymbol) -> YYDecision { } } -// [222, boption(eq_underscore) → EQUAL UNDERSCORE •, SEMI / RBRACE] +// [227, boption(eq_underscore) → EQUAL UNDERSCORE •, SEMI / RBRACE] fn yy_state_132(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(2, NT_boption_eq_underscore_, yy_action_216) + ReduceNoLookahead(2, NT_boption_eq_underscore_, yy_action_220) } -// [51, trait_method_sig → nonempty_list(attribute) lident LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type boption(eq_underscore) •, SEMI / RBRACE] +// [53, trait_method_sig → lident LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type boption(eq_underscore) •, SEMI / RBRACE] fn yy_state_133(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(8, NT_trait_method_sig, yy_action_215) + ReduceNoLookahead(7, NT_trait_method_sig, yy_action_219) } -// [50, trait_method_sig → nonempty_list(attribute) ASYNC • lident LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type boption(eq_underscore), SEMI / RBRACE] -// [213, lident → • LIDENT, LPAREN] +// [50, trait_method_sig → nonempty_list(attribute) • ASYNC FN loption(type_params_with_constraints) lident LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type boption(eq_underscore), SEMI / RBRACE] +// [51, trait_method_sig → nonempty_list(attribute) • FN loption(type_params_with_constraints) lident LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type boption(eq_underscore), SEMI / RBRACE] +// [54, trait_method_sig → nonempty_list(attribute) • ASYNC lident LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type boption(eq_underscore), SEMI / RBRACE] +// [55, trait_method_sig → nonempty_list(attribute) • lident LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type boption(eq_underscore), SEMI / RBRACE] +// [217, lident → • LIDENT, LPAREN] +// [218, lident → • EXTEND, LPAREN] fn yy_state_134(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LIDENT => Shift(yy_state_38) + T_EXTEND => Shift(yy_state_38) + T_LIDENT => Shift(yy_state_39) NT_lident => Shift(yy_state_135) + T_FN => Shift(yy_state_142) + T_ASYNC => Shift(yy_state_166) _ => Error } } -// [50, trait_method_sig → nonempty_list(attribute) ASYNC lident • LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type boption(eq_underscore), SEMI / RBRACE] +// [55, trait_method_sig → nonempty_list(attribute) lident • LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type boption(eq_underscore), SEMI / RBRACE] fn yy_state_135(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_LPAREN => Shift(yy_state_136) @@ -5865,36 +5983,40 @@ fn yy_state_135(_lookahead : YYSymbol) -> YYDecision { } } -// [50, trait_method_sig → nonempty_list(attribute) ASYNC lident LPAREN • separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type boption(eq_underscore), SEMI / RBRACE] -// [167, simple_type → • simple_type QUESTION, RPAREN / COMMA / QUESTION] -// [168, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, RPAREN / COMMA / QUESTION] -// [169, simple_type → • LPAREN type_ RPAREN, RPAREN / COMMA / QUESTION] -// [170, simple_type → • qualified_uident_ optional_type_arguments, RPAREN / COMMA / QUESTION] -// [171, simple_type → • AMPER qualified_uident_, RPAREN / COMMA / QUESTION] -// [172, simple_type → • UNDERSCORE, RPAREN / COMMA / QUESTION] -// [173, type_ → • simple_type, RPAREN / COMMA] -// [174, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [175, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [176, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [177, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [178, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [179, type_ → • LPAREN RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [180, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [181, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [190, parameter → • type_, RPAREN / COMMA] -// [191, parameter → • POST_LABEL COLON type_, RPAREN / COMMA] -// [192, parameter → • label QUESTION COLON type_, RPAREN / COMMA] -// [210, qualified_uident_ → • UIDENT, RPAREN / COMMA / QUESTION / LBRACKET] -// [211, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, RPAREN / COMMA / QUESTION / LBRACKET] -// [214, label → • LIDENT, QUESTION] -// [219, separated_list(COMMA,parameter) → •, RPAREN] -// [220, separated_list(COMMA,parameter) → • separated_nonempty_list(COMMA,parameter), RPAREN] -// [258, separated_nonempty_list(COMMA,parameter) → • parameter, RPAREN] -// [259, separated_nonempty_list(COMMA,parameter) → • parameter COMMA separated_nonempty_list(COMMA,parameter), RPAREN] +// [55, trait_method_sig → nonempty_list(attribute) lident LPAREN • separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type boption(eq_underscore), SEMI / RBRACE] +// [171, simple_type → • simple_type QUESTION, RPAREN / COMMA / QUESTION] +// [172, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, RPAREN / COMMA / QUESTION] +// [173, simple_type → • LPAREN type_ RPAREN, RPAREN / COMMA / QUESTION] +// [174, simple_type → • qualified_uident_ optional_type_arguments, RPAREN / COMMA / QUESTION] +// [175, simple_type → • AMPER qualified_uident_, RPAREN / COMMA / QUESTION] +// [176, simple_type → • UNDERSCORE, RPAREN / COMMA / QUESTION] +// [177, type_ → • simple_type, RPAREN / COMMA] +// [178, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [179, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [180, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [181, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [182, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [183, type_ → • LPAREN RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [184, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [185, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [194, parameter → • type_, RPAREN / COMMA] +// [195, parameter → • POST_LABEL COLON type_, RPAREN / COMMA] +// [196, parameter → • label QUESTION COLON type_, RPAREN / COMMA] +// [214, qualified_uident_ → • UIDENT, RPAREN / COMMA / QUESTION / LBRACKET] +// [215, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, RPAREN / COMMA / QUESTION / LBRACKET] +// [217, lident → • LIDENT, QUESTION] +// [218, lident → • EXTEND, QUESTION] +// [219, label → • lident, QUESTION] +// [224, separated_list(COMMA,parameter) → •, RPAREN] +// [225, separated_list(COMMA,parameter) → • separated_nonempty_list(COMMA,parameter), RPAREN] +// [263, separated_nonempty_list(COMMA,parameter) → • parameter, RPAREN] +// [264, separated_nonempty_list(COMMA,parameter) → • parameter COMMA separated_nonempty_list(COMMA,parameter), RPAREN] fn yy_state_136(_lookahead : YYSymbol) -> YYDecision { match _lookahead { + T_EXTEND => Shift(yy_state_38) + T_LIDENT => Shift(yy_state_39) NT_parameter => Shift(yy_state_58) - T_LIDENT => Shift(yy_state_61) + NT_lident => Shift(yy_state_61) T_PACKAGE_NAME => Shift(yy_state_62) T_UIDENT => Shift(yy_state_64) NT_label => Shift(yy_state_65) @@ -5908,12 +6030,12 @@ fn yy_state_136(_lookahead : YYSymbol) -> YYDecision { NT_type_ => Shift(yy_state_125) NT_separated_nonempty_list_COMMA_parameter_ => Shift(yy_state_126) NT_separated_list_COMMA_parameter_ => Shift(yy_state_137) - T_RPAREN => Reduce(0, NT_separated_list_COMMA_parameter_, yy_action_256) + T_RPAREN => Reduce(0, NT_separated_list_COMMA_parameter_, yy_action_260) _ => Error } } -// [50, trait_method_sig → nonempty_list(attribute) ASYNC lident LPAREN separated_list(COMMA,parameter) • RPAREN THIN_ARROW return_type boption(eq_underscore), SEMI / RBRACE] +// [55, trait_method_sig → nonempty_list(attribute) lident LPAREN separated_list(COMMA,parameter) • RPAREN THIN_ARROW return_type boption(eq_underscore), SEMI / RBRACE] fn yy_state_137(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_RPAREN => Shift(yy_state_138) @@ -5921,7 +6043,7 @@ fn yy_state_137(_lookahead : YYSymbol) -> YYDecision { } } -// [50, trait_method_sig → nonempty_list(attribute) ASYNC lident LPAREN separated_list(COMMA,parameter) RPAREN • THIN_ARROW return_type boption(eq_underscore), SEMI / RBRACE] +// [55, trait_method_sig → nonempty_list(attribute) lident LPAREN separated_list(COMMA,parameter) RPAREN • THIN_ARROW return_type boption(eq_underscore), SEMI / RBRACE] fn yy_state_138(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_THIN_ARROW => Shift(yy_state_139) @@ -5929,29 +6051,29 @@ fn yy_state_138(_lookahead : YYSymbol) -> YYDecision { } } -// [50, trait_method_sig → nonempty_list(attribute) ASYNC lident LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW • return_type boption(eq_underscore), SEMI / RBRACE] -// [167, simple_type → • simple_type QUESTION, RAISE / EQUAL / QUESTION / SEMI / RBRACE / NORAISE] -// [168, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, RAISE / EQUAL / QUESTION / SEMI / RBRACE / NORAISE] -// [169, simple_type → • LPAREN type_ RPAREN, RAISE / EQUAL / QUESTION / SEMI / RBRACE / NORAISE] -// [170, simple_type → • qualified_uident_ optional_type_arguments, RAISE / EQUAL / QUESTION / SEMI / RBRACE / NORAISE] -// [171, simple_type → • AMPER qualified_uident_, RAISE / EQUAL / QUESTION / SEMI / RBRACE / NORAISE] -// [172, simple_type → • UNDERSCORE, RAISE / EQUAL / QUESTION / SEMI / RBRACE / NORAISE] -// [173, type_ → • simple_type, EQUAL / SEMI / RBRACE] -// [174, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EQUAL / SEMI / RBRACE] -// [175, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EQUAL / SEMI / RBRACE] -// [176, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EQUAL / SEMI / RBRACE] -// [177, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EQUAL / SEMI / RBRACE] -// [178, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, EQUAL / SEMI / RBRACE] -// [179, type_ → • LPAREN RPAREN THIN_ARROW return_type, EQUAL / SEMI / RBRACE] -// [180, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, EQUAL / SEMI / RBRACE] -// [181, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, EQUAL / SEMI / RBRACE] -// [182, return_type → • type_, EQUAL / SEMI / RBRACE] -// [183, return_type → • simple_type NORAISE, EQUAL / SEMI / RBRACE] -// [184, return_type → • simple_type RAISE, EQUAL / SEMI / RBRACE] -// [185, return_type → • simple_type RAISE error_type, EQUAL / SEMI / RBRACE] -// [186, return_type → • simple_type RAISE QUESTION, EQUAL / SEMI / RBRACE] -// [210, qualified_uident_ → • UIDENT, RAISE / EQUAL / QUESTION / SEMI / LBRACKET / RBRACE / NORAISE] -// [211, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, RAISE / EQUAL / QUESTION / SEMI / LBRACKET / RBRACE / NORAISE] +// [55, trait_method_sig → nonempty_list(attribute) lident LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW • return_type boption(eq_underscore), SEMI / RBRACE] +// [171, simple_type → • simple_type QUESTION, RAISE / EQUAL / QUESTION / SEMI / RBRACE / NORAISE] +// [172, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, RAISE / EQUAL / QUESTION / SEMI / RBRACE / NORAISE] +// [173, simple_type → • LPAREN type_ RPAREN, RAISE / EQUAL / QUESTION / SEMI / RBRACE / NORAISE] +// [174, simple_type → • qualified_uident_ optional_type_arguments, RAISE / EQUAL / QUESTION / SEMI / RBRACE / NORAISE] +// [175, simple_type → • AMPER qualified_uident_, RAISE / EQUAL / QUESTION / SEMI / RBRACE / NORAISE] +// [176, simple_type → • UNDERSCORE, RAISE / EQUAL / QUESTION / SEMI / RBRACE / NORAISE] +// [177, type_ → • simple_type, EQUAL / SEMI / RBRACE] +// [178, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EQUAL / SEMI / RBRACE] +// [179, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EQUAL / SEMI / RBRACE] +// [180, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EQUAL / SEMI / RBRACE] +// [181, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EQUAL / SEMI / RBRACE] +// [182, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, EQUAL / SEMI / RBRACE] +// [183, type_ → • LPAREN RPAREN THIN_ARROW return_type, EQUAL / SEMI / RBRACE] +// [184, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, EQUAL / SEMI / RBRACE] +// [185, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, EQUAL / SEMI / RBRACE] +// [186, return_type → • type_, EQUAL / SEMI / RBRACE] +// [187, return_type → • simple_type NORAISE, EQUAL / SEMI / RBRACE] +// [188, return_type → • simple_type RAISE, EQUAL / SEMI / RBRACE] +// [189, return_type → • simple_type RAISE error_type, EQUAL / SEMI / RBRACE] +// [190, return_type → • simple_type RAISE QUESTION, EQUAL / SEMI / RBRACE] +// [214, qualified_uident_ → • UIDENT, RAISE / EQUAL / QUESTION / SEMI / LBRACKET / RBRACE / NORAISE] +// [215, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, RAISE / EQUAL / QUESTION / SEMI / LBRACKET / RBRACE / NORAISE] fn yy_state_139(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_PACKAGE_NAME => Shift(yy_state_62) @@ -5968,61 +6090,234 @@ fn yy_state_139(_lookahead : YYSymbol) -> YYDecision { } } -// [50, trait_method_sig → nonempty_list(attribute) ASYNC lident LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type • boption(eq_underscore), SEMI / RBRACE] -// [221, boption(eq_underscore) → •, SEMI / RBRACE] -// [222, boption(eq_underscore) → • EQUAL UNDERSCORE, SEMI / RBRACE] +// [55, trait_method_sig → nonempty_list(attribute) lident LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type • boption(eq_underscore), SEMI / RBRACE] +// [226, boption(eq_underscore) → •, SEMI / RBRACE] +// [227, boption(eq_underscore) → • EQUAL UNDERSCORE, SEMI / RBRACE] fn yy_state_140(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_EQUAL => Shift(yy_state_131) NT_boption_eq_underscore_ => Shift(yy_state_141) - T_SEMI | T_RBRACE => Reduce(0, NT_boption_eq_underscore_, yy_action_218) + T_SEMI | T_RBRACE => Reduce(0, NT_boption_eq_underscore_, yy_action_222) _ => Error } } -// [50, trait_method_sig → nonempty_list(attribute) ASYNC lident LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type boption(eq_underscore) •, SEMI / RBRACE] +// [55, trait_method_sig → nonempty_list(attribute) lident LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type boption(eq_underscore) •, SEMI / RBRACE] fn yy_state_141(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(9, NT_trait_method_sig, yy_action_214) + ReduceNoLookahead(8, NT_trait_method_sig, yy_action_218) } -// [49, trait_method_sig → lident • LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type boption(eq_underscore), SEMI / RBRACE] +// [51, trait_method_sig → nonempty_list(attribute) FN • loption(type_params_with_constraints) lident LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type boption(eq_underscore), SEMI / RBRACE] +// [161, type_params_with_constraints → • LBRACKET separated_list(COMMA,type_param_with_constraints) RBRACKET, LIDENT / EXTEND] +// [222, loption(type_params_with_constraints) → •, LIDENT / EXTEND] +// [223, loption(type_params_with_constraints) → • type_params_with_constraints, LIDENT / EXTEND] fn yy_state_142(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LPAREN => Shift(yy_state_143) - _ => Error - } -} - -// [49, trait_method_sig → lident LPAREN • separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type boption(eq_underscore), SEMI / RBRACE] -// [167, simple_type → • simple_type QUESTION, RPAREN / COMMA / QUESTION] -// [168, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, RPAREN / COMMA / QUESTION] -// [169, simple_type → • LPAREN type_ RPAREN, RPAREN / COMMA / QUESTION] -// [170, simple_type → • qualified_uident_ optional_type_arguments, RPAREN / COMMA / QUESTION] -// [171, simple_type → • AMPER qualified_uident_, RPAREN / COMMA / QUESTION] -// [172, simple_type → • UNDERSCORE, RPAREN / COMMA / QUESTION] -// [173, type_ → • simple_type, RPAREN / COMMA] -// [174, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [175, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [176, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [177, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [178, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [179, type_ → • LPAREN RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [180, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [181, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [190, parameter → • type_, RPAREN / COMMA] -// [191, parameter → • POST_LABEL COLON type_, RPAREN / COMMA] -// [192, parameter → • label QUESTION COLON type_, RPAREN / COMMA] -// [210, qualified_uident_ → • UIDENT, RPAREN / COMMA / QUESTION / LBRACKET] -// [211, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, RPAREN / COMMA / QUESTION / LBRACKET] -// [214, label → • LIDENT, QUESTION] -// [219, separated_list(COMMA,parameter) → •, RPAREN] -// [220, separated_list(COMMA,parameter) → • separated_nonempty_list(COMMA,parameter), RPAREN] -// [258, separated_nonempty_list(COMMA,parameter) → • parameter, RPAREN] -// [259, separated_nonempty_list(COMMA,parameter) → • parameter COMMA separated_nonempty_list(COMMA,parameter), RPAREN] + NT_type_params_with_constraints => Shift(yy_state_143) + T_LBRACKET => Shift(yy_state_144) + NT_loption_type_params_with_constraints_ => Shift(yy_state_158) + T_LIDENT | T_EXTEND => Reduce(0, NT_loption_type_params_with_constraints_, yy_action_217) + _ => Error + } +} + +// [223, loption(type_params_with_constraints) → type_params_with_constraints •, LIDENT / UIDENT / AMPER / EXTEND] fn yy_state_143(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_loption_type_params_with_constraints_, yy_action_216) +} + +// [159, type_param_with_constraints → • uident, COMMA / RBRACKET] +// [160, type_param_with_constraints → • uident COLON separated_nonempty_list(PLUS,type_constraint), COMMA / RBRACKET] +// [161, type_params_with_constraints → LBRACKET • separated_list(COMMA,type_param_with_constraints) RBRACKET, LIDENT / UIDENT / AMPER / PACKAGE_NAME / EXTEND] +// [216, uident → • UIDENT, COMMA / COLON / RBRACKET] +// [251, separated_list(COMMA,type_param_with_constraints) → •, RBRACKET] +// [252, separated_list(COMMA,type_param_with_constraints) → • separated_nonempty_list(COMMA,type_param_with_constraints), RBRACKET] +// [273, separated_nonempty_list(COMMA,type_param_with_constraints) → • type_param_with_constraints, RBRACKET] +// [274, separated_nonempty_list(COMMA,type_param_with_constraints) → • type_param_with_constraints COMMA separated_nonempty_list(COMMA,type_param_with_constraints), RBRACKET] +fn yy_state_144(_lookahead : YYSymbol) -> YYDecision { match _lookahead { + T_UIDENT => Shift(yy_state_25) + NT_type_param_with_constraints => Shift(yy_state_145) + NT_uident => Shift(yy_state_148) + NT_separated_nonempty_list_COMMA_type_param_with_constraints_ => Shift(yy_state_155) + NT_separated_list_COMMA_type_param_with_constraints_ => Shift(yy_state_156) + T_RBRACKET => Reduce(0, NT_separated_list_COMMA_type_param_with_constraints_, yy_action_215) + _ => Error + } +} + +// [273, separated_nonempty_list(COMMA,type_param_with_constraints) → type_param_with_constraints •, RBRACKET] +// [274, separated_nonempty_list(COMMA,type_param_with_constraints) → type_param_with_constraints • COMMA separated_nonempty_list(COMMA,type_param_with_constraints), RBRACKET] +fn yy_state_145(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_COMMA => Shift(yy_state_146) + T_RBRACKET => Reduce(1, NT_separated_nonempty_list_COMMA_type_param_with_constraints_, yy_action_214) + _ => Error + } +} + +// [159, type_param_with_constraints → • uident, COMMA / RBRACKET] +// [160, type_param_with_constraints → • uident COLON separated_nonempty_list(PLUS,type_constraint), COMMA / RBRACKET] +// [216, uident → • UIDENT, COMMA / COLON / RBRACKET] +// [273, separated_nonempty_list(COMMA,type_param_with_constraints) → • type_param_with_constraints, RBRACKET] +// [274, separated_nonempty_list(COMMA,type_param_with_constraints) → • type_param_with_constraints COMMA separated_nonempty_list(COMMA,type_param_with_constraints), RBRACKET] +// [274, separated_nonempty_list(COMMA,type_param_with_constraints) → type_param_with_constraints COMMA • separated_nonempty_list(COMMA,type_param_with_constraints), RBRACKET] +fn yy_state_146(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_UIDENT => Shift(yy_state_25) + NT_type_param_with_constraints => Shift(yy_state_145) + NT_separated_nonempty_list_COMMA_type_param_with_constraints_ => Shift(yy_state_147) + NT_uident => Shift(yy_state_148) + _ => Error + } +} + +// [274, separated_nonempty_list(COMMA,type_param_with_constraints) → type_param_with_constraints COMMA separated_nonempty_list(COMMA,type_param_with_constraints) •, RBRACKET] +fn yy_state_147(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_separated_nonempty_list_COMMA_type_param_with_constraints_, yy_action_213) +} + +// [159, type_param_with_constraints → uident •, COMMA / RBRACKET] +// [160, type_param_with_constraints → uident • COLON separated_nonempty_list(PLUS,type_constraint), COMMA / RBRACKET] +fn yy_state_148(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_COLON => Shift(yy_state_149) + T_COMMA | T_RBRACKET => Reduce(1, NT_type_param_with_constraints, yy_action_212) + _ => Error + } +} + +// [160, type_param_with_constraints → uident COLON • separated_nonempty_list(PLUS,type_constraint), COMMA / RBRACKET] +// [167, type_constraint → • qualified_uident, COMMA / PLUS / RBRACKET] +// [212, qualified_uident → • UIDENT, COMMA / PLUS / RBRACKET] +// [213, qualified_uident → • PACKAGE_NAME DOT_UIDENT, COMMA / PLUS / RBRACKET] +// [249, separated_nonempty_list(PLUS,type_constraint) → • type_constraint, COMMA / RBRACKET] +// [250, separated_nonempty_list(PLUS,type_constraint) → • type_constraint PLUS separated_nonempty_list(PLUS,type_constraint), COMMA / RBRACKET] +fn yy_state_149(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_PACKAGE_NAME => Shift(yy_state_48) + T_UIDENT => Shift(yy_state_50) + NT_type_constraint => Shift(yy_state_150) + NT_qualified_uident => Shift(yy_state_153) + NT_separated_nonempty_list_PLUS_type_constraint_ => Shift(yy_state_154) + _ => Error + } +} + +// [249, separated_nonempty_list(PLUS,type_constraint) → type_constraint •, COMMA / RBRACKET] +// [250, separated_nonempty_list(PLUS,type_constraint) → type_constraint • PLUS separated_nonempty_list(PLUS,type_constraint), COMMA / RBRACKET] +fn yy_state_150(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_PLUS => Shift(yy_state_151) + T_COMMA | T_RBRACKET => Reduce(1, NT_separated_nonempty_list_PLUS_type_constraint_, yy_action_211) + _ => Error + } +} + +// [167, type_constraint → • qualified_uident, COMMA / PLUS / RBRACKET] +// [212, qualified_uident → • UIDENT, COMMA / PLUS / RBRACKET] +// [213, qualified_uident → • PACKAGE_NAME DOT_UIDENT, COMMA / PLUS / RBRACKET] +// [249, separated_nonempty_list(PLUS,type_constraint) → • type_constraint, COMMA / RBRACKET] +// [250, separated_nonempty_list(PLUS,type_constraint) → • type_constraint PLUS separated_nonempty_list(PLUS,type_constraint), COMMA / RBRACKET] +// [250, separated_nonempty_list(PLUS,type_constraint) → type_constraint PLUS • separated_nonempty_list(PLUS,type_constraint), COMMA / RBRACKET] +fn yy_state_151(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_PACKAGE_NAME => Shift(yy_state_48) + T_UIDENT => Shift(yy_state_50) + NT_type_constraint => Shift(yy_state_150) + NT_separated_nonempty_list_PLUS_type_constraint_ => Shift(yy_state_152) + NT_qualified_uident => Shift(yy_state_153) + _ => Error + } +} + +// [250, separated_nonempty_list(PLUS,type_constraint) → type_constraint PLUS separated_nonempty_list(PLUS,type_constraint) •, COMMA / RBRACKET] +fn yy_state_152(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_separated_nonempty_list_PLUS_type_constraint_, yy_action_210) +} + +// [167, type_constraint → qualified_uident •, COMMA / PLUS / RBRACKET] +fn yy_state_153(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_type_constraint, yy_action_209) +} + +// [160, type_param_with_constraints → uident COLON separated_nonempty_list(PLUS,type_constraint) •, COMMA / RBRACKET] +fn yy_state_154(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_type_param_with_constraints, yy_action_208) +} + +// [252, separated_list(COMMA,type_param_with_constraints) → separated_nonempty_list(COMMA,type_param_with_constraints) •, RBRACKET] +fn yy_state_155(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_separated_list_COMMA_type_param_with_constraints_, yy_action_207) +} + +// [161, type_params_with_constraints → LBRACKET separated_list(COMMA,type_param_with_constraints) • RBRACKET, LIDENT / UIDENT / AMPER / PACKAGE_NAME / EXTEND] +fn yy_state_156(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_RBRACKET => Shift(yy_state_157) + _ => Error + } +} + +// [161, type_params_with_constraints → LBRACKET separated_list(COMMA,type_param_with_constraints) RBRACKET •, LIDENT / UIDENT / AMPER / PACKAGE_NAME / EXTEND] +fn yy_state_157(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_type_params_with_constraints, yy_action_206) +} + +// [51, trait_method_sig → nonempty_list(attribute) FN loption(type_params_with_constraints) • lident LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type boption(eq_underscore), SEMI / RBRACE] +// [217, lident → • LIDENT, LPAREN] +// [218, lident → • EXTEND, LPAREN] +fn yy_state_158(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_EXTEND => Shift(yy_state_38) + T_LIDENT => Shift(yy_state_39) + NT_lident => Shift(yy_state_159) + _ => Error + } +} + +// [51, trait_method_sig → nonempty_list(attribute) FN loption(type_params_with_constraints) lident • LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type boption(eq_underscore), SEMI / RBRACE] +fn yy_state_159(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_LPAREN => Shift(yy_state_160) + _ => Error + } +} + +// [51, trait_method_sig → nonempty_list(attribute) FN loption(type_params_with_constraints) lident LPAREN • separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type boption(eq_underscore), SEMI / RBRACE] +// [171, simple_type → • simple_type QUESTION, RPAREN / COMMA / QUESTION] +// [172, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, RPAREN / COMMA / QUESTION] +// [173, simple_type → • LPAREN type_ RPAREN, RPAREN / COMMA / QUESTION] +// [174, simple_type → • qualified_uident_ optional_type_arguments, RPAREN / COMMA / QUESTION] +// [175, simple_type → • AMPER qualified_uident_, RPAREN / COMMA / QUESTION] +// [176, simple_type → • UNDERSCORE, RPAREN / COMMA / QUESTION] +// [177, type_ → • simple_type, RPAREN / COMMA] +// [178, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [179, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [180, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [181, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [182, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [183, type_ → • LPAREN RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [184, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [185, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [194, parameter → • type_, RPAREN / COMMA] +// [195, parameter → • POST_LABEL COLON type_, RPAREN / COMMA] +// [196, parameter → • label QUESTION COLON type_, RPAREN / COMMA] +// [214, qualified_uident_ → • UIDENT, RPAREN / COMMA / QUESTION / LBRACKET] +// [215, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, RPAREN / COMMA / QUESTION / LBRACKET] +// [217, lident → • LIDENT, QUESTION] +// [218, lident → • EXTEND, QUESTION] +// [219, label → • lident, QUESTION] +// [224, separated_list(COMMA,parameter) → •, RPAREN] +// [225, separated_list(COMMA,parameter) → • separated_nonempty_list(COMMA,parameter), RPAREN] +// [263, separated_nonempty_list(COMMA,parameter) → • parameter, RPAREN] +// [264, separated_nonempty_list(COMMA,parameter) → • parameter COMMA separated_nonempty_list(COMMA,parameter), RPAREN] +fn yy_state_160(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_EXTEND => Shift(yy_state_38) + T_LIDENT => Shift(yy_state_39) NT_parameter => Shift(yy_state_58) - T_LIDENT => Shift(yy_state_61) + NT_lident => Shift(yy_state_61) T_PACKAGE_NAME => Shift(yy_state_62) T_UIDENT => Shift(yy_state_64) NT_label => Shift(yy_state_65) @@ -6035,52 +6330,52 @@ fn yy_state_143(_lookahead : YYSymbol) -> YYDecision { T_POST_LABEL => Shift(yy_state_122) NT_type_ => Shift(yy_state_125) NT_separated_nonempty_list_COMMA_parameter_ => Shift(yy_state_126) - NT_separated_list_COMMA_parameter_ => Shift(yy_state_144) - T_RPAREN => Reduce(0, NT_separated_list_COMMA_parameter_, yy_action_256) + NT_separated_list_COMMA_parameter_ => Shift(yy_state_161) + T_RPAREN => Reduce(0, NT_separated_list_COMMA_parameter_, yy_action_260) _ => Error } } -// [49, trait_method_sig → lident LPAREN separated_list(COMMA,parameter) • RPAREN THIN_ARROW return_type boption(eq_underscore), SEMI / RBRACE] -fn yy_state_144(_lookahead : YYSymbol) -> YYDecision { +// [51, trait_method_sig → nonempty_list(attribute) FN loption(type_params_with_constraints) lident LPAREN separated_list(COMMA,parameter) • RPAREN THIN_ARROW return_type boption(eq_underscore), SEMI / RBRACE] +fn yy_state_161(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RPAREN => Shift(yy_state_145) + T_RPAREN => Shift(yy_state_162) _ => Error } } -// [49, trait_method_sig → lident LPAREN separated_list(COMMA,parameter) RPAREN • THIN_ARROW return_type boption(eq_underscore), SEMI / RBRACE] -fn yy_state_145(_lookahead : YYSymbol) -> YYDecision { +// [51, trait_method_sig → nonempty_list(attribute) FN loption(type_params_with_constraints) lident LPAREN separated_list(COMMA,parameter) RPAREN • THIN_ARROW return_type boption(eq_underscore), SEMI / RBRACE] +fn yy_state_162(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_THIN_ARROW => Shift(yy_state_146) - _ => Error - } -} - -// [49, trait_method_sig → lident LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW • return_type boption(eq_underscore), SEMI / RBRACE] -// [167, simple_type → • simple_type QUESTION, RAISE / EQUAL / QUESTION / SEMI / RBRACE / NORAISE] -// [168, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, RAISE / EQUAL / QUESTION / SEMI / RBRACE / NORAISE] -// [169, simple_type → • LPAREN type_ RPAREN, RAISE / EQUAL / QUESTION / SEMI / RBRACE / NORAISE] -// [170, simple_type → • qualified_uident_ optional_type_arguments, RAISE / EQUAL / QUESTION / SEMI / RBRACE / NORAISE] -// [171, simple_type → • AMPER qualified_uident_, RAISE / EQUAL / QUESTION / SEMI / RBRACE / NORAISE] -// [172, simple_type → • UNDERSCORE, RAISE / EQUAL / QUESTION / SEMI / RBRACE / NORAISE] -// [173, type_ → • simple_type, EQUAL / SEMI / RBRACE] -// [174, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EQUAL / SEMI / RBRACE] -// [175, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EQUAL / SEMI / RBRACE] -// [176, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EQUAL / SEMI / RBRACE] -// [177, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EQUAL / SEMI / RBRACE] -// [178, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, EQUAL / SEMI / RBRACE] -// [179, type_ → • LPAREN RPAREN THIN_ARROW return_type, EQUAL / SEMI / RBRACE] -// [180, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, EQUAL / SEMI / RBRACE] -// [181, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, EQUAL / SEMI / RBRACE] -// [182, return_type → • type_, EQUAL / SEMI / RBRACE] -// [183, return_type → • simple_type NORAISE, EQUAL / SEMI / RBRACE] -// [184, return_type → • simple_type RAISE, EQUAL / SEMI / RBRACE] -// [185, return_type → • simple_type RAISE error_type, EQUAL / SEMI / RBRACE] -// [186, return_type → • simple_type RAISE QUESTION, EQUAL / SEMI / RBRACE] -// [210, qualified_uident_ → • UIDENT, RAISE / EQUAL / QUESTION / SEMI / LBRACKET / RBRACE / NORAISE] -// [211, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, RAISE / EQUAL / QUESTION / SEMI / LBRACKET / RBRACE / NORAISE] -fn yy_state_146(_lookahead : YYSymbol) -> YYDecision { + T_THIN_ARROW => Shift(yy_state_163) + _ => Error + } +} + +// [51, trait_method_sig → nonempty_list(attribute) FN loption(type_params_with_constraints) lident LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW • return_type boption(eq_underscore), SEMI / RBRACE] +// [171, simple_type → • simple_type QUESTION, RAISE / EQUAL / QUESTION / SEMI / RBRACE / NORAISE] +// [172, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, RAISE / EQUAL / QUESTION / SEMI / RBRACE / NORAISE] +// [173, simple_type → • LPAREN type_ RPAREN, RAISE / EQUAL / QUESTION / SEMI / RBRACE / NORAISE] +// [174, simple_type → • qualified_uident_ optional_type_arguments, RAISE / EQUAL / QUESTION / SEMI / RBRACE / NORAISE] +// [175, simple_type → • AMPER qualified_uident_, RAISE / EQUAL / QUESTION / SEMI / RBRACE / NORAISE] +// [176, simple_type → • UNDERSCORE, RAISE / EQUAL / QUESTION / SEMI / RBRACE / NORAISE] +// [177, type_ → • simple_type, EQUAL / SEMI / RBRACE] +// [178, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EQUAL / SEMI / RBRACE] +// [179, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EQUAL / SEMI / RBRACE] +// [180, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EQUAL / SEMI / RBRACE] +// [181, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EQUAL / SEMI / RBRACE] +// [182, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, EQUAL / SEMI / RBRACE] +// [183, type_ → • LPAREN RPAREN THIN_ARROW return_type, EQUAL / SEMI / RBRACE] +// [184, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, EQUAL / SEMI / RBRACE] +// [185, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, EQUAL / SEMI / RBRACE] +// [186, return_type → • type_, EQUAL / SEMI / RBRACE] +// [187, return_type → • simple_type NORAISE, EQUAL / SEMI / RBRACE] +// [188, return_type → • simple_type RAISE, EQUAL / SEMI / RBRACE] +// [189, return_type → • simple_type RAISE error_type, EQUAL / SEMI / RBRACE] +// [190, return_type → • simple_type RAISE QUESTION, EQUAL / SEMI / RBRACE] +// [214, qualified_uident_ → • UIDENT, RAISE / EQUAL / QUESTION / SEMI / LBRACKET / RBRACE / NORAISE] +// [215, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, RAISE / EQUAL / QUESTION / SEMI / LBRACKET / RBRACE / NORAISE] +fn yy_state_163(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_PACKAGE_NAME => Shift(yy_state_62) T_UIDENT => Shift(yy_state_64) @@ -6091,76 +6386,84 @@ fn yy_state_146(_lookahead : YYSymbol) -> YYDecision { NT_qualified_uident_ => Shift(yy_state_78) T_LPAREN => Shift(yy_state_83) NT_simple_type => Shift(yy_state_87) - NT_return_type => Shift(yy_state_147) + NT_return_type => Shift(yy_state_164) _ => Error } } -// [49, trait_method_sig → lident LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type • boption(eq_underscore), SEMI / RBRACE] -// [221, boption(eq_underscore) → •, SEMI / RBRACE] -// [222, boption(eq_underscore) → • EQUAL UNDERSCORE, SEMI / RBRACE] -fn yy_state_147(_lookahead : YYSymbol) -> YYDecision { +// [51, trait_method_sig → nonempty_list(attribute) FN loption(type_params_with_constraints) lident LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type • boption(eq_underscore), SEMI / RBRACE] +// [226, boption(eq_underscore) → •, SEMI / RBRACE] +// [227, boption(eq_underscore) → • EQUAL UNDERSCORE, SEMI / RBRACE] +fn yy_state_164(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_EQUAL => Shift(yy_state_131) - NT_boption_eq_underscore_ => Shift(yy_state_148) - T_SEMI | T_RBRACE => Reduce(0, NT_boption_eq_underscore_, yy_action_218) + NT_boption_eq_underscore_ => Shift(yy_state_165) + T_SEMI | T_RBRACE => Reduce(0, NT_boption_eq_underscore_, yy_action_222) _ => Error } } -// [49, trait_method_sig → lident LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type boption(eq_underscore) •, SEMI / RBRACE] -fn yy_state_148(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(7, NT_trait_method_sig, yy_action_213) +// [51, trait_method_sig → nonempty_list(attribute) FN loption(type_params_with_constraints) lident LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type boption(eq_underscore) •, SEMI / RBRACE] +fn yy_state_165(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(10, NT_trait_method_sig, yy_action_205) } -// [48, trait_method_sig → ASYNC • lident LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type boption(eq_underscore), SEMI / RBRACE] -// [213, lident → • LIDENT, LPAREN] -fn yy_state_149(_lookahead : YYSymbol) -> YYDecision { +// [50, trait_method_sig → nonempty_list(attribute) ASYNC • FN loption(type_params_with_constraints) lident LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type boption(eq_underscore), SEMI / RBRACE] +// [54, trait_method_sig → nonempty_list(attribute) ASYNC • lident LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type boption(eq_underscore), SEMI / RBRACE] +// [217, lident → • LIDENT, LPAREN] +// [218, lident → • EXTEND, LPAREN] +fn yy_state_166(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LIDENT => Shift(yy_state_38) - NT_lident => Shift(yy_state_150) + T_EXTEND => Shift(yy_state_38) + T_LIDENT => Shift(yy_state_39) + NT_lident => Shift(yy_state_167) + T_FN => Shift(yy_state_174) _ => Error } } -// [48, trait_method_sig → ASYNC lident • LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type boption(eq_underscore), SEMI / RBRACE] -fn yy_state_150(_lookahead : YYSymbol) -> YYDecision { +// [54, trait_method_sig → nonempty_list(attribute) ASYNC lident • LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type boption(eq_underscore), SEMI / RBRACE] +fn yy_state_167(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LPAREN => Shift(yy_state_151) - _ => Error - } -} - -// [48, trait_method_sig → ASYNC lident LPAREN • separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type boption(eq_underscore), SEMI / RBRACE] -// [167, simple_type → • simple_type QUESTION, RPAREN / COMMA / QUESTION] -// [168, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, RPAREN / COMMA / QUESTION] -// [169, simple_type → • LPAREN type_ RPAREN, RPAREN / COMMA / QUESTION] -// [170, simple_type → • qualified_uident_ optional_type_arguments, RPAREN / COMMA / QUESTION] -// [171, simple_type → • AMPER qualified_uident_, RPAREN / COMMA / QUESTION] -// [172, simple_type → • UNDERSCORE, RPAREN / COMMA / QUESTION] -// [173, type_ → • simple_type, RPAREN / COMMA] -// [174, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [175, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [176, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [177, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [178, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [179, type_ → • LPAREN RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [180, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [181, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [190, parameter → • type_, RPAREN / COMMA] -// [191, parameter → • POST_LABEL COLON type_, RPAREN / COMMA] -// [192, parameter → • label QUESTION COLON type_, RPAREN / COMMA] -// [210, qualified_uident_ → • UIDENT, RPAREN / COMMA / QUESTION / LBRACKET] -// [211, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, RPAREN / COMMA / QUESTION / LBRACKET] -// [214, label → • LIDENT, QUESTION] -// [219, separated_list(COMMA,parameter) → •, RPAREN] -// [220, separated_list(COMMA,parameter) → • separated_nonempty_list(COMMA,parameter), RPAREN] -// [258, separated_nonempty_list(COMMA,parameter) → • parameter, RPAREN] -// [259, separated_nonempty_list(COMMA,parameter) → • parameter COMMA separated_nonempty_list(COMMA,parameter), RPAREN] -fn yy_state_151(_lookahead : YYSymbol) -> YYDecision { + T_LPAREN => Shift(yy_state_168) + _ => Error + } +} + +// [54, trait_method_sig → nonempty_list(attribute) ASYNC lident LPAREN • separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type boption(eq_underscore), SEMI / RBRACE] +// [171, simple_type → • simple_type QUESTION, RPAREN / COMMA / QUESTION] +// [172, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, RPAREN / COMMA / QUESTION] +// [173, simple_type → • LPAREN type_ RPAREN, RPAREN / COMMA / QUESTION] +// [174, simple_type → • qualified_uident_ optional_type_arguments, RPAREN / COMMA / QUESTION] +// [175, simple_type → • AMPER qualified_uident_, RPAREN / COMMA / QUESTION] +// [176, simple_type → • UNDERSCORE, RPAREN / COMMA / QUESTION] +// [177, type_ → • simple_type, RPAREN / COMMA] +// [178, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [179, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [180, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [181, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [182, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [183, type_ → • LPAREN RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [184, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [185, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [194, parameter → • type_, RPAREN / COMMA] +// [195, parameter → • POST_LABEL COLON type_, RPAREN / COMMA] +// [196, parameter → • label QUESTION COLON type_, RPAREN / COMMA] +// [214, qualified_uident_ → • UIDENT, RPAREN / COMMA / QUESTION / LBRACKET] +// [215, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, RPAREN / COMMA / QUESTION / LBRACKET] +// [217, lident → • LIDENT, QUESTION] +// [218, lident → • EXTEND, QUESTION] +// [219, label → • lident, QUESTION] +// [224, separated_list(COMMA,parameter) → •, RPAREN] +// [225, separated_list(COMMA,parameter) → • separated_nonempty_list(COMMA,parameter), RPAREN] +// [263, separated_nonempty_list(COMMA,parameter) → • parameter, RPAREN] +// [264, separated_nonempty_list(COMMA,parameter) → • parameter COMMA separated_nonempty_list(COMMA,parameter), RPAREN] +fn yy_state_168(_lookahead : YYSymbol) -> YYDecision { match _lookahead { + T_EXTEND => Shift(yy_state_38) + T_LIDENT => Shift(yy_state_39) NT_parameter => Shift(yy_state_58) - T_LIDENT => Shift(yy_state_61) + NT_lident => Shift(yy_state_61) T_PACKAGE_NAME => Shift(yy_state_62) T_UIDENT => Shift(yy_state_64) NT_label => Shift(yy_state_65) @@ -6173,52 +6476,52 @@ fn yy_state_151(_lookahead : YYSymbol) -> YYDecision { T_POST_LABEL => Shift(yy_state_122) NT_type_ => Shift(yy_state_125) NT_separated_nonempty_list_COMMA_parameter_ => Shift(yy_state_126) - NT_separated_list_COMMA_parameter_ => Shift(yy_state_152) - T_RPAREN => Reduce(0, NT_separated_list_COMMA_parameter_, yy_action_256) + NT_separated_list_COMMA_parameter_ => Shift(yy_state_169) + T_RPAREN => Reduce(0, NT_separated_list_COMMA_parameter_, yy_action_260) _ => Error } } -// [48, trait_method_sig → ASYNC lident LPAREN separated_list(COMMA,parameter) • RPAREN THIN_ARROW return_type boption(eq_underscore), SEMI / RBRACE] -fn yy_state_152(_lookahead : YYSymbol) -> YYDecision { +// [54, trait_method_sig → nonempty_list(attribute) ASYNC lident LPAREN separated_list(COMMA,parameter) • RPAREN THIN_ARROW return_type boption(eq_underscore), SEMI / RBRACE] +fn yy_state_169(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RPAREN => Shift(yy_state_153) + T_RPAREN => Shift(yy_state_170) _ => Error } } -// [48, trait_method_sig → ASYNC lident LPAREN separated_list(COMMA,parameter) RPAREN • THIN_ARROW return_type boption(eq_underscore), SEMI / RBRACE] -fn yy_state_153(_lookahead : YYSymbol) -> YYDecision { +// [54, trait_method_sig → nonempty_list(attribute) ASYNC lident LPAREN separated_list(COMMA,parameter) RPAREN • THIN_ARROW return_type boption(eq_underscore), SEMI / RBRACE] +fn yy_state_170(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_THIN_ARROW => Shift(yy_state_154) - _ => Error - } -} - -// [48, trait_method_sig → ASYNC lident LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW • return_type boption(eq_underscore), SEMI / RBRACE] -// [167, simple_type → • simple_type QUESTION, RAISE / EQUAL / QUESTION / SEMI / RBRACE / NORAISE] -// [168, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, RAISE / EQUAL / QUESTION / SEMI / RBRACE / NORAISE] -// [169, simple_type → • LPAREN type_ RPAREN, RAISE / EQUAL / QUESTION / SEMI / RBRACE / NORAISE] -// [170, simple_type → • qualified_uident_ optional_type_arguments, RAISE / EQUAL / QUESTION / SEMI / RBRACE / NORAISE] -// [171, simple_type → • AMPER qualified_uident_, RAISE / EQUAL / QUESTION / SEMI / RBRACE / NORAISE] -// [172, simple_type → • UNDERSCORE, RAISE / EQUAL / QUESTION / SEMI / RBRACE / NORAISE] -// [173, type_ → • simple_type, EQUAL / SEMI / RBRACE] -// [174, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EQUAL / SEMI / RBRACE] -// [175, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EQUAL / SEMI / RBRACE] -// [176, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EQUAL / SEMI / RBRACE] -// [177, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EQUAL / SEMI / RBRACE] -// [178, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, EQUAL / SEMI / RBRACE] -// [179, type_ → • LPAREN RPAREN THIN_ARROW return_type, EQUAL / SEMI / RBRACE] -// [180, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, EQUAL / SEMI / RBRACE] -// [181, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, EQUAL / SEMI / RBRACE] -// [182, return_type → • type_, EQUAL / SEMI / RBRACE] -// [183, return_type → • simple_type NORAISE, EQUAL / SEMI / RBRACE] -// [184, return_type → • simple_type RAISE, EQUAL / SEMI / RBRACE] -// [185, return_type → • simple_type RAISE error_type, EQUAL / SEMI / RBRACE] -// [186, return_type → • simple_type RAISE QUESTION, EQUAL / SEMI / RBRACE] -// [210, qualified_uident_ → • UIDENT, RAISE / EQUAL / QUESTION / SEMI / LBRACKET / RBRACE / NORAISE] -// [211, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, RAISE / EQUAL / QUESTION / SEMI / LBRACKET / RBRACE / NORAISE] -fn yy_state_154(_lookahead : YYSymbol) -> YYDecision { + T_THIN_ARROW => Shift(yy_state_171) + _ => Error + } +} + +// [54, trait_method_sig → nonempty_list(attribute) ASYNC lident LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW • return_type boption(eq_underscore), SEMI / RBRACE] +// [171, simple_type → • simple_type QUESTION, RAISE / EQUAL / QUESTION / SEMI / RBRACE / NORAISE] +// [172, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, RAISE / EQUAL / QUESTION / SEMI / RBRACE / NORAISE] +// [173, simple_type → • LPAREN type_ RPAREN, RAISE / EQUAL / QUESTION / SEMI / RBRACE / NORAISE] +// [174, simple_type → • qualified_uident_ optional_type_arguments, RAISE / EQUAL / QUESTION / SEMI / RBRACE / NORAISE] +// [175, simple_type → • AMPER qualified_uident_, RAISE / EQUAL / QUESTION / SEMI / RBRACE / NORAISE] +// [176, simple_type → • UNDERSCORE, RAISE / EQUAL / QUESTION / SEMI / RBRACE / NORAISE] +// [177, type_ → • simple_type, EQUAL / SEMI / RBRACE] +// [178, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EQUAL / SEMI / RBRACE] +// [179, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EQUAL / SEMI / RBRACE] +// [180, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EQUAL / SEMI / RBRACE] +// [181, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EQUAL / SEMI / RBRACE] +// [182, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, EQUAL / SEMI / RBRACE] +// [183, type_ → • LPAREN RPAREN THIN_ARROW return_type, EQUAL / SEMI / RBRACE] +// [184, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, EQUAL / SEMI / RBRACE] +// [185, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, EQUAL / SEMI / RBRACE] +// [186, return_type → • type_, EQUAL / SEMI / RBRACE] +// [187, return_type → • simple_type NORAISE, EQUAL / SEMI / RBRACE] +// [188, return_type → • simple_type RAISE, EQUAL / SEMI / RBRACE] +// [189, return_type → • simple_type RAISE error_type, EQUAL / SEMI / RBRACE] +// [190, return_type → • simple_type RAISE QUESTION, EQUAL / SEMI / RBRACE] +// [214, qualified_uident_ → • UIDENT, RAISE / EQUAL / QUESTION / SEMI / LBRACKET / RBRACE / NORAISE] +// [215, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, RAISE / EQUAL / QUESTION / SEMI / LBRACKET / RBRACE / NORAISE] +fn yy_state_171(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_PACKAGE_NAME => Shift(yy_state_62) T_UIDENT => Shift(yy_state_64) @@ -6229,290 +6532,714 @@ fn yy_state_154(_lookahead : YYSymbol) -> YYDecision { NT_qualified_uident_ => Shift(yy_state_78) T_LPAREN => Shift(yy_state_83) NT_simple_type => Shift(yy_state_87) - NT_return_type => Shift(yy_state_155) + NT_return_type => Shift(yy_state_172) _ => Error } } -// [48, trait_method_sig → ASYNC lident LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type • boption(eq_underscore), SEMI / RBRACE] -// [221, boption(eq_underscore) → •, SEMI / RBRACE] -// [222, boption(eq_underscore) → • EQUAL UNDERSCORE, SEMI / RBRACE] -fn yy_state_155(_lookahead : YYSymbol) -> YYDecision { +// [54, trait_method_sig → nonempty_list(attribute) ASYNC lident LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type • boption(eq_underscore), SEMI / RBRACE] +// [226, boption(eq_underscore) → •, SEMI / RBRACE] +// [227, boption(eq_underscore) → • EQUAL UNDERSCORE, SEMI / RBRACE] +fn yy_state_172(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_EQUAL => Shift(yy_state_131) - NT_boption_eq_underscore_ => Shift(yy_state_156) - T_SEMI | T_RBRACE => Reduce(0, NT_boption_eq_underscore_, yy_action_218) + NT_boption_eq_underscore_ => Shift(yy_state_173) + T_SEMI | T_RBRACE => Reduce(0, NT_boption_eq_underscore_, yy_action_222) _ => Error } } -// [48, trait_method_sig → ASYNC lident LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type boption(eq_underscore) •, SEMI / RBRACE] -fn yy_state_156(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(8, NT_trait_method_sig, yy_action_212) +// [54, trait_method_sig → nonempty_list(attribute) ASYNC lident LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type boption(eq_underscore) •, SEMI / RBRACE] +fn yy_state_173(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(9, NT_trait_method_sig, yy_action_204) } -// [233, separated_list(SEMI,trait_method_sig) → separated_nonempty_list(SEMI,trait_method_sig) •, RBRACE] -fn yy_state_157(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_separated_list_SEMI_trait_method_sig_, yy_action_211) +// [50, trait_method_sig → nonempty_list(attribute) ASYNC FN • loption(type_params_with_constraints) lident LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type boption(eq_underscore), SEMI / RBRACE] +// [161, type_params_with_constraints → • LBRACKET separated_list(COMMA,type_param_with_constraints) RBRACKET, LIDENT / EXTEND] +// [222, loption(type_params_with_constraints) → •, LIDENT / EXTEND] +// [223, loption(type_params_with_constraints) → • type_params_with_constraints, LIDENT / EXTEND] +fn yy_state_174(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + NT_type_params_with_constraints => Shift(yy_state_143) + T_LBRACKET => Shift(yy_state_144) + NT_loption_type_params_with_constraints_ => Shift(yy_state_175) + T_LIDENT | T_EXTEND => Reduce(0, NT_loption_type_params_with_constraints_, yy_action_217) + _ => Error + } } -// [121, trait_body → LBRACE separated_list(SEMI,trait_method_sig) • RBRACE, EOF / SEMI] -fn yy_state_158(_lookahead : YYSymbol) -> YYDecision { +// [50, trait_method_sig → nonempty_list(attribute) ASYNC FN loption(type_params_with_constraints) • lident LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type boption(eq_underscore), SEMI / RBRACE] +// [217, lident → • LIDENT, LPAREN] +// [218, lident → • EXTEND, LPAREN] +fn yy_state_175(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RBRACE => Shift(yy_state_159) + T_EXTEND => Shift(yy_state_38) + T_LIDENT => Shift(yy_state_39) + NT_lident => Shift(yy_state_176) _ => Error } } -// [121, trait_body → LBRACE separated_list(SEMI,trait_method_sig) RBRACE •, EOF / SEMI] -fn yy_state_159(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_trait_body, yy_action_210) +// [50, trait_method_sig → nonempty_list(attribute) ASYNC FN loption(type_params_with_constraints) lident • LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type boption(eq_underscore), SEMI / RBRACE] +fn yy_state_176(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_LPAREN => Shift(yy_state_177) + _ => Error + } +} + +// [50, trait_method_sig → nonempty_list(attribute) ASYNC FN loption(type_params_with_constraints) lident LPAREN • separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type boption(eq_underscore), SEMI / RBRACE] +// [171, simple_type → • simple_type QUESTION, RPAREN / COMMA / QUESTION] +// [172, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, RPAREN / COMMA / QUESTION] +// [173, simple_type → • LPAREN type_ RPAREN, RPAREN / COMMA / QUESTION] +// [174, simple_type → • qualified_uident_ optional_type_arguments, RPAREN / COMMA / QUESTION] +// [175, simple_type → • AMPER qualified_uident_, RPAREN / COMMA / QUESTION] +// [176, simple_type → • UNDERSCORE, RPAREN / COMMA / QUESTION] +// [177, type_ → • simple_type, RPAREN / COMMA] +// [178, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [179, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [180, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [181, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [182, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [183, type_ → • LPAREN RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [184, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [185, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [194, parameter → • type_, RPAREN / COMMA] +// [195, parameter → • POST_LABEL COLON type_, RPAREN / COMMA] +// [196, parameter → • label QUESTION COLON type_, RPAREN / COMMA] +// [214, qualified_uident_ → • UIDENT, RPAREN / COMMA / QUESTION / LBRACKET] +// [215, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, RPAREN / COMMA / QUESTION / LBRACKET] +// [217, lident → • LIDENT, QUESTION] +// [218, lident → • EXTEND, QUESTION] +// [219, label → • lident, QUESTION] +// [224, separated_list(COMMA,parameter) → •, RPAREN] +// [225, separated_list(COMMA,parameter) → • separated_nonempty_list(COMMA,parameter), RPAREN] +// [263, separated_nonempty_list(COMMA,parameter) → • parameter, RPAREN] +// [264, separated_nonempty_list(COMMA,parameter) → • parameter COMMA separated_nonempty_list(COMMA,parameter), RPAREN] +fn yy_state_177(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_EXTEND => Shift(yy_state_38) + T_LIDENT => Shift(yy_state_39) + NT_parameter => Shift(yy_state_58) + NT_lident => Shift(yy_state_61) + T_PACKAGE_NAME => Shift(yy_state_62) + T_UIDENT => Shift(yy_state_64) + NT_label => Shift(yy_state_65) + T_ASYNC => Shift(yy_state_69) + T_UNDERSCORE => Shift(yy_state_75) + T_AMPER => Shift(yy_state_76) + NT_qualified_uident_ => Shift(yy_state_78) + T_LPAREN => Shift(yy_state_83) + NT_simple_type => Shift(yy_state_106) + T_POST_LABEL => Shift(yy_state_122) + NT_type_ => Shift(yy_state_125) + NT_separated_nonempty_list_COMMA_parameter_ => Shift(yy_state_126) + NT_separated_list_COMMA_parameter_ => Shift(yy_state_178) + T_RPAREN => Reduce(0, NT_separated_list_COMMA_parameter_, yy_action_260) + _ => Error + } } -// [114, trait_sig → TRAIT uident loption(preceded(COLON,separated_nonempty_list(PLUS,qualified_uident))) trait_body •, EOF / SEMI] -fn yy_state_160(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(4, NT_trait_sig, yy_action_209) +// [50, trait_method_sig → nonempty_list(attribute) ASYNC FN loption(type_params_with_constraints) lident LPAREN separated_list(COMMA,parameter) • RPAREN THIN_ARROW return_type boption(eq_underscore), SEMI / RBRACE] +fn yy_state_178(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_RPAREN => Shift(yy_state_179) + _ => Error + } } -// [102, impl_sig → IMPL • type_params_with_constraints qualified_uident FOR type_, EOF / SEMI] -// [108, impl_sig → IMPL • qualified_uident FOR type_, EOF / SEMI] -// [157, type_params_with_constraints → • LBRACKET separated_list(COMMA,type_param_with_constraints) RBRACKET, UIDENT / PACKAGE_NAME] -// [208, qualified_uident → • UIDENT, FOR] -// [209, qualified_uident → • PACKAGE_NAME DOT_UIDENT, FOR] -fn yy_state_161(_lookahead : YYSymbol) -> YYDecision { +// [50, trait_method_sig → nonempty_list(attribute) ASYNC FN loption(type_params_with_constraints) lident LPAREN separated_list(COMMA,parameter) RPAREN • THIN_ARROW return_type boption(eq_underscore), SEMI / RBRACE] +fn yy_state_179(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_PACKAGE_NAME => Shift(yy_state_47) - T_UIDENT => Shift(yy_state_49) - T_LBRACKET => Shift(yy_state_162) - NT_qualified_uident => Shift(yy_state_176) - NT_type_params_with_constraints => Shift(yy_state_179) + T_THIN_ARROW => Shift(yy_state_180) + _ => Error + } +} + +// [50, trait_method_sig → nonempty_list(attribute) ASYNC FN loption(type_params_with_constraints) lident LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW • return_type boption(eq_underscore), SEMI / RBRACE] +// [171, simple_type → • simple_type QUESTION, RAISE / EQUAL / QUESTION / SEMI / RBRACE / NORAISE] +// [172, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, RAISE / EQUAL / QUESTION / SEMI / RBRACE / NORAISE] +// [173, simple_type → • LPAREN type_ RPAREN, RAISE / EQUAL / QUESTION / SEMI / RBRACE / NORAISE] +// [174, simple_type → • qualified_uident_ optional_type_arguments, RAISE / EQUAL / QUESTION / SEMI / RBRACE / NORAISE] +// [175, simple_type → • AMPER qualified_uident_, RAISE / EQUAL / QUESTION / SEMI / RBRACE / NORAISE] +// [176, simple_type → • UNDERSCORE, RAISE / EQUAL / QUESTION / SEMI / RBRACE / NORAISE] +// [177, type_ → • simple_type, EQUAL / SEMI / RBRACE] +// [178, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EQUAL / SEMI / RBRACE] +// [179, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EQUAL / SEMI / RBRACE] +// [180, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EQUAL / SEMI / RBRACE] +// [181, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EQUAL / SEMI / RBRACE] +// [182, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, EQUAL / SEMI / RBRACE] +// [183, type_ → • LPAREN RPAREN THIN_ARROW return_type, EQUAL / SEMI / RBRACE] +// [184, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, EQUAL / SEMI / RBRACE] +// [185, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, EQUAL / SEMI / RBRACE] +// [186, return_type → • type_, EQUAL / SEMI / RBRACE] +// [187, return_type → • simple_type NORAISE, EQUAL / SEMI / RBRACE] +// [188, return_type → • simple_type RAISE, EQUAL / SEMI / RBRACE] +// [189, return_type → • simple_type RAISE error_type, EQUAL / SEMI / RBRACE] +// [190, return_type → • simple_type RAISE QUESTION, EQUAL / SEMI / RBRACE] +// [214, qualified_uident_ → • UIDENT, RAISE / EQUAL / QUESTION / SEMI / LBRACKET / RBRACE / NORAISE] +// [215, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, RAISE / EQUAL / QUESTION / SEMI / LBRACKET / RBRACE / NORAISE] +fn yy_state_180(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_PACKAGE_NAME => Shift(yy_state_62) + T_UIDENT => Shift(yy_state_64) + T_ASYNC => Shift(yy_state_69) + NT_type_ => Shift(yy_state_73) + T_UNDERSCORE => Shift(yy_state_75) + T_AMPER => Shift(yy_state_76) + NT_qualified_uident_ => Shift(yy_state_78) + T_LPAREN => Shift(yy_state_83) + NT_simple_type => Shift(yy_state_87) + NT_return_type => Shift(yy_state_181) _ => Error } } -// [155, type_param_with_constraints → • uident, COMMA / RBRACKET] -// [156, type_param_with_constraints → • uident COLON separated_nonempty_list(PLUS,type_constraint), COMMA / RBRACKET] -// [157, type_params_with_constraints → LBRACKET • separated_list(COMMA,type_param_with_constraints) RBRACKET, LIDENT / UIDENT / AMPER / PACKAGE_NAME] -// [212, uident → • UIDENT, COMMA / COLON / RBRACKET] -// [246, separated_list(COMMA,type_param_with_constraints) → •, RBRACKET] -// [247, separated_list(COMMA,type_param_with_constraints) → • separated_nonempty_list(COMMA,type_param_with_constraints), RBRACKET] -// [268, separated_nonempty_list(COMMA,type_param_with_constraints) → • type_param_with_constraints, RBRACKET] -// [269, separated_nonempty_list(COMMA,type_param_with_constraints) → • type_param_with_constraints COMMA separated_nonempty_list(COMMA,type_param_with_constraints), RBRACKET] -fn yy_state_162(_lookahead : YYSymbol) -> YYDecision { +// [50, trait_method_sig → nonempty_list(attribute) ASYNC FN loption(type_params_with_constraints) lident LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type • boption(eq_underscore), SEMI / RBRACE] +// [226, boption(eq_underscore) → •, SEMI / RBRACE] +// [227, boption(eq_underscore) → • EQUAL UNDERSCORE, SEMI / RBRACE] +fn yy_state_181(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_UIDENT => Shift(yy_state_25) - NT_type_param_with_constraints => Shift(yy_state_163) - NT_uident => Shift(yy_state_166) - NT_separated_nonempty_list_COMMA_type_param_with_constraints_ => Shift(yy_state_173) - NT_separated_list_COMMA_type_param_with_constraints_ => Shift(yy_state_174) - T_RBRACKET => Reduce(0, NT_separated_list_COMMA_type_param_with_constraints_, yy_action_208) + T_EQUAL => Shift(yy_state_131) + NT_boption_eq_underscore_ => Shift(yy_state_182) + T_SEMI | T_RBRACE => Reduce(0, NT_boption_eq_underscore_, yy_action_222) _ => Error } } -// [268, separated_nonempty_list(COMMA,type_param_with_constraints) → type_param_with_constraints •, RBRACKET] -// [269, separated_nonempty_list(COMMA,type_param_with_constraints) → type_param_with_constraints • COMMA separated_nonempty_list(COMMA,type_param_with_constraints), RBRACKET] -fn yy_state_163(_lookahead : YYSymbol) -> YYDecision { +// [50, trait_method_sig → nonempty_list(attribute) ASYNC FN loption(type_params_with_constraints) lident LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type boption(eq_underscore) •, SEMI / RBRACE] +fn yy_state_182(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(11, NT_trait_method_sig, yy_action_203) +} + +// [49, trait_method_sig → FN • loption(type_params_with_constraints) lident LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type boption(eq_underscore), SEMI / RBRACE] +// [161, type_params_with_constraints → • LBRACKET separated_list(COMMA,type_param_with_constraints) RBRACKET, LIDENT / EXTEND] +// [222, loption(type_params_with_constraints) → •, LIDENT / EXTEND] +// [223, loption(type_params_with_constraints) → • type_params_with_constraints, LIDENT / EXTEND] +fn yy_state_183(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_COMMA => Shift(yy_state_164) - T_RBRACKET => Reduce(1, NT_separated_nonempty_list_COMMA_type_param_with_constraints_, yy_action_207) + NT_type_params_with_constraints => Shift(yy_state_143) + T_LBRACKET => Shift(yy_state_144) + NT_loption_type_params_with_constraints_ => Shift(yy_state_184) + T_LIDENT | T_EXTEND => Reduce(0, NT_loption_type_params_with_constraints_, yy_action_217) _ => Error } } -// [155, type_param_with_constraints → • uident, COMMA / RBRACKET] -// [156, type_param_with_constraints → • uident COLON separated_nonempty_list(PLUS,type_constraint), COMMA / RBRACKET] -// [212, uident → • UIDENT, COMMA / COLON / RBRACKET] -// [268, separated_nonempty_list(COMMA,type_param_with_constraints) → • type_param_with_constraints, RBRACKET] -// [269, separated_nonempty_list(COMMA,type_param_with_constraints) → • type_param_with_constraints COMMA separated_nonempty_list(COMMA,type_param_with_constraints), RBRACKET] -// [269, separated_nonempty_list(COMMA,type_param_with_constraints) → type_param_with_constraints COMMA • separated_nonempty_list(COMMA,type_param_with_constraints), RBRACKET] -fn yy_state_164(_lookahead : YYSymbol) -> YYDecision { +// [49, trait_method_sig → FN loption(type_params_with_constraints) • lident LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type boption(eq_underscore), SEMI / RBRACE] +// [217, lident → • LIDENT, LPAREN] +// [218, lident → • EXTEND, LPAREN] +fn yy_state_184(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_UIDENT => Shift(yy_state_25) - NT_type_param_with_constraints => Shift(yy_state_163) - NT_separated_nonempty_list_COMMA_type_param_with_constraints_ => Shift(yy_state_165) - NT_uident => Shift(yy_state_166) + T_EXTEND => Shift(yy_state_38) + T_LIDENT => Shift(yy_state_39) + NT_lident => Shift(yy_state_185) _ => Error } } -// [269, separated_nonempty_list(COMMA,type_param_with_constraints) → type_param_with_constraints COMMA separated_nonempty_list(COMMA,type_param_with_constraints) •, RBRACKET] -fn yy_state_165(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_separated_nonempty_list_COMMA_type_param_with_constraints_, yy_action_206) +// [49, trait_method_sig → FN loption(type_params_with_constraints) lident • LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type boption(eq_underscore), SEMI / RBRACE] +fn yy_state_185(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_LPAREN => Shift(yy_state_186) + _ => Error + } +} + +// [49, trait_method_sig → FN loption(type_params_with_constraints) lident LPAREN • separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type boption(eq_underscore), SEMI / RBRACE] +// [171, simple_type → • simple_type QUESTION, RPAREN / COMMA / QUESTION] +// [172, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, RPAREN / COMMA / QUESTION] +// [173, simple_type → • LPAREN type_ RPAREN, RPAREN / COMMA / QUESTION] +// [174, simple_type → • qualified_uident_ optional_type_arguments, RPAREN / COMMA / QUESTION] +// [175, simple_type → • AMPER qualified_uident_, RPAREN / COMMA / QUESTION] +// [176, simple_type → • UNDERSCORE, RPAREN / COMMA / QUESTION] +// [177, type_ → • simple_type, RPAREN / COMMA] +// [178, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [179, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [180, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [181, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [182, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [183, type_ → • LPAREN RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [184, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [185, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [194, parameter → • type_, RPAREN / COMMA] +// [195, parameter → • POST_LABEL COLON type_, RPAREN / COMMA] +// [196, parameter → • label QUESTION COLON type_, RPAREN / COMMA] +// [214, qualified_uident_ → • UIDENT, RPAREN / COMMA / QUESTION / LBRACKET] +// [215, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, RPAREN / COMMA / QUESTION / LBRACKET] +// [217, lident → • LIDENT, QUESTION] +// [218, lident → • EXTEND, QUESTION] +// [219, label → • lident, QUESTION] +// [224, separated_list(COMMA,parameter) → •, RPAREN] +// [225, separated_list(COMMA,parameter) → • separated_nonempty_list(COMMA,parameter), RPAREN] +// [263, separated_nonempty_list(COMMA,parameter) → • parameter, RPAREN] +// [264, separated_nonempty_list(COMMA,parameter) → • parameter COMMA separated_nonempty_list(COMMA,parameter), RPAREN] +fn yy_state_186(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_EXTEND => Shift(yy_state_38) + T_LIDENT => Shift(yy_state_39) + NT_parameter => Shift(yy_state_58) + NT_lident => Shift(yy_state_61) + T_PACKAGE_NAME => Shift(yy_state_62) + T_UIDENT => Shift(yy_state_64) + NT_label => Shift(yy_state_65) + T_ASYNC => Shift(yy_state_69) + T_UNDERSCORE => Shift(yy_state_75) + T_AMPER => Shift(yy_state_76) + NT_qualified_uident_ => Shift(yy_state_78) + T_LPAREN => Shift(yy_state_83) + NT_simple_type => Shift(yy_state_106) + T_POST_LABEL => Shift(yy_state_122) + NT_type_ => Shift(yy_state_125) + NT_separated_nonempty_list_COMMA_parameter_ => Shift(yy_state_126) + NT_separated_list_COMMA_parameter_ => Shift(yy_state_187) + T_RPAREN => Reduce(0, NT_separated_list_COMMA_parameter_, yy_action_260) + _ => Error + } } -// [155, type_param_with_constraints → uident •, COMMA / RBRACKET] -// [156, type_param_with_constraints → uident • COLON separated_nonempty_list(PLUS,type_constraint), COMMA / RBRACKET] -fn yy_state_166(_lookahead : YYSymbol) -> YYDecision { +// [49, trait_method_sig → FN loption(type_params_with_constraints) lident LPAREN separated_list(COMMA,parameter) • RPAREN THIN_ARROW return_type boption(eq_underscore), SEMI / RBRACE] +fn yy_state_187(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_COLON => Shift(yy_state_167) - T_COMMA | T_RBRACKET => Reduce(1, NT_type_param_with_constraints, yy_action_205) + T_RPAREN => Shift(yy_state_188) _ => Error } } -// [156, type_param_with_constraints → uident COLON • separated_nonempty_list(PLUS,type_constraint), COMMA / RBRACKET] -// [163, type_constraint → • qualified_uident, COMMA / PLUS / RBRACKET] -// [208, qualified_uident → • UIDENT, COMMA / PLUS / RBRACKET] -// [209, qualified_uident → • PACKAGE_NAME DOT_UIDENT, COMMA / PLUS / RBRACKET] -// [244, separated_nonempty_list(PLUS,type_constraint) → • type_constraint, COMMA / RBRACKET] -// [245, separated_nonempty_list(PLUS,type_constraint) → • type_constraint PLUS separated_nonempty_list(PLUS,type_constraint), COMMA / RBRACKET] -fn yy_state_167(_lookahead : YYSymbol) -> YYDecision { +// [49, trait_method_sig → FN loption(type_params_with_constraints) lident LPAREN separated_list(COMMA,parameter) RPAREN • THIN_ARROW return_type boption(eq_underscore), SEMI / RBRACE] +fn yy_state_188(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_THIN_ARROW => Shift(yy_state_189) + _ => Error + } +} + +// [49, trait_method_sig → FN loption(type_params_with_constraints) lident LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW • return_type boption(eq_underscore), SEMI / RBRACE] +// [171, simple_type → • simple_type QUESTION, RAISE / EQUAL / QUESTION / SEMI / RBRACE / NORAISE] +// [172, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, RAISE / EQUAL / QUESTION / SEMI / RBRACE / NORAISE] +// [173, simple_type → • LPAREN type_ RPAREN, RAISE / EQUAL / QUESTION / SEMI / RBRACE / NORAISE] +// [174, simple_type → • qualified_uident_ optional_type_arguments, RAISE / EQUAL / QUESTION / SEMI / RBRACE / NORAISE] +// [175, simple_type → • AMPER qualified_uident_, RAISE / EQUAL / QUESTION / SEMI / RBRACE / NORAISE] +// [176, simple_type → • UNDERSCORE, RAISE / EQUAL / QUESTION / SEMI / RBRACE / NORAISE] +// [177, type_ → • simple_type, EQUAL / SEMI / RBRACE] +// [178, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EQUAL / SEMI / RBRACE] +// [179, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EQUAL / SEMI / RBRACE] +// [180, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EQUAL / SEMI / RBRACE] +// [181, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EQUAL / SEMI / RBRACE] +// [182, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, EQUAL / SEMI / RBRACE] +// [183, type_ → • LPAREN RPAREN THIN_ARROW return_type, EQUAL / SEMI / RBRACE] +// [184, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, EQUAL / SEMI / RBRACE] +// [185, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, EQUAL / SEMI / RBRACE] +// [186, return_type → • type_, EQUAL / SEMI / RBRACE] +// [187, return_type → • simple_type NORAISE, EQUAL / SEMI / RBRACE] +// [188, return_type → • simple_type RAISE, EQUAL / SEMI / RBRACE] +// [189, return_type → • simple_type RAISE error_type, EQUAL / SEMI / RBRACE] +// [190, return_type → • simple_type RAISE QUESTION, EQUAL / SEMI / RBRACE] +// [214, qualified_uident_ → • UIDENT, RAISE / EQUAL / QUESTION / SEMI / LBRACKET / RBRACE / NORAISE] +// [215, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, RAISE / EQUAL / QUESTION / SEMI / LBRACKET / RBRACE / NORAISE] +fn yy_state_189(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_PACKAGE_NAME => Shift(yy_state_47) - T_UIDENT => Shift(yy_state_49) - NT_type_constraint => Shift(yy_state_168) - NT_qualified_uident => Shift(yy_state_171) - NT_separated_nonempty_list_PLUS_type_constraint_ => Shift(yy_state_172) + T_PACKAGE_NAME => Shift(yy_state_62) + T_UIDENT => Shift(yy_state_64) + T_ASYNC => Shift(yy_state_69) + NT_type_ => Shift(yy_state_73) + T_UNDERSCORE => Shift(yy_state_75) + T_AMPER => Shift(yy_state_76) + NT_qualified_uident_ => Shift(yy_state_78) + T_LPAREN => Shift(yy_state_83) + NT_simple_type => Shift(yy_state_87) + NT_return_type => Shift(yy_state_190) _ => Error } } -// [244, separated_nonempty_list(PLUS,type_constraint) → type_constraint •, COMMA / RBRACKET] -// [245, separated_nonempty_list(PLUS,type_constraint) → type_constraint • PLUS separated_nonempty_list(PLUS,type_constraint), COMMA / RBRACKET] -fn yy_state_168(_lookahead : YYSymbol) -> YYDecision { +// [49, trait_method_sig → FN loption(type_params_with_constraints) lident LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type • boption(eq_underscore), SEMI / RBRACE] +// [226, boption(eq_underscore) → •, SEMI / RBRACE] +// [227, boption(eq_underscore) → • EQUAL UNDERSCORE, SEMI / RBRACE] +fn yy_state_190(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_PLUS => Shift(yy_state_169) - T_COMMA | T_RBRACKET => Reduce(1, NT_separated_nonempty_list_PLUS_type_constraint_, yy_action_204) + T_EQUAL => Shift(yy_state_131) + NT_boption_eq_underscore_ => Shift(yy_state_191) + T_SEMI | T_RBRACE => Reduce(0, NT_boption_eq_underscore_, yy_action_222) _ => Error } } -// [163, type_constraint → • qualified_uident, COMMA / PLUS / RBRACKET] -// [208, qualified_uident → • UIDENT, COMMA / PLUS / RBRACKET] -// [209, qualified_uident → • PACKAGE_NAME DOT_UIDENT, COMMA / PLUS / RBRACKET] -// [244, separated_nonempty_list(PLUS,type_constraint) → • type_constraint, COMMA / RBRACKET] -// [245, separated_nonempty_list(PLUS,type_constraint) → • type_constraint PLUS separated_nonempty_list(PLUS,type_constraint), COMMA / RBRACKET] -// [245, separated_nonempty_list(PLUS,type_constraint) → type_constraint PLUS • separated_nonempty_list(PLUS,type_constraint), COMMA / RBRACKET] -fn yy_state_169(_lookahead : YYSymbol) -> YYDecision { +// [49, trait_method_sig → FN loption(type_params_with_constraints) lident LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type boption(eq_underscore) •, SEMI / RBRACE] +fn yy_state_191(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(9, NT_trait_method_sig, yy_action_202) +} + +// [48, trait_method_sig → ASYNC • FN loption(type_params_with_constraints) lident LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type boption(eq_underscore), SEMI / RBRACE] +// [52, trait_method_sig → ASYNC • lident LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type boption(eq_underscore), SEMI / RBRACE] +// [217, lident → • LIDENT, LPAREN] +// [218, lident → • EXTEND, LPAREN] +fn yy_state_192(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_PACKAGE_NAME => Shift(yy_state_47) - T_UIDENT => Shift(yy_state_49) - NT_type_constraint => Shift(yy_state_168) - NT_separated_nonempty_list_PLUS_type_constraint_ => Shift(yy_state_170) - NT_qualified_uident => Shift(yy_state_171) + T_EXTEND => Shift(yy_state_38) + T_LIDENT => Shift(yy_state_39) + NT_lident => Shift(yy_state_193) + T_FN => Shift(yy_state_200) _ => Error } } -// [245, separated_nonempty_list(PLUS,type_constraint) → type_constraint PLUS separated_nonempty_list(PLUS,type_constraint) •, COMMA / RBRACKET] -fn yy_state_170(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_separated_nonempty_list_PLUS_type_constraint_, yy_action_203) +// [52, trait_method_sig → ASYNC lident • LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type boption(eq_underscore), SEMI / RBRACE] +fn yy_state_193(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_LPAREN => Shift(yy_state_194) + _ => Error + } +} + +// [52, trait_method_sig → ASYNC lident LPAREN • separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type boption(eq_underscore), SEMI / RBRACE] +// [171, simple_type → • simple_type QUESTION, RPAREN / COMMA / QUESTION] +// [172, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, RPAREN / COMMA / QUESTION] +// [173, simple_type → • LPAREN type_ RPAREN, RPAREN / COMMA / QUESTION] +// [174, simple_type → • qualified_uident_ optional_type_arguments, RPAREN / COMMA / QUESTION] +// [175, simple_type → • AMPER qualified_uident_, RPAREN / COMMA / QUESTION] +// [176, simple_type → • UNDERSCORE, RPAREN / COMMA / QUESTION] +// [177, type_ → • simple_type, RPAREN / COMMA] +// [178, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [179, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [180, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [181, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [182, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [183, type_ → • LPAREN RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [184, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [185, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [194, parameter → • type_, RPAREN / COMMA] +// [195, parameter → • POST_LABEL COLON type_, RPAREN / COMMA] +// [196, parameter → • label QUESTION COLON type_, RPAREN / COMMA] +// [214, qualified_uident_ → • UIDENT, RPAREN / COMMA / QUESTION / LBRACKET] +// [215, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, RPAREN / COMMA / QUESTION / LBRACKET] +// [217, lident → • LIDENT, QUESTION] +// [218, lident → • EXTEND, QUESTION] +// [219, label → • lident, QUESTION] +// [224, separated_list(COMMA,parameter) → •, RPAREN] +// [225, separated_list(COMMA,parameter) → • separated_nonempty_list(COMMA,parameter), RPAREN] +// [263, separated_nonempty_list(COMMA,parameter) → • parameter, RPAREN] +// [264, separated_nonempty_list(COMMA,parameter) → • parameter COMMA separated_nonempty_list(COMMA,parameter), RPAREN] +fn yy_state_194(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_EXTEND => Shift(yy_state_38) + T_LIDENT => Shift(yy_state_39) + NT_parameter => Shift(yy_state_58) + NT_lident => Shift(yy_state_61) + T_PACKAGE_NAME => Shift(yy_state_62) + T_UIDENT => Shift(yy_state_64) + NT_label => Shift(yy_state_65) + T_ASYNC => Shift(yy_state_69) + T_UNDERSCORE => Shift(yy_state_75) + T_AMPER => Shift(yy_state_76) + NT_qualified_uident_ => Shift(yy_state_78) + T_LPAREN => Shift(yy_state_83) + NT_simple_type => Shift(yy_state_106) + T_POST_LABEL => Shift(yy_state_122) + NT_type_ => Shift(yy_state_125) + NT_separated_nonempty_list_COMMA_parameter_ => Shift(yy_state_126) + NT_separated_list_COMMA_parameter_ => Shift(yy_state_195) + T_RPAREN => Reduce(0, NT_separated_list_COMMA_parameter_, yy_action_260) + _ => Error + } } -// [163, type_constraint → qualified_uident •, COMMA / PLUS / RBRACKET] -fn yy_state_171(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_type_constraint, yy_action_202) +// [52, trait_method_sig → ASYNC lident LPAREN separated_list(COMMA,parameter) • RPAREN THIN_ARROW return_type boption(eq_underscore), SEMI / RBRACE] +fn yy_state_195(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_RPAREN => Shift(yy_state_196) + _ => Error + } } -// [156, type_param_with_constraints → uident COLON separated_nonempty_list(PLUS,type_constraint) •, COMMA / RBRACKET] -fn yy_state_172(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_type_param_with_constraints, yy_action_201) +// [52, trait_method_sig → ASYNC lident LPAREN separated_list(COMMA,parameter) RPAREN • THIN_ARROW return_type boption(eq_underscore), SEMI / RBRACE] +fn yy_state_196(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_THIN_ARROW => Shift(yy_state_197) + _ => Error + } +} + +// [52, trait_method_sig → ASYNC lident LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW • return_type boption(eq_underscore), SEMI / RBRACE] +// [171, simple_type → • simple_type QUESTION, RAISE / EQUAL / QUESTION / SEMI / RBRACE / NORAISE] +// [172, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, RAISE / EQUAL / QUESTION / SEMI / RBRACE / NORAISE] +// [173, simple_type → • LPAREN type_ RPAREN, RAISE / EQUAL / QUESTION / SEMI / RBRACE / NORAISE] +// [174, simple_type → • qualified_uident_ optional_type_arguments, RAISE / EQUAL / QUESTION / SEMI / RBRACE / NORAISE] +// [175, simple_type → • AMPER qualified_uident_, RAISE / EQUAL / QUESTION / SEMI / RBRACE / NORAISE] +// [176, simple_type → • UNDERSCORE, RAISE / EQUAL / QUESTION / SEMI / RBRACE / NORAISE] +// [177, type_ → • simple_type, EQUAL / SEMI / RBRACE] +// [178, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EQUAL / SEMI / RBRACE] +// [179, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EQUAL / SEMI / RBRACE] +// [180, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EQUAL / SEMI / RBRACE] +// [181, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EQUAL / SEMI / RBRACE] +// [182, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, EQUAL / SEMI / RBRACE] +// [183, type_ → • LPAREN RPAREN THIN_ARROW return_type, EQUAL / SEMI / RBRACE] +// [184, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, EQUAL / SEMI / RBRACE] +// [185, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, EQUAL / SEMI / RBRACE] +// [186, return_type → • type_, EQUAL / SEMI / RBRACE] +// [187, return_type → • simple_type NORAISE, EQUAL / SEMI / RBRACE] +// [188, return_type → • simple_type RAISE, EQUAL / SEMI / RBRACE] +// [189, return_type → • simple_type RAISE error_type, EQUAL / SEMI / RBRACE] +// [190, return_type → • simple_type RAISE QUESTION, EQUAL / SEMI / RBRACE] +// [214, qualified_uident_ → • UIDENT, RAISE / EQUAL / QUESTION / SEMI / LBRACKET / RBRACE / NORAISE] +// [215, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, RAISE / EQUAL / QUESTION / SEMI / LBRACKET / RBRACE / NORAISE] +fn yy_state_197(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_PACKAGE_NAME => Shift(yy_state_62) + T_UIDENT => Shift(yy_state_64) + T_ASYNC => Shift(yy_state_69) + NT_type_ => Shift(yy_state_73) + T_UNDERSCORE => Shift(yy_state_75) + T_AMPER => Shift(yy_state_76) + NT_qualified_uident_ => Shift(yy_state_78) + T_LPAREN => Shift(yy_state_83) + NT_simple_type => Shift(yy_state_87) + NT_return_type => Shift(yy_state_198) + _ => Error + } } -// [247, separated_list(COMMA,type_param_with_constraints) → separated_nonempty_list(COMMA,type_param_with_constraints) •, RBRACKET] -fn yy_state_173(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_separated_list_COMMA_type_param_with_constraints_, yy_action_200) +// [52, trait_method_sig → ASYNC lident LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type • boption(eq_underscore), SEMI / RBRACE] +// [226, boption(eq_underscore) → •, SEMI / RBRACE] +// [227, boption(eq_underscore) → • EQUAL UNDERSCORE, SEMI / RBRACE] +fn yy_state_198(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_EQUAL => Shift(yy_state_131) + NT_boption_eq_underscore_ => Shift(yy_state_199) + T_SEMI | T_RBRACE => Reduce(0, NT_boption_eq_underscore_, yy_action_222) + _ => Error + } } -// [157, type_params_with_constraints → LBRACKET separated_list(COMMA,type_param_with_constraints) • RBRACKET, LIDENT / UIDENT / AMPER / PACKAGE_NAME] -fn yy_state_174(_lookahead : YYSymbol) -> YYDecision { +// [52, trait_method_sig → ASYNC lident LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type boption(eq_underscore) •, SEMI / RBRACE] +fn yy_state_199(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(8, NT_trait_method_sig, yy_action_201) +} + +// [48, trait_method_sig → ASYNC FN • loption(type_params_with_constraints) lident LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type boption(eq_underscore), SEMI / RBRACE] +// [161, type_params_with_constraints → • LBRACKET separated_list(COMMA,type_param_with_constraints) RBRACKET, LIDENT / EXTEND] +// [222, loption(type_params_with_constraints) → •, LIDENT / EXTEND] +// [223, loption(type_params_with_constraints) → • type_params_with_constraints, LIDENT / EXTEND] +fn yy_state_200(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RBRACKET => Shift(yy_state_175) + NT_type_params_with_constraints => Shift(yy_state_143) + T_LBRACKET => Shift(yy_state_144) + NT_loption_type_params_with_constraints_ => Shift(yy_state_201) + T_LIDENT | T_EXTEND => Reduce(0, NT_loption_type_params_with_constraints_, yy_action_217) _ => Error } } -// [157, type_params_with_constraints → LBRACKET separated_list(COMMA,type_param_with_constraints) RBRACKET •, LIDENT / UIDENT / AMPER / PACKAGE_NAME] -fn yy_state_175(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_type_params_with_constraints, yy_action_199) +// [48, trait_method_sig → ASYNC FN loption(type_params_with_constraints) • lident LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type boption(eq_underscore), SEMI / RBRACE] +// [217, lident → • LIDENT, LPAREN] +// [218, lident → • EXTEND, LPAREN] +fn yy_state_201(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_EXTEND => Shift(yy_state_38) + T_LIDENT => Shift(yy_state_39) + NT_lident => Shift(yy_state_202) + _ => Error + } } -// [108, impl_sig → IMPL qualified_uident • FOR type_, EOF / SEMI] -fn yy_state_176(_lookahead : YYSymbol) -> YYDecision { +// [48, trait_method_sig → ASYNC FN loption(type_params_with_constraints) lident • LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type boption(eq_underscore), SEMI / RBRACE] +fn yy_state_202(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_FOR => Shift(yy_state_177) - _ => Error - } -} - -// [108, impl_sig → IMPL qualified_uident FOR • type_, EOF / SEMI] -// [167, simple_type → • simple_type QUESTION, EOF / QUESTION / SEMI] -// [168, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, EOF / QUESTION / SEMI] -// [169, simple_type → • LPAREN type_ RPAREN, EOF / QUESTION / SEMI] -// [170, simple_type → • qualified_uident_ optional_type_arguments, EOF / QUESTION / SEMI] -// [171, simple_type → • AMPER qualified_uident_, EOF / QUESTION / SEMI] -// [172, simple_type → • UNDERSCORE, EOF / QUESTION / SEMI] -// [173, type_ → • simple_type, EOF / SEMI] -// [174, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] -// [175, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] -// [176, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] -// [177, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] -// [178, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] -// [179, type_ → • LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] -// [180, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] -// [181, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] -// [210, qualified_uident_ → • UIDENT, EOF / QUESTION / SEMI / LBRACKET] -// [211, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, EOF / QUESTION / SEMI / LBRACKET] -fn yy_state_177(_lookahead : YYSymbol) -> YYDecision { + T_LPAREN => Shift(yy_state_203) + _ => Error + } +} + +// [48, trait_method_sig → ASYNC FN loption(type_params_with_constraints) lident LPAREN • separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type boption(eq_underscore), SEMI / RBRACE] +// [171, simple_type → • simple_type QUESTION, RPAREN / COMMA / QUESTION] +// [172, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, RPAREN / COMMA / QUESTION] +// [173, simple_type → • LPAREN type_ RPAREN, RPAREN / COMMA / QUESTION] +// [174, simple_type → • qualified_uident_ optional_type_arguments, RPAREN / COMMA / QUESTION] +// [175, simple_type → • AMPER qualified_uident_, RPAREN / COMMA / QUESTION] +// [176, simple_type → • UNDERSCORE, RPAREN / COMMA / QUESTION] +// [177, type_ → • simple_type, RPAREN / COMMA] +// [178, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [179, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [180, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [181, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [182, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [183, type_ → • LPAREN RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [184, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [185, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [194, parameter → • type_, RPAREN / COMMA] +// [195, parameter → • POST_LABEL COLON type_, RPAREN / COMMA] +// [196, parameter → • label QUESTION COLON type_, RPAREN / COMMA] +// [214, qualified_uident_ → • UIDENT, RPAREN / COMMA / QUESTION / LBRACKET] +// [215, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, RPAREN / COMMA / QUESTION / LBRACKET] +// [217, lident → • LIDENT, QUESTION] +// [218, lident → • EXTEND, QUESTION] +// [219, label → • lident, QUESTION] +// [224, separated_list(COMMA,parameter) → •, RPAREN] +// [225, separated_list(COMMA,parameter) → • separated_nonempty_list(COMMA,parameter), RPAREN] +// [263, separated_nonempty_list(COMMA,parameter) → • parameter, RPAREN] +// [264, separated_nonempty_list(COMMA,parameter) → • parameter COMMA separated_nonempty_list(COMMA,parameter), RPAREN] +fn yy_state_203(_lookahead : YYSymbol) -> YYDecision { match _lookahead { + T_EXTEND => Shift(yy_state_38) + T_LIDENT => Shift(yy_state_39) + NT_parameter => Shift(yy_state_58) + NT_lident => Shift(yy_state_61) T_PACKAGE_NAME => Shift(yy_state_62) T_UIDENT => Shift(yy_state_64) + NT_label => Shift(yy_state_65) T_ASYNC => Shift(yy_state_69) T_UNDERSCORE => Shift(yy_state_75) T_AMPER => Shift(yy_state_76) NT_qualified_uident_ => Shift(yy_state_78) T_LPAREN => Shift(yy_state_83) NT_simple_type => Shift(yy_state_106) - NT_type_ => Shift(yy_state_178) + T_POST_LABEL => Shift(yy_state_122) + NT_type_ => Shift(yy_state_125) + NT_separated_nonempty_list_COMMA_parameter_ => Shift(yy_state_126) + NT_separated_list_COMMA_parameter_ => Shift(yy_state_204) + T_RPAREN => Reduce(0, NT_separated_list_COMMA_parameter_, yy_action_260) _ => Error } } -// [108, impl_sig → IMPL qualified_uident FOR type_ •, EOF / SEMI] -fn yy_state_178(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(4, NT_impl_sig, yy_action_198) +// [48, trait_method_sig → ASYNC FN loption(type_params_with_constraints) lident LPAREN separated_list(COMMA,parameter) • RPAREN THIN_ARROW return_type boption(eq_underscore), SEMI / RBRACE] +fn yy_state_204(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_RPAREN => Shift(yy_state_205) + _ => Error + } } -// [102, impl_sig → IMPL type_params_with_constraints • qualified_uident FOR type_, EOF / SEMI] -// [208, qualified_uident → • UIDENT, FOR] -// [209, qualified_uident → • PACKAGE_NAME DOT_UIDENT, FOR] -fn yy_state_179(_lookahead : YYSymbol) -> YYDecision { +// [48, trait_method_sig → ASYNC FN loption(type_params_with_constraints) lident LPAREN separated_list(COMMA,parameter) RPAREN • THIN_ARROW return_type boption(eq_underscore), SEMI / RBRACE] +fn yy_state_205(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_THIN_ARROW => Shift(yy_state_206) + _ => Error + } +} + +// [48, trait_method_sig → ASYNC FN loption(type_params_with_constraints) lident LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW • return_type boption(eq_underscore), SEMI / RBRACE] +// [171, simple_type → • simple_type QUESTION, RAISE / EQUAL / QUESTION / SEMI / RBRACE / NORAISE] +// [172, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, RAISE / EQUAL / QUESTION / SEMI / RBRACE / NORAISE] +// [173, simple_type → • LPAREN type_ RPAREN, RAISE / EQUAL / QUESTION / SEMI / RBRACE / NORAISE] +// [174, simple_type → • qualified_uident_ optional_type_arguments, RAISE / EQUAL / QUESTION / SEMI / RBRACE / NORAISE] +// [175, simple_type → • AMPER qualified_uident_, RAISE / EQUAL / QUESTION / SEMI / RBRACE / NORAISE] +// [176, simple_type → • UNDERSCORE, RAISE / EQUAL / QUESTION / SEMI / RBRACE / NORAISE] +// [177, type_ → • simple_type, EQUAL / SEMI / RBRACE] +// [178, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EQUAL / SEMI / RBRACE] +// [179, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EQUAL / SEMI / RBRACE] +// [180, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EQUAL / SEMI / RBRACE] +// [181, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EQUAL / SEMI / RBRACE] +// [182, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, EQUAL / SEMI / RBRACE] +// [183, type_ → • LPAREN RPAREN THIN_ARROW return_type, EQUAL / SEMI / RBRACE] +// [184, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, EQUAL / SEMI / RBRACE] +// [185, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, EQUAL / SEMI / RBRACE] +// [186, return_type → • type_, EQUAL / SEMI / RBRACE] +// [187, return_type → • simple_type NORAISE, EQUAL / SEMI / RBRACE] +// [188, return_type → • simple_type RAISE, EQUAL / SEMI / RBRACE] +// [189, return_type → • simple_type RAISE error_type, EQUAL / SEMI / RBRACE] +// [190, return_type → • simple_type RAISE QUESTION, EQUAL / SEMI / RBRACE] +// [214, qualified_uident_ → • UIDENT, RAISE / EQUAL / QUESTION / SEMI / LBRACKET / RBRACE / NORAISE] +// [215, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, RAISE / EQUAL / QUESTION / SEMI / LBRACKET / RBRACE / NORAISE] +fn yy_state_206(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_PACKAGE_NAME => Shift(yy_state_47) - T_UIDENT => Shift(yy_state_49) - NT_qualified_uident => Shift(yy_state_180) + T_PACKAGE_NAME => Shift(yy_state_62) + T_UIDENT => Shift(yy_state_64) + T_ASYNC => Shift(yy_state_69) + NT_type_ => Shift(yy_state_73) + T_UNDERSCORE => Shift(yy_state_75) + T_AMPER => Shift(yy_state_76) + NT_qualified_uident_ => Shift(yy_state_78) + T_LPAREN => Shift(yy_state_83) + NT_simple_type => Shift(yy_state_87) + NT_return_type => Shift(yy_state_207) _ => Error } } -// [102, impl_sig → IMPL type_params_with_constraints qualified_uident • FOR type_, EOF / SEMI] -fn yy_state_180(_lookahead : YYSymbol) -> YYDecision { +// [48, trait_method_sig → ASYNC FN loption(type_params_with_constraints) lident LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type • boption(eq_underscore), SEMI / RBRACE] +// [226, boption(eq_underscore) → •, SEMI / RBRACE] +// [227, boption(eq_underscore) → • EQUAL UNDERSCORE, SEMI / RBRACE] +fn yy_state_207(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_FOR => Shift(yy_state_181) - _ => Error - } -} - -// [102, impl_sig → IMPL type_params_with_constraints qualified_uident FOR • type_, EOF / SEMI] -// [167, simple_type → • simple_type QUESTION, EOF / QUESTION / SEMI] -// [168, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, EOF / QUESTION / SEMI] -// [169, simple_type → • LPAREN type_ RPAREN, EOF / QUESTION / SEMI] -// [170, simple_type → • qualified_uident_ optional_type_arguments, EOF / QUESTION / SEMI] -// [171, simple_type → • AMPER qualified_uident_, EOF / QUESTION / SEMI] -// [172, simple_type → • UNDERSCORE, EOF / QUESTION / SEMI] -// [173, type_ → • simple_type, EOF / SEMI] -// [174, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] -// [175, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] -// [176, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] -// [177, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] -// [178, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] -// [179, type_ → • LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] -// [180, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] -// [181, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] -// [210, qualified_uident_ → • UIDENT, EOF / QUESTION / SEMI / LBRACKET] -// [211, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, EOF / QUESTION / SEMI / LBRACKET] -fn yy_state_181(_lookahead : YYSymbol) -> YYDecision { + T_EQUAL => Shift(yy_state_131) + NT_boption_eq_underscore_ => Shift(yy_state_208) + T_SEMI | T_RBRACE => Reduce(0, NT_boption_eq_underscore_, yy_action_222) + _ => Error + } +} + +// [48, trait_method_sig → ASYNC FN loption(type_params_with_constraints) lident LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type boption(eq_underscore) •, SEMI / RBRACE] +fn yy_state_208(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(10, NT_trait_method_sig, yy_action_200) +} + +// [238, separated_list(SEMI,trait_method_sig) → separated_nonempty_list(SEMI,trait_method_sig) •, RBRACE] +fn yy_state_209(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_separated_list_SEMI_trait_method_sig_, yy_action_199) +} + +// [125, trait_body → LBRACE separated_list(SEMI,trait_method_sig) • RBRACE, EOF / SEMI] +fn yy_state_210(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_RBRACE => Shift(yy_state_211) + _ => Error + } +} + +// [125, trait_body → LBRACE separated_list(SEMI,trait_method_sig) RBRACE •, EOF / SEMI] +fn yy_state_211(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_trait_body, yy_action_198) +} + +// [118, trait_sig → TRAIT uident loption(preceded(COLON,separated_nonempty_list(PLUS,qualified_uident))) trait_body •, EOF / SEMI] +fn yy_state_212(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(4, NT_trait_sig, yy_action_197) +} + +// [106, impl_sig → IMPL • type_params_with_constraints qualified_uident FOR type_, EOF / SEMI] +// [112, impl_sig → IMPL • qualified_uident FOR type_, EOF / SEMI] +// [161, type_params_with_constraints → • LBRACKET separated_list(COMMA,type_param_with_constraints) RBRACKET, UIDENT / PACKAGE_NAME] +// [212, qualified_uident → • UIDENT, FOR] +// [213, qualified_uident → • PACKAGE_NAME DOT_UIDENT, FOR] +fn yy_state_213(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_PACKAGE_NAME => Shift(yy_state_48) + T_UIDENT => Shift(yy_state_50) + T_LBRACKET => Shift(yy_state_144) + NT_qualified_uident => Shift(yy_state_214) + NT_type_params_with_constraints => Shift(yy_state_217) + _ => Error + } +} + +// [112, impl_sig → IMPL qualified_uident • FOR type_, EOF / SEMI] +fn yy_state_214(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_FOR => Shift(yy_state_215) + _ => Error + } +} + +// [112, impl_sig → IMPL qualified_uident FOR • type_, EOF / SEMI] +// [171, simple_type → • simple_type QUESTION, EOF / QUESTION / SEMI] +// [172, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, EOF / QUESTION / SEMI] +// [173, simple_type → • LPAREN type_ RPAREN, EOF / QUESTION / SEMI] +// [174, simple_type → • qualified_uident_ optional_type_arguments, EOF / QUESTION / SEMI] +// [175, simple_type → • AMPER qualified_uident_, EOF / QUESTION / SEMI] +// [176, simple_type → • UNDERSCORE, EOF / QUESTION / SEMI] +// [177, type_ → • simple_type, EOF / SEMI] +// [178, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] +// [179, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] +// [180, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] +// [181, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] +// [182, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] +// [183, type_ → • LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] +// [184, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] +// [185, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] +// [214, qualified_uident_ → • UIDENT, EOF / QUESTION / SEMI / LBRACKET] +// [215, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, EOF / QUESTION / SEMI / LBRACKET] +fn yy_state_215(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_PACKAGE_NAME => Shift(yy_state_62) T_UIDENT => Shift(yy_state_64) @@ -6522,352 +7249,410 @@ fn yy_state_181(_lookahead : YYSymbol) -> YYDecision { NT_qualified_uident_ => Shift(yy_state_78) T_LPAREN => Shift(yy_state_83) NT_simple_type => Shift(yy_state_106) - NT_type_ => Shift(yy_state_182) + NT_type_ => Shift(yy_state_216) _ => Error } } -// [102, impl_sig → IMPL type_params_with_constraints qualified_uident FOR type_ •, EOF / SEMI] -fn yy_state_182(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(5, NT_impl_sig, yy_action_197) +// [112, impl_sig → IMPL qualified_uident FOR type_ •, EOF / SEMI] +fn yy_state_216(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(4, NT_impl_sig, yy_action_196) } -// [88, type_sig → EXTENUM • type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [94, type_sig → EXTENUM • extensible_enum_extension_target PLUS_EQUAL LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [164, type_decl_name_with_params → • uident optional_type_params_no_constraints, LBRACE] -// [165, extensible_enum_extension_target → • uident optional_type_params_no_constraints, PLUS_EQUAL] -// [166, extensible_enum_extension_target → • PACKAGE_NAME DOT_UIDENT optional_type_params_no_constraints, PLUS_EQUAL] -// [212, uident → • UIDENT, PLUS_EQUAL / LBRACKET / LBRACE] -fn yy_state_183(_lookahead : YYSymbol) -> YYDecision { +// [106, impl_sig → IMPL type_params_with_constraints • qualified_uident FOR type_, EOF / SEMI] +// [212, qualified_uident → • UIDENT, FOR] +// [213, qualified_uident → • PACKAGE_NAME DOT_UIDENT, FOR] +fn yy_state_217(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_PACKAGE_NAME => Shift(yy_state_48) + T_UIDENT => Shift(yy_state_50) + NT_qualified_uident => Shift(yy_state_218) + _ => Error + } +} + +// [106, impl_sig → IMPL type_params_with_constraints qualified_uident • FOR type_, EOF / SEMI] +fn yy_state_218(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_FOR => Shift(yy_state_219) + _ => Error + } +} + +// [106, impl_sig → IMPL type_params_with_constraints qualified_uident FOR • type_, EOF / SEMI] +// [171, simple_type → • simple_type QUESTION, EOF / QUESTION / SEMI] +// [172, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, EOF / QUESTION / SEMI] +// [173, simple_type → • LPAREN type_ RPAREN, EOF / QUESTION / SEMI] +// [174, simple_type → • qualified_uident_ optional_type_arguments, EOF / QUESTION / SEMI] +// [175, simple_type → • AMPER qualified_uident_, EOF / QUESTION / SEMI] +// [176, simple_type → • UNDERSCORE, EOF / QUESTION / SEMI] +// [177, type_ → • simple_type, EOF / SEMI] +// [178, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] +// [179, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] +// [180, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] +// [181, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] +// [182, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] +// [183, type_ → • LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] +// [184, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] +// [185, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] +// [214, qualified_uident_ → • UIDENT, EOF / QUESTION / SEMI / LBRACKET] +// [215, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, EOF / QUESTION / SEMI / LBRACKET] +fn yy_state_219(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_PACKAGE_NAME => Shift(yy_state_62) + T_UIDENT => Shift(yy_state_64) + T_ASYNC => Shift(yy_state_69) + T_UNDERSCORE => Shift(yy_state_75) + T_AMPER => Shift(yy_state_76) + NT_qualified_uident_ => Shift(yy_state_78) + T_LPAREN => Shift(yy_state_83) + NT_simple_type => Shift(yy_state_106) + NT_type_ => Shift(yy_state_220) + _ => Error + } +} + +// [106, impl_sig → IMPL type_params_with_constraints qualified_uident FOR type_ •, EOF / SEMI] +fn yy_state_220(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(5, NT_impl_sig, yy_action_195) +} + +// [92, type_sig → EXTENUM • type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [98, type_sig → EXTENUM • extensible_enum_extension_target PLUS_EQUAL LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [168, type_decl_name_with_params → • uident optional_type_params_no_constraints, LBRACE] +// [169, extensible_enum_extension_target → • uident optional_type_params_no_constraints, PLUS_EQUAL] +// [170, extensible_enum_extension_target → • PACKAGE_NAME DOT_UIDENT optional_type_params_no_constraints, PLUS_EQUAL] +// [216, uident → • UIDENT, PLUS_EQUAL / LBRACKET / LBRACE] +fn yy_state_221(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_UIDENT => Shift(yy_state_25) - T_PACKAGE_NAME => Shift(yy_state_184) - NT_uident => Shift(yy_state_197) - NT_extensible_enum_extension_target => Shift(yy_state_199) - NT_type_decl_name_with_params => Shift(yy_state_240) + T_PACKAGE_NAME => Shift(yy_state_222) + NT_uident => Shift(yy_state_235) + NT_extensible_enum_extension_target => Shift(yy_state_237) + NT_type_decl_name_with_params => Shift(yy_state_278) _ => Error } } -// [166, extensible_enum_extension_target → PACKAGE_NAME • DOT_UIDENT optional_type_params_no_constraints, PLUS_EQUAL] -fn yy_state_184(_lookahead : YYSymbol) -> YYDecision { +// [170, extensible_enum_extension_target → PACKAGE_NAME • DOT_UIDENT optional_type_params_no_constraints, PLUS_EQUAL] +fn yy_state_222(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_DOT_UIDENT => Shift(yy_state_185) + T_DOT_UIDENT => Shift(yy_state_223) _ => Error } } -// [160, type_params_no_constraints → • LBRACKET separated_list(COMMA,type_param_no_constraints) RBRACKET, PLUS_EQUAL] -// [161, optional_type_params_no_constraints → •, PLUS_EQUAL] -// [162, optional_type_params_no_constraints → • type_params_no_constraints, PLUS_EQUAL] -// [166, extensible_enum_extension_target → PACKAGE_NAME DOT_UIDENT • optional_type_params_no_constraints, PLUS_EQUAL] -fn yy_state_185(_lookahead : YYSymbol) -> YYDecision { +// [164, type_params_no_constraints → • LBRACKET separated_list(COMMA,type_param_no_constraints) RBRACKET, PLUS_EQUAL] +// [165, optional_type_params_no_constraints → •, PLUS_EQUAL] +// [166, optional_type_params_no_constraints → • type_params_no_constraints, PLUS_EQUAL] +// [170, extensible_enum_extension_target → PACKAGE_NAME DOT_UIDENT • optional_type_params_no_constraints, PLUS_EQUAL] +fn yy_state_223(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_optional_type_params_no_constraints => Shift(yy_state_186) - NT_type_params_no_constraints => Shift(yy_state_187) - T_LBRACKET => Shift(yy_state_188) - T_PLUS_EQUAL => Reduce(0, NT_optional_type_params_no_constraints, yy_action_196) + NT_optional_type_params_no_constraints => Shift(yy_state_224) + NT_type_params_no_constraints => Shift(yy_state_225) + T_LBRACKET => Shift(yy_state_226) + T_PLUS_EQUAL => Reduce(0, NT_optional_type_params_no_constraints, yy_action_194) _ => Error } } -// [166, extensible_enum_extension_target → PACKAGE_NAME DOT_UIDENT optional_type_params_no_constraints •, PLUS_EQUAL] -fn yy_state_186(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_extensible_enum_extension_target, yy_action_195) +// [170, extensible_enum_extension_target → PACKAGE_NAME DOT_UIDENT optional_type_params_no_constraints •, PLUS_EQUAL] +fn yy_state_224(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_extensible_enum_extension_target, yy_action_193) } -// [162, optional_type_params_no_constraints → type_params_no_constraints •, PLUS_EQUAL / EOF / DERIVE / EQUAL / LPAREN / SEMI / LBRACE] -fn yy_state_187(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_optional_type_params_no_constraints, yy_action_194) +// [166, optional_type_params_no_constraints → type_params_no_constraints •, PLUS_EQUAL / EOF / DERIVE / EQUAL / LPAREN / SEMI / LBRACE] +fn yy_state_225(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_optional_type_params_no_constraints, yy_action_192) } -// [158, type_param_no_constraints → • uident, COMMA / RBRACKET] -// [159, type_param_no_constraints → • UNDERSCORE, COMMA / RBRACKET] -// [160, type_params_no_constraints → LBRACKET • separated_list(COMMA,type_param_no_constraints) RBRACKET, PLUS_EQUAL / EOF / DERIVE / EQUAL / LPAREN / SEMI / LBRACE] -// [212, uident → • UIDENT, COMMA / RBRACKET] -// [248, separated_list(COMMA,type_param_no_constraints) → •, RBRACKET] -// [249, separated_list(COMMA,type_param_no_constraints) → • separated_nonempty_list(COMMA,type_param_no_constraints), RBRACKET] -// [270, separated_nonempty_list(COMMA,type_param_no_constraints) → • type_param_no_constraints, RBRACKET] -// [271, separated_nonempty_list(COMMA,type_param_no_constraints) → • type_param_no_constraints COMMA separated_nonempty_list(COMMA,type_param_no_constraints), RBRACKET] -fn yy_state_188(_lookahead : YYSymbol) -> YYDecision { +// [162, type_param_no_constraints → • uident, COMMA / RBRACKET] +// [163, type_param_no_constraints → • UNDERSCORE, COMMA / RBRACKET] +// [164, type_params_no_constraints → LBRACKET • separated_list(COMMA,type_param_no_constraints) RBRACKET, PLUS_EQUAL / EOF / DERIVE / EQUAL / LPAREN / SEMI / LBRACE] +// [216, uident → • UIDENT, COMMA / RBRACKET] +// [253, separated_list(COMMA,type_param_no_constraints) → •, RBRACKET] +// [254, separated_list(COMMA,type_param_no_constraints) → • separated_nonempty_list(COMMA,type_param_no_constraints), RBRACKET] +// [275, separated_nonempty_list(COMMA,type_param_no_constraints) → • type_param_no_constraints, RBRACKET] +// [276, separated_nonempty_list(COMMA,type_param_no_constraints) → • type_param_no_constraints COMMA separated_nonempty_list(COMMA,type_param_no_constraints), RBRACKET] +fn yy_state_226(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_UIDENT => Shift(yy_state_25) - NT_type_param_no_constraints => Shift(yy_state_189) - T_UNDERSCORE => Shift(yy_state_192) - NT_uident => Shift(yy_state_193) - NT_separated_nonempty_list_COMMA_type_param_no_constraints_ => Shift(yy_state_194) - NT_separated_list_COMMA_type_param_no_constraints_ => Shift(yy_state_195) - T_RBRACKET => Reduce(0, NT_separated_list_COMMA_type_param_no_constraints_, yy_action_193) + NT_type_param_no_constraints => Shift(yy_state_227) + T_UNDERSCORE => Shift(yy_state_230) + NT_uident => Shift(yy_state_231) + NT_separated_nonempty_list_COMMA_type_param_no_constraints_ => Shift(yy_state_232) + NT_separated_list_COMMA_type_param_no_constraints_ => Shift(yy_state_233) + T_RBRACKET => Reduce(0, NT_separated_list_COMMA_type_param_no_constraints_, yy_action_191) _ => Error } } -// [270, separated_nonempty_list(COMMA,type_param_no_constraints) → type_param_no_constraints •, RBRACKET] -// [271, separated_nonempty_list(COMMA,type_param_no_constraints) → type_param_no_constraints • COMMA separated_nonempty_list(COMMA,type_param_no_constraints), RBRACKET] -fn yy_state_189(_lookahead : YYSymbol) -> YYDecision { +// [275, separated_nonempty_list(COMMA,type_param_no_constraints) → type_param_no_constraints •, RBRACKET] +// [276, separated_nonempty_list(COMMA,type_param_no_constraints) → type_param_no_constraints • COMMA separated_nonempty_list(COMMA,type_param_no_constraints), RBRACKET] +fn yy_state_227(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_COMMA => Shift(yy_state_190) - T_RBRACKET => Reduce(1, NT_separated_nonempty_list_COMMA_type_param_no_constraints_, yy_action_192) + T_COMMA => Shift(yy_state_228) + T_RBRACKET => Reduce(1, NT_separated_nonempty_list_COMMA_type_param_no_constraints_, yy_action_190) _ => Error } } -// [158, type_param_no_constraints → • uident, COMMA / RBRACKET] -// [159, type_param_no_constraints → • UNDERSCORE, COMMA / RBRACKET] -// [212, uident → • UIDENT, COMMA / RBRACKET] -// [270, separated_nonempty_list(COMMA,type_param_no_constraints) → • type_param_no_constraints, RBRACKET] -// [271, separated_nonempty_list(COMMA,type_param_no_constraints) → • type_param_no_constraints COMMA separated_nonempty_list(COMMA,type_param_no_constraints), RBRACKET] -// [271, separated_nonempty_list(COMMA,type_param_no_constraints) → type_param_no_constraints COMMA • separated_nonempty_list(COMMA,type_param_no_constraints), RBRACKET] -fn yy_state_190(_lookahead : YYSymbol) -> YYDecision { +// [162, type_param_no_constraints → • uident, COMMA / RBRACKET] +// [163, type_param_no_constraints → • UNDERSCORE, COMMA / RBRACKET] +// [216, uident → • UIDENT, COMMA / RBRACKET] +// [275, separated_nonempty_list(COMMA,type_param_no_constraints) → • type_param_no_constraints, RBRACKET] +// [276, separated_nonempty_list(COMMA,type_param_no_constraints) → • type_param_no_constraints COMMA separated_nonempty_list(COMMA,type_param_no_constraints), RBRACKET] +// [276, separated_nonempty_list(COMMA,type_param_no_constraints) → type_param_no_constraints COMMA • separated_nonempty_list(COMMA,type_param_no_constraints), RBRACKET] +fn yy_state_228(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_UIDENT => Shift(yy_state_25) - NT_type_param_no_constraints => Shift(yy_state_189) - NT_separated_nonempty_list_COMMA_type_param_no_constraints_ => Shift(yy_state_191) - T_UNDERSCORE => Shift(yy_state_192) - NT_uident => Shift(yy_state_193) + NT_type_param_no_constraints => Shift(yy_state_227) + NT_separated_nonempty_list_COMMA_type_param_no_constraints_ => Shift(yy_state_229) + T_UNDERSCORE => Shift(yy_state_230) + NT_uident => Shift(yy_state_231) _ => Error } } -// [271, separated_nonempty_list(COMMA,type_param_no_constraints) → type_param_no_constraints COMMA separated_nonempty_list(COMMA,type_param_no_constraints) •, RBRACKET] -fn yy_state_191(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_separated_nonempty_list_COMMA_type_param_no_constraints_, yy_action_191) +// [276, separated_nonempty_list(COMMA,type_param_no_constraints) → type_param_no_constraints COMMA separated_nonempty_list(COMMA,type_param_no_constraints) •, RBRACKET] +fn yy_state_229(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_separated_nonempty_list_COMMA_type_param_no_constraints_, yy_action_189) } -// [159, type_param_no_constraints → UNDERSCORE •, COMMA / RBRACKET] -fn yy_state_192(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_type_param_no_constraints, yy_action_190) +// [163, type_param_no_constraints → UNDERSCORE •, COMMA / RBRACKET] +fn yy_state_230(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_type_param_no_constraints, yy_action_188) } -// [158, type_param_no_constraints → uident •, COMMA / RBRACKET] -fn yy_state_193(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_type_param_no_constraints, yy_action_189) +// [162, type_param_no_constraints → uident •, COMMA / RBRACKET] +fn yy_state_231(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_type_param_no_constraints, yy_action_187) } -// [249, separated_list(COMMA,type_param_no_constraints) → separated_nonempty_list(COMMA,type_param_no_constraints) •, RBRACKET] -fn yy_state_194(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_separated_list_COMMA_type_param_no_constraints_, yy_action_188) +// [254, separated_list(COMMA,type_param_no_constraints) → separated_nonempty_list(COMMA,type_param_no_constraints) •, RBRACKET] +fn yy_state_232(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_separated_list_COMMA_type_param_no_constraints_, yy_action_186) } -// [160, type_params_no_constraints → LBRACKET separated_list(COMMA,type_param_no_constraints) • RBRACKET, PLUS_EQUAL / EOF / DERIVE / EQUAL / LPAREN / SEMI / LBRACE] -fn yy_state_195(_lookahead : YYSymbol) -> YYDecision { +// [164, type_params_no_constraints → LBRACKET separated_list(COMMA,type_param_no_constraints) • RBRACKET, PLUS_EQUAL / EOF / DERIVE / EQUAL / LPAREN / SEMI / LBRACE] +fn yy_state_233(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RBRACKET => Shift(yy_state_196) + T_RBRACKET => Shift(yy_state_234) _ => Error } } -// [160, type_params_no_constraints → LBRACKET separated_list(COMMA,type_param_no_constraints) RBRACKET •, PLUS_EQUAL / EOF / DERIVE / EQUAL / LPAREN / SEMI / LBRACE] -fn yy_state_196(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_type_params_no_constraints, yy_action_187) +// [164, type_params_no_constraints → LBRACKET separated_list(COMMA,type_param_no_constraints) RBRACKET •, PLUS_EQUAL / EOF / DERIVE / EQUAL / LPAREN / SEMI / LBRACE] +fn yy_state_234(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_type_params_no_constraints, yy_action_185) } -// [160, type_params_no_constraints → • LBRACKET separated_list(COMMA,type_param_no_constraints) RBRACKET, PLUS_EQUAL / LBRACE] -// [161, optional_type_params_no_constraints → •, PLUS_EQUAL / LBRACE] -// [162, optional_type_params_no_constraints → • type_params_no_constraints, PLUS_EQUAL / LBRACE] -// [164, type_decl_name_with_params → uident • optional_type_params_no_constraints, LBRACE] -// [165, extensible_enum_extension_target → uident • optional_type_params_no_constraints, PLUS_EQUAL] -fn yy_state_197(_lookahead : YYSymbol) -> YYDecision { +// [164, type_params_no_constraints → • LBRACKET separated_list(COMMA,type_param_no_constraints) RBRACKET, PLUS_EQUAL / LBRACE] +// [165, optional_type_params_no_constraints → •, PLUS_EQUAL / LBRACE] +// [166, optional_type_params_no_constraints → • type_params_no_constraints, PLUS_EQUAL / LBRACE] +// [168, type_decl_name_with_params → uident • optional_type_params_no_constraints, LBRACE] +// [169, extensible_enum_extension_target → uident • optional_type_params_no_constraints, PLUS_EQUAL] +fn yy_state_235(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_type_params_no_constraints => Shift(yy_state_187) - T_LBRACKET => Shift(yy_state_188) - NT_optional_type_params_no_constraints => Shift(yy_state_198) - T_PLUS_EQUAL | T_LBRACE => Reduce(0, NT_optional_type_params_no_constraints, yy_action_196) + NT_type_params_no_constraints => Shift(yy_state_225) + T_LBRACKET => Shift(yy_state_226) + NT_optional_type_params_no_constraints => Shift(yy_state_236) + T_PLUS_EQUAL | T_LBRACE => Reduce(0, NT_optional_type_params_no_constraints, yy_action_194) _ => Error } } -// [164, type_decl_name_with_params → uident optional_type_params_no_constraints •, LBRACE] -// [165, extensible_enum_extension_target → uident optional_type_params_no_constraints •, PLUS_EQUAL] -fn yy_state_198(_lookahead : YYSymbol) -> YYDecision { +// [168, type_decl_name_with_params → uident optional_type_params_no_constraints •, LBRACE] +// [169, extensible_enum_extension_target → uident optional_type_params_no_constraints •, PLUS_EQUAL] +fn yy_state_236(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACE => Reduce(2, NT_type_decl_name_with_params, yy_action_185) - T_PLUS_EQUAL => Reduce(2, NT_extensible_enum_extension_target, yy_action_186) + T_LBRACE => Reduce(2, NT_type_decl_name_with_params, yy_action_183) + T_PLUS_EQUAL => Reduce(2, NT_extensible_enum_extension_target, yy_action_184) _ => Error } } -// [94, type_sig → EXTENUM extensible_enum_extension_target • PLUS_EQUAL LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -fn yy_state_199(_lookahead : YYSymbol) -> YYDecision { +// [98, type_sig → EXTENUM extensible_enum_extension_target • PLUS_EQUAL LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +fn yy_state_237(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_PLUS_EQUAL => Shift(yy_state_200) + T_PLUS_EQUAL => Shift(yy_state_238) _ => Error } } -// [94, type_sig → EXTENUM extensible_enum_extension_target PLUS_EQUAL • LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -fn yy_state_200(_lookahead : YYSymbol) -> YYDecision { +// [98, type_sig → EXTENUM extensible_enum_extension_target PLUS_EQUAL • LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +fn yy_state_238(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACE => Shift(yy_state_201) + T_LBRACE => Shift(yy_state_239) _ => Error } } -// [94, type_sig → EXTENUM extensible_enum_extension_target PLUS_EQUAL LBRACE • separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [148, enum_constructor → • UIDENT option(delimited(LPAREN,separated_nonempty_list(COMMA,constructor_param),RPAREN)) option(eq_tag), SEMI / RBRACE] -// [149, enum_constructor → • nonempty_list(attribute) UIDENT option(delimited(LPAREN,separated_nonempty_list(COMMA,constructor_param),RPAREN)) option(eq_tag), SEMI / RBRACE] -// [223, separated_list(SEMI,enum_constructor) → •, RBRACE] -// [224, separated_list(SEMI,enum_constructor) → • separated_nonempty_list(SEMI,enum_constructor), RBRACE] -// [252, nonempty_list(attribute) → • ATTRIBUTE, UIDENT] -// [253, nonempty_list(attribute) → • ATTRIBUTE nonempty_list(attribute), UIDENT] -// [260, separated_nonempty_list(SEMI,enum_constructor) → • enum_constructor, RBRACE] -// [261, separated_nonempty_list(SEMI,enum_constructor) → • enum_constructor SEMI separated_nonempty_list(SEMI,enum_constructor), RBRACE] -fn yy_state_201(_lookahead : YYSymbol) -> YYDecision { +// [98, type_sig → EXTENUM extensible_enum_extension_target PLUS_EQUAL LBRACE • separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [152, enum_constructor → • UIDENT option(delimited(LPAREN,separated_nonempty_list(COMMA,constructor_param),RPAREN)) option(eq_tag), SEMI / RBRACE] +// [153, enum_constructor → • nonempty_list(attribute) UIDENT option(delimited(LPAREN,separated_nonempty_list(COMMA,constructor_param),RPAREN)) option(eq_tag), SEMI / RBRACE] +// [228, separated_list(SEMI,enum_constructor) → •, RBRACE] +// [229, separated_list(SEMI,enum_constructor) → • separated_nonempty_list(SEMI,enum_constructor), RBRACE] +// [257, nonempty_list(attribute) → • ATTRIBUTE, UIDENT] +// [258, nonempty_list(attribute) → • ATTRIBUTE nonempty_list(attribute), UIDENT] +// [265, separated_nonempty_list(SEMI,enum_constructor) → • enum_constructor, RBRACE] +// [266, separated_nonempty_list(SEMI,enum_constructor) → • enum_constructor SEMI separated_nonempty_list(SEMI,enum_constructor), RBRACE] +fn yy_state_239(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_ATTRIBUTE => Shift(yy_state_19) - NT_enum_constructor => Shift(yy_state_202) - NT_nonempty_list_attribute_ => Shift(yy_state_205) - T_UIDENT => Shift(yy_state_224) - NT_separated_nonempty_list_SEMI_enum_constructor_ => Shift(yy_state_227) - NT_separated_list_SEMI_enum_constructor_ => Shift(yy_state_228) - T_RBRACE => Reduce(0, NT_separated_list_SEMI_enum_constructor_, yy_action_184) + NT_enum_constructor => Shift(yy_state_240) + NT_nonempty_list_attribute_ => Shift(yy_state_243) + T_UIDENT => Shift(yy_state_262) + NT_separated_nonempty_list_SEMI_enum_constructor_ => Shift(yy_state_265) + NT_separated_list_SEMI_enum_constructor_ => Shift(yy_state_266) + T_RBRACE => Reduce(0, NT_separated_list_SEMI_enum_constructor_, yy_action_182) _ => Error } } -// [260, separated_nonempty_list(SEMI,enum_constructor) → enum_constructor •, RBRACE] -// [261, separated_nonempty_list(SEMI,enum_constructor) → enum_constructor • SEMI separated_nonempty_list(SEMI,enum_constructor), RBRACE] -fn yy_state_202(_lookahead : YYSymbol) -> YYDecision { +// [265, separated_nonempty_list(SEMI,enum_constructor) → enum_constructor •, RBRACE] +// [266, separated_nonempty_list(SEMI,enum_constructor) → enum_constructor • SEMI separated_nonempty_list(SEMI,enum_constructor), RBRACE] +fn yy_state_240(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_SEMI => Shift(yy_state_203) - T_RBRACE => Reduce(1, NT_separated_nonempty_list_SEMI_enum_constructor_, yy_action_183) + T_SEMI => Shift(yy_state_241) + T_RBRACE => Reduce(1, NT_separated_nonempty_list_SEMI_enum_constructor_, yy_action_181) _ => Error } } -// [148, enum_constructor → • UIDENT option(delimited(LPAREN,separated_nonempty_list(COMMA,constructor_param),RPAREN)) option(eq_tag), SEMI / RBRACE] -// [149, enum_constructor → • nonempty_list(attribute) UIDENT option(delimited(LPAREN,separated_nonempty_list(COMMA,constructor_param),RPAREN)) option(eq_tag), SEMI / RBRACE] -// [252, nonempty_list(attribute) → • ATTRIBUTE, UIDENT] -// [253, nonempty_list(attribute) → • ATTRIBUTE nonempty_list(attribute), UIDENT] -// [260, separated_nonempty_list(SEMI,enum_constructor) → • enum_constructor, RBRACE] -// [261, separated_nonempty_list(SEMI,enum_constructor) → • enum_constructor SEMI separated_nonempty_list(SEMI,enum_constructor), RBRACE] -// [261, separated_nonempty_list(SEMI,enum_constructor) → enum_constructor SEMI • separated_nonempty_list(SEMI,enum_constructor), RBRACE] -fn yy_state_203(_lookahead : YYSymbol) -> YYDecision { +// [152, enum_constructor → • UIDENT option(delimited(LPAREN,separated_nonempty_list(COMMA,constructor_param),RPAREN)) option(eq_tag), SEMI / RBRACE] +// [153, enum_constructor → • nonempty_list(attribute) UIDENT option(delimited(LPAREN,separated_nonempty_list(COMMA,constructor_param),RPAREN)) option(eq_tag), SEMI / RBRACE] +// [257, nonempty_list(attribute) → • ATTRIBUTE, UIDENT] +// [258, nonempty_list(attribute) → • ATTRIBUTE nonempty_list(attribute), UIDENT] +// [265, separated_nonempty_list(SEMI,enum_constructor) → • enum_constructor, RBRACE] +// [266, separated_nonempty_list(SEMI,enum_constructor) → • enum_constructor SEMI separated_nonempty_list(SEMI,enum_constructor), RBRACE] +// [266, separated_nonempty_list(SEMI,enum_constructor) → enum_constructor SEMI • separated_nonempty_list(SEMI,enum_constructor), RBRACE] +fn yy_state_241(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_ATTRIBUTE => Shift(yy_state_19) - NT_enum_constructor => Shift(yy_state_202) - NT_separated_nonempty_list_SEMI_enum_constructor_ => Shift(yy_state_204) - NT_nonempty_list_attribute_ => Shift(yy_state_205) - T_UIDENT => Shift(yy_state_224) + NT_enum_constructor => Shift(yy_state_240) + NT_separated_nonempty_list_SEMI_enum_constructor_ => Shift(yy_state_242) + NT_nonempty_list_attribute_ => Shift(yy_state_243) + T_UIDENT => Shift(yy_state_262) _ => Error } } -// [261, separated_nonempty_list(SEMI,enum_constructor) → enum_constructor SEMI separated_nonempty_list(SEMI,enum_constructor) •, RBRACE] -fn yy_state_204(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_separated_nonempty_list_SEMI_enum_constructor_, yy_action_182) +// [266, separated_nonempty_list(SEMI,enum_constructor) → enum_constructor SEMI separated_nonempty_list(SEMI,enum_constructor) •, RBRACE] +fn yy_state_242(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_separated_nonempty_list_SEMI_enum_constructor_, yy_action_180) } -// [149, enum_constructor → nonempty_list(attribute) • UIDENT option(delimited(LPAREN,separated_nonempty_list(COMMA,constructor_param),RPAREN)) option(eq_tag), SEMI / RBRACE] -fn yy_state_205(_lookahead : YYSymbol) -> YYDecision { +// [153, enum_constructor → nonempty_list(attribute) • UIDENT option(delimited(LPAREN,separated_nonempty_list(COMMA,constructor_param),RPAREN)) option(eq_tag), SEMI / RBRACE] +fn yy_state_243(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_UIDENT => Shift(yy_state_206) + T_UIDENT => Shift(yy_state_244) _ => Error } } -// [149, enum_constructor → nonempty_list(attribute) UIDENT • option(delimited(LPAREN,separated_nonempty_list(COMMA,constructor_param),RPAREN)) option(eq_tag), SEMI / RBRACE] -// [236, option(delimited(LPAREN,separated_nonempty_list(COMMA,constructor_param),RPAREN)) → •, EQUAL / SEMI / RBRACE] -// [237, option(delimited(LPAREN,separated_nonempty_list(COMMA,constructor_param),RPAREN)) → • LPAREN separated_nonempty_list(COMMA,constructor_param) RPAREN, EQUAL / SEMI / RBRACE] -fn yy_state_206(_lookahead : YYSymbol) -> YYDecision { +// [153, enum_constructor → nonempty_list(attribute) UIDENT • option(delimited(LPAREN,separated_nonempty_list(COMMA,constructor_param),RPAREN)) option(eq_tag), SEMI / RBRACE] +// [241, option(delimited(LPAREN,separated_nonempty_list(COMMA,constructor_param),RPAREN)) → •, EQUAL / SEMI / RBRACE] +// [242, option(delimited(LPAREN,separated_nonempty_list(COMMA,constructor_param),RPAREN)) → • LPAREN separated_nonempty_list(COMMA,constructor_param) RPAREN, EQUAL / SEMI / RBRACE] +fn yy_state_244(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LPAREN => Shift(yy_state_207) - NT_option_delimited_LPAREN_separated_nonempty_list_COMMA_constructor_param__RPAREN__ => Shift(yy_state_220) - T_EQUAL | T_SEMI | T_RBRACE => Reduce(0, NT_option_delimited_LPAREN_separated_nonempty_list_COMMA_constructor_param__RPAREN__, yy_action_181) + T_LPAREN => Shift(yy_state_245) + NT_option_delimited_LPAREN_separated_nonempty_list_COMMA_constructor_param__RPAREN__ => Shift(yy_state_258) + T_EQUAL | T_SEMI | T_RBRACE => Reduce(0, NT_option_delimited_LPAREN_separated_nonempty_list_COMMA_constructor_param__RPAREN__, yy_action_179) _ => Error } } -// [150, constructor_param → • boption(MUTABLE) type_, RPAREN / COMMA] -// [151, constructor_param → • boption(MUTABLE) post_label COLON type_, RPAREN / COMMA] -// [234, separated_nonempty_list(COMMA,constructor_param) → • constructor_param, RPAREN] -// [235, separated_nonempty_list(COMMA,constructor_param) → • constructor_param COMMA separated_nonempty_list(COMMA,constructor_param), RPAREN] -// [237, option(delimited(LPAREN,separated_nonempty_list(COMMA,constructor_param),RPAREN)) → LPAREN • separated_nonempty_list(COMMA,constructor_param) RPAREN, EQUAL / SEMI / RBRACE] -// [240, boption(MUTABLE) → •, UIDENT / POST_LABEL / ASYNC / LPAREN / UNDERSCORE / AMPER / PACKAGE_NAME] -// [241, boption(MUTABLE) → • MUTABLE, UIDENT / POST_LABEL / ASYNC / LPAREN / UNDERSCORE / AMPER / PACKAGE_NAME] -fn yy_state_207(_lookahead : YYSymbol) -> YYDecision { +// [154, constructor_param → • boption(MUTABLE) type_, RPAREN / COMMA] +// [155, constructor_param → • boption(MUTABLE) post_label COLON type_, RPAREN / COMMA] +// [239, separated_nonempty_list(COMMA,constructor_param) → • constructor_param, RPAREN] +// [240, separated_nonempty_list(COMMA,constructor_param) → • constructor_param COMMA separated_nonempty_list(COMMA,constructor_param), RPAREN] +// [242, option(delimited(LPAREN,separated_nonempty_list(COMMA,constructor_param),RPAREN)) → LPAREN • separated_nonempty_list(COMMA,constructor_param) RPAREN, EQUAL / SEMI / RBRACE] +// [245, boption(MUTABLE) → •, UIDENT / POST_LABEL / ASYNC / LPAREN / UNDERSCORE / AMPER / PACKAGE_NAME] +// [246, boption(MUTABLE) → • MUTABLE, UIDENT / POST_LABEL / ASYNC / LPAREN / UNDERSCORE / AMPER / PACKAGE_NAME] +fn yy_state_245(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_MUTABLE => Shift(yy_state_208) - NT_separated_nonempty_list_COMMA_constructor_param_ => Shift(yy_state_209) - NT_constructor_param => Shift(yy_state_211) - NT_boption_MUTABLE_ => Shift(yy_state_214) - T_UIDENT | T_POST_LABEL | T_ASYNC | T_LPAREN | T_UNDERSCORE | T_AMPER | T_PACKAGE_NAME => Reduce(0, NT_boption_MUTABLE_, yy_action_180) + T_MUTABLE => Shift(yy_state_246) + NT_separated_nonempty_list_COMMA_constructor_param_ => Shift(yy_state_247) + NT_constructor_param => Shift(yy_state_249) + NT_boption_MUTABLE_ => Shift(yy_state_252) + T_UIDENT | T_POST_LABEL | T_ASYNC | T_LPAREN | T_UNDERSCORE | T_AMPER | T_PACKAGE_NAME => Reduce(0, NT_boption_MUTABLE_, yy_action_178) _ => Error } } -// [241, boption(MUTABLE) → MUTABLE •, LIDENT / UIDENT / POST_LABEL / ASYNC / LPAREN / UNDERSCORE / AMPER / PACKAGE_NAME] -fn yy_state_208(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_boption_MUTABLE_, yy_action_179) +// [246, boption(MUTABLE) → MUTABLE •, LIDENT / UIDENT / POST_LABEL / ASYNC / LPAREN / UNDERSCORE / AMPER / PACKAGE_NAME / EXTEND] +fn yy_state_246(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_boption_MUTABLE_, yy_action_177) } -// [237, option(delimited(LPAREN,separated_nonempty_list(COMMA,constructor_param),RPAREN)) → LPAREN separated_nonempty_list(COMMA,constructor_param) • RPAREN, EQUAL / SEMI / RBRACE] -fn yy_state_209(_lookahead : YYSymbol) -> YYDecision { +// [242, option(delimited(LPAREN,separated_nonempty_list(COMMA,constructor_param),RPAREN)) → LPAREN separated_nonempty_list(COMMA,constructor_param) • RPAREN, EQUAL / SEMI / RBRACE] +fn yy_state_247(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RPAREN => Shift(yy_state_210) + T_RPAREN => Shift(yy_state_248) _ => Error } } -// [237, option(delimited(LPAREN,separated_nonempty_list(COMMA,constructor_param),RPAREN)) → LPAREN separated_nonempty_list(COMMA,constructor_param) RPAREN •, EQUAL / SEMI / RBRACE] -fn yy_state_210(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_option_delimited_LPAREN_separated_nonempty_list_COMMA_constructor_param__RPAREN__, yy_action_177) +// [242, option(delimited(LPAREN,separated_nonempty_list(COMMA,constructor_param),RPAREN)) → LPAREN separated_nonempty_list(COMMA,constructor_param) RPAREN •, EQUAL / SEMI / RBRACE] +fn yy_state_248(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_option_delimited_LPAREN_separated_nonempty_list_COMMA_constructor_param__RPAREN__, yy_action_175) } -// [234, separated_nonempty_list(COMMA,constructor_param) → constructor_param •, RPAREN] -// [235, separated_nonempty_list(COMMA,constructor_param) → constructor_param • COMMA separated_nonempty_list(COMMA,constructor_param), RPAREN] -fn yy_state_211(_lookahead : YYSymbol) -> YYDecision { +// [239, separated_nonempty_list(COMMA,constructor_param) → constructor_param •, RPAREN] +// [240, separated_nonempty_list(COMMA,constructor_param) → constructor_param • COMMA separated_nonempty_list(COMMA,constructor_param), RPAREN] +fn yy_state_249(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_COMMA => Shift(yy_state_212) - T_RPAREN => Reduce(1, NT_separated_nonempty_list_COMMA_constructor_param_, yy_action_176) + T_COMMA => Shift(yy_state_250) + T_RPAREN => Reduce(1, NT_separated_nonempty_list_COMMA_constructor_param_, yy_action_174) _ => Error } } -// [150, constructor_param → • boption(MUTABLE) type_, RPAREN / COMMA] -// [151, constructor_param → • boption(MUTABLE) post_label COLON type_, RPAREN / COMMA] -// [234, separated_nonempty_list(COMMA,constructor_param) → • constructor_param, RPAREN] -// [235, separated_nonempty_list(COMMA,constructor_param) → • constructor_param COMMA separated_nonempty_list(COMMA,constructor_param), RPAREN] -// [235, separated_nonempty_list(COMMA,constructor_param) → constructor_param COMMA • separated_nonempty_list(COMMA,constructor_param), RPAREN] -// [240, boption(MUTABLE) → •, UIDENT / POST_LABEL / ASYNC / LPAREN / UNDERSCORE / AMPER / PACKAGE_NAME] -// [241, boption(MUTABLE) → • MUTABLE, UIDENT / POST_LABEL / ASYNC / LPAREN / UNDERSCORE / AMPER / PACKAGE_NAME] -fn yy_state_212(_lookahead : YYSymbol) -> YYDecision { +// [154, constructor_param → • boption(MUTABLE) type_, RPAREN / COMMA] +// [155, constructor_param → • boption(MUTABLE) post_label COLON type_, RPAREN / COMMA] +// [239, separated_nonempty_list(COMMA,constructor_param) → • constructor_param, RPAREN] +// [240, separated_nonempty_list(COMMA,constructor_param) → • constructor_param COMMA separated_nonempty_list(COMMA,constructor_param), RPAREN] +// [240, separated_nonempty_list(COMMA,constructor_param) → constructor_param COMMA • separated_nonempty_list(COMMA,constructor_param), RPAREN] +// [245, boption(MUTABLE) → •, UIDENT / POST_LABEL / ASYNC / LPAREN / UNDERSCORE / AMPER / PACKAGE_NAME] +// [246, boption(MUTABLE) → • MUTABLE, UIDENT / POST_LABEL / ASYNC / LPAREN / UNDERSCORE / AMPER / PACKAGE_NAME] +fn yy_state_250(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_MUTABLE => Shift(yy_state_208) - NT_constructor_param => Shift(yy_state_211) - NT_separated_nonempty_list_COMMA_constructor_param_ => Shift(yy_state_213) - NT_boption_MUTABLE_ => Shift(yy_state_214) - T_UIDENT | T_POST_LABEL | T_ASYNC | T_LPAREN | T_UNDERSCORE | T_AMPER | T_PACKAGE_NAME => Reduce(0, NT_boption_MUTABLE_, yy_action_180) + T_MUTABLE => Shift(yy_state_246) + NT_constructor_param => Shift(yy_state_249) + NT_separated_nonempty_list_COMMA_constructor_param_ => Shift(yy_state_251) + NT_boption_MUTABLE_ => Shift(yy_state_252) + T_UIDENT | T_POST_LABEL | T_ASYNC | T_LPAREN | T_UNDERSCORE | T_AMPER | T_PACKAGE_NAME => Reduce(0, NT_boption_MUTABLE_, yy_action_178) _ => Error } } -// [235, separated_nonempty_list(COMMA,constructor_param) → constructor_param COMMA separated_nonempty_list(COMMA,constructor_param) •, RPAREN] -fn yy_state_213(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_separated_nonempty_list_COMMA_constructor_param_, yy_action_175) -} - -// [150, constructor_param → boption(MUTABLE) • type_, RPAREN / COMMA] -// [151, constructor_param → boption(MUTABLE) • post_label COLON type_, RPAREN / COMMA] -// [167, simple_type → • simple_type QUESTION, RPAREN / COMMA / QUESTION] -// [168, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, RPAREN / COMMA / QUESTION] -// [169, simple_type → • LPAREN type_ RPAREN, RPAREN / COMMA / QUESTION] -// [170, simple_type → • qualified_uident_ optional_type_arguments, RPAREN / COMMA / QUESTION] -// [171, simple_type → • AMPER qualified_uident_, RPAREN / COMMA / QUESTION] -// [172, simple_type → • UNDERSCORE, RPAREN / COMMA / QUESTION] -// [173, type_ → • simple_type, RPAREN / COMMA] -// [174, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [175, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [176, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [177, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [178, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [179, type_ → • LPAREN RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [180, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [181, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [210, qualified_uident_ → • UIDENT, RPAREN / COMMA / QUESTION / LBRACKET] -// [211, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, RPAREN / COMMA / QUESTION / LBRACKET] -// [215, post_label → • POST_LABEL, COLON] -fn yy_state_214(_lookahead : YYSymbol) -> YYDecision { +// [240, separated_nonempty_list(COMMA,constructor_param) → constructor_param COMMA separated_nonempty_list(COMMA,constructor_param) •, RPAREN] +fn yy_state_251(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_separated_nonempty_list_COMMA_constructor_param_, yy_action_173) +} + +// [154, constructor_param → boption(MUTABLE) • type_, RPAREN / COMMA] +// [155, constructor_param → boption(MUTABLE) • post_label COLON type_, RPAREN / COMMA] +// [171, simple_type → • simple_type QUESTION, RPAREN / COMMA / QUESTION] +// [172, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, RPAREN / COMMA / QUESTION] +// [173, simple_type → • LPAREN type_ RPAREN, RPAREN / COMMA / QUESTION] +// [174, simple_type → • qualified_uident_ optional_type_arguments, RPAREN / COMMA / QUESTION] +// [175, simple_type → • AMPER qualified_uident_, RPAREN / COMMA / QUESTION] +// [176, simple_type → • UNDERSCORE, RPAREN / COMMA / QUESTION] +// [177, type_ → • simple_type, RPAREN / COMMA] +// [178, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [179, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [180, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [181, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [182, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [183, type_ → • LPAREN RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [184, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [185, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [214, qualified_uident_ → • UIDENT, RPAREN / COMMA / QUESTION / LBRACKET] +// [215, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, RPAREN / COMMA / QUESTION / LBRACKET] +// [220, post_label → • POST_LABEL, COLON] +fn yy_state_252(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_PACKAGE_NAME => Shift(yy_state_62) T_UIDENT => Shift(yy_state_64) @@ -6877,45 +7662,45 @@ fn yy_state_214(_lookahead : YYSymbol) -> YYDecision { NT_qualified_uident_ => Shift(yy_state_78) T_LPAREN => Shift(yy_state_83) NT_simple_type => Shift(yy_state_106) - T_POST_LABEL => Shift(yy_state_215) - NT_post_label => Shift(yy_state_216) - NT_type_ => Shift(yy_state_219) + T_POST_LABEL => Shift(yy_state_253) + NT_post_label => Shift(yy_state_254) + NT_type_ => Shift(yy_state_257) _ => Error } } -// [215, post_label → POST_LABEL •, COLON] -fn yy_state_215(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_post_label, yy_action_174) +// [220, post_label → POST_LABEL •, COLON] +fn yy_state_253(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_post_label, yy_action_172) } -// [151, constructor_param → boption(MUTABLE) post_label • COLON type_, RPAREN / COMMA] -fn yy_state_216(_lookahead : YYSymbol) -> YYDecision { +// [155, constructor_param → boption(MUTABLE) post_label • COLON type_, RPAREN / COMMA] +fn yy_state_254(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_COLON => Shift(yy_state_217) - _ => Error - } -} - -// [151, constructor_param → boption(MUTABLE) post_label COLON • type_, RPAREN / COMMA] -// [167, simple_type → • simple_type QUESTION, RPAREN / COMMA / QUESTION] -// [168, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, RPAREN / COMMA / QUESTION] -// [169, simple_type → • LPAREN type_ RPAREN, RPAREN / COMMA / QUESTION] -// [170, simple_type → • qualified_uident_ optional_type_arguments, RPAREN / COMMA / QUESTION] -// [171, simple_type → • AMPER qualified_uident_, RPAREN / COMMA / QUESTION] -// [172, simple_type → • UNDERSCORE, RPAREN / COMMA / QUESTION] -// [173, type_ → • simple_type, RPAREN / COMMA] -// [174, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [175, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [176, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [177, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [178, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [179, type_ → • LPAREN RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [180, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [181, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [210, qualified_uident_ → • UIDENT, RPAREN / COMMA / QUESTION / LBRACKET] -// [211, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, RPAREN / COMMA / QUESTION / LBRACKET] -fn yy_state_217(_lookahead : YYSymbol) -> YYDecision { + T_COLON => Shift(yy_state_255) + _ => Error + } +} + +// [155, constructor_param → boption(MUTABLE) post_label COLON • type_, RPAREN / COMMA] +// [171, simple_type → • simple_type QUESTION, RPAREN / COMMA / QUESTION] +// [172, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, RPAREN / COMMA / QUESTION] +// [173, simple_type → • LPAREN type_ RPAREN, RPAREN / COMMA / QUESTION] +// [174, simple_type → • qualified_uident_ optional_type_arguments, RPAREN / COMMA / QUESTION] +// [175, simple_type → • AMPER qualified_uident_, RPAREN / COMMA / QUESTION] +// [176, simple_type → • UNDERSCORE, RPAREN / COMMA / QUESTION] +// [177, type_ → • simple_type, RPAREN / COMMA] +// [178, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [179, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [180, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [181, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [182, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [183, type_ → • LPAREN RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [184, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [185, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [214, qualified_uident_ → • UIDENT, RPAREN / COMMA / QUESTION / LBRACKET] +// [215, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, RPAREN / COMMA / QUESTION / LBRACKET] +fn yy_state_255(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_PACKAGE_NAME => Shift(yy_state_62) T_UIDENT => Shift(yy_state_64) @@ -6925,377 +7710,377 @@ fn yy_state_217(_lookahead : YYSymbol) -> YYDecision { NT_qualified_uident_ => Shift(yy_state_78) T_LPAREN => Shift(yy_state_83) NT_simple_type => Shift(yy_state_106) - NT_type_ => Shift(yy_state_218) + NT_type_ => Shift(yy_state_256) _ => Error } } -// [151, constructor_param → boption(MUTABLE) post_label COLON type_ •, RPAREN / COMMA] -fn yy_state_218(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(4, NT_constructor_param, yy_action_173) +// [155, constructor_param → boption(MUTABLE) post_label COLON type_ •, RPAREN / COMMA] +fn yy_state_256(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(4, NT_constructor_param, yy_action_171) } -// [150, constructor_param → boption(MUTABLE) type_ •, RPAREN / COMMA] -fn yy_state_219(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(2, NT_constructor_param, yy_action_172) +// [154, constructor_param → boption(MUTABLE) type_ •, RPAREN / COMMA] +fn yy_state_257(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(2, NT_constructor_param, yy_action_170) } -// [149, enum_constructor → nonempty_list(attribute) UIDENT option(delimited(LPAREN,separated_nonempty_list(COMMA,constructor_param),RPAREN)) • option(eq_tag), SEMI / RBRACE] -// [238, option(eq_tag) → •, SEMI / RBRACE] -// [239, option(eq_tag) → • EQUAL INT, SEMI / RBRACE] -fn yy_state_220(_lookahead : YYSymbol) -> YYDecision { +// [153, enum_constructor → nonempty_list(attribute) UIDENT option(delimited(LPAREN,separated_nonempty_list(COMMA,constructor_param),RPAREN)) • option(eq_tag), SEMI / RBRACE] +// [243, option(eq_tag) → •, SEMI / RBRACE] +// [244, option(eq_tag) → • EQUAL INT, SEMI / RBRACE] +fn yy_state_258(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_EQUAL => Shift(yy_state_221) - NT_option_eq_tag_ => Shift(yy_state_223) - T_SEMI | T_RBRACE => Reduce(0, NT_option_eq_tag_, yy_action_171) + T_EQUAL => Shift(yy_state_259) + NT_option_eq_tag_ => Shift(yy_state_261) + T_SEMI | T_RBRACE => Reduce(0, NT_option_eq_tag_, yy_action_169) _ => Error } } -// [239, option(eq_tag) → EQUAL • INT, SEMI / RBRACE] -fn yy_state_221(_lookahead : YYSymbol) -> YYDecision { +// [244, option(eq_tag) → EQUAL • INT, SEMI / RBRACE] +fn yy_state_259(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_INT => Shift(yy_state_222) + T_INT => Shift(yy_state_260) _ => Error } } -// [239, option(eq_tag) → EQUAL INT •, SEMI / RBRACE] -fn yy_state_222(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(2, NT_option_eq_tag_, yy_action_169) +// [244, option(eq_tag) → EQUAL INT •, SEMI / RBRACE] +fn yy_state_260(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(2, NT_option_eq_tag_, yy_action_167) } -// [149, enum_constructor → nonempty_list(attribute) UIDENT option(delimited(LPAREN,separated_nonempty_list(COMMA,constructor_param),RPAREN)) option(eq_tag) •, SEMI / RBRACE] -fn yy_state_223(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(4, NT_enum_constructor, yy_action_168) +// [153, enum_constructor → nonempty_list(attribute) UIDENT option(delimited(LPAREN,separated_nonempty_list(COMMA,constructor_param),RPAREN)) option(eq_tag) •, SEMI / RBRACE] +fn yy_state_261(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(4, NT_enum_constructor, yy_action_166) } -// [148, enum_constructor → UIDENT • option(delimited(LPAREN,separated_nonempty_list(COMMA,constructor_param),RPAREN)) option(eq_tag), SEMI / RBRACE] -// [236, option(delimited(LPAREN,separated_nonempty_list(COMMA,constructor_param),RPAREN)) → •, EQUAL / SEMI / RBRACE] -// [237, option(delimited(LPAREN,separated_nonempty_list(COMMA,constructor_param),RPAREN)) → • LPAREN separated_nonempty_list(COMMA,constructor_param) RPAREN, EQUAL / SEMI / RBRACE] -fn yy_state_224(_lookahead : YYSymbol) -> YYDecision { +// [152, enum_constructor → UIDENT • option(delimited(LPAREN,separated_nonempty_list(COMMA,constructor_param),RPAREN)) option(eq_tag), SEMI / RBRACE] +// [241, option(delimited(LPAREN,separated_nonempty_list(COMMA,constructor_param),RPAREN)) → •, EQUAL / SEMI / RBRACE] +// [242, option(delimited(LPAREN,separated_nonempty_list(COMMA,constructor_param),RPAREN)) → • LPAREN separated_nonempty_list(COMMA,constructor_param) RPAREN, EQUAL / SEMI / RBRACE] +fn yy_state_262(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LPAREN => Shift(yy_state_207) - NT_option_delimited_LPAREN_separated_nonempty_list_COMMA_constructor_param__RPAREN__ => Shift(yy_state_225) - T_EQUAL | T_SEMI | T_RBRACE => Reduce(0, NT_option_delimited_LPAREN_separated_nonempty_list_COMMA_constructor_param__RPAREN__, yy_action_181) + T_LPAREN => Shift(yy_state_245) + NT_option_delimited_LPAREN_separated_nonempty_list_COMMA_constructor_param__RPAREN__ => Shift(yy_state_263) + T_EQUAL | T_SEMI | T_RBRACE => Reduce(0, NT_option_delimited_LPAREN_separated_nonempty_list_COMMA_constructor_param__RPAREN__, yy_action_179) _ => Error } } -// [148, enum_constructor → UIDENT option(delimited(LPAREN,separated_nonempty_list(COMMA,constructor_param),RPAREN)) • option(eq_tag), SEMI / RBRACE] -// [238, option(eq_tag) → •, SEMI / RBRACE] -// [239, option(eq_tag) → • EQUAL INT, SEMI / RBRACE] -fn yy_state_225(_lookahead : YYSymbol) -> YYDecision { +// [152, enum_constructor → UIDENT option(delimited(LPAREN,separated_nonempty_list(COMMA,constructor_param),RPAREN)) • option(eq_tag), SEMI / RBRACE] +// [243, option(eq_tag) → •, SEMI / RBRACE] +// [244, option(eq_tag) → • EQUAL INT, SEMI / RBRACE] +fn yy_state_263(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_EQUAL => Shift(yy_state_221) - NT_option_eq_tag_ => Shift(yy_state_226) - T_SEMI | T_RBRACE => Reduce(0, NT_option_eq_tag_, yy_action_171) + T_EQUAL => Shift(yy_state_259) + NT_option_eq_tag_ => Shift(yy_state_264) + T_SEMI | T_RBRACE => Reduce(0, NT_option_eq_tag_, yy_action_169) _ => Error } } -// [148, enum_constructor → UIDENT option(delimited(LPAREN,separated_nonempty_list(COMMA,constructor_param),RPAREN)) option(eq_tag) •, SEMI / RBRACE] -fn yy_state_226(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_enum_constructor, yy_action_167) +// [152, enum_constructor → UIDENT option(delimited(LPAREN,separated_nonempty_list(COMMA,constructor_param),RPAREN)) option(eq_tag) •, SEMI / RBRACE] +fn yy_state_264(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_enum_constructor, yy_action_165) } -// [224, separated_list(SEMI,enum_constructor) → separated_nonempty_list(SEMI,enum_constructor) •, RBRACE] -fn yy_state_227(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_separated_list_SEMI_enum_constructor_, yy_action_166) +// [229, separated_list(SEMI,enum_constructor) → separated_nonempty_list(SEMI,enum_constructor) •, RBRACE] +fn yy_state_265(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_separated_list_SEMI_enum_constructor_, yy_action_164) } -// [94, type_sig → EXTENUM extensible_enum_extension_target PLUS_EQUAL LBRACE separated_list(SEMI,enum_constructor) • RBRACE optional_derive, EOF / SEMI] -fn yy_state_228(_lookahead : YYSymbol) -> YYDecision { +// [98, type_sig → EXTENUM extensible_enum_extension_target PLUS_EQUAL LBRACE separated_list(SEMI,enum_constructor) • RBRACE optional_derive, EOF / SEMI] +fn yy_state_266(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RBRACE => Shift(yy_state_229) + T_RBRACE => Shift(yy_state_267) _ => Error } } -// [94, type_sig → EXTENUM extensible_enum_extension_target PLUS_EQUAL LBRACE separated_list(SEMI,enum_constructor) RBRACE • optional_derive, EOF / SEMI] -// [100, optional_derive → •, EOF / SEMI] -// [101, optional_derive → • DERIVE LPAREN non_empty_list_commas(qualified_uident) RPAREN, EOF / SEMI] -fn yy_state_229(_lookahead : YYSymbol) -> YYDecision { +// [98, type_sig → EXTENUM extensible_enum_extension_target PLUS_EQUAL LBRACE separated_list(SEMI,enum_constructor) RBRACE • optional_derive, EOF / SEMI] +// [104, optional_derive → •, EOF / SEMI] +// [105, optional_derive → • DERIVE LPAREN non_empty_list_commas(qualified_uident) RPAREN, EOF / SEMI] +fn yy_state_267(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_DERIVE => Shift(yy_state_230) - NT_optional_derive => Shift(yy_state_239) - T_EOF | T_SEMI => Reduce(0, NT_optional_derive, yy_action_165) + T_DERIVE => Shift(yy_state_268) + NT_optional_derive => Shift(yy_state_277) + T_EOF | T_SEMI => Reduce(0, NT_optional_derive, yy_action_163) _ => Error } } -// [101, optional_derive → DERIVE • LPAREN non_empty_list_commas(qualified_uident) RPAREN, EOF / SEMI] -fn yy_state_230(_lookahead : YYSymbol) -> YYDecision { +// [105, optional_derive → DERIVE • LPAREN non_empty_list_commas(qualified_uident) RPAREN, EOF / SEMI] +fn yy_state_268(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LPAREN => Shift(yy_state_231) + T_LPAREN => Shift(yy_state_269) _ => Error } } -// [101, optional_derive → DERIVE LPAREN • non_empty_list_commas(qualified_uident) RPAREN, EOF / SEMI] -// [208, qualified_uident → • UIDENT, RPAREN / COMMA] -// [209, qualified_uident → • PACKAGE_NAME DOT_UIDENT, RPAREN / COMMA] -// [227, non_empty_list_commas(qualified_uident) → • non_empty_list_commas_rev(qualified_uident) option(COMMA), RPAREN] -// [262, non_empty_list_commas_rev(qualified_uident) → • qualified_uident, RPAREN / COMMA] -// [263, non_empty_list_commas_rev(qualified_uident) → • non_empty_list_commas_rev(qualified_uident) COMMA qualified_uident, RPAREN / COMMA] -fn yy_state_231(_lookahead : YYSymbol) -> YYDecision { +// [105, optional_derive → DERIVE LPAREN • non_empty_list_commas(qualified_uident) RPAREN, EOF / SEMI] +// [212, qualified_uident → • UIDENT, RPAREN / COMMA] +// [213, qualified_uident → • PACKAGE_NAME DOT_UIDENT, RPAREN / COMMA] +// [232, non_empty_list_commas(qualified_uident) → • non_empty_list_commas_rev(qualified_uident) option(COMMA), RPAREN] +// [267, non_empty_list_commas_rev(qualified_uident) → • qualified_uident, RPAREN / COMMA] +// [268, non_empty_list_commas_rev(qualified_uident) → • non_empty_list_commas_rev(qualified_uident) COMMA qualified_uident, RPAREN / COMMA] +fn yy_state_269(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_PACKAGE_NAME => Shift(yy_state_47) - T_UIDENT => Shift(yy_state_49) - NT_qualified_uident => Shift(yy_state_232) - NT_non_empty_list_commas_rev_qualified_uident_ => Shift(yy_state_233) - NT_non_empty_list_commas_qualified_uident_ => Shift(yy_state_237) + T_PACKAGE_NAME => Shift(yy_state_48) + T_UIDENT => Shift(yy_state_50) + NT_qualified_uident => Shift(yy_state_270) + NT_non_empty_list_commas_rev_qualified_uident_ => Shift(yy_state_271) + NT_non_empty_list_commas_qualified_uident_ => Shift(yy_state_275) _ => Error } } -// [262, non_empty_list_commas_rev(qualified_uident) → qualified_uident •, RPAREN / COMMA] -fn yy_state_232(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_non_empty_list_commas_rev_qualified_uident_, yy_action_164) +// [267, non_empty_list_commas_rev(qualified_uident) → qualified_uident •, RPAREN / COMMA] +fn yy_state_270(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_non_empty_list_commas_rev_qualified_uident_, yy_action_162) } -// [227, non_empty_list_commas(qualified_uident) → non_empty_list_commas_rev(qualified_uident) • option(COMMA), RPAREN] -// [256, option(COMMA) → •, RPAREN] -// [257, option(COMMA) → • COMMA, RPAREN] -// [263, non_empty_list_commas_rev(qualified_uident) → non_empty_list_commas_rev(qualified_uident) • COMMA qualified_uident, RPAREN / COMMA] -fn yy_state_233(_lookahead : YYSymbol) -> YYDecision { +// [232, non_empty_list_commas(qualified_uident) → non_empty_list_commas_rev(qualified_uident) • option(COMMA), RPAREN] +// [261, option(COMMA) → •, RPAREN] +// [262, option(COMMA) → • COMMA, RPAREN] +// [268, non_empty_list_commas_rev(qualified_uident) → non_empty_list_commas_rev(qualified_uident) • COMMA qualified_uident, RPAREN / COMMA] +fn yy_state_271(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_COMMA => Shift(yy_state_234) - NT_option_COMMA_ => Shift(yy_state_236) - T_RPAREN => Reduce(0, NT_option_COMMA_, yy_action_285) + T_COMMA => Shift(yy_state_272) + NT_option_COMMA_ => Shift(yy_state_274) + T_RPAREN => Reduce(0, NT_option_COMMA_, yy_action_290) _ => Error } } -// [208, qualified_uident → • UIDENT, RPAREN / COMMA] -// [209, qualified_uident → • PACKAGE_NAME DOT_UIDENT, RPAREN / COMMA] -// [257, option(COMMA) → COMMA •, RPAREN] -// [263, non_empty_list_commas_rev(qualified_uident) → non_empty_list_commas_rev(qualified_uident) COMMA • qualified_uident, RPAREN / COMMA] -fn yy_state_234(_lookahead : YYSymbol) -> YYDecision { +// [212, qualified_uident → • UIDENT, RPAREN / COMMA] +// [213, qualified_uident → • PACKAGE_NAME DOT_UIDENT, RPAREN / COMMA] +// [262, option(COMMA) → COMMA •, RPAREN] +// [268, non_empty_list_commas_rev(qualified_uident) → non_empty_list_commas_rev(qualified_uident) COMMA • qualified_uident, RPAREN / COMMA] +fn yy_state_272(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_PACKAGE_NAME => Shift(yy_state_47) - T_UIDENT => Shift(yy_state_49) - NT_qualified_uident => Shift(yy_state_235) - T_RPAREN => Reduce(1, NT_option_COMMA_, yy_action_284) + T_PACKAGE_NAME => Shift(yy_state_48) + T_UIDENT => Shift(yy_state_50) + NT_qualified_uident => Shift(yy_state_273) + T_RPAREN => Reduce(1, NT_option_COMMA_, yy_action_289) _ => Error } } -// [263, non_empty_list_commas_rev(qualified_uident) → non_empty_list_commas_rev(qualified_uident) COMMA qualified_uident •, RPAREN / COMMA] -fn yy_state_235(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_non_empty_list_commas_rev_qualified_uident_, yy_action_163) +// [268, non_empty_list_commas_rev(qualified_uident) → non_empty_list_commas_rev(qualified_uident) COMMA qualified_uident •, RPAREN / COMMA] +fn yy_state_273(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_non_empty_list_commas_rev_qualified_uident_, yy_action_161) } -// [227, non_empty_list_commas(qualified_uident) → non_empty_list_commas_rev(qualified_uident) option(COMMA) •, RPAREN] -fn yy_state_236(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(2, NT_non_empty_list_commas_qualified_uident_, yy_action_162) +// [232, non_empty_list_commas(qualified_uident) → non_empty_list_commas_rev(qualified_uident) option(COMMA) •, RPAREN] +fn yy_state_274(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(2, NT_non_empty_list_commas_qualified_uident_, yy_action_160) } -// [101, optional_derive → DERIVE LPAREN non_empty_list_commas(qualified_uident) • RPAREN, EOF / SEMI] -fn yy_state_237(_lookahead : YYSymbol) -> YYDecision { +// [105, optional_derive → DERIVE LPAREN non_empty_list_commas(qualified_uident) • RPAREN, EOF / SEMI] +fn yy_state_275(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RPAREN => Shift(yy_state_238) + T_RPAREN => Shift(yy_state_276) _ => Error } } -// [101, optional_derive → DERIVE LPAREN non_empty_list_commas(qualified_uident) RPAREN •, EOF / SEMI] -fn yy_state_238(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(4, NT_optional_derive, yy_action_161) +// [105, optional_derive → DERIVE LPAREN non_empty_list_commas(qualified_uident) RPAREN •, EOF / SEMI] +fn yy_state_276(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(4, NT_optional_derive, yy_action_159) } -// [94, type_sig → EXTENUM extensible_enum_extension_target PLUS_EQUAL LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive •, EOF / SEMI] -fn yy_state_239(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(7, NT_type_sig, yy_action_160) +// [98, type_sig → EXTENUM extensible_enum_extension_target PLUS_EQUAL LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive •, EOF / SEMI] +fn yy_state_277(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(7, NT_type_sig, yy_action_158) } -// [88, type_sig → EXTENUM type_decl_name_with_params • LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -fn yy_state_240(_lookahead : YYSymbol) -> YYDecision { +// [92, type_sig → EXTENUM type_decl_name_with_params • LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +fn yy_state_278(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACE => Shift(yy_state_241) + T_LBRACE => Shift(yy_state_279) _ => Error } } -// [88, type_sig → EXTENUM type_decl_name_with_params LBRACE • separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [148, enum_constructor → • UIDENT option(delimited(LPAREN,separated_nonempty_list(COMMA,constructor_param),RPAREN)) option(eq_tag), SEMI / RBRACE] -// [149, enum_constructor → • nonempty_list(attribute) UIDENT option(delimited(LPAREN,separated_nonempty_list(COMMA,constructor_param),RPAREN)) option(eq_tag), SEMI / RBRACE] -// [223, separated_list(SEMI,enum_constructor) → •, RBRACE] -// [224, separated_list(SEMI,enum_constructor) → • separated_nonempty_list(SEMI,enum_constructor), RBRACE] -// [252, nonempty_list(attribute) → • ATTRIBUTE, UIDENT] -// [253, nonempty_list(attribute) → • ATTRIBUTE nonempty_list(attribute), UIDENT] -// [260, separated_nonempty_list(SEMI,enum_constructor) → • enum_constructor, RBRACE] -// [261, separated_nonempty_list(SEMI,enum_constructor) → • enum_constructor SEMI separated_nonempty_list(SEMI,enum_constructor), RBRACE] -fn yy_state_241(_lookahead : YYSymbol) -> YYDecision { +// [92, type_sig → EXTENUM type_decl_name_with_params LBRACE • separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [152, enum_constructor → • UIDENT option(delimited(LPAREN,separated_nonempty_list(COMMA,constructor_param),RPAREN)) option(eq_tag), SEMI / RBRACE] +// [153, enum_constructor → • nonempty_list(attribute) UIDENT option(delimited(LPAREN,separated_nonempty_list(COMMA,constructor_param),RPAREN)) option(eq_tag), SEMI / RBRACE] +// [228, separated_list(SEMI,enum_constructor) → •, RBRACE] +// [229, separated_list(SEMI,enum_constructor) → • separated_nonempty_list(SEMI,enum_constructor), RBRACE] +// [257, nonempty_list(attribute) → • ATTRIBUTE, UIDENT] +// [258, nonempty_list(attribute) → • ATTRIBUTE nonempty_list(attribute), UIDENT] +// [265, separated_nonempty_list(SEMI,enum_constructor) → • enum_constructor, RBRACE] +// [266, separated_nonempty_list(SEMI,enum_constructor) → • enum_constructor SEMI separated_nonempty_list(SEMI,enum_constructor), RBRACE] +fn yy_state_279(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_ATTRIBUTE => Shift(yy_state_19) - NT_enum_constructor => Shift(yy_state_202) - NT_nonempty_list_attribute_ => Shift(yy_state_205) - T_UIDENT => Shift(yy_state_224) - NT_separated_nonempty_list_SEMI_enum_constructor_ => Shift(yy_state_227) - NT_separated_list_SEMI_enum_constructor_ => Shift(yy_state_242) - T_RBRACE => Reduce(0, NT_separated_list_SEMI_enum_constructor_, yy_action_184) + NT_enum_constructor => Shift(yy_state_240) + NT_nonempty_list_attribute_ => Shift(yy_state_243) + T_UIDENT => Shift(yy_state_262) + NT_separated_nonempty_list_SEMI_enum_constructor_ => Shift(yy_state_265) + NT_separated_list_SEMI_enum_constructor_ => Shift(yy_state_280) + T_RBRACE => Reduce(0, NT_separated_list_SEMI_enum_constructor_, yy_action_182) _ => Error } } -// [88, type_sig → EXTENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) • RBRACE optional_derive, EOF / SEMI] -fn yy_state_242(_lookahead : YYSymbol) -> YYDecision { +// [92, type_sig → EXTENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) • RBRACE optional_derive, EOF / SEMI] +fn yy_state_280(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RBRACE => Shift(yy_state_243) + T_RBRACE => Shift(yy_state_281) _ => Error } } -// [88, type_sig → EXTENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE • optional_derive, EOF / SEMI] -// [100, optional_derive → •, EOF / SEMI] -// [101, optional_derive → • DERIVE LPAREN non_empty_list_commas(qualified_uident) RPAREN, EOF / SEMI] -fn yy_state_243(_lookahead : YYSymbol) -> YYDecision { +// [92, type_sig → EXTENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE • optional_derive, EOF / SEMI] +// [104, optional_derive → •, EOF / SEMI] +// [105, optional_derive → • DERIVE LPAREN non_empty_list_commas(qualified_uident) RPAREN, EOF / SEMI] +fn yy_state_281(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_DERIVE => Shift(yy_state_230) - NT_optional_derive => Shift(yy_state_244) - T_EOF | T_SEMI => Reduce(0, NT_optional_derive, yy_action_165) + T_DERIVE => Shift(yy_state_268) + NT_optional_derive => Shift(yy_state_282) + T_EOF | T_SEMI => Reduce(0, NT_optional_derive, yy_action_163) _ => Error } } -// [88, type_sig → EXTENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive •, EOF / SEMI] -fn yy_state_244(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(6, NT_type_sig, yy_action_159) +// [92, type_sig → EXTENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive •, EOF / SEMI] +fn yy_state_282(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(6, NT_type_sig, yy_action_157) } -// [82, type_sig → ENUM • type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [164, type_decl_name_with_params → • uident optional_type_params_no_constraints, LBRACE] -// [212, uident → • UIDENT, LBRACKET / LBRACE] -fn yy_state_245(_lookahead : YYSymbol) -> YYDecision { +// [86, type_sig → ENUM • type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [168, type_decl_name_with_params → • uident optional_type_params_no_constraints, LBRACE] +// [216, uident → • UIDENT, LBRACKET / LBRACE] +fn yy_state_283(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_UIDENT => Shift(yy_state_25) - NT_uident => Shift(yy_state_246) - NT_type_decl_name_with_params => Shift(yy_state_248) + NT_uident => Shift(yy_state_284) + NT_type_decl_name_with_params => Shift(yy_state_286) _ => Error } } -// [160, type_params_no_constraints → • LBRACKET separated_list(COMMA,type_param_no_constraints) RBRACKET, EOF / DERIVE / EQUAL / LPAREN / SEMI / LBRACE] -// [161, optional_type_params_no_constraints → •, EOF / DERIVE / EQUAL / LPAREN / SEMI / LBRACE] -// [162, optional_type_params_no_constraints → • type_params_no_constraints, EOF / DERIVE / EQUAL / LPAREN / SEMI / LBRACE] -// [164, type_decl_name_with_params → uident • optional_type_params_no_constraints, EOF / DERIVE / EQUAL / LPAREN / SEMI / LBRACE] -fn yy_state_246(_lookahead : YYSymbol) -> YYDecision { +// [164, type_params_no_constraints → • LBRACKET separated_list(COMMA,type_param_no_constraints) RBRACKET, EOF / DERIVE / EQUAL / LPAREN / SEMI / LBRACE] +// [165, optional_type_params_no_constraints → •, EOF / DERIVE / EQUAL / LPAREN / SEMI / LBRACE] +// [166, optional_type_params_no_constraints → • type_params_no_constraints, EOF / DERIVE / EQUAL / LPAREN / SEMI / LBRACE] +// [168, type_decl_name_with_params → uident • optional_type_params_no_constraints, EOF / DERIVE / EQUAL / LPAREN / SEMI / LBRACE] +fn yy_state_284(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_type_params_no_constraints => Shift(yy_state_187) - T_LBRACKET => Shift(yy_state_188) - NT_optional_type_params_no_constraints => Shift(yy_state_247) - T_EOF | T_DERIVE | T_EQUAL | T_LPAREN | T_SEMI | T_LBRACE => Reduce(0, NT_optional_type_params_no_constraints, yy_action_196) + NT_type_params_no_constraints => Shift(yy_state_225) + T_LBRACKET => Shift(yy_state_226) + NT_optional_type_params_no_constraints => Shift(yy_state_285) + T_EOF | T_DERIVE | T_EQUAL | T_LPAREN | T_SEMI | T_LBRACE => Reduce(0, NT_optional_type_params_no_constraints, yy_action_194) _ => Error } } -// [164, type_decl_name_with_params → uident optional_type_params_no_constraints •, EOF / DERIVE / EQUAL / LPAREN / SEMI / LBRACE] -fn yy_state_247(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(2, NT_type_decl_name_with_params, yy_action_185) +// [168, type_decl_name_with_params → uident optional_type_params_no_constraints •, EOF / DERIVE / EQUAL / LPAREN / SEMI / LBRACE] +fn yy_state_285(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(2, NT_type_decl_name_with_params, yy_action_183) } -// [82, type_sig → ENUM type_decl_name_with_params • LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -fn yy_state_248(_lookahead : YYSymbol) -> YYDecision { +// [86, type_sig → ENUM type_decl_name_with_params • LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +fn yy_state_286(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACE => Shift(yy_state_249) + T_LBRACE => Shift(yy_state_287) _ => Error } } -// [82, type_sig → ENUM type_decl_name_with_params LBRACE • separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [148, enum_constructor → • UIDENT option(delimited(LPAREN,separated_nonempty_list(COMMA,constructor_param),RPAREN)) option(eq_tag), SEMI / RBRACE] -// [149, enum_constructor → • nonempty_list(attribute) UIDENT option(delimited(LPAREN,separated_nonempty_list(COMMA,constructor_param),RPAREN)) option(eq_tag), SEMI / RBRACE] -// [223, separated_list(SEMI,enum_constructor) → •, RBRACE] -// [224, separated_list(SEMI,enum_constructor) → • separated_nonempty_list(SEMI,enum_constructor), RBRACE] -// [252, nonempty_list(attribute) → • ATTRIBUTE, UIDENT] -// [253, nonempty_list(attribute) → • ATTRIBUTE nonempty_list(attribute), UIDENT] -// [260, separated_nonempty_list(SEMI,enum_constructor) → • enum_constructor, RBRACE] -// [261, separated_nonempty_list(SEMI,enum_constructor) → • enum_constructor SEMI separated_nonempty_list(SEMI,enum_constructor), RBRACE] -fn yy_state_249(_lookahead : YYSymbol) -> YYDecision { +// [86, type_sig → ENUM type_decl_name_with_params LBRACE • separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [152, enum_constructor → • UIDENT option(delimited(LPAREN,separated_nonempty_list(COMMA,constructor_param),RPAREN)) option(eq_tag), SEMI / RBRACE] +// [153, enum_constructor → • nonempty_list(attribute) UIDENT option(delimited(LPAREN,separated_nonempty_list(COMMA,constructor_param),RPAREN)) option(eq_tag), SEMI / RBRACE] +// [228, separated_list(SEMI,enum_constructor) → •, RBRACE] +// [229, separated_list(SEMI,enum_constructor) → • separated_nonempty_list(SEMI,enum_constructor), RBRACE] +// [257, nonempty_list(attribute) → • ATTRIBUTE, UIDENT] +// [258, nonempty_list(attribute) → • ATTRIBUTE nonempty_list(attribute), UIDENT] +// [265, separated_nonempty_list(SEMI,enum_constructor) → • enum_constructor, RBRACE] +// [266, separated_nonempty_list(SEMI,enum_constructor) → • enum_constructor SEMI separated_nonempty_list(SEMI,enum_constructor), RBRACE] +fn yy_state_287(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_ATTRIBUTE => Shift(yy_state_19) - NT_enum_constructor => Shift(yy_state_202) - NT_nonempty_list_attribute_ => Shift(yy_state_205) - T_UIDENT => Shift(yy_state_224) - NT_separated_nonempty_list_SEMI_enum_constructor_ => Shift(yy_state_227) - NT_separated_list_SEMI_enum_constructor_ => Shift(yy_state_250) - T_RBRACE => Reduce(0, NT_separated_list_SEMI_enum_constructor_, yy_action_184) + NT_enum_constructor => Shift(yy_state_240) + NT_nonempty_list_attribute_ => Shift(yy_state_243) + T_UIDENT => Shift(yy_state_262) + NT_separated_nonempty_list_SEMI_enum_constructor_ => Shift(yy_state_265) + NT_separated_list_SEMI_enum_constructor_ => Shift(yy_state_288) + T_RBRACE => Reduce(0, NT_separated_list_SEMI_enum_constructor_, yy_action_182) _ => Error } } -// [82, type_sig → ENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) • RBRACE optional_derive, EOF / SEMI] -fn yy_state_250(_lookahead : YYSymbol) -> YYDecision { +// [86, type_sig → ENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) • RBRACE optional_derive, EOF / SEMI] +fn yy_state_288(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RBRACE => Shift(yy_state_251) + T_RBRACE => Shift(yy_state_289) _ => Error } } -// [82, type_sig → ENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE • optional_derive, EOF / SEMI] -// [100, optional_derive → •, EOF / SEMI] -// [101, optional_derive → • DERIVE LPAREN non_empty_list_commas(qualified_uident) RPAREN, EOF / SEMI] -fn yy_state_251(_lookahead : YYSymbol) -> YYDecision { +// [86, type_sig → ENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE • optional_derive, EOF / SEMI] +// [104, optional_derive → •, EOF / SEMI] +// [105, optional_derive → • DERIVE LPAREN non_empty_list_commas(qualified_uident) RPAREN, EOF / SEMI] +fn yy_state_289(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_DERIVE => Shift(yy_state_230) - NT_optional_derive => Shift(yy_state_252) - T_EOF | T_SEMI => Reduce(0, NT_optional_derive, yy_action_165) + T_DERIVE => Shift(yy_state_268) + NT_optional_derive => Shift(yy_state_290) + T_EOF | T_SEMI => Reduce(0, NT_optional_derive, yy_action_163) _ => Error } } -// [82, type_sig → ENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive •, EOF / SEMI] -fn yy_state_252(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(6, NT_type_sig, yy_action_158) +// [86, type_sig → ENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive •, EOF / SEMI] +fn yy_state_290(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(6, NT_type_sig, yy_action_156) } -// [70, type_sig → STRUCT • type_decl_name_with_params LBRACE record_decl_body RBRACE optional_derive, EOF / SEMI] -// [76, type_sig → STRUCT • type_decl_name_with_params LPAREN separated_list(COMMA,type_) RPAREN optional_derive, EOF / SEMI] -// [164, type_decl_name_with_params → • uident optional_type_params_no_constraints, LPAREN / LBRACE] -// [212, uident → • UIDENT, LPAREN / LBRACKET / LBRACE] -fn yy_state_253(_lookahead : YYSymbol) -> YYDecision { +// [74, type_sig → STRUCT • type_decl_name_with_params LBRACE record_decl_body RBRACE optional_derive, EOF / SEMI] +// [80, type_sig → STRUCT • type_decl_name_with_params LPAREN separated_list(COMMA,type_) RPAREN optional_derive, EOF / SEMI] +// [168, type_decl_name_with_params → • uident optional_type_params_no_constraints, LPAREN / LBRACE] +// [216, uident → • UIDENT, LPAREN / LBRACKET / LBRACE] +fn yy_state_291(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_UIDENT => Shift(yy_state_25) - NT_uident => Shift(yy_state_246) - NT_type_decl_name_with_params => Shift(yy_state_254) + NT_uident => Shift(yy_state_284) + NT_type_decl_name_with_params => Shift(yy_state_292) _ => Error } } -// [70, type_sig → STRUCT type_decl_name_with_params • LBRACE record_decl_body RBRACE optional_derive, EOF / SEMI] -// [76, type_sig → STRUCT type_decl_name_with_params • LPAREN separated_list(COMMA,type_) RPAREN optional_derive, EOF / SEMI] -fn yy_state_254(_lookahead : YYSymbol) -> YYDecision { +// [74, type_sig → STRUCT type_decl_name_with_params • LBRACE record_decl_body RBRACE optional_derive, EOF / SEMI] +// [80, type_sig → STRUCT type_decl_name_with_params • LPAREN separated_list(COMMA,type_) RPAREN optional_derive, EOF / SEMI] +fn yy_state_292(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LPAREN => Shift(yy_state_255) - T_LBRACE => Shift(yy_state_260) - _ => Error - } -} - -// [76, type_sig → STRUCT type_decl_name_with_params LPAREN • separated_list(COMMA,type_) RPAREN optional_derive, EOF / SEMI] -// [167, simple_type → • simple_type QUESTION, RPAREN / COMMA / QUESTION] -// [168, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, RPAREN / COMMA / QUESTION] -// [169, simple_type → • LPAREN type_ RPAREN, RPAREN / COMMA / QUESTION] -// [170, simple_type → • qualified_uident_ optional_type_arguments, RPAREN / COMMA / QUESTION] -// [171, simple_type → • AMPER qualified_uident_, RPAREN / COMMA / QUESTION] -// [172, simple_type → • UNDERSCORE, RPAREN / COMMA / QUESTION] -// [173, type_ → • simple_type, RPAREN / COMMA] -// [174, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [175, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [176, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [177, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [178, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [179, type_ → • LPAREN RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [180, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [181, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [210, qualified_uident_ → • UIDENT, RPAREN / COMMA / QUESTION / LBRACKET] -// [211, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, RPAREN / COMMA / QUESTION / LBRACKET] -// [225, separated_list(COMMA,type_) → •, RPAREN] -// [226, separated_list(COMMA,type_) → • separated_nonempty_list(COMMA,type_), RPAREN] -// [250, separated_nonempty_list(COMMA,type_) → • type_, RPAREN] -// [251, separated_nonempty_list(COMMA,type_) → • type_ COMMA separated_nonempty_list(COMMA,type_), RPAREN] -fn yy_state_255(_lookahead : YYSymbol) -> YYDecision { + T_LPAREN => Shift(yy_state_293) + T_LBRACE => Shift(yy_state_298) + _ => Error + } +} + +// [80, type_sig → STRUCT type_decl_name_with_params LPAREN • separated_list(COMMA,type_) RPAREN optional_derive, EOF / SEMI] +// [171, simple_type → • simple_type QUESTION, RPAREN / COMMA / QUESTION] +// [172, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, RPAREN / COMMA / QUESTION] +// [173, simple_type → • LPAREN type_ RPAREN, RPAREN / COMMA / QUESTION] +// [174, simple_type → • qualified_uident_ optional_type_arguments, RPAREN / COMMA / QUESTION] +// [175, simple_type → • AMPER qualified_uident_, RPAREN / COMMA / QUESTION] +// [176, simple_type → • UNDERSCORE, RPAREN / COMMA / QUESTION] +// [177, type_ → • simple_type, RPAREN / COMMA] +// [178, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [179, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [180, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [181, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [182, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [183, type_ → • LPAREN RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [184, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [185, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [214, qualified_uident_ → • UIDENT, RPAREN / COMMA / QUESTION / LBRACKET] +// [215, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, RPAREN / COMMA / QUESTION / LBRACKET] +// [230, separated_list(COMMA,type_) → •, RPAREN] +// [231, separated_list(COMMA,type_) → • separated_nonempty_list(COMMA,type_), RPAREN] +// [255, separated_nonempty_list(COMMA,type_) → • type_, RPAREN] +// [256, separated_nonempty_list(COMMA,type_) → • type_ COMMA separated_nonempty_list(COMMA,type_), RPAREN] +fn yy_state_293(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_PACKAGE_NAME => Shift(yy_state_62) T_UIDENT => Shift(yy_state_64) @@ -7306,155 +8091,159 @@ fn yy_state_255(_lookahead : YYSymbol) -> YYDecision { NT_type_ => Shift(yy_state_80) T_LPAREN => Shift(yy_state_83) NT_simple_type => Shift(yy_state_106) - NT_separated_nonempty_list_COMMA_type__ => Shift(yy_state_256) - NT_separated_list_COMMA_type__ => Shift(yy_state_257) - T_RPAREN => Reduce(0, NT_separated_list_COMMA_type__, yy_action_157) + NT_separated_nonempty_list_COMMA_type__ => Shift(yy_state_294) + NT_separated_list_COMMA_type__ => Shift(yy_state_295) + T_RPAREN => Reduce(0, NT_separated_list_COMMA_type__, yy_action_155) _ => Error } } -// [226, separated_list(COMMA,type_) → separated_nonempty_list(COMMA,type_) •, RPAREN] -fn yy_state_256(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_separated_list_COMMA_type__, yy_action_156) +// [231, separated_list(COMMA,type_) → separated_nonempty_list(COMMA,type_) •, RPAREN] +fn yy_state_294(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_separated_list_COMMA_type__, yy_action_154) } -// [76, type_sig → STRUCT type_decl_name_with_params LPAREN separated_list(COMMA,type_) • RPAREN optional_derive, EOF / SEMI] -fn yy_state_257(_lookahead : YYSymbol) -> YYDecision { +// [80, type_sig → STRUCT type_decl_name_with_params LPAREN separated_list(COMMA,type_) • RPAREN optional_derive, EOF / SEMI] +fn yy_state_295(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RPAREN => Shift(yy_state_258) + T_RPAREN => Shift(yy_state_296) _ => Error } } -// [76, type_sig → STRUCT type_decl_name_with_params LPAREN separated_list(COMMA,type_) RPAREN • optional_derive, EOF / SEMI] -// [100, optional_derive → •, EOF / SEMI] -// [101, optional_derive → • DERIVE LPAREN non_empty_list_commas(qualified_uident) RPAREN, EOF / SEMI] -fn yy_state_258(_lookahead : YYSymbol) -> YYDecision { +// [80, type_sig → STRUCT type_decl_name_with_params LPAREN separated_list(COMMA,type_) RPAREN • optional_derive, EOF / SEMI] +// [104, optional_derive → •, EOF / SEMI] +// [105, optional_derive → • DERIVE LPAREN non_empty_list_commas(qualified_uident) RPAREN, EOF / SEMI] +fn yy_state_296(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_DERIVE => Shift(yy_state_230) - NT_optional_derive => Shift(yy_state_259) - T_EOF | T_SEMI => Reduce(0, NT_optional_derive, yy_action_165) + T_DERIVE => Shift(yy_state_268) + NT_optional_derive => Shift(yy_state_297) + T_EOF | T_SEMI => Reduce(0, NT_optional_derive, yy_action_163) _ => Error } } -// [76, type_sig → STRUCT type_decl_name_with_params LPAREN separated_list(COMMA,type_) RPAREN optional_derive •, EOF / SEMI] -fn yy_state_259(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(6, NT_type_sig, yy_action_155) -} - -// [70, type_sig → STRUCT type_decl_name_with_params LBRACE • record_decl_body RBRACE optional_derive, EOF / SEMI] -// [152, record_decl_field → • boption(MUTABLE) LIDENT COLON type_, SEMI / RBRACE] -// [153, record_decl_field → • nonempty_list(attribute) boption(MUTABLE) LIDENT COLON type_, SEMI / RBRACE] -// [154, record_decl_body → • separated_list(SEMI,record_decl_field), RBRACE] -// [240, boption(MUTABLE) → •, LIDENT] -// [241, boption(MUTABLE) → • MUTABLE, LIDENT] -// [242, separated_list(SEMI,record_decl_field) → •, RBRACE] -// [243, separated_list(SEMI,record_decl_field) → • separated_nonempty_list(SEMI,record_decl_field), RBRACE] -// [252, nonempty_list(attribute) → • ATTRIBUTE, LIDENT / MUTABLE] -// [253, nonempty_list(attribute) → • ATTRIBUTE nonempty_list(attribute), LIDENT / MUTABLE] -// [266, separated_nonempty_list(SEMI,record_decl_field) → • record_decl_field, RBRACE] -// [267, separated_nonempty_list(SEMI,record_decl_field) → • record_decl_field SEMI separated_nonempty_list(SEMI,record_decl_field), RBRACE] -fn yy_state_260(_lookahead : YYSymbol) -> YYDecision { +// [80, type_sig → STRUCT type_decl_name_with_params LPAREN separated_list(COMMA,type_) RPAREN optional_derive •, EOF / SEMI] +fn yy_state_297(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(6, NT_type_sig, yy_action_153) +} + +// [74, type_sig → STRUCT type_decl_name_with_params LBRACE • record_decl_body RBRACE optional_derive, EOF / SEMI] +// [156, record_decl_field → • boption(MUTABLE) lident COLON type_, SEMI / RBRACE] +// [157, record_decl_field → • nonempty_list(attribute) boption(MUTABLE) lident COLON type_, SEMI / RBRACE] +// [158, record_decl_body → • separated_list(SEMI,record_decl_field), RBRACE] +// [245, boption(MUTABLE) → •, LIDENT / EXTEND] +// [246, boption(MUTABLE) → • MUTABLE, LIDENT / EXTEND] +// [247, separated_list(SEMI,record_decl_field) → •, RBRACE] +// [248, separated_list(SEMI,record_decl_field) → • separated_nonempty_list(SEMI,record_decl_field), RBRACE] +// [257, nonempty_list(attribute) → • ATTRIBUTE, LIDENT / MUTABLE / EXTEND] +// [258, nonempty_list(attribute) → • ATTRIBUTE nonempty_list(attribute), LIDENT / MUTABLE / EXTEND] +// [271, separated_nonempty_list(SEMI,record_decl_field) → • record_decl_field, RBRACE] +// [272, separated_nonempty_list(SEMI,record_decl_field) → • record_decl_field SEMI separated_nonempty_list(SEMI,record_decl_field), RBRACE] +fn yy_state_298(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_ATTRIBUTE => Shift(yy_state_19) - T_MUTABLE => Shift(yy_state_208) - NT_record_decl_field => Shift(yy_state_261) - NT_nonempty_list_attribute_ => Shift(yy_state_264) - NT_boption_MUTABLE_ => Shift(yy_state_269) - NT_separated_nonempty_list_SEMI_record_decl_field_ => Shift(yy_state_273) - NT_separated_list_SEMI_record_decl_field_ => Shift(yy_state_274) - NT_record_decl_body => Shift(yy_state_275) - T_LIDENT => Reduce(0, NT_boption_MUTABLE_, yy_action_180) - T_RBRACE => Reduce(0, NT_separated_list_SEMI_record_decl_field_, yy_action_154) + T_MUTABLE => Shift(yy_state_246) + NT_record_decl_field => Shift(yy_state_299) + NT_nonempty_list_attribute_ => Shift(yy_state_302) + NT_boption_MUTABLE_ => Shift(yy_state_307) + NT_separated_nonempty_list_SEMI_record_decl_field_ => Shift(yy_state_311) + NT_separated_list_SEMI_record_decl_field_ => Shift(yy_state_312) + NT_record_decl_body => Shift(yy_state_313) + T_LIDENT | T_EXTEND => Reduce(0, NT_boption_MUTABLE_, yy_action_178) + T_RBRACE => Reduce(0, NT_separated_list_SEMI_record_decl_field_, yy_action_152) _ => Error } } -// [266, separated_nonempty_list(SEMI,record_decl_field) → record_decl_field •, RBRACE] -// [267, separated_nonempty_list(SEMI,record_decl_field) → record_decl_field • SEMI separated_nonempty_list(SEMI,record_decl_field), RBRACE] -fn yy_state_261(_lookahead : YYSymbol) -> YYDecision { +// [271, separated_nonempty_list(SEMI,record_decl_field) → record_decl_field •, RBRACE] +// [272, separated_nonempty_list(SEMI,record_decl_field) → record_decl_field • SEMI separated_nonempty_list(SEMI,record_decl_field), RBRACE] +fn yy_state_299(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_SEMI => Shift(yy_state_262) - T_RBRACE => Reduce(1, NT_separated_nonempty_list_SEMI_record_decl_field_, yy_action_153) + T_SEMI => Shift(yy_state_300) + T_RBRACE => Reduce(1, NT_separated_nonempty_list_SEMI_record_decl_field_, yy_action_151) _ => Error } } -// [152, record_decl_field → • boption(MUTABLE) LIDENT COLON type_, SEMI / RBRACE] -// [153, record_decl_field → • nonempty_list(attribute) boption(MUTABLE) LIDENT COLON type_, SEMI / RBRACE] -// [240, boption(MUTABLE) → •, LIDENT] -// [241, boption(MUTABLE) → • MUTABLE, LIDENT] -// [252, nonempty_list(attribute) → • ATTRIBUTE, LIDENT / MUTABLE] -// [253, nonempty_list(attribute) → • ATTRIBUTE nonempty_list(attribute), LIDENT / MUTABLE] -// [266, separated_nonempty_list(SEMI,record_decl_field) → • record_decl_field, RBRACE] -// [267, separated_nonempty_list(SEMI,record_decl_field) → • record_decl_field SEMI separated_nonempty_list(SEMI,record_decl_field), RBRACE] -// [267, separated_nonempty_list(SEMI,record_decl_field) → record_decl_field SEMI • separated_nonempty_list(SEMI,record_decl_field), RBRACE] -fn yy_state_262(_lookahead : YYSymbol) -> YYDecision { +// [156, record_decl_field → • boption(MUTABLE) lident COLON type_, SEMI / RBRACE] +// [157, record_decl_field → • nonempty_list(attribute) boption(MUTABLE) lident COLON type_, SEMI / RBRACE] +// [245, boption(MUTABLE) → •, LIDENT / EXTEND] +// [246, boption(MUTABLE) → • MUTABLE, LIDENT / EXTEND] +// [257, nonempty_list(attribute) → • ATTRIBUTE, LIDENT / MUTABLE / EXTEND] +// [258, nonempty_list(attribute) → • ATTRIBUTE nonempty_list(attribute), LIDENT / MUTABLE / EXTEND] +// [271, separated_nonempty_list(SEMI,record_decl_field) → • record_decl_field, RBRACE] +// [272, separated_nonempty_list(SEMI,record_decl_field) → • record_decl_field SEMI separated_nonempty_list(SEMI,record_decl_field), RBRACE] +// [272, separated_nonempty_list(SEMI,record_decl_field) → record_decl_field SEMI • separated_nonempty_list(SEMI,record_decl_field), RBRACE] +fn yy_state_300(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_ATTRIBUTE => Shift(yy_state_19) - T_MUTABLE => Shift(yy_state_208) - NT_record_decl_field => Shift(yy_state_261) - NT_separated_nonempty_list_SEMI_record_decl_field_ => Shift(yy_state_263) - NT_nonempty_list_attribute_ => Shift(yy_state_264) - NT_boption_MUTABLE_ => Shift(yy_state_269) - T_LIDENT => Reduce(0, NT_boption_MUTABLE_, yy_action_180) + T_MUTABLE => Shift(yy_state_246) + NT_record_decl_field => Shift(yy_state_299) + NT_separated_nonempty_list_SEMI_record_decl_field_ => Shift(yy_state_301) + NT_nonempty_list_attribute_ => Shift(yy_state_302) + NT_boption_MUTABLE_ => Shift(yy_state_307) + T_LIDENT | T_EXTEND => Reduce(0, NT_boption_MUTABLE_, yy_action_178) _ => Error } } -// [267, separated_nonempty_list(SEMI,record_decl_field) → record_decl_field SEMI separated_nonempty_list(SEMI,record_decl_field) •, RBRACE] -fn yy_state_263(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_separated_nonempty_list_SEMI_record_decl_field_, yy_action_152) +// [272, separated_nonempty_list(SEMI,record_decl_field) → record_decl_field SEMI separated_nonempty_list(SEMI,record_decl_field) •, RBRACE] +fn yy_state_301(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_separated_nonempty_list_SEMI_record_decl_field_, yy_action_150) } -// [153, record_decl_field → nonempty_list(attribute) • boption(MUTABLE) LIDENT COLON type_, SEMI / RBRACE] -// [240, boption(MUTABLE) → •, LIDENT] -// [241, boption(MUTABLE) → • MUTABLE, LIDENT] -fn yy_state_264(_lookahead : YYSymbol) -> YYDecision { +// [157, record_decl_field → nonempty_list(attribute) • boption(MUTABLE) lident COLON type_, SEMI / RBRACE] +// [245, boption(MUTABLE) → •, LIDENT / EXTEND] +// [246, boption(MUTABLE) → • MUTABLE, LIDENT / EXTEND] +fn yy_state_302(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_MUTABLE => Shift(yy_state_208) - NT_boption_MUTABLE_ => Shift(yy_state_265) - T_LIDENT => Reduce(0, NT_boption_MUTABLE_, yy_action_180) + T_MUTABLE => Shift(yy_state_246) + NT_boption_MUTABLE_ => Shift(yy_state_303) + T_LIDENT | T_EXTEND => Reduce(0, NT_boption_MUTABLE_, yy_action_178) _ => Error } } -// [153, record_decl_field → nonempty_list(attribute) boption(MUTABLE) • LIDENT COLON type_, SEMI / RBRACE] -fn yy_state_265(_lookahead : YYSymbol) -> YYDecision { +// [157, record_decl_field → nonempty_list(attribute) boption(MUTABLE) • lident COLON type_, SEMI / RBRACE] +// [217, lident → • LIDENT, COLON] +// [218, lident → • EXTEND, COLON] +fn yy_state_303(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LIDENT => Shift(yy_state_266) + T_EXTEND => Shift(yy_state_38) + T_LIDENT => Shift(yy_state_39) + NT_lident => Shift(yy_state_304) _ => Error } } -// [153, record_decl_field → nonempty_list(attribute) boption(MUTABLE) LIDENT • COLON type_, SEMI / RBRACE] -fn yy_state_266(_lookahead : YYSymbol) -> YYDecision { +// [157, record_decl_field → nonempty_list(attribute) boption(MUTABLE) lident • COLON type_, SEMI / RBRACE] +fn yy_state_304(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_COLON => Shift(yy_state_267) - _ => Error - } -} - -// [153, record_decl_field → nonempty_list(attribute) boption(MUTABLE) LIDENT COLON • type_, SEMI / RBRACE] -// [167, simple_type → • simple_type QUESTION, QUESTION / SEMI / RBRACE] -// [168, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, QUESTION / SEMI / RBRACE] -// [169, simple_type → • LPAREN type_ RPAREN, QUESTION / SEMI / RBRACE] -// [170, simple_type → • qualified_uident_ optional_type_arguments, QUESTION / SEMI / RBRACE] -// [171, simple_type → • AMPER qualified_uident_, QUESTION / SEMI / RBRACE] -// [172, simple_type → • UNDERSCORE, QUESTION / SEMI / RBRACE] -// [173, type_ → • simple_type, SEMI / RBRACE] -// [174, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, SEMI / RBRACE] -// [175, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, SEMI / RBRACE] -// [176, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, SEMI / RBRACE] -// [177, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, SEMI / RBRACE] -// [178, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, SEMI / RBRACE] -// [179, type_ → • LPAREN RPAREN THIN_ARROW return_type, SEMI / RBRACE] -// [180, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, SEMI / RBRACE] -// [181, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, SEMI / RBRACE] -// [210, qualified_uident_ → • UIDENT, QUESTION / SEMI / LBRACKET / RBRACE] -// [211, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, QUESTION / SEMI / LBRACKET / RBRACE] -fn yy_state_267(_lookahead : YYSymbol) -> YYDecision { + T_COLON => Shift(yy_state_305) + _ => Error + } +} + +// [157, record_decl_field → nonempty_list(attribute) boption(MUTABLE) lident COLON • type_, SEMI / RBRACE] +// [171, simple_type → • simple_type QUESTION, QUESTION / SEMI / RBRACE] +// [172, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, QUESTION / SEMI / RBRACE] +// [173, simple_type → • LPAREN type_ RPAREN, QUESTION / SEMI / RBRACE] +// [174, simple_type → • qualified_uident_ optional_type_arguments, QUESTION / SEMI / RBRACE] +// [175, simple_type → • AMPER qualified_uident_, QUESTION / SEMI / RBRACE] +// [176, simple_type → • UNDERSCORE, QUESTION / SEMI / RBRACE] +// [177, type_ → • simple_type, SEMI / RBRACE] +// [178, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, SEMI / RBRACE] +// [179, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, SEMI / RBRACE] +// [180, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, SEMI / RBRACE] +// [181, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, SEMI / RBRACE] +// [182, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, SEMI / RBRACE] +// [183, type_ → • LPAREN RPAREN THIN_ARROW return_type, SEMI / RBRACE] +// [184, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, SEMI / RBRACE] +// [185, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, SEMI / RBRACE] +// [214, qualified_uident_ → • UIDENT, QUESTION / SEMI / LBRACKET / RBRACE] +// [215, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, QUESTION / SEMI / LBRACKET / RBRACE] +fn yy_state_305(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_PACKAGE_NAME => Shift(yy_state_62) T_UIDENT => Shift(yy_state_64) @@ -7464,51 +8253,55 @@ fn yy_state_267(_lookahead : YYSymbol) -> YYDecision { NT_qualified_uident_ => Shift(yy_state_78) T_LPAREN => Shift(yy_state_83) NT_simple_type => Shift(yy_state_106) - NT_type_ => Shift(yy_state_268) + NT_type_ => Shift(yy_state_306) _ => Error } } -// [153, record_decl_field → nonempty_list(attribute) boption(MUTABLE) LIDENT COLON type_ •, SEMI / RBRACE] -fn yy_state_268(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(5, NT_record_decl_field, yy_action_151) +// [157, record_decl_field → nonempty_list(attribute) boption(MUTABLE) lident COLON type_ •, SEMI / RBRACE] +fn yy_state_306(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(5, NT_record_decl_field, yy_action_149) } -// [152, record_decl_field → boption(MUTABLE) • LIDENT COLON type_, SEMI / RBRACE] -fn yy_state_269(_lookahead : YYSymbol) -> YYDecision { +// [156, record_decl_field → boption(MUTABLE) • lident COLON type_, SEMI / RBRACE] +// [217, lident → • LIDENT, COLON] +// [218, lident → • EXTEND, COLON] +fn yy_state_307(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LIDENT => Shift(yy_state_270) + T_EXTEND => Shift(yy_state_38) + T_LIDENT => Shift(yy_state_39) + NT_lident => Shift(yy_state_308) _ => Error } } -// [152, record_decl_field → boption(MUTABLE) LIDENT • COLON type_, SEMI / RBRACE] -fn yy_state_270(_lookahead : YYSymbol) -> YYDecision { +// [156, record_decl_field → boption(MUTABLE) lident • COLON type_, SEMI / RBRACE] +fn yy_state_308(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_COLON => Shift(yy_state_271) - _ => Error - } -} - -// [152, record_decl_field → boption(MUTABLE) LIDENT COLON • type_, SEMI / RBRACE] -// [167, simple_type → • simple_type QUESTION, QUESTION / SEMI / RBRACE] -// [168, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, QUESTION / SEMI / RBRACE] -// [169, simple_type → • LPAREN type_ RPAREN, QUESTION / SEMI / RBRACE] -// [170, simple_type → • qualified_uident_ optional_type_arguments, QUESTION / SEMI / RBRACE] -// [171, simple_type → • AMPER qualified_uident_, QUESTION / SEMI / RBRACE] -// [172, simple_type → • UNDERSCORE, QUESTION / SEMI / RBRACE] -// [173, type_ → • simple_type, SEMI / RBRACE] -// [174, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, SEMI / RBRACE] -// [175, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, SEMI / RBRACE] -// [176, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, SEMI / RBRACE] -// [177, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, SEMI / RBRACE] -// [178, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, SEMI / RBRACE] -// [179, type_ → • LPAREN RPAREN THIN_ARROW return_type, SEMI / RBRACE] -// [180, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, SEMI / RBRACE] -// [181, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, SEMI / RBRACE] -// [210, qualified_uident_ → • UIDENT, QUESTION / SEMI / LBRACKET / RBRACE] -// [211, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, QUESTION / SEMI / LBRACKET / RBRACE] -fn yy_state_271(_lookahead : YYSymbol) -> YYDecision { + T_COLON => Shift(yy_state_309) + _ => Error + } +} + +// [156, record_decl_field → boption(MUTABLE) lident COLON • type_, SEMI / RBRACE] +// [171, simple_type → • simple_type QUESTION, QUESTION / SEMI / RBRACE] +// [172, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, QUESTION / SEMI / RBRACE] +// [173, simple_type → • LPAREN type_ RPAREN, QUESTION / SEMI / RBRACE] +// [174, simple_type → • qualified_uident_ optional_type_arguments, QUESTION / SEMI / RBRACE] +// [175, simple_type → • AMPER qualified_uident_, QUESTION / SEMI / RBRACE] +// [176, simple_type → • UNDERSCORE, QUESTION / SEMI / RBRACE] +// [177, type_ → • simple_type, SEMI / RBRACE] +// [178, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, SEMI / RBRACE] +// [179, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, SEMI / RBRACE] +// [180, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, SEMI / RBRACE] +// [181, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, SEMI / RBRACE] +// [182, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, SEMI / RBRACE] +// [183, type_ → • LPAREN RPAREN THIN_ARROW return_type, SEMI / RBRACE] +// [184, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, SEMI / RBRACE] +// [185, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, SEMI / RBRACE] +// [214, qualified_uident_ → • UIDENT, QUESTION / SEMI / LBRACKET / RBRACE] +// [215, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, QUESTION / SEMI / LBRACKET / RBRACE] +fn yy_state_309(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_PACKAGE_NAME => Shift(yy_state_62) T_UIDENT => Shift(yy_state_64) @@ -7518,174 +8311,174 @@ fn yy_state_271(_lookahead : YYSymbol) -> YYDecision { NT_qualified_uident_ => Shift(yy_state_78) T_LPAREN => Shift(yy_state_83) NT_simple_type => Shift(yy_state_106) - NT_type_ => Shift(yy_state_272) + NT_type_ => Shift(yy_state_310) _ => Error } } -// [152, record_decl_field → boption(MUTABLE) LIDENT COLON type_ •, SEMI / RBRACE] -fn yy_state_272(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(4, NT_record_decl_field, yy_action_150) +// [156, record_decl_field → boption(MUTABLE) lident COLON type_ •, SEMI / RBRACE] +fn yy_state_310(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(4, NT_record_decl_field, yy_action_148) } -// [243, separated_list(SEMI,record_decl_field) → separated_nonempty_list(SEMI,record_decl_field) •, RBRACE] -fn yy_state_273(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_separated_list_SEMI_record_decl_field_, yy_action_149) +// [248, separated_list(SEMI,record_decl_field) → separated_nonempty_list(SEMI,record_decl_field) •, RBRACE] +fn yy_state_311(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_separated_list_SEMI_record_decl_field_, yy_action_147) } -// [154, record_decl_body → separated_list(SEMI,record_decl_field) •, RBRACE] -fn yy_state_274(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_record_decl_body, yy_action_148) +// [158, record_decl_body → separated_list(SEMI,record_decl_field) •, RBRACE] +fn yy_state_312(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_record_decl_body, yy_action_146) } -// [70, type_sig → STRUCT type_decl_name_with_params LBRACE record_decl_body • RBRACE optional_derive, EOF / SEMI] -fn yy_state_275(_lookahead : YYSymbol) -> YYDecision { +// [74, type_sig → STRUCT type_decl_name_with_params LBRACE record_decl_body • RBRACE optional_derive, EOF / SEMI] +fn yy_state_313(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RBRACE => Shift(yy_state_276) + T_RBRACE => Shift(yy_state_314) _ => Error } } -// [70, type_sig → STRUCT type_decl_name_with_params LBRACE record_decl_body RBRACE • optional_derive, EOF / SEMI] -// [100, optional_derive → •, EOF / SEMI] -// [101, optional_derive → • DERIVE LPAREN non_empty_list_commas(qualified_uident) RPAREN, EOF / SEMI] -fn yy_state_276(_lookahead : YYSymbol) -> YYDecision { +// [74, type_sig → STRUCT type_decl_name_with_params LBRACE record_decl_body RBRACE • optional_derive, EOF / SEMI] +// [104, optional_derive → •, EOF / SEMI] +// [105, optional_derive → • DERIVE LPAREN non_empty_list_commas(qualified_uident) RPAREN, EOF / SEMI] +fn yy_state_314(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_DERIVE => Shift(yy_state_230) - NT_optional_derive => Shift(yy_state_277) - T_EOF | T_SEMI => Reduce(0, NT_optional_derive, yy_action_165) + T_DERIVE => Shift(yy_state_268) + NT_optional_derive => Shift(yy_state_315) + T_EOF | T_SEMI => Reduce(0, NT_optional_derive, yy_action_163) _ => Error } } -// [70, type_sig → STRUCT type_decl_name_with_params LBRACE record_decl_body RBRACE optional_derive •, EOF / SEMI] -fn yy_state_277(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(6, NT_type_sig, yy_action_147) +// [74, type_sig → STRUCT type_decl_name_with_params LBRACE record_decl_body RBRACE optional_derive •, EOF / SEMI] +fn yy_state_315(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(6, NT_type_sig, yy_action_145) } -// [58, type_sig → SUBERROR • uident optional_derive, EOF / SEMI] -// [64, type_sig → SUBERROR • uident LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [212, uident → • UIDENT, EOF / DERIVE / SEMI / LBRACE] -fn yy_state_278(_lookahead : YYSymbol) -> YYDecision { +// [62, type_sig → SUBERROR • uident optional_derive, EOF / SEMI] +// [68, type_sig → SUBERROR • uident LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [216, uident → • UIDENT, EOF / DERIVE / SEMI / LBRACE] +fn yy_state_316(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_UIDENT => Shift(yy_state_25) - NT_uident => Shift(yy_state_279) + NT_uident => Shift(yy_state_317) _ => Error } } -// [58, type_sig → SUBERROR uident • optional_derive, EOF / SEMI] -// [64, type_sig → SUBERROR uident • LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [100, optional_derive → •, EOF / SEMI] -// [101, optional_derive → • DERIVE LPAREN non_empty_list_commas(qualified_uident) RPAREN, EOF / SEMI] -fn yy_state_279(_lookahead : YYSymbol) -> YYDecision { +// [62, type_sig → SUBERROR uident • optional_derive, EOF / SEMI] +// [68, type_sig → SUBERROR uident • LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [104, optional_derive → •, EOF / SEMI] +// [105, optional_derive → • DERIVE LPAREN non_empty_list_commas(qualified_uident) RPAREN, EOF / SEMI] +fn yy_state_317(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_DERIVE => Shift(yy_state_230) - T_LBRACE => Shift(yy_state_280) - NT_optional_derive => Shift(yy_state_284) - T_EOF | T_SEMI => Reduce(0, NT_optional_derive, yy_action_165) + T_DERIVE => Shift(yy_state_268) + T_LBRACE => Shift(yy_state_318) + NT_optional_derive => Shift(yy_state_322) + T_EOF | T_SEMI => Reduce(0, NT_optional_derive, yy_action_163) _ => Error } } -// [64, type_sig → SUBERROR uident LBRACE • separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [148, enum_constructor → • UIDENT option(delimited(LPAREN,separated_nonempty_list(COMMA,constructor_param),RPAREN)) option(eq_tag), SEMI / RBRACE] -// [149, enum_constructor → • nonempty_list(attribute) UIDENT option(delimited(LPAREN,separated_nonempty_list(COMMA,constructor_param),RPAREN)) option(eq_tag), SEMI / RBRACE] -// [223, separated_list(SEMI,enum_constructor) → •, RBRACE] -// [224, separated_list(SEMI,enum_constructor) → • separated_nonempty_list(SEMI,enum_constructor), RBRACE] -// [252, nonempty_list(attribute) → • ATTRIBUTE, UIDENT] -// [253, nonempty_list(attribute) → • ATTRIBUTE nonempty_list(attribute), UIDENT] -// [260, separated_nonempty_list(SEMI,enum_constructor) → • enum_constructor, RBRACE] -// [261, separated_nonempty_list(SEMI,enum_constructor) → • enum_constructor SEMI separated_nonempty_list(SEMI,enum_constructor), RBRACE] -fn yy_state_280(_lookahead : YYSymbol) -> YYDecision { +// [68, type_sig → SUBERROR uident LBRACE • separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [152, enum_constructor → • UIDENT option(delimited(LPAREN,separated_nonempty_list(COMMA,constructor_param),RPAREN)) option(eq_tag), SEMI / RBRACE] +// [153, enum_constructor → • nonempty_list(attribute) UIDENT option(delimited(LPAREN,separated_nonempty_list(COMMA,constructor_param),RPAREN)) option(eq_tag), SEMI / RBRACE] +// [228, separated_list(SEMI,enum_constructor) → •, RBRACE] +// [229, separated_list(SEMI,enum_constructor) → • separated_nonempty_list(SEMI,enum_constructor), RBRACE] +// [257, nonempty_list(attribute) → • ATTRIBUTE, UIDENT] +// [258, nonempty_list(attribute) → • ATTRIBUTE nonempty_list(attribute), UIDENT] +// [265, separated_nonempty_list(SEMI,enum_constructor) → • enum_constructor, RBRACE] +// [266, separated_nonempty_list(SEMI,enum_constructor) → • enum_constructor SEMI separated_nonempty_list(SEMI,enum_constructor), RBRACE] +fn yy_state_318(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_ATTRIBUTE => Shift(yy_state_19) - NT_enum_constructor => Shift(yy_state_202) - NT_nonempty_list_attribute_ => Shift(yy_state_205) - T_UIDENT => Shift(yy_state_224) - NT_separated_nonempty_list_SEMI_enum_constructor_ => Shift(yy_state_227) - NT_separated_list_SEMI_enum_constructor_ => Shift(yy_state_281) - T_RBRACE => Reduce(0, NT_separated_list_SEMI_enum_constructor_, yy_action_184) + NT_enum_constructor => Shift(yy_state_240) + NT_nonempty_list_attribute_ => Shift(yy_state_243) + T_UIDENT => Shift(yy_state_262) + NT_separated_nonempty_list_SEMI_enum_constructor_ => Shift(yy_state_265) + NT_separated_list_SEMI_enum_constructor_ => Shift(yy_state_319) + T_RBRACE => Reduce(0, NT_separated_list_SEMI_enum_constructor_, yy_action_182) _ => Error } } -// [64, type_sig → SUBERROR uident LBRACE separated_list(SEMI,enum_constructor) • RBRACE optional_derive, EOF / SEMI] -fn yy_state_281(_lookahead : YYSymbol) -> YYDecision { +// [68, type_sig → SUBERROR uident LBRACE separated_list(SEMI,enum_constructor) • RBRACE optional_derive, EOF / SEMI] +fn yy_state_319(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RBRACE => Shift(yy_state_282) + T_RBRACE => Shift(yy_state_320) _ => Error } } -// [64, type_sig → SUBERROR uident LBRACE separated_list(SEMI,enum_constructor) RBRACE • optional_derive, EOF / SEMI] -// [100, optional_derive → •, EOF / SEMI] -// [101, optional_derive → • DERIVE LPAREN non_empty_list_commas(qualified_uident) RPAREN, EOF / SEMI] -fn yy_state_282(_lookahead : YYSymbol) -> YYDecision { +// [68, type_sig → SUBERROR uident LBRACE separated_list(SEMI,enum_constructor) RBRACE • optional_derive, EOF / SEMI] +// [104, optional_derive → •, EOF / SEMI] +// [105, optional_derive → • DERIVE LPAREN non_empty_list_commas(qualified_uident) RPAREN, EOF / SEMI] +fn yy_state_320(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_DERIVE => Shift(yy_state_230) - NT_optional_derive => Shift(yy_state_283) - T_EOF | T_SEMI => Reduce(0, NT_optional_derive, yy_action_165) + T_DERIVE => Shift(yy_state_268) + NT_optional_derive => Shift(yy_state_321) + T_EOF | T_SEMI => Reduce(0, NT_optional_derive, yy_action_163) _ => Error } } -// [64, type_sig → SUBERROR uident LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive •, EOF / SEMI] -fn yy_state_283(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(6, NT_type_sig, yy_action_146) +// [68, type_sig → SUBERROR uident LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive •, EOF / SEMI] +fn yy_state_321(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(6, NT_type_sig, yy_action_144) } -// [58, type_sig → SUBERROR uident optional_derive •, EOF / SEMI] -fn yy_state_284(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_type_sig, yy_action_145) +// [62, type_sig → SUBERROR uident optional_derive •, EOF / SEMI] +fn yy_state_322(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_type_sig, yy_action_143) } -// [52, type_sig → TYPE • type_decl_name_with_params optional_derive, EOF / SEMI] -// [124, alias_sig → TYPE • type_decl_name_with_params EQUAL type_, EOF / SEMI] -// [164, type_decl_name_with_params → • uident optional_type_params_no_constraints, EOF / DERIVE / EQUAL / SEMI] -// [212, uident → • UIDENT, EOF / DERIVE / EQUAL / SEMI / LBRACKET] -fn yy_state_285(_lookahead : YYSymbol) -> YYDecision { +// [56, type_sig → TYPE • type_decl_name_with_params optional_derive, EOF / SEMI] +// [128, alias_sig → TYPE • type_decl_name_with_params EQUAL type_, EOF / SEMI] +// [168, type_decl_name_with_params → • uident optional_type_params_no_constraints, EOF / DERIVE / EQUAL / SEMI] +// [216, uident → • UIDENT, EOF / DERIVE / EQUAL / SEMI / LBRACKET] +fn yy_state_323(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_UIDENT => Shift(yy_state_25) - NT_uident => Shift(yy_state_246) - NT_type_decl_name_with_params => Shift(yy_state_286) + NT_uident => Shift(yy_state_284) + NT_type_decl_name_with_params => Shift(yy_state_324) _ => Error } } -// [52, type_sig → TYPE type_decl_name_with_params • optional_derive, EOF / SEMI] -// [100, optional_derive → •, EOF / SEMI] -// [101, optional_derive → • DERIVE LPAREN non_empty_list_commas(qualified_uident) RPAREN, EOF / SEMI] -// [124, alias_sig → TYPE type_decl_name_with_params • EQUAL type_, EOF / SEMI] -fn yy_state_286(_lookahead : YYSymbol) -> YYDecision { +// [56, type_sig → TYPE type_decl_name_with_params • optional_derive, EOF / SEMI] +// [104, optional_derive → •, EOF / SEMI] +// [105, optional_derive → • DERIVE LPAREN non_empty_list_commas(qualified_uident) RPAREN, EOF / SEMI] +// [128, alias_sig → TYPE type_decl_name_with_params • EQUAL type_, EOF / SEMI] +fn yy_state_324(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_DERIVE => Shift(yy_state_230) - T_EQUAL => Shift(yy_state_287) - NT_optional_derive => Shift(yy_state_289) - T_EOF | T_SEMI => Reduce(0, NT_optional_derive, yy_action_165) - _ => Error - } -} - -// [124, alias_sig → TYPE type_decl_name_with_params EQUAL • type_, EOF / SEMI] -// [167, simple_type → • simple_type QUESTION, EOF / QUESTION / SEMI] -// [168, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, EOF / QUESTION / SEMI] -// [169, simple_type → • LPAREN type_ RPAREN, EOF / QUESTION / SEMI] -// [170, simple_type → • qualified_uident_ optional_type_arguments, EOF / QUESTION / SEMI] -// [171, simple_type → • AMPER qualified_uident_, EOF / QUESTION / SEMI] -// [172, simple_type → • UNDERSCORE, EOF / QUESTION / SEMI] -// [173, type_ → • simple_type, EOF / SEMI] -// [174, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] -// [175, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] -// [176, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] -// [177, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] -// [178, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] -// [179, type_ → • LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] -// [180, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] -// [181, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] -// [210, qualified_uident_ → • UIDENT, EOF / QUESTION / SEMI / LBRACKET] -// [211, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, EOF / QUESTION / SEMI / LBRACKET] -fn yy_state_287(_lookahead : YYSymbol) -> YYDecision { + T_DERIVE => Shift(yy_state_268) + T_EQUAL => Shift(yy_state_325) + NT_optional_derive => Shift(yy_state_327) + T_EOF | T_SEMI => Reduce(0, NT_optional_derive, yy_action_163) + _ => Error + } +} + +// [128, alias_sig → TYPE type_decl_name_with_params EQUAL • type_, EOF / SEMI] +// [171, simple_type → • simple_type QUESTION, EOF / QUESTION / SEMI] +// [172, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, EOF / QUESTION / SEMI] +// [173, simple_type → • LPAREN type_ RPAREN, EOF / QUESTION / SEMI] +// [174, simple_type → • qualified_uident_ optional_type_arguments, EOF / QUESTION / SEMI] +// [175, simple_type → • AMPER qualified_uident_, EOF / QUESTION / SEMI] +// [176, simple_type → • UNDERSCORE, EOF / QUESTION / SEMI] +// [177, type_ → • simple_type, EOF / SEMI] +// [178, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] +// [179, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] +// [180, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] +// [181, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] +// [182, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] +// [183, type_ → • LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] +// [184, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] +// [185, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] +// [214, qualified_uident_ → • UIDENT, EOF / QUESTION / SEMI / LBRACKET] +// [215, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, EOF / QUESTION / SEMI / LBRACKET] +fn yy_state_325(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_PACKAGE_NAME => Shift(yy_state_62) T_UIDENT => Shift(yy_state_64) @@ -7695,101 +8488,102 @@ fn yy_state_287(_lookahead : YYSymbol) -> YYDecision { NT_qualified_uident_ => Shift(yy_state_78) T_LPAREN => Shift(yy_state_83) NT_simple_type => Shift(yy_state_106) - NT_type_ => Shift(yy_state_288) + NT_type_ => Shift(yy_state_326) _ => Error } } -// [124, alias_sig → TYPE type_decl_name_with_params EQUAL type_ •, EOF / SEMI] -fn yy_state_288(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(4, NT_alias_sig, yy_action_144) +// [128, alias_sig → TYPE type_decl_name_with_params EQUAL type_ •, EOF / SEMI] +fn yy_state_326(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(4, NT_alias_sig, yy_action_142) } -// [52, type_sig → TYPE type_decl_name_with_params optional_derive •, EOF / SEMI] -fn yy_state_289(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_type_sig, yy_action_143) +// [56, type_sig → TYPE type_decl_name_with_params optional_derive •, EOF / SEMI] +fn yy_state_327(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_type_sig, yy_action_141) } // [37, func_sig → FN • loption(type_params_with_constraints) func_name LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type, EOF / SEMI] -// [157, type_params_with_constraints → • LBRACKET separated_list(COMMA,type_param_with_constraints) RBRACKET, LIDENT / UIDENT / AMPER] -// [217, loption(type_params_with_constraints) → •, LIDENT / UIDENT / AMPER] -// [218, loption(type_params_with_constraints) → • type_params_with_constraints, LIDENT / UIDENT / AMPER] -fn yy_state_290(_lookahead : YYSymbol) -> YYDecision { +// [161, type_params_with_constraints → • LBRACKET separated_list(COMMA,type_param_with_constraints) RBRACKET, LIDENT / UIDENT / AMPER / EXTEND] +// [222, loption(type_params_with_constraints) → •, LIDENT / UIDENT / AMPER / EXTEND] +// [223, loption(type_params_with_constraints) → • type_params_with_constraints, LIDENT / UIDENT / AMPER / EXTEND] +fn yy_state_328(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACKET => Shift(yy_state_162) - NT_type_params_with_constraints => Shift(yy_state_291) - NT_loption_type_params_with_constraints_ => Shift(yy_state_292) - T_LIDENT | T_UIDENT | T_AMPER => Reduce(0, NT_loption_type_params_with_constraints_, yy_action_142) + NT_type_params_with_constraints => Shift(yy_state_143) + T_LBRACKET => Shift(yy_state_144) + NT_loption_type_params_with_constraints_ => Shift(yy_state_329) + T_LIDENT | T_UIDENT | T_AMPER | T_EXTEND => Reduce(0, NT_loption_type_params_with_constraints_, yy_action_217) _ => Error } } -// [218, loption(type_params_with_constraints) → type_params_with_constraints •, LIDENT / UIDENT / AMPER] -fn yy_state_291(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_loption_type_params_with_constraints_, yy_action_141) -} - -// [28, method_self_type_coloncolon → • UIDENT COLONCOLON, LIDENT / UIDENT] -// [29, method_self_type_coloncolon → • AMPER UIDENT COLONCOLON, LIDENT / UIDENT] +// [28, method_self_type_coloncolon → • UIDENT COLONCOLON, LIDENT / UIDENT / EXTEND] +// [29, method_self_type_coloncolon → • AMPER UIDENT COLONCOLON, LIDENT / UIDENT / EXTEND] // [30, luident → • lident, LPAREN] // [31, luident → • uident, LPAREN] // [32, func_name → • luident, LPAREN] // [33, func_name → • method_self_type_coloncolon luident, LPAREN] // [37, func_sig → FN loption(type_params_with_constraints) • func_name LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type, EOF / SEMI] -// [212, uident → • UIDENT, LPAREN] -// [213, lident → • LIDENT, LPAREN] -fn yy_state_292(_lookahead : YYSymbol) -> YYDecision { +// [216, uident → • UIDENT, LPAREN] +// [217, lident → • LIDENT, LPAREN] +// [218, lident → • EXTEND, LPAREN] +fn yy_state_329(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LIDENT => Shift(yy_state_38) - NT_func_name => Shift(yy_state_293) - NT_method_self_type_coloncolon => Shift(yy_state_299) - NT_uident => Shift(yy_state_301) - NT_lident => Shift(yy_state_302) - NT_luident => Shift(yy_state_303) - T_AMPER => Shift(yy_state_304) - T_UIDENT => Shift(yy_state_307) + T_EXTEND => Shift(yy_state_38) + T_LIDENT => Shift(yy_state_39) + NT_func_name => Shift(yy_state_330) + NT_method_self_type_coloncolon => Shift(yy_state_336) + NT_uident => Shift(yy_state_338) + NT_lident => Shift(yy_state_339) + NT_luident => Shift(yy_state_340) + T_AMPER => Shift(yy_state_341) + T_UIDENT => Shift(yy_state_344) _ => Error } } // [37, func_sig → FN loption(type_params_with_constraints) func_name • LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type, EOF / SEMI] -fn yy_state_293(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_330(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LPAREN => Shift(yy_state_294) + T_LPAREN => Shift(yy_state_331) _ => Error } } // [37, func_sig → FN loption(type_params_with_constraints) func_name LPAREN • separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type, EOF / SEMI] -// [167, simple_type → • simple_type QUESTION, RPAREN / COMMA / QUESTION] -// [168, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, RPAREN / COMMA / QUESTION] -// [169, simple_type → • LPAREN type_ RPAREN, RPAREN / COMMA / QUESTION] -// [170, simple_type → • qualified_uident_ optional_type_arguments, RPAREN / COMMA / QUESTION] -// [171, simple_type → • AMPER qualified_uident_, RPAREN / COMMA / QUESTION] -// [172, simple_type → • UNDERSCORE, RPAREN / COMMA / QUESTION] -// [173, type_ → • simple_type, RPAREN / COMMA] -// [174, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [175, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [176, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [177, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [178, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [179, type_ → • LPAREN RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [180, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [181, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [190, parameter → • type_, RPAREN / COMMA] -// [191, parameter → • POST_LABEL COLON type_, RPAREN / COMMA] -// [192, parameter → • label QUESTION COLON type_, RPAREN / COMMA] -// [210, qualified_uident_ → • UIDENT, RPAREN / COMMA / QUESTION / LBRACKET] -// [211, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, RPAREN / COMMA / QUESTION / LBRACKET] -// [214, label → • LIDENT, QUESTION] -// [219, separated_list(COMMA,parameter) → •, RPAREN] -// [220, separated_list(COMMA,parameter) → • separated_nonempty_list(COMMA,parameter), RPAREN] -// [258, separated_nonempty_list(COMMA,parameter) → • parameter, RPAREN] -// [259, separated_nonempty_list(COMMA,parameter) → • parameter COMMA separated_nonempty_list(COMMA,parameter), RPAREN] -fn yy_state_294(_lookahead : YYSymbol) -> YYDecision { +// [171, simple_type → • simple_type QUESTION, RPAREN / COMMA / QUESTION] +// [172, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, RPAREN / COMMA / QUESTION] +// [173, simple_type → • LPAREN type_ RPAREN, RPAREN / COMMA / QUESTION] +// [174, simple_type → • qualified_uident_ optional_type_arguments, RPAREN / COMMA / QUESTION] +// [175, simple_type → • AMPER qualified_uident_, RPAREN / COMMA / QUESTION] +// [176, simple_type → • UNDERSCORE, RPAREN / COMMA / QUESTION] +// [177, type_ → • simple_type, RPAREN / COMMA] +// [178, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [179, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [180, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [181, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [182, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [183, type_ → • LPAREN RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [184, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [185, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [194, parameter → • type_, RPAREN / COMMA] +// [195, parameter → • POST_LABEL COLON type_, RPAREN / COMMA] +// [196, parameter → • label QUESTION COLON type_, RPAREN / COMMA] +// [214, qualified_uident_ → • UIDENT, RPAREN / COMMA / QUESTION / LBRACKET] +// [215, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, RPAREN / COMMA / QUESTION / LBRACKET] +// [217, lident → • LIDENT, QUESTION] +// [218, lident → • EXTEND, QUESTION] +// [219, label → • lident, QUESTION] +// [224, separated_list(COMMA,parameter) → •, RPAREN] +// [225, separated_list(COMMA,parameter) → • separated_nonempty_list(COMMA,parameter), RPAREN] +// [263, separated_nonempty_list(COMMA,parameter) → • parameter, RPAREN] +// [264, separated_nonempty_list(COMMA,parameter) → • parameter COMMA separated_nonempty_list(COMMA,parameter), RPAREN] +fn yy_state_331(_lookahead : YYSymbol) -> YYDecision { match _lookahead { + T_EXTEND => Shift(yy_state_38) + T_LIDENT => Shift(yy_state_39) NT_parameter => Shift(yy_state_58) - T_LIDENT => Shift(yy_state_61) + NT_lident => Shift(yy_state_61) T_PACKAGE_NAME => Shift(yy_state_62) T_UIDENT => Shift(yy_state_64) NT_label => Shift(yy_state_65) @@ -7802,52 +8596,52 @@ fn yy_state_294(_lookahead : YYSymbol) -> YYDecision { T_POST_LABEL => Shift(yy_state_122) NT_type_ => Shift(yy_state_125) NT_separated_nonempty_list_COMMA_parameter_ => Shift(yy_state_126) - NT_separated_list_COMMA_parameter_ => Shift(yy_state_295) - T_RPAREN => Reduce(0, NT_separated_list_COMMA_parameter_, yy_action_256) + NT_separated_list_COMMA_parameter_ => Shift(yy_state_332) + T_RPAREN => Reduce(0, NT_separated_list_COMMA_parameter_, yy_action_260) _ => Error } } // [37, func_sig → FN loption(type_params_with_constraints) func_name LPAREN separated_list(COMMA,parameter) • RPAREN THIN_ARROW return_type, EOF / SEMI] -fn yy_state_295(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_332(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RPAREN => Shift(yy_state_296) + T_RPAREN => Shift(yy_state_333) _ => Error } } // [37, func_sig → FN loption(type_params_with_constraints) func_name LPAREN separated_list(COMMA,parameter) RPAREN • THIN_ARROW return_type, EOF / SEMI] -fn yy_state_296(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_333(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_THIN_ARROW => Shift(yy_state_297) + T_THIN_ARROW => Shift(yy_state_334) _ => Error } } // [37, func_sig → FN loption(type_params_with_constraints) func_name LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW • return_type, EOF / SEMI] -// [167, simple_type → • simple_type QUESTION, EOF / RAISE / QUESTION / SEMI / NORAISE] -// [168, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, EOF / RAISE / QUESTION / SEMI / NORAISE] -// [169, simple_type → • LPAREN type_ RPAREN, EOF / RAISE / QUESTION / SEMI / NORAISE] -// [170, simple_type → • qualified_uident_ optional_type_arguments, EOF / RAISE / QUESTION / SEMI / NORAISE] -// [171, simple_type → • AMPER qualified_uident_, EOF / RAISE / QUESTION / SEMI / NORAISE] -// [172, simple_type → • UNDERSCORE, EOF / RAISE / QUESTION / SEMI / NORAISE] -// [173, type_ → • simple_type, EOF / SEMI] -// [174, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] -// [175, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] -// [176, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] -// [177, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] -// [178, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] -// [179, type_ → • LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] -// [180, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] -// [181, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] -// [182, return_type → • type_, EOF / SEMI] -// [183, return_type → • simple_type NORAISE, EOF / SEMI] -// [184, return_type → • simple_type RAISE, EOF / SEMI] -// [185, return_type → • simple_type RAISE error_type, EOF / SEMI] -// [186, return_type → • simple_type RAISE QUESTION, EOF / SEMI] -// [210, qualified_uident_ → • UIDENT, EOF / RAISE / QUESTION / SEMI / LBRACKET / NORAISE] -// [211, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, EOF / RAISE / QUESTION / SEMI / LBRACKET / NORAISE] -fn yy_state_297(_lookahead : YYSymbol) -> YYDecision { +// [171, simple_type → • simple_type QUESTION, EOF / RAISE / QUESTION / SEMI / NORAISE] +// [172, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, EOF / RAISE / QUESTION / SEMI / NORAISE] +// [173, simple_type → • LPAREN type_ RPAREN, EOF / RAISE / QUESTION / SEMI / NORAISE] +// [174, simple_type → • qualified_uident_ optional_type_arguments, EOF / RAISE / QUESTION / SEMI / NORAISE] +// [175, simple_type → • AMPER qualified_uident_, EOF / RAISE / QUESTION / SEMI / NORAISE] +// [176, simple_type → • UNDERSCORE, EOF / RAISE / QUESTION / SEMI / NORAISE] +// [177, type_ → • simple_type, EOF / SEMI] +// [178, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] +// [179, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] +// [180, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] +// [181, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] +// [182, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] +// [183, type_ → • LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] +// [184, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] +// [185, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] +// [186, return_type → • type_, EOF / SEMI] +// [187, return_type → • simple_type NORAISE, EOF / SEMI] +// [188, return_type → • simple_type RAISE, EOF / SEMI] +// [189, return_type → • simple_type RAISE error_type, EOF / SEMI] +// [190, return_type → • simple_type RAISE QUESTION, EOF / SEMI] +// [214, qualified_uident_ → • UIDENT, EOF / RAISE / QUESTION / SEMI / LBRACKET / NORAISE] +// [215, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, EOF / RAISE / QUESTION / SEMI / LBRACKET / NORAISE] +fn yy_state_334(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_PACKAGE_NAME => Shift(yy_state_62) T_UIDENT => Shift(yy_state_64) @@ -7858,171 +8652,179 @@ fn yy_state_297(_lookahead : YYSymbol) -> YYDecision { NT_qualified_uident_ => Shift(yy_state_78) T_LPAREN => Shift(yy_state_83) NT_simple_type => Shift(yy_state_87) - NT_return_type => Shift(yy_state_298) + NT_return_type => Shift(yy_state_335) _ => Error } } // [37, func_sig → FN loption(type_params_with_constraints) func_name LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type •, EOF / SEMI] -fn yy_state_298(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_335(_lookahead : YYSymbol) -> YYDecision { ReduceNoLookahead(8, NT_func_sig, yy_action_140) } // [30, luident → • lident, LPAREN] // [31, luident → • uident, LPAREN] // [33, func_name → method_self_type_coloncolon • luident, LPAREN] -// [212, uident → • UIDENT, LPAREN] -// [213, lident → • LIDENT, LPAREN] -fn yy_state_299(_lookahead : YYSymbol) -> YYDecision { +// [216, uident → • UIDENT, LPAREN] +// [217, lident → • LIDENT, LPAREN] +// [218, lident → • EXTEND, LPAREN] +fn yy_state_336(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_UIDENT => Shift(yy_state_25) - T_LIDENT => Shift(yy_state_38) - NT_luident => Shift(yy_state_300) - NT_uident => Shift(yy_state_301) - NT_lident => Shift(yy_state_302) + T_EXTEND => Shift(yy_state_38) + T_LIDENT => Shift(yy_state_39) + NT_luident => Shift(yy_state_337) + NT_uident => Shift(yy_state_338) + NT_lident => Shift(yy_state_339) _ => Error } } // [33, func_name → method_self_type_coloncolon luident •, LPAREN] -fn yy_state_300(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_337(_lookahead : YYSymbol) -> YYDecision { ReduceNoLookahead(2, NT_func_name, yy_action_139) } // [31, luident → uident •, LPAREN] -fn yy_state_301(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_338(_lookahead : YYSymbol) -> YYDecision { ReduceNoLookahead(1, NT_luident, yy_action_138) } // [30, luident → lident •, LPAREN] -fn yy_state_302(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_339(_lookahead : YYSymbol) -> YYDecision { ReduceNoLookahead(1, NT_luident, yy_action_137) } // [32, func_name → luident •, LPAREN] -fn yy_state_303(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_340(_lookahead : YYSymbol) -> YYDecision { ReduceNoLookahead(1, NT_func_name, yy_action_136) } -// [29, method_self_type_coloncolon → AMPER • UIDENT COLONCOLON, LIDENT / UIDENT] -fn yy_state_304(_lookahead : YYSymbol) -> YYDecision { +// [29, method_self_type_coloncolon → AMPER • UIDENT COLONCOLON, LIDENT / UIDENT / EXTEND] +fn yy_state_341(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_UIDENT => Shift(yy_state_305) + T_UIDENT => Shift(yy_state_342) _ => Error } } -// [29, method_self_type_coloncolon → AMPER UIDENT • COLONCOLON, LIDENT / UIDENT] -fn yy_state_305(_lookahead : YYSymbol) -> YYDecision { +// [29, method_self_type_coloncolon → AMPER UIDENT • COLONCOLON, LIDENT / UIDENT / EXTEND] +fn yy_state_342(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_COLONCOLON => Shift(yy_state_306) + T_COLONCOLON => Shift(yy_state_343) _ => Error } } -// [29, method_self_type_coloncolon → AMPER UIDENT COLONCOLON •, LIDENT / UIDENT] -fn yy_state_306(_lookahead : YYSymbol) -> YYDecision { +// [29, method_self_type_coloncolon → AMPER UIDENT COLONCOLON •, LIDENT / UIDENT / EXTEND] +fn yy_state_343(_lookahead : YYSymbol) -> YYDecision { ReduceNoLookahead(3, NT_method_self_type_coloncolon, yy_action_135) } -// [28, method_self_type_coloncolon → UIDENT • COLONCOLON, LIDENT / UIDENT] -// [212, uident → UIDENT •, LPAREN] -fn yy_state_307(_lookahead : YYSymbol) -> YYDecision { +// [28, method_self_type_coloncolon → UIDENT • COLONCOLON, LIDENT / UIDENT / EXTEND] +// [216, uident → UIDENT •, LPAREN] +fn yy_state_344(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_COLONCOLON => Shift(yy_state_308) - T_LPAREN => Reduce(1, NT_uident, yy_action_274) + T_COLONCOLON => Shift(yy_state_345) + T_LPAREN => Reduce(1, NT_uident, yy_action_279) _ => Error } } -// [28, method_self_type_coloncolon → UIDENT COLONCOLON •, LIDENT / UIDENT] -fn yy_state_308(_lookahead : YYSymbol) -> YYDecision { +// [28, method_self_type_coloncolon → UIDENT COLONCOLON •, LIDENT / UIDENT / EXTEND] +fn yy_state_345(_lookahead : YYSymbol) -> YYDecision { ReduceNoLookahead(2, NT_method_self_type_coloncolon, yy_action_134) } // [36, func_sig → ASYNC • FN loption(type_params_with_constraints) func_name LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type, EOF / SEMI] -fn yy_state_309(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_346(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_FN => Shift(yy_state_310) + T_FN => Shift(yy_state_347) _ => Error } } // [36, func_sig → ASYNC FN • loption(type_params_with_constraints) func_name LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type, EOF / SEMI] -// [157, type_params_with_constraints → • LBRACKET separated_list(COMMA,type_param_with_constraints) RBRACKET, LIDENT / UIDENT / AMPER] -// [217, loption(type_params_with_constraints) → •, LIDENT / UIDENT / AMPER] -// [218, loption(type_params_with_constraints) → • type_params_with_constraints, LIDENT / UIDENT / AMPER] -fn yy_state_310(_lookahead : YYSymbol) -> YYDecision { +// [161, type_params_with_constraints → • LBRACKET separated_list(COMMA,type_param_with_constraints) RBRACKET, LIDENT / UIDENT / AMPER / EXTEND] +// [222, loption(type_params_with_constraints) → •, LIDENT / UIDENT / AMPER / EXTEND] +// [223, loption(type_params_with_constraints) → • type_params_with_constraints, LIDENT / UIDENT / AMPER / EXTEND] +fn yy_state_347(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACKET => Shift(yy_state_162) - NT_type_params_with_constraints => Shift(yy_state_291) - NT_loption_type_params_with_constraints_ => Shift(yy_state_311) - T_LIDENT | T_UIDENT | T_AMPER => Reduce(0, NT_loption_type_params_with_constraints_, yy_action_142) + NT_type_params_with_constraints => Shift(yy_state_143) + T_LBRACKET => Shift(yy_state_144) + NT_loption_type_params_with_constraints_ => Shift(yy_state_348) + T_LIDENT | T_UIDENT | T_AMPER | T_EXTEND => Reduce(0, NT_loption_type_params_with_constraints_, yy_action_217) _ => Error } } -// [28, method_self_type_coloncolon → • UIDENT COLONCOLON, LIDENT / UIDENT] -// [29, method_self_type_coloncolon → • AMPER UIDENT COLONCOLON, LIDENT / UIDENT] +// [28, method_self_type_coloncolon → • UIDENT COLONCOLON, LIDENT / UIDENT / EXTEND] +// [29, method_self_type_coloncolon → • AMPER UIDENT COLONCOLON, LIDENT / UIDENT / EXTEND] // [30, luident → • lident, LPAREN] // [31, luident → • uident, LPAREN] // [32, func_name → • luident, LPAREN] // [33, func_name → • method_self_type_coloncolon luident, LPAREN] // [36, func_sig → ASYNC FN loption(type_params_with_constraints) • func_name LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type, EOF / SEMI] -// [212, uident → • UIDENT, LPAREN] -// [213, lident → • LIDENT, LPAREN] -fn yy_state_311(_lookahead : YYSymbol) -> YYDecision { +// [216, uident → • UIDENT, LPAREN] +// [217, lident → • LIDENT, LPAREN] +// [218, lident → • EXTEND, LPAREN] +fn yy_state_348(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LIDENT => Shift(yy_state_38) - NT_method_self_type_coloncolon => Shift(yy_state_299) - NT_uident => Shift(yy_state_301) - NT_lident => Shift(yy_state_302) - NT_luident => Shift(yy_state_303) - T_AMPER => Shift(yy_state_304) - T_UIDENT => Shift(yy_state_307) - NT_func_name => Shift(yy_state_312) + T_EXTEND => Shift(yy_state_38) + T_LIDENT => Shift(yy_state_39) + NT_method_self_type_coloncolon => Shift(yy_state_336) + NT_uident => Shift(yy_state_338) + NT_lident => Shift(yy_state_339) + NT_luident => Shift(yy_state_340) + T_AMPER => Shift(yy_state_341) + T_UIDENT => Shift(yy_state_344) + NT_func_name => Shift(yy_state_349) _ => Error } } // [36, func_sig → ASYNC FN loption(type_params_with_constraints) func_name • LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type, EOF / SEMI] -fn yy_state_312(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_349(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LPAREN => Shift(yy_state_313) + T_LPAREN => Shift(yy_state_350) _ => Error } } // [36, func_sig → ASYNC FN loption(type_params_with_constraints) func_name LPAREN • separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type, EOF / SEMI] -// [167, simple_type → • simple_type QUESTION, RPAREN / COMMA / QUESTION] -// [168, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, RPAREN / COMMA / QUESTION] -// [169, simple_type → • LPAREN type_ RPAREN, RPAREN / COMMA / QUESTION] -// [170, simple_type → • qualified_uident_ optional_type_arguments, RPAREN / COMMA / QUESTION] -// [171, simple_type → • AMPER qualified_uident_, RPAREN / COMMA / QUESTION] -// [172, simple_type → • UNDERSCORE, RPAREN / COMMA / QUESTION] -// [173, type_ → • simple_type, RPAREN / COMMA] -// [174, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [175, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [176, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [177, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [178, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [179, type_ → • LPAREN RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [180, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [181, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [190, parameter → • type_, RPAREN / COMMA] -// [191, parameter → • POST_LABEL COLON type_, RPAREN / COMMA] -// [192, parameter → • label QUESTION COLON type_, RPAREN / COMMA] -// [210, qualified_uident_ → • UIDENT, RPAREN / COMMA / QUESTION / LBRACKET] -// [211, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, RPAREN / COMMA / QUESTION / LBRACKET] -// [214, label → • LIDENT, QUESTION] -// [219, separated_list(COMMA,parameter) → •, RPAREN] -// [220, separated_list(COMMA,parameter) → • separated_nonempty_list(COMMA,parameter), RPAREN] -// [258, separated_nonempty_list(COMMA,parameter) → • parameter, RPAREN] -// [259, separated_nonempty_list(COMMA,parameter) → • parameter COMMA separated_nonempty_list(COMMA,parameter), RPAREN] -fn yy_state_313(_lookahead : YYSymbol) -> YYDecision { +// [171, simple_type → • simple_type QUESTION, RPAREN / COMMA / QUESTION] +// [172, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, RPAREN / COMMA / QUESTION] +// [173, simple_type → • LPAREN type_ RPAREN, RPAREN / COMMA / QUESTION] +// [174, simple_type → • qualified_uident_ optional_type_arguments, RPAREN / COMMA / QUESTION] +// [175, simple_type → • AMPER qualified_uident_, RPAREN / COMMA / QUESTION] +// [176, simple_type → • UNDERSCORE, RPAREN / COMMA / QUESTION] +// [177, type_ → • simple_type, RPAREN / COMMA] +// [178, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [179, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [180, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [181, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [182, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [183, type_ → • LPAREN RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [184, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [185, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [194, parameter → • type_, RPAREN / COMMA] +// [195, parameter → • POST_LABEL COLON type_, RPAREN / COMMA] +// [196, parameter → • label QUESTION COLON type_, RPAREN / COMMA] +// [214, qualified_uident_ → • UIDENT, RPAREN / COMMA / QUESTION / LBRACKET] +// [215, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, RPAREN / COMMA / QUESTION / LBRACKET] +// [217, lident → • LIDENT, QUESTION] +// [218, lident → • EXTEND, QUESTION] +// [219, label → • lident, QUESTION] +// [224, separated_list(COMMA,parameter) → •, RPAREN] +// [225, separated_list(COMMA,parameter) → • separated_nonempty_list(COMMA,parameter), RPAREN] +// [263, separated_nonempty_list(COMMA,parameter) → • parameter, RPAREN] +// [264, separated_nonempty_list(COMMA,parameter) → • parameter COMMA separated_nonempty_list(COMMA,parameter), RPAREN] +fn yy_state_350(_lookahead : YYSymbol) -> YYDecision { match _lookahead { + T_EXTEND => Shift(yy_state_38) + T_LIDENT => Shift(yy_state_39) NT_parameter => Shift(yy_state_58) - T_LIDENT => Shift(yy_state_61) + NT_lident => Shift(yy_state_61) T_PACKAGE_NAME => Shift(yy_state_62) T_UIDENT => Shift(yy_state_64) NT_label => Shift(yy_state_65) @@ -8035,52 +8837,52 @@ fn yy_state_313(_lookahead : YYSymbol) -> YYDecision { T_POST_LABEL => Shift(yy_state_122) NT_type_ => Shift(yy_state_125) NT_separated_nonempty_list_COMMA_parameter_ => Shift(yy_state_126) - NT_separated_list_COMMA_parameter_ => Shift(yy_state_314) - T_RPAREN => Reduce(0, NT_separated_list_COMMA_parameter_, yy_action_256) + NT_separated_list_COMMA_parameter_ => Shift(yy_state_351) + T_RPAREN => Reduce(0, NT_separated_list_COMMA_parameter_, yy_action_260) _ => Error } } // [36, func_sig → ASYNC FN loption(type_params_with_constraints) func_name LPAREN separated_list(COMMA,parameter) • RPAREN THIN_ARROW return_type, EOF / SEMI] -fn yy_state_314(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_351(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RPAREN => Shift(yy_state_315) + T_RPAREN => Shift(yy_state_352) _ => Error } } // [36, func_sig → ASYNC FN loption(type_params_with_constraints) func_name LPAREN separated_list(COMMA,parameter) RPAREN • THIN_ARROW return_type, EOF / SEMI] -fn yy_state_315(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_352(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_THIN_ARROW => Shift(yy_state_316) + T_THIN_ARROW => Shift(yy_state_353) _ => Error } } // [36, func_sig → ASYNC FN loption(type_params_with_constraints) func_name LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW • return_type, EOF / SEMI] -// [167, simple_type → • simple_type QUESTION, EOF / RAISE / QUESTION / SEMI / NORAISE] -// [168, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, EOF / RAISE / QUESTION / SEMI / NORAISE] -// [169, simple_type → • LPAREN type_ RPAREN, EOF / RAISE / QUESTION / SEMI / NORAISE] -// [170, simple_type → • qualified_uident_ optional_type_arguments, EOF / RAISE / QUESTION / SEMI / NORAISE] -// [171, simple_type → • AMPER qualified_uident_, EOF / RAISE / QUESTION / SEMI / NORAISE] -// [172, simple_type → • UNDERSCORE, EOF / RAISE / QUESTION / SEMI / NORAISE] -// [173, type_ → • simple_type, EOF / SEMI] -// [174, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] -// [175, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] -// [176, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] -// [177, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] -// [178, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] -// [179, type_ → • LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] -// [180, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] -// [181, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] -// [182, return_type → • type_, EOF / SEMI] -// [183, return_type → • simple_type NORAISE, EOF / SEMI] -// [184, return_type → • simple_type RAISE, EOF / SEMI] -// [185, return_type → • simple_type RAISE error_type, EOF / SEMI] -// [186, return_type → • simple_type RAISE QUESTION, EOF / SEMI] -// [210, qualified_uident_ → • UIDENT, EOF / RAISE / QUESTION / SEMI / LBRACKET / NORAISE] -// [211, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, EOF / RAISE / QUESTION / SEMI / LBRACKET / NORAISE] -fn yy_state_316(_lookahead : YYSymbol) -> YYDecision { +// [171, simple_type → • simple_type QUESTION, EOF / RAISE / QUESTION / SEMI / NORAISE] +// [172, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, EOF / RAISE / QUESTION / SEMI / NORAISE] +// [173, simple_type → • LPAREN type_ RPAREN, EOF / RAISE / QUESTION / SEMI / NORAISE] +// [174, simple_type → • qualified_uident_ optional_type_arguments, EOF / RAISE / QUESTION / SEMI / NORAISE] +// [175, simple_type → • AMPER qualified_uident_, EOF / RAISE / QUESTION / SEMI / NORAISE] +// [176, simple_type → • UNDERSCORE, EOF / RAISE / QUESTION / SEMI / NORAISE] +// [177, type_ → • simple_type, EOF / SEMI] +// [178, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] +// [179, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] +// [180, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] +// [181, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] +// [182, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] +// [183, type_ → • LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] +// [184, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] +// [185, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] +// [186, return_type → • type_, EOF / SEMI] +// [187, return_type → • simple_type NORAISE, EOF / SEMI] +// [188, return_type → • simple_type RAISE, EOF / SEMI] +// [189, return_type → • simple_type RAISE error_type, EOF / SEMI] +// [190, return_type → • simple_type RAISE QUESTION, EOF / SEMI] +// [214, qualified_uident_ → • UIDENT, EOF / RAISE / QUESTION / SEMI / LBRACKET / NORAISE] +// [215, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, EOF / RAISE / QUESTION / SEMI / LBRACKET / NORAISE] +fn yy_state_353(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_PACKAGE_NAME => Shift(yy_state_62) T_UIDENT => Shift(yy_state_64) @@ -8091,53 +8893,55 @@ fn yy_state_316(_lookahead : YYSymbol) -> YYDecision { NT_qualified_uident_ => Shift(yy_state_78) T_LPAREN => Shift(yy_state_83) NT_simple_type => Shift(yy_state_87) - NT_return_type => Shift(yy_state_317) + NT_return_type => Shift(yy_state_354) _ => Error } } // [36, func_sig → ASYNC FN loption(type_params_with_constraints) func_name LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type •, EOF / SEMI] -fn yy_state_317(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_354(_lookahead : YYSymbol) -> YYDecision { ReduceNoLookahead(9, NT_func_sig, yy_action_133) } // [22, value_sig → LET • lident COLON type_, EOF / SEMI] -// [213, lident → • LIDENT, COLON] -fn yy_state_318(_lookahead : YYSymbol) -> YYDecision { +// [217, lident → • LIDENT, COLON] +// [218, lident → • EXTEND, COLON] +fn yy_state_355(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LIDENT => Shift(yy_state_38) - NT_lident => Shift(yy_state_319) + T_EXTEND => Shift(yy_state_38) + T_LIDENT => Shift(yy_state_39) + NT_lident => Shift(yy_state_356) _ => Error } } // [22, value_sig → LET lident • COLON type_, EOF / SEMI] -fn yy_state_319(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_356(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_COLON => Shift(yy_state_320) + T_COLON => Shift(yy_state_357) _ => Error } } // [22, value_sig → LET lident COLON • type_, EOF / SEMI] -// [167, simple_type → • simple_type QUESTION, EOF / QUESTION / SEMI] -// [168, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, EOF / QUESTION / SEMI] -// [169, simple_type → • LPAREN type_ RPAREN, EOF / QUESTION / SEMI] -// [170, simple_type → • qualified_uident_ optional_type_arguments, EOF / QUESTION / SEMI] -// [171, simple_type → • AMPER qualified_uident_, EOF / QUESTION / SEMI] -// [172, simple_type → • UNDERSCORE, EOF / QUESTION / SEMI] -// [173, type_ → • simple_type, EOF / SEMI] -// [174, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] -// [175, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] -// [176, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] -// [177, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] -// [178, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] -// [179, type_ → • LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] -// [180, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] -// [181, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] -// [210, qualified_uident_ → • UIDENT, EOF / QUESTION / SEMI / LBRACKET] -// [211, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, EOF / QUESTION / SEMI / LBRACKET] -fn yy_state_320(_lookahead : YYSymbol) -> YYDecision { +// [171, simple_type → • simple_type QUESTION, EOF / QUESTION / SEMI] +// [172, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, EOF / QUESTION / SEMI] +// [173, simple_type → • LPAREN type_ RPAREN, EOF / QUESTION / SEMI] +// [174, simple_type → • qualified_uident_ optional_type_arguments, EOF / QUESTION / SEMI] +// [175, simple_type → • AMPER qualified_uident_, EOF / QUESTION / SEMI] +// [176, simple_type → • UNDERSCORE, EOF / QUESTION / SEMI] +// [177, type_ → • simple_type, EOF / SEMI] +// [178, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] +// [179, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] +// [180, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] +// [181, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] +// [182, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] +// [183, type_ → • LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] +// [184, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] +// [185, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] +// [214, qualified_uident_ → • UIDENT, EOF / QUESTION / SEMI / LBRACKET] +// [215, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, EOF / QUESTION / SEMI / LBRACKET] +fn yy_state_357(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_PACKAGE_NAME => Shift(yy_state_62) T_UIDENT => Shift(yy_state_64) @@ -8147,13 +8951,13 @@ fn yy_state_320(_lookahead : YYSymbol) -> YYDecision { NT_qualified_uident_ => Shift(yy_state_78) T_LPAREN => Shift(yy_state_83) NT_simple_type => Shift(yy_state_106) - NT_type_ => Shift(yy_state_321) + NT_type_ => Shift(yy_state_358) _ => Error } } // [22, value_sig → LET lident COLON type_ •, EOF / SEMI] -fn yy_state_321(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_358(_lookahead : YYSymbol) -> YYDecision { ReduceNoLookahead(4, NT_value_sig, yy_action_132) } @@ -8169,285 +8973,287 @@ fn yy_state_321(_lookahead : YYSymbol) -> YYDecision { // [45, func_sig → nonempty_list(attribute) • PRIV FN loption(type_params_with_constraints) func_name LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type, EOF / SEMI] // [46, func_sig → nonempty_list(attribute) • PUB pub_attr ASYNC FN loption(type_params_with_constraints) func_name LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type, EOF / SEMI] // [47, func_sig → nonempty_list(attribute) • PUB pub_attr FN loption(type_params_with_constraints) func_name LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type, EOF / SEMI] -// [55, type_sig → nonempty_list(attribute) • TYPE type_decl_name_with_params optional_derive, EOF / SEMI] -// [56, type_sig → nonempty_list(attribute) • PRIV TYPE type_decl_name_with_params optional_derive, EOF / SEMI] -// [57, type_sig → nonempty_list(attribute) • PUB pub_attr TYPE type_decl_name_with_params optional_derive, EOF / SEMI] -// [61, type_sig → nonempty_list(attribute) • SUBERROR uident optional_derive, EOF / SEMI] -// [62, type_sig → nonempty_list(attribute) • PRIV SUBERROR uident optional_derive, EOF / SEMI] -// [63, type_sig → nonempty_list(attribute) • PUB pub_attr SUBERROR uident optional_derive, EOF / SEMI] -// [67, type_sig → nonempty_list(attribute) • SUBERROR uident LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [68, type_sig → nonempty_list(attribute) • PRIV SUBERROR uident LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [69, type_sig → nonempty_list(attribute) • PUB pub_attr SUBERROR uident LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [73, type_sig → nonempty_list(attribute) • STRUCT type_decl_name_with_params LBRACE record_decl_body RBRACE optional_derive, EOF / SEMI] -// [74, type_sig → nonempty_list(attribute) • PRIV STRUCT type_decl_name_with_params LBRACE record_decl_body RBRACE optional_derive, EOF / SEMI] -// [75, type_sig → nonempty_list(attribute) • PUB pub_attr STRUCT type_decl_name_with_params LBRACE record_decl_body RBRACE optional_derive, EOF / SEMI] -// [79, type_sig → nonempty_list(attribute) • STRUCT type_decl_name_with_params LPAREN separated_list(COMMA,type_) RPAREN optional_derive, EOF / SEMI] -// [80, type_sig → nonempty_list(attribute) • PRIV STRUCT type_decl_name_with_params LPAREN separated_list(COMMA,type_) RPAREN optional_derive, EOF / SEMI] -// [81, type_sig → nonempty_list(attribute) • PUB pub_attr STRUCT type_decl_name_with_params LPAREN separated_list(COMMA,type_) RPAREN optional_derive, EOF / SEMI] -// [85, type_sig → nonempty_list(attribute) • ENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [86, type_sig → nonempty_list(attribute) • PRIV ENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [87, type_sig → nonempty_list(attribute) • PUB pub_attr ENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [91, type_sig → nonempty_list(attribute) • EXTENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [92, type_sig → nonempty_list(attribute) • PRIV EXTENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [93, type_sig → nonempty_list(attribute) • PUB pub_attr EXTENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [97, type_sig → nonempty_list(attribute) • EXTENUM extensible_enum_extension_target PLUS_EQUAL LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [98, type_sig → nonempty_list(attribute) • PRIV EXTENUM extensible_enum_extension_target PLUS_EQUAL LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [99, type_sig → nonempty_list(attribute) • PUB pub_attr EXTENUM extensible_enum_extension_target PLUS_EQUAL LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [105, impl_sig → nonempty_list(attribute) • IMPL type_params_with_constraints qualified_uident FOR type_, EOF / SEMI] -// [106, impl_sig → nonempty_list(attribute) • PRIV IMPL type_params_with_constraints qualified_uident FOR type_, EOF / SEMI] -// [107, impl_sig → nonempty_list(attribute) • PUB pub_attr IMPL type_params_with_constraints qualified_uident FOR type_, EOF / SEMI] -// [111, impl_sig → nonempty_list(attribute) • IMPL qualified_uident FOR type_, EOF / SEMI] -// [112, impl_sig → nonempty_list(attribute) • PRIV IMPL qualified_uident FOR type_, EOF / SEMI] -// [113, impl_sig → nonempty_list(attribute) • PUB pub_attr IMPL qualified_uident FOR type_, EOF / SEMI] -// [117, trait_sig → nonempty_list(attribute) • TRAIT uident loption(preceded(COLON,separated_nonempty_list(PLUS,qualified_uident))) trait_body, EOF / SEMI] -// [118, trait_sig → nonempty_list(attribute) • PRIV TRAIT uident loption(preceded(COLON,separated_nonempty_list(PLUS,qualified_uident))) trait_body, EOF / SEMI] -// [119, trait_sig → nonempty_list(attribute) • PUB pub_attr TRAIT uident loption(preceded(COLON,separated_nonempty_list(PLUS,qualified_uident))) trait_body, EOF / SEMI] -// [127, alias_sig → nonempty_list(attribute) • TYPE type_decl_name_with_params EQUAL type_, EOF / SEMI] -// [128, alias_sig → nonempty_list(attribute) • PRIV TYPE type_decl_name_with_params EQUAL type_, EOF / SEMI] -// [129, alias_sig → nonempty_list(attribute) • PUB pub_attr TYPE type_decl_name_with_params EQUAL type_, EOF / SEMI] -// [133, alias_sig → nonempty_list(attribute) • FNALIAS uident COLONCOLON lident, EOF / SEMI] -// [134, alias_sig → nonempty_list(attribute) • PRIV FNALIAS uident COLONCOLON lident, EOF / SEMI] -// [135, alias_sig → nonempty_list(attribute) • PUB pub_attr FNALIAS uident COLONCOLON lident, EOF / SEMI] -// [139, alias_sig → nonempty_list(attribute) • USING PACKAGE_NAME LBRACE TYPE uident using_binder RBRACE, EOF / SEMI] -// [140, alias_sig → nonempty_list(attribute) • PRIV USING PACKAGE_NAME LBRACE TYPE uident using_binder RBRACE, EOF / SEMI] -// [141, alias_sig → nonempty_list(attribute) • PUB pub_attr USING PACKAGE_NAME LBRACE TYPE uident using_binder RBRACE, EOF / SEMI] -// [145, alias_sig → nonempty_list(attribute) • USING PACKAGE_NAME LBRACE TRAIT uident using_binder RBRACE, EOF / SEMI] -// [146, alias_sig → nonempty_list(attribute) • PRIV USING PACKAGE_NAME LBRACE TRAIT uident using_binder RBRACE, EOF / SEMI] -// [147, alias_sig → nonempty_list(attribute) • PUB pub_attr USING PACKAGE_NAME LBRACE TRAIT uident using_binder RBRACE, EOF / SEMI] -fn yy_state_322(_lookahead : YYSymbol) -> YYDecision { +// [59, type_sig → nonempty_list(attribute) • TYPE type_decl_name_with_params optional_derive, EOF / SEMI] +// [60, type_sig → nonempty_list(attribute) • PRIV TYPE type_decl_name_with_params optional_derive, EOF / SEMI] +// [61, type_sig → nonempty_list(attribute) • PUB pub_attr TYPE type_decl_name_with_params optional_derive, EOF / SEMI] +// [65, type_sig → nonempty_list(attribute) • SUBERROR uident optional_derive, EOF / SEMI] +// [66, type_sig → nonempty_list(attribute) • PRIV SUBERROR uident optional_derive, EOF / SEMI] +// [67, type_sig → nonempty_list(attribute) • PUB pub_attr SUBERROR uident optional_derive, EOF / SEMI] +// [71, type_sig → nonempty_list(attribute) • SUBERROR uident LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [72, type_sig → nonempty_list(attribute) • PRIV SUBERROR uident LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [73, type_sig → nonempty_list(attribute) • PUB pub_attr SUBERROR uident LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [77, type_sig → nonempty_list(attribute) • STRUCT type_decl_name_with_params LBRACE record_decl_body RBRACE optional_derive, EOF / SEMI] +// [78, type_sig → nonempty_list(attribute) • PRIV STRUCT type_decl_name_with_params LBRACE record_decl_body RBRACE optional_derive, EOF / SEMI] +// [79, type_sig → nonempty_list(attribute) • PUB pub_attr STRUCT type_decl_name_with_params LBRACE record_decl_body RBRACE optional_derive, EOF / SEMI] +// [83, type_sig → nonempty_list(attribute) • STRUCT type_decl_name_with_params LPAREN separated_list(COMMA,type_) RPAREN optional_derive, EOF / SEMI] +// [84, type_sig → nonempty_list(attribute) • PRIV STRUCT type_decl_name_with_params LPAREN separated_list(COMMA,type_) RPAREN optional_derive, EOF / SEMI] +// [85, type_sig → nonempty_list(attribute) • PUB pub_attr STRUCT type_decl_name_with_params LPAREN separated_list(COMMA,type_) RPAREN optional_derive, EOF / SEMI] +// [89, type_sig → nonempty_list(attribute) • ENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [90, type_sig → nonempty_list(attribute) • PRIV ENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [91, type_sig → nonempty_list(attribute) • PUB pub_attr ENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [95, type_sig → nonempty_list(attribute) • EXTENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [96, type_sig → nonempty_list(attribute) • PRIV EXTENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [97, type_sig → nonempty_list(attribute) • PUB pub_attr EXTENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [101, type_sig → nonempty_list(attribute) • EXTENUM extensible_enum_extension_target PLUS_EQUAL LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [102, type_sig → nonempty_list(attribute) • PRIV EXTENUM extensible_enum_extension_target PLUS_EQUAL LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [103, type_sig → nonempty_list(attribute) • PUB pub_attr EXTENUM extensible_enum_extension_target PLUS_EQUAL LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [109, impl_sig → nonempty_list(attribute) • IMPL type_params_with_constraints qualified_uident FOR type_, EOF / SEMI] +// [110, impl_sig → nonempty_list(attribute) • PRIV IMPL type_params_with_constraints qualified_uident FOR type_, EOF / SEMI] +// [111, impl_sig → nonempty_list(attribute) • PUB pub_attr IMPL type_params_with_constraints qualified_uident FOR type_, EOF / SEMI] +// [115, impl_sig → nonempty_list(attribute) • IMPL qualified_uident FOR type_, EOF / SEMI] +// [116, impl_sig → nonempty_list(attribute) • PRIV IMPL qualified_uident FOR type_, EOF / SEMI] +// [117, impl_sig → nonempty_list(attribute) • PUB pub_attr IMPL qualified_uident FOR type_, EOF / SEMI] +// [121, trait_sig → nonempty_list(attribute) • TRAIT uident loption(preceded(COLON,separated_nonempty_list(PLUS,qualified_uident))) trait_body, EOF / SEMI] +// [122, trait_sig → nonempty_list(attribute) • PRIV TRAIT uident loption(preceded(COLON,separated_nonempty_list(PLUS,qualified_uident))) trait_body, EOF / SEMI] +// [123, trait_sig → nonempty_list(attribute) • PUB pub_attr TRAIT uident loption(preceded(COLON,separated_nonempty_list(PLUS,qualified_uident))) trait_body, EOF / SEMI] +// [131, alias_sig → nonempty_list(attribute) • TYPE type_decl_name_with_params EQUAL type_, EOF / SEMI] +// [132, alias_sig → nonempty_list(attribute) • PRIV TYPE type_decl_name_with_params EQUAL type_, EOF / SEMI] +// [133, alias_sig → nonempty_list(attribute) • PUB pub_attr TYPE type_decl_name_with_params EQUAL type_, EOF / SEMI] +// [137, alias_sig → nonempty_list(attribute) • FNALIAS uident COLONCOLON lident, EOF / SEMI] +// [138, alias_sig → nonempty_list(attribute) • PRIV FNALIAS uident COLONCOLON lident, EOF / SEMI] +// [139, alias_sig → nonempty_list(attribute) • PUB pub_attr FNALIAS uident COLONCOLON lident, EOF / SEMI] +// [143, alias_sig → nonempty_list(attribute) • USING PACKAGE_NAME LBRACE TYPE uident using_binder RBRACE, EOF / SEMI] +// [144, alias_sig → nonempty_list(attribute) • PRIV USING PACKAGE_NAME LBRACE TYPE uident using_binder RBRACE, EOF / SEMI] +// [145, alias_sig → nonempty_list(attribute) • PUB pub_attr USING PACKAGE_NAME LBRACE TYPE uident using_binder RBRACE, EOF / SEMI] +// [149, alias_sig → nonempty_list(attribute) • USING PACKAGE_NAME LBRACE TRAIT uident using_binder RBRACE, EOF / SEMI] +// [150, alias_sig → nonempty_list(attribute) • PRIV USING PACKAGE_NAME LBRACE TRAIT uident using_binder RBRACE, EOF / SEMI] +// [151, alias_sig → nonempty_list(attribute) • PUB pub_attr USING PACKAGE_NAME LBRACE TRAIT uident using_binder RBRACE, EOF / SEMI] +fn yy_state_359(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_USING => Shift(yy_state_323) - T_FNALIAS => Shift(yy_state_334) - T_TRAIT => Shift(yy_state_338) - T_IMPL => Shift(yy_state_342) - T_EXTENUM => Shift(yy_state_350) - T_ENUM => Shift(yy_state_362) - T_STRUCT => Shift(yy_state_368) - T_SUBERROR => Shift(yy_state_378) - T_TYPE => Shift(yy_state_385) - T_FN => Shift(yy_state_390) - T_ASYNC => Shift(yy_state_398) - T_LET => Shift(yy_state_407) - T_PUB => Shift(yy_state_411) - T_PRIV => Shift(yy_state_525) - T_CONST => Shift(yy_state_620) + T_USING => Shift(yy_state_360) + T_FNALIAS => Shift(yy_state_371) + T_TRAIT => Shift(yy_state_375) + T_IMPL => Shift(yy_state_379) + T_EXTENUM => Shift(yy_state_387) + T_ENUM => Shift(yy_state_399) + T_STRUCT => Shift(yy_state_405) + T_SUBERROR => Shift(yy_state_415) + T_TYPE => Shift(yy_state_422) + T_FN => Shift(yy_state_427) + T_ASYNC => Shift(yy_state_435) + T_LET => Shift(yy_state_444) + T_PUB => Shift(yy_state_448) + T_PRIV => Shift(yy_state_562) + T_CONST => Shift(yy_state_657) _ => Error } } -// [139, alias_sig → nonempty_list(attribute) USING • PACKAGE_NAME LBRACE TYPE uident using_binder RBRACE, EOF / SEMI] -// [145, alias_sig → nonempty_list(attribute) USING • PACKAGE_NAME LBRACE TRAIT uident using_binder RBRACE, EOF / SEMI] -fn yy_state_323(_lookahead : YYSymbol) -> YYDecision { +// [143, alias_sig → nonempty_list(attribute) USING • PACKAGE_NAME LBRACE TYPE uident using_binder RBRACE, EOF / SEMI] +// [149, alias_sig → nonempty_list(attribute) USING • PACKAGE_NAME LBRACE TRAIT uident using_binder RBRACE, EOF / SEMI] +fn yy_state_360(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_PACKAGE_NAME => Shift(yy_state_324) + T_PACKAGE_NAME => Shift(yy_state_361) _ => Error } } -// [139, alias_sig → nonempty_list(attribute) USING PACKAGE_NAME • LBRACE TYPE uident using_binder RBRACE, EOF / SEMI] -// [145, alias_sig → nonempty_list(attribute) USING PACKAGE_NAME • LBRACE TRAIT uident using_binder RBRACE, EOF / SEMI] -fn yy_state_324(_lookahead : YYSymbol) -> YYDecision { +// [143, alias_sig → nonempty_list(attribute) USING PACKAGE_NAME • LBRACE TYPE uident using_binder RBRACE, EOF / SEMI] +// [149, alias_sig → nonempty_list(attribute) USING PACKAGE_NAME • LBRACE TRAIT uident using_binder RBRACE, EOF / SEMI] +fn yy_state_361(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACE => Shift(yy_state_325) + T_LBRACE => Shift(yy_state_362) _ => Error } } -// [139, alias_sig → nonempty_list(attribute) USING PACKAGE_NAME LBRACE • TYPE uident using_binder RBRACE, EOF / SEMI] -// [145, alias_sig → nonempty_list(attribute) USING PACKAGE_NAME LBRACE • TRAIT uident using_binder RBRACE, EOF / SEMI] -fn yy_state_325(_lookahead : YYSymbol) -> YYDecision { +// [143, alias_sig → nonempty_list(attribute) USING PACKAGE_NAME LBRACE • TYPE uident using_binder RBRACE, EOF / SEMI] +// [149, alias_sig → nonempty_list(attribute) USING PACKAGE_NAME LBRACE • TRAIT uident using_binder RBRACE, EOF / SEMI] +fn yy_state_362(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_TRAIT => Shift(yy_state_326) - T_TYPE => Shift(yy_state_330) + T_TRAIT => Shift(yy_state_363) + T_TYPE => Shift(yy_state_367) _ => Error } } -// [145, alias_sig → nonempty_list(attribute) USING PACKAGE_NAME LBRACE TRAIT • uident using_binder RBRACE, EOF / SEMI] -// [212, uident → • UIDENT, RBRACE / AS] -fn yy_state_326(_lookahead : YYSymbol) -> YYDecision { +// [149, alias_sig → nonempty_list(attribute) USING PACKAGE_NAME LBRACE TRAIT • uident using_binder RBRACE, EOF / SEMI] +// [216, uident → • UIDENT, RBRACE / AS] +fn yy_state_363(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_UIDENT => Shift(yy_state_25) - NT_uident => Shift(yy_state_327) + NT_uident => Shift(yy_state_364) _ => Error } } -// [122, using_binder → •, RBRACE] -// [123, using_binder → • AS uident, RBRACE] -// [145, alias_sig → nonempty_list(attribute) USING PACKAGE_NAME LBRACE TRAIT uident • using_binder RBRACE, EOF / SEMI] -fn yy_state_327(_lookahead : YYSymbol) -> YYDecision { +// [126, using_binder → •, RBRACE] +// [127, using_binder → • AS uident, RBRACE] +// [149, alias_sig → nonempty_list(attribute) USING PACKAGE_NAME LBRACE TRAIT uident • using_binder RBRACE, EOF / SEMI] +fn yy_state_364(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_AS => Shift(yy_state_29) - NT_using_binder => Shift(yy_state_328) - T_RBRACE => Reduce(0, NT_using_binder, yy_action_273) + NT_using_binder => Shift(yy_state_365) + T_RBRACE => Reduce(0, NT_using_binder, yy_action_278) _ => Error } } -// [145, alias_sig → nonempty_list(attribute) USING PACKAGE_NAME LBRACE TRAIT uident using_binder • RBRACE, EOF / SEMI] -fn yy_state_328(_lookahead : YYSymbol) -> YYDecision { +// [149, alias_sig → nonempty_list(attribute) USING PACKAGE_NAME LBRACE TRAIT uident using_binder • RBRACE, EOF / SEMI] +fn yy_state_365(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RBRACE => Shift(yy_state_329) + T_RBRACE => Shift(yy_state_366) _ => Error } } -// [145, alias_sig → nonempty_list(attribute) USING PACKAGE_NAME LBRACE TRAIT uident using_binder RBRACE •, EOF / SEMI] -fn yy_state_329(_lookahead : YYSymbol) -> YYDecision { +// [149, alias_sig → nonempty_list(attribute) USING PACKAGE_NAME LBRACE TRAIT uident using_binder RBRACE •, EOF / SEMI] +fn yy_state_366(_lookahead : YYSymbol) -> YYDecision { ReduceNoLookahead(8, NT_alias_sig, yy_action_131) } -// [139, alias_sig → nonempty_list(attribute) USING PACKAGE_NAME LBRACE TYPE • uident using_binder RBRACE, EOF / SEMI] -// [212, uident → • UIDENT, RBRACE / AS] -fn yy_state_330(_lookahead : YYSymbol) -> YYDecision { +// [143, alias_sig → nonempty_list(attribute) USING PACKAGE_NAME LBRACE TYPE • uident using_binder RBRACE, EOF / SEMI] +// [216, uident → • UIDENT, RBRACE / AS] +fn yy_state_367(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_UIDENT => Shift(yy_state_25) - NT_uident => Shift(yy_state_331) + NT_uident => Shift(yy_state_368) _ => Error } } -// [122, using_binder → •, RBRACE] -// [123, using_binder → • AS uident, RBRACE] -// [139, alias_sig → nonempty_list(attribute) USING PACKAGE_NAME LBRACE TYPE uident • using_binder RBRACE, EOF / SEMI] -fn yy_state_331(_lookahead : YYSymbol) -> YYDecision { +// [126, using_binder → •, RBRACE] +// [127, using_binder → • AS uident, RBRACE] +// [143, alias_sig → nonempty_list(attribute) USING PACKAGE_NAME LBRACE TYPE uident • using_binder RBRACE, EOF / SEMI] +fn yy_state_368(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_AS => Shift(yy_state_29) - NT_using_binder => Shift(yy_state_332) - T_RBRACE => Reduce(0, NT_using_binder, yy_action_273) + NT_using_binder => Shift(yy_state_369) + T_RBRACE => Reduce(0, NT_using_binder, yy_action_278) _ => Error } } -// [139, alias_sig → nonempty_list(attribute) USING PACKAGE_NAME LBRACE TYPE uident using_binder • RBRACE, EOF / SEMI] -fn yy_state_332(_lookahead : YYSymbol) -> YYDecision { +// [143, alias_sig → nonempty_list(attribute) USING PACKAGE_NAME LBRACE TYPE uident using_binder • RBRACE, EOF / SEMI] +fn yy_state_369(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RBRACE => Shift(yy_state_333) + T_RBRACE => Shift(yy_state_370) _ => Error } } -// [139, alias_sig → nonempty_list(attribute) USING PACKAGE_NAME LBRACE TYPE uident using_binder RBRACE •, EOF / SEMI] -fn yy_state_333(_lookahead : YYSymbol) -> YYDecision { +// [143, alias_sig → nonempty_list(attribute) USING PACKAGE_NAME LBRACE TYPE uident using_binder RBRACE •, EOF / SEMI] +fn yy_state_370(_lookahead : YYSymbol) -> YYDecision { ReduceNoLookahead(8, NT_alias_sig, yy_action_130) } -// [133, alias_sig → nonempty_list(attribute) FNALIAS • uident COLONCOLON lident, EOF / SEMI] -// [212, uident → • UIDENT, COLONCOLON] -fn yy_state_334(_lookahead : YYSymbol) -> YYDecision { +// [137, alias_sig → nonempty_list(attribute) FNALIAS • uident COLONCOLON lident, EOF / SEMI] +// [216, uident → • UIDENT, COLONCOLON] +fn yy_state_371(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_UIDENT => Shift(yy_state_25) - NT_uident => Shift(yy_state_335) + NT_uident => Shift(yy_state_372) _ => Error } } -// [133, alias_sig → nonempty_list(attribute) FNALIAS uident • COLONCOLON lident, EOF / SEMI] -fn yy_state_335(_lookahead : YYSymbol) -> YYDecision { +// [137, alias_sig → nonempty_list(attribute) FNALIAS uident • COLONCOLON lident, EOF / SEMI] +fn yy_state_372(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_COLONCOLON => Shift(yy_state_336) + T_COLONCOLON => Shift(yy_state_373) _ => Error } } -// [133, alias_sig → nonempty_list(attribute) FNALIAS uident COLONCOLON • lident, EOF / SEMI] -// [213, lident → • LIDENT, EOF / SEMI] -fn yy_state_336(_lookahead : YYSymbol) -> YYDecision { +// [137, alias_sig → nonempty_list(attribute) FNALIAS uident COLONCOLON • lident, EOF / SEMI] +// [217, lident → • LIDENT, EOF / SEMI] +// [218, lident → • EXTEND, EOF / SEMI] +fn yy_state_373(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LIDENT => Shift(yy_state_38) - NT_lident => Shift(yy_state_337) + T_EXTEND => Shift(yy_state_38) + T_LIDENT => Shift(yy_state_39) + NT_lident => Shift(yy_state_374) _ => Error } } -// [133, alias_sig → nonempty_list(attribute) FNALIAS uident COLONCOLON lident •, EOF / SEMI] -fn yy_state_337(_lookahead : YYSymbol) -> YYDecision { +// [137, alias_sig → nonempty_list(attribute) FNALIAS uident COLONCOLON lident •, EOF / SEMI] +fn yy_state_374(_lookahead : YYSymbol) -> YYDecision { ReduceNoLookahead(5, NT_alias_sig, yy_action_129) } -// [117, trait_sig → nonempty_list(attribute) TRAIT • uident loption(preceded(COLON,separated_nonempty_list(PLUS,qualified_uident))) trait_body, EOF / SEMI] -// [212, uident → • UIDENT, EOF / COLON / SEMI / LBRACE] -fn yy_state_338(_lookahead : YYSymbol) -> YYDecision { +// [121, trait_sig → nonempty_list(attribute) TRAIT • uident loption(preceded(COLON,separated_nonempty_list(PLUS,qualified_uident))) trait_body, EOF / SEMI] +// [216, uident → • UIDENT, EOF / COLON / SEMI / LBRACE] +fn yy_state_375(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_UIDENT => Shift(yy_state_25) - NT_uident => Shift(yy_state_339) + NT_uident => Shift(yy_state_376) _ => Error } } -// [117, trait_sig → nonempty_list(attribute) TRAIT uident • loption(preceded(COLON,separated_nonempty_list(PLUS,qualified_uident))) trait_body, EOF / SEMI] -// [230, loption(preceded(COLON,separated_nonempty_list(PLUS,qualified_uident))) → •, EOF / SEMI / LBRACE] -// [231, loption(preceded(COLON,separated_nonempty_list(PLUS,qualified_uident))) → • COLON separated_nonempty_list(PLUS,qualified_uident), EOF / SEMI / LBRACE] -fn yy_state_339(_lookahead : YYSymbol) -> YYDecision { +// [121, trait_sig → nonempty_list(attribute) TRAIT uident • loption(preceded(COLON,separated_nonempty_list(PLUS,qualified_uident))) trait_body, EOF / SEMI] +// [235, loption(preceded(COLON,separated_nonempty_list(PLUS,qualified_uident))) → •, EOF / SEMI / LBRACE] +// [236, loption(preceded(COLON,separated_nonempty_list(PLUS,qualified_uident))) → • COLON separated_nonempty_list(PLUS,qualified_uident), EOF / SEMI / LBRACE] +fn yy_state_376(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_COLON => Shift(yy_state_42) - NT_loption_preceded_COLON_separated_nonempty_list_PLUS_qualified_uident___ => Shift(yy_state_340) - T_EOF | T_SEMI | T_LBRACE => Reduce(0, NT_loption_preceded_COLON_separated_nonempty_list_PLUS_qualified_uident___, yy_action_267) + T_COLON => Shift(yy_state_43) + NT_loption_preceded_COLON_separated_nonempty_list_PLUS_qualified_uident___ => Shift(yy_state_377) + T_EOF | T_SEMI | T_LBRACE => Reduce(0, NT_loption_preceded_COLON_separated_nonempty_list_PLUS_qualified_uident___, yy_action_271) _ => Error } } -// [117, trait_sig → nonempty_list(attribute) TRAIT uident loption(preceded(COLON,separated_nonempty_list(PLUS,qualified_uident))) • trait_body, EOF / SEMI] -// [120, trait_body → •, EOF / SEMI] -// [121, trait_body → • LBRACE separated_list(SEMI,trait_method_sig) RBRACE, EOF / SEMI] -fn yy_state_340(_lookahead : YYSymbol) -> YYDecision { +// [121, trait_sig → nonempty_list(attribute) TRAIT uident loption(preceded(COLON,separated_nonempty_list(PLUS,qualified_uident))) • trait_body, EOF / SEMI] +// [124, trait_body → •, EOF / SEMI] +// [125, trait_body → • LBRACE separated_list(SEMI,trait_method_sig) RBRACE, EOF / SEMI] +fn yy_state_377(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACE => Shift(yy_state_51) - NT_trait_body => Shift(yy_state_341) - T_EOF | T_SEMI => Reduce(0, NT_trait_body, yy_action_260) + T_LBRACE => Shift(yy_state_52) + NT_trait_body => Shift(yy_state_378) + T_EOF | T_SEMI => Reduce(0, NT_trait_body, yy_action_264) _ => Error } } -// [117, trait_sig → nonempty_list(attribute) TRAIT uident loption(preceded(COLON,separated_nonempty_list(PLUS,qualified_uident))) trait_body •, EOF / SEMI] -fn yy_state_341(_lookahead : YYSymbol) -> YYDecision { +// [121, trait_sig → nonempty_list(attribute) TRAIT uident loption(preceded(COLON,separated_nonempty_list(PLUS,qualified_uident))) trait_body •, EOF / SEMI] +fn yy_state_378(_lookahead : YYSymbol) -> YYDecision { ReduceNoLookahead(5, NT_trait_sig, yy_action_128) } -// [105, impl_sig → nonempty_list(attribute) IMPL • type_params_with_constraints qualified_uident FOR type_, EOF / SEMI] -// [111, impl_sig → nonempty_list(attribute) IMPL • qualified_uident FOR type_, EOF / SEMI] -// [157, type_params_with_constraints → • LBRACKET separated_list(COMMA,type_param_with_constraints) RBRACKET, UIDENT / PACKAGE_NAME] -// [208, qualified_uident → • UIDENT, FOR] -// [209, qualified_uident → • PACKAGE_NAME DOT_UIDENT, FOR] -fn yy_state_342(_lookahead : YYSymbol) -> YYDecision { +// [109, impl_sig → nonempty_list(attribute) IMPL • type_params_with_constraints qualified_uident FOR type_, EOF / SEMI] +// [115, impl_sig → nonempty_list(attribute) IMPL • qualified_uident FOR type_, EOF / SEMI] +// [161, type_params_with_constraints → • LBRACKET separated_list(COMMA,type_param_with_constraints) RBRACKET, UIDENT / PACKAGE_NAME] +// [212, qualified_uident → • UIDENT, FOR] +// [213, qualified_uident → • PACKAGE_NAME DOT_UIDENT, FOR] +fn yy_state_379(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_PACKAGE_NAME => Shift(yy_state_47) - T_UIDENT => Shift(yy_state_49) - T_LBRACKET => Shift(yy_state_162) - NT_qualified_uident => Shift(yy_state_343) - NT_type_params_with_constraints => Shift(yy_state_346) + T_PACKAGE_NAME => Shift(yy_state_48) + T_UIDENT => Shift(yy_state_50) + T_LBRACKET => Shift(yy_state_144) + NT_qualified_uident => Shift(yy_state_380) + NT_type_params_with_constraints => Shift(yy_state_383) _ => Error } } -// [111, impl_sig → nonempty_list(attribute) IMPL qualified_uident • FOR type_, EOF / SEMI] -fn yy_state_343(_lookahead : YYSymbol) -> YYDecision { +// [115, impl_sig → nonempty_list(attribute) IMPL qualified_uident • FOR type_, EOF / SEMI] +fn yy_state_380(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_FOR => Shift(yy_state_344) - _ => Error - } -} - -// [111, impl_sig → nonempty_list(attribute) IMPL qualified_uident FOR • type_, EOF / SEMI] -// [167, simple_type → • simple_type QUESTION, EOF / QUESTION / SEMI] -// [168, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, EOF / QUESTION / SEMI] -// [169, simple_type → • LPAREN type_ RPAREN, EOF / QUESTION / SEMI] -// [170, simple_type → • qualified_uident_ optional_type_arguments, EOF / QUESTION / SEMI] -// [171, simple_type → • AMPER qualified_uident_, EOF / QUESTION / SEMI] -// [172, simple_type → • UNDERSCORE, EOF / QUESTION / SEMI] -// [173, type_ → • simple_type, EOF / SEMI] -// [174, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] -// [175, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] -// [176, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] -// [177, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] -// [178, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] -// [179, type_ → • LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] -// [180, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] -// [181, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] -// [210, qualified_uident_ → • UIDENT, EOF / QUESTION / SEMI / LBRACKET] -// [211, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, EOF / QUESTION / SEMI / LBRACKET] -fn yy_state_344(_lookahead : YYSymbol) -> YYDecision { + T_FOR => Shift(yy_state_381) + _ => Error + } +} + +// [115, impl_sig → nonempty_list(attribute) IMPL qualified_uident FOR • type_, EOF / SEMI] +// [171, simple_type → • simple_type QUESTION, EOF / QUESTION / SEMI] +// [172, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, EOF / QUESTION / SEMI] +// [173, simple_type → • LPAREN type_ RPAREN, EOF / QUESTION / SEMI] +// [174, simple_type → • qualified_uident_ optional_type_arguments, EOF / QUESTION / SEMI] +// [175, simple_type → • AMPER qualified_uident_, EOF / QUESTION / SEMI] +// [176, simple_type → • UNDERSCORE, EOF / QUESTION / SEMI] +// [177, type_ → • simple_type, EOF / SEMI] +// [178, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] +// [179, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] +// [180, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] +// [181, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] +// [182, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] +// [183, type_ → • LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] +// [184, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] +// [185, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] +// [214, qualified_uident_ → • UIDENT, EOF / QUESTION / SEMI / LBRACKET] +// [215, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, EOF / QUESTION / SEMI / LBRACKET] +fn yy_state_381(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_PACKAGE_NAME => Shift(yy_state_62) T_UIDENT => Shift(yy_state_64) @@ -8457,55 +9263,55 @@ fn yy_state_344(_lookahead : YYSymbol) -> YYDecision { NT_qualified_uident_ => Shift(yy_state_78) T_LPAREN => Shift(yy_state_83) NT_simple_type => Shift(yy_state_106) - NT_type_ => Shift(yy_state_345) + NT_type_ => Shift(yy_state_382) _ => Error } } -// [111, impl_sig → nonempty_list(attribute) IMPL qualified_uident FOR type_ •, EOF / SEMI] -fn yy_state_345(_lookahead : YYSymbol) -> YYDecision { +// [115, impl_sig → nonempty_list(attribute) IMPL qualified_uident FOR type_ •, EOF / SEMI] +fn yy_state_382(_lookahead : YYSymbol) -> YYDecision { ReduceNoLookahead(5, NT_impl_sig, yy_action_127) } -// [105, impl_sig → nonempty_list(attribute) IMPL type_params_with_constraints • qualified_uident FOR type_, EOF / SEMI] -// [208, qualified_uident → • UIDENT, FOR] -// [209, qualified_uident → • PACKAGE_NAME DOT_UIDENT, FOR] -fn yy_state_346(_lookahead : YYSymbol) -> YYDecision { +// [109, impl_sig → nonempty_list(attribute) IMPL type_params_with_constraints • qualified_uident FOR type_, EOF / SEMI] +// [212, qualified_uident → • UIDENT, FOR] +// [213, qualified_uident → • PACKAGE_NAME DOT_UIDENT, FOR] +fn yy_state_383(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_PACKAGE_NAME => Shift(yy_state_47) - T_UIDENT => Shift(yy_state_49) - NT_qualified_uident => Shift(yy_state_347) + T_PACKAGE_NAME => Shift(yy_state_48) + T_UIDENT => Shift(yy_state_50) + NT_qualified_uident => Shift(yy_state_384) _ => Error } } -// [105, impl_sig → nonempty_list(attribute) IMPL type_params_with_constraints qualified_uident • FOR type_, EOF / SEMI] -fn yy_state_347(_lookahead : YYSymbol) -> YYDecision { +// [109, impl_sig → nonempty_list(attribute) IMPL type_params_with_constraints qualified_uident • FOR type_, EOF / SEMI] +fn yy_state_384(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_FOR => Shift(yy_state_348) - _ => Error - } -} - -// [105, impl_sig → nonempty_list(attribute) IMPL type_params_with_constraints qualified_uident FOR • type_, EOF / SEMI] -// [167, simple_type → • simple_type QUESTION, EOF / QUESTION / SEMI] -// [168, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, EOF / QUESTION / SEMI] -// [169, simple_type → • LPAREN type_ RPAREN, EOF / QUESTION / SEMI] -// [170, simple_type → • qualified_uident_ optional_type_arguments, EOF / QUESTION / SEMI] -// [171, simple_type → • AMPER qualified_uident_, EOF / QUESTION / SEMI] -// [172, simple_type → • UNDERSCORE, EOF / QUESTION / SEMI] -// [173, type_ → • simple_type, EOF / SEMI] -// [174, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] -// [175, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] -// [176, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] -// [177, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] -// [178, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] -// [179, type_ → • LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] -// [180, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] -// [181, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] -// [210, qualified_uident_ → • UIDENT, EOF / QUESTION / SEMI / LBRACKET] -// [211, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, EOF / QUESTION / SEMI / LBRACKET] -fn yy_state_348(_lookahead : YYSymbol) -> YYDecision { + T_FOR => Shift(yy_state_385) + _ => Error + } +} + +// [109, impl_sig → nonempty_list(attribute) IMPL type_params_with_constraints qualified_uident FOR • type_, EOF / SEMI] +// [171, simple_type → • simple_type QUESTION, EOF / QUESTION / SEMI] +// [172, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, EOF / QUESTION / SEMI] +// [173, simple_type → • LPAREN type_ RPAREN, EOF / QUESTION / SEMI] +// [174, simple_type → • qualified_uident_ optional_type_arguments, EOF / QUESTION / SEMI] +// [175, simple_type → • AMPER qualified_uident_, EOF / QUESTION / SEMI] +// [176, simple_type → • UNDERSCORE, EOF / QUESTION / SEMI] +// [177, type_ → • simple_type, EOF / SEMI] +// [178, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] +// [179, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] +// [180, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] +// [181, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] +// [182, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] +// [183, type_ → • LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] +// [184, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] +// [185, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] +// [214, qualified_uident_ → • UIDENT, EOF / QUESTION / SEMI / LBRACKET] +// [215, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, EOF / QUESTION / SEMI / LBRACKET] +fn yy_state_385(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_PACKAGE_NAME => Shift(yy_state_62) T_UIDENT => Shift(yy_state_64) @@ -8515,264 +9321,264 @@ fn yy_state_348(_lookahead : YYSymbol) -> YYDecision { NT_qualified_uident_ => Shift(yy_state_78) T_LPAREN => Shift(yy_state_83) NT_simple_type => Shift(yy_state_106) - NT_type_ => Shift(yy_state_349) + NT_type_ => Shift(yy_state_386) _ => Error } } -// [105, impl_sig → nonempty_list(attribute) IMPL type_params_with_constraints qualified_uident FOR type_ •, EOF / SEMI] -fn yy_state_349(_lookahead : YYSymbol) -> YYDecision { +// [109, impl_sig → nonempty_list(attribute) IMPL type_params_with_constraints qualified_uident FOR type_ •, EOF / SEMI] +fn yy_state_386(_lookahead : YYSymbol) -> YYDecision { ReduceNoLookahead(6, NT_impl_sig, yy_action_126) } -// [91, type_sig → nonempty_list(attribute) EXTENUM • type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [97, type_sig → nonempty_list(attribute) EXTENUM • extensible_enum_extension_target PLUS_EQUAL LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [164, type_decl_name_with_params → • uident optional_type_params_no_constraints, LBRACE] -// [165, extensible_enum_extension_target → • uident optional_type_params_no_constraints, PLUS_EQUAL] -// [166, extensible_enum_extension_target → • PACKAGE_NAME DOT_UIDENT optional_type_params_no_constraints, PLUS_EQUAL] -// [212, uident → • UIDENT, PLUS_EQUAL / LBRACKET / LBRACE] -fn yy_state_350(_lookahead : YYSymbol) -> YYDecision { +// [95, type_sig → nonempty_list(attribute) EXTENUM • type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [101, type_sig → nonempty_list(attribute) EXTENUM • extensible_enum_extension_target PLUS_EQUAL LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [168, type_decl_name_with_params → • uident optional_type_params_no_constraints, LBRACE] +// [169, extensible_enum_extension_target → • uident optional_type_params_no_constraints, PLUS_EQUAL] +// [170, extensible_enum_extension_target → • PACKAGE_NAME DOT_UIDENT optional_type_params_no_constraints, PLUS_EQUAL] +// [216, uident → • UIDENT, PLUS_EQUAL / LBRACKET / LBRACE] +fn yy_state_387(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_UIDENT => Shift(yy_state_25) - T_PACKAGE_NAME => Shift(yy_state_184) - NT_uident => Shift(yy_state_197) - NT_extensible_enum_extension_target => Shift(yy_state_351) - NT_type_decl_name_with_params => Shift(yy_state_357) + T_PACKAGE_NAME => Shift(yy_state_222) + NT_uident => Shift(yy_state_235) + NT_extensible_enum_extension_target => Shift(yy_state_388) + NT_type_decl_name_with_params => Shift(yy_state_394) _ => Error } } -// [97, type_sig → nonempty_list(attribute) EXTENUM extensible_enum_extension_target • PLUS_EQUAL LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -fn yy_state_351(_lookahead : YYSymbol) -> YYDecision { +// [101, type_sig → nonempty_list(attribute) EXTENUM extensible_enum_extension_target • PLUS_EQUAL LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +fn yy_state_388(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_PLUS_EQUAL => Shift(yy_state_352) + T_PLUS_EQUAL => Shift(yy_state_389) _ => Error } } -// [97, type_sig → nonempty_list(attribute) EXTENUM extensible_enum_extension_target PLUS_EQUAL • LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -fn yy_state_352(_lookahead : YYSymbol) -> YYDecision { +// [101, type_sig → nonempty_list(attribute) EXTENUM extensible_enum_extension_target PLUS_EQUAL • LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +fn yy_state_389(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACE => Shift(yy_state_353) + T_LBRACE => Shift(yy_state_390) _ => Error } } -// [97, type_sig → nonempty_list(attribute) EXTENUM extensible_enum_extension_target PLUS_EQUAL LBRACE • separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [148, enum_constructor → • UIDENT option(delimited(LPAREN,separated_nonempty_list(COMMA,constructor_param),RPAREN)) option(eq_tag), SEMI / RBRACE] -// [149, enum_constructor → • nonempty_list(attribute) UIDENT option(delimited(LPAREN,separated_nonempty_list(COMMA,constructor_param),RPAREN)) option(eq_tag), SEMI / RBRACE] -// [223, separated_list(SEMI,enum_constructor) → •, RBRACE] -// [224, separated_list(SEMI,enum_constructor) → • separated_nonempty_list(SEMI,enum_constructor), RBRACE] -// [252, nonempty_list(attribute) → • ATTRIBUTE, UIDENT] -// [253, nonempty_list(attribute) → • ATTRIBUTE nonempty_list(attribute), UIDENT] -// [260, separated_nonempty_list(SEMI,enum_constructor) → • enum_constructor, RBRACE] -// [261, separated_nonempty_list(SEMI,enum_constructor) → • enum_constructor SEMI separated_nonempty_list(SEMI,enum_constructor), RBRACE] -fn yy_state_353(_lookahead : YYSymbol) -> YYDecision { +// [101, type_sig → nonempty_list(attribute) EXTENUM extensible_enum_extension_target PLUS_EQUAL LBRACE • separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [152, enum_constructor → • UIDENT option(delimited(LPAREN,separated_nonempty_list(COMMA,constructor_param),RPAREN)) option(eq_tag), SEMI / RBRACE] +// [153, enum_constructor → • nonempty_list(attribute) UIDENT option(delimited(LPAREN,separated_nonempty_list(COMMA,constructor_param),RPAREN)) option(eq_tag), SEMI / RBRACE] +// [228, separated_list(SEMI,enum_constructor) → •, RBRACE] +// [229, separated_list(SEMI,enum_constructor) → • separated_nonempty_list(SEMI,enum_constructor), RBRACE] +// [257, nonempty_list(attribute) → • ATTRIBUTE, UIDENT] +// [258, nonempty_list(attribute) → • ATTRIBUTE nonempty_list(attribute), UIDENT] +// [265, separated_nonempty_list(SEMI,enum_constructor) → • enum_constructor, RBRACE] +// [266, separated_nonempty_list(SEMI,enum_constructor) → • enum_constructor SEMI separated_nonempty_list(SEMI,enum_constructor), RBRACE] +fn yy_state_390(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_ATTRIBUTE => Shift(yy_state_19) - NT_enum_constructor => Shift(yy_state_202) - NT_nonempty_list_attribute_ => Shift(yy_state_205) - T_UIDENT => Shift(yy_state_224) - NT_separated_nonempty_list_SEMI_enum_constructor_ => Shift(yy_state_227) - NT_separated_list_SEMI_enum_constructor_ => Shift(yy_state_354) - T_RBRACE => Reduce(0, NT_separated_list_SEMI_enum_constructor_, yy_action_184) + NT_enum_constructor => Shift(yy_state_240) + NT_nonempty_list_attribute_ => Shift(yy_state_243) + T_UIDENT => Shift(yy_state_262) + NT_separated_nonempty_list_SEMI_enum_constructor_ => Shift(yy_state_265) + NT_separated_list_SEMI_enum_constructor_ => Shift(yy_state_391) + T_RBRACE => Reduce(0, NT_separated_list_SEMI_enum_constructor_, yy_action_182) _ => Error } } -// [97, type_sig → nonempty_list(attribute) EXTENUM extensible_enum_extension_target PLUS_EQUAL LBRACE separated_list(SEMI,enum_constructor) • RBRACE optional_derive, EOF / SEMI] -fn yy_state_354(_lookahead : YYSymbol) -> YYDecision { +// [101, type_sig → nonempty_list(attribute) EXTENUM extensible_enum_extension_target PLUS_EQUAL LBRACE separated_list(SEMI,enum_constructor) • RBRACE optional_derive, EOF / SEMI] +fn yy_state_391(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RBRACE => Shift(yy_state_355) + T_RBRACE => Shift(yy_state_392) _ => Error } } -// [97, type_sig → nonempty_list(attribute) EXTENUM extensible_enum_extension_target PLUS_EQUAL LBRACE separated_list(SEMI,enum_constructor) RBRACE • optional_derive, EOF / SEMI] -// [100, optional_derive → •, EOF / SEMI] -// [101, optional_derive → • DERIVE LPAREN non_empty_list_commas(qualified_uident) RPAREN, EOF / SEMI] -fn yy_state_355(_lookahead : YYSymbol) -> YYDecision { +// [101, type_sig → nonempty_list(attribute) EXTENUM extensible_enum_extension_target PLUS_EQUAL LBRACE separated_list(SEMI,enum_constructor) RBRACE • optional_derive, EOF / SEMI] +// [104, optional_derive → •, EOF / SEMI] +// [105, optional_derive → • DERIVE LPAREN non_empty_list_commas(qualified_uident) RPAREN, EOF / SEMI] +fn yy_state_392(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_DERIVE => Shift(yy_state_230) - NT_optional_derive => Shift(yy_state_356) - T_EOF | T_SEMI => Reduce(0, NT_optional_derive, yy_action_165) + T_DERIVE => Shift(yy_state_268) + NT_optional_derive => Shift(yy_state_393) + T_EOF | T_SEMI => Reduce(0, NT_optional_derive, yy_action_163) _ => Error } } -// [97, type_sig → nonempty_list(attribute) EXTENUM extensible_enum_extension_target PLUS_EQUAL LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive •, EOF / SEMI] -fn yy_state_356(_lookahead : YYSymbol) -> YYDecision { +// [101, type_sig → nonempty_list(attribute) EXTENUM extensible_enum_extension_target PLUS_EQUAL LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive •, EOF / SEMI] +fn yy_state_393(_lookahead : YYSymbol) -> YYDecision { ReduceNoLookahead(8, NT_type_sig, yy_action_125) } -// [91, type_sig → nonempty_list(attribute) EXTENUM type_decl_name_with_params • LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -fn yy_state_357(_lookahead : YYSymbol) -> YYDecision { +// [95, type_sig → nonempty_list(attribute) EXTENUM type_decl_name_with_params • LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +fn yy_state_394(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACE => Shift(yy_state_358) + T_LBRACE => Shift(yy_state_395) _ => Error } } -// [91, type_sig → nonempty_list(attribute) EXTENUM type_decl_name_with_params LBRACE • separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [148, enum_constructor → • UIDENT option(delimited(LPAREN,separated_nonempty_list(COMMA,constructor_param),RPAREN)) option(eq_tag), SEMI / RBRACE] -// [149, enum_constructor → • nonempty_list(attribute) UIDENT option(delimited(LPAREN,separated_nonempty_list(COMMA,constructor_param),RPAREN)) option(eq_tag), SEMI / RBRACE] -// [223, separated_list(SEMI,enum_constructor) → •, RBRACE] -// [224, separated_list(SEMI,enum_constructor) → • separated_nonempty_list(SEMI,enum_constructor), RBRACE] -// [252, nonempty_list(attribute) → • ATTRIBUTE, UIDENT] -// [253, nonempty_list(attribute) → • ATTRIBUTE nonempty_list(attribute), UIDENT] -// [260, separated_nonempty_list(SEMI,enum_constructor) → • enum_constructor, RBRACE] -// [261, separated_nonempty_list(SEMI,enum_constructor) → • enum_constructor SEMI separated_nonempty_list(SEMI,enum_constructor), RBRACE] -fn yy_state_358(_lookahead : YYSymbol) -> YYDecision { +// [95, type_sig → nonempty_list(attribute) EXTENUM type_decl_name_with_params LBRACE • separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [152, enum_constructor → • UIDENT option(delimited(LPAREN,separated_nonempty_list(COMMA,constructor_param),RPAREN)) option(eq_tag), SEMI / RBRACE] +// [153, enum_constructor → • nonempty_list(attribute) UIDENT option(delimited(LPAREN,separated_nonempty_list(COMMA,constructor_param),RPAREN)) option(eq_tag), SEMI / RBRACE] +// [228, separated_list(SEMI,enum_constructor) → •, RBRACE] +// [229, separated_list(SEMI,enum_constructor) → • separated_nonempty_list(SEMI,enum_constructor), RBRACE] +// [257, nonempty_list(attribute) → • ATTRIBUTE, UIDENT] +// [258, nonempty_list(attribute) → • ATTRIBUTE nonempty_list(attribute), UIDENT] +// [265, separated_nonempty_list(SEMI,enum_constructor) → • enum_constructor, RBRACE] +// [266, separated_nonempty_list(SEMI,enum_constructor) → • enum_constructor SEMI separated_nonempty_list(SEMI,enum_constructor), RBRACE] +fn yy_state_395(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_ATTRIBUTE => Shift(yy_state_19) - NT_enum_constructor => Shift(yy_state_202) - NT_nonempty_list_attribute_ => Shift(yy_state_205) - T_UIDENT => Shift(yy_state_224) - NT_separated_nonempty_list_SEMI_enum_constructor_ => Shift(yy_state_227) - NT_separated_list_SEMI_enum_constructor_ => Shift(yy_state_359) - T_RBRACE => Reduce(0, NT_separated_list_SEMI_enum_constructor_, yy_action_184) + NT_enum_constructor => Shift(yy_state_240) + NT_nonempty_list_attribute_ => Shift(yy_state_243) + T_UIDENT => Shift(yy_state_262) + NT_separated_nonempty_list_SEMI_enum_constructor_ => Shift(yy_state_265) + NT_separated_list_SEMI_enum_constructor_ => Shift(yy_state_396) + T_RBRACE => Reduce(0, NT_separated_list_SEMI_enum_constructor_, yy_action_182) _ => Error } } -// [91, type_sig → nonempty_list(attribute) EXTENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) • RBRACE optional_derive, EOF / SEMI] -fn yy_state_359(_lookahead : YYSymbol) -> YYDecision { +// [95, type_sig → nonempty_list(attribute) EXTENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) • RBRACE optional_derive, EOF / SEMI] +fn yy_state_396(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RBRACE => Shift(yy_state_360) + T_RBRACE => Shift(yy_state_397) _ => Error } } -// [91, type_sig → nonempty_list(attribute) EXTENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE • optional_derive, EOF / SEMI] -// [100, optional_derive → •, EOF / SEMI] -// [101, optional_derive → • DERIVE LPAREN non_empty_list_commas(qualified_uident) RPAREN, EOF / SEMI] -fn yy_state_360(_lookahead : YYSymbol) -> YYDecision { +// [95, type_sig → nonempty_list(attribute) EXTENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE • optional_derive, EOF / SEMI] +// [104, optional_derive → •, EOF / SEMI] +// [105, optional_derive → • DERIVE LPAREN non_empty_list_commas(qualified_uident) RPAREN, EOF / SEMI] +fn yy_state_397(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_DERIVE => Shift(yy_state_230) - NT_optional_derive => Shift(yy_state_361) - T_EOF | T_SEMI => Reduce(0, NT_optional_derive, yy_action_165) + T_DERIVE => Shift(yy_state_268) + NT_optional_derive => Shift(yy_state_398) + T_EOF | T_SEMI => Reduce(0, NT_optional_derive, yy_action_163) _ => Error } } -// [91, type_sig → nonempty_list(attribute) EXTENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive •, EOF / SEMI] -fn yy_state_361(_lookahead : YYSymbol) -> YYDecision { +// [95, type_sig → nonempty_list(attribute) EXTENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive •, EOF / SEMI] +fn yy_state_398(_lookahead : YYSymbol) -> YYDecision { ReduceNoLookahead(7, NT_type_sig, yy_action_124) } -// [85, type_sig → nonempty_list(attribute) ENUM • type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [164, type_decl_name_with_params → • uident optional_type_params_no_constraints, LBRACE] -// [212, uident → • UIDENT, LBRACKET / LBRACE] -fn yy_state_362(_lookahead : YYSymbol) -> YYDecision { +// [89, type_sig → nonempty_list(attribute) ENUM • type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [168, type_decl_name_with_params → • uident optional_type_params_no_constraints, LBRACE] +// [216, uident → • UIDENT, LBRACKET / LBRACE] +fn yy_state_399(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_UIDENT => Shift(yy_state_25) - NT_uident => Shift(yy_state_246) - NT_type_decl_name_with_params => Shift(yy_state_363) + NT_uident => Shift(yy_state_284) + NT_type_decl_name_with_params => Shift(yy_state_400) _ => Error } } -// [85, type_sig → nonempty_list(attribute) ENUM type_decl_name_with_params • LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -fn yy_state_363(_lookahead : YYSymbol) -> YYDecision { +// [89, type_sig → nonempty_list(attribute) ENUM type_decl_name_with_params • LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +fn yy_state_400(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACE => Shift(yy_state_364) + T_LBRACE => Shift(yy_state_401) _ => Error } } -// [85, type_sig → nonempty_list(attribute) ENUM type_decl_name_with_params LBRACE • separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [148, enum_constructor → • UIDENT option(delimited(LPAREN,separated_nonempty_list(COMMA,constructor_param),RPAREN)) option(eq_tag), SEMI / RBRACE] -// [149, enum_constructor → • nonempty_list(attribute) UIDENT option(delimited(LPAREN,separated_nonempty_list(COMMA,constructor_param),RPAREN)) option(eq_tag), SEMI / RBRACE] -// [223, separated_list(SEMI,enum_constructor) → •, RBRACE] -// [224, separated_list(SEMI,enum_constructor) → • separated_nonempty_list(SEMI,enum_constructor), RBRACE] -// [252, nonempty_list(attribute) → • ATTRIBUTE, UIDENT] -// [253, nonempty_list(attribute) → • ATTRIBUTE nonempty_list(attribute), UIDENT] -// [260, separated_nonempty_list(SEMI,enum_constructor) → • enum_constructor, RBRACE] -// [261, separated_nonempty_list(SEMI,enum_constructor) → • enum_constructor SEMI separated_nonempty_list(SEMI,enum_constructor), RBRACE] -fn yy_state_364(_lookahead : YYSymbol) -> YYDecision { +// [89, type_sig → nonempty_list(attribute) ENUM type_decl_name_with_params LBRACE • separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [152, enum_constructor → • UIDENT option(delimited(LPAREN,separated_nonempty_list(COMMA,constructor_param),RPAREN)) option(eq_tag), SEMI / RBRACE] +// [153, enum_constructor → • nonempty_list(attribute) UIDENT option(delimited(LPAREN,separated_nonempty_list(COMMA,constructor_param),RPAREN)) option(eq_tag), SEMI / RBRACE] +// [228, separated_list(SEMI,enum_constructor) → •, RBRACE] +// [229, separated_list(SEMI,enum_constructor) → • separated_nonempty_list(SEMI,enum_constructor), RBRACE] +// [257, nonempty_list(attribute) → • ATTRIBUTE, UIDENT] +// [258, nonempty_list(attribute) → • ATTRIBUTE nonempty_list(attribute), UIDENT] +// [265, separated_nonempty_list(SEMI,enum_constructor) → • enum_constructor, RBRACE] +// [266, separated_nonempty_list(SEMI,enum_constructor) → • enum_constructor SEMI separated_nonempty_list(SEMI,enum_constructor), RBRACE] +fn yy_state_401(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_ATTRIBUTE => Shift(yy_state_19) - NT_enum_constructor => Shift(yy_state_202) - NT_nonempty_list_attribute_ => Shift(yy_state_205) - T_UIDENT => Shift(yy_state_224) - NT_separated_nonempty_list_SEMI_enum_constructor_ => Shift(yy_state_227) - NT_separated_list_SEMI_enum_constructor_ => Shift(yy_state_365) - T_RBRACE => Reduce(0, NT_separated_list_SEMI_enum_constructor_, yy_action_184) + NT_enum_constructor => Shift(yy_state_240) + NT_nonempty_list_attribute_ => Shift(yy_state_243) + T_UIDENT => Shift(yy_state_262) + NT_separated_nonempty_list_SEMI_enum_constructor_ => Shift(yy_state_265) + NT_separated_list_SEMI_enum_constructor_ => Shift(yy_state_402) + T_RBRACE => Reduce(0, NT_separated_list_SEMI_enum_constructor_, yy_action_182) _ => Error } } -// [85, type_sig → nonempty_list(attribute) ENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) • RBRACE optional_derive, EOF / SEMI] -fn yy_state_365(_lookahead : YYSymbol) -> YYDecision { +// [89, type_sig → nonempty_list(attribute) ENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) • RBRACE optional_derive, EOF / SEMI] +fn yy_state_402(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RBRACE => Shift(yy_state_366) + T_RBRACE => Shift(yy_state_403) _ => Error } } -// [85, type_sig → nonempty_list(attribute) ENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE • optional_derive, EOF / SEMI] -// [100, optional_derive → •, EOF / SEMI] -// [101, optional_derive → • DERIVE LPAREN non_empty_list_commas(qualified_uident) RPAREN, EOF / SEMI] -fn yy_state_366(_lookahead : YYSymbol) -> YYDecision { +// [89, type_sig → nonempty_list(attribute) ENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE • optional_derive, EOF / SEMI] +// [104, optional_derive → •, EOF / SEMI] +// [105, optional_derive → • DERIVE LPAREN non_empty_list_commas(qualified_uident) RPAREN, EOF / SEMI] +fn yy_state_403(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_DERIVE => Shift(yy_state_230) - NT_optional_derive => Shift(yy_state_367) - T_EOF | T_SEMI => Reduce(0, NT_optional_derive, yy_action_165) + T_DERIVE => Shift(yy_state_268) + NT_optional_derive => Shift(yy_state_404) + T_EOF | T_SEMI => Reduce(0, NT_optional_derive, yy_action_163) _ => Error } } -// [85, type_sig → nonempty_list(attribute) ENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive •, EOF / SEMI] -fn yy_state_367(_lookahead : YYSymbol) -> YYDecision { +// [89, type_sig → nonempty_list(attribute) ENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive •, EOF / SEMI] +fn yy_state_404(_lookahead : YYSymbol) -> YYDecision { ReduceNoLookahead(7, NT_type_sig, yy_action_123) } -// [73, type_sig → nonempty_list(attribute) STRUCT • type_decl_name_with_params LBRACE record_decl_body RBRACE optional_derive, EOF / SEMI] -// [79, type_sig → nonempty_list(attribute) STRUCT • type_decl_name_with_params LPAREN separated_list(COMMA,type_) RPAREN optional_derive, EOF / SEMI] -// [164, type_decl_name_with_params → • uident optional_type_params_no_constraints, LPAREN / LBRACE] -// [212, uident → • UIDENT, LPAREN / LBRACKET / LBRACE] -fn yy_state_368(_lookahead : YYSymbol) -> YYDecision { +// [77, type_sig → nonempty_list(attribute) STRUCT • type_decl_name_with_params LBRACE record_decl_body RBRACE optional_derive, EOF / SEMI] +// [83, type_sig → nonempty_list(attribute) STRUCT • type_decl_name_with_params LPAREN separated_list(COMMA,type_) RPAREN optional_derive, EOF / SEMI] +// [168, type_decl_name_with_params → • uident optional_type_params_no_constraints, LPAREN / LBRACE] +// [216, uident → • UIDENT, LPAREN / LBRACKET / LBRACE] +fn yy_state_405(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_UIDENT => Shift(yy_state_25) - NT_uident => Shift(yy_state_246) - NT_type_decl_name_with_params => Shift(yy_state_369) + NT_uident => Shift(yy_state_284) + NT_type_decl_name_with_params => Shift(yy_state_406) _ => Error } } -// [73, type_sig → nonempty_list(attribute) STRUCT type_decl_name_with_params • LBRACE record_decl_body RBRACE optional_derive, EOF / SEMI] -// [79, type_sig → nonempty_list(attribute) STRUCT type_decl_name_with_params • LPAREN separated_list(COMMA,type_) RPAREN optional_derive, EOF / SEMI] -fn yy_state_369(_lookahead : YYSymbol) -> YYDecision { +// [77, type_sig → nonempty_list(attribute) STRUCT type_decl_name_with_params • LBRACE record_decl_body RBRACE optional_derive, EOF / SEMI] +// [83, type_sig → nonempty_list(attribute) STRUCT type_decl_name_with_params • LPAREN separated_list(COMMA,type_) RPAREN optional_derive, EOF / SEMI] +fn yy_state_406(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LPAREN => Shift(yy_state_370) - T_LBRACE => Shift(yy_state_374) - _ => Error - } -} - -// [79, type_sig → nonempty_list(attribute) STRUCT type_decl_name_with_params LPAREN • separated_list(COMMA,type_) RPAREN optional_derive, EOF / SEMI] -// [167, simple_type → • simple_type QUESTION, RPAREN / COMMA / QUESTION] -// [168, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, RPAREN / COMMA / QUESTION] -// [169, simple_type → • LPAREN type_ RPAREN, RPAREN / COMMA / QUESTION] -// [170, simple_type → • qualified_uident_ optional_type_arguments, RPAREN / COMMA / QUESTION] -// [171, simple_type → • AMPER qualified_uident_, RPAREN / COMMA / QUESTION] -// [172, simple_type → • UNDERSCORE, RPAREN / COMMA / QUESTION] -// [173, type_ → • simple_type, RPAREN / COMMA] -// [174, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [175, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [176, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [177, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [178, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [179, type_ → • LPAREN RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [180, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [181, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [210, qualified_uident_ → • UIDENT, RPAREN / COMMA / QUESTION / LBRACKET] -// [211, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, RPAREN / COMMA / QUESTION / LBRACKET] -// [225, separated_list(COMMA,type_) → •, RPAREN] -// [226, separated_list(COMMA,type_) → • separated_nonempty_list(COMMA,type_), RPAREN] -// [250, separated_nonempty_list(COMMA,type_) → • type_, RPAREN] -// [251, separated_nonempty_list(COMMA,type_) → • type_ COMMA separated_nonempty_list(COMMA,type_), RPAREN] -fn yy_state_370(_lookahead : YYSymbol) -> YYDecision { + T_LPAREN => Shift(yy_state_407) + T_LBRACE => Shift(yy_state_411) + _ => Error + } +} + +// [83, type_sig → nonempty_list(attribute) STRUCT type_decl_name_with_params LPAREN • separated_list(COMMA,type_) RPAREN optional_derive, EOF / SEMI] +// [171, simple_type → • simple_type QUESTION, RPAREN / COMMA / QUESTION] +// [172, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, RPAREN / COMMA / QUESTION] +// [173, simple_type → • LPAREN type_ RPAREN, RPAREN / COMMA / QUESTION] +// [174, simple_type → • qualified_uident_ optional_type_arguments, RPAREN / COMMA / QUESTION] +// [175, simple_type → • AMPER qualified_uident_, RPAREN / COMMA / QUESTION] +// [176, simple_type → • UNDERSCORE, RPAREN / COMMA / QUESTION] +// [177, type_ → • simple_type, RPAREN / COMMA] +// [178, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [179, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [180, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [181, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [182, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [183, type_ → • LPAREN RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [184, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [185, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [214, qualified_uident_ → • UIDENT, RPAREN / COMMA / QUESTION / LBRACKET] +// [215, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, RPAREN / COMMA / QUESTION / LBRACKET] +// [230, separated_list(COMMA,type_) → •, RPAREN] +// [231, separated_list(COMMA,type_) → • separated_nonempty_list(COMMA,type_), RPAREN] +// [255, separated_nonempty_list(COMMA,type_) → • type_, RPAREN] +// [256, separated_nonempty_list(COMMA,type_) → • type_ COMMA separated_nonempty_list(COMMA,type_), RPAREN] +fn yy_state_407(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_PACKAGE_NAME => Shift(yy_state_62) T_UIDENT => Shift(yy_state_64) @@ -8783,214 +9589,214 @@ fn yy_state_370(_lookahead : YYSymbol) -> YYDecision { NT_type_ => Shift(yy_state_80) T_LPAREN => Shift(yy_state_83) NT_simple_type => Shift(yy_state_106) - NT_separated_nonempty_list_COMMA_type__ => Shift(yy_state_256) - NT_separated_list_COMMA_type__ => Shift(yy_state_371) - T_RPAREN => Reduce(0, NT_separated_list_COMMA_type__, yy_action_157) + NT_separated_nonempty_list_COMMA_type__ => Shift(yy_state_294) + NT_separated_list_COMMA_type__ => Shift(yy_state_408) + T_RPAREN => Reduce(0, NT_separated_list_COMMA_type__, yy_action_155) _ => Error } } -// [79, type_sig → nonempty_list(attribute) STRUCT type_decl_name_with_params LPAREN separated_list(COMMA,type_) • RPAREN optional_derive, EOF / SEMI] -fn yy_state_371(_lookahead : YYSymbol) -> YYDecision { +// [83, type_sig → nonempty_list(attribute) STRUCT type_decl_name_with_params LPAREN separated_list(COMMA,type_) • RPAREN optional_derive, EOF / SEMI] +fn yy_state_408(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RPAREN => Shift(yy_state_372) + T_RPAREN => Shift(yy_state_409) _ => Error } } -// [79, type_sig → nonempty_list(attribute) STRUCT type_decl_name_with_params LPAREN separated_list(COMMA,type_) RPAREN • optional_derive, EOF / SEMI] -// [100, optional_derive → •, EOF / SEMI] -// [101, optional_derive → • DERIVE LPAREN non_empty_list_commas(qualified_uident) RPAREN, EOF / SEMI] -fn yy_state_372(_lookahead : YYSymbol) -> YYDecision { +// [83, type_sig → nonempty_list(attribute) STRUCT type_decl_name_with_params LPAREN separated_list(COMMA,type_) RPAREN • optional_derive, EOF / SEMI] +// [104, optional_derive → •, EOF / SEMI] +// [105, optional_derive → • DERIVE LPAREN non_empty_list_commas(qualified_uident) RPAREN, EOF / SEMI] +fn yy_state_409(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_DERIVE => Shift(yy_state_230) - NT_optional_derive => Shift(yy_state_373) - T_EOF | T_SEMI => Reduce(0, NT_optional_derive, yy_action_165) + T_DERIVE => Shift(yy_state_268) + NT_optional_derive => Shift(yy_state_410) + T_EOF | T_SEMI => Reduce(0, NT_optional_derive, yy_action_163) _ => Error } } -// [79, type_sig → nonempty_list(attribute) STRUCT type_decl_name_with_params LPAREN separated_list(COMMA,type_) RPAREN optional_derive •, EOF / SEMI] -fn yy_state_373(_lookahead : YYSymbol) -> YYDecision { +// [83, type_sig → nonempty_list(attribute) STRUCT type_decl_name_with_params LPAREN separated_list(COMMA,type_) RPAREN optional_derive •, EOF / SEMI] +fn yy_state_410(_lookahead : YYSymbol) -> YYDecision { ReduceNoLookahead(7, NT_type_sig, yy_action_122) } -// [73, type_sig → nonempty_list(attribute) STRUCT type_decl_name_with_params LBRACE • record_decl_body RBRACE optional_derive, EOF / SEMI] -// [152, record_decl_field → • boption(MUTABLE) LIDENT COLON type_, SEMI / RBRACE] -// [153, record_decl_field → • nonempty_list(attribute) boption(MUTABLE) LIDENT COLON type_, SEMI / RBRACE] -// [154, record_decl_body → • separated_list(SEMI,record_decl_field), RBRACE] -// [240, boption(MUTABLE) → •, LIDENT] -// [241, boption(MUTABLE) → • MUTABLE, LIDENT] -// [242, separated_list(SEMI,record_decl_field) → •, RBRACE] -// [243, separated_list(SEMI,record_decl_field) → • separated_nonempty_list(SEMI,record_decl_field), RBRACE] -// [252, nonempty_list(attribute) → • ATTRIBUTE, LIDENT / MUTABLE] -// [253, nonempty_list(attribute) → • ATTRIBUTE nonempty_list(attribute), LIDENT / MUTABLE] -// [266, separated_nonempty_list(SEMI,record_decl_field) → • record_decl_field, RBRACE] -// [267, separated_nonempty_list(SEMI,record_decl_field) → • record_decl_field SEMI separated_nonempty_list(SEMI,record_decl_field), RBRACE] -fn yy_state_374(_lookahead : YYSymbol) -> YYDecision { +// [77, type_sig → nonempty_list(attribute) STRUCT type_decl_name_with_params LBRACE • record_decl_body RBRACE optional_derive, EOF / SEMI] +// [156, record_decl_field → • boption(MUTABLE) lident COLON type_, SEMI / RBRACE] +// [157, record_decl_field → • nonempty_list(attribute) boption(MUTABLE) lident COLON type_, SEMI / RBRACE] +// [158, record_decl_body → • separated_list(SEMI,record_decl_field), RBRACE] +// [245, boption(MUTABLE) → •, LIDENT / EXTEND] +// [246, boption(MUTABLE) → • MUTABLE, LIDENT / EXTEND] +// [247, separated_list(SEMI,record_decl_field) → •, RBRACE] +// [248, separated_list(SEMI,record_decl_field) → • separated_nonempty_list(SEMI,record_decl_field), RBRACE] +// [257, nonempty_list(attribute) → • ATTRIBUTE, LIDENT / MUTABLE / EXTEND] +// [258, nonempty_list(attribute) → • ATTRIBUTE nonempty_list(attribute), LIDENT / MUTABLE / EXTEND] +// [271, separated_nonempty_list(SEMI,record_decl_field) → • record_decl_field, RBRACE] +// [272, separated_nonempty_list(SEMI,record_decl_field) → • record_decl_field SEMI separated_nonempty_list(SEMI,record_decl_field), RBRACE] +fn yy_state_411(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_ATTRIBUTE => Shift(yy_state_19) - T_MUTABLE => Shift(yy_state_208) - NT_record_decl_field => Shift(yy_state_261) - NT_nonempty_list_attribute_ => Shift(yy_state_264) - NT_boption_MUTABLE_ => Shift(yy_state_269) - NT_separated_nonempty_list_SEMI_record_decl_field_ => Shift(yy_state_273) - NT_separated_list_SEMI_record_decl_field_ => Shift(yy_state_274) - NT_record_decl_body => Shift(yy_state_375) - T_LIDENT => Reduce(0, NT_boption_MUTABLE_, yy_action_180) - T_RBRACE => Reduce(0, NT_separated_list_SEMI_record_decl_field_, yy_action_154) + T_MUTABLE => Shift(yy_state_246) + NT_record_decl_field => Shift(yy_state_299) + NT_nonempty_list_attribute_ => Shift(yy_state_302) + NT_boption_MUTABLE_ => Shift(yy_state_307) + NT_separated_nonempty_list_SEMI_record_decl_field_ => Shift(yy_state_311) + NT_separated_list_SEMI_record_decl_field_ => Shift(yy_state_312) + NT_record_decl_body => Shift(yy_state_412) + T_LIDENT | T_EXTEND => Reduce(0, NT_boption_MUTABLE_, yy_action_178) + T_RBRACE => Reduce(0, NT_separated_list_SEMI_record_decl_field_, yy_action_152) _ => Error } } -// [73, type_sig → nonempty_list(attribute) STRUCT type_decl_name_with_params LBRACE record_decl_body • RBRACE optional_derive, EOF / SEMI] -fn yy_state_375(_lookahead : YYSymbol) -> YYDecision { +// [77, type_sig → nonempty_list(attribute) STRUCT type_decl_name_with_params LBRACE record_decl_body • RBRACE optional_derive, EOF / SEMI] +fn yy_state_412(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RBRACE => Shift(yy_state_376) + T_RBRACE => Shift(yy_state_413) _ => Error } } -// [73, type_sig → nonempty_list(attribute) STRUCT type_decl_name_with_params LBRACE record_decl_body RBRACE • optional_derive, EOF / SEMI] -// [100, optional_derive → •, EOF / SEMI] -// [101, optional_derive → • DERIVE LPAREN non_empty_list_commas(qualified_uident) RPAREN, EOF / SEMI] -fn yy_state_376(_lookahead : YYSymbol) -> YYDecision { +// [77, type_sig → nonempty_list(attribute) STRUCT type_decl_name_with_params LBRACE record_decl_body RBRACE • optional_derive, EOF / SEMI] +// [104, optional_derive → •, EOF / SEMI] +// [105, optional_derive → • DERIVE LPAREN non_empty_list_commas(qualified_uident) RPAREN, EOF / SEMI] +fn yy_state_413(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_DERIVE => Shift(yy_state_230) - NT_optional_derive => Shift(yy_state_377) - T_EOF | T_SEMI => Reduce(0, NT_optional_derive, yy_action_165) + T_DERIVE => Shift(yy_state_268) + NT_optional_derive => Shift(yy_state_414) + T_EOF | T_SEMI => Reduce(0, NT_optional_derive, yy_action_163) _ => Error } } -// [73, type_sig → nonempty_list(attribute) STRUCT type_decl_name_with_params LBRACE record_decl_body RBRACE optional_derive •, EOF / SEMI] -fn yy_state_377(_lookahead : YYSymbol) -> YYDecision { +// [77, type_sig → nonempty_list(attribute) STRUCT type_decl_name_with_params LBRACE record_decl_body RBRACE optional_derive •, EOF / SEMI] +fn yy_state_414(_lookahead : YYSymbol) -> YYDecision { ReduceNoLookahead(7, NT_type_sig, yy_action_121) } -// [61, type_sig → nonempty_list(attribute) SUBERROR • uident optional_derive, EOF / SEMI] -// [67, type_sig → nonempty_list(attribute) SUBERROR • uident LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [212, uident → • UIDENT, EOF / DERIVE / SEMI / LBRACE] -fn yy_state_378(_lookahead : YYSymbol) -> YYDecision { +// [65, type_sig → nonempty_list(attribute) SUBERROR • uident optional_derive, EOF / SEMI] +// [71, type_sig → nonempty_list(attribute) SUBERROR • uident LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [216, uident → • UIDENT, EOF / DERIVE / SEMI / LBRACE] +fn yy_state_415(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_UIDENT => Shift(yy_state_25) - NT_uident => Shift(yy_state_379) + NT_uident => Shift(yy_state_416) _ => Error } } -// [61, type_sig → nonempty_list(attribute) SUBERROR uident • optional_derive, EOF / SEMI] -// [67, type_sig → nonempty_list(attribute) SUBERROR uident • LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [100, optional_derive → •, EOF / SEMI] -// [101, optional_derive → • DERIVE LPAREN non_empty_list_commas(qualified_uident) RPAREN, EOF / SEMI] -fn yy_state_379(_lookahead : YYSymbol) -> YYDecision { +// [65, type_sig → nonempty_list(attribute) SUBERROR uident • optional_derive, EOF / SEMI] +// [71, type_sig → nonempty_list(attribute) SUBERROR uident • LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [104, optional_derive → •, EOF / SEMI] +// [105, optional_derive → • DERIVE LPAREN non_empty_list_commas(qualified_uident) RPAREN, EOF / SEMI] +fn yy_state_416(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_DERIVE => Shift(yy_state_230) - T_LBRACE => Shift(yy_state_380) - NT_optional_derive => Shift(yy_state_384) - T_EOF | T_SEMI => Reduce(0, NT_optional_derive, yy_action_165) + T_DERIVE => Shift(yy_state_268) + T_LBRACE => Shift(yy_state_417) + NT_optional_derive => Shift(yy_state_421) + T_EOF | T_SEMI => Reduce(0, NT_optional_derive, yy_action_163) _ => Error } } -// [67, type_sig → nonempty_list(attribute) SUBERROR uident LBRACE • separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [148, enum_constructor → • UIDENT option(delimited(LPAREN,separated_nonempty_list(COMMA,constructor_param),RPAREN)) option(eq_tag), SEMI / RBRACE] -// [149, enum_constructor → • nonempty_list(attribute) UIDENT option(delimited(LPAREN,separated_nonempty_list(COMMA,constructor_param),RPAREN)) option(eq_tag), SEMI / RBRACE] -// [223, separated_list(SEMI,enum_constructor) → •, RBRACE] -// [224, separated_list(SEMI,enum_constructor) → • separated_nonempty_list(SEMI,enum_constructor), RBRACE] -// [252, nonempty_list(attribute) → • ATTRIBUTE, UIDENT] -// [253, nonempty_list(attribute) → • ATTRIBUTE nonempty_list(attribute), UIDENT] -// [260, separated_nonempty_list(SEMI,enum_constructor) → • enum_constructor, RBRACE] -// [261, separated_nonempty_list(SEMI,enum_constructor) → • enum_constructor SEMI separated_nonempty_list(SEMI,enum_constructor), RBRACE] -fn yy_state_380(_lookahead : YYSymbol) -> YYDecision { +// [71, type_sig → nonempty_list(attribute) SUBERROR uident LBRACE • separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [152, enum_constructor → • UIDENT option(delimited(LPAREN,separated_nonempty_list(COMMA,constructor_param),RPAREN)) option(eq_tag), SEMI / RBRACE] +// [153, enum_constructor → • nonempty_list(attribute) UIDENT option(delimited(LPAREN,separated_nonempty_list(COMMA,constructor_param),RPAREN)) option(eq_tag), SEMI / RBRACE] +// [228, separated_list(SEMI,enum_constructor) → •, RBRACE] +// [229, separated_list(SEMI,enum_constructor) → • separated_nonempty_list(SEMI,enum_constructor), RBRACE] +// [257, nonempty_list(attribute) → • ATTRIBUTE, UIDENT] +// [258, nonempty_list(attribute) → • ATTRIBUTE nonempty_list(attribute), UIDENT] +// [265, separated_nonempty_list(SEMI,enum_constructor) → • enum_constructor, RBRACE] +// [266, separated_nonempty_list(SEMI,enum_constructor) → • enum_constructor SEMI separated_nonempty_list(SEMI,enum_constructor), RBRACE] +fn yy_state_417(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_ATTRIBUTE => Shift(yy_state_19) - NT_enum_constructor => Shift(yy_state_202) - NT_nonempty_list_attribute_ => Shift(yy_state_205) - T_UIDENT => Shift(yy_state_224) - NT_separated_nonempty_list_SEMI_enum_constructor_ => Shift(yy_state_227) - NT_separated_list_SEMI_enum_constructor_ => Shift(yy_state_381) - T_RBRACE => Reduce(0, NT_separated_list_SEMI_enum_constructor_, yy_action_184) + NT_enum_constructor => Shift(yy_state_240) + NT_nonempty_list_attribute_ => Shift(yy_state_243) + T_UIDENT => Shift(yy_state_262) + NT_separated_nonempty_list_SEMI_enum_constructor_ => Shift(yy_state_265) + NT_separated_list_SEMI_enum_constructor_ => Shift(yy_state_418) + T_RBRACE => Reduce(0, NT_separated_list_SEMI_enum_constructor_, yy_action_182) _ => Error } } -// [67, type_sig → nonempty_list(attribute) SUBERROR uident LBRACE separated_list(SEMI,enum_constructor) • RBRACE optional_derive, EOF / SEMI] -fn yy_state_381(_lookahead : YYSymbol) -> YYDecision { +// [71, type_sig → nonempty_list(attribute) SUBERROR uident LBRACE separated_list(SEMI,enum_constructor) • RBRACE optional_derive, EOF / SEMI] +fn yy_state_418(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RBRACE => Shift(yy_state_382) + T_RBRACE => Shift(yy_state_419) _ => Error } } -// [67, type_sig → nonempty_list(attribute) SUBERROR uident LBRACE separated_list(SEMI,enum_constructor) RBRACE • optional_derive, EOF / SEMI] -// [100, optional_derive → •, EOF / SEMI] -// [101, optional_derive → • DERIVE LPAREN non_empty_list_commas(qualified_uident) RPAREN, EOF / SEMI] -fn yy_state_382(_lookahead : YYSymbol) -> YYDecision { +// [71, type_sig → nonempty_list(attribute) SUBERROR uident LBRACE separated_list(SEMI,enum_constructor) RBRACE • optional_derive, EOF / SEMI] +// [104, optional_derive → •, EOF / SEMI] +// [105, optional_derive → • DERIVE LPAREN non_empty_list_commas(qualified_uident) RPAREN, EOF / SEMI] +fn yy_state_419(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_DERIVE => Shift(yy_state_230) - NT_optional_derive => Shift(yy_state_383) - T_EOF | T_SEMI => Reduce(0, NT_optional_derive, yy_action_165) + T_DERIVE => Shift(yy_state_268) + NT_optional_derive => Shift(yy_state_420) + T_EOF | T_SEMI => Reduce(0, NT_optional_derive, yy_action_163) _ => Error } } -// [67, type_sig → nonempty_list(attribute) SUBERROR uident LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive •, EOF / SEMI] -fn yy_state_383(_lookahead : YYSymbol) -> YYDecision { +// [71, type_sig → nonempty_list(attribute) SUBERROR uident LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive •, EOF / SEMI] +fn yy_state_420(_lookahead : YYSymbol) -> YYDecision { ReduceNoLookahead(7, NT_type_sig, yy_action_120) } -// [61, type_sig → nonempty_list(attribute) SUBERROR uident optional_derive •, EOF / SEMI] -fn yy_state_384(_lookahead : YYSymbol) -> YYDecision { +// [65, type_sig → nonempty_list(attribute) SUBERROR uident optional_derive •, EOF / SEMI] +fn yy_state_421(_lookahead : YYSymbol) -> YYDecision { ReduceNoLookahead(4, NT_type_sig, yy_action_119) } -// [55, type_sig → nonempty_list(attribute) TYPE • type_decl_name_with_params optional_derive, EOF / SEMI] -// [127, alias_sig → nonempty_list(attribute) TYPE • type_decl_name_with_params EQUAL type_, EOF / SEMI] -// [164, type_decl_name_with_params → • uident optional_type_params_no_constraints, EOF / DERIVE / EQUAL / SEMI] -// [212, uident → • UIDENT, EOF / DERIVE / EQUAL / SEMI / LBRACKET] -fn yy_state_385(_lookahead : YYSymbol) -> YYDecision { +// [59, type_sig → nonempty_list(attribute) TYPE • type_decl_name_with_params optional_derive, EOF / SEMI] +// [131, alias_sig → nonempty_list(attribute) TYPE • type_decl_name_with_params EQUAL type_, EOF / SEMI] +// [168, type_decl_name_with_params → • uident optional_type_params_no_constraints, EOF / DERIVE / EQUAL / SEMI] +// [216, uident → • UIDENT, EOF / DERIVE / EQUAL / SEMI / LBRACKET] +fn yy_state_422(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_UIDENT => Shift(yy_state_25) - NT_uident => Shift(yy_state_246) - NT_type_decl_name_with_params => Shift(yy_state_386) + NT_uident => Shift(yy_state_284) + NT_type_decl_name_with_params => Shift(yy_state_423) _ => Error } } -// [55, type_sig → nonempty_list(attribute) TYPE type_decl_name_with_params • optional_derive, EOF / SEMI] -// [100, optional_derive → •, EOF / SEMI] -// [101, optional_derive → • DERIVE LPAREN non_empty_list_commas(qualified_uident) RPAREN, EOF / SEMI] -// [127, alias_sig → nonempty_list(attribute) TYPE type_decl_name_with_params • EQUAL type_, EOF / SEMI] -fn yy_state_386(_lookahead : YYSymbol) -> YYDecision { +// [59, type_sig → nonempty_list(attribute) TYPE type_decl_name_with_params • optional_derive, EOF / SEMI] +// [104, optional_derive → •, EOF / SEMI] +// [105, optional_derive → • DERIVE LPAREN non_empty_list_commas(qualified_uident) RPAREN, EOF / SEMI] +// [131, alias_sig → nonempty_list(attribute) TYPE type_decl_name_with_params • EQUAL type_, EOF / SEMI] +fn yy_state_423(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_DERIVE => Shift(yy_state_230) - T_EQUAL => Shift(yy_state_387) - NT_optional_derive => Shift(yy_state_389) - T_EOF | T_SEMI => Reduce(0, NT_optional_derive, yy_action_165) - _ => Error - } -} - -// [127, alias_sig → nonempty_list(attribute) TYPE type_decl_name_with_params EQUAL • type_, EOF / SEMI] -// [167, simple_type → • simple_type QUESTION, EOF / QUESTION / SEMI] -// [168, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, EOF / QUESTION / SEMI] -// [169, simple_type → • LPAREN type_ RPAREN, EOF / QUESTION / SEMI] -// [170, simple_type → • qualified_uident_ optional_type_arguments, EOF / QUESTION / SEMI] -// [171, simple_type → • AMPER qualified_uident_, EOF / QUESTION / SEMI] -// [172, simple_type → • UNDERSCORE, EOF / QUESTION / SEMI] -// [173, type_ → • simple_type, EOF / SEMI] -// [174, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] -// [175, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] -// [176, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] -// [177, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] -// [178, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] -// [179, type_ → • LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] -// [180, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] -// [181, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] -// [210, qualified_uident_ → • UIDENT, EOF / QUESTION / SEMI / LBRACKET] -// [211, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, EOF / QUESTION / SEMI / LBRACKET] -fn yy_state_387(_lookahead : YYSymbol) -> YYDecision { + T_DERIVE => Shift(yy_state_268) + T_EQUAL => Shift(yy_state_424) + NT_optional_derive => Shift(yy_state_426) + T_EOF | T_SEMI => Reduce(0, NT_optional_derive, yy_action_163) + _ => Error + } +} + +// [131, alias_sig → nonempty_list(attribute) TYPE type_decl_name_with_params EQUAL • type_, EOF / SEMI] +// [171, simple_type → • simple_type QUESTION, EOF / QUESTION / SEMI] +// [172, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, EOF / QUESTION / SEMI] +// [173, simple_type → • LPAREN type_ RPAREN, EOF / QUESTION / SEMI] +// [174, simple_type → • qualified_uident_ optional_type_arguments, EOF / QUESTION / SEMI] +// [175, simple_type → • AMPER qualified_uident_, EOF / QUESTION / SEMI] +// [176, simple_type → • UNDERSCORE, EOF / QUESTION / SEMI] +// [177, type_ → • simple_type, EOF / SEMI] +// [178, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] +// [179, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] +// [180, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] +// [181, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] +// [182, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] +// [183, type_ → • LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] +// [184, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] +// [185, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] +// [214, qualified_uident_ → • UIDENT, EOF / QUESTION / SEMI / LBRACKET] +// [215, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, EOF / QUESTION / SEMI / LBRACKET] +fn yy_state_424(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_PACKAGE_NAME => Shift(yy_state_62) T_UIDENT => Shift(yy_state_64) @@ -9000,96 +9806,102 @@ fn yy_state_387(_lookahead : YYSymbol) -> YYDecision { NT_qualified_uident_ => Shift(yy_state_78) T_LPAREN => Shift(yy_state_83) NT_simple_type => Shift(yy_state_106) - NT_type_ => Shift(yy_state_388) + NT_type_ => Shift(yy_state_425) _ => Error } } -// [127, alias_sig → nonempty_list(attribute) TYPE type_decl_name_with_params EQUAL type_ •, EOF / SEMI] -fn yy_state_388(_lookahead : YYSymbol) -> YYDecision { +// [131, alias_sig → nonempty_list(attribute) TYPE type_decl_name_with_params EQUAL type_ •, EOF / SEMI] +fn yy_state_425(_lookahead : YYSymbol) -> YYDecision { ReduceNoLookahead(5, NT_alias_sig, yy_action_118) } -// [55, type_sig → nonempty_list(attribute) TYPE type_decl_name_with_params optional_derive •, EOF / SEMI] -fn yy_state_389(_lookahead : YYSymbol) -> YYDecision { +// [59, type_sig → nonempty_list(attribute) TYPE type_decl_name_with_params optional_derive •, EOF / SEMI] +fn yy_state_426(_lookahead : YYSymbol) -> YYDecision { ReduceNoLookahead(4, NT_type_sig, yy_action_117) } // [43, func_sig → nonempty_list(attribute) FN • loption(type_params_with_constraints) func_name LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type, EOF / SEMI] -// [157, type_params_with_constraints → • LBRACKET separated_list(COMMA,type_param_with_constraints) RBRACKET, LIDENT / UIDENT / AMPER] -// [217, loption(type_params_with_constraints) → •, LIDENT / UIDENT / AMPER] -// [218, loption(type_params_with_constraints) → • type_params_with_constraints, LIDENT / UIDENT / AMPER] -fn yy_state_390(_lookahead : YYSymbol) -> YYDecision { +// [161, type_params_with_constraints → • LBRACKET separated_list(COMMA,type_param_with_constraints) RBRACKET, LIDENT / UIDENT / AMPER / EXTEND] +// [222, loption(type_params_with_constraints) → •, LIDENT / UIDENT / AMPER / EXTEND] +// [223, loption(type_params_with_constraints) → • type_params_with_constraints, LIDENT / UIDENT / AMPER / EXTEND] +fn yy_state_427(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACKET => Shift(yy_state_162) - NT_type_params_with_constraints => Shift(yy_state_291) - NT_loption_type_params_with_constraints_ => Shift(yy_state_391) - T_LIDENT | T_UIDENT | T_AMPER => Reduce(0, NT_loption_type_params_with_constraints_, yy_action_142) + NT_type_params_with_constraints => Shift(yy_state_143) + T_LBRACKET => Shift(yy_state_144) + NT_loption_type_params_with_constraints_ => Shift(yy_state_428) + T_LIDENT | T_UIDENT | T_AMPER | T_EXTEND => Reduce(0, NT_loption_type_params_with_constraints_, yy_action_217) _ => Error } } -// [28, method_self_type_coloncolon → • UIDENT COLONCOLON, LIDENT / UIDENT] -// [29, method_self_type_coloncolon → • AMPER UIDENT COLONCOLON, LIDENT / UIDENT] +// [28, method_self_type_coloncolon → • UIDENT COLONCOLON, LIDENT / UIDENT / EXTEND] +// [29, method_self_type_coloncolon → • AMPER UIDENT COLONCOLON, LIDENT / UIDENT / EXTEND] // [30, luident → • lident, LPAREN] // [31, luident → • uident, LPAREN] // [32, func_name → • luident, LPAREN] // [33, func_name → • method_self_type_coloncolon luident, LPAREN] // [43, func_sig → nonempty_list(attribute) FN loption(type_params_with_constraints) • func_name LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type, EOF / SEMI] -// [212, uident → • UIDENT, LPAREN] -// [213, lident → • LIDENT, LPAREN] -fn yy_state_391(_lookahead : YYSymbol) -> YYDecision { +// [216, uident → • UIDENT, LPAREN] +// [217, lident → • LIDENT, LPAREN] +// [218, lident → • EXTEND, LPAREN] +fn yy_state_428(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LIDENT => Shift(yy_state_38) - NT_method_self_type_coloncolon => Shift(yy_state_299) - NT_uident => Shift(yy_state_301) - NT_lident => Shift(yy_state_302) - NT_luident => Shift(yy_state_303) - T_AMPER => Shift(yy_state_304) - T_UIDENT => Shift(yy_state_307) - NT_func_name => Shift(yy_state_392) + T_EXTEND => Shift(yy_state_38) + T_LIDENT => Shift(yy_state_39) + NT_method_self_type_coloncolon => Shift(yy_state_336) + NT_uident => Shift(yy_state_338) + NT_lident => Shift(yy_state_339) + NT_luident => Shift(yy_state_340) + T_AMPER => Shift(yy_state_341) + T_UIDENT => Shift(yy_state_344) + NT_func_name => Shift(yy_state_429) _ => Error } } // [43, func_sig → nonempty_list(attribute) FN loption(type_params_with_constraints) func_name • LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type, EOF / SEMI] -fn yy_state_392(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_429(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LPAREN => Shift(yy_state_393) + T_LPAREN => Shift(yy_state_430) _ => Error } } // [43, func_sig → nonempty_list(attribute) FN loption(type_params_with_constraints) func_name LPAREN • separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type, EOF / SEMI] -// [167, simple_type → • simple_type QUESTION, RPAREN / COMMA / QUESTION] -// [168, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, RPAREN / COMMA / QUESTION] -// [169, simple_type → • LPAREN type_ RPAREN, RPAREN / COMMA / QUESTION] -// [170, simple_type → • qualified_uident_ optional_type_arguments, RPAREN / COMMA / QUESTION] -// [171, simple_type → • AMPER qualified_uident_, RPAREN / COMMA / QUESTION] -// [172, simple_type → • UNDERSCORE, RPAREN / COMMA / QUESTION] -// [173, type_ → • simple_type, RPAREN / COMMA] -// [174, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [175, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [176, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [177, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [178, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [179, type_ → • LPAREN RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [180, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [181, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [190, parameter → • type_, RPAREN / COMMA] -// [191, parameter → • POST_LABEL COLON type_, RPAREN / COMMA] -// [192, parameter → • label QUESTION COLON type_, RPAREN / COMMA] -// [210, qualified_uident_ → • UIDENT, RPAREN / COMMA / QUESTION / LBRACKET] -// [211, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, RPAREN / COMMA / QUESTION / LBRACKET] -// [214, label → • LIDENT, QUESTION] -// [219, separated_list(COMMA,parameter) → •, RPAREN] -// [220, separated_list(COMMA,parameter) → • separated_nonempty_list(COMMA,parameter), RPAREN] -// [258, separated_nonempty_list(COMMA,parameter) → • parameter, RPAREN] -// [259, separated_nonempty_list(COMMA,parameter) → • parameter COMMA separated_nonempty_list(COMMA,parameter), RPAREN] -fn yy_state_393(_lookahead : YYSymbol) -> YYDecision { +// [171, simple_type → • simple_type QUESTION, RPAREN / COMMA / QUESTION] +// [172, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, RPAREN / COMMA / QUESTION] +// [173, simple_type → • LPAREN type_ RPAREN, RPAREN / COMMA / QUESTION] +// [174, simple_type → • qualified_uident_ optional_type_arguments, RPAREN / COMMA / QUESTION] +// [175, simple_type → • AMPER qualified_uident_, RPAREN / COMMA / QUESTION] +// [176, simple_type → • UNDERSCORE, RPAREN / COMMA / QUESTION] +// [177, type_ → • simple_type, RPAREN / COMMA] +// [178, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [179, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [180, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [181, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [182, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [183, type_ → • LPAREN RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [184, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [185, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [194, parameter → • type_, RPAREN / COMMA] +// [195, parameter → • POST_LABEL COLON type_, RPAREN / COMMA] +// [196, parameter → • label QUESTION COLON type_, RPAREN / COMMA] +// [214, qualified_uident_ → • UIDENT, RPAREN / COMMA / QUESTION / LBRACKET] +// [215, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, RPAREN / COMMA / QUESTION / LBRACKET] +// [217, lident → • LIDENT, QUESTION] +// [218, lident → • EXTEND, QUESTION] +// [219, label → • lident, QUESTION] +// [224, separated_list(COMMA,parameter) → •, RPAREN] +// [225, separated_list(COMMA,parameter) → • separated_nonempty_list(COMMA,parameter), RPAREN] +// [263, separated_nonempty_list(COMMA,parameter) → • parameter, RPAREN] +// [264, separated_nonempty_list(COMMA,parameter) → • parameter COMMA separated_nonempty_list(COMMA,parameter), RPAREN] +fn yy_state_430(_lookahead : YYSymbol) -> YYDecision { match _lookahead { + T_EXTEND => Shift(yy_state_38) + T_LIDENT => Shift(yy_state_39) NT_parameter => Shift(yy_state_58) - T_LIDENT => Shift(yy_state_61) + NT_lident => Shift(yy_state_61) T_PACKAGE_NAME => Shift(yy_state_62) T_UIDENT => Shift(yy_state_64) NT_label => Shift(yy_state_65) @@ -9102,52 +9914,52 @@ fn yy_state_393(_lookahead : YYSymbol) -> YYDecision { T_POST_LABEL => Shift(yy_state_122) NT_type_ => Shift(yy_state_125) NT_separated_nonempty_list_COMMA_parameter_ => Shift(yy_state_126) - NT_separated_list_COMMA_parameter_ => Shift(yy_state_394) - T_RPAREN => Reduce(0, NT_separated_list_COMMA_parameter_, yy_action_256) + NT_separated_list_COMMA_parameter_ => Shift(yy_state_431) + T_RPAREN => Reduce(0, NT_separated_list_COMMA_parameter_, yy_action_260) _ => Error } } // [43, func_sig → nonempty_list(attribute) FN loption(type_params_with_constraints) func_name LPAREN separated_list(COMMA,parameter) • RPAREN THIN_ARROW return_type, EOF / SEMI] -fn yy_state_394(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_431(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RPAREN => Shift(yy_state_395) + T_RPAREN => Shift(yy_state_432) _ => Error } } // [43, func_sig → nonempty_list(attribute) FN loption(type_params_with_constraints) func_name LPAREN separated_list(COMMA,parameter) RPAREN • THIN_ARROW return_type, EOF / SEMI] -fn yy_state_395(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_432(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_THIN_ARROW => Shift(yy_state_396) + T_THIN_ARROW => Shift(yy_state_433) _ => Error } } // [43, func_sig → nonempty_list(attribute) FN loption(type_params_with_constraints) func_name LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW • return_type, EOF / SEMI] -// [167, simple_type → • simple_type QUESTION, EOF / RAISE / QUESTION / SEMI / NORAISE] -// [168, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, EOF / RAISE / QUESTION / SEMI / NORAISE] -// [169, simple_type → • LPAREN type_ RPAREN, EOF / RAISE / QUESTION / SEMI / NORAISE] -// [170, simple_type → • qualified_uident_ optional_type_arguments, EOF / RAISE / QUESTION / SEMI / NORAISE] -// [171, simple_type → • AMPER qualified_uident_, EOF / RAISE / QUESTION / SEMI / NORAISE] -// [172, simple_type → • UNDERSCORE, EOF / RAISE / QUESTION / SEMI / NORAISE] -// [173, type_ → • simple_type, EOF / SEMI] -// [174, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] -// [175, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] -// [176, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] -// [177, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] -// [178, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] -// [179, type_ → • LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] -// [180, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] -// [181, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] -// [182, return_type → • type_, EOF / SEMI] -// [183, return_type → • simple_type NORAISE, EOF / SEMI] -// [184, return_type → • simple_type RAISE, EOF / SEMI] -// [185, return_type → • simple_type RAISE error_type, EOF / SEMI] -// [186, return_type → • simple_type RAISE QUESTION, EOF / SEMI] -// [210, qualified_uident_ → • UIDENT, EOF / RAISE / QUESTION / SEMI / LBRACKET / NORAISE] -// [211, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, EOF / RAISE / QUESTION / SEMI / LBRACKET / NORAISE] -fn yy_state_396(_lookahead : YYSymbol) -> YYDecision { +// [171, simple_type → • simple_type QUESTION, EOF / RAISE / QUESTION / SEMI / NORAISE] +// [172, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, EOF / RAISE / QUESTION / SEMI / NORAISE] +// [173, simple_type → • LPAREN type_ RPAREN, EOF / RAISE / QUESTION / SEMI / NORAISE] +// [174, simple_type → • qualified_uident_ optional_type_arguments, EOF / RAISE / QUESTION / SEMI / NORAISE] +// [175, simple_type → • AMPER qualified_uident_, EOF / RAISE / QUESTION / SEMI / NORAISE] +// [176, simple_type → • UNDERSCORE, EOF / RAISE / QUESTION / SEMI / NORAISE] +// [177, type_ → • simple_type, EOF / SEMI] +// [178, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] +// [179, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] +// [180, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] +// [181, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] +// [182, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] +// [183, type_ → • LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] +// [184, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] +// [185, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] +// [186, return_type → • type_, EOF / SEMI] +// [187, return_type → • simple_type NORAISE, EOF / SEMI] +// [188, return_type → • simple_type RAISE, EOF / SEMI] +// [189, return_type → • simple_type RAISE error_type, EOF / SEMI] +// [190, return_type → • simple_type RAISE QUESTION, EOF / SEMI] +// [214, qualified_uident_ → • UIDENT, EOF / RAISE / QUESTION / SEMI / LBRACKET / NORAISE] +// [215, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, EOF / RAISE / QUESTION / SEMI / LBRACKET / NORAISE] +fn yy_state_433(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_PACKAGE_NAME => Shift(yy_state_62) T_UIDENT => Shift(yy_state_64) @@ -9158,99 +9970,105 @@ fn yy_state_396(_lookahead : YYSymbol) -> YYDecision { NT_qualified_uident_ => Shift(yy_state_78) T_LPAREN => Shift(yy_state_83) NT_simple_type => Shift(yy_state_87) - NT_return_type => Shift(yy_state_397) + NT_return_type => Shift(yy_state_434) _ => Error } } // [43, func_sig → nonempty_list(attribute) FN loption(type_params_with_constraints) func_name LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type •, EOF / SEMI] -fn yy_state_397(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_434(_lookahead : YYSymbol) -> YYDecision { ReduceNoLookahead(9, NT_func_sig, yy_action_116) } // [42, func_sig → nonempty_list(attribute) ASYNC • FN loption(type_params_with_constraints) func_name LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type, EOF / SEMI] -fn yy_state_398(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_435(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_FN => Shift(yy_state_399) + T_FN => Shift(yy_state_436) _ => Error } } // [42, func_sig → nonempty_list(attribute) ASYNC FN • loption(type_params_with_constraints) func_name LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type, EOF / SEMI] -// [157, type_params_with_constraints → • LBRACKET separated_list(COMMA,type_param_with_constraints) RBRACKET, LIDENT / UIDENT / AMPER] -// [217, loption(type_params_with_constraints) → •, LIDENT / UIDENT / AMPER] -// [218, loption(type_params_with_constraints) → • type_params_with_constraints, LIDENT / UIDENT / AMPER] -fn yy_state_399(_lookahead : YYSymbol) -> YYDecision { +// [161, type_params_with_constraints → • LBRACKET separated_list(COMMA,type_param_with_constraints) RBRACKET, LIDENT / UIDENT / AMPER / EXTEND] +// [222, loption(type_params_with_constraints) → •, LIDENT / UIDENT / AMPER / EXTEND] +// [223, loption(type_params_with_constraints) → • type_params_with_constraints, LIDENT / UIDENT / AMPER / EXTEND] +fn yy_state_436(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACKET => Shift(yy_state_162) - NT_type_params_with_constraints => Shift(yy_state_291) - NT_loption_type_params_with_constraints_ => Shift(yy_state_400) - T_LIDENT | T_UIDENT | T_AMPER => Reduce(0, NT_loption_type_params_with_constraints_, yy_action_142) + NT_type_params_with_constraints => Shift(yy_state_143) + T_LBRACKET => Shift(yy_state_144) + NT_loption_type_params_with_constraints_ => Shift(yy_state_437) + T_LIDENT | T_UIDENT | T_AMPER | T_EXTEND => Reduce(0, NT_loption_type_params_with_constraints_, yy_action_217) _ => Error } } -// [28, method_self_type_coloncolon → • UIDENT COLONCOLON, LIDENT / UIDENT] -// [29, method_self_type_coloncolon → • AMPER UIDENT COLONCOLON, LIDENT / UIDENT] +// [28, method_self_type_coloncolon → • UIDENT COLONCOLON, LIDENT / UIDENT / EXTEND] +// [29, method_self_type_coloncolon → • AMPER UIDENT COLONCOLON, LIDENT / UIDENT / EXTEND] // [30, luident → • lident, LPAREN] // [31, luident → • uident, LPAREN] // [32, func_name → • luident, LPAREN] // [33, func_name → • method_self_type_coloncolon luident, LPAREN] // [42, func_sig → nonempty_list(attribute) ASYNC FN loption(type_params_with_constraints) • func_name LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type, EOF / SEMI] -// [212, uident → • UIDENT, LPAREN] -// [213, lident → • LIDENT, LPAREN] -fn yy_state_400(_lookahead : YYSymbol) -> YYDecision { +// [216, uident → • UIDENT, LPAREN] +// [217, lident → • LIDENT, LPAREN] +// [218, lident → • EXTEND, LPAREN] +fn yy_state_437(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LIDENT => Shift(yy_state_38) - NT_method_self_type_coloncolon => Shift(yy_state_299) - NT_uident => Shift(yy_state_301) - NT_lident => Shift(yy_state_302) - NT_luident => Shift(yy_state_303) - T_AMPER => Shift(yy_state_304) - T_UIDENT => Shift(yy_state_307) - NT_func_name => Shift(yy_state_401) + T_EXTEND => Shift(yy_state_38) + T_LIDENT => Shift(yy_state_39) + NT_method_self_type_coloncolon => Shift(yy_state_336) + NT_uident => Shift(yy_state_338) + NT_lident => Shift(yy_state_339) + NT_luident => Shift(yy_state_340) + T_AMPER => Shift(yy_state_341) + T_UIDENT => Shift(yy_state_344) + NT_func_name => Shift(yy_state_438) _ => Error } } // [42, func_sig → nonempty_list(attribute) ASYNC FN loption(type_params_with_constraints) func_name • LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type, EOF / SEMI] -fn yy_state_401(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_438(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LPAREN => Shift(yy_state_402) + T_LPAREN => Shift(yy_state_439) _ => Error } } // [42, func_sig → nonempty_list(attribute) ASYNC FN loption(type_params_with_constraints) func_name LPAREN • separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type, EOF / SEMI] -// [167, simple_type → • simple_type QUESTION, RPAREN / COMMA / QUESTION] -// [168, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, RPAREN / COMMA / QUESTION] -// [169, simple_type → • LPAREN type_ RPAREN, RPAREN / COMMA / QUESTION] -// [170, simple_type → • qualified_uident_ optional_type_arguments, RPAREN / COMMA / QUESTION] -// [171, simple_type → • AMPER qualified_uident_, RPAREN / COMMA / QUESTION] -// [172, simple_type → • UNDERSCORE, RPAREN / COMMA / QUESTION] -// [173, type_ → • simple_type, RPAREN / COMMA] -// [174, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [175, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [176, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [177, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [178, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [179, type_ → • LPAREN RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [180, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [181, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [190, parameter → • type_, RPAREN / COMMA] -// [191, parameter → • POST_LABEL COLON type_, RPAREN / COMMA] -// [192, parameter → • label QUESTION COLON type_, RPAREN / COMMA] -// [210, qualified_uident_ → • UIDENT, RPAREN / COMMA / QUESTION / LBRACKET] -// [211, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, RPAREN / COMMA / QUESTION / LBRACKET] -// [214, label → • LIDENT, QUESTION] -// [219, separated_list(COMMA,parameter) → •, RPAREN] -// [220, separated_list(COMMA,parameter) → • separated_nonempty_list(COMMA,parameter), RPAREN] -// [258, separated_nonempty_list(COMMA,parameter) → • parameter, RPAREN] -// [259, separated_nonempty_list(COMMA,parameter) → • parameter COMMA separated_nonempty_list(COMMA,parameter), RPAREN] -fn yy_state_402(_lookahead : YYSymbol) -> YYDecision { +// [171, simple_type → • simple_type QUESTION, RPAREN / COMMA / QUESTION] +// [172, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, RPAREN / COMMA / QUESTION] +// [173, simple_type → • LPAREN type_ RPAREN, RPAREN / COMMA / QUESTION] +// [174, simple_type → • qualified_uident_ optional_type_arguments, RPAREN / COMMA / QUESTION] +// [175, simple_type → • AMPER qualified_uident_, RPAREN / COMMA / QUESTION] +// [176, simple_type → • UNDERSCORE, RPAREN / COMMA / QUESTION] +// [177, type_ → • simple_type, RPAREN / COMMA] +// [178, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [179, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [180, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [181, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [182, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [183, type_ → • LPAREN RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [184, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [185, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [194, parameter → • type_, RPAREN / COMMA] +// [195, parameter → • POST_LABEL COLON type_, RPAREN / COMMA] +// [196, parameter → • label QUESTION COLON type_, RPAREN / COMMA] +// [214, qualified_uident_ → • UIDENT, RPAREN / COMMA / QUESTION / LBRACKET] +// [215, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, RPAREN / COMMA / QUESTION / LBRACKET] +// [217, lident → • LIDENT, QUESTION] +// [218, lident → • EXTEND, QUESTION] +// [219, label → • lident, QUESTION] +// [224, separated_list(COMMA,parameter) → •, RPAREN] +// [225, separated_list(COMMA,parameter) → • separated_nonempty_list(COMMA,parameter), RPAREN] +// [263, separated_nonempty_list(COMMA,parameter) → • parameter, RPAREN] +// [264, separated_nonempty_list(COMMA,parameter) → • parameter COMMA separated_nonempty_list(COMMA,parameter), RPAREN] +fn yy_state_439(_lookahead : YYSymbol) -> YYDecision { match _lookahead { + T_EXTEND => Shift(yy_state_38) + T_LIDENT => Shift(yy_state_39) NT_parameter => Shift(yy_state_58) - T_LIDENT => Shift(yy_state_61) + NT_lident => Shift(yy_state_61) T_PACKAGE_NAME => Shift(yy_state_62) T_UIDENT => Shift(yy_state_64) NT_label => Shift(yy_state_65) @@ -9263,52 +10081,52 @@ fn yy_state_402(_lookahead : YYSymbol) -> YYDecision { T_POST_LABEL => Shift(yy_state_122) NT_type_ => Shift(yy_state_125) NT_separated_nonempty_list_COMMA_parameter_ => Shift(yy_state_126) - NT_separated_list_COMMA_parameter_ => Shift(yy_state_403) - T_RPAREN => Reduce(0, NT_separated_list_COMMA_parameter_, yy_action_256) + NT_separated_list_COMMA_parameter_ => Shift(yy_state_440) + T_RPAREN => Reduce(0, NT_separated_list_COMMA_parameter_, yy_action_260) _ => Error } } // [42, func_sig → nonempty_list(attribute) ASYNC FN loption(type_params_with_constraints) func_name LPAREN separated_list(COMMA,parameter) • RPAREN THIN_ARROW return_type, EOF / SEMI] -fn yy_state_403(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_440(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RPAREN => Shift(yy_state_404) + T_RPAREN => Shift(yy_state_441) _ => Error } } // [42, func_sig → nonempty_list(attribute) ASYNC FN loption(type_params_with_constraints) func_name LPAREN separated_list(COMMA,parameter) RPAREN • THIN_ARROW return_type, EOF / SEMI] -fn yy_state_404(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_441(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_THIN_ARROW => Shift(yy_state_405) + T_THIN_ARROW => Shift(yy_state_442) _ => Error } } // [42, func_sig → nonempty_list(attribute) ASYNC FN loption(type_params_with_constraints) func_name LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW • return_type, EOF / SEMI] -// [167, simple_type → • simple_type QUESTION, EOF / RAISE / QUESTION / SEMI / NORAISE] -// [168, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, EOF / RAISE / QUESTION / SEMI / NORAISE] -// [169, simple_type → • LPAREN type_ RPAREN, EOF / RAISE / QUESTION / SEMI / NORAISE] -// [170, simple_type → • qualified_uident_ optional_type_arguments, EOF / RAISE / QUESTION / SEMI / NORAISE] -// [171, simple_type → • AMPER qualified_uident_, EOF / RAISE / QUESTION / SEMI / NORAISE] -// [172, simple_type → • UNDERSCORE, EOF / RAISE / QUESTION / SEMI / NORAISE] -// [173, type_ → • simple_type, EOF / SEMI] -// [174, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] -// [175, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] -// [176, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] -// [177, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] -// [178, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] -// [179, type_ → • LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] -// [180, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] -// [181, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] -// [182, return_type → • type_, EOF / SEMI] -// [183, return_type → • simple_type NORAISE, EOF / SEMI] -// [184, return_type → • simple_type RAISE, EOF / SEMI] -// [185, return_type → • simple_type RAISE error_type, EOF / SEMI] -// [186, return_type → • simple_type RAISE QUESTION, EOF / SEMI] -// [210, qualified_uident_ → • UIDENT, EOF / RAISE / QUESTION / SEMI / LBRACKET / NORAISE] -// [211, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, EOF / RAISE / QUESTION / SEMI / LBRACKET / NORAISE] -fn yy_state_405(_lookahead : YYSymbol) -> YYDecision { +// [171, simple_type → • simple_type QUESTION, EOF / RAISE / QUESTION / SEMI / NORAISE] +// [172, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, EOF / RAISE / QUESTION / SEMI / NORAISE] +// [173, simple_type → • LPAREN type_ RPAREN, EOF / RAISE / QUESTION / SEMI / NORAISE] +// [174, simple_type → • qualified_uident_ optional_type_arguments, EOF / RAISE / QUESTION / SEMI / NORAISE] +// [175, simple_type → • AMPER qualified_uident_, EOF / RAISE / QUESTION / SEMI / NORAISE] +// [176, simple_type → • UNDERSCORE, EOF / RAISE / QUESTION / SEMI / NORAISE] +// [177, type_ → • simple_type, EOF / SEMI] +// [178, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] +// [179, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] +// [180, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] +// [181, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] +// [182, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] +// [183, type_ → • LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] +// [184, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] +// [185, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] +// [186, return_type → • type_, EOF / SEMI] +// [187, return_type → • simple_type NORAISE, EOF / SEMI] +// [188, return_type → • simple_type RAISE, EOF / SEMI] +// [189, return_type → • simple_type RAISE error_type, EOF / SEMI] +// [190, return_type → • simple_type RAISE QUESTION, EOF / SEMI] +// [214, qualified_uident_ → • UIDENT, EOF / RAISE / QUESTION / SEMI / LBRACKET / NORAISE] +// [215, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, EOF / RAISE / QUESTION / SEMI / LBRACKET / NORAISE] +fn yy_state_442(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_PACKAGE_NAME => Shift(yy_state_62) T_UIDENT => Shift(yy_state_64) @@ -9319,53 +10137,55 @@ fn yy_state_405(_lookahead : YYSymbol) -> YYDecision { NT_qualified_uident_ => Shift(yy_state_78) T_LPAREN => Shift(yy_state_83) NT_simple_type => Shift(yy_state_87) - NT_return_type => Shift(yy_state_406) + NT_return_type => Shift(yy_state_443) _ => Error } } // [42, func_sig → nonempty_list(attribute) ASYNC FN loption(type_params_with_constraints) func_name LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type •, EOF / SEMI] -fn yy_state_406(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_443(_lookahead : YYSymbol) -> YYDecision { ReduceNoLookahead(10, NT_func_sig, yy_action_115) } // [25, value_sig → nonempty_list(attribute) LET • lident COLON type_, EOF / SEMI] -// [213, lident → • LIDENT, COLON] -fn yy_state_407(_lookahead : YYSymbol) -> YYDecision { +// [217, lident → • LIDENT, COLON] +// [218, lident → • EXTEND, COLON] +fn yy_state_444(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LIDENT => Shift(yy_state_38) - NT_lident => Shift(yy_state_408) + T_EXTEND => Shift(yy_state_38) + T_LIDENT => Shift(yy_state_39) + NT_lident => Shift(yy_state_445) _ => Error } } // [25, value_sig → nonempty_list(attribute) LET lident • COLON type_, EOF / SEMI] -fn yy_state_408(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_445(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_COLON => Shift(yy_state_409) + T_COLON => Shift(yy_state_446) _ => Error } } // [25, value_sig → nonempty_list(attribute) LET lident COLON • type_, EOF / SEMI] -// [167, simple_type → • simple_type QUESTION, EOF / QUESTION / SEMI] -// [168, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, EOF / QUESTION / SEMI] -// [169, simple_type → • LPAREN type_ RPAREN, EOF / QUESTION / SEMI] -// [170, simple_type → • qualified_uident_ optional_type_arguments, EOF / QUESTION / SEMI] -// [171, simple_type → • AMPER qualified_uident_, EOF / QUESTION / SEMI] -// [172, simple_type → • UNDERSCORE, EOF / QUESTION / SEMI] -// [173, type_ → • simple_type, EOF / SEMI] -// [174, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] -// [175, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] -// [176, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] -// [177, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] -// [178, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] -// [179, type_ → • LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] -// [180, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] -// [181, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] -// [210, qualified_uident_ → • UIDENT, EOF / QUESTION / SEMI / LBRACKET] -// [211, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, EOF / QUESTION / SEMI / LBRACKET] -fn yy_state_409(_lookahead : YYSymbol) -> YYDecision { +// [171, simple_type → • simple_type QUESTION, EOF / QUESTION / SEMI] +// [172, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, EOF / QUESTION / SEMI] +// [173, simple_type → • LPAREN type_ RPAREN, EOF / QUESTION / SEMI] +// [174, simple_type → • qualified_uident_ optional_type_arguments, EOF / QUESTION / SEMI] +// [175, simple_type → • AMPER qualified_uident_, EOF / QUESTION / SEMI] +// [176, simple_type → • UNDERSCORE, EOF / QUESTION / SEMI] +// [177, type_ → • simple_type, EOF / SEMI] +// [178, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] +// [179, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] +// [180, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] +// [181, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] +// [182, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] +// [183, type_ → • LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] +// [184, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] +// [185, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] +// [214, qualified_uident_ → • UIDENT, EOF / QUESTION / SEMI / LBRACKET] +// [215, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, EOF / QUESTION / SEMI / LBRACKET] +fn yy_state_446(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_PACKAGE_NAME => Shift(yy_state_62) T_UIDENT => Shift(yy_state_64) @@ -9375,13 +10195,13 @@ fn yy_state_409(_lookahead : YYSymbol) -> YYDecision { NT_qualified_uident_ => Shift(yy_state_78) T_LPAREN => Shift(yy_state_83) NT_simple_type => Shift(yy_state_106) - NT_type_ => Shift(yy_state_410) + NT_type_ => Shift(yy_state_447) _ => Error } } // [25, value_sig → nonempty_list(attribute) LET lident COLON type_ •, EOF / SEMI] -fn yy_state_410(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_447(_lookahead : YYSymbol) -> YYDecision { ReduceNoLookahead(5, NT_value_sig, yy_action_114) } @@ -9389,66 +10209,70 @@ fn yy_state_410(_lookahead : YYSymbol) -> YYDecision { // [27, value_sig → nonempty_list(attribute) PUB • pub_attr LET lident COLON type_, EOF / SEMI] // [46, func_sig → nonempty_list(attribute) PUB • pub_attr ASYNC FN loption(type_params_with_constraints) func_name LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type, EOF / SEMI] // [47, func_sig → nonempty_list(attribute) PUB • pub_attr FN loption(type_params_with_constraints) func_name LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type, EOF / SEMI] -// [57, type_sig → nonempty_list(attribute) PUB • pub_attr TYPE type_decl_name_with_params optional_derive, EOF / SEMI] -// [63, type_sig → nonempty_list(attribute) PUB • pub_attr SUBERROR uident optional_derive, EOF / SEMI] -// [69, type_sig → nonempty_list(attribute) PUB • pub_attr SUBERROR uident LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [75, type_sig → nonempty_list(attribute) PUB • pub_attr STRUCT type_decl_name_with_params LBRACE record_decl_body RBRACE optional_derive, EOF / SEMI] -// [81, type_sig → nonempty_list(attribute) PUB • pub_attr STRUCT type_decl_name_with_params LPAREN separated_list(COMMA,type_) RPAREN optional_derive, EOF / SEMI] -// [87, type_sig → nonempty_list(attribute) PUB • pub_attr ENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [93, type_sig → nonempty_list(attribute) PUB • pub_attr EXTENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [99, type_sig → nonempty_list(attribute) PUB • pub_attr EXTENUM extensible_enum_extension_target PLUS_EQUAL LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [107, impl_sig → nonempty_list(attribute) PUB • pub_attr IMPL type_params_with_constraints qualified_uident FOR type_, EOF / SEMI] -// [113, impl_sig → nonempty_list(attribute) PUB • pub_attr IMPL qualified_uident FOR type_, EOF / SEMI] -// [119, trait_sig → nonempty_list(attribute) PUB • pub_attr TRAIT uident loption(preceded(COLON,separated_nonempty_list(PLUS,qualified_uident))) trait_body, EOF / SEMI] -// [129, alias_sig → nonempty_list(attribute) PUB • pub_attr TYPE type_decl_name_with_params EQUAL type_, EOF / SEMI] -// [135, alias_sig → nonempty_list(attribute) PUB • pub_attr FNALIAS uident COLONCOLON lident, EOF / SEMI] -// [141, alias_sig → nonempty_list(attribute) PUB • pub_attr USING PACKAGE_NAME LBRACE TYPE uident using_binder RBRACE, EOF / SEMI] -// [147, alias_sig → nonempty_list(attribute) PUB • pub_attr USING PACKAGE_NAME LBRACE TRAIT uident using_binder RBRACE, EOF / SEMI] -// [205, pub_attr → •, STRUCT / ENUM / TRAIT / IMPL / ASYNC / FNALIAS / FN / LET / CONST / TYPE / SUBERROR / USING / EXTENUM] -// [206, pub_attr → • LPAREN READONLY RPAREN, STRUCT / ENUM / TRAIT / IMPL / ASYNC / FNALIAS / FN / LET / CONST / TYPE / SUBERROR / USING / EXTENUM] -// [207, pub_attr → • LPAREN LIDENT RPAREN, STRUCT / ENUM / TRAIT / IMPL / ASYNC / FNALIAS / FN / LET / CONST / TYPE / SUBERROR / USING / EXTENUM] -fn yy_state_411(_lookahead : YYSymbol) -> YYDecision { +// [61, type_sig → nonempty_list(attribute) PUB • pub_attr TYPE type_decl_name_with_params optional_derive, EOF / SEMI] +// [67, type_sig → nonempty_list(attribute) PUB • pub_attr SUBERROR uident optional_derive, EOF / SEMI] +// [73, type_sig → nonempty_list(attribute) PUB • pub_attr SUBERROR uident LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [79, type_sig → nonempty_list(attribute) PUB • pub_attr STRUCT type_decl_name_with_params LBRACE record_decl_body RBRACE optional_derive, EOF / SEMI] +// [85, type_sig → nonempty_list(attribute) PUB • pub_attr STRUCT type_decl_name_with_params LPAREN separated_list(COMMA,type_) RPAREN optional_derive, EOF / SEMI] +// [91, type_sig → nonempty_list(attribute) PUB • pub_attr ENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [97, type_sig → nonempty_list(attribute) PUB • pub_attr EXTENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [103, type_sig → nonempty_list(attribute) PUB • pub_attr EXTENUM extensible_enum_extension_target PLUS_EQUAL LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [111, impl_sig → nonempty_list(attribute) PUB • pub_attr IMPL type_params_with_constraints qualified_uident FOR type_, EOF / SEMI] +// [117, impl_sig → nonempty_list(attribute) PUB • pub_attr IMPL qualified_uident FOR type_, EOF / SEMI] +// [123, trait_sig → nonempty_list(attribute) PUB • pub_attr TRAIT uident loption(preceded(COLON,separated_nonempty_list(PLUS,qualified_uident))) trait_body, EOF / SEMI] +// [133, alias_sig → nonempty_list(attribute) PUB • pub_attr TYPE type_decl_name_with_params EQUAL type_, EOF / SEMI] +// [139, alias_sig → nonempty_list(attribute) PUB • pub_attr FNALIAS uident COLONCOLON lident, EOF / SEMI] +// [145, alias_sig → nonempty_list(attribute) PUB • pub_attr USING PACKAGE_NAME LBRACE TYPE uident using_binder RBRACE, EOF / SEMI] +// [151, alias_sig → nonempty_list(attribute) PUB • pub_attr USING PACKAGE_NAME LBRACE TRAIT uident using_binder RBRACE, EOF / SEMI] +// [209, pub_attr → •, STRUCT / ENUM / TRAIT / IMPL / ASYNC / FNALIAS / FN / LET / CONST / TYPE / SUBERROR / USING / EXTENUM] +// [210, pub_attr → • LPAREN READONLY RPAREN, STRUCT / ENUM / TRAIT / IMPL / ASYNC / FNALIAS / FN / LET / CONST / TYPE / SUBERROR / USING / EXTENUM] +// [211, pub_attr → • LPAREN lident RPAREN, STRUCT / ENUM / TRAIT / IMPL / ASYNC / FNALIAS / FN / LET / CONST / TYPE / SUBERROR / USING / EXTENUM] +fn yy_state_448(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LPAREN => Shift(yy_state_412) - NT_pub_attr => Shift(yy_state_417) + T_LPAREN => Shift(yy_state_449) + NT_pub_attr => Shift(yy_state_454) T_STRUCT | T_ENUM | T_TRAIT | T_IMPL | T_ASYNC | T_FNALIAS | T_FN | T_LET | T_CONST | T_TYPE | T_SUBERROR | T_USING | T_EXTENUM => Reduce(0, NT_pub_attr, yy_action_113) _ => Error } } -// [206, pub_attr → LPAREN • READONLY RPAREN, STRUCT / ENUM / TRAIT / IMPL / ASYNC / FNALIAS / FN / LET / CONST / TYPE / SUBERROR / USING / EXTENUM] -// [207, pub_attr → LPAREN • LIDENT RPAREN, STRUCT / ENUM / TRAIT / IMPL / ASYNC / FNALIAS / FN / LET / CONST / TYPE / SUBERROR / USING / EXTENUM] -fn yy_state_412(_lookahead : YYSymbol) -> YYDecision { +// [210, pub_attr → LPAREN • READONLY RPAREN, STRUCT / ENUM / TRAIT / IMPL / ASYNC / FNALIAS / FN / LET / CONST / TYPE / SUBERROR / USING / EXTENUM] +// [211, pub_attr → LPAREN • lident RPAREN, STRUCT / ENUM / TRAIT / IMPL / ASYNC / FNALIAS / FN / LET / CONST / TYPE / SUBERROR / USING / EXTENUM] +// [217, lident → • LIDENT, RPAREN] +// [218, lident → • EXTEND, RPAREN] +fn yy_state_449(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LIDENT => Shift(yy_state_413) - T_READONLY => Shift(yy_state_415) + T_EXTEND => Shift(yy_state_38) + T_LIDENT => Shift(yy_state_39) + NT_lident => Shift(yy_state_450) + T_READONLY => Shift(yy_state_452) _ => Error } } -// [207, pub_attr → LPAREN LIDENT • RPAREN, STRUCT / ENUM / TRAIT / IMPL / ASYNC / FNALIAS / FN / LET / CONST / TYPE / SUBERROR / USING / EXTENUM] -fn yy_state_413(_lookahead : YYSymbol) -> YYDecision { +// [211, pub_attr → LPAREN lident • RPAREN, STRUCT / ENUM / TRAIT / IMPL / ASYNC / FNALIAS / FN / LET / CONST / TYPE / SUBERROR / USING / EXTENUM] +fn yy_state_450(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RPAREN => Shift(yy_state_414) + T_RPAREN => Shift(yy_state_451) _ => Error } } -// [207, pub_attr → LPAREN LIDENT RPAREN •, STRUCT / ENUM / TRAIT / IMPL / ASYNC / FNALIAS / FN / LET / CONST / TYPE / SUBERROR / USING / EXTENUM] -fn yy_state_414(_lookahead : YYSymbol) -> YYDecision { +// [211, pub_attr → LPAREN lident RPAREN •, STRUCT / ENUM / TRAIT / IMPL / ASYNC / FNALIAS / FN / LET / CONST / TYPE / SUBERROR / USING / EXTENUM] +fn yy_state_451(_lookahead : YYSymbol) -> YYDecision { ReduceNoLookahead(3, NT_pub_attr, yy_action_112) } -// [206, pub_attr → LPAREN READONLY • RPAREN, STRUCT / ENUM / TRAIT / IMPL / ASYNC / FNALIAS / FN / LET / CONST / TYPE / SUBERROR / USING / EXTENUM] -fn yy_state_415(_lookahead : YYSymbol) -> YYDecision { +// [210, pub_attr → LPAREN READONLY • RPAREN, STRUCT / ENUM / TRAIT / IMPL / ASYNC / FNALIAS / FN / LET / CONST / TYPE / SUBERROR / USING / EXTENUM] +fn yy_state_452(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RPAREN => Shift(yy_state_416) + T_RPAREN => Shift(yy_state_453) _ => Error } } -// [206, pub_attr → LPAREN READONLY RPAREN •, STRUCT / ENUM / TRAIT / IMPL / ASYNC / FNALIAS / FN / LET / CONST / TYPE / SUBERROR / USING / EXTENUM] -fn yy_state_416(_lookahead : YYSymbol) -> YYDecision { +// [210, pub_attr → LPAREN READONLY RPAREN •, STRUCT / ENUM / TRAIT / IMPL / ASYNC / FNALIAS / FN / LET / CONST / TYPE / SUBERROR / USING / EXTENUM] +fn yy_state_453(_lookahead : YYSymbol) -> YYDecision { ReduceNoLookahead(3, NT_pub_attr, yy_action_111) } @@ -9456,253 +10280,255 @@ fn yy_state_416(_lookahead : YYSymbol) -> YYDecision { // [27, value_sig → nonempty_list(attribute) PUB pub_attr • LET lident COLON type_, EOF / SEMI] // [46, func_sig → nonempty_list(attribute) PUB pub_attr • ASYNC FN loption(type_params_with_constraints) func_name LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type, EOF / SEMI] // [47, func_sig → nonempty_list(attribute) PUB pub_attr • FN loption(type_params_with_constraints) func_name LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type, EOF / SEMI] -// [57, type_sig → nonempty_list(attribute) PUB pub_attr • TYPE type_decl_name_with_params optional_derive, EOF / SEMI] -// [63, type_sig → nonempty_list(attribute) PUB pub_attr • SUBERROR uident optional_derive, EOF / SEMI] -// [69, type_sig → nonempty_list(attribute) PUB pub_attr • SUBERROR uident LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [75, type_sig → nonempty_list(attribute) PUB pub_attr • STRUCT type_decl_name_with_params LBRACE record_decl_body RBRACE optional_derive, EOF / SEMI] -// [81, type_sig → nonempty_list(attribute) PUB pub_attr • STRUCT type_decl_name_with_params LPAREN separated_list(COMMA,type_) RPAREN optional_derive, EOF / SEMI] -// [87, type_sig → nonempty_list(attribute) PUB pub_attr • ENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [93, type_sig → nonempty_list(attribute) PUB pub_attr • EXTENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [99, type_sig → nonempty_list(attribute) PUB pub_attr • EXTENUM extensible_enum_extension_target PLUS_EQUAL LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [107, impl_sig → nonempty_list(attribute) PUB pub_attr • IMPL type_params_with_constraints qualified_uident FOR type_, EOF / SEMI] -// [113, impl_sig → nonempty_list(attribute) PUB pub_attr • IMPL qualified_uident FOR type_, EOF / SEMI] -// [119, trait_sig → nonempty_list(attribute) PUB pub_attr • TRAIT uident loption(preceded(COLON,separated_nonempty_list(PLUS,qualified_uident))) trait_body, EOF / SEMI] -// [129, alias_sig → nonempty_list(attribute) PUB pub_attr • TYPE type_decl_name_with_params EQUAL type_, EOF / SEMI] -// [135, alias_sig → nonempty_list(attribute) PUB pub_attr • FNALIAS uident COLONCOLON lident, EOF / SEMI] -// [141, alias_sig → nonempty_list(attribute) PUB pub_attr • USING PACKAGE_NAME LBRACE TYPE uident using_binder RBRACE, EOF / SEMI] -// [147, alias_sig → nonempty_list(attribute) PUB pub_attr • USING PACKAGE_NAME LBRACE TRAIT uident using_binder RBRACE, EOF / SEMI] -fn yy_state_417(_lookahead : YYSymbol) -> YYDecision { +// [61, type_sig → nonempty_list(attribute) PUB pub_attr • TYPE type_decl_name_with_params optional_derive, EOF / SEMI] +// [67, type_sig → nonempty_list(attribute) PUB pub_attr • SUBERROR uident optional_derive, EOF / SEMI] +// [73, type_sig → nonempty_list(attribute) PUB pub_attr • SUBERROR uident LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [79, type_sig → nonempty_list(attribute) PUB pub_attr • STRUCT type_decl_name_with_params LBRACE record_decl_body RBRACE optional_derive, EOF / SEMI] +// [85, type_sig → nonempty_list(attribute) PUB pub_attr • STRUCT type_decl_name_with_params LPAREN separated_list(COMMA,type_) RPAREN optional_derive, EOF / SEMI] +// [91, type_sig → nonempty_list(attribute) PUB pub_attr • ENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [97, type_sig → nonempty_list(attribute) PUB pub_attr • EXTENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [103, type_sig → nonempty_list(attribute) PUB pub_attr • EXTENUM extensible_enum_extension_target PLUS_EQUAL LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [111, impl_sig → nonempty_list(attribute) PUB pub_attr • IMPL type_params_with_constraints qualified_uident FOR type_, EOF / SEMI] +// [117, impl_sig → nonempty_list(attribute) PUB pub_attr • IMPL qualified_uident FOR type_, EOF / SEMI] +// [123, trait_sig → nonempty_list(attribute) PUB pub_attr • TRAIT uident loption(preceded(COLON,separated_nonempty_list(PLUS,qualified_uident))) trait_body, EOF / SEMI] +// [133, alias_sig → nonempty_list(attribute) PUB pub_attr • TYPE type_decl_name_with_params EQUAL type_, EOF / SEMI] +// [139, alias_sig → nonempty_list(attribute) PUB pub_attr • FNALIAS uident COLONCOLON lident, EOF / SEMI] +// [145, alias_sig → nonempty_list(attribute) PUB pub_attr • USING PACKAGE_NAME LBRACE TYPE uident using_binder RBRACE, EOF / SEMI] +// [151, alias_sig → nonempty_list(attribute) PUB pub_attr • USING PACKAGE_NAME LBRACE TRAIT uident using_binder RBRACE, EOF / SEMI] +fn yy_state_454(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_USING => Shift(yy_state_418) - T_FNALIAS => Shift(yy_state_429) - T_TRAIT => Shift(yy_state_433) - T_IMPL => Shift(yy_state_437) - T_EXTENUM => Shift(yy_state_445) - T_ENUM => Shift(yy_state_457) - T_STRUCT => Shift(yy_state_463) - T_SUBERROR => Shift(yy_state_473) - T_TYPE => Shift(yy_state_480) - T_FN => Shift(yy_state_485) - T_ASYNC => Shift(yy_state_493) - T_LET => Shift(yy_state_502) - T_CONST => Shift(yy_state_506) + T_USING => Shift(yy_state_455) + T_FNALIAS => Shift(yy_state_466) + T_TRAIT => Shift(yy_state_470) + T_IMPL => Shift(yy_state_474) + T_EXTENUM => Shift(yy_state_482) + T_ENUM => Shift(yy_state_494) + T_STRUCT => Shift(yy_state_500) + T_SUBERROR => Shift(yy_state_510) + T_TYPE => Shift(yy_state_517) + T_FN => Shift(yy_state_522) + T_ASYNC => Shift(yy_state_530) + T_LET => Shift(yy_state_539) + T_CONST => Shift(yy_state_543) _ => Error } } -// [141, alias_sig → nonempty_list(attribute) PUB pub_attr USING • PACKAGE_NAME LBRACE TYPE uident using_binder RBRACE, EOF / SEMI] -// [147, alias_sig → nonempty_list(attribute) PUB pub_attr USING • PACKAGE_NAME LBRACE TRAIT uident using_binder RBRACE, EOF / SEMI] -fn yy_state_418(_lookahead : YYSymbol) -> YYDecision { +// [145, alias_sig → nonempty_list(attribute) PUB pub_attr USING • PACKAGE_NAME LBRACE TYPE uident using_binder RBRACE, EOF / SEMI] +// [151, alias_sig → nonempty_list(attribute) PUB pub_attr USING • PACKAGE_NAME LBRACE TRAIT uident using_binder RBRACE, EOF / SEMI] +fn yy_state_455(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_PACKAGE_NAME => Shift(yy_state_419) + T_PACKAGE_NAME => Shift(yy_state_456) _ => Error } } -// [141, alias_sig → nonempty_list(attribute) PUB pub_attr USING PACKAGE_NAME • LBRACE TYPE uident using_binder RBRACE, EOF / SEMI] -// [147, alias_sig → nonempty_list(attribute) PUB pub_attr USING PACKAGE_NAME • LBRACE TRAIT uident using_binder RBRACE, EOF / SEMI] -fn yy_state_419(_lookahead : YYSymbol) -> YYDecision { +// [145, alias_sig → nonempty_list(attribute) PUB pub_attr USING PACKAGE_NAME • LBRACE TYPE uident using_binder RBRACE, EOF / SEMI] +// [151, alias_sig → nonempty_list(attribute) PUB pub_attr USING PACKAGE_NAME • LBRACE TRAIT uident using_binder RBRACE, EOF / SEMI] +fn yy_state_456(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACE => Shift(yy_state_420) + T_LBRACE => Shift(yy_state_457) _ => Error } } -// [141, alias_sig → nonempty_list(attribute) PUB pub_attr USING PACKAGE_NAME LBRACE • TYPE uident using_binder RBRACE, EOF / SEMI] -// [147, alias_sig → nonempty_list(attribute) PUB pub_attr USING PACKAGE_NAME LBRACE • TRAIT uident using_binder RBRACE, EOF / SEMI] -fn yy_state_420(_lookahead : YYSymbol) -> YYDecision { +// [145, alias_sig → nonempty_list(attribute) PUB pub_attr USING PACKAGE_NAME LBRACE • TYPE uident using_binder RBRACE, EOF / SEMI] +// [151, alias_sig → nonempty_list(attribute) PUB pub_attr USING PACKAGE_NAME LBRACE • TRAIT uident using_binder RBRACE, EOF / SEMI] +fn yy_state_457(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_TRAIT => Shift(yy_state_421) - T_TYPE => Shift(yy_state_425) + T_TRAIT => Shift(yy_state_458) + T_TYPE => Shift(yy_state_462) _ => Error } } -// [147, alias_sig → nonempty_list(attribute) PUB pub_attr USING PACKAGE_NAME LBRACE TRAIT • uident using_binder RBRACE, EOF / SEMI] -// [212, uident → • UIDENT, RBRACE / AS] -fn yy_state_421(_lookahead : YYSymbol) -> YYDecision { +// [151, alias_sig → nonempty_list(attribute) PUB pub_attr USING PACKAGE_NAME LBRACE TRAIT • uident using_binder RBRACE, EOF / SEMI] +// [216, uident → • UIDENT, RBRACE / AS] +fn yy_state_458(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_UIDENT => Shift(yy_state_25) - NT_uident => Shift(yy_state_422) + NT_uident => Shift(yy_state_459) _ => Error } } -// [122, using_binder → •, RBRACE] -// [123, using_binder → • AS uident, RBRACE] -// [147, alias_sig → nonempty_list(attribute) PUB pub_attr USING PACKAGE_NAME LBRACE TRAIT uident • using_binder RBRACE, EOF / SEMI] -fn yy_state_422(_lookahead : YYSymbol) -> YYDecision { +// [126, using_binder → •, RBRACE] +// [127, using_binder → • AS uident, RBRACE] +// [151, alias_sig → nonempty_list(attribute) PUB pub_attr USING PACKAGE_NAME LBRACE TRAIT uident • using_binder RBRACE, EOF / SEMI] +fn yy_state_459(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_AS => Shift(yy_state_29) - NT_using_binder => Shift(yy_state_423) - T_RBRACE => Reduce(0, NT_using_binder, yy_action_273) + NT_using_binder => Shift(yy_state_460) + T_RBRACE => Reduce(0, NT_using_binder, yy_action_278) _ => Error } } -// [147, alias_sig → nonempty_list(attribute) PUB pub_attr USING PACKAGE_NAME LBRACE TRAIT uident using_binder • RBRACE, EOF / SEMI] -fn yy_state_423(_lookahead : YYSymbol) -> YYDecision { +// [151, alias_sig → nonempty_list(attribute) PUB pub_attr USING PACKAGE_NAME LBRACE TRAIT uident using_binder • RBRACE, EOF / SEMI] +fn yy_state_460(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RBRACE => Shift(yy_state_424) + T_RBRACE => Shift(yy_state_461) _ => Error } } -// [147, alias_sig → nonempty_list(attribute) PUB pub_attr USING PACKAGE_NAME LBRACE TRAIT uident using_binder RBRACE •, EOF / SEMI] -fn yy_state_424(_lookahead : YYSymbol) -> YYDecision { +// [151, alias_sig → nonempty_list(attribute) PUB pub_attr USING PACKAGE_NAME LBRACE TRAIT uident using_binder RBRACE •, EOF / SEMI] +fn yy_state_461(_lookahead : YYSymbol) -> YYDecision { ReduceNoLookahead(10, NT_alias_sig, yy_action_110) } -// [141, alias_sig → nonempty_list(attribute) PUB pub_attr USING PACKAGE_NAME LBRACE TYPE • uident using_binder RBRACE, EOF / SEMI] -// [212, uident → • UIDENT, RBRACE / AS] -fn yy_state_425(_lookahead : YYSymbol) -> YYDecision { +// [145, alias_sig → nonempty_list(attribute) PUB pub_attr USING PACKAGE_NAME LBRACE TYPE • uident using_binder RBRACE, EOF / SEMI] +// [216, uident → • UIDENT, RBRACE / AS] +fn yy_state_462(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_UIDENT => Shift(yy_state_25) - NT_uident => Shift(yy_state_426) + NT_uident => Shift(yy_state_463) _ => Error } } -// [122, using_binder → •, RBRACE] -// [123, using_binder → • AS uident, RBRACE] -// [141, alias_sig → nonempty_list(attribute) PUB pub_attr USING PACKAGE_NAME LBRACE TYPE uident • using_binder RBRACE, EOF / SEMI] -fn yy_state_426(_lookahead : YYSymbol) -> YYDecision { +// [126, using_binder → •, RBRACE] +// [127, using_binder → • AS uident, RBRACE] +// [145, alias_sig → nonempty_list(attribute) PUB pub_attr USING PACKAGE_NAME LBRACE TYPE uident • using_binder RBRACE, EOF / SEMI] +fn yy_state_463(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_AS => Shift(yy_state_29) - NT_using_binder => Shift(yy_state_427) - T_RBRACE => Reduce(0, NT_using_binder, yy_action_273) + NT_using_binder => Shift(yy_state_464) + T_RBRACE => Reduce(0, NT_using_binder, yy_action_278) _ => Error } } -// [141, alias_sig → nonempty_list(attribute) PUB pub_attr USING PACKAGE_NAME LBRACE TYPE uident using_binder • RBRACE, EOF / SEMI] -fn yy_state_427(_lookahead : YYSymbol) -> YYDecision { +// [145, alias_sig → nonempty_list(attribute) PUB pub_attr USING PACKAGE_NAME LBRACE TYPE uident using_binder • RBRACE, EOF / SEMI] +fn yy_state_464(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RBRACE => Shift(yy_state_428) + T_RBRACE => Shift(yy_state_465) _ => Error } } -// [141, alias_sig → nonempty_list(attribute) PUB pub_attr USING PACKAGE_NAME LBRACE TYPE uident using_binder RBRACE •, EOF / SEMI] -fn yy_state_428(_lookahead : YYSymbol) -> YYDecision { +// [145, alias_sig → nonempty_list(attribute) PUB pub_attr USING PACKAGE_NAME LBRACE TYPE uident using_binder RBRACE •, EOF / SEMI] +fn yy_state_465(_lookahead : YYSymbol) -> YYDecision { ReduceNoLookahead(10, NT_alias_sig, yy_action_109) } -// [135, alias_sig → nonempty_list(attribute) PUB pub_attr FNALIAS • uident COLONCOLON lident, EOF / SEMI] -// [212, uident → • UIDENT, COLONCOLON] -fn yy_state_429(_lookahead : YYSymbol) -> YYDecision { +// [139, alias_sig → nonempty_list(attribute) PUB pub_attr FNALIAS • uident COLONCOLON lident, EOF / SEMI] +// [216, uident → • UIDENT, COLONCOLON] +fn yy_state_466(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_UIDENT => Shift(yy_state_25) - NT_uident => Shift(yy_state_430) + NT_uident => Shift(yy_state_467) _ => Error } } -// [135, alias_sig → nonempty_list(attribute) PUB pub_attr FNALIAS uident • COLONCOLON lident, EOF / SEMI] -fn yy_state_430(_lookahead : YYSymbol) -> YYDecision { +// [139, alias_sig → nonempty_list(attribute) PUB pub_attr FNALIAS uident • COLONCOLON lident, EOF / SEMI] +fn yy_state_467(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_COLONCOLON => Shift(yy_state_431) + T_COLONCOLON => Shift(yy_state_468) _ => Error } } -// [135, alias_sig → nonempty_list(attribute) PUB pub_attr FNALIAS uident COLONCOLON • lident, EOF / SEMI] -// [213, lident → • LIDENT, EOF / SEMI] -fn yy_state_431(_lookahead : YYSymbol) -> YYDecision { +// [139, alias_sig → nonempty_list(attribute) PUB pub_attr FNALIAS uident COLONCOLON • lident, EOF / SEMI] +// [217, lident → • LIDENT, EOF / SEMI] +// [218, lident → • EXTEND, EOF / SEMI] +fn yy_state_468(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LIDENT => Shift(yy_state_38) - NT_lident => Shift(yy_state_432) + T_EXTEND => Shift(yy_state_38) + T_LIDENT => Shift(yy_state_39) + NT_lident => Shift(yy_state_469) _ => Error } } -// [135, alias_sig → nonempty_list(attribute) PUB pub_attr FNALIAS uident COLONCOLON lident •, EOF / SEMI] -fn yy_state_432(_lookahead : YYSymbol) -> YYDecision { +// [139, alias_sig → nonempty_list(attribute) PUB pub_attr FNALIAS uident COLONCOLON lident •, EOF / SEMI] +fn yy_state_469(_lookahead : YYSymbol) -> YYDecision { ReduceNoLookahead(7, NT_alias_sig, yy_action_108) } -// [119, trait_sig → nonempty_list(attribute) PUB pub_attr TRAIT • uident loption(preceded(COLON,separated_nonempty_list(PLUS,qualified_uident))) trait_body, EOF / SEMI] -// [212, uident → • UIDENT, EOF / COLON / SEMI / LBRACE] -fn yy_state_433(_lookahead : YYSymbol) -> YYDecision { +// [123, trait_sig → nonempty_list(attribute) PUB pub_attr TRAIT • uident loption(preceded(COLON,separated_nonempty_list(PLUS,qualified_uident))) trait_body, EOF / SEMI] +// [216, uident → • UIDENT, EOF / COLON / SEMI / LBRACE] +fn yy_state_470(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_UIDENT => Shift(yy_state_25) - NT_uident => Shift(yy_state_434) + NT_uident => Shift(yy_state_471) _ => Error } } -// [119, trait_sig → nonempty_list(attribute) PUB pub_attr TRAIT uident • loption(preceded(COLON,separated_nonempty_list(PLUS,qualified_uident))) trait_body, EOF / SEMI] -// [230, loption(preceded(COLON,separated_nonempty_list(PLUS,qualified_uident))) → •, EOF / SEMI / LBRACE] -// [231, loption(preceded(COLON,separated_nonempty_list(PLUS,qualified_uident))) → • COLON separated_nonempty_list(PLUS,qualified_uident), EOF / SEMI / LBRACE] -fn yy_state_434(_lookahead : YYSymbol) -> YYDecision { +// [123, trait_sig → nonempty_list(attribute) PUB pub_attr TRAIT uident • loption(preceded(COLON,separated_nonempty_list(PLUS,qualified_uident))) trait_body, EOF / SEMI] +// [235, loption(preceded(COLON,separated_nonempty_list(PLUS,qualified_uident))) → •, EOF / SEMI / LBRACE] +// [236, loption(preceded(COLON,separated_nonempty_list(PLUS,qualified_uident))) → • COLON separated_nonempty_list(PLUS,qualified_uident), EOF / SEMI / LBRACE] +fn yy_state_471(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_COLON => Shift(yy_state_42) - NT_loption_preceded_COLON_separated_nonempty_list_PLUS_qualified_uident___ => Shift(yy_state_435) - T_EOF | T_SEMI | T_LBRACE => Reduce(0, NT_loption_preceded_COLON_separated_nonempty_list_PLUS_qualified_uident___, yy_action_267) + T_COLON => Shift(yy_state_43) + NT_loption_preceded_COLON_separated_nonempty_list_PLUS_qualified_uident___ => Shift(yy_state_472) + T_EOF | T_SEMI | T_LBRACE => Reduce(0, NT_loption_preceded_COLON_separated_nonempty_list_PLUS_qualified_uident___, yy_action_271) _ => Error } } -// [119, trait_sig → nonempty_list(attribute) PUB pub_attr TRAIT uident loption(preceded(COLON,separated_nonempty_list(PLUS,qualified_uident))) • trait_body, EOF / SEMI] -// [120, trait_body → •, EOF / SEMI] -// [121, trait_body → • LBRACE separated_list(SEMI,trait_method_sig) RBRACE, EOF / SEMI] -fn yy_state_435(_lookahead : YYSymbol) -> YYDecision { +// [123, trait_sig → nonempty_list(attribute) PUB pub_attr TRAIT uident loption(preceded(COLON,separated_nonempty_list(PLUS,qualified_uident))) • trait_body, EOF / SEMI] +// [124, trait_body → •, EOF / SEMI] +// [125, trait_body → • LBRACE separated_list(SEMI,trait_method_sig) RBRACE, EOF / SEMI] +fn yy_state_472(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACE => Shift(yy_state_51) - NT_trait_body => Shift(yy_state_436) - T_EOF | T_SEMI => Reduce(0, NT_trait_body, yy_action_260) + T_LBRACE => Shift(yy_state_52) + NT_trait_body => Shift(yy_state_473) + T_EOF | T_SEMI => Reduce(0, NT_trait_body, yy_action_264) _ => Error } } -// [119, trait_sig → nonempty_list(attribute) PUB pub_attr TRAIT uident loption(preceded(COLON,separated_nonempty_list(PLUS,qualified_uident))) trait_body •, EOF / SEMI] -fn yy_state_436(_lookahead : YYSymbol) -> YYDecision { +// [123, trait_sig → nonempty_list(attribute) PUB pub_attr TRAIT uident loption(preceded(COLON,separated_nonempty_list(PLUS,qualified_uident))) trait_body •, EOF / SEMI] +fn yy_state_473(_lookahead : YYSymbol) -> YYDecision { ReduceNoLookahead(7, NT_trait_sig, yy_action_107) } -// [107, impl_sig → nonempty_list(attribute) PUB pub_attr IMPL • type_params_with_constraints qualified_uident FOR type_, EOF / SEMI] -// [113, impl_sig → nonempty_list(attribute) PUB pub_attr IMPL • qualified_uident FOR type_, EOF / SEMI] -// [157, type_params_with_constraints → • LBRACKET separated_list(COMMA,type_param_with_constraints) RBRACKET, UIDENT / PACKAGE_NAME] -// [208, qualified_uident → • UIDENT, FOR] -// [209, qualified_uident → • PACKAGE_NAME DOT_UIDENT, FOR] -fn yy_state_437(_lookahead : YYSymbol) -> YYDecision { +// [111, impl_sig → nonempty_list(attribute) PUB pub_attr IMPL • type_params_with_constraints qualified_uident FOR type_, EOF / SEMI] +// [117, impl_sig → nonempty_list(attribute) PUB pub_attr IMPL • qualified_uident FOR type_, EOF / SEMI] +// [161, type_params_with_constraints → • LBRACKET separated_list(COMMA,type_param_with_constraints) RBRACKET, UIDENT / PACKAGE_NAME] +// [212, qualified_uident → • UIDENT, FOR] +// [213, qualified_uident → • PACKAGE_NAME DOT_UIDENT, FOR] +fn yy_state_474(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_PACKAGE_NAME => Shift(yy_state_47) - T_UIDENT => Shift(yy_state_49) - T_LBRACKET => Shift(yy_state_162) - NT_qualified_uident => Shift(yy_state_438) - NT_type_params_with_constraints => Shift(yy_state_441) + T_PACKAGE_NAME => Shift(yy_state_48) + T_UIDENT => Shift(yy_state_50) + T_LBRACKET => Shift(yy_state_144) + NT_qualified_uident => Shift(yy_state_475) + NT_type_params_with_constraints => Shift(yy_state_478) _ => Error } } -// [113, impl_sig → nonempty_list(attribute) PUB pub_attr IMPL qualified_uident • FOR type_, EOF / SEMI] -fn yy_state_438(_lookahead : YYSymbol) -> YYDecision { +// [117, impl_sig → nonempty_list(attribute) PUB pub_attr IMPL qualified_uident • FOR type_, EOF / SEMI] +fn yy_state_475(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_FOR => Shift(yy_state_439) - _ => Error - } -} - -// [113, impl_sig → nonempty_list(attribute) PUB pub_attr IMPL qualified_uident FOR • type_, EOF / SEMI] -// [167, simple_type → • simple_type QUESTION, EOF / QUESTION / SEMI] -// [168, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, EOF / QUESTION / SEMI] -// [169, simple_type → • LPAREN type_ RPAREN, EOF / QUESTION / SEMI] -// [170, simple_type → • qualified_uident_ optional_type_arguments, EOF / QUESTION / SEMI] -// [171, simple_type → • AMPER qualified_uident_, EOF / QUESTION / SEMI] -// [172, simple_type → • UNDERSCORE, EOF / QUESTION / SEMI] -// [173, type_ → • simple_type, EOF / SEMI] -// [174, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] -// [175, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] -// [176, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] -// [177, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] -// [178, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] -// [179, type_ → • LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] -// [180, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] -// [181, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] -// [210, qualified_uident_ → • UIDENT, EOF / QUESTION / SEMI / LBRACKET] -// [211, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, EOF / QUESTION / SEMI / LBRACKET] -fn yy_state_439(_lookahead : YYSymbol) -> YYDecision { + T_FOR => Shift(yy_state_476) + _ => Error + } +} + +// [117, impl_sig → nonempty_list(attribute) PUB pub_attr IMPL qualified_uident FOR • type_, EOF / SEMI] +// [171, simple_type → • simple_type QUESTION, EOF / QUESTION / SEMI] +// [172, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, EOF / QUESTION / SEMI] +// [173, simple_type → • LPAREN type_ RPAREN, EOF / QUESTION / SEMI] +// [174, simple_type → • qualified_uident_ optional_type_arguments, EOF / QUESTION / SEMI] +// [175, simple_type → • AMPER qualified_uident_, EOF / QUESTION / SEMI] +// [176, simple_type → • UNDERSCORE, EOF / QUESTION / SEMI] +// [177, type_ → • simple_type, EOF / SEMI] +// [178, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] +// [179, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] +// [180, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] +// [181, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] +// [182, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] +// [183, type_ → • LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] +// [184, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] +// [185, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] +// [214, qualified_uident_ → • UIDENT, EOF / QUESTION / SEMI / LBRACKET] +// [215, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, EOF / QUESTION / SEMI / LBRACKET] +fn yy_state_476(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_PACKAGE_NAME => Shift(yy_state_62) T_UIDENT => Shift(yy_state_64) @@ -9712,55 +10538,55 @@ fn yy_state_439(_lookahead : YYSymbol) -> YYDecision { NT_qualified_uident_ => Shift(yy_state_78) T_LPAREN => Shift(yy_state_83) NT_simple_type => Shift(yy_state_106) - NT_type_ => Shift(yy_state_440) + NT_type_ => Shift(yy_state_477) _ => Error } } -// [113, impl_sig → nonempty_list(attribute) PUB pub_attr IMPL qualified_uident FOR type_ •, EOF / SEMI] -fn yy_state_440(_lookahead : YYSymbol) -> YYDecision { +// [117, impl_sig → nonempty_list(attribute) PUB pub_attr IMPL qualified_uident FOR type_ •, EOF / SEMI] +fn yy_state_477(_lookahead : YYSymbol) -> YYDecision { ReduceNoLookahead(7, NT_impl_sig, yy_action_106) } -// [107, impl_sig → nonempty_list(attribute) PUB pub_attr IMPL type_params_with_constraints • qualified_uident FOR type_, EOF / SEMI] -// [208, qualified_uident → • UIDENT, FOR] -// [209, qualified_uident → • PACKAGE_NAME DOT_UIDENT, FOR] -fn yy_state_441(_lookahead : YYSymbol) -> YYDecision { +// [111, impl_sig → nonempty_list(attribute) PUB pub_attr IMPL type_params_with_constraints • qualified_uident FOR type_, EOF / SEMI] +// [212, qualified_uident → • UIDENT, FOR] +// [213, qualified_uident → • PACKAGE_NAME DOT_UIDENT, FOR] +fn yy_state_478(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_PACKAGE_NAME => Shift(yy_state_47) - T_UIDENT => Shift(yy_state_49) - NT_qualified_uident => Shift(yy_state_442) + T_PACKAGE_NAME => Shift(yy_state_48) + T_UIDENT => Shift(yy_state_50) + NT_qualified_uident => Shift(yy_state_479) _ => Error } } -// [107, impl_sig → nonempty_list(attribute) PUB pub_attr IMPL type_params_with_constraints qualified_uident • FOR type_, EOF / SEMI] -fn yy_state_442(_lookahead : YYSymbol) -> YYDecision { +// [111, impl_sig → nonempty_list(attribute) PUB pub_attr IMPL type_params_with_constraints qualified_uident • FOR type_, EOF / SEMI] +fn yy_state_479(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_FOR => Shift(yy_state_443) - _ => Error - } -} - -// [107, impl_sig → nonempty_list(attribute) PUB pub_attr IMPL type_params_with_constraints qualified_uident FOR • type_, EOF / SEMI] -// [167, simple_type → • simple_type QUESTION, EOF / QUESTION / SEMI] -// [168, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, EOF / QUESTION / SEMI] -// [169, simple_type → • LPAREN type_ RPAREN, EOF / QUESTION / SEMI] -// [170, simple_type → • qualified_uident_ optional_type_arguments, EOF / QUESTION / SEMI] -// [171, simple_type → • AMPER qualified_uident_, EOF / QUESTION / SEMI] -// [172, simple_type → • UNDERSCORE, EOF / QUESTION / SEMI] -// [173, type_ → • simple_type, EOF / SEMI] -// [174, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] -// [175, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] -// [176, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] -// [177, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] -// [178, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] -// [179, type_ → • LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] -// [180, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] -// [181, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] -// [210, qualified_uident_ → • UIDENT, EOF / QUESTION / SEMI / LBRACKET] -// [211, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, EOF / QUESTION / SEMI / LBRACKET] -fn yy_state_443(_lookahead : YYSymbol) -> YYDecision { + T_FOR => Shift(yy_state_480) + _ => Error + } +} + +// [111, impl_sig → nonempty_list(attribute) PUB pub_attr IMPL type_params_with_constraints qualified_uident FOR • type_, EOF / SEMI] +// [171, simple_type → • simple_type QUESTION, EOF / QUESTION / SEMI] +// [172, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, EOF / QUESTION / SEMI] +// [173, simple_type → • LPAREN type_ RPAREN, EOF / QUESTION / SEMI] +// [174, simple_type → • qualified_uident_ optional_type_arguments, EOF / QUESTION / SEMI] +// [175, simple_type → • AMPER qualified_uident_, EOF / QUESTION / SEMI] +// [176, simple_type → • UNDERSCORE, EOF / QUESTION / SEMI] +// [177, type_ → • simple_type, EOF / SEMI] +// [178, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] +// [179, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] +// [180, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] +// [181, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] +// [182, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] +// [183, type_ → • LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] +// [184, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] +// [185, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] +// [214, qualified_uident_ → • UIDENT, EOF / QUESTION / SEMI / LBRACKET] +// [215, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, EOF / QUESTION / SEMI / LBRACKET] +fn yy_state_480(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_PACKAGE_NAME => Shift(yy_state_62) T_UIDENT => Shift(yy_state_64) @@ -9770,264 +10596,264 @@ fn yy_state_443(_lookahead : YYSymbol) -> YYDecision { NT_qualified_uident_ => Shift(yy_state_78) T_LPAREN => Shift(yy_state_83) NT_simple_type => Shift(yy_state_106) - NT_type_ => Shift(yy_state_444) + NT_type_ => Shift(yy_state_481) _ => Error } } -// [107, impl_sig → nonempty_list(attribute) PUB pub_attr IMPL type_params_with_constraints qualified_uident FOR type_ •, EOF / SEMI] -fn yy_state_444(_lookahead : YYSymbol) -> YYDecision { +// [111, impl_sig → nonempty_list(attribute) PUB pub_attr IMPL type_params_with_constraints qualified_uident FOR type_ •, EOF / SEMI] +fn yy_state_481(_lookahead : YYSymbol) -> YYDecision { ReduceNoLookahead(8, NT_impl_sig, yy_action_105) } -// [93, type_sig → nonempty_list(attribute) PUB pub_attr EXTENUM • type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [99, type_sig → nonempty_list(attribute) PUB pub_attr EXTENUM • extensible_enum_extension_target PLUS_EQUAL LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [164, type_decl_name_with_params → • uident optional_type_params_no_constraints, LBRACE] -// [165, extensible_enum_extension_target → • uident optional_type_params_no_constraints, PLUS_EQUAL] -// [166, extensible_enum_extension_target → • PACKAGE_NAME DOT_UIDENT optional_type_params_no_constraints, PLUS_EQUAL] -// [212, uident → • UIDENT, PLUS_EQUAL / LBRACKET / LBRACE] -fn yy_state_445(_lookahead : YYSymbol) -> YYDecision { +// [97, type_sig → nonempty_list(attribute) PUB pub_attr EXTENUM • type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [103, type_sig → nonempty_list(attribute) PUB pub_attr EXTENUM • extensible_enum_extension_target PLUS_EQUAL LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [168, type_decl_name_with_params → • uident optional_type_params_no_constraints, LBRACE] +// [169, extensible_enum_extension_target → • uident optional_type_params_no_constraints, PLUS_EQUAL] +// [170, extensible_enum_extension_target → • PACKAGE_NAME DOT_UIDENT optional_type_params_no_constraints, PLUS_EQUAL] +// [216, uident → • UIDENT, PLUS_EQUAL / LBRACKET / LBRACE] +fn yy_state_482(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_UIDENT => Shift(yy_state_25) - T_PACKAGE_NAME => Shift(yy_state_184) - NT_uident => Shift(yy_state_197) - NT_extensible_enum_extension_target => Shift(yy_state_446) - NT_type_decl_name_with_params => Shift(yy_state_452) + T_PACKAGE_NAME => Shift(yy_state_222) + NT_uident => Shift(yy_state_235) + NT_extensible_enum_extension_target => Shift(yy_state_483) + NT_type_decl_name_with_params => Shift(yy_state_489) _ => Error } } -// [99, type_sig → nonempty_list(attribute) PUB pub_attr EXTENUM extensible_enum_extension_target • PLUS_EQUAL LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -fn yy_state_446(_lookahead : YYSymbol) -> YYDecision { +// [103, type_sig → nonempty_list(attribute) PUB pub_attr EXTENUM extensible_enum_extension_target • PLUS_EQUAL LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +fn yy_state_483(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_PLUS_EQUAL => Shift(yy_state_447) + T_PLUS_EQUAL => Shift(yy_state_484) _ => Error } } -// [99, type_sig → nonempty_list(attribute) PUB pub_attr EXTENUM extensible_enum_extension_target PLUS_EQUAL • LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -fn yy_state_447(_lookahead : YYSymbol) -> YYDecision { +// [103, type_sig → nonempty_list(attribute) PUB pub_attr EXTENUM extensible_enum_extension_target PLUS_EQUAL • LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +fn yy_state_484(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACE => Shift(yy_state_448) + T_LBRACE => Shift(yy_state_485) _ => Error } } -// [99, type_sig → nonempty_list(attribute) PUB pub_attr EXTENUM extensible_enum_extension_target PLUS_EQUAL LBRACE • separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [148, enum_constructor → • UIDENT option(delimited(LPAREN,separated_nonempty_list(COMMA,constructor_param),RPAREN)) option(eq_tag), SEMI / RBRACE] -// [149, enum_constructor → • nonempty_list(attribute) UIDENT option(delimited(LPAREN,separated_nonempty_list(COMMA,constructor_param),RPAREN)) option(eq_tag), SEMI / RBRACE] -// [223, separated_list(SEMI,enum_constructor) → •, RBRACE] -// [224, separated_list(SEMI,enum_constructor) → • separated_nonempty_list(SEMI,enum_constructor), RBRACE] -// [252, nonempty_list(attribute) → • ATTRIBUTE, UIDENT] -// [253, nonempty_list(attribute) → • ATTRIBUTE nonempty_list(attribute), UIDENT] -// [260, separated_nonempty_list(SEMI,enum_constructor) → • enum_constructor, RBRACE] -// [261, separated_nonempty_list(SEMI,enum_constructor) → • enum_constructor SEMI separated_nonempty_list(SEMI,enum_constructor), RBRACE] -fn yy_state_448(_lookahead : YYSymbol) -> YYDecision { +// [103, type_sig → nonempty_list(attribute) PUB pub_attr EXTENUM extensible_enum_extension_target PLUS_EQUAL LBRACE • separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [152, enum_constructor → • UIDENT option(delimited(LPAREN,separated_nonempty_list(COMMA,constructor_param),RPAREN)) option(eq_tag), SEMI / RBRACE] +// [153, enum_constructor → • nonempty_list(attribute) UIDENT option(delimited(LPAREN,separated_nonempty_list(COMMA,constructor_param),RPAREN)) option(eq_tag), SEMI / RBRACE] +// [228, separated_list(SEMI,enum_constructor) → •, RBRACE] +// [229, separated_list(SEMI,enum_constructor) → • separated_nonempty_list(SEMI,enum_constructor), RBRACE] +// [257, nonempty_list(attribute) → • ATTRIBUTE, UIDENT] +// [258, nonempty_list(attribute) → • ATTRIBUTE nonempty_list(attribute), UIDENT] +// [265, separated_nonempty_list(SEMI,enum_constructor) → • enum_constructor, RBRACE] +// [266, separated_nonempty_list(SEMI,enum_constructor) → • enum_constructor SEMI separated_nonempty_list(SEMI,enum_constructor), RBRACE] +fn yy_state_485(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_ATTRIBUTE => Shift(yy_state_19) - NT_enum_constructor => Shift(yy_state_202) - NT_nonempty_list_attribute_ => Shift(yy_state_205) - T_UIDENT => Shift(yy_state_224) - NT_separated_nonempty_list_SEMI_enum_constructor_ => Shift(yy_state_227) - NT_separated_list_SEMI_enum_constructor_ => Shift(yy_state_449) - T_RBRACE => Reduce(0, NT_separated_list_SEMI_enum_constructor_, yy_action_184) + NT_enum_constructor => Shift(yy_state_240) + NT_nonempty_list_attribute_ => Shift(yy_state_243) + T_UIDENT => Shift(yy_state_262) + NT_separated_nonempty_list_SEMI_enum_constructor_ => Shift(yy_state_265) + NT_separated_list_SEMI_enum_constructor_ => Shift(yy_state_486) + T_RBRACE => Reduce(0, NT_separated_list_SEMI_enum_constructor_, yy_action_182) _ => Error } } -// [99, type_sig → nonempty_list(attribute) PUB pub_attr EXTENUM extensible_enum_extension_target PLUS_EQUAL LBRACE separated_list(SEMI,enum_constructor) • RBRACE optional_derive, EOF / SEMI] -fn yy_state_449(_lookahead : YYSymbol) -> YYDecision { +// [103, type_sig → nonempty_list(attribute) PUB pub_attr EXTENUM extensible_enum_extension_target PLUS_EQUAL LBRACE separated_list(SEMI,enum_constructor) • RBRACE optional_derive, EOF / SEMI] +fn yy_state_486(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RBRACE => Shift(yy_state_450) + T_RBRACE => Shift(yy_state_487) _ => Error } } -// [99, type_sig → nonempty_list(attribute) PUB pub_attr EXTENUM extensible_enum_extension_target PLUS_EQUAL LBRACE separated_list(SEMI,enum_constructor) RBRACE • optional_derive, EOF / SEMI] -// [100, optional_derive → •, EOF / SEMI] -// [101, optional_derive → • DERIVE LPAREN non_empty_list_commas(qualified_uident) RPAREN, EOF / SEMI] -fn yy_state_450(_lookahead : YYSymbol) -> YYDecision { +// [103, type_sig → nonempty_list(attribute) PUB pub_attr EXTENUM extensible_enum_extension_target PLUS_EQUAL LBRACE separated_list(SEMI,enum_constructor) RBRACE • optional_derive, EOF / SEMI] +// [104, optional_derive → •, EOF / SEMI] +// [105, optional_derive → • DERIVE LPAREN non_empty_list_commas(qualified_uident) RPAREN, EOF / SEMI] +fn yy_state_487(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_DERIVE => Shift(yy_state_230) - NT_optional_derive => Shift(yy_state_451) - T_EOF | T_SEMI => Reduce(0, NT_optional_derive, yy_action_165) + T_DERIVE => Shift(yy_state_268) + NT_optional_derive => Shift(yy_state_488) + T_EOF | T_SEMI => Reduce(0, NT_optional_derive, yy_action_163) _ => Error } } -// [99, type_sig → nonempty_list(attribute) PUB pub_attr EXTENUM extensible_enum_extension_target PLUS_EQUAL LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive •, EOF / SEMI] -fn yy_state_451(_lookahead : YYSymbol) -> YYDecision { +// [103, type_sig → nonempty_list(attribute) PUB pub_attr EXTENUM extensible_enum_extension_target PLUS_EQUAL LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive •, EOF / SEMI] +fn yy_state_488(_lookahead : YYSymbol) -> YYDecision { ReduceNoLookahead(10, NT_type_sig, yy_action_104) } -// [93, type_sig → nonempty_list(attribute) PUB pub_attr EXTENUM type_decl_name_with_params • LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -fn yy_state_452(_lookahead : YYSymbol) -> YYDecision { +// [97, type_sig → nonempty_list(attribute) PUB pub_attr EXTENUM type_decl_name_with_params • LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +fn yy_state_489(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACE => Shift(yy_state_453) + T_LBRACE => Shift(yy_state_490) _ => Error } } -// [93, type_sig → nonempty_list(attribute) PUB pub_attr EXTENUM type_decl_name_with_params LBRACE • separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [148, enum_constructor → • UIDENT option(delimited(LPAREN,separated_nonempty_list(COMMA,constructor_param),RPAREN)) option(eq_tag), SEMI / RBRACE] -// [149, enum_constructor → • nonempty_list(attribute) UIDENT option(delimited(LPAREN,separated_nonempty_list(COMMA,constructor_param),RPAREN)) option(eq_tag), SEMI / RBRACE] -// [223, separated_list(SEMI,enum_constructor) → •, RBRACE] -// [224, separated_list(SEMI,enum_constructor) → • separated_nonempty_list(SEMI,enum_constructor), RBRACE] -// [252, nonempty_list(attribute) → • ATTRIBUTE, UIDENT] -// [253, nonempty_list(attribute) → • ATTRIBUTE nonempty_list(attribute), UIDENT] -// [260, separated_nonempty_list(SEMI,enum_constructor) → • enum_constructor, RBRACE] -// [261, separated_nonempty_list(SEMI,enum_constructor) → • enum_constructor SEMI separated_nonempty_list(SEMI,enum_constructor), RBRACE] -fn yy_state_453(_lookahead : YYSymbol) -> YYDecision { +// [97, type_sig → nonempty_list(attribute) PUB pub_attr EXTENUM type_decl_name_with_params LBRACE • separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [152, enum_constructor → • UIDENT option(delimited(LPAREN,separated_nonempty_list(COMMA,constructor_param),RPAREN)) option(eq_tag), SEMI / RBRACE] +// [153, enum_constructor → • nonempty_list(attribute) UIDENT option(delimited(LPAREN,separated_nonempty_list(COMMA,constructor_param),RPAREN)) option(eq_tag), SEMI / RBRACE] +// [228, separated_list(SEMI,enum_constructor) → •, RBRACE] +// [229, separated_list(SEMI,enum_constructor) → • separated_nonempty_list(SEMI,enum_constructor), RBRACE] +// [257, nonempty_list(attribute) → • ATTRIBUTE, UIDENT] +// [258, nonempty_list(attribute) → • ATTRIBUTE nonempty_list(attribute), UIDENT] +// [265, separated_nonempty_list(SEMI,enum_constructor) → • enum_constructor, RBRACE] +// [266, separated_nonempty_list(SEMI,enum_constructor) → • enum_constructor SEMI separated_nonempty_list(SEMI,enum_constructor), RBRACE] +fn yy_state_490(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_ATTRIBUTE => Shift(yy_state_19) - NT_enum_constructor => Shift(yy_state_202) - NT_nonempty_list_attribute_ => Shift(yy_state_205) - T_UIDENT => Shift(yy_state_224) - NT_separated_nonempty_list_SEMI_enum_constructor_ => Shift(yy_state_227) - NT_separated_list_SEMI_enum_constructor_ => Shift(yy_state_454) - T_RBRACE => Reduce(0, NT_separated_list_SEMI_enum_constructor_, yy_action_184) + NT_enum_constructor => Shift(yy_state_240) + NT_nonempty_list_attribute_ => Shift(yy_state_243) + T_UIDENT => Shift(yy_state_262) + NT_separated_nonempty_list_SEMI_enum_constructor_ => Shift(yy_state_265) + NT_separated_list_SEMI_enum_constructor_ => Shift(yy_state_491) + T_RBRACE => Reduce(0, NT_separated_list_SEMI_enum_constructor_, yy_action_182) _ => Error } } -// [93, type_sig → nonempty_list(attribute) PUB pub_attr EXTENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) • RBRACE optional_derive, EOF / SEMI] -fn yy_state_454(_lookahead : YYSymbol) -> YYDecision { +// [97, type_sig → nonempty_list(attribute) PUB pub_attr EXTENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) • RBRACE optional_derive, EOF / SEMI] +fn yy_state_491(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RBRACE => Shift(yy_state_455) + T_RBRACE => Shift(yy_state_492) _ => Error } } -// [93, type_sig → nonempty_list(attribute) PUB pub_attr EXTENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE • optional_derive, EOF / SEMI] -// [100, optional_derive → •, EOF / SEMI] -// [101, optional_derive → • DERIVE LPAREN non_empty_list_commas(qualified_uident) RPAREN, EOF / SEMI] -fn yy_state_455(_lookahead : YYSymbol) -> YYDecision { +// [97, type_sig → nonempty_list(attribute) PUB pub_attr EXTENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE • optional_derive, EOF / SEMI] +// [104, optional_derive → •, EOF / SEMI] +// [105, optional_derive → • DERIVE LPAREN non_empty_list_commas(qualified_uident) RPAREN, EOF / SEMI] +fn yy_state_492(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_DERIVE => Shift(yy_state_230) - NT_optional_derive => Shift(yy_state_456) - T_EOF | T_SEMI => Reduce(0, NT_optional_derive, yy_action_165) + T_DERIVE => Shift(yy_state_268) + NT_optional_derive => Shift(yy_state_493) + T_EOF | T_SEMI => Reduce(0, NT_optional_derive, yy_action_163) _ => Error } } -// [93, type_sig → nonempty_list(attribute) PUB pub_attr EXTENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive •, EOF / SEMI] -fn yy_state_456(_lookahead : YYSymbol) -> YYDecision { +// [97, type_sig → nonempty_list(attribute) PUB pub_attr EXTENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive •, EOF / SEMI] +fn yy_state_493(_lookahead : YYSymbol) -> YYDecision { ReduceNoLookahead(9, NT_type_sig, yy_action_103) } -// [87, type_sig → nonempty_list(attribute) PUB pub_attr ENUM • type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [164, type_decl_name_with_params → • uident optional_type_params_no_constraints, LBRACE] -// [212, uident → • UIDENT, LBRACKET / LBRACE] -fn yy_state_457(_lookahead : YYSymbol) -> YYDecision { +// [91, type_sig → nonempty_list(attribute) PUB pub_attr ENUM • type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [168, type_decl_name_with_params → • uident optional_type_params_no_constraints, LBRACE] +// [216, uident → • UIDENT, LBRACKET / LBRACE] +fn yy_state_494(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_UIDENT => Shift(yy_state_25) - NT_uident => Shift(yy_state_246) - NT_type_decl_name_with_params => Shift(yy_state_458) + NT_uident => Shift(yy_state_284) + NT_type_decl_name_with_params => Shift(yy_state_495) _ => Error } } -// [87, type_sig → nonempty_list(attribute) PUB pub_attr ENUM type_decl_name_with_params • LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -fn yy_state_458(_lookahead : YYSymbol) -> YYDecision { +// [91, type_sig → nonempty_list(attribute) PUB pub_attr ENUM type_decl_name_with_params • LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +fn yy_state_495(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACE => Shift(yy_state_459) + T_LBRACE => Shift(yy_state_496) _ => Error } } -// [87, type_sig → nonempty_list(attribute) PUB pub_attr ENUM type_decl_name_with_params LBRACE • separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [148, enum_constructor → • UIDENT option(delimited(LPAREN,separated_nonempty_list(COMMA,constructor_param),RPAREN)) option(eq_tag), SEMI / RBRACE] -// [149, enum_constructor → • nonempty_list(attribute) UIDENT option(delimited(LPAREN,separated_nonempty_list(COMMA,constructor_param),RPAREN)) option(eq_tag), SEMI / RBRACE] -// [223, separated_list(SEMI,enum_constructor) → •, RBRACE] -// [224, separated_list(SEMI,enum_constructor) → • separated_nonempty_list(SEMI,enum_constructor), RBRACE] -// [252, nonempty_list(attribute) → • ATTRIBUTE, UIDENT] -// [253, nonempty_list(attribute) → • ATTRIBUTE nonempty_list(attribute), UIDENT] -// [260, separated_nonempty_list(SEMI,enum_constructor) → • enum_constructor, RBRACE] -// [261, separated_nonempty_list(SEMI,enum_constructor) → • enum_constructor SEMI separated_nonempty_list(SEMI,enum_constructor), RBRACE] -fn yy_state_459(_lookahead : YYSymbol) -> YYDecision { +// [91, type_sig → nonempty_list(attribute) PUB pub_attr ENUM type_decl_name_with_params LBRACE • separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [152, enum_constructor → • UIDENT option(delimited(LPAREN,separated_nonempty_list(COMMA,constructor_param),RPAREN)) option(eq_tag), SEMI / RBRACE] +// [153, enum_constructor → • nonempty_list(attribute) UIDENT option(delimited(LPAREN,separated_nonempty_list(COMMA,constructor_param),RPAREN)) option(eq_tag), SEMI / RBRACE] +// [228, separated_list(SEMI,enum_constructor) → •, RBRACE] +// [229, separated_list(SEMI,enum_constructor) → • separated_nonempty_list(SEMI,enum_constructor), RBRACE] +// [257, nonempty_list(attribute) → • ATTRIBUTE, UIDENT] +// [258, nonempty_list(attribute) → • ATTRIBUTE nonempty_list(attribute), UIDENT] +// [265, separated_nonempty_list(SEMI,enum_constructor) → • enum_constructor, RBRACE] +// [266, separated_nonempty_list(SEMI,enum_constructor) → • enum_constructor SEMI separated_nonempty_list(SEMI,enum_constructor), RBRACE] +fn yy_state_496(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_ATTRIBUTE => Shift(yy_state_19) - NT_enum_constructor => Shift(yy_state_202) - NT_nonempty_list_attribute_ => Shift(yy_state_205) - T_UIDENT => Shift(yy_state_224) - NT_separated_nonempty_list_SEMI_enum_constructor_ => Shift(yy_state_227) - NT_separated_list_SEMI_enum_constructor_ => Shift(yy_state_460) - T_RBRACE => Reduce(0, NT_separated_list_SEMI_enum_constructor_, yy_action_184) + NT_enum_constructor => Shift(yy_state_240) + NT_nonempty_list_attribute_ => Shift(yy_state_243) + T_UIDENT => Shift(yy_state_262) + NT_separated_nonempty_list_SEMI_enum_constructor_ => Shift(yy_state_265) + NT_separated_list_SEMI_enum_constructor_ => Shift(yy_state_497) + T_RBRACE => Reduce(0, NT_separated_list_SEMI_enum_constructor_, yy_action_182) _ => Error } } -// [87, type_sig → nonempty_list(attribute) PUB pub_attr ENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) • RBRACE optional_derive, EOF / SEMI] -fn yy_state_460(_lookahead : YYSymbol) -> YYDecision { +// [91, type_sig → nonempty_list(attribute) PUB pub_attr ENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) • RBRACE optional_derive, EOF / SEMI] +fn yy_state_497(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RBRACE => Shift(yy_state_461) + T_RBRACE => Shift(yy_state_498) _ => Error } } -// [87, type_sig → nonempty_list(attribute) PUB pub_attr ENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE • optional_derive, EOF / SEMI] -// [100, optional_derive → •, EOF / SEMI] -// [101, optional_derive → • DERIVE LPAREN non_empty_list_commas(qualified_uident) RPAREN, EOF / SEMI] -fn yy_state_461(_lookahead : YYSymbol) -> YYDecision { +// [91, type_sig → nonempty_list(attribute) PUB pub_attr ENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE • optional_derive, EOF / SEMI] +// [104, optional_derive → •, EOF / SEMI] +// [105, optional_derive → • DERIVE LPAREN non_empty_list_commas(qualified_uident) RPAREN, EOF / SEMI] +fn yy_state_498(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_DERIVE => Shift(yy_state_230) - NT_optional_derive => Shift(yy_state_462) - T_EOF | T_SEMI => Reduce(0, NT_optional_derive, yy_action_165) + T_DERIVE => Shift(yy_state_268) + NT_optional_derive => Shift(yy_state_499) + T_EOF | T_SEMI => Reduce(0, NT_optional_derive, yy_action_163) _ => Error } } -// [87, type_sig → nonempty_list(attribute) PUB pub_attr ENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive •, EOF / SEMI] -fn yy_state_462(_lookahead : YYSymbol) -> YYDecision { +// [91, type_sig → nonempty_list(attribute) PUB pub_attr ENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive •, EOF / SEMI] +fn yy_state_499(_lookahead : YYSymbol) -> YYDecision { ReduceNoLookahead(9, NT_type_sig, yy_action_102) } -// [75, type_sig → nonempty_list(attribute) PUB pub_attr STRUCT • type_decl_name_with_params LBRACE record_decl_body RBRACE optional_derive, EOF / SEMI] -// [81, type_sig → nonempty_list(attribute) PUB pub_attr STRUCT • type_decl_name_with_params LPAREN separated_list(COMMA,type_) RPAREN optional_derive, EOF / SEMI] -// [164, type_decl_name_with_params → • uident optional_type_params_no_constraints, LPAREN / LBRACE] -// [212, uident → • UIDENT, LPAREN / LBRACKET / LBRACE] -fn yy_state_463(_lookahead : YYSymbol) -> YYDecision { +// [79, type_sig → nonempty_list(attribute) PUB pub_attr STRUCT • type_decl_name_with_params LBRACE record_decl_body RBRACE optional_derive, EOF / SEMI] +// [85, type_sig → nonempty_list(attribute) PUB pub_attr STRUCT • type_decl_name_with_params LPAREN separated_list(COMMA,type_) RPAREN optional_derive, EOF / SEMI] +// [168, type_decl_name_with_params → • uident optional_type_params_no_constraints, LPAREN / LBRACE] +// [216, uident → • UIDENT, LPAREN / LBRACKET / LBRACE] +fn yy_state_500(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_UIDENT => Shift(yy_state_25) - NT_uident => Shift(yy_state_246) - NT_type_decl_name_with_params => Shift(yy_state_464) + NT_uident => Shift(yy_state_284) + NT_type_decl_name_with_params => Shift(yy_state_501) _ => Error } } -// [75, type_sig → nonempty_list(attribute) PUB pub_attr STRUCT type_decl_name_with_params • LBRACE record_decl_body RBRACE optional_derive, EOF / SEMI] -// [81, type_sig → nonempty_list(attribute) PUB pub_attr STRUCT type_decl_name_with_params • LPAREN separated_list(COMMA,type_) RPAREN optional_derive, EOF / SEMI] -fn yy_state_464(_lookahead : YYSymbol) -> YYDecision { +// [79, type_sig → nonempty_list(attribute) PUB pub_attr STRUCT type_decl_name_with_params • LBRACE record_decl_body RBRACE optional_derive, EOF / SEMI] +// [85, type_sig → nonempty_list(attribute) PUB pub_attr STRUCT type_decl_name_with_params • LPAREN separated_list(COMMA,type_) RPAREN optional_derive, EOF / SEMI] +fn yy_state_501(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LPAREN => Shift(yy_state_465) - T_LBRACE => Shift(yy_state_469) - _ => Error - } -} - -// [81, type_sig → nonempty_list(attribute) PUB pub_attr STRUCT type_decl_name_with_params LPAREN • separated_list(COMMA,type_) RPAREN optional_derive, EOF / SEMI] -// [167, simple_type → • simple_type QUESTION, RPAREN / COMMA / QUESTION] -// [168, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, RPAREN / COMMA / QUESTION] -// [169, simple_type → • LPAREN type_ RPAREN, RPAREN / COMMA / QUESTION] -// [170, simple_type → • qualified_uident_ optional_type_arguments, RPAREN / COMMA / QUESTION] -// [171, simple_type → • AMPER qualified_uident_, RPAREN / COMMA / QUESTION] -// [172, simple_type → • UNDERSCORE, RPAREN / COMMA / QUESTION] -// [173, type_ → • simple_type, RPAREN / COMMA] -// [174, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [175, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [176, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [177, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [178, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [179, type_ → • LPAREN RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [180, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [181, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [210, qualified_uident_ → • UIDENT, RPAREN / COMMA / QUESTION / LBRACKET] -// [211, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, RPAREN / COMMA / QUESTION / LBRACKET] -// [225, separated_list(COMMA,type_) → •, RPAREN] -// [226, separated_list(COMMA,type_) → • separated_nonempty_list(COMMA,type_), RPAREN] -// [250, separated_nonempty_list(COMMA,type_) → • type_, RPAREN] -// [251, separated_nonempty_list(COMMA,type_) → • type_ COMMA separated_nonempty_list(COMMA,type_), RPAREN] -fn yy_state_465(_lookahead : YYSymbol) -> YYDecision { + T_LPAREN => Shift(yy_state_502) + T_LBRACE => Shift(yy_state_506) + _ => Error + } +} + +// [85, type_sig → nonempty_list(attribute) PUB pub_attr STRUCT type_decl_name_with_params LPAREN • separated_list(COMMA,type_) RPAREN optional_derive, EOF / SEMI] +// [171, simple_type → • simple_type QUESTION, RPAREN / COMMA / QUESTION] +// [172, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, RPAREN / COMMA / QUESTION] +// [173, simple_type → • LPAREN type_ RPAREN, RPAREN / COMMA / QUESTION] +// [174, simple_type → • qualified_uident_ optional_type_arguments, RPAREN / COMMA / QUESTION] +// [175, simple_type → • AMPER qualified_uident_, RPAREN / COMMA / QUESTION] +// [176, simple_type → • UNDERSCORE, RPAREN / COMMA / QUESTION] +// [177, type_ → • simple_type, RPAREN / COMMA] +// [178, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [179, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [180, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [181, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [182, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [183, type_ → • LPAREN RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [184, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [185, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [214, qualified_uident_ → • UIDENT, RPAREN / COMMA / QUESTION / LBRACKET] +// [215, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, RPAREN / COMMA / QUESTION / LBRACKET] +// [230, separated_list(COMMA,type_) → •, RPAREN] +// [231, separated_list(COMMA,type_) → • separated_nonempty_list(COMMA,type_), RPAREN] +// [255, separated_nonempty_list(COMMA,type_) → • type_, RPAREN] +// [256, separated_nonempty_list(COMMA,type_) → • type_ COMMA separated_nonempty_list(COMMA,type_), RPAREN] +fn yy_state_502(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_PACKAGE_NAME => Shift(yy_state_62) T_UIDENT => Shift(yy_state_64) @@ -10038,214 +10864,214 @@ fn yy_state_465(_lookahead : YYSymbol) -> YYDecision { NT_type_ => Shift(yy_state_80) T_LPAREN => Shift(yy_state_83) NT_simple_type => Shift(yy_state_106) - NT_separated_nonempty_list_COMMA_type__ => Shift(yy_state_256) - NT_separated_list_COMMA_type__ => Shift(yy_state_466) - T_RPAREN => Reduce(0, NT_separated_list_COMMA_type__, yy_action_157) + NT_separated_nonempty_list_COMMA_type__ => Shift(yy_state_294) + NT_separated_list_COMMA_type__ => Shift(yy_state_503) + T_RPAREN => Reduce(0, NT_separated_list_COMMA_type__, yy_action_155) _ => Error } } -// [81, type_sig → nonempty_list(attribute) PUB pub_attr STRUCT type_decl_name_with_params LPAREN separated_list(COMMA,type_) • RPAREN optional_derive, EOF / SEMI] -fn yy_state_466(_lookahead : YYSymbol) -> YYDecision { +// [85, type_sig → nonempty_list(attribute) PUB pub_attr STRUCT type_decl_name_with_params LPAREN separated_list(COMMA,type_) • RPAREN optional_derive, EOF / SEMI] +fn yy_state_503(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RPAREN => Shift(yy_state_467) + T_RPAREN => Shift(yy_state_504) _ => Error } } -// [81, type_sig → nonempty_list(attribute) PUB pub_attr STRUCT type_decl_name_with_params LPAREN separated_list(COMMA,type_) RPAREN • optional_derive, EOF / SEMI] -// [100, optional_derive → •, EOF / SEMI] -// [101, optional_derive → • DERIVE LPAREN non_empty_list_commas(qualified_uident) RPAREN, EOF / SEMI] -fn yy_state_467(_lookahead : YYSymbol) -> YYDecision { +// [85, type_sig → nonempty_list(attribute) PUB pub_attr STRUCT type_decl_name_with_params LPAREN separated_list(COMMA,type_) RPAREN • optional_derive, EOF / SEMI] +// [104, optional_derive → •, EOF / SEMI] +// [105, optional_derive → • DERIVE LPAREN non_empty_list_commas(qualified_uident) RPAREN, EOF / SEMI] +fn yy_state_504(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_DERIVE => Shift(yy_state_230) - NT_optional_derive => Shift(yy_state_468) - T_EOF | T_SEMI => Reduce(0, NT_optional_derive, yy_action_165) + T_DERIVE => Shift(yy_state_268) + NT_optional_derive => Shift(yy_state_505) + T_EOF | T_SEMI => Reduce(0, NT_optional_derive, yy_action_163) _ => Error } } -// [81, type_sig → nonempty_list(attribute) PUB pub_attr STRUCT type_decl_name_with_params LPAREN separated_list(COMMA,type_) RPAREN optional_derive •, EOF / SEMI] -fn yy_state_468(_lookahead : YYSymbol) -> YYDecision { +// [85, type_sig → nonempty_list(attribute) PUB pub_attr STRUCT type_decl_name_with_params LPAREN separated_list(COMMA,type_) RPAREN optional_derive •, EOF / SEMI] +fn yy_state_505(_lookahead : YYSymbol) -> YYDecision { ReduceNoLookahead(9, NT_type_sig, yy_action_101) } -// [75, type_sig → nonempty_list(attribute) PUB pub_attr STRUCT type_decl_name_with_params LBRACE • record_decl_body RBRACE optional_derive, EOF / SEMI] -// [152, record_decl_field → • boption(MUTABLE) LIDENT COLON type_, SEMI / RBRACE] -// [153, record_decl_field → • nonempty_list(attribute) boption(MUTABLE) LIDENT COLON type_, SEMI / RBRACE] -// [154, record_decl_body → • separated_list(SEMI,record_decl_field), RBRACE] -// [240, boption(MUTABLE) → •, LIDENT] -// [241, boption(MUTABLE) → • MUTABLE, LIDENT] -// [242, separated_list(SEMI,record_decl_field) → •, RBRACE] -// [243, separated_list(SEMI,record_decl_field) → • separated_nonempty_list(SEMI,record_decl_field), RBRACE] -// [252, nonempty_list(attribute) → • ATTRIBUTE, LIDENT / MUTABLE] -// [253, nonempty_list(attribute) → • ATTRIBUTE nonempty_list(attribute), LIDENT / MUTABLE] -// [266, separated_nonempty_list(SEMI,record_decl_field) → • record_decl_field, RBRACE] -// [267, separated_nonempty_list(SEMI,record_decl_field) → • record_decl_field SEMI separated_nonempty_list(SEMI,record_decl_field), RBRACE] -fn yy_state_469(_lookahead : YYSymbol) -> YYDecision { +// [79, type_sig → nonempty_list(attribute) PUB pub_attr STRUCT type_decl_name_with_params LBRACE • record_decl_body RBRACE optional_derive, EOF / SEMI] +// [156, record_decl_field → • boption(MUTABLE) lident COLON type_, SEMI / RBRACE] +// [157, record_decl_field → • nonempty_list(attribute) boption(MUTABLE) lident COLON type_, SEMI / RBRACE] +// [158, record_decl_body → • separated_list(SEMI,record_decl_field), RBRACE] +// [245, boption(MUTABLE) → •, LIDENT / EXTEND] +// [246, boption(MUTABLE) → • MUTABLE, LIDENT / EXTEND] +// [247, separated_list(SEMI,record_decl_field) → •, RBRACE] +// [248, separated_list(SEMI,record_decl_field) → • separated_nonempty_list(SEMI,record_decl_field), RBRACE] +// [257, nonempty_list(attribute) → • ATTRIBUTE, LIDENT / MUTABLE / EXTEND] +// [258, nonempty_list(attribute) → • ATTRIBUTE nonempty_list(attribute), LIDENT / MUTABLE / EXTEND] +// [271, separated_nonempty_list(SEMI,record_decl_field) → • record_decl_field, RBRACE] +// [272, separated_nonempty_list(SEMI,record_decl_field) → • record_decl_field SEMI separated_nonempty_list(SEMI,record_decl_field), RBRACE] +fn yy_state_506(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_ATTRIBUTE => Shift(yy_state_19) - T_MUTABLE => Shift(yy_state_208) - NT_record_decl_field => Shift(yy_state_261) - NT_nonempty_list_attribute_ => Shift(yy_state_264) - NT_boption_MUTABLE_ => Shift(yy_state_269) - NT_separated_nonempty_list_SEMI_record_decl_field_ => Shift(yy_state_273) - NT_separated_list_SEMI_record_decl_field_ => Shift(yy_state_274) - NT_record_decl_body => Shift(yy_state_470) - T_LIDENT => Reduce(0, NT_boption_MUTABLE_, yy_action_180) - T_RBRACE => Reduce(0, NT_separated_list_SEMI_record_decl_field_, yy_action_154) + T_MUTABLE => Shift(yy_state_246) + NT_record_decl_field => Shift(yy_state_299) + NT_nonempty_list_attribute_ => Shift(yy_state_302) + NT_boption_MUTABLE_ => Shift(yy_state_307) + NT_separated_nonempty_list_SEMI_record_decl_field_ => Shift(yy_state_311) + NT_separated_list_SEMI_record_decl_field_ => Shift(yy_state_312) + NT_record_decl_body => Shift(yy_state_507) + T_LIDENT | T_EXTEND => Reduce(0, NT_boption_MUTABLE_, yy_action_178) + T_RBRACE => Reduce(0, NT_separated_list_SEMI_record_decl_field_, yy_action_152) _ => Error } } -// [75, type_sig → nonempty_list(attribute) PUB pub_attr STRUCT type_decl_name_with_params LBRACE record_decl_body • RBRACE optional_derive, EOF / SEMI] -fn yy_state_470(_lookahead : YYSymbol) -> YYDecision { +// [79, type_sig → nonempty_list(attribute) PUB pub_attr STRUCT type_decl_name_with_params LBRACE record_decl_body • RBRACE optional_derive, EOF / SEMI] +fn yy_state_507(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RBRACE => Shift(yy_state_471) + T_RBRACE => Shift(yy_state_508) _ => Error } } -// [75, type_sig → nonempty_list(attribute) PUB pub_attr STRUCT type_decl_name_with_params LBRACE record_decl_body RBRACE • optional_derive, EOF / SEMI] -// [100, optional_derive → •, EOF / SEMI] -// [101, optional_derive → • DERIVE LPAREN non_empty_list_commas(qualified_uident) RPAREN, EOF / SEMI] -fn yy_state_471(_lookahead : YYSymbol) -> YYDecision { +// [79, type_sig → nonempty_list(attribute) PUB pub_attr STRUCT type_decl_name_with_params LBRACE record_decl_body RBRACE • optional_derive, EOF / SEMI] +// [104, optional_derive → •, EOF / SEMI] +// [105, optional_derive → • DERIVE LPAREN non_empty_list_commas(qualified_uident) RPAREN, EOF / SEMI] +fn yy_state_508(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_DERIVE => Shift(yy_state_230) - NT_optional_derive => Shift(yy_state_472) - T_EOF | T_SEMI => Reduce(0, NT_optional_derive, yy_action_165) + T_DERIVE => Shift(yy_state_268) + NT_optional_derive => Shift(yy_state_509) + T_EOF | T_SEMI => Reduce(0, NT_optional_derive, yy_action_163) _ => Error } } -// [75, type_sig → nonempty_list(attribute) PUB pub_attr STRUCT type_decl_name_with_params LBRACE record_decl_body RBRACE optional_derive •, EOF / SEMI] -fn yy_state_472(_lookahead : YYSymbol) -> YYDecision { +// [79, type_sig → nonempty_list(attribute) PUB pub_attr STRUCT type_decl_name_with_params LBRACE record_decl_body RBRACE optional_derive •, EOF / SEMI] +fn yy_state_509(_lookahead : YYSymbol) -> YYDecision { ReduceNoLookahead(9, NT_type_sig, yy_action_100) } -// [63, type_sig → nonempty_list(attribute) PUB pub_attr SUBERROR • uident optional_derive, EOF / SEMI] -// [69, type_sig → nonempty_list(attribute) PUB pub_attr SUBERROR • uident LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [212, uident → • UIDENT, EOF / DERIVE / SEMI / LBRACE] -fn yy_state_473(_lookahead : YYSymbol) -> YYDecision { +// [67, type_sig → nonempty_list(attribute) PUB pub_attr SUBERROR • uident optional_derive, EOF / SEMI] +// [73, type_sig → nonempty_list(attribute) PUB pub_attr SUBERROR • uident LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [216, uident → • UIDENT, EOF / DERIVE / SEMI / LBRACE] +fn yy_state_510(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_UIDENT => Shift(yy_state_25) - NT_uident => Shift(yy_state_474) + NT_uident => Shift(yy_state_511) _ => Error } } -// [63, type_sig → nonempty_list(attribute) PUB pub_attr SUBERROR uident • optional_derive, EOF / SEMI] -// [69, type_sig → nonempty_list(attribute) PUB pub_attr SUBERROR uident • LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [100, optional_derive → •, EOF / SEMI] -// [101, optional_derive → • DERIVE LPAREN non_empty_list_commas(qualified_uident) RPAREN, EOF / SEMI] -fn yy_state_474(_lookahead : YYSymbol) -> YYDecision { +// [67, type_sig → nonempty_list(attribute) PUB pub_attr SUBERROR uident • optional_derive, EOF / SEMI] +// [73, type_sig → nonempty_list(attribute) PUB pub_attr SUBERROR uident • LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [104, optional_derive → •, EOF / SEMI] +// [105, optional_derive → • DERIVE LPAREN non_empty_list_commas(qualified_uident) RPAREN, EOF / SEMI] +fn yy_state_511(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_DERIVE => Shift(yy_state_230) - T_LBRACE => Shift(yy_state_475) - NT_optional_derive => Shift(yy_state_479) - T_EOF | T_SEMI => Reduce(0, NT_optional_derive, yy_action_165) + T_DERIVE => Shift(yy_state_268) + T_LBRACE => Shift(yy_state_512) + NT_optional_derive => Shift(yy_state_516) + T_EOF | T_SEMI => Reduce(0, NT_optional_derive, yy_action_163) _ => Error } } -// [69, type_sig → nonempty_list(attribute) PUB pub_attr SUBERROR uident LBRACE • separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [148, enum_constructor → • UIDENT option(delimited(LPAREN,separated_nonempty_list(COMMA,constructor_param),RPAREN)) option(eq_tag), SEMI / RBRACE] -// [149, enum_constructor → • nonempty_list(attribute) UIDENT option(delimited(LPAREN,separated_nonempty_list(COMMA,constructor_param),RPAREN)) option(eq_tag), SEMI / RBRACE] -// [223, separated_list(SEMI,enum_constructor) → •, RBRACE] -// [224, separated_list(SEMI,enum_constructor) → • separated_nonempty_list(SEMI,enum_constructor), RBRACE] -// [252, nonempty_list(attribute) → • ATTRIBUTE, UIDENT] -// [253, nonempty_list(attribute) → • ATTRIBUTE nonempty_list(attribute), UIDENT] -// [260, separated_nonempty_list(SEMI,enum_constructor) → • enum_constructor, RBRACE] -// [261, separated_nonempty_list(SEMI,enum_constructor) → • enum_constructor SEMI separated_nonempty_list(SEMI,enum_constructor), RBRACE] -fn yy_state_475(_lookahead : YYSymbol) -> YYDecision { +// [73, type_sig → nonempty_list(attribute) PUB pub_attr SUBERROR uident LBRACE • separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [152, enum_constructor → • UIDENT option(delimited(LPAREN,separated_nonempty_list(COMMA,constructor_param),RPAREN)) option(eq_tag), SEMI / RBRACE] +// [153, enum_constructor → • nonempty_list(attribute) UIDENT option(delimited(LPAREN,separated_nonempty_list(COMMA,constructor_param),RPAREN)) option(eq_tag), SEMI / RBRACE] +// [228, separated_list(SEMI,enum_constructor) → •, RBRACE] +// [229, separated_list(SEMI,enum_constructor) → • separated_nonempty_list(SEMI,enum_constructor), RBRACE] +// [257, nonempty_list(attribute) → • ATTRIBUTE, UIDENT] +// [258, nonempty_list(attribute) → • ATTRIBUTE nonempty_list(attribute), UIDENT] +// [265, separated_nonempty_list(SEMI,enum_constructor) → • enum_constructor, RBRACE] +// [266, separated_nonempty_list(SEMI,enum_constructor) → • enum_constructor SEMI separated_nonempty_list(SEMI,enum_constructor), RBRACE] +fn yy_state_512(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_ATTRIBUTE => Shift(yy_state_19) - NT_enum_constructor => Shift(yy_state_202) - NT_nonempty_list_attribute_ => Shift(yy_state_205) - T_UIDENT => Shift(yy_state_224) - NT_separated_nonempty_list_SEMI_enum_constructor_ => Shift(yy_state_227) - NT_separated_list_SEMI_enum_constructor_ => Shift(yy_state_476) - T_RBRACE => Reduce(0, NT_separated_list_SEMI_enum_constructor_, yy_action_184) + NT_enum_constructor => Shift(yy_state_240) + NT_nonempty_list_attribute_ => Shift(yy_state_243) + T_UIDENT => Shift(yy_state_262) + NT_separated_nonempty_list_SEMI_enum_constructor_ => Shift(yy_state_265) + NT_separated_list_SEMI_enum_constructor_ => Shift(yy_state_513) + T_RBRACE => Reduce(0, NT_separated_list_SEMI_enum_constructor_, yy_action_182) _ => Error } } -// [69, type_sig → nonempty_list(attribute) PUB pub_attr SUBERROR uident LBRACE separated_list(SEMI,enum_constructor) • RBRACE optional_derive, EOF / SEMI] -fn yy_state_476(_lookahead : YYSymbol) -> YYDecision { +// [73, type_sig → nonempty_list(attribute) PUB pub_attr SUBERROR uident LBRACE separated_list(SEMI,enum_constructor) • RBRACE optional_derive, EOF / SEMI] +fn yy_state_513(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RBRACE => Shift(yy_state_477) + T_RBRACE => Shift(yy_state_514) _ => Error } } -// [69, type_sig → nonempty_list(attribute) PUB pub_attr SUBERROR uident LBRACE separated_list(SEMI,enum_constructor) RBRACE • optional_derive, EOF / SEMI] -// [100, optional_derive → •, EOF / SEMI] -// [101, optional_derive → • DERIVE LPAREN non_empty_list_commas(qualified_uident) RPAREN, EOF / SEMI] -fn yy_state_477(_lookahead : YYSymbol) -> YYDecision { +// [73, type_sig → nonempty_list(attribute) PUB pub_attr SUBERROR uident LBRACE separated_list(SEMI,enum_constructor) RBRACE • optional_derive, EOF / SEMI] +// [104, optional_derive → •, EOF / SEMI] +// [105, optional_derive → • DERIVE LPAREN non_empty_list_commas(qualified_uident) RPAREN, EOF / SEMI] +fn yy_state_514(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_DERIVE => Shift(yy_state_230) - NT_optional_derive => Shift(yy_state_478) - T_EOF | T_SEMI => Reduce(0, NT_optional_derive, yy_action_165) + T_DERIVE => Shift(yy_state_268) + NT_optional_derive => Shift(yy_state_515) + T_EOF | T_SEMI => Reduce(0, NT_optional_derive, yy_action_163) _ => Error } } -// [69, type_sig → nonempty_list(attribute) PUB pub_attr SUBERROR uident LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive •, EOF / SEMI] -fn yy_state_478(_lookahead : YYSymbol) -> YYDecision { +// [73, type_sig → nonempty_list(attribute) PUB pub_attr SUBERROR uident LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive •, EOF / SEMI] +fn yy_state_515(_lookahead : YYSymbol) -> YYDecision { ReduceNoLookahead(9, NT_type_sig, yy_action_99) } -// [63, type_sig → nonempty_list(attribute) PUB pub_attr SUBERROR uident optional_derive •, EOF / SEMI] -fn yy_state_479(_lookahead : YYSymbol) -> YYDecision { +// [67, type_sig → nonempty_list(attribute) PUB pub_attr SUBERROR uident optional_derive •, EOF / SEMI] +fn yy_state_516(_lookahead : YYSymbol) -> YYDecision { ReduceNoLookahead(6, NT_type_sig, yy_action_98) } -// [57, type_sig → nonempty_list(attribute) PUB pub_attr TYPE • type_decl_name_with_params optional_derive, EOF / SEMI] -// [129, alias_sig → nonempty_list(attribute) PUB pub_attr TYPE • type_decl_name_with_params EQUAL type_, EOF / SEMI] -// [164, type_decl_name_with_params → • uident optional_type_params_no_constraints, EOF / DERIVE / EQUAL / SEMI] -// [212, uident → • UIDENT, EOF / DERIVE / EQUAL / SEMI / LBRACKET] -fn yy_state_480(_lookahead : YYSymbol) -> YYDecision { +// [61, type_sig → nonempty_list(attribute) PUB pub_attr TYPE • type_decl_name_with_params optional_derive, EOF / SEMI] +// [133, alias_sig → nonempty_list(attribute) PUB pub_attr TYPE • type_decl_name_with_params EQUAL type_, EOF / SEMI] +// [168, type_decl_name_with_params → • uident optional_type_params_no_constraints, EOF / DERIVE / EQUAL / SEMI] +// [216, uident → • UIDENT, EOF / DERIVE / EQUAL / SEMI / LBRACKET] +fn yy_state_517(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_UIDENT => Shift(yy_state_25) - NT_uident => Shift(yy_state_246) - NT_type_decl_name_with_params => Shift(yy_state_481) + NT_uident => Shift(yy_state_284) + NT_type_decl_name_with_params => Shift(yy_state_518) _ => Error } } -// [57, type_sig → nonempty_list(attribute) PUB pub_attr TYPE type_decl_name_with_params • optional_derive, EOF / SEMI] -// [100, optional_derive → •, EOF / SEMI] -// [101, optional_derive → • DERIVE LPAREN non_empty_list_commas(qualified_uident) RPAREN, EOF / SEMI] -// [129, alias_sig → nonempty_list(attribute) PUB pub_attr TYPE type_decl_name_with_params • EQUAL type_, EOF / SEMI] -fn yy_state_481(_lookahead : YYSymbol) -> YYDecision { +// [61, type_sig → nonempty_list(attribute) PUB pub_attr TYPE type_decl_name_with_params • optional_derive, EOF / SEMI] +// [104, optional_derive → •, EOF / SEMI] +// [105, optional_derive → • DERIVE LPAREN non_empty_list_commas(qualified_uident) RPAREN, EOF / SEMI] +// [133, alias_sig → nonempty_list(attribute) PUB pub_attr TYPE type_decl_name_with_params • EQUAL type_, EOF / SEMI] +fn yy_state_518(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_DERIVE => Shift(yy_state_230) - T_EQUAL => Shift(yy_state_482) - NT_optional_derive => Shift(yy_state_484) - T_EOF | T_SEMI => Reduce(0, NT_optional_derive, yy_action_165) - _ => Error - } -} - -// [129, alias_sig → nonempty_list(attribute) PUB pub_attr TYPE type_decl_name_with_params EQUAL • type_, EOF / SEMI] -// [167, simple_type → • simple_type QUESTION, EOF / QUESTION / SEMI] -// [168, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, EOF / QUESTION / SEMI] -// [169, simple_type → • LPAREN type_ RPAREN, EOF / QUESTION / SEMI] -// [170, simple_type → • qualified_uident_ optional_type_arguments, EOF / QUESTION / SEMI] -// [171, simple_type → • AMPER qualified_uident_, EOF / QUESTION / SEMI] -// [172, simple_type → • UNDERSCORE, EOF / QUESTION / SEMI] -// [173, type_ → • simple_type, EOF / SEMI] -// [174, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] -// [175, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] -// [176, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] -// [177, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] -// [178, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] -// [179, type_ → • LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] -// [180, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] -// [181, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] -// [210, qualified_uident_ → • UIDENT, EOF / QUESTION / SEMI / LBRACKET] -// [211, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, EOF / QUESTION / SEMI / LBRACKET] -fn yy_state_482(_lookahead : YYSymbol) -> YYDecision { + T_DERIVE => Shift(yy_state_268) + T_EQUAL => Shift(yy_state_519) + NT_optional_derive => Shift(yy_state_521) + T_EOF | T_SEMI => Reduce(0, NT_optional_derive, yy_action_163) + _ => Error + } +} + +// [133, alias_sig → nonempty_list(attribute) PUB pub_attr TYPE type_decl_name_with_params EQUAL • type_, EOF / SEMI] +// [171, simple_type → • simple_type QUESTION, EOF / QUESTION / SEMI] +// [172, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, EOF / QUESTION / SEMI] +// [173, simple_type → • LPAREN type_ RPAREN, EOF / QUESTION / SEMI] +// [174, simple_type → • qualified_uident_ optional_type_arguments, EOF / QUESTION / SEMI] +// [175, simple_type → • AMPER qualified_uident_, EOF / QUESTION / SEMI] +// [176, simple_type → • UNDERSCORE, EOF / QUESTION / SEMI] +// [177, type_ → • simple_type, EOF / SEMI] +// [178, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] +// [179, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] +// [180, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] +// [181, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] +// [182, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] +// [183, type_ → • LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] +// [184, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] +// [185, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] +// [214, qualified_uident_ → • UIDENT, EOF / QUESTION / SEMI / LBRACKET] +// [215, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, EOF / QUESTION / SEMI / LBRACKET] +fn yy_state_519(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_PACKAGE_NAME => Shift(yy_state_62) T_UIDENT => Shift(yy_state_64) @@ -10255,96 +11081,102 @@ fn yy_state_482(_lookahead : YYSymbol) -> YYDecision { NT_qualified_uident_ => Shift(yy_state_78) T_LPAREN => Shift(yy_state_83) NT_simple_type => Shift(yy_state_106) - NT_type_ => Shift(yy_state_483) + NT_type_ => Shift(yy_state_520) _ => Error } } -// [129, alias_sig → nonempty_list(attribute) PUB pub_attr TYPE type_decl_name_with_params EQUAL type_ •, EOF / SEMI] -fn yy_state_483(_lookahead : YYSymbol) -> YYDecision { +// [133, alias_sig → nonempty_list(attribute) PUB pub_attr TYPE type_decl_name_with_params EQUAL type_ •, EOF / SEMI] +fn yy_state_520(_lookahead : YYSymbol) -> YYDecision { ReduceNoLookahead(7, NT_alias_sig, yy_action_97) } -// [57, type_sig → nonempty_list(attribute) PUB pub_attr TYPE type_decl_name_with_params optional_derive •, EOF / SEMI] -fn yy_state_484(_lookahead : YYSymbol) -> YYDecision { +// [61, type_sig → nonempty_list(attribute) PUB pub_attr TYPE type_decl_name_with_params optional_derive •, EOF / SEMI] +fn yy_state_521(_lookahead : YYSymbol) -> YYDecision { ReduceNoLookahead(6, NT_type_sig, yy_action_96) } // [47, func_sig → nonempty_list(attribute) PUB pub_attr FN • loption(type_params_with_constraints) func_name LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type, EOF / SEMI] -// [157, type_params_with_constraints → • LBRACKET separated_list(COMMA,type_param_with_constraints) RBRACKET, LIDENT / UIDENT / AMPER] -// [217, loption(type_params_with_constraints) → •, LIDENT / UIDENT / AMPER] -// [218, loption(type_params_with_constraints) → • type_params_with_constraints, LIDENT / UIDENT / AMPER] -fn yy_state_485(_lookahead : YYSymbol) -> YYDecision { +// [161, type_params_with_constraints → • LBRACKET separated_list(COMMA,type_param_with_constraints) RBRACKET, LIDENT / UIDENT / AMPER / EXTEND] +// [222, loption(type_params_with_constraints) → •, LIDENT / UIDENT / AMPER / EXTEND] +// [223, loption(type_params_with_constraints) → • type_params_with_constraints, LIDENT / UIDENT / AMPER / EXTEND] +fn yy_state_522(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACKET => Shift(yy_state_162) - NT_type_params_with_constraints => Shift(yy_state_291) - NT_loption_type_params_with_constraints_ => Shift(yy_state_486) - T_LIDENT | T_UIDENT | T_AMPER => Reduce(0, NT_loption_type_params_with_constraints_, yy_action_142) + NT_type_params_with_constraints => Shift(yy_state_143) + T_LBRACKET => Shift(yy_state_144) + NT_loption_type_params_with_constraints_ => Shift(yy_state_523) + T_LIDENT | T_UIDENT | T_AMPER | T_EXTEND => Reduce(0, NT_loption_type_params_with_constraints_, yy_action_217) _ => Error } } -// [28, method_self_type_coloncolon → • UIDENT COLONCOLON, LIDENT / UIDENT] -// [29, method_self_type_coloncolon → • AMPER UIDENT COLONCOLON, LIDENT / UIDENT] +// [28, method_self_type_coloncolon → • UIDENT COLONCOLON, LIDENT / UIDENT / EXTEND] +// [29, method_self_type_coloncolon → • AMPER UIDENT COLONCOLON, LIDENT / UIDENT / EXTEND] // [30, luident → • lident, LPAREN] // [31, luident → • uident, LPAREN] // [32, func_name → • luident, LPAREN] // [33, func_name → • method_self_type_coloncolon luident, LPAREN] // [47, func_sig → nonempty_list(attribute) PUB pub_attr FN loption(type_params_with_constraints) • func_name LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type, EOF / SEMI] -// [212, uident → • UIDENT, LPAREN] -// [213, lident → • LIDENT, LPAREN] -fn yy_state_486(_lookahead : YYSymbol) -> YYDecision { +// [216, uident → • UIDENT, LPAREN] +// [217, lident → • LIDENT, LPAREN] +// [218, lident → • EXTEND, LPAREN] +fn yy_state_523(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LIDENT => Shift(yy_state_38) - NT_method_self_type_coloncolon => Shift(yy_state_299) - NT_uident => Shift(yy_state_301) - NT_lident => Shift(yy_state_302) - NT_luident => Shift(yy_state_303) - T_AMPER => Shift(yy_state_304) - T_UIDENT => Shift(yy_state_307) - NT_func_name => Shift(yy_state_487) + T_EXTEND => Shift(yy_state_38) + T_LIDENT => Shift(yy_state_39) + NT_method_self_type_coloncolon => Shift(yy_state_336) + NT_uident => Shift(yy_state_338) + NT_lident => Shift(yy_state_339) + NT_luident => Shift(yy_state_340) + T_AMPER => Shift(yy_state_341) + T_UIDENT => Shift(yy_state_344) + NT_func_name => Shift(yy_state_524) _ => Error } } // [47, func_sig → nonempty_list(attribute) PUB pub_attr FN loption(type_params_with_constraints) func_name • LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type, EOF / SEMI] -fn yy_state_487(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_524(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LPAREN => Shift(yy_state_488) + T_LPAREN => Shift(yy_state_525) _ => Error } } // [47, func_sig → nonempty_list(attribute) PUB pub_attr FN loption(type_params_with_constraints) func_name LPAREN • separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type, EOF / SEMI] -// [167, simple_type → • simple_type QUESTION, RPAREN / COMMA / QUESTION] -// [168, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, RPAREN / COMMA / QUESTION] -// [169, simple_type → • LPAREN type_ RPAREN, RPAREN / COMMA / QUESTION] -// [170, simple_type → • qualified_uident_ optional_type_arguments, RPAREN / COMMA / QUESTION] -// [171, simple_type → • AMPER qualified_uident_, RPAREN / COMMA / QUESTION] -// [172, simple_type → • UNDERSCORE, RPAREN / COMMA / QUESTION] -// [173, type_ → • simple_type, RPAREN / COMMA] -// [174, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [175, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [176, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [177, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [178, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [179, type_ → • LPAREN RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [180, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [181, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [190, parameter → • type_, RPAREN / COMMA] -// [191, parameter → • POST_LABEL COLON type_, RPAREN / COMMA] -// [192, parameter → • label QUESTION COLON type_, RPAREN / COMMA] -// [210, qualified_uident_ → • UIDENT, RPAREN / COMMA / QUESTION / LBRACKET] -// [211, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, RPAREN / COMMA / QUESTION / LBRACKET] -// [214, label → • LIDENT, QUESTION] -// [219, separated_list(COMMA,parameter) → •, RPAREN] -// [220, separated_list(COMMA,parameter) → • separated_nonempty_list(COMMA,parameter), RPAREN] -// [258, separated_nonempty_list(COMMA,parameter) → • parameter, RPAREN] -// [259, separated_nonempty_list(COMMA,parameter) → • parameter COMMA separated_nonempty_list(COMMA,parameter), RPAREN] -fn yy_state_488(_lookahead : YYSymbol) -> YYDecision { +// [171, simple_type → • simple_type QUESTION, RPAREN / COMMA / QUESTION] +// [172, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, RPAREN / COMMA / QUESTION] +// [173, simple_type → • LPAREN type_ RPAREN, RPAREN / COMMA / QUESTION] +// [174, simple_type → • qualified_uident_ optional_type_arguments, RPAREN / COMMA / QUESTION] +// [175, simple_type → • AMPER qualified_uident_, RPAREN / COMMA / QUESTION] +// [176, simple_type → • UNDERSCORE, RPAREN / COMMA / QUESTION] +// [177, type_ → • simple_type, RPAREN / COMMA] +// [178, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [179, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [180, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [181, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [182, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [183, type_ → • LPAREN RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [184, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [185, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [194, parameter → • type_, RPAREN / COMMA] +// [195, parameter → • POST_LABEL COLON type_, RPAREN / COMMA] +// [196, parameter → • label QUESTION COLON type_, RPAREN / COMMA] +// [214, qualified_uident_ → • UIDENT, RPAREN / COMMA / QUESTION / LBRACKET] +// [215, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, RPAREN / COMMA / QUESTION / LBRACKET] +// [217, lident → • LIDENT, QUESTION] +// [218, lident → • EXTEND, QUESTION] +// [219, label → • lident, QUESTION] +// [224, separated_list(COMMA,parameter) → •, RPAREN] +// [225, separated_list(COMMA,parameter) → • separated_nonempty_list(COMMA,parameter), RPAREN] +// [263, separated_nonempty_list(COMMA,parameter) → • parameter, RPAREN] +// [264, separated_nonempty_list(COMMA,parameter) → • parameter COMMA separated_nonempty_list(COMMA,parameter), RPAREN] +fn yy_state_525(_lookahead : YYSymbol) -> YYDecision { match _lookahead { + T_EXTEND => Shift(yy_state_38) + T_LIDENT => Shift(yy_state_39) NT_parameter => Shift(yy_state_58) - T_LIDENT => Shift(yy_state_61) + NT_lident => Shift(yy_state_61) T_PACKAGE_NAME => Shift(yy_state_62) T_UIDENT => Shift(yy_state_64) NT_label => Shift(yy_state_65) @@ -10357,52 +11189,52 @@ fn yy_state_488(_lookahead : YYSymbol) -> YYDecision { T_POST_LABEL => Shift(yy_state_122) NT_type_ => Shift(yy_state_125) NT_separated_nonempty_list_COMMA_parameter_ => Shift(yy_state_126) - NT_separated_list_COMMA_parameter_ => Shift(yy_state_489) - T_RPAREN => Reduce(0, NT_separated_list_COMMA_parameter_, yy_action_256) + NT_separated_list_COMMA_parameter_ => Shift(yy_state_526) + T_RPAREN => Reduce(0, NT_separated_list_COMMA_parameter_, yy_action_260) _ => Error } } // [47, func_sig → nonempty_list(attribute) PUB pub_attr FN loption(type_params_with_constraints) func_name LPAREN separated_list(COMMA,parameter) • RPAREN THIN_ARROW return_type, EOF / SEMI] -fn yy_state_489(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_526(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RPAREN => Shift(yy_state_490) + T_RPAREN => Shift(yy_state_527) _ => Error } } // [47, func_sig → nonempty_list(attribute) PUB pub_attr FN loption(type_params_with_constraints) func_name LPAREN separated_list(COMMA,parameter) RPAREN • THIN_ARROW return_type, EOF / SEMI] -fn yy_state_490(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_527(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_THIN_ARROW => Shift(yy_state_491) + T_THIN_ARROW => Shift(yy_state_528) _ => Error } } // [47, func_sig → nonempty_list(attribute) PUB pub_attr FN loption(type_params_with_constraints) func_name LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW • return_type, EOF / SEMI] -// [167, simple_type → • simple_type QUESTION, EOF / RAISE / QUESTION / SEMI / NORAISE] -// [168, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, EOF / RAISE / QUESTION / SEMI / NORAISE] -// [169, simple_type → • LPAREN type_ RPAREN, EOF / RAISE / QUESTION / SEMI / NORAISE] -// [170, simple_type → • qualified_uident_ optional_type_arguments, EOF / RAISE / QUESTION / SEMI / NORAISE] -// [171, simple_type → • AMPER qualified_uident_, EOF / RAISE / QUESTION / SEMI / NORAISE] -// [172, simple_type → • UNDERSCORE, EOF / RAISE / QUESTION / SEMI / NORAISE] -// [173, type_ → • simple_type, EOF / SEMI] -// [174, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] -// [175, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] -// [176, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] -// [177, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] -// [178, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] -// [179, type_ → • LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] -// [180, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] -// [181, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] -// [182, return_type → • type_, EOF / SEMI] -// [183, return_type → • simple_type NORAISE, EOF / SEMI] -// [184, return_type → • simple_type RAISE, EOF / SEMI] -// [185, return_type → • simple_type RAISE error_type, EOF / SEMI] -// [186, return_type → • simple_type RAISE QUESTION, EOF / SEMI] -// [210, qualified_uident_ → • UIDENT, EOF / RAISE / QUESTION / SEMI / LBRACKET / NORAISE] -// [211, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, EOF / RAISE / QUESTION / SEMI / LBRACKET / NORAISE] -fn yy_state_491(_lookahead : YYSymbol) -> YYDecision { +// [171, simple_type → • simple_type QUESTION, EOF / RAISE / QUESTION / SEMI / NORAISE] +// [172, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, EOF / RAISE / QUESTION / SEMI / NORAISE] +// [173, simple_type → • LPAREN type_ RPAREN, EOF / RAISE / QUESTION / SEMI / NORAISE] +// [174, simple_type → • qualified_uident_ optional_type_arguments, EOF / RAISE / QUESTION / SEMI / NORAISE] +// [175, simple_type → • AMPER qualified_uident_, EOF / RAISE / QUESTION / SEMI / NORAISE] +// [176, simple_type → • UNDERSCORE, EOF / RAISE / QUESTION / SEMI / NORAISE] +// [177, type_ → • simple_type, EOF / SEMI] +// [178, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] +// [179, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] +// [180, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] +// [181, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] +// [182, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] +// [183, type_ → • LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] +// [184, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] +// [185, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] +// [186, return_type → • type_, EOF / SEMI] +// [187, return_type → • simple_type NORAISE, EOF / SEMI] +// [188, return_type → • simple_type RAISE, EOF / SEMI] +// [189, return_type → • simple_type RAISE error_type, EOF / SEMI] +// [190, return_type → • simple_type RAISE QUESTION, EOF / SEMI] +// [214, qualified_uident_ → • UIDENT, EOF / RAISE / QUESTION / SEMI / LBRACKET / NORAISE] +// [215, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, EOF / RAISE / QUESTION / SEMI / LBRACKET / NORAISE] +fn yy_state_528(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_PACKAGE_NAME => Shift(yy_state_62) T_UIDENT => Shift(yy_state_64) @@ -10413,99 +11245,105 @@ fn yy_state_491(_lookahead : YYSymbol) -> YYDecision { NT_qualified_uident_ => Shift(yy_state_78) T_LPAREN => Shift(yy_state_83) NT_simple_type => Shift(yy_state_87) - NT_return_type => Shift(yy_state_492) + NT_return_type => Shift(yy_state_529) _ => Error } } // [47, func_sig → nonempty_list(attribute) PUB pub_attr FN loption(type_params_with_constraints) func_name LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type •, EOF / SEMI] -fn yy_state_492(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_529(_lookahead : YYSymbol) -> YYDecision { ReduceNoLookahead(11, NT_func_sig, yy_action_95) } // [46, func_sig → nonempty_list(attribute) PUB pub_attr ASYNC • FN loption(type_params_with_constraints) func_name LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type, EOF / SEMI] -fn yy_state_493(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_530(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_FN => Shift(yy_state_494) + T_FN => Shift(yy_state_531) _ => Error } } // [46, func_sig → nonempty_list(attribute) PUB pub_attr ASYNC FN • loption(type_params_with_constraints) func_name LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type, EOF / SEMI] -// [157, type_params_with_constraints → • LBRACKET separated_list(COMMA,type_param_with_constraints) RBRACKET, LIDENT / UIDENT / AMPER] -// [217, loption(type_params_with_constraints) → •, LIDENT / UIDENT / AMPER] -// [218, loption(type_params_with_constraints) → • type_params_with_constraints, LIDENT / UIDENT / AMPER] -fn yy_state_494(_lookahead : YYSymbol) -> YYDecision { +// [161, type_params_with_constraints → • LBRACKET separated_list(COMMA,type_param_with_constraints) RBRACKET, LIDENT / UIDENT / AMPER / EXTEND] +// [222, loption(type_params_with_constraints) → •, LIDENT / UIDENT / AMPER / EXTEND] +// [223, loption(type_params_with_constraints) → • type_params_with_constraints, LIDENT / UIDENT / AMPER / EXTEND] +fn yy_state_531(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACKET => Shift(yy_state_162) - NT_type_params_with_constraints => Shift(yy_state_291) - NT_loption_type_params_with_constraints_ => Shift(yy_state_495) - T_LIDENT | T_UIDENT | T_AMPER => Reduce(0, NT_loption_type_params_with_constraints_, yy_action_142) + NT_type_params_with_constraints => Shift(yy_state_143) + T_LBRACKET => Shift(yy_state_144) + NT_loption_type_params_with_constraints_ => Shift(yy_state_532) + T_LIDENT | T_UIDENT | T_AMPER | T_EXTEND => Reduce(0, NT_loption_type_params_with_constraints_, yy_action_217) _ => Error } } -// [28, method_self_type_coloncolon → • UIDENT COLONCOLON, LIDENT / UIDENT] -// [29, method_self_type_coloncolon → • AMPER UIDENT COLONCOLON, LIDENT / UIDENT] +// [28, method_self_type_coloncolon → • UIDENT COLONCOLON, LIDENT / UIDENT / EXTEND] +// [29, method_self_type_coloncolon → • AMPER UIDENT COLONCOLON, LIDENT / UIDENT / EXTEND] // [30, luident → • lident, LPAREN] // [31, luident → • uident, LPAREN] // [32, func_name → • luident, LPAREN] // [33, func_name → • method_self_type_coloncolon luident, LPAREN] // [46, func_sig → nonempty_list(attribute) PUB pub_attr ASYNC FN loption(type_params_with_constraints) • func_name LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type, EOF / SEMI] -// [212, uident → • UIDENT, LPAREN] -// [213, lident → • LIDENT, LPAREN] -fn yy_state_495(_lookahead : YYSymbol) -> YYDecision { +// [216, uident → • UIDENT, LPAREN] +// [217, lident → • LIDENT, LPAREN] +// [218, lident → • EXTEND, LPAREN] +fn yy_state_532(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LIDENT => Shift(yy_state_38) - NT_method_self_type_coloncolon => Shift(yy_state_299) - NT_uident => Shift(yy_state_301) - NT_lident => Shift(yy_state_302) - NT_luident => Shift(yy_state_303) - T_AMPER => Shift(yy_state_304) - T_UIDENT => Shift(yy_state_307) - NT_func_name => Shift(yy_state_496) + T_EXTEND => Shift(yy_state_38) + T_LIDENT => Shift(yy_state_39) + NT_method_self_type_coloncolon => Shift(yy_state_336) + NT_uident => Shift(yy_state_338) + NT_lident => Shift(yy_state_339) + NT_luident => Shift(yy_state_340) + T_AMPER => Shift(yy_state_341) + T_UIDENT => Shift(yy_state_344) + NT_func_name => Shift(yy_state_533) _ => Error } } // [46, func_sig → nonempty_list(attribute) PUB pub_attr ASYNC FN loption(type_params_with_constraints) func_name • LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type, EOF / SEMI] -fn yy_state_496(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_533(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LPAREN => Shift(yy_state_497) + T_LPAREN => Shift(yy_state_534) _ => Error } } // [46, func_sig → nonempty_list(attribute) PUB pub_attr ASYNC FN loption(type_params_with_constraints) func_name LPAREN • separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type, EOF / SEMI] -// [167, simple_type → • simple_type QUESTION, RPAREN / COMMA / QUESTION] -// [168, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, RPAREN / COMMA / QUESTION] -// [169, simple_type → • LPAREN type_ RPAREN, RPAREN / COMMA / QUESTION] -// [170, simple_type → • qualified_uident_ optional_type_arguments, RPAREN / COMMA / QUESTION] -// [171, simple_type → • AMPER qualified_uident_, RPAREN / COMMA / QUESTION] -// [172, simple_type → • UNDERSCORE, RPAREN / COMMA / QUESTION] -// [173, type_ → • simple_type, RPAREN / COMMA] -// [174, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [175, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [176, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [177, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [178, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [179, type_ → • LPAREN RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [180, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [181, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [190, parameter → • type_, RPAREN / COMMA] -// [191, parameter → • POST_LABEL COLON type_, RPAREN / COMMA] -// [192, parameter → • label QUESTION COLON type_, RPAREN / COMMA] -// [210, qualified_uident_ → • UIDENT, RPAREN / COMMA / QUESTION / LBRACKET] -// [211, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, RPAREN / COMMA / QUESTION / LBRACKET] -// [214, label → • LIDENT, QUESTION] -// [219, separated_list(COMMA,parameter) → •, RPAREN] -// [220, separated_list(COMMA,parameter) → • separated_nonempty_list(COMMA,parameter), RPAREN] -// [258, separated_nonempty_list(COMMA,parameter) → • parameter, RPAREN] -// [259, separated_nonempty_list(COMMA,parameter) → • parameter COMMA separated_nonempty_list(COMMA,parameter), RPAREN] -fn yy_state_497(_lookahead : YYSymbol) -> YYDecision { +// [171, simple_type → • simple_type QUESTION, RPAREN / COMMA / QUESTION] +// [172, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, RPAREN / COMMA / QUESTION] +// [173, simple_type → • LPAREN type_ RPAREN, RPAREN / COMMA / QUESTION] +// [174, simple_type → • qualified_uident_ optional_type_arguments, RPAREN / COMMA / QUESTION] +// [175, simple_type → • AMPER qualified_uident_, RPAREN / COMMA / QUESTION] +// [176, simple_type → • UNDERSCORE, RPAREN / COMMA / QUESTION] +// [177, type_ → • simple_type, RPAREN / COMMA] +// [178, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [179, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [180, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [181, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [182, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [183, type_ → • LPAREN RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [184, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [185, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [194, parameter → • type_, RPAREN / COMMA] +// [195, parameter → • POST_LABEL COLON type_, RPAREN / COMMA] +// [196, parameter → • label QUESTION COLON type_, RPAREN / COMMA] +// [214, qualified_uident_ → • UIDENT, RPAREN / COMMA / QUESTION / LBRACKET] +// [215, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, RPAREN / COMMA / QUESTION / LBRACKET] +// [217, lident → • LIDENT, QUESTION] +// [218, lident → • EXTEND, QUESTION] +// [219, label → • lident, QUESTION] +// [224, separated_list(COMMA,parameter) → •, RPAREN] +// [225, separated_list(COMMA,parameter) → • separated_nonempty_list(COMMA,parameter), RPAREN] +// [263, separated_nonempty_list(COMMA,parameter) → • parameter, RPAREN] +// [264, separated_nonempty_list(COMMA,parameter) → • parameter COMMA separated_nonempty_list(COMMA,parameter), RPAREN] +fn yy_state_534(_lookahead : YYSymbol) -> YYDecision { match _lookahead { + T_EXTEND => Shift(yy_state_38) + T_LIDENT => Shift(yy_state_39) NT_parameter => Shift(yy_state_58) - T_LIDENT => Shift(yy_state_61) + NT_lident => Shift(yy_state_61) T_PACKAGE_NAME => Shift(yy_state_62) T_UIDENT => Shift(yy_state_64) NT_label => Shift(yy_state_65) @@ -10518,52 +11356,52 @@ fn yy_state_497(_lookahead : YYSymbol) -> YYDecision { T_POST_LABEL => Shift(yy_state_122) NT_type_ => Shift(yy_state_125) NT_separated_nonempty_list_COMMA_parameter_ => Shift(yy_state_126) - NT_separated_list_COMMA_parameter_ => Shift(yy_state_498) - T_RPAREN => Reduce(0, NT_separated_list_COMMA_parameter_, yy_action_256) + NT_separated_list_COMMA_parameter_ => Shift(yy_state_535) + T_RPAREN => Reduce(0, NT_separated_list_COMMA_parameter_, yy_action_260) _ => Error } } // [46, func_sig → nonempty_list(attribute) PUB pub_attr ASYNC FN loption(type_params_with_constraints) func_name LPAREN separated_list(COMMA,parameter) • RPAREN THIN_ARROW return_type, EOF / SEMI] -fn yy_state_498(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_535(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RPAREN => Shift(yy_state_499) + T_RPAREN => Shift(yy_state_536) _ => Error } } // [46, func_sig → nonempty_list(attribute) PUB pub_attr ASYNC FN loption(type_params_with_constraints) func_name LPAREN separated_list(COMMA,parameter) RPAREN • THIN_ARROW return_type, EOF / SEMI] -fn yy_state_499(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_536(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_THIN_ARROW => Shift(yy_state_500) + T_THIN_ARROW => Shift(yy_state_537) _ => Error } } // [46, func_sig → nonempty_list(attribute) PUB pub_attr ASYNC FN loption(type_params_with_constraints) func_name LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW • return_type, EOF / SEMI] -// [167, simple_type → • simple_type QUESTION, EOF / RAISE / QUESTION / SEMI / NORAISE] -// [168, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, EOF / RAISE / QUESTION / SEMI / NORAISE] -// [169, simple_type → • LPAREN type_ RPAREN, EOF / RAISE / QUESTION / SEMI / NORAISE] -// [170, simple_type → • qualified_uident_ optional_type_arguments, EOF / RAISE / QUESTION / SEMI / NORAISE] -// [171, simple_type → • AMPER qualified_uident_, EOF / RAISE / QUESTION / SEMI / NORAISE] -// [172, simple_type → • UNDERSCORE, EOF / RAISE / QUESTION / SEMI / NORAISE] -// [173, type_ → • simple_type, EOF / SEMI] -// [174, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] -// [175, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] -// [176, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] -// [177, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] -// [178, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] -// [179, type_ → • LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] -// [180, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] -// [181, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] -// [182, return_type → • type_, EOF / SEMI] -// [183, return_type → • simple_type NORAISE, EOF / SEMI] -// [184, return_type → • simple_type RAISE, EOF / SEMI] -// [185, return_type → • simple_type RAISE error_type, EOF / SEMI] -// [186, return_type → • simple_type RAISE QUESTION, EOF / SEMI] -// [210, qualified_uident_ → • UIDENT, EOF / RAISE / QUESTION / SEMI / LBRACKET / NORAISE] -// [211, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, EOF / RAISE / QUESTION / SEMI / LBRACKET / NORAISE] -fn yy_state_500(_lookahead : YYSymbol) -> YYDecision { +// [171, simple_type → • simple_type QUESTION, EOF / RAISE / QUESTION / SEMI / NORAISE] +// [172, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, EOF / RAISE / QUESTION / SEMI / NORAISE] +// [173, simple_type → • LPAREN type_ RPAREN, EOF / RAISE / QUESTION / SEMI / NORAISE] +// [174, simple_type → • qualified_uident_ optional_type_arguments, EOF / RAISE / QUESTION / SEMI / NORAISE] +// [175, simple_type → • AMPER qualified_uident_, EOF / RAISE / QUESTION / SEMI / NORAISE] +// [176, simple_type → • UNDERSCORE, EOF / RAISE / QUESTION / SEMI / NORAISE] +// [177, type_ → • simple_type, EOF / SEMI] +// [178, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] +// [179, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] +// [180, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] +// [181, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] +// [182, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] +// [183, type_ → • LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] +// [184, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] +// [185, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] +// [186, return_type → • type_, EOF / SEMI] +// [187, return_type → • simple_type NORAISE, EOF / SEMI] +// [188, return_type → • simple_type RAISE, EOF / SEMI] +// [189, return_type → • simple_type RAISE error_type, EOF / SEMI] +// [190, return_type → • simple_type RAISE QUESTION, EOF / SEMI] +// [214, qualified_uident_ → • UIDENT, EOF / RAISE / QUESTION / SEMI / LBRACKET / NORAISE] +// [215, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, EOF / RAISE / QUESTION / SEMI / LBRACKET / NORAISE] +fn yy_state_537(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_PACKAGE_NAME => Shift(yy_state_62) T_UIDENT => Shift(yy_state_64) @@ -10574,53 +11412,55 @@ fn yy_state_500(_lookahead : YYSymbol) -> YYDecision { NT_qualified_uident_ => Shift(yy_state_78) T_LPAREN => Shift(yy_state_83) NT_simple_type => Shift(yy_state_87) - NT_return_type => Shift(yy_state_501) + NT_return_type => Shift(yy_state_538) _ => Error } } // [46, func_sig → nonempty_list(attribute) PUB pub_attr ASYNC FN loption(type_params_with_constraints) func_name LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type •, EOF / SEMI] -fn yy_state_501(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_538(_lookahead : YYSymbol) -> YYDecision { ReduceNoLookahead(12, NT_func_sig, yy_action_94) } // [27, value_sig → nonempty_list(attribute) PUB pub_attr LET • lident COLON type_, EOF / SEMI] -// [213, lident → • LIDENT, COLON] -fn yy_state_502(_lookahead : YYSymbol) -> YYDecision { +// [217, lident → • LIDENT, COLON] +// [218, lident → • EXTEND, COLON] +fn yy_state_539(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LIDENT => Shift(yy_state_38) - NT_lident => Shift(yy_state_503) + T_EXTEND => Shift(yy_state_38) + T_LIDENT => Shift(yy_state_39) + NT_lident => Shift(yy_state_540) _ => Error } } // [27, value_sig → nonempty_list(attribute) PUB pub_attr LET lident • COLON type_, EOF / SEMI] -fn yy_state_503(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_540(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_COLON => Shift(yy_state_504) + T_COLON => Shift(yy_state_541) _ => Error } } // [27, value_sig → nonempty_list(attribute) PUB pub_attr LET lident COLON • type_, EOF / SEMI] -// [167, simple_type → • simple_type QUESTION, EOF / QUESTION / SEMI] -// [168, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, EOF / QUESTION / SEMI] -// [169, simple_type → • LPAREN type_ RPAREN, EOF / QUESTION / SEMI] -// [170, simple_type → • qualified_uident_ optional_type_arguments, EOF / QUESTION / SEMI] -// [171, simple_type → • AMPER qualified_uident_, EOF / QUESTION / SEMI] -// [172, simple_type → • UNDERSCORE, EOF / QUESTION / SEMI] -// [173, type_ → • simple_type, EOF / SEMI] -// [174, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] -// [175, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] -// [176, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] -// [177, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] -// [178, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] -// [179, type_ → • LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] -// [180, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] -// [181, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] -// [210, qualified_uident_ → • UIDENT, EOF / QUESTION / SEMI / LBRACKET] -// [211, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, EOF / QUESTION / SEMI / LBRACKET] -fn yy_state_504(_lookahead : YYSymbol) -> YYDecision { +// [171, simple_type → • simple_type QUESTION, EOF / QUESTION / SEMI] +// [172, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, EOF / QUESTION / SEMI] +// [173, simple_type → • LPAREN type_ RPAREN, EOF / QUESTION / SEMI] +// [174, simple_type → • qualified_uident_ optional_type_arguments, EOF / QUESTION / SEMI] +// [175, simple_type → • AMPER qualified_uident_, EOF / QUESTION / SEMI] +// [176, simple_type → • UNDERSCORE, EOF / QUESTION / SEMI] +// [177, type_ → • simple_type, EOF / SEMI] +// [178, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] +// [179, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] +// [180, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] +// [181, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] +// [182, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] +// [183, type_ → • LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] +// [184, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] +// [185, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] +// [214, qualified_uident_ → • UIDENT, EOF / QUESTION / SEMI / LBRACKET] +// [215, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, EOF / QUESTION / SEMI / LBRACKET] +fn yy_state_541(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_PACKAGE_NAME => Shift(yy_state_62) T_UIDENT => Shift(yy_state_64) @@ -10630,53 +11470,53 @@ fn yy_state_504(_lookahead : YYSymbol) -> YYDecision { NT_qualified_uident_ => Shift(yy_state_78) T_LPAREN => Shift(yy_state_83) NT_simple_type => Shift(yy_state_106) - NT_type_ => Shift(yy_state_505) + NT_type_ => Shift(yy_state_542) _ => Error } } // [27, value_sig → nonempty_list(attribute) PUB pub_attr LET lident COLON type_ •, EOF / SEMI] -fn yy_state_505(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_542(_lookahead : YYSymbol) -> YYDecision { ReduceNoLookahead(7, NT_value_sig, yy_action_93) } // [21, const_sig → nonempty_list(attribute) PUB pub_attr CONST • uident COLON type_ EQUAL constant, EOF / SEMI] -// [212, uident → • UIDENT, COLON] -fn yy_state_506(_lookahead : YYSymbol) -> YYDecision { +// [216, uident → • UIDENT, COLON] +fn yy_state_543(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_UIDENT => Shift(yy_state_25) - NT_uident => Shift(yy_state_507) + NT_uident => Shift(yy_state_544) _ => Error } } // [21, const_sig → nonempty_list(attribute) PUB pub_attr CONST uident • COLON type_ EQUAL constant, EOF / SEMI] -fn yy_state_507(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_544(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_COLON => Shift(yy_state_508) + T_COLON => Shift(yy_state_545) _ => Error } } // [21, const_sig → nonempty_list(attribute) PUB pub_attr CONST uident COLON • type_ EQUAL constant, EOF / SEMI] -// [167, simple_type → • simple_type QUESTION, EQUAL / QUESTION] -// [168, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, EQUAL / QUESTION] -// [169, simple_type → • LPAREN type_ RPAREN, EQUAL / QUESTION] -// [170, simple_type → • qualified_uident_ optional_type_arguments, EQUAL / QUESTION] -// [171, simple_type → • AMPER qualified_uident_, EQUAL / QUESTION] -// [172, simple_type → • UNDERSCORE, EQUAL / QUESTION] -// [173, type_ → • simple_type, EQUAL] -// [174, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EQUAL] -// [175, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EQUAL] -// [176, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EQUAL] -// [177, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EQUAL] -// [178, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, EQUAL] -// [179, type_ → • LPAREN RPAREN THIN_ARROW return_type, EQUAL] -// [180, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, EQUAL] -// [181, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, EQUAL] -// [210, qualified_uident_ → • UIDENT, EQUAL / QUESTION / LBRACKET] -// [211, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, EQUAL / QUESTION / LBRACKET] -fn yy_state_508(_lookahead : YYSymbol) -> YYDecision { +// [171, simple_type → • simple_type QUESTION, EQUAL / QUESTION] +// [172, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, EQUAL / QUESTION] +// [173, simple_type → • LPAREN type_ RPAREN, EQUAL / QUESTION] +// [174, simple_type → • qualified_uident_ optional_type_arguments, EQUAL / QUESTION] +// [175, simple_type → • AMPER qualified_uident_, EQUAL / QUESTION] +// [176, simple_type → • UNDERSCORE, EQUAL / QUESTION] +// [177, type_ → • simple_type, EQUAL] +// [178, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EQUAL] +// [179, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EQUAL] +// [180, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EQUAL] +// [181, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EQUAL] +// [182, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, EQUAL] +// [183, type_ → • LPAREN RPAREN THIN_ARROW return_type, EQUAL] +// [184, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, EQUAL] +// [185, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, EQUAL] +// [214, qualified_uident_ → • UIDENT, EQUAL / QUESTION / LBRACKET] +// [215, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, EQUAL / QUESTION / LBRACKET] +fn yy_state_545(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_PACKAGE_NAME => Shift(yy_state_62) T_UIDENT => Shift(yy_state_64) @@ -10686,123 +11526,123 @@ fn yy_state_508(_lookahead : YYSymbol) -> YYDecision { NT_qualified_uident_ => Shift(yy_state_78) T_LPAREN => Shift(yy_state_83) NT_simple_type => Shift(yy_state_106) - NT_type_ => Shift(yy_state_509) + NT_type_ => Shift(yy_state_546) _ => Error } } // [21, const_sig → nonempty_list(attribute) PUB pub_attr CONST uident COLON type_ • EQUAL constant, EOF / SEMI] -fn yy_state_509(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_546(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_EQUAL => Shift(yy_state_510) + T_EQUAL => Shift(yy_state_547) _ => Error } } // [21, const_sig → nonempty_list(attribute) PUB pub_attr CONST uident COLON type_ EQUAL • constant, EOF / SEMI] -// [193, constant → • TRUE, EOF / SEMI] -// [194, constant → • FALSE, EOF / SEMI] -// [195, constant → • BYTE, EOF / SEMI] -// [196, constant → • BYTES, EOF / SEMI] -// [197, constant → • CHAR, EOF / SEMI] -// [198, constant → • INT, EOF / SEMI] -// [199, constant → • MINUS INT, EOF / SEMI] -// [200, constant → • FLOAT, EOF / SEMI] -// [201, constant → • MINUS FLOAT, EOF / SEMI] -// [202, constant → • DOUBLE, EOF / SEMI] -// [203, constant → • MINUS DOUBLE, EOF / SEMI] -// [204, constant → • STRING, EOF / SEMI] -fn yy_state_510(_lookahead : YYSymbol) -> YYDecision { +// [197, constant → • TRUE, EOF / SEMI] +// [198, constant → • FALSE, EOF / SEMI] +// [199, constant → • BYTE, EOF / SEMI] +// [200, constant → • BYTES, EOF / SEMI] +// [201, constant → • CHAR, EOF / SEMI] +// [202, constant → • INT, EOF / SEMI] +// [203, constant → • MINUS INT, EOF / SEMI] +// [204, constant → • FLOAT, EOF / SEMI] +// [205, constant → • MINUS FLOAT, EOF / SEMI] +// [206, constant → • DOUBLE, EOF / SEMI] +// [207, constant → • MINUS DOUBLE, EOF / SEMI] +// [208, constant → • STRING, EOF / SEMI] +fn yy_state_547(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_STRING => Shift(yy_state_511) - T_DOUBLE => Shift(yy_state_512) - T_FLOAT => Shift(yy_state_513) - T_MINUS => Shift(yy_state_514) - T_INT => Shift(yy_state_518) - T_CHAR => Shift(yy_state_519) - T_BYTES => Shift(yy_state_520) - T_BYTE => Shift(yy_state_521) - T_FALSE => Shift(yy_state_522) - T_TRUE => Shift(yy_state_523) - NT_constant => Shift(yy_state_524) + T_STRING => Shift(yy_state_548) + T_DOUBLE => Shift(yy_state_549) + T_FLOAT => Shift(yy_state_550) + T_MINUS => Shift(yy_state_551) + T_INT => Shift(yy_state_555) + T_CHAR => Shift(yy_state_556) + T_BYTES => Shift(yy_state_557) + T_BYTE => Shift(yy_state_558) + T_FALSE => Shift(yy_state_559) + T_TRUE => Shift(yy_state_560) + NT_constant => Shift(yy_state_561) _ => Error } } -// [204, constant → STRING •, EOF / SEMI] -fn yy_state_511(_lookahead : YYSymbol) -> YYDecision { +// [208, constant → STRING •, EOF / SEMI] +fn yy_state_548(_lookahead : YYSymbol) -> YYDecision { ReduceNoLookahead(1, NT_constant, yy_action_92) } -// [202, constant → DOUBLE •, EOF / SEMI] -fn yy_state_512(_lookahead : YYSymbol) -> YYDecision { +// [206, constant → DOUBLE •, EOF / SEMI] +fn yy_state_549(_lookahead : YYSymbol) -> YYDecision { ReduceNoLookahead(1, NT_constant, yy_action_91) } -// [200, constant → FLOAT •, EOF / SEMI] -fn yy_state_513(_lookahead : YYSymbol) -> YYDecision { +// [204, constant → FLOAT •, EOF / SEMI] +fn yy_state_550(_lookahead : YYSymbol) -> YYDecision { ReduceNoLookahead(1, NT_constant, yy_action_90) } -// [199, constant → MINUS • INT, EOF / SEMI] -// [201, constant → MINUS • FLOAT, EOF / SEMI] -// [203, constant → MINUS • DOUBLE, EOF / SEMI] -fn yy_state_514(_lookahead : YYSymbol) -> YYDecision { +// [203, constant → MINUS • INT, EOF / SEMI] +// [205, constant → MINUS • FLOAT, EOF / SEMI] +// [207, constant → MINUS • DOUBLE, EOF / SEMI] +fn yy_state_551(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_DOUBLE => Shift(yy_state_515) - T_FLOAT => Shift(yy_state_516) - T_INT => Shift(yy_state_517) + T_DOUBLE => Shift(yy_state_552) + T_FLOAT => Shift(yy_state_553) + T_INT => Shift(yy_state_554) _ => Error } } -// [203, constant → MINUS DOUBLE •, EOF / SEMI] -fn yy_state_515(_lookahead : YYSymbol) -> YYDecision { +// [207, constant → MINUS DOUBLE •, EOF / SEMI] +fn yy_state_552(_lookahead : YYSymbol) -> YYDecision { ReduceNoLookahead(2, NT_constant, yy_action_89) } -// [201, constant → MINUS FLOAT •, EOF / SEMI] -fn yy_state_516(_lookahead : YYSymbol) -> YYDecision { +// [205, constant → MINUS FLOAT •, EOF / SEMI] +fn yy_state_553(_lookahead : YYSymbol) -> YYDecision { ReduceNoLookahead(2, NT_constant, yy_action_88) } -// [199, constant → MINUS INT •, EOF / SEMI] -fn yy_state_517(_lookahead : YYSymbol) -> YYDecision { +// [203, constant → MINUS INT •, EOF / SEMI] +fn yy_state_554(_lookahead : YYSymbol) -> YYDecision { ReduceNoLookahead(2, NT_constant, yy_action_87) } -// [198, constant → INT •, EOF / SEMI] -fn yy_state_518(_lookahead : YYSymbol) -> YYDecision { +// [202, constant → INT •, EOF / SEMI] +fn yy_state_555(_lookahead : YYSymbol) -> YYDecision { ReduceNoLookahead(1, NT_constant, yy_action_86) } -// [197, constant → CHAR •, EOF / SEMI] -fn yy_state_519(_lookahead : YYSymbol) -> YYDecision { +// [201, constant → CHAR •, EOF / SEMI] +fn yy_state_556(_lookahead : YYSymbol) -> YYDecision { ReduceNoLookahead(1, NT_constant, yy_action_85) } -// [196, constant → BYTES •, EOF / SEMI] -fn yy_state_520(_lookahead : YYSymbol) -> YYDecision { +// [200, constant → BYTES •, EOF / SEMI] +fn yy_state_557(_lookahead : YYSymbol) -> YYDecision { ReduceNoLookahead(1, NT_constant, yy_action_84) } -// [195, constant → BYTE •, EOF / SEMI] -fn yy_state_521(_lookahead : YYSymbol) -> YYDecision { +// [199, constant → BYTE •, EOF / SEMI] +fn yy_state_558(_lookahead : YYSymbol) -> YYDecision { ReduceNoLookahead(1, NT_constant, yy_action_83) } -// [194, constant → FALSE •, EOF / SEMI] -fn yy_state_522(_lookahead : YYSymbol) -> YYDecision { +// [198, constant → FALSE •, EOF / SEMI] +fn yy_state_559(_lookahead : YYSymbol) -> YYDecision { ReduceNoLookahead(1, NT_constant, yy_action_82) } -// [193, constant → TRUE •, EOF / SEMI] -fn yy_state_523(_lookahead : YYSymbol) -> YYDecision { +// [197, constant → TRUE •, EOF / SEMI] +fn yy_state_560(_lookahead : YYSymbol) -> YYDecision { ReduceNoLookahead(1, NT_constant, yy_action_81) } // [21, const_sig → nonempty_list(attribute) PUB pub_attr CONST uident COLON type_ EQUAL constant •, EOF / SEMI] -fn yy_state_524(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_561(_lookahead : YYSymbol) -> YYDecision { ReduceNoLookahead(9, NT_const_sig, yy_action_80) } @@ -10810,253 +11650,255 @@ fn yy_state_524(_lookahead : YYSymbol) -> YYDecision { // [26, value_sig → nonempty_list(attribute) PRIV • LET lident COLON type_, EOF / SEMI] // [44, func_sig → nonempty_list(attribute) PRIV • ASYNC FN loption(type_params_with_constraints) func_name LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type, EOF / SEMI] // [45, func_sig → nonempty_list(attribute) PRIV • FN loption(type_params_with_constraints) func_name LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type, EOF / SEMI] -// [56, type_sig → nonempty_list(attribute) PRIV • TYPE type_decl_name_with_params optional_derive, EOF / SEMI] -// [62, type_sig → nonempty_list(attribute) PRIV • SUBERROR uident optional_derive, EOF / SEMI] -// [68, type_sig → nonempty_list(attribute) PRIV • SUBERROR uident LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [74, type_sig → nonempty_list(attribute) PRIV • STRUCT type_decl_name_with_params LBRACE record_decl_body RBRACE optional_derive, EOF / SEMI] -// [80, type_sig → nonempty_list(attribute) PRIV • STRUCT type_decl_name_with_params LPAREN separated_list(COMMA,type_) RPAREN optional_derive, EOF / SEMI] -// [86, type_sig → nonempty_list(attribute) PRIV • ENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [92, type_sig → nonempty_list(attribute) PRIV • EXTENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [98, type_sig → nonempty_list(attribute) PRIV • EXTENUM extensible_enum_extension_target PLUS_EQUAL LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [106, impl_sig → nonempty_list(attribute) PRIV • IMPL type_params_with_constraints qualified_uident FOR type_, EOF / SEMI] -// [112, impl_sig → nonempty_list(attribute) PRIV • IMPL qualified_uident FOR type_, EOF / SEMI] -// [118, trait_sig → nonempty_list(attribute) PRIV • TRAIT uident loption(preceded(COLON,separated_nonempty_list(PLUS,qualified_uident))) trait_body, EOF / SEMI] -// [128, alias_sig → nonempty_list(attribute) PRIV • TYPE type_decl_name_with_params EQUAL type_, EOF / SEMI] -// [134, alias_sig → nonempty_list(attribute) PRIV • FNALIAS uident COLONCOLON lident, EOF / SEMI] -// [140, alias_sig → nonempty_list(attribute) PRIV • USING PACKAGE_NAME LBRACE TYPE uident using_binder RBRACE, EOF / SEMI] -// [146, alias_sig → nonempty_list(attribute) PRIV • USING PACKAGE_NAME LBRACE TRAIT uident using_binder RBRACE, EOF / SEMI] -fn yy_state_525(_lookahead : YYSymbol) -> YYDecision { +// [60, type_sig → nonempty_list(attribute) PRIV • TYPE type_decl_name_with_params optional_derive, EOF / SEMI] +// [66, type_sig → nonempty_list(attribute) PRIV • SUBERROR uident optional_derive, EOF / SEMI] +// [72, type_sig → nonempty_list(attribute) PRIV • SUBERROR uident LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [78, type_sig → nonempty_list(attribute) PRIV • STRUCT type_decl_name_with_params LBRACE record_decl_body RBRACE optional_derive, EOF / SEMI] +// [84, type_sig → nonempty_list(attribute) PRIV • STRUCT type_decl_name_with_params LPAREN separated_list(COMMA,type_) RPAREN optional_derive, EOF / SEMI] +// [90, type_sig → nonempty_list(attribute) PRIV • ENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [96, type_sig → nonempty_list(attribute) PRIV • EXTENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [102, type_sig → nonempty_list(attribute) PRIV • EXTENUM extensible_enum_extension_target PLUS_EQUAL LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [110, impl_sig → nonempty_list(attribute) PRIV • IMPL type_params_with_constraints qualified_uident FOR type_, EOF / SEMI] +// [116, impl_sig → nonempty_list(attribute) PRIV • IMPL qualified_uident FOR type_, EOF / SEMI] +// [122, trait_sig → nonempty_list(attribute) PRIV • TRAIT uident loption(preceded(COLON,separated_nonempty_list(PLUS,qualified_uident))) trait_body, EOF / SEMI] +// [132, alias_sig → nonempty_list(attribute) PRIV • TYPE type_decl_name_with_params EQUAL type_, EOF / SEMI] +// [138, alias_sig → nonempty_list(attribute) PRIV • FNALIAS uident COLONCOLON lident, EOF / SEMI] +// [144, alias_sig → nonempty_list(attribute) PRIV • USING PACKAGE_NAME LBRACE TYPE uident using_binder RBRACE, EOF / SEMI] +// [150, alias_sig → nonempty_list(attribute) PRIV • USING PACKAGE_NAME LBRACE TRAIT uident using_binder RBRACE, EOF / SEMI] +fn yy_state_562(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_USING => Shift(yy_state_526) - T_FNALIAS => Shift(yy_state_537) - T_TRAIT => Shift(yy_state_541) - T_IMPL => Shift(yy_state_545) - T_EXTENUM => Shift(yy_state_553) - T_ENUM => Shift(yy_state_565) - T_STRUCT => Shift(yy_state_571) - T_SUBERROR => Shift(yy_state_581) - T_TYPE => Shift(yy_state_588) - T_FN => Shift(yy_state_593) - T_ASYNC => Shift(yy_state_601) - T_LET => Shift(yy_state_610) - T_CONST => Shift(yy_state_614) + T_USING => Shift(yy_state_563) + T_FNALIAS => Shift(yy_state_574) + T_TRAIT => Shift(yy_state_578) + T_IMPL => Shift(yy_state_582) + T_EXTENUM => Shift(yy_state_590) + T_ENUM => Shift(yy_state_602) + T_STRUCT => Shift(yy_state_608) + T_SUBERROR => Shift(yy_state_618) + T_TYPE => Shift(yy_state_625) + T_FN => Shift(yy_state_630) + T_ASYNC => Shift(yy_state_638) + T_LET => Shift(yy_state_647) + T_CONST => Shift(yy_state_651) _ => Error } } -// [140, alias_sig → nonempty_list(attribute) PRIV USING • PACKAGE_NAME LBRACE TYPE uident using_binder RBRACE, EOF / SEMI] -// [146, alias_sig → nonempty_list(attribute) PRIV USING • PACKAGE_NAME LBRACE TRAIT uident using_binder RBRACE, EOF / SEMI] -fn yy_state_526(_lookahead : YYSymbol) -> YYDecision { +// [144, alias_sig → nonempty_list(attribute) PRIV USING • PACKAGE_NAME LBRACE TYPE uident using_binder RBRACE, EOF / SEMI] +// [150, alias_sig → nonempty_list(attribute) PRIV USING • PACKAGE_NAME LBRACE TRAIT uident using_binder RBRACE, EOF / SEMI] +fn yy_state_563(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_PACKAGE_NAME => Shift(yy_state_527) + T_PACKAGE_NAME => Shift(yy_state_564) _ => Error } } -// [140, alias_sig → nonempty_list(attribute) PRIV USING PACKAGE_NAME • LBRACE TYPE uident using_binder RBRACE, EOF / SEMI] -// [146, alias_sig → nonempty_list(attribute) PRIV USING PACKAGE_NAME • LBRACE TRAIT uident using_binder RBRACE, EOF / SEMI] -fn yy_state_527(_lookahead : YYSymbol) -> YYDecision { +// [144, alias_sig → nonempty_list(attribute) PRIV USING PACKAGE_NAME • LBRACE TYPE uident using_binder RBRACE, EOF / SEMI] +// [150, alias_sig → nonempty_list(attribute) PRIV USING PACKAGE_NAME • LBRACE TRAIT uident using_binder RBRACE, EOF / SEMI] +fn yy_state_564(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACE => Shift(yy_state_528) + T_LBRACE => Shift(yy_state_565) _ => Error } } -// [140, alias_sig → nonempty_list(attribute) PRIV USING PACKAGE_NAME LBRACE • TYPE uident using_binder RBRACE, EOF / SEMI] -// [146, alias_sig → nonempty_list(attribute) PRIV USING PACKAGE_NAME LBRACE • TRAIT uident using_binder RBRACE, EOF / SEMI] -fn yy_state_528(_lookahead : YYSymbol) -> YYDecision { +// [144, alias_sig → nonempty_list(attribute) PRIV USING PACKAGE_NAME LBRACE • TYPE uident using_binder RBRACE, EOF / SEMI] +// [150, alias_sig → nonempty_list(attribute) PRIV USING PACKAGE_NAME LBRACE • TRAIT uident using_binder RBRACE, EOF / SEMI] +fn yy_state_565(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_TRAIT => Shift(yy_state_529) - T_TYPE => Shift(yy_state_533) + T_TRAIT => Shift(yy_state_566) + T_TYPE => Shift(yy_state_570) _ => Error } } -// [146, alias_sig → nonempty_list(attribute) PRIV USING PACKAGE_NAME LBRACE TRAIT • uident using_binder RBRACE, EOF / SEMI] -// [212, uident → • UIDENT, RBRACE / AS] -fn yy_state_529(_lookahead : YYSymbol) -> YYDecision { +// [150, alias_sig → nonempty_list(attribute) PRIV USING PACKAGE_NAME LBRACE TRAIT • uident using_binder RBRACE, EOF / SEMI] +// [216, uident → • UIDENT, RBRACE / AS] +fn yy_state_566(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_UIDENT => Shift(yy_state_25) - NT_uident => Shift(yy_state_530) + NT_uident => Shift(yy_state_567) _ => Error } } -// [122, using_binder → •, RBRACE] -// [123, using_binder → • AS uident, RBRACE] -// [146, alias_sig → nonempty_list(attribute) PRIV USING PACKAGE_NAME LBRACE TRAIT uident • using_binder RBRACE, EOF / SEMI] -fn yy_state_530(_lookahead : YYSymbol) -> YYDecision { +// [126, using_binder → •, RBRACE] +// [127, using_binder → • AS uident, RBRACE] +// [150, alias_sig → nonempty_list(attribute) PRIV USING PACKAGE_NAME LBRACE TRAIT uident • using_binder RBRACE, EOF / SEMI] +fn yy_state_567(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_AS => Shift(yy_state_29) - NT_using_binder => Shift(yy_state_531) - T_RBRACE => Reduce(0, NT_using_binder, yy_action_273) + NT_using_binder => Shift(yy_state_568) + T_RBRACE => Reduce(0, NT_using_binder, yy_action_278) _ => Error } } -// [146, alias_sig → nonempty_list(attribute) PRIV USING PACKAGE_NAME LBRACE TRAIT uident using_binder • RBRACE, EOF / SEMI] -fn yy_state_531(_lookahead : YYSymbol) -> YYDecision { +// [150, alias_sig → nonempty_list(attribute) PRIV USING PACKAGE_NAME LBRACE TRAIT uident using_binder • RBRACE, EOF / SEMI] +fn yy_state_568(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RBRACE => Shift(yy_state_532) + T_RBRACE => Shift(yy_state_569) _ => Error } } -// [146, alias_sig → nonempty_list(attribute) PRIV USING PACKAGE_NAME LBRACE TRAIT uident using_binder RBRACE •, EOF / SEMI] -fn yy_state_532(_lookahead : YYSymbol) -> YYDecision { +// [150, alias_sig → nonempty_list(attribute) PRIV USING PACKAGE_NAME LBRACE TRAIT uident using_binder RBRACE •, EOF / SEMI] +fn yy_state_569(_lookahead : YYSymbol) -> YYDecision { ReduceNoLookahead(9, NT_alias_sig, yy_action_79) } -// [140, alias_sig → nonempty_list(attribute) PRIV USING PACKAGE_NAME LBRACE TYPE • uident using_binder RBRACE, EOF / SEMI] -// [212, uident → • UIDENT, RBRACE / AS] -fn yy_state_533(_lookahead : YYSymbol) -> YYDecision { +// [144, alias_sig → nonempty_list(attribute) PRIV USING PACKAGE_NAME LBRACE TYPE • uident using_binder RBRACE, EOF / SEMI] +// [216, uident → • UIDENT, RBRACE / AS] +fn yy_state_570(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_UIDENT => Shift(yy_state_25) - NT_uident => Shift(yy_state_534) + NT_uident => Shift(yy_state_571) _ => Error } } -// [122, using_binder → •, RBRACE] -// [123, using_binder → • AS uident, RBRACE] -// [140, alias_sig → nonempty_list(attribute) PRIV USING PACKAGE_NAME LBRACE TYPE uident • using_binder RBRACE, EOF / SEMI] -fn yy_state_534(_lookahead : YYSymbol) -> YYDecision { +// [126, using_binder → •, RBRACE] +// [127, using_binder → • AS uident, RBRACE] +// [144, alias_sig → nonempty_list(attribute) PRIV USING PACKAGE_NAME LBRACE TYPE uident • using_binder RBRACE, EOF / SEMI] +fn yy_state_571(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_AS => Shift(yy_state_29) - NT_using_binder => Shift(yy_state_535) - T_RBRACE => Reduce(0, NT_using_binder, yy_action_273) + NT_using_binder => Shift(yy_state_572) + T_RBRACE => Reduce(0, NT_using_binder, yy_action_278) _ => Error } } -// [140, alias_sig → nonempty_list(attribute) PRIV USING PACKAGE_NAME LBRACE TYPE uident using_binder • RBRACE, EOF / SEMI] -fn yy_state_535(_lookahead : YYSymbol) -> YYDecision { +// [144, alias_sig → nonempty_list(attribute) PRIV USING PACKAGE_NAME LBRACE TYPE uident using_binder • RBRACE, EOF / SEMI] +fn yy_state_572(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RBRACE => Shift(yy_state_536) + T_RBRACE => Shift(yy_state_573) _ => Error } } -// [140, alias_sig → nonempty_list(attribute) PRIV USING PACKAGE_NAME LBRACE TYPE uident using_binder RBRACE •, EOF / SEMI] -fn yy_state_536(_lookahead : YYSymbol) -> YYDecision { +// [144, alias_sig → nonempty_list(attribute) PRIV USING PACKAGE_NAME LBRACE TYPE uident using_binder RBRACE •, EOF / SEMI] +fn yy_state_573(_lookahead : YYSymbol) -> YYDecision { ReduceNoLookahead(9, NT_alias_sig, yy_action_78) } -// [134, alias_sig → nonempty_list(attribute) PRIV FNALIAS • uident COLONCOLON lident, EOF / SEMI] -// [212, uident → • UIDENT, COLONCOLON] -fn yy_state_537(_lookahead : YYSymbol) -> YYDecision { +// [138, alias_sig → nonempty_list(attribute) PRIV FNALIAS • uident COLONCOLON lident, EOF / SEMI] +// [216, uident → • UIDENT, COLONCOLON] +fn yy_state_574(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_UIDENT => Shift(yy_state_25) - NT_uident => Shift(yy_state_538) + NT_uident => Shift(yy_state_575) _ => Error } } -// [134, alias_sig → nonempty_list(attribute) PRIV FNALIAS uident • COLONCOLON lident, EOF / SEMI] -fn yy_state_538(_lookahead : YYSymbol) -> YYDecision { +// [138, alias_sig → nonempty_list(attribute) PRIV FNALIAS uident • COLONCOLON lident, EOF / SEMI] +fn yy_state_575(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_COLONCOLON => Shift(yy_state_539) + T_COLONCOLON => Shift(yy_state_576) _ => Error } } -// [134, alias_sig → nonempty_list(attribute) PRIV FNALIAS uident COLONCOLON • lident, EOF / SEMI] -// [213, lident → • LIDENT, EOF / SEMI] -fn yy_state_539(_lookahead : YYSymbol) -> YYDecision { +// [138, alias_sig → nonempty_list(attribute) PRIV FNALIAS uident COLONCOLON • lident, EOF / SEMI] +// [217, lident → • LIDENT, EOF / SEMI] +// [218, lident → • EXTEND, EOF / SEMI] +fn yy_state_576(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LIDENT => Shift(yy_state_38) - NT_lident => Shift(yy_state_540) + T_EXTEND => Shift(yy_state_38) + T_LIDENT => Shift(yy_state_39) + NT_lident => Shift(yy_state_577) _ => Error } } -// [134, alias_sig → nonempty_list(attribute) PRIV FNALIAS uident COLONCOLON lident •, EOF / SEMI] -fn yy_state_540(_lookahead : YYSymbol) -> YYDecision { +// [138, alias_sig → nonempty_list(attribute) PRIV FNALIAS uident COLONCOLON lident •, EOF / SEMI] +fn yy_state_577(_lookahead : YYSymbol) -> YYDecision { ReduceNoLookahead(6, NT_alias_sig, yy_action_77) } -// [118, trait_sig → nonempty_list(attribute) PRIV TRAIT • uident loption(preceded(COLON,separated_nonempty_list(PLUS,qualified_uident))) trait_body, EOF / SEMI] -// [212, uident → • UIDENT, EOF / COLON / SEMI / LBRACE] -fn yy_state_541(_lookahead : YYSymbol) -> YYDecision { +// [122, trait_sig → nonempty_list(attribute) PRIV TRAIT • uident loption(preceded(COLON,separated_nonempty_list(PLUS,qualified_uident))) trait_body, EOF / SEMI] +// [216, uident → • UIDENT, EOF / COLON / SEMI / LBRACE] +fn yy_state_578(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_UIDENT => Shift(yy_state_25) - NT_uident => Shift(yy_state_542) + NT_uident => Shift(yy_state_579) _ => Error } } -// [118, trait_sig → nonempty_list(attribute) PRIV TRAIT uident • loption(preceded(COLON,separated_nonempty_list(PLUS,qualified_uident))) trait_body, EOF / SEMI] -// [230, loption(preceded(COLON,separated_nonempty_list(PLUS,qualified_uident))) → •, EOF / SEMI / LBRACE] -// [231, loption(preceded(COLON,separated_nonempty_list(PLUS,qualified_uident))) → • COLON separated_nonempty_list(PLUS,qualified_uident), EOF / SEMI / LBRACE] -fn yy_state_542(_lookahead : YYSymbol) -> YYDecision { +// [122, trait_sig → nonempty_list(attribute) PRIV TRAIT uident • loption(preceded(COLON,separated_nonempty_list(PLUS,qualified_uident))) trait_body, EOF / SEMI] +// [235, loption(preceded(COLON,separated_nonempty_list(PLUS,qualified_uident))) → •, EOF / SEMI / LBRACE] +// [236, loption(preceded(COLON,separated_nonempty_list(PLUS,qualified_uident))) → • COLON separated_nonempty_list(PLUS,qualified_uident), EOF / SEMI / LBRACE] +fn yy_state_579(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_COLON => Shift(yy_state_42) - NT_loption_preceded_COLON_separated_nonempty_list_PLUS_qualified_uident___ => Shift(yy_state_543) - T_EOF | T_SEMI | T_LBRACE => Reduce(0, NT_loption_preceded_COLON_separated_nonempty_list_PLUS_qualified_uident___, yy_action_267) + T_COLON => Shift(yy_state_43) + NT_loption_preceded_COLON_separated_nonempty_list_PLUS_qualified_uident___ => Shift(yy_state_580) + T_EOF | T_SEMI | T_LBRACE => Reduce(0, NT_loption_preceded_COLON_separated_nonempty_list_PLUS_qualified_uident___, yy_action_271) _ => Error } } -// [118, trait_sig → nonempty_list(attribute) PRIV TRAIT uident loption(preceded(COLON,separated_nonempty_list(PLUS,qualified_uident))) • trait_body, EOF / SEMI] -// [120, trait_body → •, EOF / SEMI] -// [121, trait_body → • LBRACE separated_list(SEMI,trait_method_sig) RBRACE, EOF / SEMI] -fn yy_state_543(_lookahead : YYSymbol) -> YYDecision { +// [122, trait_sig → nonempty_list(attribute) PRIV TRAIT uident loption(preceded(COLON,separated_nonempty_list(PLUS,qualified_uident))) • trait_body, EOF / SEMI] +// [124, trait_body → •, EOF / SEMI] +// [125, trait_body → • LBRACE separated_list(SEMI,trait_method_sig) RBRACE, EOF / SEMI] +fn yy_state_580(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACE => Shift(yy_state_51) - NT_trait_body => Shift(yy_state_544) - T_EOF | T_SEMI => Reduce(0, NT_trait_body, yy_action_260) + T_LBRACE => Shift(yy_state_52) + NT_trait_body => Shift(yy_state_581) + T_EOF | T_SEMI => Reduce(0, NT_trait_body, yy_action_264) _ => Error } } -// [118, trait_sig → nonempty_list(attribute) PRIV TRAIT uident loption(preceded(COLON,separated_nonempty_list(PLUS,qualified_uident))) trait_body •, EOF / SEMI] -fn yy_state_544(_lookahead : YYSymbol) -> YYDecision { +// [122, trait_sig → nonempty_list(attribute) PRIV TRAIT uident loption(preceded(COLON,separated_nonempty_list(PLUS,qualified_uident))) trait_body •, EOF / SEMI] +fn yy_state_581(_lookahead : YYSymbol) -> YYDecision { ReduceNoLookahead(6, NT_trait_sig, yy_action_76) } -// [106, impl_sig → nonempty_list(attribute) PRIV IMPL • type_params_with_constraints qualified_uident FOR type_, EOF / SEMI] -// [112, impl_sig → nonempty_list(attribute) PRIV IMPL • qualified_uident FOR type_, EOF / SEMI] -// [157, type_params_with_constraints → • LBRACKET separated_list(COMMA,type_param_with_constraints) RBRACKET, UIDENT / PACKAGE_NAME] -// [208, qualified_uident → • UIDENT, FOR] -// [209, qualified_uident → • PACKAGE_NAME DOT_UIDENT, FOR] -fn yy_state_545(_lookahead : YYSymbol) -> YYDecision { +// [110, impl_sig → nonempty_list(attribute) PRIV IMPL • type_params_with_constraints qualified_uident FOR type_, EOF / SEMI] +// [116, impl_sig → nonempty_list(attribute) PRIV IMPL • qualified_uident FOR type_, EOF / SEMI] +// [161, type_params_with_constraints → • LBRACKET separated_list(COMMA,type_param_with_constraints) RBRACKET, UIDENT / PACKAGE_NAME] +// [212, qualified_uident → • UIDENT, FOR] +// [213, qualified_uident → • PACKAGE_NAME DOT_UIDENT, FOR] +fn yy_state_582(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_PACKAGE_NAME => Shift(yy_state_47) - T_UIDENT => Shift(yy_state_49) - T_LBRACKET => Shift(yy_state_162) - NT_qualified_uident => Shift(yy_state_546) - NT_type_params_with_constraints => Shift(yy_state_549) + T_PACKAGE_NAME => Shift(yy_state_48) + T_UIDENT => Shift(yy_state_50) + T_LBRACKET => Shift(yy_state_144) + NT_qualified_uident => Shift(yy_state_583) + NT_type_params_with_constraints => Shift(yy_state_586) _ => Error } } -// [112, impl_sig → nonempty_list(attribute) PRIV IMPL qualified_uident • FOR type_, EOF / SEMI] -fn yy_state_546(_lookahead : YYSymbol) -> YYDecision { +// [116, impl_sig → nonempty_list(attribute) PRIV IMPL qualified_uident • FOR type_, EOF / SEMI] +fn yy_state_583(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_FOR => Shift(yy_state_547) - _ => Error - } -} - -// [112, impl_sig → nonempty_list(attribute) PRIV IMPL qualified_uident FOR • type_, EOF / SEMI] -// [167, simple_type → • simple_type QUESTION, EOF / QUESTION / SEMI] -// [168, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, EOF / QUESTION / SEMI] -// [169, simple_type → • LPAREN type_ RPAREN, EOF / QUESTION / SEMI] -// [170, simple_type → • qualified_uident_ optional_type_arguments, EOF / QUESTION / SEMI] -// [171, simple_type → • AMPER qualified_uident_, EOF / QUESTION / SEMI] -// [172, simple_type → • UNDERSCORE, EOF / QUESTION / SEMI] -// [173, type_ → • simple_type, EOF / SEMI] -// [174, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] -// [175, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] -// [176, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] -// [177, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] -// [178, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] -// [179, type_ → • LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] -// [180, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] -// [181, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] -// [210, qualified_uident_ → • UIDENT, EOF / QUESTION / SEMI / LBRACKET] -// [211, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, EOF / QUESTION / SEMI / LBRACKET] -fn yy_state_547(_lookahead : YYSymbol) -> YYDecision { + T_FOR => Shift(yy_state_584) + _ => Error + } +} + +// [116, impl_sig → nonempty_list(attribute) PRIV IMPL qualified_uident FOR • type_, EOF / SEMI] +// [171, simple_type → • simple_type QUESTION, EOF / QUESTION / SEMI] +// [172, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, EOF / QUESTION / SEMI] +// [173, simple_type → • LPAREN type_ RPAREN, EOF / QUESTION / SEMI] +// [174, simple_type → • qualified_uident_ optional_type_arguments, EOF / QUESTION / SEMI] +// [175, simple_type → • AMPER qualified_uident_, EOF / QUESTION / SEMI] +// [176, simple_type → • UNDERSCORE, EOF / QUESTION / SEMI] +// [177, type_ → • simple_type, EOF / SEMI] +// [178, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] +// [179, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] +// [180, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] +// [181, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] +// [182, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] +// [183, type_ → • LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] +// [184, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] +// [185, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] +// [214, qualified_uident_ → • UIDENT, EOF / QUESTION / SEMI / LBRACKET] +// [215, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, EOF / QUESTION / SEMI / LBRACKET] +fn yy_state_584(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_PACKAGE_NAME => Shift(yy_state_62) T_UIDENT => Shift(yy_state_64) @@ -11066,55 +11908,55 @@ fn yy_state_547(_lookahead : YYSymbol) -> YYDecision { NT_qualified_uident_ => Shift(yy_state_78) T_LPAREN => Shift(yy_state_83) NT_simple_type => Shift(yy_state_106) - NT_type_ => Shift(yy_state_548) + NT_type_ => Shift(yy_state_585) _ => Error } } -// [112, impl_sig → nonempty_list(attribute) PRIV IMPL qualified_uident FOR type_ •, EOF / SEMI] -fn yy_state_548(_lookahead : YYSymbol) -> YYDecision { +// [116, impl_sig → nonempty_list(attribute) PRIV IMPL qualified_uident FOR type_ •, EOF / SEMI] +fn yy_state_585(_lookahead : YYSymbol) -> YYDecision { ReduceNoLookahead(6, NT_impl_sig, yy_action_75) } -// [106, impl_sig → nonempty_list(attribute) PRIV IMPL type_params_with_constraints • qualified_uident FOR type_, EOF / SEMI] -// [208, qualified_uident → • UIDENT, FOR] -// [209, qualified_uident → • PACKAGE_NAME DOT_UIDENT, FOR] -fn yy_state_549(_lookahead : YYSymbol) -> YYDecision { +// [110, impl_sig → nonempty_list(attribute) PRIV IMPL type_params_with_constraints • qualified_uident FOR type_, EOF / SEMI] +// [212, qualified_uident → • UIDENT, FOR] +// [213, qualified_uident → • PACKAGE_NAME DOT_UIDENT, FOR] +fn yy_state_586(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_PACKAGE_NAME => Shift(yy_state_47) - T_UIDENT => Shift(yy_state_49) - NT_qualified_uident => Shift(yy_state_550) + T_PACKAGE_NAME => Shift(yy_state_48) + T_UIDENT => Shift(yy_state_50) + NT_qualified_uident => Shift(yy_state_587) _ => Error } } -// [106, impl_sig → nonempty_list(attribute) PRIV IMPL type_params_with_constraints qualified_uident • FOR type_, EOF / SEMI] -fn yy_state_550(_lookahead : YYSymbol) -> YYDecision { +// [110, impl_sig → nonempty_list(attribute) PRIV IMPL type_params_with_constraints qualified_uident • FOR type_, EOF / SEMI] +fn yy_state_587(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_FOR => Shift(yy_state_551) - _ => Error - } -} - -// [106, impl_sig → nonempty_list(attribute) PRIV IMPL type_params_with_constraints qualified_uident FOR • type_, EOF / SEMI] -// [167, simple_type → • simple_type QUESTION, EOF / QUESTION / SEMI] -// [168, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, EOF / QUESTION / SEMI] -// [169, simple_type → • LPAREN type_ RPAREN, EOF / QUESTION / SEMI] -// [170, simple_type → • qualified_uident_ optional_type_arguments, EOF / QUESTION / SEMI] -// [171, simple_type → • AMPER qualified_uident_, EOF / QUESTION / SEMI] -// [172, simple_type → • UNDERSCORE, EOF / QUESTION / SEMI] -// [173, type_ → • simple_type, EOF / SEMI] -// [174, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] -// [175, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] -// [176, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] -// [177, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] -// [178, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] -// [179, type_ → • LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] -// [180, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] -// [181, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] -// [210, qualified_uident_ → • UIDENT, EOF / QUESTION / SEMI / LBRACKET] -// [211, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, EOF / QUESTION / SEMI / LBRACKET] -fn yy_state_551(_lookahead : YYSymbol) -> YYDecision { + T_FOR => Shift(yy_state_588) + _ => Error + } +} + +// [110, impl_sig → nonempty_list(attribute) PRIV IMPL type_params_with_constraints qualified_uident FOR • type_, EOF / SEMI] +// [171, simple_type → • simple_type QUESTION, EOF / QUESTION / SEMI] +// [172, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, EOF / QUESTION / SEMI] +// [173, simple_type → • LPAREN type_ RPAREN, EOF / QUESTION / SEMI] +// [174, simple_type → • qualified_uident_ optional_type_arguments, EOF / QUESTION / SEMI] +// [175, simple_type → • AMPER qualified_uident_, EOF / QUESTION / SEMI] +// [176, simple_type → • UNDERSCORE, EOF / QUESTION / SEMI] +// [177, type_ → • simple_type, EOF / SEMI] +// [178, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] +// [179, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] +// [180, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] +// [181, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] +// [182, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] +// [183, type_ → • LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] +// [184, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] +// [185, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] +// [214, qualified_uident_ → • UIDENT, EOF / QUESTION / SEMI / LBRACKET] +// [215, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, EOF / QUESTION / SEMI / LBRACKET] +fn yy_state_588(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_PACKAGE_NAME => Shift(yy_state_62) T_UIDENT => Shift(yy_state_64) @@ -11124,264 +11966,264 @@ fn yy_state_551(_lookahead : YYSymbol) -> YYDecision { NT_qualified_uident_ => Shift(yy_state_78) T_LPAREN => Shift(yy_state_83) NT_simple_type => Shift(yy_state_106) - NT_type_ => Shift(yy_state_552) + NT_type_ => Shift(yy_state_589) _ => Error } } -// [106, impl_sig → nonempty_list(attribute) PRIV IMPL type_params_with_constraints qualified_uident FOR type_ •, EOF / SEMI] -fn yy_state_552(_lookahead : YYSymbol) -> YYDecision { +// [110, impl_sig → nonempty_list(attribute) PRIV IMPL type_params_with_constraints qualified_uident FOR type_ •, EOF / SEMI] +fn yy_state_589(_lookahead : YYSymbol) -> YYDecision { ReduceNoLookahead(7, NT_impl_sig, yy_action_74) } -// [92, type_sig → nonempty_list(attribute) PRIV EXTENUM • type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [98, type_sig → nonempty_list(attribute) PRIV EXTENUM • extensible_enum_extension_target PLUS_EQUAL LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [164, type_decl_name_with_params → • uident optional_type_params_no_constraints, LBRACE] -// [165, extensible_enum_extension_target → • uident optional_type_params_no_constraints, PLUS_EQUAL] -// [166, extensible_enum_extension_target → • PACKAGE_NAME DOT_UIDENT optional_type_params_no_constraints, PLUS_EQUAL] -// [212, uident → • UIDENT, PLUS_EQUAL / LBRACKET / LBRACE] -fn yy_state_553(_lookahead : YYSymbol) -> YYDecision { +// [96, type_sig → nonempty_list(attribute) PRIV EXTENUM • type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [102, type_sig → nonempty_list(attribute) PRIV EXTENUM • extensible_enum_extension_target PLUS_EQUAL LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [168, type_decl_name_with_params → • uident optional_type_params_no_constraints, LBRACE] +// [169, extensible_enum_extension_target → • uident optional_type_params_no_constraints, PLUS_EQUAL] +// [170, extensible_enum_extension_target → • PACKAGE_NAME DOT_UIDENT optional_type_params_no_constraints, PLUS_EQUAL] +// [216, uident → • UIDENT, PLUS_EQUAL / LBRACKET / LBRACE] +fn yy_state_590(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_UIDENT => Shift(yy_state_25) - T_PACKAGE_NAME => Shift(yy_state_184) - NT_uident => Shift(yy_state_197) - NT_extensible_enum_extension_target => Shift(yy_state_554) - NT_type_decl_name_with_params => Shift(yy_state_560) + T_PACKAGE_NAME => Shift(yy_state_222) + NT_uident => Shift(yy_state_235) + NT_extensible_enum_extension_target => Shift(yy_state_591) + NT_type_decl_name_with_params => Shift(yy_state_597) _ => Error } } -// [98, type_sig → nonempty_list(attribute) PRIV EXTENUM extensible_enum_extension_target • PLUS_EQUAL LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -fn yy_state_554(_lookahead : YYSymbol) -> YYDecision { +// [102, type_sig → nonempty_list(attribute) PRIV EXTENUM extensible_enum_extension_target • PLUS_EQUAL LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +fn yy_state_591(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_PLUS_EQUAL => Shift(yy_state_555) + T_PLUS_EQUAL => Shift(yy_state_592) _ => Error } } -// [98, type_sig → nonempty_list(attribute) PRIV EXTENUM extensible_enum_extension_target PLUS_EQUAL • LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -fn yy_state_555(_lookahead : YYSymbol) -> YYDecision { +// [102, type_sig → nonempty_list(attribute) PRIV EXTENUM extensible_enum_extension_target PLUS_EQUAL • LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +fn yy_state_592(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACE => Shift(yy_state_556) + T_LBRACE => Shift(yy_state_593) _ => Error } } -// [98, type_sig → nonempty_list(attribute) PRIV EXTENUM extensible_enum_extension_target PLUS_EQUAL LBRACE • separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [148, enum_constructor → • UIDENT option(delimited(LPAREN,separated_nonempty_list(COMMA,constructor_param),RPAREN)) option(eq_tag), SEMI / RBRACE] -// [149, enum_constructor → • nonempty_list(attribute) UIDENT option(delimited(LPAREN,separated_nonempty_list(COMMA,constructor_param),RPAREN)) option(eq_tag), SEMI / RBRACE] -// [223, separated_list(SEMI,enum_constructor) → •, RBRACE] -// [224, separated_list(SEMI,enum_constructor) → • separated_nonempty_list(SEMI,enum_constructor), RBRACE] -// [252, nonempty_list(attribute) → • ATTRIBUTE, UIDENT] -// [253, nonempty_list(attribute) → • ATTRIBUTE nonempty_list(attribute), UIDENT] -// [260, separated_nonempty_list(SEMI,enum_constructor) → • enum_constructor, RBRACE] -// [261, separated_nonempty_list(SEMI,enum_constructor) → • enum_constructor SEMI separated_nonempty_list(SEMI,enum_constructor), RBRACE] -fn yy_state_556(_lookahead : YYSymbol) -> YYDecision { +// [102, type_sig → nonempty_list(attribute) PRIV EXTENUM extensible_enum_extension_target PLUS_EQUAL LBRACE • separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [152, enum_constructor → • UIDENT option(delimited(LPAREN,separated_nonempty_list(COMMA,constructor_param),RPAREN)) option(eq_tag), SEMI / RBRACE] +// [153, enum_constructor → • nonempty_list(attribute) UIDENT option(delimited(LPAREN,separated_nonempty_list(COMMA,constructor_param),RPAREN)) option(eq_tag), SEMI / RBRACE] +// [228, separated_list(SEMI,enum_constructor) → •, RBRACE] +// [229, separated_list(SEMI,enum_constructor) → • separated_nonempty_list(SEMI,enum_constructor), RBRACE] +// [257, nonempty_list(attribute) → • ATTRIBUTE, UIDENT] +// [258, nonempty_list(attribute) → • ATTRIBUTE nonempty_list(attribute), UIDENT] +// [265, separated_nonempty_list(SEMI,enum_constructor) → • enum_constructor, RBRACE] +// [266, separated_nonempty_list(SEMI,enum_constructor) → • enum_constructor SEMI separated_nonempty_list(SEMI,enum_constructor), RBRACE] +fn yy_state_593(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_ATTRIBUTE => Shift(yy_state_19) - NT_enum_constructor => Shift(yy_state_202) - NT_nonempty_list_attribute_ => Shift(yy_state_205) - T_UIDENT => Shift(yy_state_224) - NT_separated_nonempty_list_SEMI_enum_constructor_ => Shift(yy_state_227) - NT_separated_list_SEMI_enum_constructor_ => Shift(yy_state_557) - T_RBRACE => Reduce(0, NT_separated_list_SEMI_enum_constructor_, yy_action_184) + NT_enum_constructor => Shift(yy_state_240) + NT_nonempty_list_attribute_ => Shift(yy_state_243) + T_UIDENT => Shift(yy_state_262) + NT_separated_nonempty_list_SEMI_enum_constructor_ => Shift(yy_state_265) + NT_separated_list_SEMI_enum_constructor_ => Shift(yy_state_594) + T_RBRACE => Reduce(0, NT_separated_list_SEMI_enum_constructor_, yy_action_182) _ => Error } } -// [98, type_sig → nonempty_list(attribute) PRIV EXTENUM extensible_enum_extension_target PLUS_EQUAL LBRACE separated_list(SEMI,enum_constructor) • RBRACE optional_derive, EOF / SEMI] -fn yy_state_557(_lookahead : YYSymbol) -> YYDecision { +// [102, type_sig → nonempty_list(attribute) PRIV EXTENUM extensible_enum_extension_target PLUS_EQUAL LBRACE separated_list(SEMI,enum_constructor) • RBRACE optional_derive, EOF / SEMI] +fn yy_state_594(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RBRACE => Shift(yy_state_558) + T_RBRACE => Shift(yy_state_595) _ => Error } } -// [98, type_sig → nonempty_list(attribute) PRIV EXTENUM extensible_enum_extension_target PLUS_EQUAL LBRACE separated_list(SEMI,enum_constructor) RBRACE • optional_derive, EOF / SEMI] -// [100, optional_derive → •, EOF / SEMI] -// [101, optional_derive → • DERIVE LPAREN non_empty_list_commas(qualified_uident) RPAREN, EOF / SEMI] -fn yy_state_558(_lookahead : YYSymbol) -> YYDecision { +// [102, type_sig → nonempty_list(attribute) PRIV EXTENUM extensible_enum_extension_target PLUS_EQUAL LBRACE separated_list(SEMI,enum_constructor) RBRACE • optional_derive, EOF / SEMI] +// [104, optional_derive → •, EOF / SEMI] +// [105, optional_derive → • DERIVE LPAREN non_empty_list_commas(qualified_uident) RPAREN, EOF / SEMI] +fn yy_state_595(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_DERIVE => Shift(yy_state_230) - NT_optional_derive => Shift(yy_state_559) - T_EOF | T_SEMI => Reduce(0, NT_optional_derive, yy_action_165) + T_DERIVE => Shift(yy_state_268) + NT_optional_derive => Shift(yy_state_596) + T_EOF | T_SEMI => Reduce(0, NT_optional_derive, yy_action_163) _ => Error } } -// [98, type_sig → nonempty_list(attribute) PRIV EXTENUM extensible_enum_extension_target PLUS_EQUAL LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive •, EOF / SEMI] -fn yy_state_559(_lookahead : YYSymbol) -> YYDecision { +// [102, type_sig → nonempty_list(attribute) PRIV EXTENUM extensible_enum_extension_target PLUS_EQUAL LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive •, EOF / SEMI] +fn yy_state_596(_lookahead : YYSymbol) -> YYDecision { ReduceNoLookahead(9, NT_type_sig, yy_action_73) } -// [92, type_sig → nonempty_list(attribute) PRIV EXTENUM type_decl_name_with_params • LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -fn yy_state_560(_lookahead : YYSymbol) -> YYDecision { +// [96, type_sig → nonempty_list(attribute) PRIV EXTENUM type_decl_name_with_params • LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +fn yy_state_597(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACE => Shift(yy_state_561) + T_LBRACE => Shift(yy_state_598) _ => Error } } -// [92, type_sig → nonempty_list(attribute) PRIV EXTENUM type_decl_name_with_params LBRACE • separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [148, enum_constructor → • UIDENT option(delimited(LPAREN,separated_nonempty_list(COMMA,constructor_param),RPAREN)) option(eq_tag), SEMI / RBRACE] -// [149, enum_constructor → • nonempty_list(attribute) UIDENT option(delimited(LPAREN,separated_nonempty_list(COMMA,constructor_param),RPAREN)) option(eq_tag), SEMI / RBRACE] -// [223, separated_list(SEMI,enum_constructor) → •, RBRACE] -// [224, separated_list(SEMI,enum_constructor) → • separated_nonempty_list(SEMI,enum_constructor), RBRACE] -// [252, nonempty_list(attribute) → • ATTRIBUTE, UIDENT] -// [253, nonempty_list(attribute) → • ATTRIBUTE nonempty_list(attribute), UIDENT] -// [260, separated_nonempty_list(SEMI,enum_constructor) → • enum_constructor, RBRACE] -// [261, separated_nonempty_list(SEMI,enum_constructor) → • enum_constructor SEMI separated_nonempty_list(SEMI,enum_constructor), RBRACE] -fn yy_state_561(_lookahead : YYSymbol) -> YYDecision { +// [96, type_sig → nonempty_list(attribute) PRIV EXTENUM type_decl_name_with_params LBRACE • separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [152, enum_constructor → • UIDENT option(delimited(LPAREN,separated_nonempty_list(COMMA,constructor_param),RPAREN)) option(eq_tag), SEMI / RBRACE] +// [153, enum_constructor → • nonempty_list(attribute) UIDENT option(delimited(LPAREN,separated_nonempty_list(COMMA,constructor_param),RPAREN)) option(eq_tag), SEMI / RBRACE] +// [228, separated_list(SEMI,enum_constructor) → •, RBRACE] +// [229, separated_list(SEMI,enum_constructor) → • separated_nonempty_list(SEMI,enum_constructor), RBRACE] +// [257, nonempty_list(attribute) → • ATTRIBUTE, UIDENT] +// [258, nonempty_list(attribute) → • ATTRIBUTE nonempty_list(attribute), UIDENT] +// [265, separated_nonempty_list(SEMI,enum_constructor) → • enum_constructor, RBRACE] +// [266, separated_nonempty_list(SEMI,enum_constructor) → • enum_constructor SEMI separated_nonempty_list(SEMI,enum_constructor), RBRACE] +fn yy_state_598(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_ATTRIBUTE => Shift(yy_state_19) - NT_enum_constructor => Shift(yy_state_202) - NT_nonempty_list_attribute_ => Shift(yy_state_205) - T_UIDENT => Shift(yy_state_224) - NT_separated_nonempty_list_SEMI_enum_constructor_ => Shift(yy_state_227) - NT_separated_list_SEMI_enum_constructor_ => Shift(yy_state_562) - T_RBRACE => Reduce(0, NT_separated_list_SEMI_enum_constructor_, yy_action_184) + NT_enum_constructor => Shift(yy_state_240) + NT_nonempty_list_attribute_ => Shift(yy_state_243) + T_UIDENT => Shift(yy_state_262) + NT_separated_nonempty_list_SEMI_enum_constructor_ => Shift(yy_state_265) + NT_separated_list_SEMI_enum_constructor_ => Shift(yy_state_599) + T_RBRACE => Reduce(0, NT_separated_list_SEMI_enum_constructor_, yy_action_182) _ => Error } } -// [92, type_sig → nonempty_list(attribute) PRIV EXTENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) • RBRACE optional_derive, EOF / SEMI] -fn yy_state_562(_lookahead : YYSymbol) -> YYDecision { +// [96, type_sig → nonempty_list(attribute) PRIV EXTENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) • RBRACE optional_derive, EOF / SEMI] +fn yy_state_599(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RBRACE => Shift(yy_state_563) + T_RBRACE => Shift(yy_state_600) _ => Error } } -// [92, type_sig → nonempty_list(attribute) PRIV EXTENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE • optional_derive, EOF / SEMI] -// [100, optional_derive → •, EOF / SEMI] -// [101, optional_derive → • DERIVE LPAREN non_empty_list_commas(qualified_uident) RPAREN, EOF / SEMI] -fn yy_state_563(_lookahead : YYSymbol) -> YYDecision { +// [96, type_sig → nonempty_list(attribute) PRIV EXTENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE • optional_derive, EOF / SEMI] +// [104, optional_derive → •, EOF / SEMI] +// [105, optional_derive → • DERIVE LPAREN non_empty_list_commas(qualified_uident) RPAREN, EOF / SEMI] +fn yy_state_600(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_DERIVE => Shift(yy_state_230) - NT_optional_derive => Shift(yy_state_564) - T_EOF | T_SEMI => Reduce(0, NT_optional_derive, yy_action_165) + T_DERIVE => Shift(yy_state_268) + NT_optional_derive => Shift(yy_state_601) + T_EOF | T_SEMI => Reduce(0, NT_optional_derive, yy_action_163) _ => Error } } -// [92, type_sig → nonempty_list(attribute) PRIV EXTENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive •, EOF / SEMI] -fn yy_state_564(_lookahead : YYSymbol) -> YYDecision { +// [96, type_sig → nonempty_list(attribute) PRIV EXTENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive •, EOF / SEMI] +fn yy_state_601(_lookahead : YYSymbol) -> YYDecision { ReduceNoLookahead(8, NT_type_sig, yy_action_72) } -// [86, type_sig → nonempty_list(attribute) PRIV ENUM • type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [164, type_decl_name_with_params → • uident optional_type_params_no_constraints, LBRACE] -// [212, uident → • UIDENT, LBRACKET / LBRACE] -fn yy_state_565(_lookahead : YYSymbol) -> YYDecision { +// [90, type_sig → nonempty_list(attribute) PRIV ENUM • type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [168, type_decl_name_with_params → • uident optional_type_params_no_constraints, LBRACE] +// [216, uident → • UIDENT, LBRACKET / LBRACE] +fn yy_state_602(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_UIDENT => Shift(yy_state_25) - NT_uident => Shift(yy_state_246) - NT_type_decl_name_with_params => Shift(yy_state_566) + NT_uident => Shift(yy_state_284) + NT_type_decl_name_with_params => Shift(yy_state_603) _ => Error } } -// [86, type_sig → nonempty_list(attribute) PRIV ENUM type_decl_name_with_params • LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -fn yy_state_566(_lookahead : YYSymbol) -> YYDecision { +// [90, type_sig → nonempty_list(attribute) PRIV ENUM type_decl_name_with_params • LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +fn yy_state_603(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACE => Shift(yy_state_567) + T_LBRACE => Shift(yy_state_604) _ => Error } } -// [86, type_sig → nonempty_list(attribute) PRIV ENUM type_decl_name_with_params LBRACE • separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [148, enum_constructor → • UIDENT option(delimited(LPAREN,separated_nonempty_list(COMMA,constructor_param),RPAREN)) option(eq_tag), SEMI / RBRACE] -// [149, enum_constructor → • nonempty_list(attribute) UIDENT option(delimited(LPAREN,separated_nonempty_list(COMMA,constructor_param),RPAREN)) option(eq_tag), SEMI / RBRACE] -// [223, separated_list(SEMI,enum_constructor) → •, RBRACE] -// [224, separated_list(SEMI,enum_constructor) → • separated_nonempty_list(SEMI,enum_constructor), RBRACE] -// [252, nonempty_list(attribute) → • ATTRIBUTE, UIDENT] -// [253, nonempty_list(attribute) → • ATTRIBUTE nonempty_list(attribute), UIDENT] -// [260, separated_nonempty_list(SEMI,enum_constructor) → • enum_constructor, RBRACE] -// [261, separated_nonempty_list(SEMI,enum_constructor) → • enum_constructor SEMI separated_nonempty_list(SEMI,enum_constructor), RBRACE] -fn yy_state_567(_lookahead : YYSymbol) -> YYDecision { +// [90, type_sig → nonempty_list(attribute) PRIV ENUM type_decl_name_with_params LBRACE • separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [152, enum_constructor → • UIDENT option(delimited(LPAREN,separated_nonempty_list(COMMA,constructor_param),RPAREN)) option(eq_tag), SEMI / RBRACE] +// [153, enum_constructor → • nonempty_list(attribute) UIDENT option(delimited(LPAREN,separated_nonempty_list(COMMA,constructor_param),RPAREN)) option(eq_tag), SEMI / RBRACE] +// [228, separated_list(SEMI,enum_constructor) → •, RBRACE] +// [229, separated_list(SEMI,enum_constructor) → • separated_nonempty_list(SEMI,enum_constructor), RBRACE] +// [257, nonempty_list(attribute) → • ATTRIBUTE, UIDENT] +// [258, nonempty_list(attribute) → • ATTRIBUTE nonempty_list(attribute), UIDENT] +// [265, separated_nonempty_list(SEMI,enum_constructor) → • enum_constructor, RBRACE] +// [266, separated_nonempty_list(SEMI,enum_constructor) → • enum_constructor SEMI separated_nonempty_list(SEMI,enum_constructor), RBRACE] +fn yy_state_604(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_ATTRIBUTE => Shift(yy_state_19) - NT_enum_constructor => Shift(yy_state_202) - NT_nonempty_list_attribute_ => Shift(yy_state_205) - T_UIDENT => Shift(yy_state_224) - NT_separated_nonempty_list_SEMI_enum_constructor_ => Shift(yy_state_227) - NT_separated_list_SEMI_enum_constructor_ => Shift(yy_state_568) - T_RBRACE => Reduce(0, NT_separated_list_SEMI_enum_constructor_, yy_action_184) + NT_enum_constructor => Shift(yy_state_240) + NT_nonempty_list_attribute_ => Shift(yy_state_243) + T_UIDENT => Shift(yy_state_262) + NT_separated_nonempty_list_SEMI_enum_constructor_ => Shift(yy_state_265) + NT_separated_list_SEMI_enum_constructor_ => Shift(yy_state_605) + T_RBRACE => Reduce(0, NT_separated_list_SEMI_enum_constructor_, yy_action_182) _ => Error } } -// [86, type_sig → nonempty_list(attribute) PRIV ENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) • RBRACE optional_derive, EOF / SEMI] -fn yy_state_568(_lookahead : YYSymbol) -> YYDecision { +// [90, type_sig → nonempty_list(attribute) PRIV ENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) • RBRACE optional_derive, EOF / SEMI] +fn yy_state_605(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RBRACE => Shift(yy_state_569) + T_RBRACE => Shift(yy_state_606) _ => Error } } -// [86, type_sig → nonempty_list(attribute) PRIV ENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE • optional_derive, EOF / SEMI] -// [100, optional_derive → •, EOF / SEMI] -// [101, optional_derive → • DERIVE LPAREN non_empty_list_commas(qualified_uident) RPAREN, EOF / SEMI] -fn yy_state_569(_lookahead : YYSymbol) -> YYDecision { +// [90, type_sig → nonempty_list(attribute) PRIV ENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE • optional_derive, EOF / SEMI] +// [104, optional_derive → •, EOF / SEMI] +// [105, optional_derive → • DERIVE LPAREN non_empty_list_commas(qualified_uident) RPAREN, EOF / SEMI] +fn yy_state_606(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_DERIVE => Shift(yy_state_230) - NT_optional_derive => Shift(yy_state_570) - T_EOF | T_SEMI => Reduce(0, NT_optional_derive, yy_action_165) + T_DERIVE => Shift(yy_state_268) + NT_optional_derive => Shift(yy_state_607) + T_EOF | T_SEMI => Reduce(0, NT_optional_derive, yy_action_163) _ => Error } } -// [86, type_sig → nonempty_list(attribute) PRIV ENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive •, EOF / SEMI] -fn yy_state_570(_lookahead : YYSymbol) -> YYDecision { +// [90, type_sig → nonempty_list(attribute) PRIV ENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive •, EOF / SEMI] +fn yy_state_607(_lookahead : YYSymbol) -> YYDecision { ReduceNoLookahead(8, NT_type_sig, yy_action_71) } -// [74, type_sig → nonempty_list(attribute) PRIV STRUCT • type_decl_name_with_params LBRACE record_decl_body RBRACE optional_derive, EOF / SEMI] -// [80, type_sig → nonempty_list(attribute) PRIV STRUCT • type_decl_name_with_params LPAREN separated_list(COMMA,type_) RPAREN optional_derive, EOF / SEMI] -// [164, type_decl_name_with_params → • uident optional_type_params_no_constraints, LPAREN / LBRACE] -// [212, uident → • UIDENT, LPAREN / LBRACKET / LBRACE] -fn yy_state_571(_lookahead : YYSymbol) -> YYDecision { +// [78, type_sig → nonempty_list(attribute) PRIV STRUCT • type_decl_name_with_params LBRACE record_decl_body RBRACE optional_derive, EOF / SEMI] +// [84, type_sig → nonempty_list(attribute) PRIV STRUCT • type_decl_name_with_params LPAREN separated_list(COMMA,type_) RPAREN optional_derive, EOF / SEMI] +// [168, type_decl_name_with_params → • uident optional_type_params_no_constraints, LPAREN / LBRACE] +// [216, uident → • UIDENT, LPAREN / LBRACKET / LBRACE] +fn yy_state_608(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_UIDENT => Shift(yy_state_25) - NT_uident => Shift(yy_state_246) - NT_type_decl_name_with_params => Shift(yy_state_572) + NT_uident => Shift(yy_state_284) + NT_type_decl_name_with_params => Shift(yy_state_609) _ => Error } } -// [74, type_sig → nonempty_list(attribute) PRIV STRUCT type_decl_name_with_params • LBRACE record_decl_body RBRACE optional_derive, EOF / SEMI] -// [80, type_sig → nonempty_list(attribute) PRIV STRUCT type_decl_name_with_params • LPAREN separated_list(COMMA,type_) RPAREN optional_derive, EOF / SEMI] -fn yy_state_572(_lookahead : YYSymbol) -> YYDecision { +// [78, type_sig → nonempty_list(attribute) PRIV STRUCT type_decl_name_with_params • LBRACE record_decl_body RBRACE optional_derive, EOF / SEMI] +// [84, type_sig → nonempty_list(attribute) PRIV STRUCT type_decl_name_with_params • LPAREN separated_list(COMMA,type_) RPAREN optional_derive, EOF / SEMI] +fn yy_state_609(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LPAREN => Shift(yy_state_573) - T_LBRACE => Shift(yy_state_577) - _ => Error - } -} - -// [80, type_sig → nonempty_list(attribute) PRIV STRUCT type_decl_name_with_params LPAREN • separated_list(COMMA,type_) RPAREN optional_derive, EOF / SEMI] -// [167, simple_type → • simple_type QUESTION, RPAREN / COMMA / QUESTION] -// [168, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, RPAREN / COMMA / QUESTION] -// [169, simple_type → • LPAREN type_ RPAREN, RPAREN / COMMA / QUESTION] -// [170, simple_type → • qualified_uident_ optional_type_arguments, RPAREN / COMMA / QUESTION] -// [171, simple_type → • AMPER qualified_uident_, RPAREN / COMMA / QUESTION] -// [172, simple_type → • UNDERSCORE, RPAREN / COMMA / QUESTION] -// [173, type_ → • simple_type, RPAREN / COMMA] -// [174, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [175, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [176, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [177, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [178, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [179, type_ → • LPAREN RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [180, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [181, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [210, qualified_uident_ → • UIDENT, RPAREN / COMMA / QUESTION / LBRACKET] -// [211, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, RPAREN / COMMA / QUESTION / LBRACKET] -// [225, separated_list(COMMA,type_) → •, RPAREN] -// [226, separated_list(COMMA,type_) → • separated_nonempty_list(COMMA,type_), RPAREN] -// [250, separated_nonempty_list(COMMA,type_) → • type_, RPAREN] -// [251, separated_nonempty_list(COMMA,type_) → • type_ COMMA separated_nonempty_list(COMMA,type_), RPAREN] -fn yy_state_573(_lookahead : YYSymbol) -> YYDecision { + T_LPAREN => Shift(yy_state_610) + T_LBRACE => Shift(yy_state_614) + _ => Error + } +} + +// [84, type_sig → nonempty_list(attribute) PRIV STRUCT type_decl_name_with_params LPAREN • separated_list(COMMA,type_) RPAREN optional_derive, EOF / SEMI] +// [171, simple_type → • simple_type QUESTION, RPAREN / COMMA / QUESTION] +// [172, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, RPAREN / COMMA / QUESTION] +// [173, simple_type → • LPAREN type_ RPAREN, RPAREN / COMMA / QUESTION] +// [174, simple_type → • qualified_uident_ optional_type_arguments, RPAREN / COMMA / QUESTION] +// [175, simple_type → • AMPER qualified_uident_, RPAREN / COMMA / QUESTION] +// [176, simple_type → • UNDERSCORE, RPAREN / COMMA / QUESTION] +// [177, type_ → • simple_type, RPAREN / COMMA] +// [178, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [179, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [180, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [181, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [182, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [183, type_ → • LPAREN RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [184, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [185, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [214, qualified_uident_ → • UIDENT, RPAREN / COMMA / QUESTION / LBRACKET] +// [215, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, RPAREN / COMMA / QUESTION / LBRACKET] +// [230, separated_list(COMMA,type_) → •, RPAREN] +// [231, separated_list(COMMA,type_) → • separated_nonempty_list(COMMA,type_), RPAREN] +// [255, separated_nonempty_list(COMMA,type_) → • type_, RPAREN] +// [256, separated_nonempty_list(COMMA,type_) → • type_ COMMA separated_nonempty_list(COMMA,type_), RPAREN] +fn yy_state_610(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_PACKAGE_NAME => Shift(yy_state_62) T_UIDENT => Shift(yy_state_64) @@ -11392,214 +12234,214 @@ fn yy_state_573(_lookahead : YYSymbol) -> YYDecision { NT_type_ => Shift(yy_state_80) T_LPAREN => Shift(yy_state_83) NT_simple_type => Shift(yy_state_106) - NT_separated_nonempty_list_COMMA_type__ => Shift(yy_state_256) - NT_separated_list_COMMA_type__ => Shift(yy_state_574) - T_RPAREN => Reduce(0, NT_separated_list_COMMA_type__, yy_action_157) + NT_separated_nonempty_list_COMMA_type__ => Shift(yy_state_294) + NT_separated_list_COMMA_type__ => Shift(yy_state_611) + T_RPAREN => Reduce(0, NT_separated_list_COMMA_type__, yy_action_155) _ => Error } } -// [80, type_sig → nonempty_list(attribute) PRIV STRUCT type_decl_name_with_params LPAREN separated_list(COMMA,type_) • RPAREN optional_derive, EOF / SEMI] -fn yy_state_574(_lookahead : YYSymbol) -> YYDecision { +// [84, type_sig → nonempty_list(attribute) PRIV STRUCT type_decl_name_with_params LPAREN separated_list(COMMA,type_) • RPAREN optional_derive, EOF / SEMI] +fn yy_state_611(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RPAREN => Shift(yy_state_575) + T_RPAREN => Shift(yy_state_612) _ => Error } } -// [80, type_sig → nonempty_list(attribute) PRIV STRUCT type_decl_name_with_params LPAREN separated_list(COMMA,type_) RPAREN • optional_derive, EOF / SEMI] -// [100, optional_derive → •, EOF / SEMI] -// [101, optional_derive → • DERIVE LPAREN non_empty_list_commas(qualified_uident) RPAREN, EOF / SEMI] -fn yy_state_575(_lookahead : YYSymbol) -> YYDecision { +// [84, type_sig → nonempty_list(attribute) PRIV STRUCT type_decl_name_with_params LPAREN separated_list(COMMA,type_) RPAREN • optional_derive, EOF / SEMI] +// [104, optional_derive → •, EOF / SEMI] +// [105, optional_derive → • DERIVE LPAREN non_empty_list_commas(qualified_uident) RPAREN, EOF / SEMI] +fn yy_state_612(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_DERIVE => Shift(yy_state_230) - NT_optional_derive => Shift(yy_state_576) - T_EOF | T_SEMI => Reduce(0, NT_optional_derive, yy_action_165) + T_DERIVE => Shift(yy_state_268) + NT_optional_derive => Shift(yy_state_613) + T_EOF | T_SEMI => Reduce(0, NT_optional_derive, yy_action_163) _ => Error } } -// [80, type_sig → nonempty_list(attribute) PRIV STRUCT type_decl_name_with_params LPAREN separated_list(COMMA,type_) RPAREN optional_derive •, EOF / SEMI] -fn yy_state_576(_lookahead : YYSymbol) -> YYDecision { +// [84, type_sig → nonempty_list(attribute) PRIV STRUCT type_decl_name_with_params LPAREN separated_list(COMMA,type_) RPAREN optional_derive •, EOF / SEMI] +fn yy_state_613(_lookahead : YYSymbol) -> YYDecision { ReduceNoLookahead(8, NT_type_sig, yy_action_70) } -// [74, type_sig → nonempty_list(attribute) PRIV STRUCT type_decl_name_with_params LBRACE • record_decl_body RBRACE optional_derive, EOF / SEMI] -// [152, record_decl_field → • boption(MUTABLE) LIDENT COLON type_, SEMI / RBRACE] -// [153, record_decl_field → • nonempty_list(attribute) boption(MUTABLE) LIDENT COLON type_, SEMI / RBRACE] -// [154, record_decl_body → • separated_list(SEMI,record_decl_field), RBRACE] -// [240, boption(MUTABLE) → •, LIDENT] -// [241, boption(MUTABLE) → • MUTABLE, LIDENT] -// [242, separated_list(SEMI,record_decl_field) → •, RBRACE] -// [243, separated_list(SEMI,record_decl_field) → • separated_nonempty_list(SEMI,record_decl_field), RBRACE] -// [252, nonempty_list(attribute) → • ATTRIBUTE, LIDENT / MUTABLE] -// [253, nonempty_list(attribute) → • ATTRIBUTE nonempty_list(attribute), LIDENT / MUTABLE] -// [266, separated_nonempty_list(SEMI,record_decl_field) → • record_decl_field, RBRACE] -// [267, separated_nonempty_list(SEMI,record_decl_field) → • record_decl_field SEMI separated_nonempty_list(SEMI,record_decl_field), RBRACE] -fn yy_state_577(_lookahead : YYSymbol) -> YYDecision { +// [78, type_sig → nonempty_list(attribute) PRIV STRUCT type_decl_name_with_params LBRACE • record_decl_body RBRACE optional_derive, EOF / SEMI] +// [156, record_decl_field → • boption(MUTABLE) lident COLON type_, SEMI / RBRACE] +// [157, record_decl_field → • nonempty_list(attribute) boption(MUTABLE) lident COLON type_, SEMI / RBRACE] +// [158, record_decl_body → • separated_list(SEMI,record_decl_field), RBRACE] +// [245, boption(MUTABLE) → •, LIDENT / EXTEND] +// [246, boption(MUTABLE) → • MUTABLE, LIDENT / EXTEND] +// [247, separated_list(SEMI,record_decl_field) → •, RBRACE] +// [248, separated_list(SEMI,record_decl_field) → • separated_nonempty_list(SEMI,record_decl_field), RBRACE] +// [257, nonempty_list(attribute) → • ATTRIBUTE, LIDENT / MUTABLE / EXTEND] +// [258, nonempty_list(attribute) → • ATTRIBUTE nonempty_list(attribute), LIDENT / MUTABLE / EXTEND] +// [271, separated_nonempty_list(SEMI,record_decl_field) → • record_decl_field, RBRACE] +// [272, separated_nonempty_list(SEMI,record_decl_field) → • record_decl_field SEMI separated_nonempty_list(SEMI,record_decl_field), RBRACE] +fn yy_state_614(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_ATTRIBUTE => Shift(yy_state_19) - T_MUTABLE => Shift(yy_state_208) - NT_record_decl_field => Shift(yy_state_261) - NT_nonempty_list_attribute_ => Shift(yy_state_264) - NT_boption_MUTABLE_ => Shift(yy_state_269) - NT_separated_nonempty_list_SEMI_record_decl_field_ => Shift(yy_state_273) - NT_separated_list_SEMI_record_decl_field_ => Shift(yy_state_274) - NT_record_decl_body => Shift(yy_state_578) - T_LIDENT => Reduce(0, NT_boption_MUTABLE_, yy_action_180) - T_RBRACE => Reduce(0, NT_separated_list_SEMI_record_decl_field_, yy_action_154) + T_MUTABLE => Shift(yy_state_246) + NT_record_decl_field => Shift(yy_state_299) + NT_nonempty_list_attribute_ => Shift(yy_state_302) + NT_boption_MUTABLE_ => Shift(yy_state_307) + NT_separated_nonempty_list_SEMI_record_decl_field_ => Shift(yy_state_311) + NT_separated_list_SEMI_record_decl_field_ => Shift(yy_state_312) + NT_record_decl_body => Shift(yy_state_615) + T_LIDENT | T_EXTEND => Reduce(0, NT_boption_MUTABLE_, yy_action_178) + T_RBRACE => Reduce(0, NT_separated_list_SEMI_record_decl_field_, yy_action_152) _ => Error } } -// [74, type_sig → nonempty_list(attribute) PRIV STRUCT type_decl_name_with_params LBRACE record_decl_body • RBRACE optional_derive, EOF / SEMI] -fn yy_state_578(_lookahead : YYSymbol) -> YYDecision { +// [78, type_sig → nonempty_list(attribute) PRIV STRUCT type_decl_name_with_params LBRACE record_decl_body • RBRACE optional_derive, EOF / SEMI] +fn yy_state_615(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RBRACE => Shift(yy_state_579) + T_RBRACE => Shift(yy_state_616) _ => Error } } -// [74, type_sig → nonempty_list(attribute) PRIV STRUCT type_decl_name_with_params LBRACE record_decl_body RBRACE • optional_derive, EOF / SEMI] -// [100, optional_derive → •, EOF / SEMI] -// [101, optional_derive → • DERIVE LPAREN non_empty_list_commas(qualified_uident) RPAREN, EOF / SEMI] -fn yy_state_579(_lookahead : YYSymbol) -> YYDecision { +// [78, type_sig → nonempty_list(attribute) PRIV STRUCT type_decl_name_with_params LBRACE record_decl_body RBRACE • optional_derive, EOF / SEMI] +// [104, optional_derive → •, EOF / SEMI] +// [105, optional_derive → • DERIVE LPAREN non_empty_list_commas(qualified_uident) RPAREN, EOF / SEMI] +fn yy_state_616(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_DERIVE => Shift(yy_state_230) - NT_optional_derive => Shift(yy_state_580) - T_EOF | T_SEMI => Reduce(0, NT_optional_derive, yy_action_165) + T_DERIVE => Shift(yy_state_268) + NT_optional_derive => Shift(yy_state_617) + T_EOF | T_SEMI => Reduce(0, NT_optional_derive, yy_action_163) _ => Error } } -// [74, type_sig → nonempty_list(attribute) PRIV STRUCT type_decl_name_with_params LBRACE record_decl_body RBRACE optional_derive •, EOF / SEMI] -fn yy_state_580(_lookahead : YYSymbol) -> YYDecision { +// [78, type_sig → nonempty_list(attribute) PRIV STRUCT type_decl_name_with_params LBRACE record_decl_body RBRACE optional_derive •, EOF / SEMI] +fn yy_state_617(_lookahead : YYSymbol) -> YYDecision { ReduceNoLookahead(8, NT_type_sig, yy_action_69) } -// [62, type_sig → nonempty_list(attribute) PRIV SUBERROR • uident optional_derive, EOF / SEMI] -// [68, type_sig → nonempty_list(attribute) PRIV SUBERROR • uident LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [212, uident → • UIDENT, EOF / DERIVE / SEMI / LBRACE] -fn yy_state_581(_lookahead : YYSymbol) -> YYDecision { +// [66, type_sig → nonempty_list(attribute) PRIV SUBERROR • uident optional_derive, EOF / SEMI] +// [72, type_sig → nonempty_list(attribute) PRIV SUBERROR • uident LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [216, uident → • UIDENT, EOF / DERIVE / SEMI / LBRACE] +fn yy_state_618(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_UIDENT => Shift(yy_state_25) - NT_uident => Shift(yy_state_582) + NT_uident => Shift(yy_state_619) _ => Error } } -// [62, type_sig → nonempty_list(attribute) PRIV SUBERROR uident • optional_derive, EOF / SEMI] -// [68, type_sig → nonempty_list(attribute) PRIV SUBERROR uident • LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [100, optional_derive → •, EOF / SEMI] -// [101, optional_derive → • DERIVE LPAREN non_empty_list_commas(qualified_uident) RPAREN, EOF / SEMI] -fn yy_state_582(_lookahead : YYSymbol) -> YYDecision { +// [66, type_sig → nonempty_list(attribute) PRIV SUBERROR uident • optional_derive, EOF / SEMI] +// [72, type_sig → nonempty_list(attribute) PRIV SUBERROR uident • LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [104, optional_derive → •, EOF / SEMI] +// [105, optional_derive → • DERIVE LPAREN non_empty_list_commas(qualified_uident) RPAREN, EOF / SEMI] +fn yy_state_619(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_DERIVE => Shift(yy_state_230) - T_LBRACE => Shift(yy_state_583) - NT_optional_derive => Shift(yy_state_587) - T_EOF | T_SEMI => Reduce(0, NT_optional_derive, yy_action_165) + T_DERIVE => Shift(yy_state_268) + T_LBRACE => Shift(yy_state_620) + NT_optional_derive => Shift(yy_state_624) + T_EOF | T_SEMI => Reduce(0, NT_optional_derive, yy_action_163) _ => Error } } -// [68, type_sig → nonempty_list(attribute) PRIV SUBERROR uident LBRACE • separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [148, enum_constructor → • UIDENT option(delimited(LPAREN,separated_nonempty_list(COMMA,constructor_param),RPAREN)) option(eq_tag), SEMI / RBRACE] -// [149, enum_constructor → • nonempty_list(attribute) UIDENT option(delimited(LPAREN,separated_nonempty_list(COMMA,constructor_param),RPAREN)) option(eq_tag), SEMI / RBRACE] -// [223, separated_list(SEMI,enum_constructor) → •, RBRACE] -// [224, separated_list(SEMI,enum_constructor) → • separated_nonempty_list(SEMI,enum_constructor), RBRACE] -// [252, nonempty_list(attribute) → • ATTRIBUTE, UIDENT] -// [253, nonempty_list(attribute) → • ATTRIBUTE nonempty_list(attribute), UIDENT] -// [260, separated_nonempty_list(SEMI,enum_constructor) → • enum_constructor, RBRACE] -// [261, separated_nonempty_list(SEMI,enum_constructor) → • enum_constructor SEMI separated_nonempty_list(SEMI,enum_constructor), RBRACE] -fn yy_state_583(_lookahead : YYSymbol) -> YYDecision { +// [72, type_sig → nonempty_list(attribute) PRIV SUBERROR uident LBRACE • separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [152, enum_constructor → • UIDENT option(delimited(LPAREN,separated_nonempty_list(COMMA,constructor_param),RPAREN)) option(eq_tag), SEMI / RBRACE] +// [153, enum_constructor → • nonempty_list(attribute) UIDENT option(delimited(LPAREN,separated_nonempty_list(COMMA,constructor_param),RPAREN)) option(eq_tag), SEMI / RBRACE] +// [228, separated_list(SEMI,enum_constructor) → •, RBRACE] +// [229, separated_list(SEMI,enum_constructor) → • separated_nonempty_list(SEMI,enum_constructor), RBRACE] +// [257, nonempty_list(attribute) → • ATTRIBUTE, UIDENT] +// [258, nonempty_list(attribute) → • ATTRIBUTE nonempty_list(attribute), UIDENT] +// [265, separated_nonempty_list(SEMI,enum_constructor) → • enum_constructor, RBRACE] +// [266, separated_nonempty_list(SEMI,enum_constructor) → • enum_constructor SEMI separated_nonempty_list(SEMI,enum_constructor), RBRACE] +fn yy_state_620(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_ATTRIBUTE => Shift(yy_state_19) - NT_enum_constructor => Shift(yy_state_202) - NT_nonempty_list_attribute_ => Shift(yy_state_205) - T_UIDENT => Shift(yy_state_224) - NT_separated_nonempty_list_SEMI_enum_constructor_ => Shift(yy_state_227) - NT_separated_list_SEMI_enum_constructor_ => Shift(yy_state_584) - T_RBRACE => Reduce(0, NT_separated_list_SEMI_enum_constructor_, yy_action_184) + NT_enum_constructor => Shift(yy_state_240) + NT_nonempty_list_attribute_ => Shift(yy_state_243) + T_UIDENT => Shift(yy_state_262) + NT_separated_nonempty_list_SEMI_enum_constructor_ => Shift(yy_state_265) + NT_separated_list_SEMI_enum_constructor_ => Shift(yy_state_621) + T_RBRACE => Reduce(0, NT_separated_list_SEMI_enum_constructor_, yy_action_182) _ => Error } } -// [68, type_sig → nonempty_list(attribute) PRIV SUBERROR uident LBRACE separated_list(SEMI,enum_constructor) • RBRACE optional_derive, EOF / SEMI] -fn yy_state_584(_lookahead : YYSymbol) -> YYDecision { +// [72, type_sig → nonempty_list(attribute) PRIV SUBERROR uident LBRACE separated_list(SEMI,enum_constructor) • RBRACE optional_derive, EOF / SEMI] +fn yy_state_621(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RBRACE => Shift(yy_state_585) + T_RBRACE => Shift(yy_state_622) _ => Error } } -// [68, type_sig → nonempty_list(attribute) PRIV SUBERROR uident LBRACE separated_list(SEMI,enum_constructor) RBRACE • optional_derive, EOF / SEMI] -// [100, optional_derive → •, EOF / SEMI] -// [101, optional_derive → • DERIVE LPAREN non_empty_list_commas(qualified_uident) RPAREN, EOF / SEMI] -fn yy_state_585(_lookahead : YYSymbol) -> YYDecision { +// [72, type_sig → nonempty_list(attribute) PRIV SUBERROR uident LBRACE separated_list(SEMI,enum_constructor) RBRACE • optional_derive, EOF / SEMI] +// [104, optional_derive → •, EOF / SEMI] +// [105, optional_derive → • DERIVE LPAREN non_empty_list_commas(qualified_uident) RPAREN, EOF / SEMI] +fn yy_state_622(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_DERIVE => Shift(yy_state_230) - NT_optional_derive => Shift(yy_state_586) - T_EOF | T_SEMI => Reduce(0, NT_optional_derive, yy_action_165) + T_DERIVE => Shift(yy_state_268) + NT_optional_derive => Shift(yy_state_623) + T_EOF | T_SEMI => Reduce(0, NT_optional_derive, yy_action_163) _ => Error } } -// [68, type_sig → nonempty_list(attribute) PRIV SUBERROR uident LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive •, EOF / SEMI] -fn yy_state_586(_lookahead : YYSymbol) -> YYDecision { +// [72, type_sig → nonempty_list(attribute) PRIV SUBERROR uident LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive •, EOF / SEMI] +fn yy_state_623(_lookahead : YYSymbol) -> YYDecision { ReduceNoLookahead(8, NT_type_sig, yy_action_68) } -// [62, type_sig → nonempty_list(attribute) PRIV SUBERROR uident optional_derive •, EOF / SEMI] -fn yy_state_587(_lookahead : YYSymbol) -> YYDecision { +// [66, type_sig → nonempty_list(attribute) PRIV SUBERROR uident optional_derive •, EOF / SEMI] +fn yy_state_624(_lookahead : YYSymbol) -> YYDecision { ReduceNoLookahead(5, NT_type_sig, yy_action_67) } -// [56, type_sig → nonempty_list(attribute) PRIV TYPE • type_decl_name_with_params optional_derive, EOF / SEMI] -// [128, alias_sig → nonempty_list(attribute) PRIV TYPE • type_decl_name_with_params EQUAL type_, EOF / SEMI] -// [164, type_decl_name_with_params → • uident optional_type_params_no_constraints, EOF / DERIVE / EQUAL / SEMI] -// [212, uident → • UIDENT, EOF / DERIVE / EQUAL / SEMI / LBRACKET] -fn yy_state_588(_lookahead : YYSymbol) -> YYDecision { +// [60, type_sig → nonempty_list(attribute) PRIV TYPE • type_decl_name_with_params optional_derive, EOF / SEMI] +// [132, alias_sig → nonempty_list(attribute) PRIV TYPE • type_decl_name_with_params EQUAL type_, EOF / SEMI] +// [168, type_decl_name_with_params → • uident optional_type_params_no_constraints, EOF / DERIVE / EQUAL / SEMI] +// [216, uident → • UIDENT, EOF / DERIVE / EQUAL / SEMI / LBRACKET] +fn yy_state_625(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_UIDENT => Shift(yy_state_25) - NT_uident => Shift(yy_state_246) - NT_type_decl_name_with_params => Shift(yy_state_589) + NT_uident => Shift(yy_state_284) + NT_type_decl_name_with_params => Shift(yy_state_626) _ => Error } } -// [56, type_sig → nonempty_list(attribute) PRIV TYPE type_decl_name_with_params • optional_derive, EOF / SEMI] -// [100, optional_derive → •, EOF / SEMI] -// [101, optional_derive → • DERIVE LPAREN non_empty_list_commas(qualified_uident) RPAREN, EOF / SEMI] -// [128, alias_sig → nonempty_list(attribute) PRIV TYPE type_decl_name_with_params • EQUAL type_, EOF / SEMI] -fn yy_state_589(_lookahead : YYSymbol) -> YYDecision { +// [60, type_sig → nonempty_list(attribute) PRIV TYPE type_decl_name_with_params • optional_derive, EOF / SEMI] +// [104, optional_derive → •, EOF / SEMI] +// [105, optional_derive → • DERIVE LPAREN non_empty_list_commas(qualified_uident) RPAREN, EOF / SEMI] +// [132, alias_sig → nonempty_list(attribute) PRIV TYPE type_decl_name_with_params • EQUAL type_, EOF / SEMI] +fn yy_state_626(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_DERIVE => Shift(yy_state_230) - T_EQUAL => Shift(yy_state_590) - NT_optional_derive => Shift(yy_state_592) - T_EOF | T_SEMI => Reduce(0, NT_optional_derive, yy_action_165) - _ => Error - } -} - -// [128, alias_sig → nonempty_list(attribute) PRIV TYPE type_decl_name_with_params EQUAL • type_, EOF / SEMI] -// [167, simple_type → • simple_type QUESTION, EOF / QUESTION / SEMI] -// [168, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, EOF / QUESTION / SEMI] -// [169, simple_type → • LPAREN type_ RPAREN, EOF / QUESTION / SEMI] -// [170, simple_type → • qualified_uident_ optional_type_arguments, EOF / QUESTION / SEMI] -// [171, simple_type → • AMPER qualified_uident_, EOF / QUESTION / SEMI] -// [172, simple_type → • UNDERSCORE, EOF / QUESTION / SEMI] -// [173, type_ → • simple_type, EOF / SEMI] -// [174, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] -// [175, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] -// [176, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] -// [177, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] -// [178, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] -// [179, type_ → • LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] -// [180, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] -// [181, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] -// [210, qualified_uident_ → • UIDENT, EOF / QUESTION / SEMI / LBRACKET] -// [211, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, EOF / QUESTION / SEMI / LBRACKET] -fn yy_state_590(_lookahead : YYSymbol) -> YYDecision { + T_DERIVE => Shift(yy_state_268) + T_EQUAL => Shift(yy_state_627) + NT_optional_derive => Shift(yy_state_629) + T_EOF | T_SEMI => Reduce(0, NT_optional_derive, yy_action_163) + _ => Error + } +} + +// [132, alias_sig → nonempty_list(attribute) PRIV TYPE type_decl_name_with_params EQUAL • type_, EOF / SEMI] +// [171, simple_type → • simple_type QUESTION, EOF / QUESTION / SEMI] +// [172, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, EOF / QUESTION / SEMI] +// [173, simple_type → • LPAREN type_ RPAREN, EOF / QUESTION / SEMI] +// [174, simple_type → • qualified_uident_ optional_type_arguments, EOF / QUESTION / SEMI] +// [175, simple_type → • AMPER qualified_uident_, EOF / QUESTION / SEMI] +// [176, simple_type → • UNDERSCORE, EOF / QUESTION / SEMI] +// [177, type_ → • simple_type, EOF / SEMI] +// [178, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] +// [179, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] +// [180, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] +// [181, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] +// [182, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] +// [183, type_ → • LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] +// [184, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] +// [185, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] +// [214, qualified_uident_ → • UIDENT, EOF / QUESTION / SEMI / LBRACKET] +// [215, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, EOF / QUESTION / SEMI / LBRACKET] +fn yy_state_627(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_PACKAGE_NAME => Shift(yy_state_62) T_UIDENT => Shift(yy_state_64) @@ -11609,96 +12451,102 @@ fn yy_state_590(_lookahead : YYSymbol) -> YYDecision { NT_qualified_uident_ => Shift(yy_state_78) T_LPAREN => Shift(yy_state_83) NT_simple_type => Shift(yy_state_106) - NT_type_ => Shift(yy_state_591) + NT_type_ => Shift(yy_state_628) _ => Error } } -// [128, alias_sig → nonempty_list(attribute) PRIV TYPE type_decl_name_with_params EQUAL type_ •, EOF / SEMI] -fn yy_state_591(_lookahead : YYSymbol) -> YYDecision { +// [132, alias_sig → nonempty_list(attribute) PRIV TYPE type_decl_name_with_params EQUAL type_ •, EOF / SEMI] +fn yy_state_628(_lookahead : YYSymbol) -> YYDecision { ReduceNoLookahead(6, NT_alias_sig, yy_action_66) } -// [56, type_sig → nonempty_list(attribute) PRIV TYPE type_decl_name_with_params optional_derive •, EOF / SEMI] -fn yy_state_592(_lookahead : YYSymbol) -> YYDecision { +// [60, type_sig → nonempty_list(attribute) PRIV TYPE type_decl_name_with_params optional_derive •, EOF / SEMI] +fn yy_state_629(_lookahead : YYSymbol) -> YYDecision { ReduceNoLookahead(5, NT_type_sig, yy_action_65) } // [45, func_sig → nonempty_list(attribute) PRIV FN • loption(type_params_with_constraints) func_name LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type, EOF / SEMI] -// [157, type_params_with_constraints → • LBRACKET separated_list(COMMA,type_param_with_constraints) RBRACKET, LIDENT / UIDENT / AMPER] -// [217, loption(type_params_with_constraints) → •, LIDENT / UIDENT / AMPER] -// [218, loption(type_params_with_constraints) → • type_params_with_constraints, LIDENT / UIDENT / AMPER] -fn yy_state_593(_lookahead : YYSymbol) -> YYDecision { +// [161, type_params_with_constraints → • LBRACKET separated_list(COMMA,type_param_with_constraints) RBRACKET, LIDENT / UIDENT / AMPER / EXTEND] +// [222, loption(type_params_with_constraints) → •, LIDENT / UIDENT / AMPER / EXTEND] +// [223, loption(type_params_with_constraints) → • type_params_with_constraints, LIDENT / UIDENT / AMPER / EXTEND] +fn yy_state_630(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACKET => Shift(yy_state_162) - NT_type_params_with_constraints => Shift(yy_state_291) - NT_loption_type_params_with_constraints_ => Shift(yy_state_594) - T_LIDENT | T_UIDENT | T_AMPER => Reduce(0, NT_loption_type_params_with_constraints_, yy_action_142) + NT_type_params_with_constraints => Shift(yy_state_143) + T_LBRACKET => Shift(yy_state_144) + NT_loption_type_params_with_constraints_ => Shift(yy_state_631) + T_LIDENT | T_UIDENT | T_AMPER | T_EXTEND => Reduce(0, NT_loption_type_params_with_constraints_, yy_action_217) _ => Error } } -// [28, method_self_type_coloncolon → • UIDENT COLONCOLON, LIDENT / UIDENT] -// [29, method_self_type_coloncolon → • AMPER UIDENT COLONCOLON, LIDENT / UIDENT] +// [28, method_self_type_coloncolon → • UIDENT COLONCOLON, LIDENT / UIDENT / EXTEND] +// [29, method_self_type_coloncolon → • AMPER UIDENT COLONCOLON, LIDENT / UIDENT / EXTEND] // [30, luident → • lident, LPAREN] // [31, luident → • uident, LPAREN] // [32, func_name → • luident, LPAREN] // [33, func_name → • method_self_type_coloncolon luident, LPAREN] // [45, func_sig → nonempty_list(attribute) PRIV FN loption(type_params_with_constraints) • func_name LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type, EOF / SEMI] -// [212, uident → • UIDENT, LPAREN] -// [213, lident → • LIDENT, LPAREN] -fn yy_state_594(_lookahead : YYSymbol) -> YYDecision { +// [216, uident → • UIDENT, LPAREN] +// [217, lident → • LIDENT, LPAREN] +// [218, lident → • EXTEND, LPAREN] +fn yy_state_631(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LIDENT => Shift(yy_state_38) - NT_method_self_type_coloncolon => Shift(yy_state_299) - NT_uident => Shift(yy_state_301) - NT_lident => Shift(yy_state_302) - NT_luident => Shift(yy_state_303) - T_AMPER => Shift(yy_state_304) - T_UIDENT => Shift(yy_state_307) - NT_func_name => Shift(yy_state_595) + T_EXTEND => Shift(yy_state_38) + T_LIDENT => Shift(yy_state_39) + NT_method_self_type_coloncolon => Shift(yy_state_336) + NT_uident => Shift(yy_state_338) + NT_lident => Shift(yy_state_339) + NT_luident => Shift(yy_state_340) + T_AMPER => Shift(yy_state_341) + T_UIDENT => Shift(yy_state_344) + NT_func_name => Shift(yy_state_632) _ => Error } } // [45, func_sig → nonempty_list(attribute) PRIV FN loption(type_params_with_constraints) func_name • LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type, EOF / SEMI] -fn yy_state_595(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_632(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LPAREN => Shift(yy_state_596) + T_LPAREN => Shift(yy_state_633) _ => Error } } // [45, func_sig → nonempty_list(attribute) PRIV FN loption(type_params_with_constraints) func_name LPAREN • separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type, EOF / SEMI] -// [167, simple_type → • simple_type QUESTION, RPAREN / COMMA / QUESTION] -// [168, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, RPAREN / COMMA / QUESTION] -// [169, simple_type → • LPAREN type_ RPAREN, RPAREN / COMMA / QUESTION] -// [170, simple_type → • qualified_uident_ optional_type_arguments, RPAREN / COMMA / QUESTION] -// [171, simple_type → • AMPER qualified_uident_, RPAREN / COMMA / QUESTION] -// [172, simple_type → • UNDERSCORE, RPAREN / COMMA / QUESTION] -// [173, type_ → • simple_type, RPAREN / COMMA] -// [174, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [175, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [176, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [177, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [178, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [179, type_ → • LPAREN RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [180, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [181, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [190, parameter → • type_, RPAREN / COMMA] -// [191, parameter → • POST_LABEL COLON type_, RPAREN / COMMA] -// [192, parameter → • label QUESTION COLON type_, RPAREN / COMMA] -// [210, qualified_uident_ → • UIDENT, RPAREN / COMMA / QUESTION / LBRACKET] -// [211, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, RPAREN / COMMA / QUESTION / LBRACKET] -// [214, label → • LIDENT, QUESTION] -// [219, separated_list(COMMA,parameter) → •, RPAREN] -// [220, separated_list(COMMA,parameter) → • separated_nonempty_list(COMMA,parameter), RPAREN] -// [258, separated_nonempty_list(COMMA,parameter) → • parameter, RPAREN] -// [259, separated_nonempty_list(COMMA,parameter) → • parameter COMMA separated_nonempty_list(COMMA,parameter), RPAREN] -fn yy_state_596(_lookahead : YYSymbol) -> YYDecision { +// [171, simple_type → • simple_type QUESTION, RPAREN / COMMA / QUESTION] +// [172, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, RPAREN / COMMA / QUESTION] +// [173, simple_type → • LPAREN type_ RPAREN, RPAREN / COMMA / QUESTION] +// [174, simple_type → • qualified_uident_ optional_type_arguments, RPAREN / COMMA / QUESTION] +// [175, simple_type → • AMPER qualified_uident_, RPAREN / COMMA / QUESTION] +// [176, simple_type → • UNDERSCORE, RPAREN / COMMA / QUESTION] +// [177, type_ → • simple_type, RPAREN / COMMA] +// [178, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [179, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [180, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [181, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [182, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [183, type_ → • LPAREN RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [184, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [185, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [194, parameter → • type_, RPAREN / COMMA] +// [195, parameter → • POST_LABEL COLON type_, RPAREN / COMMA] +// [196, parameter → • label QUESTION COLON type_, RPAREN / COMMA] +// [214, qualified_uident_ → • UIDENT, RPAREN / COMMA / QUESTION / LBRACKET] +// [215, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, RPAREN / COMMA / QUESTION / LBRACKET] +// [217, lident → • LIDENT, QUESTION] +// [218, lident → • EXTEND, QUESTION] +// [219, label → • lident, QUESTION] +// [224, separated_list(COMMA,parameter) → •, RPAREN] +// [225, separated_list(COMMA,parameter) → • separated_nonempty_list(COMMA,parameter), RPAREN] +// [263, separated_nonempty_list(COMMA,parameter) → • parameter, RPAREN] +// [264, separated_nonempty_list(COMMA,parameter) → • parameter COMMA separated_nonempty_list(COMMA,parameter), RPAREN] +fn yy_state_633(_lookahead : YYSymbol) -> YYDecision { match _lookahead { + T_EXTEND => Shift(yy_state_38) + T_LIDENT => Shift(yy_state_39) NT_parameter => Shift(yy_state_58) - T_LIDENT => Shift(yy_state_61) + NT_lident => Shift(yy_state_61) T_PACKAGE_NAME => Shift(yy_state_62) T_UIDENT => Shift(yy_state_64) NT_label => Shift(yy_state_65) @@ -11711,52 +12559,52 @@ fn yy_state_596(_lookahead : YYSymbol) -> YYDecision { T_POST_LABEL => Shift(yy_state_122) NT_type_ => Shift(yy_state_125) NT_separated_nonempty_list_COMMA_parameter_ => Shift(yy_state_126) - NT_separated_list_COMMA_parameter_ => Shift(yy_state_597) - T_RPAREN => Reduce(0, NT_separated_list_COMMA_parameter_, yy_action_256) + NT_separated_list_COMMA_parameter_ => Shift(yy_state_634) + T_RPAREN => Reduce(0, NT_separated_list_COMMA_parameter_, yy_action_260) _ => Error } } // [45, func_sig → nonempty_list(attribute) PRIV FN loption(type_params_with_constraints) func_name LPAREN separated_list(COMMA,parameter) • RPAREN THIN_ARROW return_type, EOF / SEMI] -fn yy_state_597(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_634(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RPAREN => Shift(yy_state_598) + T_RPAREN => Shift(yy_state_635) _ => Error } } // [45, func_sig → nonempty_list(attribute) PRIV FN loption(type_params_with_constraints) func_name LPAREN separated_list(COMMA,parameter) RPAREN • THIN_ARROW return_type, EOF / SEMI] -fn yy_state_598(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_635(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_THIN_ARROW => Shift(yy_state_599) + T_THIN_ARROW => Shift(yy_state_636) _ => Error } } // [45, func_sig → nonempty_list(attribute) PRIV FN loption(type_params_with_constraints) func_name LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW • return_type, EOF / SEMI] -// [167, simple_type → • simple_type QUESTION, EOF / RAISE / QUESTION / SEMI / NORAISE] -// [168, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, EOF / RAISE / QUESTION / SEMI / NORAISE] -// [169, simple_type → • LPAREN type_ RPAREN, EOF / RAISE / QUESTION / SEMI / NORAISE] -// [170, simple_type → • qualified_uident_ optional_type_arguments, EOF / RAISE / QUESTION / SEMI / NORAISE] -// [171, simple_type → • AMPER qualified_uident_, EOF / RAISE / QUESTION / SEMI / NORAISE] -// [172, simple_type → • UNDERSCORE, EOF / RAISE / QUESTION / SEMI / NORAISE] -// [173, type_ → • simple_type, EOF / SEMI] -// [174, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] -// [175, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] -// [176, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] -// [177, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] -// [178, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] -// [179, type_ → • LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] -// [180, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] -// [181, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] -// [182, return_type → • type_, EOF / SEMI] -// [183, return_type → • simple_type NORAISE, EOF / SEMI] -// [184, return_type → • simple_type RAISE, EOF / SEMI] -// [185, return_type → • simple_type RAISE error_type, EOF / SEMI] -// [186, return_type → • simple_type RAISE QUESTION, EOF / SEMI] -// [210, qualified_uident_ → • UIDENT, EOF / RAISE / QUESTION / SEMI / LBRACKET / NORAISE] -// [211, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, EOF / RAISE / QUESTION / SEMI / LBRACKET / NORAISE] -fn yy_state_599(_lookahead : YYSymbol) -> YYDecision { +// [171, simple_type → • simple_type QUESTION, EOF / RAISE / QUESTION / SEMI / NORAISE] +// [172, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, EOF / RAISE / QUESTION / SEMI / NORAISE] +// [173, simple_type → • LPAREN type_ RPAREN, EOF / RAISE / QUESTION / SEMI / NORAISE] +// [174, simple_type → • qualified_uident_ optional_type_arguments, EOF / RAISE / QUESTION / SEMI / NORAISE] +// [175, simple_type → • AMPER qualified_uident_, EOF / RAISE / QUESTION / SEMI / NORAISE] +// [176, simple_type → • UNDERSCORE, EOF / RAISE / QUESTION / SEMI / NORAISE] +// [177, type_ → • simple_type, EOF / SEMI] +// [178, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] +// [179, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] +// [180, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] +// [181, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] +// [182, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] +// [183, type_ → • LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] +// [184, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] +// [185, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] +// [186, return_type → • type_, EOF / SEMI] +// [187, return_type → • simple_type NORAISE, EOF / SEMI] +// [188, return_type → • simple_type RAISE, EOF / SEMI] +// [189, return_type → • simple_type RAISE error_type, EOF / SEMI] +// [190, return_type → • simple_type RAISE QUESTION, EOF / SEMI] +// [214, qualified_uident_ → • UIDENT, EOF / RAISE / QUESTION / SEMI / LBRACKET / NORAISE] +// [215, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, EOF / RAISE / QUESTION / SEMI / LBRACKET / NORAISE] +fn yy_state_636(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_PACKAGE_NAME => Shift(yy_state_62) T_UIDENT => Shift(yy_state_64) @@ -11767,99 +12615,105 @@ fn yy_state_599(_lookahead : YYSymbol) -> YYDecision { NT_qualified_uident_ => Shift(yy_state_78) T_LPAREN => Shift(yy_state_83) NT_simple_type => Shift(yy_state_87) - NT_return_type => Shift(yy_state_600) + NT_return_type => Shift(yy_state_637) _ => Error } } // [45, func_sig → nonempty_list(attribute) PRIV FN loption(type_params_with_constraints) func_name LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type •, EOF / SEMI] -fn yy_state_600(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_637(_lookahead : YYSymbol) -> YYDecision { ReduceNoLookahead(10, NT_func_sig, yy_action_64) } // [44, func_sig → nonempty_list(attribute) PRIV ASYNC • FN loption(type_params_with_constraints) func_name LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type, EOF / SEMI] -fn yy_state_601(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_638(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_FN => Shift(yy_state_602) + T_FN => Shift(yy_state_639) _ => Error } } // [44, func_sig → nonempty_list(attribute) PRIV ASYNC FN • loption(type_params_with_constraints) func_name LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type, EOF / SEMI] -// [157, type_params_with_constraints → • LBRACKET separated_list(COMMA,type_param_with_constraints) RBRACKET, LIDENT / UIDENT / AMPER] -// [217, loption(type_params_with_constraints) → •, LIDENT / UIDENT / AMPER] -// [218, loption(type_params_with_constraints) → • type_params_with_constraints, LIDENT / UIDENT / AMPER] -fn yy_state_602(_lookahead : YYSymbol) -> YYDecision { +// [161, type_params_with_constraints → • LBRACKET separated_list(COMMA,type_param_with_constraints) RBRACKET, LIDENT / UIDENT / AMPER / EXTEND] +// [222, loption(type_params_with_constraints) → •, LIDENT / UIDENT / AMPER / EXTEND] +// [223, loption(type_params_with_constraints) → • type_params_with_constraints, LIDENT / UIDENT / AMPER / EXTEND] +fn yy_state_639(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACKET => Shift(yy_state_162) - NT_type_params_with_constraints => Shift(yy_state_291) - NT_loption_type_params_with_constraints_ => Shift(yy_state_603) - T_LIDENT | T_UIDENT | T_AMPER => Reduce(0, NT_loption_type_params_with_constraints_, yy_action_142) + NT_type_params_with_constraints => Shift(yy_state_143) + T_LBRACKET => Shift(yy_state_144) + NT_loption_type_params_with_constraints_ => Shift(yy_state_640) + T_LIDENT | T_UIDENT | T_AMPER | T_EXTEND => Reduce(0, NT_loption_type_params_with_constraints_, yy_action_217) _ => Error } } -// [28, method_self_type_coloncolon → • UIDENT COLONCOLON, LIDENT / UIDENT] -// [29, method_self_type_coloncolon → • AMPER UIDENT COLONCOLON, LIDENT / UIDENT] +// [28, method_self_type_coloncolon → • UIDENT COLONCOLON, LIDENT / UIDENT / EXTEND] +// [29, method_self_type_coloncolon → • AMPER UIDENT COLONCOLON, LIDENT / UIDENT / EXTEND] // [30, luident → • lident, LPAREN] // [31, luident → • uident, LPAREN] // [32, func_name → • luident, LPAREN] // [33, func_name → • method_self_type_coloncolon luident, LPAREN] // [44, func_sig → nonempty_list(attribute) PRIV ASYNC FN loption(type_params_with_constraints) • func_name LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type, EOF / SEMI] -// [212, uident → • UIDENT, LPAREN] -// [213, lident → • LIDENT, LPAREN] -fn yy_state_603(_lookahead : YYSymbol) -> YYDecision { +// [216, uident → • UIDENT, LPAREN] +// [217, lident → • LIDENT, LPAREN] +// [218, lident → • EXTEND, LPAREN] +fn yy_state_640(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LIDENT => Shift(yy_state_38) - NT_method_self_type_coloncolon => Shift(yy_state_299) - NT_uident => Shift(yy_state_301) - NT_lident => Shift(yy_state_302) - NT_luident => Shift(yy_state_303) - T_AMPER => Shift(yy_state_304) - T_UIDENT => Shift(yy_state_307) - NT_func_name => Shift(yy_state_604) + T_EXTEND => Shift(yy_state_38) + T_LIDENT => Shift(yy_state_39) + NT_method_self_type_coloncolon => Shift(yy_state_336) + NT_uident => Shift(yy_state_338) + NT_lident => Shift(yy_state_339) + NT_luident => Shift(yy_state_340) + T_AMPER => Shift(yy_state_341) + T_UIDENT => Shift(yy_state_344) + NT_func_name => Shift(yy_state_641) _ => Error } } // [44, func_sig → nonempty_list(attribute) PRIV ASYNC FN loption(type_params_with_constraints) func_name • LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type, EOF / SEMI] -fn yy_state_604(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_641(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LPAREN => Shift(yy_state_605) + T_LPAREN => Shift(yy_state_642) _ => Error } } // [44, func_sig → nonempty_list(attribute) PRIV ASYNC FN loption(type_params_with_constraints) func_name LPAREN • separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type, EOF / SEMI] -// [167, simple_type → • simple_type QUESTION, RPAREN / COMMA / QUESTION] -// [168, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, RPAREN / COMMA / QUESTION] -// [169, simple_type → • LPAREN type_ RPAREN, RPAREN / COMMA / QUESTION] -// [170, simple_type → • qualified_uident_ optional_type_arguments, RPAREN / COMMA / QUESTION] -// [171, simple_type → • AMPER qualified_uident_, RPAREN / COMMA / QUESTION] -// [172, simple_type → • UNDERSCORE, RPAREN / COMMA / QUESTION] -// [173, type_ → • simple_type, RPAREN / COMMA] -// [174, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [175, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [176, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [177, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [178, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [179, type_ → • LPAREN RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [180, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [181, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [190, parameter → • type_, RPAREN / COMMA] -// [191, parameter → • POST_LABEL COLON type_, RPAREN / COMMA] -// [192, parameter → • label QUESTION COLON type_, RPAREN / COMMA] -// [210, qualified_uident_ → • UIDENT, RPAREN / COMMA / QUESTION / LBRACKET] -// [211, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, RPAREN / COMMA / QUESTION / LBRACKET] -// [214, label → • LIDENT, QUESTION] -// [219, separated_list(COMMA,parameter) → •, RPAREN] -// [220, separated_list(COMMA,parameter) → • separated_nonempty_list(COMMA,parameter), RPAREN] -// [258, separated_nonempty_list(COMMA,parameter) → • parameter, RPAREN] -// [259, separated_nonempty_list(COMMA,parameter) → • parameter COMMA separated_nonempty_list(COMMA,parameter), RPAREN] -fn yy_state_605(_lookahead : YYSymbol) -> YYDecision { +// [171, simple_type → • simple_type QUESTION, RPAREN / COMMA / QUESTION] +// [172, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, RPAREN / COMMA / QUESTION] +// [173, simple_type → • LPAREN type_ RPAREN, RPAREN / COMMA / QUESTION] +// [174, simple_type → • qualified_uident_ optional_type_arguments, RPAREN / COMMA / QUESTION] +// [175, simple_type → • AMPER qualified_uident_, RPAREN / COMMA / QUESTION] +// [176, simple_type → • UNDERSCORE, RPAREN / COMMA / QUESTION] +// [177, type_ → • simple_type, RPAREN / COMMA] +// [178, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [179, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [180, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [181, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [182, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [183, type_ → • LPAREN RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [184, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [185, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [194, parameter → • type_, RPAREN / COMMA] +// [195, parameter → • POST_LABEL COLON type_, RPAREN / COMMA] +// [196, parameter → • label QUESTION COLON type_, RPAREN / COMMA] +// [214, qualified_uident_ → • UIDENT, RPAREN / COMMA / QUESTION / LBRACKET] +// [215, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, RPAREN / COMMA / QUESTION / LBRACKET] +// [217, lident → • LIDENT, QUESTION] +// [218, lident → • EXTEND, QUESTION] +// [219, label → • lident, QUESTION] +// [224, separated_list(COMMA,parameter) → •, RPAREN] +// [225, separated_list(COMMA,parameter) → • separated_nonempty_list(COMMA,parameter), RPAREN] +// [263, separated_nonempty_list(COMMA,parameter) → • parameter, RPAREN] +// [264, separated_nonempty_list(COMMA,parameter) → • parameter COMMA separated_nonempty_list(COMMA,parameter), RPAREN] +fn yy_state_642(_lookahead : YYSymbol) -> YYDecision { match _lookahead { + T_EXTEND => Shift(yy_state_38) + T_LIDENT => Shift(yy_state_39) NT_parameter => Shift(yy_state_58) - T_LIDENT => Shift(yy_state_61) + NT_lident => Shift(yy_state_61) T_PACKAGE_NAME => Shift(yy_state_62) T_UIDENT => Shift(yy_state_64) NT_label => Shift(yy_state_65) @@ -11872,52 +12726,52 @@ fn yy_state_605(_lookahead : YYSymbol) -> YYDecision { T_POST_LABEL => Shift(yy_state_122) NT_type_ => Shift(yy_state_125) NT_separated_nonempty_list_COMMA_parameter_ => Shift(yy_state_126) - NT_separated_list_COMMA_parameter_ => Shift(yy_state_606) - T_RPAREN => Reduce(0, NT_separated_list_COMMA_parameter_, yy_action_256) + NT_separated_list_COMMA_parameter_ => Shift(yy_state_643) + T_RPAREN => Reduce(0, NT_separated_list_COMMA_parameter_, yy_action_260) _ => Error } } // [44, func_sig → nonempty_list(attribute) PRIV ASYNC FN loption(type_params_with_constraints) func_name LPAREN separated_list(COMMA,parameter) • RPAREN THIN_ARROW return_type, EOF / SEMI] -fn yy_state_606(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_643(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RPAREN => Shift(yy_state_607) + T_RPAREN => Shift(yy_state_644) _ => Error } } // [44, func_sig → nonempty_list(attribute) PRIV ASYNC FN loption(type_params_with_constraints) func_name LPAREN separated_list(COMMA,parameter) RPAREN • THIN_ARROW return_type, EOF / SEMI] -fn yy_state_607(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_644(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_THIN_ARROW => Shift(yy_state_608) + T_THIN_ARROW => Shift(yy_state_645) _ => Error } } // [44, func_sig → nonempty_list(attribute) PRIV ASYNC FN loption(type_params_with_constraints) func_name LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW • return_type, EOF / SEMI] -// [167, simple_type → • simple_type QUESTION, EOF / RAISE / QUESTION / SEMI / NORAISE] -// [168, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, EOF / RAISE / QUESTION / SEMI / NORAISE] -// [169, simple_type → • LPAREN type_ RPAREN, EOF / RAISE / QUESTION / SEMI / NORAISE] -// [170, simple_type → • qualified_uident_ optional_type_arguments, EOF / RAISE / QUESTION / SEMI / NORAISE] -// [171, simple_type → • AMPER qualified_uident_, EOF / RAISE / QUESTION / SEMI / NORAISE] -// [172, simple_type → • UNDERSCORE, EOF / RAISE / QUESTION / SEMI / NORAISE] -// [173, type_ → • simple_type, EOF / SEMI] -// [174, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] -// [175, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] -// [176, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] -// [177, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] -// [178, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] -// [179, type_ → • LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] -// [180, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] -// [181, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] -// [182, return_type → • type_, EOF / SEMI] -// [183, return_type → • simple_type NORAISE, EOF / SEMI] -// [184, return_type → • simple_type RAISE, EOF / SEMI] -// [185, return_type → • simple_type RAISE error_type, EOF / SEMI] -// [186, return_type → • simple_type RAISE QUESTION, EOF / SEMI] -// [210, qualified_uident_ → • UIDENT, EOF / RAISE / QUESTION / SEMI / LBRACKET / NORAISE] -// [211, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, EOF / RAISE / QUESTION / SEMI / LBRACKET / NORAISE] -fn yy_state_608(_lookahead : YYSymbol) -> YYDecision { +// [171, simple_type → • simple_type QUESTION, EOF / RAISE / QUESTION / SEMI / NORAISE] +// [172, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, EOF / RAISE / QUESTION / SEMI / NORAISE] +// [173, simple_type → • LPAREN type_ RPAREN, EOF / RAISE / QUESTION / SEMI / NORAISE] +// [174, simple_type → • qualified_uident_ optional_type_arguments, EOF / RAISE / QUESTION / SEMI / NORAISE] +// [175, simple_type → • AMPER qualified_uident_, EOF / RAISE / QUESTION / SEMI / NORAISE] +// [176, simple_type → • UNDERSCORE, EOF / RAISE / QUESTION / SEMI / NORAISE] +// [177, type_ → • simple_type, EOF / SEMI] +// [178, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] +// [179, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] +// [180, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] +// [181, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] +// [182, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] +// [183, type_ → • LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] +// [184, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] +// [185, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] +// [186, return_type → • type_, EOF / SEMI] +// [187, return_type → • simple_type NORAISE, EOF / SEMI] +// [188, return_type → • simple_type RAISE, EOF / SEMI] +// [189, return_type → • simple_type RAISE error_type, EOF / SEMI] +// [190, return_type → • simple_type RAISE QUESTION, EOF / SEMI] +// [214, qualified_uident_ → • UIDENT, EOF / RAISE / QUESTION / SEMI / LBRACKET / NORAISE] +// [215, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, EOF / RAISE / QUESTION / SEMI / LBRACKET / NORAISE] +fn yy_state_645(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_PACKAGE_NAME => Shift(yy_state_62) T_UIDENT => Shift(yy_state_64) @@ -11928,53 +12782,55 @@ fn yy_state_608(_lookahead : YYSymbol) -> YYDecision { NT_qualified_uident_ => Shift(yy_state_78) T_LPAREN => Shift(yy_state_83) NT_simple_type => Shift(yy_state_87) - NT_return_type => Shift(yy_state_609) + NT_return_type => Shift(yy_state_646) _ => Error } } // [44, func_sig → nonempty_list(attribute) PRIV ASYNC FN loption(type_params_with_constraints) func_name LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type •, EOF / SEMI] -fn yy_state_609(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_646(_lookahead : YYSymbol) -> YYDecision { ReduceNoLookahead(11, NT_func_sig, yy_action_63) } // [26, value_sig → nonempty_list(attribute) PRIV LET • lident COLON type_, EOF / SEMI] -// [213, lident → • LIDENT, COLON] -fn yy_state_610(_lookahead : YYSymbol) -> YYDecision { +// [217, lident → • LIDENT, COLON] +// [218, lident → • EXTEND, COLON] +fn yy_state_647(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LIDENT => Shift(yy_state_38) - NT_lident => Shift(yy_state_611) + T_EXTEND => Shift(yy_state_38) + T_LIDENT => Shift(yy_state_39) + NT_lident => Shift(yy_state_648) _ => Error } } // [26, value_sig → nonempty_list(attribute) PRIV LET lident • COLON type_, EOF / SEMI] -fn yy_state_611(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_648(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_COLON => Shift(yy_state_612) + T_COLON => Shift(yy_state_649) _ => Error } } // [26, value_sig → nonempty_list(attribute) PRIV LET lident COLON • type_, EOF / SEMI] -// [167, simple_type → • simple_type QUESTION, EOF / QUESTION / SEMI] -// [168, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, EOF / QUESTION / SEMI] -// [169, simple_type → • LPAREN type_ RPAREN, EOF / QUESTION / SEMI] -// [170, simple_type → • qualified_uident_ optional_type_arguments, EOF / QUESTION / SEMI] -// [171, simple_type → • AMPER qualified_uident_, EOF / QUESTION / SEMI] -// [172, simple_type → • UNDERSCORE, EOF / QUESTION / SEMI] -// [173, type_ → • simple_type, EOF / SEMI] -// [174, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] -// [175, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] -// [176, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] -// [177, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] -// [178, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] -// [179, type_ → • LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] -// [180, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] -// [181, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] -// [210, qualified_uident_ → • UIDENT, EOF / QUESTION / SEMI / LBRACKET] -// [211, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, EOF / QUESTION / SEMI / LBRACKET] -fn yy_state_612(_lookahead : YYSymbol) -> YYDecision { +// [171, simple_type → • simple_type QUESTION, EOF / QUESTION / SEMI] +// [172, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, EOF / QUESTION / SEMI] +// [173, simple_type → • LPAREN type_ RPAREN, EOF / QUESTION / SEMI] +// [174, simple_type → • qualified_uident_ optional_type_arguments, EOF / QUESTION / SEMI] +// [175, simple_type → • AMPER qualified_uident_, EOF / QUESTION / SEMI] +// [176, simple_type → • UNDERSCORE, EOF / QUESTION / SEMI] +// [177, type_ → • simple_type, EOF / SEMI] +// [178, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] +// [179, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] +// [180, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] +// [181, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] +// [182, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] +// [183, type_ → • LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] +// [184, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] +// [185, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] +// [214, qualified_uident_ → • UIDENT, EOF / QUESTION / SEMI / LBRACKET] +// [215, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, EOF / QUESTION / SEMI / LBRACKET] +fn yy_state_649(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_PACKAGE_NAME => Shift(yy_state_62) T_UIDENT => Shift(yy_state_64) @@ -11984,53 +12840,53 @@ fn yy_state_612(_lookahead : YYSymbol) -> YYDecision { NT_qualified_uident_ => Shift(yy_state_78) T_LPAREN => Shift(yy_state_83) NT_simple_type => Shift(yy_state_106) - NT_type_ => Shift(yy_state_613) + NT_type_ => Shift(yy_state_650) _ => Error } } // [26, value_sig → nonempty_list(attribute) PRIV LET lident COLON type_ •, EOF / SEMI] -fn yy_state_613(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_650(_lookahead : YYSymbol) -> YYDecision { ReduceNoLookahead(6, NT_value_sig, yy_action_62) } // [20, const_sig → nonempty_list(attribute) PRIV CONST • uident COLON type_ EQUAL constant, EOF / SEMI] -// [212, uident → • UIDENT, COLON] -fn yy_state_614(_lookahead : YYSymbol) -> YYDecision { +// [216, uident → • UIDENT, COLON] +fn yy_state_651(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_UIDENT => Shift(yy_state_25) - NT_uident => Shift(yy_state_615) + NT_uident => Shift(yy_state_652) _ => Error } } // [20, const_sig → nonempty_list(attribute) PRIV CONST uident • COLON type_ EQUAL constant, EOF / SEMI] -fn yy_state_615(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_652(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_COLON => Shift(yy_state_616) + T_COLON => Shift(yy_state_653) _ => Error } } // [20, const_sig → nonempty_list(attribute) PRIV CONST uident COLON • type_ EQUAL constant, EOF / SEMI] -// [167, simple_type → • simple_type QUESTION, EQUAL / QUESTION] -// [168, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, EQUAL / QUESTION] -// [169, simple_type → • LPAREN type_ RPAREN, EQUAL / QUESTION] -// [170, simple_type → • qualified_uident_ optional_type_arguments, EQUAL / QUESTION] -// [171, simple_type → • AMPER qualified_uident_, EQUAL / QUESTION] -// [172, simple_type → • UNDERSCORE, EQUAL / QUESTION] -// [173, type_ → • simple_type, EQUAL] -// [174, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EQUAL] -// [175, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EQUAL] -// [176, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EQUAL] -// [177, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EQUAL] -// [178, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, EQUAL] -// [179, type_ → • LPAREN RPAREN THIN_ARROW return_type, EQUAL] -// [180, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, EQUAL] -// [181, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, EQUAL] -// [210, qualified_uident_ → • UIDENT, EQUAL / QUESTION / LBRACKET] -// [211, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, EQUAL / QUESTION / LBRACKET] -fn yy_state_616(_lookahead : YYSymbol) -> YYDecision { +// [171, simple_type → • simple_type QUESTION, EQUAL / QUESTION] +// [172, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, EQUAL / QUESTION] +// [173, simple_type → • LPAREN type_ RPAREN, EQUAL / QUESTION] +// [174, simple_type → • qualified_uident_ optional_type_arguments, EQUAL / QUESTION] +// [175, simple_type → • AMPER qualified_uident_, EQUAL / QUESTION] +// [176, simple_type → • UNDERSCORE, EQUAL / QUESTION] +// [177, type_ → • simple_type, EQUAL] +// [178, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EQUAL] +// [179, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EQUAL] +// [180, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EQUAL] +// [181, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EQUAL] +// [182, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, EQUAL] +// [183, type_ → • LPAREN RPAREN THIN_ARROW return_type, EQUAL] +// [184, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, EQUAL] +// [185, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, EQUAL] +// [214, qualified_uident_ → • UIDENT, EQUAL / QUESTION / LBRACKET] +// [215, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, EQUAL / QUESTION / LBRACKET] +fn yy_state_653(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_PACKAGE_NAME => Shift(yy_state_62) T_UIDENT => Shift(yy_state_64) @@ -12040,91 +12896,91 @@ fn yy_state_616(_lookahead : YYSymbol) -> YYDecision { NT_qualified_uident_ => Shift(yy_state_78) T_LPAREN => Shift(yy_state_83) NT_simple_type => Shift(yy_state_106) - NT_type_ => Shift(yy_state_617) + NT_type_ => Shift(yy_state_654) _ => Error } } // [20, const_sig → nonempty_list(attribute) PRIV CONST uident COLON type_ • EQUAL constant, EOF / SEMI] -fn yy_state_617(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_654(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_EQUAL => Shift(yy_state_618) + T_EQUAL => Shift(yy_state_655) _ => Error } } // [20, const_sig → nonempty_list(attribute) PRIV CONST uident COLON type_ EQUAL • constant, EOF / SEMI] -// [193, constant → • TRUE, EOF / SEMI] -// [194, constant → • FALSE, EOF / SEMI] -// [195, constant → • BYTE, EOF / SEMI] -// [196, constant → • BYTES, EOF / SEMI] -// [197, constant → • CHAR, EOF / SEMI] -// [198, constant → • INT, EOF / SEMI] -// [199, constant → • MINUS INT, EOF / SEMI] -// [200, constant → • FLOAT, EOF / SEMI] -// [201, constant → • MINUS FLOAT, EOF / SEMI] -// [202, constant → • DOUBLE, EOF / SEMI] -// [203, constant → • MINUS DOUBLE, EOF / SEMI] -// [204, constant → • STRING, EOF / SEMI] -fn yy_state_618(_lookahead : YYSymbol) -> YYDecision { +// [197, constant → • TRUE, EOF / SEMI] +// [198, constant → • FALSE, EOF / SEMI] +// [199, constant → • BYTE, EOF / SEMI] +// [200, constant → • BYTES, EOF / SEMI] +// [201, constant → • CHAR, EOF / SEMI] +// [202, constant → • INT, EOF / SEMI] +// [203, constant → • MINUS INT, EOF / SEMI] +// [204, constant → • FLOAT, EOF / SEMI] +// [205, constant → • MINUS FLOAT, EOF / SEMI] +// [206, constant → • DOUBLE, EOF / SEMI] +// [207, constant → • MINUS DOUBLE, EOF / SEMI] +// [208, constant → • STRING, EOF / SEMI] +fn yy_state_655(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_STRING => Shift(yy_state_511) - T_DOUBLE => Shift(yy_state_512) - T_FLOAT => Shift(yy_state_513) - T_MINUS => Shift(yy_state_514) - T_INT => Shift(yy_state_518) - T_CHAR => Shift(yy_state_519) - T_BYTES => Shift(yy_state_520) - T_BYTE => Shift(yy_state_521) - T_FALSE => Shift(yy_state_522) - T_TRUE => Shift(yy_state_523) - NT_constant => Shift(yy_state_619) + T_STRING => Shift(yy_state_548) + T_DOUBLE => Shift(yy_state_549) + T_FLOAT => Shift(yy_state_550) + T_MINUS => Shift(yy_state_551) + T_INT => Shift(yy_state_555) + T_CHAR => Shift(yy_state_556) + T_BYTES => Shift(yy_state_557) + T_BYTE => Shift(yy_state_558) + T_FALSE => Shift(yy_state_559) + T_TRUE => Shift(yy_state_560) + NT_constant => Shift(yy_state_656) _ => Error } } // [20, const_sig → nonempty_list(attribute) PRIV CONST uident COLON type_ EQUAL constant •, EOF / SEMI] -fn yy_state_619(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_656(_lookahead : YYSymbol) -> YYDecision { ReduceNoLookahead(8, NT_const_sig, yy_action_61) } // [19, const_sig → nonempty_list(attribute) CONST • uident COLON type_ EQUAL constant, EOF / SEMI] -// [212, uident → • UIDENT, COLON] -fn yy_state_620(_lookahead : YYSymbol) -> YYDecision { +// [216, uident → • UIDENT, COLON] +fn yy_state_657(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_UIDENT => Shift(yy_state_25) - NT_uident => Shift(yy_state_621) + NT_uident => Shift(yy_state_658) _ => Error } } // [19, const_sig → nonempty_list(attribute) CONST uident • COLON type_ EQUAL constant, EOF / SEMI] -fn yy_state_621(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_658(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_COLON => Shift(yy_state_622) + T_COLON => Shift(yy_state_659) _ => Error } } // [19, const_sig → nonempty_list(attribute) CONST uident COLON • type_ EQUAL constant, EOF / SEMI] -// [167, simple_type → • simple_type QUESTION, EQUAL / QUESTION] -// [168, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, EQUAL / QUESTION] -// [169, simple_type → • LPAREN type_ RPAREN, EQUAL / QUESTION] -// [170, simple_type → • qualified_uident_ optional_type_arguments, EQUAL / QUESTION] -// [171, simple_type → • AMPER qualified_uident_, EQUAL / QUESTION] -// [172, simple_type → • UNDERSCORE, EQUAL / QUESTION] -// [173, type_ → • simple_type, EQUAL] -// [174, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EQUAL] -// [175, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EQUAL] -// [176, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EQUAL] -// [177, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EQUAL] -// [178, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, EQUAL] -// [179, type_ → • LPAREN RPAREN THIN_ARROW return_type, EQUAL] -// [180, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, EQUAL] -// [181, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, EQUAL] -// [210, qualified_uident_ → • UIDENT, EQUAL / QUESTION / LBRACKET] -// [211, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, EQUAL / QUESTION / LBRACKET] -fn yy_state_622(_lookahead : YYSymbol) -> YYDecision { +// [171, simple_type → • simple_type QUESTION, EQUAL / QUESTION] +// [172, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, EQUAL / QUESTION] +// [173, simple_type → • LPAREN type_ RPAREN, EQUAL / QUESTION] +// [174, simple_type → • qualified_uident_ optional_type_arguments, EQUAL / QUESTION] +// [175, simple_type → • AMPER qualified_uident_, EQUAL / QUESTION] +// [176, simple_type → • UNDERSCORE, EQUAL / QUESTION] +// [177, type_ → • simple_type, EQUAL] +// [178, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EQUAL] +// [179, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EQUAL] +// [180, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EQUAL] +// [181, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EQUAL] +// [182, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, EQUAL] +// [183, type_ → • LPAREN RPAREN THIN_ARROW return_type, EQUAL] +// [184, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, EQUAL] +// [185, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, EQUAL] +// [214, qualified_uident_ → • UIDENT, EQUAL / QUESTION / LBRACKET] +// [215, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, EQUAL / QUESTION / LBRACKET] +fn yy_state_659(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_PACKAGE_NAME => Shift(yy_state_62) T_UIDENT => Shift(yy_state_64) @@ -12134,51 +12990,51 @@ fn yy_state_622(_lookahead : YYSymbol) -> YYDecision { NT_qualified_uident_ => Shift(yy_state_78) T_LPAREN => Shift(yy_state_83) NT_simple_type => Shift(yy_state_106) - NT_type_ => Shift(yy_state_623) + NT_type_ => Shift(yy_state_660) _ => Error } } // [19, const_sig → nonempty_list(attribute) CONST uident COLON type_ • EQUAL constant, EOF / SEMI] -fn yy_state_623(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_660(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_EQUAL => Shift(yy_state_624) + T_EQUAL => Shift(yy_state_661) _ => Error } } // [19, const_sig → nonempty_list(attribute) CONST uident COLON type_ EQUAL • constant, EOF / SEMI] -// [193, constant → • TRUE, EOF / SEMI] -// [194, constant → • FALSE, EOF / SEMI] -// [195, constant → • BYTE, EOF / SEMI] -// [196, constant → • BYTES, EOF / SEMI] -// [197, constant → • CHAR, EOF / SEMI] -// [198, constant → • INT, EOF / SEMI] -// [199, constant → • MINUS INT, EOF / SEMI] -// [200, constant → • FLOAT, EOF / SEMI] -// [201, constant → • MINUS FLOAT, EOF / SEMI] -// [202, constant → • DOUBLE, EOF / SEMI] -// [203, constant → • MINUS DOUBLE, EOF / SEMI] -// [204, constant → • STRING, EOF / SEMI] -fn yy_state_624(_lookahead : YYSymbol) -> YYDecision { +// [197, constant → • TRUE, EOF / SEMI] +// [198, constant → • FALSE, EOF / SEMI] +// [199, constant → • BYTE, EOF / SEMI] +// [200, constant → • BYTES, EOF / SEMI] +// [201, constant → • CHAR, EOF / SEMI] +// [202, constant → • INT, EOF / SEMI] +// [203, constant → • MINUS INT, EOF / SEMI] +// [204, constant → • FLOAT, EOF / SEMI] +// [205, constant → • MINUS FLOAT, EOF / SEMI] +// [206, constant → • DOUBLE, EOF / SEMI] +// [207, constant → • MINUS DOUBLE, EOF / SEMI] +// [208, constant → • STRING, EOF / SEMI] +fn yy_state_661(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_STRING => Shift(yy_state_511) - T_DOUBLE => Shift(yy_state_512) - T_FLOAT => Shift(yy_state_513) - T_MINUS => Shift(yy_state_514) - T_INT => Shift(yy_state_518) - T_CHAR => Shift(yy_state_519) - T_BYTES => Shift(yy_state_520) - T_BYTE => Shift(yy_state_521) - T_FALSE => Shift(yy_state_522) - T_TRUE => Shift(yy_state_523) - NT_constant => Shift(yy_state_625) + T_STRING => Shift(yy_state_548) + T_DOUBLE => Shift(yy_state_549) + T_FLOAT => Shift(yy_state_550) + T_MINUS => Shift(yy_state_551) + T_INT => Shift(yy_state_555) + T_CHAR => Shift(yy_state_556) + T_BYTES => Shift(yy_state_557) + T_BYTE => Shift(yy_state_558) + T_FALSE => Shift(yy_state_559) + T_TRUE => Shift(yy_state_560) + NT_constant => Shift(yy_state_662) _ => Error } } // [19, const_sig → nonempty_list(attribute) CONST uident COLON type_ EQUAL constant •, EOF / SEMI] -fn yy_state_625(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_662(_lookahead : YYSymbol) -> YYDecision { ReduceNoLookahead(7, NT_const_sig, yy_action_59) } @@ -12186,28 +13042,28 @@ fn yy_state_625(_lookahead : YYSymbol) -> YYDecision { // [24, value_sig → PUB • pub_attr LET lident COLON type_, EOF / SEMI] // [40, func_sig → PUB • pub_attr ASYNC FN loption(type_params_with_constraints) func_name LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type, EOF / SEMI] // [41, func_sig → PUB • pub_attr FN loption(type_params_with_constraints) func_name LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type, EOF / SEMI] -// [54, type_sig → PUB • pub_attr TYPE type_decl_name_with_params optional_derive, EOF / SEMI] -// [60, type_sig → PUB • pub_attr SUBERROR uident optional_derive, EOF / SEMI] -// [66, type_sig → PUB • pub_attr SUBERROR uident LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [72, type_sig → PUB • pub_attr STRUCT type_decl_name_with_params LBRACE record_decl_body RBRACE optional_derive, EOF / SEMI] -// [78, type_sig → PUB • pub_attr STRUCT type_decl_name_with_params LPAREN separated_list(COMMA,type_) RPAREN optional_derive, EOF / SEMI] -// [84, type_sig → PUB • pub_attr ENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [90, type_sig → PUB • pub_attr EXTENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [96, type_sig → PUB • pub_attr EXTENUM extensible_enum_extension_target PLUS_EQUAL LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [104, impl_sig → PUB • pub_attr IMPL type_params_with_constraints qualified_uident FOR type_, EOF / SEMI] -// [110, impl_sig → PUB • pub_attr IMPL qualified_uident FOR type_, EOF / SEMI] -// [116, trait_sig → PUB • pub_attr TRAIT uident loption(preceded(COLON,separated_nonempty_list(PLUS,qualified_uident))) trait_body, EOF / SEMI] -// [126, alias_sig → PUB • pub_attr TYPE type_decl_name_with_params EQUAL type_, EOF / SEMI] -// [132, alias_sig → PUB • pub_attr FNALIAS uident COLONCOLON lident, EOF / SEMI] -// [138, alias_sig → PUB • pub_attr USING PACKAGE_NAME LBRACE TYPE uident using_binder RBRACE, EOF / SEMI] -// [144, alias_sig → PUB • pub_attr USING PACKAGE_NAME LBRACE TRAIT uident using_binder RBRACE, EOF / SEMI] -// [205, pub_attr → •, STRUCT / ENUM / TRAIT / IMPL / ASYNC / FNALIAS / FN / LET / CONST / TYPE / SUBERROR / USING / EXTENUM] -// [206, pub_attr → • LPAREN READONLY RPAREN, STRUCT / ENUM / TRAIT / IMPL / ASYNC / FNALIAS / FN / LET / CONST / TYPE / SUBERROR / USING / EXTENUM] -// [207, pub_attr → • LPAREN LIDENT RPAREN, STRUCT / ENUM / TRAIT / IMPL / ASYNC / FNALIAS / FN / LET / CONST / TYPE / SUBERROR / USING / EXTENUM] -fn yy_state_626(_lookahead : YYSymbol) -> YYDecision { +// [58, type_sig → PUB • pub_attr TYPE type_decl_name_with_params optional_derive, EOF / SEMI] +// [64, type_sig → PUB • pub_attr SUBERROR uident optional_derive, EOF / SEMI] +// [70, type_sig → PUB • pub_attr SUBERROR uident LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [76, type_sig → PUB • pub_attr STRUCT type_decl_name_with_params LBRACE record_decl_body RBRACE optional_derive, EOF / SEMI] +// [82, type_sig → PUB • pub_attr STRUCT type_decl_name_with_params LPAREN separated_list(COMMA,type_) RPAREN optional_derive, EOF / SEMI] +// [88, type_sig → PUB • pub_attr ENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [94, type_sig → PUB • pub_attr EXTENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [100, type_sig → PUB • pub_attr EXTENUM extensible_enum_extension_target PLUS_EQUAL LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [108, impl_sig → PUB • pub_attr IMPL type_params_with_constraints qualified_uident FOR type_, EOF / SEMI] +// [114, impl_sig → PUB • pub_attr IMPL qualified_uident FOR type_, EOF / SEMI] +// [120, trait_sig → PUB • pub_attr TRAIT uident loption(preceded(COLON,separated_nonempty_list(PLUS,qualified_uident))) trait_body, EOF / SEMI] +// [130, alias_sig → PUB • pub_attr TYPE type_decl_name_with_params EQUAL type_, EOF / SEMI] +// [136, alias_sig → PUB • pub_attr FNALIAS uident COLONCOLON lident, EOF / SEMI] +// [142, alias_sig → PUB • pub_attr USING PACKAGE_NAME LBRACE TYPE uident using_binder RBRACE, EOF / SEMI] +// [148, alias_sig → PUB • pub_attr USING PACKAGE_NAME LBRACE TRAIT uident using_binder RBRACE, EOF / SEMI] +// [209, pub_attr → •, STRUCT / ENUM / TRAIT / IMPL / ASYNC / FNALIAS / FN / LET / CONST / TYPE / SUBERROR / USING / EXTENUM] +// [210, pub_attr → • LPAREN READONLY RPAREN, STRUCT / ENUM / TRAIT / IMPL / ASYNC / FNALIAS / FN / LET / CONST / TYPE / SUBERROR / USING / EXTENUM] +// [211, pub_attr → • LPAREN lident RPAREN, STRUCT / ENUM / TRAIT / IMPL / ASYNC / FNALIAS / FN / LET / CONST / TYPE / SUBERROR / USING / EXTENUM] +fn yy_state_663(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LPAREN => Shift(yy_state_412) - NT_pub_attr => Shift(yy_state_627) + T_LPAREN => Shift(yy_state_449) + NT_pub_attr => Shift(yy_state_664) T_STRUCT | T_ENUM | T_TRAIT | T_IMPL | T_ASYNC | T_FNALIAS | T_FN | T_LET | T_CONST | T_TYPE | T_SUBERROR | T_USING | T_EXTENUM => Reduce(0, NT_pub_attr, yy_action_113) _ => Error } @@ -12217,253 +13073,255 @@ fn yy_state_626(_lookahead : YYSymbol) -> YYDecision { // [24, value_sig → PUB pub_attr • LET lident COLON type_, EOF / SEMI] // [40, func_sig → PUB pub_attr • ASYNC FN loption(type_params_with_constraints) func_name LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type, EOF / SEMI] // [41, func_sig → PUB pub_attr • FN loption(type_params_with_constraints) func_name LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type, EOF / SEMI] -// [54, type_sig → PUB pub_attr • TYPE type_decl_name_with_params optional_derive, EOF / SEMI] -// [60, type_sig → PUB pub_attr • SUBERROR uident optional_derive, EOF / SEMI] -// [66, type_sig → PUB pub_attr • SUBERROR uident LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [72, type_sig → PUB pub_attr • STRUCT type_decl_name_with_params LBRACE record_decl_body RBRACE optional_derive, EOF / SEMI] -// [78, type_sig → PUB pub_attr • STRUCT type_decl_name_with_params LPAREN separated_list(COMMA,type_) RPAREN optional_derive, EOF / SEMI] -// [84, type_sig → PUB pub_attr • ENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [90, type_sig → PUB pub_attr • EXTENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [96, type_sig → PUB pub_attr • EXTENUM extensible_enum_extension_target PLUS_EQUAL LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [104, impl_sig → PUB pub_attr • IMPL type_params_with_constraints qualified_uident FOR type_, EOF / SEMI] -// [110, impl_sig → PUB pub_attr • IMPL qualified_uident FOR type_, EOF / SEMI] -// [116, trait_sig → PUB pub_attr • TRAIT uident loption(preceded(COLON,separated_nonempty_list(PLUS,qualified_uident))) trait_body, EOF / SEMI] -// [126, alias_sig → PUB pub_attr • TYPE type_decl_name_with_params EQUAL type_, EOF / SEMI] -// [132, alias_sig → PUB pub_attr • FNALIAS uident COLONCOLON lident, EOF / SEMI] -// [138, alias_sig → PUB pub_attr • USING PACKAGE_NAME LBRACE TYPE uident using_binder RBRACE, EOF / SEMI] -// [144, alias_sig → PUB pub_attr • USING PACKAGE_NAME LBRACE TRAIT uident using_binder RBRACE, EOF / SEMI] -fn yy_state_627(_lookahead : YYSymbol) -> YYDecision { +// [58, type_sig → PUB pub_attr • TYPE type_decl_name_with_params optional_derive, EOF / SEMI] +// [64, type_sig → PUB pub_attr • SUBERROR uident optional_derive, EOF / SEMI] +// [70, type_sig → PUB pub_attr • SUBERROR uident LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [76, type_sig → PUB pub_attr • STRUCT type_decl_name_with_params LBRACE record_decl_body RBRACE optional_derive, EOF / SEMI] +// [82, type_sig → PUB pub_attr • STRUCT type_decl_name_with_params LPAREN separated_list(COMMA,type_) RPAREN optional_derive, EOF / SEMI] +// [88, type_sig → PUB pub_attr • ENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [94, type_sig → PUB pub_attr • EXTENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [100, type_sig → PUB pub_attr • EXTENUM extensible_enum_extension_target PLUS_EQUAL LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [108, impl_sig → PUB pub_attr • IMPL type_params_with_constraints qualified_uident FOR type_, EOF / SEMI] +// [114, impl_sig → PUB pub_attr • IMPL qualified_uident FOR type_, EOF / SEMI] +// [120, trait_sig → PUB pub_attr • TRAIT uident loption(preceded(COLON,separated_nonempty_list(PLUS,qualified_uident))) trait_body, EOF / SEMI] +// [130, alias_sig → PUB pub_attr • TYPE type_decl_name_with_params EQUAL type_, EOF / SEMI] +// [136, alias_sig → PUB pub_attr • FNALIAS uident COLONCOLON lident, EOF / SEMI] +// [142, alias_sig → PUB pub_attr • USING PACKAGE_NAME LBRACE TYPE uident using_binder RBRACE, EOF / SEMI] +// [148, alias_sig → PUB pub_attr • USING PACKAGE_NAME LBRACE TRAIT uident using_binder RBRACE, EOF / SEMI] +fn yy_state_664(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_USING => Shift(yy_state_628) - T_FNALIAS => Shift(yy_state_639) - T_TRAIT => Shift(yy_state_643) - T_IMPL => Shift(yy_state_647) - T_EXTENUM => Shift(yy_state_655) - T_ENUM => Shift(yy_state_667) - T_STRUCT => Shift(yy_state_673) - T_SUBERROR => Shift(yy_state_683) - T_TYPE => Shift(yy_state_690) - T_FN => Shift(yy_state_695) - T_ASYNC => Shift(yy_state_703) - T_LET => Shift(yy_state_712) - T_CONST => Shift(yy_state_716) + T_USING => Shift(yy_state_665) + T_FNALIAS => Shift(yy_state_676) + T_TRAIT => Shift(yy_state_680) + T_IMPL => Shift(yy_state_684) + T_EXTENUM => Shift(yy_state_692) + T_ENUM => Shift(yy_state_704) + T_STRUCT => Shift(yy_state_710) + T_SUBERROR => Shift(yy_state_720) + T_TYPE => Shift(yy_state_727) + T_FN => Shift(yy_state_732) + T_ASYNC => Shift(yy_state_740) + T_LET => Shift(yy_state_749) + T_CONST => Shift(yy_state_753) _ => Error } } -// [138, alias_sig → PUB pub_attr USING • PACKAGE_NAME LBRACE TYPE uident using_binder RBRACE, EOF / SEMI] -// [144, alias_sig → PUB pub_attr USING • PACKAGE_NAME LBRACE TRAIT uident using_binder RBRACE, EOF / SEMI] -fn yy_state_628(_lookahead : YYSymbol) -> YYDecision { +// [142, alias_sig → PUB pub_attr USING • PACKAGE_NAME LBRACE TYPE uident using_binder RBRACE, EOF / SEMI] +// [148, alias_sig → PUB pub_attr USING • PACKAGE_NAME LBRACE TRAIT uident using_binder RBRACE, EOF / SEMI] +fn yy_state_665(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_PACKAGE_NAME => Shift(yy_state_629) + T_PACKAGE_NAME => Shift(yy_state_666) _ => Error } } -// [138, alias_sig → PUB pub_attr USING PACKAGE_NAME • LBRACE TYPE uident using_binder RBRACE, EOF / SEMI] -// [144, alias_sig → PUB pub_attr USING PACKAGE_NAME • LBRACE TRAIT uident using_binder RBRACE, EOF / SEMI] -fn yy_state_629(_lookahead : YYSymbol) -> YYDecision { +// [142, alias_sig → PUB pub_attr USING PACKAGE_NAME • LBRACE TYPE uident using_binder RBRACE, EOF / SEMI] +// [148, alias_sig → PUB pub_attr USING PACKAGE_NAME • LBRACE TRAIT uident using_binder RBRACE, EOF / SEMI] +fn yy_state_666(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACE => Shift(yy_state_630) + T_LBRACE => Shift(yy_state_667) _ => Error } } -// [138, alias_sig → PUB pub_attr USING PACKAGE_NAME LBRACE • TYPE uident using_binder RBRACE, EOF / SEMI] -// [144, alias_sig → PUB pub_attr USING PACKAGE_NAME LBRACE • TRAIT uident using_binder RBRACE, EOF / SEMI] -fn yy_state_630(_lookahead : YYSymbol) -> YYDecision { +// [142, alias_sig → PUB pub_attr USING PACKAGE_NAME LBRACE • TYPE uident using_binder RBRACE, EOF / SEMI] +// [148, alias_sig → PUB pub_attr USING PACKAGE_NAME LBRACE • TRAIT uident using_binder RBRACE, EOF / SEMI] +fn yy_state_667(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_TRAIT => Shift(yy_state_631) - T_TYPE => Shift(yy_state_635) + T_TRAIT => Shift(yy_state_668) + T_TYPE => Shift(yy_state_672) _ => Error } } -// [144, alias_sig → PUB pub_attr USING PACKAGE_NAME LBRACE TRAIT • uident using_binder RBRACE, EOF / SEMI] -// [212, uident → • UIDENT, RBRACE / AS] -fn yy_state_631(_lookahead : YYSymbol) -> YYDecision { +// [148, alias_sig → PUB pub_attr USING PACKAGE_NAME LBRACE TRAIT • uident using_binder RBRACE, EOF / SEMI] +// [216, uident → • UIDENT, RBRACE / AS] +fn yy_state_668(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_UIDENT => Shift(yy_state_25) - NT_uident => Shift(yy_state_632) + NT_uident => Shift(yy_state_669) _ => Error } } -// [122, using_binder → •, RBRACE] -// [123, using_binder → • AS uident, RBRACE] -// [144, alias_sig → PUB pub_attr USING PACKAGE_NAME LBRACE TRAIT uident • using_binder RBRACE, EOF / SEMI] -fn yy_state_632(_lookahead : YYSymbol) -> YYDecision { +// [126, using_binder → •, RBRACE] +// [127, using_binder → • AS uident, RBRACE] +// [148, alias_sig → PUB pub_attr USING PACKAGE_NAME LBRACE TRAIT uident • using_binder RBRACE, EOF / SEMI] +fn yy_state_669(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_AS => Shift(yy_state_29) - NT_using_binder => Shift(yy_state_633) - T_RBRACE => Reduce(0, NT_using_binder, yy_action_273) + NT_using_binder => Shift(yy_state_670) + T_RBRACE => Reduce(0, NT_using_binder, yy_action_278) _ => Error } } -// [144, alias_sig → PUB pub_attr USING PACKAGE_NAME LBRACE TRAIT uident using_binder • RBRACE, EOF / SEMI] -fn yy_state_633(_lookahead : YYSymbol) -> YYDecision { +// [148, alias_sig → PUB pub_attr USING PACKAGE_NAME LBRACE TRAIT uident using_binder • RBRACE, EOF / SEMI] +fn yy_state_670(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RBRACE => Shift(yy_state_634) + T_RBRACE => Shift(yy_state_671) _ => Error } } -// [144, alias_sig → PUB pub_attr USING PACKAGE_NAME LBRACE TRAIT uident using_binder RBRACE •, EOF / SEMI] -fn yy_state_634(_lookahead : YYSymbol) -> YYDecision { +// [148, alias_sig → PUB pub_attr USING PACKAGE_NAME LBRACE TRAIT uident using_binder RBRACE •, EOF / SEMI] +fn yy_state_671(_lookahead : YYSymbol) -> YYDecision { ReduceNoLookahead(9, NT_alias_sig, yy_action_58) } -// [138, alias_sig → PUB pub_attr USING PACKAGE_NAME LBRACE TYPE • uident using_binder RBRACE, EOF / SEMI] -// [212, uident → • UIDENT, RBRACE / AS] -fn yy_state_635(_lookahead : YYSymbol) -> YYDecision { +// [142, alias_sig → PUB pub_attr USING PACKAGE_NAME LBRACE TYPE • uident using_binder RBRACE, EOF / SEMI] +// [216, uident → • UIDENT, RBRACE / AS] +fn yy_state_672(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_UIDENT => Shift(yy_state_25) - NT_uident => Shift(yy_state_636) + NT_uident => Shift(yy_state_673) _ => Error } } -// [122, using_binder → •, RBRACE] -// [123, using_binder → • AS uident, RBRACE] -// [138, alias_sig → PUB pub_attr USING PACKAGE_NAME LBRACE TYPE uident • using_binder RBRACE, EOF / SEMI] -fn yy_state_636(_lookahead : YYSymbol) -> YYDecision { +// [126, using_binder → •, RBRACE] +// [127, using_binder → • AS uident, RBRACE] +// [142, alias_sig → PUB pub_attr USING PACKAGE_NAME LBRACE TYPE uident • using_binder RBRACE, EOF / SEMI] +fn yy_state_673(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_AS => Shift(yy_state_29) - NT_using_binder => Shift(yy_state_637) - T_RBRACE => Reduce(0, NT_using_binder, yy_action_273) + NT_using_binder => Shift(yy_state_674) + T_RBRACE => Reduce(0, NT_using_binder, yy_action_278) _ => Error } } -// [138, alias_sig → PUB pub_attr USING PACKAGE_NAME LBRACE TYPE uident using_binder • RBRACE, EOF / SEMI] -fn yy_state_637(_lookahead : YYSymbol) -> YYDecision { +// [142, alias_sig → PUB pub_attr USING PACKAGE_NAME LBRACE TYPE uident using_binder • RBRACE, EOF / SEMI] +fn yy_state_674(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RBRACE => Shift(yy_state_638) + T_RBRACE => Shift(yy_state_675) _ => Error } } -// [138, alias_sig → PUB pub_attr USING PACKAGE_NAME LBRACE TYPE uident using_binder RBRACE •, EOF / SEMI] -fn yy_state_638(_lookahead : YYSymbol) -> YYDecision { +// [142, alias_sig → PUB pub_attr USING PACKAGE_NAME LBRACE TYPE uident using_binder RBRACE •, EOF / SEMI] +fn yy_state_675(_lookahead : YYSymbol) -> YYDecision { ReduceNoLookahead(9, NT_alias_sig, yy_action_57) } -// [132, alias_sig → PUB pub_attr FNALIAS • uident COLONCOLON lident, EOF / SEMI] -// [212, uident → • UIDENT, COLONCOLON] -fn yy_state_639(_lookahead : YYSymbol) -> YYDecision { +// [136, alias_sig → PUB pub_attr FNALIAS • uident COLONCOLON lident, EOF / SEMI] +// [216, uident → • UIDENT, COLONCOLON] +fn yy_state_676(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_UIDENT => Shift(yy_state_25) - NT_uident => Shift(yy_state_640) + NT_uident => Shift(yy_state_677) _ => Error } } -// [132, alias_sig → PUB pub_attr FNALIAS uident • COLONCOLON lident, EOF / SEMI] -fn yy_state_640(_lookahead : YYSymbol) -> YYDecision { +// [136, alias_sig → PUB pub_attr FNALIAS uident • COLONCOLON lident, EOF / SEMI] +fn yy_state_677(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_COLONCOLON => Shift(yy_state_641) + T_COLONCOLON => Shift(yy_state_678) _ => Error } } -// [132, alias_sig → PUB pub_attr FNALIAS uident COLONCOLON • lident, EOF / SEMI] -// [213, lident → • LIDENT, EOF / SEMI] -fn yy_state_641(_lookahead : YYSymbol) -> YYDecision { +// [136, alias_sig → PUB pub_attr FNALIAS uident COLONCOLON • lident, EOF / SEMI] +// [217, lident → • LIDENT, EOF / SEMI] +// [218, lident → • EXTEND, EOF / SEMI] +fn yy_state_678(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LIDENT => Shift(yy_state_38) - NT_lident => Shift(yy_state_642) + T_EXTEND => Shift(yy_state_38) + T_LIDENT => Shift(yy_state_39) + NT_lident => Shift(yy_state_679) _ => Error } } -// [132, alias_sig → PUB pub_attr FNALIAS uident COLONCOLON lident •, EOF / SEMI] -fn yy_state_642(_lookahead : YYSymbol) -> YYDecision { +// [136, alias_sig → PUB pub_attr FNALIAS uident COLONCOLON lident •, EOF / SEMI] +fn yy_state_679(_lookahead : YYSymbol) -> YYDecision { ReduceNoLookahead(6, NT_alias_sig, yy_action_56) } -// [116, trait_sig → PUB pub_attr TRAIT • uident loption(preceded(COLON,separated_nonempty_list(PLUS,qualified_uident))) trait_body, EOF / SEMI] -// [212, uident → • UIDENT, EOF / COLON / SEMI / LBRACE] -fn yy_state_643(_lookahead : YYSymbol) -> YYDecision { +// [120, trait_sig → PUB pub_attr TRAIT • uident loption(preceded(COLON,separated_nonempty_list(PLUS,qualified_uident))) trait_body, EOF / SEMI] +// [216, uident → • UIDENT, EOF / COLON / SEMI / LBRACE] +fn yy_state_680(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_UIDENT => Shift(yy_state_25) - NT_uident => Shift(yy_state_644) + NT_uident => Shift(yy_state_681) _ => Error } } -// [116, trait_sig → PUB pub_attr TRAIT uident • loption(preceded(COLON,separated_nonempty_list(PLUS,qualified_uident))) trait_body, EOF / SEMI] -// [230, loption(preceded(COLON,separated_nonempty_list(PLUS,qualified_uident))) → •, EOF / SEMI / LBRACE] -// [231, loption(preceded(COLON,separated_nonempty_list(PLUS,qualified_uident))) → • COLON separated_nonempty_list(PLUS,qualified_uident), EOF / SEMI / LBRACE] -fn yy_state_644(_lookahead : YYSymbol) -> YYDecision { +// [120, trait_sig → PUB pub_attr TRAIT uident • loption(preceded(COLON,separated_nonempty_list(PLUS,qualified_uident))) trait_body, EOF / SEMI] +// [235, loption(preceded(COLON,separated_nonempty_list(PLUS,qualified_uident))) → •, EOF / SEMI / LBRACE] +// [236, loption(preceded(COLON,separated_nonempty_list(PLUS,qualified_uident))) → • COLON separated_nonempty_list(PLUS,qualified_uident), EOF / SEMI / LBRACE] +fn yy_state_681(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_COLON => Shift(yy_state_42) - NT_loption_preceded_COLON_separated_nonempty_list_PLUS_qualified_uident___ => Shift(yy_state_645) - T_EOF | T_SEMI | T_LBRACE => Reduce(0, NT_loption_preceded_COLON_separated_nonempty_list_PLUS_qualified_uident___, yy_action_267) + T_COLON => Shift(yy_state_43) + NT_loption_preceded_COLON_separated_nonempty_list_PLUS_qualified_uident___ => Shift(yy_state_682) + T_EOF | T_SEMI | T_LBRACE => Reduce(0, NT_loption_preceded_COLON_separated_nonempty_list_PLUS_qualified_uident___, yy_action_271) _ => Error } } -// [116, trait_sig → PUB pub_attr TRAIT uident loption(preceded(COLON,separated_nonempty_list(PLUS,qualified_uident))) • trait_body, EOF / SEMI] -// [120, trait_body → •, EOF / SEMI] -// [121, trait_body → • LBRACE separated_list(SEMI,trait_method_sig) RBRACE, EOF / SEMI] -fn yy_state_645(_lookahead : YYSymbol) -> YYDecision { +// [120, trait_sig → PUB pub_attr TRAIT uident loption(preceded(COLON,separated_nonempty_list(PLUS,qualified_uident))) • trait_body, EOF / SEMI] +// [124, trait_body → •, EOF / SEMI] +// [125, trait_body → • LBRACE separated_list(SEMI,trait_method_sig) RBRACE, EOF / SEMI] +fn yy_state_682(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACE => Shift(yy_state_51) - NT_trait_body => Shift(yy_state_646) - T_EOF | T_SEMI => Reduce(0, NT_trait_body, yy_action_260) + T_LBRACE => Shift(yy_state_52) + NT_trait_body => Shift(yy_state_683) + T_EOF | T_SEMI => Reduce(0, NT_trait_body, yy_action_264) _ => Error } } -// [116, trait_sig → PUB pub_attr TRAIT uident loption(preceded(COLON,separated_nonempty_list(PLUS,qualified_uident))) trait_body •, EOF / SEMI] -fn yy_state_646(_lookahead : YYSymbol) -> YYDecision { +// [120, trait_sig → PUB pub_attr TRAIT uident loption(preceded(COLON,separated_nonempty_list(PLUS,qualified_uident))) trait_body •, EOF / SEMI] +fn yy_state_683(_lookahead : YYSymbol) -> YYDecision { ReduceNoLookahead(6, NT_trait_sig, yy_action_55) } -// [104, impl_sig → PUB pub_attr IMPL • type_params_with_constraints qualified_uident FOR type_, EOF / SEMI] -// [110, impl_sig → PUB pub_attr IMPL • qualified_uident FOR type_, EOF / SEMI] -// [157, type_params_with_constraints → • LBRACKET separated_list(COMMA,type_param_with_constraints) RBRACKET, UIDENT / PACKAGE_NAME] -// [208, qualified_uident → • UIDENT, FOR] -// [209, qualified_uident → • PACKAGE_NAME DOT_UIDENT, FOR] -fn yy_state_647(_lookahead : YYSymbol) -> YYDecision { +// [108, impl_sig → PUB pub_attr IMPL • type_params_with_constraints qualified_uident FOR type_, EOF / SEMI] +// [114, impl_sig → PUB pub_attr IMPL • qualified_uident FOR type_, EOF / SEMI] +// [161, type_params_with_constraints → • LBRACKET separated_list(COMMA,type_param_with_constraints) RBRACKET, UIDENT / PACKAGE_NAME] +// [212, qualified_uident → • UIDENT, FOR] +// [213, qualified_uident → • PACKAGE_NAME DOT_UIDENT, FOR] +fn yy_state_684(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_PACKAGE_NAME => Shift(yy_state_47) - T_UIDENT => Shift(yy_state_49) - T_LBRACKET => Shift(yy_state_162) - NT_qualified_uident => Shift(yy_state_648) - NT_type_params_with_constraints => Shift(yy_state_651) + T_PACKAGE_NAME => Shift(yy_state_48) + T_UIDENT => Shift(yy_state_50) + T_LBRACKET => Shift(yy_state_144) + NT_qualified_uident => Shift(yy_state_685) + NT_type_params_with_constraints => Shift(yy_state_688) _ => Error } } -// [110, impl_sig → PUB pub_attr IMPL qualified_uident • FOR type_, EOF / SEMI] -fn yy_state_648(_lookahead : YYSymbol) -> YYDecision { +// [114, impl_sig → PUB pub_attr IMPL qualified_uident • FOR type_, EOF / SEMI] +fn yy_state_685(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_FOR => Shift(yy_state_649) - _ => Error - } -} - -// [110, impl_sig → PUB pub_attr IMPL qualified_uident FOR • type_, EOF / SEMI] -// [167, simple_type → • simple_type QUESTION, EOF / QUESTION / SEMI] -// [168, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, EOF / QUESTION / SEMI] -// [169, simple_type → • LPAREN type_ RPAREN, EOF / QUESTION / SEMI] -// [170, simple_type → • qualified_uident_ optional_type_arguments, EOF / QUESTION / SEMI] -// [171, simple_type → • AMPER qualified_uident_, EOF / QUESTION / SEMI] -// [172, simple_type → • UNDERSCORE, EOF / QUESTION / SEMI] -// [173, type_ → • simple_type, EOF / SEMI] -// [174, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] -// [175, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] -// [176, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] -// [177, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] -// [178, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] -// [179, type_ → • LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] -// [180, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] -// [181, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] -// [210, qualified_uident_ → • UIDENT, EOF / QUESTION / SEMI / LBRACKET] -// [211, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, EOF / QUESTION / SEMI / LBRACKET] -fn yy_state_649(_lookahead : YYSymbol) -> YYDecision { + T_FOR => Shift(yy_state_686) + _ => Error + } +} + +// [114, impl_sig → PUB pub_attr IMPL qualified_uident FOR • type_, EOF / SEMI] +// [171, simple_type → • simple_type QUESTION, EOF / QUESTION / SEMI] +// [172, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, EOF / QUESTION / SEMI] +// [173, simple_type → • LPAREN type_ RPAREN, EOF / QUESTION / SEMI] +// [174, simple_type → • qualified_uident_ optional_type_arguments, EOF / QUESTION / SEMI] +// [175, simple_type → • AMPER qualified_uident_, EOF / QUESTION / SEMI] +// [176, simple_type → • UNDERSCORE, EOF / QUESTION / SEMI] +// [177, type_ → • simple_type, EOF / SEMI] +// [178, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] +// [179, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] +// [180, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] +// [181, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] +// [182, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] +// [183, type_ → • LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] +// [184, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] +// [185, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] +// [214, qualified_uident_ → • UIDENT, EOF / QUESTION / SEMI / LBRACKET] +// [215, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, EOF / QUESTION / SEMI / LBRACKET] +fn yy_state_686(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_PACKAGE_NAME => Shift(yy_state_62) T_UIDENT => Shift(yy_state_64) @@ -12473,55 +13331,55 @@ fn yy_state_649(_lookahead : YYSymbol) -> YYDecision { NT_qualified_uident_ => Shift(yy_state_78) T_LPAREN => Shift(yy_state_83) NT_simple_type => Shift(yy_state_106) - NT_type_ => Shift(yy_state_650) + NT_type_ => Shift(yy_state_687) _ => Error } } -// [110, impl_sig → PUB pub_attr IMPL qualified_uident FOR type_ •, EOF / SEMI] -fn yy_state_650(_lookahead : YYSymbol) -> YYDecision { +// [114, impl_sig → PUB pub_attr IMPL qualified_uident FOR type_ •, EOF / SEMI] +fn yy_state_687(_lookahead : YYSymbol) -> YYDecision { ReduceNoLookahead(6, NT_impl_sig, yy_action_54) } -// [104, impl_sig → PUB pub_attr IMPL type_params_with_constraints • qualified_uident FOR type_, EOF / SEMI] -// [208, qualified_uident → • UIDENT, FOR] -// [209, qualified_uident → • PACKAGE_NAME DOT_UIDENT, FOR] -fn yy_state_651(_lookahead : YYSymbol) -> YYDecision { +// [108, impl_sig → PUB pub_attr IMPL type_params_with_constraints • qualified_uident FOR type_, EOF / SEMI] +// [212, qualified_uident → • UIDENT, FOR] +// [213, qualified_uident → • PACKAGE_NAME DOT_UIDENT, FOR] +fn yy_state_688(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_PACKAGE_NAME => Shift(yy_state_47) - T_UIDENT => Shift(yy_state_49) - NT_qualified_uident => Shift(yy_state_652) + T_PACKAGE_NAME => Shift(yy_state_48) + T_UIDENT => Shift(yy_state_50) + NT_qualified_uident => Shift(yy_state_689) _ => Error } } -// [104, impl_sig → PUB pub_attr IMPL type_params_with_constraints qualified_uident • FOR type_, EOF / SEMI] -fn yy_state_652(_lookahead : YYSymbol) -> YYDecision { +// [108, impl_sig → PUB pub_attr IMPL type_params_with_constraints qualified_uident • FOR type_, EOF / SEMI] +fn yy_state_689(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_FOR => Shift(yy_state_653) - _ => Error - } -} - -// [104, impl_sig → PUB pub_attr IMPL type_params_with_constraints qualified_uident FOR • type_, EOF / SEMI] -// [167, simple_type → • simple_type QUESTION, EOF / QUESTION / SEMI] -// [168, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, EOF / QUESTION / SEMI] -// [169, simple_type → • LPAREN type_ RPAREN, EOF / QUESTION / SEMI] -// [170, simple_type → • qualified_uident_ optional_type_arguments, EOF / QUESTION / SEMI] -// [171, simple_type → • AMPER qualified_uident_, EOF / QUESTION / SEMI] -// [172, simple_type → • UNDERSCORE, EOF / QUESTION / SEMI] -// [173, type_ → • simple_type, EOF / SEMI] -// [174, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] -// [175, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] -// [176, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] -// [177, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] -// [178, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] -// [179, type_ → • LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] -// [180, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] -// [181, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] -// [210, qualified_uident_ → • UIDENT, EOF / QUESTION / SEMI / LBRACKET] -// [211, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, EOF / QUESTION / SEMI / LBRACKET] -fn yy_state_653(_lookahead : YYSymbol) -> YYDecision { + T_FOR => Shift(yy_state_690) + _ => Error + } +} + +// [108, impl_sig → PUB pub_attr IMPL type_params_with_constraints qualified_uident FOR • type_, EOF / SEMI] +// [171, simple_type → • simple_type QUESTION, EOF / QUESTION / SEMI] +// [172, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, EOF / QUESTION / SEMI] +// [173, simple_type → • LPAREN type_ RPAREN, EOF / QUESTION / SEMI] +// [174, simple_type → • qualified_uident_ optional_type_arguments, EOF / QUESTION / SEMI] +// [175, simple_type → • AMPER qualified_uident_, EOF / QUESTION / SEMI] +// [176, simple_type → • UNDERSCORE, EOF / QUESTION / SEMI] +// [177, type_ → • simple_type, EOF / SEMI] +// [178, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] +// [179, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] +// [180, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] +// [181, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] +// [182, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] +// [183, type_ → • LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] +// [184, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] +// [185, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] +// [214, qualified_uident_ → • UIDENT, EOF / QUESTION / SEMI / LBRACKET] +// [215, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, EOF / QUESTION / SEMI / LBRACKET] +fn yy_state_690(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_PACKAGE_NAME => Shift(yy_state_62) T_UIDENT => Shift(yy_state_64) @@ -12531,264 +13389,264 @@ fn yy_state_653(_lookahead : YYSymbol) -> YYDecision { NT_qualified_uident_ => Shift(yy_state_78) T_LPAREN => Shift(yy_state_83) NT_simple_type => Shift(yy_state_106) - NT_type_ => Shift(yy_state_654) + NT_type_ => Shift(yy_state_691) _ => Error } } -// [104, impl_sig → PUB pub_attr IMPL type_params_with_constraints qualified_uident FOR type_ •, EOF / SEMI] -fn yy_state_654(_lookahead : YYSymbol) -> YYDecision { +// [108, impl_sig → PUB pub_attr IMPL type_params_with_constraints qualified_uident FOR type_ •, EOF / SEMI] +fn yy_state_691(_lookahead : YYSymbol) -> YYDecision { ReduceNoLookahead(7, NT_impl_sig, yy_action_53) } -// [90, type_sig → PUB pub_attr EXTENUM • type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [96, type_sig → PUB pub_attr EXTENUM • extensible_enum_extension_target PLUS_EQUAL LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [164, type_decl_name_with_params → • uident optional_type_params_no_constraints, LBRACE] -// [165, extensible_enum_extension_target → • uident optional_type_params_no_constraints, PLUS_EQUAL] -// [166, extensible_enum_extension_target → • PACKAGE_NAME DOT_UIDENT optional_type_params_no_constraints, PLUS_EQUAL] -// [212, uident → • UIDENT, PLUS_EQUAL / LBRACKET / LBRACE] -fn yy_state_655(_lookahead : YYSymbol) -> YYDecision { +// [94, type_sig → PUB pub_attr EXTENUM • type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [100, type_sig → PUB pub_attr EXTENUM • extensible_enum_extension_target PLUS_EQUAL LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [168, type_decl_name_with_params → • uident optional_type_params_no_constraints, LBRACE] +// [169, extensible_enum_extension_target → • uident optional_type_params_no_constraints, PLUS_EQUAL] +// [170, extensible_enum_extension_target → • PACKAGE_NAME DOT_UIDENT optional_type_params_no_constraints, PLUS_EQUAL] +// [216, uident → • UIDENT, PLUS_EQUAL / LBRACKET / LBRACE] +fn yy_state_692(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_UIDENT => Shift(yy_state_25) - T_PACKAGE_NAME => Shift(yy_state_184) - NT_uident => Shift(yy_state_197) - NT_extensible_enum_extension_target => Shift(yy_state_656) - NT_type_decl_name_with_params => Shift(yy_state_662) + T_PACKAGE_NAME => Shift(yy_state_222) + NT_uident => Shift(yy_state_235) + NT_extensible_enum_extension_target => Shift(yy_state_693) + NT_type_decl_name_with_params => Shift(yy_state_699) _ => Error } } -// [96, type_sig → PUB pub_attr EXTENUM extensible_enum_extension_target • PLUS_EQUAL LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -fn yy_state_656(_lookahead : YYSymbol) -> YYDecision { +// [100, type_sig → PUB pub_attr EXTENUM extensible_enum_extension_target • PLUS_EQUAL LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +fn yy_state_693(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_PLUS_EQUAL => Shift(yy_state_657) + T_PLUS_EQUAL => Shift(yy_state_694) _ => Error } } -// [96, type_sig → PUB pub_attr EXTENUM extensible_enum_extension_target PLUS_EQUAL • LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -fn yy_state_657(_lookahead : YYSymbol) -> YYDecision { +// [100, type_sig → PUB pub_attr EXTENUM extensible_enum_extension_target PLUS_EQUAL • LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +fn yy_state_694(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACE => Shift(yy_state_658) + T_LBRACE => Shift(yy_state_695) _ => Error } } -// [96, type_sig → PUB pub_attr EXTENUM extensible_enum_extension_target PLUS_EQUAL LBRACE • separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [148, enum_constructor → • UIDENT option(delimited(LPAREN,separated_nonempty_list(COMMA,constructor_param),RPAREN)) option(eq_tag), SEMI / RBRACE] -// [149, enum_constructor → • nonempty_list(attribute) UIDENT option(delimited(LPAREN,separated_nonempty_list(COMMA,constructor_param),RPAREN)) option(eq_tag), SEMI / RBRACE] -// [223, separated_list(SEMI,enum_constructor) → •, RBRACE] -// [224, separated_list(SEMI,enum_constructor) → • separated_nonempty_list(SEMI,enum_constructor), RBRACE] -// [252, nonempty_list(attribute) → • ATTRIBUTE, UIDENT] -// [253, nonempty_list(attribute) → • ATTRIBUTE nonempty_list(attribute), UIDENT] -// [260, separated_nonempty_list(SEMI,enum_constructor) → • enum_constructor, RBRACE] -// [261, separated_nonempty_list(SEMI,enum_constructor) → • enum_constructor SEMI separated_nonempty_list(SEMI,enum_constructor), RBRACE] -fn yy_state_658(_lookahead : YYSymbol) -> YYDecision { +// [100, type_sig → PUB pub_attr EXTENUM extensible_enum_extension_target PLUS_EQUAL LBRACE • separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [152, enum_constructor → • UIDENT option(delimited(LPAREN,separated_nonempty_list(COMMA,constructor_param),RPAREN)) option(eq_tag), SEMI / RBRACE] +// [153, enum_constructor → • nonempty_list(attribute) UIDENT option(delimited(LPAREN,separated_nonempty_list(COMMA,constructor_param),RPAREN)) option(eq_tag), SEMI / RBRACE] +// [228, separated_list(SEMI,enum_constructor) → •, RBRACE] +// [229, separated_list(SEMI,enum_constructor) → • separated_nonempty_list(SEMI,enum_constructor), RBRACE] +// [257, nonempty_list(attribute) → • ATTRIBUTE, UIDENT] +// [258, nonempty_list(attribute) → • ATTRIBUTE nonempty_list(attribute), UIDENT] +// [265, separated_nonempty_list(SEMI,enum_constructor) → • enum_constructor, RBRACE] +// [266, separated_nonempty_list(SEMI,enum_constructor) → • enum_constructor SEMI separated_nonempty_list(SEMI,enum_constructor), RBRACE] +fn yy_state_695(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_ATTRIBUTE => Shift(yy_state_19) - NT_enum_constructor => Shift(yy_state_202) - NT_nonempty_list_attribute_ => Shift(yy_state_205) - T_UIDENT => Shift(yy_state_224) - NT_separated_nonempty_list_SEMI_enum_constructor_ => Shift(yy_state_227) - NT_separated_list_SEMI_enum_constructor_ => Shift(yy_state_659) - T_RBRACE => Reduce(0, NT_separated_list_SEMI_enum_constructor_, yy_action_184) + NT_enum_constructor => Shift(yy_state_240) + NT_nonempty_list_attribute_ => Shift(yy_state_243) + T_UIDENT => Shift(yy_state_262) + NT_separated_nonempty_list_SEMI_enum_constructor_ => Shift(yy_state_265) + NT_separated_list_SEMI_enum_constructor_ => Shift(yy_state_696) + T_RBRACE => Reduce(0, NT_separated_list_SEMI_enum_constructor_, yy_action_182) _ => Error } } -// [96, type_sig → PUB pub_attr EXTENUM extensible_enum_extension_target PLUS_EQUAL LBRACE separated_list(SEMI,enum_constructor) • RBRACE optional_derive, EOF / SEMI] -fn yy_state_659(_lookahead : YYSymbol) -> YYDecision { +// [100, type_sig → PUB pub_attr EXTENUM extensible_enum_extension_target PLUS_EQUAL LBRACE separated_list(SEMI,enum_constructor) • RBRACE optional_derive, EOF / SEMI] +fn yy_state_696(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RBRACE => Shift(yy_state_660) + T_RBRACE => Shift(yy_state_697) _ => Error } } -// [96, type_sig → PUB pub_attr EXTENUM extensible_enum_extension_target PLUS_EQUAL LBRACE separated_list(SEMI,enum_constructor) RBRACE • optional_derive, EOF / SEMI] -// [100, optional_derive → •, EOF / SEMI] -// [101, optional_derive → • DERIVE LPAREN non_empty_list_commas(qualified_uident) RPAREN, EOF / SEMI] -fn yy_state_660(_lookahead : YYSymbol) -> YYDecision { +// [100, type_sig → PUB pub_attr EXTENUM extensible_enum_extension_target PLUS_EQUAL LBRACE separated_list(SEMI,enum_constructor) RBRACE • optional_derive, EOF / SEMI] +// [104, optional_derive → •, EOF / SEMI] +// [105, optional_derive → • DERIVE LPAREN non_empty_list_commas(qualified_uident) RPAREN, EOF / SEMI] +fn yy_state_697(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_DERIVE => Shift(yy_state_230) - NT_optional_derive => Shift(yy_state_661) - T_EOF | T_SEMI => Reduce(0, NT_optional_derive, yy_action_165) + T_DERIVE => Shift(yy_state_268) + NT_optional_derive => Shift(yy_state_698) + T_EOF | T_SEMI => Reduce(0, NT_optional_derive, yy_action_163) _ => Error } } -// [96, type_sig → PUB pub_attr EXTENUM extensible_enum_extension_target PLUS_EQUAL LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive •, EOF / SEMI] -fn yy_state_661(_lookahead : YYSymbol) -> YYDecision { +// [100, type_sig → PUB pub_attr EXTENUM extensible_enum_extension_target PLUS_EQUAL LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive •, EOF / SEMI] +fn yy_state_698(_lookahead : YYSymbol) -> YYDecision { ReduceNoLookahead(9, NT_type_sig, yy_action_52) } -// [90, type_sig → PUB pub_attr EXTENUM type_decl_name_with_params • LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -fn yy_state_662(_lookahead : YYSymbol) -> YYDecision { +// [94, type_sig → PUB pub_attr EXTENUM type_decl_name_with_params • LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +fn yy_state_699(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACE => Shift(yy_state_663) + T_LBRACE => Shift(yy_state_700) _ => Error } } -// [90, type_sig → PUB pub_attr EXTENUM type_decl_name_with_params LBRACE • separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [148, enum_constructor → • UIDENT option(delimited(LPAREN,separated_nonempty_list(COMMA,constructor_param),RPAREN)) option(eq_tag), SEMI / RBRACE] -// [149, enum_constructor → • nonempty_list(attribute) UIDENT option(delimited(LPAREN,separated_nonempty_list(COMMA,constructor_param),RPAREN)) option(eq_tag), SEMI / RBRACE] -// [223, separated_list(SEMI,enum_constructor) → •, RBRACE] -// [224, separated_list(SEMI,enum_constructor) → • separated_nonempty_list(SEMI,enum_constructor), RBRACE] -// [252, nonempty_list(attribute) → • ATTRIBUTE, UIDENT] -// [253, nonempty_list(attribute) → • ATTRIBUTE nonempty_list(attribute), UIDENT] -// [260, separated_nonempty_list(SEMI,enum_constructor) → • enum_constructor, RBRACE] -// [261, separated_nonempty_list(SEMI,enum_constructor) → • enum_constructor SEMI separated_nonempty_list(SEMI,enum_constructor), RBRACE] -fn yy_state_663(_lookahead : YYSymbol) -> YYDecision { +// [94, type_sig → PUB pub_attr EXTENUM type_decl_name_with_params LBRACE • separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [152, enum_constructor → • UIDENT option(delimited(LPAREN,separated_nonempty_list(COMMA,constructor_param),RPAREN)) option(eq_tag), SEMI / RBRACE] +// [153, enum_constructor → • nonempty_list(attribute) UIDENT option(delimited(LPAREN,separated_nonempty_list(COMMA,constructor_param),RPAREN)) option(eq_tag), SEMI / RBRACE] +// [228, separated_list(SEMI,enum_constructor) → •, RBRACE] +// [229, separated_list(SEMI,enum_constructor) → • separated_nonempty_list(SEMI,enum_constructor), RBRACE] +// [257, nonempty_list(attribute) → • ATTRIBUTE, UIDENT] +// [258, nonempty_list(attribute) → • ATTRIBUTE nonempty_list(attribute), UIDENT] +// [265, separated_nonempty_list(SEMI,enum_constructor) → • enum_constructor, RBRACE] +// [266, separated_nonempty_list(SEMI,enum_constructor) → • enum_constructor SEMI separated_nonempty_list(SEMI,enum_constructor), RBRACE] +fn yy_state_700(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_ATTRIBUTE => Shift(yy_state_19) - NT_enum_constructor => Shift(yy_state_202) - NT_nonempty_list_attribute_ => Shift(yy_state_205) - T_UIDENT => Shift(yy_state_224) - NT_separated_nonempty_list_SEMI_enum_constructor_ => Shift(yy_state_227) - NT_separated_list_SEMI_enum_constructor_ => Shift(yy_state_664) - T_RBRACE => Reduce(0, NT_separated_list_SEMI_enum_constructor_, yy_action_184) + NT_enum_constructor => Shift(yy_state_240) + NT_nonempty_list_attribute_ => Shift(yy_state_243) + T_UIDENT => Shift(yy_state_262) + NT_separated_nonempty_list_SEMI_enum_constructor_ => Shift(yy_state_265) + NT_separated_list_SEMI_enum_constructor_ => Shift(yy_state_701) + T_RBRACE => Reduce(0, NT_separated_list_SEMI_enum_constructor_, yy_action_182) _ => Error } } -// [90, type_sig → PUB pub_attr EXTENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) • RBRACE optional_derive, EOF / SEMI] -fn yy_state_664(_lookahead : YYSymbol) -> YYDecision { +// [94, type_sig → PUB pub_attr EXTENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) • RBRACE optional_derive, EOF / SEMI] +fn yy_state_701(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RBRACE => Shift(yy_state_665) + T_RBRACE => Shift(yy_state_702) _ => Error } } -// [90, type_sig → PUB pub_attr EXTENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE • optional_derive, EOF / SEMI] -// [100, optional_derive → •, EOF / SEMI] -// [101, optional_derive → • DERIVE LPAREN non_empty_list_commas(qualified_uident) RPAREN, EOF / SEMI] -fn yy_state_665(_lookahead : YYSymbol) -> YYDecision { +// [94, type_sig → PUB pub_attr EXTENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE • optional_derive, EOF / SEMI] +// [104, optional_derive → •, EOF / SEMI] +// [105, optional_derive → • DERIVE LPAREN non_empty_list_commas(qualified_uident) RPAREN, EOF / SEMI] +fn yy_state_702(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_DERIVE => Shift(yy_state_230) - NT_optional_derive => Shift(yy_state_666) - T_EOF | T_SEMI => Reduce(0, NT_optional_derive, yy_action_165) + T_DERIVE => Shift(yy_state_268) + NT_optional_derive => Shift(yy_state_703) + T_EOF | T_SEMI => Reduce(0, NT_optional_derive, yy_action_163) _ => Error } } -// [90, type_sig → PUB pub_attr EXTENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive •, EOF / SEMI] -fn yy_state_666(_lookahead : YYSymbol) -> YYDecision { +// [94, type_sig → PUB pub_attr EXTENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive •, EOF / SEMI] +fn yy_state_703(_lookahead : YYSymbol) -> YYDecision { ReduceNoLookahead(8, NT_type_sig, yy_action_51) } -// [84, type_sig → PUB pub_attr ENUM • type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [164, type_decl_name_with_params → • uident optional_type_params_no_constraints, LBRACE] -// [212, uident → • UIDENT, LBRACKET / LBRACE] -fn yy_state_667(_lookahead : YYSymbol) -> YYDecision { +// [88, type_sig → PUB pub_attr ENUM • type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [168, type_decl_name_with_params → • uident optional_type_params_no_constraints, LBRACE] +// [216, uident → • UIDENT, LBRACKET / LBRACE] +fn yy_state_704(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_UIDENT => Shift(yy_state_25) - NT_uident => Shift(yy_state_246) - NT_type_decl_name_with_params => Shift(yy_state_668) + NT_uident => Shift(yy_state_284) + NT_type_decl_name_with_params => Shift(yy_state_705) _ => Error } } -// [84, type_sig → PUB pub_attr ENUM type_decl_name_with_params • LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -fn yy_state_668(_lookahead : YYSymbol) -> YYDecision { +// [88, type_sig → PUB pub_attr ENUM type_decl_name_with_params • LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +fn yy_state_705(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACE => Shift(yy_state_669) + T_LBRACE => Shift(yy_state_706) _ => Error } } -// [84, type_sig → PUB pub_attr ENUM type_decl_name_with_params LBRACE • separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [148, enum_constructor → • UIDENT option(delimited(LPAREN,separated_nonempty_list(COMMA,constructor_param),RPAREN)) option(eq_tag), SEMI / RBRACE] -// [149, enum_constructor → • nonempty_list(attribute) UIDENT option(delimited(LPAREN,separated_nonempty_list(COMMA,constructor_param),RPAREN)) option(eq_tag), SEMI / RBRACE] -// [223, separated_list(SEMI,enum_constructor) → •, RBRACE] -// [224, separated_list(SEMI,enum_constructor) → • separated_nonempty_list(SEMI,enum_constructor), RBRACE] -// [252, nonempty_list(attribute) → • ATTRIBUTE, UIDENT] -// [253, nonempty_list(attribute) → • ATTRIBUTE nonempty_list(attribute), UIDENT] -// [260, separated_nonempty_list(SEMI,enum_constructor) → • enum_constructor, RBRACE] -// [261, separated_nonempty_list(SEMI,enum_constructor) → • enum_constructor SEMI separated_nonempty_list(SEMI,enum_constructor), RBRACE] -fn yy_state_669(_lookahead : YYSymbol) -> YYDecision { +// [88, type_sig → PUB pub_attr ENUM type_decl_name_with_params LBRACE • separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [152, enum_constructor → • UIDENT option(delimited(LPAREN,separated_nonempty_list(COMMA,constructor_param),RPAREN)) option(eq_tag), SEMI / RBRACE] +// [153, enum_constructor → • nonempty_list(attribute) UIDENT option(delimited(LPAREN,separated_nonempty_list(COMMA,constructor_param),RPAREN)) option(eq_tag), SEMI / RBRACE] +// [228, separated_list(SEMI,enum_constructor) → •, RBRACE] +// [229, separated_list(SEMI,enum_constructor) → • separated_nonempty_list(SEMI,enum_constructor), RBRACE] +// [257, nonempty_list(attribute) → • ATTRIBUTE, UIDENT] +// [258, nonempty_list(attribute) → • ATTRIBUTE nonempty_list(attribute), UIDENT] +// [265, separated_nonempty_list(SEMI,enum_constructor) → • enum_constructor, RBRACE] +// [266, separated_nonempty_list(SEMI,enum_constructor) → • enum_constructor SEMI separated_nonempty_list(SEMI,enum_constructor), RBRACE] +fn yy_state_706(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_ATTRIBUTE => Shift(yy_state_19) - NT_enum_constructor => Shift(yy_state_202) - NT_nonempty_list_attribute_ => Shift(yy_state_205) - T_UIDENT => Shift(yy_state_224) - NT_separated_nonempty_list_SEMI_enum_constructor_ => Shift(yy_state_227) - NT_separated_list_SEMI_enum_constructor_ => Shift(yy_state_670) - T_RBRACE => Reduce(0, NT_separated_list_SEMI_enum_constructor_, yy_action_184) + NT_enum_constructor => Shift(yy_state_240) + NT_nonempty_list_attribute_ => Shift(yy_state_243) + T_UIDENT => Shift(yy_state_262) + NT_separated_nonempty_list_SEMI_enum_constructor_ => Shift(yy_state_265) + NT_separated_list_SEMI_enum_constructor_ => Shift(yy_state_707) + T_RBRACE => Reduce(0, NT_separated_list_SEMI_enum_constructor_, yy_action_182) _ => Error } } -// [84, type_sig → PUB pub_attr ENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) • RBRACE optional_derive, EOF / SEMI] -fn yy_state_670(_lookahead : YYSymbol) -> YYDecision { +// [88, type_sig → PUB pub_attr ENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) • RBRACE optional_derive, EOF / SEMI] +fn yy_state_707(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RBRACE => Shift(yy_state_671) + T_RBRACE => Shift(yy_state_708) _ => Error } } -// [84, type_sig → PUB pub_attr ENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE • optional_derive, EOF / SEMI] -// [100, optional_derive → •, EOF / SEMI] -// [101, optional_derive → • DERIVE LPAREN non_empty_list_commas(qualified_uident) RPAREN, EOF / SEMI] -fn yy_state_671(_lookahead : YYSymbol) -> YYDecision { +// [88, type_sig → PUB pub_attr ENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE • optional_derive, EOF / SEMI] +// [104, optional_derive → •, EOF / SEMI] +// [105, optional_derive → • DERIVE LPAREN non_empty_list_commas(qualified_uident) RPAREN, EOF / SEMI] +fn yy_state_708(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_DERIVE => Shift(yy_state_230) - NT_optional_derive => Shift(yy_state_672) - T_EOF | T_SEMI => Reduce(0, NT_optional_derive, yy_action_165) + T_DERIVE => Shift(yy_state_268) + NT_optional_derive => Shift(yy_state_709) + T_EOF | T_SEMI => Reduce(0, NT_optional_derive, yy_action_163) _ => Error } } -// [84, type_sig → PUB pub_attr ENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive •, EOF / SEMI] -fn yy_state_672(_lookahead : YYSymbol) -> YYDecision { +// [88, type_sig → PUB pub_attr ENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive •, EOF / SEMI] +fn yy_state_709(_lookahead : YYSymbol) -> YYDecision { ReduceNoLookahead(8, NT_type_sig, yy_action_50) } -// [72, type_sig → PUB pub_attr STRUCT • type_decl_name_with_params LBRACE record_decl_body RBRACE optional_derive, EOF / SEMI] -// [78, type_sig → PUB pub_attr STRUCT • type_decl_name_with_params LPAREN separated_list(COMMA,type_) RPAREN optional_derive, EOF / SEMI] -// [164, type_decl_name_with_params → • uident optional_type_params_no_constraints, LPAREN / LBRACE] -// [212, uident → • UIDENT, LPAREN / LBRACKET / LBRACE] -fn yy_state_673(_lookahead : YYSymbol) -> YYDecision { +// [76, type_sig → PUB pub_attr STRUCT • type_decl_name_with_params LBRACE record_decl_body RBRACE optional_derive, EOF / SEMI] +// [82, type_sig → PUB pub_attr STRUCT • type_decl_name_with_params LPAREN separated_list(COMMA,type_) RPAREN optional_derive, EOF / SEMI] +// [168, type_decl_name_with_params → • uident optional_type_params_no_constraints, LPAREN / LBRACE] +// [216, uident → • UIDENT, LPAREN / LBRACKET / LBRACE] +fn yy_state_710(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_UIDENT => Shift(yy_state_25) - NT_uident => Shift(yy_state_246) - NT_type_decl_name_with_params => Shift(yy_state_674) + NT_uident => Shift(yy_state_284) + NT_type_decl_name_with_params => Shift(yy_state_711) _ => Error } } -// [72, type_sig → PUB pub_attr STRUCT type_decl_name_with_params • LBRACE record_decl_body RBRACE optional_derive, EOF / SEMI] -// [78, type_sig → PUB pub_attr STRUCT type_decl_name_with_params • LPAREN separated_list(COMMA,type_) RPAREN optional_derive, EOF / SEMI] -fn yy_state_674(_lookahead : YYSymbol) -> YYDecision { +// [76, type_sig → PUB pub_attr STRUCT type_decl_name_with_params • LBRACE record_decl_body RBRACE optional_derive, EOF / SEMI] +// [82, type_sig → PUB pub_attr STRUCT type_decl_name_with_params • LPAREN separated_list(COMMA,type_) RPAREN optional_derive, EOF / SEMI] +fn yy_state_711(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LPAREN => Shift(yy_state_675) - T_LBRACE => Shift(yy_state_679) - _ => Error - } -} - -// [78, type_sig → PUB pub_attr STRUCT type_decl_name_with_params LPAREN • separated_list(COMMA,type_) RPAREN optional_derive, EOF / SEMI] -// [167, simple_type → • simple_type QUESTION, RPAREN / COMMA / QUESTION] -// [168, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, RPAREN / COMMA / QUESTION] -// [169, simple_type → • LPAREN type_ RPAREN, RPAREN / COMMA / QUESTION] -// [170, simple_type → • qualified_uident_ optional_type_arguments, RPAREN / COMMA / QUESTION] -// [171, simple_type → • AMPER qualified_uident_, RPAREN / COMMA / QUESTION] -// [172, simple_type → • UNDERSCORE, RPAREN / COMMA / QUESTION] -// [173, type_ → • simple_type, RPAREN / COMMA] -// [174, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [175, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [176, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [177, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [178, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [179, type_ → • LPAREN RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [180, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [181, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [210, qualified_uident_ → • UIDENT, RPAREN / COMMA / QUESTION / LBRACKET] -// [211, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, RPAREN / COMMA / QUESTION / LBRACKET] -// [225, separated_list(COMMA,type_) → •, RPAREN] -// [226, separated_list(COMMA,type_) → • separated_nonempty_list(COMMA,type_), RPAREN] -// [250, separated_nonempty_list(COMMA,type_) → • type_, RPAREN] -// [251, separated_nonempty_list(COMMA,type_) → • type_ COMMA separated_nonempty_list(COMMA,type_), RPAREN] -fn yy_state_675(_lookahead : YYSymbol) -> YYDecision { + T_LPAREN => Shift(yy_state_712) + T_LBRACE => Shift(yy_state_716) + _ => Error + } +} + +// [82, type_sig → PUB pub_attr STRUCT type_decl_name_with_params LPAREN • separated_list(COMMA,type_) RPAREN optional_derive, EOF / SEMI] +// [171, simple_type → • simple_type QUESTION, RPAREN / COMMA / QUESTION] +// [172, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, RPAREN / COMMA / QUESTION] +// [173, simple_type → • LPAREN type_ RPAREN, RPAREN / COMMA / QUESTION] +// [174, simple_type → • qualified_uident_ optional_type_arguments, RPAREN / COMMA / QUESTION] +// [175, simple_type → • AMPER qualified_uident_, RPAREN / COMMA / QUESTION] +// [176, simple_type → • UNDERSCORE, RPAREN / COMMA / QUESTION] +// [177, type_ → • simple_type, RPAREN / COMMA] +// [178, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [179, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [180, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [181, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [182, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [183, type_ → • LPAREN RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [184, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [185, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [214, qualified_uident_ → • UIDENT, RPAREN / COMMA / QUESTION / LBRACKET] +// [215, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, RPAREN / COMMA / QUESTION / LBRACKET] +// [230, separated_list(COMMA,type_) → •, RPAREN] +// [231, separated_list(COMMA,type_) → • separated_nonempty_list(COMMA,type_), RPAREN] +// [255, separated_nonempty_list(COMMA,type_) → • type_, RPAREN] +// [256, separated_nonempty_list(COMMA,type_) → • type_ COMMA separated_nonempty_list(COMMA,type_), RPAREN] +fn yy_state_712(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_PACKAGE_NAME => Shift(yy_state_62) T_UIDENT => Shift(yy_state_64) @@ -12799,214 +13657,214 @@ fn yy_state_675(_lookahead : YYSymbol) -> YYDecision { NT_type_ => Shift(yy_state_80) T_LPAREN => Shift(yy_state_83) NT_simple_type => Shift(yy_state_106) - NT_separated_nonempty_list_COMMA_type__ => Shift(yy_state_256) - NT_separated_list_COMMA_type__ => Shift(yy_state_676) - T_RPAREN => Reduce(0, NT_separated_list_COMMA_type__, yy_action_157) + NT_separated_nonempty_list_COMMA_type__ => Shift(yy_state_294) + NT_separated_list_COMMA_type__ => Shift(yy_state_713) + T_RPAREN => Reduce(0, NT_separated_list_COMMA_type__, yy_action_155) _ => Error } } -// [78, type_sig → PUB pub_attr STRUCT type_decl_name_with_params LPAREN separated_list(COMMA,type_) • RPAREN optional_derive, EOF / SEMI] -fn yy_state_676(_lookahead : YYSymbol) -> YYDecision { +// [82, type_sig → PUB pub_attr STRUCT type_decl_name_with_params LPAREN separated_list(COMMA,type_) • RPAREN optional_derive, EOF / SEMI] +fn yy_state_713(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RPAREN => Shift(yy_state_677) + T_RPAREN => Shift(yy_state_714) _ => Error } } -// [78, type_sig → PUB pub_attr STRUCT type_decl_name_with_params LPAREN separated_list(COMMA,type_) RPAREN • optional_derive, EOF / SEMI] -// [100, optional_derive → •, EOF / SEMI] -// [101, optional_derive → • DERIVE LPAREN non_empty_list_commas(qualified_uident) RPAREN, EOF / SEMI] -fn yy_state_677(_lookahead : YYSymbol) -> YYDecision { +// [82, type_sig → PUB pub_attr STRUCT type_decl_name_with_params LPAREN separated_list(COMMA,type_) RPAREN • optional_derive, EOF / SEMI] +// [104, optional_derive → •, EOF / SEMI] +// [105, optional_derive → • DERIVE LPAREN non_empty_list_commas(qualified_uident) RPAREN, EOF / SEMI] +fn yy_state_714(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_DERIVE => Shift(yy_state_230) - NT_optional_derive => Shift(yy_state_678) - T_EOF | T_SEMI => Reduce(0, NT_optional_derive, yy_action_165) + T_DERIVE => Shift(yy_state_268) + NT_optional_derive => Shift(yy_state_715) + T_EOF | T_SEMI => Reduce(0, NT_optional_derive, yy_action_163) _ => Error } } -// [78, type_sig → PUB pub_attr STRUCT type_decl_name_with_params LPAREN separated_list(COMMA,type_) RPAREN optional_derive •, EOF / SEMI] -fn yy_state_678(_lookahead : YYSymbol) -> YYDecision { +// [82, type_sig → PUB pub_attr STRUCT type_decl_name_with_params LPAREN separated_list(COMMA,type_) RPAREN optional_derive •, EOF / SEMI] +fn yy_state_715(_lookahead : YYSymbol) -> YYDecision { ReduceNoLookahead(8, NT_type_sig, yy_action_49) } -// [72, type_sig → PUB pub_attr STRUCT type_decl_name_with_params LBRACE • record_decl_body RBRACE optional_derive, EOF / SEMI] -// [152, record_decl_field → • boption(MUTABLE) LIDENT COLON type_, SEMI / RBRACE] -// [153, record_decl_field → • nonempty_list(attribute) boption(MUTABLE) LIDENT COLON type_, SEMI / RBRACE] -// [154, record_decl_body → • separated_list(SEMI,record_decl_field), RBRACE] -// [240, boption(MUTABLE) → •, LIDENT] -// [241, boption(MUTABLE) → • MUTABLE, LIDENT] -// [242, separated_list(SEMI,record_decl_field) → •, RBRACE] -// [243, separated_list(SEMI,record_decl_field) → • separated_nonempty_list(SEMI,record_decl_field), RBRACE] -// [252, nonempty_list(attribute) → • ATTRIBUTE, LIDENT / MUTABLE] -// [253, nonempty_list(attribute) → • ATTRIBUTE nonempty_list(attribute), LIDENT / MUTABLE] -// [266, separated_nonempty_list(SEMI,record_decl_field) → • record_decl_field, RBRACE] -// [267, separated_nonempty_list(SEMI,record_decl_field) → • record_decl_field SEMI separated_nonempty_list(SEMI,record_decl_field), RBRACE] -fn yy_state_679(_lookahead : YYSymbol) -> YYDecision { +// [76, type_sig → PUB pub_attr STRUCT type_decl_name_with_params LBRACE • record_decl_body RBRACE optional_derive, EOF / SEMI] +// [156, record_decl_field → • boption(MUTABLE) lident COLON type_, SEMI / RBRACE] +// [157, record_decl_field → • nonempty_list(attribute) boption(MUTABLE) lident COLON type_, SEMI / RBRACE] +// [158, record_decl_body → • separated_list(SEMI,record_decl_field), RBRACE] +// [245, boption(MUTABLE) → •, LIDENT / EXTEND] +// [246, boption(MUTABLE) → • MUTABLE, LIDENT / EXTEND] +// [247, separated_list(SEMI,record_decl_field) → •, RBRACE] +// [248, separated_list(SEMI,record_decl_field) → • separated_nonempty_list(SEMI,record_decl_field), RBRACE] +// [257, nonempty_list(attribute) → • ATTRIBUTE, LIDENT / MUTABLE / EXTEND] +// [258, nonempty_list(attribute) → • ATTRIBUTE nonempty_list(attribute), LIDENT / MUTABLE / EXTEND] +// [271, separated_nonempty_list(SEMI,record_decl_field) → • record_decl_field, RBRACE] +// [272, separated_nonempty_list(SEMI,record_decl_field) → • record_decl_field SEMI separated_nonempty_list(SEMI,record_decl_field), RBRACE] +fn yy_state_716(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_ATTRIBUTE => Shift(yy_state_19) - T_MUTABLE => Shift(yy_state_208) - NT_record_decl_field => Shift(yy_state_261) - NT_nonempty_list_attribute_ => Shift(yy_state_264) - NT_boption_MUTABLE_ => Shift(yy_state_269) - NT_separated_nonempty_list_SEMI_record_decl_field_ => Shift(yy_state_273) - NT_separated_list_SEMI_record_decl_field_ => Shift(yy_state_274) - NT_record_decl_body => Shift(yy_state_680) - T_LIDENT => Reduce(0, NT_boption_MUTABLE_, yy_action_180) - T_RBRACE => Reduce(0, NT_separated_list_SEMI_record_decl_field_, yy_action_154) + T_MUTABLE => Shift(yy_state_246) + NT_record_decl_field => Shift(yy_state_299) + NT_nonempty_list_attribute_ => Shift(yy_state_302) + NT_boption_MUTABLE_ => Shift(yy_state_307) + NT_separated_nonempty_list_SEMI_record_decl_field_ => Shift(yy_state_311) + NT_separated_list_SEMI_record_decl_field_ => Shift(yy_state_312) + NT_record_decl_body => Shift(yy_state_717) + T_LIDENT | T_EXTEND => Reduce(0, NT_boption_MUTABLE_, yy_action_178) + T_RBRACE => Reduce(0, NT_separated_list_SEMI_record_decl_field_, yy_action_152) _ => Error } } -// [72, type_sig → PUB pub_attr STRUCT type_decl_name_with_params LBRACE record_decl_body • RBRACE optional_derive, EOF / SEMI] -fn yy_state_680(_lookahead : YYSymbol) -> YYDecision { +// [76, type_sig → PUB pub_attr STRUCT type_decl_name_with_params LBRACE record_decl_body • RBRACE optional_derive, EOF / SEMI] +fn yy_state_717(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RBRACE => Shift(yy_state_681) + T_RBRACE => Shift(yy_state_718) _ => Error } } -// [72, type_sig → PUB pub_attr STRUCT type_decl_name_with_params LBRACE record_decl_body RBRACE • optional_derive, EOF / SEMI] -// [100, optional_derive → •, EOF / SEMI] -// [101, optional_derive → • DERIVE LPAREN non_empty_list_commas(qualified_uident) RPAREN, EOF / SEMI] -fn yy_state_681(_lookahead : YYSymbol) -> YYDecision { +// [76, type_sig → PUB pub_attr STRUCT type_decl_name_with_params LBRACE record_decl_body RBRACE • optional_derive, EOF / SEMI] +// [104, optional_derive → •, EOF / SEMI] +// [105, optional_derive → • DERIVE LPAREN non_empty_list_commas(qualified_uident) RPAREN, EOF / SEMI] +fn yy_state_718(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_DERIVE => Shift(yy_state_230) - NT_optional_derive => Shift(yy_state_682) - T_EOF | T_SEMI => Reduce(0, NT_optional_derive, yy_action_165) + T_DERIVE => Shift(yy_state_268) + NT_optional_derive => Shift(yy_state_719) + T_EOF | T_SEMI => Reduce(0, NT_optional_derive, yy_action_163) _ => Error } } -// [72, type_sig → PUB pub_attr STRUCT type_decl_name_with_params LBRACE record_decl_body RBRACE optional_derive •, EOF / SEMI] -fn yy_state_682(_lookahead : YYSymbol) -> YYDecision { +// [76, type_sig → PUB pub_attr STRUCT type_decl_name_with_params LBRACE record_decl_body RBRACE optional_derive •, EOF / SEMI] +fn yy_state_719(_lookahead : YYSymbol) -> YYDecision { ReduceNoLookahead(8, NT_type_sig, yy_action_48) } -// [60, type_sig → PUB pub_attr SUBERROR • uident optional_derive, EOF / SEMI] -// [66, type_sig → PUB pub_attr SUBERROR • uident LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [212, uident → • UIDENT, EOF / DERIVE / SEMI / LBRACE] -fn yy_state_683(_lookahead : YYSymbol) -> YYDecision { +// [64, type_sig → PUB pub_attr SUBERROR • uident optional_derive, EOF / SEMI] +// [70, type_sig → PUB pub_attr SUBERROR • uident LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [216, uident → • UIDENT, EOF / DERIVE / SEMI / LBRACE] +fn yy_state_720(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_UIDENT => Shift(yy_state_25) - NT_uident => Shift(yy_state_684) + NT_uident => Shift(yy_state_721) _ => Error } } -// [60, type_sig → PUB pub_attr SUBERROR uident • optional_derive, EOF / SEMI] -// [66, type_sig → PUB pub_attr SUBERROR uident • LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [100, optional_derive → •, EOF / SEMI] -// [101, optional_derive → • DERIVE LPAREN non_empty_list_commas(qualified_uident) RPAREN, EOF / SEMI] -fn yy_state_684(_lookahead : YYSymbol) -> YYDecision { +// [64, type_sig → PUB pub_attr SUBERROR uident • optional_derive, EOF / SEMI] +// [70, type_sig → PUB pub_attr SUBERROR uident • LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [104, optional_derive → •, EOF / SEMI] +// [105, optional_derive → • DERIVE LPAREN non_empty_list_commas(qualified_uident) RPAREN, EOF / SEMI] +fn yy_state_721(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_DERIVE => Shift(yy_state_230) - T_LBRACE => Shift(yy_state_685) - NT_optional_derive => Shift(yy_state_689) - T_EOF | T_SEMI => Reduce(0, NT_optional_derive, yy_action_165) + T_DERIVE => Shift(yy_state_268) + T_LBRACE => Shift(yy_state_722) + NT_optional_derive => Shift(yy_state_726) + T_EOF | T_SEMI => Reduce(0, NT_optional_derive, yy_action_163) _ => Error } } -// [66, type_sig → PUB pub_attr SUBERROR uident LBRACE • separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [148, enum_constructor → • UIDENT option(delimited(LPAREN,separated_nonempty_list(COMMA,constructor_param),RPAREN)) option(eq_tag), SEMI / RBRACE] -// [149, enum_constructor → • nonempty_list(attribute) UIDENT option(delimited(LPAREN,separated_nonempty_list(COMMA,constructor_param),RPAREN)) option(eq_tag), SEMI / RBRACE] -// [223, separated_list(SEMI,enum_constructor) → •, RBRACE] -// [224, separated_list(SEMI,enum_constructor) → • separated_nonempty_list(SEMI,enum_constructor), RBRACE] -// [252, nonempty_list(attribute) → • ATTRIBUTE, UIDENT] -// [253, nonempty_list(attribute) → • ATTRIBUTE nonempty_list(attribute), UIDENT] -// [260, separated_nonempty_list(SEMI,enum_constructor) → • enum_constructor, RBRACE] -// [261, separated_nonempty_list(SEMI,enum_constructor) → • enum_constructor SEMI separated_nonempty_list(SEMI,enum_constructor), RBRACE] -fn yy_state_685(_lookahead : YYSymbol) -> YYDecision { +// [70, type_sig → PUB pub_attr SUBERROR uident LBRACE • separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [152, enum_constructor → • UIDENT option(delimited(LPAREN,separated_nonempty_list(COMMA,constructor_param),RPAREN)) option(eq_tag), SEMI / RBRACE] +// [153, enum_constructor → • nonempty_list(attribute) UIDENT option(delimited(LPAREN,separated_nonempty_list(COMMA,constructor_param),RPAREN)) option(eq_tag), SEMI / RBRACE] +// [228, separated_list(SEMI,enum_constructor) → •, RBRACE] +// [229, separated_list(SEMI,enum_constructor) → • separated_nonempty_list(SEMI,enum_constructor), RBRACE] +// [257, nonempty_list(attribute) → • ATTRIBUTE, UIDENT] +// [258, nonempty_list(attribute) → • ATTRIBUTE nonempty_list(attribute), UIDENT] +// [265, separated_nonempty_list(SEMI,enum_constructor) → • enum_constructor, RBRACE] +// [266, separated_nonempty_list(SEMI,enum_constructor) → • enum_constructor SEMI separated_nonempty_list(SEMI,enum_constructor), RBRACE] +fn yy_state_722(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_ATTRIBUTE => Shift(yy_state_19) - NT_enum_constructor => Shift(yy_state_202) - NT_nonempty_list_attribute_ => Shift(yy_state_205) - T_UIDENT => Shift(yy_state_224) - NT_separated_nonempty_list_SEMI_enum_constructor_ => Shift(yy_state_227) - NT_separated_list_SEMI_enum_constructor_ => Shift(yy_state_686) - T_RBRACE => Reduce(0, NT_separated_list_SEMI_enum_constructor_, yy_action_184) + NT_enum_constructor => Shift(yy_state_240) + NT_nonempty_list_attribute_ => Shift(yy_state_243) + T_UIDENT => Shift(yy_state_262) + NT_separated_nonempty_list_SEMI_enum_constructor_ => Shift(yy_state_265) + NT_separated_list_SEMI_enum_constructor_ => Shift(yy_state_723) + T_RBRACE => Reduce(0, NT_separated_list_SEMI_enum_constructor_, yy_action_182) _ => Error } } -// [66, type_sig → PUB pub_attr SUBERROR uident LBRACE separated_list(SEMI,enum_constructor) • RBRACE optional_derive, EOF / SEMI] -fn yy_state_686(_lookahead : YYSymbol) -> YYDecision { +// [70, type_sig → PUB pub_attr SUBERROR uident LBRACE separated_list(SEMI,enum_constructor) • RBRACE optional_derive, EOF / SEMI] +fn yy_state_723(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RBRACE => Shift(yy_state_687) + T_RBRACE => Shift(yy_state_724) _ => Error } } -// [66, type_sig → PUB pub_attr SUBERROR uident LBRACE separated_list(SEMI,enum_constructor) RBRACE • optional_derive, EOF / SEMI] -// [100, optional_derive → •, EOF / SEMI] -// [101, optional_derive → • DERIVE LPAREN non_empty_list_commas(qualified_uident) RPAREN, EOF / SEMI] -fn yy_state_687(_lookahead : YYSymbol) -> YYDecision { +// [70, type_sig → PUB pub_attr SUBERROR uident LBRACE separated_list(SEMI,enum_constructor) RBRACE • optional_derive, EOF / SEMI] +// [104, optional_derive → •, EOF / SEMI] +// [105, optional_derive → • DERIVE LPAREN non_empty_list_commas(qualified_uident) RPAREN, EOF / SEMI] +fn yy_state_724(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_DERIVE => Shift(yy_state_230) - NT_optional_derive => Shift(yy_state_688) - T_EOF | T_SEMI => Reduce(0, NT_optional_derive, yy_action_165) + T_DERIVE => Shift(yy_state_268) + NT_optional_derive => Shift(yy_state_725) + T_EOF | T_SEMI => Reduce(0, NT_optional_derive, yy_action_163) _ => Error } } -// [66, type_sig → PUB pub_attr SUBERROR uident LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive •, EOF / SEMI] -fn yy_state_688(_lookahead : YYSymbol) -> YYDecision { +// [70, type_sig → PUB pub_attr SUBERROR uident LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive •, EOF / SEMI] +fn yy_state_725(_lookahead : YYSymbol) -> YYDecision { ReduceNoLookahead(8, NT_type_sig, yy_action_47) } -// [60, type_sig → PUB pub_attr SUBERROR uident optional_derive •, EOF / SEMI] -fn yy_state_689(_lookahead : YYSymbol) -> YYDecision { +// [64, type_sig → PUB pub_attr SUBERROR uident optional_derive •, EOF / SEMI] +fn yy_state_726(_lookahead : YYSymbol) -> YYDecision { ReduceNoLookahead(5, NT_type_sig, yy_action_46) } -// [54, type_sig → PUB pub_attr TYPE • type_decl_name_with_params optional_derive, EOF / SEMI] -// [126, alias_sig → PUB pub_attr TYPE • type_decl_name_with_params EQUAL type_, EOF / SEMI] -// [164, type_decl_name_with_params → • uident optional_type_params_no_constraints, EOF / DERIVE / EQUAL / SEMI] -// [212, uident → • UIDENT, EOF / DERIVE / EQUAL / SEMI / LBRACKET] -fn yy_state_690(_lookahead : YYSymbol) -> YYDecision { +// [58, type_sig → PUB pub_attr TYPE • type_decl_name_with_params optional_derive, EOF / SEMI] +// [130, alias_sig → PUB pub_attr TYPE • type_decl_name_with_params EQUAL type_, EOF / SEMI] +// [168, type_decl_name_with_params → • uident optional_type_params_no_constraints, EOF / DERIVE / EQUAL / SEMI] +// [216, uident → • UIDENT, EOF / DERIVE / EQUAL / SEMI / LBRACKET] +fn yy_state_727(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_UIDENT => Shift(yy_state_25) - NT_uident => Shift(yy_state_246) - NT_type_decl_name_with_params => Shift(yy_state_691) + NT_uident => Shift(yy_state_284) + NT_type_decl_name_with_params => Shift(yy_state_728) _ => Error } } -// [54, type_sig → PUB pub_attr TYPE type_decl_name_with_params • optional_derive, EOF / SEMI] -// [100, optional_derive → •, EOF / SEMI] -// [101, optional_derive → • DERIVE LPAREN non_empty_list_commas(qualified_uident) RPAREN, EOF / SEMI] -// [126, alias_sig → PUB pub_attr TYPE type_decl_name_with_params • EQUAL type_, EOF / SEMI] -fn yy_state_691(_lookahead : YYSymbol) -> YYDecision { +// [58, type_sig → PUB pub_attr TYPE type_decl_name_with_params • optional_derive, EOF / SEMI] +// [104, optional_derive → •, EOF / SEMI] +// [105, optional_derive → • DERIVE LPAREN non_empty_list_commas(qualified_uident) RPAREN, EOF / SEMI] +// [130, alias_sig → PUB pub_attr TYPE type_decl_name_with_params • EQUAL type_, EOF / SEMI] +fn yy_state_728(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_DERIVE => Shift(yy_state_230) - T_EQUAL => Shift(yy_state_692) - NT_optional_derive => Shift(yy_state_694) - T_EOF | T_SEMI => Reduce(0, NT_optional_derive, yy_action_165) - _ => Error - } -} - -// [126, alias_sig → PUB pub_attr TYPE type_decl_name_with_params EQUAL • type_, EOF / SEMI] -// [167, simple_type → • simple_type QUESTION, EOF / QUESTION / SEMI] -// [168, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, EOF / QUESTION / SEMI] -// [169, simple_type → • LPAREN type_ RPAREN, EOF / QUESTION / SEMI] -// [170, simple_type → • qualified_uident_ optional_type_arguments, EOF / QUESTION / SEMI] -// [171, simple_type → • AMPER qualified_uident_, EOF / QUESTION / SEMI] -// [172, simple_type → • UNDERSCORE, EOF / QUESTION / SEMI] -// [173, type_ → • simple_type, EOF / SEMI] -// [174, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] -// [175, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] -// [176, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] -// [177, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] -// [178, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] -// [179, type_ → • LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] -// [180, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] -// [181, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] -// [210, qualified_uident_ → • UIDENT, EOF / QUESTION / SEMI / LBRACKET] -// [211, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, EOF / QUESTION / SEMI / LBRACKET] -fn yy_state_692(_lookahead : YYSymbol) -> YYDecision { + T_DERIVE => Shift(yy_state_268) + T_EQUAL => Shift(yy_state_729) + NT_optional_derive => Shift(yy_state_731) + T_EOF | T_SEMI => Reduce(0, NT_optional_derive, yy_action_163) + _ => Error + } +} + +// [130, alias_sig → PUB pub_attr TYPE type_decl_name_with_params EQUAL • type_, EOF / SEMI] +// [171, simple_type → • simple_type QUESTION, EOF / QUESTION / SEMI] +// [172, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, EOF / QUESTION / SEMI] +// [173, simple_type → • LPAREN type_ RPAREN, EOF / QUESTION / SEMI] +// [174, simple_type → • qualified_uident_ optional_type_arguments, EOF / QUESTION / SEMI] +// [175, simple_type → • AMPER qualified_uident_, EOF / QUESTION / SEMI] +// [176, simple_type → • UNDERSCORE, EOF / QUESTION / SEMI] +// [177, type_ → • simple_type, EOF / SEMI] +// [178, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] +// [179, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] +// [180, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] +// [181, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] +// [182, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] +// [183, type_ → • LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] +// [184, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] +// [185, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] +// [214, qualified_uident_ → • UIDENT, EOF / QUESTION / SEMI / LBRACKET] +// [215, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, EOF / QUESTION / SEMI / LBRACKET] +fn yy_state_729(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_PACKAGE_NAME => Shift(yy_state_62) T_UIDENT => Shift(yy_state_64) @@ -13016,96 +13874,102 @@ fn yy_state_692(_lookahead : YYSymbol) -> YYDecision { NT_qualified_uident_ => Shift(yy_state_78) T_LPAREN => Shift(yy_state_83) NT_simple_type => Shift(yy_state_106) - NT_type_ => Shift(yy_state_693) + NT_type_ => Shift(yy_state_730) _ => Error } } -// [126, alias_sig → PUB pub_attr TYPE type_decl_name_with_params EQUAL type_ •, EOF / SEMI] -fn yy_state_693(_lookahead : YYSymbol) -> YYDecision { +// [130, alias_sig → PUB pub_attr TYPE type_decl_name_with_params EQUAL type_ •, EOF / SEMI] +fn yy_state_730(_lookahead : YYSymbol) -> YYDecision { ReduceNoLookahead(6, NT_alias_sig, yy_action_45) } -// [54, type_sig → PUB pub_attr TYPE type_decl_name_with_params optional_derive •, EOF / SEMI] -fn yy_state_694(_lookahead : YYSymbol) -> YYDecision { +// [58, type_sig → PUB pub_attr TYPE type_decl_name_with_params optional_derive •, EOF / SEMI] +fn yy_state_731(_lookahead : YYSymbol) -> YYDecision { ReduceNoLookahead(5, NT_type_sig, yy_action_44) } // [41, func_sig → PUB pub_attr FN • loption(type_params_with_constraints) func_name LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type, EOF / SEMI] -// [157, type_params_with_constraints → • LBRACKET separated_list(COMMA,type_param_with_constraints) RBRACKET, LIDENT / UIDENT / AMPER] -// [217, loption(type_params_with_constraints) → •, LIDENT / UIDENT / AMPER] -// [218, loption(type_params_with_constraints) → • type_params_with_constraints, LIDENT / UIDENT / AMPER] -fn yy_state_695(_lookahead : YYSymbol) -> YYDecision { +// [161, type_params_with_constraints → • LBRACKET separated_list(COMMA,type_param_with_constraints) RBRACKET, LIDENT / UIDENT / AMPER / EXTEND] +// [222, loption(type_params_with_constraints) → •, LIDENT / UIDENT / AMPER / EXTEND] +// [223, loption(type_params_with_constraints) → • type_params_with_constraints, LIDENT / UIDENT / AMPER / EXTEND] +fn yy_state_732(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACKET => Shift(yy_state_162) - NT_type_params_with_constraints => Shift(yy_state_291) - NT_loption_type_params_with_constraints_ => Shift(yy_state_696) - T_LIDENT | T_UIDENT | T_AMPER => Reduce(0, NT_loption_type_params_with_constraints_, yy_action_142) + NT_type_params_with_constraints => Shift(yy_state_143) + T_LBRACKET => Shift(yy_state_144) + NT_loption_type_params_with_constraints_ => Shift(yy_state_733) + T_LIDENT | T_UIDENT | T_AMPER | T_EXTEND => Reduce(0, NT_loption_type_params_with_constraints_, yy_action_217) _ => Error } } -// [28, method_self_type_coloncolon → • UIDENT COLONCOLON, LIDENT / UIDENT] -// [29, method_self_type_coloncolon → • AMPER UIDENT COLONCOLON, LIDENT / UIDENT] +// [28, method_self_type_coloncolon → • UIDENT COLONCOLON, LIDENT / UIDENT / EXTEND] +// [29, method_self_type_coloncolon → • AMPER UIDENT COLONCOLON, LIDENT / UIDENT / EXTEND] // [30, luident → • lident, LPAREN] // [31, luident → • uident, LPAREN] // [32, func_name → • luident, LPAREN] // [33, func_name → • method_self_type_coloncolon luident, LPAREN] // [41, func_sig → PUB pub_attr FN loption(type_params_with_constraints) • func_name LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type, EOF / SEMI] -// [212, uident → • UIDENT, LPAREN] -// [213, lident → • LIDENT, LPAREN] -fn yy_state_696(_lookahead : YYSymbol) -> YYDecision { +// [216, uident → • UIDENT, LPAREN] +// [217, lident → • LIDENT, LPAREN] +// [218, lident → • EXTEND, LPAREN] +fn yy_state_733(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LIDENT => Shift(yy_state_38) - NT_method_self_type_coloncolon => Shift(yy_state_299) - NT_uident => Shift(yy_state_301) - NT_lident => Shift(yy_state_302) - NT_luident => Shift(yy_state_303) - T_AMPER => Shift(yy_state_304) - T_UIDENT => Shift(yy_state_307) - NT_func_name => Shift(yy_state_697) + T_EXTEND => Shift(yy_state_38) + T_LIDENT => Shift(yy_state_39) + NT_method_self_type_coloncolon => Shift(yy_state_336) + NT_uident => Shift(yy_state_338) + NT_lident => Shift(yy_state_339) + NT_luident => Shift(yy_state_340) + T_AMPER => Shift(yy_state_341) + T_UIDENT => Shift(yy_state_344) + NT_func_name => Shift(yy_state_734) _ => Error } } // [41, func_sig → PUB pub_attr FN loption(type_params_with_constraints) func_name • LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type, EOF / SEMI] -fn yy_state_697(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_734(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LPAREN => Shift(yy_state_698) + T_LPAREN => Shift(yy_state_735) _ => Error } } // [41, func_sig → PUB pub_attr FN loption(type_params_with_constraints) func_name LPAREN • separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type, EOF / SEMI] -// [167, simple_type → • simple_type QUESTION, RPAREN / COMMA / QUESTION] -// [168, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, RPAREN / COMMA / QUESTION] -// [169, simple_type → • LPAREN type_ RPAREN, RPAREN / COMMA / QUESTION] -// [170, simple_type → • qualified_uident_ optional_type_arguments, RPAREN / COMMA / QUESTION] -// [171, simple_type → • AMPER qualified_uident_, RPAREN / COMMA / QUESTION] -// [172, simple_type → • UNDERSCORE, RPAREN / COMMA / QUESTION] -// [173, type_ → • simple_type, RPAREN / COMMA] -// [174, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [175, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [176, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [177, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [178, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [179, type_ → • LPAREN RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [180, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [181, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [190, parameter → • type_, RPAREN / COMMA] -// [191, parameter → • POST_LABEL COLON type_, RPAREN / COMMA] -// [192, parameter → • label QUESTION COLON type_, RPAREN / COMMA] -// [210, qualified_uident_ → • UIDENT, RPAREN / COMMA / QUESTION / LBRACKET] -// [211, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, RPAREN / COMMA / QUESTION / LBRACKET] -// [214, label → • LIDENT, QUESTION] -// [219, separated_list(COMMA,parameter) → •, RPAREN] -// [220, separated_list(COMMA,parameter) → • separated_nonempty_list(COMMA,parameter), RPAREN] -// [258, separated_nonempty_list(COMMA,parameter) → • parameter, RPAREN] -// [259, separated_nonempty_list(COMMA,parameter) → • parameter COMMA separated_nonempty_list(COMMA,parameter), RPAREN] -fn yy_state_698(_lookahead : YYSymbol) -> YYDecision { +// [171, simple_type → • simple_type QUESTION, RPAREN / COMMA / QUESTION] +// [172, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, RPAREN / COMMA / QUESTION] +// [173, simple_type → • LPAREN type_ RPAREN, RPAREN / COMMA / QUESTION] +// [174, simple_type → • qualified_uident_ optional_type_arguments, RPAREN / COMMA / QUESTION] +// [175, simple_type → • AMPER qualified_uident_, RPAREN / COMMA / QUESTION] +// [176, simple_type → • UNDERSCORE, RPAREN / COMMA / QUESTION] +// [177, type_ → • simple_type, RPAREN / COMMA] +// [178, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [179, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [180, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [181, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [182, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [183, type_ → • LPAREN RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [184, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [185, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [194, parameter → • type_, RPAREN / COMMA] +// [195, parameter → • POST_LABEL COLON type_, RPAREN / COMMA] +// [196, parameter → • label QUESTION COLON type_, RPAREN / COMMA] +// [214, qualified_uident_ → • UIDENT, RPAREN / COMMA / QUESTION / LBRACKET] +// [215, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, RPAREN / COMMA / QUESTION / LBRACKET] +// [217, lident → • LIDENT, QUESTION] +// [218, lident → • EXTEND, QUESTION] +// [219, label → • lident, QUESTION] +// [224, separated_list(COMMA,parameter) → •, RPAREN] +// [225, separated_list(COMMA,parameter) → • separated_nonempty_list(COMMA,parameter), RPAREN] +// [263, separated_nonempty_list(COMMA,parameter) → • parameter, RPAREN] +// [264, separated_nonempty_list(COMMA,parameter) → • parameter COMMA separated_nonempty_list(COMMA,parameter), RPAREN] +fn yy_state_735(_lookahead : YYSymbol) -> YYDecision { match _lookahead { + T_EXTEND => Shift(yy_state_38) + T_LIDENT => Shift(yy_state_39) NT_parameter => Shift(yy_state_58) - T_LIDENT => Shift(yy_state_61) + NT_lident => Shift(yy_state_61) T_PACKAGE_NAME => Shift(yy_state_62) T_UIDENT => Shift(yy_state_64) NT_label => Shift(yy_state_65) @@ -13118,52 +13982,52 @@ fn yy_state_698(_lookahead : YYSymbol) -> YYDecision { T_POST_LABEL => Shift(yy_state_122) NT_type_ => Shift(yy_state_125) NT_separated_nonempty_list_COMMA_parameter_ => Shift(yy_state_126) - NT_separated_list_COMMA_parameter_ => Shift(yy_state_699) - T_RPAREN => Reduce(0, NT_separated_list_COMMA_parameter_, yy_action_256) + NT_separated_list_COMMA_parameter_ => Shift(yy_state_736) + T_RPAREN => Reduce(0, NT_separated_list_COMMA_parameter_, yy_action_260) _ => Error } } // [41, func_sig → PUB pub_attr FN loption(type_params_with_constraints) func_name LPAREN separated_list(COMMA,parameter) • RPAREN THIN_ARROW return_type, EOF / SEMI] -fn yy_state_699(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_736(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RPAREN => Shift(yy_state_700) + T_RPAREN => Shift(yy_state_737) _ => Error } } // [41, func_sig → PUB pub_attr FN loption(type_params_with_constraints) func_name LPAREN separated_list(COMMA,parameter) RPAREN • THIN_ARROW return_type, EOF / SEMI] -fn yy_state_700(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_737(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_THIN_ARROW => Shift(yy_state_701) + T_THIN_ARROW => Shift(yy_state_738) _ => Error } } // [41, func_sig → PUB pub_attr FN loption(type_params_with_constraints) func_name LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW • return_type, EOF / SEMI] -// [167, simple_type → • simple_type QUESTION, EOF / RAISE / QUESTION / SEMI / NORAISE] -// [168, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, EOF / RAISE / QUESTION / SEMI / NORAISE] -// [169, simple_type → • LPAREN type_ RPAREN, EOF / RAISE / QUESTION / SEMI / NORAISE] -// [170, simple_type → • qualified_uident_ optional_type_arguments, EOF / RAISE / QUESTION / SEMI / NORAISE] -// [171, simple_type → • AMPER qualified_uident_, EOF / RAISE / QUESTION / SEMI / NORAISE] -// [172, simple_type → • UNDERSCORE, EOF / RAISE / QUESTION / SEMI / NORAISE] -// [173, type_ → • simple_type, EOF / SEMI] -// [174, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] -// [175, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] -// [176, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] -// [177, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] -// [178, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] -// [179, type_ → • LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] -// [180, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] -// [181, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] -// [182, return_type → • type_, EOF / SEMI] -// [183, return_type → • simple_type NORAISE, EOF / SEMI] -// [184, return_type → • simple_type RAISE, EOF / SEMI] -// [185, return_type → • simple_type RAISE error_type, EOF / SEMI] -// [186, return_type → • simple_type RAISE QUESTION, EOF / SEMI] -// [210, qualified_uident_ → • UIDENT, EOF / RAISE / QUESTION / SEMI / LBRACKET / NORAISE] -// [211, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, EOF / RAISE / QUESTION / SEMI / LBRACKET / NORAISE] -fn yy_state_701(_lookahead : YYSymbol) -> YYDecision { +// [171, simple_type → • simple_type QUESTION, EOF / RAISE / QUESTION / SEMI / NORAISE] +// [172, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, EOF / RAISE / QUESTION / SEMI / NORAISE] +// [173, simple_type → • LPAREN type_ RPAREN, EOF / RAISE / QUESTION / SEMI / NORAISE] +// [174, simple_type → • qualified_uident_ optional_type_arguments, EOF / RAISE / QUESTION / SEMI / NORAISE] +// [175, simple_type → • AMPER qualified_uident_, EOF / RAISE / QUESTION / SEMI / NORAISE] +// [176, simple_type → • UNDERSCORE, EOF / RAISE / QUESTION / SEMI / NORAISE] +// [177, type_ → • simple_type, EOF / SEMI] +// [178, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] +// [179, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] +// [180, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] +// [181, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] +// [182, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] +// [183, type_ → • LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] +// [184, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] +// [185, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] +// [186, return_type → • type_, EOF / SEMI] +// [187, return_type → • simple_type NORAISE, EOF / SEMI] +// [188, return_type → • simple_type RAISE, EOF / SEMI] +// [189, return_type → • simple_type RAISE error_type, EOF / SEMI] +// [190, return_type → • simple_type RAISE QUESTION, EOF / SEMI] +// [214, qualified_uident_ → • UIDENT, EOF / RAISE / QUESTION / SEMI / LBRACKET / NORAISE] +// [215, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, EOF / RAISE / QUESTION / SEMI / LBRACKET / NORAISE] +fn yy_state_738(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_PACKAGE_NAME => Shift(yy_state_62) T_UIDENT => Shift(yy_state_64) @@ -13174,99 +14038,105 @@ fn yy_state_701(_lookahead : YYSymbol) -> YYDecision { NT_qualified_uident_ => Shift(yy_state_78) T_LPAREN => Shift(yy_state_83) NT_simple_type => Shift(yy_state_87) - NT_return_type => Shift(yy_state_702) + NT_return_type => Shift(yy_state_739) _ => Error } } // [41, func_sig → PUB pub_attr FN loption(type_params_with_constraints) func_name LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type •, EOF / SEMI] -fn yy_state_702(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_739(_lookahead : YYSymbol) -> YYDecision { ReduceNoLookahead(10, NT_func_sig, yy_action_43) } // [40, func_sig → PUB pub_attr ASYNC • FN loption(type_params_with_constraints) func_name LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type, EOF / SEMI] -fn yy_state_703(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_740(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_FN => Shift(yy_state_704) + T_FN => Shift(yy_state_741) _ => Error } } // [40, func_sig → PUB pub_attr ASYNC FN • loption(type_params_with_constraints) func_name LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type, EOF / SEMI] -// [157, type_params_with_constraints → • LBRACKET separated_list(COMMA,type_param_with_constraints) RBRACKET, LIDENT / UIDENT / AMPER] -// [217, loption(type_params_with_constraints) → •, LIDENT / UIDENT / AMPER] -// [218, loption(type_params_with_constraints) → • type_params_with_constraints, LIDENT / UIDENT / AMPER] -fn yy_state_704(_lookahead : YYSymbol) -> YYDecision { +// [161, type_params_with_constraints → • LBRACKET separated_list(COMMA,type_param_with_constraints) RBRACKET, LIDENT / UIDENT / AMPER / EXTEND] +// [222, loption(type_params_with_constraints) → •, LIDENT / UIDENT / AMPER / EXTEND] +// [223, loption(type_params_with_constraints) → • type_params_with_constraints, LIDENT / UIDENT / AMPER / EXTEND] +fn yy_state_741(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACKET => Shift(yy_state_162) - NT_type_params_with_constraints => Shift(yy_state_291) - NT_loption_type_params_with_constraints_ => Shift(yy_state_705) - T_LIDENT | T_UIDENT | T_AMPER => Reduce(0, NT_loption_type_params_with_constraints_, yy_action_142) + NT_type_params_with_constraints => Shift(yy_state_143) + T_LBRACKET => Shift(yy_state_144) + NT_loption_type_params_with_constraints_ => Shift(yy_state_742) + T_LIDENT | T_UIDENT | T_AMPER | T_EXTEND => Reduce(0, NT_loption_type_params_with_constraints_, yy_action_217) _ => Error } } -// [28, method_self_type_coloncolon → • UIDENT COLONCOLON, LIDENT / UIDENT] -// [29, method_self_type_coloncolon → • AMPER UIDENT COLONCOLON, LIDENT / UIDENT] +// [28, method_self_type_coloncolon → • UIDENT COLONCOLON, LIDENT / UIDENT / EXTEND] +// [29, method_self_type_coloncolon → • AMPER UIDENT COLONCOLON, LIDENT / UIDENT / EXTEND] // [30, luident → • lident, LPAREN] // [31, luident → • uident, LPAREN] // [32, func_name → • luident, LPAREN] // [33, func_name → • method_self_type_coloncolon luident, LPAREN] // [40, func_sig → PUB pub_attr ASYNC FN loption(type_params_with_constraints) • func_name LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type, EOF / SEMI] -// [212, uident → • UIDENT, LPAREN] -// [213, lident → • LIDENT, LPAREN] -fn yy_state_705(_lookahead : YYSymbol) -> YYDecision { +// [216, uident → • UIDENT, LPAREN] +// [217, lident → • LIDENT, LPAREN] +// [218, lident → • EXTEND, LPAREN] +fn yy_state_742(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LIDENT => Shift(yy_state_38) - NT_method_self_type_coloncolon => Shift(yy_state_299) - NT_uident => Shift(yy_state_301) - NT_lident => Shift(yy_state_302) - NT_luident => Shift(yy_state_303) - T_AMPER => Shift(yy_state_304) - T_UIDENT => Shift(yy_state_307) - NT_func_name => Shift(yy_state_706) + T_EXTEND => Shift(yy_state_38) + T_LIDENT => Shift(yy_state_39) + NT_method_self_type_coloncolon => Shift(yy_state_336) + NT_uident => Shift(yy_state_338) + NT_lident => Shift(yy_state_339) + NT_luident => Shift(yy_state_340) + T_AMPER => Shift(yy_state_341) + T_UIDENT => Shift(yy_state_344) + NT_func_name => Shift(yy_state_743) _ => Error } } // [40, func_sig → PUB pub_attr ASYNC FN loption(type_params_with_constraints) func_name • LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type, EOF / SEMI] -fn yy_state_706(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_743(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LPAREN => Shift(yy_state_707) + T_LPAREN => Shift(yy_state_744) _ => Error } } // [40, func_sig → PUB pub_attr ASYNC FN loption(type_params_with_constraints) func_name LPAREN • separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type, EOF / SEMI] -// [167, simple_type → • simple_type QUESTION, RPAREN / COMMA / QUESTION] -// [168, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, RPAREN / COMMA / QUESTION] -// [169, simple_type → • LPAREN type_ RPAREN, RPAREN / COMMA / QUESTION] -// [170, simple_type → • qualified_uident_ optional_type_arguments, RPAREN / COMMA / QUESTION] -// [171, simple_type → • AMPER qualified_uident_, RPAREN / COMMA / QUESTION] -// [172, simple_type → • UNDERSCORE, RPAREN / COMMA / QUESTION] -// [173, type_ → • simple_type, RPAREN / COMMA] -// [174, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [175, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [176, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [177, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [178, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [179, type_ → • LPAREN RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [180, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [181, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [190, parameter → • type_, RPAREN / COMMA] -// [191, parameter → • POST_LABEL COLON type_, RPAREN / COMMA] -// [192, parameter → • label QUESTION COLON type_, RPAREN / COMMA] -// [210, qualified_uident_ → • UIDENT, RPAREN / COMMA / QUESTION / LBRACKET] -// [211, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, RPAREN / COMMA / QUESTION / LBRACKET] -// [214, label → • LIDENT, QUESTION] -// [219, separated_list(COMMA,parameter) → •, RPAREN] -// [220, separated_list(COMMA,parameter) → • separated_nonempty_list(COMMA,parameter), RPAREN] -// [258, separated_nonempty_list(COMMA,parameter) → • parameter, RPAREN] -// [259, separated_nonempty_list(COMMA,parameter) → • parameter COMMA separated_nonempty_list(COMMA,parameter), RPAREN] -fn yy_state_707(_lookahead : YYSymbol) -> YYDecision { +// [171, simple_type → • simple_type QUESTION, RPAREN / COMMA / QUESTION] +// [172, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, RPAREN / COMMA / QUESTION] +// [173, simple_type → • LPAREN type_ RPAREN, RPAREN / COMMA / QUESTION] +// [174, simple_type → • qualified_uident_ optional_type_arguments, RPAREN / COMMA / QUESTION] +// [175, simple_type → • AMPER qualified_uident_, RPAREN / COMMA / QUESTION] +// [176, simple_type → • UNDERSCORE, RPAREN / COMMA / QUESTION] +// [177, type_ → • simple_type, RPAREN / COMMA] +// [178, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [179, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [180, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [181, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [182, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [183, type_ → • LPAREN RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [184, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [185, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [194, parameter → • type_, RPAREN / COMMA] +// [195, parameter → • POST_LABEL COLON type_, RPAREN / COMMA] +// [196, parameter → • label QUESTION COLON type_, RPAREN / COMMA] +// [214, qualified_uident_ → • UIDENT, RPAREN / COMMA / QUESTION / LBRACKET] +// [215, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, RPAREN / COMMA / QUESTION / LBRACKET] +// [217, lident → • LIDENT, QUESTION] +// [218, lident → • EXTEND, QUESTION] +// [219, label → • lident, QUESTION] +// [224, separated_list(COMMA,parameter) → •, RPAREN] +// [225, separated_list(COMMA,parameter) → • separated_nonempty_list(COMMA,parameter), RPAREN] +// [263, separated_nonempty_list(COMMA,parameter) → • parameter, RPAREN] +// [264, separated_nonempty_list(COMMA,parameter) → • parameter COMMA separated_nonempty_list(COMMA,parameter), RPAREN] +fn yy_state_744(_lookahead : YYSymbol) -> YYDecision { match _lookahead { + T_EXTEND => Shift(yy_state_38) + T_LIDENT => Shift(yy_state_39) NT_parameter => Shift(yy_state_58) - T_LIDENT => Shift(yy_state_61) + NT_lident => Shift(yy_state_61) T_PACKAGE_NAME => Shift(yy_state_62) T_UIDENT => Shift(yy_state_64) NT_label => Shift(yy_state_65) @@ -13279,52 +14149,52 @@ fn yy_state_707(_lookahead : YYSymbol) -> YYDecision { T_POST_LABEL => Shift(yy_state_122) NT_type_ => Shift(yy_state_125) NT_separated_nonempty_list_COMMA_parameter_ => Shift(yy_state_126) - NT_separated_list_COMMA_parameter_ => Shift(yy_state_708) - T_RPAREN => Reduce(0, NT_separated_list_COMMA_parameter_, yy_action_256) + NT_separated_list_COMMA_parameter_ => Shift(yy_state_745) + T_RPAREN => Reduce(0, NT_separated_list_COMMA_parameter_, yy_action_260) _ => Error } } // [40, func_sig → PUB pub_attr ASYNC FN loption(type_params_with_constraints) func_name LPAREN separated_list(COMMA,parameter) • RPAREN THIN_ARROW return_type, EOF / SEMI] -fn yy_state_708(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_745(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RPAREN => Shift(yy_state_709) + T_RPAREN => Shift(yy_state_746) _ => Error } } // [40, func_sig → PUB pub_attr ASYNC FN loption(type_params_with_constraints) func_name LPAREN separated_list(COMMA,parameter) RPAREN • THIN_ARROW return_type, EOF / SEMI] -fn yy_state_709(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_746(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_THIN_ARROW => Shift(yy_state_710) + T_THIN_ARROW => Shift(yy_state_747) _ => Error } } // [40, func_sig → PUB pub_attr ASYNC FN loption(type_params_with_constraints) func_name LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW • return_type, EOF / SEMI] -// [167, simple_type → • simple_type QUESTION, EOF / RAISE / QUESTION / SEMI / NORAISE] -// [168, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, EOF / RAISE / QUESTION / SEMI / NORAISE] -// [169, simple_type → • LPAREN type_ RPAREN, EOF / RAISE / QUESTION / SEMI / NORAISE] -// [170, simple_type → • qualified_uident_ optional_type_arguments, EOF / RAISE / QUESTION / SEMI / NORAISE] -// [171, simple_type → • AMPER qualified_uident_, EOF / RAISE / QUESTION / SEMI / NORAISE] -// [172, simple_type → • UNDERSCORE, EOF / RAISE / QUESTION / SEMI / NORAISE] -// [173, type_ → • simple_type, EOF / SEMI] -// [174, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] -// [175, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] -// [176, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] -// [177, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] -// [178, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] -// [179, type_ → • LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] -// [180, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] -// [181, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] -// [182, return_type → • type_, EOF / SEMI] -// [183, return_type → • simple_type NORAISE, EOF / SEMI] -// [184, return_type → • simple_type RAISE, EOF / SEMI] -// [185, return_type → • simple_type RAISE error_type, EOF / SEMI] -// [186, return_type → • simple_type RAISE QUESTION, EOF / SEMI] -// [210, qualified_uident_ → • UIDENT, EOF / RAISE / QUESTION / SEMI / LBRACKET / NORAISE] -// [211, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, EOF / RAISE / QUESTION / SEMI / LBRACKET / NORAISE] -fn yy_state_710(_lookahead : YYSymbol) -> YYDecision { +// [171, simple_type → • simple_type QUESTION, EOF / RAISE / QUESTION / SEMI / NORAISE] +// [172, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, EOF / RAISE / QUESTION / SEMI / NORAISE] +// [173, simple_type → • LPAREN type_ RPAREN, EOF / RAISE / QUESTION / SEMI / NORAISE] +// [174, simple_type → • qualified_uident_ optional_type_arguments, EOF / RAISE / QUESTION / SEMI / NORAISE] +// [175, simple_type → • AMPER qualified_uident_, EOF / RAISE / QUESTION / SEMI / NORAISE] +// [176, simple_type → • UNDERSCORE, EOF / RAISE / QUESTION / SEMI / NORAISE] +// [177, type_ → • simple_type, EOF / SEMI] +// [178, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] +// [179, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] +// [180, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] +// [181, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] +// [182, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] +// [183, type_ → • LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] +// [184, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] +// [185, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] +// [186, return_type → • type_, EOF / SEMI] +// [187, return_type → • simple_type NORAISE, EOF / SEMI] +// [188, return_type → • simple_type RAISE, EOF / SEMI] +// [189, return_type → • simple_type RAISE error_type, EOF / SEMI] +// [190, return_type → • simple_type RAISE QUESTION, EOF / SEMI] +// [214, qualified_uident_ → • UIDENT, EOF / RAISE / QUESTION / SEMI / LBRACKET / NORAISE] +// [215, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, EOF / RAISE / QUESTION / SEMI / LBRACKET / NORAISE] +fn yy_state_747(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_PACKAGE_NAME => Shift(yy_state_62) T_UIDENT => Shift(yy_state_64) @@ -13335,53 +14205,55 @@ fn yy_state_710(_lookahead : YYSymbol) -> YYDecision { NT_qualified_uident_ => Shift(yy_state_78) T_LPAREN => Shift(yy_state_83) NT_simple_type => Shift(yy_state_87) - NT_return_type => Shift(yy_state_711) + NT_return_type => Shift(yy_state_748) _ => Error } } // [40, func_sig → PUB pub_attr ASYNC FN loption(type_params_with_constraints) func_name LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type •, EOF / SEMI] -fn yy_state_711(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_748(_lookahead : YYSymbol) -> YYDecision { ReduceNoLookahead(11, NT_func_sig, yy_action_42) } // [24, value_sig → PUB pub_attr LET • lident COLON type_, EOF / SEMI] -// [213, lident → • LIDENT, COLON] -fn yy_state_712(_lookahead : YYSymbol) -> YYDecision { +// [217, lident → • LIDENT, COLON] +// [218, lident → • EXTEND, COLON] +fn yy_state_749(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LIDENT => Shift(yy_state_38) - NT_lident => Shift(yy_state_713) + T_EXTEND => Shift(yy_state_38) + T_LIDENT => Shift(yy_state_39) + NT_lident => Shift(yy_state_750) _ => Error } } // [24, value_sig → PUB pub_attr LET lident • COLON type_, EOF / SEMI] -fn yy_state_713(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_750(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_COLON => Shift(yy_state_714) + T_COLON => Shift(yy_state_751) _ => Error } } // [24, value_sig → PUB pub_attr LET lident COLON • type_, EOF / SEMI] -// [167, simple_type → • simple_type QUESTION, EOF / QUESTION / SEMI] -// [168, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, EOF / QUESTION / SEMI] -// [169, simple_type → • LPAREN type_ RPAREN, EOF / QUESTION / SEMI] -// [170, simple_type → • qualified_uident_ optional_type_arguments, EOF / QUESTION / SEMI] -// [171, simple_type → • AMPER qualified_uident_, EOF / QUESTION / SEMI] -// [172, simple_type → • UNDERSCORE, EOF / QUESTION / SEMI] -// [173, type_ → • simple_type, EOF / SEMI] -// [174, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] -// [175, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] -// [176, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] -// [177, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] -// [178, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] -// [179, type_ → • LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] -// [180, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] -// [181, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] -// [210, qualified_uident_ → • UIDENT, EOF / QUESTION / SEMI / LBRACKET] -// [211, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, EOF / QUESTION / SEMI / LBRACKET] -fn yy_state_714(_lookahead : YYSymbol) -> YYDecision { +// [171, simple_type → • simple_type QUESTION, EOF / QUESTION / SEMI] +// [172, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, EOF / QUESTION / SEMI] +// [173, simple_type → • LPAREN type_ RPAREN, EOF / QUESTION / SEMI] +// [174, simple_type → • qualified_uident_ optional_type_arguments, EOF / QUESTION / SEMI] +// [175, simple_type → • AMPER qualified_uident_, EOF / QUESTION / SEMI] +// [176, simple_type → • UNDERSCORE, EOF / QUESTION / SEMI] +// [177, type_ → • simple_type, EOF / SEMI] +// [178, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] +// [179, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] +// [180, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] +// [181, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] +// [182, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] +// [183, type_ → • LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] +// [184, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] +// [185, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] +// [214, qualified_uident_ → • UIDENT, EOF / QUESTION / SEMI / LBRACKET] +// [215, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, EOF / QUESTION / SEMI / LBRACKET] +fn yy_state_751(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_PACKAGE_NAME => Shift(yy_state_62) T_UIDENT => Shift(yy_state_64) @@ -13391,53 +14263,53 @@ fn yy_state_714(_lookahead : YYSymbol) -> YYDecision { NT_qualified_uident_ => Shift(yy_state_78) T_LPAREN => Shift(yy_state_83) NT_simple_type => Shift(yy_state_106) - NT_type_ => Shift(yy_state_715) + NT_type_ => Shift(yy_state_752) _ => Error } } // [24, value_sig → PUB pub_attr LET lident COLON type_ •, EOF / SEMI] -fn yy_state_715(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_752(_lookahead : YYSymbol) -> YYDecision { ReduceNoLookahead(6, NT_value_sig, yy_action_41) } // [18, const_sig → PUB pub_attr CONST • uident COLON type_ EQUAL constant, EOF / SEMI] -// [212, uident → • UIDENT, COLON] -fn yy_state_716(_lookahead : YYSymbol) -> YYDecision { +// [216, uident → • UIDENT, COLON] +fn yy_state_753(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_UIDENT => Shift(yy_state_25) - NT_uident => Shift(yy_state_717) + NT_uident => Shift(yy_state_754) _ => Error } } // [18, const_sig → PUB pub_attr CONST uident • COLON type_ EQUAL constant, EOF / SEMI] -fn yy_state_717(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_754(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_COLON => Shift(yy_state_718) + T_COLON => Shift(yy_state_755) _ => Error } } // [18, const_sig → PUB pub_attr CONST uident COLON • type_ EQUAL constant, EOF / SEMI] -// [167, simple_type → • simple_type QUESTION, EQUAL / QUESTION] -// [168, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, EQUAL / QUESTION] -// [169, simple_type → • LPAREN type_ RPAREN, EQUAL / QUESTION] -// [170, simple_type → • qualified_uident_ optional_type_arguments, EQUAL / QUESTION] -// [171, simple_type → • AMPER qualified_uident_, EQUAL / QUESTION] -// [172, simple_type → • UNDERSCORE, EQUAL / QUESTION] -// [173, type_ → • simple_type, EQUAL] -// [174, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EQUAL] -// [175, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EQUAL] -// [176, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EQUAL] -// [177, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EQUAL] -// [178, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, EQUAL] -// [179, type_ → • LPAREN RPAREN THIN_ARROW return_type, EQUAL] -// [180, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, EQUAL] -// [181, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, EQUAL] -// [210, qualified_uident_ → • UIDENT, EQUAL / QUESTION / LBRACKET] -// [211, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, EQUAL / QUESTION / LBRACKET] -fn yy_state_718(_lookahead : YYSymbol) -> YYDecision { +// [171, simple_type → • simple_type QUESTION, EQUAL / QUESTION] +// [172, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, EQUAL / QUESTION] +// [173, simple_type → • LPAREN type_ RPAREN, EQUAL / QUESTION] +// [174, simple_type → • qualified_uident_ optional_type_arguments, EQUAL / QUESTION] +// [175, simple_type → • AMPER qualified_uident_, EQUAL / QUESTION] +// [176, simple_type → • UNDERSCORE, EQUAL / QUESTION] +// [177, type_ → • simple_type, EQUAL] +// [178, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EQUAL] +// [179, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EQUAL] +// [180, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EQUAL] +// [181, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EQUAL] +// [182, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, EQUAL] +// [183, type_ → • LPAREN RPAREN THIN_ARROW return_type, EQUAL] +// [184, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, EQUAL] +// [185, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, EQUAL] +// [214, qualified_uident_ → • UIDENT, EQUAL / QUESTION / LBRACKET] +// [215, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, EQUAL / QUESTION / LBRACKET] +fn yy_state_755(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_PACKAGE_NAME => Shift(yy_state_62) T_UIDENT => Shift(yy_state_64) @@ -13447,51 +14319,51 @@ fn yy_state_718(_lookahead : YYSymbol) -> YYDecision { NT_qualified_uident_ => Shift(yy_state_78) T_LPAREN => Shift(yy_state_83) NT_simple_type => Shift(yy_state_106) - NT_type_ => Shift(yy_state_719) + NT_type_ => Shift(yy_state_756) _ => Error } } // [18, const_sig → PUB pub_attr CONST uident COLON type_ • EQUAL constant, EOF / SEMI] -fn yy_state_719(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_756(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_EQUAL => Shift(yy_state_720) + T_EQUAL => Shift(yy_state_757) _ => Error } } // [18, const_sig → PUB pub_attr CONST uident COLON type_ EQUAL • constant, EOF / SEMI] -// [193, constant → • TRUE, EOF / SEMI] -// [194, constant → • FALSE, EOF / SEMI] -// [195, constant → • BYTE, EOF / SEMI] -// [196, constant → • BYTES, EOF / SEMI] -// [197, constant → • CHAR, EOF / SEMI] -// [198, constant → • INT, EOF / SEMI] -// [199, constant → • MINUS INT, EOF / SEMI] -// [200, constant → • FLOAT, EOF / SEMI] -// [201, constant → • MINUS FLOAT, EOF / SEMI] -// [202, constant → • DOUBLE, EOF / SEMI] -// [203, constant → • MINUS DOUBLE, EOF / SEMI] -// [204, constant → • STRING, EOF / SEMI] -fn yy_state_720(_lookahead : YYSymbol) -> YYDecision { +// [197, constant → • TRUE, EOF / SEMI] +// [198, constant → • FALSE, EOF / SEMI] +// [199, constant → • BYTE, EOF / SEMI] +// [200, constant → • BYTES, EOF / SEMI] +// [201, constant → • CHAR, EOF / SEMI] +// [202, constant → • INT, EOF / SEMI] +// [203, constant → • MINUS INT, EOF / SEMI] +// [204, constant → • FLOAT, EOF / SEMI] +// [205, constant → • MINUS FLOAT, EOF / SEMI] +// [206, constant → • DOUBLE, EOF / SEMI] +// [207, constant → • MINUS DOUBLE, EOF / SEMI] +// [208, constant → • STRING, EOF / SEMI] +fn yy_state_757(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_STRING => Shift(yy_state_511) - T_DOUBLE => Shift(yy_state_512) - T_FLOAT => Shift(yy_state_513) - T_MINUS => Shift(yy_state_514) - T_INT => Shift(yy_state_518) - T_CHAR => Shift(yy_state_519) - T_BYTES => Shift(yy_state_520) - T_BYTE => Shift(yy_state_521) - T_FALSE => Shift(yy_state_522) - T_TRUE => Shift(yy_state_523) - NT_constant => Shift(yy_state_721) + T_STRING => Shift(yy_state_548) + T_DOUBLE => Shift(yy_state_549) + T_FLOAT => Shift(yy_state_550) + T_MINUS => Shift(yy_state_551) + T_INT => Shift(yy_state_555) + T_CHAR => Shift(yy_state_556) + T_BYTES => Shift(yy_state_557) + T_BYTE => Shift(yy_state_558) + T_FALSE => Shift(yy_state_559) + T_TRUE => Shift(yy_state_560) + NT_constant => Shift(yy_state_758) _ => Error } } // [18, const_sig → PUB pub_attr CONST uident COLON type_ EQUAL constant •, EOF / SEMI] -fn yy_state_721(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_758(_lookahead : YYSymbol) -> YYDecision { ReduceNoLookahead(8, NT_const_sig, yy_action_39) } @@ -13499,253 +14371,255 @@ fn yy_state_721(_lookahead : YYSymbol) -> YYDecision { // [23, value_sig → PRIV • LET lident COLON type_, EOF / SEMI] // [38, func_sig → PRIV • ASYNC FN loption(type_params_with_constraints) func_name LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type, EOF / SEMI] // [39, func_sig → PRIV • FN loption(type_params_with_constraints) func_name LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type, EOF / SEMI] -// [53, type_sig → PRIV • TYPE type_decl_name_with_params optional_derive, EOF / SEMI] -// [59, type_sig → PRIV • SUBERROR uident optional_derive, EOF / SEMI] -// [65, type_sig → PRIV • SUBERROR uident LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [71, type_sig → PRIV • STRUCT type_decl_name_with_params LBRACE record_decl_body RBRACE optional_derive, EOF / SEMI] -// [77, type_sig → PRIV • STRUCT type_decl_name_with_params LPAREN separated_list(COMMA,type_) RPAREN optional_derive, EOF / SEMI] -// [83, type_sig → PRIV • ENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [89, type_sig → PRIV • EXTENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [95, type_sig → PRIV • EXTENUM extensible_enum_extension_target PLUS_EQUAL LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [103, impl_sig → PRIV • IMPL type_params_with_constraints qualified_uident FOR type_, EOF / SEMI] -// [109, impl_sig → PRIV • IMPL qualified_uident FOR type_, EOF / SEMI] -// [115, trait_sig → PRIV • TRAIT uident loption(preceded(COLON,separated_nonempty_list(PLUS,qualified_uident))) trait_body, EOF / SEMI] -// [125, alias_sig → PRIV • TYPE type_decl_name_with_params EQUAL type_, EOF / SEMI] -// [131, alias_sig → PRIV • FNALIAS uident COLONCOLON lident, EOF / SEMI] -// [137, alias_sig → PRIV • USING PACKAGE_NAME LBRACE TYPE uident using_binder RBRACE, EOF / SEMI] -// [143, alias_sig → PRIV • USING PACKAGE_NAME LBRACE TRAIT uident using_binder RBRACE, EOF / SEMI] -fn yy_state_722(_lookahead : YYSymbol) -> YYDecision { +// [57, type_sig → PRIV • TYPE type_decl_name_with_params optional_derive, EOF / SEMI] +// [63, type_sig → PRIV • SUBERROR uident optional_derive, EOF / SEMI] +// [69, type_sig → PRIV • SUBERROR uident LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [75, type_sig → PRIV • STRUCT type_decl_name_with_params LBRACE record_decl_body RBRACE optional_derive, EOF / SEMI] +// [81, type_sig → PRIV • STRUCT type_decl_name_with_params LPAREN separated_list(COMMA,type_) RPAREN optional_derive, EOF / SEMI] +// [87, type_sig → PRIV • ENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [93, type_sig → PRIV • EXTENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [99, type_sig → PRIV • EXTENUM extensible_enum_extension_target PLUS_EQUAL LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [107, impl_sig → PRIV • IMPL type_params_with_constraints qualified_uident FOR type_, EOF / SEMI] +// [113, impl_sig → PRIV • IMPL qualified_uident FOR type_, EOF / SEMI] +// [119, trait_sig → PRIV • TRAIT uident loption(preceded(COLON,separated_nonempty_list(PLUS,qualified_uident))) trait_body, EOF / SEMI] +// [129, alias_sig → PRIV • TYPE type_decl_name_with_params EQUAL type_, EOF / SEMI] +// [135, alias_sig → PRIV • FNALIAS uident COLONCOLON lident, EOF / SEMI] +// [141, alias_sig → PRIV • USING PACKAGE_NAME LBRACE TYPE uident using_binder RBRACE, EOF / SEMI] +// [147, alias_sig → PRIV • USING PACKAGE_NAME LBRACE TRAIT uident using_binder RBRACE, EOF / SEMI] +fn yy_state_759(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_USING => Shift(yy_state_723) - T_FNALIAS => Shift(yy_state_734) - T_TRAIT => Shift(yy_state_738) - T_IMPL => Shift(yy_state_742) - T_EXTENUM => Shift(yy_state_750) - T_ENUM => Shift(yy_state_762) - T_STRUCT => Shift(yy_state_768) - T_SUBERROR => Shift(yy_state_778) - T_TYPE => Shift(yy_state_785) - T_FN => Shift(yy_state_790) - T_ASYNC => Shift(yy_state_798) - T_LET => Shift(yy_state_807) - T_CONST => Shift(yy_state_811) + T_USING => Shift(yy_state_760) + T_FNALIAS => Shift(yy_state_771) + T_TRAIT => Shift(yy_state_775) + T_IMPL => Shift(yy_state_779) + T_EXTENUM => Shift(yy_state_787) + T_ENUM => Shift(yy_state_799) + T_STRUCT => Shift(yy_state_805) + T_SUBERROR => Shift(yy_state_815) + T_TYPE => Shift(yy_state_822) + T_FN => Shift(yy_state_827) + T_ASYNC => Shift(yy_state_835) + T_LET => Shift(yy_state_844) + T_CONST => Shift(yy_state_848) _ => Error } } -// [137, alias_sig → PRIV USING • PACKAGE_NAME LBRACE TYPE uident using_binder RBRACE, EOF / SEMI] -// [143, alias_sig → PRIV USING • PACKAGE_NAME LBRACE TRAIT uident using_binder RBRACE, EOF / SEMI] -fn yy_state_723(_lookahead : YYSymbol) -> YYDecision { +// [141, alias_sig → PRIV USING • PACKAGE_NAME LBRACE TYPE uident using_binder RBRACE, EOF / SEMI] +// [147, alias_sig → PRIV USING • PACKAGE_NAME LBRACE TRAIT uident using_binder RBRACE, EOF / SEMI] +fn yy_state_760(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_PACKAGE_NAME => Shift(yy_state_724) + T_PACKAGE_NAME => Shift(yy_state_761) _ => Error } } -// [137, alias_sig → PRIV USING PACKAGE_NAME • LBRACE TYPE uident using_binder RBRACE, EOF / SEMI] -// [143, alias_sig → PRIV USING PACKAGE_NAME • LBRACE TRAIT uident using_binder RBRACE, EOF / SEMI] -fn yy_state_724(_lookahead : YYSymbol) -> YYDecision { +// [141, alias_sig → PRIV USING PACKAGE_NAME • LBRACE TYPE uident using_binder RBRACE, EOF / SEMI] +// [147, alias_sig → PRIV USING PACKAGE_NAME • LBRACE TRAIT uident using_binder RBRACE, EOF / SEMI] +fn yy_state_761(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACE => Shift(yy_state_725) + T_LBRACE => Shift(yy_state_762) _ => Error } } -// [137, alias_sig → PRIV USING PACKAGE_NAME LBRACE • TYPE uident using_binder RBRACE, EOF / SEMI] -// [143, alias_sig → PRIV USING PACKAGE_NAME LBRACE • TRAIT uident using_binder RBRACE, EOF / SEMI] -fn yy_state_725(_lookahead : YYSymbol) -> YYDecision { +// [141, alias_sig → PRIV USING PACKAGE_NAME LBRACE • TYPE uident using_binder RBRACE, EOF / SEMI] +// [147, alias_sig → PRIV USING PACKAGE_NAME LBRACE • TRAIT uident using_binder RBRACE, EOF / SEMI] +fn yy_state_762(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_TRAIT => Shift(yy_state_726) - T_TYPE => Shift(yy_state_730) + T_TRAIT => Shift(yy_state_763) + T_TYPE => Shift(yy_state_767) _ => Error } } -// [143, alias_sig → PRIV USING PACKAGE_NAME LBRACE TRAIT • uident using_binder RBRACE, EOF / SEMI] -// [212, uident → • UIDENT, RBRACE / AS] -fn yy_state_726(_lookahead : YYSymbol) -> YYDecision { +// [147, alias_sig → PRIV USING PACKAGE_NAME LBRACE TRAIT • uident using_binder RBRACE, EOF / SEMI] +// [216, uident → • UIDENT, RBRACE / AS] +fn yy_state_763(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_UIDENT => Shift(yy_state_25) - NT_uident => Shift(yy_state_727) + NT_uident => Shift(yy_state_764) _ => Error } } -// [122, using_binder → •, RBRACE] -// [123, using_binder → • AS uident, RBRACE] -// [143, alias_sig → PRIV USING PACKAGE_NAME LBRACE TRAIT uident • using_binder RBRACE, EOF / SEMI] -fn yy_state_727(_lookahead : YYSymbol) -> YYDecision { +// [126, using_binder → •, RBRACE] +// [127, using_binder → • AS uident, RBRACE] +// [147, alias_sig → PRIV USING PACKAGE_NAME LBRACE TRAIT uident • using_binder RBRACE, EOF / SEMI] +fn yy_state_764(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_AS => Shift(yy_state_29) - NT_using_binder => Shift(yy_state_728) - T_RBRACE => Reduce(0, NT_using_binder, yy_action_273) + NT_using_binder => Shift(yy_state_765) + T_RBRACE => Reduce(0, NT_using_binder, yy_action_278) _ => Error } } -// [143, alias_sig → PRIV USING PACKAGE_NAME LBRACE TRAIT uident using_binder • RBRACE, EOF / SEMI] -fn yy_state_728(_lookahead : YYSymbol) -> YYDecision { +// [147, alias_sig → PRIV USING PACKAGE_NAME LBRACE TRAIT uident using_binder • RBRACE, EOF / SEMI] +fn yy_state_765(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RBRACE => Shift(yy_state_729) + T_RBRACE => Shift(yy_state_766) _ => Error } } -// [143, alias_sig → PRIV USING PACKAGE_NAME LBRACE TRAIT uident using_binder RBRACE •, EOF / SEMI] -fn yy_state_729(_lookahead : YYSymbol) -> YYDecision { +// [147, alias_sig → PRIV USING PACKAGE_NAME LBRACE TRAIT uident using_binder RBRACE •, EOF / SEMI] +fn yy_state_766(_lookahead : YYSymbol) -> YYDecision { ReduceNoLookahead(8, NT_alias_sig, yy_action_38) } -// [137, alias_sig → PRIV USING PACKAGE_NAME LBRACE TYPE • uident using_binder RBRACE, EOF / SEMI] -// [212, uident → • UIDENT, RBRACE / AS] -fn yy_state_730(_lookahead : YYSymbol) -> YYDecision { +// [141, alias_sig → PRIV USING PACKAGE_NAME LBRACE TYPE • uident using_binder RBRACE, EOF / SEMI] +// [216, uident → • UIDENT, RBRACE / AS] +fn yy_state_767(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_UIDENT => Shift(yy_state_25) - NT_uident => Shift(yy_state_731) + NT_uident => Shift(yy_state_768) _ => Error } } -// [122, using_binder → •, RBRACE] -// [123, using_binder → • AS uident, RBRACE] -// [137, alias_sig → PRIV USING PACKAGE_NAME LBRACE TYPE uident • using_binder RBRACE, EOF / SEMI] -fn yy_state_731(_lookahead : YYSymbol) -> YYDecision { +// [126, using_binder → •, RBRACE] +// [127, using_binder → • AS uident, RBRACE] +// [141, alias_sig → PRIV USING PACKAGE_NAME LBRACE TYPE uident • using_binder RBRACE, EOF / SEMI] +fn yy_state_768(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_AS => Shift(yy_state_29) - NT_using_binder => Shift(yy_state_732) - T_RBRACE => Reduce(0, NT_using_binder, yy_action_273) + NT_using_binder => Shift(yy_state_769) + T_RBRACE => Reduce(0, NT_using_binder, yy_action_278) _ => Error } } -// [137, alias_sig → PRIV USING PACKAGE_NAME LBRACE TYPE uident using_binder • RBRACE, EOF / SEMI] -fn yy_state_732(_lookahead : YYSymbol) -> YYDecision { +// [141, alias_sig → PRIV USING PACKAGE_NAME LBRACE TYPE uident using_binder • RBRACE, EOF / SEMI] +fn yy_state_769(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RBRACE => Shift(yy_state_733) + T_RBRACE => Shift(yy_state_770) _ => Error } } -// [137, alias_sig → PRIV USING PACKAGE_NAME LBRACE TYPE uident using_binder RBRACE •, EOF / SEMI] -fn yy_state_733(_lookahead : YYSymbol) -> YYDecision { +// [141, alias_sig → PRIV USING PACKAGE_NAME LBRACE TYPE uident using_binder RBRACE •, EOF / SEMI] +fn yy_state_770(_lookahead : YYSymbol) -> YYDecision { ReduceNoLookahead(8, NT_alias_sig, yy_action_37) } -// [131, alias_sig → PRIV FNALIAS • uident COLONCOLON lident, EOF / SEMI] -// [212, uident → • UIDENT, COLONCOLON] -fn yy_state_734(_lookahead : YYSymbol) -> YYDecision { +// [135, alias_sig → PRIV FNALIAS • uident COLONCOLON lident, EOF / SEMI] +// [216, uident → • UIDENT, COLONCOLON] +fn yy_state_771(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_UIDENT => Shift(yy_state_25) - NT_uident => Shift(yy_state_735) + NT_uident => Shift(yy_state_772) _ => Error } } -// [131, alias_sig → PRIV FNALIAS uident • COLONCOLON lident, EOF / SEMI] -fn yy_state_735(_lookahead : YYSymbol) -> YYDecision { +// [135, alias_sig → PRIV FNALIAS uident • COLONCOLON lident, EOF / SEMI] +fn yy_state_772(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_COLONCOLON => Shift(yy_state_736) + T_COLONCOLON => Shift(yy_state_773) _ => Error } } -// [131, alias_sig → PRIV FNALIAS uident COLONCOLON • lident, EOF / SEMI] -// [213, lident → • LIDENT, EOF / SEMI] -fn yy_state_736(_lookahead : YYSymbol) -> YYDecision { +// [135, alias_sig → PRIV FNALIAS uident COLONCOLON • lident, EOF / SEMI] +// [217, lident → • LIDENT, EOF / SEMI] +// [218, lident → • EXTEND, EOF / SEMI] +fn yy_state_773(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LIDENT => Shift(yy_state_38) - NT_lident => Shift(yy_state_737) + T_EXTEND => Shift(yy_state_38) + T_LIDENT => Shift(yy_state_39) + NT_lident => Shift(yy_state_774) _ => Error } } -// [131, alias_sig → PRIV FNALIAS uident COLONCOLON lident •, EOF / SEMI] -fn yy_state_737(_lookahead : YYSymbol) -> YYDecision { +// [135, alias_sig → PRIV FNALIAS uident COLONCOLON lident •, EOF / SEMI] +fn yy_state_774(_lookahead : YYSymbol) -> YYDecision { ReduceNoLookahead(5, NT_alias_sig, yy_action_36) } -// [115, trait_sig → PRIV TRAIT • uident loption(preceded(COLON,separated_nonempty_list(PLUS,qualified_uident))) trait_body, EOF / SEMI] -// [212, uident → • UIDENT, EOF / COLON / SEMI / LBRACE] -fn yy_state_738(_lookahead : YYSymbol) -> YYDecision { +// [119, trait_sig → PRIV TRAIT • uident loption(preceded(COLON,separated_nonempty_list(PLUS,qualified_uident))) trait_body, EOF / SEMI] +// [216, uident → • UIDENT, EOF / COLON / SEMI / LBRACE] +fn yy_state_775(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_UIDENT => Shift(yy_state_25) - NT_uident => Shift(yy_state_739) + NT_uident => Shift(yy_state_776) _ => Error } } -// [115, trait_sig → PRIV TRAIT uident • loption(preceded(COLON,separated_nonempty_list(PLUS,qualified_uident))) trait_body, EOF / SEMI] -// [230, loption(preceded(COLON,separated_nonempty_list(PLUS,qualified_uident))) → •, EOF / SEMI / LBRACE] -// [231, loption(preceded(COLON,separated_nonempty_list(PLUS,qualified_uident))) → • COLON separated_nonempty_list(PLUS,qualified_uident), EOF / SEMI / LBRACE] -fn yy_state_739(_lookahead : YYSymbol) -> YYDecision { +// [119, trait_sig → PRIV TRAIT uident • loption(preceded(COLON,separated_nonempty_list(PLUS,qualified_uident))) trait_body, EOF / SEMI] +// [235, loption(preceded(COLON,separated_nonempty_list(PLUS,qualified_uident))) → •, EOF / SEMI / LBRACE] +// [236, loption(preceded(COLON,separated_nonempty_list(PLUS,qualified_uident))) → • COLON separated_nonempty_list(PLUS,qualified_uident), EOF / SEMI / LBRACE] +fn yy_state_776(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_COLON => Shift(yy_state_42) - NT_loption_preceded_COLON_separated_nonempty_list_PLUS_qualified_uident___ => Shift(yy_state_740) - T_EOF | T_SEMI | T_LBRACE => Reduce(0, NT_loption_preceded_COLON_separated_nonempty_list_PLUS_qualified_uident___, yy_action_267) + T_COLON => Shift(yy_state_43) + NT_loption_preceded_COLON_separated_nonempty_list_PLUS_qualified_uident___ => Shift(yy_state_777) + T_EOF | T_SEMI | T_LBRACE => Reduce(0, NT_loption_preceded_COLON_separated_nonempty_list_PLUS_qualified_uident___, yy_action_271) _ => Error } } -// [115, trait_sig → PRIV TRAIT uident loption(preceded(COLON,separated_nonempty_list(PLUS,qualified_uident))) • trait_body, EOF / SEMI] -// [120, trait_body → •, EOF / SEMI] -// [121, trait_body → • LBRACE separated_list(SEMI,trait_method_sig) RBRACE, EOF / SEMI] -fn yy_state_740(_lookahead : YYSymbol) -> YYDecision { +// [119, trait_sig → PRIV TRAIT uident loption(preceded(COLON,separated_nonempty_list(PLUS,qualified_uident))) • trait_body, EOF / SEMI] +// [124, trait_body → •, EOF / SEMI] +// [125, trait_body → • LBRACE separated_list(SEMI,trait_method_sig) RBRACE, EOF / SEMI] +fn yy_state_777(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACE => Shift(yy_state_51) - NT_trait_body => Shift(yy_state_741) - T_EOF | T_SEMI => Reduce(0, NT_trait_body, yy_action_260) + T_LBRACE => Shift(yy_state_52) + NT_trait_body => Shift(yy_state_778) + T_EOF | T_SEMI => Reduce(0, NT_trait_body, yy_action_264) _ => Error } } -// [115, trait_sig → PRIV TRAIT uident loption(preceded(COLON,separated_nonempty_list(PLUS,qualified_uident))) trait_body •, EOF / SEMI] -fn yy_state_741(_lookahead : YYSymbol) -> YYDecision { +// [119, trait_sig → PRIV TRAIT uident loption(preceded(COLON,separated_nonempty_list(PLUS,qualified_uident))) trait_body •, EOF / SEMI] +fn yy_state_778(_lookahead : YYSymbol) -> YYDecision { ReduceNoLookahead(5, NT_trait_sig, yy_action_35) } -// [103, impl_sig → PRIV IMPL • type_params_with_constraints qualified_uident FOR type_, EOF / SEMI] -// [109, impl_sig → PRIV IMPL • qualified_uident FOR type_, EOF / SEMI] -// [157, type_params_with_constraints → • LBRACKET separated_list(COMMA,type_param_with_constraints) RBRACKET, UIDENT / PACKAGE_NAME] -// [208, qualified_uident → • UIDENT, FOR] -// [209, qualified_uident → • PACKAGE_NAME DOT_UIDENT, FOR] -fn yy_state_742(_lookahead : YYSymbol) -> YYDecision { +// [107, impl_sig → PRIV IMPL • type_params_with_constraints qualified_uident FOR type_, EOF / SEMI] +// [113, impl_sig → PRIV IMPL • qualified_uident FOR type_, EOF / SEMI] +// [161, type_params_with_constraints → • LBRACKET separated_list(COMMA,type_param_with_constraints) RBRACKET, UIDENT / PACKAGE_NAME] +// [212, qualified_uident → • UIDENT, FOR] +// [213, qualified_uident → • PACKAGE_NAME DOT_UIDENT, FOR] +fn yy_state_779(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_PACKAGE_NAME => Shift(yy_state_47) - T_UIDENT => Shift(yy_state_49) - T_LBRACKET => Shift(yy_state_162) - NT_qualified_uident => Shift(yy_state_743) - NT_type_params_with_constraints => Shift(yy_state_746) + T_PACKAGE_NAME => Shift(yy_state_48) + T_UIDENT => Shift(yy_state_50) + T_LBRACKET => Shift(yy_state_144) + NT_qualified_uident => Shift(yy_state_780) + NT_type_params_with_constraints => Shift(yy_state_783) _ => Error } } -// [109, impl_sig → PRIV IMPL qualified_uident • FOR type_, EOF / SEMI] -fn yy_state_743(_lookahead : YYSymbol) -> YYDecision { +// [113, impl_sig → PRIV IMPL qualified_uident • FOR type_, EOF / SEMI] +fn yy_state_780(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_FOR => Shift(yy_state_744) - _ => Error - } -} - -// [109, impl_sig → PRIV IMPL qualified_uident FOR • type_, EOF / SEMI] -// [167, simple_type → • simple_type QUESTION, EOF / QUESTION / SEMI] -// [168, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, EOF / QUESTION / SEMI] -// [169, simple_type → • LPAREN type_ RPAREN, EOF / QUESTION / SEMI] -// [170, simple_type → • qualified_uident_ optional_type_arguments, EOF / QUESTION / SEMI] -// [171, simple_type → • AMPER qualified_uident_, EOF / QUESTION / SEMI] -// [172, simple_type → • UNDERSCORE, EOF / QUESTION / SEMI] -// [173, type_ → • simple_type, EOF / SEMI] -// [174, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] -// [175, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] -// [176, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] -// [177, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] -// [178, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] -// [179, type_ → • LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] -// [180, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] -// [181, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] -// [210, qualified_uident_ → • UIDENT, EOF / QUESTION / SEMI / LBRACKET] -// [211, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, EOF / QUESTION / SEMI / LBRACKET] -fn yy_state_744(_lookahead : YYSymbol) -> YYDecision { + T_FOR => Shift(yy_state_781) + _ => Error + } +} + +// [113, impl_sig → PRIV IMPL qualified_uident FOR • type_, EOF / SEMI] +// [171, simple_type → • simple_type QUESTION, EOF / QUESTION / SEMI] +// [172, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, EOF / QUESTION / SEMI] +// [173, simple_type → • LPAREN type_ RPAREN, EOF / QUESTION / SEMI] +// [174, simple_type → • qualified_uident_ optional_type_arguments, EOF / QUESTION / SEMI] +// [175, simple_type → • AMPER qualified_uident_, EOF / QUESTION / SEMI] +// [176, simple_type → • UNDERSCORE, EOF / QUESTION / SEMI] +// [177, type_ → • simple_type, EOF / SEMI] +// [178, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] +// [179, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] +// [180, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] +// [181, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] +// [182, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] +// [183, type_ → • LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] +// [184, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] +// [185, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] +// [214, qualified_uident_ → • UIDENT, EOF / QUESTION / SEMI / LBRACKET] +// [215, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, EOF / QUESTION / SEMI / LBRACKET] +fn yy_state_781(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_PACKAGE_NAME => Shift(yy_state_62) T_UIDENT => Shift(yy_state_64) @@ -13755,55 +14629,55 @@ fn yy_state_744(_lookahead : YYSymbol) -> YYDecision { NT_qualified_uident_ => Shift(yy_state_78) T_LPAREN => Shift(yy_state_83) NT_simple_type => Shift(yy_state_106) - NT_type_ => Shift(yy_state_745) + NT_type_ => Shift(yy_state_782) _ => Error } } -// [109, impl_sig → PRIV IMPL qualified_uident FOR type_ •, EOF / SEMI] -fn yy_state_745(_lookahead : YYSymbol) -> YYDecision { +// [113, impl_sig → PRIV IMPL qualified_uident FOR type_ •, EOF / SEMI] +fn yy_state_782(_lookahead : YYSymbol) -> YYDecision { ReduceNoLookahead(5, NT_impl_sig, yy_action_34) } -// [103, impl_sig → PRIV IMPL type_params_with_constraints • qualified_uident FOR type_, EOF / SEMI] -// [208, qualified_uident → • UIDENT, FOR] -// [209, qualified_uident → • PACKAGE_NAME DOT_UIDENT, FOR] -fn yy_state_746(_lookahead : YYSymbol) -> YYDecision { +// [107, impl_sig → PRIV IMPL type_params_with_constraints • qualified_uident FOR type_, EOF / SEMI] +// [212, qualified_uident → • UIDENT, FOR] +// [213, qualified_uident → • PACKAGE_NAME DOT_UIDENT, FOR] +fn yy_state_783(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_PACKAGE_NAME => Shift(yy_state_47) - T_UIDENT => Shift(yy_state_49) - NT_qualified_uident => Shift(yy_state_747) + T_PACKAGE_NAME => Shift(yy_state_48) + T_UIDENT => Shift(yy_state_50) + NT_qualified_uident => Shift(yy_state_784) _ => Error } } -// [103, impl_sig → PRIV IMPL type_params_with_constraints qualified_uident • FOR type_, EOF / SEMI] -fn yy_state_747(_lookahead : YYSymbol) -> YYDecision { +// [107, impl_sig → PRIV IMPL type_params_with_constraints qualified_uident • FOR type_, EOF / SEMI] +fn yy_state_784(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_FOR => Shift(yy_state_748) - _ => Error - } -} - -// [103, impl_sig → PRIV IMPL type_params_with_constraints qualified_uident FOR • type_, EOF / SEMI] -// [167, simple_type → • simple_type QUESTION, EOF / QUESTION / SEMI] -// [168, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, EOF / QUESTION / SEMI] -// [169, simple_type → • LPAREN type_ RPAREN, EOF / QUESTION / SEMI] -// [170, simple_type → • qualified_uident_ optional_type_arguments, EOF / QUESTION / SEMI] -// [171, simple_type → • AMPER qualified_uident_, EOF / QUESTION / SEMI] -// [172, simple_type → • UNDERSCORE, EOF / QUESTION / SEMI] -// [173, type_ → • simple_type, EOF / SEMI] -// [174, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] -// [175, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] -// [176, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] -// [177, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] -// [178, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] -// [179, type_ → • LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] -// [180, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] -// [181, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] -// [210, qualified_uident_ → • UIDENT, EOF / QUESTION / SEMI / LBRACKET] -// [211, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, EOF / QUESTION / SEMI / LBRACKET] -fn yy_state_748(_lookahead : YYSymbol) -> YYDecision { + T_FOR => Shift(yy_state_785) + _ => Error + } +} + +// [107, impl_sig → PRIV IMPL type_params_with_constraints qualified_uident FOR • type_, EOF / SEMI] +// [171, simple_type → • simple_type QUESTION, EOF / QUESTION / SEMI] +// [172, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, EOF / QUESTION / SEMI] +// [173, simple_type → • LPAREN type_ RPAREN, EOF / QUESTION / SEMI] +// [174, simple_type → • qualified_uident_ optional_type_arguments, EOF / QUESTION / SEMI] +// [175, simple_type → • AMPER qualified_uident_, EOF / QUESTION / SEMI] +// [176, simple_type → • UNDERSCORE, EOF / QUESTION / SEMI] +// [177, type_ → • simple_type, EOF / SEMI] +// [178, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] +// [179, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] +// [180, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] +// [181, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] +// [182, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] +// [183, type_ → • LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] +// [184, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] +// [185, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] +// [214, qualified_uident_ → • UIDENT, EOF / QUESTION / SEMI / LBRACKET] +// [215, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, EOF / QUESTION / SEMI / LBRACKET] +fn yy_state_785(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_PACKAGE_NAME => Shift(yy_state_62) T_UIDENT => Shift(yy_state_64) @@ -13813,264 +14687,264 @@ fn yy_state_748(_lookahead : YYSymbol) -> YYDecision { NT_qualified_uident_ => Shift(yy_state_78) T_LPAREN => Shift(yy_state_83) NT_simple_type => Shift(yy_state_106) - NT_type_ => Shift(yy_state_749) + NT_type_ => Shift(yy_state_786) _ => Error } } -// [103, impl_sig → PRIV IMPL type_params_with_constraints qualified_uident FOR type_ •, EOF / SEMI] -fn yy_state_749(_lookahead : YYSymbol) -> YYDecision { +// [107, impl_sig → PRIV IMPL type_params_with_constraints qualified_uident FOR type_ •, EOF / SEMI] +fn yy_state_786(_lookahead : YYSymbol) -> YYDecision { ReduceNoLookahead(6, NT_impl_sig, yy_action_33) } -// [89, type_sig → PRIV EXTENUM • type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [95, type_sig → PRIV EXTENUM • extensible_enum_extension_target PLUS_EQUAL LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [164, type_decl_name_with_params → • uident optional_type_params_no_constraints, LBRACE] -// [165, extensible_enum_extension_target → • uident optional_type_params_no_constraints, PLUS_EQUAL] -// [166, extensible_enum_extension_target → • PACKAGE_NAME DOT_UIDENT optional_type_params_no_constraints, PLUS_EQUAL] -// [212, uident → • UIDENT, PLUS_EQUAL / LBRACKET / LBRACE] -fn yy_state_750(_lookahead : YYSymbol) -> YYDecision { +// [93, type_sig → PRIV EXTENUM • type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [99, type_sig → PRIV EXTENUM • extensible_enum_extension_target PLUS_EQUAL LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [168, type_decl_name_with_params → • uident optional_type_params_no_constraints, LBRACE] +// [169, extensible_enum_extension_target → • uident optional_type_params_no_constraints, PLUS_EQUAL] +// [170, extensible_enum_extension_target → • PACKAGE_NAME DOT_UIDENT optional_type_params_no_constraints, PLUS_EQUAL] +// [216, uident → • UIDENT, PLUS_EQUAL / LBRACKET / LBRACE] +fn yy_state_787(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_UIDENT => Shift(yy_state_25) - T_PACKAGE_NAME => Shift(yy_state_184) - NT_uident => Shift(yy_state_197) - NT_extensible_enum_extension_target => Shift(yy_state_751) - NT_type_decl_name_with_params => Shift(yy_state_757) + T_PACKAGE_NAME => Shift(yy_state_222) + NT_uident => Shift(yy_state_235) + NT_extensible_enum_extension_target => Shift(yy_state_788) + NT_type_decl_name_with_params => Shift(yy_state_794) _ => Error } } -// [95, type_sig → PRIV EXTENUM extensible_enum_extension_target • PLUS_EQUAL LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -fn yy_state_751(_lookahead : YYSymbol) -> YYDecision { +// [99, type_sig → PRIV EXTENUM extensible_enum_extension_target • PLUS_EQUAL LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +fn yy_state_788(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_PLUS_EQUAL => Shift(yy_state_752) + T_PLUS_EQUAL => Shift(yy_state_789) _ => Error } } -// [95, type_sig → PRIV EXTENUM extensible_enum_extension_target PLUS_EQUAL • LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -fn yy_state_752(_lookahead : YYSymbol) -> YYDecision { +// [99, type_sig → PRIV EXTENUM extensible_enum_extension_target PLUS_EQUAL • LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +fn yy_state_789(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACE => Shift(yy_state_753) + T_LBRACE => Shift(yy_state_790) _ => Error } } -// [95, type_sig → PRIV EXTENUM extensible_enum_extension_target PLUS_EQUAL LBRACE • separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [148, enum_constructor → • UIDENT option(delimited(LPAREN,separated_nonempty_list(COMMA,constructor_param),RPAREN)) option(eq_tag), SEMI / RBRACE] -// [149, enum_constructor → • nonempty_list(attribute) UIDENT option(delimited(LPAREN,separated_nonempty_list(COMMA,constructor_param),RPAREN)) option(eq_tag), SEMI / RBRACE] -// [223, separated_list(SEMI,enum_constructor) → •, RBRACE] -// [224, separated_list(SEMI,enum_constructor) → • separated_nonempty_list(SEMI,enum_constructor), RBRACE] -// [252, nonempty_list(attribute) → • ATTRIBUTE, UIDENT] -// [253, nonempty_list(attribute) → • ATTRIBUTE nonempty_list(attribute), UIDENT] -// [260, separated_nonempty_list(SEMI,enum_constructor) → • enum_constructor, RBRACE] -// [261, separated_nonempty_list(SEMI,enum_constructor) → • enum_constructor SEMI separated_nonempty_list(SEMI,enum_constructor), RBRACE] -fn yy_state_753(_lookahead : YYSymbol) -> YYDecision { +// [99, type_sig → PRIV EXTENUM extensible_enum_extension_target PLUS_EQUAL LBRACE • separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [152, enum_constructor → • UIDENT option(delimited(LPAREN,separated_nonempty_list(COMMA,constructor_param),RPAREN)) option(eq_tag), SEMI / RBRACE] +// [153, enum_constructor → • nonempty_list(attribute) UIDENT option(delimited(LPAREN,separated_nonempty_list(COMMA,constructor_param),RPAREN)) option(eq_tag), SEMI / RBRACE] +// [228, separated_list(SEMI,enum_constructor) → •, RBRACE] +// [229, separated_list(SEMI,enum_constructor) → • separated_nonempty_list(SEMI,enum_constructor), RBRACE] +// [257, nonempty_list(attribute) → • ATTRIBUTE, UIDENT] +// [258, nonempty_list(attribute) → • ATTRIBUTE nonempty_list(attribute), UIDENT] +// [265, separated_nonempty_list(SEMI,enum_constructor) → • enum_constructor, RBRACE] +// [266, separated_nonempty_list(SEMI,enum_constructor) → • enum_constructor SEMI separated_nonempty_list(SEMI,enum_constructor), RBRACE] +fn yy_state_790(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_ATTRIBUTE => Shift(yy_state_19) - NT_enum_constructor => Shift(yy_state_202) - NT_nonempty_list_attribute_ => Shift(yy_state_205) - T_UIDENT => Shift(yy_state_224) - NT_separated_nonempty_list_SEMI_enum_constructor_ => Shift(yy_state_227) - NT_separated_list_SEMI_enum_constructor_ => Shift(yy_state_754) - T_RBRACE => Reduce(0, NT_separated_list_SEMI_enum_constructor_, yy_action_184) + NT_enum_constructor => Shift(yy_state_240) + NT_nonempty_list_attribute_ => Shift(yy_state_243) + T_UIDENT => Shift(yy_state_262) + NT_separated_nonempty_list_SEMI_enum_constructor_ => Shift(yy_state_265) + NT_separated_list_SEMI_enum_constructor_ => Shift(yy_state_791) + T_RBRACE => Reduce(0, NT_separated_list_SEMI_enum_constructor_, yy_action_182) _ => Error } } -// [95, type_sig → PRIV EXTENUM extensible_enum_extension_target PLUS_EQUAL LBRACE separated_list(SEMI,enum_constructor) • RBRACE optional_derive, EOF / SEMI] -fn yy_state_754(_lookahead : YYSymbol) -> YYDecision { +// [99, type_sig → PRIV EXTENUM extensible_enum_extension_target PLUS_EQUAL LBRACE separated_list(SEMI,enum_constructor) • RBRACE optional_derive, EOF / SEMI] +fn yy_state_791(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RBRACE => Shift(yy_state_755) + T_RBRACE => Shift(yy_state_792) _ => Error } } -// [95, type_sig → PRIV EXTENUM extensible_enum_extension_target PLUS_EQUAL LBRACE separated_list(SEMI,enum_constructor) RBRACE • optional_derive, EOF / SEMI] -// [100, optional_derive → •, EOF / SEMI] -// [101, optional_derive → • DERIVE LPAREN non_empty_list_commas(qualified_uident) RPAREN, EOF / SEMI] -fn yy_state_755(_lookahead : YYSymbol) -> YYDecision { +// [99, type_sig → PRIV EXTENUM extensible_enum_extension_target PLUS_EQUAL LBRACE separated_list(SEMI,enum_constructor) RBRACE • optional_derive, EOF / SEMI] +// [104, optional_derive → •, EOF / SEMI] +// [105, optional_derive → • DERIVE LPAREN non_empty_list_commas(qualified_uident) RPAREN, EOF / SEMI] +fn yy_state_792(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_DERIVE => Shift(yy_state_230) - NT_optional_derive => Shift(yy_state_756) - T_EOF | T_SEMI => Reduce(0, NT_optional_derive, yy_action_165) + T_DERIVE => Shift(yy_state_268) + NT_optional_derive => Shift(yy_state_793) + T_EOF | T_SEMI => Reduce(0, NT_optional_derive, yy_action_163) _ => Error } } -// [95, type_sig → PRIV EXTENUM extensible_enum_extension_target PLUS_EQUAL LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive •, EOF / SEMI] -fn yy_state_756(_lookahead : YYSymbol) -> YYDecision { +// [99, type_sig → PRIV EXTENUM extensible_enum_extension_target PLUS_EQUAL LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive •, EOF / SEMI] +fn yy_state_793(_lookahead : YYSymbol) -> YYDecision { ReduceNoLookahead(8, NT_type_sig, yy_action_32) } -// [89, type_sig → PRIV EXTENUM type_decl_name_with_params • LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -fn yy_state_757(_lookahead : YYSymbol) -> YYDecision { +// [93, type_sig → PRIV EXTENUM type_decl_name_with_params • LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +fn yy_state_794(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACE => Shift(yy_state_758) + T_LBRACE => Shift(yy_state_795) _ => Error } } -// [89, type_sig → PRIV EXTENUM type_decl_name_with_params LBRACE • separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [148, enum_constructor → • UIDENT option(delimited(LPAREN,separated_nonempty_list(COMMA,constructor_param),RPAREN)) option(eq_tag), SEMI / RBRACE] -// [149, enum_constructor → • nonempty_list(attribute) UIDENT option(delimited(LPAREN,separated_nonempty_list(COMMA,constructor_param),RPAREN)) option(eq_tag), SEMI / RBRACE] -// [223, separated_list(SEMI,enum_constructor) → •, RBRACE] -// [224, separated_list(SEMI,enum_constructor) → • separated_nonempty_list(SEMI,enum_constructor), RBRACE] -// [252, nonempty_list(attribute) → • ATTRIBUTE, UIDENT] -// [253, nonempty_list(attribute) → • ATTRIBUTE nonempty_list(attribute), UIDENT] -// [260, separated_nonempty_list(SEMI,enum_constructor) → • enum_constructor, RBRACE] -// [261, separated_nonempty_list(SEMI,enum_constructor) → • enum_constructor SEMI separated_nonempty_list(SEMI,enum_constructor), RBRACE] -fn yy_state_758(_lookahead : YYSymbol) -> YYDecision { +// [93, type_sig → PRIV EXTENUM type_decl_name_with_params LBRACE • separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [152, enum_constructor → • UIDENT option(delimited(LPAREN,separated_nonempty_list(COMMA,constructor_param),RPAREN)) option(eq_tag), SEMI / RBRACE] +// [153, enum_constructor → • nonempty_list(attribute) UIDENT option(delimited(LPAREN,separated_nonempty_list(COMMA,constructor_param),RPAREN)) option(eq_tag), SEMI / RBRACE] +// [228, separated_list(SEMI,enum_constructor) → •, RBRACE] +// [229, separated_list(SEMI,enum_constructor) → • separated_nonempty_list(SEMI,enum_constructor), RBRACE] +// [257, nonempty_list(attribute) → • ATTRIBUTE, UIDENT] +// [258, nonempty_list(attribute) → • ATTRIBUTE nonempty_list(attribute), UIDENT] +// [265, separated_nonempty_list(SEMI,enum_constructor) → • enum_constructor, RBRACE] +// [266, separated_nonempty_list(SEMI,enum_constructor) → • enum_constructor SEMI separated_nonempty_list(SEMI,enum_constructor), RBRACE] +fn yy_state_795(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_ATTRIBUTE => Shift(yy_state_19) - NT_enum_constructor => Shift(yy_state_202) - NT_nonempty_list_attribute_ => Shift(yy_state_205) - T_UIDENT => Shift(yy_state_224) - NT_separated_nonempty_list_SEMI_enum_constructor_ => Shift(yy_state_227) - NT_separated_list_SEMI_enum_constructor_ => Shift(yy_state_759) - T_RBRACE => Reduce(0, NT_separated_list_SEMI_enum_constructor_, yy_action_184) + NT_enum_constructor => Shift(yy_state_240) + NT_nonempty_list_attribute_ => Shift(yy_state_243) + T_UIDENT => Shift(yy_state_262) + NT_separated_nonempty_list_SEMI_enum_constructor_ => Shift(yy_state_265) + NT_separated_list_SEMI_enum_constructor_ => Shift(yy_state_796) + T_RBRACE => Reduce(0, NT_separated_list_SEMI_enum_constructor_, yy_action_182) _ => Error } } -// [89, type_sig → PRIV EXTENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) • RBRACE optional_derive, EOF / SEMI] -fn yy_state_759(_lookahead : YYSymbol) -> YYDecision { +// [93, type_sig → PRIV EXTENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) • RBRACE optional_derive, EOF / SEMI] +fn yy_state_796(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RBRACE => Shift(yy_state_760) + T_RBRACE => Shift(yy_state_797) _ => Error } } -// [89, type_sig → PRIV EXTENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE • optional_derive, EOF / SEMI] -// [100, optional_derive → •, EOF / SEMI] -// [101, optional_derive → • DERIVE LPAREN non_empty_list_commas(qualified_uident) RPAREN, EOF / SEMI] -fn yy_state_760(_lookahead : YYSymbol) -> YYDecision { +// [93, type_sig → PRIV EXTENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE • optional_derive, EOF / SEMI] +// [104, optional_derive → •, EOF / SEMI] +// [105, optional_derive → • DERIVE LPAREN non_empty_list_commas(qualified_uident) RPAREN, EOF / SEMI] +fn yy_state_797(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_DERIVE => Shift(yy_state_230) - NT_optional_derive => Shift(yy_state_761) - T_EOF | T_SEMI => Reduce(0, NT_optional_derive, yy_action_165) + T_DERIVE => Shift(yy_state_268) + NT_optional_derive => Shift(yy_state_798) + T_EOF | T_SEMI => Reduce(0, NT_optional_derive, yy_action_163) _ => Error } } -// [89, type_sig → PRIV EXTENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive •, EOF / SEMI] -fn yy_state_761(_lookahead : YYSymbol) -> YYDecision { +// [93, type_sig → PRIV EXTENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive •, EOF / SEMI] +fn yy_state_798(_lookahead : YYSymbol) -> YYDecision { ReduceNoLookahead(7, NT_type_sig, yy_action_31) } -// [83, type_sig → PRIV ENUM • type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [164, type_decl_name_with_params → • uident optional_type_params_no_constraints, LBRACE] -// [212, uident → • UIDENT, LBRACKET / LBRACE] -fn yy_state_762(_lookahead : YYSymbol) -> YYDecision { +// [87, type_sig → PRIV ENUM • type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [168, type_decl_name_with_params → • uident optional_type_params_no_constraints, LBRACE] +// [216, uident → • UIDENT, LBRACKET / LBRACE] +fn yy_state_799(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_UIDENT => Shift(yy_state_25) - NT_uident => Shift(yy_state_246) - NT_type_decl_name_with_params => Shift(yy_state_763) + NT_uident => Shift(yy_state_284) + NT_type_decl_name_with_params => Shift(yy_state_800) _ => Error } } -// [83, type_sig → PRIV ENUM type_decl_name_with_params • LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -fn yy_state_763(_lookahead : YYSymbol) -> YYDecision { +// [87, type_sig → PRIV ENUM type_decl_name_with_params • LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +fn yy_state_800(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACE => Shift(yy_state_764) + T_LBRACE => Shift(yy_state_801) _ => Error } } -// [83, type_sig → PRIV ENUM type_decl_name_with_params LBRACE • separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [148, enum_constructor → • UIDENT option(delimited(LPAREN,separated_nonempty_list(COMMA,constructor_param),RPAREN)) option(eq_tag), SEMI / RBRACE] -// [149, enum_constructor → • nonempty_list(attribute) UIDENT option(delimited(LPAREN,separated_nonempty_list(COMMA,constructor_param),RPAREN)) option(eq_tag), SEMI / RBRACE] -// [223, separated_list(SEMI,enum_constructor) → •, RBRACE] -// [224, separated_list(SEMI,enum_constructor) → • separated_nonempty_list(SEMI,enum_constructor), RBRACE] -// [252, nonempty_list(attribute) → • ATTRIBUTE, UIDENT] -// [253, nonempty_list(attribute) → • ATTRIBUTE nonempty_list(attribute), UIDENT] -// [260, separated_nonempty_list(SEMI,enum_constructor) → • enum_constructor, RBRACE] -// [261, separated_nonempty_list(SEMI,enum_constructor) → • enum_constructor SEMI separated_nonempty_list(SEMI,enum_constructor), RBRACE] -fn yy_state_764(_lookahead : YYSymbol) -> YYDecision { +// [87, type_sig → PRIV ENUM type_decl_name_with_params LBRACE • separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [152, enum_constructor → • UIDENT option(delimited(LPAREN,separated_nonempty_list(COMMA,constructor_param),RPAREN)) option(eq_tag), SEMI / RBRACE] +// [153, enum_constructor → • nonempty_list(attribute) UIDENT option(delimited(LPAREN,separated_nonempty_list(COMMA,constructor_param),RPAREN)) option(eq_tag), SEMI / RBRACE] +// [228, separated_list(SEMI,enum_constructor) → •, RBRACE] +// [229, separated_list(SEMI,enum_constructor) → • separated_nonempty_list(SEMI,enum_constructor), RBRACE] +// [257, nonempty_list(attribute) → • ATTRIBUTE, UIDENT] +// [258, nonempty_list(attribute) → • ATTRIBUTE nonempty_list(attribute), UIDENT] +// [265, separated_nonempty_list(SEMI,enum_constructor) → • enum_constructor, RBRACE] +// [266, separated_nonempty_list(SEMI,enum_constructor) → • enum_constructor SEMI separated_nonempty_list(SEMI,enum_constructor), RBRACE] +fn yy_state_801(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_ATTRIBUTE => Shift(yy_state_19) - NT_enum_constructor => Shift(yy_state_202) - NT_nonempty_list_attribute_ => Shift(yy_state_205) - T_UIDENT => Shift(yy_state_224) - NT_separated_nonempty_list_SEMI_enum_constructor_ => Shift(yy_state_227) - NT_separated_list_SEMI_enum_constructor_ => Shift(yy_state_765) - T_RBRACE => Reduce(0, NT_separated_list_SEMI_enum_constructor_, yy_action_184) + NT_enum_constructor => Shift(yy_state_240) + NT_nonempty_list_attribute_ => Shift(yy_state_243) + T_UIDENT => Shift(yy_state_262) + NT_separated_nonempty_list_SEMI_enum_constructor_ => Shift(yy_state_265) + NT_separated_list_SEMI_enum_constructor_ => Shift(yy_state_802) + T_RBRACE => Reduce(0, NT_separated_list_SEMI_enum_constructor_, yy_action_182) _ => Error } } -// [83, type_sig → PRIV ENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) • RBRACE optional_derive, EOF / SEMI] -fn yy_state_765(_lookahead : YYSymbol) -> YYDecision { +// [87, type_sig → PRIV ENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) • RBRACE optional_derive, EOF / SEMI] +fn yy_state_802(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RBRACE => Shift(yy_state_766) + T_RBRACE => Shift(yy_state_803) _ => Error } } -// [83, type_sig → PRIV ENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE • optional_derive, EOF / SEMI] -// [100, optional_derive → •, EOF / SEMI] -// [101, optional_derive → • DERIVE LPAREN non_empty_list_commas(qualified_uident) RPAREN, EOF / SEMI] -fn yy_state_766(_lookahead : YYSymbol) -> YYDecision { +// [87, type_sig → PRIV ENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE • optional_derive, EOF / SEMI] +// [104, optional_derive → •, EOF / SEMI] +// [105, optional_derive → • DERIVE LPAREN non_empty_list_commas(qualified_uident) RPAREN, EOF / SEMI] +fn yy_state_803(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_DERIVE => Shift(yy_state_230) - NT_optional_derive => Shift(yy_state_767) - T_EOF | T_SEMI => Reduce(0, NT_optional_derive, yy_action_165) + T_DERIVE => Shift(yy_state_268) + NT_optional_derive => Shift(yy_state_804) + T_EOF | T_SEMI => Reduce(0, NT_optional_derive, yy_action_163) _ => Error } } -// [83, type_sig → PRIV ENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive •, EOF / SEMI] -fn yy_state_767(_lookahead : YYSymbol) -> YYDecision { +// [87, type_sig → PRIV ENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive •, EOF / SEMI] +fn yy_state_804(_lookahead : YYSymbol) -> YYDecision { ReduceNoLookahead(7, NT_type_sig, yy_action_30) } -// [71, type_sig → PRIV STRUCT • type_decl_name_with_params LBRACE record_decl_body RBRACE optional_derive, EOF / SEMI] -// [77, type_sig → PRIV STRUCT • type_decl_name_with_params LPAREN separated_list(COMMA,type_) RPAREN optional_derive, EOF / SEMI] -// [164, type_decl_name_with_params → • uident optional_type_params_no_constraints, LPAREN / LBRACE] -// [212, uident → • UIDENT, LPAREN / LBRACKET / LBRACE] -fn yy_state_768(_lookahead : YYSymbol) -> YYDecision { +// [75, type_sig → PRIV STRUCT • type_decl_name_with_params LBRACE record_decl_body RBRACE optional_derive, EOF / SEMI] +// [81, type_sig → PRIV STRUCT • type_decl_name_with_params LPAREN separated_list(COMMA,type_) RPAREN optional_derive, EOF / SEMI] +// [168, type_decl_name_with_params → • uident optional_type_params_no_constraints, LPAREN / LBRACE] +// [216, uident → • UIDENT, LPAREN / LBRACKET / LBRACE] +fn yy_state_805(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_UIDENT => Shift(yy_state_25) - NT_uident => Shift(yy_state_246) - NT_type_decl_name_with_params => Shift(yy_state_769) + NT_uident => Shift(yy_state_284) + NT_type_decl_name_with_params => Shift(yy_state_806) _ => Error } } -// [71, type_sig → PRIV STRUCT type_decl_name_with_params • LBRACE record_decl_body RBRACE optional_derive, EOF / SEMI] -// [77, type_sig → PRIV STRUCT type_decl_name_with_params • LPAREN separated_list(COMMA,type_) RPAREN optional_derive, EOF / SEMI] -fn yy_state_769(_lookahead : YYSymbol) -> YYDecision { +// [75, type_sig → PRIV STRUCT type_decl_name_with_params • LBRACE record_decl_body RBRACE optional_derive, EOF / SEMI] +// [81, type_sig → PRIV STRUCT type_decl_name_with_params • LPAREN separated_list(COMMA,type_) RPAREN optional_derive, EOF / SEMI] +fn yy_state_806(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LPAREN => Shift(yy_state_770) - T_LBRACE => Shift(yy_state_774) - _ => Error - } -} - -// [77, type_sig → PRIV STRUCT type_decl_name_with_params LPAREN • separated_list(COMMA,type_) RPAREN optional_derive, EOF / SEMI] -// [167, simple_type → • simple_type QUESTION, RPAREN / COMMA / QUESTION] -// [168, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, RPAREN / COMMA / QUESTION] -// [169, simple_type → • LPAREN type_ RPAREN, RPAREN / COMMA / QUESTION] -// [170, simple_type → • qualified_uident_ optional_type_arguments, RPAREN / COMMA / QUESTION] -// [171, simple_type → • AMPER qualified_uident_, RPAREN / COMMA / QUESTION] -// [172, simple_type → • UNDERSCORE, RPAREN / COMMA / QUESTION] -// [173, type_ → • simple_type, RPAREN / COMMA] -// [174, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [175, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [176, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [177, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [178, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [179, type_ → • LPAREN RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [180, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [181, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [210, qualified_uident_ → • UIDENT, RPAREN / COMMA / QUESTION / LBRACKET] -// [211, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, RPAREN / COMMA / QUESTION / LBRACKET] -// [225, separated_list(COMMA,type_) → •, RPAREN] -// [226, separated_list(COMMA,type_) → • separated_nonempty_list(COMMA,type_), RPAREN] -// [250, separated_nonempty_list(COMMA,type_) → • type_, RPAREN] -// [251, separated_nonempty_list(COMMA,type_) → • type_ COMMA separated_nonempty_list(COMMA,type_), RPAREN] -fn yy_state_770(_lookahead : YYSymbol) -> YYDecision { + T_LPAREN => Shift(yy_state_807) + T_LBRACE => Shift(yy_state_811) + _ => Error + } +} + +// [81, type_sig → PRIV STRUCT type_decl_name_with_params LPAREN • separated_list(COMMA,type_) RPAREN optional_derive, EOF / SEMI] +// [171, simple_type → • simple_type QUESTION, RPAREN / COMMA / QUESTION] +// [172, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, RPAREN / COMMA / QUESTION] +// [173, simple_type → • LPAREN type_ RPAREN, RPAREN / COMMA / QUESTION] +// [174, simple_type → • qualified_uident_ optional_type_arguments, RPAREN / COMMA / QUESTION] +// [175, simple_type → • AMPER qualified_uident_, RPAREN / COMMA / QUESTION] +// [176, simple_type → • UNDERSCORE, RPAREN / COMMA / QUESTION] +// [177, type_ → • simple_type, RPAREN / COMMA] +// [178, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [179, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [180, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [181, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [182, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [183, type_ → • LPAREN RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [184, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [185, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [214, qualified_uident_ → • UIDENT, RPAREN / COMMA / QUESTION / LBRACKET] +// [215, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, RPAREN / COMMA / QUESTION / LBRACKET] +// [230, separated_list(COMMA,type_) → •, RPAREN] +// [231, separated_list(COMMA,type_) → • separated_nonempty_list(COMMA,type_), RPAREN] +// [255, separated_nonempty_list(COMMA,type_) → • type_, RPAREN] +// [256, separated_nonempty_list(COMMA,type_) → • type_ COMMA separated_nonempty_list(COMMA,type_), RPAREN] +fn yy_state_807(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_PACKAGE_NAME => Shift(yy_state_62) T_UIDENT => Shift(yy_state_64) @@ -14081,214 +14955,214 @@ fn yy_state_770(_lookahead : YYSymbol) -> YYDecision { NT_type_ => Shift(yy_state_80) T_LPAREN => Shift(yy_state_83) NT_simple_type => Shift(yy_state_106) - NT_separated_nonempty_list_COMMA_type__ => Shift(yy_state_256) - NT_separated_list_COMMA_type__ => Shift(yy_state_771) - T_RPAREN => Reduce(0, NT_separated_list_COMMA_type__, yy_action_157) + NT_separated_nonempty_list_COMMA_type__ => Shift(yy_state_294) + NT_separated_list_COMMA_type__ => Shift(yy_state_808) + T_RPAREN => Reduce(0, NT_separated_list_COMMA_type__, yy_action_155) _ => Error } } -// [77, type_sig → PRIV STRUCT type_decl_name_with_params LPAREN separated_list(COMMA,type_) • RPAREN optional_derive, EOF / SEMI] -fn yy_state_771(_lookahead : YYSymbol) -> YYDecision { +// [81, type_sig → PRIV STRUCT type_decl_name_with_params LPAREN separated_list(COMMA,type_) • RPAREN optional_derive, EOF / SEMI] +fn yy_state_808(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RPAREN => Shift(yy_state_772) + T_RPAREN => Shift(yy_state_809) _ => Error } } -// [77, type_sig → PRIV STRUCT type_decl_name_with_params LPAREN separated_list(COMMA,type_) RPAREN • optional_derive, EOF / SEMI] -// [100, optional_derive → •, EOF / SEMI] -// [101, optional_derive → • DERIVE LPAREN non_empty_list_commas(qualified_uident) RPAREN, EOF / SEMI] -fn yy_state_772(_lookahead : YYSymbol) -> YYDecision { +// [81, type_sig → PRIV STRUCT type_decl_name_with_params LPAREN separated_list(COMMA,type_) RPAREN • optional_derive, EOF / SEMI] +// [104, optional_derive → •, EOF / SEMI] +// [105, optional_derive → • DERIVE LPAREN non_empty_list_commas(qualified_uident) RPAREN, EOF / SEMI] +fn yy_state_809(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_DERIVE => Shift(yy_state_230) - NT_optional_derive => Shift(yy_state_773) - T_EOF | T_SEMI => Reduce(0, NT_optional_derive, yy_action_165) + T_DERIVE => Shift(yy_state_268) + NT_optional_derive => Shift(yy_state_810) + T_EOF | T_SEMI => Reduce(0, NT_optional_derive, yy_action_163) _ => Error } } -// [77, type_sig → PRIV STRUCT type_decl_name_with_params LPAREN separated_list(COMMA,type_) RPAREN optional_derive •, EOF / SEMI] -fn yy_state_773(_lookahead : YYSymbol) -> YYDecision { +// [81, type_sig → PRIV STRUCT type_decl_name_with_params LPAREN separated_list(COMMA,type_) RPAREN optional_derive •, EOF / SEMI] +fn yy_state_810(_lookahead : YYSymbol) -> YYDecision { ReduceNoLookahead(7, NT_type_sig, yy_action_29) } -// [71, type_sig → PRIV STRUCT type_decl_name_with_params LBRACE • record_decl_body RBRACE optional_derive, EOF / SEMI] -// [152, record_decl_field → • boption(MUTABLE) LIDENT COLON type_, SEMI / RBRACE] -// [153, record_decl_field → • nonempty_list(attribute) boption(MUTABLE) LIDENT COLON type_, SEMI / RBRACE] -// [154, record_decl_body → • separated_list(SEMI,record_decl_field), RBRACE] -// [240, boption(MUTABLE) → •, LIDENT] -// [241, boption(MUTABLE) → • MUTABLE, LIDENT] -// [242, separated_list(SEMI,record_decl_field) → •, RBRACE] -// [243, separated_list(SEMI,record_decl_field) → • separated_nonempty_list(SEMI,record_decl_field), RBRACE] -// [252, nonempty_list(attribute) → • ATTRIBUTE, LIDENT / MUTABLE] -// [253, nonempty_list(attribute) → • ATTRIBUTE nonempty_list(attribute), LIDENT / MUTABLE] -// [266, separated_nonempty_list(SEMI,record_decl_field) → • record_decl_field, RBRACE] -// [267, separated_nonempty_list(SEMI,record_decl_field) → • record_decl_field SEMI separated_nonempty_list(SEMI,record_decl_field), RBRACE] -fn yy_state_774(_lookahead : YYSymbol) -> YYDecision { +// [75, type_sig → PRIV STRUCT type_decl_name_with_params LBRACE • record_decl_body RBRACE optional_derive, EOF / SEMI] +// [156, record_decl_field → • boption(MUTABLE) lident COLON type_, SEMI / RBRACE] +// [157, record_decl_field → • nonempty_list(attribute) boption(MUTABLE) lident COLON type_, SEMI / RBRACE] +// [158, record_decl_body → • separated_list(SEMI,record_decl_field), RBRACE] +// [245, boption(MUTABLE) → •, LIDENT / EXTEND] +// [246, boption(MUTABLE) → • MUTABLE, LIDENT / EXTEND] +// [247, separated_list(SEMI,record_decl_field) → •, RBRACE] +// [248, separated_list(SEMI,record_decl_field) → • separated_nonempty_list(SEMI,record_decl_field), RBRACE] +// [257, nonempty_list(attribute) → • ATTRIBUTE, LIDENT / MUTABLE / EXTEND] +// [258, nonempty_list(attribute) → • ATTRIBUTE nonempty_list(attribute), LIDENT / MUTABLE / EXTEND] +// [271, separated_nonempty_list(SEMI,record_decl_field) → • record_decl_field, RBRACE] +// [272, separated_nonempty_list(SEMI,record_decl_field) → • record_decl_field SEMI separated_nonempty_list(SEMI,record_decl_field), RBRACE] +fn yy_state_811(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_ATTRIBUTE => Shift(yy_state_19) - T_MUTABLE => Shift(yy_state_208) - NT_record_decl_field => Shift(yy_state_261) - NT_nonempty_list_attribute_ => Shift(yy_state_264) - NT_boption_MUTABLE_ => Shift(yy_state_269) - NT_separated_nonempty_list_SEMI_record_decl_field_ => Shift(yy_state_273) - NT_separated_list_SEMI_record_decl_field_ => Shift(yy_state_274) - NT_record_decl_body => Shift(yy_state_775) - T_LIDENT => Reduce(0, NT_boption_MUTABLE_, yy_action_180) - T_RBRACE => Reduce(0, NT_separated_list_SEMI_record_decl_field_, yy_action_154) + T_MUTABLE => Shift(yy_state_246) + NT_record_decl_field => Shift(yy_state_299) + NT_nonempty_list_attribute_ => Shift(yy_state_302) + NT_boption_MUTABLE_ => Shift(yy_state_307) + NT_separated_nonempty_list_SEMI_record_decl_field_ => Shift(yy_state_311) + NT_separated_list_SEMI_record_decl_field_ => Shift(yy_state_312) + NT_record_decl_body => Shift(yy_state_812) + T_LIDENT | T_EXTEND => Reduce(0, NT_boption_MUTABLE_, yy_action_178) + T_RBRACE => Reduce(0, NT_separated_list_SEMI_record_decl_field_, yy_action_152) _ => Error } } -// [71, type_sig → PRIV STRUCT type_decl_name_with_params LBRACE record_decl_body • RBRACE optional_derive, EOF / SEMI] -fn yy_state_775(_lookahead : YYSymbol) -> YYDecision { +// [75, type_sig → PRIV STRUCT type_decl_name_with_params LBRACE record_decl_body • RBRACE optional_derive, EOF / SEMI] +fn yy_state_812(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RBRACE => Shift(yy_state_776) + T_RBRACE => Shift(yy_state_813) _ => Error } } -// [71, type_sig → PRIV STRUCT type_decl_name_with_params LBRACE record_decl_body RBRACE • optional_derive, EOF / SEMI] -// [100, optional_derive → •, EOF / SEMI] -// [101, optional_derive → • DERIVE LPAREN non_empty_list_commas(qualified_uident) RPAREN, EOF / SEMI] -fn yy_state_776(_lookahead : YYSymbol) -> YYDecision { +// [75, type_sig → PRIV STRUCT type_decl_name_with_params LBRACE record_decl_body RBRACE • optional_derive, EOF / SEMI] +// [104, optional_derive → •, EOF / SEMI] +// [105, optional_derive → • DERIVE LPAREN non_empty_list_commas(qualified_uident) RPAREN, EOF / SEMI] +fn yy_state_813(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_DERIVE => Shift(yy_state_230) - NT_optional_derive => Shift(yy_state_777) - T_EOF | T_SEMI => Reduce(0, NT_optional_derive, yy_action_165) + T_DERIVE => Shift(yy_state_268) + NT_optional_derive => Shift(yy_state_814) + T_EOF | T_SEMI => Reduce(0, NT_optional_derive, yy_action_163) _ => Error } } -// [71, type_sig → PRIV STRUCT type_decl_name_with_params LBRACE record_decl_body RBRACE optional_derive •, EOF / SEMI] -fn yy_state_777(_lookahead : YYSymbol) -> YYDecision { +// [75, type_sig → PRIV STRUCT type_decl_name_with_params LBRACE record_decl_body RBRACE optional_derive •, EOF / SEMI] +fn yy_state_814(_lookahead : YYSymbol) -> YYDecision { ReduceNoLookahead(7, NT_type_sig, yy_action_28) } -// [59, type_sig → PRIV SUBERROR • uident optional_derive, EOF / SEMI] -// [65, type_sig → PRIV SUBERROR • uident LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [212, uident → • UIDENT, EOF / DERIVE / SEMI / LBRACE] -fn yy_state_778(_lookahead : YYSymbol) -> YYDecision { +// [63, type_sig → PRIV SUBERROR • uident optional_derive, EOF / SEMI] +// [69, type_sig → PRIV SUBERROR • uident LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [216, uident → • UIDENT, EOF / DERIVE / SEMI / LBRACE] +fn yy_state_815(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_UIDENT => Shift(yy_state_25) - NT_uident => Shift(yy_state_779) + NT_uident => Shift(yy_state_816) _ => Error } } -// [59, type_sig → PRIV SUBERROR uident • optional_derive, EOF / SEMI] -// [65, type_sig → PRIV SUBERROR uident • LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [100, optional_derive → •, EOF / SEMI] -// [101, optional_derive → • DERIVE LPAREN non_empty_list_commas(qualified_uident) RPAREN, EOF / SEMI] -fn yy_state_779(_lookahead : YYSymbol) -> YYDecision { +// [63, type_sig → PRIV SUBERROR uident • optional_derive, EOF / SEMI] +// [69, type_sig → PRIV SUBERROR uident • LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [104, optional_derive → •, EOF / SEMI] +// [105, optional_derive → • DERIVE LPAREN non_empty_list_commas(qualified_uident) RPAREN, EOF / SEMI] +fn yy_state_816(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_DERIVE => Shift(yy_state_230) - T_LBRACE => Shift(yy_state_780) - NT_optional_derive => Shift(yy_state_784) - T_EOF | T_SEMI => Reduce(0, NT_optional_derive, yy_action_165) + T_DERIVE => Shift(yy_state_268) + T_LBRACE => Shift(yy_state_817) + NT_optional_derive => Shift(yy_state_821) + T_EOF | T_SEMI => Reduce(0, NT_optional_derive, yy_action_163) _ => Error } } -// [65, type_sig → PRIV SUBERROR uident LBRACE • separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [148, enum_constructor → • UIDENT option(delimited(LPAREN,separated_nonempty_list(COMMA,constructor_param),RPAREN)) option(eq_tag), SEMI / RBRACE] -// [149, enum_constructor → • nonempty_list(attribute) UIDENT option(delimited(LPAREN,separated_nonempty_list(COMMA,constructor_param),RPAREN)) option(eq_tag), SEMI / RBRACE] -// [223, separated_list(SEMI,enum_constructor) → •, RBRACE] -// [224, separated_list(SEMI,enum_constructor) → • separated_nonempty_list(SEMI,enum_constructor), RBRACE] -// [252, nonempty_list(attribute) → • ATTRIBUTE, UIDENT] -// [253, nonempty_list(attribute) → • ATTRIBUTE nonempty_list(attribute), UIDENT] -// [260, separated_nonempty_list(SEMI,enum_constructor) → • enum_constructor, RBRACE] -// [261, separated_nonempty_list(SEMI,enum_constructor) → • enum_constructor SEMI separated_nonempty_list(SEMI,enum_constructor), RBRACE] -fn yy_state_780(_lookahead : YYSymbol) -> YYDecision { +// [69, type_sig → PRIV SUBERROR uident LBRACE • separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [152, enum_constructor → • UIDENT option(delimited(LPAREN,separated_nonempty_list(COMMA,constructor_param),RPAREN)) option(eq_tag), SEMI / RBRACE] +// [153, enum_constructor → • nonempty_list(attribute) UIDENT option(delimited(LPAREN,separated_nonempty_list(COMMA,constructor_param),RPAREN)) option(eq_tag), SEMI / RBRACE] +// [228, separated_list(SEMI,enum_constructor) → •, RBRACE] +// [229, separated_list(SEMI,enum_constructor) → • separated_nonempty_list(SEMI,enum_constructor), RBRACE] +// [257, nonempty_list(attribute) → • ATTRIBUTE, UIDENT] +// [258, nonempty_list(attribute) → • ATTRIBUTE nonempty_list(attribute), UIDENT] +// [265, separated_nonempty_list(SEMI,enum_constructor) → • enum_constructor, RBRACE] +// [266, separated_nonempty_list(SEMI,enum_constructor) → • enum_constructor SEMI separated_nonempty_list(SEMI,enum_constructor), RBRACE] +fn yy_state_817(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_ATTRIBUTE => Shift(yy_state_19) - NT_enum_constructor => Shift(yy_state_202) - NT_nonempty_list_attribute_ => Shift(yy_state_205) - T_UIDENT => Shift(yy_state_224) - NT_separated_nonempty_list_SEMI_enum_constructor_ => Shift(yy_state_227) - NT_separated_list_SEMI_enum_constructor_ => Shift(yy_state_781) - T_RBRACE => Reduce(0, NT_separated_list_SEMI_enum_constructor_, yy_action_184) + NT_enum_constructor => Shift(yy_state_240) + NT_nonempty_list_attribute_ => Shift(yy_state_243) + T_UIDENT => Shift(yy_state_262) + NT_separated_nonempty_list_SEMI_enum_constructor_ => Shift(yy_state_265) + NT_separated_list_SEMI_enum_constructor_ => Shift(yy_state_818) + T_RBRACE => Reduce(0, NT_separated_list_SEMI_enum_constructor_, yy_action_182) _ => Error } } -// [65, type_sig → PRIV SUBERROR uident LBRACE separated_list(SEMI,enum_constructor) • RBRACE optional_derive, EOF / SEMI] -fn yy_state_781(_lookahead : YYSymbol) -> YYDecision { +// [69, type_sig → PRIV SUBERROR uident LBRACE separated_list(SEMI,enum_constructor) • RBRACE optional_derive, EOF / SEMI] +fn yy_state_818(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RBRACE => Shift(yy_state_782) + T_RBRACE => Shift(yy_state_819) _ => Error } } -// [65, type_sig → PRIV SUBERROR uident LBRACE separated_list(SEMI,enum_constructor) RBRACE • optional_derive, EOF / SEMI] -// [100, optional_derive → •, EOF / SEMI] -// [101, optional_derive → • DERIVE LPAREN non_empty_list_commas(qualified_uident) RPAREN, EOF / SEMI] -fn yy_state_782(_lookahead : YYSymbol) -> YYDecision { +// [69, type_sig → PRIV SUBERROR uident LBRACE separated_list(SEMI,enum_constructor) RBRACE • optional_derive, EOF / SEMI] +// [104, optional_derive → •, EOF / SEMI] +// [105, optional_derive → • DERIVE LPAREN non_empty_list_commas(qualified_uident) RPAREN, EOF / SEMI] +fn yy_state_819(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_DERIVE => Shift(yy_state_230) - NT_optional_derive => Shift(yy_state_783) - T_EOF | T_SEMI => Reduce(0, NT_optional_derive, yy_action_165) + T_DERIVE => Shift(yy_state_268) + NT_optional_derive => Shift(yy_state_820) + T_EOF | T_SEMI => Reduce(0, NT_optional_derive, yy_action_163) _ => Error } } -// [65, type_sig → PRIV SUBERROR uident LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive •, EOF / SEMI] -fn yy_state_783(_lookahead : YYSymbol) -> YYDecision { +// [69, type_sig → PRIV SUBERROR uident LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive •, EOF / SEMI] +fn yy_state_820(_lookahead : YYSymbol) -> YYDecision { ReduceNoLookahead(7, NT_type_sig, yy_action_27) } -// [59, type_sig → PRIV SUBERROR uident optional_derive •, EOF / SEMI] -fn yy_state_784(_lookahead : YYSymbol) -> YYDecision { +// [63, type_sig → PRIV SUBERROR uident optional_derive •, EOF / SEMI] +fn yy_state_821(_lookahead : YYSymbol) -> YYDecision { ReduceNoLookahead(4, NT_type_sig, yy_action_26) } -// [53, type_sig → PRIV TYPE • type_decl_name_with_params optional_derive, EOF / SEMI] -// [125, alias_sig → PRIV TYPE • type_decl_name_with_params EQUAL type_, EOF / SEMI] -// [164, type_decl_name_with_params → • uident optional_type_params_no_constraints, EOF / DERIVE / EQUAL / SEMI] -// [212, uident → • UIDENT, EOF / DERIVE / EQUAL / SEMI / LBRACKET] -fn yy_state_785(_lookahead : YYSymbol) -> YYDecision { +// [57, type_sig → PRIV TYPE • type_decl_name_with_params optional_derive, EOF / SEMI] +// [129, alias_sig → PRIV TYPE • type_decl_name_with_params EQUAL type_, EOF / SEMI] +// [168, type_decl_name_with_params → • uident optional_type_params_no_constraints, EOF / DERIVE / EQUAL / SEMI] +// [216, uident → • UIDENT, EOF / DERIVE / EQUAL / SEMI / LBRACKET] +fn yy_state_822(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_UIDENT => Shift(yy_state_25) - NT_uident => Shift(yy_state_246) - NT_type_decl_name_with_params => Shift(yy_state_786) + NT_uident => Shift(yy_state_284) + NT_type_decl_name_with_params => Shift(yy_state_823) _ => Error } } -// [53, type_sig → PRIV TYPE type_decl_name_with_params • optional_derive, EOF / SEMI] -// [100, optional_derive → •, EOF / SEMI] -// [101, optional_derive → • DERIVE LPAREN non_empty_list_commas(qualified_uident) RPAREN, EOF / SEMI] -// [125, alias_sig → PRIV TYPE type_decl_name_with_params • EQUAL type_, EOF / SEMI] -fn yy_state_786(_lookahead : YYSymbol) -> YYDecision { +// [57, type_sig → PRIV TYPE type_decl_name_with_params • optional_derive, EOF / SEMI] +// [104, optional_derive → •, EOF / SEMI] +// [105, optional_derive → • DERIVE LPAREN non_empty_list_commas(qualified_uident) RPAREN, EOF / SEMI] +// [129, alias_sig → PRIV TYPE type_decl_name_with_params • EQUAL type_, EOF / SEMI] +fn yy_state_823(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_DERIVE => Shift(yy_state_230) - T_EQUAL => Shift(yy_state_787) - NT_optional_derive => Shift(yy_state_789) - T_EOF | T_SEMI => Reduce(0, NT_optional_derive, yy_action_165) - _ => Error - } -} - -// [125, alias_sig → PRIV TYPE type_decl_name_with_params EQUAL • type_, EOF / SEMI] -// [167, simple_type → • simple_type QUESTION, EOF / QUESTION / SEMI] -// [168, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, EOF / QUESTION / SEMI] -// [169, simple_type → • LPAREN type_ RPAREN, EOF / QUESTION / SEMI] -// [170, simple_type → • qualified_uident_ optional_type_arguments, EOF / QUESTION / SEMI] -// [171, simple_type → • AMPER qualified_uident_, EOF / QUESTION / SEMI] -// [172, simple_type → • UNDERSCORE, EOF / QUESTION / SEMI] -// [173, type_ → • simple_type, EOF / SEMI] -// [174, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] -// [175, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] -// [176, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] -// [177, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] -// [178, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] -// [179, type_ → • LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] -// [180, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] -// [181, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] -// [210, qualified_uident_ → • UIDENT, EOF / QUESTION / SEMI / LBRACKET] -// [211, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, EOF / QUESTION / SEMI / LBRACKET] -fn yy_state_787(_lookahead : YYSymbol) -> YYDecision { + T_DERIVE => Shift(yy_state_268) + T_EQUAL => Shift(yy_state_824) + NT_optional_derive => Shift(yy_state_826) + T_EOF | T_SEMI => Reduce(0, NT_optional_derive, yy_action_163) + _ => Error + } +} + +// [129, alias_sig → PRIV TYPE type_decl_name_with_params EQUAL • type_, EOF / SEMI] +// [171, simple_type → • simple_type QUESTION, EOF / QUESTION / SEMI] +// [172, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, EOF / QUESTION / SEMI] +// [173, simple_type → • LPAREN type_ RPAREN, EOF / QUESTION / SEMI] +// [174, simple_type → • qualified_uident_ optional_type_arguments, EOF / QUESTION / SEMI] +// [175, simple_type → • AMPER qualified_uident_, EOF / QUESTION / SEMI] +// [176, simple_type → • UNDERSCORE, EOF / QUESTION / SEMI] +// [177, type_ → • simple_type, EOF / SEMI] +// [178, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] +// [179, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] +// [180, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] +// [181, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] +// [182, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] +// [183, type_ → • LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] +// [184, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] +// [185, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] +// [214, qualified_uident_ → • UIDENT, EOF / QUESTION / SEMI / LBRACKET] +// [215, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, EOF / QUESTION / SEMI / LBRACKET] +fn yy_state_824(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_PACKAGE_NAME => Shift(yy_state_62) T_UIDENT => Shift(yy_state_64) @@ -14298,96 +15172,102 @@ fn yy_state_787(_lookahead : YYSymbol) -> YYDecision { NT_qualified_uident_ => Shift(yy_state_78) T_LPAREN => Shift(yy_state_83) NT_simple_type => Shift(yy_state_106) - NT_type_ => Shift(yy_state_788) + NT_type_ => Shift(yy_state_825) _ => Error } } -// [125, alias_sig → PRIV TYPE type_decl_name_with_params EQUAL type_ •, EOF / SEMI] -fn yy_state_788(_lookahead : YYSymbol) -> YYDecision { +// [129, alias_sig → PRIV TYPE type_decl_name_with_params EQUAL type_ •, EOF / SEMI] +fn yy_state_825(_lookahead : YYSymbol) -> YYDecision { ReduceNoLookahead(5, NT_alias_sig, yy_action_25) } -// [53, type_sig → PRIV TYPE type_decl_name_with_params optional_derive •, EOF / SEMI] -fn yy_state_789(_lookahead : YYSymbol) -> YYDecision { +// [57, type_sig → PRIV TYPE type_decl_name_with_params optional_derive •, EOF / SEMI] +fn yy_state_826(_lookahead : YYSymbol) -> YYDecision { ReduceNoLookahead(4, NT_type_sig, yy_action_24) } // [39, func_sig → PRIV FN • loption(type_params_with_constraints) func_name LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type, EOF / SEMI] -// [157, type_params_with_constraints → • LBRACKET separated_list(COMMA,type_param_with_constraints) RBRACKET, LIDENT / UIDENT / AMPER] -// [217, loption(type_params_with_constraints) → •, LIDENT / UIDENT / AMPER] -// [218, loption(type_params_with_constraints) → • type_params_with_constraints, LIDENT / UIDENT / AMPER] -fn yy_state_790(_lookahead : YYSymbol) -> YYDecision { +// [161, type_params_with_constraints → • LBRACKET separated_list(COMMA,type_param_with_constraints) RBRACKET, LIDENT / UIDENT / AMPER / EXTEND] +// [222, loption(type_params_with_constraints) → •, LIDENT / UIDENT / AMPER / EXTEND] +// [223, loption(type_params_with_constraints) → • type_params_with_constraints, LIDENT / UIDENT / AMPER / EXTEND] +fn yy_state_827(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACKET => Shift(yy_state_162) - NT_type_params_with_constraints => Shift(yy_state_291) - NT_loption_type_params_with_constraints_ => Shift(yy_state_791) - T_LIDENT | T_UIDENT | T_AMPER => Reduce(0, NT_loption_type_params_with_constraints_, yy_action_142) + NT_type_params_with_constraints => Shift(yy_state_143) + T_LBRACKET => Shift(yy_state_144) + NT_loption_type_params_with_constraints_ => Shift(yy_state_828) + T_LIDENT | T_UIDENT | T_AMPER | T_EXTEND => Reduce(0, NT_loption_type_params_with_constraints_, yy_action_217) _ => Error } } -// [28, method_self_type_coloncolon → • UIDENT COLONCOLON, LIDENT / UIDENT] -// [29, method_self_type_coloncolon → • AMPER UIDENT COLONCOLON, LIDENT / UIDENT] +// [28, method_self_type_coloncolon → • UIDENT COLONCOLON, LIDENT / UIDENT / EXTEND] +// [29, method_self_type_coloncolon → • AMPER UIDENT COLONCOLON, LIDENT / UIDENT / EXTEND] // [30, luident → • lident, LPAREN] // [31, luident → • uident, LPAREN] // [32, func_name → • luident, LPAREN] // [33, func_name → • method_self_type_coloncolon luident, LPAREN] // [39, func_sig → PRIV FN loption(type_params_with_constraints) • func_name LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type, EOF / SEMI] -// [212, uident → • UIDENT, LPAREN] -// [213, lident → • LIDENT, LPAREN] -fn yy_state_791(_lookahead : YYSymbol) -> YYDecision { +// [216, uident → • UIDENT, LPAREN] +// [217, lident → • LIDENT, LPAREN] +// [218, lident → • EXTEND, LPAREN] +fn yy_state_828(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LIDENT => Shift(yy_state_38) - NT_method_self_type_coloncolon => Shift(yy_state_299) - NT_uident => Shift(yy_state_301) - NT_lident => Shift(yy_state_302) - NT_luident => Shift(yy_state_303) - T_AMPER => Shift(yy_state_304) - T_UIDENT => Shift(yy_state_307) - NT_func_name => Shift(yy_state_792) + T_EXTEND => Shift(yy_state_38) + T_LIDENT => Shift(yy_state_39) + NT_method_self_type_coloncolon => Shift(yy_state_336) + NT_uident => Shift(yy_state_338) + NT_lident => Shift(yy_state_339) + NT_luident => Shift(yy_state_340) + T_AMPER => Shift(yy_state_341) + T_UIDENT => Shift(yy_state_344) + NT_func_name => Shift(yy_state_829) _ => Error } } // [39, func_sig → PRIV FN loption(type_params_with_constraints) func_name • LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type, EOF / SEMI] -fn yy_state_792(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_829(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LPAREN => Shift(yy_state_793) + T_LPAREN => Shift(yy_state_830) _ => Error } } // [39, func_sig → PRIV FN loption(type_params_with_constraints) func_name LPAREN • separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type, EOF / SEMI] -// [167, simple_type → • simple_type QUESTION, RPAREN / COMMA / QUESTION] -// [168, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, RPAREN / COMMA / QUESTION] -// [169, simple_type → • LPAREN type_ RPAREN, RPAREN / COMMA / QUESTION] -// [170, simple_type → • qualified_uident_ optional_type_arguments, RPAREN / COMMA / QUESTION] -// [171, simple_type → • AMPER qualified_uident_, RPAREN / COMMA / QUESTION] -// [172, simple_type → • UNDERSCORE, RPAREN / COMMA / QUESTION] -// [173, type_ → • simple_type, RPAREN / COMMA] -// [174, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [175, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [176, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [177, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [178, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [179, type_ → • LPAREN RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [180, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [181, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [190, parameter → • type_, RPAREN / COMMA] -// [191, parameter → • POST_LABEL COLON type_, RPAREN / COMMA] -// [192, parameter → • label QUESTION COLON type_, RPAREN / COMMA] -// [210, qualified_uident_ → • UIDENT, RPAREN / COMMA / QUESTION / LBRACKET] -// [211, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, RPAREN / COMMA / QUESTION / LBRACKET] -// [214, label → • LIDENT, QUESTION] -// [219, separated_list(COMMA,parameter) → •, RPAREN] -// [220, separated_list(COMMA,parameter) → • separated_nonempty_list(COMMA,parameter), RPAREN] -// [258, separated_nonempty_list(COMMA,parameter) → • parameter, RPAREN] -// [259, separated_nonempty_list(COMMA,parameter) → • parameter COMMA separated_nonempty_list(COMMA,parameter), RPAREN] -fn yy_state_793(_lookahead : YYSymbol) -> YYDecision { +// [171, simple_type → • simple_type QUESTION, RPAREN / COMMA / QUESTION] +// [172, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, RPAREN / COMMA / QUESTION] +// [173, simple_type → • LPAREN type_ RPAREN, RPAREN / COMMA / QUESTION] +// [174, simple_type → • qualified_uident_ optional_type_arguments, RPAREN / COMMA / QUESTION] +// [175, simple_type → • AMPER qualified_uident_, RPAREN / COMMA / QUESTION] +// [176, simple_type → • UNDERSCORE, RPAREN / COMMA / QUESTION] +// [177, type_ → • simple_type, RPAREN / COMMA] +// [178, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [179, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [180, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [181, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [182, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [183, type_ → • LPAREN RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [184, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [185, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [194, parameter → • type_, RPAREN / COMMA] +// [195, parameter → • POST_LABEL COLON type_, RPAREN / COMMA] +// [196, parameter → • label QUESTION COLON type_, RPAREN / COMMA] +// [214, qualified_uident_ → • UIDENT, RPAREN / COMMA / QUESTION / LBRACKET] +// [215, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, RPAREN / COMMA / QUESTION / LBRACKET] +// [217, lident → • LIDENT, QUESTION] +// [218, lident → • EXTEND, QUESTION] +// [219, label → • lident, QUESTION] +// [224, separated_list(COMMA,parameter) → •, RPAREN] +// [225, separated_list(COMMA,parameter) → • separated_nonempty_list(COMMA,parameter), RPAREN] +// [263, separated_nonempty_list(COMMA,parameter) → • parameter, RPAREN] +// [264, separated_nonempty_list(COMMA,parameter) → • parameter COMMA separated_nonempty_list(COMMA,parameter), RPAREN] +fn yy_state_830(_lookahead : YYSymbol) -> YYDecision { match _lookahead { + T_EXTEND => Shift(yy_state_38) + T_LIDENT => Shift(yy_state_39) NT_parameter => Shift(yy_state_58) - T_LIDENT => Shift(yy_state_61) + NT_lident => Shift(yy_state_61) T_PACKAGE_NAME => Shift(yy_state_62) T_UIDENT => Shift(yy_state_64) NT_label => Shift(yy_state_65) @@ -14400,52 +15280,52 @@ fn yy_state_793(_lookahead : YYSymbol) -> YYDecision { T_POST_LABEL => Shift(yy_state_122) NT_type_ => Shift(yy_state_125) NT_separated_nonempty_list_COMMA_parameter_ => Shift(yy_state_126) - NT_separated_list_COMMA_parameter_ => Shift(yy_state_794) - T_RPAREN => Reduce(0, NT_separated_list_COMMA_parameter_, yy_action_256) + NT_separated_list_COMMA_parameter_ => Shift(yy_state_831) + T_RPAREN => Reduce(0, NT_separated_list_COMMA_parameter_, yy_action_260) _ => Error } } // [39, func_sig → PRIV FN loption(type_params_with_constraints) func_name LPAREN separated_list(COMMA,parameter) • RPAREN THIN_ARROW return_type, EOF / SEMI] -fn yy_state_794(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_831(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RPAREN => Shift(yy_state_795) + T_RPAREN => Shift(yy_state_832) _ => Error } } // [39, func_sig → PRIV FN loption(type_params_with_constraints) func_name LPAREN separated_list(COMMA,parameter) RPAREN • THIN_ARROW return_type, EOF / SEMI] -fn yy_state_795(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_832(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_THIN_ARROW => Shift(yy_state_796) + T_THIN_ARROW => Shift(yy_state_833) _ => Error } } // [39, func_sig → PRIV FN loption(type_params_with_constraints) func_name LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW • return_type, EOF / SEMI] -// [167, simple_type → • simple_type QUESTION, EOF / RAISE / QUESTION / SEMI / NORAISE] -// [168, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, EOF / RAISE / QUESTION / SEMI / NORAISE] -// [169, simple_type → • LPAREN type_ RPAREN, EOF / RAISE / QUESTION / SEMI / NORAISE] -// [170, simple_type → • qualified_uident_ optional_type_arguments, EOF / RAISE / QUESTION / SEMI / NORAISE] -// [171, simple_type → • AMPER qualified_uident_, EOF / RAISE / QUESTION / SEMI / NORAISE] -// [172, simple_type → • UNDERSCORE, EOF / RAISE / QUESTION / SEMI / NORAISE] -// [173, type_ → • simple_type, EOF / SEMI] -// [174, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] -// [175, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] -// [176, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] -// [177, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] -// [178, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] -// [179, type_ → • LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] -// [180, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] -// [181, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] -// [182, return_type → • type_, EOF / SEMI] -// [183, return_type → • simple_type NORAISE, EOF / SEMI] -// [184, return_type → • simple_type RAISE, EOF / SEMI] -// [185, return_type → • simple_type RAISE error_type, EOF / SEMI] -// [186, return_type → • simple_type RAISE QUESTION, EOF / SEMI] -// [210, qualified_uident_ → • UIDENT, EOF / RAISE / QUESTION / SEMI / LBRACKET / NORAISE] -// [211, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, EOF / RAISE / QUESTION / SEMI / LBRACKET / NORAISE] -fn yy_state_796(_lookahead : YYSymbol) -> YYDecision { +// [171, simple_type → • simple_type QUESTION, EOF / RAISE / QUESTION / SEMI / NORAISE] +// [172, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, EOF / RAISE / QUESTION / SEMI / NORAISE] +// [173, simple_type → • LPAREN type_ RPAREN, EOF / RAISE / QUESTION / SEMI / NORAISE] +// [174, simple_type → • qualified_uident_ optional_type_arguments, EOF / RAISE / QUESTION / SEMI / NORAISE] +// [175, simple_type → • AMPER qualified_uident_, EOF / RAISE / QUESTION / SEMI / NORAISE] +// [176, simple_type → • UNDERSCORE, EOF / RAISE / QUESTION / SEMI / NORAISE] +// [177, type_ → • simple_type, EOF / SEMI] +// [178, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] +// [179, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] +// [180, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] +// [181, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] +// [182, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] +// [183, type_ → • LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] +// [184, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] +// [185, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] +// [186, return_type → • type_, EOF / SEMI] +// [187, return_type → • simple_type NORAISE, EOF / SEMI] +// [188, return_type → • simple_type RAISE, EOF / SEMI] +// [189, return_type → • simple_type RAISE error_type, EOF / SEMI] +// [190, return_type → • simple_type RAISE QUESTION, EOF / SEMI] +// [214, qualified_uident_ → • UIDENT, EOF / RAISE / QUESTION / SEMI / LBRACKET / NORAISE] +// [215, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, EOF / RAISE / QUESTION / SEMI / LBRACKET / NORAISE] +fn yy_state_833(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_PACKAGE_NAME => Shift(yy_state_62) T_UIDENT => Shift(yy_state_64) @@ -14456,99 +15336,105 @@ fn yy_state_796(_lookahead : YYSymbol) -> YYDecision { NT_qualified_uident_ => Shift(yy_state_78) T_LPAREN => Shift(yy_state_83) NT_simple_type => Shift(yy_state_87) - NT_return_type => Shift(yy_state_797) + NT_return_type => Shift(yy_state_834) _ => Error } } // [39, func_sig → PRIV FN loption(type_params_with_constraints) func_name LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type •, EOF / SEMI] -fn yy_state_797(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_834(_lookahead : YYSymbol) -> YYDecision { ReduceNoLookahead(9, NT_func_sig, yy_action_22) } // [38, func_sig → PRIV ASYNC • FN loption(type_params_with_constraints) func_name LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type, EOF / SEMI] -fn yy_state_798(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_835(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_FN => Shift(yy_state_799) + T_FN => Shift(yy_state_836) _ => Error } } // [38, func_sig → PRIV ASYNC FN • loption(type_params_with_constraints) func_name LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type, EOF / SEMI] -// [157, type_params_with_constraints → • LBRACKET separated_list(COMMA,type_param_with_constraints) RBRACKET, LIDENT / UIDENT / AMPER] -// [217, loption(type_params_with_constraints) → •, LIDENT / UIDENT / AMPER] -// [218, loption(type_params_with_constraints) → • type_params_with_constraints, LIDENT / UIDENT / AMPER] -fn yy_state_799(_lookahead : YYSymbol) -> YYDecision { +// [161, type_params_with_constraints → • LBRACKET separated_list(COMMA,type_param_with_constraints) RBRACKET, LIDENT / UIDENT / AMPER / EXTEND] +// [222, loption(type_params_with_constraints) → •, LIDENT / UIDENT / AMPER / EXTEND] +// [223, loption(type_params_with_constraints) → • type_params_with_constraints, LIDENT / UIDENT / AMPER / EXTEND] +fn yy_state_836(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACKET => Shift(yy_state_162) - NT_type_params_with_constraints => Shift(yy_state_291) - NT_loption_type_params_with_constraints_ => Shift(yy_state_800) - T_LIDENT | T_UIDENT | T_AMPER => Reduce(0, NT_loption_type_params_with_constraints_, yy_action_142) + NT_type_params_with_constraints => Shift(yy_state_143) + T_LBRACKET => Shift(yy_state_144) + NT_loption_type_params_with_constraints_ => Shift(yy_state_837) + T_LIDENT | T_UIDENT | T_AMPER | T_EXTEND => Reduce(0, NT_loption_type_params_with_constraints_, yy_action_217) _ => Error } } -// [28, method_self_type_coloncolon → • UIDENT COLONCOLON, LIDENT / UIDENT] -// [29, method_self_type_coloncolon → • AMPER UIDENT COLONCOLON, LIDENT / UIDENT] +// [28, method_self_type_coloncolon → • UIDENT COLONCOLON, LIDENT / UIDENT / EXTEND] +// [29, method_self_type_coloncolon → • AMPER UIDENT COLONCOLON, LIDENT / UIDENT / EXTEND] // [30, luident → • lident, LPAREN] // [31, luident → • uident, LPAREN] // [32, func_name → • luident, LPAREN] // [33, func_name → • method_self_type_coloncolon luident, LPAREN] // [38, func_sig → PRIV ASYNC FN loption(type_params_with_constraints) • func_name LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type, EOF / SEMI] -// [212, uident → • UIDENT, LPAREN] -// [213, lident → • LIDENT, LPAREN] -fn yy_state_800(_lookahead : YYSymbol) -> YYDecision { +// [216, uident → • UIDENT, LPAREN] +// [217, lident → • LIDENT, LPAREN] +// [218, lident → • EXTEND, LPAREN] +fn yy_state_837(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LIDENT => Shift(yy_state_38) - NT_method_self_type_coloncolon => Shift(yy_state_299) - NT_uident => Shift(yy_state_301) - NT_lident => Shift(yy_state_302) - NT_luident => Shift(yy_state_303) - T_AMPER => Shift(yy_state_304) - T_UIDENT => Shift(yy_state_307) - NT_func_name => Shift(yy_state_801) + T_EXTEND => Shift(yy_state_38) + T_LIDENT => Shift(yy_state_39) + NT_method_self_type_coloncolon => Shift(yy_state_336) + NT_uident => Shift(yy_state_338) + NT_lident => Shift(yy_state_339) + NT_luident => Shift(yy_state_340) + T_AMPER => Shift(yy_state_341) + T_UIDENT => Shift(yy_state_344) + NT_func_name => Shift(yy_state_838) _ => Error } } // [38, func_sig → PRIV ASYNC FN loption(type_params_with_constraints) func_name • LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type, EOF / SEMI] -fn yy_state_801(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_838(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LPAREN => Shift(yy_state_802) + T_LPAREN => Shift(yy_state_839) _ => Error } } // [38, func_sig → PRIV ASYNC FN loption(type_params_with_constraints) func_name LPAREN • separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type, EOF / SEMI] -// [167, simple_type → • simple_type QUESTION, RPAREN / COMMA / QUESTION] -// [168, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, RPAREN / COMMA / QUESTION] -// [169, simple_type → • LPAREN type_ RPAREN, RPAREN / COMMA / QUESTION] -// [170, simple_type → • qualified_uident_ optional_type_arguments, RPAREN / COMMA / QUESTION] -// [171, simple_type → • AMPER qualified_uident_, RPAREN / COMMA / QUESTION] -// [172, simple_type → • UNDERSCORE, RPAREN / COMMA / QUESTION] -// [173, type_ → • simple_type, RPAREN / COMMA] -// [174, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [175, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [176, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [177, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [178, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [179, type_ → • LPAREN RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [180, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [181, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, RPAREN / COMMA] -// [190, parameter → • type_, RPAREN / COMMA] -// [191, parameter → • POST_LABEL COLON type_, RPAREN / COMMA] -// [192, parameter → • label QUESTION COLON type_, RPAREN / COMMA] -// [210, qualified_uident_ → • UIDENT, RPAREN / COMMA / QUESTION / LBRACKET] -// [211, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, RPAREN / COMMA / QUESTION / LBRACKET] -// [214, label → • LIDENT, QUESTION] -// [219, separated_list(COMMA,parameter) → •, RPAREN] -// [220, separated_list(COMMA,parameter) → • separated_nonempty_list(COMMA,parameter), RPAREN] -// [258, separated_nonempty_list(COMMA,parameter) → • parameter, RPAREN] -// [259, separated_nonempty_list(COMMA,parameter) → • parameter COMMA separated_nonempty_list(COMMA,parameter), RPAREN] -fn yy_state_802(_lookahead : YYSymbol) -> YYDecision { - match _lookahead { +// [171, simple_type → • simple_type QUESTION, RPAREN / COMMA / QUESTION] +// [172, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, RPAREN / COMMA / QUESTION] +// [173, simple_type → • LPAREN type_ RPAREN, RPAREN / COMMA / QUESTION] +// [174, simple_type → • qualified_uident_ optional_type_arguments, RPAREN / COMMA / QUESTION] +// [175, simple_type → • AMPER qualified_uident_, RPAREN / COMMA / QUESTION] +// [176, simple_type → • UNDERSCORE, RPAREN / COMMA / QUESTION] +// [177, type_ → • simple_type, RPAREN / COMMA] +// [178, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [179, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [180, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [181, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [182, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [183, type_ → • LPAREN RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [184, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [185, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, RPAREN / COMMA] +// [194, parameter → • type_, RPAREN / COMMA] +// [195, parameter → • POST_LABEL COLON type_, RPAREN / COMMA] +// [196, parameter → • label QUESTION COLON type_, RPAREN / COMMA] +// [214, qualified_uident_ → • UIDENT, RPAREN / COMMA / QUESTION / LBRACKET] +// [215, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, RPAREN / COMMA / QUESTION / LBRACKET] +// [217, lident → • LIDENT, QUESTION] +// [218, lident → • EXTEND, QUESTION] +// [219, label → • lident, QUESTION] +// [224, separated_list(COMMA,parameter) → •, RPAREN] +// [225, separated_list(COMMA,parameter) → • separated_nonempty_list(COMMA,parameter), RPAREN] +// [263, separated_nonempty_list(COMMA,parameter) → • parameter, RPAREN] +// [264, separated_nonempty_list(COMMA,parameter) → • parameter COMMA separated_nonempty_list(COMMA,parameter), RPAREN] +fn yy_state_839(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_EXTEND => Shift(yy_state_38) + T_LIDENT => Shift(yy_state_39) NT_parameter => Shift(yy_state_58) - T_LIDENT => Shift(yy_state_61) + NT_lident => Shift(yy_state_61) T_PACKAGE_NAME => Shift(yy_state_62) T_UIDENT => Shift(yy_state_64) NT_label => Shift(yy_state_65) @@ -14561,52 +15447,52 @@ fn yy_state_802(_lookahead : YYSymbol) -> YYDecision { T_POST_LABEL => Shift(yy_state_122) NT_type_ => Shift(yy_state_125) NT_separated_nonempty_list_COMMA_parameter_ => Shift(yy_state_126) - NT_separated_list_COMMA_parameter_ => Shift(yy_state_803) - T_RPAREN => Reduce(0, NT_separated_list_COMMA_parameter_, yy_action_256) + NT_separated_list_COMMA_parameter_ => Shift(yy_state_840) + T_RPAREN => Reduce(0, NT_separated_list_COMMA_parameter_, yy_action_260) _ => Error } } // [38, func_sig → PRIV ASYNC FN loption(type_params_with_constraints) func_name LPAREN separated_list(COMMA,parameter) • RPAREN THIN_ARROW return_type, EOF / SEMI] -fn yy_state_803(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_840(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RPAREN => Shift(yy_state_804) + T_RPAREN => Shift(yy_state_841) _ => Error } } // [38, func_sig → PRIV ASYNC FN loption(type_params_with_constraints) func_name LPAREN separated_list(COMMA,parameter) RPAREN • THIN_ARROW return_type, EOF / SEMI] -fn yy_state_804(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_841(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_THIN_ARROW => Shift(yy_state_805) + T_THIN_ARROW => Shift(yy_state_842) _ => Error } } // [38, func_sig → PRIV ASYNC FN loption(type_params_with_constraints) func_name LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW • return_type, EOF / SEMI] -// [167, simple_type → • simple_type QUESTION, EOF / RAISE / QUESTION / SEMI / NORAISE] -// [168, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, EOF / RAISE / QUESTION / SEMI / NORAISE] -// [169, simple_type → • LPAREN type_ RPAREN, EOF / RAISE / QUESTION / SEMI / NORAISE] -// [170, simple_type → • qualified_uident_ optional_type_arguments, EOF / RAISE / QUESTION / SEMI / NORAISE] -// [171, simple_type → • AMPER qualified_uident_, EOF / RAISE / QUESTION / SEMI / NORAISE] -// [172, simple_type → • UNDERSCORE, EOF / RAISE / QUESTION / SEMI / NORAISE] -// [173, type_ → • simple_type, EOF / SEMI] -// [174, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] -// [175, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] -// [176, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] -// [177, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] -// [178, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] -// [179, type_ → • LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] -// [180, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] -// [181, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] -// [182, return_type → • type_, EOF / SEMI] -// [183, return_type → • simple_type NORAISE, EOF / SEMI] -// [184, return_type → • simple_type RAISE, EOF / SEMI] -// [185, return_type → • simple_type RAISE error_type, EOF / SEMI] -// [186, return_type → • simple_type RAISE QUESTION, EOF / SEMI] -// [210, qualified_uident_ → • UIDENT, EOF / RAISE / QUESTION / SEMI / LBRACKET / NORAISE] -// [211, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, EOF / RAISE / QUESTION / SEMI / LBRACKET / NORAISE] -fn yy_state_805(_lookahead : YYSymbol) -> YYDecision { +// [171, simple_type → • simple_type QUESTION, EOF / RAISE / QUESTION / SEMI / NORAISE] +// [172, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, EOF / RAISE / QUESTION / SEMI / NORAISE] +// [173, simple_type → • LPAREN type_ RPAREN, EOF / RAISE / QUESTION / SEMI / NORAISE] +// [174, simple_type → • qualified_uident_ optional_type_arguments, EOF / RAISE / QUESTION / SEMI / NORAISE] +// [175, simple_type → • AMPER qualified_uident_, EOF / RAISE / QUESTION / SEMI / NORAISE] +// [176, simple_type → • UNDERSCORE, EOF / RAISE / QUESTION / SEMI / NORAISE] +// [177, type_ → • simple_type, EOF / SEMI] +// [178, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] +// [179, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] +// [180, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] +// [181, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] +// [182, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] +// [183, type_ → • LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] +// [184, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] +// [185, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] +// [186, return_type → • type_, EOF / SEMI] +// [187, return_type → • simple_type NORAISE, EOF / SEMI] +// [188, return_type → • simple_type RAISE, EOF / SEMI] +// [189, return_type → • simple_type RAISE error_type, EOF / SEMI] +// [190, return_type → • simple_type RAISE QUESTION, EOF / SEMI] +// [214, qualified_uident_ → • UIDENT, EOF / RAISE / QUESTION / SEMI / LBRACKET / NORAISE] +// [215, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, EOF / RAISE / QUESTION / SEMI / LBRACKET / NORAISE] +fn yy_state_842(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_PACKAGE_NAME => Shift(yy_state_62) T_UIDENT => Shift(yy_state_64) @@ -14617,53 +15503,55 @@ fn yy_state_805(_lookahead : YYSymbol) -> YYDecision { NT_qualified_uident_ => Shift(yy_state_78) T_LPAREN => Shift(yy_state_83) NT_simple_type => Shift(yy_state_87) - NT_return_type => Shift(yy_state_806) + NT_return_type => Shift(yy_state_843) _ => Error } } // [38, func_sig → PRIV ASYNC FN loption(type_params_with_constraints) func_name LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type •, EOF / SEMI] -fn yy_state_806(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_843(_lookahead : YYSymbol) -> YYDecision { ReduceNoLookahead(10, NT_func_sig, yy_action_19) } // [23, value_sig → PRIV LET • lident COLON type_, EOF / SEMI] -// [213, lident → • LIDENT, COLON] -fn yy_state_807(_lookahead : YYSymbol) -> YYDecision { +// [217, lident → • LIDENT, COLON] +// [218, lident → • EXTEND, COLON] +fn yy_state_844(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LIDENT => Shift(yy_state_38) - NT_lident => Shift(yy_state_808) + T_EXTEND => Shift(yy_state_38) + T_LIDENT => Shift(yy_state_39) + NT_lident => Shift(yy_state_845) _ => Error } } // [23, value_sig → PRIV LET lident • COLON type_, EOF / SEMI] -fn yy_state_808(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_845(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_COLON => Shift(yy_state_809) + T_COLON => Shift(yy_state_846) _ => Error } } // [23, value_sig → PRIV LET lident COLON • type_, EOF / SEMI] -// [167, simple_type → • simple_type QUESTION, EOF / QUESTION / SEMI] -// [168, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, EOF / QUESTION / SEMI] -// [169, simple_type → • LPAREN type_ RPAREN, EOF / QUESTION / SEMI] -// [170, simple_type → • qualified_uident_ optional_type_arguments, EOF / QUESTION / SEMI] -// [171, simple_type → • AMPER qualified_uident_, EOF / QUESTION / SEMI] -// [172, simple_type → • UNDERSCORE, EOF / QUESTION / SEMI] -// [173, type_ → • simple_type, EOF / SEMI] -// [174, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] -// [175, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] -// [176, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] -// [177, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] -// [178, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] -// [179, type_ → • LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] -// [180, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] -// [181, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] -// [210, qualified_uident_ → • UIDENT, EOF / QUESTION / SEMI / LBRACKET] -// [211, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, EOF / QUESTION / SEMI / LBRACKET] -fn yy_state_809(_lookahead : YYSymbol) -> YYDecision { +// [171, simple_type → • simple_type QUESTION, EOF / QUESTION / SEMI] +// [172, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, EOF / QUESTION / SEMI] +// [173, simple_type → • LPAREN type_ RPAREN, EOF / QUESTION / SEMI] +// [174, simple_type → • qualified_uident_ optional_type_arguments, EOF / QUESTION / SEMI] +// [175, simple_type → • AMPER qualified_uident_, EOF / QUESTION / SEMI] +// [176, simple_type → • UNDERSCORE, EOF / QUESTION / SEMI] +// [177, type_ → • simple_type, EOF / SEMI] +// [178, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] +// [179, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] +// [180, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EOF / SEMI] +// [181, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EOF / SEMI] +// [182, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] +// [183, type_ → • LPAREN RPAREN THIN_ARROW return_type, EOF / SEMI] +// [184, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] +// [185, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, EOF / SEMI] +// [214, qualified_uident_ → • UIDENT, EOF / QUESTION / SEMI / LBRACKET] +// [215, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, EOF / QUESTION / SEMI / LBRACKET] +fn yy_state_846(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_PACKAGE_NAME => Shift(yy_state_62) T_UIDENT => Shift(yy_state_64) @@ -14673,53 +15561,53 @@ fn yy_state_809(_lookahead : YYSymbol) -> YYDecision { NT_qualified_uident_ => Shift(yy_state_78) T_LPAREN => Shift(yy_state_83) NT_simple_type => Shift(yy_state_106) - NT_type_ => Shift(yy_state_810) + NT_type_ => Shift(yy_state_847) _ => Error } } // [23, value_sig → PRIV LET lident COLON type_ •, EOF / SEMI] -fn yy_state_810(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_847(_lookahead : YYSymbol) -> YYDecision { ReduceNoLookahead(5, NT_value_sig, yy_action_18) } // [17, const_sig → PRIV CONST • uident COLON type_ EQUAL constant, EOF / SEMI] -// [212, uident → • UIDENT, COLON] -fn yy_state_811(_lookahead : YYSymbol) -> YYDecision { +// [216, uident → • UIDENT, COLON] +fn yy_state_848(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_UIDENT => Shift(yy_state_25) - NT_uident => Shift(yy_state_812) + NT_uident => Shift(yy_state_849) _ => Error } } // [17, const_sig → PRIV CONST uident • COLON type_ EQUAL constant, EOF / SEMI] -fn yy_state_812(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_849(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_COLON => Shift(yy_state_813) + T_COLON => Shift(yy_state_850) _ => Error } } // [17, const_sig → PRIV CONST uident COLON • type_ EQUAL constant, EOF / SEMI] -// [167, simple_type → • simple_type QUESTION, EQUAL / QUESTION] -// [168, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, EQUAL / QUESTION] -// [169, simple_type → • LPAREN type_ RPAREN, EQUAL / QUESTION] -// [170, simple_type → • qualified_uident_ optional_type_arguments, EQUAL / QUESTION] -// [171, simple_type → • AMPER qualified_uident_, EQUAL / QUESTION] -// [172, simple_type → • UNDERSCORE, EQUAL / QUESTION] -// [173, type_ → • simple_type, EQUAL] -// [174, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EQUAL] -// [175, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EQUAL] -// [176, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EQUAL] -// [177, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EQUAL] -// [178, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, EQUAL] -// [179, type_ → • LPAREN RPAREN THIN_ARROW return_type, EQUAL] -// [180, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, EQUAL] -// [181, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, EQUAL] -// [210, qualified_uident_ → • UIDENT, EQUAL / QUESTION / LBRACKET] -// [211, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, EQUAL / QUESTION / LBRACKET] -fn yy_state_813(_lookahead : YYSymbol) -> YYDecision { +// [171, simple_type → • simple_type QUESTION, EQUAL / QUESTION] +// [172, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, EQUAL / QUESTION] +// [173, simple_type → • LPAREN type_ RPAREN, EQUAL / QUESTION] +// [174, simple_type → • qualified_uident_ optional_type_arguments, EQUAL / QUESTION] +// [175, simple_type → • AMPER qualified_uident_, EQUAL / QUESTION] +// [176, simple_type → • UNDERSCORE, EQUAL / QUESTION] +// [177, type_ → • simple_type, EQUAL] +// [178, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EQUAL] +// [179, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EQUAL] +// [180, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EQUAL] +// [181, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EQUAL] +// [182, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, EQUAL] +// [183, type_ → • LPAREN RPAREN THIN_ARROW return_type, EQUAL] +// [184, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, EQUAL] +// [185, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, EQUAL] +// [214, qualified_uident_ → • UIDENT, EQUAL / QUESTION / LBRACKET] +// [215, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, EQUAL / QUESTION / LBRACKET] +fn yy_state_850(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_PACKAGE_NAME => Shift(yy_state_62) T_UIDENT => Shift(yy_state_64) @@ -14729,91 +15617,91 @@ fn yy_state_813(_lookahead : YYSymbol) -> YYDecision { NT_qualified_uident_ => Shift(yy_state_78) T_LPAREN => Shift(yy_state_83) NT_simple_type => Shift(yy_state_106) - NT_type_ => Shift(yy_state_814) + NT_type_ => Shift(yy_state_851) _ => Error } } // [17, const_sig → PRIV CONST uident COLON type_ • EQUAL constant, EOF / SEMI] -fn yy_state_814(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_851(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_EQUAL => Shift(yy_state_815) + T_EQUAL => Shift(yy_state_852) _ => Error } } // [17, const_sig → PRIV CONST uident COLON type_ EQUAL • constant, EOF / SEMI] -// [193, constant → • TRUE, EOF / SEMI] -// [194, constant → • FALSE, EOF / SEMI] -// [195, constant → • BYTE, EOF / SEMI] -// [196, constant → • BYTES, EOF / SEMI] -// [197, constant → • CHAR, EOF / SEMI] -// [198, constant → • INT, EOF / SEMI] -// [199, constant → • MINUS INT, EOF / SEMI] -// [200, constant → • FLOAT, EOF / SEMI] -// [201, constant → • MINUS FLOAT, EOF / SEMI] -// [202, constant → • DOUBLE, EOF / SEMI] -// [203, constant → • MINUS DOUBLE, EOF / SEMI] -// [204, constant → • STRING, EOF / SEMI] -fn yy_state_815(_lookahead : YYSymbol) -> YYDecision { - match _lookahead { - T_STRING => Shift(yy_state_511) - T_DOUBLE => Shift(yy_state_512) - T_FLOAT => Shift(yy_state_513) - T_MINUS => Shift(yy_state_514) - T_INT => Shift(yy_state_518) - T_CHAR => Shift(yy_state_519) - T_BYTES => Shift(yy_state_520) - T_BYTE => Shift(yy_state_521) - T_FALSE => Shift(yy_state_522) - T_TRUE => Shift(yy_state_523) - NT_constant => Shift(yy_state_816) +// [197, constant → • TRUE, EOF / SEMI] +// [198, constant → • FALSE, EOF / SEMI] +// [199, constant → • BYTE, EOF / SEMI] +// [200, constant → • BYTES, EOF / SEMI] +// [201, constant → • CHAR, EOF / SEMI] +// [202, constant → • INT, EOF / SEMI] +// [203, constant → • MINUS INT, EOF / SEMI] +// [204, constant → • FLOAT, EOF / SEMI] +// [205, constant → • MINUS FLOAT, EOF / SEMI] +// [206, constant → • DOUBLE, EOF / SEMI] +// [207, constant → • MINUS DOUBLE, EOF / SEMI] +// [208, constant → • STRING, EOF / SEMI] +fn yy_state_852(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_STRING => Shift(yy_state_548) + T_DOUBLE => Shift(yy_state_549) + T_FLOAT => Shift(yy_state_550) + T_MINUS => Shift(yy_state_551) + T_INT => Shift(yy_state_555) + T_CHAR => Shift(yy_state_556) + T_BYTES => Shift(yy_state_557) + T_BYTE => Shift(yy_state_558) + T_FALSE => Shift(yy_state_559) + T_TRUE => Shift(yy_state_560) + NT_constant => Shift(yy_state_853) _ => Error } } // [17, const_sig → PRIV CONST uident COLON type_ EQUAL constant •, EOF / SEMI] -fn yy_state_816(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_853(_lookahead : YYSymbol) -> YYDecision { ReduceNoLookahead(7, NT_const_sig, yy_action_16) } // [16, const_sig → CONST • uident COLON type_ EQUAL constant, EOF / SEMI] -// [212, uident → • UIDENT, COLON] -fn yy_state_817(_lookahead : YYSymbol) -> YYDecision { +// [216, uident → • UIDENT, COLON] +fn yy_state_854(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_UIDENT => Shift(yy_state_25) - NT_uident => Shift(yy_state_818) + NT_uident => Shift(yy_state_855) _ => Error } } // [16, const_sig → CONST uident • COLON type_ EQUAL constant, EOF / SEMI] -fn yy_state_818(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_855(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_COLON => Shift(yy_state_819) + T_COLON => Shift(yy_state_856) _ => Error } } // [16, const_sig → CONST uident COLON • type_ EQUAL constant, EOF / SEMI] -// [167, simple_type → • simple_type QUESTION, EQUAL / QUESTION] -// [168, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, EQUAL / QUESTION] -// [169, simple_type → • LPAREN type_ RPAREN, EQUAL / QUESTION] -// [170, simple_type → • qualified_uident_ optional_type_arguments, EQUAL / QUESTION] -// [171, simple_type → • AMPER qualified_uident_, EQUAL / QUESTION] -// [172, simple_type → • UNDERSCORE, EQUAL / QUESTION] -// [173, type_ → • simple_type, EQUAL] -// [174, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EQUAL] -// [175, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EQUAL] -// [176, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EQUAL] -// [177, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EQUAL] -// [178, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, EQUAL] -// [179, type_ → • LPAREN RPAREN THIN_ARROW return_type, EQUAL] -// [180, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, EQUAL] -// [181, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, EQUAL] -// [210, qualified_uident_ → • UIDENT, EQUAL / QUESTION / LBRACKET] -// [211, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, EQUAL / QUESTION / LBRACKET] -fn yy_state_819(_lookahead : YYSymbol) -> YYDecision { +// [171, simple_type → • simple_type QUESTION, EQUAL / QUESTION] +// [172, simple_type → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN, EQUAL / QUESTION] +// [173, simple_type → • LPAREN type_ RPAREN, EQUAL / QUESTION] +// [174, simple_type → • qualified_uident_ optional_type_arguments, EQUAL / QUESTION] +// [175, simple_type → • AMPER qualified_uident_, EQUAL / QUESTION] +// [176, simple_type → • UNDERSCORE, EQUAL / QUESTION] +// [177, type_ → • simple_type, EQUAL] +// [178, type_ → • ASYNC LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EQUAL] +// [179, type_ → • ASYNC LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EQUAL] +// [180, type_ → • LPAREN type_ COMMA RPAREN THIN_ARROW return_type, EQUAL] +// [181, type_ → • LPAREN type_ COMMA separated_nonempty_list(COMMA,type_) RPAREN THIN_ARROW return_type, EQUAL] +// [182, type_ → • ASYNC LPAREN RPAREN THIN_ARROW return_type, EQUAL] +// [183, type_ → • LPAREN RPAREN THIN_ARROW return_type, EQUAL] +// [184, type_ → • ASYNC LPAREN type_ RPAREN THIN_ARROW return_type, EQUAL] +// [185, type_ → • LPAREN type_ RPAREN THIN_ARROW return_type, EQUAL] +// [214, qualified_uident_ → • UIDENT, EQUAL / QUESTION / LBRACKET] +// [215, qualified_uident_ → • PACKAGE_NAME DOT_UIDENT, EQUAL / QUESTION / LBRACKET] +fn yy_state_856(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_PACKAGE_NAME => Shift(yy_state_62) T_UIDENT => Shift(yy_state_64) @@ -14823,94 +15711,94 @@ fn yy_state_819(_lookahead : YYSymbol) -> YYDecision { NT_qualified_uident_ => Shift(yy_state_78) T_LPAREN => Shift(yy_state_83) NT_simple_type => Shift(yy_state_106) - NT_type_ => Shift(yy_state_820) + NT_type_ => Shift(yy_state_857) _ => Error } } // [16, const_sig → CONST uident COLON type_ • EQUAL constant, EOF / SEMI] -fn yy_state_820(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_857(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_EQUAL => Shift(yy_state_821) + T_EQUAL => Shift(yy_state_858) _ => Error } } // [16, const_sig → CONST uident COLON type_ EQUAL • constant, EOF / SEMI] -// [193, constant → • TRUE, EOF / SEMI] -// [194, constant → • FALSE, EOF / SEMI] -// [195, constant → • BYTE, EOF / SEMI] -// [196, constant → • BYTES, EOF / SEMI] -// [197, constant → • CHAR, EOF / SEMI] -// [198, constant → • INT, EOF / SEMI] -// [199, constant → • MINUS INT, EOF / SEMI] -// [200, constant → • FLOAT, EOF / SEMI] -// [201, constant → • MINUS FLOAT, EOF / SEMI] -// [202, constant → • DOUBLE, EOF / SEMI] -// [203, constant → • MINUS DOUBLE, EOF / SEMI] -// [204, constant → • STRING, EOF / SEMI] -fn yy_state_821(_lookahead : YYSymbol) -> YYDecision { - match _lookahead { - T_STRING => Shift(yy_state_511) - T_DOUBLE => Shift(yy_state_512) - T_FLOAT => Shift(yy_state_513) - T_MINUS => Shift(yy_state_514) - T_INT => Shift(yy_state_518) - T_CHAR => Shift(yy_state_519) - T_BYTES => Shift(yy_state_520) - T_BYTE => Shift(yy_state_521) - T_FALSE => Shift(yy_state_522) - T_TRUE => Shift(yy_state_523) - NT_constant => Shift(yy_state_822) +// [197, constant → • TRUE, EOF / SEMI] +// [198, constant → • FALSE, EOF / SEMI] +// [199, constant → • BYTE, EOF / SEMI] +// [200, constant → • BYTES, EOF / SEMI] +// [201, constant → • CHAR, EOF / SEMI] +// [202, constant → • INT, EOF / SEMI] +// [203, constant → • MINUS INT, EOF / SEMI] +// [204, constant → • FLOAT, EOF / SEMI] +// [205, constant → • MINUS FLOAT, EOF / SEMI] +// [206, constant → • DOUBLE, EOF / SEMI] +// [207, constant → • MINUS DOUBLE, EOF / SEMI] +// [208, constant → • STRING, EOF / SEMI] +fn yy_state_858(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_STRING => Shift(yy_state_548) + T_DOUBLE => Shift(yy_state_549) + T_FLOAT => Shift(yy_state_550) + T_MINUS => Shift(yy_state_551) + T_INT => Shift(yy_state_555) + T_CHAR => Shift(yy_state_556) + T_BYTES => Shift(yy_state_557) + T_BYTE => Shift(yy_state_558) + T_FALSE => Shift(yy_state_559) + T_TRUE => Shift(yy_state_560) + NT_constant => Shift(yy_state_859) _ => Error } } // [16, const_sig → CONST uident COLON type_ EQUAL constant •, EOF / SEMI] -fn yy_state_822(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_859(_lookahead : YYSymbol) -> YYDecision { ReduceNoLookahead(6, NT_const_sig, yy_action_13) } // [15, sig_ → value_sig •, EOF / SEMI] -fn yy_state_823(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_860(_lookahead : YYSymbol) -> YYDecision { ReduceNoLookahead(1, NT_sig_, yy_action_12) } // [14, sig_ → const_sig •, EOF / SEMI] -fn yy_state_824(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_861(_lookahead : YYSymbol) -> YYDecision { ReduceNoLookahead(1, NT_sig_, yy_action_11) } // [13, sig_ → impl_sig •, EOF / SEMI] -fn yy_state_825(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_862(_lookahead : YYSymbol) -> YYDecision { ReduceNoLookahead(1, NT_sig_, yy_action_10) } // [12, sig_ → trait_sig •, EOF / SEMI] -fn yy_state_826(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_863(_lookahead : YYSymbol) -> YYDecision { ReduceNoLookahead(1, NT_sig_, yy_action_9) } // [11, sig_ → alias_sig •, EOF / SEMI] -fn yy_state_827(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_864(_lookahead : YYSymbol) -> YYDecision { ReduceNoLookahead(1, NT_sig_, yy_action_8) } // [10, sig_ → type_sig •, EOF / SEMI] -fn yy_state_828(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_865(_lookahead : YYSymbol) -> YYDecision { ReduceNoLookahead(1, NT_sig_, yy_action_7) } // [9, sig_ → func_sig •, EOF / SEMI] -fn yy_state_829(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_866(_lookahead : YYSymbol) -> YYDecision { ReduceNoLookahead(1, NT_sig_, yy_action_6) } // [7, sigs → sig_ •, EOF] // [8, sigs → sig_ • SEMI sigs, EOF] -fn yy_state_830(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_867(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_SEMI => Shift(yy_state_831) + T_SEMI => Shift(yy_state_868) T_EOF => Reduce(1, NT_sigs, yy_action_5) _ => Error } @@ -14951,146 +15839,146 @@ fn yy_state_830(_lookahead : YYSymbol) -> YYDecision { // [45, func_sig → • nonempty_list(attribute) PRIV FN loption(type_params_with_constraints) func_name LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type, EOF / SEMI] // [46, func_sig → • nonempty_list(attribute) PUB pub_attr ASYNC FN loption(type_params_with_constraints) func_name LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type, EOF / SEMI] // [47, func_sig → • nonempty_list(attribute) PUB pub_attr FN loption(type_params_with_constraints) func_name LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type, EOF / SEMI] -// [52, type_sig → • TYPE type_decl_name_with_params optional_derive, EOF / SEMI] -// [53, type_sig → • PRIV TYPE type_decl_name_with_params optional_derive, EOF / SEMI] -// [54, type_sig → • PUB pub_attr TYPE type_decl_name_with_params optional_derive, EOF / SEMI] -// [55, type_sig → • nonempty_list(attribute) TYPE type_decl_name_with_params optional_derive, EOF / SEMI] -// [56, type_sig → • nonempty_list(attribute) PRIV TYPE type_decl_name_with_params optional_derive, EOF / SEMI] -// [57, type_sig → • nonempty_list(attribute) PUB pub_attr TYPE type_decl_name_with_params optional_derive, EOF / SEMI] -// [58, type_sig → • SUBERROR uident optional_derive, EOF / SEMI] -// [59, type_sig → • PRIV SUBERROR uident optional_derive, EOF / SEMI] -// [60, type_sig → • PUB pub_attr SUBERROR uident optional_derive, EOF / SEMI] -// [61, type_sig → • nonempty_list(attribute) SUBERROR uident optional_derive, EOF / SEMI] -// [62, type_sig → • nonempty_list(attribute) PRIV SUBERROR uident optional_derive, EOF / SEMI] -// [63, type_sig → • nonempty_list(attribute) PUB pub_attr SUBERROR uident optional_derive, EOF / SEMI] -// [64, type_sig → • SUBERROR uident LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [65, type_sig → • PRIV SUBERROR uident LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [66, type_sig → • PUB pub_attr SUBERROR uident LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [67, type_sig → • nonempty_list(attribute) SUBERROR uident LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [68, type_sig → • nonempty_list(attribute) PRIV SUBERROR uident LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [69, type_sig → • nonempty_list(attribute) PUB pub_attr SUBERROR uident LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [70, type_sig → • STRUCT type_decl_name_with_params LBRACE record_decl_body RBRACE optional_derive, EOF / SEMI] -// [71, type_sig → • PRIV STRUCT type_decl_name_with_params LBRACE record_decl_body RBRACE optional_derive, EOF / SEMI] -// [72, type_sig → • PUB pub_attr STRUCT type_decl_name_with_params LBRACE record_decl_body RBRACE optional_derive, EOF / SEMI] -// [73, type_sig → • nonempty_list(attribute) STRUCT type_decl_name_with_params LBRACE record_decl_body RBRACE optional_derive, EOF / SEMI] -// [74, type_sig → • nonempty_list(attribute) PRIV STRUCT type_decl_name_with_params LBRACE record_decl_body RBRACE optional_derive, EOF / SEMI] -// [75, type_sig → • nonempty_list(attribute) PUB pub_attr STRUCT type_decl_name_with_params LBRACE record_decl_body RBRACE optional_derive, EOF / SEMI] -// [76, type_sig → • STRUCT type_decl_name_with_params LPAREN separated_list(COMMA,type_) RPAREN optional_derive, EOF / SEMI] -// [77, type_sig → • PRIV STRUCT type_decl_name_with_params LPAREN separated_list(COMMA,type_) RPAREN optional_derive, EOF / SEMI] -// [78, type_sig → • PUB pub_attr STRUCT type_decl_name_with_params LPAREN separated_list(COMMA,type_) RPAREN optional_derive, EOF / SEMI] -// [79, type_sig → • nonempty_list(attribute) STRUCT type_decl_name_with_params LPAREN separated_list(COMMA,type_) RPAREN optional_derive, EOF / SEMI] -// [80, type_sig → • nonempty_list(attribute) PRIV STRUCT type_decl_name_with_params LPAREN separated_list(COMMA,type_) RPAREN optional_derive, EOF / SEMI] -// [81, type_sig → • nonempty_list(attribute) PUB pub_attr STRUCT type_decl_name_with_params LPAREN separated_list(COMMA,type_) RPAREN optional_derive, EOF / SEMI] -// [82, type_sig → • ENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [83, type_sig → • PRIV ENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [84, type_sig → • PUB pub_attr ENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [85, type_sig → • nonempty_list(attribute) ENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [86, type_sig → • nonempty_list(attribute) PRIV ENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [87, type_sig → • nonempty_list(attribute) PUB pub_attr ENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [88, type_sig → • EXTENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [89, type_sig → • PRIV EXTENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [90, type_sig → • PUB pub_attr EXTENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [91, type_sig → • nonempty_list(attribute) EXTENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [92, type_sig → • nonempty_list(attribute) PRIV EXTENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [93, type_sig → • nonempty_list(attribute) PUB pub_attr EXTENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [94, type_sig → • EXTENUM extensible_enum_extension_target PLUS_EQUAL LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [95, type_sig → • PRIV EXTENUM extensible_enum_extension_target PLUS_EQUAL LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [96, type_sig → • PUB pub_attr EXTENUM extensible_enum_extension_target PLUS_EQUAL LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [97, type_sig → • nonempty_list(attribute) EXTENUM extensible_enum_extension_target PLUS_EQUAL LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [98, type_sig → • nonempty_list(attribute) PRIV EXTENUM extensible_enum_extension_target PLUS_EQUAL LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [99, type_sig → • nonempty_list(attribute) PUB pub_attr EXTENUM extensible_enum_extension_target PLUS_EQUAL LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [102, impl_sig → • IMPL type_params_with_constraints qualified_uident FOR type_, EOF / SEMI] -// [103, impl_sig → • PRIV IMPL type_params_with_constraints qualified_uident FOR type_, EOF / SEMI] -// [104, impl_sig → • PUB pub_attr IMPL type_params_with_constraints qualified_uident FOR type_, EOF / SEMI] -// [105, impl_sig → • nonempty_list(attribute) IMPL type_params_with_constraints qualified_uident FOR type_, EOF / SEMI] -// [106, impl_sig → • nonempty_list(attribute) PRIV IMPL type_params_with_constraints qualified_uident FOR type_, EOF / SEMI] -// [107, impl_sig → • nonempty_list(attribute) PUB pub_attr IMPL type_params_with_constraints qualified_uident FOR type_, EOF / SEMI] -// [108, impl_sig → • IMPL qualified_uident FOR type_, EOF / SEMI] -// [109, impl_sig → • PRIV IMPL qualified_uident FOR type_, EOF / SEMI] -// [110, impl_sig → • PUB pub_attr IMPL qualified_uident FOR type_, EOF / SEMI] -// [111, impl_sig → • nonempty_list(attribute) IMPL qualified_uident FOR type_, EOF / SEMI] -// [112, impl_sig → • nonempty_list(attribute) PRIV IMPL qualified_uident FOR type_, EOF / SEMI] -// [113, impl_sig → • nonempty_list(attribute) PUB pub_attr IMPL qualified_uident FOR type_, EOF / SEMI] -// [114, trait_sig → • TRAIT uident loption(preceded(COLON,separated_nonempty_list(PLUS,qualified_uident))) trait_body, EOF / SEMI] -// [115, trait_sig → • PRIV TRAIT uident loption(preceded(COLON,separated_nonempty_list(PLUS,qualified_uident))) trait_body, EOF / SEMI] -// [116, trait_sig → • PUB pub_attr TRAIT uident loption(preceded(COLON,separated_nonempty_list(PLUS,qualified_uident))) trait_body, EOF / SEMI] -// [117, trait_sig → • nonempty_list(attribute) TRAIT uident loption(preceded(COLON,separated_nonempty_list(PLUS,qualified_uident))) trait_body, EOF / SEMI] -// [118, trait_sig → • nonempty_list(attribute) PRIV TRAIT uident loption(preceded(COLON,separated_nonempty_list(PLUS,qualified_uident))) trait_body, EOF / SEMI] -// [119, trait_sig → • nonempty_list(attribute) PUB pub_attr TRAIT uident loption(preceded(COLON,separated_nonempty_list(PLUS,qualified_uident))) trait_body, EOF / SEMI] -// [124, alias_sig → • TYPE type_decl_name_with_params EQUAL type_, EOF / SEMI] -// [125, alias_sig → • PRIV TYPE type_decl_name_with_params EQUAL type_, EOF / SEMI] -// [126, alias_sig → • PUB pub_attr TYPE type_decl_name_with_params EQUAL type_, EOF / SEMI] -// [127, alias_sig → • nonempty_list(attribute) TYPE type_decl_name_with_params EQUAL type_, EOF / SEMI] -// [128, alias_sig → • nonempty_list(attribute) PRIV TYPE type_decl_name_with_params EQUAL type_, EOF / SEMI] -// [129, alias_sig → • nonempty_list(attribute) PUB pub_attr TYPE type_decl_name_with_params EQUAL type_, EOF / SEMI] -// [130, alias_sig → • FNALIAS uident COLONCOLON lident, EOF / SEMI] -// [131, alias_sig → • PRIV FNALIAS uident COLONCOLON lident, EOF / SEMI] -// [132, alias_sig → • PUB pub_attr FNALIAS uident COLONCOLON lident, EOF / SEMI] -// [133, alias_sig → • nonempty_list(attribute) FNALIAS uident COLONCOLON lident, EOF / SEMI] -// [134, alias_sig → • nonempty_list(attribute) PRIV FNALIAS uident COLONCOLON lident, EOF / SEMI] -// [135, alias_sig → • nonempty_list(attribute) PUB pub_attr FNALIAS uident COLONCOLON lident, EOF / SEMI] -// [136, alias_sig → • USING PACKAGE_NAME LBRACE TYPE uident using_binder RBRACE, EOF / SEMI] -// [137, alias_sig → • PRIV USING PACKAGE_NAME LBRACE TYPE uident using_binder RBRACE, EOF / SEMI] -// [138, alias_sig → • PUB pub_attr USING PACKAGE_NAME LBRACE TYPE uident using_binder RBRACE, EOF / SEMI] -// [139, alias_sig → • nonempty_list(attribute) USING PACKAGE_NAME LBRACE TYPE uident using_binder RBRACE, EOF / SEMI] -// [140, alias_sig → • nonempty_list(attribute) PRIV USING PACKAGE_NAME LBRACE TYPE uident using_binder RBRACE, EOF / SEMI] -// [141, alias_sig → • nonempty_list(attribute) PUB pub_attr USING PACKAGE_NAME LBRACE TYPE uident using_binder RBRACE, EOF / SEMI] -// [142, alias_sig → • USING PACKAGE_NAME LBRACE TRAIT uident using_binder RBRACE, EOF / SEMI] -// [143, alias_sig → • PRIV USING PACKAGE_NAME LBRACE TRAIT uident using_binder RBRACE, EOF / SEMI] -// [144, alias_sig → • PUB pub_attr USING PACKAGE_NAME LBRACE TRAIT uident using_binder RBRACE, EOF / SEMI] -// [145, alias_sig → • nonempty_list(attribute) USING PACKAGE_NAME LBRACE TRAIT uident using_binder RBRACE, EOF / SEMI] -// [146, alias_sig → • nonempty_list(attribute) PRIV USING PACKAGE_NAME LBRACE TRAIT uident using_binder RBRACE, EOF / SEMI] -// [147, alias_sig → • nonempty_list(attribute) PUB pub_attr USING PACKAGE_NAME LBRACE TRAIT uident using_binder RBRACE, EOF / SEMI] -// [252, nonempty_list(attribute) → • ATTRIBUTE, PUB / PRIV / STRUCT / ENUM / TRAIT / IMPL / ASYNC / FNALIAS / FN / LET / CONST / TYPE / SUBERROR / USING / EXTENUM] -// [253, nonempty_list(attribute) → • ATTRIBUTE nonempty_list(attribute), PUB / PRIV / STRUCT / ENUM / TRAIT / IMPL / ASYNC / FNALIAS / FN / LET / CONST / TYPE / SUBERROR / USING / EXTENUM] -fn yy_state_831(_lookahead : YYSymbol) -> YYDecision { +// [56, type_sig → • TYPE type_decl_name_with_params optional_derive, EOF / SEMI] +// [57, type_sig → • PRIV TYPE type_decl_name_with_params optional_derive, EOF / SEMI] +// [58, type_sig → • PUB pub_attr TYPE type_decl_name_with_params optional_derive, EOF / SEMI] +// [59, type_sig → • nonempty_list(attribute) TYPE type_decl_name_with_params optional_derive, EOF / SEMI] +// [60, type_sig → • nonempty_list(attribute) PRIV TYPE type_decl_name_with_params optional_derive, EOF / SEMI] +// [61, type_sig → • nonempty_list(attribute) PUB pub_attr TYPE type_decl_name_with_params optional_derive, EOF / SEMI] +// [62, type_sig → • SUBERROR uident optional_derive, EOF / SEMI] +// [63, type_sig → • PRIV SUBERROR uident optional_derive, EOF / SEMI] +// [64, type_sig → • PUB pub_attr SUBERROR uident optional_derive, EOF / SEMI] +// [65, type_sig → • nonempty_list(attribute) SUBERROR uident optional_derive, EOF / SEMI] +// [66, type_sig → • nonempty_list(attribute) PRIV SUBERROR uident optional_derive, EOF / SEMI] +// [67, type_sig → • nonempty_list(attribute) PUB pub_attr SUBERROR uident optional_derive, EOF / SEMI] +// [68, type_sig → • SUBERROR uident LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [69, type_sig → • PRIV SUBERROR uident LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [70, type_sig → • PUB pub_attr SUBERROR uident LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [71, type_sig → • nonempty_list(attribute) SUBERROR uident LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [72, type_sig → • nonempty_list(attribute) PRIV SUBERROR uident LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [73, type_sig → • nonempty_list(attribute) PUB pub_attr SUBERROR uident LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [74, type_sig → • STRUCT type_decl_name_with_params LBRACE record_decl_body RBRACE optional_derive, EOF / SEMI] +// [75, type_sig → • PRIV STRUCT type_decl_name_with_params LBRACE record_decl_body RBRACE optional_derive, EOF / SEMI] +// [76, type_sig → • PUB pub_attr STRUCT type_decl_name_with_params LBRACE record_decl_body RBRACE optional_derive, EOF / SEMI] +// [77, type_sig → • nonempty_list(attribute) STRUCT type_decl_name_with_params LBRACE record_decl_body RBRACE optional_derive, EOF / SEMI] +// [78, type_sig → • nonempty_list(attribute) PRIV STRUCT type_decl_name_with_params LBRACE record_decl_body RBRACE optional_derive, EOF / SEMI] +// [79, type_sig → • nonempty_list(attribute) PUB pub_attr STRUCT type_decl_name_with_params LBRACE record_decl_body RBRACE optional_derive, EOF / SEMI] +// [80, type_sig → • STRUCT type_decl_name_with_params LPAREN separated_list(COMMA,type_) RPAREN optional_derive, EOF / SEMI] +// [81, type_sig → • PRIV STRUCT type_decl_name_with_params LPAREN separated_list(COMMA,type_) RPAREN optional_derive, EOF / SEMI] +// [82, type_sig → • PUB pub_attr STRUCT type_decl_name_with_params LPAREN separated_list(COMMA,type_) RPAREN optional_derive, EOF / SEMI] +// [83, type_sig → • nonempty_list(attribute) STRUCT type_decl_name_with_params LPAREN separated_list(COMMA,type_) RPAREN optional_derive, EOF / SEMI] +// [84, type_sig → • nonempty_list(attribute) PRIV STRUCT type_decl_name_with_params LPAREN separated_list(COMMA,type_) RPAREN optional_derive, EOF / SEMI] +// [85, type_sig → • nonempty_list(attribute) PUB pub_attr STRUCT type_decl_name_with_params LPAREN separated_list(COMMA,type_) RPAREN optional_derive, EOF / SEMI] +// [86, type_sig → • ENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [87, type_sig → • PRIV ENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [88, type_sig → • PUB pub_attr ENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [89, type_sig → • nonempty_list(attribute) ENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [90, type_sig → • nonempty_list(attribute) PRIV ENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [91, type_sig → • nonempty_list(attribute) PUB pub_attr ENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [92, type_sig → • EXTENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [93, type_sig → • PRIV EXTENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [94, type_sig → • PUB pub_attr EXTENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [95, type_sig → • nonempty_list(attribute) EXTENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [96, type_sig → • nonempty_list(attribute) PRIV EXTENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [97, type_sig → • nonempty_list(attribute) PUB pub_attr EXTENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [98, type_sig → • EXTENUM extensible_enum_extension_target PLUS_EQUAL LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [99, type_sig → • PRIV EXTENUM extensible_enum_extension_target PLUS_EQUAL LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [100, type_sig → • PUB pub_attr EXTENUM extensible_enum_extension_target PLUS_EQUAL LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [101, type_sig → • nonempty_list(attribute) EXTENUM extensible_enum_extension_target PLUS_EQUAL LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [102, type_sig → • nonempty_list(attribute) PRIV EXTENUM extensible_enum_extension_target PLUS_EQUAL LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [103, type_sig → • nonempty_list(attribute) PUB pub_attr EXTENUM extensible_enum_extension_target PLUS_EQUAL LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [106, impl_sig → • IMPL type_params_with_constraints qualified_uident FOR type_, EOF / SEMI] +// [107, impl_sig → • PRIV IMPL type_params_with_constraints qualified_uident FOR type_, EOF / SEMI] +// [108, impl_sig → • PUB pub_attr IMPL type_params_with_constraints qualified_uident FOR type_, EOF / SEMI] +// [109, impl_sig → • nonempty_list(attribute) IMPL type_params_with_constraints qualified_uident FOR type_, EOF / SEMI] +// [110, impl_sig → • nonempty_list(attribute) PRIV IMPL type_params_with_constraints qualified_uident FOR type_, EOF / SEMI] +// [111, impl_sig → • nonempty_list(attribute) PUB pub_attr IMPL type_params_with_constraints qualified_uident FOR type_, EOF / SEMI] +// [112, impl_sig → • IMPL qualified_uident FOR type_, EOF / SEMI] +// [113, impl_sig → • PRIV IMPL qualified_uident FOR type_, EOF / SEMI] +// [114, impl_sig → • PUB pub_attr IMPL qualified_uident FOR type_, EOF / SEMI] +// [115, impl_sig → • nonempty_list(attribute) IMPL qualified_uident FOR type_, EOF / SEMI] +// [116, impl_sig → • nonempty_list(attribute) PRIV IMPL qualified_uident FOR type_, EOF / SEMI] +// [117, impl_sig → • nonempty_list(attribute) PUB pub_attr IMPL qualified_uident FOR type_, EOF / SEMI] +// [118, trait_sig → • TRAIT uident loption(preceded(COLON,separated_nonempty_list(PLUS,qualified_uident))) trait_body, EOF / SEMI] +// [119, trait_sig → • PRIV TRAIT uident loption(preceded(COLON,separated_nonempty_list(PLUS,qualified_uident))) trait_body, EOF / SEMI] +// [120, trait_sig → • PUB pub_attr TRAIT uident loption(preceded(COLON,separated_nonempty_list(PLUS,qualified_uident))) trait_body, EOF / SEMI] +// [121, trait_sig → • nonempty_list(attribute) TRAIT uident loption(preceded(COLON,separated_nonempty_list(PLUS,qualified_uident))) trait_body, EOF / SEMI] +// [122, trait_sig → • nonempty_list(attribute) PRIV TRAIT uident loption(preceded(COLON,separated_nonempty_list(PLUS,qualified_uident))) trait_body, EOF / SEMI] +// [123, trait_sig → • nonempty_list(attribute) PUB pub_attr TRAIT uident loption(preceded(COLON,separated_nonempty_list(PLUS,qualified_uident))) trait_body, EOF / SEMI] +// [128, alias_sig → • TYPE type_decl_name_with_params EQUAL type_, EOF / SEMI] +// [129, alias_sig → • PRIV TYPE type_decl_name_with_params EQUAL type_, EOF / SEMI] +// [130, alias_sig → • PUB pub_attr TYPE type_decl_name_with_params EQUAL type_, EOF / SEMI] +// [131, alias_sig → • nonempty_list(attribute) TYPE type_decl_name_with_params EQUAL type_, EOF / SEMI] +// [132, alias_sig → • nonempty_list(attribute) PRIV TYPE type_decl_name_with_params EQUAL type_, EOF / SEMI] +// [133, alias_sig → • nonempty_list(attribute) PUB pub_attr TYPE type_decl_name_with_params EQUAL type_, EOF / SEMI] +// [134, alias_sig → • FNALIAS uident COLONCOLON lident, EOF / SEMI] +// [135, alias_sig → • PRIV FNALIAS uident COLONCOLON lident, EOF / SEMI] +// [136, alias_sig → • PUB pub_attr FNALIAS uident COLONCOLON lident, EOF / SEMI] +// [137, alias_sig → • nonempty_list(attribute) FNALIAS uident COLONCOLON lident, EOF / SEMI] +// [138, alias_sig → • nonempty_list(attribute) PRIV FNALIAS uident COLONCOLON lident, EOF / SEMI] +// [139, alias_sig → • nonempty_list(attribute) PUB pub_attr FNALIAS uident COLONCOLON lident, EOF / SEMI] +// [140, alias_sig → • USING PACKAGE_NAME LBRACE TYPE uident using_binder RBRACE, EOF / SEMI] +// [141, alias_sig → • PRIV USING PACKAGE_NAME LBRACE TYPE uident using_binder RBRACE, EOF / SEMI] +// [142, alias_sig → • PUB pub_attr USING PACKAGE_NAME LBRACE TYPE uident using_binder RBRACE, EOF / SEMI] +// [143, alias_sig → • nonempty_list(attribute) USING PACKAGE_NAME LBRACE TYPE uident using_binder RBRACE, EOF / SEMI] +// [144, alias_sig → • nonempty_list(attribute) PRIV USING PACKAGE_NAME LBRACE TYPE uident using_binder RBRACE, EOF / SEMI] +// [145, alias_sig → • nonempty_list(attribute) PUB pub_attr USING PACKAGE_NAME LBRACE TYPE uident using_binder RBRACE, EOF / SEMI] +// [146, alias_sig → • USING PACKAGE_NAME LBRACE TRAIT uident using_binder RBRACE, EOF / SEMI] +// [147, alias_sig → • PRIV USING PACKAGE_NAME LBRACE TRAIT uident using_binder RBRACE, EOF / SEMI] +// [148, alias_sig → • PUB pub_attr USING PACKAGE_NAME LBRACE TRAIT uident using_binder RBRACE, EOF / SEMI] +// [149, alias_sig → • nonempty_list(attribute) USING PACKAGE_NAME LBRACE TRAIT uident using_binder RBRACE, EOF / SEMI] +// [150, alias_sig → • nonempty_list(attribute) PRIV USING PACKAGE_NAME LBRACE TRAIT uident using_binder RBRACE, EOF / SEMI] +// [151, alias_sig → • nonempty_list(attribute) PUB pub_attr USING PACKAGE_NAME LBRACE TRAIT uident using_binder RBRACE, EOF / SEMI] +// [257, nonempty_list(attribute) → • ATTRIBUTE, PUB / PRIV / STRUCT / ENUM / TRAIT / IMPL / ASYNC / FNALIAS / FN / LET / CONST / TYPE / SUBERROR / USING / EXTENUM] +// [258, nonempty_list(attribute) → • ATTRIBUTE nonempty_list(attribute), PUB / PRIV / STRUCT / ENUM / TRAIT / IMPL / ASYNC / FNALIAS / FN / LET / CONST / TYPE / SUBERROR / USING / EXTENUM] +fn yy_state_868(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_ATTRIBUTE => Shift(yy_state_19) T_USING => Shift(yy_state_21) T_FNALIAS => Shift(yy_state_35) - T_TRAIT => Shift(yy_state_40) - T_IMPL => Shift(yy_state_161) - T_EXTENUM => Shift(yy_state_183) - T_ENUM => Shift(yy_state_245) - T_STRUCT => Shift(yy_state_253) - T_SUBERROR => Shift(yy_state_278) - T_TYPE => Shift(yy_state_285) - T_FN => Shift(yy_state_290) - T_ASYNC => Shift(yy_state_309) - T_LET => Shift(yy_state_318) - NT_nonempty_list_attribute_ => Shift(yy_state_322) - T_PUB => Shift(yy_state_626) - T_PRIV => Shift(yy_state_722) - T_CONST => Shift(yy_state_817) - NT_value_sig => Shift(yy_state_823) - NT_const_sig => Shift(yy_state_824) - NT_impl_sig => Shift(yy_state_825) - NT_trait_sig => Shift(yy_state_826) - NT_alias_sig => Shift(yy_state_827) - NT_type_sig => Shift(yy_state_828) - NT_func_sig => Shift(yy_state_829) - NT_sig_ => Shift(yy_state_830) - NT_sigs => Shift(yy_state_832) - T_EOF => Reduce(0, NT_sigs, yy_action_278) + T_TRAIT => Shift(yy_state_41) + T_IMPL => Shift(yy_state_213) + T_EXTENUM => Shift(yy_state_221) + T_ENUM => Shift(yy_state_283) + T_STRUCT => Shift(yy_state_291) + T_SUBERROR => Shift(yy_state_316) + T_TYPE => Shift(yy_state_323) + T_FN => Shift(yy_state_328) + T_ASYNC => Shift(yy_state_346) + T_LET => Shift(yy_state_355) + NT_nonempty_list_attribute_ => Shift(yy_state_359) + T_PUB => Shift(yy_state_663) + T_PRIV => Shift(yy_state_759) + T_CONST => Shift(yy_state_854) + NT_value_sig => Shift(yy_state_860) + NT_const_sig => Shift(yy_state_861) + NT_impl_sig => Shift(yy_state_862) + NT_trait_sig => Shift(yy_state_863) + NT_alias_sig => Shift(yy_state_864) + NT_type_sig => Shift(yy_state_865) + NT_func_sig => Shift(yy_state_866) + NT_sig_ => Shift(yy_state_867) + NT_sigs => Shift(yy_state_869) + T_EOF => Reduce(0, NT_sigs, yy_action_283) _ => Error } } // [8, sigs → sig_ SEMI sigs •, EOF] -fn yy_state_832(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_869(_lookahead : YYSymbol) -> YYDecision { ReduceNoLookahead(3, NT_sigs, yy_action_4) } // [1, mbti → PACKAGE STRING SEMI imports sigs • EOF, $] -fn yy_state_833(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_870(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_EOF => Shift(yy_state_834) + T_EOF => Shift(yy_state_871) _ => Error } } // [1, mbti → PACKAGE STRING SEMI imports sigs EOF •, $] -fn yy_state_834(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_871(_lookahead : YYSymbol) -> YYDecision { ReduceNoLookahead(6, NT_mbti, yy_action_2) } @@ -15129,141 +16017,141 @@ fn yy_state_834(_lookahead : YYSymbol) -> YYDecision { // [45, func_sig → • nonempty_list(attribute) PRIV FN loption(type_params_with_constraints) func_name LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type, EOF / SEMI] // [46, func_sig → • nonempty_list(attribute) PUB pub_attr ASYNC FN loption(type_params_with_constraints) func_name LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type, EOF / SEMI] // [47, func_sig → • nonempty_list(attribute) PUB pub_attr FN loption(type_params_with_constraints) func_name LPAREN separated_list(COMMA,parameter) RPAREN THIN_ARROW return_type, EOF / SEMI] -// [52, type_sig → • TYPE type_decl_name_with_params optional_derive, EOF / SEMI] -// [53, type_sig → • PRIV TYPE type_decl_name_with_params optional_derive, EOF / SEMI] -// [54, type_sig → • PUB pub_attr TYPE type_decl_name_with_params optional_derive, EOF / SEMI] -// [55, type_sig → • nonempty_list(attribute) TYPE type_decl_name_with_params optional_derive, EOF / SEMI] -// [56, type_sig → • nonempty_list(attribute) PRIV TYPE type_decl_name_with_params optional_derive, EOF / SEMI] -// [57, type_sig → • nonempty_list(attribute) PUB pub_attr TYPE type_decl_name_with_params optional_derive, EOF / SEMI] -// [58, type_sig → • SUBERROR uident optional_derive, EOF / SEMI] -// [59, type_sig → • PRIV SUBERROR uident optional_derive, EOF / SEMI] -// [60, type_sig → • PUB pub_attr SUBERROR uident optional_derive, EOF / SEMI] -// [61, type_sig → • nonempty_list(attribute) SUBERROR uident optional_derive, EOF / SEMI] -// [62, type_sig → • nonempty_list(attribute) PRIV SUBERROR uident optional_derive, EOF / SEMI] -// [63, type_sig → • nonempty_list(attribute) PUB pub_attr SUBERROR uident optional_derive, EOF / SEMI] -// [64, type_sig → • SUBERROR uident LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [65, type_sig → • PRIV SUBERROR uident LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [66, type_sig → • PUB pub_attr SUBERROR uident LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [67, type_sig → • nonempty_list(attribute) SUBERROR uident LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [68, type_sig → • nonempty_list(attribute) PRIV SUBERROR uident LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [69, type_sig → • nonempty_list(attribute) PUB pub_attr SUBERROR uident LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [70, type_sig → • STRUCT type_decl_name_with_params LBRACE record_decl_body RBRACE optional_derive, EOF / SEMI] -// [71, type_sig → • PRIV STRUCT type_decl_name_with_params LBRACE record_decl_body RBRACE optional_derive, EOF / SEMI] -// [72, type_sig → • PUB pub_attr STRUCT type_decl_name_with_params LBRACE record_decl_body RBRACE optional_derive, EOF / SEMI] -// [73, type_sig → • nonempty_list(attribute) STRUCT type_decl_name_with_params LBRACE record_decl_body RBRACE optional_derive, EOF / SEMI] -// [74, type_sig → • nonempty_list(attribute) PRIV STRUCT type_decl_name_with_params LBRACE record_decl_body RBRACE optional_derive, EOF / SEMI] -// [75, type_sig → • nonempty_list(attribute) PUB pub_attr STRUCT type_decl_name_with_params LBRACE record_decl_body RBRACE optional_derive, EOF / SEMI] -// [76, type_sig → • STRUCT type_decl_name_with_params LPAREN separated_list(COMMA,type_) RPAREN optional_derive, EOF / SEMI] -// [77, type_sig → • PRIV STRUCT type_decl_name_with_params LPAREN separated_list(COMMA,type_) RPAREN optional_derive, EOF / SEMI] -// [78, type_sig → • PUB pub_attr STRUCT type_decl_name_with_params LPAREN separated_list(COMMA,type_) RPAREN optional_derive, EOF / SEMI] -// [79, type_sig → • nonempty_list(attribute) STRUCT type_decl_name_with_params LPAREN separated_list(COMMA,type_) RPAREN optional_derive, EOF / SEMI] -// [80, type_sig → • nonempty_list(attribute) PRIV STRUCT type_decl_name_with_params LPAREN separated_list(COMMA,type_) RPAREN optional_derive, EOF / SEMI] -// [81, type_sig → • nonempty_list(attribute) PUB pub_attr STRUCT type_decl_name_with_params LPAREN separated_list(COMMA,type_) RPAREN optional_derive, EOF / SEMI] -// [82, type_sig → • ENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [83, type_sig → • PRIV ENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [84, type_sig → • PUB pub_attr ENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [85, type_sig → • nonempty_list(attribute) ENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [86, type_sig → • nonempty_list(attribute) PRIV ENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [87, type_sig → • nonempty_list(attribute) PUB pub_attr ENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [88, type_sig → • EXTENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [89, type_sig → • PRIV EXTENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [90, type_sig → • PUB pub_attr EXTENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [91, type_sig → • nonempty_list(attribute) EXTENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [92, type_sig → • nonempty_list(attribute) PRIV EXTENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [93, type_sig → • nonempty_list(attribute) PUB pub_attr EXTENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [94, type_sig → • EXTENUM extensible_enum_extension_target PLUS_EQUAL LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [95, type_sig → • PRIV EXTENUM extensible_enum_extension_target PLUS_EQUAL LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [96, type_sig → • PUB pub_attr EXTENUM extensible_enum_extension_target PLUS_EQUAL LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [97, type_sig → • nonempty_list(attribute) EXTENUM extensible_enum_extension_target PLUS_EQUAL LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [98, type_sig → • nonempty_list(attribute) PRIV EXTENUM extensible_enum_extension_target PLUS_EQUAL LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [99, type_sig → • nonempty_list(attribute) PUB pub_attr EXTENUM extensible_enum_extension_target PLUS_EQUAL LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] -// [102, impl_sig → • IMPL type_params_with_constraints qualified_uident FOR type_, EOF / SEMI] -// [103, impl_sig → • PRIV IMPL type_params_with_constraints qualified_uident FOR type_, EOF / SEMI] -// [104, impl_sig → • PUB pub_attr IMPL type_params_with_constraints qualified_uident FOR type_, EOF / SEMI] -// [105, impl_sig → • nonempty_list(attribute) IMPL type_params_with_constraints qualified_uident FOR type_, EOF / SEMI] -// [106, impl_sig → • nonempty_list(attribute) PRIV IMPL type_params_with_constraints qualified_uident FOR type_, EOF / SEMI] -// [107, impl_sig → • nonempty_list(attribute) PUB pub_attr IMPL type_params_with_constraints qualified_uident FOR type_, EOF / SEMI] -// [108, impl_sig → • IMPL qualified_uident FOR type_, EOF / SEMI] -// [109, impl_sig → • PRIV IMPL qualified_uident FOR type_, EOF / SEMI] -// [110, impl_sig → • PUB pub_attr IMPL qualified_uident FOR type_, EOF / SEMI] -// [111, impl_sig → • nonempty_list(attribute) IMPL qualified_uident FOR type_, EOF / SEMI] -// [112, impl_sig → • nonempty_list(attribute) PRIV IMPL qualified_uident FOR type_, EOF / SEMI] -// [113, impl_sig → • nonempty_list(attribute) PUB pub_attr IMPL qualified_uident FOR type_, EOF / SEMI] -// [114, trait_sig → • TRAIT uident loption(preceded(COLON,separated_nonempty_list(PLUS,qualified_uident))) trait_body, EOF / SEMI] -// [115, trait_sig → • PRIV TRAIT uident loption(preceded(COLON,separated_nonempty_list(PLUS,qualified_uident))) trait_body, EOF / SEMI] -// [116, trait_sig → • PUB pub_attr TRAIT uident loption(preceded(COLON,separated_nonempty_list(PLUS,qualified_uident))) trait_body, EOF / SEMI] -// [117, trait_sig → • nonempty_list(attribute) TRAIT uident loption(preceded(COLON,separated_nonempty_list(PLUS,qualified_uident))) trait_body, EOF / SEMI] -// [118, trait_sig → • nonempty_list(attribute) PRIV TRAIT uident loption(preceded(COLON,separated_nonempty_list(PLUS,qualified_uident))) trait_body, EOF / SEMI] -// [119, trait_sig → • nonempty_list(attribute) PUB pub_attr TRAIT uident loption(preceded(COLON,separated_nonempty_list(PLUS,qualified_uident))) trait_body, EOF / SEMI] -// [124, alias_sig → • TYPE type_decl_name_with_params EQUAL type_, EOF / SEMI] -// [125, alias_sig → • PRIV TYPE type_decl_name_with_params EQUAL type_, EOF / SEMI] -// [126, alias_sig → • PUB pub_attr TYPE type_decl_name_with_params EQUAL type_, EOF / SEMI] -// [127, alias_sig → • nonempty_list(attribute) TYPE type_decl_name_with_params EQUAL type_, EOF / SEMI] -// [128, alias_sig → • nonempty_list(attribute) PRIV TYPE type_decl_name_with_params EQUAL type_, EOF / SEMI] -// [129, alias_sig → • nonempty_list(attribute) PUB pub_attr TYPE type_decl_name_with_params EQUAL type_, EOF / SEMI] -// [130, alias_sig → • FNALIAS uident COLONCOLON lident, EOF / SEMI] -// [131, alias_sig → • PRIV FNALIAS uident COLONCOLON lident, EOF / SEMI] -// [132, alias_sig → • PUB pub_attr FNALIAS uident COLONCOLON lident, EOF / SEMI] -// [133, alias_sig → • nonempty_list(attribute) FNALIAS uident COLONCOLON lident, EOF / SEMI] -// [134, alias_sig → • nonempty_list(attribute) PRIV FNALIAS uident COLONCOLON lident, EOF / SEMI] -// [135, alias_sig → • nonempty_list(attribute) PUB pub_attr FNALIAS uident COLONCOLON lident, EOF / SEMI] -// [136, alias_sig → • USING PACKAGE_NAME LBRACE TYPE uident using_binder RBRACE, EOF / SEMI] -// [137, alias_sig → • PRIV USING PACKAGE_NAME LBRACE TYPE uident using_binder RBRACE, EOF / SEMI] -// [138, alias_sig → • PUB pub_attr USING PACKAGE_NAME LBRACE TYPE uident using_binder RBRACE, EOF / SEMI] -// [139, alias_sig → • nonempty_list(attribute) USING PACKAGE_NAME LBRACE TYPE uident using_binder RBRACE, EOF / SEMI] -// [140, alias_sig → • nonempty_list(attribute) PRIV USING PACKAGE_NAME LBRACE TYPE uident using_binder RBRACE, EOF / SEMI] -// [141, alias_sig → • nonempty_list(attribute) PUB pub_attr USING PACKAGE_NAME LBRACE TYPE uident using_binder RBRACE, EOF / SEMI] -// [142, alias_sig → • USING PACKAGE_NAME LBRACE TRAIT uident using_binder RBRACE, EOF / SEMI] -// [143, alias_sig → • PRIV USING PACKAGE_NAME LBRACE TRAIT uident using_binder RBRACE, EOF / SEMI] -// [144, alias_sig → • PUB pub_attr USING PACKAGE_NAME LBRACE TRAIT uident using_binder RBRACE, EOF / SEMI] -// [145, alias_sig → • nonempty_list(attribute) USING PACKAGE_NAME LBRACE TRAIT uident using_binder RBRACE, EOF / SEMI] -// [146, alias_sig → • nonempty_list(attribute) PRIV USING PACKAGE_NAME LBRACE TRAIT uident using_binder RBRACE, EOF / SEMI] -// [147, alias_sig → • nonempty_list(attribute) PUB pub_attr USING PACKAGE_NAME LBRACE TRAIT uident using_binder RBRACE, EOF / SEMI] -// [252, nonempty_list(attribute) → • ATTRIBUTE, PUB / PRIV / STRUCT / ENUM / TRAIT / IMPL / ASYNC / FNALIAS / FN / LET / CONST / TYPE / SUBERROR / USING / EXTENUM] -// [253, nonempty_list(attribute) → • ATTRIBUTE nonempty_list(attribute), PUB / PRIV / STRUCT / ENUM / TRAIT / IMPL / ASYNC / FNALIAS / FN / LET / CONST / TYPE / SUBERROR / USING / EXTENUM] -fn yy_state_835(_lookahead : YYSymbol) -> YYDecision { +// [56, type_sig → • TYPE type_decl_name_with_params optional_derive, EOF / SEMI] +// [57, type_sig → • PRIV TYPE type_decl_name_with_params optional_derive, EOF / SEMI] +// [58, type_sig → • PUB pub_attr TYPE type_decl_name_with_params optional_derive, EOF / SEMI] +// [59, type_sig → • nonempty_list(attribute) TYPE type_decl_name_with_params optional_derive, EOF / SEMI] +// [60, type_sig → • nonempty_list(attribute) PRIV TYPE type_decl_name_with_params optional_derive, EOF / SEMI] +// [61, type_sig → • nonempty_list(attribute) PUB pub_attr TYPE type_decl_name_with_params optional_derive, EOF / SEMI] +// [62, type_sig → • SUBERROR uident optional_derive, EOF / SEMI] +// [63, type_sig → • PRIV SUBERROR uident optional_derive, EOF / SEMI] +// [64, type_sig → • PUB pub_attr SUBERROR uident optional_derive, EOF / SEMI] +// [65, type_sig → • nonempty_list(attribute) SUBERROR uident optional_derive, EOF / SEMI] +// [66, type_sig → • nonempty_list(attribute) PRIV SUBERROR uident optional_derive, EOF / SEMI] +// [67, type_sig → • nonempty_list(attribute) PUB pub_attr SUBERROR uident optional_derive, EOF / SEMI] +// [68, type_sig → • SUBERROR uident LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [69, type_sig → • PRIV SUBERROR uident LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [70, type_sig → • PUB pub_attr SUBERROR uident LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [71, type_sig → • nonempty_list(attribute) SUBERROR uident LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [72, type_sig → • nonempty_list(attribute) PRIV SUBERROR uident LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [73, type_sig → • nonempty_list(attribute) PUB pub_attr SUBERROR uident LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [74, type_sig → • STRUCT type_decl_name_with_params LBRACE record_decl_body RBRACE optional_derive, EOF / SEMI] +// [75, type_sig → • PRIV STRUCT type_decl_name_with_params LBRACE record_decl_body RBRACE optional_derive, EOF / SEMI] +// [76, type_sig → • PUB pub_attr STRUCT type_decl_name_with_params LBRACE record_decl_body RBRACE optional_derive, EOF / SEMI] +// [77, type_sig → • nonempty_list(attribute) STRUCT type_decl_name_with_params LBRACE record_decl_body RBRACE optional_derive, EOF / SEMI] +// [78, type_sig → • nonempty_list(attribute) PRIV STRUCT type_decl_name_with_params LBRACE record_decl_body RBRACE optional_derive, EOF / SEMI] +// [79, type_sig → • nonempty_list(attribute) PUB pub_attr STRUCT type_decl_name_with_params LBRACE record_decl_body RBRACE optional_derive, EOF / SEMI] +// [80, type_sig → • STRUCT type_decl_name_with_params LPAREN separated_list(COMMA,type_) RPAREN optional_derive, EOF / SEMI] +// [81, type_sig → • PRIV STRUCT type_decl_name_with_params LPAREN separated_list(COMMA,type_) RPAREN optional_derive, EOF / SEMI] +// [82, type_sig → • PUB pub_attr STRUCT type_decl_name_with_params LPAREN separated_list(COMMA,type_) RPAREN optional_derive, EOF / SEMI] +// [83, type_sig → • nonempty_list(attribute) STRUCT type_decl_name_with_params LPAREN separated_list(COMMA,type_) RPAREN optional_derive, EOF / SEMI] +// [84, type_sig → • nonempty_list(attribute) PRIV STRUCT type_decl_name_with_params LPAREN separated_list(COMMA,type_) RPAREN optional_derive, EOF / SEMI] +// [85, type_sig → • nonempty_list(attribute) PUB pub_attr STRUCT type_decl_name_with_params LPAREN separated_list(COMMA,type_) RPAREN optional_derive, EOF / SEMI] +// [86, type_sig → • ENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [87, type_sig → • PRIV ENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [88, type_sig → • PUB pub_attr ENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [89, type_sig → • nonempty_list(attribute) ENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [90, type_sig → • nonempty_list(attribute) PRIV ENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [91, type_sig → • nonempty_list(attribute) PUB pub_attr ENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [92, type_sig → • EXTENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [93, type_sig → • PRIV EXTENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [94, type_sig → • PUB pub_attr EXTENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [95, type_sig → • nonempty_list(attribute) EXTENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [96, type_sig → • nonempty_list(attribute) PRIV EXTENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [97, type_sig → • nonempty_list(attribute) PUB pub_attr EXTENUM type_decl_name_with_params LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [98, type_sig → • EXTENUM extensible_enum_extension_target PLUS_EQUAL LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [99, type_sig → • PRIV EXTENUM extensible_enum_extension_target PLUS_EQUAL LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [100, type_sig → • PUB pub_attr EXTENUM extensible_enum_extension_target PLUS_EQUAL LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [101, type_sig → • nonempty_list(attribute) EXTENUM extensible_enum_extension_target PLUS_EQUAL LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [102, type_sig → • nonempty_list(attribute) PRIV EXTENUM extensible_enum_extension_target PLUS_EQUAL LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [103, type_sig → • nonempty_list(attribute) PUB pub_attr EXTENUM extensible_enum_extension_target PLUS_EQUAL LBRACE separated_list(SEMI,enum_constructor) RBRACE optional_derive, EOF / SEMI] +// [106, impl_sig → • IMPL type_params_with_constraints qualified_uident FOR type_, EOF / SEMI] +// [107, impl_sig → • PRIV IMPL type_params_with_constraints qualified_uident FOR type_, EOF / SEMI] +// [108, impl_sig → • PUB pub_attr IMPL type_params_with_constraints qualified_uident FOR type_, EOF / SEMI] +// [109, impl_sig → • nonempty_list(attribute) IMPL type_params_with_constraints qualified_uident FOR type_, EOF / SEMI] +// [110, impl_sig → • nonempty_list(attribute) PRIV IMPL type_params_with_constraints qualified_uident FOR type_, EOF / SEMI] +// [111, impl_sig → • nonempty_list(attribute) PUB pub_attr IMPL type_params_with_constraints qualified_uident FOR type_, EOF / SEMI] +// [112, impl_sig → • IMPL qualified_uident FOR type_, EOF / SEMI] +// [113, impl_sig → • PRIV IMPL qualified_uident FOR type_, EOF / SEMI] +// [114, impl_sig → • PUB pub_attr IMPL qualified_uident FOR type_, EOF / SEMI] +// [115, impl_sig → • nonempty_list(attribute) IMPL qualified_uident FOR type_, EOF / SEMI] +// [116, impl_sig → • nonempty_list(attribute) PRIV IMPL qualified_uident FOR type_, EOF / SEMI] +// [117, impl_sig → • nonempty_list(attribute) PUB pub_attr IMPL qualified_uident FOR type_, EOF / SEMI] +// [118, trait_sig → • TRAIT uident loption(preceded(COLON,separated_nonempty_list(PLUS,qualified_uident))) trait_body, EOF / SEMI] +// [119, trait_sig → • PRIV TRAIT uident loption(preceded(COLON,separated_nonempty_list(PLUS,qualified_uident))) trait_body, EOF / SEMI] +// [120, trait_sig → • PUB pub_attr TRAIT uident loption(preceded(COLON,separated_nonempty_list(PLUS,qualified_uident))) trait_body, EOF / SEMI] +// [121, trait_sig → • nonempty_list(attribute) TRAIT uident loption(preceded(COLON,separated_nonempty_list(PLUS,qualified_uident))) trait_body, EOF / SEMI] +// [122, trait_sig → • nonempty_list(attribute) PRIV TRAIT uident loption(preceded(COLON,separated_nonempty_list(PLUS,qualified_uident))) trait_body, EOF / SEMI] +// [123, trait_sig → • nonempty_list(attribute) PUB pub_attr TRAIT uident loption(preceded(COLON,separated_nonempty_list(PLUS,qualified_uident))) trait_body, EOF / SEMI] +// [128, alias_sig → • TYPE type_decl_name_with_params EQUAL type_, EOF / SEMI] +// [129, alias_sig → • PRIV TYPE type_decl_name_with_params EQUAL type_, EOF / SEMI] +// [130, alias_sig → • PUB pub_attr TYPE type_decl_name_with_params EQUAL type_, EOF / SEMI] +// [131, alias_sig → • nonempty_list(attribute) TYPE type_decl_name_with_params EQUAL type_, EOF / SEMI] +// [132, alias_sig → • nonempty_list(attribute) PRIV TYPE type_decl_name_with_params EQUAL type_, EOF / SEMI] +// [133, alias_sig → • nonempty_list(attribute) PUB pub_attr TYPE type_decl_name_with_params EQUAL type_, EOF / SEMI] +// [134, alias_sig → • FNALIAS uident COLONCOLON lident, EOF / SEMI] +// [135, alias_sig → • PRIV FNALIAS uident COLONCOLON lident, EOF / SEMI] +// [136, alias_sig → • PUB pub_attr FNALIAS uident COLONCOLON lident, EOF / SEMI] +// [137, alias_sig → • nonempty_list(attribute) FNALIAS uident COLONCOLON lident, EOF / SEMI] +// [138, alias_sig → • nonempty_list(attribute) PRIV FNALIAS uident COLONCOLON lident, EOF / SEMI] +// [139, alias_sig → • nonempty_list(attribute) PUB pub_attr FNALIAS uident COLONCOLON lident, EOF / SEMI] +// [140, alias_sig → • USING PACKAGE_NAME LBRACE TYPE uident using_binder RBRACE, EOF / SEMI] +// [141, alias_sig → • PRIV USING PACKAGE_NAME LBRACE TYPE uident using_binder RBRACE, EOF / SEMI] +// [142, alias_sig → • PUB pub_attr USING PACKAGE_NAME LBRACE TYPE uident using_binder RBRACE, EOF / SEMI] +// [143, alias_sig → • nonempty_list(attribute) USING PACKAGE_NAME LBRACE TYPE uident using_binder RBRACE, EOF / SEMI] +// [144, alias_sig → • nonempty_list(attribute) PRIV USING PACKAGE_NAME LBRACE TYPE uident using_binder RBRACE, EOF / SEMI] +// [145, alias_sig → • nonempty_list(attribute) PUB pub_attr USING PACKAGE_NAME LBRACE TYPE uident using_binder RBRACE, EOF / SEMI] +// [146, alias_sig → • USING PACKAGE_NAME LBRACE TRAIT uident using_binder RBRACE, EOF / SEMI] +// [147, alias_sig → • PRIV USING PACKAGE_NAME LBRACE TRAIT uident using_binder RBRACE, EOF / SEMI] +// [148, alias_sig → • PUB pub_attr USING PACKAGE_NAME LBRACE TRAIT uident using_binder RBRACE, EOF / SEMI] +// [149, alias_sig → • nonempty_list(attribute) USING PACKAGE_NAME LBRACE TRAIT uident using_binder RBRACE, EOF / SEMI] +// [150, alias_sig → • nonempty_list(attribute) PRIV USING PACKAGE_NAME LBRACE TRAIT uident using_binder RBRACE, EOF / SEMI] +// [151, alias_sig → • nonempty_list(attribute) PUB pub_attr USING PACKAGE_NAME LBRACE TRAIT uident using_binder RBRACE, EOF / SEMI] +// [257, nonempty_list(attribute) → • ATTRIBUTE, PUB / PRIV / STRUCT / ENUM / TRAIT / IMPL / ASYNC / FNALIAS / FN / LET / CONST / TYPE / SUBERROR / USING / EXTENUM] +// [258, nonempty_list(attribute) → • ATTRIBUTE nonempty_list(attribute), PUB / PRIV / STRUCT / ENUM / TRAIT / IMPL / ASYNC / FNALIAS / FN / LET / CONST / TYPE / SUBERROR / USING / EXTENUM] +fn yy_state_872(_lookahead : YYSymbol) -> YYDecision { match _lookahead { T_ATTRIBUTE => Shift(yy_state_19) T_USING => Shift(yy_state_21) T_FNALIAS => Shift(yy_state_35) - T_TRAIT => Shift(yy_state_40) - T_IMPL => Shift(yy_state_161) - T_EXTENUM => Shift(yy_state_183) - T_ENUM => Shift(yy_state_245) - T_STRUCT => Shift(yy_state_253) - T_SUBERROR => Shift(yy_state_278) - T_TYPE => Shift(yy_state_285) - T_FN => Shift(yy_state_290) - T_ASYNC => Shift(yy_state_309) - T_LET => Shift(yy_state_318) - NT_nonempty_list_attribute_ => Shift(yy_state_322) - T_PUB => Shift(yy_state_626) - T_PRIV => Shift(yy_state_722) - T_CONST => Shift(yy_state_817) - NT_value_sig => Shift(yy_state_823) - NT_const_sig => Shift(yy_state_824) - NT_impl_sig => Shift(yy_state_825) - NT_trait_sig => Shift(yy_state_826) - NT_alias_sig => Shift(yy_state_827) - NT_type_sig => Shift(yy_state_828) - NT_func_sig => Shift(yy_state_829) - NT_sig_ => Shift(yy_state_830) - NT_sigs => Shift(yy_state_836) - T_EOF => Reduce(0, NT_sigs, yy_action_278) + T_TRAIT => Shift(yy_state_41) + T_IMPL => Shift(yy_state_213) + T_EXTENUM => Shift(yy_state_221) + T_ENUM => Shift(yy_state_283) + T_STRUCT => Shift(yy_state_291) + T_SUBERROR => Shift(yy_state_316) + T_TYPE => Shift(yy_state_323) + T_FN => Shift(yy_state_328) + T_ASYNC => Shift(yy_state_346) + T_LET => Shift(yy_state_355) + NT_nonempty_list_attribute_ => Shift(yy_state_359) + T_PUB => Shift(yy_state_663) + T_PRIV => Shift(yy_state_759) + T_CONST => Shift(yy_state_854) + NT_value_sig => Shift(yy_state_860) + NT_const_sig => Shift(yy_state_861) + NT_impl_sig => Shift(yy_state_862) + NT_trait_sig => Shift(yy_state_863) + NT_alias_sig => Shift(yy_state_864) + NT_type_sig => Shift(yy_state_865) + NT_func_sig => Shift(yy_state_866) + NT_sig_ => Shift(yy_state_867) + NT_sigs => Shift(yy_state_873) + T_EOF => Reduce(0, NT_sigs, yy_action_283) _ => Error } } // [0, mbti → PACKAGE STRING imports sigs • EOF, $] -fn yy_state_836(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_873(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_EOF => Shift(yy_state_837) + T_EOF => Shift(yy_state_874) _ => Error } } // [0, mbti → PACKAGE STRING imports sigs EOF •, $] -fn yy_state_837(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_874(_lookahead : YYSymbol) -> YYDecision { ReduceNoLookahead(5, NT_mbti, yy_action_0) } @@ -15378,7 +16266,7 @@ fn error(stack : @list.List[YYState], token : Token?, loc : (@basic.Position, @b } go(stack) } - for term in ([(T_CHAR, TK_CHAR), (T_INT, TK_INT), (T_BYTE, TK_BYTE), (T_BYTES, TK_BYTES), (T_FLOAT, TK_FLOAT), (T_DOUBLE, TK_DOUBLE), (T_STRING, TK_STRING), (T_MULTILINE_STRING, TK_MULTILINE_STRING), (T_MULTILINE_INTERP, TK_MULTILINE_INTERP), (T_INTERP, TK_INTERP), (T_REGEX_LITERAL, TK_REGEX_LITERAL), (T_REGEX_INTERP, TK_REGEX_INTERP), (T_ATTRIBUTE, TK_ATTRIBUTE), (T_LIDENT, TK_LIDENT), (T_UIDENT, TK_UIDENT), (T_POST_LABEL, TK_POST_LABEL), (T_COMMENT, TK_COMMENT), (T_NEWLINE, TK_NEWLINE), (T_INFIX1, TK_INFIX1), (T_INFIX2, TK_INFIX2), (T_INFIX3, TK_INFIX3), (T_INFIX4, TK_INFIX4), (T_AUGMENTED_ASSIGNMENT, TK_AUGMENTED_ASSIGNMENT), (T_PLUS_EQUAL, TK_PLUS_EQUAL), (T_EOF, TK_EOF), (T_FALSE, TK_FALSE), (T_TRUE, TK_TRUE), (T_PUB, TK_PUB), (T_PRIV, TK_PRIV), (T_READONLY, TK_READONLY), (T_IMPORT, TK_IMPORT), (T_EXTERN, TK_EXTERN), (T_BREAK, TK_BREAK), (T_CONTINUE, TK_CONTINUE), (T_STRUCT, TK_STRUCT), (T_ENUM, TK_ENUM), (T_TRAIT, TK_TRAIT), (T_DERIVE, TK_DERIVE), (T_IMPL, TK_IMPL), (T_WITH, TK_WITH), (T_RAISE, TK_RAISE), (T_THROW, TK_THROW), (T_TRY, TK_TRY), (T_CATCH, TK_CATCH), (T_ASYNC, TK_ASYNC), (T_TYPEALIAS, TK_TYPEALIAS), (T_TRAITALIAS, TK_TRAITALIAS), (T_FNALIAS, TK_FNALIAS), (T_EQUAL, TK_EQUAL), (T_EQ_TILDE, TK_EQ_TILDE), (T_LPAREN, TK_LPAREN), (T_RPAREN, TK_RPAREN), (T_COMMA, TK_COMMA), (T_MINUS, TK_MINUS), (T_QUESTION, TK_QUESTION), (T_EXCLAMATION, TK_EXCLAMATION), (T_DOT_LIDENT, TK_DOT_LIDENT), (T_DOT_UIDENT, TK_DOT_UIDENT), (T_DOT_INT, TK_DOT_INT), (T_DOT_LPAREN, TK_DOT_LPAREN), (T_COLONCOLON, TK_COLONCOLON), (T_COLON, TK_COLON), (T_SEMI, TK_SEMI), (T_LBRACKET, TK_LBRACKET), (T_PLUS, TK_PLUS), (T_RBRACKET, TK_RBRACKET), (T_UNDERSCORE, TK_UNDERSCORE), (T_BAR, TK_BAR), (T_LBRACE, TK_LBRACE), (T_RBRACE, TK_RBRACE), (T_AMPERAMPER, TK_AMPERAMPER), (T_AMPER, TK_AMPER), (T_CARET, TK_CARET), (T_BARBAR, TK_BARBAR), (T_PACKAGE_NAME, TK_PACKAGE_NAME), (T_AS, TK_AS), (T_PIPE, TK_PIPE), (T_PIPE_LEFT, TK_PIPE_LEFT), (T_LT_PLUS, TK_LT_PLUS), (T_ELSE, TK_ELSE), (T_FN, TK_FN), (T_IF, TK_IF), (T_LET, TK_LET), (T_PROOF_ASSERT, TK_PROOF_ASSERT), (T_PROOF_LET, TK_PROOF_LET), (T_CONST, TK_CONST), (T_MATCH, TK_MATCH), (T_MUTABLE, TK_MUTABLE), (T_TYPE, TK_TYPE), (T_FAT_ARROW, TK_FAT_ARROW), (T_THIN_ARROW, TK_THIN_ARROW), (T_WHILE, TK_WHILE), (T_RETURN, TK_RETURN), (T_DOTDOT, TK_DOTDOT), (T_RANGE_INCLUSIVE, TK_RANGE_INCLUSIVE), (T_RANGE_LT_INCLUSIVE, TK_RANGE_LT_INCLUSIVE), (T_RANGE_EXCLUSIVE, TK_RANGE_EXCLUSIVE), (T_RANGE_INCLUSIVE_REV, TK_RANGE_INCLUSIVE_REV), (T_RANGE_EXCLUSIVE_REV, TK_RANGE_EXCLUSIVE_REV), (T_ELLIPSIS, TK_ELLIPSIS), (T_TEST, TK_TEST), (T_LOOP, TK_LOOP), (T_GUARD, TK_GUARD), (T_DEFER, TK_DEFER), (T_FOR, TK_FOR), (T_IN, TK_IN), (T_IS, TK_IS), (T_SUBERROR, TK_SUBERROR), (T_AND, TK_AND), (T_FORALL, TK_FORALL), (T_EXISTS, TK_EXISTS), (T_IMPLIES, TK_IMPLIES), (T_LETREC, TK_LETREC), (T_USING, TK_USING), (T_DECLARE, TK_DECLARE), (T_NORAISE, TK_NORAISE), (T_NOBREAK, TK_NOBREAK), (T_WHERE, TK_WHERE), (T_ENUMVIEW, TK_ENUMVIEW), (T_EXTENUM, TK_EXTENUM), (T_TRY_QUESTION, TK_TRY_QUESTION), (T_TRY_EXCLAMATION, TK_TRY_EXCLAMATION), (T_LEXMATCH, TK_LEXMATCH), (T_LEXMATCH_QUESTION, TK_LEXMATCH_QUESTION), (T_PACKAGE, TK_PACKAGE)] : Array[(YYSymbol, TokenKind)]) { + for term in ([(T_CHAR, TK_CHAR), (T_INT, TK_INT), (T_BYTE, TK_BYTE), (T_BYTES, TK_BYTES), (T_FLOAT, TK_FLOAT), (T_DOUBLE, TK_DOUBLE), (T_STRING, TK_STRING), (T_MULTILINE_STRING, TK_MULTILINE_STRING), (T_MULTILINE_INTERP, TK_MULTILINE_INTERP), (T_INTERP, TK_INTERP), (T_BYTES_INTERP, TK_BYTES_INTERP), (T_REGEX_LITERAL, TK_REGEX_LITERAL), (T_REGEX_INTERP, TK_REGEX_INTERP), (T_ATTRIBUTE, TK_ATTRIBUTE), (T_LIDENT, TK_LIDENT), (T_UIDENT, TK_UIDENT), (T_POST_LABEL, TK_POST_LABEL), (T_COMMENT, TK_COMMENT), (T_NEWLINE, TK_NEWLINE), (T_INFIX1, TK_INFIX1), (T_INFIX2, TK_INFIX2), (T_INFIX3, TK_INFIX3), (T_INFIX4, TK_INFIX4), (T_AUGMENTED_ASSIGNMENT, TK_AUGMENTED_ASSIGNMENT), (T_PLUS_EQUAL, TK_PLUS_EQUAL), (T_EOF, TK_EOF), (T_FALSE, TK_FALSE), (T_TRUE, TK_TRUE), (T_PUB, TK_PUB), (T_PRIV, TK_PRIV), (T_READONLY, TK_READONLY), (T_IMPORT, TK_IMPORT), (T_EXTERN, TK_EXTERN), (T_BREAK, TK_BREAK), (T_CONTINUE, TK_CONTINUE), (T_STRUCT, TK_STRUCT), (T_ENUM, TK_ENUM), (T_TRAIT, TK_TRAIT), (T_DERIVE, TK_DERIVE), (T_IMPL, TK_IMPL), (T_WITH, TK_WITH), (T_RAISE, TK_RAISE), (T_THROW, TK_THROW), (T_TRY, TK_TRY), (T_CATCH, TK_CATCH), (T_ASYNC, TK_ASYNC), (T_TYPEALIAS, TK_TYPEALIAS), (T_TRAITALIAS, TK_TRAITALIAS), (T_FNALIAS, TK_FNALIAS), (T_EQUAL, TK_EQUAL), (T_EQ_TILDE, TK_EQ_TILDE), (T_LPAREN, TK_LPAREN), (T_RPAREN, TK_RPAREN), (T_COMMA, TK_COMMA), (T_MINUS, TK_MINUS), (T_QUESTION, TK_QUESTION), (T_EXCLAMATION, TK_EXCLAMATION), (T_DOT_LIDENT, TK_DOT_LIDENT), (T_DOT_UIDENT, TK_DOT_UIDENT), (T_DOT_INT, TK_DOT_INT), (T_DOT_LPAREN, TK_DOT_LPAREN), (T_COLONCOLON, TK_COLONCOLON), (T_COLON, TK_COLON), (T_SEMI, TK_SEMI), (T_LBRACKET, TK_LBRACKET), (T_LBRACKET_BAR, TK_LBRACKET_BAR), (T_PLUS, TK_PLUS), (T_RBRACKET, TK_RBRACKET), (T_BAR_RBRACKET, TK_BAR_RBRACKET), (T_UNDERSCORE, TK_UNDERSCORE), (T_BAR, TK_BAR), (T_LBRACE, TK_LBRACE), (T_RBRACE, TK_RBRACE), (T_AMPERAMPER, TK_AMPERAMPER), (T_AMPER, TK_AMPER), (T_CARET, TK_CARET), (T_BARBAR, TK_BARBAR), (T_PACKAGE_NAME, TK_PACKAGE_NAME), (T_AS, TK_AS), (T_PIPE, TK_PIPE), (T_PIPE_LEFT, TK_PIPE_LEFT), (T_LT_PLUS, TK_LT_PLUS), (T_LT_QUESTION, TK_LT_QUESTION), (T_ELSE, TK_ELSE), (T_FN, TK_FN), (T_IF, TK_IF), (T_LET, TK_LET), (T_PROOF_ASSERT, TK_PROOF_ASSERT), (T_PROOF_LET, TK_PROOF_LET), (T_CONST, TK_CONST), (T_MATCH, TK_MATCH), (T_MUTABLE, TK_MUTABLE), (T_TYPE, TK_TYPE), (T_FAT_ARROW, TK_FAT_ARROW), (T_THIN_ARROW, TK_THIN_ARROW), (T_WHILE, TK_WHILE), (T_RETURN, TK_RETURN), (T_DOTDOT, TK_DOTDOT), (T_RANGE_INCLUSIVE, TK_RANGE_INCLUSIVE), (T_RANGE_LT_INCLUSIVE, TK_RANGE_LT_INCLUSIVE), (T_RANGE_EXCLUSIVE, TK_RANGE_EXCLUSIVE), (T_RANGE_INCLUSIVE_REV, TK_RANGE_INCLUSIVE_REV), (T_RANGE_EXCLUSIVE_REV, TK_RANGE_EXCLUSIVE_REV), (T_ELLIPSIS, TK_ELLIPSIS), (T_TEST, TK_TEST), (T_LOOP, TK_LOOP), (T_GUARD, TK_GUARD), (T_DEFER, TK_DEFER), (T_FOR, TK_FOR), (T_IN, TK_IN), (T_IS, TK_IS), (T_SUBERROR, TK_SUBERROR), (T_AND, TK_AND), (T_FORALL, TK_FORALL), (T_EXISTS, TK_EXISTS), (T_IMPLIES, TK_IMPLIES), (T_LETREC, TK_LETREC), (T_USING, TK_USING), (T_DECLARE, TK_DECLARE), (T_NORAISE, TK_NORAISE), (T_NOBREAK, TK_NOBREAK), (T_WHERE, TK_WHERE), (T_ENUMVIEW, TK_ENUMVIEW), (T_EXTENUM, TK_EXTENUM), (T_TRY_QUESTION, TK_TRY_QUESTION), (T_TRY_EXCLAMATION, TK_TRY_EXCLAMATION), (T_LEXMATCH, TK_LEXMATCH), (T_LEXMATCH_QUESTION, TK_LEXMATCH_QUESTION), (T_LEXSCAN, TK_LEXSCAN), (T_EXTEND, TK_EXTEND), (T_PACKAGE, TK_PACKAGE)] : Array[(YYSymbol, TokenKind)]) { try_add(term.0, term.1) } match token { diff --git a/mbti_parser/mbti_parser.mbty b/mbti_parser/mbti_parser.mbty index 6a2b92a4..b95aefd7 100644 --- a/mbti_parser/mbti_parser.mbty +++ b/mbti_parser/mbti_parser.mbty @@ -12,6 +12,7 @@ %token MULTILINE_STRING %token MULTILINE_INTERP %token INTERP +%token BYTES_INTERP %token REGEX_LITERAL %token REGEX_INTERP %token<(String, Option[String], String)> ATTRIBUTE @@ -66,8 +67,10 @@ %token COLON ":" %token SEMI ";" %token LBRACKET "[" +%token LBRACKET_BAR "[|" %token PLUS "+" %token RBRACKET "]" +%token BAR_RBRACKET "|]" %token UNDERSCORE "_" %token BAR "|" %token LBRACE "{" @@ -81,6 +84,7 @@ %token PIPE "|>" %token PIPE_LEFT "<|" %token LT_PLUS "<+" +%token LT_QUESTION " FuncSig ; trait_method_sig -> TraitMethodSig - : attributes is_async lident delimited("(", separated_list(",", parameter), ")") "->" return_type boption(eq_underscore) { - TraitMethodSig::{ attrs : $1, is_async: $2, name: $3, params: $4, return_: $6, has_default: $7} + : attributes is_async "fn" loption(type_params_with_constraints) lident delimited("(", separated_list(",", parameter), ")") "->" return_type boption(eq_underscore) { + TraitMethodSig::{ attrs : $1, is_async: $2, type_params: $4, name: $5, params: $6, return_: $8, has_default: $9} + } + | attributes is_async lident delimited("(", separated_list(",", parameter), ")") "->" return_type boption(eq_underscore) { + TraitMethodSig::{ attrs : $1, is_async: $2, type_params: @list.empty(), name: $3, params: $4, return_: $6, has_default: $7} } ; @@ -310,8 +319,8 @@ constructor_param -> ConstrParam ; record_decl_field -> FieldDecl - : attributes boption("mut") LIDENT ":" type_ { - FieldDecl::{ name: FieldName::{ label: $3, loc : mk_loc($loc($3)) }, vis: Default, mut_: $2, ty: $5, loc: mk_loc($sloc), attrs: $1, doc: DocString::empty() } + : attributes boption("mut") lident ":" type_ { + FieldDecl::{ name: FieldName::{ label: $3.name, loc : $3.loc }, vis: Default, mut_: $2, ty: $5, loc: mk_loc($sloc), attrs: $1, doc: DocString::empty() } } ; @@ -430,7 +439,7 @@ constant -> Constant pub_attr -> String? : { None } | "(" "readonly" ")" { Some("readonly") } - | "(" LIDENT ")" { Some($2) } + | "(" lident ")" { Some($2.name) } ; %inline is_async -> Location? @@ -454,10 +463,11 @@ uident -> Name lident -> Name : LIDENT { Name::{name: $1, loc: mk_loc($sloc)} } + | "extend" { Name::{name: "extend", loc: mk_loc($sloc)} } ; label -> Label - : LIDENT { Label::{name: $1, loc: mk_loc($sloc)} } + : lident { Label::{name: $1.name, loc: $1.loc} } ; post_label -> Label diff --git a/moon.mod b/moon.mod index 805db3fd..074ed2c9 100644 --- a/moon.mod +++ b/moon.mod @@ -1,11 +1,11 @@ name = "moonbitlang/parser" -version = "0.3.7" +version = "0.3.8" import { "moonbitlang/x@0.4.39", - "moonbitlang/lexer@0.3.7", - "moonbitlang/moon_config@0.3.6", + "moonbitlang/lexer@0.3.8", + "moonbitlang/moon_config@0.3.7", "moonbit-community/miniio@0.1.0", "moonbitlang/async@0.19.0", "moonbit-community/prettyprinter@0.4.10", diff --git a/moon_config/moon.mod b/moon_config/moon.mod index 8adcd3bc..548ae88d 100644 --- a/moon_config/moon.mod +++ b/moon_config/moon.mod @@ -1,9 +1,9 @@ name = "moonbitlang/moon_config" -version = "0.3.6" +version = "0.3.7" import { - "moonbitlang/lexer@0.3.7", + "moonbitlang/lexer@0.3.8", } repository = "https://github.com/moonbitlang/parser" diff --git a/syntax/ast.mbt b/syntax/ast.mbt index 73933c2e..82dbcb66 100644 --- a/syntax/ast.mbt +++ b/syntax/ast.mbt @@ -367,6 +367,13 @@ pub(all) struct LexCase { body : Expr } derive(Debug) +///| +pub(all) struct LexScanCase { + pat : LexScanCasePattern + guard_ : Expr? + body : Expr +} derive(Debug) + ///| pub(all) enum RegexPattern { Literal(lit~ : String, loc~ : Location) @@ -376,6 +383,13 @@ pub(all) enum RegexPattern { Alias(pat~ : RegexPattern, binder~ : Binder, loc~ : Location) } derive(Debug) +///| +pub(all) enum LexScanCasePattern { + Pattern(RegexPattern) + Binder(Binder) + Wildcard(loc~ : Location) +} derive(Debug) + ///| pub(all) enum PredicateQuantifierKind { Forall @@ -407,14 +421,19 @@ pub(all) enum Expr { /// -e Unary(op~ : Var, expr~ : Expr, loc~ : Location) /// [e1, e2, e3] - Array(exprs~ : @list.List[Expr], loc~ : Location) + Array(exprs~ : @list.List[Expr], is_iter~ : Bool, loc~ : Location) /// [..arr1, e1, ..arr2, e2] - ArraySpread(elems~ : @list.List[SpreadableElem], loc~ : Location) + ArraySpread( + elems~ : @list.List[SpreadableElem], + is_iter~ : Bool, + loc~ : Location + ) /// `[for x in xs if guard => body]` ListComprehension( kind~ : ListComprehensionKind, guard_~ : Expr?, body~ : Expr, + is_iter~ : Bool, loc~ : Location ) /// e1[e2] @@ -445,6 +464,8 @@ pub(all) enum Expr { MultilineString(elems~ : @list.List[MultilineStringElem], loc~ : Location) /// `"text \{e1}"` Interp(elems~ : @list.List[InterpElem], loc~ : Location) + /// `b"text \{e1}"` + BytesInterp(elems~ : @list.List[InterpElem], loc~ : Location) /// `(expr : Type)` Constraint(expr~ : Expr, ty~ : Type, loc~ : Location) /// `Constructor(e1, e2, e3)` @@ -549,6 +570,12 @@ pub(all) enum Expr { cases~ : @list.List[LexCase], loc~ : Location ) + LexScan( + expr~ : Expr, + match_loc~ : Location, + cases~ : @list.List[LexScanCase], + loc~ : Location + ) /// `let mut binder : Type = expr` LetMut( binder~ : Binder, @@ -634,7 +661,12 @@ pub(all) enum Expr { /// `(expr)` or `{expr}` Group(expr~ : Expr, group~ : Group, loc~ : Location) /// `expr <+ template` - TemplateWriting(expr~ : Expr, template~ : Expr, loc~ : Location) + TemplateWriting( + expr~ : Expr, + template~ : Expr, + is_conditional~ : Bool, + loc~ : Location + ) /// generated by compiler StaticAssert(asserts~ : @list.List[StaticAssertion], body~ : Expr) } derive(Debug) @@ -865,6 +897,7 @@ pub(all) enum Impl { trait_~ : TypeName, method_name~ : Binder, quantifiers~ : @list.List[TypeVarBinder], + method_quantifiers~ : @list.List[TypeVarBinder], params~ : Parameters, ret_ty~ : Type?, err_ty~ : ErrorType, diff --git a/syntax/ast_json_repr.mbt b/syntax/ast_json_repr.mbt index 2020d17f..f9d73a0a 100644 --- a/syntax/ast_json_repr.mbt +++ b/syntax/ast_json_repr.mbt @@ -402,7 +402,7 @@ pub fn Expr::json_repr(self : Expr) -> Json { "op": op.json_repr(), "expr": expr.json_repr(), }) - Array(exprs~, loc~) => + Array(exprs~, is_iter~, loc~) => tagged_node("Expr::Array", loc, { "exprs": list_json_repr( "Expr::Array::ExprList", @@ -410,8 +410,9 @@ pub fn Expr::json_repr(self : Expr) -> Json { exprs, Expr::json_repr, ), + "is_iter": Json::boolean(is_iter), }) - ArraySpread(elems~, loc~) => + ArraySpread(elems~, is_iter~, loc~) => tagged_node("Expr::ArraySpread", loc, { "elems": list_json_repr( "Expr::ArraySpread::ElemList", @@ -419,10 +420,11 @@ pub fn Expr::json_repr(self : Expr) -> Json { elems, SpreadableElem::json_repr, ), + "is_iter": Json::boolean(is_iter), }) - ListComprehension(kind~, guard_~, body~, loc~) => + ListComprehension(kind~, guard_~, body~, is_iter~, loc~) => tagged_node("Expr::ListComprehension", loc, { - "kind": kind.json_repr(loc), + "kind": kind.json_repr(loc, is_iter~), "guard": option_json_repr(guard_, Expr::json_repr), "body": body.json_repr(), }) @@ -471,6 +473,15 @@ pub fn Expr::json_repr(self : Expr) -> Json { InterpElem::json_repr, ), }) + BytesInterp(elems~, loc~) => + tagged_node("Expr::BytesInterp", loc, { + "elems": list_json_repr( + "Expr::BytesInterp::ElemList", + loc, + elems, + InterpElem::json_repr, + ), + }) Constraint(expr~, ty~, loc~) => tagged_node("Expr::Constraint", loc, { "expr": expr.json_repr(), @@ -666,6 +677,17 @@ pub fn Expr::json_repr(self : Expr) -> Json { }), }) } + LexScan(expr~, match_loc~, cases~, loc~) => { + ignore(match_loc) + tagged_node("Expr::Lexscan", loc, { + "expr": expr.json_repr(), + "cases": list_json_repr("Expr::Lexscan::CaseList", loc, cases, fn( + case, + ) { + case.json_repr(loc) + }), + }) + } LetMut(binder~, ty~, expr~, body~, loc~) => tagged_node("Expr::LetMut", loc, { "binder": binder.json_repr(), @@ -868,11 +890,11 @@ pub fn Expr::json_repr(self : Expr) -> Json { "expr": expr.json_repr(), "group": group.json_repr(loc), }) - TemplateWriting(expr~, template~, loc~) => + TemplateWriting(expr~, template~, is_conditional~, loc~) => tagged_node("Expr::TemplateWriting", loc, { "expr": expr.json_repr(), "template": template.json_repr(), - "loc": loc.to_json(), + "is_conditional": Json::boolean(is_conditional), }) StaticAssert(asserts~, body~) => { let loc = body.loc() @@ -1604,6 +1626,29 @@ fn LexCase::json_repr(self : LexCase, loc : Location) -> Json { }) } +///| +fn LexScanCase::json_repr(self : LexScanCase, loc : Location) -> Json { + tagged_node("LexscanCase", loc, { + "pat": self.pat.json_repr(loc), + "guard": option_json_repr(self.guard_, Expr::json_repr), + "body": self.body.json_repr(), + }) +} + +///| +fn LexScanCasePattern::json_repr( + self : LexScanCasePattern, + loc : Location, +) -> Json { + match self { + Pattern(pat) => + tagged_node1("LexscanCasePattern::Pattern", loc, pat.json_repr()) + Binder(binder) => + tagged_node1("LexscanCasePattern::Binder", loc, binder.json_repr()) + Wildcard(loc~) => tagged_node0("LexscanCasePattern::Wildcard", loc) + } +} + ///| fn LexTopPattern::json_repr(self : LexTopPattern, loc : Location) -> Json { match self { @@ -1687,6 +1732,7 @@ fn PredicateQuantifierKind::json_repr(self : PredicateQuantifierKind) -> Json { fn ListComprehensionKind::json_repr( self : ListComprehensionKind, loc : Location, + is_iter~ : Bool, ) -> Json { match self { Foreach(binders~, expr~, init~, continue_block~) => @@ -1716,6 +1762,7 @@ fn ListComprehensionKind::json_repr( }) }, ), + "is_iter": Json::boolean(is_iter), }) For(binders~, condition~, continue_block~, for_loc~) => { ignore(for_loc) @@ -1742,6 +1789,7 @@ fn ListComprehensionKind::json_repr( }) }, ), + "is_iter": Json::boolean(is_iter), }) } } @@ -1850,6 +1898,7 @@ pub fn Impl::json_repr(self : Impl) -> Json { trait_~, method_name~, quantifiers~, + method_quantifiers~, params~, ret_ty~, err_ty~, @@ -1870,6 +1919,12 @@ pub fn Impl::json_repr(self : Impl) -> Json { quantifiers, TypeVarBinder::json_repr, ), + "method_quantifiers": list_json_repr( + "Impl::TopImpl::MethodQuantifierList", + loc, + method_quantifiers, + TypeVarBinder::json_repr, + ), "params": list_json_repr( "Impl::TopImpl::ParamList", loc, diff --git a/syntax/ast_test.mbt b/syntax/ast_test.mbt index 97f42809..848dc9d8 100644 --- a/syntax/ast_test.mbt +++ b/syntax/ast_test.mbt @@ -9,7 +9,7 @@ let null : Json = Json::null() ///| let dummy_docstring : @syntax.DocString = { - content: @list.from_array(["Test documentation"]), + content: @list.List(["Test documentation"]), loc: dummy_loc, } @@ -22,12 +22,12 @@ test "impl variants to_json" { let type_decl = @syntax.TypeDecl::{ tycon: "TestType", tycon_loc: dummy_loc, - params: @list.from_array([]), + params: @list.List([]), components: @syntax.Abstract, - attrs: @list.from_array([]), + attrs: @list.List([]), doc: dummy_docstring, type_vis: @syntax.Default, - deriving: @list.from_array([]), + deriving: @list.List([]), loc: dummy_loc, is_declare: false, } @@ -37,7 +37,7 @@ test "impl variants to_json" { id: @syntax.LongIdent::Ident(name="Int"), loc: dummy_loc, }, - tys=@list.from_array([]), + tys=@list.List([]), loc=dummy_loc, ) json_inspect( @@ -68,7 +68,7 @@ test "impl variants to_json" { params=None, is_async=None, loc=dummy_loc, - attrs=@list.from_array([]), + attrs=@list.List([]), doc=dummy_docstring, ).json_repr(), content={ @@ -143,11 +143,11 @@ test "impl variants to_json" { is_async: None, decl_params: None, params_loc: dummy_loc, - quantifiers: @list.from_array([]), + quantifiers: @list.List([]), return_type: None, error_type: @syntax.NoErrorType, vis: @syntax.Default, - attrs: @list.from_array([]), + attrs: @list.List([]), doc: dummy_docstring, loc: dummy_loc, } @@ -223,7 +223,7 @@ test "impl variants to_json" { vis=@syntax.Default, is_constant=true, loc=dummy_loc, - attrs=@list.from_array([]), + attrs=@list.List([]), doc=dummy_docstring, is_declare=false, ).json_repr(), @@ -401,7 +401,7 @@ test "expr basic types to_json" { json_inspect( @syntax.Expr::Apply( func=unit_expr, - args=@list.from_array([argument]), + args=@list.List([argument]), loc=dummy_loc, ).json_repr(), content={ @@ -495,7 +495,11 @@ test "expr basic types to_json" { }, ) json_inspect( - @syntax.Expr::Array(exprs=@list.from_array([unit_expr]), loc=dummy_loc).json_repr(), + @syntax.Expr::Array( + exprs=@list.List([unit_expr]), + is_iter=false, + loc=dummy_loc, + ).json_repr(), content={ "kind": "Expr::Array", "loc": null, @@ -511,12 +515,17 @@ test "expr basic types to_json" { }, ], }, + "is_iter": false, }, }, ) let spread_elem = @syntax.SpreadableElem::Regular(unit_expr) json_inspect( - @syntax.ArraySpread(elems=@list.from_array([spread_elem]), loc=dummy_loc).json_repr(), + @syntax.ArraySpread( + elems=@list.List([spread_elem]), + is_iter=false, + loc=dummy_loc, + ).json_repr(), content={ "kind": "Expr::ArraySpread", "loc": null, @@ -538,6 +547,7 @@ test "expr basic types to_json" { }, ], }, + "is_iter": false, }, }, ) @@ -561,10 +571,7 @@ test "expr basic types to_json" { }, ) json_inspect( - @syntax.Expr::Tuple( - exprs=@list.from_array([unit_expr, unit_expr]), - loc=dummy_loc, - ).json_repr(), + @syntax.Expr::Tuple(exprs=@list.List([unit_expr, unit_expr]), loc=dummy_loc).json_repr(), content={ "kind": "Expr::Tuple", "loc": null, @@ -648,11 +655,7 @@ test "expr basic types to_json" { }, ) json_inspect( - @syntax.Continue( - args=@list.from_array([unit_expr]), - label=None, - loc=dummy_loc, - ).json_repr(), + @syntax.Continue(args=@list.List([unit_expr]), label=None, loc=dummy_loc).json_repr(), content={ "kind": "Expr::Continue", "loc": null, @@ -682,7 +685,7 @@ test "expr complex types to_json" { id: @syntax.LongIdent::Ident(name="Int"), loc: dummy_loc, }, - tys=@list.from_array([]), + tys=@list.List([]), loc=dummy_loc, ) let binder = @syntax.Binder::{ name: "test_binder", loc: dummy_loc } @@ -879,7 +882,7 @@ test "expr complex types to_json" { ) json_inspect( @syntax.Expr::Sequence( - exprs=@list.from_array([unit_expr]), + exprs=@list.List([unit_expr]), last_expr=unit_expr, loc=dummy_loc, ).json_repr(), @@ -909,7 +912,7 @@ test "expr complex types to_json" { json_inspect( @syntax.Expr::Record( type_name=Some(type_name), - fields=@list.from_array([field_def]), + fields=@list.List([field_def]), trailing=@syntax.TrailingMark::Comma, loc=dummy_loc, ).json_repr(), @@ -988,7 +991,7 @@ test "expr complex types to_json" { json_inspect( @syntax.Expr::Match( expr=unit_expr, - cases=@list.from_array([case]), + cases=@list.List([case]), match_loc=dummy_loc, loc=dummy_loc, ).json_repr(), @@ -1094,10 +1097,10 @@ test "foreach json includes empty continue block" { let unit_expr = @syntax.Expr::Unit(loc=dummy_loc, faked=false) json_inspect( @syntax.ForEach( - binders=@list.from_array([]), + binders=@list.List([]), expr=unit_expr, - init=@list.from_array([]), - continue_block=@list.from_array([]), + init=@list.List([]), + continue_block=@list.List([]), body=unit_expr, else_block=None, where_clause=None, diff --git a/syntax/ast_wbtest.mbt b/syntax/ast_wbtest.mbt index 290ea562..ff05bb61 100644 --- a/syntax/ast_wbtest.mbt +++ b/syntax/ast_wbtest.mbt @@ -21,7 +21,7 @@ let dummy_char_literal : @tokens.CharLiteral = "'A'" ///| let dummy_docstring : DocString = { - content: @list.from_array(["Test documentation"]), + content: @list.List(["Test documentation"]), loc: dummy_loc, } @@ -214,7 +214,7 @@ test "error_type to_json" { ) let int_type = Name( constr_id=ConstrId::{ id: LongIdent::Ident(name="Int"), loc: dummy_loc }, - tys=@list.from_array([]), + tys=@list.List([]), loc=dummy_loc, ) json_inspect(ErrorType(ty=int_type).json_repr(dummy_loc), content={ @@ -271,7 +271,7 @@ test "error_type to_json" { test "type to_json" { let int_type = Name( constr_id=ConstrId::{ id: LongIdent::Ident(name="Int"), loc: dummy_loc }, - tys=@list.from_array([]), + tys=@list.List([]), loc=dummy_loc, ) json_inspect(Type::Any(loc=dummy_loc).json_repr(), content={ @@ -281,7 +281,7 @@ test "type to_json" { }) json_inspect( Type::Arrow( - args=@list.from_array([int_type]), + args=@list.List([int_type]), res=int_type, err=NoErrorType, is_async=None, @@ -347,7 +347,7 @@ test "type to_json" { }, ) json_inspect( - Type::Tuple(tys=@list.from_array([int_type]), loc=dummy_loc).json_repr(), + Type::Tuple(tys=@list.List([int_type]), loc=dummy_loc).json_repr(), content={ "kind": "Type::Tuple", "loc": null, @@ -726,40 +726,37 @@ test "exception_decl to_json" { attrs: @list.empty(), doc: dummy_docstring, } - json_inspect( - EnumPayload(@list.from_array([constr_decl])).json_repr(dummy_loc), - content={ - "kind": "ExceptionDecl::EnumPayload", - "loc": null, - "children": { - "value": { - "kind": "ExceptionDecl::EnumPayload::ConstrList", - "loc": null, - "children": [ - { - "kind": "ConstrDecl", - "loc": null, - "children": { - "name": { - "kind": "ConstrName", - "loc": null, - "children": { "name": "TestConstr" }, - }, - "args": null, - "tag": null, - "attrs": { - "kind": "ConstrDecl::AttrList", - "loc": null, - "children": [], - }, - "doc": "Test documentation", + json_inspect(EnumPayload(@list.List([constr_decl])).json_repr(dummy_loc), content={ + "kind": "ExceptionDecl::EnumPayload", + "loc": null, + "children": { + "value": { + "kind": "ExceptionDecl::EnumPayload::ConstrList", + "loc": null, + "children": [ + { + "kind": "ConstrDecl", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { "name": "TestConstr" }, }, + "args": null, + "tag": null, + "attrs": { + "kind": "ConstrDecl::AttrList", + "loc": null, + "children": [], + }, + "doc": "Test documentation", }, - ], - }, + }, + ], }, }, - ) + }) } ///| @@ -771,7 +768,7 @@ test "type_desc to_json" { }) let int_type = Name( constr_id=ConstrId::{ id: LongIdent::Ident(name="Int"), loc: dummy_loc }, - tys=@list.from_array([]), + tys=@list.List([]), loc=dummy_loc, ) json_inspect(Error(NoPayload).json_repr(dummy_loc), content={ @@ -907,7 +904,7 @@ test "array_pattern to_json" { ///| test "array_patterns to_json" { let any_pattern = ArrayPattern::Pattern(Pattern::Any(loc=dummy_loc)) - json_inspect(Closed(@list.from_array([any_pattern])).json_repr(dummy_loc), content={ + json_inspect(Closed(@list.List([any_pattern])).json_repr(dummy_loc), content={ "kind": "ArrayPatterns::Closed", "loc": null, "children": { @@ -927,11 +924,9 @@ test "array_patterns to_json" { }, }) json_inspect( - Open( - @list.from_array([any_pattern]), - @list.from_array([any_pattern]), - Underscore, - ).json_repr(dummy_loc), + Open(@list.List([any_pattern]), @list.List([any_pattern]), Underscore).json_repr( + dummy_loc, + ), content={ "kind": "ArrayPatterns::Open", "loc": null, @@ -976,7 +971,7 @@ test "embedded_code to_json" { "children": { "value": "test_string" }, }) json_inspect( - CodeMultilineString(@list.from_array(["line1", "line2", "line3"])).json_repr( + CodeMultilineString(@list.List(["line1", "line2", "line3"])).json_repr( dummy_loc, ), content={ @@ -1053,7 +1048,7 @@ test "parameter to_json" { let binder = Binder::{ name: "param", loc: dummy_loc } let int_type = Name( constr_id=ConstrId::{ id: LongIdent::Ident(name="Int"), loc: dummy_loc }, - tys=@list.from_array([]), + tys=@list.List([]), loc=dummy_loc, ) let unit_expr = Expr::Unit(loc=dummy_loc, faked=false) @@ -1284,9 +1279,7 @@ test "multiline_string_elem to_json" { }, ) json_inspect( - MultilineStringElem::Interp(@list.from_array([interp_elem])).json_repr( - dummy_loc, - ), + MultilineStringElem::Interp(@list.List([interp_elem])).json_repr(dummy_loc), content={ "kind": "MultilineString::Interp", "loc": null, @@ -1466,7 +1459,7 @@ test "case to_json" { test "static_assertion to_json" { let int_type = Name( constr_id=ConstrId::{ id: LongIdent::Ident(name="Int"), loc: dummy_loc }, - tys=@list.from_array([]), + tys=@list.List([]), loc=dummy_loc, ) let assertion = StaticAssertion::{ @@ -1513,14 +1506,14 @@ test "func to_json" { let unit_expr = Expr::Unit(loc=dummy_loc, faked=false) let int_type = Name( constr_id=ConstrId::{ id: LongIdent::Ident(name="Int"), loc: dummy_loc }, - tys=@list.from_array([]), + tys=@list.List([]), loc=dummy_loc, ) let param = Parameter::Positional(binder~, ty=Some(int_type)) // let any_pattern = Pattern::Any(loc=dummy_loc) json_inspect( Func::{ - parameters: @list.from_array([param]), + parameters: @list.List([param]), params_loc: dummy_loc, body: unit_expr, return_type: Some(int_type), @@ -1620,7 +1613,7 @@ test "pattern to_json" { let constant_pattern = Pattern::Constant(c=int_constant, loc=dummy_loc) let int_type = Name( constr_id=ConstrId::{ id: LongIdent::Ident(name="Int"), loc: dummy_loc }, - tys=@list.from_array([]), + tys=@list.List([]), loc=dummy_loc, ) let constr_name = ConstrName::{ name: "TestConstructor", loc: dummy_loc } @@ -1647,7 +1640,7 @@ test "pattern to_json" { pat: any_pattern, kind: ArgumentKind::Positional, } - let array_patterns = ArrayPatterns::Closed(@list.from_array([])) + let array_patterns = ArrayPatterns::Closed(@list.List([])) json_inspect( Pattern::Alias(pat=any_pattern, alias_=binder, loc=dummy_loc).json_repr(), content={ @@ -1726,7 +1719,7 @@ test "pattern to_json" { json_inspect( Pattern::Constr( constr~, - args=Some(@list.from_array([constr_pat_arg])), + args=Some(@list.List([constr_pat_arg])), is_open=false, loc=dummy_loc, ).json_repr(), @@ -1822,7 +1815,7 @@ test "pattern to_json" { ) json_inspect( Pattern::Tuple( - pats=@list.from_array([any_pattern, constant_pattern]), + pats=@list.List([any_pattern, constant_pattern]), loc=dummy_loc, ).json_repr(), content={ @@ -1852,7 +1845,7 @@ test "pattern to_json" { ) json_inspect( Pattern::Record( - fields=@list.from_array([field_pat]), + fields=@list.List([field_pat]), is_closed=true, loc=dummy_loc, ).json_repr(), @@ -1888,11 +1881,7 @@ test "pattern to_json" { }, ) json_inspect( - Pattern::Map( - elems=@list.from_array([map_elem]), - is_closed=false, - loc=dummy_loc, - ).json_repr(), + Pattern::Map(elems=@list.List([map_elem]), is_closed=false, loc=dummy_loc).json_repr(), content={ "kind": "Pattern::Map", "loc": null, @@ -1959,7 +1948,7 @@ test "field_decl to_json" { let field_name = FieldName::{ label: "test_field", loc: dummy_loc } let int_type = Name( constr_id=ConstrId::{ id: LongIdent::Ident(name="Int"), loc: dummy_loc }, - tys=@list.from_array([]), + tys=@list.List([]), loc=dummy_loc, ) let field_decl = FieldDecl::{ @@ -2010,7 +1999,7 @@ test "field_decl to_json" { test "constr_param to_json" { let int_type = Name( constr_id=ConstrId::{ id: LongIdent::Ident(name="Int"), loc: dummy_loc }, - tys=@list.from_array([]), + tys=@list.List([]), loc=dummy_loc, ) let label = Label::{ name: "test_label", loc: dummy_loc } @@ -2087,14 +2076,14 @@ test "constr_decl to_json" { let constr_name = ConstrName::{ name: "TestConstructor", loc: dummy_loc } let int_type = Name( constr_id=ConstrId::{ id: LongIdent::Ident(name="Int"), loc: dummy_loc }, - tys=@list.from_array([]), + tys=@list.List([]), loc=dummy_loc, ) let label = Label::{ name: "test_label", loc: dummy_loc } let param = ConstrParam::{ ty: int_type, mut_: false, label: Some(label) } let constr_with_args = ConstrDecl::{ name: constr_name, - args: Some(@list.from_array([param])), + args: Some(@list.List([param])), tag: Some(("tag_value", dummy_loc)), loc: dummy_loc, attrs: @list.empty(), @@ -2210,7 +2199,7 @@ test "type_var_binder to_json" { } let type_var_binder = TypeVarBinder::{ name: "T", - constraints: @list.from_array([constraint]), + constraints: @list.List([constraint]), name_loc: dummy_loc, } json_inspect(type_var_binder.json_repr(), content={ @@ -2383,7 +2372,7 @@ test "deriving_directive to_json" { is_object: true, loc: dummy_loc, }, - args: @list.from_array([argument]), + args: @list.List([argument]), loc: dummy_loc, } json_inspect(deriving_directive.json_repr(), content={ @@ -2434,12 +2423,12 @@ test "type_decl to_json" { let type_decl = TypeDecl::{ tycon: "TestType", tycon_loc: dummy_loc, - params: @list.from_array([type_decl_binder]), + params: @list.List([type_decl_binder]), components: Abstract, - attrs: @list.from_array([dummy_attribute]), + attrs: @list.List([dummy_attribute]), doc: dummy_docstring, type_vis: Default, - deriving: @list.from_array([]), + deriving: @list.List([]), loc: dummy_loc, is_declare: false, } @@ -2538,7 +2527,7 @@ test "fun_decl to_json" { } let int_type = Name( constr_id=ConstrId::{ id: LongIdent::Ident(name="Int"), loc: dummy_loc }, - tys=@list.from_array([]), + tys=@list.List([]), loc=dummy_loc, ) let param = Parameter::Positional(binder~, ty=Some(int_type)) @@ -2548,20 +2537,20 @@ test "fun_decl to_json" { } let type_var_binder = TypeVarBinder::{ name: "T", - constraints: @list.from_array([type_var_constraint]), + constraints: @list.List([type_var_constraint]), name_loc: dummy_loc, } let fun_decl = FunDecl::{ type_name: Some(type_name), name: binder, is_async: Some(dummy_loc), - decl_params: Some(@list.from_array([param])), + decl_params: Some(@list.List([param])), params_loc: dummy_loc, - quantifiers: @list.from_array([type_var_binder]), + quantifiers: @list.List([type_var_binder]), return_type: Some(int_type), error_type: NoErrorType, vis: Priv(loc=dummy_loc), - attrs: @list.from_array([dummy_attribute]), + attrs: @list.List([dummy_attribute]), doc: dummy_docstring, loc: dummy_loc, } @@ -2702,20 +2691,20 @@ test "trait_method_decl to_json" { let binder = Binder::{ name: "trait_method", loc: dummy_loc } let int_type = Name( constr_id=ConstrId::{ id: LongIdent::Ident(name="Int"), loc: dummy_loc }, - tys=@list.from_array([]), + tys=@list.List([]), loc=dummy_loc, ) let param = Parameter::Positional(binder~, ty=Some(int_type)) let type_var_binder = TypeVarBinder::{ name: "T", - constraints: @list.from_array([]), + constraints: @list.List([]), name_loc: dummy_loc, } let trait_method = TraitMethodDecl::{ name: binder, is_async: None, - quantifiers: @list.from_array([type_var_binder]), - params: @list.from_array([param]), + quantifiers: @list.List([type_var_binder]), + params: @list.List([param]), return_type: Some(int_type), error_type: ErrorType::DefaultErrorType(loc=dummy_loc), has_default: Some(dummy_loc), @@ -2838,8 +2827,8 @@ test "trait_decl to_json" { let trait_method = TraitMethodDecl::{ name: method_binder, is_async: None, - quantifiers: @list.from_array([]), - params: @list.from_array([]), + quantifiers: @list.List([]), + params: @list.List([]), return_type: None, error_type: NoErrorType, has_default: None, @@ -2848,11 +2837,11 @@ test "trait_decl to_json" { } let trait_decl = TraitDecl::{ name: trait_binder, - supers: @list.from_array([super_constraint]), - methods: @list.from_array([trait_method]), + supers: @list.List([super_constraint]), + methods: @list.List([trait_method]), vis: Pub(attr=None, loc=dummy_loc), loc: dummy_loc, - attrs: @list.from_array([dummy_attribute]), + attrs: @list.List([dummy_attribute]), doc: dummy_docstring, is_declare: false, } diff --git a/syntax/iter_visitor.mbt b/syntax/iter_visitor.mbt index 2ac1e83b..4293577a 100644 --- a/syntax/iter_visitor.mbt +++ b/syntax/iter_visitor.mbt @@ -410,6 +410,7 @@ pub(open) trait IterVisitor { trait_~ : TypeName, method_name~ : Binder, quantifiers~ : @list.List[TypeVarBinder], + method_quantifiers~ : @list.List[TypeVarBinder], params~ : Parameters, ret_ty~ : Type?, err_ty~ : ErrorType, @@ -475,10 +476,16 @@ pub(open) trait IterVisitor { loc~ : Location, ) -> Unit = _ fn visit_Expr_Unary(Self, op~ : Var, expr~ : Expr, loc~ : Location) -> Unit = _ - fn visit_Expr_Array(Self, exprs~ : @list.List[Expr], loc~ : Location) -> Unit = _ + fn visit_Expr_Array( + Self, + exprs~ : @list.List[Expr], + is_iter~ : Bool, + loc~ : Location, + ) -> Unit = _ fn visit_Expr_ArraySpread( Self, elems~ : @list.List[SpreadableElem], + is_iter~ : Bool, loc~ : Location, ) -> Unit = _ fn visit_Expr_ArrayGet(Self, array~ : Expr, index~ : Expr, loc~ : Location) -> Unit = _ @@ -512,6 +519,11 @@ pub(open) trait IterVisitor { loc~ : Location, ) -> Unit = _ fn visit_Expr_Interp(Self, elems~ : @list.List[InterpElem], loc~ : Location) -> Unit = _ + fn visit_Expr_BytesInterp( + Self, + elems~ : @list.List[InterpElem], + loc~ : Location, + ) -> Unit = _ fn visit_Expr_Constraint(Self, expr~ : Expr, ty~ : Type, loc~ : Location) -> Unit = _ fn visit_Expr_Constr(Self, constr~ : Constructor, loc~ : Location) -> Unit = _ fn visit_Expr_While( @@ -633,6 +645,18 @@ pub(open) trait IterVisitor { cases~ : @list.List[LexCase], loc~ : Location, ) -> Unit = _ + fn visit_Expr_LexScan( + Self, + expr~ : Expr, + match_loc~ : Location, + cases~ : @list.List[LexScanCase], + loc~ : Location, + ) -> Unit = _ + fn visit_LexScanCase(Self, LexScanCase) -> Unit = _ + fn visit_LexScanCasePattern(Self, LexScanCasePattern) -> Unit = _ + fn visit_LexScanCasePattern_Pattern(Self, RegexPattern) -> Unit = _ + fn visit_LexScanCasePattern_Binder(Self, Binder) -> Unit = _ + fn visit_LexScanCasePattern_Wildcard(Self, loc~ : Location) -> Unit = _ fn visit_Expr_LetMut( Self, binder~ : Binder, @@ -815,6 +839,7 @@ impl IterVisitor with fn visit_Impl_TopImpl( trait_~, method_name~, quantifiers~, + method_quantifiers~, params~, ret_ty~, err_ty~, @@ -830,6 +855,7 @@ impl IterVisitor with fn visit_Impl_TopImpl( trait_~, method_name~, quantifiers~, + method_quantifiers~, params~, ret_ty~, err_ty~, @@ -948,13 +974,13 @@ impl IterVisitor with fn visit_Expr_Unary(env, op~, expr~, loc~) { } ///| -impl IterVisitor with fn visit_Expr_Array(env, exprs~, loc~) { - IterVisitorBase::visit_Expr_Array(env, exprs~, loc~) +impl IterVisitor with fn visit_Expr_Array(env, exprs~, is_iter~, loc~) { + IterVisitorBase::visit_Expr_Array(env, exprs~, is_iter~, loc~) } ///| -impl IterVisitor with fn visit_Expr_ArraySpread(env, elems~, loc~) { - IterVisitorBase::visit_Expr_ArraySpread(env, elems~, loc~) +impl IterVisitor with fn visit_Expr_ArraySpread(env, elems~, is_iter~, loc~) { + IterVisitorBase::visit_Expr_ArraySpread(env, elems~, is_iter~, loc~) } ///| @@ -1020,6 +1046,11 @@ impl IterVisitor with fn visit_Expr_Interp(env, elems~, loc~) { IterVisitorBase::visit_Expr_Interp(env, elems~, loc~) } +///| +impl IterVisitor with fn visit_Expr_BytesInterp(env, elems~, loc~) { + IterVisitorBase::visit_Expr_BytesInterp(env, elems~, loc~) +} + ///| impl IterVisitor with fn visit_Expr_Constraint(env, expr~, ty~, loc~) { IterVisitorBase::visit_Expr_Constraint(env, expr~, ty~, loc~) @@ -2061,6 +2092,42 @@ impl IterVisitor with fn visit_Expr_LexMatch( ) } +///| +impl IterVisitor with fn visit_Expr_LexScan( + env, + expr~, + match_loc~, + cases~, + loc~, +) { + IterVisitorBase::visit_Expr_LexScan(env, expr~, match_loc~, cases~, loc~) +} + +///| +impl IterVisitor with fn visit_LexScanCase(env, lex_scan_case) { + IterVisitorBase::visit_LexScanCase(env, lex_scan_case) +} + +///| +impl IterVisitor with fn visit_LexScanCasePattern(env, lex_scan_case_pattern) { + IterVisitorBase::visit_LexScanCasePattern(env, lex_scan_case_pattern) +} + +///| +impl IterVisitor with fn visit_LexScanCasePattern_Pattern(env, regex_pattern) { + IterVisitorBase::visit_LexScanCasePattern_Pattern(env, regex_pattern) +} + +///| +impl IterVisitor with fn visit_LexScanCasePattern_Binder(env, binder) { + IterVisitorBase::visit_LexScanCasePattern_Binder(env, binder) +} + +///| +impl IterVisitor with fn visit_LexScanCasePattern_Wildcard(env, loc~) { + IterVisitorBase::visit_LexScanCasePattern_Wildcard(env, loc~) +} + ///| impl IterVisitor with fn visit_LexCase(env, lex_case) { IterVisitorBase::visit_LexCase(env, lex_case) @@ -2160,6 +2227,7 @@ pub impl[T : IterVisitor] IterVisitor for IterVisitorBase[T] with fn visit_Impl( trait_~, method_name~, quantifiers~, + method_quantifiers~, params~, ret_ty~, err_ty~, @@ -2174,6 +2242,7 @@ pub impl[T : IterVisitor] IterVisitor for IterVisitorBase[T] with fn visit_Impl( trait_~, method_name~, quantifiers~, + method_quantifiers~, params~, ret_ty~, err_ty~, @@ -3643,6 +3712,7 @@ pub impl[T : IterVisitor] IterVisitor for IterVisitorBase[T] with fn visit_Impl_ trait_~, method_name~, quantifiers~, + method_quantifiers~, params~, ret_ty~, err_ty~, @@ -3659,6 +3729,7 @@ pub impl[T : IterVisitor] IterVisitor for IterVisitorBase[T] with fn visit_Impl_ env.0.visit_TypeName(trait_) env.0.visit_Binder(method_name) quantifiers.each(x => env.0.visit_TypeVarBinder(x)) + method_quantifiers.each(x => env.0.visit_TypeVarBinder(x)) params.each(param => env.0.visit_Parameter(param)) ret_ty.each(x => env.0.visit_Type(x)) env.0.visit_ErrorType(err_ty) @@ -3783,8 +3854,10 @@ pub impl[T : IterVisitor] IterVisitor for IterVisitorBase[T] with fn visit_Expr_ pub impl[T : IterVisitor] IterVisitor for IterVisitorBase[T] with fn visit_Expr_Array( env, exprs~, + is_iter~, loc~, ) { + ignore(is_iter) ignore(loc) exprs.each(expr => env.0.visit_Expr(expr)) } @@ -3793,8 +3866,10 @@ pub impl[T : IterVisitor] IterVisitor for IterVisitorBase[T] with fn visit_Expr_ pub impl[T : IterVisitor] IterVisitor for IterVisitorBase[T] with fn visit_Expr_ArraySpread( env, elems~, + is_iter~, loc~, ) { + ignore(is_iter) ignore(loc) elems.each(fn(elem) { match elem { @@ -3895,6 +3970,16 @@ pub impl[T : IterVisitor] IterVisitor for IterVisitorBase[T] with fn visit_Expr_ elems.each(elem => env.0.visit_InterpElem(elem)) } +///| +pub impl[T : IterVisitor] IterVisitor for IterVisitorBase[T] with fn visit_Expr_BytesInterp( + env, + elems~, + loc~, +) { + ignore(loc) + elems.each(elem => env.0.visit_InterpElem(elem)) +} + ///| pub impl[T : IterVisitor] IterVisitor for IterVisitorBase[T] with fn visit_Expr_Constraint( env, @@ -4487,9 +4572,12 @@ pub impl[T : IterVisitor] IterVisitor for IterVisitorBase[T] with fn visit_Expr( Infix(op~, lhs~, rhs~, loc~) => env.0.visit_Expr_Infix(op~, lhs~, rhs~, loc~) Unary(op~, expr~, loc~) => env.0.visit_Expr_Unary(op~, expr~, loc~) - Array(exprs~, loc~) => env.0.visit_Expr_Array(exprs~, loc~) - ArraySpread(elems~, loc~) => env.0.visit_Expr_ArraySpread(elems~, loc~) - ListComprehension(kind~, guard_~, body~, loc~) => { + Array(exprs~, is_iter~, loc~) => + env.0.visit_Expr_Array(exprs~, is_iter~, loc~) + ArraySpread(elems~, is_iter~, loc~) => + env.0.visit_Expr_ArraySpread(elems~, is_iter~, loc~) + ListComprehension(kind~, guard_~, body~, is_iter~, loc~) => { + ignore(is_iter) ignore(loc) iter_list_comprehension_kind(env, kind) guard_.each(x => env.0.visit_Expr(x)) @@ -4513,6 +4601,7 @@ pub impl[T : IterVisitor] IterVisitor for IterVisitorBase[T] with fn visit_Expr( MultilineString(elems~, loc~) => env.0.visit_Expr_MultilineString(elems~, loc~) Interp(elems~, loc~) => env.0.visit_Expr_Interp(elems~, loc~) + BytesInterp(elems~, loc~) => env.0.visit_Expr_BytesInterp(elems~, loc~) Constraint(expr~, ty~, loc~) => env.0.visit_Expr_Constraint(expr~, ty~, loc~) Constr(constr~, loc~) => env.0.visit_Expr_Constr(constr~, loc~) @@ -4564,6 +4653,8 @@ pub impl[T : IterVisitor] IterVisitor for IterVisitorBase[T] with fn visit_Expr( env.0.visit_Expr_Match(expr~, cases~, match_loc~, loc~) LexMatch(strategy~, expr~, match_loc~, cases~, loc~) => env.0.visit_Expr_LexMatch(strategy~, expr~, match_loc~, cases~, loc~) + LexScan(expr~, match_loc~, cases~, loc~) => + env.0.visit_Expr_LexScan(expr~, match_loc~, cases~, loc~) LetMut(binder~, ty~, expr~, body~, loc~) => env.0.visit_Expr_LetMut(binder~, ty~, expr~, body~, loc~) Pipe(lhs~, rhs~, loc~) => env.0.visit_Expr_Pipe(lhs~, rhs~, loc~) @@ -4668,7 +4759,8 @@ pub impl[T : IterVisitor] IterVisitor for IterVisitorBase[T] with fn visit_Expr( env.0.visit_Expr_TryOperator(body~, kind~, try_loc~, loc~) Map(elems~, loc~) => env.0.visit_Expr_Map(elems~, loc~) Group(expr~, group~, loc~) => env.0.visit_Expr_Group(expr~, group~, loc~) - TemplateWriting(expr~, template~, loc~) => { + TemplateWriting(expr~, template~, is_conditional~, loc~) => { + ignore(is_conditional) ignore(loc) env.0.visit_Expr(expr) env.0.visit_Expr(template) @@ -4710,6 +4802,68 @@ pub impl[T : IterVisitor] IterVisitor for IterVisitorBase[T] with fn visit_Expr_ cases.each(case => env.0.visit_LexCase(case)) } +///| +pub impl[T : IterVisitor] IterVisitor for IterVisitorBase[T] with fn visit_Expr_LexScan( + env, + expr~, + match_loc~, + cases~, + loc~, +) { + ignore(match_loc) + ignore(loc) + env.0.visit_Expr(expr) + cases.each(case => env.0.visit_LexScanCase(case)) +} + +///| +pub impl[T : IterVisitor] IterVisitor for IterVisitorBase[T] with fn visit_LexScanCase( + env, + lex_scan_case, +) { + env.0.visit_LexScanCasePattern(lex_scan_case.pat) + lex_scan_case.guard_.each(guard_ => env.0.visit_Expr(guard_)) + env.0.visit_Expr(lex_scan_case.body) +} + +///| +pub impl[T : IterVisitor] IterVisitor for IterVisitorBase[T] with fn visit_LexScanCasePattern( + env, + lex_scan_case_pattern, +) { + match lex_scan_case_pattern { + Pattern(regex_pattern) => + env.0.visit_LexScanCasePattern_Pattern(regex_pattern) + Binder(binder) => env.0.visit_LexScanCasePattern_Binder(binder) + Wildcard(loc~) => env.0.visit_LexScanCasePattern_Wildcard(loc~) + } +} + +///| +pub impl[T : IterVisitor] IterVisitor for IterVisitorBase[T] with fn visit_LexScanCasePattern_Pattern( + env, + regex_pattern, +) { + iter_regex_pattern(env, regex_pattern) +} + +///| +pub impl[T : IterVisitor] IterVisitor for IterVisitorBase[T] with fn visit_LexScanCasePattern_Binder( + env, + binder, +) { + env.0.visit_Binder(binder) +} + +///| +pub impl[T : IterVisitor] IterVisitor for IterVisitorBase[T] with fn visit_LexScanCasePattern_Wildcard( + env, + loc~, +) { + ignore(env) + ignore(loc) +} + ///| pub impl[T : IterVisitor] IterVisitor for IterVisitorBase[T] with fn visit_LexCase( env, diff --git a/syntax/map_visitor.mbt b/syntax/map_visitor.mbt index 9a4eb73f..7afde13d 100644 --- a/syntax/map_visitor.mbt +++ b/syntax/map_visitor.mbt @@ -413,6 +413,7 @@ pub(open) trait MapVisitor { trait_~ : TypeName, method_name~ : Binder, quantifiers~ : @list.List[TypeVarBinder], + method_quantifiers~ : @list.List[TypeVarBinder], params~ : Parameters, ret_ty~ : Type?, err_ty~ : ErrorType, @@ -475,10 +476,16 @@ pub(open) trait MapVisitor { loc~ : Location, ) -> Expr = _ fn visit_Expr_Unary(Self, op~ : Var, expr~ : Expr, loc~ : Location) -> Expr = _ - fn visit_Expr_Array(Self, exprs~ : @list.List[Expr], loc~ : Location) -> Expr = _ + fn visit_Expr_Array( + Self, + exprs~ : @list.List[Expr], + is_iter~ : Bool, + loc~ : Location, + ) -> Expr = _ fn visit_Expr_ArraySpread( Self, elems~ : @list.List[SpreadableElem], + is_iter~ : Bool, loc~ : Location, ) -> Expr = _ fn visit_Expr_ArrayGet(Self, array~ : Expr, index~ : Expr, loc~ : Location) -> Expr = _ @@ -512,6 +519,11 @@ pub(open) trait MapVisitor { loc~ : Location, ) -> Expr = _ fn visit_Expr_Interp(Self, elems~ : @list.List[InterpElem], loc~ : Location) -> Expr = _ + fn visit_Expr_BytesInterp( + Self, + elems~ : @list.List[InterpElem], + loc~ : Location, + ) -> Expr = _ fn visit_Expr_Constraint(Self, expr~ : Expr, ty~ : Type, loc~ : Location) -> Expr = _ fn visit_Expr_Constr(Self, constr~ : Constructor, loc~ : Location) -> Expr = _ fn visit_Expr_While( @@ -633,6 +645,18 @@ pub(open) trait MapVisitor { cases~ : @list.List[LexCase], loc~ : Location, ) -> Expr = _ + fn visit_Expr_LexScan( + Self, + expr~ : Expr, + match_loc~ : Location, + cases~ : @list.List[LexScanCase], + loc~ : Location, + ) -> Expr = _ + fn visit_LexScanCase(Self, LexScanCase) -> LexScanCase = _ + fn visit_LexScanCasePattern(Self, LexScanCasePattern) -> LexScanCasePattern = _ + fn visit_LexScanCasePattern_Pattern(Self, RegexPattern) -> LexScanCasePattern = _ + fn visit_LexScanCasePattern_Binder(Self, Binder) -> LexScanCasePattern = _ + fn visit_LexScanCasePattern_Wildcard(Self, loc~ : Location) -> LexScanCasePattern = _ fn visit_Expr_LetMut( Self, binder~ : Binder, @@ -815,6 +839,7 @@ impl MapVisitor with fn visit_Impl_TopImpl( trait_~, method_name~, quantifiers~, + method_quantifiers~, params~, ret_ty~, err_ty~, @@ -830,6 +855,7 @@ impl MapVisitor with fn visit_Impl_TopImpl( trait_~, method_name~, quantifiers~, + method_quantifiers~, params~, ret_ty~, err_ty~, @@ -948,13 +974,13 @@ impl MapVisitor with fn visit_Expr_Unary(env, op~, expr~, loc~) { } ///| -impl MapVisitor with fn visit_Expr_Array(env, exprs~, loc~) { - MapVisitorBase::visit_Expr_Array(env, exprs~, loc~) +impl MapVisitor with fn visit_Expr_Array(env, exprs~, is_iter~, loc~) { + MapVisitorBase::visit_Expr_Array(env, exprs~, is_iter~, loc~) } ///| -impl MapVisitor with fn visit_Expr_ArraySpread(env, elems~, loc~) { - MapVisitorBase::visit_Expr_ArraySpread(env, elems~, loc~) +impl MapVisitor with fn visit_Expr_ArraySpread(env, elems~, is_iter~, loc~) { + MapVisitorBase::visit_Expr_ArraySpread(env, elems~, is_iter~, loc~) } ///| @@ -1020,6 +1046,11 @@ impl MapVisitor with fn visit_Expr_Interp(env, elems~, loc~) { MapVisitorBase::visit_Expr_Interp(env, elems~, loc~) } +///| +impl MapVisitor with fn visit_Expr_BytesInterp(env, elems~, loc~) { + MapVisitorBase::visit_Expr_BytesInterp(env, elems~, loc~) +} + ///| impl MapVisitor with fn visit_Expr_Constraint(env, expr~, ty~, loc~) { MapVisitorBase::visit_Expr_Constraint(env, expr~, ty~, loc~) @@ -2049,6 +2080,36 @@ impl MapVisitor with fn visit_Expr_LexMatch( ) } +///| +impl MapVisitor with fn visit_Expr_LexScan(env, expr~, match_loc~, cases~, loc~) { + MapVisitorBase::visit_Expr_LexScan(env, expr~, match_loc~, cases~, loc~) +} + +///| +impl MapVisitor with fn visit_LexScanCase(env, lex_scan_case) { + MapVisitorBase::visit_LexScanCase(env, lex_scan_case) +} + +///| +impl MapVisitor with fn visit_LexScanCasePattern(env, lex_scan_case_pattern) { + MapVisitorBase::visit_LexScanCasePattern(env, lex_scan_case_pattern) +} + +///| +impl MapVisitor with fn visit_LexScanCasePattern_Pattern(env, regex_pattern) { + MapVisitorBase::visit_LexScanCasePattern_Pattern(env, regex_pattern) +} + +///| +impl MapVisitor with fn visit_LexScanCasePattern_Binder(env, binder) { + MapVisitorBase::visit_LexScanCasePattern_Binder(env, binder) +} + +///| +impl MapVisitor with fn visit_LexScanCasePattern_Wildcard(env, loc~) { + MapVisitorBase::visit_LexScanCasePattern_Wildcard(env, loc~) +} + ///| impl MapVisitor with fn visit_LexCase(env, lex_case) { MapVisitorBase::visit_LexCase(env, lex_case) @@ -2148,6 +2209,7 @@ pub impl[T : MapVisitor] MapVisitor for MapVisitorBase[T] with fn visit_Impl( trait_~, method_name~, quantifiers~, + method_quantifiers~, params~, ret_ty~, err_ty~, @@ -2162,6 +2224,7 @@ pub impl[T : MapVisitor] MapVisitor for MapVisitorBase[T] with fn visit_Impl( trait_~, method_name~, quantifiers~, + method_quantifiers~, params~, ret_ty~, err_ty~, @@ -3747,6 +3810,7 @@ pub impl[T : MapVisitor] MapVisitor for MapVisitorBase[T] with fn visit_Impl_Top trait_~, method_name~, quantifiers~, + method_quantifiers~, params~, ret_ty~, err_ty~, @@ -3760,6 +3824,9 @@ pub impl[T : MapVisitor] MapVisitor for MapVisitorBase[T] with fn visit_Impl_Top let trait_ = env.0.visit_TypeName(trait_) let method_name = env.0.visit_Binder(method_name) let quantifiers = quantifiers.map(x => env.0.visit_TypeVarBinder(x)) + let method_quantifiers = method_quantifiers.map(x => { + env.0.visit_TypeVarBinder(x) + }) let params = params.map(param => env.0.visit_Parameter(param)) let ret_ty = ret_ty.map(x => env.0.visit_Type(x)) let err_ty = env.0.visit_ErrorType(err_ty) @@ -3770,6 +3837,7 @@ pub impl[T : MapVisitor] MapVisitor for MapVisitorBase[T] with fn visit_Impl_Top trait_~, method_name~, quantifiers~, + method_quantifiers~, params~, ret_ty~, err_ty~, @@ -3911,16 +3979,18 @@ pub impl[T : MapVisitor] MapVisitor for MapVisitorBase[T] with fn visit_Expr_Una pub impl[T : MapVisitor] MapVisitor for MapVisitorBase[T] with fn visit_Expr_Array( env, exprs~, + is_iter~, loc~, ) { let exprs = exprs.map(expr => env.0.visit_Expr(expr)) - Expr::Array(exprs~, loc~) + Expr::Array(exprs~, is_iter~, loc~) } ///| pub impl[T : MapVisitor] MapVisitor for MapVisitorBase[T] with fn visit_Expr_ArraySpread( env, elems~, + is_iter~, loc~, ) { let elems = elems.map(fn(elem) { @@ -3929,7 +3999,7 @@ pub impl[T : MapVisitor] MapVisitor for MapVisitorBase[T] with fn visit_Expr_Arr Spread(expr~, loc~) => Spread(expr=env.0.visit_Expr(expr), loc~) } }) - Expr::ArraySpread(elems~, loc~) + Expr::ArraySpread(elems~, is_iter~, loc~) } ///| @@ -4019,6 +4089,16 @@ pub impl[T : MapVisitor] MapVisitor for MapVisitorBase[T] with fn visit_Expr_Int Expr::Interp(elems~, loc~) } +///| +pub impl[T : MapVisitor] MapVisitor for MapVisitorBase[T] with fn visit_Expr_BytesInterp( + env, + elems~, + loc~, +) { + let elems = elems.map(elem => env.0.visit_InterpElem(elem)) + Expr::BytesInterp(elems~, loc~) +} + ///| pub impl[T : MapVisitor] MapVisitor for MapVisitorBase[T] with fn visit_Expr_Constraint( env, @@ -4629,13 +4709,15 @@ pub impl[T : MapVisitor] MapVisitor for MapVisitorBase[T] with fn visit_Expr( Infix(op~, lhs~, rhs~, loc~) => env.0.visit_Expr_Infix(op~, lhs~, rhs~, loc~) Unary(op~, expr~, loc~) => env.0.visit_Expr_Unary(op~, expr~, loc~) - Array(exprs~, loc~) => env.0.visit_Expr_Array(exprs~, loc~) - ArraySpread(elems~, loc~) => env.0.visit_Expr_ArraySpread(elems~, loc~) - ListComprehension(kind~, guard_~, body~, loc~) => { + Array(exprs~, is_iter~, loc~) => + env.0.visit_Expr_Array(exprs~, is_iter~, loc~) + ArraySpread(elems~, is_iter~, loc~) => + env.0.visit_Expr_ArraySpread(elems~, is_iter~, loc~) + ListComprehension(kind~, guard_~, body~, is_iter~, loc~) => { let kind = map_list_comprehension_kind(env, kind) let guard_ = guard_.map(x => env.0.visit_Expr(x)) let body = env.0.visit_Expr(body) - Expr::ListComprehension(kind~, guard_~, body~, loc~) + Expr::ListComprehension(kind~, guard_~, body~, is_iter~, loc~) } ArrayGet(array~, index~, loc~) => env.0.visit_Expr_ArrayGet(array~, index~, loc~) @@ -4655,6 +4737,7 @@ pub impl[T : MapVisitor] MapVisitor for MapVisitorBase[T] with fn visit_Expr( MultilineString(elems~, loc~) => env.0.visit_Expr_MultilineString(elems~, loc~) Interp(elems~, loc~) => env.0.visit_Expr_Interp(elems~, loc~) + BytesInterp(elems~, loc~) => env.0.visit_Expr_BytesInterp(elems~, loc~) Constraint(expr~, ty~, loc~) => env.0.visit_Expr_Constraint(expr~, ty~, loc~) Constr(constr~, loc~) => env.0.visit_Expr_Constr(constr~, loc~) @@ -4705,6 +4788,8 @@ pub impl[T : MapVisitor] MapVisitor for MapVisitorBase[T] with fn visit_Expr( env.0.visit_Expr_Match(expr~, cases~, match_loc~, loc~) LexMatch(strategy~, expr~, match_loc~, cases~, loc~) => env.0.visit_Expr_LexMatch(strategy~, expr~, match_loc~, cases~, loc~) + LexScan(expr~, match_loc~, cases~, loc~) => + env.0.visit_Expr_LexScan(expr~, match_loc~, cases~, loc~) LetMut(binder~, ty~, expr~, body~, loc~) => env.0.visit_Expr_LetMut(binder~, ty~, expr~, body~, loc~) Pipe(lhs~, rhs~, loc~) => env.0.visit_Expr_Pipe(lhs~, rhs~, loc~) @@ -4808,10 +4893,10 @@ pub impl[T : MapVisitor] MapVisitor for MapVisitorBase[T] with fn visit_Expr( env.0.visit_Expr_TryOperator(body~, kind~, try_loc~, loc~) Map(elems~, loc~) => env.0.visit_Expr_Map(elems~, loc~) Group(expr~, group~, loc~) => env.0.visit_Expr_Group(expr~, group~, loc~) - TemplateWriting(expr~, template~, loc~) => { + TemplateWriting(expr~, template~, is_conditional~, loc~) => { let expr = env.0.visit_Expr(expr) let template = env.0.visit_Expr(template) - Expr::TemplateWriting(expr~, template~, loc~) + Expr::TemplateWriting(expr~, template~, is_conditional~, loc~) } StaticAssert(asserts~, body~) => env.0.visit_Expr_StaticAssert(asserts~, body~) @@ -4857,6 +4942,70 @@ pub impl[T : MapVisitor] MapVisitor for MapVisitorBase[T] with fn visit_Expr_Lex Expr::LexMatch(strategy~, expr~, match_loc~, cases~, loc~) } +///| +pub impl[T : MapVisitor] MapVisitor for MapVisitorBase[T] with fn visit_Expr_LexScan( + env, + expr~, + match_loc~, + cases~, + loc~, +) { + let expr = env.0.visit_Expr(expr) + let cases = cases.map(case => env.0.visit_LexScanCase(case)) + Expr::LexScan(expr~, match_loc~, cases~, loc~) +} + +///| +pub impl[T : MapVisitor] MapVisitor for MapVisitorBase[T] with fn visit_LexScanCase( + env, + lex_scan_case, +) { + let pat = env.0.visit_LexScanCasePattern(lex_scan_case.pat) + let guard_ = lex_scan_case.guard_.map(guard_ => env.0.visit_Expr(guard_)) + let body = env.0.visit_Expr(lex_scan_case.body) + { pat, guard_, body } +} + +///| +pub impl[T : MapVisitor] MapVisitor for MapVisitorBase[T] with fn visit_LexScanCasePattern( + env, + lex_scan_case_pattern, +) { + match lex_scan_case_pattern { + Pattern(regex_pattern) => + env.0.visit_LexScanCasePattern_Pattern(regex_pattern) + Binder(binder) => env.0.visit_LexScanCasePattern_Binder(binder) + Wildcard(loc~) => env.0.visit_LexScanCasePattern_Wildcard(loc~) + } +} + +///| +pub impl[T : MapVisitor] MapVisitor for MapVisitorBase[T] with fn visit_LexScanCasePattern_Pattern( + env, + regex_pattern, +) { + let regex_pattern = map_regex_pattern(env, regex_pattern) + LexScanCasePattern::Pattern(regex_pattern) +} + +///| +pub impl[T : MapVisitor] MapVisitor for MapVisitorBase[T] with fn visit_LexScanCasePattern_Binder( + env, + binder, +) { + let binder = env.0.visit_Binder(binder) + LexScanCasePattern::Binder(binder) +} + +///| +pub impl[T : MapVisitor] MapVisitor for MapVisitorBase[T] with fn visit_LexScanCasePattern_Wildcard( + env, + loc~, +) { + ignore(env) + LexScanCasePattern::Wildcard(loc~) +} + ///| pub impl[T : MapVisitor] MapVisitor for MapVisitorBase[T] with fn visit_LexCase( env, diff --git a/syntax/map_visitor_wbtest.mbt b/syntax/map_visitor_wbtest.mbt index a63a91a2..41c15e8a 100644 --- a/syntax/map_visitor_wbtest.mbt +++ b/syntax/map_visitor_wbtest.mbt @@ -13,7 +13,7 @@ test "Pattern" { let constant_pattern = Pattern::Constant(c=int_constant, loc=dummy_loc) let int_type = Name( constr_id=ConstrId::{ id: LongIdent::Ident(name="Int"), loc: dummy_loc }, - tys=@list.from_array([]), + tys=@list.List([]), loc=dummy_loc, ) let constr_name = ConstrName::{ name: "TestConstructor", loc: dummy_loc } @@ -40,9 +40,9 @@ test "Pattern" { pat: any_pattern, kind: ArgumentKind::Positional, } - let array_patterns = ArrayPatterns::Closed(@list.from_array([])) + let array_patterns = ArrayPatterns::Closed(@list.List([])) let tuple_pattern = Pattern::Tuple( - pats=@list.from_array([any_pattern, constant_pattern]), + pats=@list.List([any_pattern, constant_pattern]), loc=dummy_loc, ) let any_with_alias = Pattern::Alias( @@ -66,17 +66,17 @@ test "Pattern" { ) let constr_pattern = Pattern::Constr( constr~, - args=Some(@list.from_array([constr_pat_arg])), + args=Some(@list.List([constr_pat_arg])), is_open=false, loc=dummy_loc, ) let record_pattern = Pattern::Record( - fields=@list.from_array([field_pat]), + fields=@list.List([field_pat]), is_closed=true, loc=dummy_loc, ) let map_pattern = Pattern::Map( - elems=@list.from_array([map_elem]), + elems=@list.List([map_elem]), is_closed=false, loc=dummy_loc, ) diff --git a/syntax/pkg.generated.mbti b/syntax/pkg.generated.mbti index 1676d11d..dfc6be1e 100644 --- a/syntax/pkg.generated.mbti +++ b/syntax/pkg.generated.mbti @@ -30,7 +30,7 @@ pub fn loc_of_expression(Expr) -> @basic.Location pub fn make_alias_pattern(loc~ : @basic.Location, Pattern, Binder) -> Pattern -pub fn make_array_expr(loc~ : @basic.Location, @list.List[SpreadableElem]) -> Expr +pub fn make_array_expr(loc~ : @basic.Location, is_iter~ : Bool, @list.List[SpreadableElem]) -> Expr pub fn make_arrow_fn(@list.List[(ArrowFnParam, Type?)], Expr, params_loc~ : @basic.Location, loc~ : @basic.Location) -> Func @@ -38,6 +38,8 @@ pub fn make_assign_opt(loc~ : @basic.Location, Expr, Expr) -> Expr? pub fn make_augmented_assign_opt(loc~ : @basic.Location, Var, Expr, Expr) -> Expr? +pub fn make_bytes_interp_expr(loc~ : @basic.Location, Array[@tokens.InterpElem]) -> Expr + pub fn make_constant_expr(loc~ : @basic.Location, Constant) -> Expr pub fn make_constant_pattern(loc~ : @basic.Location, Constant) -> Pattern @@ -241,9 +243,9 @@ pub(all) enum Expr { Apply(func~ : Expr, args~ : @list.List[Argument], loc~ : @basic.Location) Infix(op~ : Var, lhs~ : Expr, rhs~ : Expr, loc~ : @basic.Location) Unary(op~ : Var, expr~ : Expr, loc~ : @basic.Location) - Array(exprs~ : @list.List[Expr], loc~ : @basic.Location) - ArraySpread(elems~ : @list.List[SpreadableElem], loc~ : @basic.Location) - ListComprehension(kind~ : ListComprehensionKind, guard_~ : Expr?, body~ : Expr, loc~ : @basic.Location) + Array(exprs~ : @list.List[Expr], is_iter~ : Bool, loc~ : @basic.Location) + ArraySpread(elems~ : @list.List[SpreadableElem], is_iter~ : Bool, loc~ : @basic.Location) + ListComprehension(kind~ : ListComprehensionKind, guard_~ : Expr?, body~ : Expr, is_iter~ : Bool, loc~ : @basic.Location) ArrayGet(array~ : Expr, index~ : Expr, loc~ : @basic.Location) ArrayGetSlice(array~ : Expr, start_index~ : Expr?, end_index~ : Expr?, index_loc~ : @basic.Location, loc~ : @basic.Location) ArraySet(array~ : Expr, index~ : Expr, value~ : Expr, loc~ : @basic.Location) @@ -251,6 +253,7 @@ pub(all) enum Expr { Constant(c~ : Constant, loc~ : @basic.Location) MultilineString(elems~ : @list.List[MultilineStringElem], loc~ : @basic.Location) Interp(elems~ : @list.List[InterpElem], loc~ : @basic.Location) + BytesInterp(elems~ : @list.List[InterpElem], loc~ : @basic.Location) Constraint(expr~ : Expr, ty~ : Type, loc~ : @basic.Location) Constr(constr~ : Constructor, loc~ : @basic.Location) While(loop_cond~ : Expr, loop_body~ : Expr, while_else~ : Expr?, label~ : Label?, loc~ : @basic.Location) @@ -276,6 +279,7 @@ pub(all) enum Expr { Mutate(record~ : Expr, accessor~ : Accessor, field~ : Expr, augmented_by~ : Var?, loc~ : @basic.Location) Match(expr~ : Expr, cases~ : @list.List[Case], match_loc~ : @basic.Location, loc~ : @basic.Location) LexMatch(strategy~ : Label?, expr~ : Expr, match_loc~ : @basic.Location, cases~ : @list.List[LexCase], loc~ : @basic.Location) + LexScan(expr~ : Expr, match_loc~ : @basic.Location, cases~ : @list.List[LexScanCase], loc~ : @basic.Location) LetMut(binder~ : Binder, ty~ : Type?, expr~ : Expr, body~ : Expr, loc~ : @basic.Location) Pipe(lhs~ : Expr, rhs~ : Expr, loc~ : @basic.Location) RevPipe(lhs~ : Expr, rhs~ : Expr, loc~ : @basic.Location) @@ -296,7 +300,7 @@ pub(all) enum Expr { TryOperator(body~ : Expr, kind~ : TryOperatorKind, try_loc~ : @basic.Location, loc~ : @basic.Location) Map(elems~ : @list.List[MapExprElem], loc~ : @basic.Location) Group(expr~ : Expr, group~ : Group, loc~ : @basic.Location) - TemplateWriting(expr~ : Expr, template~ : Expr, loc~ : @basic.Location) + TemplateWriting(expr~ : Expr, template~ : Expr, is_conditional~ : Bool, loc~ : @basic.Location) StaticAssert(asserts~ : @list.List[StaticAssertion], body~ : Expr) } derive(@debug.Debug) pub fn Expr::json_repr(Self) -> Json @@ -386,7 +390,7 @@ pub(all) enum Impl { TopFuncDef(fun_decl~ : FunDecl, decl_body~ : DeclBody, where_clause~ : WhereClause?, loc~ : @basic.Location) TopLetDef(binder~ : Binder, ty~ : Type?, expr~ : Expr, vis~ : Visibility, is_constant~ : Bool, loc~ : @basic.Location, attrs~ : @list.List[@attribute.Attribute], mut doc~ : DocString, is_declare~ : Bool) TopTrait(TraitDecl) - TopImpl(self_ty~ : Type?, trait_~ : TypeName, method_name~ : Binder, quantifiers~ : @list.List[TypeVarBinder], params~ : @list.List[Parameter], ret_ty~ : Type?, err_ty~ : ErrorType, body~ : DeclBody, vis~ : Visibility, loc~ : @basic.Location, attrs~ : @list.List[@attribute.Attribute], mut doc~ : DocString) + TopImpl(self_ty~ : Type?, trait_~ : TypeName, method_name~ : Binder, quantifiers~ : @list.List[TypeVarBinder], method_quantifiers~ : @list.List[TypeVarBinder], params~ : @list.List[Parameter], ret_ty~ : Type?, err_ty~ : ErrorType, body~ : DeclBody, vis~ : Visibility, loc~ : @basic.Location, attrs~ : @list.List[@attribute.Attribute], mut doc~ : DocString) TopView(quantifiers~ : @list.List[TypeVarBinder], source_ty~ : Type, view_type_name~ : String, view_type_loc~ : @basic.Location, view_constrs~ : @list.List[ConstrDecl], view_func_name~ : Binder, parameters~ : @list.List[Parameter], params_loc~ : @basic.Location, body~ : Expr, vis~ : Visibility, loc~ : @basic.Location, attrs~ : @list.List[@attribute.Attribute], mut doc~ : DocString) TopImplRelation(self_ty~ : Type, trait_~ : TypeName, quantifiers~ : @list.List[TypeVarBinder], vis~ : Visibility, attrs~ : @list.List[@attribute.Attribute], loc~ : @basic.Location, mut doc~ : DocString, is_declare~ : Bool) TopUsing(pkg~ : Label, names~ : @list.List[(AliasTarget, UsingKind)], vis~ : Visibility, attrs~ : @list.List[@attribute.Attribute], loc~ : @basic.Location, mut doc~ : DocString) @@ -424,6 +428,18 @@ pub(all) enum LexPattern { Sequence(pats~ : @list.List[LexPattern], loc~ : @basic.Location) } derive(@debug.Debug) +pub(all) struct LexScanCase { + pat : LexScanCasePattern + guard_ : Expr? + body : Expr +} derive(@debug.Debug) + +pub(all) enum LexScanCasePattern { + Pattern(RegexPattern) + Binder(Binder) + Wildcard(loc~ : @basic.Location) +} derive(@debug.Debug) + pub(all) enum LexTopPattern { Pattern(LexPattern) Binder(Binder) @@ -786,7 +802,7 @@ pub(open) trait IterVisitor { fn visit_Impl_TopFuncDef(Self, fun_decl~ : FunDecl, decl_body~ : DeclBody, where_clause~ : WhereClause?, loc~ : @basic.Location) -> Unit = _ fn visit_Impl_TopLetDef(Self, binder~ : Binder, ty~ : Type?, expr~ : Expr, vis~ : Visibility, is_constant~ : Bool, loc~ : @basic.Location, attrs~ : @list.List[@attribute.Attribute], doc~ : DocString, is_declare~ : Bool) -> Unit = _ fn visit_Impl_TopTrait(Self, TraitDecl) -> Unit = _ - fn visit_Impl_TopImpl(Self, self_ty~ : Type?, trait_~ : TypeName, method_name~ : Binder, quantifiers~ : @list.List[TypeVarBinder], params~ : @list.List[Parameter], ret_ty~ : Type?, err_ty~ : ErrorType, body~ : DeclBody, vis~ : Visibility, loc~ : @basic.Location, attrs~ : @list.List[@attribute.Attribute], doc~ : DocString) -> Unit = _ + fn visit_Impl_TopImpl(Self, self_ty~ : Type?, trait_~ : TypeName, method_name~ : Binder, quantifiers~ : @list.List[TypeVarBinder], method_quantifiers~ : @list.List[TypeVarBinder], params~ : @list.List[Parameter], ret_ty~ : Type?, err_ty~ : ErrorType, body~ : DeclBody, vis~ : Visibility, loc~ : @basic.Location, attrs~ : @list.List[@attribute.Attribute], doc~ : DocString) -> Unit = _ fn visit_Impl_TopView(Self, quantifiers~ : @list.List[TypeVarBinder], source_ty~ : Type, view_type_name~ : String, view_type_loc~ : @basic.Location, view_constrs~ : @list.List[ConstrDecl], view_func_name~ : Binder, parameters~ : @list.List[Parameter], params_loc~ : @basic.Location, body~ : Expr, vis~ : Visibility, loc~ : @basic.Location, attrs~ : @list.List[@attribute.Attribute], doc~ : DocString) -> Unit = _ fn visit_Impl_TopImplRelation(Self, self_ty~ : Type, trait_~ : TypeName, quantifiers~ : @list.List[TypeVarBinder], vis~ : Visibility, attrs~ : @list.List[@attribute.Attribute], loc~ : @basic.Location, doc~ : DocString, is_declare~ : Bool) -> Unit = _ fn visit_Impl_TopUsing(Self, pkg~ : Label, names~ : @list.List[(AliasTarget, UsingKind)], vis~ : Visibility, attrs~ : @list.List[@attribute.Attribute], loc~ : @basic.Location, doc~ : DocString) -> Unit = _ @@ -795,8 +811,8 @@ pub(open) trait IterVisitor { fn visit_Expr_Apply(Self, func~ : Expr, args~ : @list.List[Argument], loc~ : @basic.Location) -> Unit = _ fn visit_Expr_Infix(Self, op~ : Var, lhs~ : Expr, rhs~ : Expr, loc~ : @basic.Location) -> Unit = _ fn visit_Expr_Unary(Self, op~ : Var, expr~ : Expr, loc~ : @basic.Location) -> Unit = _ - fn visit_Expr_Array(Self, exprs~ : @list.List[Expr], loc~ : @basic.Location) -> Unit = _ - fn visit_Expr_ArraySpread(Self, elems~ : @list.List[SpreadableElem], loc~ : @basic.Location) -> Unit = _ + fn visit_Expr_Array(Self, exprs~ : @list.List[Expr], is_iter~ : Bool, loc~ : @basic.Location) -> Unit = _ + fn visit_Expr_ArraySpread(Self, elems~ : @list.List[SpreadableElem], is_iter~ : Bool, loc~ : @basic.Location) -> Unit = _ fn visit_Expr_ArrayGet(Self, array~ : Expr, index~ : Expr, loc~ : @basic.Location) -> Unit = _ fn visit_Expr_ArrayGetSlice(Self, array~ : Expr, start_index~ : Expr?, end_index~ : Expr?, index_loc~ : @basic.Location, loc~ : @basic.Location) -> Unit = _ fn visit_Expr_ArraySet(Self, array~ : Expr, index~ : Expr, value~ : Expr, loc~ : @basic.Location) -> Unit = _ @@ -804,6 +820,7 @@ pub(open) trait IterVisitor { fn visit_Expr_Constant(Self, c~ : Constant, loc~ : @basic.Location) -> Unit = _ fn visit_Expr_MultilineString(Self, elems~ : @list.List[MultilineStringElem], loc~ : @basic.Location) -> Unit = _ fn visit_Expr_Interp(Self, elems~ : @list.List[InterpElem], loc~ : @basic.Location) -> Unit = _ + fn visit_Expr_BytesInterp(Self, elems~ : @list.List[InterpElem], loc~ : @basic.Location) -> Unit = _ fn visit_Expr_Constraint(Self, expr~ : Expr, ty~ : Type, loc~ : @basic.Location) -> Unit = _ fn visit_Expr_Constr(Self, constr~ : Constructor, loc~ : @basic.Location) -> Unit = _ fn visit_Expr_While(Self, loop_cond~ : Expr, loop_body~ : Expr, while_else~ : Expr?, label~ : Label?, loc~ : @basic.Location) -> Unit = _ @@ -828,6 +845,12 @@ pub(open) trait IterVisitor { fn visit_Expr_Mutate(Self, record~ : Expr, accessor~ : Accessor, field~ : Expr, augmented_by~ : Var?, loc~ : @basic.Location) -> Unit = _ fn visit_Expr_Match(Self, expr~ : Expr, cases~ : @list.List[Case], match_loc~ : @basic.Location, loc~ : @basic.Location) -> Unit = _ fn visit_Expr_LexMatch(Self, strategy~ : Label?, expr~ : Expr, match_loc~ : @basic.Location, cases~ : @list.List[LexCase], loc~ : @basic.Location) -> Unit = _ + fn visit_Expr_LexScan(Self, expr~ : Expr, match_loc~ : @basic.Location, cases~ : @list.List[LexScanCase], loc~ : @basic.Location) -> Unit = _ + fn visit_LexScanCase(Self, LexScanCase) -> Unit = _ + fn visit_LexScanCasePattern(Self, LexScanCasePattern) -> Unit = _ + fn visit_LexScanCasePattern_Pattern(Self, RegexPattern) -> Unit = _ + fn visit_LexScanCasePattern_Binder(Self, Binder) -> Unit = _ + fn visit_LexScanCasePattern_Wildcard(Self, loc~ : @basic.Location) -> Unit = _ fn visit_Expr_LetMut(Self, binder~ : Binder, ty~ : Type?, expr~ : Expr, body~ : Expr, loc~ : @basic.Location) -> Unit = _ fn visit_Expr_Pipe(Self, lhs~ : Expr, rhs~ : Expr, loc~ : @basic.Location) -> Unit = _ fn visit_Expr_Assign(Self, var_~ : Var, expr~ : Expr, augmented_by~ : Var?, loc~ : @basic.Location) -> Unit = _ @@ -992,7 +1015,7 @@ pub(open) trait MapVisitor { fn visit_Impl_TopFuncDef(Self, fun_decl~ : FunDecl, decl_body~ : DeclBody, where_clause~ : WhereClause?, loc~ : @basic.Location) -> Impl = _ fn visit_Impl_TopLetDef(Self, binder~ : Binder, ty~ : Type?, expr~ : Expr, vis~ : Visibility, is_constant~ : Bool, loc~ : @basic.Location, attrs~ : @list.List[@attribute.Attribute], doc~ : DocString, is_declare~ : Bool) -> Impl = _ fn visit_Impl_TopTrait(Self, TraitDecl) -> Impl = _ - fn visit_Impl_TopImpl(Self, self_ty~ : Type?, trait_~ : TypeName, method_name~ : Binder, quantifiers~ : @list.List[TypeVarBinder], params~ : @list.List[Parameter], ret_ty~ : Type?, err_ty~ : ErrorType, body~ : DeclBody, vis~ : Visibility, loc~ : @basic.Location, attrs~ : @list.List[@attribute.Attribute], doc~ : DocString) -> Impl = _ + fn visit_Impl_TopImpl(Self, self_ty~ : Type?, trait_~ : TypeName, method_name~ : Binder, quantifiers~ : @list.List[TypeVarBinder], method_quantifiers~ : @list.List[TypeVarBinder], params~ : @list.List[Parameter], ret_ty~ : Type?, err_ty~ : ErrorType, body~ : DeclBody, vis~ : Visibility, loc~ : @basic.Location, attrs~ : @list.List[@attribute.Attribute], doc~ : DocString) -> Impl = _ fn visit_Impl_TopView(Self, quantifiers~ : @list.List[TypeVarBinder], source_ty~ : Type, view_type_name~ : String, view_type_loc~ : @basic.Location, view_constrs~ : @list.List[ConstrDecl], view_func_name~ : Binder, parameters~ : @list.List[Parameter], params_loc~ : @basic.Location, body~ : Expr, vis~ : Visibility, loc~ : @basic.Location, attrs~ : @list.List[@attribute.Attribute], doc~ : DocString) -> Impl = _ fn visit_Impl_TopImplRelation(Self, self_ty~ : Type, trait_~ : TypeName, quantifiers~ : @list.List[TypeVarBinder], vis~ : Visibility, attrs~ : @list.List[@attribute.Attribute], loc~ : @basic.Location, doc~ : DocString, is_declare~ : Bool) -> Impl = _ fn visit_Impl_TopUsing(Self, pkg~ : Label, names~ : @list.List[(AliasTarget, UsingKind)], vis~ : Visibility, attrs~ : @list.List[@attribute.Attribute], loc~ : @basic.Location, doc~ : DocString) -> Impl = _ @@ -1000,8 +1023,8 @@ pub(open) trait MapVisitor { fn visit_Expr_Apply(Self, func~ : Expr, args~ : @list.List[Argument], loc~ : @basic.Location) -> Expr = _ fn visit_Expr_Infix(Self, op~ : Var, lhs~ : Expr, rhs~ : Expr, loc~ : @basic.Location) -> Expr = _ fn visit_Expr_Unary(Self, op~ : Var, expr~ : Expr, loc~ : @basic.Location) -> Expr = _ - fn visit_Expr_Array(Self, exprs~ : @list.List[Expr], loc~ : @basic.Location) -> Expr = _ - fn visit_Expr_ArraySpread(Self, elems~ : @list.List[SpreadableElem], loc~ : @basic.Location) -> Expr = _ + fn visit_Expr_Array(Self, exprs~ : @list.List[Expr], is_iter~ : Bool, loc~ : @basic.Location) -> Expr = _ + fn visit_Expr_ArraySpread(Self, elems~ : @list.List[SpreadableElem], is_iter~ : Bool, loc~ : @basic.Location) -> Expr = _ fn visit_Expr_ArrayGet(Self, array~ : Expr, index~ : Expr, loc~ : @basic.Location) -> Expr = _ fn visit_Expr_ArrayGetSlice(Self, array~ : Expr, start_index~ : Expr?, end_index~ : Expr?, index_loc~ : @basic.Location, loc~ : @basic.Location) -> Expr = _ fn visit_Expr_ArraySet(Self, array~ : Expr, index~ : Expr, value~ : Expr, loc~ : @basic.Location) -> Expr = _ @@ -1009,6 +1032,7 @@ pub(open) trait MapVisitor { fn visit_Expr_Constant(Self, c~ : Constant, loc~ : @basic.Location) -> Expr = _ fn visit_Expr_MultilineString(Self, elems~ : @list.List[MultilineStringElem], loc~ : @basic.Location) -> Expr = _ fn visit_Expr_Interp(Self, elems~ : @list.List[InterpElem], loc~ : @basic.Location) -> Expr = _ + fn visit_Expr_BytesInterp(Self, elems~ : @list.List[InterpElem], loc~ : @basic.Location) -> Expr = _ fn visit_Expr_Constraint(Self, expr~ : Expr, ty~ : Type, loc~ : @basic.Location) -> Expr = _ fn visit_Expr_Constr(Self, constr~ : Constructor, loc~ : @basic.Location) -> Expr = _ fn visit_Expr_While(Self, loop_cond~ : Expr, loop_body~ : Expr, while_else~ : Expr?, label~ : Label?, loc~ : @basic.Location) -> Expr = _ @@ -1033,6 +1057,12 @@ pub(open) trait MapVisitor { fn visit_Expr_Mutate(Self, record~ : Expr, accessor~ : Accessor, field~ : Expr, augmented_by~ : Var?, loc~ : @basic.Location) -> Expr = _ fn visit_Expr_Match(Self, expr~ : Expr, cases~ : @list.List[Case], match_loc~ : @basic.Location, loc~ : @basic.Location) -> Expr = _ fn visit_Expr_LexMatch(Self, strategy~ : Label?, expr~ : Expr, match_loc~ : @basic.Location, cases~ : @list.List[LexCase], loc~ : @basic.Location) -> Expr = _ + fn visit_Expr_LexScan(Self, expr~ : Expr, match_loc~ : @basic.Location, cases~ : @list.List[LexScanCase], loc~ : @basic.Location) -> Expr = _ + fn visit_LexScanCase(Self, LexScanCase) -> LexScanCase = _ + fn visit_LexScanCasePattern(Self, LexScanCasePattern) -> LexScanCasePattern = _ + fn visit_LexScanCasePattern_Pattern(Self, RegexPattern) -> LexScanCasePattern = _ + fn visit_LexScanCasePattern_Binder(Self, Binder) -> LexScanCasePattern = _ + fn visit_LexScanCasePattern_Wildcard(Self, loc~ : @basic.Location) -> LexScanCasePattern = _ fn visit_Expr_LetMut(Self, binder~ : Binder, ty~ : Type?, expr~ : Expr, body~ : Expr, loc~ : @basic.Location) -> Expr = _ fn visit_Expr_Pipe(Self, lhs~ : Expr, rhs~ : Expr, loc~ : @basic.Location) -> Expr = _ fn visit_Expr_Assign(Self, var_~ : Var, expr~ : Expr, augmented_by~ : Var?, loc~ : @basic.Location) -> Expr = _ diff --git a/syntax/utils.mbt b/syntax/utils.mbt index 666718d2..109f9042 100644 --- a/syntax/utils.mbt +++ b/syntax/utils.mbt @@ -27,6 +27,7 @@ pub fn make_tuple_expr(loc~ : Location, exprs : @list.List[Expr]) -> Expr { /// Create array expression with possible spread elements pub fn make_array_expr( loc~ : Location, + is_iter~ : Bool, elems : @list.List[SpreadableElem], ) -> Expr { // Try to convert to regular array if no spread elements @@ -34,12 +35,13 @@ pub fn make_array_expr( for elem in elems { match elem { Regular(e) => acc = acc.add(e) - Spread(_) => return ArraySpread(elems~, loc~) + Spread(_) => return ArraySpread(elems~, is_iter~, loc~) } } nobreak { return Array( // If we have only regular elements, create a simple array exprs=acc.rev(), + is_iter~, loc~, ) } @@ -54,7 +56,7 @@ pub fn make_interps(c : @tokens.InterpLiteral) -> @list.List[InterpElem] { InterpSource(s) => InterpElem::Source(s) } }) - @list.from_array(result) + @list.List(result) } ///| @@ -64,6 +66,15 @@ pub fn make_interp_expr(loc~ : Location, c : @tokens.InterpLiteral) -> Expr { Interp(elems~, loc~) } +///| +pub fn make_bytes_interp_expr( + loc~ : Location, + c : @tokens.InterpLiteral, +) -> Expr { + let elems = make_interps(c) + BytesInterp(elems~, loc~) +} + ///| /// Create record expression pub fn make_record_expr( @@ -214,9 +225,7 @@ pub fn desugar_array_get(loc~ : Location, obj : Expr, index : Expr) -> Expr { name: operators_table.get("_[_]").unwrap(), loc: bracket_loc(index), }, - args=@list.from_array([ - Argument::{ value: index, kind: ArgumentKind::Positional }, - ]), + args=@list.List([Argument::{ value: index, kind: ArgumentKind::Positional }]), return_self=false, loc~, ) @@ -236,7 +245,7 @@ pub fn desugar_array_set( name: operators_table.get("_[_]=_").unwrap(), loc: bracket_loc(index), }, - args=@list.from_array([ + args=@list.List([ Argument::{ value: index, kind: ArgumentKind::Positional }, Argument::{ value, kind: ArgumentKind::Positional }, ]), @@ -459,9 +468,9 @@ pub fn loc_of_expression(expr : Expr) -> Location { Apply(func=_, args=_, loc~) => loc Infix(op=_, lhs=_, rhs=_, loc~) => loc Unary(op=_, expr=_, loc~) => loc - Array(exprs=_, loc~) => loc - ArraySpread(elems=_, loc~) => loc - ListComprehension(kind=_, guard_=_, body=_, loc~) => loc + Array(exprs=_, is_iter=_, loc~) => loc + ArraySpread(elems=_, is_iter=_, loc~) => loc + ListComprehension(kind=_, guard_=_, body=_, is_iter=_, loc~) => loc ArrayGet(array=_, index=_, loc~) => loc ArrayGetSlice(array=_, start_index=_, end_index=_, index_loc=_, loc~) => loc ArraySet(array=_, index=_, value=_, loc~) => loc @@ -469,6 +478,7 @@ pub fn loc_of_expression(expr : Expr) -> Location { Constant(c=_, loc~) => loc MultilineString(elems=_, loc~) => loc Interp(elems=_, loc~) => loc + BytesInterp(elems=_, loc~) => loc Constraint(expr=_, ty=_, loc~) => loc Constr(constr=_, loc~) => loc While(loop_cond=_, loop_body=_, while_else=_, label=_, loc~) => loc @@ -494,6 +504,7 @@ pub fn loc_of_expression(expr : Expr) -> Location { Mutate(record=_, accessor=_, field=_, augmented_by=_, loc~) => loc Match(expr=_, cases=_, match_loc=_, loc~) => loc LexMatch(strategy=_, expr=_, match_loc=_, cases=_, loc~) => loc + LexScan(expr=_, match_loc=_, cases=_, loc~) => loc LetMut(binder=_, ty=_, expr=_, body=_, loc~) => loc Pipe(lhs=_, rhs=_, loc~) => loc RevPipe(lhs=_, rhs=_, loc~) => loc @@ -542,7 +553,7 @@ pub fn loc_of_expression(expr : Expr) -> Location { TryOperator(loc~, ..) => loc Map(elems=_, loc~) => loc Group(expr=_, group=_, loc~) => loc - TemplateWriting(expr=_, template=_, loc~) => loc + TemplateWriting(expr=_, template=_, is_conditional=_, loc~) => loc StaticAssert(asserts=_, body=_) => no_location } } diff --git a/test/manual_test/__snapshot__/nobreak.json b/test/manual_test/__snapshot__/nobreak.json index 2ff1ca9d..b12865ae 100644 --- a/test/manual_test/__snapshot__/nobreak.json +++ b/test/manual_test/__snapshot__/nobreak.json @@ -687,7 +687,8 @@ } } ] - } + }, + "is_iter": false } }, "init": { @@ -1023,7 +1024,8 @@ } } ] - } + }, + "is_iter": false } }, "init": { diff --git a/test/manual_test/extend_soft_keyword_regression_test.mbt b/test/manual_test/extend_soft_keyword_regression_test.mbt new file mode 100644 index 00000000..3892b8c3 --- /dev/null +++ b/test/manual_test/extend_soft_keyword_regression_test.mbt @@ -0,0 +1,70 @@ +///| +test "extend soft keyword in remaining lower identifier positions" { + let source = + #|using @pkg { extend, extend as extend_alias } + #| + #|pub(extend) fn g() -> Unit {} + #| + #|fn f(x : X, s : String, token : T) -> Unit { + #| x..extend() + #| s =~ (re"[a-z]+", extend=token) + #|} + let (hand_impls, hand_reports) = @parser.parse_string( + source, + name="extend_soft_keyword_regression.mbt", + parser=Handrolled, + ) + let (yacc_impls, yacc_reports) = @parser.parse_string( + source, + name="extend_soft_keyword_regression.mbt", + parser=MoonYacc, + ) + if !hand_reports.is_empty() || !yacc_reports.is_empty() { + fail( + "soft keyword extend should parse in all lowercase identifier positions; hand=\{hand_reports.to_json().stringify(indent=2)}, yacc=\{yacc_reports.to_json().stringify(indent=2)}", + ) + } + let hand_json = hand_impls.map(impl_ => impl_.json_repr()).to_json() + let yacc_json = yacc_impls.map(impl_ => impl_.json_repr()).to_json() + if hand_json != yacc_json { + fail( + "soft keyword extend produced different ASTs between moonyacc and handrolled parsers", + ) + } +} + +///| +test "extend special constructor pattern location matches yacc" { + let source = + #|fn f(x : X) -> Unit { + #| match x { + #| extend(value) => ignore(value) + #| } + #|} + let (hand_impls, hand_reports) = @parser.parse_string( + source, + name="extend_special_constructor_pattern_loc.mbt", + parser=Handrolled, + ) + let (yacc_impls, yacc_reports) = @parser.parse_string( + source, + name="extend_special_constructor_pattern_loc.mbt", + parser=MoonYacc, + ) + if !hand_reports.is_empty() || !yacc_reports.is_empty() { + fail( + "extend special constructor pattern should parse; hand=\{hand_reports.to_json().stringify(indent=2)}, yacc=\{yacc_reports.to_json().stringify(indent=2)}", + ) + } + let hand_json = @basic.show_loc.protect(@basic.String, fn() { + hand_impls.map(impl_ => impl_.json_repr()).to_json() + }) + let yacc_json = @basic.show_loc.protect(@basic.String, fn() { + yacc_impls.map(impl_ => impl_.json_repr()).to_json() + }) + if hand_json != yacc_json { + fail( + "extend special constructor pattern location differs between moonyacc and handrolled parsers:\nhand=\{hand_json.stringify(indent=2)}\nyacc=\{yacc_json.stringify(indent=2)}", + ) + } +} diff --git a/test/manual_test/impl_method_quantifiers_test.mbt b/test/manual_test/impl_method_quantifiers_test.mbt new file mode 100644 index 00000000..61f3e37e --- /dev/null +++ b/test/manual_test/impl_method_quantifiers_test.mbt @@ -0,0 +1,38 @@ +///| +test "parse impl method quantifiers" { + let source = + #|trait Trait { + #| method(Self) -> Unit + #|} + #| + #|impl Trait for Int with fn[A] method(self : Int, value : A) -> Unit { + #| ignore(value) + #|} + let (hand_impls, hand_reports) = @parser.parse_string( + source, + name="impl_method_quantifiers.mbt", + parser=Handrolled, + ) + if !hand_reports.is_empty() { + fail( + "handrolled parser rejected impl method quantifiers: \{hand_reports.to_json().stringify(indent=2)}", + ) + } + let (yacc_impls, yacc_reports) = @parser.parse_string( + source, + name="impl_method_quantifiers.mbt", + parser=MoonYacc, + ) + if !yacc_reports.is_empty() { + fail( + "moonyacc parser rejected impl method quantifiers: \{yacc_reports.to_json().stringify(indent=2)}", + ) + } + let hand_json = hand_impls.map(impl_ => impl_.json_repr()).to_json() + let yacc_json = yacc_impls.map(impl_ => impl_.json_repr()).to_json() + if hand_json != yacc_json { + fail( + "impl method quantifiers produced different ASTs between moonyacc and handrolled parsers", + ) + } +} diff --git a/test/manual_test/template_object_rhs_test.mbt b/test/manual_test/template_object_rhs_test.mbt new file mode 100644 index 00000000..8357bc1a --- /dev/null +++ b/test/manual_test/template_object_rhs_test.mbt @@ -0,0 +1,35 @@ +///| +test "parse template object rhs" { + let source = + #|fn f(writer : Writer, value : Int) -> Unit { + #| writer <+ { "key": value } + #| writer impl_.json_repr()).to_json() + let hand_json = hand_impls.map(impl_ => impl_.json_repr()).to_json() + if yacc_json != hand_json { + fail( + "template object rhs produced different ASTs between moonyacc and handrolled parsers", + ) + } +} diff --git a/test/mbti_parser_test/regression_test.mbt b/test/mbti_parser_test/regression_test.mbt index 0678d524..c57f94dc 100644 --- a/test/mbti_parser_test/regression_test.mbt +++ b/test/mbti_parser_test/regression_test.mbt @@ -10,7 +10,9 @@ let regression_sample_header = fn parse_ok(name : String, content : String) -> Mbti raise { let (mbti, reports) = @mbti_parser.parse_string(content, name~) if !reports.is_empty() { - fail("parsing \{name} failed with \{reports.length()} diagnostics") + fail( + "parsing \{name} failed with diagnostics: \{reports.to_json().stringify(indent=2)}", + ) } mbti } @@ -91,3 +93,29 @@ test "mbti package name rejects empty path component" { fail("expected invalid package alias to produce diagnostics") } } + +///| +test "trait_method_type_params" { + let body = + #|pub trait T { + #| fn[A : Show] map(Self, A) -> Unit + #| fn extend(Self) -> Unit + #|} + guard first_sig("trait_method_type_params.mbti", body) + is Trait({ methods, .. }) else { + fail("expected trait signature") + } + guard methods.head().unwrap() + is { name: { name: "map", .. }, type_params, .. } else { + fail("expected generic method") + } + inspect(type_params.length().to_string(), content="1") + let type_param = type_params.head().unwrap() + inspect(type_param.name.name, content="A") + inspect(type_param.constraints.length().to_string(), content="1") + guard methods.nth(1) + is Some({ name: { name: "extend", .. }, type_params: extend_params, .. }) else { + fail("expected extend method") + } + inspect(extend_params.length().to_string(), content="0") +} diff --git a/test/sync_test/__snapshot__/parse_test_allow_trailing_comma.json b/test/sync_test/__snapshot__/parse_test_allow_trailing_comma.json index ac3baf26..e812c6eb 100644 --- a/test/sync_test/__snapshot__/parse_test_allow_trailing_comma.json +++ b/test/sync_test/__snapshot__/parse_test_allow_trailing_comma.json @@ -1018,7 +1018,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { diff --git a/test/sync_test/__snapshot__/parse_test_array2.json b/test/sync_test/__snapshot__/parse_test_array2.json index 308aadc6..e6d25284 100644 --- a/test/sync_test/__snapshot__/parse_test_array2.json +++ b/test/sync_test/__snapshot__/parse_test_array2.json @@ -117,7 +117,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { @@ -316,7 +317,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { diff --git a/test/sync_test/__snapshot__/parse_test_array_spread.json b/test/sync_test/__snapshot__/parse_test_array_spread.json index 1b59e2fc..c4d7b044 100644 --- a/test/sync_test/__snapshot__/parse_test_array_spread.json +++ b/test/sync_test/__snapshot__/parse_test_array_spread.json @@ -59,7 +59,8 @@ } } ] - } + }, + "is_iter": false } }, "vis": { @@ -238,7 +239,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { diff --git a/test/sync_test/__snapshot__/parse_test_array_spread2.json b/test/sync_test/__snapshot__/parse_test_array_spread2.json index d160c560..93b98d79 100644 --- a/test/sync_test/__snapshot__/parse_test_array_spread2.json +++ b/test/sync_test/__snapshot__/parse_test_array_spread2.json @@ -59,7 +59,8 @@ } } ] - } + }, + "is_iter": false } }, "vis": { @@ -238,7 +239,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { diff --git a/test/sync_test/__snapshot__/parse_test_augmented.json b/test/sync_test/__snapshot__/parse_test_augmented.json index ea787e5f..11aa0907 100644 --- a/test/sync_test/__snapshot__/parse_test_augmented.json +++ b/test/sync_test/__snapshot__/parse_test_augmented.json @@ -1685,7 +1685,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { diff --git a/test/sync_test/__snapshot__/parse_test_brace_group_loc.json b/test/sync_test/__snapshot__/parse_test_brace_group_loc.json new file mode 100644 index 00000000..aa9671d1 --- /dev/null +++ b/test/sync_test/__snapshot__/parse_test_brace_group_loc.json @@ -0,0 +1,309 @@ +[ + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "f" + } + }, + "has_error": null, + "is_async": null, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [] + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::Sequence", + "loc": null, + "children": { + "exprs": { + "kind": "Expr::Sequence::ExprList", + "loc": null, + "children": [ + { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "0" + } + } + } + } + ] + }, + "last_expr": { + "kind": "Expr::Group", + "loc": null, + "children": { + "expr": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "+" + } + } + } + }, + "lhs": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "x" + } + } + } + } + } + }, + "rhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "1" + } + } + } + } + } + }, + "group": { + "kind": "Group::Brace", + "loc": null, + "children": {} + } + } + } + } + } + } + } + } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "g" + } + }, + "has_error": null, + "is_async": null, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [] + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::Sequence", + "loc": null, + "children": { + "exprs": { + "kind": "Expr::Sequence::ExprList", + "loc": null, + "children": [ + { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "0" + } + } + } + } + ] + }, + "last_expr": { + "kind": "Expr::Group", + "loc": null, + "children": { + "expr": { + "kind": "Expr::Group", + "loc": null, + "children": { + "expr": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "+" + } + } + } + }, + "lhs": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "x" + } + } + } + } + } + }, + "rhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "1" + } + } + } + } + } + }, + "group": { + "kind": "Group::Paren", + "loc": null, + "children": {} + } + } + }, + "group": { + "kind": "Group::Brace", + "loc": null, + "children": {} + } + } + } + } + } + } + } + } + } +] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/parse_test_brace_group_loc.mbt b/test/sync_test/__snapshot__/parse_test_brace_group_loc.mbt new file mode 100644 index 00000000..3275cf76 --- /dev/null +++ b/test/sync_test/__snapshot__/parse_test_brace_group_loc.mbt @@ -0,0 +1,11 @@ +//!build: -parser hand + +fn f() { + 0 + { x + 1 } +} + +fn g() { + 0 + { (x + 1) } +} diff --git a/test/sync_test/__snapshot__/parse_test_brace_group_loc.mbt.tokens.json b/test/sync_test/__snapshot__/parse_test_brace_group_loc.mbt.tokens.json new file mode 100644 index 00000000..86d5204d --- /dev/null +++ b/test/sync_test/__snapshot__/parse_test_brace_group_loc.mbt.tokens.json @@ -0,0 +1,223 @@ +[ + { + "token": [ + "COMMENT", + { + "content": "//!build: -parser hand", + "kind": [ + "Ownline", + { + "leading_blank_line": false, + "trailing_blank_line": true + } + ], + "consumed_by_docstring": false + } + ], + "loc": "1:1-1:23" + }, + { + "token": "NEWLINE", + "loc": "1:23-1:24" + }, + { + "token": "NEWLINE", + "loc": "2:1-2:2" + }, + { + "token": "FN", + "loc": "3:1-3:3" + }, + { + "token": [ + "LIDENT", + "f" + ], + "loc": "3:4-3:5" + }, + { + "token": "LPAREN", + "loc": "3:5-3:6" + }, + { + "token": "RPAREN", + "loc": "3:6-3:7" + }, + { + "token": "LBRACE", + "loc": "3:8-3:9" + }, + { + "token": "NEWLINE", + "loc": "3:9-3:10" + }, + { + "token": [ + "INT", + "0" + ], + "loc": "4:3-4:4" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "4:4-4:4" + }, + { + "token": "NEWLINE", + "loc": "4:4-4:5" + }, + { + "token": "LBRACE", + "loc": "5:3-5:4" + }, + { + "token": [ + "LIDENT", + "x" + ], + "loc": "5:5-5:6" + }, + { + "token": "PLUS", + "loc": "5:7-5:8" + }, + { + "token": [ + "INT", + "1" + ], + "loc": "5:9-5:10" + }, + { + "token": "RBRACE", + "loc": "5:11-5:12" + }, + { + "token": "NEWLINE", + "loc": "5:12-5:13" + }, + { + "token": "RBRACE", + "loc": "6:1-6:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "6:2-6:2" + }, + { + "token": "NEWLINE", + "loc": "6:2-6:3" + }, + { + "token": "NEWLINE", + "loc": "7:1-7:2" + }, + { + "token": "FN", + "loc": "8:1-8:3" + }, + { + "token": [ + "LIDENT", + "g" + ], + "loc": "8:4-8:5" + }, + { + "token": "LPAREN", + "loc": "8:5-8:6" + }, + { + "token": "RPAREN", + "loc": "8:6-8:7" + }, + { + "token": "LBRACE", + "loc": "8:8-8:9" + }, + { + "token": "NEWLINE", + "loc": "8:9-8:10" + }, + { + "token": [ + "INT", + "0" + ], + "loc": "9:3-9:4" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "9:4-9:4" + }, + { + "token": "NEWLINE", + "loc": "9:4-9:5" + }, + { + "token": "LBRACE", + "loc": "10:3-10:4" + }, + { + "token": "LPAREN", + "loc": "10:5-10:6" + }, + { + "token": [ + "LIDENT", + "x" + ], + "loc": "10:6-10:7" + }, + { + "token": "PLUS", + "loc": "10:8-10:9" + }, + { + "token": [ + "INT", + "1" + ], + "loc": "10:10-10:11" + }, + { + "token": "RPAREN", + "loc": "10:11-10:12" + }, + { + "token": "RBRACE", + "loc": "10:13-10:14" + }, + { + "token": "NEWLINE", + "loc": "10:14-10:15" + }, + { + "token": "RBRACE", + "loc": "11:1-11:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "11:2-11:2" + }, + { + "token": "NEWLINE", + "loc": "11:2-11:3" + }, + { + "token": "EOF", + "loc": "12:1-12:1" + } +] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/parse_test_bytes_interp_standalone.json b/test/sync_test/__snapshot__/parse_test_bytes_interp_standalone.json new file mode 100644 index 00000000..1c74311e --- /dev/null +++ b/test/sync_test/__snapshot__/parse_test_bytes_interp_standalone.json @@ -0,0 +1,457 @@ +[ + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "main" + } + }, + "has_error": null, + "is_async": null, + "decl_params": null, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [] + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::Let", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Any", + "loc": null, + "children": {} + }, + "expr": { + "kind": "Expr::BytesInterp", + "loc": null, + "children": { + "elems": { + "kind": "Expr::BytesInterp::ElemList", + "loc": null, + "children": [ + { + "kind": "InterpElem::Literal", + "loc": null, + "children": { + "repr": "a" + } + }, + { + "kind": "InterpElem::Source", + "loc": null, + "children": { + "source": "x" + } + }, + { + "kind": "InterpElem::Literal", + "loc": null, + "children": { + "repr": "c" + } + } + ] + } + } + }, + "body": { + "kind": "Expr::Let", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Any", + "loc": null, + "children": {} + }, + "expr": { + "kind": "Expr::BytesInterp", + "loc": null, + "children": { + "elems": { + "kind": "Expr::BytesInterp::ElemList", + "loc": null, + "children": [ + { + "kind": "InterpElem::Source", + "loc": null, + "children": { + "source": "x" + } + } + ] + } + } + }, + "body": { + "kind": "Expr::Let", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Any", + "loc": null, + "children": {} + }, + "expr": { + "kind": "Expr::BytesInterp", + "loc": null, + "children": { + "elems": { + "kind": "Expr::BytesInterp::ElemList", + "loc": null, + "children": [ + { + "kind": "InterpElem::Literal", + "loc": null, + "children": { + "repr": "a" + } + }, + { + "kind": "InterpElem::Source", + "loc": null, + "children": { + "source": "x" + } + }, + { + "kind": "InterpElem::Literal", + "loc": null, + "children": { + "repr": "b" + } + }, + { + "kind": "InterpElem::Source", + "loc": null, + "children": { + "source": "y" + } + }, + { + "kind": "InterpElem::Literal", + "loc": null, + "children": { + "repr": "c" + } + } + ] + } + } + }, + "body": { + "kind": "Expr::Let", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Any", + "loc": null, + "children": {} + }, + "expr": { + "kind": "Expr::BytesInterp", + "loc": null, + "children": { + "elems": { + "kind": "Expr::BytesInterp::ElemList", + "loc": null, + "children": [ + { + "kind": "InterpElem::Literal", + "loc": null, + "children": { + "repr": "sum=" + } + }, + { + "kind": "InterpElem::Source", + "loc": null, + "children": { + "source": "x + 1" + } + }, + { + "kind": "InterpElem::Literal", + "loc": null, + "children": { + "repr": "; ok=" + } + }, + { + "kind": "InterpElem::Source", + "loc": null, + "children": { + "source": "flag" + } + } + ] + } + } + }, + "body": { + "kind": "Expr::Let", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Any", + "loc": null, + "children": {} + }, + "expr": { + "kind": "Expr::BytesInterp", + "loc": null, + "children": { + "elems": { + "kind": "Expr::BytesInterp::ElemList", + "loc": null, + "children": [ + { + "kind": "InterpElem::Literal", + "loc": null, + "children": { + "repr": "\\x7B" + } + }, + { + "kind": "InterpElem::Source", + "loc": null, + "children": { + "source": "value" + } + }, + { + "kind": "InterpElem::Literal", + "loc": null, + "children": { + "repr": "\\x7D\\o000\\xFF" + } + } + ] + } + } + }, + "body": { + "kind": "Expr::Let", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Any", + "loc": null, + "children": {} + }, + "expr": { + "kind": "Expr::Tuple", + "loc": null, + "children": { + "exprs": { + "kind": "Expr::Tuple::ExprList", + "loc": null, + "children": [ + { + "kind": "Expr::BytesInterp", + "loc": null, + "children": { + "elems": { + "kind": "Expr::BytesInterp::ElemList", + "loc": null, + "children": [ + { + "kind": "InterpElem::Literal", + "loc": null, + "children": { + "repr": "left" + } + }, + { + "kind": "InterpElem::Source", + "loc": null, + "children": { + "source": "x" + } + } + ] + } + } + }, + { + "kind": "Expr::BytesInterp", + "loc": null, + "children": { + "elems": { + "kind": "Expr::BytesInterp::ElemList", + "loc": null, + "children": [ + { + "kind": "InterpElem::Source", + "loc": null, + "children": { + "source": "y" + } + }, + { + "kind": "InterpElem::Literal", + "loc": null, + "children": { + "repr": "right" + } + } + ] + } + } + } + ] + } + } + }, + "body": { + "kind": "Expr::Let", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Any", + "loc": null, + "children": {} + }, + "expr": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Some" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::NoExtraInfo", + "loc": null, + "children": {} + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::BytesInterp", + "loc": null, + "children": { + "elems": { + "kind": "Expr::BytesInterp::ElemList", + "loc": null, + "children": [ + { + "kind": "InterpElem::Literal", + "loc": null, + "children": { + "repr": "arg=" + } + }, + { + "kind": "InterpElem::Source", + "loc": null, + "children": { + "source": "x" + } + } + ] + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "body": { + "kind": "Expr::Unit", + "loc": null, + "children": { + "faked": true + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } +] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/parse_test_bytes_interp_standalone.mbt b/test/sync_test/__snapshot__/parse_test_bytes_interp_standalone.mbt new file mode 100644 index 00000000..5305a87b --- /dev/null +++ b/test/sync_test/__snapshot__/parse_test_bytes_interp_standalone.mbt @@ -0,0 +1,9 @@ +fn main { + let _ = b"a\{x}c" + let _ = b"\{x}" + let _ = b"a\{x}b\{y}c" + let _ = b"sum=\{x + 1}; ok=\{flag}" + let _ = b"\x7B\{value}\x7D\o000\xFF" + let _ = (b"left\{x}", b"\{y}right") + let _ = Some(b"arg=\{x}") +} diff --git a/test/sync_test/__snapshot__/parse_test_bytes_interp_standalone.mbt.tokens.json b/test/sync_test/__snapshot__/parse_test_bytes_interp_standalone.mbt.tokens.json new file mode 100644 index 00000000..3653671c --- /dev/null +++ b/test/sync_test/__snapshot__/parse_test_bytes_interp_standalone.mbt.tokens.json @@ -0,0 +1,277 @@ +[ + { + "token": "FN", + "loc": "1:1-1:3" + }, + { + "token": [ + "LIDENT", + "main" + ], + "loc": "1:4-1:8" + }, + { + "token": "LBRACE", + "loc": "1:9-1:10" + }, + { + "token": "NEWLINE", + "loc": "1:10-1:11" + }, + { + "token": "LET", + "loc": "2:3-2:6" + }, + { + "token": "UNDERSCORE", + "loc": "2:7-2:8" + }, + { + "token": "EQUAL", + "loc": "2:9-2:10" + }, + { + "token": [ + "BYTES_INTERP", + "\"a\\{x}c\"" + ], + "loc": "2:11-2:20" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "2:20-2:20" + }, + { + "token": "NEWLINE", + "loc": "2:20-2:21" + }, + { + "token": "LET", + "loc": "3:3-3:6" + }, + { + "token": "UNDERSCORE", + "loc": "3:7-3:8" + }, + { + "token": "EQUAL", + "loc": "3:9-3:10" + }, + { + "token": [ + "BYTES_INTERP", + "\"\\{x}\"" + ], + "loc": "3:11-3:18" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "3:18-3:18" + }, + { + "token": "NEWLINE", + "loc": "3:18-3:19" + }, + { + "token": "LET", + "loc": "4:3-4:6" + }, + { + "token": "UNDERSCORE", + "loc": "4:7-4:8" + }, + { + "token": "EQUAL", + "loc": "4:9-4:10" + }, + { + "token": [ + "BYTES_INTERP", + "\"a\\{x}b\\{y}c\"" + ], + "loc": "4:11-4:25" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "4:25-4:25" + }, + { + "token": "NEWLINE", + "loc": "4:25-4:26" + }, + { + "token": "LET", + "loc": "5:3-5:6" + }, + { + "token": "UNDERSCORE", + "loc": "5:7-5:8" + }, + { + "token": "EQUAL", + "loc": "5:9-5:10" + }, + { + "token": [ + "BYTES_INTERP", + "\"sum=\\{x + 1}; ok=\\{flag}\"" + ], + "loc": "5:11-5:38" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "5:38-5:38" + }, + { + "token": "NEWLINE", + "loc": "5:38-5:39" + }, + { + "token": "LET", + "loc": "6:3-6:6" + }, + { + "token": "UNDERSCORE", + "loc": "6:7-6:8" + }, + { + "token": "EQUAL", + "loc": "6:9-6:10" + }, + { + "token": [ + "BYTES_INTERP", + "\"\\x7B\\{value}\\x7D\\o000\\xFF\"" + ], + "loc": "6:11-6:39" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "6:39-6:39" + }, + { + "token": "NEWLINE", + "loc": "6:39-6:40" + }, + { + "token": "LET", + "loc": "7:3-7:6" + }, + { + "token": "UNDERSCORE", + "loc": "7:7-7:8" + }, + { + "token": "EQUAL", + "loc": "7:9-7:10" + }, + { + "token": "LPAREN", + "loc": "7:11-7:12" + }, + { + "token": [ + "BYTES_INTERP", + "\"left\\{x}\"" + ], + "loc": "7:12-7:23" + }, + { + "token": "COMMA", + "loc": "7:23-7:24" + }, + { + "token": [ + "BYTES_INTERP", + "\"\\{y}right\"" + ], + "loc": "7:25-7:37" + }, + { + "token": "RPAREN", + "loc": "7:37-7:38" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "7:38-7:38" + }, + { + "token": "NEWLINE", + "loc": "7:38-7:39" + }, + { + "token": "LET", + "loc": "8:3-8:6" + }, + { + "token": "UNDERSCORE", + "loc": "8:7-8:8" + }, + { + "token": "EQUAL", + "loc": "8:9-8:10" + }, + { + "token": [ + "UIDENT", + "Some" + ], + "loc": "8:11-8:15" + }, + { + "token": "LPAREN", + "loc": "8:15-8:16" + }, + { + "token": [ + "BYTES_INTERP", + "\"arg=\\{x}\"" + ], + "loc": "8:16-8:27" + }, + { + "token": "RPAREN", + "loc": "8:27-8:28" + }, + { + "token": "NEWLINE", + "loc": "8:28-8:29" + }, + { + "token": "RBRACE", + "loc": "9:1-9:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "9:2-9:2" + }, + { + "token": "NEWLINE", + "loc": "9:2-9:3" + }, + { + "token": "EOF", + "loc": "10:1-10:1" + } +] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/parse_test_bytes_interp_template_writing.json b/test/sync_test/__snapshot__/parse_test_bytes_interp_template_writing.json new file mode 100644 index 00000000..0e2b7a1f --- /dev/null +++ b/test/sync_test/__snapshot__/parse_test_bytes_interp_template_writing.json @@ -0,0 +1,379 @@ +[ + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "main" + } + }, + "has_error": null, + "is_async": null, + "decl_params": null, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [] + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::Let", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Any", + "loc": null, + "children": {} + }, + "expr": { + "kind": "Expr::TemplateWriting", + "loc": null, + "children": { + "expr": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "writer" + } + } + } + } + } + }, + "template": { + "kind": "Expr::BytesInterp", + "loc": null, + "children": { + "elems": { + "kind": "Expr::BytesInterp::ElemList", + "loc": null, + "children": [ + { + "kind": "InterpElem::Literal", + "loc": null, + "children": { + "repr": "a" + } + }, + { + "kind": "InterpElem::Source", + "loc": null, + "children": { + "source": "x" + } + }, + { + "kind": "InterpElem::Literal", + "loc": null, + "children": { + "repr": "c" + } + } + ] + } + } + }, + "is_conditional": false + } + }, + "body": { + "kind": "Expr::Let", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Any", + "loc": null, + "children": {} + }, + "expr": { + "kind": "Expr::TemplateWriting", + "loc": null, + "children": { + "expr": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "maybe" + } + } + } + } + } + }, + "template": { + "kind": "Expr::BytesInterp", + "loc": null, + "children": { + "elems": { + "kind": "Expr::BytesInterp::ElemList", + "loc": null, + "children": [ + { + "kind": "InterpElem::Literal", + "loc": null, + "children": { + "repr": "a" + } + }, + { + "kind": "InterpElem::Source", + "loc": null, + "children": { + "source": "x" + } + }, + { + "kind": "InterpElem::Literal", + "loc": null, + "children": { + "repr": "c" + } + } + ] + } + } + }, + "is_conditional": true + } + }, + "body": { + "kind": "Expr::Let", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Any", + "loc": null, + "children": {} + }, + "expr": { + "kind": "Expr::TemplateWriting", + "loc": null, + "children": { + "expr": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "writer" + } + } + } + } + } + }, + "template": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Bytes", + "loc": null, + "children": { + "value": "abc" + } + } + } + }, + "is_conditional": false + } + }, + "body": { + "kind": "Expr::Sequence", + "loc": null, + "children": { + "exprs": { + "kind": "Expr::Sequence::ExprList", + "loc": null, + "children": [ + { + "kind": "Expr::TemplateWriting", + "loc": null, + "children": { + "expr": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "writer" + } + } + } + } + } + }, + "template": { + "kind": "Expr::BytesInterp", + "loc": null, + "children": { + "elems": { + "kind": "Expr::BytesInterp::ElemList", + "loc": null, + "children": [ + { + "kind": "InterpElem::Literal", + "loc": null, + "children": { + "repr": "123" + } + }, + { + "kind": "InterpElem::Source", + "loc": null, + "children": { + "source": "w <+ b\"456\"" + } + }, + { + "kind": "InterpElem::Literal", + "loc": null, + "children": { + "repr": "321" + } + } + ] + } + } + }, + "is_conditional": false + } + } + ] + }, + "last_expr": { + "kind": "Expr::TemplateWriting", + "loc": null, + "children": { + "expr": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "writer" + } + } + } + } + } + }, + "template": { + "kind": "Expr::BytesInterp", + "loc": null, + "children": { + "elems": { + "kind": "Expr::BytesInterp::ElemList", + "loc": null, + "children": [ + { + "kind": "InterpElem::Literal", + "loc": null, + "children": { + "repr": "123" + } + }, + { + "kind": "InterpElem::Source", + "loc": null, + "children": { + "source": "w <+ b\"456\\{w <+ b\"789\"}654\"" + } + }, + { + "kind": "InterpElem::Literal", + "loc": null, + "children": { + "repr": "321" + } + } + ] + } + } + }, + "is_conditional": false + } + } + } + } + } + } + } + } + } + } + } + } + } + } +] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/parse_test_bytes_interp_template_writing.mbt b/test/sync_test/__snapshot__/parse_test_bytes_interp_template_writing.mbt new file mode 100644 index 00000000..2b6a471a --- /dev/null +++ b/test/sync_test/__snapshot__/parse_test_bytes_interp_template_writing.mbt @@ -0,0 +1,8 @@ +fn main { + let _ = writer <+ b"a\{x}c" + let _ = maybe Unit { + extend(extend, extend~, extend=extend, extend?, extend?=extend) + extend = extend.extend + extend += extend + let extend = { extend, extend: extend } + match extend { + Constr(extend, extend~, extend=extend) => ... + } + let _ = extend => ... + let _ = (extend, extend : Int) => ... +} diff --git a/test/sync_test/__snapshot__/parse_test_extend_soft_keyword.mbt.tokens.json b/test/sync_test/__snapshot__/parse_test_extend_soft_keyword.mbt.tokens.json new file mode 100644 index 00000000..b95a5f40 --- /dev/null +++ b/test/sync_test/__snapshot__/parse_test_extend_soft_keyword.mbt.tokens.json @@ -0,0 +1,505 @@ +[ + { + "token": "FN", + "loc": "1:1-1:3" + }, + { + "token": "EXTEND", + "loc": "1:4-1:10" + }, + { + "token": "LPAREN", + "loc": "1:10-1:11" + }, + { + "token": "NEWLINE", + "loc": "1:11-1:12" + }, + { + "token": "EXTEND", + "loc": "2:3-2:9" + }, + { + "token": "COLON", + "loc": "2:10-2:11" + }, + { + "token": [ + "UIDENT", + "Int" + ], + "loc": "2:12-2:15" + }, + { + "token": "COMMA", + "loc": "2:15-2:16" + }, + { + "token": "NEWLINE", + "loc": "2:16-2:17" + }, + { + "token": [ + "POST_LABEL", + "extend" + ], + "loc": "3:3-3:10" + }, + { + "token": "COLON", + "loc": "3:11-3:12" + }, + { + "token": [ + "UIDENT", + "Int" + ], + "loc": "3:13-3:16" + }, + { + "token": "COMMA", + "loc": "3:16-3:17" + }, + { + "token": "NEWLINE", + "loc": "3:17-3:18" + }, + { + "token": "EXTEND", + "loc": "4:3-4:9" + }, + { + "token": "QUESTION", + "loc": "4:9-4:10" + }, + { + "token": "COLON", + "loc": "4:11-4:12" + }, + { + "token": [ + "UIDENT", + "Int" + ], + "loc": "4:13-4:16" + }, + { + "token": "COMMA", + "loc": "4:16-4:17" + }, + { + "token": "NEWLINE", + "loc": "4:17-4:18" + }, + { + "token": "RPAREN", + "loc": "5:1-5:2" + }, + { + "token": "THIN_ARROW", + "loc": "5:3-5:5" + }, + { + "token": [ + "UIDENT", + "Unit" + ], + "loc": "5:6-5:10" + }, + { + "token": "LBRACE", + "loc": "5:11-5:12" + }, + { + "token": "NEWLINE", + "loc": "5:12-5:13" + }, + { + "token": "EXTEND", + "loc": "6:3-6:9" + }, + { + "token": "LPAREN", + "loc": "6:9-6:10" + }, + { + "token": "EXTEND", + "loc": "6:10-6:16" + }, + { + "token": "COMMA", + "loc": "6:16-6:17" + }, + { + "token": [ + "POST_LABEL", + "extend" + ], + "loc": "6:18-6:25" + }, + { + "token": "COMMA", + "loc": "6:25-6:26" + }, + { + "token": "EXTEND", + "loc": "6:27-6:33" + }, + { + "token": "EQUAL", + "loc": "6:33-6:34" + }, + { + "token": "EXTEND", + "loc": "6:34-6:40" + }, + { + "token": "COMMA", + "loc": "6:40-6:41" + }, + { + "token": "EXTEND", + "loc": "6:42-6:48" + }, + { + "token": "QUESTION", + "loc": "6:48-6:49" + }, + { + "token": "COMMA", + "loc": "6:49-6:50" + }, + { + "token": "EXTEND", + "loc": "6:51-6:57" + }, + { + "token": "QUESTION", + "loc": "6:57-6:58" + }, + { + "token": "EQUAL", + "loc": "6:58-6:59" + }, + { + "token": "EXTEND", + "loc": "6:59-6:65" + }, + { + "token": "RPAREN", + "loc": "6:65-6:66" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "6:66-6:66" + }, + { + "token": "NEWLINE", + "loc": "6:66-6:67" + }, + { + "token": "EXTEND", + "loc": "7:3-7:9" + }, + { + "token": "EQUAL", + "loc": "7:10-7:11" + }, + { + "token": "EXTEND", + "loc": "7:12-7:18" + }, + { + "token": [ + "DOT_LIDENT", + "extend" + ], + "loc": "7:19-7:25" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "7:25-7:25" + }, + { + "token": "NEWLINE", + "loc": "7:25-7:26" + }, + { + "token": "EXTEND", + "loc": "8:3-8:9" + }, + { + "token": "PLUS_EQUAL", + "loc": "8:10-8:12" + }, + { + "token": "EXTEND", + "loc": "8:13-8:19" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "8:19-8:19" + }, + { + "token": "NEWLINE", + "loc": "8:19-8:20" + }, + { + "token": "LET", + "loc": "9:3-9:6" + }, + { + "token": "EXTEND", + "loc": "9:7-9:13" + }, + { + "token": "EQUAL", + "loc": "9:14-9:15" + }, + { + "token": "LBRACE", + "loc": "9:16-9:17" + }, + { + "token": "EXTEND", + "loc": "9:18-9:24" + }, + { + "token": "COMMA", + "loc": "9:24-9:25" + }, + { + "token": "EXTEND", + "loc": "9:26-9:32" + }, + { + "token": "COLON", + "loc": "9:32-9:33" + }, + { + "token": "EXTEND", + "loc": "9:34-9:40" + }, + { + "token": "RBRACE", + "loc": "9:41-9:42" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "9:42-9:42" + }, + { + "token": "NEWLINE", + "loc": "9:42-9:43" + }, + { + "token": "MATCH", + "loc": "10:3-10:8" + }, + { + "token": "EXTEND", + "loc": "10:9-10:15" + }, + { + "token": "LBRACE", + "loc": "10:16-10:17" + }, + { + "token": "NEWLINE", + "loc": "10:17-10:18" + }, + { + "token": [ + "UIDENT", + "Constr" + ], + "loc": "11:5-11:11" + }, + { + "token": "LPAREN", + "loc": "11:11-11:12" + }, + { + "token": "EXTEND", + "loc": "11:12-11:18" + }, + { + "token": "COMMA", + "loc": "11:18-11:19" + }, + { + "token": [ + "POST_LABEL", + "extend" + ], + "loc": "11:20-11:27" + }, + { + "token": "COMMA", + "loc": "11:27-11:28" + }, + { + "token": "EXTEND", + "loc": "11:29-11:35" + }, + { + "token": "EQUAL", + "loc": "11:35-11:36" + }, + { + "token": "EXTEND", + "loc": "11:36-11:42" + }, + { + "token": "RPAREN", + "loc": "11:42-11:43" + }, + { + "token": "FAT_ARROW", + "loc": "11:44-11:46" + }, + { + "token": "ELLIPSIS", + "loc": "11:47-11:50" + }, + { + "token": "NEWLINE", + "loc": "11:50-11:51" + }, + { + "token": "RBRACE", + "loc": "12:3-12:4" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "12:4-12:4" + }, + { + "token": "NEWLINE", + "loc": "12:4-12:5" + }, + { + "token": "LET", + "loc": "13:3-13:6" + }, + { + "token": "UNDERSCORE", + "loc": "13:7-13:8" + }, + { + "token": "EQUAL", + "loc": "13:9-13:10" + }, + { + "token": "EXTEND", + "loc": "13:11-13:17" + }, + { + "token": "FAT_ARROW", + "loc": "13:18-13:20" + }, + { + "token": "ELLIPSIS", + "loc": "13:21-13:24" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "13:24-13:24" + }, + { + "token": "NEWLINE", + "loc": "13:24-13:25" + }, + { + "token": "LET", + "loc": "14:3-14:6" + }, + { + "token": "UNDERSCORE", + "loc": "14:7-14:8" + }, + { + "token": "EQUAL", + "loc": "14:9-14:10" + }, + { + "token": "LPAREN", + "loc": "14:11-14:12" + }, + { + "token": "EXTEND", + "loc": "14:12-14:18" + }, + { + "token": "COMMA", + "loc": "14:18-14:19" + }, + { + "token": "EXTEND", + "loc": "14:20-14:26" + }, + { + "token": "COLON", + "loc": "14:27-14:28" + }, + { + "token": [ + "UIDENT", + "Int" + ], + "loc": "14:29-14:32" + }, + { + "token": "RPAREN", + "loc": "14:32-14:33" + }, + { + "token": "FAT_ARROW", + "loc": "14:34-14:36" + }, + { + "token": "ELLIPSIS", + "loc": "14:37-14:40" + }, + { + "token": "NEWLINE", + "loc": "14:40-14:41" + }, + { + "token": "RBRACE", + "loc": "15:1-15:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "15:2-15:2" + }, + { + "token": "NEWLINE", + "loc": "15:2-15:3" + }, + { + "token": "EOF", + "loc": "16:1-16:1" + } +] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/parse_test_extern_fn_quantifier.mbt b/test/sync_test/__snapshot__/parse_test_extern_fn_quantifier.mbt new file mode 100644 index 00000000..e2715243 --- /dev/null +++ b/test/sync_test/__snapshot__/parse_test_extern_fn_quantifier.mbt @@ -0,0 +1,8 @@ +///| +pub extern "wasm" fn[T] use_fixedarray_generic(arr : FixedArray[T]) = + "(func (param $arr i32))" + +///| +extern "wasm" fn legacy[T]( + arr : FixedArray[T] +) = "(func (param $arr i32))" diff --git a/test/sync_test/__snapshot__/parse_test_extern_fn_quantifier.mbt.tokens.json b/test/sync_test/__snapshot__/parse_test_extern_fn_quantifier.mbt.tokens.json new file mode 100644 index 00000000..f6182c3e --- /dev/null +++ b/test/sync_test/__snapshot__/parse_test_extern_fn_quantifier.mbt.tokens.json @@ -0,0 +1,268 @@ +[ + { + "token": [ + "COMMENT", + { + "content": "///|", + "kind": [ + "Ownline", + { + "leading_blank_line": false, + "trailing_blank_line": false + } + ], + "consumed_by_docstring": false + } + ], + "loc": "1:1-1:5" + }, + { + "token": "NEWLINE", + "loc": "1:5-1:6" + }, + { + "token": "PUB", + "loc": "2:1-2:4" + }, + { + "token": "EXTERN", + "loc": "2:5-2:11" + }, + { + "token": [ + "STRING", + "wasm" + ], + "loc": "2:12-2:18" + }, + { + "token": "FN", + "loc": "2:19-2:21" + }, + { + "token": "LBRACKET", + "loc": "2:21-2:22" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "2:22-2:23" + }, + { + "token": "RBRACKET", + "loc": "2:23-2:24" + }, + { + "token": [ + "LIDENT", + "use_fixedarray_generic" + ], + "loc": "2:25-2:47" + }, + { + "token": "LPAREN", + "loc": "2:47-2:48" + }, + { + "token": [ + "LIDENT", + "arr" + ], + "loc": "2:48-2:51" + }, + { + "token": "COLON", + "loc": "2:52-2:53" + }, + { + "token": [ + "UIDENT", + "FixedArray" + ], + "loc": "2:54-2:64" + }, + { + "token": "LBRACKET", + "loc": "2:64-2:65" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "2:65-2:66" + }, + { + "token": "RBRACKET", + "loc": "2:66-2:67" + }, + { + "token": "RPAREN", + "loc": "2:67-2:68" + }, + { + "token": "EQUAL", + "loc": "2:69-2:70" + }, + { + "token": "NEWLINE", + "loc": "2:70-2:71" + }, + { + "token": [ + "STRING", + "(func (param $arr i32))" + ], + "loc": "3:3-3:28" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "3:28-3:28" + }, + { + "token": "NEWLINE", + "loc": "3:28-3:29" + }, + { + "token": "NEWLINE", + "loc": "4:1-4:2" + }, + { + "token": [ + "COMMENT", + { + "content": "///|", + "kind": [ + "Ownline", + { + "leading_blank_line": true, + "trailing_blank_line": false + } + ], + "consumed_by_docstring": false + } + ], + "loc": "5:1-5:5" + }, + { + "token": "NEWLINE", + "loc": "5:5-5:6" + }, + { + "token": "EXTERN", + "loc": "6:1-6:7" + }, + { + "token": [ + "STRING", + "wasm" + ], + "loc": "6:8-6:14" + }, + { + "token": "FN", + "loc": "6:15-6:17" + }, + { + "token": [ + "LIDENT", + "legacy" + ], + "loc": "6:18-6:24" + }, + { + "token": "LBRACKET", + "loc": "6:24-6:25" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "6:25-6:26" + }, + { + "token": "RBRACKET", + "loc": "6:26-6:27" + }, + { + "token": "LPAREN", + "loc": "6:27-6:28" + }, + { + "token": "NEWLINE", + "loc": "6:28-6:29" + }, + { + "token": [ + "LIDENT", + "arr" + ], + "loc": "7:3-7:6" + }, + { + "token": "COLON", + "loc": "7:7-7:8" + }, + { + "token": [ + "UIDENT", + "FixedArray" + ], + "loc": "7:9-7:19" + }, + { + "token": "LBRACKET", + "loc": "7:19-7:20" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "7:20-7:21" + }, + { + "token": "RBRACKET", + "loc": "7:21-7:22" + }, + { + "token": "NEWLINE", + "loc": "7:22-7:23" + }, + { + "token": "RPAREN", + "loc": "8:1-8:2" + }, + { + "token": "EQUAL", + "loc": "8:3-8:4" + }, + { + "token": [ + "STRING", + "(func (param $arr i32))" + ], + "loc": "8:5-8:30" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "8:30-8:30" + }, + { + "token": "NEWLINE", + "loc": "8:30-8:31" + }, + { + "token": "EOF", + "loc": "9:1-9:1" + } +] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/parse_test_get_set.json b/test/sync_test/__snapshot__/parse_test_get_set.json index 7b594a92..5a3109f0 100644 --- a/test/sync_test/__snapshot__/parse_test_get_set.json +++ b/test/sync_test/__snapshot__/parse_test_get_set.json @@ -112,7 +112,8 @@ } } ] - } + }, + "is_iter": false } }, "index": { @@ -182,7 +183,8 @@ } } ] - } + }, + "is_iter": false } }, "method_name": { @@ -297,7 +299,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { diff --git a/test/sync_test/__snapshot__/parse_test_gitlab_issue_1612.mbt b/test/sync_test/__snapshot__/parse_test_gitlab_issue_1612.mbt index ab5f1304..9e01d1a0 100644 --- a/test/sync_test/__snapshot__/parse_test_gitlab_issue_1612.mbt +++ b/test/sync_test/__snapshot__/parse_test_gitlab_issue_1612.mbt @@ -1,7 +1,8 @@ /// for more information, see http://192.168.86.3:53000/compiler/ideas/pulls/6545 fn div(x : Int,y : Int) -> Int raise { if y == 0 { - raise (Failure "x") // parse error + let str = "x" + raise (Failure str) // parse error } x / y } diff --git a/test/sync_test/__snapshot__/parse_test_gitlab_issue_1612.mbt.tokens.json b/test/sync_test/__snapshot__/parse_test_gitlab_issue_1612.mbt.tokens.json index 5124b554..82c0815e 100644 --- a/test/sync_test/__snapshot__/parse_test_gitlab_issue_1612.mbt.tokens.json +++ b/test/sync_test/__snapshot__/parse_test_gitlab_issue_1612.mbt.tokens.json @@ -135,31 +135,64 @@ "token": "NEWLINE", "loc": "3:14-3:15" }, + { + "token": "LET", + "loc": "4:5-4:8" + }, + { + "token": [ + "LIDENT", + "str" + ], + "loc": "4:9-4:12" + }, + { + "token": "EQUAL", + "loc": "4:13-4:14" + }, + { + "token": [ + "STRING", + "x" + ], + "loc": "4:15-4:18" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "4:18-4:18" + }, + { + "token": "NEWLINE", + "loc": "4:18-4:19" + }, { "token": "RAISE", - "loc": "4:5-4:10" + "loc": "5:5-5:10" }, { "token": "LPAREN", - "loc": "4:11-4:12" + "loc": "5:11-5:12" }, { "token": [ "UIDENT", "Failure" ], - "loc": "4:12-4:19" + "loc": "5:12-5:19" }, { "token": [ - "STRING", - "x" + "LIDENT", + "str" ], - "loc": "4:20-4:23" + "loc": "5:20-5:23" }, { "token": "RPAREN", - "loc": "4:23-4:24" + "loc": "5:23-5:24" }, { "token": [ @@ -170,207 +203,207 @@ "consumed_by_docstring": false } ], - "loc": "4:25-4:39" + "loc": "5:25-5:39" }, { "token": "NEWLINE", - "loc": "4:39-4:40" + "loc": "5:39-5:40" }, { "token": "RBRACE", - "loc": "5:3-5:4" + "loc": "6:3-6:4" }, { "token": [ "SEMI", false ], - "loc": "5:4-5:4" + "loc": "6:4-6:4" }, { "token": "NEWLINE", - "loc": "5:4-5:5" + "loc": "6:4-6:5" }, { "token": [ "LIDENT", "x" ], - "loc": "6:3-6:4" + "loc": "7:3-7:4" }, { "token": [ "INFIX3", "/" ], - "loc": "6:5-6:6" + "loc": "7:5-7:6" }, { "token": [ "LIDENT", "y" ], - "loc": "6:7-6:8" + "loc": "7:7-7:8" }, { "token": "NEWLINE", - "loc": "6:9-6:10" + "loc": "7:9-7:10" }, { "token": "RBRACE", - "loc": "7:1-7:2" + "loc": "8:1-8:2" }, { "token": [ "SEMI", false ], - "loc": "7:2-7:2" + "loc": "8:2-8:2" }, { "token": "NEWLINE", - "loc": "7:2-7:3" + "loc": "8:2-8:3" }, { "token": "NEWLINE", - "loc": "8:1-8:2" + "loc": "9:1-9:2" }, { "token": "FN", - "loc": "9:1-9:3" + "loc": "10:1-10:3" }, { "token": [ "LIDENT", "hello" ], - "loc": "9:4-9:9" + "loc": "10:4-10:9" }, { "token": "LPAREN", - "loc": "9:9-9:10" + "loc": "10:9-10:10" }, { "token": [ "LIDENT", "x" ], - "loc": "9:10-9:11" + "loc": "10:10-10:11" }, { "token": "COLON", - "loc": "9:12-9:13" + "loc": "10:12-10:13" }, { "token": [ "UIDENT", "Int" ], - "loc": "9:14-9:17" + "loc": "10:14-10:17" }, { "token": "COMMA", - "loc": "9:17-9:18" + "loc": "10:17-10:18" }, { "token": [ "LIDENT", "y" ], - "loc": "9:18-9:19" + "loc": "10:18-10:19" }, { "token": "COLON", - "loc": "9:20-9:21" + "loc": "10:20-10:21" }, { "token": [ "UIDENT", "Int" ], - "loc": "9:22-9:25" + "loc": "10:22-10:25" }, { "token": "RPAREN", - "loc": "9:25-9:26" + "loc": "10:25-10:26" }, { "token": "THIN_ARROW", - "loc": "9:27-9:29" + "loc": "10:27-10:29" }, { "token": [ "UIDENT", "Int" ], - "loc": "9:30-9:33" + "loc": "10:30-10:33" }, { "token": "RAISE", - "loc": "9:34-9:39" + "loc": "10:34-10:39" }, { "token": "LBRACE", - "loc": "9:40-9:41" + "loc": "10:40-10:41" }, { "token": "NEWLINE", - "loc": "9:41-9:42" + "loc": "10:41-10:42" }, { "token": [ "LIDENT", "div" ], - "loc": "10:4-10:7" + "loc": "11:4-11:7" }, { "token": "LPAREN", - "loc": "10:7-10:8" + "loc": "11:7-11:8" }, { "token": [ "LIDENT", "x" ], - "loc": "10:8-10:9" + "loc": "11:8-11:9" }, { "token": "COMMA", - "loc": "10:9-10:10" + "loc": "11:9-11:10" }, { "token": [ "LIDENT", "y" ], - "loc": "10:10-10:11" + "loc": "11:10-11:11" }, { "token": "RPAREN", - "loc": "10:11-10:12" + "loc": "11:11-11:12" }, { "token": "NEWLINE", - "loc": "10:12-10:13" + "loc": "11:12-11:13" }, { "token": "RBRACE", - "loc": "11:1-11:2" + "loc": "12:1-12:2" }, { "token": [ "SEMI", false ], - "loc": "11:2-11:2" + "loc": "12:2-12:2" }, { "token": "NEWLINE", - "loc": "11:2-11:3" + "loc": "12:2-12:3" }, { "token": "EOF", - "loc": "12:1-12:1" + "loc": "13:1-13:1" } ] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/parse_test_impl_stub_without_for.json b/test/sync_test/__snapshot__/parse_test_impl_stub_without_for.json index 00c16e4a..fdee3f81 100644 --- a/test/sync_test/__snapshot__/parse_test_impl_stub_without_for.json +++ b/test/sync_test/__snapshot__/parse_test_impl_stub_without_for.json @@ -164,6 +164,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, diff --git a/test/sync_test/__snapshot__/parse_test_iter_literal.json b/test/sync_test/__snapshot__/parse_test_iter_literal.json new file mode 100644 index 00000000..2e08d218 --- /dev/null +++ b/test/sync_test/__snapshot__/parse_test_iter_literal.json @@ -0,0 +1,551 @@ +[ + { + "kind": "Impl::TopTest", + "loc": null, + "children": { + "expr": { + "kind": "Expr::Let", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Any", + "loc": null, + "children": {} + }, + "expr": { + "kind": "Expr::Array", + "loc": null, + "children": { + "exprs": { + "kind": "Expr::Array::ExprList", + "loc": null, + "children": [] + }, + "is_iter": true + } + }, + "body": { + "kind": "Expr::Let", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "xs" + } + } + } + }, + "expr": { + "kind": "Expr::Array", + "loc": null, + "children": { + "exprs": { + "kind": "Expr::Array::ExprList", + "loc": null, + "children": [ + { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "1" + } + } + } + }, + { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "2" + } + } + } + }, + { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "3" + } + } + } + } + ] + }, + "is_iter": true + } + }, + "body": { + "kind": "Expr::Let", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Any", + "loc": null, + "children": {} + }, + "expr": { + "kind": "Expr::ArraySpread", + "loc": null, + "children": { + "elems": { + "kind": "Expr::ArraySpread::ElemList", + "loc": null, + "children": [ + { + "kind": "SpreadableElem::Regular", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "0" + } + } + } + } + } + }, + { + "kind": "SpreadableElem::Spread", + "loc": null, + "children": { + "expr": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "xs" + } + } + } + } + } + } + } + }, + { + "kind": "SpreadableElem::Regular", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "5" + } + } + } + } + } + } + ] + }, + "is_iter": true + } + }, + "body": { + "kind": "Expr::Let", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Any", + "loc": null, + "children": {} + }, + "expr": { + "kind": "Expr::ListComprehension", + "loc": null, + "children": { + "kind": { + "kind": "Expr::ListComprehension::Kind::Foreach", + "loc": null, + "children": { + "binders": { + "kind": "Expr::ForEach::BinderList", + "loc": null, + "children": [ + { + "kind": "Binder", + "loc": null, + "children": { + "name": "x" + } + } + ] + }, + "expr": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "..<" + } + } + } + }, + "lhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "0" + } + } + } + }, + "rhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "10" + } + } + } + } + } + }, + "init": { + "kind": "Expr::ForEach::Init", + "loc": null, + "children": [] + }, + "continue_block": { + "kind": "Expr::ForEach::ContinueBlock", + "loc": null, + "children": [] + }, + "is_iter": true + } + }, + "guard": null, + "body": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "+" + } + } + } + }, + "lhs": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "x" + } + } + } + } + } + }, + "rhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "1" + } + } + } + } + } + } + } + }, + "body": { + "kind": "Expr::Let", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Any", + "loc": null, + "children": {} + }, + "expr": { + "kind": "Expr::ListComprehension", + "loc": null, + "children": { + "kind": { + "kind": "Expr::ListComprehension::Kind::For", + "loc": null, + "children": { + "binders": { + "kind": "Expr::For::BindingList", + "loc": null, + "children": [ + { + "kind": "For::Binding", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "i" + } + }, + "expr": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "0" + } + } + } + } + } + } + ] + }, + "condition": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "<" + } + } + } + }, + "lhs": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "i" + } + } + } + } + } + }, + "rhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "10" + } + } + } + } + } + }, + "continue_block": { + "kind": "Expr::For::ContBindingList", + "loc": null, + "children": [ + { + "kind": "For::ContBinding", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "i" + } + }, + "expr": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "+" + } + } + } + }, + "lhs": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "i" + } + } + } + } + } + }, + "rhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "1" + } + } + } + } + } + } + } + } + ] + }, + "is_iter": true + } + }, + "guard": null, + "body": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "i" + } + } + } + } + } + } + } + }, + "body": { + "kind": "Expr::Unit", + "loc": null, + "children": { + "faked": true + } + } + } + } + } + } + } + } + } + } + } + }, + "name": null, + "params": null, + "local_types": { + "kind": "Impl::TopTest::LocalTypeList", + "loc": null, + "children": [] + }, + "is_async": null, + "attrs": { + "kind": "Impl::TopTest::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + } +] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/parse_test_iter_literal.mbt b/test/sync_test/__snapshot__/parse_test_iter_literal.mbt new file mode 100644 index 00000000..9315d36e --- /dev/null +++ b/test/sync_test/__snapshot__/parse_test_iter_literal.mbt @@ -0,0 +1,8 @@ +///| +test { + let _ = [||] + let xs = [| 1, 2, 3 |] + let _ = [| 0, ..xs, 5 |] + let _ = [| for x in 0..<10 => x + 1 |] + let _ = [| for i = 0; i < 10; i = i + 1 => i |] +} diff --git a/test/sync_test/__snapshot__/parse_test_iter_literal.mbt.tokens.json b/test/sync_test/__snapshot__/parse_test_iter_literal.mbt.tokens.json new file mode 100644 index 00000000..26a73f0f --- /dev/null +++ b/test/sync_test/__snapshot__/parse_test_iter_literal.mbt.tokens.json @@ -0,0 +1,419 @@ +[ + { + "token": [ + "COMMENT", + { + "content": "///|", + "kind": [ + "Ownline", + { + "leading_blank_line": false, + "trailing_blank_line": false + } + ], + "consumed_by_docstring": false + } + ], + "loc": "1:1-1:5" + }, + { + "token": "NEWLINE", + "loc": "1:5-1:6" + }, + { + "token": "TEST", + "loc": "2:1-2:5" + }, + { + "token": "LBRACE", + "loc": "2:6-2:7" + }, + { + "token": "NEWLINE", + "loc": "2:7-2:8" + }, + { + "token": "LET", + "loc": "3:3-3:6" + }, + { + "token": "UNDERSCORE", + "loc": "3:7-3:8" + }, + { + "token": "EQUAL", + "loc": "3:9-3:10" + }, + { + "token": "LBRACKET_BAR", + "loc": "3:11-3:13" + }, + { + "token": "BAR_RBRACKET", + "loc": "3:13-3:15" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "3:15-3:15" + }, + { + "token": "NEWLINE", + "loc": "3:15-3:16" + }, + { + "token": "LET", + "loc": "4:3-4:6" + }, + { + "token": [ + "LIDENT", + "xs" + ], + "loc": "4:7-4:9" + }, + { + "token": "EQUAL", + "loc": "4:10-4:11" + }, + { + "token": "LBRACKET_BAR", + "loc": "4:12-4:14" + }, + { + "token": [ + "INT", + "1" + ], + "loc": "4:15-4:16" + }, + { + "token": "COMMA", + "loc": "4:16-4:17" + }, + { + "token": [ + "INT", + "2" + ], + "loc": "4:18-4:19" + }, + { + "token": "COMMA", + "loc": "4:19-4:20" + }, + { + "token": [ + "INT", + "3" + ], + "loc": "4:21-4:22" + }, + { + "token": "BAR_RBRACKET", + "loc": "4:23-4:25" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "4:25-4:25" + }, + { + "token": "NEWLINE", + "loc": "4:25-4:26" + }, + { + "token": "LET", + "loc": "5:3-5:6" + }, + { + "token": "UNDERSCORE", + "loc": "5:7-5:8" + }, + { + "token": "EQUAL", + "loc": "5:9-5:10" + }, + { + "token": "LBRACKET_BAR", + "loc": "5:11-5:13" + }, + { + "token": [ + "INT", + "0" + ], + "loc": "5:14-5:15" + }, + { + "token": "COMMA", + "loc": "5:15-5:16" + }, + { + "token": "DOTDOT", + "loc": "5:17-5:19" + }, + { + "token": [ + "LIDENT", + "xs" + ], + "loc": "5:19-5:21" + }, + { + "token": "COMMA", + "loc": "5:21-5:22" + }, + { + "token": [ + "INT", + "5" + ], + "loc": "5:23-5:24" + }, + { + "token": "BAR_RBRACKET", + "loc": "5:25-5:27" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "5:27-5:27" + }, + { + "token": "NEWLINE", + "loc": "5:27-5:28" + }, + { + "token": "LET", + "loc": "6:3-6:6" + }, + { + "token": "UNDERSCORE", + "loc": "6:7-6:8" + }, + { + "token": "EQUAL", + "loc": "6:9-6:10" + }, + { + "token": "LBRACKET_BAR", + "loc": "6:11-6:13" + }, + { + "token": "FOR", + "loc": "6:14-6:17" + }, + { + "token": [ + "LIDENT", + "x" + ], + "loc": "6:18-6:19" + }, + { + "token": "IN", + "loc": "6:20-6:22" + }, + { + "token": [ + "INT", + "0" + ], + "loc": "6:23-6:24" + }, + { + "token": "RANGE_EXCLUSIVE", + "loc": "6:24-6:27" + }, + { + "token": [ + "INT", + "10" + ], + "loc": "6:27-6:29" + }, + { + "token": "FAT_ARROW", + "loc": "6:30-6:32" + }, + { + "token": [ + "LIDENT", + "x" + ], + "loc": "6:33-6:34" + }, + { + "token": "PLUS", + "loc": "6:35-6:36" + }, + { + "token": [ + "INT", + "1" + ], + "loc": "6:37-6:38" + }, + { + "token": "BAR_RBRACKET", + "loc": "6:39-6:41" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "6:41-6:41" + }, + { + "token": "NEWLINE", + "loc": "6:41-6:42" + }, + { + "token": "LET", + "loc": "7:3-7:6" + }, + { + "token": "UNDERSCORE", + "loc": "7:7-7:8" + }, + { + "token": "EQUAL", + "loc": "7:9-7:10" + }, + { + "token": "LBRACKET_BAR", + "loc": "7:11-7:13" + }, + { + "token": "FOR", + "loc": "7:14-7:17" + }, + { + "token": [ + "LIDENT", + "i" + ], + "loc": "7:18-7:19" + }, + { + "token": "EQUAL", + "loc": "7:20-7:21" + }, + { + "token": [ + "INT", + "0" + ], + "loc": "7:22-7:23" + }, + { + "token": [ + "SEMI", + true + ], + "loc": "7:23-7:24" + }, + { + "token": [ + "LIDENT", + "i" + ], + "loc": "7:25-7:26" + }, + { + "token": [ + "INFIX1", + "<" + ], + "loc": "7:27-7:28" + }, + { + "token": [ + "INT", + "10" + ], + "loc": "7:29-7:31" + }, + { + "token": [ + "SEMI", + true + ], + "loc": "7:31-7:32" + }, + { + "token": [ + "LIDENT", + "i" + ], + "loc": "7:33-7:34" + }, + { + "token": "EQUAL", + "loc": "7:35-7:36" + }, + { + "token": [ + "LIDENT", + "i" + ], + "loc": "7:37-7:38" + }, + { + "token": "PLUS", + "loc": "7:39-7:40" + }, + { + "token": [ + "INT", + "1" + ], + "loc": "7:41-7:42" + }, + { + "token": "FAT_ARROW", + "loc": "7:43-7:45" + }, + { + "token": [ + "LIDENT", + "i" + ], + "loc": "7:46-7:47" + }, + { + "token": "BAR_RBRACKET", + "loc": "7:48-7:50" + }, + { + "token": "NEWLINE", + "loc": "7:50-7:51" + }, + { + "token": "RBRACE", + "loc": "8:1-8:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "8:2-8:2" + }, + { + "token": "NEWLINE", + "loc": "8:2-8:3" + }, + { + "token": "EOF", + "loc": "9:1-9:1" + } +] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/parse_test_labelled_arg.mbt b/test/sync_test/__snapshot__/parse_test_labelled_arg.mbt index e96fbdf7..3127e6e9 100644 --- a/test/sync_test/__snapshot__/parse_test_labelled_arg.mbt +++ b/test/sync_test/__snapshot__/parse_test_labelled_arg.mbt @@ -49,3 +49,8 @@ fn init { B(x~=_) => () } } + +///| +fn init { + f(label~: for ;; {}) +} diff --git a/test/sync_test/__snapshot__/parse_test_labelled_arg.mbt.tokens.json b/test/sync_test/__snapshot__/parse_test_labelled_arg.mbt.tokens.json index 4764fff0..a793c56d 100644 --- a/test/sync_test/__snapshot__/parse_test_labelled_arg.mbt.tokens.json +++ b/test/sync_test/__snapshot__/parse_test_labelled_arg.mbt.tokens.json @@ -1386,8 +1386,123 @@ "token": "NEWLINE", "loc": "51:2-51:3" }, + { + "token": "NEWLINE", + "loc": "52:1-52:2" + }, + { + "token": [ + "COMMENT", + { + "content": "///|", + "kind": [ + "Ownline", + { + "leading_blank_line": true, + "trailing_blank_line": false + } + ], + "consumed_by_docstring": false + } + ], + "loc": "53:1-53:5" + }, + { + "token": "NEWLINE", + "loc": "53:5-53:6" + }, + { + "token": "FN", + "loc": "54:1-54:3" + }, + { + "token": [ + "LIDENT", + "init" + ], + "loc": "54:4-54:8" + }, + { + "token": "LBRACE", + "loc": "54:9-54:10" + }, + { + "token": "NEWLINE", + "loc": "54:10-54:11" + }, + { + "token": [ + "LIDENT", + "f" + ], + "loc": "55:3-55:4" + }, + { + "token": "LPAREN", + "loc": "55:4-55:5" + }, + { + "token": [ + "POST_LABEL", + "label" + ], + "loc": "55:5-55:11" + }, + { + "token": "COLON", + "loc": "55:11-55:12" + }, + { + "token": "FOR", + "loc": "55:13-55:16" + }, + { + "token": [ + "SEMI", + true + ], + "loc": "55:17-55:18" + }, + { + "token": [ + "SEMI", + true + ], + "loc": "55:18-55:19" + }, + { + "token": "LBRACE", + "loc": "55:20-55:21" + }, + { + "token": "RBRACE", + "loc": "55:21-55:22" + }, + { + "token": "RPAREN", + "loc": "55:22-55:23" + }, + { + "token": "NEWLINE", + "loc": "55:23-55:24" + }, + { + "token": "RBRACE", + "loc": "56:1-56:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "56:2-56:2" + }, + { + "token": "NEWLINE", + "loc": "56:2-56:3" + }, { "token": "EOF", - "loc": "52:1-52:1" + "loc": "57:1-57:1" } ] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/parse_test_lexscan.json b/test/sync_test/__snapshot__/parse_test_lexscan.json new file mode 100644 index 00000000..7b26b503 --- /dev/null +++ b/test/sync_test/__snapshot__/parse_test_lexscan.json @@ -0,0 +1,395 @@ +[ + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "init" + } + }, + "has_error": null, + "is_async": null, + "decl_params": null, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [] + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::Sequence", + "loc": null, + "children": { + "exprs": { + "kind": "Expr::Sequence::ExprList", + "loc": null, + "children": [ + { + "kind": "Expr::Lexscan", + "loc": null, + "children": { + "expr": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "lexbuf" + } + } + } + } + } + }, + "cases": { + "kind": "Expr::Lexscan::CaseList", + "loc": null, + "children": [ + { + "kind": "LexscanCase", + "loc": null, + "children": { + "pat": { + "kind": "LexscanCasePattern::Pattern", + "loc": null, + "children": { + "value": { + "kind": "RegexPattern::Literal", + "loc": null, + "children": { + "lit": "[0-9]+" + } + } + } + }, + "guard": null, + "body": { + "kind": "Expr::Unit", + "loc": null, + "children": { + "faked": false + } + } + } + }, + { + "kind": "LexscanCase", + "loc": null, + "children": { + "pat": { + "kind": "LexscanCasePattern::Pattern", + "loc": null, + "children": { + "value": { + "kind": "RegexPattern::Literal", + "loc": null, + "children": { + "lit": "[a-z]+" + } + } + } + }, + "guard": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "is_alpha" + } + } + } + } + } + }, + "body": { + "kind": "Expr::Unit", + "loc": null, + "children": { + "faked": false + } + } + } + }, + { + "kind": "LexscanCase", + "loc": null, + "children": { + "pat": { + "kind": "LexscanCasePattern::Pattern", + "loc": null, + "children": { + "value": { + "kind": "RegexPattern::Reference", + "loc": null, + "children": { + "lid": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Token" + } + } + } + } + } + }, + "guard": null, + "body": { + "kind": "Expr::Unit", + "loc": null, + "children": { + "faked": false + } + } + } + }, + { + "kind": "LexscanCase", + "loc": null, + "children": { + "pat": { + "kind": "LexscanCasePattern::Binder", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "x" + } + } + } + }, + "guard": null, + "body": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "x" + } + } + } + } + } + } + } + }, + { + "kind": "LexscanCase", + "loc": null, + "children": { + "pat": { + "kind": "LexscanCasePattern::Wildcard", + "loc": null, + "children": {} + }, + "guard": null, + "body": { + "kind": "Expr::Unit", + "loc": null, + "children": { + "faked": false + } + } + } + } + ] + } + } + } + ] + }, + "last_expr": { + "kind": "Expr::Lexscan", + "loc": null, + "children": { + "expr": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "source" + } + } + } + } + } + }, + "cases": { + "kind": "Expr::Lexscan::CaseList", + "loc": null, + "children": [ + { + "kind": "LexscanCase", + "loc": null, + "children": { + "pat": { + "kind": "LexscanCasePattern::Pattern", + "loc": null, + "children": { + "value": { + "kind": "RegexPattern::Alias", + "loc": null, + "children": { + "pat": { + "kind": "RegexPattern::Alternation", + "loc": null, + "children": { + "pat1": { + "kind": "RegexPattern::Literal", + "loc": null, + "children": { + "lit": "if" + } + }, + "pat2": { + "kind": "RegexPattern::Literal", + "loc": null, + "children": { + "lit": "else" + } + } + } + }, + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "keyword" + } + } + } + } + } + }, + "guard": null, + "body": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "keyword" + } + } + } + } + } + } + } + }, + { + "kind": "LexscanCase", + "loc": null, + "children": { + "pat": { + "kind": "LexscanCasePattern::Pattern", + "loc": null, + "children": { + "value": { + "kind": "RegexPattern::Reference", + "loc": null, + "children": { + "lid": { + "kind": "LongIdent::Dot", + "loc": null, + "children": { + "pkg": "pkg", + "id": "Token" + } + } + } + } + } + }, + "guard": null, + "body": { + "kind": "Expr::Unit", + "loc": null, + "children": { + "faked": false + } + } + } + } + ] + } + } + } + } + } + } + } + } + } +] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/parse_test_lexscan.mbt b/test/sync_test/__snapshot__/parse_test_lexscan.mbt new file mode 100644 index 00000000..a5d88a71 --- /dev/null +++ b/test/sync_test/__snapshot__/parse_test_lexscan.mbt @@ -0,0 +1,13 @@ +fn init { + lexscan lexbuf { + re"[0-9]+" => () + re"[a-z]+" if is_alpha => () + Token => () + x => x + _ => () + } + lexscan source { + (re"if" | re"else") as keyword => keyword + @pkg.Token => () + } +} diff --git a/test/sync_test/__snapshot__/parse_test_lexscan.mbt.tokens.json b/test/sync_test/__snapshot__/parse_test_lexscan.mbt.tokens.json new file mode 100644 index 00000000..929e88e6 --- /dev/null +++ b/test/sync_test/__snapshot__/parse_test_lexscan.mbt.tokens.json @@ -0,0 +1,340 @@ +[ + { + "token": "FN", + "loc": "1:1-1:3" + }, + { + "token": [ + "LIDENT", + "init" + ], + "loc": "1:4-1:8" + }, + { + "token": "LBRACE", + "loc": "1:9-1:10" + }, + { + "token": "NEWLINE", + "loc": "1:10-1:11" + }, + { + "token": "LEXSCAN", + "loc": "2:3-2:10" + }, + { + "token": [ + "LIDENT", + "lexbuf" + ], + "loc": "2:11-2:17" + }, + { + "token": "LBRACE", + "loc": "2:18-2:19" + }, + { + "token": "NEWLINE", + "loc": "2:19-2:20" + }, + { + "token": [ + "REGEX_LITERAL", + "[0-9]+" + ], + "loc": "3:5-3:15" + }, + { + "token": "FAT_ARROW", + "loc": "3:16-3:18" + }, + { + "token": "LPAREN", + "loc": "3:19-3:20" + }, + { + "token": "RPAREN", + "loc": "3:20-3:21" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "3:21-3:21" + }, + { + "token": "NEWLINE", + "loc": "3:21-3:22" + }, + { + "token": [ + "REGEX_LITERAL", + "[a-z]+" + ], + "loc": "4:5-4:15" + }, + { + "token": "IF", + "loc": "4:16-4:18" + }, + { + "token": [ + "LIDENT", + "is_alpha" + ], + "loc": "4:19-4:27" + }, + { + "token": "FAT_ARROW", + "loc": "4:28-4:30" + }, + { + "token": "LPAREN", + "loc": "4:31-4:32" + }, + { + "token": "RPAREN", + "loc": "4:32-4:33" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "4:33-4:33" + }, + { + "token": "NEWLINE", + "loc": "4:33-4:34" + }, + { + "token": [ + "UIDENT", + "Token" + ], + "loc": "5:5-5:10" + }, + { + "token": "FAT_ARROW", + "loc": "5:11-5:13" + }, + { + "token": "LPAREN", + "loc": "5:14-5:15" + }, + { + "token": "RPAREN", + "loc": "5:15-5:16" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "5:16-5:16" + }, + { + "token": "NEWLINE", + "loc": "5:16-5:17" + }, + { + "token": [ + "LIDENT", + "x" + ], + "loc": "6:5-6:6" + }, + { + "token": "FAT_ARROW", + "loc": "6:7-6:9" + }, + { + "token": [ + "LIDENT", + "x" + ], + "loc": "6:10-6:11" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "6:11-6:11" + }, + { + "token": "NEWLINE", + "loc": "6:11-6:12" + }, + { + "token": "UNDERSCORE", + "loc": "7:5-7:6" + }, + { + "token": "FAT_ARROW", + "loc": "7:7-7:9" + }, + { + "token": "LPAREN", + "loc": "7:10-7:11" + }, + { + "token": "RPAREN", + "loc": "7:11-7:12" + }, + { + "token": "NEWLINE", + "loc": "7:12-7:13" + }, + { + "token": "RBRACE", + "loc": "8:3-8:4" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "8:4-8:4" + }, + { + "token": "NEWLINE", + "loc": "8:4-8:5" + }, + { + "token": "LEXSCAN", + "loc": "9:3-9:10" + }, + { + "token": [ + "LIDENT", + "source" + ], + "loc": "9:11-9:17" + }, + { + "token": "LBRACE", + "loc": "9:18-9:19" + }, + { + "token": "NEWLINE", + "loc": "9:19-9:20" + }, + { + "token": "LPAREN", + "loc": "10:5-10:6" + }, + { + "token": [ + "REGEX_LITERAL", + "if" + ], + "loc": "10:6-10:12" + }, + { + "token": "BAR", + "loc": "10:13-10:14" + }, + { + "token": [ + "REGEX_LITERAL", + "else" + ], + "loc": "10:15-10:23" + }, + { + "token": "RPAREN", + "loc": "10:23-10:24" + }, + { + "token": "AS", + "loc": "10:25-10:27" + }, + { + "token": [ + "LIDENT", + "keyword" + ], + "loc": "10:28-10:35" + }, + { + "token": "FAT_ARROW", + "loc": "10:36-10:38" + }, + { + "token": [ + "LIDENT", + "keyword" + ], + "loc": "10:39-10:46" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "10:46-10:46" + }, + { + "token": "NEWLINE", + "loc": "10:46-10:47" + }, + { + "token": [ + "PACKAGE_NAME", + "pkg" + ], + "loc": "11:5-11:9" + }, + { + "token": [ + "DOT_UIDENT", + "Token" + ], + "loc": "11:10-11:15" + }, + { + "token": "FAT_ARROW", + "loc": "11:16-11:18" + }, + { + "token": "LPAREN", + "loc": "11:19-11:20" + }, + { + "token": "RPAREN", + "loc": "11:20-11:21" + }, + { + "token": "NEWLINE", + "loc": "11:21-11:22" + }, + { + "token": "RBRACE", + "loc": "12:3-12:4" + }, + { + "token": "NEWLINE", + "loc": "12:4-12:5" + }, + { + "token": "RBRACE", + "loc": "13:1-13:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "13:2-13:2" + }, + { + "token": "NEWLINE", + "loc": "13:2-13:3" + }, + { + "token": "EOF", + "loc": "14:1-14:1" + } +] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/parse_test_nested_exp.json b/test/sync_test/__snapshot__/parse_test_nested_exp.json index b8dd62a4..9c8bc320 100644 --- a/test/sync_test/__snapshot__/parse_test_nested_exp.json +++ b/test/sync_test/__snapshot__/parse_test_nested_exp.json @@ -621,7 +621,8 @@ } } ] - } + }, + "is_iter": false } }, { @@ -659,15 +660,18 @@ } } ] - } + }, + "is_iter": false } } ] - } + }, + "is_iter": false } } ] - } + }, + "is_iter": false } }, "body": { diff --git a/test/sync_test/__snapshot__/parse_test_optional_type_abbrv.json b/test/sync_test/__snapshot__/parse_test_optional_type_abbrv.json index ff468d68..ff8bb7dc 100644 --- a/test/sync_test/__snapshot__/parse_test_optional_type_abbrv.json +++ b/test/sync_test/__snapshot__/parse_test_optional_type_abbrv.json @@ -1071,7 +1071,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -1319,7 +1320,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -1612,7 +1614,8 @@ } } ] - } + }, + "is_iter": false } }, "vis": { diff --git a/test/sync_test/__snapshot__/parse_test_package.json b/test/sync_test/__snapshot__/parse_test_package.json index 7b14cda6..630838d7 100644 --- a/test/sync_test/__snapshot__/parse_test_package.json +++ b/test/sync_test/__snapshot__/parse_test_package.json @@ -53,19 +53,120 @@ "children": [] }, "expr": { - "kind": "Expr::Ident", + "kind": "Expr::Sequence", "loc": null, "children": { - "id": { - "kind": "Var", + "exprs": { + "kind": "Expr::Sequence::ExprList", + "loc": null, + "children": [ + { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Dot", + "loc": null, + "children": { + "pkg": "xx-y", + "id": "v" + } + } + } + } + } + }, + { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Dot", + "loc": null, + "children": { + "pkg": "pkg-one/pkg-two", + "id": "value" + } + } + } + } + } + } + ] + }, + "last_expr": { + "kind": "Expr::Let", "loc": null, "children": { - "name": { - "kind": "LongIdent::Dot", + "pattern": { + "kind": "Pattern::Constraint", + "loc": null, + "children": { + "pat": { + "kind": "Pattern::Any", + "loc": null, + "children": {} + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Dot", + "loc": null, + "children": { + "pkg": "pkg-one/pkg-two", + "id": "Type" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + "expr": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Dot", + "loc": null, + "children": { + "pkg": "pkg-one/pkg-two", + "id": "value" + } + } + } + } + } + }, + "body": { + "kind": "Expr::Unit", "loc": null, "children": { - "pkg": "xx", - "id": "v" + "faked": true } } } diff --git a/test/sync_test/__snapshot__/parse_test_package.mbt b/test/sync_test/__snapshot__/parse_test_package.mbt index 218754d9..3a54ef1e 100644 --- a/test/sync_test/__snapshot__/parse_test_package.mbt +++ b/test/sync_test/__snapshot__/parse_test_package.mbt @@ -1,5 +1,6 @@ fn init { - @xx.v + @xx-y.v + @pkg-one/pkg-two.value + let _ : @pkg-one/pkg-two.Type = @pkg-one/pkg-two.value } - diff --git a/test/sync_test/__snapshot__/parse_test_package.mbt.tokens.json b/test/sync_test/__snapshot__/parse_test_package.mbt.tokens.json index 784a3154..e5ed0be3 100644 --- a/test/sync_test/__snapshot__/parse_test_package.mbt.tokens.json +++ b/test/sync_test/__snapshot__/parse_test_package.mbt.tokens.json @@ -25,42 +25,118 @@ { "token": [ "PACKAGE_NAME", - "xx" + "xx-y" ], - "loc": "3:3-3:6" + "loc": "3:3-3:8" }, { "token": [ "DOT_LIDENT", "v" ], - "loc": "3:7-3:8" + "loc": "3:9-3:10" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "3:10-3:10" }, { "token": "NEWLINE", - "loc": "3:8-3:9" + "loc": "3:10-3:11" }, { - "token": "RBRACE", - "loc": "4:1-4:2" + "token": [ + "PACKAGE_NAME", + "pkg-one/pkg-two" + ], + "loc": "4:3-4:19" + }, + { + "token": [ + "DOT_LIDENT", + "value" + ], + "loc": "4:20-4:25" }, { "token": [ "SEMI", false ], - "loc": "4:2-4:2" + "loc": "4:25-4:25" + }, + { + "token": "NEWLINE", + "loc": "4:25-4:26" + }, + { + "token": "LET", + "loc": "5:3-5:6" + }, + { + "token": "UNDERSCORE", + "loc": "5:7-5:8" + }, + { + "token": "COLON", + "loc": "5:9-5:10" + }, + { + "token": [ + "PACKAGE_NAME", + "pkg-one/pkg-two" + ], + "loc": "5:11-5:27" + }, + { + "token": [ + "DOT_UIDENT", + "Type" + ], + "loc": "5:28-5:32" + }, + { + "token": "EQUAL", + "loc": "5:33-5:34" + }, + { + "token": [ + "PACKAGE_NAME", + "pkg-one/pkg-two" + ], + "loc": "5:35-5:51" + }, + { + "token": [ + "DOT_LIDENT", + "value" + ], + "loc": "5:52-5:57" }, { "token": "NEWLINE", - "loc": "4:2-4:3" + "loc": "5:57-5:58" + }, + { + "token": "RBRACE", + "loc": "6:1-6:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "6:2-6:2" }, { "token": "NEWLINE", - "loc": "5:1-5:2" + "loc": "6:2-6:3" }, { "token": "EOF", - "loc": "6:1-6:1" + "loc": "7:1-7:1" } ] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/parse_test_postfix_label.json b/test/sync_test/__snapshot__/parse_test_postfix_label.json index db443ee2..f728ed5b 100644 --- a/test/sync_test/__snapshot__/parse_test_postfix_label.json +++ b/test/sync_test/__snapshot__/parse_test_postfix_label.json @@ -2563,6 +2563,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, diff --git a/test/sync_test/__snapshot__/pipeline_test_001.json b/test/sync_test/__snapshot__/pipeline_test_001.json index e0bc84d1..54f54239 100644 --- a/test/sync_test/__snapshot__/pipeline_test_001.json +++ b/test/sync_test/__snapshot__/pipeline_test_001.json @@ -1063,7 +1063,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { @@ -1185,7 +1186,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { diff --git a/test/sync_test/__snapshot__/pipeline_test_010.json b/test/sync_test/__snapshot__/pipeline_test_010.json index 7a92c72d..87142783 100644 --- a/test/sync_test/__snapshot__/pipeline_test_010.json +++ b/test/sync_test/__snapshot__/pipeline_test_010.json @@ -681,7 +681,8 @@ } } ] - } + }, + "is_iter": false } }, "vis": { diff --git a/test/sync_test/__snapshot__/pipeline_test_012.json b/test/sync_test/__snapshot__/pipeline_test_012.json index 51384918..6923a31e 100644 --- a/test/sync_test/__snapshot__/pipeline_test_012.json +++ b/test/sync_test/__snapshot__/pipeline_test_012.json @@ -814,7 +814,8 @@ "kind": "Expr::Array::ExprList", "loc": null, "children": [] - } + }, + "is_iter": false } }, "ty": { diff --git a/test/sync_test/__snapshot__/pipeline_test_HAMT.json b/test/sync_test/__snapshot__/pipeline_test_HAMT.json index 120bc71e..4d8e3c4f 100644 --- a/test/sync_test/__snapshot__/pipeline_test_HAMT.json +++ b/test/sync_test/__snapshot__/pipeline_test_HAMT.json @@ -3602,7 +3602,8 @@ } } ] - } + }, + "is_iter": false } }, "is_pun": false diff --git a/test/sync_test/__snapshot__/pipeline_test_add_string.json b/test/sync_test/__snapshot__/pipeline_test_add_string.json index d713975f..e36ba298 100644 --- a/test/sync_test/__snapshot__/pipeline_test_add_string.json +++ b/test/sync_test/__snapshot__/pipeline_test_add_string.json @@ -179,7 +179,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { @@ -309,7 +310,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { diff --git a/test/sync_test/__snapshot__/pipeline_test_alias_to_object_type.json b/test/sync_test/__snapshot__/pipeline_test_alias_to_object_type.json index c9895d45..a268a53f 100644 --- a/test/sync_test/__snapshot__/pipeline_test_alias_to_object_type.json +++ b/test/sync_test/__snapshot__/pipeline_test_alias_to_object_type.json @@ -187,6 +187,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, diff --git a/test/sync_test/__snapshot__/pipeline_test_any_as_object.json b/test/sync_test/__snapshot__/pipeline_test_any_as_object.json index fe6df4d1..b31b9025 100644 --- a/test/sync_test/__snapshot__/pipeline_test_any_as_object.json +++ b/test/sync_test/__snapshot__/pipeline_test_any_as_object.json @@ -300,6 +300,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, diff --git a/test/sync_test/__snapshot__/pipeline_test_array.json b/test/sync_test/__snapshot__/pipeline_test_array.json index 05a539a8..cb999c9f 100644 --- a/test/sync_test/__snapshot__/pipeline_test_array.json +++ b/test/sync_test/__snapshot__/pipeline_test_array.json @@ -287,7 +287,8 @@ } } ] - } + }, + "is_iter": false } }, "vis": { diff --git a/test/sync_test/__snapshot__/pipeline_test_array2.json b/test/sync_test/__snapshot__/pipeline_test_array2.json index 7a5701a0..9d2d0fc3 100644 --- a/test/sync_test/__snapshot__/pipeline_test_array2.json +++ b/test/sync_test/__snapshot__/pipeline_test_array2.json @@ -153,7 +153,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { @@ -388,7 +389,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { diff --git a/test/sync_test/__snapshot__/pipeline_test_array_bool.json b/test/sync_test/__snapshot__/pipeline_test_array_bool.json index 1b958023..bd17da1b 100644 --- a/test/sync_test/__snapshot__/pipeline_test_array_bool.json +++ b/test/sync_test/__snapshot__/pipeline_test_array_bool.json @@ -3660,7 +3660,8 @@ } } ] - } + }, + "is_iter": false } }, "vis": { @@ -3799,7 +3800,8 @@ } } ] - } + }, + "is_iter": false } }, "vis": { @@ -3950,7 +3952,8 @@ "kind": "Expr::Array::ExprList", "loc": null, "children": [] - } + }, + "is_iter": false } }, "body": { @@ -4803,7 +4806,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { @@ -6136,7 +6140,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { @@ -6719,7 +6724,8 @@ "kind": "Expr::Array::ExprList", "loc": null, "children": [] - } + }, + "is_iter": false } }, "kind": { @@ -6838,7 +6844,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -6957,7 +6964,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -7089,7 +7097,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -7221,7 +7230,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -7366,7 +7376,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -7511,7 +7522,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -8501,7 +8513,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { @@ -8927,7 +8940,8 @@ "kind": "Expr::Array::ExprList", "loc": null, "children": [] - } + }, + "is_iter": false } }, "kind": { @@ -9046,7 +9060,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -9165,7 +9180,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -9297,7 +9313,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -9429,7 +9446,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -9574,7 +9592,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -9721,7 +9740,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { diff --git a/test/sync_test/__snapshot__/pipeline_test_array_byte_literal.json b/test/sync_test/__snapshot__/pipeline_test_array_byte_literal.json index ff4c1905..1a8183dc 100644 --- a/test/sync_test/__snapshot__/pipeline_test_array_byte_literal.json +++ b/test/sync_test/__snapshot__/pipeline_test_array_byte_literal.json @@ -238,7 +238,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { @@ -427,7 +428,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { @@ -525,7 +527,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { diff --git a/test/sync_test/__snapshot__/pipeline_test_array_byte_set_null.json b/test/sync_test/__snapshot__/pipeline_test_array_byte_set_null.json index 8169ebe2..b57f0763 100644 --- a/test/sync_test/__snapshot__/pipeline_test_array_byte_set_null.json +++ b/test/sync_test/__snapshot__/pipeline_test_array_byte_set_null.json @@ -172,7 +172,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { diff --git a/test/sync_test/__snapshot__/pipeline_test_array_copy.json b/test/sync_test/__snapshot__/pipeline_test_array_copy.json index ee645aa2..3e58faac 100644 --- a/test/sync_test/__snapshot__/pipeline_test_array_copy.json +++ b/test/sync_test/__snapshot__/pipeline_test_array_copy.json @@ -625,7 +625,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { @@ -949,7 +950,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -1183,7 +1185,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { @@ -1507,7 +1510,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -1688,7 +1692,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { @@ -1792,7 +1797,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { @@ -2088,7 +2094,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -2216,7 +2223,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { diff --git a/test/sync_test/__snapshot__/pipeline_test_array_copy2.json b/test/sync_test/__snapshot__/pipeline_test_array_copy2.json index 217a9fce..1f44d6e6 100644 --- a/test/sync_test/__snapshot__/pipeline_test_array_copy2.json +++ b/test/sync_test/__snapshot__/pipeline_test_array_copy2.json @@ -1713,7 +1713,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { diff --git a/test/sync_test/__snapshot__/pipeline_test_array_int16.json b/test/sync_test/__snapshot__/pipeline_test_array_int16.json index 7ea85094..36981d32 100644 --- a/test/sync_test/__snapshot__/pipeline_test_array_int16.json +++ b/test/sync_test/__snapshot__/pipeline_test_array_int16.json @@ -295,7 +295,8 @@ } } ] - } + }, + "is_iter": false } } } @@ -655,7 +656,8 @@ } } ] - } + }, + "is_iter": false } } } @@ -958,7 +960,8 @@ } } ] - } + }, + "is_iter": false } } } @@ -2771,7 +2774,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { diff --git a/test/sync_test/__snapshot__/pipeline_test_array_intrinsic.json b/test/sync_test/__snapshot__/pipeline_test_array_intrinsic.json index b51699d6..cf8a3dff 100644 --- a/test/sync_test/__snapshot__/pipeline_test_array_intrinsic.json +++ b/test/sync_test/__snapshot__/pipeline_test_array_intrinsic.json @@ -1967,7 +1967,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { diff --git a/test/sync_test/__snapshot__/pipeline_test_array_item_rc.json b/test/sync_test/__snapshot__/pipeline_test_array_item_rc.json index 877845d5..2c29a68f 100644 --- a/test/sync_test/__snapshot__/pipeline_test_array_item_rc.json +++ b/test/sync_test/__snapshot__/pipeline_test_array_item_rc.json @@ -546,7 +546,8 @@ } } ] - } + }, + "is_iter": false } }, "is_pun": false diff --git a/test/sync_test/__snapshot__/pipeline_test_array_iter.json b/test/sync_test/__snapshot__/pipeline_test_array_iter.json index 6015f2a4..a90001b9 100644 --- a/test/sync_test/__snapshot__/pipeline_test_array_iter.json +++ b/test/sync_test/__snapshot__/pipeline_test_array_iter.json @@ -713,7 +713,8 @@ } } ] - } + }, + "is_iter": false } }, { @@ -751,11 +752,13 @@ } } ] - } + }, + "is_iter": false } } ] - } + }, + "is_iter": false } }, "kind": { diff --git a/test/sync_test/__snapshot__/pipeline_test_array_pat.json b/test/sync_test/__snapshot__/pipeline_test_array_pat.json index 86776ed2..1210f508 100644 --- a/test/sync_test/__snapshot__/pipeline_test_array_pat.json +++ b/test/sync_test/__snapshot__/pipeline_test_array_pat.json @@ -620,7 +620,8 @@ "kind": "Expr::Array::ExprList", "loc": null, "children": [] - } + }, + "is_iter": false } }, "kind": { @@ -739,7 +740,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -858,7 +860,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -990,7 +993,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -1122,7 +1126,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -1254,7 +1259,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -1386,7 +1392,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -1531,7 +1538,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { diff --git a/test/sync_test/__snapshot__/pipeline_test_array_rest_pat.json b/test/sync_test/__snapshot__/pipeline_test_array_rest_pat.json index e860715d..3e9cdf4c 100644 --- a/test/sync_test/__snapshot__/pipeline_test_array_rest_pat.json +++ b/test/sync_test/__snapshot__/pipeline_test_array_rest_pat.json @@ -81,7 +81,8 @@ "kind": "Expr::Array::ExprList", "loc": null, "children": [] - } + }, + "is_iter": false } }, "ty": { @@ -178,7 +179,8 @@ } } ] - } + }, + "is_iter": false } }, "ty": { @@ -269,7 +271,8 @@ } } ] - } + }, + "is_iter": false } }, "ty": { @@ -373,7 +376,8 @@ } } ] - } + }, + "is_iter": false } }, "ty": { @@ -490,7 +494,8 @@ } } ] - } + }, + "is_iter": false } }, "ty": { diff --git a/test/sync_test/__snapshot__/pipeline_test_array_spread.json b/test/sync_test/__snapshot__/pipeline_test_array_spread.json index 41af9de1..7e8e5dd5 100644 --- a/test/sync_test/__snapshot__/pipeline_test_array_spread.json +++ b/test/sync_test/__snapshot__/pipeline_test_array_spread.json @@ -107,7 +107,8 @@ } } ] - } + }, + "is_iter": false } }, "vis": { @@ -233,7 +234,8 @@ } } ] - } + }, + "is_iter": false } }, "vis": { @@ -418,7 +420,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { @@ -724,7 +727,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { diff --git a/test/sync_test/__snapshot__/pipeline_test_array_spread_map.json b/test/sync_test/__snapshot__/pipeline_test_array_spread_map.json index 36ae4666..78295353 100644 --- a/test/sync_test/__snapshot__/pipeline_test_array_spread_map.json +++ b/test/sync_test/__snapshot__/pipeline_test_array_spread_map.json @@ -239,7 +239,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -421,7 +422,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { diff --git a/test/sync_test/__snapshot__/pipeline_test_array_spread_set.json b/test/sync_test/__snapshot__/pipeline_test_array_spread_set.json index 93e2c711..a0db7851 100644 --- a/test/sync_test/__snapshot__/pipeline_test_array_spread_set.json +++ b/test/sync_test/__snapshot__/pipeline_test_array_spread_set.json @@ -140,7 +140,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -297,7 +298,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { diff --git a/test/sync_test/__snapshot__/pipeline_test_array_uint16.json b/test/sync_test/__snapshot__/pipeline_test_array_uint16.json index df8c7a3e..39cee3fa 100644 --- a/test/sync_test/__snapshot__/pipeline_test_array_uint16.json +++ b/test/sync_test/__snapshot__/pipeline_test_array_uint16.json @@ -295,7 +295,8 @@ } } ] - } + }, + "is_iter": false } } } @@ -598,7 +599,8 @@ } } ] - } + }, + "is_iter": false } } } @@ -901,7 +903,8 @@ } } ] - } + }, + "is_iter": false } } } @@ -2714,7 +2717,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { diff --git a/test/sync_test/__snapshot__/pipeline_test_array_valtype_ref.json b/test/sync_test/__snapshot__/pipeline_test_array_valtype_ref.json index a6bf3090..da15338f 100644 --- a/test/sync_test/__snapshot__/pipeline_test_array_valtype_ref.json +++ b/test/sync_test/__snapshot__/pipeline_test_array_valtype_ref.json @@ -1462,7 +1462,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { @@ -1566,7 +1567,8 @@ "kind": "Expr::Array::ExprList", "loc": null, "children": [] - } + }, + "is_iter": false } }, "body": { diff --git a/test/sync_test/__snapshot__/pipeline_test_arrayview_conversion.json b/test/sync_test/__snapshot__/pipeline_test_arrayview_conversion.json index a7efe983..31b8cf3f 100644 --- a/test/sync_test/__snapshot__/pipeline_test_arrayview_conversion.json +++ b/test/sync_test/__snapshot__/pipeline_test_arrayview_conversion.json @@ -305,7 +305,8 @@ } } ] - } + }, + "is_iter": false } }, "vis": { @@ -756,7 +757,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -929,7 +931,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { diff --git a/test/sync_test/__snapshot__/pipeline_test_arrayview_empty_array.json b/test/sync_test/__snapshot__/pipeline_test_arrayview_empty_array.json index 86019e2c..26d00dd2 100644 --- a/test/sync_test/__snapshot__/pipeline_test_arrayview_empty_array.json +++ b/test/sync_test/__snapshot__/pipeline_test_arrayview_empty_array.json @@ -130,7 +130,8 @@ "kind": "Expr::Array::ExprList", "loc": null, "children": [] - } + }, + "is_iter": false } }, "kind": { @@ -237,7 +238,8 @@ "kind": "Expr::Array::ExprList", "loc": null, "children": [] - } + }, + "is_iter": false } }, "kind": { diff --git a/test/sync_test/__snapshot__/pipeline_test_arrayview_in_array.json b/test/sync_test/__snapshot__/pipeline_test_arrayview_in_array.json index af79fb4f..62d92517 100644 --- a/test/sync_test/__snapshot__/pipeline_test_arrayview_in_array.json +++ b/test/sync_test/__snapshot__/pipeline_test_arrayview_in_array.json @@ -77,7 +77,8 @@ "kind": "Expr::Array::ExprList", "loc": null, "children": [] - } + }, + "is_iter": false } }, "body": { @@ -230,7 +231,8 @@ } } ] - } + }, + "is_iter": false } }, "start_index": null, diff --git a/test/sync_test/__snapshot__/pipeline_test_arrayview_make_bind.json b/test/sync_test/__snapshot__/pipeline_test_arrayview_make_bind.json index f6232bf9..71324482 100644 --- a/test/sync_test/__snapshot__/pipeline_test_arrayview_make_bind.json +++ b/test/sync_test/__snapshot__/pipeline_test_arrayview_make_bind.json @@ -1528,7 +1528,8 @@ } } ] - } + }, + "is_iter": false } }, "method_name": { diff --git a/test/sync_test/__snapshot__/pipeline_test_as_view_wrap_ok.json b/test/sync_test/__snapshot__/pipeline_test_as_view_wrap_ok.json index f2abd6ea..71fbf31a 100644 --- a/test/sync_test/__snapshot__/pipeline_test_as_view_wrap_ok.json +++ b/test/sync_test/__snapshot__/pipeline_test_as_view_wrap_ok.json @@ -1000,144 +1000,200 @@ "loc": null, "children": { "lhs": { - "kind": "Expr::Group", + "kind": "Expr::Apply", "loc": null, "children": { - "expr": { - "kind": "Expr::TryOperator", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "id": { + "kind": "Var", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "id": { - "kind": "Var", - "loc": null, - "children": { - "name": { - "kind": "LongIdent::Ident", - "loc": null, - "children": { - "value": "array_view" - } - } - } - } + "value": "to_result" } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Function", "loc": null, - "children": [ - { - "kind": "Argument", + "children": { + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "value": { - "kind": "Expr::Array", + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Apply", "loc": null, "children": { - "exprs": { - "kind": "Expr::Array::ExprList", + "func": { + "kind": "Expr::Ident", "loc": null, - "children": [ - { - "kind": "Expr::Constant", + "children": { + "id": { + "kind": "Var", "loc": null, "children": { - "constant": { - "kind": "Constant::Int", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "value": "1" + "value": "array_view" } } } - }, + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ { - "kind": "Expr::Constant", + "kind": "Argument", "loc": null, "children": { - "constant": { - "kind": "Constant::Int", + "value": { + "kind": "Expr::Array", "loc": null, "children": { - "value": "2" + "exprs": { + "kind": "Expr::Array::ExprList", + "loc": null, + "children": [ + { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "1" + } + } + } + }, + { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "2" + } + } + } + }, + { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "3" + } + } + } + } + ] + }, + "is_iter": false } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } } }, { - "kind": "Expr::Constant", + "kind": "Argument", "loc": null, "children": { - "constant": { - "kind": "Constant::Int", + "value": { + "kind": "Expr::Constant", "loc": null, "children": { - "value": "3" + "constant": { + "kind": "Constant::Bool", + "loc": null, + "children": { + "value": true + } + } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } } } ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} } } }, - "kind": { - "kind": "ArgumentKind::Positional", + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", "loc": null, "children": {} - } - } - }, - { - "kind": "Argument", - "loc": null, - "children": { - "value": { - "kind": "Expr::Constant", - "loc": null, - "children": { - "constant": { - "kind": "Constant::Bool", - "loc": null, - "children": { - "value": true - } - } - } }, "kind": { - "kind": "ArgumentKind::Positional", + "kind": "FnKind::Arrow", "loc": null, "children": {} - } + }, + "has_error": null, + "is_async": null } } - ] + } }, - "attr": { - "kind": "ApplyAttr::NoAttr", + "kind": { + "kind": "ArgumentKind::Positional", "loc": null, "children": {} } } - }, - "kind": { - "kind": "TryOperatorKind::Question", - "loc": null, - "children": {} } - } + ] }, - "group": { - "kind": "Group::Paren", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -1169,144 +1225,200 @@ "loc": null, "children": { "lhs": { - "kind": "Expr::Group", + "kind": "Expr::Apply", "loc": null, "children": { - "expr": { - "kind": "Expr::TryOperator", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "id": { + "kind": "Var", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "id": { - "kind": "Var", - "loc": null, - "children": { - "name": { - "kind": "LongIdent::Ident", - "loc": null, - "children": { - "value": "array_view" - } - } - } - } + "value": "to_result" } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Function", "loc": null, - "children": [ - { - "kind": "Argument", + "children": { + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "value": { - "kind": "Expr::Array", + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Apply", "loc": null, "children": { - "exprs": { - "kind": "Expr::Array::ExprList", + "func": { + "kind": "Expr::Ident", "loc": null, - "children": [ - { - "kind": "Expr::Constant", + "children": { + "id": { + "kind": "Var", "loc": null, "children": { - "constant": { - "kind": "Constant::Int", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "value": "1" + "value": "array_view" } } } - }, + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ { - "kind": "Expr::Constant", + "kind": "Argument", "loc": null, "children": { - "constant": { - "kind": "Constant::Int", + "value": { + "kind": "Expr::Array", "loc": null, "children": { - "value": "2" + "exprs": { + "kind": "Expr::Array::ExprList", + "loc": null, + "children": [ + { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "1" + } + } + } + }, + { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "2" + } + } + } + }, + { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "3" + } + } + } + } + ] + }, + "is_iter": false } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } } }, { - "kind": "Expr::Constant", + "kind": "Argument", "loc": null, "children": { - "constant": { - "kind": "Constant::Int", + "value": { + "kind": "Expr::Constant", "loc": null, "children": { - "value": "3" + "constant": { + "kind": "Constant::Bool", + "loc": null, + "children": { + "value": false + } + } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } } } ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} } } }, - "kind": { - "kind": "ArgumentKind::Positional", + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", "loc": null, "children": {} - } - } - }, - { - "kind": "Argument", - "loc": null, - "children": { - "value": { - "kind": "Expr::Constant", - "loc": null, - "children": { - "constant": { - "kind": "Constant::Bool", - "loc": null, - "children": { - "value": false - } - } - } }, "kind": { - "kind": "ArgumentKind::Positional", + "kind": "FnKind::Arrow", "loc": null, "children": {} - } + }, + "has_error": null, + "is_async": null } } - ] + } }, - "attr": { - "kind": "ApplyAttr::NoAttr", + "kind": { + "kind": "ArgumentKind::Positional", "loc": null, "children": {} } } - }, - "kind": { - "kind": "TryOperatorKind::Question", - "loc": null, - "children": {} } - } + ] }, - "group": { - "kind": "Group::Paren", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -1338,106 +1450,161 @@ "loc": null, "children": { "lhs": { - "kind": "Expr::Group", + "kind": "Expr::Apply", "loc": null, "children": { - "expr": { - "kind": "Expr::TryOperator", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "id": { + "kind": "Var", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "id": { - "kind": "Var", - "loc": null, - "children": { - "name": { - "kind": "LongIdent::Ident", - "loc": null, - "children": { - "value": "bytes_view" - } - } - } - } + "value": "to_result" } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Function", "loc": null, - "children": [ - { - "kind": "Argument", + "children": { + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "value": { - "kind": "Expr::Constant", + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Apply", "loc": null, "children": { - "constant": { - "kind": "Constant::Bytes", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "value": "abc" + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "bytes_view" + } + } + } + } } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Bytes", + "loc": null, + "children": { + "value": "abc" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Bool", + "loc": null, + "children": { + "value": true + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} } } }, - "kind": { - "kind": "ArgumentKind::Positional", + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", "loc": null, "children": {} - } - } - }, - { - "kind": "Argument", - "loc": null, - "children": { - "value": { - "kind": "Expr::Constant", - "loc": null, - "children": { - "constant": { - "kind": "Constant::Bool", - "loc": null, - "children": { - "value": true - } - } - } }, "kind": { - "kind": "ArgumentKind::Positional", + "kind": "FnKind::Arrow", "loc": null, "children": {} - } + }, + "has_error": null, + "is_async": null } } - ] + } }, - "attr": { - "kind": "ApplyAttr::NoAttr", + "kind": { + "kind": "ArgumentKind::Positional", "loc": null, "children": {} } } - }, - "kind": { - "kind": "TryOperatorKind::Question", - "loc": null, - "children": {} } - } + ] }, - "group": { - "kind": "Group::Paren", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -1469,106 +1636,161 @@ "loc": null, "children": { "lhs": { - "kind": "Expr::Group", + "kind": "Expr::Apply", "loc": null, "children": { - "expr": { - "kind": "Expr::TryOperator", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "id": { + "kind": "Var", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "id": { - "kind": "Var", - "loc": null, - "children": { - "name": { - "kind": "LongIdent::Ident", - "loc": null, - "children": { - "value": "bytes_view" - } - } - } - } + "value": "to_result" } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Function", "loc": null, - "children": [ - { - "kind": "Argument", + "children": { + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "value": { - "kind": "Expr::Constant", + "parameters": { + "kind": "Func::Lambda::ParameterList", "loc": null, - "children": { - "constant": { - "kind": "Constant::Bytes", - "loc": null, - "children": { - "value": "abc" - } - } - } + "children": [] }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} - } - } - }, - { - "kind": "Argument", - "loc": null, - "children": { - "value": { - "kind": "Expr::Constant", + "body": { + "kind": "Expr::Apply", "loc": null, "children": { - "constant": { - "kind": "Constant::Bool", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "value": false - } - } - } + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "bytes_view" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Bytes", + "loc": null, + "children": { + "value": "abc" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Bool", + "loc": null, + "children": { + "value": false + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} }, "kind": { - "kind": "ArgumentKind::Positional", + "kind": "FnKind::Arrow", "loc": null, "children": {} - } + }, + "has_error": null, + "is_async": null } } - ] + } }, - "attr": { - "kind": "ApplyAttr::NoAttr", + "kind": { + "kind": "ArgumentKind::Positional", "loc": null, "children": {} } } - }, - "kind": { - "kind": "TryOperatorKind::Question", - "loc": null, - "children": {} } - } + ] }, - "group": { - "kind": "Group::Paren", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -1600,106 +1822,161 @@ "loc": null, "children": { "lhs": { - "kind": "Expr::Group", + "kind": "Expr::Apply", "loc": null, "children": { - "expr": { - "kind": "Expr::TryOperator", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "id": { + "kind": "Var", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "id": { - "kind": "Var", - "loc": null, - "children": { - "name": { - "kind": "LongIdent::Ident", - "loc": null, - "children": { - "value": "string_view" - } - } - } - } + "value": "to_result" } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Function", "loc": null, - "children": [ - { - "kind": "Argument", + "children": { + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "value": { - "kind": "Expr::Constant", + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Apply", "loc": null, "children": { - "constant": { - "kind": "Constant::String", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "value": "abc" + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "string_view" + } + } + } + } } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "abc" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Bool", + "loc": null, + "children": { + "value": true + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} } } }, - "kind": { - "kind": "ArgumentKind::Positional", + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", "loc": null, "children": {} - } - } - }, - { - "kind": "Argument", - "loc": null, - "children": { - "value": { - "kind": "Expr::Constant", - "loc": null, - "children": { - "constant": { - "kind": "Constant::Bool", - "loc": null, - "children": { - "value": true - } - } - } }, "kind": { - "kind": "ArgumentKind::Positional", + "kind": "FnKind::Arrow", "loc": null, "children": {} - } + }, + "has_error": null, + "is_async": null } } - ] + } }, - "attr": { - "kind": "ApplyAttr::NoAttr", + "kind": { + "kind": "ArgumentKind::Positional", "loc": null, "children": {} } } - }, - "kind": { - "kind": "TryOperatorKind::Question", - "loc": null, - "children": {} } - } + ] }, - "group": { - "kind": "Group::Paren", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -1733,106 +2010,161 @@ "loc": null, "children": { "lhs": { - "kind": "Expr::Group", + "kind": "Expr::Apply", "loc": null, "children": { - "expr": { - "kind": "Expr::TryOperator", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "id": { + "kind": "Var", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "id": { - "kind": "Var", - "loc": null, - "children": { - "name": { - "kind": "LongIdent::Ident", - "loc": null, - "children": { - "value": "string_view" - } - } - } - } + "value": "to_result" } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Function", "loc": null, - "children": [ - { - "kind": "Argument", + "children": { + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "value": { - "kind": "Expr::Constant", + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Apply", "loc": null, "children": { - "constant": { - "kind": "Constant::String", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "value": "abc" + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "string_view" + } + } + } + } } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "abc" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Bool", + "loc": null, + "children": { + "value": false + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} } } }, - "kind": { - "kind": "ArgumentKind::Positional", + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", "loc": null, "children": {} - } - } - }, - { - "kind": "Argument", - "loc": null, - "children": { - "value": { - "kind": "Expr::Constant", - "loc": null, - "children": { - "constant": { - "kind": "Constant::Bool", - "loc": null, - "children": { - "value": false - } - } - } }, "kind": { - "kind": "ArgumentKind::Positional", + "kind": "FnKind::Arrow", "loc": null, "children": {} - } + }, + "has_error": null, + "is_async": null } } - ] + } }, - "attr": { - "kind": "ApplyAttr::NoAttr", + "kind": { + "kind": "ArgumentKind::Positional", "loc": null, "children": {} } } - }, - "kind": { - "kind": "TryOperatorKind::Question", - "loc": null, - "children": {} } - } + ] }, - "group": { - "kind": "Group::Paren", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -1864,5 +2196,524 @@ } } } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "to_result" + } + }, + "has_error": null, + "is_async": null, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "f" + } + }, + "ty": { + "kind": "Type::Arrow", + "loc": null, + "children": { + "args": { + "kind": "Type::Arrow::ArgList", + "loc": null, + "children": [] + }, + "res": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "T" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "err": { + "kind": "ErrorType::ErrorType", + "loc": null, + "children": { + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "E" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + "is_async": null + } + } + } + } + ] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [ + { + "kind": "TypeVarBinder", + "loc": null, + "children": { + "name": "T", + "constraints": { + "kind": "TypeVarBinder::TypeVarConstraintList", + "loc": null, + "children": [] + } + } + }, + { + "kind": "TypeVarBinder", + "loc": null, + "children": { + "name": "E", + "constraints": { + "kind": "TypeVarBinder::TypeVarConstraintList", + "loc": null, + "children": [ + { + "kind": "TypeVarConstraint", + "loc": null, + "children": { + "trait": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Error" + } + } + } + } + ] + } + } + } + ] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [ + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "T" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "E" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + ] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::Try", + "loc": null, + "children": { + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "f" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "catch": { + "kind": "Expr::Try::CaseList", + "loc": null, + "children": [ + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "err" + } + } + } + }, + "guard": null, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Err" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::TypeName", + "loc": null, + "children": { + "value": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + }, + "is_object": false + } + } + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "err" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + ] + }, + "catch_all": false, + "try_else": { + "kind": "Expr::Try::CaseList", + "loc": null, + "children": [ + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "value" + } + } + } + }, + "guard": null, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Ok" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::TypeName", + "loc": null, + "children": { + "value": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + }, + "is_object": false + } + } + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "value" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + ] + }, + "has_try": true + } + } + } + } + } } ] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/pipeline_test_as_view_wrap_ok.mbt b/test/sync_test/__snapshot__/pipeline_test_as_view_wrap_ok.mbt index ac1678ac..d64fb84e 100644 --- a/test/sync_test/__snapshot__/pipeline_test_as_view_wrap_ok.mbt +++ b/test/sync_test/__snapshot__/pipeline_test_as_view_wrap_ok.mbt @@ -22,10 +22,19 @@ fn string_view(str : String, coin : Bool) -> StringView raise Err { } fn main { - (try? array_view([1, 2, 3], true)) |> debug - (try? array_view([1, 2, 3], false)) |> debug - (try? bytes_view(b"abc", true)) |> debug - (try? bytes_view(b"abc", false)) |> debug - (try? string_view("abc", true)) |> debug - (try? string_view("abc", false)) |> debug + to_result(() => array_view([1, 2, 3], true)) |> debug + to_result(() => array_view([1, 2, 3], false)) |> debug + to_result(() => bytes_view(b"abc", true)) |> debug + to_result(() => bytes_view(b"abc", false)) |> debug + to_result(() => string_view("abc", true)) |> debug + to_result(() => string_view("abc", false)) |> debug +} + +fn[T, E : Error] to_result(f : () -> T raise E) -> Result[T, E] { + try f() + catch { + err => Result::Err(err) + } noraise { + value => Result::Ok(value) + } } diff --git a/test/sync_test/__snapshot__/pipeline_test_as_view_wrap_ok.mbt.tokens.json b/test/sync_test/__snapshot__/pipeline_test_as_view_wrap_ok.mbt.tokens.json index 46435eb0..e653b34f 100644 --- a/test/sync_test/__snapshot__/pipeline_test_as_view_wrap_ok.mbt.tokens.json +++ b/test/sync_test/__snapshot__/pipeline_test_as_view_wrap_ok.mbt.tokens.json @@ -597,442 +597,532 @@ "token": "NEWLINE", "loc": "24:10-24:11" }, + { + "token": [ + "LIDENT", + "to_result" + ], + "loc": "25:3-25:12" + }, { "token": "LPAREN", - "loc": "25:3-25:4" + "loc": "25:12-25:13" + }, + { + "token": "LPAREN", + "loc": "25:13-25:14" + }, + { + "token": "RPAREN", + "loc": "25:14-25:15" }, { - "token": "TRY_QUESTION", - "loc": "25:4-25:8" + "token": "FAT_ARROW", + "loc": "25:16-25:18" }, { "token": [ "LIDENT", "array_view" ], - "loc": "25:9-25:19" + "loc": "25:19-25:29" }, { "token": "LPAREN", - "loc": "25:19-25:20" + "loc": "25:29-25:30" }, { "token": "LBRACKET", - "loc": "25:20-25:21" + "loc": "25:30-25:31" }, { "token": [ "INT", "1" ], - "loc": "25:21-25:22" + "loc": "25:31-25:32" }, { "token": "COMMA", - "loc": "25:22-25:23" + "loc": "25:32-25:33" }, { "token": [ "INT", "2" ], - "loc": "25:24-25:25" + "loc": "25:34-25:35" }, { "token": "COMMA", - "loc": "25:25-25:26" + "loc": "25:35-25:36" }, { "token": [ "INT", "3" ], - "loc": "25:27-25:28" + "loc": "25:37-25:38" }, { "token": "RBRACKET", - "loc": "25:28-25:29" + "loc": "25:38-25:39" }, { "token": "COMMA", - "loc": "25:29-25:30" + "loc": "25:39-25:40" }, { "token": "TRUE", - "loc": "25:31-25:35" + "loc": "25:41-25:45" }, { "token": "RPAREN", - "loc": "25:35-25:36" + "loc": "25:45-25:46" }, { "token": "RPAREN", - "loc": "25:36-25:37" + "loc": "25:46-25:47" }, { "token": "PIPE", - "loc": "25:38-25:40" + "loc": "25:48-25:50" }, { "token": [ "LIDENT", "debug" ], - "loc": "25:41-25:46" + "loc": "25:51-25:56" }, { "token": [ "SEMI", false ], - "loc": "25:46-25:46" + "loc": "25:56-25:56" }, { "token": "NEWLINE", - "loc": "25:46-25:47" + "loc": "25:56-25:57" + }, + { + "token": [ + "LIDENT", + "to_result" + ], + "loc": "26:3-26:12" + }, + { + "token": "LPAREN", + "loc": "26:12-26:13" }, { "token": "LPAREN", - "loc": "26:3-26:4" + "loc": "26:13-26:14" }, { - "token": "TRY_QUESTION", - "loc": "26:4-26:8" + "token": "RPAREN", + "loc": "26:14-26:15" + }, + { + "token": "FAT_ARROW", + "loc": "26:16-26:18" }, { "token": [ "LIDENT", "array_view" ], - "loc": "26:9-26:19" + "loc": "26:19-26:29" }, { "token": "LPAREN", - "loc": "26:19-26:20" + "loc": "26:29-26:30" }, { "token": "LBRACKET", - "loc": "26:20-26:21" + "loc": "26:30-26:31" }, { "token": [ "INT", "1" ], - "loc": "26:21-26:22" + "loc": "26:31-26:32" }, { "token": "COMMA", - "loc": "26:22-26:23" + "loc": "26:32-26:33" }, { "token": [ "INT", "2" ], - "loc": "26:24-26:25" + "loc": "26:34-26:35" }, { "token": "COMMA", - "loc": "26:25-26:26" + "loc": "26:35-26:36" }, { "token": [ "INT", "3" ], - "loc": "26:27-26:28" + "loc": "26:37-26:38" }, { "token": "RBRACKET", - "loc": "26:28-26:29" + "loc": "26:38-26:39" }, { "token": "COMMA", - "loc": "26:29-26:30" + "loc": "26:39-26:40" }, { "token": "FALSE", - "loc": "26:31-26:36" + "loc": "26:41-26:46" }, { "token": "RPAREN", - "loc": "26:36-26:37" + "loc": "26:46-26:47" }, { "token": "RPAREN", - "loc": "26:37-26:38" + "loc": "26:47-26:48" }, { "token": "PIPE", - "loc": "26:39-26:41" + "loc": "26:49-26:51" }, { "token": [ "LIDENT", "debug" ], - "loc": "26:42-26:47" + "loc": "26:52-26:57" }, { "token": [ "SEMI", false ], - "loc": "26:47-26:47" + "loc": "26:57-26:57" }, { "token": "NEWLINE", - "loc": "26:47-26:48" + "loc": "26:57-26:58" + }, + { + "token": [ + "LIDENT", + "to_result" + ], + "loc": "27:3-27:12" }, { "token": "LPAREN", - "loc": "27:3-27:4" + "loc": "27:12-27:13" }, { - "token": "TRY_QUESTION", - "loc": "27:4-27:8" + "token": "LPAREN", + "loc": "27:13-27:14" + }, + { + "token": "RPAREN", + "loc": "27:14-27:15" + }, + { + "token": "FAT_ARROW", + "loc": "27:16-27:18" }, { "token": [ "LIDENT", "bytes_view" ], - "loc": "27:9-27:19" + "loc": "27:19-27:29" }, { "token": "LPAREN", - "loc": "27:19-27:20" + "loc": "27:29-27:30" }, { "token": [ "BYTES", "abc" ], - "loc": "27:20-27:26" + "loc": "27:30-27:36" }, { "token": "COMMA", - "loc": "27:26-27:27" + "loc": "27:36-27:37" }, { "token": "TRUE", - "loc": "27:28-27:32" + "loc": "27:38-27:42" }, { "token": "RPAREN", - "loc": "27:32-27:33" + "loc": "27:42-27:43" }, { "token": "RPAREN", - "loc": "27:33-27:34" + "loc": "27:43-27:44" }, { "token": "PIPE", - "loc": "27:35-27:37" + "loc": "27:45-27:47" }, { "token": [ "LIDENT", "debug" ], - "loc": "27:38-27:43" + "loc": "27:48-27:53" }, { "token": [ "SEMI", false ], - "loc": "27:43-27:43" + "loc": "27:53-27:53" }, { "token": "NEWLINE", - "loc": "27:43-27:44" + "loc": "27:53-27:54" + }, + { + "token": [ + "LIDENT", + "to_result" + ], + "loc": "28:3-28:12" + }, + { + "token": "LPAREN", + "loc": "28:12-28:13" }, { "token": "LPAREN", - "loc": "28:3-28:4" + "loc": "28:13-28:14" }, { - "token": "TRY_QUESTION", - "loc": "28:4-28:8" + "token": "RPAREN", + "loc": "28:14-28:15" + }, + { + "token": "FAT_ARROW", + "loc": "28:16-28:18" }, { "token": [ "LIDENT", "bytes_view" ], - "loc": "28:9-28:19" + "loc": "28:19-28:29" }, { "token": "LPAREN", - "loc": "28:19-28:20" + "loc": "28:29-28:30" }, { "token": [ "BYTES", "abc" ], - "loc": "28:20-28:26" + "loc": "28:30-28:36" }, { "token": "COMMA", - "loc": "28:26-28:27" + "loc": "28:36-28:37" }, { "token": "FALSE", - "loc": "28:28-28:33" + "loc": "28:38-28:43" }, { "token": "RPAREN", - "loc": "28:33-28:34" + "loc": "28:43-28:44" }, { "token": "RPAREN", - "loc": "28:34-28:35" + "loc": "28:44-28:45" }, { "token": "PIPE", - "loc": "28:36-28:38" + "loc": "28:46-28:48" }, { "token": [ "LIDENT", "debug" ], - "loc": "28:39-28:44" + "loc": "28:49-28:54" }, { "token": [ "SEMI", false ], - "loc": "28:44-28:44" + "loc": "28:54-28:54" }, { "token": "NEWLINE", - "loc": "28:44-28:45" + "loc": "28:54-28:55" + }, + { + "token": [ + "LIDENT", + "to_result" + ], + "loc": "29:3-29:12" }, { "token": "LPAREN", - "loc": "29:3-29:4" + "loc": "29:12-29:13" }, { - "token": "TRY_QUESTION", - "loc": "29:4-29:8" + "token": "LPAREN", + "loc": "29:13-29:14" + }, + { + "token": "RPAREN", + "loc": "29:14-29:15" + }, + { + "token": "FAT_ARROW", + "loc": "29:16-29:18" }, { "token": [ "LIDENT", "string_view" ], - "loc": "29:9-29:20" + "loc": "29:19-29:30" }, { "token": "LPAREN", - "loc": "29:20-29:21" + "loc": "29:30-29:31" }, { "token": [ "STRING", "abc" ], - "loc": "29:21-29:26" + "loc": "29:31-29:36" }, { "token": "COMMA", - "loc": "29:26-29:27" + "loc": "29:36-29:37" }, { "token": "TRUE", - "loc": "29:28-29:32" + "loc": "29:38-29:42" }, { "token": "RPAREN", - "loc": "29:32-29:33" + "loc": "29:42-29:43" }, { "token": "RPAREN", - "loc": "29:33-29:34" + "loc": "29:43-29:44" }, { "token": "PIPE", - "loc": "29:35-29:37" + "loc": "29:45-29:47" }, { "token": [ "LIDENT", "debug" ], - "loc": "29:38-29:43" + "loc": "29:48-29:53" }, { "token": [ "SEMI", false ], - "loc": "29:43-29:43" + "loc": "29:53-29:53" }, { "token": "NEWLINE", - "loc": "29:43-29:44" + "loc": "29:53-29:54" + }, + { + "token": [ + "LIDENT", + "to_result" + ], + "loc": "30:3-30:12" }, { "token": "LPAREN", - "loc": "30:3-30:4" + "loc": "30:12-30:13" }, { - "token": "TRY_QUESTION", - "loc": "30:4-30:8" + "token": "LPAREN", + "loc": "30:13-30:14" + }, + { + "token": "RPAREN", + "loc": "30:14-30:15" + }, + { + "token": "FAT_ARROW", + "loc": "30:16-30:18" }, { "token": [ "LIDENT", "string_view" ], - "loc": "30:9-30:20" + "loc": "30:19-30:30" }, { "token": "LPAREN", - "loc": "30:20-30:21" + "loc": "30:30-30:31" }, { "token": [ "STRING", "abc" ], - "loc": "30:21-30:26" + "loc": "30:31-30:36" }, { "token": "COMMA", - "loc": "30:26-30:27" + "loc": "30:36-30:37" }, { "token": "FALSE", - "loc": "30:28-30:33" + "loc": "30:38-30:43" }, { "token": "RPAREN", - "loc": "30:33-30:34" + "loc": "30:43-30:44" }, { "token": "RPAREN", - "loc": "30:34-30:35" + "loc": "30:44-30:45" }, { "token": "PIPE", - "loc": "30:36-30:38" + "loc": "30:46-30:48" }, { "token": [ "LIDENT", "debug" ], - "loc": "30:39-30:44" + "loc": "30:49-30:54" }, { "token": "NEWLINE", - "loc": "30:44-30:45" + "loc": "30:54-30:55" }, { "token": "RBRACE", @@ -1049,8 +1139,324 @@ "token": "NEWLINE", "loc": "31:2-31:3" }, + { + "token": "NEWLINE", + "loc": "32:1-32:2" + }, + { + "token": "FN", + "loc": "33:1-33:3" + }, + { + "token": "LBRACKET", + "loc": "33:3-33:4" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "33:4-33:5" + }, + { + "token": "COMMA", + "loc": "33:5-33:6" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "33:7-33:8" + }, + { + "token": "COLON", + "loc": "33:9-33:10" + }, + { + "token": [ + "UIDENT", + "Error" + ], + "loc": "33:11-33:16" + }, + { + "token": "RBRACKET", + "loc": "33:16-33:17" + }, + { + "token": [ + "LIDENT", + "to_result" + ], + "loc": "33:18-33:27" + }, + { + "token": "LPAREN", + "loc": "33:27-33:28" + }, + { + "token": [ + "LIDENT", + "f" + ], + "loc": "33:28-33:29" + }, + { + "token": "COLON", + "loc": "33:30-33:31" + }, + { + "token": "LPAREN", + "loc": "33:32-33:33" + }, + { + "token": "RPAREN", + "loc": "33:33-33:34" + }, + { + "token": "THIN_ARROW", + "loc": "33:35-33:37" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "33:38-33:39" + }, + { + "token": "RAISE", + "loc": "33:40-33:45" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "33:46-33:47" + }, + { + "token": "RPAREN", + "loc": "33:47-33:48" + }, + { + "token": "THIN_ARROW", + "loc": "33:49-33:51" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "33:52-33:58" + }, + { + "token": "LBRACKET", + "loc": "33:58-33:59" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "33:59-33:60" + }, + { + "token": "COMMA", + "loc": "33:60-33:61" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "33:62-33:63" + }, + { + "token": "RBRACKET", + "loc": "33:63-33:64" + }, + { + "token": "LBRACE", + "loc": "33:65-33:66" + }, + { + "token": "NEWLINE", + "loc": "33:66-33:67" + }, + { + "token": "TRY", + "loc": "34:3-34:6" + }, + { + "token": [ + "LIDENT", + "f" + ], + "loc": "34:7-34:8" + }, + { + "token": "LPAREN", + "loc": "34:8-34:9" + }, + { + "token": "RPAREN", + "loc": "34:9-34:10" + }, + { + "token": "NEWLINE", + "loc": "34:10-34:11" + }, + { + "token": "CATCH", + "loc": "35:3-35:8" + }, + { + "token": "LBRACE", + "loc": "35:9-35:10" + }, + { + "token": "NEWLINE", + "loc": "35:10-35:11" + }, + { + "token": [ + "LIDENT", + "err" + ], + "loc": "36:5-36:8" + }, + { + "token": "FAT_ARROW", + "loc": "36:9-36:11" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "36:12-36:18" + }, + { + "token": "COLONCOLON", + "loc": "36:18-36:20" + }, + { + "token": [ + "UIDENT", + "Err" + ], + "loc": "36:20-36:23" + }, + { + "token": "LPAREN", + "loc": "36:23-36:24" + }, + { + "token": [ + "LIDENT", + "err" + ], + "loc": "36:24-36:27" + }, + { + "token": "RPAREN", + "loc": "36:27-36:28" + }, + { + "token": "NEWLINE", + "loc": "36:28-36:29" + }, + { + "token": "RBRACE", + "loc": "37:3-37:4" + }, + { + "token": "NORAISE", + "loc": "37:5-37:12" + }, + { + "token": "LBRACE", + "loc": "37:13-37:14" + }, + { + "token": "NEWLINE", + "loc": "37:14-37:15" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "38:5-38:10" + }, + { + "token": "FAT_ARROW", + "loc": "38:11-38:13" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "38:14-38:20" + }, + { + "token": "COLONCOLON", + "loc": "38:20-38:22" + }, + { + "token": [ + "UIDENT", + "Ok" + ], + "loc": "38:22-38:24" + }, + { + "token": "LPAREN", + "loc": "38:24-38:25" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "38:25-38:30" + }, + { + "token": "RPAREN", + "loc": "38:30-38:31" + }, + { + "token": "NEWLINE", + "loc": "38:31-38:32" + }, + { + "token": "RBRACE", + "loc": "39:3-39:4" + }, + { + "token": "NEWLINE", + "loc": "39:4-39:5" + }, + { + "token": "RBRACE", + "loc": "40:1-40:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "40:2-40:2" + }, + { + "token": "NEWLINE", + "loc": "40:2-40:3" + }, { "token": "EOF", - "loc": "32:1-32:1" + "loc": "41:1-41:1" } ] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/pipeline_test_assoc_array.json b/test/sync_test/__snapshot__/pipeline_test_assoc_array.json index cfd3e26b..894c9975 100644 --- a/test/sync_test/__snapshot__/pipeline_test_assoc_array.json +++ b/test/sync_test/__snapshot__/pipeline_test_assoc_array.json @@ -1465,7 +1465,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -1675,7 +1676,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -2119,7 +2121,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { diff --git a/test/sync_test/__snapshot__/pipeline_test_async_and_err.json b/test/sync_test/__snapshot__/pipeline_test_async_and_err.json index 09381f77..c74a0c9d 100644 --- a/test/sync_test/__snapshot__/pipeline_test_async_and_err.json +++ b/test/sync_test/__snapshot__/pipeline_test_async_and_err.json @@ -827,46 +827,112 @@ "loc": null, "children": { "value": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", + "value": "to_result" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Function", + "loc": null, + "children": { + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "value": "sync_with_err" + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "sync_with_err" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null } } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", - "loc": null, - "children": [] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} } - } + ] }, - "kind": { - "kind": "TryOperatorKind::Question", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -3061,6 +3127,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, @@ -4945,46 +5016,116 @@ "loc": null, "children": { "value": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", + "value": "to_result_async" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Function", + "loc": null, + "children": { + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "value": "raise_to_async_handler_in_arg" + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "raise_to_async_handler_in_arg" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::DefaultErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Lambda", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": { + "kind": "Async", + "loc": null, + "children": {} + } } } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", - "loc": null, - "children": [] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} } - } + ] }, - "kind": { - "kind": "TryOperatorKind::Question", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -5042,5 +5183,1051 @@ } } } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "to_result" + } + }, + "has_error": null, + "is_async": null, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "f" + } + }, + "ty": { + "kind": "Type::Arrow", + "loc": null, + "children": { + "args": { + "kind": "Type::Arrow::ArgList", + "loc": null, + "children": [] + }, + "res": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "T" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "err": { + "kind": "ErrorType::ErrorType", + "loc": null, + "children": { + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "E" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + "is_async": null + } + } + } + } + ] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [ + { + "kind": "TypeVarBinder", + "loc": null, + "children": { + "name": "T", + "constraints": { + "kind": "TypeVarBinder::TypeVarConstraintList", + "loc": null, + "children": [] + } + } + }, + { + "kind": "TypeVarBinder", + "loc": null, + "children": { + "name": "E", + "constraints": { + "kind": "TypeVarBinder::TypeVarConstraintList", + "loc": null, + "children": [ + { + "kind": "TypeVarConstraint", + "loc": null, + "children": { + "trait": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Error" + } + } + } + } + ] + } + } + } + ] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [ + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "T" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "E" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + ] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::Try", + "loc": null, + "children": { + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "f" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "catch": { + "kind": "Expr::Try::CaseList", + "loc": null, + "children": [ + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "err" + } + } + } + }, + "guard": null, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Err" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::TypeName", + "loc": null, + "children": { + "value": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + }, + "is_object": false + } + } + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "err" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + ] + }, + "catch_all": false, + "try_else": { + "kind": "Expr::Try::CaseList", + "loc": null, + "children": [ + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "value" + } + } + } + }, + "guard": null, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Ok" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::TypeName", + "loc": null, + "children": { + "value": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + }, + "is_object": false + } + } + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "value" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + ] + }, + "has_try": true + } + } + } + } + } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "to_result_async" + } + }, + "has_error": null, + "is_async": { + "kind": "Async", + "loc": null, + "children": {} + }, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "f" + } + }, + "ty": { + "kind": "Type::Arrow", + "loc": null, + "children": { + "args": { + "kind": "Type::Arrow::ArgList", + "loc": null, + "children": [] + }, + "res": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "T" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "err": { + "kind": "ErrorType::ErrorType", + "loc": null, + "children": { + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "E" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + "is_async": { + "kind": "Async", + "loc": null, + "children": {} + } + } + } + } + } + ] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [ + { + "kind": "TypeVarBinder", + "loc": null, + "children": { + "name": "T", + "constraints": { + "kind": "TypeVarBinder::TypeVarConstraintList", + "loc": null, + "children": [] + } + } + }, + { + "kind": "TypeVarBinder", + "loc": null, + "children": { + "name": "E", + "constraints": { + "kind": "TypeVarBinder::TypeVarConstraintList", + "loc": null, + "children": [ + { + "kind": "TypeVarConstraint", + "loc": null, + "children": { + "trait": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Error" + } + } + } + } + ] + } + } + } + ] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [ + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "T" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "E" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + ] + } + } + }, + "error_type": { + "kind": "ErrorType::Noraise", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::Try", + "loc": null, + "children": { + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "f" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "catch": { + "kind": "Expr::Try::CaseList", + "loc": null, + "children": [ + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "err" + } + } + } + }, + "guard": null, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Err" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::TypeName", + "loc": null, + "children": { + "value": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + }, + "is_object": false + } + } + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "err" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + ] + }, + "catch_all": false, + "try_else": { + "kind": "Expr::Try::CaseList", + "loc": null, + "children": [ + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "value" + } + } + } + }, + "guard": null, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Ok" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::TypeName", + "loc": null, + "children": { + "value": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + }, + "is_object": false + } + } + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "value" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + ] + }, + "has_try": true + } + } + } + } + } } ] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/pipeline_test_async_and_err.mbt b/test/sync_test/__snapshot__/pipeline_test_async_and_err.mbt index 2fd2e2bc..4aea4e89 100644 --- a/test/sync_test/__snapshot__/pipeline_test_async_and_err.mbt +++ b/test/sync_test/__snapshot__/pipeline_test_async_and_err.mbt @@ -10,7 +10,7 @@ fn sync_with_err() -> Unit raise Err { } async fn async_to_result() -> Unit noraise { - debug(try? sync_with_err()) + debug(to_result(() => sync_with_err())) } fn init { @@ -125,5 +125,25 @@ async fn raise_to_async_handler_in_arg() -> Unit { } fn init { - run_async(() => debug(try? raise_to_async_handler_in_arg())) + run_async(() => debug(to_result_async(async fn () raise { raise_to_async_handler_in_arg() }))) +} + +fn[T, E : Error] to_result(f : () -> T raise E) -> Result[T, E] { + try f() + catch { + err => Result::Err(err) + } noraise { + value => Result::Ok(value) + } +} + +async fn[T, E : Error] to_result_async( + f : async () -> T raise E +) -> Result[T, E] noraise { + try f() + catch { + err => Result::Err(err) + } noraise { + value => Result::Ok(value) + } } diff --git a/test/sync_test/__snapshot__/pipeline_test_async_and_err.mbt.tokens.json b/test/sync_test/__snapshot__/pipeline_test_async_and_err.mbt.tokens.json index ce5556b2..c074373f 100644 --- a/test/sync_test/__snapshot__/pipeline_test_async_and_err.mbt.tokens.json +++ b/test/sync_test/__snapshot__/pipeline_test_async_and_err.mbt.tokens.json @@ -494,31 +494,54 @@ "loc": "13:8-13:9" }, { - "token": "TRY_QUESTION", - "loc": "13:9-13:13" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "13:9-13:18" + }, + { + "token": "LPAREN", + "loc": "13:18-13:19" + }, + { + "token": "LPAREN", + "loc": "13:19-13:20" + }, + { + "token": "RPAREN", + "loc": "13:20-13:21" + }, + { + "token": "FAT_ARROW", + "loc": "13:22-13:24" }, { "token": [ "LIDENT", "sync_with_err" ], - "loc": "13:14-13:27" + "loc": "13:25-13:38" }, { "token": "LPAREN", - "loc": "13:27-13:28" + "loc": "13:38-13:39" + }, + { + "token": "RPAREN", + "loc": "13:39-13:40" }, { "token": "RPAREN", - "loc": "13:28-13:29" + "loc": "13:40-13:41" }, { "token": "RPAREN", - "loc": "13:29-13:30" + "loc": "13:41-13:42" }, { "token": "NEWLINE", - "loc": "13:30-13:31" + "loc": "13:42-13:43" }, { "token": "RBRACE", @@ -2906,35 +2929,74 @@ "loc": "128:24-128:25" }, { - "token": "TRY_QUESTION", - "loc": "128:25-128:29" + "token": [ + "LIDENT", + "to_result_async" + ], + "loc": "128:25-128:40" + }, + { + "token": "LPAREN", + "loc": "128:40-128:41" + }, + { + "token": "ASYNC", + "loc": "128:41-128:46" + }, + { + "token": "FN", + "loc": "128:47-128:49" + }, + { + "token": "LPAREN", + "loc": "128:50-128:51" + }, + { + "token": "RPAREN", + "loc": "128:51-128:52" + }, + { + "token": "RAISE", + "loc": "128:53-128:58" + }, + { + "token": "LBRACE", + "loc": "128:59-128:60" }, { "token": [ "LIDENT", "raise_to_async_handler_in_arg" ], - "loc": "128:30-128:59" + "loc": "128:61-128:90" }, { "token": "LPAREN", - "loc": "128:59-128:60" + "loc": "128:90-128:91" + }, + { + "token": "RPAREN", + "loc": "128:91-128:92" + }, + { + "token": "RBRACE", + "loc": "128:93-128:94" }, { "token": "RPAREN", - "loc": "128:60-128:61" + "loc": "128:94-128:95" }, { "token": "RPAREN", - "loc": "128:61-128:62" + "loc": "128:95-128:96" }, { "token": "RPAREN", - "loc": "128:62-128:63" + "loc": "128:96-128:97" }, { "token": "NEWLINE", - "loc": "128:63-128:64" + "loc": "128:97-128:98" }, { "token": "RBRACE", @@ -2951,8 +3013,660 @@ "token": "NEWLINE", "loc": "129:2-129:3" }, + { + "token": "NEWLINE", + "loc": "130:1-130:2" + }, + { + "token": "FN", + "loc": "131:1-131:3" + }, + { + "token": "LBRACKET", + "loc": "131:3-131:4" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "131:4-131:5" + }, + { + "token": "COMMA", + "loc": "131:5-131:6" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "131:7-131:8" + }, + { + "token": "COLON", + "loc": "131:9-131:10" + }, + { + "token": [ + "UIDENT", + "Error" + ], + "loc": "131:11-131:16" + }, + { + "token": "RBRACKET", + "loc": "131:16-131:17" + }, + { + "token": [ + "LIDENT", + "to_result" + ], + "loc": "131:18-131:27" + }, + { + "token": "LPAREN", + "loc": "131:27-131:28" + }, + { + "token": [ + "LIDENT", + "f" + ], + "loc": "131:28-131:29" + }, + { + "token": "COLON", + "loc": "131:30-131:31" + }, + { + "token": "LPAREN", + "loc": "131:32-131:33" + }, + { + "token": "RPAREN", + "loc": "131:33-131:34" + }, + { + "token": "THIN_ARROW", + "loc": "131:35-131:37" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "131:38-131:39" + }, + { + "token": "RAISE", + "loc": "131:40-131:45" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "131:46-131:47" + }, + { + "token": "RPAREN", + "loc": "131:47-131:48" + }, + { + "token": "THIN_ARROW", + "loc": "131:49-131:51" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "131:52-131:58" + }, + { + "token": "LBRACKET", + "loc": "131:58-131:59" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "131:59-131:60" + }, + { + "token": "COMMA", + "loc": "131:60-131:61" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "131:62-131:63" + }, + { + "token": "RBRACKET", + "loc": "131:63-131:64" + }, + { + "token": "LBRACE", + "loc": "131:65-131:66" + }, + { + "token": "NEWLINE", + "loc": "131:66-131:67" + }, + { + "token": "TRY", + "loc": "132:3-132:6" + }, + { + "token": [ + "LIDENT", + "f" + ], + "loc": "132:7-132:8" + }, + { + "token": "LPAREN", + "loc": "132:8-132:9" + }, + { + "token": "RPAREN", + "loc": "132:9-132:10" + }, + { + "token": "NEWLINE", + "loc": "132:10-132:11" + }, + { + "token": "CATCH", + "loc": "133:3-133:8" + }, + { + "token": "LBRACE", + "loc": "133:9-133:10" + }, + { + "token": "NEWLINE", + "loc": "133:10-133:11" + }, + { + "token": [ + "LIDENT", + "err" + ], + "loc": "134:5-134:8" + }, + { + "token": "FAT_ARROW", + "loc": "134:9-134:11" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "134:12-134:18" + }, + { + "token": "COLONCOLON", + "loc": "134:18-134:20" + }, + { + "token": [ + "UIDENT", + "Err" + ], + "loc": "134:20-134:23" + }, + { + "token": "LPAREN", + "loc": "134:23-134:24" + }, + { + "token": [ + "LIDENT", + "err" + ], + "loc": "134:24-134:27" + }, + { + "token": "RPAREN", + "loc": "134:27-134:28" + }, + { + "token": "NEWLINE", + "loc": "134:28-134:29" + }, + { + "token": "RBRACE", + "loc": "135:3-135:4" + }, + { + "token": "NORAISE", + "loc": "135:5-135:12" + }, + { + "token": "LBRACE", + "loc": "135:13-135:14" + }, + { + "token": "NEWLINE", + "loc": "135:14-135:15" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "136:5-136:10" + }, + { + "token": "FAT_ARROW", + "loc": "136:11-136:13" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "136:14-136:20" + }, + { + "token": "COLONCOLON", + "loc": "136:20-136:22" + }, + { + "token": [ + "UIDENT", + "Ok" + ], + "loc": "136:22-136:24" + }, + { + "token": "LPAREN", + "loc": "136:24-136:25" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "136:25-136:30" + }, + { + "token": "RPAREN", + "loc": "136:30-136:31" + }, + { + "token": "NEWLINE", + "loc": "136:31-136:32" + }, + { + "token": "RBRACE", + "loc": "137:3-137:4" + }, + { + "token": "NEWLINE", + "loc": "137:4-137:5" + }, + { + "token": "RBRACE", + "loc": "138:1-138:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "138:2-138:2" + }, + { + "token": "NEWLINE", + "loc": "138:2-138:3" + }, + { + "token": "NEWLINE", + "loc": "139:1-139:2" + }, + { + "token": "ASYNC", + "loc": "140:1-140:6" + }, + { + "token": "FN", + "loc": "140:7-140:9" + }, + { + "token": "LBRACKET", + "loc": "140:9-140:10" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "140:10-140:11" + }, + { + "token": "COMMA", + "loc": "140:11-140:12" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "140:13-140:14" + }, + { + "token": "COLON", + "loc": "140:15-140:16" + }, + { + "token": [ + "UIDENT", + "Error" + ], + "loc": "140:17-140:22" + }, + { + "token": "RBRACKET", + "loc": "140:22-140:23" + }, + { + "token": [ + "LIDENT", + "to_result_async" + ], + "loc": "140:24-140:39" + }, + { + "token": "LPAREN", + "loc": "140:39-140:40" + }, + { + "token": "NEWLINE", + "loc": "140:40-140:41" + }, + { + "token": [ + "LIDENT", + "f" + ], + "loc": "141:3-141:4" + }, + { + "token": "COLON", + "loc": "141:5-141:6" + }, + { + "token": "ASYNC", + "loc": "141:7-141:12" + }, + { + "token": "LPAREN", + "loc": "141:13-141:14" + }, + { + "token": "RPAREN", + "loc": "141:14-141:15" + }, + { + "token": "THIN_ARROW", + "loc": "141:16-141:18" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "141:19-141:20" + }, + { + "token": "RAISE", + "loc": "141:21-141:26" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "141:27-141:28" + }, + { + "token": "NEWLINE", + "loc": "141:28-141:29" + }, + { + "token": "RPAREN", + "loc": "142:1-142:2" + }, + { + "token": "THIN_ARROW", + "loc": "142:3-142:5" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "142:6-142:12" + }, + { + "token": "LBRACKET", + "loc": "142:12-142:13" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "142:13-142:14" + }, + { + "token": "COMMA", + "loc": "142:14-142:15" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "142:16-142:17" + }, + { + "token": "RBRACKET", + "loc": "142:17-142:18" + }, + { + "token": "NORAISE", + "loc": "142:19-142:26" + }, + { + "token": "LBRACE", + "loc": "142:27-142:28" + }, + { + "token": "NEWLINE", + "loc": "142:28-142:29" + }, + { + "token": "TRY", + "loc": "143:3-143:6" + }, + { + "token": [ + "LIDENT", + "f" + ], + "loc": "143:7-143:8" + }, + { + "token": "LPAREN", + "loc": "143:8-143:9" + }, + { + "token": "RPAREN", + "loc": "143:9-143:10" + }, + { + "token": "NEWLINE", + "loc": "143:10-143:11" + }, + { + "token": "CATCH", + "loc": "144:3-144:8" + }, + { + "token": "LBRACE", + "loc": "144:9-144:10" + }, + { + "token": "NEWLINE", + "loc": "144:10-144:11" + }, + { + "token": [ + "LIDENT", + "err" + ], + "loc": "145:5-145:8" + }, + { + "token": "FAT_ARROW", + "loc": "145:9-145:11" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "145:12-145:18" + }, + { + "token": "COLONCOLON", + "loc": "145:18-145:20" + }, + { + "token": [ + "UIDENT", + "Err" + ], + "loc": "145:20-145:23" + }, + { + "token": "LPAREN", + "loc": "145:23-145:24" + }, + { + "token": [ + "LIDENT", + "err" + ], + "loc": "145:24-145:27" + }, + { + "token": "RPAREN", + "loc": "145:27-145:28" + }, + { + "token": "NEWLINE", + "loc": "145:28-145:29" + }, + { + "token": "RBRACE", + "loc": "146:3-146:4" + }, + { + "token": "NORAISE", + "loc": "146:5-146:12" + }, + { + "token": "LBRACE", + "loc": "146:13-146:14" + }, + { + "token": "NEWLINE", + "loc": "146:14-146:15" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "147:5-147:10" + }, + { + "token": "FAT_ARROW", + "loc": "147:11-147:13" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "147:14-147:20" + }, + { + "token": "COLONCOLON", + "loc": "147:20-147:22" + }, + { + "token": [ + "UIDENT", + "Ok" + ], + "loc": "147:22-147:24" + }, + { + "token": "LPAREN", + "loc": "147:24-147:25" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "147:25-147:30" + }, + { + "token": "RPAREN", + "loc": "147:30-147:31" + }, + { + "token": "NEWLINE", + "loc": "147:31-147:32" + }, + { + "token": "RBRACE", + "loc": "148:3-148:4" + }, + { + "token": "NEWLINE", + "loc": "148:4-148:5" + }, + { + "token": "RBRACE", + "loc": "149:1-149:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "149:2-149:2" + }, + { + "token": "NEWLINE", + "loc": "149:2-149:3" + }, { "token": "EOF", - "loc": "130:1-130:1" + "loc": "150:1-150:1" } ] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/pipeline_test_async_fn_in_array.json b/test/sync_test/__snapshot__/pipeline_test_async_fn_in_array.json index 6adb76cd..ddb1b138 100644 --- a/test/sync_test/__snapshot__/pipeline_test_async_fn_in_array.json +++ b/test/sync_test/__snapshot__/pipeline_test_async_fn_in_array.json @@ -817,7 +817,8 @@ "kind": "Expr::Array::ExprList", "loc": null, "children": [] - } + }, + "is_iter": false } }, "body": { @@ -1288,7 +1289,8 @@ "kind": "Expr::Array::ExprList", "loc": null, "children": [] - } + }, + "is_iter": false } }, "body": { diff --git a/test/sync_test/__snapshot__/pipeline_test_async_for.json b/test/sync_test/__snapshot__/pipeline_test_async_for.json index e442f1d2..e04ed0ac 100644 --- a/test/sync_test/__snapshot__/pipeline_test_async_for.json +++ b/test/sync_test/__snapshot__/pipeline_test_async_for.json @@ -532,7 +532,8 @@ "kind": "Expr::Array::ExprList", "loc": null, "children": [] - } + }, + "is_iter": false } }, "kind": { diff --git a/test/sync_test/__snapshot__/pipeline_test_async_misc.json b/test/sync_test/__snapshot__/pipeline_test_async_misc.json index 15724c16..a1bf3cf1 100644 --- a/test/sync_test/__snapshot__/pipeline_test_async_misc.json +++ b/test/sync_test/__snapshot__/pipeline_test_async_misc.json @@ -2056,7 +2056,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { diff --git a/test/sync_test/__snapshot__/pipeline_test_async_question.json b/test/sync_test/__snapshot__/pipeline_test_async_question.json index f0da9f8f..ab214c92 100644 --- a/test/sync_test/__snapshot__/pipeline_test_async_question.json +++ b/test/sync_test/__snapshot__/pipeline_test_async_question.json @@ -1122,71 +1122,141 @@ "loc": null, "children": { "value": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", - "loc": null, - "children": { - "value": "f" - } - } + "value": "to_result_async" } } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", "loc": null, - "children": [ - { - "kind": "Argument", + "children": { + "value": { + "kind": "Expr::Function", "loc": null, "children": { - "value": { - "kind": "Expr::Constant", + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "constant": { - "kind": "Constant::Bool", + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Apply", "loc": null, "children": { - "value": true + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "f" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Bool", + "loc": null, + "children": { + "value": true + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::DefaultErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Lambda", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": { + "kind": "Async", + "loc": null, + "children": {} } } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } - ] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} + } } - } + ] }, - "kind": { - "kind": "TryOperatorKind::Question", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -1319,71 +1389,141 @@ "loc": null, "children": { "value": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", - "loc": null, - "children": { - "value": "f" - } - } + "value": "to_result_async" } } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", "loc": null, - "children": [ - { - "kind": "Argument", + "children": { + "value": { + "kind": "Expr::Function", "loc": null, "children": { - "value": { - "kind": "Expr::Constant", + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "constant": { - "kind": "Constant::Bool", + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Apply", "loc": null, "children": { - "value": false + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "f" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Bool", + "loc": null, + "children": { + "value": false + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::DefaultErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Lambda", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": { + "kind": "Async", + "loc": null, + "children": {} } } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } - ] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} + } } - } + ] }, - "kind": { - "kind": "TryOperatorKind::Question", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -1443,5 +1583,532 @@ } } } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "to_result_async" + } + }, + "has_error": null, + "is_async": { + "kind": "Async", + "loc": null, + "children": {} + }, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "f" + } + }, + "ty": { + "kind": "Type::Arrow", + "loc": null, + "children": { + "args": { + "kind": "Type::Arrow::ArgList", + "loc": null, + "children": [] + }, + "res": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "T" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "err": { + "kind": "ErrorType::ErrorType", + "loc": null, + "children": { + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "E" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + "is_async": { + "kind": "Async", + "loc": null, + "children": {} + } + } + } + } + } + ] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [ + { + "kind": "TypeVarBinder", + "loc": null, + "children": { + "name": "T", + "constraints": { + "kind": "TypeVarBinder::TypeVarConstraintList", + "loc": null, + "children": [] + } + } + }, + { + "kind": "TypeVarBinder", + "loc": null, + "children": { + "name": "E", + "constraints": { + "kind": "TypeVarBinder::TypeVarConstraintList", + "loc": null, + "children": [ + { + "kind": "TypeVarConstraint", + "loc": null, + "children": { + "trait": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Error" + } + } + } + } + ] + } + } + } + ] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [ + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "T" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "E" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + ] + } + } + }, + "error_type": { + "kind": "ErrorType::Noraise", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::Try", + "loc": null, + "children": { + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "f" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "catch": { + "kind": "Expr::Try::CaseList", + "loc": null, + "children": [ + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "err" + } + } + } + }, + "guard": null, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Err" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::TypeName", + "loc": null, + "children": { + "value": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + }, + "is_object": false + } + } + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "err" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + ] + }, + "catch_all": false, + "try_else": { + "kind": "Expr::Try::CaseList", + "loc": null, + "children": [ + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "value" + } + } + } + }, + "guard": null, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Ok" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::TypeName", + "loc": null, + "children": { + "value": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + }, + "is_object": false + } + } + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "value" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + ] + }, + "has_try": true + } + } + } + } + } } ] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/pipeline_test_async_question.mbt b/test/sync_test/__snapshot__/pipeline_test_async_question.mbt index 955f1600..103cd19a 100644 --- a/test/sync_test/__snapshot__/pipeline_test_async_question.mbt +++ b/test/sync_test/__snapshot__/pipeline_test_async_question.mbt @@ -13,6 +13,17 @@ async fn f(c : Bool) -> Int raise Err { } fn main { - run_async(() => debug(try? f(true))) - run_async(() => debug(try? f(false))) + run_async(() => debug(to_result_async(async fn () raise { f(true) }))) + run_async(() => debug(to_result_async(async fn () raise { f(false) }))) +} + +async fn[T, E : Error] to_result_async( + f : async () -> T raise E +) -> Result[T, E] noraise { + try f() + catch { + err => Result::Err(err) + } noraise { + value => Result::Ok(value) + } } diff --git a/test/sync_test/__snapshot__/pipeline_test_async_question.mbt.tokens.json b/test/sync_test/__snapshot__/pipeline_test_async_question.mbt.tokens.json index 9dfe3fd3..d901cb92 100644 --- a/test/sync_test/__snapshot__/pipeline_test_async_question.mbt.tokens.json +++ b/test/sync_test/__snapshot__/pipeline_test_async_question.mbt.tokens.json @@ -624,46 +624,85 @@ "loc": "16:24-16:25" }, { - "token": "TRY_QUESTION", - "loc": "16:25-16:29" + "token": [ + "LIDENT", + "to_result_async" + ], + "loc": "16:25-16:40" + }, + { + "token": "LPAREN", + "loc": "16:40-16:41" + }, + { + "token": "ASYNC", + "loc": "16:41-16:46" + }, + { + "token": "FN", + "loc": "16:47-16:49" + }, + { + "token": "LPAREN", + "loc": "16:50-16:51" + }, + { + "token": "RPAREN", + "loc": "16:51-16:52" + }, + { + "token": "RAISE", + "loc": "16:53-16:58" + }, + { + "token": "LBRACE", + "loc": "16:59-16:60" }, { "token": [ "LIDENT", "f" ], - "loc": "16:30-16:31" + "loc": "16:61-16:62" }, { "token": "LPAREN", - "loc": "16:31-16:32" + "loc": "16:62-16:63" }, { "token": "TRUE", - "loc": "16:32-16:36" + "loc": "16:63-16:67" + }, + { + "token": "RPAREN", + "loc": "16:67-16:68" + }, + { + "token": "RBRACE", + "loc": "16:69-16:70" }, { "token": "RPAREN", - "loc": "16:36-16:37" + "loc": "16:70-16:71" }, { "token": "RPAREN", - "loc": "16:37-16:38" + "loc": "16:71-16:72" }, { "token": "RPAREN", - "loc": "16:38-16:39" + "loc": "16:72-16:73" }, { "token": [ "SEMI", false ], - "loc": "16:39-16:39" + "loc": "16:73-16:73" }, { "token": "NEWLINE", - "loc": "16:39-16:40" + "loc": "16:73-16:74" }, { "token": [ @@ -700,39 +739,78 @@ "loc": "17:24-17:25" }, { - "token": "TRY_QUESTION", - "loc": "17:25-17:29" + "token": [ + "LIDENT", + "to_result_async" + ], + "loc": "17:25-17:40" + }, + { + "token": "LPAREN", + "loc": "17:40-17:41" + }, + { + "token": "ASYNC", + "loc": "17:41-17:46" + }, + { + "token": "FN", + "loc": "17:47-17:49" + }, + { + "token": "LPAREN", + "loc": "17:50-17:51" + }, + { + "token": "RPAREN", + "loc": "17:51-17:52" + }, + { + "token": "RAISE", + "loc": "17:53-17:58" + }, + { + "token": "LBRACE", + "loc": "17:59-17:60" }, { "token": [ "LIDENT", "f" ], - "loc": "17:30-17:31" + "loc": "17:61-17:62" }, { "token": "LPAREN", - "loc": "17:31-17:32" + "loc": "17:62-17:63" }, { "token": "FALSE", - "loc": "17:32-17:37" + "loc": "17:63-17:68" + }, + { + "token": "RPAREN", + "loc": "17:68-17:69" + }, + { + "token": "RBRACE", + "loc": "17:70-17:71" }, { "token": "RPAREN", - "loc": "17:37-17:38" + "loc": "17:71-17:72" }, { "token": "RPAREN", - "loc": "17:38-17:39" + "loc": "17:72-17:73" }, { "token": "RPAREN", - "loc": "17:39-17:40" + "loc": "17:73-17:74" }, { "token": "NEWLINE", - "loc": "17:40-17:41" + "loc": "17:74-17:75" }, { "token": "RBRACE", @@ -749,8 +827,344 @@ "token": "NEWLINE", "loc": "18:2-18:3" }, + { + "token": "NEWLINE", + "loc": "19:1-19:2" + }, + { + "token": "ASYNC", + "loc": "20:1-20:6" + }, + { + "token": "FN", + "loc": "20:7-20:9" + }, + { + "token": "LBRACKET", + "loc": "20:9-20:10" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "20:10-20:11" + }, + { + "token": "COMMA", + "loc": "20:11-20:12" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "20:13-20:14" + }, + { + "token": "COLON", + "loc": "20:15-20:16" + }, + { + "token": [ + "UIDENT", + "Error" + ], + "loc": "20:17-20:22" + }, + { + "token": "RBRACKET", + "loc": "20:22-20:23" + }, + { + "token": [ + "LIDENT", + "to_result_async" + ], + "loc": "20:24-20:39" + }, + { + "token": "LPAREN", + "loc": "20:39-20:40" + }, + { + "token": "NEWLINE", + "loc": "20:40-20:41" + }, + { + "token": [ + "LIDENT", + "f" + ], + "loc": "21:3-21:4" + }, + { + "token": "COLON", + "loc": "21:5-21:6" + }, + { + "token": "ASYNC", + "loc": "21:7-21:12" + }, + { + "token": "LPAREN", + "loc": "21:13-21:14" + }, + { + "token": "RPAREN", + "loc": "21:14-21:15" + }, + { + "token": "THIN_ARROW", + "loc": "21:16-21:18" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "21:19-21:20" + }, + { + "token": "RAISE", + "loc": "21:21-21:26" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "21:27-21:28" + }, + { + "token": "NEWLINE", + "loc": "21:28-21:29" + }, + { + "token": "RPAREN", + "loc": "22:1-22:2" + }, + { + "token": "THIN_ARROW", + "loc": "22:3-22:5" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "22:6-22:12" + }, + { + "token": "LBRACKET", + "loc": "22:12-22:13" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "22:13-22:14" + }, + { + "token": "COMMA", + "loc": "22:14-22:15" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "22:16-22:17" + }, + { + "token": "RBRACKET", + "loc": "22:17-22:18" + }, + { + "token": "NORAISE", + "loc": "22:19-22:26" + }, + { + "token": "LBRACE", + "loc": "22:27-22:28" + }, + { + "token": "NEWLINE", + "loc": "22:28-22:29" + }, + { + "token": "TRY", + "loc": "23:3-23:6" + }, + { + "token": [ + "LIDENT", + "f" + ], + "loc": "23:7-23:8" + }, + { + "token": "LPAREN", + "loc": "23:8-23:9" + }, + { + "token": "RPAREN", + "loc": "23:9-23:10" + }, + { + "token": "NEWLINE", + "loc": "23:10-23:11" + }, + { + "token": "CATCH", + "loc": "24:3-24:8" + }, + { + "token": "LBRACE", + "loc": "24:9-24:10" + }, + { + "token": "NEWLINE", + "loc": "24:10-24:11" + }, + { + "token": [ + "LIDENT", + "err" + ], + "loc": "25:5-25:8" + }, + { + "token": "FAT_ARROW", + "loc": "25:9-25:11" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "25:12-25:18" + }, + { + "token": "COLONCOLON", + "loc": "25:18-25:20" + }, + { + "token": [ + "UIDENT", + "Err" + ], + "loc": "25:20-25:23" + }, + { + "token": "LPAREN", + "loc": "25:23-25:24" + }, + { + "token": [ + "LIDENT", + "err" + ], + "loc": "25:24-25:27" + }, + { + "token": "RPAREN", + "loc": "25:27-25:28" + }, + { + "token": "NEWLINE", + "loc": "25:28-25:29" + }, + { + "token": "RBRACE", + "loc": "26:3-26:4" + }, + { + "token": "NORAISE", + "loc": "26:5-26:12" + }, + { + "token": "LBRACE", + "loc": "26:13-26:14" + }, + { + "token": "NEWLINE", + "loc": "26:14-26:15" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "27:5-27:10" + }, + { + "token": "FAT_ARROW", + "loc": "27:11-27:13" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "27:14-27:20" + }, + { + "token": "COLONCOLON", + "loc": "27:20-27:22" + }, + { + "token": [ + "UIDENT", + "Ok" + ], + "loc": "27:22-27:24" + }, + { + "token": "LPAREN", + "loc": "27:24-27:25" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "27:25-27:30" + }, + { + "token": "RPAREN", + "loc": "27:30-27:31" + }, + { + "token": "NEWLINE", + "loc": "27:31-27:32" + }, + { + "token": "RBRACE", + "loc": "28:3-28:4" + }, + { + "token": "NEWLINE", + "loc": "28:4-28:5" + }, + { + "token": "RBRACE", + "loc": "29:1-29:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "29:2-29:2" + }, + { + "token": "NEWLINE", + "loc": "29:2-29:3" + }, { "token": "EOF", - "loc": "19:1-19:1" + "loc": "30:1-30:1" } ] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/pipeline_test_async_trait.json b/test/sync_test/__snapshot__/pipeline_test_async_trait.json index 45da212f..e4f08e14 100644 --- a/test/sync_test/__snapshot__/pipeline_test_async_trait.json +++ b/test/sync_test/__snapshot__/pipeline_test_async_trait.json @@ -884,6 +884,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, @@ -4997,7 +5002,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -5155,7 +5161,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -5315,7 +5322,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -7678,7 +7686,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -7836,7 +7845,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -7996,7 +8006,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -8076,6 +8087,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, @@ -8263,6 +8279,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, diff --git a/test/sync_test/__snapshot__/pipeline_test_async_trait2.json b/test/sync_test/__snapshot__/pipeline_test_async_trait2.json index cef7da18..007f5d26 100644 --- a/test/sync_test/__snapshot__/pipeline_test_async_trait2.json +++ b/test/sync_test/__snapshot__/pipeline_test_async_trait2.json @@ -575,6 +575,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, diff --git a/test/sync_test/__snapshot__/pipeline_test_augmented.json b/test/sync_test/__snapshot__/pipeline_test_augmented.json index 8f5e99df..0836afd2 100644 --- a/test/sync_test/__snapshot__/pipeline_test_augmented.json +++ b/test/sync_test/__snapshot__/pipeline_test_augmented.json @@ -1721,7 +1721,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { diff --git a/test/sync_test/__snapshot__/pipeline_test_augmented3.json b/test/sync_test/__snapshot__/pipeline_test_augmented3.json index ade257f2..5f2df9bb 100644 --- a/test/sync_test/__snapshot__/pipeline_test_augmented3.json +++ b/test/sync_test/__snapshot__/pipeline_test_augmented3.json @@ -1089,7 +1089,8 @@ "kind": "Expr::Array::ExprList", "loc": null, "children": [] - } + }, + "is_iter": false } }, "is_pun": false diff --git a/test/sync_test/__snapshot__/pipeline_test_augmented4.json b/test/sync_test/__snapshot__/pipeline_test_augmented4.json index d26277c8..41c4b57a 100644 --- a/test/sync_test/__snapshot__/pipeline_test_augmented4.json +++ b/test/sync_test/__snapshot__/pipeline_test_augmented4.json @@ -2015,6 +2015,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, diff --git a/test/sync_test/__snapshot__/pipeline_test_bitstring_bytearray.json b/test/sync_test/__snapshot__/pipeline_test_bitstring_bytearray.json index 902cd9aa..b9c40362 100644 --- a/test/sync_test/__snapshot__/pipeline_test_bitstring_bytearray.json +++ b/test/sync_test/__snapshot__/pipeline_test_bitstring_bytearray.json @@ -427,7 +427,8 @@ } } ] - } + }, + "is_iter": false } } } @@ -4529,7 +4530,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -4692,7 +4694,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -4855,7 +4858,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -5018,7 +5022,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -5181,7 +5186,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -5344,7 +5350,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -5456,7 +5463,8 @@ "kind": "Expr::Array::ExprList", "loc": null, "children": [] - } + }, + "is_iter": false } }, "kind": { diff --git a/test/sync_test/__snapshot__/pipeline_test_bitstring_bytesview_loop_unbox.json b/test/sync_test/__snapshot__/pipeline_test_bitstring_bytesview_loop_unbox.json index 6510d5c3..c523b27c 100644 --- a/test/sync_test/__snapshot__/pipeline_test_bitstring_bytesview_loop_unbox.json +++ b/test/sync_test/__snapshot__/pipeline_test_bitstring_bytesview_loop_unbox.json @@ -868,7 +868,8 @@ } } ] - } + }, + "is_iter": false } } } diff --git a/test/sync_test/__snapshot__/pipeline_test_bitstring_pat_path.json b/test/sync_test/__snapshot__/pipeline_test_bitstring_pat_path.json index c1f69b4d..368a0320 100644 --- a/test/sync_test/__snapshot__/pipeline_test_bitstring_pat_path.json +++ b/test/sync_test/__snapshot__/pipeline_test_bitstring_pat_path.json @@ -1182,7 +1182,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -1269,7 +1270,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { diff --git a/test/sync_test/__snapshot__/pipeline_test_boxed_u64_object.json b/test/sync_test/__snapshot__/pipeline_test_boxed_u64_object.json index 7a869f06..6b409121 100644 --- a/test/sync_test/__snapshot__/pipeline_test_boxed_u64_object.json +++ b/test/sync_test/__snapshot__/pipeline_test_boxed_u64_object.json @@ -187,6 +187,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, diff --git a/test/sync_test/__snapshot__/pipeline_test_break_in_switch.json b/test/sync_test/__snapshot__/pipeline_test_break_in_switch.json index 304b7049..6d819647 100644 --- a/test/sync_test/__snapshot__/pipeline_test_break_in_switch.json +++ b/test/sync_test/__snapshot__/pipeline_test_break_in_switch.json @@ -1805,7 +1805,8 @@ } } ] - } + }, + "is_iter": false } }, "ty": { @@ -2154,7 +2155,8 @@ } } ] - } + }, + "is_iter": false } }, "ty": { @@ -2505,7 +2507,8 @@ } } ] - } + }, + "is_iter": false } }, "ty": { diff --git a/test/sync_test/__snapshot__/pipeline_test_buffer.json b/test/sync_test/__snapshot__/pipeline_test_buffer.json index 8e7523b6..2e76158b 100644 --- a/test/sync_test/__snapshot__/pipeline_test_buffer.json +++ b/test/sync_test/__snapshot__/pipeline_test_buffer.json @@ -1407,7 +1407,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -1567,7 +1568,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { diff --git a/test/sync_test/__snapshot__/pipeline_test_builtin_test.json b/test/sync_test/__snapshot__/pipeline_test_builtin_test.json index 6357e276..d6552f91 100644 --- a/test/sync_test/__snapshot__/pipeline_test_builtin_test.json +++ b/test/sync_test/__snapshot__/pipeline_test_builtin_test.json @@ -358,7 +358,8 @@ } } ] - } + }, + "is_iter": false } }, "ty": { diff --git a/test/sync_test/__snapshot__/pipeline_test_bytearray.json b/test/sync_test/__snapshot__/pipeline_test_bytearray.json index 5a5aa1e0..3bdb3537 100644 --- a/test/sync_test/__snapshot__/pipeline_test_bytearray.json +++ b/test/sync_test/__snapshot__/pipeline_test_bytearray.json @@ -282,7 +282,8 @@ } } ] - } + }, + "is_iter": false } } } @@ -629,7 +630,8 @@ } } ] - } + }, + "is_iter": false } } } @@ -919,7 +921,8 @@ } } ] - } + }, + "is_iter": false } } } @@ -2853,7 +2856,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { diff --git a/test/sync_test/__snapshot__/pipeline_test_bytes.json b/test/sync_test/__snapshot__/pipeline_test_bytes.json index ecd0dbdb..d71a334f 100644 --- a/test/sync_test/__snapshot__/pipeline_test_bytes.json +++ b/test/sync_test/__snapshot__/pipeline_test_bytes.json @@ -427,7 +427,8 @@ } } ] - } + }, + "is_iter": false } } } @@ -4144,7 +4145,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { @@ -4387,7 +4389,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { @@ -4571,7 +4574,8 @@ "kind": "Expr::Array::ExprList", "loc": null, "children": [] - } + }, + "is_iter": false } }, "body": { @@ -5811,7 +5815,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { @@ -6701,7 +6706,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -6890,7 +6896,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -6948,7 +6955,8 @@ "kind": "Expr::Array::ExprList", "loc": null, "children": [] - } + }, + "is_iter": false } }, "kind": { @@ -7020,7 +7028,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -7418,7 +7427,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -7576,7 +7586,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { diff --git a/test/sync_test/__snapshot__/pipeline_test_bytes_interp_template_writing.json b/test/sync_test/__snapshot__/pipeline_test_bytes_interp_template_writing.json new file mode 100644 index 00000000..c9207233 --- /dev/null +++ b/test/sync_test/__snapshot__/pipeline_test_bytes_interp_template_writing.json @@ -0,0 +1,1661 @@ +[ + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "main" + } + }, + "has_error": null, + "is_async": null, + "decl_params": null, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [] + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::Let", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "word" + } + } + } + }, + "expr": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "bc" + } + } + } + }, + "body": { + "kind": "Expr::Let", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "number" + } + } + } + }, + "expr": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "123" + } + } + } + }, + "body": { + "kind": "Expr::Let", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "writer" + } + } + } + }, + "expr": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Buffer" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::NoExtraInfo", + "loc": null, + "children": {} + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "1" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Labelled", + "loc": null, + "children": { + "value": { + "kind": "Label", + "loc": null, + "children": { + "name": "size_hint" + } + } + } + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "body": { + "kind": "Expr::Sequence", + "loc": null, + "children": { + "exprs": { + "kind": "Expr::Sequence::ExprList", + "loc": null, + "children": [ + { + "kind": "Expr::TemplateWriting", + "loc": null, + "children": { + "expr": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "writer" + } + } + } + } + } + }, + "template": { + "kind": "Expr::BytesInterp", + "loc": null, + "children": { + "elems": { + "kind": "Expr::BytesInterp::ElemList", + "loc": null, + "children": [ + { + "kind": "InterpElem::Literal", + "loc": null, + "children": { + "repr": "a" + } + }, + { + "kind": "InterpElem::Source", + "loc": null, + "children": { + "source": "word" + } + }, + { + "kind": "InterpElem::Literal", + "loc": null, + "children": { + "repr": "d" + } + }, + { + "kind": "InterpElem::Source", + "loc": null, + "children": { + "source": "number" + } + } + ] + } + } + }, + "is_conditional": false + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "writer" + } + } + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "to_bytes" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "debug" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "writer" + } + } + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "to_bytes" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "to_array" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + ] + }, + "last_expr": { + "kind": "Expr::Let", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "plain" + } + } + } + }, + "expr": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Buffer" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::NoExtraInfo", + "loc": null, + "children": {} + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "1" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Labelled", + "loc": null, + "children": { + "value": { + "kind": "Label", + "loc": null, + "children": { + "name": "size_hint" + } + } + } + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "body": { + "kind": "Expr::Sequence", + "loc": null, + "children": { + "exprs": { + "kind": "Expr::Sequence::ExprList", + "loc": null, + "children": [ + { + "kind": "Expr::TemplateWriting", + "loc": null, + "children": { + "expr": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "plain" + } + } + } + } + } + }, + "template": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Bytes", + "loc": null, + "children": { + "value": "abcd123" + } + } + } + }, + "is_conditional": false + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "plain" + } + } + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "to_bytes" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "debug" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "plain" + } + } + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "to_bytes" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "to_array" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + ] + }, + "last_expr": { + "kind": "Expr::Let", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "conditional" + } + } + } + }, + "expr": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Buffer" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::NoExtraInfo", + "loc": null, + "children": {} + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "1" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Labelled", + "loc": null, + "children": { + "value": { + "kind": "Label", + "loc": null, + "children": { + "name": "size_hint" + } + } + } + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "body": { + "kind": "Expr::Let", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "some" + } + } + } + }, + "expr": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Some" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::NoExtraInfo", + "loc": null, + "children": {} + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "conditional" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "body": { + "kind": "Expr::Sequence", + "loc": null, + "children": { + "exprs": { + "kind": "Expr::Sequence::ExprList", + "loc": null, + "children": [ + { + "kind": "Expr::TemplateWriting", + "loc": null, + "children": { + "expr": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "some" + } + } + } + } + } + }, + "template": { + "kind": "Expr::BytesInterp", + "loc": null, + "children": { + "elems": { + "kind": "Expr::BytesInterp::ElemList", + "loc": null, + "children": [ + { + "kind": "InterpElem::Literal", + "loc": null, + "children": { + "repr": "abcd" + } + }, + { + "kind": "InterpElem::Source", + "loc": null, + "children": { + "source": "number" + } + } + ] + } + } + }, + "is_conditional": true + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "conditional" + } + } + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "to_bytes" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "debug" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "conditional" + } + } + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "to_bytes" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "to_array" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + ] + }, + "last_expr": { + "kind": "Expr::Let", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "escaped" + } + } + } + }, + "expr": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Buffer" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::NoExtraInfo", + "loc": null, + "children": {} + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "1" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Labelled", + "loc": null, + "children": { + "value": { + "kind": "Label", + "loc": null, + "children": { + "name": "size_hint" + } + } + } + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "body": { + "kind": "Expr::Sequence", + "loc": null, + "children": { + "exprs": { + "kind": "Expr::Sequence::ExprList", + "loc": null, + "children": [ + { + "kind": "Expr::TemplateWriting", + "loc": null, + "children": { + "expr": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "escaped" + } + } + } + } + } + }, + "template": { + "kind": "Expr::BytesInterp", + "loc": null, + "children": { + "elems": { + "kind": "Expr::BytesInterp::ElemList", + "loc": null, + "children": [ + { + "kind": "InterpElem::Literal", + "loc": null, + "children": { + "repr": "\\x7B" + } + }, + { + "kind": "InterpElem::Source", + "loc": null, + "children": { + "source": "number" + } + }, + { + "kind": "InterpElem::Literal", + "loc": null, + "children": { + "repr": "\\x7D\\o000\\xFF" + } + } + ] + } + } + }, + "is_conditional": false + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "escaped" + } + } + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "to_bytes" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + ] + }, + "last_expr": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "debug" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "escaped" + } + } + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "to_bytes" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "to_array" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } +] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/pipeline_test_bytes_interp_template_writing.mbt b/test/sync_test/__snapshot__/pipeline_test_bytes_interp_template_writing.mbt new file mode 100644 index 00000000..04999cc5 --- /dev/null +++ b/test/sync_test/__snapshot__/pipeline_test_bytes_interp_template_writing.mbt @@ -0,0 +1,25 @@ +fn main { + let word = "bc" + let number = 123 + let writer = Buffer(size_hint=1) + writer <+ b"a\{word}d\{number}" + println(writer.to_bytes()) + debug(writer.to_bytes().to_array()) + + + let plain = Buffer(size_hint=1) + plain <+ b"abcd123" + println(plain.to_bytes()) + debug(plain.to_bytes().to_array()) + + let conditional = Buffer(size_hint=1) + let some = Some(conditional) + some Bool { + let bytes = Bytes::make(6, b'\xff') + bytes is [b'\xff', b'\xff', b'\xff', b'\xff', b'\xff', b'\xff'] +} + +fn check_bytes_zero() -> Bool { + let bytes = Bytes::make(6, b'\x00') + bytes is [b'\x00', b'\x00', b'\x00', b'\x00', b'\x00', b'\x00'] +} + +fn check_int_zero() -> Bool { + let xs : FixedArray[Int] = FixedArray::make(4, 0) + xs[0] == 0 && xs[1] == 0 && xs[2] == 0 && xs[3] == 0 +} + +fn check_int64_zero() -> Bool { + let xs : FixedArray[Int64] = FixedArray::make(4, 0L) + xs[0] == 0L && xs[1] == 0L && xs[2] == 0L && xs[3] == 0L +} + +fn check_uint16_zero() -> Bool { + let xs : FixedArray[UInt16] = FixedArray::make(4, (0 : UInt16)) + xs[0] == 0 && xs[1] == 0 && xs[2] == 0 && xs[3] == 0 +} + +fn main { + if check_bytes_nonzero() && + check_bytes_zero() && + check_int_zero() && + check_int64_zero() && + check_uint16_zero() { + println("ok") + } else { + println("bad") + } +} diff --git a/test/sync_test/__snapshot__/pipeline_test_bytes_make_nonzero.mbt.tokens.json b/test/sync_test/__snapshot__/pipeline_test_bytes_make_nonzero.mbt.tokens.json new file mode 100644 index 00000000..4869e330 --- /dev/null +++ b/test/sync_test/__snapshot__/pipeline_test_bytes_make_nonzero.mbt.tokens.json @@ -0,0 +1,1617 @@ +[ + { + "token": "FN", + "loc": "1:1-1:3" + }, + { + "token": [ + "LIDENT", + "check_bytes_nonzero" + ], + "loc": "1:4-1:23" + }, + { + "token": "LPAREN", + "loc": "1:23-1:24" + }, + { + "token": "RPAREN", + "loc": "1:24-1:25" + }, + { + "token": "THIN_ARROW", + "loc": "1:26-1:28" + }, + { + "token": [ + "UIDENT", + "Bool" + ], + "loc": "1:29-1:33" + }, + { + "token": "LBRACE", + "loc": "1:34-1:35" + }, + { + "token": "NEWLINE", + "loc": "1:35-1:36" + }, + { + "token": "LET", + "loc": "2:3-2:6" + }, + { + "token": [ + "LIDENT", + "bytes" + ], + "loc": "2:7-2:12" + }, + { + "token": "EQUAL", + "loc": "2:13-2:14" + }, + { + "token": [ + "UIDENT", + "Bytes" + ], + "loc": "2:15-2:20" + }, + { + "token": "COLONCOLON", + "loc": "2:20-2:22" + }, + { + "token": [ + "LIDENT", + "make" + ], + "loc": "2:22-2:26" + }, + { + "token": "LPAREN", + "loc": "2:26-2:27" + }, + { + "token": [ + "INT", + "6" + ], + "loc": "2:27-2:28" + }, + { + "token": "COMMA", + "loc": "2:28-2:29" + }, + { + "token": [ + "BYTE", + "\\xff" + ], + "loc": "2:30-2:37" + }, + { + "token": "RPAREN", + "loc": "2:37-2:38" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "2:38-2:38" + }, + { + "token": "NEWLINE", + "loc": "2:38-2:39" + }, + { + "token": [ + "LIDENT", + "bytes" + ], + "loc": "3:3-3:8" + }, + { + "token": "IS", + "loc": "3:9-3:11" + }, + { + "token": "LBRACKET", + "loc": "3:12-3:13" + }, + { + "token": [ + "BYTE", + "\\xff" + ], + "loc": "3:13-3:20" + }, + { + "token": "COMMA", + "loc": "3:20-3:21" + }, + { + "token": [ + "BYTE", + "\\xff" + ], + "loc": "3:22-3:29" + }, + { + "token": "COMMA", + "loc": "3:29-3:30" + }, + { + "token": [ + "BYTE", + "\\xff" + ], + "loc": "3:31-3:38" + }, + { + "token": "COMMA", + "loc": "3:38-3:39" + }, + { + "token": [ + "BYTE", + "\\xff" + ], + "loc": "3:40-3:47" + }, + { + "token": "COMMA", + "loc": "3:47-3:48" + }, + { + "token": [ + "BYTE", + "\\xff" + ], + "loc": "3:49-3:56" + }, + { + "token": "COMMA", + "loc": "3:56-3:57" + }, + { + "token": [ + "BYTE", + "\\xff" + ], + "loc": "3:58-3:65" + }, + { + "token": "RBRACKET", + "loc": "3:65-3:66" + }, + { + "token": "NEWLINE", + "loc": "3:66-3:67" + }, + { + "token": "RBRACE", + "loc": "4:1-4:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "4:2-4:2" + }, + { + "token": "NEWLINE", + "loc": "4:2-4:3" + }, + { + "token": "NEWLINE", + "loc": "5:1-5:2" + }, + { + "token": "FN", + "loc": "6:1-6:3" + }, + { + "token": [ + "LIDENT", + "check_bytes_zero" + ], + "loc": "6:4-6:20" + }, + { + "token": "LPAREN", + "loc": "6:20-6:21" + }, + { + "token": "RPAREN", + "loc": "6:21-6:22" + }, + { + "token": "THIN_ARROW", + "loc": "6:23-6:25" + }, + { + "token": [ + "UIDENT", + "Bool" + ], + "loc": "6:26-6:30" + }, + { + "token": "LBRACE", + "loc": "6:31-6:32" + }, + { + "token": "NEWLINE", + "loc": "6:32-6:33" + }, + { + "token": "LET", + "loc": "7:3-7:6" + }, + { + "token": [ + "LIDENT", + "bytes" + ], + "loc": "7:7-7:12" + }, + { + "token": "EQUAL", + "loc": "7:13-7:14" + }, + { + "token": [ + "UIDENT", + "Bytes" + ], + "loc": "7:15-7:20" + }, + { + "token": "COLONCOLON", + "loc": "7:20-7:22" + }, + { + "token": [ + "LIDENT", + "make" + ], + "loc": "7:22-7:26" + }, + { + "token": "LPAREN", + "loc": "7:26-7:27" + }, + { + "token": [ + "INT", + "6" + ], + "loc": "7:27-7:28" + }, + { + "token": "COMMA", + "loc": "7:28-7:29" + }, + { + "token": [ + "BYTE", + "\\x00" + ], + "loc": "7:30-7:37" + }, + { + "token": "RPAREN", + "loc": "7:37-7:38" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "7:38-7:38" + }, + { + "token": "NEWLINE", + "loc": "7:38-7:39" + }, + { + "token": [ + "LIDENT", + "bytes" + ], + "loc": "8:3-8:8" + }, + { + "token": "IS", + "loc": "8:9-8:11" + }, + { + "token": "LBRACKET", + "loc": "8:12-8:13" + }, + { + "token": [ + "BYTE", + "\\x00" + ], + "loc": "8:13-8:20" + }, + { + "token": "COMMA", + "loc": "8:20-8:21" + }, + { + "token": [ + "BYTE", + "\\x00" + ], + "loc": "8:22-8:29" + }, + { + "token": "COMMA", + "loc": "8:29-8:30" + }, + { + "token": [ + "BYTE", + "\\x00" + ], + "loc": "8:31-8:38" + }, + { + "token": "COMMA", + "loc": "8:38-8:39" + }, + { + "token": [ + "BYTE", + "\\x00" + ], + "loc": "8:40-8:47" + }, + { + "token": "COMMA", + "loc": "8:47-8:48" + }, + { + "token": [ + "BYTE", + "\\x00" + ], + "loc": "8:49-8:56" + }, + { + "token": "COMMA", + "loc": "8:56-8:57" + }, + { + "token": [ + "BYTE", + "\\x00" + ], + "loc": "8:58-8:65" + }, + { + "token": "RBRACKET", + "loc": "8:65-8:66" + }, + { + "token": "NEWLINE", + "loc": "8:66-8:67" + }, + { + "token": "RBRACE", + "loc": "9:1-9:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "9:2-9:2" + }, + { + "token": "NEWLINE", + "loc": "9:2-9:3" + }, + { + "token": "NEWLINE", + "loc": "10:1-10:2" + }, + { + "token": "FN", + "loc": "11:1-11:3" + }, + { + "token": [ + "LIDENT", + "check_int_zero" + ], + "loc": "11:4-11:18" + }, + { + "token": "LPAREN", + "loc": "11:18-11:19" + }, + { + "token": "RPAREN", + "loc": "11:19-11:20" + }, + { + "token": "THIN_ARROW", + "loc": "11:21-11:23" + }, + { + "token": [ + "UIDENT", + "Bool" + ], + "loc": "11:24-11:28" + }, + { + "token": "LBRACE", + "loc": "11:29-11:30" + }, + { + "token": "NEWLINE", + "loc": "11:30-11:31" + }, + { + "token": "LET", + "loc": "12:3-12:6" + }, + { + "token": [ + "LIDENT", + "xs" + ], + "loc": "12:7-12:9" + }, + { + "token": "COLON", + "loc": "12:10-12:11" + }, + { + "token": [ + "UIDENT", + "FixedArray" + ], + "loc": "12:12-12:22" + }, + { + "token": "LBRACKET", + "loc": "12:22-12:23" + }, + { + "token": [ + "UIDENT", + "Int" + ], + "loc": "12:23-12:26" + }, + { + "token": "RBRACKET", + "loc": "12:26-12:27" + }, + { + "token": "EQUAL", + "loc": "12:28-12:29" + }, + { + "token": [ + "UIDENT", + "FixedArray" + ], + "loc": "12:30-12:40" + }, + { + "token": "COLONCOLON", + "loc": "12:40-12:42" + }, + { + "token": [ + "LIDENT", + "make" + ], + "loc": "12:42-12:46" + }, + { + "token": "LPAREN", + "loc": "12:46-12:47" + }, + { + "token": [ + "INT", + "4" + ], + "loc": "12:47-12:48" + }, + { + "token": "COMMA", + "loc": "12:48-12:49" + }, + { + "token": [ + "INT", + "0" + ], + "loc": "12:50-12:51" + }, + { + "token": "RPAREN", + "loc": "12:51-12:52" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "12:52-12:52" + }, + { + "token": "NEWLINE", + "loc": "12:52-12:53" + }, + { + "token": [ + "LIDENT", + "xs" + ], + "loc": "13:3-13:5" + }, + { + "token": "LBRACKET", + "loc": "13:5-13:6" + }, + { + "token": [ + "INT", + "0" + ], + "loc": "13:6-13:7" + }, + { + "token": "RBRACKET", + "loc": "13:7-13:8" + }, + { + "token": [ + "INFIX1", + "==" + ], + "loc": "13:9-13:11" + }, + { + "token": [ + "INT", + "0" + ], + "loc": "13:12-13:13" + }, + { + "token": "AMPERAMPER", + "loc": "13:14-13:16" + }, + { + "token": [ + "LIDENT", + "xs" + ], + "loc": "13:17-13:19" + }, + { + "token": "LBRACKET", + "loc": "13:19-13:20" + }, + { + "token": [ + "INT", + "1" + ], + "loc": "13:20-13:21" + }, + { + "token": "RBRACKET", + "loc": "13:21-13:22" + }, + { + "token": [ + "INFIX1", + "==" + ], + "loc": "13:23-13:25" + }, + { + "token": [ + "INT", + "0" + ], + "loc": "13:26-13:27" + }, + { + "token": "AMPERAMPER", + "loc": "13:28-13:30" + }, + { + "token": [ + "LIDENT", + "xs" + ], + "loc": "13:31-13:33" + }, + { + "token": "LBRACKET", + "loc": "13:33-13:34" + }, + { + "token": [ + "INT", + "2" + ], + "loc": "13:34-13:35" + }, + { + "token": "RBRACKET", + "loc": "13:35-13:36" + }, + { + "token": [ + "INFIX1", + "==" + ], + "loc": "13:37-13:39" + }, + { + "token": [ + "INT", + "0" + ], + "loc": "13:40-13:41" + }, + { + "token": "AMPERAMPER", + "loc": "13:42-13:44" + }, + { + "token": [ + "LIDENT", + "xs" + ], + "loc": "13:45-13:47" + }, + { + "token": "LBRACKET", + "loc": "13:47-13:48" + }, + { + "token": [ + "INT", + "3" + ], + "loc": "13:48-13:49" + }, + { + "token": "RBRACKET", + "loc": "13:49-13:50" + }, + { + "token": [ + "INFIX1", + "==" + ], + "loc": "13:51-13:53" + }, + { + "token": [ + "INT", + "0" + ], + "loc": "13:54-13:55" + }, + { + "token": "NEWLINE", + "loc": "13:55-13:56" + }, + { + "token": "RBRACE", + "loc": "14:1-14:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "14:2-14:2" + }, + { + "token": "NEWLINE", + "loc": "14:2-14:3" + }, + { + "token": "NEWLINE", + "loc": "15:1-15:2" + }, + { + "token": "FN", + "loc": "16:1-16:3" + }, + { + "token": [ + "LIDENT", + "check_int64_zero" + ], + "loc": "16:4-16:20" + }, + { + "token": "LPAREN", + "loc": "16:20-16:21" + }, + { + "token": "RPAREN", + "loc": "16:21-16:22" + }, + { + "token": "THIN_ARROW", + "loc": "16:23-16:25" + }, + { + "token": [ + "UIDENT", + "Bool" + ], + "loc": "16:26-16:30" + }, + { + "token": "LBRACE", + "loc": "16:31-16:32" + }, + { + "token": "NEWLINE", + "loc": "16:32-16:33" + }, + { + "token": "LET", + "loc": "17:3-17:6" + }, + { + "token": [ + "LIDENT", + "xs" + ], + "loc": "17:7-17:9" + }, + { + "token": "COLON", + "loc": "17:10-17:11" + }, + { + "token": [ + "UIDENT", + "FixedArray" + ], + "loc": "17:12-17:22" + }, + { + "token": "LBRACKET", + "loc": "17:22-17:23" + }, + { + "token": [ + "UIDENT", + "Int64" + ], + "loc": "17:23-17:28" + }, + { + "token": "RBRACKET", + "loc": "17:28-17:29" + }, + { + "token": "EQUAL", + "loc": "17:30-17:31" + }, + { + "token": [ + "UIDENT", + "FixedArray" + ], + "loc": "17:32-17:42" + }, + { + "token": "COLONCOLON", + "loc": "17:42-17:44" + }, + { + "token": [ + "LIDENT", + "make" + ], + "loc": "17:44-17:48" + }, + { + "token": "LPAREN", + "loc": "17:48-17:49" + }, + { + "token": [ + "INT", + "4" + ], + "loc": "17:49-17:50" + }, + { + "token": "COMMA", + "loc": "17:50-17:51" + }, + { + "token": [ + "INT", + "0L" + ], + "loc": "17:52-17:54" + }, + { + "token": "RPAREN", + "loc": "17:54-17:55" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "17:55-17:55" + }, + { + "token": "NEWLINE", + "loc": "17:55-17:56" + }, + { + "token": [ + "LIDENT", + "xs" + ], + "loc": "18:3-18:5" + }, + { + "token": "LBRACKET", + "loc": "18:5-18:6" + }, + { + "token": [ + "INT", + "0" + ], + "loc": "18:6-18:7" + }, + { + "token": "RBRACKET", + "loc": "18:7-18:8" + }, + { + "token": [ + "INFIX1", + "==" + ], + "loc": "18:9-18:11" + }, + { + "token": [ + "INT", + "0L" + ], + "loc": "18:12-18:14" + }, + { + "token": "AMPERAMPER", + "loc": "18:15-18:17" + }, + { + "token": [ + "LIDENT", + "xs" + ], + "loc": "18:18-18:20" + }, + { + "token": "LBRACKET", + "loc": "18:20-18:21" + }, + { + "token": [ + "INT", + "1" + ], + "loc": "18:21-18:22" + }, + { + "token": "RBRACKET", + "loc": "18:22-18:23" + }, + { + "token": [ + "INFIX1", + "==" + ], + "loc": "18:24-18:26" + }, + { + "token": [ + "INT", + "0L" + ], + "loc": "18:27-18:29" + }, + { + "token": "AMPERAMPER", + "loc": "18:30-18:32" + }, + { + "token": [ + "LIDENT", + "xs" + ], + "loc": "18:33-18:35" + }, + { + "token": "LBRACKET", + "loc": "18:35-18:36" + }, + { + "token": [ + "INT", + "2" + ], + "loc": "18:36-18:37" + }, + { + "token": "RBRACKET", + "loc": "18:37-18:38" + }, + { + "token": [ + "INFIX1", + "==" + ], + "loc": "18:39-18:41" + }, + { + "token": [ + "INT", + "0L" + ], + "loc": "18:42-18:44" + }, + { + "token": "AMPERAMPER", + "loc": "18:45-18:47" + }, + { + "token": [ + "LIDENT", + "xs" + ], + "loc": "18:48-18:50" + }, + { + "token": "LBRACKET", + "loc": "18:50-18:51" + }, + { + "token": [ + "INT", + "3" + ], + "loc": "18:51-18:52" + }, + { + "token": "RBRACKET", + "loc": "18:52-18:53" + }, + { + "token": [ + "INFIX1", + "==" + ], + "loc": "18:54-18:56" + }, + { + "token": [ + "INT", + "0L" + ], + "loc": "18:57-18:59" + }, + { + "token": "NEWLINE", + "loc": "18:59-18:60" + }, + { + "token": "RBRACE", + "loc": "19:1-19:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "19:2-19:2" + }, + { + "token": "NEWLINE", + "loc": "19:2-19:3" + }, + { + "token": "NEWLINE", + "loc": "20:1-20:2" + }, + { + "token": "FN", + "loc": "21:1-21:3" + }, + { + "token": [ + "LIDENT", + "check_uint16_zero" + ], + "loc": "21:4-21:21" + }, + { + "token": "LPAREN", + "loc": "21:21-21:22" + }, + { + "token": "RPAREN", + "loc": "21:22-21:23" + }, + { + "token": "THIN_ARROW", + "loc": "21:24-21:26" + }, + { + "token": [ + "UIDENT", + "Bool" + ], + "loc": "21:27-21:31" + }, + { + "token": "LBRACE", + "loc": "21:32-21:33" + }, + { + "token": "NEWLINE", + "loc": "21:33-21:34" + }, + { + "token": "LET", + "loc": "22:3-22:6" + }, + { + "token": [ + "LIDENT", + "xs" + ], + "loc": "22:7-22:9" + }, + { + "token": "COLON", + "loc": "22:10-22:11" + }, + { + "token": [ + "UIDENT", + "FixedArray" + ], + "loc": "22:12-22:22" + }, + { + "token": "LBRACKET", + "loc": "22:22-22:23" + }, + { + "token": [ + "UIDENT", + "UInt16" + ], + "loc": "22:23-22:29" + }, + { + "token": "RBRACKET", + "loc": "22:29-22:30" + }, + { + "token": "EQUAL", + "loc": "22:31-22:32" + }, + { + "token": [ + "UIDENT", + "FixedArray" + ], + "loc": "22:33-22:43" + }, + { + "token": "COLONCOLON", + "loc": "22:43-22:45" + }, + { + "token": [ + "LIDENT", + "make" + ], + "loc": "22:45-22:49" + }, + { + "token": "LPAREN", + "loc": "22:49-22:50" + }, + { + "token": [ + "INT", + "4" + ], + "loc": "22:50-22:51" + }, + { + "token": "COMMA", + "loc": "22:51-22:52" + }, + { + "token": "LPAREN", + "loc": "22:53-22:54" + }, + { + "token": [ + "INT", + "0" + ], + "loc": "22:54-22:55" + }, + { + "token": "COLON", + "loc": "22:56-22:57" + }, + { + "token": [ + "UIDENT", + "UInt16" + ], + "loc": "22:58-22:64" + }, + { + "token": "RPAREN", + "loc": "22:64-22:65" + }, + { + "token": "RPAREN", + "loc": "22:65-22:66" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "22:66-22:66" + }, + { + "token": "NEWLINE", + "loc": "22:66-22:67" + }, + { + "token": [ + "LIDENT", + "xs" + ], + "loc": "23:3-23:5" + }, + { + "token": "LBRACKET", + "loc": "23:5-23:6" + }, + { + "token": [ + "INT", + "0" + ], + "loc": "23:6-23:7" + }, + { + "token": "RBRACKET", + "loc": "23:7-23:8" + }, + { + "token": [ + "INFIX1", + "==" + ], + "loc": "23:9-23:11" + }, + { + "token": [ + "INT", + "0" + ], + "loc": "23:12-23:13" + }, + { + "token": "AMPERAMPER", + "loc": "23:14-23:16" + }, + { + "token": [ + "LIDENT", + "xs" + ], + "loc": "23:17-23:19" + }, + { + "token": "LBRACKET", + "loc": "23:19-23:20" + }, + { + "token": [ + "INT", + "1" + ], + "loc": "23:20-23:21" + }, + { + "token": "RBRACKET", + "loc": "23:21-23:22" + }, + { + "token": [ + "INFIX1", + "==" + ], + "loc": "23:23-23:25" + }, + { + "token": [ + "INT", + "0" + ], + "loc": "23:26-23:27" + }, + { + "token": "AMPERAMPER", + "loc": "23:28-23:30" + }, + { + "token": [ + "LIDENT", + "xs" + ], + "loc": "23:31-23:33" + }, + { + "token": "LBRACKET", + "loc": "23:33-23:34" + }, + { + "token": [ + "INT", + "2" + ], + "loc": "23:34-23:35" + }, + { + "token": "RBRACKET", + "loc": "23:35-23:36" + }, + { + "token": [ + "INFIX1", + "==" + ], + "loc": "23:37-23:39" + }, + { + "token": [ + "INT", + "0" + ], + "loc": "23:40-23:41" + }, + { + "token": "AMPERAMPER", + "loc": "23:42-23:44" + }, + { + "token": [ + "LIDENT", + "xs" + ], + "loc": "23:45-23:47" + }, + { + "token": "LBRACKET", + "loc": "23:47-23:48" + }, + { + "token": [ + "INT", + "3" + ], + "loc": "23:48-23:49" + }, + { + "token": "RBRACKET", + "loc": "23:49-23:50" + }, + { + "token": [ + "INFIX1", + "==" + ], + "loc": "23:51-23:53" + }, + { + "token": [ + "INT", + "0" + ], + "loc": "23:54-23:55" + }, + { + "token": "NEWLINE", + "loc": "23:55-23:56" + }, + { + "token": "RBRACE", + "loc": "24:1-24:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "24:2-24:2" + }, + { + "token": "NEWLINE", + "loc": "24:2-24:3" + }, + { + "token": "NEWLINE", + "loc": "25:1-25:2" + }, + { + "token": "FN", + "loc": "26:1-26:3" + }, + { + "token": [ + "LIDENT", + "main" + ], + "loc": "26:4-26:8" + }, + { + "token": "LBRACE", + "loc": "26:9-26:10" + }, + { + "token": "NEWLINE", + "loc": "26:10-26:11" + }, + { + "token": "IF", + "loc": "27:3-27:5" + }, + { + "token": [ + "LIDENT", + "check_bytes_nonzero" + ], + "loc": "27:6-27:25" + }, + { + "token": "LPAREN", + "loc": "27:25-27:26" + }, + { + "token": "RPAREN", + "loc": "27:26-27:27" + }, + { + "token": "AMPERAMPER", + "loc": "27:28-27:30" + }, + { + "token": "NEWLINE", + "loc": "27:30-27:31" + }, + { + "token": [ + "LIDENT", + "check_bytes_zero" + ], + "loc": "28:5-28:21" + }, + { + "token": "LPAREN", + "loc": "28:21-28:22" + }, + { + "token": "RPAREN", + "loc": "28:22-28:23" + }, + { + "token": "AMPERAMPER", + "loc": "28:24-28:26" + }, + { + "token": "NEWLINE", + "loc": "28:26-28:27" + }, + { + "token": [ + "LIDENT", + "check_int_zero" + ], + "loc": "29:5-29:19" + }, + { + "token": "LPAREN", + "loc": "29:19-29:20" + }, + { + "token": "RPAREN", + "loc": "29:20-29:21" + }, + { + "token": "AMPERAMPER", + "loc": "29:22-29:24" + }, + { + "token": "NEWLINE", + "loc": "29:24-29:25" + }, + { + "token": [ + "LIDENT", + "check_int64_zero" + ], + "loc": "30:5-30:21" + }, + { + "token": "LPAREN", + "loc": "30:21-30:22" + }, + { + "token": "RPAREN", + "loc": "30:22-30:23" + }, + { + "token": "AMPERAMPER", + "loc": "30:24-30:26" + }, + { + "token": "NEWLINE", + "loc": "30:26-30:27" + }, + { + "token": [ + "LIDENT", + "check_uint16_zero" + ], + "loc": "31:5-31:22" + }, + { + "token": "LPAREN", + "loc": "31:22-31:23" + }, + { + "token": "RPAREN", + "loc": "31:23-31:24" + }, + { + "token": "LBRACE", + "loc": "31:25-31:26" + }, + { + "token": "NEWLINE", + "loc": "31:26-31:27" + }, + { + "token": [ + "LIDENT", + "println" + ], + "loc": "32:5-32:12" + }, + { + "token": "LPAREN", + "loc": "32:12-32:13" + }, + { + "token": [ + "STRING", + "ok" + ], + "loc": "32:13-32:17" + }, + { + "token": "RPAREN", + "loc": "32:17-32:18" + }, + { + "token": "NEWLINE", + "loc": "32:18-32:19" + }, + { + "token": "RBRACE", + "loc": "33:3-33:4" + }, + { + "token": "ELSE", + "loc": "33:5-33:9" + }, + { + "token": "LBRACE", + "loc": "33:10-33:11" + }, + { + "token": "NEWLINE", + "loc": "33:11-33:12" + }, + { + "token": [ + "LIDENT", + "println" + ], + "loc": "34:5-34:12" + }, + { + "token": "LPAREN", + "loc": "34:12-34:13" + }, + { + "token": [ + "STRING", + "bad" + ], + "loc": "34:13-34:18" + }, + { + "token": "RPAREN", + "loc": "34:18-34:19" + }, + { + "token": "NEWLINE", + "loc": "34:19-34:20" + }, + { + "token": "RBRACE", + "loc": "35:3-35:4" + }, + { + "token": "NEWLINE", + "loc": "35:4-35:5" + }, + { + "token": "RBRACE", + "loc": "36:1-36:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "36:2-36:2" + }, + { + "token": "NEWLINE", + "loc": "36:2-36:3" + }, + { + "token": "EOF", + "loc": "37:1-37:1" + } +] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/pipeline_test_bytes_overload.json b/test/sync_test/__snapshot__/pipeline_test_bytes_overload.json index 26051e18..0f5a516e 100644 --- a/test/sync_test/__snapshot__/pipeline_test_bytes_overload.json +++ b/test/sync_test/__snapshot__/pipeline_test_bytes_overload.json @@ -121,7 +121,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { @@ -518,7 +519,8 @@ } } ] - } + }, + "is_iter": false } } } diff --git a/test/sync_test/__snapshot__/pipeline_test_bytes_padding.json b/test/sync_test/__snapshot__/pipeline_test_bytes_padding.json index a3848e4c..fbdc0007 100644 --- a/test/sync_test/__snapshot__/pipeline_test_bytes_padding.json +++ b/test/sync_test/__snapshot__/pipeline_test_bytes_padding.json @@ -1401,7 +1401,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { diff --git a/test/sync_test/__snapshot__/pipeline_test_bytesview_implicit_cast.json b/test/sync_test/__snapshot__/pipeline_test_bytesview_implicit_cast.json index b48eb218..3d6d7ebe 100644 --- a/test/sync_test/__snapshot__/pipeline_test_bytesview_implicit_cast.json +++ b/test/sync_test/__snapshot__/pipeline_test_bytesview_implicit_cast.json @@ -1033,7 +1033,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { diff --git a/test/sync_test/__snapshot__/pipeline_test_bytesview_in_array.json b/test/sync_test/__snapshot__/pipeline_test_bytesview_in_array.json index d3047e33..73e82f1c 100644 --- a/test/sync_test/__snapshot__/pipeline_test_bytesview_in_array.json +++ b/test/sync_test/__snapshot__/pipeline_test_bytesview_in_array.json @@ -239,7 +239,8 @@ } } ] - } + }, + "is_iter": false } } } @@ -1537,7 +1538,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -1583,7 +1585,8 @@ "kind": "Expr::Array::ExprList", "loc": null, "children": [] - } + }, + "is_iter": false } }, "body": { diff --git a/test/sync_test/__snapshot__/pipeline_test_bytesview_in_error.json b/test/sync_test/__snapshot__/pipeline_test_bytesview_in_error.json index 1e8baf50..aab0a265 100644 --- a/test/sync_test/__snapshot__/pipeline_test_bytesview_in_error.json +++ b/test/sync_test/__snapshot__/pipeline_test_bytesview_in_error.json @@ -1903,49 +1903,54 @@ "loc": null, "children": { "lhs": { - "kind": "Expr::Group", + "kind": "Expr::Apply", "loc": null, "children": { - "expr": { - "kind": "Expr::TryOperator", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "id": { + "kind": "Var", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "id": { - "kind": "Var", - "loc": null, - "children": { - "name": { - "kind": "LongIdent::Ident", - "loc": null, - "children": { - "value": "f" - } - } - } - } + "value": "to_result" } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Function", "loc": null, - "children": [ - { - "kind": "Argument", + "children": { + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "value": { - "kind": "Expr::ArrayGetSlice", + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Apply", "loc": null, "children": { - "array": { + "func": { "kind": "Expr::Ident", "loc": null, "children": { @@ -1957,90 +1962,140 @@ "kind": "LongIdent::Ident", "loc": null, "children": { - "value": "v" + "value": "f" } } } } } }, - "start_index": { - "kind": "Expr::Constant", + "args": { + "kind": "Expr::Apply::ArgumentList", "loc": null, - "children": { - "constant": { - "kind": "Constant::Int", + "children": [ + { + "kind": "Argument", "loc": null, "children": { - "value": "1" + "value": { + "kind": "Expr::ArrayGetSlice", + "loc": null, + "children": { + "array": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v" + } + } + } + } + } + }, + "start_index": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "1" + } + } + } + }, + "end_index": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "7" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } } - } - } - }, - "end_index": { - "kind": "Expr::Constant", - "loc": null, - "children": { - "constant": { - "kind": "Constant::Int", + }, + { + "kind": "Argument", "loc": null, "children": { - "value": "7" + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Bool", + "loc": null, + "children": { + "value": true + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } } } - } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} } } }, - "kind": { - "kind": "ArgumentKind::Positional", + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", "loc": null, "children": {} - } - } - }, - { - "kind": "Argument", - "loc": null, - "children": { - "value": { - "kind": "Expr::Constant", - "loc": null, - "children": { - "constant": { - "kind": "Constant::Bool", - "loc": null, - "children": { - "value": true - } - } - } }, "kind": { - "kind": "ArgumentKind::Positional", + "kind": "FnKind::Arrow", "loc": null, "children": {} - } + }, + "has_error": null, + "is_async": null } } - ] + } }, - "attr": { - "kind": "ApplyAttr::NoAttr", + "kind": { + "kind": "ArgumentKind::Positional", "loc": null, "children": {} } } - }, - "kind": { - "kind": "TryOperatorKind::Question", - "loc": null, - "children": {} } - } + ] }, - "group": { - "kind": "Group::Paren", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -2074,49 +2129,54 @@ "loc": null, "children": { "lhs": { - "kind": "Expr::Group", + "kind": "Expr::Apply", "loc": null, "children": { - "expr": { - "kind": "Expr::TryOperator", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "id": { + "kind": "Var", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "id": { - "kind": "Var", - "loc": null, - "children": { - "name": { - "kind": "LongIdent::Ident", - "loc": null, - "children": { - "value": "f" - } - } - } - } + "value": "to_result" } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Function", "loc": null, - "children": [ - { - "kind": "Argument", + "children": { + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "value": { - "kind": "Expr::ArrayGetSlice", + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Apply", "loc": null, "children": { - "array": { + "func": { "kind": "Expr::Ident", "loc": null, "children": { @@ -2128,90 +2188,140 @@ "kind": "LongIdent::Ident", "loc": null, "children": { - "value": "v" + "value": "f" } } } } } }, - "start_index": { - "kind": "Expr::Constant", + "args": { + "kind": "Expr::Apply::ArgumentList", "loc": null, - "children": { - "constant": { - "kind": "Constant::Int", + "children": [ + { + "kind": "Argument", "loc": null, "children": { - "value": "3" + "value": { + "kind": "Expr::ArrayGetSlice", + "loc": null, + "children": { + "array": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v" + } + } + } + } + } + }, + "start_index": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "3" + } + } + } + }, + "end_index": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "5" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } } - } - } - }, - "end_index": { - "kind": "Expr::Constant", - "loc": null, - "children": { - "constant": { - "kind": "Constant::Int", + }, + { + "kind": "Argument", "loc": null, "children": { - "value": "5" + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Bool", + "loc": null, + "children": { + "value": false + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } } } - } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} } } }, - "kind": { - "kind": "ArgumentKind::Positional", + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", "loc": null, "children": {} - } - } - }, - { - "kind": "Argument", - "loc": null, - "children": { - "value": { - "kind": "Expr::Constant", - "loc": null, - "children": { - "constant": { - "kind": "Constant::Bool", - "loc": null, - "children": { - "value": false - } - } - } }, "kind": { - "kind": "ArgumentKind::Positional", + "kind": "FnKind::Arrow", "loc": null, "children": {} - } + }, + "has_error": null, + "is_async": null } } - ] + } }, - "attr": { - "kind": "ApplyAttr::NoAttr", + "kind": { + "kind": "ArgumentKind::Positional", "loc": null, "children": {} } } - }, - "kind": { - "kind": "TryOperatorKind::Question", - "loc": null, - "children": {} } - } + ] }, - "group": { - "kind": "Group::Paren", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -2249,5 +2359,524 @@ } } } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "to_result" + } + }, + "has_error": null, + "is_async": null, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "f" + } + }, + "ty": { + "kind": "Type::Arrow", + "loc": null, + "children": { + "args": { + "kind": "Type::Arrow::ArgList", + "loc": null, + "children": [] + }, + "res": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "T" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "err": { + "kind": "ErrorType::ErrorType", + "loc": null, + "children": { + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "E" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + "is_async": null + } + } + } + } + ] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [ + { + "kind": "TypeVarBinder", + "loc": null, + "children": { + "name": "T", + "constraints": { + "kind": "TypeVarBinder::TypeVarConstraintList", + "loc": null, + "children": [] + } + } + }, + { + "kind": "TypeVarBinder", + "loc": null, + "children": { + "name": "E", + "constraints": { + "kind": "TypeVarBinder::TypeVarConstraintList", + "loc": null, + "children": [ + { + "kind": "TypeVarConstraint", + "loc": null, + "children": { + "trait": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Error" + } + } + } + } + ] + } + } + } + ] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [ + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "T" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "E" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + ] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::Try", + "loc": null, + "children": { + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "f" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "catch": { + "kind": "Expr::Try::CaseList", + "loc": null, + "children": [ + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "err" + } + } + } + }, + "guard": null, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Err" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::TypeName", + "loc": null, + "children": { + "value": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + }, + "is_object": false + } + } + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "err" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + ] + }, + "catch_all": false, + "try_else": { + "kind": "Expr::Try::CaseList", + "loc": null, + "children": [ + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "value" + } + } + } + }, + "guard": null, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Ok" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::TypeName", + "loc": null, + "children": { + "value": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + }, + "is_object": false + } + } + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "value" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + ] + }, + "has_try": true + } + } + } + } + } } ] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/pipeline_test_bytesview_in_error.mbt b/test/sync_test/__snapshot__/pipeline_test_bytesview_in_error.mbt index 8ed3a723..e128f331 100644 --- a/test/sync_test/__snapshot__/pipeline_test_bytesview_in_error.mbt +++ b/test/sync_test/__snapshot__/pipeline_test_bytesview_in_error.mbt @@ -38,6 +38,15 @@ fn main { g2() let bs = Bytes::makei(10, i => i.to_byte()) let v = bs[1:9] - (try? f(v[1:7], true)) |> debug - (try? f(v[3:5], false)) |> debug + to_result(() => f(v[1:7], true)) |> debug + to_result(() => f(v[3:5], false)) |> debug +} + +fn[T, E : Error] to_result(f : () -> T raise E) -> Result[T, E] { + try f() + catch { + err => Result::Err(err) + } noraise { + value => Result::Ok(value) + } } diff --git a/test/sync_test/__snapshot__/pipeline_test_bytesview_in_error.mbt.tokens.json b/test/sync_test/__snapshot__/pipeline_test_bytesview_in_error.mbt.tokens.json index f332b10f..cb0dd691 100644 --- a/test/sync_test/__snapshot__/pipeline_test_bytesview_in_error.mbt.tokens.json +++ b/test/sync_test/__snapshot__/pipeline_test_bytesview_in_error.mbt.tokens.json @@ -1237,178 +1237,208 @@ "token": "NEWLINE", "loc": "40:18-40:19" }, + { + "token": [ + "LIDENT", + "to_result" + ], + "loc": "41:3-41:12" + }, + { + "token": "LPAREN", + "loc": "41:12-41:13" + }, { "token": "LPAREN", - "loc": "41:3-41:4" + "loc": "41:13-41:14" }, { - "token": "TRY_QUESTION", - "loc": "41:4-41:8" + "token": "RPAREN", + "loc": "41:14-41:15" + }, + { + "token": "FAT_ARROW", + "loc": "41:16-41:18" }, { "token": [ "LIDENT", "f" ], - "loc": "41:9-41:10" + "loc": "41:19-41:20" }, { "token": "LPAREN", - "loc": "41:10-41:11" + "loc": "41:20-41:21" }, { "token": [ "LIDENT", "v" ], - "loc": "41:11-41:12" + "loc": "41:21-41:22" }, { "token": "LBRACKET", - "loc": "41:12-41:13" + "loc": "41:22-41:23" }, { "token": [ "INT", "1" ], - "loc": "41:13-41:14" + "loc": "41:23-41:24" }, { "token": "COLON", - "loc": "41:14-41:15" + "loc": "41:24-41:25" }, { "token": [ "INT", "7" ], - "loc": "41:15-41:16" + "loc": "41:25-41:26" }, { "token": "RBRACKET", - "loc": "41:16-41:17" + "loc": "41:26-41:27" }, { "token": "COMMA", - "loc": "41:17-41:18" + "loc": "41:27-41:28" }, { "token": "TRUE", - "loc": "41:19-41:23" + "loc": "41:29-41:33" }, { "token": "RPAREN", - "loc": "41:23-41:24" + "loc": "41:33-41:34" }, { "token": "RPAREN", - "loc": "41:24-41:25" + "loc": "41:34-41:35" }, { "token": "PIPE", - "loc": "41:26-41:28" + "loc": "41:36-41:38" }, { "token": [ "LIDENT", "debug" ], - "loc": "41:29-41:34" + "loc": "41:39-41:44" }, { "token": [ "SEMI", false ], - "loc": "41:34-41:34" + "loc": "41:44-41:44" }, { "token": "NEWLINE", - "loc": "41:34-41:35" + "loc": "41:44-41:45" + }, + { + "token": [ + "LIDENT", + "to_result" + ], + "loc": "42:3-42:12" }, { "token": "LPAREN", - "loc": "42:3-42:4" + "loc": "42:12-42:13" }, { - "token": "TRY_QUESTION", - "loc": "42:4-42:8" + "token": "LPAREN", + "loc": "42:13-42:14" + }, + { + "token": "RPAREN", + "loc": "42:14-42:15" + }, + { + "token": "FAT_ARROW", + "loc": "42:16-42:18" }, { "token": [ "LIDENT", "f" ], - "loc": "42:9-42:10" + "loc": "42:19-42:20" }, { "token": "LPAREN", - "loc": "42:10-42:11" + "loc": "42:20-42:21" }, { "token": [ "LIDENT", "v" ], - "loc": "42:11-42:12" + "loc": "42:21-42:22" }, { "token": "LBRACKET", - "loc": "42:12-42:13" + "loc": "42:22-42:23" }, { "token": [ "INT", "3" ], - "loc": "42:13-42:14" + "loc": "42:23-42:24" }, { "token": "COLON", - "loc": "42:14-42:15" + "loc": "42:24-42:25" }, { "token": [ "INT", "5" ], - "loc": "42:15-42:16" + "loc": "42:25-42:26" }, { "token": "RBRACKET", - "loc": "42:16-42:17" + "loc": "42:26-42:27" }, { "token": "COMMA", - "loc": "42:17-42:18" + "loc": "42:27-42:28" }, { "token": "FALSE", - "loc": "42:19-42:24" + "loc": "42:29-42:34" }, { "token": "RPAREN", - "loc": "42:24-42:25" + "loc": "42:34-42:35" }, { "token": "RPAREN", - "loc": "42:25-42:26" + "loc": "42:35-42:36" }, { "token": "PIPE", - "loc": "42:27-42:29" + "loc": "42:37-42:39" }, { "token": [ "LIDENT", "debug" ], - "loc": "42:30-42:35" + "loc": "42:40-42:45" }, { "token": "NEWLINE", - "loc": "42:35-42:36" + "loc": "42:45-42:46" }, { "token": "RBRACE", @@ -1425,8 +1455,324 @@ "token": "NEWLINE", "loc": "43:2-43:3" }, + { + "token": "NEWLINE", + "loc": "44:1-44:2" + }, + { + "token": "FN", + "loc": "45:1-45:3" + }, + { + "token": "LBRACKET", + "loc": "45:3-45:4" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "45:4-45:5" + }, + { + "token": "COMMA", + "loc": "45:5-45:6" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "45:7-45:8" + }, + { + "token": "COLON", + "loc": "45:9-45:10" + }, + { + "token": [ + "UIDENT", + "Error" + ], + "loc": "45:11-45:16" + }, + { + "token": "RBRACKET", + "loc": "45:16-45:17" + }, + { + "token": [ + "LIDENT", + "to_result" + ], + "loc": "45:18-45:27" + }, + { + "token": "LPAREN", + "loc": "45:27-45:28" + }, + { + "token": [ + "LIDENT", + "f" + ], + "loc": "45:28-45:29" + }, + { + "token": "COLON", + "loc": "45:30-45:31" + }, + { + "token": "LPAREN", + "loc": "45:32-45:33" + }, + { + "token": "RPAREN", + "loc": "45:33-45:34" + }, + { + "token": "THIN_ARROW", + "loc": "45:35-45:37" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "45:38-45:39" + }, + { + "token": "RAISE", + "loc": "45:40-45:45" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "45:46-45:47" + }, + { + "token": "RPAREN", + "loc": "45:47-45:48" + }, + { + "token": "THIN_ARROW", + "loc": "45:49-45:51" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "45:52-45:58" + }, + { + "token": "LBRACKET", + "loc": "45:58-45:59" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "45:59-45:60" + }, + { + "token": "COMMA", + "loc": "45:60-45:61" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "45:62-45:63" + }, + { + "token": "RBRACKET", + "loc": "45:63-45:64" + }, + { + "token": "LBRACE", + "loc": "45:65-45:66" + }, + { + "token": "NEWLINE", + "loc": "45:66-45:67" + }, + { + "token": "TRY", + "loc": "46:3-46:6" + }, + { + "token": [ + "LIDENT", + "f" + ], + "loc": "46:7-46:8" + }, + { + "token": "LPAREN", + "loc": "46:8-46:9" + }, + { + "token": "RPAREN", + "loc": "46:9-46:10" + }, + { + "token": "NEWLINE", + "loc": "46:10-46:11" + }, + { + "token": "CATCH", + "loc": "47:3-47:8" + }, + { + "token": "LBRACE", + "loc": "47:9-47:10" + }, + { + "token": "NEWLINE", + "loc": "47:10-47:11" + }, + { + "token": [ + "LIDENT", + "err" + ], + "loc": "48:5-48:8" + }, + { + "token": "FAT_ARROW", + "loc": "48:9-48:11" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "48:12-48:18" + }, + { + "token": "COLONCOLON", + "loc": "48:18-48:20" + }, + { + "token": [ + "UIDENT", + "Err" + ], + "loc": "48:20-48:23" + }, + { + "token": "LPAREN", + "loc": "48:23-48:24" + }, + { + "token": [ + "LIDENT", + "err" + ], + "loc": "48:24-48:27" + }, + { + "token": "RPAREN", + "loc": "48:27-48:28" + }, + { + "token": "NEWLINE", + "loc": "48:28-48:29" + }, + { + "token": "RBRACE", + "loc": "49:3-49:4" + }, + { + "token": "NORAISE", + "loc": "49:5-49:12" + }, + { + "token": "LBRACE", + "loc": "49:13-49:14" + }, + { + "token": "NEWLINE", + "loc": "49:14-49:15" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "50:5-50:10" + }, + { + "token": "FAT_ARROW", + "loc": "50:11-50:13" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "50:14-50:20" + }, + { + "token": "COLONCOLON", + "loc": "50:20-50:22" + }, + { + "token": [ + "UIDENT", + "Ok" + ], + "loc": "50:22-50:24" + }, + { + "token": "LPAREN", + "loc": "50:24-50:25" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "50:25-50:30" + }, + { + "token": "RPAREN", + "loc": "50:30-50:31" + }, + { + "token": "NEWLINE", + "loc": "50:31-50:32" + }, + { + "token": "RBRACE", + "loc": "51:3-51:4" + }, + { + "token": "NEWLINE", + "loc": "51:4-51:5" + }, + { + "token": "RBRACE", + "loc": "52:1-52:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "52:2-52:2" + }, + { + "token": "NEWLINE", + "loc": "52:2-52:3" + }, { "token": "EOF", - "loc": "44:1-44:1" + "loc": "53:1-53:1" } ] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/pipeline_test_bytesview_in_struct.json b/test/sync_test/__snapshot__/pipeline_test_bytesview_in_struct.json index 48a6a9c2..9977b54b 100644 --- a/test/sync_test/__snapshot__/pipeline_test_bytesview_in_struct.json +++ b/test/sync_test/__snapshot__/pipeline_test_bytesview_in_struct.json @@ -991,7 +991,8 @@ } } ] - } + }, + "is_iter": false } } } diff --git a/test/sync_test/__snapshot__/pipeline_test_bytesview_length_bind.json b/test/sync_test/__snapshot__/pipeline_test_bytesview_length_bind.json index 31644c74..d95d09b5 100644 --- a/test/sync_test/__snapshot__/pipeline_test_bytesview_length_bind.json +++ b/test/sync_test/__snapshot__/pipeline_test_bytesview_length_bind.json @@ -654,7 +654,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { diff --git a/test/sync_test/__snapshot__/pipeline_test_bytesview_set_null.json b/test/sync_test/__snapshot__/pipeline_test_bytesview_set_null.json index 2d8d84aa..8d46d783 100644 --- a/test/sync_test/__snapshot__/pipeline_test_bytesview_set_null.json +++ b/test/sync_test/__snapshot__/pipeline_test_bytesview_set_null.json @@ -261,7 +261,8 @@ "kind": "Expr::Array::ExprList", "loc": null, "children": [] - } + }, + "is_iter": false } }, "body": { diff --git a/test/sync_test/__snapshot__/pipeline_test_call_func_ref.json b/test/sync_test/__snapshot__/pipeline_test_call_func_ref.json index 025ace50..3479369d 100644 --- a/test/sync_test/__snapshot__/pipeline_test_call_func_ref.json +++ b/test/sync_test/__snapshot__/pipeline_test_call_func_ref.json @@ -968,7 +968,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { diff --git a/test/sync_test/__snapshot__/pipeline_test_call_trait_method.json b/test/sync_test/__snapshot__/pipeline_test_call_trait_method.json index 8e5c226a..d3329ef8 100644 --- a/test/sync_test/__snapshot__/pipeline_test_call_trait_method.json +++ b/test/sync_test/__snapshot__/pipeline_test_call_trait_method.json @@ -664,6 +664,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, diff --git a/test/sync_test/__snapshot__/pipeline_test_cascade.json b/test/sync_test/__snapshot__/pipeline_test_cascade.json index 4e7e9cfc..81b7a5fe 100644 --- a/test/sync_test/__snapshot__/pipeline_test_cascade.json +++ b/test/sync_test/__snapshot__/pipeline_test_cascade.json @@ -117,7 +117,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { @@ -1688,7 +1689,8 @@ "kind": "Expr::Array::ExprList", "loc": null, "children": [] - } + }, + "is_iter": false } } } @@ -2059,7 +2061,8 @@ "kind": "Expr::Array::ExprList", "loc": null, "children": [] - } + }, + "is_iter": false } }, "body": { @@ -2087,7 +2090,8 @@ "kind": "Expr::Array::ExprList", "loc": null, "children": [] - } + }, + "is_iter": false } }, "body": { @@ -3490,7 +3494,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { diff --git a/test/sync_test/__snapshot__/pipeline_test_catch_all.json b/test/sync_test/__snapshot__/pipeline_test_catch_all.json index b0e714bb..f75da31e 100644 --- a/test/sync_test/__snapshot__/pipeline_test_catch_all.json +++ b/test/sync_test/__snapshot__/pipeline_test_catch_all.json @@ -1174,46 +1174,112 @@ "loc": null, "children": { "value": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "to_result" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", "loc": null, "children": { - "id": { - "kind": "Var", + "value": { + "kind": "Expr::Function", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "value": "f3" + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "f3" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null } } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", - "loc": null, - "children": [] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} } - } + ] }, - "kind": { - "kind": "TryOperatorKind::Question", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -1269,46 +1335,112 @@ "loc": null, "children": { "value": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", + "value": "to_result" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Function", + "loc": null, + "children": { + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "value": "f4" + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "f4" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null } } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", - "loc": null, - "children": [] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} } - } + ] }, - "kind": { - "kind": "TryOperatorKind::Question", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -1335,5 +1467,524 @@ } } } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "to_result" + } + }, + "has_error": null, + "is_async": null, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "f" + } + }, + "ty": { + "kind": "Type::Arrow", + "loc": null, + "children": { + "args": { + "kind": "Type::Arrow::ArgList", + "loc": null, + "children": [] + }, + "res": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "T" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "err": { + "kind": "ErrorType::ErrorType", + "loc": null, + "children": { + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "E" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + "is_async": null + } + } + } + } + ] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [ + { + "kind": "TypeVarBinder", + "loc": null, + "children": { + "name": "T", + "constraints": { + "kind": "TypeVarBinder::TypeVarConstraintList", + "loc": null, + "children": [] + } + } + }, + { + "kind": "TypeVarBinder", + "loc": null, + "children": { + "name": "E", + "constraints": { + "kind": "TypeVarBinder::TypeVarConstraintList", + "loc": null, + "children": [ + { + "kind": "TypeVarConstraint", + "loc": null, + "children": { + "trait": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Error" + } + } + } + } + ] + } + } + } + ] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [ + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "T" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "E" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + ] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::Try", + "loc": null, + "children": { + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "f" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "catch": { + "kind": "Expr::Try::CaseList", + "loc": null, + "children": [ + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "err" + } + } + } + }, + "guard": null, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Err" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::TypeName", + "loc": null, + "children": { + "value": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + }, + "is_object": false + } + } + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "err" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + ] + }, + "catch_all": false, + "try_else": { + "kind": "Expr::Try::CaseList", + "loc": null, + "children": [ + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "value" + } + } + } + }, + "guard": null, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Ok" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::TypeName", + "loc": null, + "children": { + "value": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + }, + "is_object": false + } + } + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "value" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + ] + }, + "has_try": true + } + } + } + } + } } ] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/pipeline_test_catch_all.mbt b/test/sync_test/__snapshot__/pipeline_test_catch_all.mbt index 51d8b83d..f6a6314e 100644 --- a/test/sync_test/__snapshot__/pipeline_test_catch_all.mbt +++ b/test/sync_test/__snapshot__/pipeline_test_catch_all.mbt @@ -25,6 +25,15 @@ fn f4() -> Unit raise { } fn main { - debug(try? f3()) - debug(try? f4()) + debug(to_result(() => f3())) + debug(to_result(() => f4())) +} + +fn[T, E : Error] to_result(f : () -> T raise E) -> Result[T, E] { + try f() + catch { + err => Result::Err(err) + } noraise { + value => Result::Ok(value) + } } diff --git a/test/sync_test/__snapshot__/pipeline_test_catch_all.mbt.tokens.json b/test/sync_test/__snapshot__/pipeline_test_catch_all.mbt.tokens.json index 722d5fff..562adc61 100644 --- a/test/sync_test/__snapshot__/pipeline_test_catch_all.mbt.tokens.json +++ b/test/sync_test/__snapshot__/pipeline_test_catch_all.mbt.tokens.json @@ -686,38 +686,61 @@ "loc": "28:8-28:9" }, { - "token": "TRY_QUESTION", - "loc": "28:9-28:13" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "28:9-28:18" + }, + { + "token": "LPAREN", + "loc": "28:18-28:19" + }, + { + "token": "LPAREN", + "loc": "28:19-28:20" + }, + { + "token": "RPAREN", + "loc": "28:20-28:21" + }, + { + "token": "FAT_ARROW", + "loc": "28:22-28:24" }, { "token": [ "LIDENT", "f3" ], - "loc": "28:14-28:16" + "loc": "28:25-28:27" }, { "token": "LPAREN", - "loc": "28:16-28:17" + "loc": "28:27-28:28" }, { "token": "RPAREN", - "loc": "28:17-28:18" + "loc": "28:28-28:29" }, { "token": "RPAREN", - "loc": "28:18-28:19" + "loc": "28:29-28:30" + }, + { + "token": "RPAREN", + "loc": "28:30-28:31" }, { "token": [ "SEMI", false ], - "loc": "28:19-28:19" + "loc": "28:31-28:31" }, { "token": "NEWLINE", - "loc": "28:19-28:20" + "loc": "28:31-28:32" }, { "token": [ @@ -731,31 +754,54 @@ "loc": "29:8-29:9" }, { - "token": "TRY_QUESTION", - "loc": "29:9-29:13" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "29:9-29:18" + }, + { + "token": "LPAREN", + "loc": "29:18-29:19" + }, + { + "token": "LPAREN", + "loc": "29:19-29:20" + }, + { + "token": "RPAREN", + "loc": "29:20-29:21" + }, + { + "token": "FAT_ARROW", + "loc": "29:22-29:24" }, { "token": [ "LIDENT", "f4" ], - "loc": "29:14-29:16" + "loc": "29:25-29:27" }, { "token": "LPAREN", - "loc": "29:16-29:17" + "loc": "29:27-29:28" }, { "token": "RPAREN", - "loc": "29:17-29:18" + "loc": "29:28-29:29" }, { "token": "RPAREN", - "loc": "29:18-29:19" + "loc": "29:29-29:30" + }, + { + "token": "RPAREN", + "loc": "29:30-29:31" }, { "token": "NEWLINE", - "loc": "29:19-29:20" + "loc": "29:31-29:32" }, { "token": "RBRACE", @@ -772,8 +818,324 @@ "token": "NEWLINE", "loc": "30:2-30:3" }, + { + "token": "NEWLINE", + "loc": "31:1-31:2" + }, + { + "token": "FN", + "loc": "32:1-32:3" + }, + { + "token": "LBRACKET", + "loc": "32:3-32:4" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "32:4-32:5" + }, + { + "token": "COMMA", + "loc": "32:5-32:6" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "32:7-32:8" + }, + { + "token": "COLON", + "loc": "32:9-32:10" + }, + { + "token": [ + "UIDENT", + "Error" + ], + "loc": "32:11-32:16" + }, + { + "token": "RBRACKET", + "loc": "32:16-32:17" + }, + { + "token": [ + "LIDENT", + "to_result" + ], + "loc": "32:18-32:27" + }, + { + "token": "LPAREN", + "loc": "32:27-32:28" + }, + { + "token": [ + "LIDENT", + "f" + ], + "loc": "32:28-32:29" + }, + { + "token": "COLON", + "loc": "32:30-32:31" + }, + { + "token": "LPAREN", + "loc": "32:32-32:33" + }, + { + "token": "RPAREN", + "loc": "32:33-32:34" + }, + { + "token": "THIN_ARROW", + "loc": "32:35-32:37" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "32:38-32:39" + }, + { + "token": "RAISE", + "loc": "32:40-32:45" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "32:46-32:47" + }, + { + "token": "RPAREN", + "loc": "32:47-32:48" + }, + { + "token": "THIN_ARROW", + "loc": "32:49-32:51" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "32:52-32:58" + }, + { + "token": "LBRACKET", + "loc": "32:58-32:59" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "32:59-32:60" + }, + { + "token": "COMMA", + "loc": "32:60-32:61" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "32:62-32:63" + }, + { + "token": "RBRACKET", + "loc": "32:63-32:64" + }, + { + "token": "LBRACE", + "loc": "32:65-32:66" + }, + { + "token": "NEWLINE", + "loc": "32:66-32:67" + }, + { + "token": "TRY", + "loc": "33:3-33:6" + }, + { + "token": [ + "LIDENT", + "f" + ], + "loc": "33:7-33:8" + }, + { + "token": "LPAREN", + "loc": "33:8-33:9" + }, + { + "token": "RPAREN", + "loc": "33:9-33:10" + }, + { + "token": "NEWLINE", + "loc": "33:10-33:11" + }, + { + "token": "CATCH", + "loc": "34:3-34:8" + }, + { + "token": "LBRACE", + "loc": "34:9-34:10" + }, + { + "token": "NEWLINE", + "loc": "34:10-34:11" + }, + { + "token": [ + "LIDENT", + "err" + ], + "loc": "35:5-35:8" + }, + { + "token": "FAT_ARROW", + "loc": "35:9-35:11" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "35:12-35:18" + }, + { + "token": "COLONCOLON", + "loc": "35:18-35:20" + }, + { + "token": [ + "UIDENT", + "Err" + ], + "loc": "35:20-35:23" + }, + { + "token": "LPAREN", + "loc": "35:23-35:24" + }, + { + "token": [ + "LIDENT", + "err" + ], + "loc": "35:24-35:27" + }, + { + "token": "RPAREN", + "loc": "35:27-35:28" + }, + { + "token": "NEWLINE", + "loc": "35:28-35:29" + }, + { + "token": "RBRACE", + "loc": "36:3-36:4" + }, + { + "token": "NORAISE", + "loc": "36:5-36:12" + }, + { + "token": "LBRACE", + "loc": "36:13-36:14" + }, + { + "token": "NEWLINE", + "loc": "36:14-36:15" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "37:5-37:10" + }, + { + "token": "FAT_ARROW", + "loc": "37:11-37:13" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "37:14-37:20" + }, + { + "token": "COLONCOLON", + "loc": "37:20-37:22" + }, + { + "token": [ + "UIDENT", + "Ok" + ], + "loc": "37:22-37:24" + }, + { + "token": "LPAREN", + "loc": "37:24-37:25" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "37:25-37:30" + }, + { + "token": "RPAREN", + "loc": "37:30-37:31" + }, + { + "token": "NEWLINE", + "loc": "37:31-37:32" + }, + { + "token": "RBRACE", + "loc": "38:3-38:4" + }, + { + "token": "NEWLINE", + "loc": "38:4-38:5" + }, + { + "token": "RBRACE", + "loc": "39:1-39:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "39:2-39:2" + }, + { + "token": "NEWLINE", + "loc": "39:2-39:3" + }, { "token": "EOF", - "loc": "31:1-31:1" + "loc": "40:1-40:1" } ] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/pipeline_test_chain_error_optional_test.json b/test/sync_test/__snapshot__/pipeline_test_chain_error_optional_test.json index 18297adc..acfbb1ce 100644 --- a/test/sync_test/__snapshot__/pipeline_test_chain_error_optional_test.json +++ b/test/sync_test/__snapshot__/pipeline_test_chain_error_optional_test.json @@ -625,57 +625,112 @@ "loc": null, "children": { "lhs": { - "kind": "Expr::Group", + "kind": "Expr::Apply", "loc": null, "children": { - "expr": { - "kind": "Expr::TryOperator", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "id": { + "kind": "Var", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "id": { - "kind": "Var", + "value": "to_result" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Function", + "loc": null, + "children": { + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Apply", "loc": null, "children": { - "value": "f" + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "f" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } } - } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null } } } }, - "args": { - "kind": "Expr::Apply::ArgumentList", - "loc": null, - "children": [] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", + "kind": { + "kind": "ArgumentKind::Positional", "loc": null, "children": {} } } - }, - "kind": { - "kind": "TryOperatorKind::Question", - "loc": null, - "children": {} } - } + ] }, - "group": { - "kind": "Group::Paren", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -956,57 +1011,112 @@ "loc": null, "children": { "lhs": { - "kind": "Expr::Group", + "kind": "Expr::Apply", "loc": null, "children": { - "expr": { - "kind": "Expr::TryOperator", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "id": { + "kind": "Var", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "id": { - "kind": "Var", + "value": "to_result" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Function", + "loc": null, + "children": { + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Apply", "loc": null, "children": { - "value": "f" + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "f" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } } - } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null } } } }, - "args": { - "kind": "Expr::Apply::ArgumentList", - "loc": null, - "children": [] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", + "kind": { + "kind": "ArgumentKind::Positional", "loc": null, "children": {} } } - }, - "kind": { - "kind": "TryOperatorKind::Question", - "loc": null, - "children": {} } - } + ] }, - "group": { - "kind": "Group::Paren", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -1050,5 +1160,524 @@ }, "doc": "" } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "to_result" + } + }, + "has_error": null, + "is_async": null, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "f" + } + }, + "ty": { + "kind": "Type::Arrow", + "loc": null, + "children": { + "args": { + "kind": "Type::Arrow::ArgList", + "loc": null, + "children": [] + }, + "res": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "T" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "err": { + "kind": "ErrorType::ErrorType", + "loc": null, + "children": { + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "E" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + "is_async": null + } + } + } + } + ] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [ + { + "kind": "TypeVarBinder", + "loc": null, + "children": { + "name": "T", + "constraints": { + "kind": "TypeVarBinder::TypeVarConstraintList", + "loc": null, + "children": [] + } + } + }, + { + "kind": "TypeVarBinder", + "loc": null, + "children": { + "name": "E", + "constraints": { + "kind": "TypeVarBinder::TypeVarConstraintList", + "loc": null, + "children": [ + { + "kind": "TypeVarConstraint", + "loc": null, + "children": { + "trait": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Error" + } + } + } + } + ] + } + } + } + ] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [ + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "T" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "E" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + ] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::Try", + "loc": null, + "children": { + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "f" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "catch": { + "kind": "Expr::Try::CaseList", + "loc": null, + "children": [ + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "err" + } + } + } + }, + "guard": null, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Err" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::TypeName", + "loc": null, + "children": { + "value": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + }, + "is_object": false + } + } + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "err" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + ] + }, + "catch_all": false, + "try_else": { + "kind": "Expr::Try::CaseList", + "loc": null, + "children": [ + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "value" + } + } + } + }, + "guard": null, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Ok" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::TypeName", + "loc": null, + "children": { + "value": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + }, + "is_object": false + } + } + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "value" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + ] + }, + "has_try": true + } + } + } + } + } } ] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/pipeline_test_chain_error_optional_test.mbt b/test/sync_test/__snapshot__/pipeline_test_chain_error_optional_test.mbt index 295cb117..17273052 100644 --- a/test/sync_test/__snapshot__/pipeline_test_chain_error_optional_test.mbt +++ b/test/sync_test/__snapshot__/pipeline_test_chain_error_optional_test.mbt @@ -9,11 +9,20 @@ fn main { let f = id(() => raise Failure::Failure("error")) // can not infer // let f : () -> Unit raise Failure = id(fn () { raise Failure("error")}) // let f = id(fn () -> Unit ! Error { raise Failure("error")}) - (try? f()) |> ignore + to_result(() => f()) |> ignore } ///| test { let f : () -> Unit raise Failure = id(() => raise Failure("error")) - (try? f()) |> ignore + to_result(() => f()) |> ignore +} + +fn[T, E : Error] to_result(f : () -> T raise E) -> Result[T, E] { + try f() + catch { + err => Result::Err(err) + } noraise { + value => Result::Ok(value) + } } diff --git a/test/sync_test/__snapshot__/pipeline_test_chain_error_optional_test.mbt.tokens.json b/test/sync_test/__snapshot__/pipeline_test_chain_error_optional_test.mbt.tokens.json index d30ead57..2f69cf61 100644 --- a/test/sync_test/__snapshot__/pipeline_test_chain_error_optional_test.mbt.tokens.json +++ b/test/sync_test/__snapshot__/pipeline_test_chain_error_optional_test.mbt.tokens.json @@ -405,47 +405,62 @@ "token": "NEWLINE", "loc": "11:65-11:66" }, + { + "token": [ + "LIDENT", + "to_result" + ], + "loc": "12:3-12:12" + }, + { + "token": "LPAREN", + "loc": "12:12-12:13" + }, { "token": "LPAREN", - "loc": "12:3-12:4" + "loc": "12:13-12:14" + }, + { + "token": "RPAREN", + "loc": "12:14-12:15" }, { - "token": "TRY_QUESTION", - "loc": "12:4-12:8" + "token": "FAT_ARROW", + "loc": "12:16-12:18" }, { "token": [ "LIDENT", "f" ], - "loc": "12:9-12:10" + "loc": "12:19-12:20" }, { "token": "LPAREN", - "loc": "12:10-12:11" + "loc": "12:20-12:21" }, { "token": "RPAREN", - "loc": "12:11-12:12" + "loc": "12:21-12:22" }, { "token": "RPAREN", - "loc": "12:12-12:13" + "loc": "12:22-12:23" }, { "token": "PIPE", - "loc": "12:14-12:16" + "loc": "12:24-12:26" }, { "token": [ "LIDENT", "ignore" ], - "loc": "12:17-12:23" + "loc": "12:27-12:33" }, { "token": "NEWLINE", - "loc": "12:23-12:24" + "loc": "12:33-12:34" }, { "token": "RBRACE", @@ -612,47 +627,62 @@ "token": "NEWLINE", "loc": "17:70-17:71" }, + { + "token": [ + "LIDENT", + "to_result" + ], + "loc": "18:3-18:12" + }, + { + "token": "LPAREN", + "loc": "18:12-18:13" + }, { "token": "LPAREN", - "loc": "18:3-18:4" + "loc": "18:13-18:14" + }, + { + "token": "RPAREN", + "loc": "18:14-18:15" }, { - "token": "TRY_QUESTION", - "loc": "18:4-18:8" + "token": "FAT_ARROW", + "loc": "18:16-18:18" }, { "token": [ "LIDENT", "f" ], - "loc": "18:9-18:10" + "loc": "18:19-18:20" }, { "token": "LPAREN", - "loc": "18:10-18:11" + "loc": "18:20-18:21" }, { "token": "RPAREN", - "loc": "18:11-18:12" + "loc": "18:21-18:22" }, { "token": "RPAREN", - "loc": "18:12-18:13" + "loc": "18:22-18:23" }, { "token": "PIPE", - "loc": "18:14-18:16" + "loc": "18:24-18:26" }, { "token": [ "LIDENT", "ignore" ], - "loc": "18:17-18:23" + "loc": "18:27-18:33" }, { "token": "NEWLINE", - "loc": "18:23-18:24" + "loc": "18:33-18:34" }, { "token": "RBRACE", @@ -669,8 +699,324 @@ "token": "NEWLINE", "loc": "19:2-19:3" }, + { + "token": "NEWLINE", + "loc": "20:1-20:2" + }, + { + "token": "FN", + "loc": "21:1-21:3" + }, + { + "token": "LBRACKET", + "loc": "21:3-21:4" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "21:4-21:5" + }, + { + "token": "COMMA", + "loc": "21:5-21:6" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "21:7-21:8" + }, + { + "token": "COLON", + "loc": "21:9-21:10" + }, + { + "token": [ + "UIDENT", + "Error" + ], + "loc": "21:11-21:16" + }, + { + "token": "RBRACKET", + "loc": "21:16-21:17" + }, + { + "token": [ + "LIDENT", + "to_result" + ], + "loc": "21:18-21:27" + }, + { + "token": "LPAREN", + "loc": "21:27-21:28" + }, + { + "token": [ + "LIDENT", + "f" + ], + "loc": "21:28-21:29" + }, + { + "token": "COLON", + "loc": "21:30-21:31" + }, + { + "token": "LPAREN", + "loc": "21:32-21:33" + }, + { + "token": "RPAREN", + "loc": "21:33-21:34" + }, + { + "token": "THIN_ARROW", + "loc": "21:35-21:37" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "21:38-21:39" + }, + { + "token": "RAISE", + "loc": "21:40-21:45" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "21:46-21:47" + }, + { + "token": "RPAREN", + "loc": "21:47-21:48" + }, + { + "token": "THIN_ARROW", + "loc": "21:49-21:51" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "21:52-21:58" + }, + { + "token": "LBRACKET", + "loc": "21:58-21:59" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "21:59-21:60" + }, + { + "token": "COMMA", + "loc": "21:60-21:61" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "21:62-21:63" + }, + { + "token": "RBRACKET", + "loc": "21:63-21:64" + }, + { + "token": "LBRACE", + "loc": "21:65-21:66" + }, + { + "token": "NEWLINE", + "loc": "21:66-21:67" + }, + { + "token": "TRY", + "loc": "22:3-22:6" + }, + { + "token": [ + "LIDENT", + "f" + ], + "loc": "22:7-22:8" + }, + { + "token": "LPAREN", + "loc": "22:8-22:9" + }, + { + "token": "RPAREN", + "loc": "22:9-22:10" + }, + { + "token": "NEWLINE", + "loc": "22:10-22:11" + }, + { + "token": "CATCH", + "loc": "23:3-23:8" + }, + { + "token": "LBRACE", + "loc": "23:9-23:10" + }, + { + "token": "NEWLINE", + "loc": "23:10-23:11" + }, + { + "token": [ + "LIDENT", + "err" + ], + "loc": "24:5-24:8" + }, + { + "token": "FAT_ARROW", + "loc": "24:9-24:11" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "24:12-24:18" + }, + { + "token": "COLONCOLON", + "loc": "24:18-24:20" + }, + { + "token": [ + "UIDENT", + "Err" + ], + "loc": "24:20-24:23" + }, + { + "token": "LPAREN", + "loc": "24:23-24:24" + }, + { + "token": [ + "LIDENT", + "err" + ], + "loc": "24:24-24:27" + }, + { + "token": "RPAREN", + "loc": "24:27-24:28" + }, + { + "token": "NEWLINE", + "loc": "24:28-24:29" + }, + { + "token": "RBRACE", + "loc": "25:3-25:4" + }, + { + "token": "NORAISE", + "loc": "25:5-25:12" + }, + { + "token": "LBRACE", + "loc": "25:13-25:14" + }, + { + "token": "NEWLINE", + "loc": "25:14-25:15" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "26:5-26:10" + }, + { + "token": "FAT_ARROW", + "loc": "26:11-26:13" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "26:14-26:20" + }, + { + "token": "COLONCOLON", + "loc": "26:20-26:22" + }, + { + "token": [ + "UIDENT", + "Ok" + ], + "loc": "26:22-26:24" + }, + { + "token": "LPAREN", + "loc": "26:24-26:25" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "26:25-26:30" + }, + { + "token": "RPAREN", + "loc": "26:30-26:31" + }, + { + "token": "NEWLINE", + "loc": "26:31-26:32" + }, + { + "token": "RBRACE", + "loc": "27:3-27:4" + }, + { + "token": "NEWLINE", + "loc": "27:4-27:5" + }, + { + "token": "RBRACE", + "loc": "28:1-28:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "28:2-28:2" + }, + { + "token": "NEWLINE", + "loc": "28:2-28:3" + }, { "token": "EOF", - "loc": "20:1-20:1" + "loc": "29:1-29:1" } ] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/pipeline_test_char_array.json b/test/sync_test/__snapshot__/pipeline_test_char_array.json index 50fa851a..90a299d2 100644 --- a/test/sync_test/__snapshot__/pipeline_test_char_array.json +++ b/test/sync_test/__snapshot__/pipeline_test_char_array.json @@ -400,7 +400,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -524,7 +525,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -640,7 +642,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -782,7 +785,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -842,7 +846,8 @@ "kind": "Expr::Array::ExprList", "loc": null, "children": [] - } + }, + "is_iter": false } }, "kind": { diff --git a/test/sync_test/__snapshot__/pipeline_test_closure2.json b/test/sync_test/__snapshot__/pipeline_test_closure2.json index 0c466266..f2016801 100644 --- a/test/sync_test/__snapshot__/pipeline_test_closure2.json +++ b/test/sync_test/__snapshot__/pipeline_test_closure2.json @@ -129,7 +129,8 @@ } } ] - } + }, + "is_iter": false } }, "vis": { diff --git a/test/sync_test/__snapshot__/pipeline_test_closure_as_object.json b/test/sync_test/__snapshot__/pipeline_test_closure_as_object.json index 2073bd41..2395938b 100644 --- a/test/sync_test/__snapshot__/pipeline_test_closure_as_object.json +++ b/test/sync_test/__snapshot__/pipeline_test_closure_as_object.json @@ -103,7 +103,8 @@ "kind": "Expr::Array::ExprList", "loc": null, "children": [] - } + }, + "is_iter": false } }, "vis": { diff --git a/test/sync_test/__snapshot__/pipeline_test_compare_and_eq.json b/test/sync_test/__snapshot__/pipeline_test_compare_and_eq.json index c9b53087..238f0f59 100644 --- a/test/sync_test/__snapshot__/pipeline_test_compare_and_eq.json +++ b/test/sync_test/__snapshot__/pipeline_test_compare_and_eq.json @@ -740,6 +740,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, @@ -1295,6 +1300,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, @@ -1841,6 +1851,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, @@ -2184,6 +2199,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, diff --git a/test/sync_test/__snapshot__/pipeline_test_compare_trait.json b/test/sync_test/__snapshot__/pipeline_test_compare_trait.json index bfaf7f33..d3fced7d 100644 --- a/test/sync_test/__snapshot__/pipeline_test_compare_trait.json +++ b/test/sync_test/__snapshot__/pipeline_test_compare_trait.json @@ -694,6 +694,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, @@ -888,6 +893,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, @@ -1082,6 +1092,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, @@ -1276,6 +1291,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, @@ -1493,6 +1513,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, @@ -1621,6 +1646,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, @@ -1749,6 +1779,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, @@ -1877,6 +1912,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, @@ -2005,6 +2045,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, @@ -2133,6 +2178,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, @@ -2261,6 +2311,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, @@ -2389,6 +2444,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, @@ -2517,6 +2577,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, @@ -2645,6 +2710,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, @@ -2773,6 +2843,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, @@ -2996,6 +3071,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, @@ -3132,6 +3212,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, @@ -3268,6 +3353,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, @@ -3404,6 +3494,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, @@ -3540,6 +3635,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, @@ -3763,6 +3863,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, @@ -3899,6 +4004,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, @@ -4035,6 +4145,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, @@ -4171,6 +4286,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, @@ -4307,6 +4427,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, @@ -4435,6 +4560,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, @@ -4563,6 +4693,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, @@ -4691,6 +4826,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, @@ -4819,6 +4959,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, @@ -4947,6 +5092,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, @@ -5075,6 +5225,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, @@ -5203,6 +5358,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, @@ -5331,6 +5491,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, @@ -5459,6 +5624,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, @@ -5658,6 +5828,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, @@ -9061,6 +9236,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, diff --git a/test/sync_test/__snapshot__/pipeline_test_conditional_template_writing.json b/test/sync_test/__snapshot__/pipeline_test_conditional_template_writing.json new file mode 100644 index 00000000..ef91bc09 --- /dev/null +++ b/test/sync_test/__snapshot__/pipeline_test_conditional_template_writing.json @@ -0,0 +1,5078 @@ +[ + { + "kind": "Impl::TopTypeDef", + "loc": null, + "children": { + "value": { + "kind": "TypeDecl", + "loc": null, + "children": { + "tycon": "Writer", + "params": { + "kind": "TypeDecl::ParamList", + "loc": null, + "children": [] + }, + "components": { + "kind": "TypeDesc::TupleStruct", + "loc": null, + "children": { + "value": { + "kind": "TypeDesc::TupleStruct::TypeList", + "loc": null, + "children": [ + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "StringBuilder" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + ] + } + } + }, + "attrs": { + "kind": "TypeDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "", + "type_vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "is_declare": false, + "deriving": { + "kind": "TypeDecl::DerivingList", + "loc": null, + "children": [] + } + } + } + } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Writer" + } + }, + "is_object": false + } + }, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "new" + } + }, + "has_error": null, + "is_async": null, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Writer" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Method", + "loc": null, + "children": { + "type_name": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "StringBuilder" + } + }, + "is_object": false + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "new" + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Writer" + } + }, + "is_object": false + } + }, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "write_string" + } + }, + "has_error": null, + "is_async": null, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "self" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Self" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "value" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "String" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + } + ] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Unit" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Field", + "loc": null, + "children": { + "record": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "self" + } + } + } + } + } + }, + "accessor": { + "kind": "Accessor::Index", + "loc": null, + "children": { + "tuple_index": 0 + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "write_string" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "value" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Writer" + } + }, + "is_object": false + } + }, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "write_string_interpolation" + } + }, + "has_error": null, + "is_async": null, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "self" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Self" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "value" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "String" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + } + ] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Unit" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Field", + "loc": null, + "children": { + "record": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "self" + } + } + } + } + } + }, + "accessor": { + "kind": "Accessor::Index", + "loc": null, + "children": { + "tuple_index": 0 + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "write_string" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "value" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Writer" + } + }, + "is_object": false + } + }, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "write_object_begin" + } + }, + "has_error": null, + "is_async": null, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "self" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Self" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + } + ] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Unit" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Field", + "loc": null, + "children": { + "record": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "self" + } + } + } + } + } + }, + "accessor": { + "kind": "Accessor::Index", + "loc": null, + "children": { + "tuple_index": 0 + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "write_string" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "{" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Writer" + } + }, + "is_object": false + } + }, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "write_object_field" + } + }, + "has_error": null, + "is_async": null, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "self" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Self" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "key" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "String" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "value" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "String" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + } + ] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Unit" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::Sequence", + "loc": null, + "children": { + "exprs": { + "kind": "Expr::Sequence::ExprList", + "loc": null, + "children": [ + { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Field", + "loc": null, + "children": { + "record": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "self" + } + } + } + } + } + }, + "accessor": { + "kind": "Accessor::Index", + "loc": null, + "children": { + "tuple_index": 0 + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "write_string" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "key" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Field", + "loc": null, + "children": { + "record": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "self" + } + } + } + } + } + }, + "accessor": { + "kind": "Accessor::Index", + "loc": null, + "children": { + "tuple_index": 0 + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "write_string" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": ":" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Field", + "loc": null, + "children": { + "record": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "self" + } + } + } + } + } + }, + "accessor": { + "kind": "Accessor::Index", + "loc": null, + "children": { + "tuple_index": 0 + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "write_string" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "value" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + ] + }, + "last_expr": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Field", + "loc": null, + "children": { + "record": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "self" + } + } + } + } + } + }, + "accessor": { + "kind": "Accessor::Index", + "loc": null, + "children": { + "tuple_index": 0 + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "write_string" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "," + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + } + } + } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Writer" + } + }, + "is_object": false + } + }, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "write_object_end" + } + }, + "has_error": null, + "is_async": null, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "self" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Self" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + } + ] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Unit" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Field", + "loc": null, + "children": { + "record": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "self" + } + } + } + } + } + }, + "accessor": { + "kind": "Accessor::Index", + "loc": null, + "children": { + "tuple_index": 0 + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "write_string" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "}\\n" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Writer" + } + }, + "is_object": false + } + }, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "snapshot" + } + }, + "has_error": null, + "is_async": null, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "self" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Self" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + } + ] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "String" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Field", + "loc": null, + "children": { + "record": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "self" + } + } + } + } + } + }, + "accessor": { + "kind": "Accessor::Index", + "loc": null, + "children": { + "tuple_index": 0 + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "to_string" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + } + }, + { + "kind": "Impl::TopTypeDef", + "loc": null, + "children": { + "value": { + "kind": "TypeDecl", + "loc": null, + "children": { + "tycon": "Holder", + "params": { + "kind": "TypeDecl::ParamList", + "loc": null, + "children": [] + }, + "components": { + "kind": "TypeDesc::Record", + "loc": null, + "children": { + "value": { + "kind": "TypeDesc::Record::FieldList", + "loc": null, + "children": [ + { + "kind": "FieldDecl", + "loc": null, + "children": { + "name": { + "kind": "FieldName", + "loc": null, + "children": { + "label": "writer" + } + }, + "ty": { + "kind": "Type::Option", + "loc": null, + "children": { + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Writer" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + "mut": false, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FieldDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + } + ] + } + } + }, + "attrs": { + "kind": "TypeDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "", + "type_vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "is_declare": false, + "deriving": { + "kind": "TypeDecl::DerivingList", + "loc": null, + "children": [] + } + } + } + } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "get_writer" + } + }, + "has_error": null, + "is_async": null, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "writer" + } + }, + "ty": { + "kind": "Type::Option", + "loc": null, + "children": { + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Writer" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + } + } + } + ] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [] + }, + "return_type": { + "kind": "Type::Option", + "loc": null, + "children": { + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Writer" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "writer" + } + } + } + } + } + } + } + } + } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "take_unit" + } + }, + "has_error": null, + "is_async": null, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::DiscardPositional", + "loc": null, + "children": { + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Unit" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + } + ] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Unit" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::Unit", + "loc": null, + "children": { + "faked": false + } + } + } + } + } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "print_optional_writer" + } + }, + "has_error": null, + "is_async": null, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "writer" + } + }, + "ty": { + "kind": "Type::Option", + "loc": null, + "children": { + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Writer" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + } + } + } + ] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Unit" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::Match", + "loc": null, + "children": { + "expr": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "writer" + } + } + } + } + } + }, + "cases": { + "kind": "Expr::Match::CaseList", + "loc": null, + "children": [ + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Some" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::NoExtraInfo", + "loc": null, + "children": {} + } + } + }, + "args": { + "kind": "Pattern::Constr::ArgList", + "loc": null, + "children": [ + { + "kind": "ConstrPatArg", + "loc": null, + "children": { + "pat": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "writer" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "is_open": false + } + }, + "guard": null, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "writer" + } + } + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "snapshot" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + }, + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "None" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::NoExtraInfo", + "loc": null, + "children": {} + } + } + }, + "args": null, + "is_open": false + } + }, + "guard": null, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + ] + } + } + } + } + } + } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "main" + } + }, + "has_error": null, + "is_async": null, + "decl_params": null, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [] + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::Let", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "writer" + } + } + } + }, + "expr": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Method", + "loc": null, + "children": { + "type_name": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Writer" + } + }, + "is_object": false + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "new" + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "body": { + "kind": "Expr::Let", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "some" + } + } + } + }, + "expr": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Some" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::NoExtraInfo", + "loc": null, + "children": {} + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "writer" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "body": { + "kind": "Expr::Sequence", + "loc": null, + "children": { + "exprs": { + "kind": "Expr::Sequence::ExprList", + "loc": null, + "children": [ + { + "kind": "Expr::TemplateWriting", + "loc": null, + "children": { + "expr": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "some" + } + } + } + } + } + }, + "template": { + "kind": "Expr::Interp", + "loc": null, + "children": { + "elems": { + "kind": "Expr::Interp::ElemList", + "loc": null, + "children": [ + { + "kind": "InterpElem::Literal", + "loc": null, + "children": { + "repr": "value " + } + }, + { + "kind": "InterpElem::Source", + "loc": null, + "children": { + "source": "\"one\"" + } + }, + { + "kind": "InterpElem::Literal", + "loc": null, + "children": { + "repr": "\\n" + } + } + ] + } + } + }, + "is_conditional": true + } + }, + { + "kind": "Expr::TemplateWriting", + "loc": null, + "children": { + "expr": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "some" + } + } + } + } + } + }, + "template": { + "kind": "Expr::MultilineString", + "loc": null, + "children": { + "elems": { + "kind": "Expr::MultilineString::ElemList", + "loc": null, + "children": [ + { + "kind": "MultilineString::String", + "loc": null, + "children": { + "value": "raw" + } + }, + { + "kind": "MultilineString::String", + "loc": null, + "children": { + "value": "line" + } + }, + { + "kind": "MultilineString::String", + "loc": null, + "children": { + "value": "" + } + } + ] + } + } + }, + "is_conditional": true + } + }, + { + "kind": "Expr::TemplateWriting", + "loc": null, + "children": { + "expr": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "some" + } + } + } + } + } + }, + "template": { + "kind": "Expr::MultilineString", + "loc": null, + "children": { + "elems": { + "kind": "Expr::MultilineString::ElemList", + "loc": null, + "children": [ + { + "kind": "MultilineString::Interp", + "loc": null, + "children": { + "value": { + "kind": "MultilineString::Interp::ElemList", + "loc": null, + "children": [ + { + "kind": "InterpElem::Literal", + "loc": null, + "children": { + "repr": "interp " + } + }, + { + "kind": "InterpElem::Source", + "loc": null, + "children": { + "source": "\"two\"" + } + } + ] + } + } + }, + { + "kind": "MultilineString::Interp", + "loc": null, + "children": { + "value": { + "kind": "MultilineString::Interp::ElemList", + "loc": null, + "children": [ + { + "kind": "InterpElem::Literal", + "loc": null, + "children": { + "repr": "line " + } + }, + { + "kind": "InterpElem::Source", + "loc": null, + "children": { + "source": "\"three\"" + } + } + ] + } + } + }, + { + "kind": "MultilineString::Interp", + "loc": null, + "children": { + "value": { + "kind": "MultilineString::Interp::ElemList", + "loc": null, + "children": [ + { + "kind": "InterpElem::Literal", + "loc": null, + "children": { + "repr": "" + } + } + ] + } + } + } + ] + } + } + }, + "is_conditional": true + } + }, + { + "kind": "Expr::TemplateWriting", + "loc": null, + "children": { + "expr": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "some" + } + } + } + } + } + }, + "template": { + "kind": "Expr::Map", + "loc": null, + "children": { + "elems": { + "kind": "Expr::Map::ElemList", + "loc": null, + "children": [ + { + "kind": "MapExprElem", + "loc": null, + "children": { + "key": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "a" + } + }, + "expr": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "A" + } + } + } + } + } + }, + { + "kind": "MapExprElem", + "loc": null, + "children": { + "key": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "b" + } + }, + "expr": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "B" + } + } + } + } + } + } + ] + } + } + }, + "is_conditional": true + } + }, + { + "kind": "Expr::TemplateWriting", + "loc": null, + "children": { + "expr": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "some" + } + } + } + } + } + }, + "template": { + "kind": "Expr::Map", + "loc": null, + "children": { + "elems": { + "kind": "Expr::Map::ElemList", + "loc": null, + "children": [] + } + } + }, + "is_conditional": true + } + } + ] + }, + "last_expr": { + "kind": "Expr::Let", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Constraint", + "loc": null, + "children": { + "pat": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "none" + } + } + } + }, + "ty": { + "kind": "Type::Option", + "loc": null, + "children": { + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Writer" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + } + } + }, + "expr": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "None" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::NoExtraInfo", + "loc": null, + "children": {} + } + } + } + } + }, + "body": { + "kind": "Expr::Sequence", + "loc": null, + "children": { + "exprs": { + "kind": "Expr::Sequence::ExprList", + "loc": null, + "children": [ + { + "kind": "Expr::TemplateWriting", + "loc": null, + "children": { + "expr": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "none" + } + } + } + } + } + }, + "template": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "skipped" + } + } + } + }, + "is_conditional": true + } + }, + { + "kind": "Expr::TemplateWriting", + "loc": null, + "children": { + "expr": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "none" + } + } + } + } + } + }, + "template": { + "kind": "Expr::Map", + "loc": null, + "children": { + "elems": { + "kind": "Expr::Map::ElemList", + "loc": null, + "children": [ + { + "kind": "MapExprElem", + "loc": null, + "children": { + "key": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "skip" + } + }, + "expr": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "me" + } + } + } + } + } + } + ] + } + } + }, + "is_conditional": true + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "take_unit" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::TemplateWriting", + "loc": null, + "children": { + "expr": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "some" + } + } + } + } + } + }, + "template": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "nested" + } + } + } + }, + "is_conditional": true + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + ] + }, + "last_expr": { + "kind": "Expr::Let", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Any", + "loc": null, + "children": {} + }, + "expr": { + "kind": "Expr::TemplateWriting", + "loc": null, + "children": { + "expr": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "some" + } + } + } + } + } + }, + "template": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "as expr" + } + } + } + }, + "is_conditional": true + } + }, + "body": { + "kind": "Expr::Sequence", + "loc": null, + "children": { + "exprs": { + "kind": "Expr::Sequence::ExprList", + "loc": null, + "children": [ + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "writer" + } + } + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "snapshot" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + ] + }, + "last_expr": { + "kind": "Expr::Let", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "direct" + } + } + } + }, + "expr": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Method", + "loc": null, + "children": { + "type_name": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Writer" + } + }, + "is_object": false + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "new" + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "body": { + "kind": "Expr::Sequence", + "loc": null, + "children": { + "exprs": { + "kind": "Expr::Sequence::ExprList", + "loc": null, + "children": [ + { + "kind": "Expr::TemplateWriting", + "loc": null, + "children": { + "expr": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "direct" + } + } + } + } + } + }, + "template": { + "kind": "Expr::Map", + "loc": null, + "children": { + "elems": { + "kind": "Expr::Map::ElemList", + "loc": null, + "children": [ + { + "kind": "MapExprElem", + "loc": null, + "children": { + "key": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "direct" + } + }, + "expr": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "value" + } + } + } + } + } + } + ] + } + } + }, + "is_conditional": false + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "direct" + } + } + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "snapshot" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + ] + }, + "last_expr": { + "kind": "Expr::Let", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "paren_writer" + } + } + } + }, + "expr": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Method", + "loc": null, + "children": { + "type_name": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Writer" + } + }, + "is_object": false + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "new" + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "body": { + "kind": "Expr::Sequence", + "loc": null, + "children": { + "exprs": { + "kind": "Expr::Sequence::ExprList", + "loc": null, + "children": [ + { + "kind": "Expr::TemplateWriting", + "loc": null, + "children": { + "expr": { + "kind": "Expr::Group", + "loc": null, + "children": { + "expr": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Some" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::NoExtraInfo", + "loc": null, + "children": {} + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "paren_writer" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "group": { + "kind": "Group::Paren", + "loc": null, + "children": {} + } + } + }, + "template": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "paren" + } + } + } + }, + "is_conditional": true + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "paren_writer" + } + } + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "snapshot" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + ] + }, + "last_expr": { + "kind": "Expr::Let", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "call_writer" + } + } + } + }, + "expr": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Method", + "loc": null, + "children": { + "type_name": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Writer" + } + }, + "is_object": false + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "new" + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "body": { + "kind": "Expr::Sequence", + "loc": null, + "children": { + "exprs": { + "kind": "Expr::Sequence::ExprList", + "loc": null, + "children": [ + { + "kind": "Expr::TemplateWriting", + "loc": null, + "children": { + "expr": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "get_writer" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Some" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::NoExtraInfo", + "loc": null, + "children": {} + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "call_writer" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "template": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "call" + } + } + } + }, + "is_conditional": true + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "call_writer" + } + } + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "snapshot" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + ] + }, + "last_expr": { + "kind": "Expr::Let", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "holder" + } + } + } + }, + "expr": { + "kind": "Expr::Record", + "loc": null, + "children": { + "type_name": null, + "fields": { + "kind": "Expr::Record::FieldList", + "loc": null, + "children": [ + { + "kind": "FieldDef", + "loc": null, + "children": { + "label": { + "kind": "Label", + "loc": null, + "children": { + "name": "writer" + } + }, + "expr": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Some" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::NoExtraInfo", + "loc": null, + "children": {} + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Method", + "loc": null, + "children": { + "type_name": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Writer" + } + }, + "is_object": false + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "new" + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "is_pun": false + } + } + ] + }, + "trailing": { + "kind": "Trailing::None", + "loc": null, + "children": {} + } + } + }, + "body": { + "kind": "Expr::Sequence", + "loc": null, + "children": { + "exprs": { + "kind": "Expr::Sequence::ExprList", + "loc": null, + "children": [ + { + "kind": "Expr::TemplateWriting", + "loc": null, + "children": { + "expr": { + "kind": "Expr::Field", + "loc": null, + "children": { + "record": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "holder" + } + } + } + } + } + }, + "accessor": { + "kind": "Accessor::Label", + "loc": null, + "children": { + "value": { + "kind": "Label", + "loc": null, + "children": { + "name": "writer" + } + } + } + } + } + }, + "template": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "field" + } + } + } + }, + "is_conditional": true + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "print_optional_writer" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Field", + "loc": null, + "children": { + "record": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "holder" + } + } + } + } + } + }, + "accessor": { + "kind": "Accessor::Label", + "loc": null, + "children": { + "value": { + "kind": "Label", + "loc": null, + "children": { + "name": "writer" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + ] + }, + "last_expr": { + "kind": "Expr::Let", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "writers" + } + } + } + }, + "expr": { + "kind": "Expr::Array", + "loc": null, + "children": { + "exprs": { + "kind": "Expr::Array::ExprList", + "loc": null, + "children": [ + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Some" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::NoExtraInfo", + "loc": null, + "children": {} + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Method", + "loc": null, + "children": { + "type_name": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Writer" + } + }, + "is_object": false + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "new" + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + ] + }, + "is_iter": false + } + }, + "body": { + "kind": "Expr::Sequence", + "loc": null, + "children": { + "exprs": { + "kind": "Expr::Sequence::ExprList", + "loc": null, + "children": [ + { + "kind": "Expr::TemplateWriting", + "loc": null, + "children": { + "expr": { + "kind": "Expr::ArrayGet", + "loc": null, + "children": { + "array": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "writers" + } + } + } + } + } + }, + "index": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "0" + } + } + } + } + } + }, + "template": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "index" + } + } + } + }, + "is_conditional": true + } + } + ] + }, + "last_expr": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "print_optional_writer" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::ArrayGet", + "loc": null, + "children": { + "array": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "writers" + } + } + } + } + } + }, + "index": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "0" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } +] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/pipeline_test_conditional_template_writing.mbt b/test/sync_test/__snapshot__/pipeline_test_conditional_template_writing.mbt new file mode 100644 index 00000000..14babfc3 --- /dev/null +++ b/test/sync_test/__snapshot__/pipeline_test_conditional_template_writing.mbt @@ -0,0 +1,91 @@ +struct Writer(StringBuilder) + +fn Writer::new() -> Writer { + StringBuilder::new() +} + +fn Writer::write_string(self : Self, value : String) -> Unit { + self.0.write_string(value) +} + +fn Writer::write_string_interpolation(self : Self, value : String) -> Unit { + self.0.write_string(value) +} + +fn Writer::write_object_begin(self : Self) -> Unit { + self.0.write_string("{") +} + +fn Writer::write_object_field(self : Self, key : String, value : String) -> Unit { + self.0.write_string(key) + self.0.write_string(":") + self.0.write_string(value) + self.0.write_string(",") +} + +fn Writer::write_object_end(self : Self) -> Unit { + self.0.write_string("}\n") +} + +fn Writer::snapshot(self : Self) -> String { + self.0.to_string() +} + +struct Holder { + writer : Writer? +} + +fn get_writer(writer : Writer?) -> Writer? { + writer +} + +fn take_unit(_ : Unit) -> Unit { + () +} + +fn print_optional_writer(writer : Writer?) -> Unit { + match writer { + Some(writer) => println(writer.snapshot()) + None => println("") + } +} + +fn main { + let writer = Writer::new() + let some = Some(writer) + some " + ], + "loc": "49:21-49:29" + }, + { + "token": "RPAREN", + "loc": "49:29-49:30" + }, + { + "token": "NEWLINE", + "loc": "49:30-49:31" + }, + { + "token": "RBRACE", + "loc": "50:3-50:4" + }, + { + "token": "NEWLINE", + "loc": "50:4-50:5" + }, + { + "token": "RBRACE", + "loc": "51:1-51:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "51:2-51:2" + }, + { + "token": "NEWLINE", + "loc": "51:2-51:3" + }, + { + "token": "NEWLINE", + "loc": "52:1-52:2" + }, + { + "token": "FN", + "loc": "53:1-53:3" + }, + { + "token": [ + "LIDENT", + "main" + ], + "loc": "53:4-53:8" + }, + { + "token": "LBRACE", + "loc": "53:9-53:10" + }, + { + "token": "NEWLINE", + "loc": "53:10-53:11" + }, + { + "token": "LET", + "loc": "54:3-54:6" + }, + { + "token": [ + "LIDENT", + "writer" + ], + "loc": "54:7-54:13" + }, + { + "token": "EQUAL", + "loc": "54:14-54:15" + }, + { + "token": [ + "UIDENT", + "Writer" + ], + "loc": "54:16-54:22" + }, + { + "token": "COLONCOLON", + "loc": "54:22-54:24" + }, + { + "token": [ + "LIDENT", + "new" + ], + "loc": "54:24-54:27" + }, + { + "token": "LPAREN", + "loc": "54:27-54:28" + }, + { + "token": "RPAREN", + "loc": "54:28-54:29" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "54:29-54:29" + }, + { + "token": "NEWLINE", + "loc": "54:29-54:30" + }, + { + "token": "LET", + "loc": "55:3-55:6" + }, + { + "token": [ + "LIDENT", + "some" + ], + "loc": "55:7-55:11" + }, + { + "token": "EQUAL", + "loc": "55:12-55:13" + }, + { + "token": [ + "UIDENT", + "Some" + ], + "loc": "55:14-55:18" + }, + { + "token": "LPAREN", + "loc": "55:18-55:19" + }, + { + "token": [ + "LIDENT", + "writer" + ], + "loc": "55:19-55:25" + }, + { + "token": "RPAREN", + "loc": "55:25-55:26" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "55:26-55:26" + }, + { + "token": "NEWLINE", + "loc": "55:26-55:27" + }, + { + "token": [ + "LIDENT", + "some" + ], + "loc": "56:3-56:7" + }, + { + "token": "LT_QUESTION", + "loc": "56:8-56:10" + }, + { + "token": [ + "INTERP", + "\"value \\{\"one\"}\\n\"" + ], + "loc": "56:11-56:29" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "56:29-56:29" + }, + { + "token": "NEWLINE", + "loc": "56:29-56:30" + }, + { + "token": [ + "LIDENT", + "some" + ], + "loc": "57:3-57:7" + }, + { + "token": "LT_QUESTION", + "loc": "57:8-57:10" + }, + { + "token": [ + "MULTILINE_STRING", + "raw" + ], + "loc": "57:11-57:16" + }, + { + "token": "NEWLINE", + "loc": "57:16-57:17" + }, + { + "token": [ + "MULTILINE_STRING", + "line" + ], + "loc": "58:11-58:17" + }, + { + "token": "NEWLINE", + "loc": "58:17-58:18" + }, + { + "token": [ + "MULTILINE_STRING", + "" + ], + "loc": "59:11-59:13" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "59:13-59:13" + }, + { + "token": "NEWLINE", + "loc": "59:13-59:14" + }, + { + "token": [ + "LIDENT", + "some" + ], + "loc": "60:3-60:7" + }, + { + "token": "LT_QUESTION", + "loc": "60:8-60:10" + }, + { + "token": [ + "MULTILINE_INTERP", + "\"interp \\{\"two\"}\"" + ], + "loc": "60:11-60:28" + }, + { + "token": "NEWLINE", + "loc": "60:28-60:29" + }, + { + "token": [ + "MULTILINE_INTERP", + "\"line \\{\"three\"}\"" + ], + "loc": "61:11-61:28" + }, + { + "token": "NEWLINE", + "loc": "61:28-61:29" + }, + { + "token": [ + "MULTILINE_INTERP", + "\"\"" + ], + "loc": "62:11-62:13" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "62:13-62:13" + }, + { + "token": "NEWLINE", + "loc": "62:13-62:14" + }, + { + "token": [ + "LIDENT", + "some" + ], + "loc": "63:3-63:7" + }, + { + "token": "LT_QUESTION", + "loc": "63:8-63:10" + }, + { + "token": "LBRACE", + "loc": "63:11-63:12" + }, + { + "token": [ + "STRING", + "a" + ], + "loc": "63:13-63:16" + }, + { + "token": "COLON", + "loc": "63:16-63:17" + }, + { + "token": [ + "STRING", + "A" + ], + "loc": "63:18-63:21" + }, + { + "token": "COMMA", + "loc": "63:21-63:22" + }, + { + "token": [ + "STRING", + "b" + ], + "loc": "63:23-63:26" + }, + { + "token": "COLON", + "loc": "63:26-63:27" + }, + { + "token": [ + "STRING", + "B" + ], + "loc": "63:28-63:31" + }, + { + "token": "RBRACE", + "loc": "63:32-63:33" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "63:33-63:33" + }, + { + "token": "NEWLINE", + "loc": "63:33-63:34" + }, + { + "token": [ + "LIDENT", + "some" + ], + "loc": "64:3-64:7" + }, + { + "token": "LT_QUESTION", + "loc": "64:8-64:10" + }, + { + "token": "LBRACE", + "loc": "64:11-64:12" + }, + { + "token": "RBRACE", + "loc": "64:12-64:13" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "64:13-64:13" + }, + { + "token": "NEWLINE", + "loc": "64:13-64:14" + }, + { + "token": "LET", + "loc": "65:3-65:6" + }, + { + "token": [ + "LIDENT", + "none" + ], + "loc": "65:7-65:11" + }, + { + "token": "COLON", + "loc": "65:12-65:13" + }, + { + "token": [ + "UIDENT", + "Writer" + ], + "loc": "65:14-65:20" + }, + { + "token": "QUESTION", + "loc": "65:20-65:21" + }, + { + "token": "EQUAL", + "loc": "65:22-65:23" + }, + { + "token": [ + "UIDENT", + "None" + ], + "loc": "65:24-65:28" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "65:28-65:28" + }, + { + "token": "NEWLINE", + "loc": "65:28-65:29" + }, + { + "token": [ + "LIDENT", + "none" + ], + "loc": "66:3-66:7" + }, + { + "token": "LT_QUESTION", + "loc": "66:8-66:10" + }, + { + "token": [ + "STRING", + "skipped" + ], + "loc": "66:11-66:20" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "66:20-66:20" + }, + { + "token": "NEWLINE", + "loc": "66:20-66:21" + }, + { + "token": [ + "LIDENT", + "none" + ], + "loc": "67:3-67:7" + }, + { + "token": "LT_QUESTION", + "loc": "67:8-67:10" + }, + { + "token": "LBRACE", + "loc": "67:11-67:12" + }, + { + "token": [ + "STRING", + "skip" + ], + "loc": "67:13-67:19" + }, + { + "token": "COLON", + "loc": "67:19-67:20" + }, + { + "token": [ + "STRING", + "me" + ], + "loc": "67:21-67:25" + }, + { + "token": "RBRACE", + "loc": "67:26-67:27" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "67:27-67:27" + }, + { + "token": "NEWLINE", + "loc": "67:27-67:28" + }, + { + "token": [ + "LIDENT", + "take_unit" + ], + "loc": "68:3-68:12" + }, + { + "token": "LPAREN", + "loc": "68:12-68:13" + }, + { + "token": [ + "LIDENT", + "some" + ], + "loc": "68:13-68:17" + }, + { + "token": "LT_QUESTION", + "loc": "68:18-68:20" + }, + { + "token": [ + "STRING", + "nested" + ], + "loc": "68:21-68:29" + }, + { + "token": "RPAREN", + "loc": "68:29-68:30" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "68:30-68:30" + }, + { + "token": "NEWLINE", + "loc": "68:30-68:31" + }, + { + "token": "LET", + "loc": "69:3-69:6" + }, + { + "token": "UNDERSCORE", + "loc": "69:7-69:8" + }, + { + "token": "EQUAL", + "loc": "69:9-69:10" + }, + { + "token": [ + "LIDENT", + "some" + ], + "loc": "69:11-69:15" + }, + { + "token": "LT_QUESTION", + "loc": "69:16-69:18" + }, + { + "token": [ + "STRING", + "as expr" + ], + "loc": "69:19-69:28" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "69:28-69:28" + }, + { + "token": "NEWLINE", + "loc": "69:28-69:29" + }, + { + "token": [ + "LIDENT", + "println" + ], + "loc": "70:3-70:10" + }, + { + "token": "LPAREN", + "loc": "70:10-70:11" + }, + { + "token": [ + "LIDENT", + "writer" + ], + "loc": "70:11-70:17" + }, + { + "token": [ + "DOT_LIDENT", + "snapshot" + ], + "loc": "70:18-70:26" + }, + { + "token": "LPAREN", + "loc": "70:26-70:27" + }, + { + "token": "RPAREN", + "loc": "70:27-70:28" + }, + { + "token": "RPAREN", + "loc": "70:28-70:29" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "70:29-70:29" + }, + { + "token": "NEWLINE", + "loc": "70:29-70:30" + }, + { + "token": "NEWLINE", + "loc": "71:1-71:2" + }, + { + "token": "LET", + "loc": "72:3-72:6" + }, + { + "token": [ + "LIDENT", + "direct" + ], + "loc": "72:7-72:13" + }, + { + "token": "EQUAL", + "loc": "72:14-72:15" + }, + { + "token": [ + "UIDENT", + "Writer" + ], + "loc": "72:16-72:22" + }, + { + "token": "COLONCOLON", + "loc": "72:22-72:24" + }, + { + "token": [ + "LIDENT", + "new" + ], + "loc": "72:24-72:27" + }, + { + "token": "LPAREN", + "loc": "72:27-72:28" + }, + { + "token": "RPAREN", + "loc": "72:28-72:29" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "72:29-72:29" + }, + { + "token": "NEWLINE", + "loc": "72:29-72:30" + }, + { + "token": [ + "LIDENT", + "direct" + ], + "loc": "73:3-73:9" + }, + { + "token": "LT_PLUS", + "loc": "73:10-73:12" + }, + { + "token": "LBRACE", + "loc": "73:13-73:14" + }, + { + "token": [ + "STRING", + "direct" + ], + "loc": "73:15-73:23" + }, + { + "token": "COLON", + "loc": "73:23-73:24" + }, + { + "token": [ + "STRING", + "value" + ], + "loc": "73:25-73:32" + }, + { + "token": "RBRACE", + "loc": "73:33-73:34" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "73:34-73:34" + }, + { + "token": "NEWLINE", + "loc": "73:34-73:35" + }, + { + "token": [ + "LIDENT", + "println" + ], + "loc": "74:3-74:10" + }, + { + "token": "LPAREN", + "loc": "74:10-74:11" + }, + { + "token": [ + "LIDENT", + "direct" + ], + "loc": "74:11-74:17" + }, + { + "token": [ + "DOT_LIDENT", + "snapshot" + ], + "loc": "74:18-74:26" + }, + { + "token": "LPAREN", + "loc": "74:26-74:27" + }, + { + "token": "RPAREN", + "loc": "74:27-74:28" + }, + { + "token": "RPAREN", + "loc": "74:28-74:29" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "74:29-74:29" + }, + { + "token": "NEWLINE", + "loc": "74:29-74:30" + }, + { + "token": "NEWLINE", + "loc": "75:1-75:2" + }, + { + "token": "LET", + "loc": "76:3-76:6" + }, + { + "token": [ + "LIDENT", + "paren_writer" + ], + "loc": "76:7-76:19" + }, + { + "token": "EQUAL", + "loc": "76:20-76:21" + }, + { + "token": [ + "UIDENT", + "Writer" + ], + "loc": "76:22-76:28" + }, + { + "token": "COLONCOLON", + "loc": "76:28-76:30" + }, + { + "token": [ + "LIDENT", + "new" + ], + "loc": "76:30-76:33" + }, + { + "token": "LPAREN", + "loc": "76:33-76:34" + }, + { + "token": "RPAREN", + "loc": "76:34-76:35" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "76:35-76:35" + }, + { + "token": "NEWLINE", + "loc": "76:35-76:36" + }, + { + "token": "LPAREN", + "loc": "77:3-77:4" + }, + { + "token": [ + "UIDENT", + "Some" + ], + "loc": "77:4-77:8" + }, + { + "token": "LPAREN", + "loc": "77:8-77:9" + }, + { + "token": [ + "LIDENT", + "paren_writer" + ], + "loc": "77:9-77:21" + }, + { + "token": "RPAREN", + "loc": "77:21-77:22" + }, + { + "token": "RPAREN", + "loc": "77:22-77:23" + }, + { + "token": "LT_QUESTION", + "loc": "77:24-77:26" + }, + { + "token": [ + "STRING", + "paren" + ], + "loc": "77:27-77:34" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "77:34-77:34" + }, + { + "token": "NEWLINE", + "loc": "77:34-77:35" + }, + { + "token": [ + "LIDENT", + "println" + ], + "loc": "78:3-78:10" + }, + { + "token": "LPAREN", + "loc": "78:10-78:11" + }, + { + "token": [ + "LIDENT", + "paren_writer" + ], + "loc": "78:11-78:23" + }, + { + "token": [ + "DOT_LIDENT", + "snapshot" + ], + "loc": "78:24-78:32" + }, + { + "token": "LPAREN", + "loc": "78:32-78:33" + }, + { + "token": "RPAREN", + "loc": "78:33-78:34" + }, + { + "token": "RPAREN", + "loc": "78:34-78:35" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "78:35-78:35" + }, + { + "token": "NEWLINE", + "loc": "78:35-78:36" + }, + { + "token": "NEWLINE", + "loc": "79:1-79:2" + }, + { + "token": "LET", + "loc": "80:3-80:6" + }, + { + "token": [ + "LIDENT", + "call_writer" + ], + "loc": "80:7-80:18" + }, + { + "token": "EQUAL", + "loc": "80:19-80:20" + }, + { + "token": [ + "UIDENT", + "Writer" + ], + "loc": "80:21-80:27" + }, + { + "token": "COLONCOLON", + "loc": "80:27-80:29" + }, + { + "token": [ + "LIDENT", + "new" + ], + "loc": "80:29-80:32" + }, + { + "token": "LPAREN", + "loc": "80:32-80:33" + }, + { + "token": "RPAREN", + "loc": "80:33-80:34" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "80:34-80:34" + }, + { + "token": "NEWLINE", + "loc": "80:34-80:35" + }, + { + "token": [ + "LIDENT", + "get_writer" + ], + "loc": "81:3-81:13" + }, + { + "token": "LPAREN", + "loc": "81:13-81:14" + }, + { + "token": [ + "UIDENT", + "Some" + ], + "loc": "81:14-81:18" + }, + { + "token": "LPAREN", + "loc": "81:18-81:19" + }, + { + "token": [ + "LIDENT", + "call_writer" + ], + "loc": "81:19-81:30" + }, + { + "token": "RPAREN", + "loc": "81:30-81:31" + }, + { + "token": "RPAREN", + "loc": "81:31-81:32" + }, + { + "token": "LT_QUESTION", + "loc": "81:33-81:35" + }, + { + "token": [ + "STRING", + "call" + ], + "loc": "81:36-81:42" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "81:42-81:42" + }, + { + "token": "NEWLINE", + "loc": "81:42-81:43" + }, + { + "token": [ + "LIDENT", + "println" + ], + "loc": "82:3-82:10" + }, + { + "token": "LPAREN", + "loc": "82:10-82:11" + }, + { + "token": [ + "LIDENT", + "call_writer" + ], + "loc": "82:11-82:22" + }, + { + "token": [ + "DOT_LIDENT", + "snapshot" + ], + "loc": "82:23-82:31" + }, + { + "token": "LPAREN", + "loc": "82:31-82:32" + }, + { + "token": "RPAREN", + "loc": "82:32-82:33" + }, + { + "token": "RPAREN", + "loc": "82:33-82:34" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "82:34-82:34" + }, + { + "token": "NEWLINE", + "loc": "82:34-82:35" + }, + { + "token": "NEWLINE", + "loc": "83:1-83:2" + }, + { + "token": "LET", + "loc": "84:3-84:6" + }, + { + "token": [ + "LIDENT", + "holder" + ], + "loc": "84:7-84:13" + }, + { + "token": "EQUAL", + "loc": "84:14-84:15" + }, + { + "token": "LBRACE", + "loc": "84:16-84:17" + }, + { + "token": [ + "LIDENT", + "writer" + ], + "loc": "84:18-84:24" + }, + { + "token": "COLON", + "loc": "84:24-84:25" + }, + { + "token": [ + "UIDENT", + "Some" + ], + "loc": "84:26-84:30" + }, + { + "token": "LPAREN", + "loc": "84:30-84:31" + }, + { + "token": [ + "UIDENT", + "Writer" + ], + "loc": "84:31-84:37" + }, + { + "token": "COLONCOLON", + "loc": "84:37-84:39" + }, + { + "token": [ + "LIDENT", + "new" + ], + "loc": "84:39-84:42" + }, + { + "token": "LPAREN", + "loc": "84:42-84:43" + }, + { + "token": "RPAREN", + "loc": "84:43-84:44" + }, + { + "token": "RPAREN", + "loc": "84:44-84:45" + }, + { + "token": "RBRACE", + "loc": "84:46-84:47" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "84:47-84:47" + }, + { + "token": "NEWLINE", + "loc": "84:47-84:48" + }, + { + "token": [ + "LIDENT", + "holder" + ], + "loc": "85:3-85:9" + }, + { + "token": [ + "DOT_LIDENT", + "writer" + ], + "loc": "85:10-85:16" + }, + { + "token": "LT_QUESTION", + "loc": "85:17-85:19" + }, + { + "token": [ + "STRING", + "field" + ], + "loc": "85:20-85:27" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "85:27-85:27" + }, + { + "token": "NEWLINE", + "loc": "85:27-85:28" + }, + { + "token": [ + "LIDENT", + "print_optional_writer" + ], + "loc": "86:3-86:24" + }, + { + "token": "LPAREN", + "loc": "86:24-86:25" + }, + { + "token": [ + "LIDENT", + "holder" + ], + "loc": "86:25-86:31" + }, + { + "token": [ + "DOT_LIDENT", + "writer" + ], + "loc": "86:32-86:38" + }, + { + "token": "RPAREN", + "loc": "86:38-86:39" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "86:39-86:39" + }, + { + "token": "NEWLINE", + "loc": "86:39-86:40" + }, + { + "token": "NEWLINE", + "loc": "87:1-87:2" + }, + { + "token": "LET", + "loc": "88:3-88:6" + }, + { + "token": [ + "LIDENT", + "writers" + ], + "loc": "88:7-88:14" + }, + { + "token": "EQUAL", + "loc": "88:15-88:16" + }, + { + "token": "LBRACKET", + "loc": "88:17-88:18" + }, + { + "token": [ + "UIDENT", + "Some" + ], + "loc": "88:18-88:22" + }, + { + "token": "LPAREN", + "loc": "88:22-88:23" + }, + { + "token": [ + "UIDENT", + "Writer" + ], + "loc": "88:23-88:29" + }, + { + "token": "COLONCOLON", + "loc": "88:29-88:31" + }, + { + "token": [ + "LIDENT", + "new" + ], + "loc": "88:31-88:34" + }, + { + "token": "LPAREN", + "loc": "88:34-88:35" + }, + { + "token": "RPAREN", + "loc": "88:35-88:36" + }, + { + "token": "RPAREN", + "loc": "88:36-88:37" + }, + { + "token": "RBRACKET", + "loc": "88:37-88:38" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "88:38-88:38" + }, + { + "token": "NEWLINE", + "loc": "88:38-88:39" + }, + { + "token": [ + "LIDENT", + "writers" + ], + "loc": "89:3-89:10" + }, + { + "token": "LBRACKET", + "loc": "89:10-89:11" + }, + { + "token": [ + "INT", + "0" + ], + "loc": "89:11-89:12" + }, + { + "token": "RBRACKET", + "loc": "89:12-89:13" + }, + { + "token": "LT_QUESTION", + "loc": "89:14-89:16" + }, + { + "token": [ + "STRING", + "index" + ], + "loc": "89:17-89:24" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "89:24-89:24" + }, + { + "token": "NEWLINE", + "loc": "89:24-89:25" + }, + { + "token": [ + "LIDENT", + "print_optional_writer" + ], + "loc": "90:3-90:24" + }, + { + "token": "LPAREN", + "loc": "90:24-90:25" + }, + { + "token": [ + "LIDENT", + "writers" + ], + "loc": "90:25-90:32" + }, + { + "token": "LBRACKET", + "loc": "90:32-90:33" + }, + { + "token": [ + "INT", + "0" + ], + "loc": "90:33-90:34" + }, + { + "token": "RBRACKET", + "loc": "90:34-90:35" + }, + { + "token": "RPAREN", + "loc": "90:35-90:36" + }, + { + "token": "NEWLINE", + "loc": "90:36-90:37" + }, + { + "token": "RBRACE", + "loc": "91:1-91:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "91:2-91:2" + }, + { + "token": "NEWLINE", + "loc": "91:2-91:3" + }, + { + "token": "EOF", + "loc": "92:1-92:1" + } +] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/pipeline_test_const_bytes.json b/test/sync_test/__snapshot__/pipeline_test_const_bytes.json index 94587885..f83ea50f 100644 --- a/test/sync_test/__snapshot__/pipeline_test_const_bytes.json +++ b/test/sync_test/__snapshot__/pipeline_test_const_bytes.json @@ -148,7 +148,8 @@ } } ] - } + }, + "is_iter": false } }, "vis": { diff --git a/test/sync_test/__snapshot__/pipeline_test_const_fold_integers.json b/test/sync_test/__snapshot__/pipeline_test_const_fold_integers.json new file mode 100644 index 00000000..d50baac8 --- /dev/null +++ b/test/sync_test/__snapshot__/pipeline_test_const_fold_integers.json @@ -0,0 +1,8085 @@ +[ + { + "kind": "Impl::TopLetDef", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "IntWrapAdd" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Int" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "expr": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "+" + } + } + } + }, + "lhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "2147483647" + } + } + } + }, + "rhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "1" + } + } + } + } + } + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "is_constant": true, + "is_declare": false, + "attrs": { + "kind": "Impl::TopLetDef::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + { + "kind": "Impl::TopLetDef", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "IntDivTrunc" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Int" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "expr": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "/" + } + } + } + }, + "lhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "-7" + } + } + } + }, + "rhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "2" + } + } + } + } + } + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "is_constant": true, + "is_declare": false, + "attrs": { + "kind": "Impl::TopLetDef::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + { + "kind": "Impl::TopLetDef", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "IntModSign" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Int" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "expr": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "%" + } + } + } + }, + "lhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "-7" + } + } + } + }, + "rhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "2" + } + } + } + } + } + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "is_constant": true, + "is_declare": false, + "attrs": { + "kind": "Impl::TopLetDef::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + { + "kind": "Impl::TopLetDef", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "IntShrArith" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Int" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "expr": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": ">>" + } + } + } + }, + "lhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "-8" + } + } + } + }, + "rhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "1" + } + } + } + } + } + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "is_constant": true, + "is_declare": false, + "attrs": { + "kind": "Impl::TopLetDef::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + { + "kind": "Impl::TopLetDef", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "UIntWrapSub" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "UInt" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "expr": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "-" + } + } + } + }, + "lhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt", + "loc": null, + "children": { + "value": "0" + } + } + } + }, + "rhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt", + "loc": null, + "children": { + "value": "1" + } + } + } + } + } + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "is_constant": true, + "is_declare": false, + "attrs": { + "kind": "Impl::TopLetDef::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + { + "kind": "Impl::TopLetDef", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "I64WrapAdd" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Int64" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "expr": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "+" + } + } + } + }, + "lhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int64", + "loc": null, + "children": { + "value": "9223372036854775807" + } + } + } + }, + "rhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int64", + "loc": null, + "children": { + "value": "1" + } + } + } + } + } + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "is_constant": true, + "is_declare": false, + "attrs": { + "kind": "Impl::TopLetDef::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + { + "kind": "Impl::TopLetDef", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "I64MulWrap" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Int64" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "expr": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "*" + } + } + } + }, + "lhs": { + "kind": "Expr::Group", + "loc": null, + "children": { + "expr": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "-" + } + } + } + }, + "lhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int64", + "loc": null, + "children": { + "value": "-9223372036854775807" + } + } + } + }, + "rhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int64", + "loc": null, + "children": { + "value": "1" + } + } + } + } + } + }, + "group": { + "kind": "Group::Paren", + "loc": null, + "children": {} + } + } + }, + "rhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int64", + "loc": null, + "children": { + "value": "-1" + } + } + } + } + } + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "is_constant": true, + "is_declare": false, + "attrs": { + "kind": "Impl::TopLetDef::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + { + "kind": "Impl::TopLetDef", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "I64DivTrunc" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Int64" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "expr": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "/" + } + } + } + }, + "lhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int64", + "loc": null, + "children": { + "value": "-7" + } + } + } + }, + "rhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int64", + "loc": null, + "children": { + "value": "2" + } + } + } + } + } + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "is_constant": true, + "is_declare": false, + "attrs": { + "kind": "Impl::TopLetDef::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + { + "kind": "Impl::TopLetDef", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "I64NegShl" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Int64" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "expr": { + "kind": "Expr::Unary", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "-" + } + } + } + }, + "expr": { + "kind": "Expr::Group", + "loc": null, + "children": { + "expr": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "<<" + } + } + } + }, + "lhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int64", + "loc": null, + "children": { + "value": "1" + } + } + } + }, + "rhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "62" + } + } + } + } + } + }, + "group": { + "kind": "Group::Paren", + "loc": null, + "children": {} + } + } + } + } + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "is_constant": true, + "is_declare": false, + "attrs": { + "kind": "Impl::TopLetDef::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + { + "kind": "Impl::TopLetDef", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "U64Shl" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "UInt64" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "expr": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "<<" + } + } + } + }, + "lhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "1" + } + } + } + }, + "rhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "32" + } + } + } + } + } + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "is_constant": true, + "is_declare": false, + "attrs": { + "kind": "Impl::TopLetDef::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + { + "kind": "Impl::TopLetDef", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "U64Mask" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "UInt64" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "expr": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "-" + } + } + } + }, + "lhs": { + "kind": "Expr::Group", + "loc": null, + "children": { + "expr": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "<<" + } + } + } + }, + "lhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "1" + } + } + } + }, + "rhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "32" + } + } + } + } + } + }, + "group": { + "kind": "Group::Paren", + "loc": null, + "children": {} + } + } + }, + "rhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "1" + } + } + } + } + } + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "is_constant": true, + "is_declare": false, + "attrs": { + "kind": "Impl::TopLetDef::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + { + "kind": "Impl::TopLetDef", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "U64WrapSub" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "UInt64" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "expr": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "-" + } + } + } + }, + "lhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0" + } + } + } + }, + "rhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "1" + } + } + } + } + } + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "is_constant": true, + "is_declare": false, + "attrs": { + "kind": "Impl::TopLetDef::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + { + "kind": "Impl::TopLetDef", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "I16Min" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Int16" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "expr": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "-32768" + } + } + } + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "is_constant": true, + "is_declare": false, + "attrs": { + "kind": "Impl::TopLetDef::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + { + "kind": "Impl::TopLetDef", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "I16NegMin" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Int16" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "expr": { + "kind": "Expr::Unary", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "-" + } + } + } + }, + "expr": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "I16Min" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::NoExtraInfo", + "loc": null, + "children": {} + } + } + } + } + } + } + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "is_constant": true, + "is_declare": false, + "attrs": { + "kind": "Impl::TopLetDef::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + { + "kind": "Impl::TopLetDef", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "I16ShlTrunc" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Int16" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "expr": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "<<" + } + } + } + }, + "lhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "1" + } + } + } + }, + "rhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "20" + } + } + } + } + } + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "is_constant": true, + "is_declare": false, + "attrs": { + "kind": "Impl::TopLetDef::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + { + "kind": "Impl::TopLetDef", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "I16ShrArith" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Int16" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "expr": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": ">>" + } + } + } + }, + "lhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "-8" + } + } + } + }, + "rhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "1" + } + } + } + } + } + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "is_constant": true, + "is_declare": false, + "attrs": { + "kind": "Impl::TopLetDef::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + { + "kind": "Impl::TopLetDef", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "I16Bits" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Int16" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "expr": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "|" + } + } + } + }, + "lhs": { + "kind": "Expr::Group", + "loc": null, + "children": { + "expr": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "^" + } + } + } + }, + "lhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "0x55" + } + } + } + }, + "rhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "0x0F" + } + } + } + } + } + }, + "group": { + "kind": "Group::Paren", + "loc": null, + "children": {} + } + } + }, + "rhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "0x100" + } + } + } + } + } + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "is_constant": true, + "is_declare": false, + "attrs": { + "kind": "Impl::TopLetDef::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + { + "kind": "Impl::TopLetDef", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "U16ShrLogic" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "UInt16" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "expr": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": ">>" + } + } + } + }, + "lhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "0x8000" + } + } + } + }, + "rhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "1" + } + } + } + } + } + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "is_constant": true, + "is_declare": false, + "attrs": { + "kind": "Impl::TopLetDef::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + { + "kind": "Impl::TopLetDef", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "U16Bits" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "UInt16" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "expr": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "^" + } + } + } + }, + "lhs": { + "kind": "Expr::Group", + "loc": null, + "children": { + "expr": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "&" + } + } + } + }, + "lhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "0xFF00" + } + } + } + }, + "rhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "0x0FF0" + } + } + } + } + } + }, + "group": { + "kind": "Group::Paren", + "loc": null, + "children": {} + } + } + }, + "rhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "0x000F" + } + } + } + } + } + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "is_constant": true, + "is_declare": false, + "attrs": { + "kind": "Impl::TopLetDef::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + { + "kind": "Impl::TopLetDef", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "ByteWrapAdd" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Byte" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "expr": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "+" + } + } + } + }, + "lhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Byte", + "loc": null, + "children": { + "value": "\\xFF" + } + } + } + }, + "rhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Byte", + "loc": null, + "children": { + "value": "\\x01" + } + } + } + } + } + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "is_constant": true, + "is_declare": false, + "attrs": { + "kind": "Impl::TopLetDef::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + { + "kind": "Impl::TopLetDef", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "ByteWrapSub" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Byte" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "expr": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "-" + } + } + } + }, + "lhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Byte", + "loc": null, + "children": { + "value": "\\x01" + } + } + } + }, + "rhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Byte", + "loc": null, + "children": { + "value": "\\x02" + } + } + } + } + } + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "is_constant": true, + "is_declare": false, + "attrs": { + "kind": "Impl::TopLetDef::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + { + "kind": "Impl::TopLetDef", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "ByteMulWrap" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Byte" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "expr": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "*" + } + } + } + }, + "lhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Byte", + "loc": null, + "children": { + "value": "\\x10" + } + } + } + }, + "rhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Byte", + "loc": null, + "children": { + "value": "\\x10" + } + } + } + } + } + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "is_constant": true, + "is_declare": false, + "attrs": { + "kind": "Impl::TopLetDef::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + { + "kind": "Impl::TopLetDef", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "ByteShlTrunc" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Byte" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "expr": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "<<" + } + } + } + }, + "lhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Byte", + "loc": null, + "children": { + "value": "\\x01" + } + } + } + }, + "rhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "9" + } + } + } + } + } + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "is_constant": true, + "is_declare": false, + "attrs": { + "kind": "Impl::TopLetDef::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + { + "kind": "Impl::TopLetDef", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "ByteShrLogic" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Byte" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "expr": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": ">>" + } + } + } + }, + "lhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Byte", + "loc": null, + "children": { + "value": "\\x80" + } + } + } + }, + "rhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "1" + } + } + } + } + } + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "is_constant": true, + "is_declare": false, + "attrs": { + "kind": "Impl::TopLetDef::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + { + "kind": "Impl::TopLetDef", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "IntNegShift" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Int" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "expr": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "<<" + } + } + } + }, + "lhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "1" + } + } + } + }, + "rhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "-1" + } + } + } + } + } + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "is_constant": true, + "is_declare": false, + "attrs": { + "kind": "Impl::TopLetDef::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + { + "kind": "Impl::TopLetDef", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "IntBigShift" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Int" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "expr": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "<<" + } + } + } + }, + "lhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "1" + } + } + } + }, + "rhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "33" + } + } + } + } + } + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "is_constant": true, + "is_declare": false, + "attrs": { + "kind": "Impl::TopLetDef::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + { + "kind": "Impl::TopLetDef", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "U64NegShift" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "UInt64" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "expr": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "<<" + } + } + } + }, + "lhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "1" + } + } + } + }, + "rhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "-1" + } + } + } + } + } + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "is_constant": true, + "is_declare": false, + "attrs": { + "kind": "Impl::TopLetDef::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + { + "kind": "Impl::TopLetDef", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "I64BigShift" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Int64" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "expr": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "<<" + } + } + } + }, + "lhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int64", + "loc": null, + "children": { + "value": "1" + } + } + } + }, + "rhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "65" + } + } + } + } + } + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "is_constant": true, + "is_declare": false, + "attrs": { + "kind": "Impl::TopLetDef::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + { + "kind": "Impl::TopLetDef", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "I16NegShift" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Int16" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "expr": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "<<" + } + } + } + }, + "lhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "1" + } + } + } + }, + "rhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "-1" + } + } + } + } + } + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "is_constant": true, + "is_declare": false, + "attrs": { + "kind": "Impl::TopLetDef::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + { + "kind": "Impl::TopLetDef", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "ByteNegShift" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Byte" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "expr": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "<<" + } + } + } + }, + "lhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Byte", + "loc": null, + "children": { + "value": "\\x01" + } + } + } + }, + "rhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "-1" + } + } + } + } + } + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "is_constant": true, + "is_declare": false, + "attrs": { + "kind": "Impl::TopLetDef::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "init" + } + }, + "has_error": null, + "is_async": null, + "decl_params": null, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [] + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::Sequence", + "loc": null, + "children": { + "exprs": { + "kind": "Expr::Sequence::ExprList", + "loc": null, + "children": [ + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "IntWrapAdd" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::NoExtraInfo", + "loc": null, + "children": {} + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "IntDivTrunc" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::NoExtraInfo", + "loc": null, + "children": {} + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "IntModSign" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::NoExtraInfo", + "loc": null, + "children": {} + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "IntShrArith" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::NoExtraInfo", + "loc": null, + "children": {} + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "UIntWrapSub" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::NoExtraInfo", + "loc": null, + "children": {} + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "I64WrapAdd" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::NoExtraInfo", + "loc": null, + "children": {} + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "I64MulWrap" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::NoExtraInfo", + "loc": null, + "children": {} + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "I64DivTrunc" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::NoExtraInfo", + "loc": null, + "children": {} + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "I64NegShl" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::NoExtraInfo", + "loc": null, + "children": {} + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "U64Shl" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::NoExtraInfo", + "loc": null, + "children": {} + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "U64Mask" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::NoExtraInfo", + "loc": null, + "children": {} + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "U64WrapSub" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::NoExtraInfo", + "loc": null, + "children": {} + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "I16Min" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::NoExtraInfo", + "loc": null, + "children": {} + } + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "to_int" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "I16NegMin" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::NoExtraInfo", + "loc": null, + "children": {} + } + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "to_int" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "I16ShlTrunc" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::NoExtraInfo", + "loc": null, + "children": {} + } + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "to_int" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "I16ShrArith" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::NoExtraInfo", + "loc": null, + "children": {} + } + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "to_int" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "I16Bits" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::NoExtraInfo", + "loc": null, + "children": {} + } + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "to_int" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "U16ShrLogic" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::NoExtraInfo", + "loc": null, + "children": {} + } + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "to_int" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "U16Bits" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::NoExtraInfo", + "loc": null, + "children": {} + } + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "to_int" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "ByteWrapAdd" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::NoExtraInfo", + "loc": null, + "children": {} + } + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "to_int" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "ByteWrapSub" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::NoExtraInfo", + "loc": null, + "children": {} + } + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "to_int" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "ByteMulWrap" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::NoExtraInfo", + "loc": null, + "children": {} + } + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "to_int" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "ByteShlTrunc" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::NoExtraInfo", + "loc": null, + "children": {} + } + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "to_int" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "ByteShrLogic" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::NoExtraInfo", + "loc": null, + "children": {} + } + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "to_int" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "IntNegShift" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::NoExtraInfo", + "loc": null, + "children": {} + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "IntBigShift" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::NoExtraInfo", + "loc": null, + "children": {} + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "U64NegShift" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::NoExtraInfo", + "loc": null, + "children": {} + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "I64BigShift" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::NoExtraInfo", + "loc": null, + "children": {} + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "I16NegShift" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::NoExtraInfo", + "loc": null, + "children": {} + } + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "to_int" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "ByteNegShift" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::NoExtraInfo", + "loc": null, + "children": {} + } + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "to_int" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + ] + }, + "last_expr": { + "kind": "Expr::Let", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Constraint", + "loc": null, + "children": { + "pat": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "x" + } + } + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Int16" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + "expr": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "-32768" + } + } + } + }, + "body": { + "kind": "Expr::Sequence", + "loc": null, + "children": { + "exprs": { + "kind": "Expr::Sequence::ExprList", + "loc": null, + "children": [ + { + "kind": "Expr::Match", + "loc": null, + "children": { + "expr": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "x" + } + } + } + } + } + }, + "cases": { + "kind": "Expr::Match::CaseList", + "loc": null, + "children": [ + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "I16Min" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::NoExtraInfo", + "loc": null, + "children": {} + } + } + }, + "args": null, + "is_open": false + } + }, + "guard": null, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "pattern: matched folded Int16 const" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + }, + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Any", + "loc": null, + "children": {} + }, + "guard": null, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "pattern: no match" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + ] + } + } + } + ] + }, + "last_expr": { + "kind": "Expr::Let", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Constraint", + "loc": null, + "children": { + "pat": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "counts" + } + } + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Array" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [ + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Int" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + ] + } + } + } + } + }, + "expr": { + "kind": "Expr::Array", + "loc": null, + "children": { + "exprs": { + "kind": "Expr::Array::ExprList", + "loc": null, + "children": [ + { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "-1" + } + } + } + }, + { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "33" + } + } + } + }, + { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "65" + } + } + } + }, + { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "1" + } + } + } + } + ] + }, + "is_iter": false + } + }, + "body": { + "kind": "Expr::Sequence", + "loc": null, + "children": { + "exprs": { + "kind": "Expr::Sequence::ExprList", + "loc": null, + "children": [ + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "==" + } + } + } + }, + "lhs": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "IntNegShift" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::NoExtraInfo", + "loc": null, + "children": {} + } + } + } + } + }, + "rhs": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "<<" + } + } + } + }, + "lhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "1" + } + } + } + }, + "rhs": { + "kind": "Expr::ArrayGet", + "loc": null, + "children": { + "array": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "counts" + } + } + } + } + } + }, + "index": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "0" + } + } + } + } + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "==" + } + } + } + }, + "lhs": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "IntBigShift" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::NoExtraInfo", + "loc": null, + "children": {} + } + } + } + } + }, + "rhs": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "<<" + } + } + } + }, + "lhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "1" + } + } + } + }, + "rhs": { + "kind": "Expr::ArrayGet", + "loc": null, + "children": { + "array": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "counts" + } + } + } + } + } + }, + "index": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "1" + } + } + } + } + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "==" + } + } + } + }, + "lhs": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "U64NegShift" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::NoExtraInfo", + "loc": null, + "children": {} + } + } + } + } + }, + "rhs": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "<<" + } + } + } + }, + "lhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "1" + } + } + } + }, + "rhs": { + "kind": "Expr::ArrayGet", + "loc": null, + "children": { + "array": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "counts" + } + } + } + } + } + }, + "index": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "0" + } + } + } + } + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "==" + } + } + } + }, + "lhs": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "I64BigShift" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::NoExtraInfo", + "loc": null, + "children": {} + } + } + } + } + }, + "rhs": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "<<" + } + } + } + }, + "lhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int64", + "loc": null, + "children": { + "value": "1" + } + } + } + }, + "rhs": { + "kind": "Expr::ArrayGet", + "loc": null, + "children": { + "array": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "counts" + } + } + } + } + } + }, + "index": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "2" + } + } + } + } + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "==" + } + } + } + }, + "lhs": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "I16NegShift" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::NoExtraInfo", + "loc": null, + "children": {} + } + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "to_int" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "rhs": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Group", + "loc": null, + "children": { + "expr": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "<<" + } + } + } + }, + "lhs": { + "kind": "Expr::Constraint", + "loc": null, + "children": { + "expr": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "1" + } + } + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Int16" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + "rhs": { + "kind": "Expr::ArrayGet", + "loc": null, + "children": { + "array": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "counts" + } + } + } + } + } + }, + "index": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "0" + } + } + } + } + } + } + } + }, + "group": { + "kind": "Group::Paren", + "loc": null, + "children": {} + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "to_int" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "==" + } + } + } + }, + "lhs": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "ByteNegShift" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::NoExtraInfo", + "loc": null, + "children": {} + } + } + } + } + }, + "rhs": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "<<" + } + } + } + }, + "lhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Byte", + "loc": null, + "children": { + "value": "\\x01" + } + } + } + }, + "rhs": { + "kind": "Expr::ArrayGet", + "loc": null, + "children": { + "array": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "counts" + } + } + } + } + } + }, + "index": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "0" + } + } + } + } + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + ] + }, + "last_expr": { + "kind": "Expr::Let", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Constraint", + "loc": null, + "children": { + "pat": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "int_max" + } + } + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Array" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [ + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Int" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + ] + } + } + } + } + }, + "expr": { + "kind": "Expr::Array", + "loc": null, + "children": { + "exprs": { + "kind": "Expr::Array::ExprList", + "loc": null, + "children": [ + { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "2147483647" + } + } + } + } + ] + }, + "is_iter": false + } + }, + "body": { + "kind": "Expr::Sequence", + "loc": null, + "children": { + "exprs": { + "kind": "Expr::Sequence::ExprList", + "loc": null, + "children": [ + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "==" + } + } + } + }, + "lhs": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "IntWrapAdd" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::NoExtraInfo", + "loc": null, + "children": {} + } + } + } + } + }, + "rhs": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "+" + } + } + } + }, + "lhs": { + "kind": "Expr::ArrayGet", + "loc": null, + "children": { + "array": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "int_max" + } + } + } + } + } + }, + "index": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "0" + } + } + } + } + } + }, + "rhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "1" + } + } + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + ] + }, + "last_expr": { + "kind": "Expr::Let", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Constraint", + "loc": null, + "children": { + "pat": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "i16_parts" + } + } + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Array" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [ + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Int16" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + ] + } + } + } + } + }, + "expr": { + "kind": "Expr::Array", + "loc": null, + "children": { + "exprs": { + "kind": "Expr::Array::ExprList", + "loc": null, + "children": [ + { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "-32768" + } + } + } + } + ] + }, + "is_iter": false + } + }, + "body": { + "kind": "Expr::Sequence", + "loc": null, + "children": { + "exprs": { + "kind": "Expr::Sequence::ExprList", + "loc": null, + "children": [ + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "==" + } + } + } + }, + "lhs": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "I16NegMin" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::NoExtraInfo", + "loc": null, + "children": {} + } + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "to_int" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "rhs": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Group", + "loc": null, + "children": { + "expr": { + "kind": "Expr::Unary", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "-" + } + } + } + }, + "expr": { + "kind": "Expr::ArrayGet", + "loc": null, + "children": { + "array": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "i16_parts" + } + } + } + } + } + }, + "index": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "0" + } + } + } + } + } + } + } + }, + "group": { + "kind": "Group::Paren", + "loc": null, + "children": {} + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "to_int" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + ] + }, + "last_expr": { + "kind": "Expr::Let", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Constraint", + "loc": null, + "children": { + "pat": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "bytes" + } + } + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Array" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [ + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Byte" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + ] + } + } + } + } + }, + "expr": { + "kind": "Expr::Array", + "loc": null, + "children": { + "exprs": { + "kind": "Expr::Array::ExprList", + "loc": null, + "children": [ + { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Byte", + "loc": null, + "children": { + "value": "\\xFF" + } + } + } + }, + { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Byte", + "loc": null, + "children": { + "value": "\\x10" + } + } + } + } + ] + }, + "is_iter": false + } + }, + "body": { + "kind": "Expr::Sequence", + "loc": null, + "children": { + "exprs": { + "kind": "Expr::Sequence::ExprList", + "loc": null, + "children": [ + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "==" + } + } + } + }, + "lhs": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "ByteWrapAdd" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::NoExtraInfo", + "loc": null, + "children": {} + } + } + } + } + }, + "rhs": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "+" + } + } + } + }, + "lhs": { + "kind": "Expr::ArrayGet", + "loc": null, + "children": { + "array": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "bytes" + } + } + } + } + } + }, + "index": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "0" + } + } + } + } + } + }, + "rhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Byte", + "loc": null, + "children": { + "value": "\\x01" + } + } + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + ] + }, + "last_expr": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "==" + } + } + } + }, + "lhs": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "ByteMulWrap" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::NoExtraInfo", + "loc": null, + "children": {} + } + } + } + } + }, + "rhs": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "*" + } + } + } + }, + "lhs": { + "kind": "Expr::ArrayGet", + "loc": null, + "children": { + "array": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "bytes" + } + } + } + } + } + }, + "index": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "1" + } + } + } + } + } + }, + "rhs": { + "kind": "Expr::ArrayGet", + "loc": null, + "children": { + "array": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "bytes" + } + } + } + } + } + }, + "index": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "1" + } + } + } + } + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } +] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/pipeline_test_const_fold_integers.mbt b/test/sync_test/__snapshot__/pipeline_test_const_fold_integers.mbt new file mode 100644 index 00000000..fbd1b05d --- /dev/null +++ b/test/sync_test/__snapshot__/pipeline_test_const_fold_integers.mbt @@ -0,0 +1,125 @@ +// Corner cases of integer constant folding in `const` declarations. +// The printed runtime values must equal the compile-time folded values. +// +// Note: Int16/UInt16 arithmetic and `==` are typed target-dependently +// (primitives on C/LLVM, trait methods elsewhere), so this test only uses +// their shift/bitwise/negation operators, which type the same on every +// target; the 16-bit arithmetic folding values are covered in +// test/error_test/constant.mbt, and the shared compute-through-Int wrap +// semantics are exercised at runtime here via Byte. + +const IntWrapAdd : Int = 2147483647 + 1 + +const IntDivTrunc : Int = -7 / 2 + +const IntModSign : Int = -7 % 2 + +const IntShrArith : Int = -8 >> 1 + +const UIntWrapSub : UInt = 0U - 1U + +const I64WrapAdd : Int64 = 9223372036854775807L + 1L + +const I64MulWrap : Int64 = (-9223372036854775807L - 1L) * -1L + +const I64DivTrunc : Int64 = -7L / 2L + +const I64NegShl : Int64 = -(1L << 62) + +const U64Shl : UInt64 = 1UL << 32 + +const U64Mask : UInt64 = (1UL << 32) - 1UL + +const U64WrapSub : UInt64 = 0UL - 1UL + +const I16Min : Int16 = -32768 + +const I16NegMin : Int16 = -I16Min + +const I16ShlTrunc : Int16 = 1 << 20 + +const I16ShrArith : Int16 = -8 >> 1 + +const I16Bits : Int16 = (0x55 ^ 0x0F) | 0x100 + +const U16ShrLogic : UInt16 = 0x8000 >> 1 + +const U16Bits : UInt16 = (0xFF00 & 0x0FF0) ^ 0x000F + +const ByteWrapAdd : Byte = b'\xFF' + b'\x01' + +const ByteWrapSub : Byte = b'\x01' - b'\x02' + +const ByteMulWrap : Byte = b'\x10' * b'\x10' + +const ByteShlTrunc : Byte = b'\x01' << 9 + +const ByteShrLogic : Byte = b'\x80' >> 1 + +// shift counts are masked by the operand width at runtime (wasm/js i32/i64 +// semantics); negative and oversized counts must fold to the same values +const IntNegShift : Int = 1 << -1 + +const IntBigShift : Int = 1 << 33 + +const U64NegShift : UInt64 = 1UL << -1 + +const I64BigShift : Int64 = 1L << 65 + +const I16NegShift : Int16 = 1 << -1 + +const ByteNegShift : Byte = b'\x01' << -1 + +fn init { + println(IntWrapAdd) + println(IntDivTrunc) + println(IntModSign) + println(IntShrArith) + println(UIntWrapSub) + println(I64WrapAdd) + println(I64MulWrap) + println(I64DivTrunc) + println(I64NegShl) + println(U64Shl) + println(U64Mask) + println(U64WrapSub) + println(I16Min.to_int()) + println(I16NegMin.to_int()) + println(I16ShlTrunc.to_int()) + println(I16ShrArith.to_int()) + println(I16Bits.to_int()) + println(U16ShrLogic.to_int()) + println(U16Bits.to_int()) + println(ByteWrapAdd.to_int()) + println(ByteWrapSub.to_int()) + println(ByteMulWrap.to_int()) + println(ByteShlTrunc.to_int()) + println(ByteShrLogic.to_int()) + println(IntNegShift) + println(IntBigShift) + println(U64NegShift) + println(I64BigShift) + println(I16NegShift.to_int()) + println(ByteNegShift.to_int()) + let x : Int16 = -32768 + match x { + I16Min => println("pattern: matched folded Int16 const") + _ => println("pattern: no match") + } + // fold-vs-runtime: the same expressions computed with opaque operands + // must agree with the folded constants on every backend + let counts : Array[Int] = [-1, 33, 65, 1] + println(IntNegShift == 1 << counts[0]) + println(IntBigShift == 1 << counts[1]) + println(U64NegShift == 1UL << counts[0]) + println(I64BigShift == 1L << counts[2]) + println(I16NegShift.to_int() == ((1 : Int16) << counts[0]).to_int()) + println(ByteNegShift == b'\x01' << counts[0]) + let int_max : Array[Int] = [2147483647] + println(IntWrapAdd == int_max[0] + 1) + let i16_parts : Array[Int16] = [-32768] + println(I16NegMin.to_int() == (-i16_parts[0]).to_int()) + let bytes : Array[Byte] = [b'\xFF', b'\x10'] + println(ByteWrapAdd == bytes[0] + b'\x01') + println(ByteMulWrap == bytes[1] * bytes[1]) +} diff --git a/test/sync_test/__snapshot__/pipeline_test_const_fold_integers.mbt.tokens.json b/test/sync_test/__snapshot__/pipeline_test_const_fold_integers.mbt.tokens.json new file mode 100644 index 00000000..fd82e358 --- /dev/null +++ b/test/sync_test/__snapshot__/pipeline_test_const_fold_integers.mbt.tokens.json @@ -0,0 +1,4792 @@ +[ + { + "token": [ + "COMMENT", + { + "content": "// Corner cases of integer constant folding in `const` declarations.", + "kind": [ + "Ownline", + { + "leading_blank_line": false, + "trailing_blank_line": false + } + ], + "consumed_by_docstring": false + } + ], + "loc": "1:1-1:69" + }, + { + "token": "NEWLINE", + "loc": "1:69-1:70" + }, + { + "token": [ + "COMMENT", + { + "content": "// The printed runtime values must equal the compile-time folded values.", + "kind": [ + "Ownline", + { + "leading_blank_line": false, + "trailing_blank_line": false + } + ], + "consumed_by_docstring": false + } + ], + "loc": "2:1-2:73" + }, + { + "token": "NEWLINE", + "loc": "2:73-2:74" + }, + { + "token": [ + "COMMENT", + { + "content": "//", + "kind": [ + "Ownline", + { + "leading_blank_line": false, + "trailing_blank_line": false + } + ], + "consumed_by_docstring": false + } + ], + "loc": "3:1-3:3" + }, + { + "token": "NEWLINE", + "loc": "3:3-3:4" + }, + { + "token": [ + "COMMENT", + { + "content": "// Note: Int16/UInt16 arithmetic and `==` are typed target-dependently", + "kind": [ + "Ownline", + { + "leading_blank_line": false, + "trailing_blank_line": false + } + ], + "consumed_by_docstring": false + } + ], + "loc": "4:1-4:71" + }, + { + "token": "NEWLINE", + "loc": "4:71-4:72" + }, + { + "token": [ + "COMMENT", + { + "content": "// (primitives on C/LLVM, trait methods elsewhere), so this test only uses", + "kind": [ + "Ownline", + { + "leading_blank_line": false, + "trailing_blank_line": false + } + ], + "consumed_by_docstring": false + } + ], + "loc": "5:1-5:75" + }, + { + "token": "NEWLINE", + "loc": "5:75-5:76" + }, + { + "token": [ + "COMMENT", + { + "content": "// their shift/bitwise/negation operators, which type the same on every", + "kind": [ + "Ownline", + { + "leading_blank_line": false, + "trailing_blank_line": false + } + ], + "consumed_by_docstring": false + } + ], + "loc": "6:1-6:72" + }, + { + "token": "NEWLINE", + "loc": "6:72-6:73" + }, + { + "token": [ + "COMMENT", + { + "content": "// target; the 16-bit arithmetic folding values are covered in", + "kind": [ + "Ownline", + { + "leading_blank_line": false, + "trailing_blank_line": false + } + ], + "consumed_by_docstring": false + } + ], + "loc": "7:1-7:63" + }, + { + "token": "NEWLINE", + "loc": "7:63-7:64" + }, + { + "token": [ + "COMMENT", + { + "content": "// test/error_test/constant.mbt, and the shared compute-through-Int wrap", + "kind": [ + "Ownline", + { + "leading_blank_line": false, + "trailing_blank_line": false + } + ], + "consumed_by_docstring": false + } + ], + "loc": "8:1-8:73" + }, + { + "token": "NEWLINE", + "loc": "8:73-8:74" + }, + { + "token": [ + "COMMENT", + { + "content": "// semantics are exercised at runtime here via Byte.", + "kind": [ + "Ownline", + { + "leading_blank_line": false, + "trailing_blank_line": true + } + ], + "consumed_by_docstring": false + } + ], + "loc": "9:1-9:53" + }, + { + "token": "NEWLINE", + "loc": "9:53-9:54" + }, + { + "token": "NEWLINE", + "loc": "10:1-10:2" + }, + { + "token": "CONST", + "loc": "11:1-11:6" + }, + { + "token": [ + "UIDENT", + "IntWrapAdd" + ], + "loc": "11:7-11:17" + }, + { + "token": "COLON", + "loc": "11:18-11:19" + }, + { + "token": [ + "UIDENT", + "Int" + ], + "loc": "11:20-11:23" + }, + { + "token": "EQUAL", + "loc": "11:24-11:25" + }, + { + "token": [ + "INT", + "2147483647" + ], + "loc": "11:26-11:36" + }, + { + "token": "PLUS", + "loc": "11:37-11:38" + }, + { + "token": [ + "INT", + "1" + ], + "loc": "11:39-11:40" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "11:40-11:40" + }, + { + "token": "NEWLINE", + "loc": "11:40-11:41" + }, + { + "token": "NEWLINE", + "loc": "12:1-12:2" + }, + { + "token": "CONST", + "loc": "13:1-13:6" + }, + { + "token": [ + "UIDENT", + "IntDivTrunc" + ], + "loc": "13:7-13:18" + }, + { + "token": "COLON", + "loc": "13:19-13:20" + }, + { + "token": [ + "UIDENT", + "Int" + ], + "loc": "13:21-13:24" + }, + { + "token": "EQUAL", + "loc": "13:25-13:26" + }, + { + "token": "MINUS", + "loc": "13:27-13:28" + }, + { + "token": [ + "INT", + "7" + ], + "loc": "13:28-13:29" + }, + { + "token": [ + "INFIX3", + "/" + ], + "loc": "13:30-13:31" + }, + { + "token": [ + "INT", + "2" + ], + "loc": "13:32-13:33" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "13:33-13:33" + }, + { + "token": "NEWLINE", + "loc": "13:33-13:34" + }, + { + "token": "NEWLINE", + "loc": "14:1-14:2" + }, + { + "token": "CONST", + "loc": "15:1-15:6" + }, + { + "token": [ + "UIDENT", + "IntModSign" + ], + "loc": "15:7-15:17" + }, + { + "token": "COLON", + "loc": "15:18-15:19" + }, + { + "token": [ + "UIDENT", + "Int" + ], + "loc": "15:20-15:23" + }, + { + "token": "EQUAL", + "loc": "15:24-15:25" + }, + { + "token": "MINUS", + "loc": "15:26-15:27" + }, + { + "token": [ + "INT", + "7" + ], + "loc": "15:27-15:28" + }, + { + "token": [ + "INFIX3", + "%" + ], + "loc": "15:29-15:30" + }, + { + "token": [ + "INT", + "2" + ], + "loc": "15:31-15:32" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "15:32-15:32" + }, + { + "token": "NEWLINE", + "loc": "15:32-15:33" + }, + { + "token": "NEWLINE", + "loc": "16:1-16:2" + }, + { + "token": "CONST", + "loc": "17:1-17:6" + }, + { + "token": [ + "UIDENT", + "IntShrArith" + ], + "loc": "17:7-17:18" + }, + { + "token": "COLON", + "loc": "17:19-17:20" + }, + { + "token": [ + "UIDENT", + "Int" + ], + "loc": "17:21-17:24" + }, + { + "token": "EQUAL", + "loc": "17:25-17:26" + }, + { + "token": "MINUS", + "loc": "17:27-17:28" + }, + { + "token": [ + "INT", + "8" + ], + "loc": "17:28-17:29" + }, + { + "token": [ + "INFIX2", + ">>" + ], + "loc": "17:30-17:32" + }, + { + "token": [ + "INT", + "1" + ], + "loc": "17:33-17:34" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "17:34-17:34" + }, + { + "token": "NEWLINE", + "loc": "17:34-17:35" + }, + { + "token": "NEWLINE", + "loc": "18:1-18:2" + }, + { + "token": "CONST", + "loc": "19:1-19:6" + }, + { + "token": [ + "UIDENT", + "UIntWrapSub" + ], + "loc": "19:7-19:18" + }, + { + "token": "COLON", + "loc": "19:19-19:20" + }, + { + "token": [ + "UIDENT", + "UInt" + ], + "loc": "19:21-19:25" + }, + { + "token": "EQUAL", + "loc": "19:26-19:27" + }, + { + "token": [ + "INT", + "0U" + ], + "loc": "19:28-19:30" + }, + { + "token": "MINUS", + "loc": "19:31-19:32" + }, + { + "token": [ + "INT", + "1U" + ], + "loc": "19:33-19:35" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "19:35-19:35" + }, + { + "token": "NEWLINE", + "loc": "19:35-19:36" + }, + { + "token": "NEWLINE", + "loc": "20:1-20:2" + }, + { + "token": "CONST", + "loc": "21:1-21:6" + }, + { + "token": [ + "UIDENT", + "I64WrapAdd" + ], + "loc": "21:7-21:17" + }, + { + "token": "COLON", + "loc": "21:18-21:19" + }, + { + "token": [ + "UIDENT", + "Int64" + ], + "loc": "21:20-21:25" + }, + { + "token": "EQUAL", + "loc": "21:26-21:27" + }, + { + "token": [ + "INT", + "9223372036854775807L" + ], + "loc": "21:28-21:48" + }, + { + "token": "PLUS", + "loc": "21:49-21:50" + }, + { + "token": [ + "INT", + "1L" + ], + "loc": "21:51-21:53" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "21:53-21:53" + }, + { + "token": "NEWLINE", + "loc": "21:53-21:54" + }, + { + "token": "NEWLINE", + "loc": "22:1-22:2" + }, + { + "token": "CONST", + "loc": "23:1-23:6" + }, + { + "token": [ + "UIDENT", + "I64MulWrap" + ], + "loc": "23:7-23:17" + }, + { + "token": "COLON", + "loc": "23:18-23:19" + }, + { + "token": [ + "UIDENT", + "Int64" + ], + "loc": "23:20-23:25" + }, + { + "token": "EQUAL", + "loc": "23:26-23:27" + }, + { + "token": "LPAREN", + "loc": "23:28-23:29" + }, + { + "token": "MINUS", + "loc": "23:29-23:30" + }, + { + "token": [ + "INT", + "9223372036854775807L" + ], + "loc": "23:30-23:50" + }, + { + "token": "MINUS", + "loc": "23:51-23:52" + }, + { + "token": [ + "INT", + "1L" + ], + "loc": "23:53-23:55" + }, + { + "token": "RPAREN", + "loc": "23:55-23:56" + }, + { + "token": [ + "INFIX3", + "*" + ], + "loc": "23:57-23:58" + }, + { + "token": "MINUS", + "loc": "23:59-23:60" + }, + { + "token": [ + "INT", + "1L" + ], + "loc": "23:60-23:62" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "23:62-23:62" + }, + { + "token": "NEWLINE", + "loc": "23:62-23:63" + }, + { + "token": "NEWLINE", + "loc": "24:1-24:2" + }, + { + "token": "CONST", + "loc": "25:1-25:6" + }, + { + "token": [ + "UIDENT", + "I64DivTrunc" + ], + "loc": "25:7-25:18" + }, + { + "token": "COLON", + "loc": "25:19-25:20" + }, + { + "token": [ + "UIDENT", + "Int64" + ], + "loc": "25:21-25:26" + }, + { + "token": "EQUAL", + "loc": "25:27-25:28" + }, + { + "token": "MINUS", + "loc": "25:29-25:30" + }, + { + "token": [ + "INT", + "7L" + ], + "loc": "25:30-25:32" + }, + { + "token": [ + "INFIX3", + "/" + ], + "loc": "25:33-25:34" + }, + { + "token": [ + "INT", + "2L" + ], + "loc": "25:35-25:37" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "25:37-25:37" + }, + { + "token": "NEWLINE", + "loc": "25:37-25:38" + }, + { + "token": "NEWLINE", + "loc": "26:1-26:2" + }, + { + "token": "CONST", + "loc": "27:1-27:6" + }, + { + "token": [ + "UIDENT", + "I64NegShl" + ], + "loc": "27:7-27:16" + }, + { + "token": "COLON", + "loc": "27:17-27:18" + }, + { + "token": [ + "UIDENT", + "Int64" + ], + "loc": "27:19-27:24" + }, + { + "token": "EQUAL", + "loc": "27:25-27:26" + }, + { + "token": "MINUS", + "loc": "27:27-27:28" + }, + { + "token": "LPAREN", + "loc": "27:28-27:29" + }, + { + "token": [ + "INT", + "1L" + ], + "loc": "27:29-27:31" + }, + { + "token": [ + "INFIX2", + "<<" + ], + "loc": "27:32-27:34" + }, + { + "token": [ + "INT", + "62" + ], + "loc": "27:35-27:37" + }, + { + "token": "RPAREN", + "loc": "27:37-27:38" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "27:38-27:38" + }, + { + "token": "NEWLINE", + "loc": "27:38-27:39" + }, + { + "token": "NEWLINE", + "loc": "28:1-28:2" + }, + { + "token": "CONST", + "loc": "29:1-29:6" + }, + { + "token": [ + "UIDENT", + "U64Shl" + ], + "loc": "29:7-29:13" + }, + { + "token": "COLON", + "loc": "29:14-29:15" + }, + { + "token": [ + "UIDENT", + "UInt64" + ], + "loc": "29:16-29:22" + }, + { + "token": "EQUAL", + "loc": "29:23-29:24" + }, + { + "token": [ + "INT", + "1UL" + ], + "loc": "29:25-29:28" + }, + { + "token": [ + "INFIX2", + "<<" + ], + "loc": "29:29-29:31" + }, + { + "token": [ + "INT", + "32" + ], + "loc": "29:32-29:34" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "29:34-29:34" + }, + { + "token": "NEWLINE", + "loc": "29:34-29:35" + }, + { + "token": "NEWLINE", + "loc": "30:1-30:2" + }, + { + "token": "CONST", + "loc": "31:1-31:6" + }, + { + "token": [ + "UIDENT", + "U64Mask" + ], + "loc": "31:7-31:14" + }, + { + "token": "COLON", + "loc": "31:15-31:16" + }, + { + "token": [ + "UIDENT", + "UInt64" + ], + "loc": "31:17-31:23" + }, + { + "token": "EQUAL", + "loc": "31:24-31:25" + }, + { + "token": "LPAREN", + "loc": "31:26-31:27" + }, + { + "token": [ + "INT", + "1UL" + ], + "loc": "31:27-31:30" + }, + { + "token": [ + "INFIX2", + "<<" + ], + "loc": "31:31-31:33" + }, + { + "token": [ + "INT", + "32" + ], + "loc": "31:34-31:36" + }, + { + "token": "RPAREN", + "loc": "31:36-31:37" + }, + { + "token": "MINUS", + "loc": "31:38-31:39" + }, + { + "token": [ + "INT", + "1UL" + ], + "loc": "31:40-31:43" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "31:43-31:43" + }, + { + "token": "NEWLINE", + "loc": "31:43-31:44" + }, + { + "token": "NEWLINE", + "loc": "32:1-32:2" + }, + { + "token": "CONST", + "loc": "33:1-33:6" + }, + { + "token": [ + "UIDENT", + "U64WrapSub" + ], + "loc": "33:7-33:17" + }, + { + "token": "COLON", + "loc": "33:18-33:19" + }, + { + "token": [ + "UIDENT", + "UInt64" + ], + "loc": "33:20-33:26" + }, + { + "token": "EQUAL", + "loc": "33:27-33:28" + }, + { + "token": [ + "INT", + "0UL" + ], + "loc": "33:29-33:32" + }, + { + "token": "MINUS", + "loc": "33:33-33:34" + }, + { + "token": [ + "INT", + "1UL" + ], + "loc": "33:35-33:38" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "33:38-33:38" + }, + { + "token": "NEWLINE", + "loc": "33:38-33:39" + }, + { + "token": "NEWLINE", + "loc": "34:1-34:2" + }, + { + "token": "CONST", + "loc": "35:1-35:6" + }, + { + "token": [ + "UIDENT", + "I16Min" + ], + "loc": "35:7-35:13" + }, + { + "token": "COLON", + "loc": "35:14-35:15" + }, + { + "token": [ + "UIDENT", + "Int16" + ], + "loc": "35:16-35:21" + }, + { + "token": "EQUAL", + "loc": "35:22-35:23" + }, + { + "token": "MINUS", + "loc": "35:24-35:25" + }, + { + "token": [ + "INT", + "32768" + ], + "loc": "35:25-35:30" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "35:30-35:30" + }, + { + "token": "NEWLINE", + "loc": "35:30-35:31" + }, + { + "token": "NEWLINE", + "loc": "36:1-36:2" + }, + { + "token": "CONST", + "loc": "37:1-37:6" + }, + { + "token": [ + "UIDENT", + "I16NegMin" + ], + "loc": "37:7-37:16" + }, + { + "token": "COLON", + "loc": "37:17-37:18" + }, + { + "token": [ + "UIDENT", + "Int16" + ], + "loc": "37:19-37:24" + }, + { + "token": "EQUAL", + "loc": "37:25-37:26" + }, + { + "token": "MINUS", + "loc": "37:27-37:28" + }, + { + "token": [ + "UIDENT", + "I16Min" + ], + "loc": "37:28-37:34" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "37:34-37:34" + }, + { + "token": "NEWLINE", + "loc": "37:34-37:35" + }, + { + "token": "NEWLINE", + "loc": "38:1-38:2" + }, + { + "token": "CONST", + "loc": "39:1-39:6" + }, + { + "token": [ + "UIDENT", + "I16ShlTrunc" + ], + "loc": "39:7-39:18" + }, + { + "token": "COLON", + "loc": "39:19-39:20" + }, + { + "token": [ + "UIDENT", + "Int16" + ], + "loc": "39:21-39:26" + }, + { + "token": "EQUAL", + "loc": "39:27-39:28" + }, + { + "token": [ + "INT", + "1" + ], + "loc": "39:29-39:30" + }, + { + "token": [ + "INFIX2", + "<<" + ], + "loc": "39:31-39:33" + }, + { + "token": [ + "INT", + "20" + ], + "loc": "39:34-39:36" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "39:36-39:36" + }, + { + "token": "NEWLINE", + "loc": "39:36-39:37" + }, + { + "token": "NEWLINE", + "loc": "40:1-40:2" + }, + { + "token": "CONST", + "loc": "41:1-41:6" + }, + { + "token": [ + "UIDENT", + "I16ShrArith" + ], + "loc": "41:7-41:18" + }, + { + "token": "COLON", + "loc": "41:19-41:20" + }, + { + "token": [ + "UIDENT", + "Int16" + ], + "loc": "41:21-41:26" + }, + { + "token": "EQUAL", + "loc": "41:27-41:28" + }, + { + "token": "MINUS", + "loc": "41:29-41:30" + }, + { + "token": [ + "INT", + "8" + ], + "loc": "41:30-41:31" + }, + { + "token": [ + "INFIX2", + ">>" + ], + "loc": "41:32-41:34" + }, + { + "token": [ + "INT", + "1" + ], + "loc": "41:35-41:36" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "41:36-41:36" + }, + { + "token": "NEWLINE", + "loc": "41:36-41:37" + }, + { + "token": "NEWLINE", + "loc": "42:1-42:2" + }, + { + "token": "CONST", + "loc": "43:1-43:6" + }, + { + "token": [ + "UIDENT", + "I16Bits" + ], + "loc": "43:7-43:14" + }, + { + "token": "COLON", + "loc": "43:15-43:16" + }, + { + "token": [ + "UIDENT", + "Int16" + ], + "loc": "43:17-43:22" + }, + { + "token": "EQUAL", + "loc": "43:23-43:24" + }, + { + "token": "LPAREN", + "loc": "43:25-43:26" + }, + { + "token": [ + "INT", + "0x55" + ], + "loc": "43:26-43:30" + }, + { + "token": "CARET", + "loc": "43:31-43:32" + }, + { + "token": [ + "INT", + "0x0F" + ], + "loc": "43:33-43:37" + }, + { + "token": "RPAREN", + "loc": "43:37-43:38" + }, + { + "token": "BAR", + "loc": "43:39-43:40" + }, + { + "token": [ + "INT", + "0x100" + ], + "loc": "43:41-43:46" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "43:46-43:46" + }, + { + "token": "NEWLINE", + "loc": "43:46-43:47" + }, + { + "token": "NEWLINE", + "loc": "44:1-44:2" + }, + { + "token": "CONST", + "loc": "45:1-45:6" + }, + { + "token": [ + "UIDENT", + "U16ShrLogic" + ], + "loc": "45:7-45:18" + }, + { + "token": "COLON", + "loc": "45:19-45:20" + }, + { + "token": [ + "UIDENT", + "UInt16" + ], + "loc": "45:21-45:27" + }, + { + "token": "EQUAL", + "loc": "45:28-45:29" + }, + { + "token": [ + "INT", + "0x8000" + ], + "loc": "45:30-45:36" + }, + { + "token": [ + "INFIX2", + ">>" + ], + "loc": "45:37-45:39" + }, + { + "token": [ + "INT", + "1" + ], + "loc": "45:40-45:41" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "45:41-45:41" + }, + { + "token": "NEWLINE", + "loc": "45:41-45:42" + }, + { + "token": "NEWLINE", + "loc": "46:1-46:2" + }, + { + "token": "CONST", + "loc": "47:1-47:6" + }, + { + "token": [ + "UIDENT", + "U16Bits" + ], + "loc": "47:7-47:14" + }, + { + "token": "COLON", + "loc": "47:15-47:16" + }, + { + "token": [ + "UIDENT", + "UInt16" + ], + "loc": "47:17-47:23" + }, + { + "token": "EQUAL", + "loc": "47:24-47:25" + }, + { + "token": "LPAREN", + "loc": "47:26-47:27" + }, + { + "token": [ + "INT", + "0xFF00" + ], + "loc": "47:27-47:33" + }, + { + "token": "AMPER", + "loc": "47:34-47:35" + }, + { + "token": [ + "INT", + "0x0FF0" + ], + "loc": "47:36-47:42" + }, + { + "token": "RPAREN", + "loc": "47:42-47:43" + }, + { + "token": "CARET", + "loc": "47:44-47:45" + }, + { + "token": [ + "INT", + "0x000F" + ], + "loc": "47:46-47:52" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "47:52-47:52" + }, + { + "token": "NEWLINE", + "loc": "47:52-47:53" + }, + { + "token": "NEWLINE", + "loc": "48:1-48:2" + }, + { + "token": "CONST", + "loc": "49:1-49:6" + }, + { + "token": [ + "UIDENT", + "ByteWrapAdd" + ], + "loc": "49:7-49:18" + }, + { + "token": "COLON", + "loc": "49:19-49:20" + }, + { + "token": [ + "UIDENT", + "Byte" + ], + "loc": "49:21-49:25" + }, + { + "token": "EQUAL", + "loc": "49:26-49:27" + }, + { + "token": [ + "BYTE", + "\\xFF" + ], + "loc": "49:28-49:35" + }, + { + "token": "PLUS", + "loc": "49:36-49:37" + }, + { + "token": [ + "BYTE", + "\\x01" + ], + "loc": "49:38-49:45" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "49:45-49:45" + }, + { + "token": "NEWLINE", + "loc": "49:45-49:46" + }, + { + "token": "NEWLINE", + "loc": "50:1-50:2" + }, + { + "token": "CONST", + "loc": "51:1-51:6" + }, + { + "token": [ + "UIDENT", + "ByteWrapSub" + ], + "loc": "51:7-51:18" + }, + { + "token": "COLON", + "loc": "51:19-51:20" + }, + { + "token": [ + "UIDENT", + "Byte" + ], + "loc": "51:21-51:25" + }, + { + "token": "EQUAL", + "loc": "51:26-51:27" + }, + { + "token": [ + "BYTE", + "\\x01" + ], + "loc": "51:28-51:35" + }, + { + "token": "MINUS", + "loc": "51:36-51:37" + }, + { + "token": [ + "BYTE", + "\\x02" + ], + "loc": "51:38-51:45" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "51:45-51:45" + }, + { + "token": "NEWLINE", + "loc": "51:45-51:46" + }, + { + "token": "NEWLINE", + "loc": "52:1-52:2" + }, + { + "token": "CONST", + "loc": "53:1-53:6" + }, + { + "token": [ + "UIDENT", + "ByteMulWrap" + ], + "loc": "53:7-53:18" + }, + { + "token": "COLON", + "loc": "53:19-53:20" + }, + { + "token": [ + "UIDENT", + "Byte" + ], + "loc": "53:21-53:25" + }, + { + "token": "EQUAL", + "loc": "53:26-53:27" + }, + { + "token": [ + "BYTE", + "\\x10" + ], + "loc": "53:28-53:35" + }, + { + "token": [ + "INFIX3", + "*" + ], + "loc": "53:36-53:37" + }, + { + "token": [ + "BYTE", + "\\x10" + ], + "loc": "53:38-53:45" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "53:45-53:45" + }, + { + "token": "NEWLINE", + "loc": "53:45-53:46" + }, + { + "token": "NEWLINE", + "loc": "54:1-54:2" + }, + { + "token": "CONST", + "loc": "55:1-55:6" + }, + { + "token": [ + "UIDENT", + "ByteShlTrunc" + ], + "loc": "55:7-55:19" + }, + { + "token": "COLON", + "loc": "55:20-55:21" + }, + { + "token": [ + "UIDENT", + "Byte" + ], + "loc": "55:22-55:26" + }, + { + "token": "EQUAL", + "loc": "55:27-55:28" + }, + { + "token": [ + "BYTE", + "\\x01" + ], + "loc": "55:29-55:36" + }, + { + "token": [ + "INFIX2", + "<<" + ], + "loc": "55:37-55:39" + }, + { + "token": [ + "INT", + "9" + ], + "loc": "55:40-55:41" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "55:41-55:41" + }, + { + "token": "NEWLINE", + "loc": "55:41-55:42" + }, + { + "token": "NEWLINE", + "loc": "56:1-56:2" + }, + { + "token": "CONST", + "loc": "57:1-57:6" + }, + { + "token": [ + "UIDENT", + "ByteShrLogic" + ], + "loc": "57:7-57:19" + }, + { + "token": "COLON", + "loc": "57:20-57:21" + }, + { + "token": [ + "UIDENT", + "Byte" + ], + "loc": "57:22-57:26" + }, + { + "token": "EQUAL", + "loc": "57:27-57:28" + }, + { + "token": [ + "BYTE", + "\\x80" + ], + "loc": "57:29-57:36" + }, + { + "token": [ + "INFIX2", + ">>" + ], + "loc": "57:37-57:39" + }, + { + "token": [ + "INT", + "1" + ], + "loc": "57:40-57:41" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "57:41-57:41" + }, + { + "token": "NEWLINE", + "loc": "57:41-57:42" + }, + { + "token": "NEWLINE", + "loc": "58:1-58:2" + }, + { + "token": [ + "COMMENT", + { + "content": "// shift counts are masked by the operand width at runtime (wasm/js i32/i64", + "kind": [ + "Ownline", + { + "leading_blank_line": true, + "trailing_blank_line": false + } + ], + "consumed_by_docstring": false + } + ], + "loc": "59:1-59:76" + }, + { + "token": "NEWLINE", + "loc": "59:76-59:77" + }, + { + "token": [ + "COMMENT", + { + "content": "// semantics); negative and oversized counts must fold to the same values", + "kind": [ + "Ownline", + { + "leading_blank_line": false, + "trailing_blank_line": false + } + ], + "consumed_by_docstring": false + } + ], + "loc": "60:1-60:74" + }, + { + "token": "NEWLINE", + "loc": "60:74-60:75" + }, + { + "token": "CONST", + "loc": "61:1-61:6" + }, + { + "token": [ + "UIDENT", + "IntNegShift" + ], + "loc": "61:7-61:18" + }, + { + "token": "COLON", + "loc": "61:19-61:20" + }, + { + "token": [ + "UIDENT", + "Int" + ], + "loc": "61:21-61:24" + }, + { + "token": "EQUAL", + "loc": "61:25-61:26" + }, + { + "token": [ + "INT", + "1" + ], + "loc": "61:27-61:28" + }, + { + "token": [ + "INFIX2", + "<<" + ], + "loc": "61:29-61:31" + }, + { + "token": "MINUS", + "loc": "61:32-61:33" + }, + { + "token": [ + "INT", + "1" + ], + "loc": "61:33-61:34" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "61:34-61:34" + }, + { + "token": "NEWLINE", + "loc": "61:34-61:35" + }, + { + "token": "NEWLINE", + "loc": "62:1-62:2" + }, + { + "token": "CONST", + "loc": "63:1-63:6" + }, + { + "token": [ + "UIDENT", + "IntBigShift" + ], + "loc": "63:7-63:18" + }, + { + "token": "COLON", + "loc": "63:19-63:20" + }, + { + "token": [ + "UIDENT", + "Int" + ], + "loc": "63:21-63:24" + }, + { + "token": "EQUAL", + "loc": "63:25-63:26" + }, + { + "token": [ + "INT", + "1" + ], + "loc": "63:27-63:28" + }, + { + "token": [ + "INFIX2", + "<<" + ], + "loc": "63:29-63:31" + }, + { + "token": [ + "INT", + "33" + ], + "loc": "63:32-63:34" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "63:34-63:34" + }, + { + "token": "NEWLINE", + "loc": "63:34-63:35" + }, + { + "token": "NEWLINE", + "loc": "64:1-64:2" + }, + { + "token": "CONST", + "loc": "65:1-65:6" + }, + { + "token": [ + "UIDENT", + "U64NegShift" + ], + "loc": "65:7-65:18" + }, + { + "token": "COLON", + "loc": "65:19-65:20" + }, + { + "token": [ + "UIDENT", + "UInt64" + ], + "loc": "65:21-65:27" + }, + { + "token": "EQUAL", + "loc": "65:28-65:29" + }, + { + "token": [ + "INT", + "1UL" + ], + "loc": "65:30-65:33" + }, + { + "token": [ + "INFIX2", + "<<" + ], + "loc": "65:34-65:36" + }, + { + "token": "MINUS", + "loc": "65:37-65:38" + }, + { + "token": [ + "INT", + "1" + ], + "loc": "65:38-65:39" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "65:39-65:39" + }, + { + "token": "NEWLINE", + "loc": "65:39-65:40" + }, + { + "token": "NEWLINE", + "loc": "66:1-66:2" + }, + { + "token": "CONST", + "loc": "67:1-67:6" + }, + { + "token": [ + "UIDENT", + "I64BigShift" + ], + "loc": "67:7-67:18" + }, + { + "token": "COLON", + "loc": "67:19-67:20" + }, + { + "token": [ + "UIDENT", + "Int64" + ], + "loc": "67:21-67:26" + }, + { + "token": "EQUAL", + "loc": "67:27-67:28" + }, + { + "token": [ + "INT", + "1L" + ], + "loc": "67:29-67:31" + }, + { + "token": [ + "INFIX2", + "<<" + ], + "loc": "67:32-67:34" + }, + { + "token": [ + "INT", + "65" + ], + "loc": "67:35-67:37" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "67:37-67:37" + }, + { + "token": "NEWLINE", + "loc": "67:37-67:38" + }, + { + "token": "NEWLINE", + "loc": "68:1-68:2" + }, + { + "token": "CONST", + "loc": "69:1-69:6" + }, + { + "token": [ + "UIDENT", + "I16NegShift" + ], + "loc": "69:7-69:18" + }, + { + "token": "COLON", + "loc": "69:19-69:20" + }, + { + "token": [ + "UIDENT", + "Int16" + ], + "loc": "69:21-69:26" + }, + { + "token": "EQUAL", + "loc": "69:27-69:28" + }, + { + "token": [ + "INT", + "1" + ], + "loc": "69:29-69:30" + }, + { + "token": [ + "INFIX2", + "<<" + ], + "loc": "69:31-69:33" + }, + { + "token": "MINUS", + "loc": "69:34-69:35" + }, + { + "token": [ + "INT", + "1" + ], + "loc": "69:35-69:36" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "69:36-69:36" + }, + { + "token": "NEWLINE", + "loc": "69:36-69:37" + }, + { + "token": "NEWLINE", + "loc": "70:1-70:2" + }, + { + "token": "CONST", + "loc": "71:1-71:6" + }, + { + "token": [ + "UIDENT", + "ByteNegShift" + ], + "loc": "71:7-71:19" + }, + { + "token": "COLON", + "loc": "71:20-71:21" + }, + { + "token": [ + "UIDENT", + "Byte" + ], + "loc": "71:22-71:26" + }, + { + "token": "EQUAL", + "loc": "71:27-71:28" + }, + { + "token": [ + "BYTE", + "\\x01" + ], + "loc": "71:29-71:36" + }, + { + "token": [ + "INFIX2", + "<<" + ], + "loc": "71:37-71:39" + }, + { + "token": "MINUS", + "loc": "71:40-71:41" + }, + { + "token": [ + "INT", + "1" + ], + "loc": "71:41-71:42" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "71:42-71:42" + }, + { + "token": "NEWLINE", + "loc": "71:42-71:43" + }, + { + "token": "NEWLINE", + "loc": "72:1-72:2" + }, + { + "token": "FN", + "loc": "73:1-73:3" + }, + { + "token": [ + "LIDENT", + "init" + ], + "loc": "73:4-73:8" + }, + { + "token": "LBRACE", + "loc": "73:9-73:10" + }, + { + "token": "NEWLINE", + "loc": "73:10-73:11" + }, + { + "token": [ + "LIDENT", + "println" + ], + "loc": "74:3-74:10" + }, + { + "token": "LPAREN", + "loc": "74:10-74:11" + }, + { + "token": [ + "UIDENT", + "IntWrapAdd" + ], + "loc": "74:11-74:21" + }, + { + "token": "RPAREN", + "loc": "74:21-74:22" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "74:22-74:22" + }, + { + "token": "NEWLINE", + "loc": "74:22-74:23" + }, + { + "token": [ + "LIDENT", + "println" + ], + "loc": "75:3-75:10" + }, + { + "token": "LPAREN", + "loc": "75:10-75:11" + }, + { + "token": [ + "UIDENT", + "IntDivTrunc" + ], + "loc": "75:11-75:22" + }, + { + "token": "RPAREN", + "loc": "75:22-75:23" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "75:23-75:23" + }, + { + "token": "NEWLINE", + "loc": "75:23-75:24" + }, + { + "token": [ + "LIDENT", + "println" + ], + "loc": "76:3-76:10" + }, + { + "token": "LPAREN", + "loc": "76:10-76:11" + }, + { + "token": [ + "UIDENT", + "IntModSign" + ], + "loc": "76:11-76:21" + }, + { + "token": "RPAREN", + "loc": "76:21-76:22" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "76:22-76:22" + }, + { + "token": "NEWLINE", + "loc": "76:22-76:23" + }, + { + "token": [ + "LIDENT", + "println" + ], + "loc": "77:3-77:10" + }, + { + "token": "LPAREN", + "loc": "77:10-77:11" + }, + { + "token": [ + "UIDENT", + "IntShrArith" + ], + "loc": "77:11-77:22" + }, + { + "token": "RPAREN", + "loc": "77:22-77:23" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "77:23-77:23" + }, + { + "token": "NEWLINE", + "loc": "77:23-77:24" + }, + { + "token": [ + "LIDENT", + "println" + ], + "loc": "78:3-78:10" + }, + { + "token": "LPAREN", + "loc": "78:10-78:11" + }, + { + "token": [ + "UIDENT", + "UIntWrapSub" + ], + "loc": "78:11-78:22" + }, + { + "token": "RPAREN", + "loc": "78:22-78:23" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "78:23-78:23" + }, + { + "token": "NEWLINE", + "loc": "78:23-78:24" + }, + { + "token": [ + "LIDENT", + "println" + ], + "loc": "79:3-79:10" + }, + { + "token": "LPAREN", + "loc": "79:10-79:11" + }, + { + "token": [ + "UIDENT", + "I64WrapAdd" + ], + "loc": "79:11-79:21" + }, + { + "token": "RPAREN", + "loc": "79:21-79:22" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "79:22-79:22" + }, + { + "token": "NEWLINE", + "loc": "79:22-79:23" + }, + { + "token": [ + "LIDENT", + "println" + ], + "loc": "80:3-80:10" + }, + { + "token": "LPAREN", + "loc": "80:10-80:11" + }, + { + "token": [ + "UIDENT", + "I64MulWrap" + ], + "loc": "80:11-80:21" + }, + { + "token": "RPAREN", + "loc": "80:21-80:22" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "80:22-80:22" + }, + { + "token": "NEWLINE", + "loc": "80:22-80:23" + }, + { + "token": [ + "LIDENT", + "println" + ], + "loc": "81:3-81:10" + }, + { + "token": "LPAREN", + "loc": "81:10-81:11" + }, + { + "token": [ + "UIDENT", + "I64DivTrunc" + ], + "loc": "81:11-81:22" + }, + { + "token": "RPAREN", + "loc": "81:22-81:23" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "81:23-81:23" + }, + { + "token": "NEWLINE", + "loc": "81:23-81:24" + }, + { + "token": [ + "LIDENT", + "println" + ], + "loc": "82:3-82:10" + }, + { + "token": "LPAREN", + "loc": "82:10-82:11" + }, + { + "token": [ + "UIDENT", + "I64NegShl" + ], + "loc": "82:11-82:20" + }, + { + "token": "RPAREN", + "loc": "82:20-82:21" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "82:21-82:21" + }, + { + "token": "NEWLINE", + "loc": "82:21-82:22" + }, + { + "token": [ + "LIDENT", + "println" + ], + "loc": "83:3-83:10" + }, + { + "token": "LPAREN", + "loc": "83:10-83:11" + }, + { + "token": [ + "UIDENT", + "U64Shl" + ], + "loc": "83:11-83:17" + }, + { + "token": "RPAREN", + "loc": "83:17-83:18" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "83:18-83:18" + }, + { + "token": "NEWLINE", + "loc": "83:18-83:19" + }, + { + "token": [ + "LIDENT", + "println" + ], + "loc": "84:3-84:10" + }, + { + "token": "LPAREN", + "loc": "84:10-84:11" + }, + { + "token": [ + "UIDENT", + "U64Mask" + ], + "loc": "84:11-84:18" + }, + { + "token": "RPAREN", + "loc": "84:18-84:19" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "84:19-84:19" + }, + { + "token": "NEWLINE", + "loc": "84:19-84:20" + }, + { + "token": [ + "LIDENT", + "println" + ], + "loc": "85:3-85:10" + }, + { + "token": "LPAREN", + "loc": "85:10-85:11" + }, + { + "token": [ + "UIDENT", + "U64WrapSub" + ], + "loc": "85:11-85:21" + }, + { + "token": "RPAREN", + "loc": "85:21-85:22" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "85:22-85:22" + }, + { + "token": "NEWLINE", + "loc": "85:22-85:23" + }, + { + "token": [ + "LIDENT", + "println" + ], + "loc": "86:3-86:10" + }, + { + "token": "LPAREN", + "loc": "86:10-86:11" + }, + { + "token": [ + "UIDENT", + "I16Min" + ], + "loc": "86:11-86:17" + }, + { + "token": [ + "DOT_LIDENT", + "to_int" + ], + "loc": "86:18-86:24" + }, + { + "token": "LPAREN", + "loc": "86:24-86:25" + }, + { + "token": "RPAREN", + "loc": "86:25-86:26" + }, + { + "token": "RPAREN", + "loc": "86:26-86:27" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "86:27-86:27" + }, + { + "token": "NEWLINE", + "loc": "86:27-86:28" + }, + { + "token": [ + "LIDENT", + "println" + ], + "loc": "87:3-87:10" + }, + { + "token": "LPAREN", + "loc": "87:10-87:11" + }, + { + "token": [ + "UIDENT", + "I16NegMin" + ], + "loc": "87:11-87:20" + }, + { + "token": [ + "DOT_LIDENT", + "to_int" + ], + "loc": "87:21-87:27" + }, + { + "token": "LPAREN", + "loc": "87:27-87:28" + }, + { + "token": "RPAREN", + "loc": "87:28-87:29" + }, + { + "token": "RPAREN", + "loc": "87:29-87:30" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "87:30-87:30" + }, + { + "token": "NEWLINE", + "loc": "87:30-87:31" + }, + { + "token": [ + "LIDENT", + "println" + ], + "loc": "88:3-88:10" + }, + { + "token": "LPAREN", + "loc": "88:10-88:11" + }, + { + "token": [ + "UIDENT", + "I16ShlTrunc" + ], + "loc": "88:11-88:22" + }, + { + "token": [ + "DOT_LIDENT", + "to_int" + ], + "loc": "88:23-88:29" + }, + { + "token": "LPAREN", + "loc": "88:29-88:30" + }, + { + "token": "RPAREN", + "loc": "88:30-88:31" + }, + { + "token": "RPAREN", + "loc": "88:31-88:32" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "88:32-88:32" + }, + { + "token": "NEWLINE", + "loc": "88:32-88:33" + }, + { + "token": [ + "LIDENT", + "println" + ], + "loc": "89:3-89:10" + }, + { + "token": "LPAREN", + "loc": "89:10-89:11" + }, + { + "token": [ + "UIDENT", + "I16ShrArith" + ], + "loc": "89:11-89:22" + }, + { + "token": [ + "DOT_LIDENT", + "to_int" + ], + "loc": "89:23-89:29" + }, + { + "token": "LPAREN", + "loc": "89:29-89:30" + }, + { + "token": "RPAREN", + "loc": "89:30-89:31" + }, + { + "token": "RPAREN", + "loc": "89:31-89:32" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "89:32-89:32" + }, + { + "token": "NEWLINE", + "loc": "89:32-89:33" + }, + { + "token": [ + "LIDENT", + "println" + ], + "loc": "90:3-90:10" + }, + { + "token": "LPAREN", + "loc": "90:10-90:11" + }, + { + "token": [ + "UIDENT", + "I16Bits" + ], + "loc": "90:11-90:18" + }, + { + "token": [ + "DOT_LIDENT", + "to_int" + ], + "loc": "90:19-90:25" + }, + { + "token": "LPAREN", + "loc": "90:25-90:26" + }, + { + "token": "RPAREN", + "loc": "90:26-90:27" + }, + { + "token": "RPAREN", + "loc": "90:27-90:28" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "90:28-90:28" + }, + { + "token": "NEWLINE", + "loc": "90:28-90:29" + }, + { + "token": [ + "LIDENT", + "println" + ], + "loc": "91:3-91:10" + }, + { + "token": "LPAREN", + "loc": "91:10-91:11" + }, + { + "token": [ + "UIDENT", + "U16ShrLogic" + ], + "loc": "91:11-91:22" + }, + { + "token": [ + "DOT_LIDENT", + "to_int" + ], + "loc": "91:23-91:29" + }, + { + "token": "LPAREN", + "loc": "91:29-91:30" + }, + { + "token": "RPAREN", + "loc": "91:30-91:31" + }, + { + "token": "RPAREN", + "loc": "91:31-91:32" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "91:32-91:32" + }, + { + "token": "NEWLINE", + "loc": "91:32-91:33" + }, + { + "token": [ + "LIDENT", + "println" + ], + "loc": "92:3-92:10" + }, + { + "token": "LPAREN", + "loc": "92:10-92:11" + }, + { + "token": [ + "UIDENT", + "U16Bits" + ], + "loc": "92:11-92:18" + }, + { + "token": [ + "DOT_LIDENT", + "to_int" + ], + "loc": "92:19-92:25" + }, + { + "token": "LPAREN", + "loc": "92:25-92:26" + }, + { + "token": "RPAREN", + "loc": "92:26-92:27" + }, + { + "token": "RPAREN", + "loc": "92:27-92:28" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "92:28-92:28" + }, + { + "token": "NEWLINE", + "loc": "92:28-92:29" + }, + { + "token": [ + "LIDENT", + "println" + ], + "loc": "93:3-93:10" + }, + { + "token": "LPAREN", + "loc": "93:10-93:11" + }, + { + "token": [ + "UIDENT", + "ByteWrapAdd" + ], + "loc": "93:11-93:22" + }, + { + "token": [ + "DOT_LIDENT", + "to_int" + ], + "loc": "93:23-93:29" + }, + { + "token": "LPAREN", + "loc": "93:29-93:30" + }, + { + "token": "RPAREN", + "loc": "93:30-93:31" + }, + { + "token": "RPAREN", + "loc": "93:31-93:32" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "93:32-93:32" + }, + { + "token": "NEWLINE", + "loc": "93:32-93:33" + }, + { + "token": [ + "LIDENT", + "println" + ], + "loc": "94:3-94:10" + }, + { + "token": "LPAREN", + "loc": "94:10-94:11" + }, + { + "token": [ + "UIDENT", + "ByteWrapSub" + ], + "loc": "94:11-94:22" + }, + { + "token": [ + "DOT_LIDENT", + "to_int" + ], + "loc": "94:23-94:29" + }, + { + "token": "LPAREN", + "loc": "94:29-94:30" + }, + { + "token": "RPAREN", + "loc": "94:30-94:31" + }, + { + "token": "RPAREN", + "loc": "94:31-94:32" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "94:32-94:32" + }, + { + "token": "NEWLINE", + "loc": "94:32-94:33" + }, + { + "token": [ + "LIDENT", + "println" + ], + "loc": "95:3-95:10" + }, + { + "token": "LPAREN", + "loc": "95:10-95:11" + }, + { + "token": [ + "UIDENT", + "ByteMulWrap" + ], + "loc": "95:11-95:22" + }, + { + "token": [ + "DOT_LIDENT", + "to_int" + ], + "loc": "95:23-95:29" + }, + { + "token": "LPAREN", + "loc": "95:29-95:30" + }, + { + "token": "RPAREN", + "loc": "95:30-95:31" + }, + { + "token": "RPAREN", + "loc": "95:31-95:32" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "95:32-95:32" + }, + { + "token": "NEWLINE", + "loc": "95:32-95:33" + }, + { + "token": [ + "LIDENT", + "println" + ], + "loc": "96:3-96:10" + }, + { + "token": "LPAREN", + "loc": "96:10-96:11" + }, + { + "token": [ + "UIDENT", + "ByteShlTrunc" + ], + "loc": "96:11-96:23" + }, + { + "token": [ + "DOT_LIDENT", + "to_int" + ], + "loc": "96:24-96:30" + }, + { + "token": "LPAREN", + "loc": "96:30-96:31" + }, + { + "token": "RPAREN", + "loc": "96:31-96:32" + }, + { + "token": "RPAREN", + "loc": "96:32-96:33" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "96:33-96:33" + }, + { + "token": "NEWLINE", + "loc": "96:33-96:34" + }, + { + "token": [ + "LIDENT", + "println" + ], + "loc": "97:3-97:10" + }, + { + "token": "LPAREN", + "loc": "97:10-97:11" + }, + { + "token": [ + "UIDENT", + "ByteShrLogic" + ], + "loc": "97:11-97:23" + }, + { + "token": [ + "DOT_LIDENT", + "to_int" + ], + "loc": "97:24-97:30" + }, + { + "token": "LPAREN", + "loc": "97:30-97:31" + }, + { + "token": "RPAREN", + "loc": "97:31-97:32" + }, + { + "token": "RPAREN", + "loc": "97:32-97:33" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "97:33-97:33" + }, + { + "token": "NEWLINE", + "loc": "97:33-97:34" + }, + { + "token": [ + "LIDENT", + "println" + ], + "loc": "98:3-98:10" + }, + { + "token": "LPAREN", + "loc": "98:10-98:11" + }, + { + "token": [ + "UIDENT", + "IntNegShift" + ], + "loc": "98:11-98:22" + }, + { + "token": "RPAREN", + "loc": "98:22-98:23" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "98:23-98:23" + }, + { + "token": "NEWLINE", + "loc": "98:23-98:24" + }, + { + "token": [ + "LIDENT", + "println" + ], + "loc": "99:3-99:10" + }, + { + "token": "LPAREN", + "loc": "99:10-99:11" + }, + { + "token": [ + "UIDENT", + "IntBigShift" + ], + "loc": "99:11-99:22" + }, + { + "token": "RPAREN", + "loc": "99:22-99:23" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "99:23-99:23" + }, + { + "token": "NEWLINE", + "loc": "99:23-99:24" + }, + { + "token": [ + "LIDENT", + "println" + ], + "loc": "100:3-100:10" + }, + { + "token": "LPAREN", + "loc": "100:10-100:11" + }, + { + "token": [ + "UIDENT", + "U64NegShift" + ], + "loc": "100:11-100:22" + }, + { + "token": "RPAREN", + "loc": "100:22-100:23" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "100:23-100:23" + }, + { + "token": "NEWLINE", + "loc": "100:23-100:24" + }, + { + "token": [ + "LIDENT", + "println" + ], + "loc": "101:3-101:10" + }, + { + "token": "LPAREN", + "loc": "101:10-101:11" + }, + { + "token": [ + "UIDENT", + "I64BigShift" + ], + "loc": "101:11-101:22" + }, + { + "token": "RPAREN", + "loc": "101:22-101:23" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "101:23-101:23" + }, + { + "token": "NEWLINE", + "loc": "101:23-101:24" + }, + { + "token": [ + "LIDENT", + "println" + ], + "loc": "102:3-102:10" + }, + { + "token": "LPAREN", + "loc": "102:10-102:11" + }, + { + "token": [ + "UIDENT", + "I16NegShift" + ], + "loc": "102:11-102:22" + }, + { + "token": [ + "DOT_LIDENT", + "to_int" + ], + "loc": "102:23-102:29" + }, + { + "token": "LPAREN", + "loc": "102:29-102:30" + }, + { + "token": "RPAREN", + "loc": "102:30-102:31" + }, + { + "token": "RPAREN", + "loc": "102:31-102:32" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "102:32-102:32" + }, + { + "token": "NEWLINE", + "loc": "102:32-102:33" + }, + { + "token": [ + "LIDENT", + "println" + ], + "loc": "103:3-103:10" + }, + { + "token": "LPAREN", + "loc": "103:10-103:11" + }, + { + "token": [ + "UIDENT", + "ByteNegShift" + ], + "loc": "103:11-103:23" + }, + { + "token": [ + "DOT_LIDENT", + "to_int" + ], + "loc": "103:24-103:30" + }, + { + "token": "LPAREN", + "loc": "103:30-103:31" + }, + { + "token": "RPAREN", + "loc": "103:31-103:32" + }, + { + "token": "RPAREN", + "loc": "103:32-103:33" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "103:33-103:33" + }, + { + "token": "NEWLINE", + "loc": "103:33-103:34" + }, + { + "token": "LET", + "loc": "104:3-104:6" + }, + { + "token": [ + "LIDENT", + "x" + ], + "loc": "104:7-104:8" + }, + { + "token": "COLON", + "loc": "104:9-104:10" + }, + { + "token": [ + "UIDENT", + "Int16" + ], + "loc": "104:11-104:16" + }, + { + "token": "EQUAL", + "loc": "104:17-104:18" + }, + { + "token": "MINUS", + "loc": "104:19-104:20" + }, + { + "token": [ + "INT", + "32768" + ], + "loc": "104:20-104:25" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "104:25-104:25" + }, + { + "token": "NEWLINE", + "loc": "104:25-104:26" + }, + { + "token": "MATCH", + "loc": "105:3-105:8" + }, + { + "token": [ + "LIDENT", + "x" + ], + "loc": "105:9-105:10" + }, + { + "token": "LBRACE", + "loc": "105:11-105:12" + }, + { + "token": "NEWLINE", + "loc": "105:12-105:13" + }, + { + "token": [ + "UIDENT", + "I16Min" + ], + "loc": "106:5-106:11" + }, + { + "token": "FAT_ARROW", + "loc": "106:12-106:14" + }, + { + "token": [ + "LIDENT", + "println" + ], + "loc": "106:15-106:22" + }, + { + "token": "LPAREN", + "loc": "106:22-106:23" + }, + { + "token": [ + "STRING", + "pattern: matched folded Int16 const" + ], + "loc": "106:23-106:60" + }, + { + "token": "RPAREN", + "loc": "106:60-106:61" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "106:61-106:61" + }, + { + "token": "NEWLINE", + "loc": "106:61-106:62" + }, + { + "token": "UNDERSCORE", + "loc": "107:5-107:6" + }, + { + "token": "FAT_ARROW", + "loc": "107:7-107:9" + }, + { + "token": [ + "LIDENT", + "println" + ], + "loc": "107:10-107:17" + }, + { + "token": "LPAREN", + "loc": "107:17-107:18" + }, + { + "token": [ + "STRING", + "pattern: no match" + ], + "loc": "107:18-107:37" + }, + { + "token": "RPAREN", + "loc": "107:37-107:38" + }, + { + "token": "NEWLINE", + "loc": "107:38-107:39" + }, + { + "token": "RBRACE", + "loc": "108:3-108:4" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "108:4-108:4" + }, + { + "token": "NEWLINE", + "loc": "108:4-108:5" + }, + { + "token": [ + "COMMENT", + { + "content": "// fold-vs-runtime: the same expressions computed with opaque operands", + "kind": [ + "Ownline", + { + "leading_blank_line": false, + "trailing_blank_line": false + } + ], + "consumed_by_docstring": false + } + ], + "loc": "109:3-109:73" + }, + { + "token": "NEWLINE", + "loc": "109:73-109:74" + }, + { + "token": [ + "COMMENT", + { + "content": "// must agree with the folded constants on every backend", + "kind": [ + "Ownline", + { + "leading_blank_line": false, + "trailing_blank_line": false + } + ], + "consumed_by_docstring": false + } + ], + "loc": "110:3-110:59" + }, + { + "token": "NEWLINE", + "loc": "110:59-110:60" + }, + { + "token": "LET", + "loc": "111:3-111:6" + }, + { + "token": [ + "LIDENT", + "counts" + ], + "loc": "111:7-111:13" + }, + { + "token": "COLON", + "loc": "111:14-111:15" + }, + { + "token": [ + "UIDENT", + "Array" + ], + "loc": "111:16-111:21" + }, + { + "token": "LBRACKET", + "loc": "111:21-111:22" + }, + { + "token": [ + "UIDENT", + "Int" + ], + "loc": "111:22-111:25" + }, + { + "token": "RBRACKET", + "loc": "111:25-111:26" + }, + { + "token": "EQUAL", + "loc": "111:27-111:28" + }, + { + "token": "LBRACKET", + "loc": "111:29-111:30" + }, + { + "token": "MINUS", + "loc": "111:30-111:31" + }, + { + "token": [ + "INT", + "1" + ], + "loc": "111:31-111:32" + }, + { + "token": "COMMA", + "loc": "111:32-111:33" + }, + { + "token": [ + "INT", + "33" + ], + "loc": "111:34-111:36" + }, + { + "token": "COMMA", + "loc": "111:36-111:37" + }, + { + "token": [ + "INT", + "65" + ], + "loc": "111:38-111:40" + }, + { + "token": "COMMA", + "loc": "111:40-111:41" + }, + { + "token": [ + "INT", + "1" + ], + "loc": "111:42-111:43" + }, + { + "token": "RBRACKET", + "loc": "111:43-111:44" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "111:44-111:44" + }, + { + "token": "NEWLINE", + "loc": "111:44-111:45" + }, + { + "token": [ + "LIDENT", + "println" + ], + "loc": "112:3-112:10" + }, + { + "token": "LPAREN", + "loc": "112:10-112:11" + }, + { + "token": [ + "UIDENT", + "IntNegShift" + ], + "loc": "112:11-112:22" + }, + { + "token": [ + "INFIX1", + "==" + ], + "loc": "112:23-112:25" + }, + { + "token": [ + "INT", + "1" + ], + "loc": "112:26-112:27" + }, + { + "token": [ + "INFIX2", + "<<" + ], + "loc": "112:28-112:30" + }, + { + "token": [ + "LIDENT", + "counts" + ], + "loc": "112:31-112:37" + }, + { + "token": "LBRACKET", + "loc": "112:37-112:38" + }, + { + "token": [ + "INT", + "0" + ], + "loc": "112:38-112:39" + }, + { + "token": "RBRACKET", + "loc": "112:39-112:40" + }, + { + "token": "RPAREN", + "loc": "112:40-112:41" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "112:41-112:41" + }, + { + "token": "NEWLINE", + "loc": "112:41-112:42" + }, + { + "token": [ + "LIDENT", + "println" + ], + "loc": "113:3-113:10" + }, + { + "token": "LPAREN", + "loc": "113:10-113:11" + }, + { + "token": [ + "UIDENT", + "IntBigShift" + ], + "loc": "113:11-113:22" + }, + { + "token": [ + "INFIX1", + "==" + ], + "loc": "113:23-113:25" + }, + { + "token": [ + "INT", + "1" + ], + "loc": "113:26-113:27" + }, + { + "token": [ + "INFIX2", + "<<" + ], + "loc": "113:28-113:30" + }, + { + "token": [ + "LIDENT", + "counts" + ], + "loc": "113:31-113:37" + }, + { + "token": "LBRACKET", + "loc": "113:37-113:38" + }, + { + "token": [ + "INT", + "1" + ], + "loc": "113:38-113:39" + }, + { + "token": "RBRACKET", + "loc": "113:39-113:40" + }, + { + "token": "RPAREN", + "loc": "113:40-113:41" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "113:41-113:41" + }, + { + "token": "NEWLINE", + "loc": "113:41-113:42" + }, + { + "token": [ + "LIDENT", + "println" + ], + "loc": "114:3-114:10" + }, + { + "token": "LPAREN", + "loc": "114:10-114:11" + }, + { + "token": [ + "UIDENT", + "U64NegShift" + ], + "loc": "114:11-114:22" + }, + { + "token": [ + "INFIX1", + "==" + ], + "loc": "114:23-114:25" + }, + { + "token": [ + "INT", + "1UL" + ], + "loc": "114:26-114:29" + }, + { + "token": [ + "INFIX2", + "<<" + ], + "loc": "114:30-114:32" + }, + { + "token": [ + "LIDENT", + "counts" + ], + "loc": "114:33-114:39" + }, + { + "token": "LBRACKET", + "loc": "114:39-114:40" + }, + { + "token": [ + "INT", + "0" + ], + "loc": "114:40-114:41" + }, + { + "token": "RBRACKET", + "loc": "114:41-114:42" + }, + { + "token": "RPAREN", + "loc": "114:42-114:43" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "114:43-114:43" + }, + { + "token": "NEWLINE", + "loc": "114:43-114:44" + }, + { + "token": [ + "LIDENT", + "println" + ], + "loc": "115:3-115:10" + }, + { + "token": "LPAREN", + "loc": "115:10-115:11" + }, + { + "token": [ + "UIDENT", + "I64BigShift" + ], + "loc": "115:11-115:22" + }, + { + "token": [ + "INFIX1", + "==" + ], + "loc": "115:23-115:25" + }, + { + "token": [ + "INT", + "1L" + ], + "loc": "115:26-115:28" + }, + { + "token": [ + "INFIX2", + "<<" + ], + "loc": "115:29-115:31" + }, + { + "token": [ + "LIDENT", + "counts" + ], + "loc": "115:32-115:38" + }, + { + "token": "LBRACKET", + "loc": "115:38-115:39" + }, + { + "token": [ + "INT", + "2" + ], + "loc": "115:39-115:40" + }, + { + "token": "RBRACKET", + "loc": "115:40-115:41" + }, + { + "token": "RPAREN", + "loc": "115:41-115:42" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "115:42-115:42" + }, + { + "token": "NEWLINE", + "loc": "115:42-115:43" + }, + { + "token": [ + "LIDENT", + "println" + ], + "loc": "116:3-116:10" + }, + { + "token": "LPAREN", + "loc": "116:10-116:11" + }, + { + "token": [ + "UIDENT", + "I16NegShift" + ], + "loc": "116:11-116:22" + }, + { + "token": [ + "DOT_LIDENT", + "to_int" + ], + "loc": "116:23-116:29" + }, + { + "token": "LPAREN", + "loc": "116:29-116:30" + }, + { + "token": "RPAREN", + "loc": "116:30-116:31" + }, + { + "token": [ + "INFIX1", + "==" + ], + "loc": "116:32-116:34" + }, + { + "token": "LPAREN", + "loc": "116:35-116:36" + }, + { + "token": "LPAREN", + "loc": "116:36-116:37" + }, + { + "token": [ + "INT", + "1" + ], + "loc": "116:37-116:38" + }, + { + "token": "COLON", + "loc": "116:39-116:40" + }, + { + "token": [ + "UIDENT", + "Int16" + ], + "loc": "116:41-116:46" + }, + { + "token": "RPAREN", + "loc": "116:46-116:47" + }, + { + "token": [ + "INFIX2", + "<<" + ], + "loc": "116:48-116:50" + }, + { + "token": [ + "LIDENT", + "counts" + ], + "loc": "116:51-116:57" + }, + { + "token": "LBRACKET", + "loc": "116:57-116:58" + }, + { + "token": [ + "INT", + "0" + ], + "loc": "116:58-116:59" + }, + { + "token": "RBRACKET", + "loc": "116:59-116:60" + }, + { + "token": "RPAREN", + "loc": "116:60-116:61" + }, + { + "token": [ + "DOT_LIDENT", + "to_int" + ], + "loc": "116:62-116:68" + }, + { + "token": "LPAREN", + "loc": "116:68-116:69" + }, + { + "token": "RPAREN", + "loc": "116:69-116:70" + }, + { + "token": "RPAREN", + "loc": "116:70-116:71" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "116:71-116:71" + }, + { + "token": "NEWLINE", + "loc": "116:71-116:72" + }, + { + "token": [ + "LIDENT", + "println" + ], + "loc": "117:3-117:10" + }, + { + "token": "LPAREN", + "loc": "117:10-117:11" + }, + { + "token": [ + "UIDENT", + "ByteNegShift" + ], + "loc": "117:11-117:23" + }, + { + "token": [ + "INFIX1", + "==" + ], + "loc": "117:24-117:26" + }, + { + "token": [ + "BYTE", + "\\x01" + ], + "loc": "117:27-117:34" + }, + { + "token": [ + "INFIX2", + "<<" + ], + "loc": "117:35-117:37" + }, + { + "token": [ + "LIDENT", + "counts" + ], + "loc": "117:38-117:44" + }, + { + "token": "LBRACKET", + "loc": "117:44-117:45" + }, + { + "token": [ + "INT", + "0" + ], + "loc": "117:45-117:46" + }, + { + "token": "RBRACKET", + "loc": "117:46-117:47" + }, + { + "token": "RPAREN", + "loc": "117:47-117:48" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "117:48-117:48" + }, + { + "token": "NEWLINE", + "loc": "117:48-117:49" + }, + { + "token": "LET", + "loc": "118:3-118:6" + }, + { + "token": [ + "LIDENT", + "int_max" + ], + "loc": "118:7-118:14" + }, + { + "token": "COLON", + "loc": "118:15-118:16" + }, + { + "token": [ + "UIDENT", + "Array" + ], + "loc": "118:17-118:22" + }, + { + "token": "LBRACKET", + "loc": "118:22-118:23" + }, + { + "token": [ + "UIDENT", + "Int" + ], + "loc": "118:23-118:26" + }, + { + "token": "RBRACKET", + "loc": "118:26-118:27" + }, + { + "token": "EQUAL", + "loc": "118:28-118:29" + }, + { + "token": "LBRACKET", + "loc": "118:30-118:31" + }, + { + "token": [ + "INT", + "2147483647" + ], + "loc": "118:31-118:41" + }, + { + "token": "RBRACKET", + "loc": "118:41-118:42" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "118:42-118:42" + }, + { + "token": "NEWLINE", + "loc": "118:42-118:43" + }, + { + "token": [ + "LIDENT", + "println" + ], + "loc": "119:3-119:10" + }, + { + "token": "LPAREN", + "loc": "119:10-119:11" + }, + { + "token": [ + "UIDENT", + "IntWrapAdd" + ], + "loc": "119:11-119:21" + }, + { + "token": [ + "INFIX1", + "==" + ], + "loc": "119:22-119:24" + }, + { + "token": [ + "LIDENT", + "int_max" + ], + "loc": "119:25-119:32" + }, + { + "token": "LBRACKET", + "loc": "119:32-119:33" + }, + { + "token": [ + "INT", + "0" + ], + "loc": "119:33-119:34" + }, + { + "token": "RBRACKET", + "loc": "119:34-119:35" + }, + { + "token": "PLUS", + "loc": "119:36-119:37" + }, + { + "token": [ + "INT", + "1" + ], + "loc": "119:38-119:39" + }, + { + "token": "RPAREN", + "loc": "119:39-119:40" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "119:40-119:40" + }, + { + "token": "NEWLINE", + "loc": "119:40-119:41" + }, + { + "token": "LET", + "loc": "120:3-120:6" + }, + { + "token": [ + "LIDENT", + "i16_parts" + ], + "loc": "120:7-120:16" + }, + { + "token": "COLON", + "loc": "120:17-120:18" + }, + { + "token": [ + "UIDENT", + "Array" + ], + "loc": "120:19-120:24" + }, + { + "token": "LBRACKET", + "loc": "120:24-120:25" + }, + { + "token": [ + "UIDENT", + "Int16" + ], + "loc": "120:25-120:30" + }, + { + "token": "RBRACKET", + "loc": "120:30-120:31" + }, + { + "token": "EQUAL", + "loc": "120:32-120:33" + }, + { + "token": "LBRACKET", + "loc": "120:34-120:35" + }, + { + "token": "MINUS", + "loc": "120:35-120:36" + }, + { + "token": [ + "INT", + "32768" + ], + "loc": "120:36-120:41" + }, + { + "token": "RBRACKET", + "loc": "120:41-120:42" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "120:42-120:42" + }, + { + "token": "NEWLINE", + "loc": "120:42-120:43" + }, + { + "token": [ + "LIDENT", + "println" + ], + "loc": "121:3-121:10" + }, + { + "token": "LPAREN", + "loc": "121:10-121:11" + }, + { + "token": [ + "UIDENT", + "I16NegMin" + ], + "loc": "121:11-121:20" + }, + { + "token": [ + "DOT_LIDENT", + "to_int" + ], + "loc": "121:21-121:27" + }, + { + "token": "LPAREN", + "loc": "121:27-121:28" + }, + { + "token": "RPAREN", + "loc": "121:28-121:29" + }, + { + "token": [ + "INFIX1", + "==" + ], + "loc": "121:30-121:32" + }, + { + "token": "LPAREN", + "loc": "121:33-121:34" + }, + { + "token": "MINUS", + "loc": "121:34-121:35" + }, + { + "token": [ + "LIDENT", + "i16_parts" + ], + "loc": "121:35-121:44" + }, + { + "token": "LBRACKET", + "loc": "121:44-121:45" + }, + { + "token": [ + "INT", + "0" + ], + "loc": "121:45-121:46" + }, + { + "token": "RBRACKET", + "loc": "121:46-121:47" + }, + { + "token": "RPAREN", + "loc": "121:47-121:48" + }, + { + "token": [ + "DOT_LIDENT", + "to_int" + ], + "loc": "121:49-121:55" + }, + { + "token": "LPAREN", + "loc": "121:55-121:56" + }, + { + "token": "RPAREN", + "loc": "121:56-121:57" + }, + { + "token": "RPAREN", + "loc": "121:57-121:58" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "121:58-121:58" + }, + { + "token": "NEWLINE", + "loc": "121:58-121:59" + }, + { + "token": "LET", + "loc": "122:3-122:6" + }, + { + "token": [ + "LIDENT", + "bytes" + ], + "loc": "122:7-122:12" + }, + { + "token": "COLON", + "loc": "122:13-122:14" + }, + { + "token": [ + "UIDENT", + "Array" + ], + "loc": "122:15-122:20" + }, + { + "token": "LBRACKET", + "loc": "122:20-122:21" + }, + { + "token": [ + "UIDENT", + "Byte" + ], + "loc": "122:21-122:25" + }, + { + "token": "RBRACKET", + "loc": "122:25-122:26" + }, + { + "token": "EQUAL", + "loc": "122:27-122:28" + }, + { + "token": "LBRACKET", + "loc": "122:29-122:30" + }, + { + "token": [ + "BYTE", + "\\xFF" + ], + "loc": "122:30-122:37" + }, + { + "token": "COMMA", + "loc": "122:37-122:38" + }, + { + "token": [ + "BYTE", + "\\x10" + ], + "loc": "122:39-122:46" + }, + { + "token": "RBRACKET", + "loc": "122:46-122:47" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "122:47-122:47" + }, + { + "token": "NEWLINE", + "loc": "122:47-122:48" + }, + { + "token": [ + "LIDENT", + "println" + ], + "loc": "123:3-123:10" + }, + { + "token": "LPAREN", + "loc": "123:10-123:11" + }, + { + "token": [ + "UIDENT", + "ByteWrapAdd" + ], + "loc": "123:11-123:22" + }, + { + "token": [ + "INFIX1", + "==" + ], + "loc": "123:23-123:25" + }, + { + "token": [ + "LIDENT", + "bytes" + ], + "loc": "123:26-123:31" + }, + { + "token": "LBRACKET", + "loc": "123:31-123:32" + }, + { + "token": [ + "INT", + "0" + ], + "loc": "123:32-123:33" + }, + { + "token": "RBRACKET", + "loc": "123:33-123:34" + }, + { + "token": "PLUS", + "loc": "123:35-123:36" + }, + { + "token": [ + "BYTE", + "\\x01" + ], + "loc": "123:37-123:44" + }, + { + "token": "RPAREN", + "loc": "123:44-123:45" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "123:45-123:45" + }, + { + "token": "NEWLINE", + "loc": "123:45-123:46" + }, + { + "token": [ + "LIDENT", + "println" + ], + "loc": "124:3-124:10" + }, + { + "token": "LPAREN", + "loc": "124:10-124:11" + }, + { + "token": [ + "UIDENT", + "ByteMulWrap" + ], + "loc": "124:11-124:22" + }, + { + "token": [ + "INFIX1", + "==" + ], + "loc": "124:23-124:25" + }, + { + "token": [ + "LIDENT", + "bytes" + ], + "loc": "124:26-124:31" + }, + { + "token": "LBRACKET", + "loc": "124:31-124:32" + }, + { + "token": [ + "INT", + "1" + ], + "loc": "124:32-124:33" + }, + { + "token": "RBRACKET", + "loc": "124:33-124:34" + }, + { + "token": [ + "INFIX3", + "*" + ], + "loc": "124:35-124:36" + }, + { + "token": [ + "LIDENT", + "bytes" + ], + "loc": "124:37-124:42" + }, + { + "token": "LBRACKET", + "loc": "124:42-124:43" + }, + { + "token": [ + "INT", + "1" + ], + "loc": "124:43-124:44" + }, + { + "token": "RBRACKET", + "loc": "124:44-124:45" + }, + { + "token": "RPAREN", + "loc": "124:45-124:46" + }, + { + "token": "NEWLINE", + "loc": "124:46-124:47" + }, + { + "token": "RBRACE", + "loc": "125:1-125:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "125:2-125:2" + }, + { + "token": "NEWLINE", + "loc": "125:2-125:3" + }, + { + "token": "EOF", + "loc": "126:1-126:1" + } +] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/pipeline_test_constant_error_constructor.json b/test/sync_test/__snapshot__/pipeline_test_constant_error_constructor.json index be0b94f3..2c3fb30f 100644 --- a/test/sync_test/__snapshot__/pipeline_test_constant_error_constructor.json +++ b/test/sync_test/__snapshot__/pipeline_test_constant_error_constructor.json @@ -773,6 +773,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, diff --git a/test/sync_test/__snapshot__/pipeline_test_constr_mut_field.json b/test/sync_test/__snapshot__/pipeline_test_constr_mut_field.json index 4e68f402..f67fdf75 100644 --- a/test/sync_test/__snapshot__/pipeline_test_constr_mut_field.json +++ b/test/sync_test/__snapshot__/pipeline_test_constr_mut_field.json @@ -1018,6 +1018,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, diff --git a/test/sync_test/__snapshot__/pipeline_test_constr_pattern_no_payload.json b/test/sync_test/__snapshot__/pipeline_test_constr_pattern_no_payload.json index 51adf51d..182127dd 100644 --- a/test/sync_test/__snapshot__/pipeline_test_constr_pattern_no_payload.json +++ b/test/sync_test/__snapshot__/pipeline_test_constr_pattern_no_payload.json @@ -1422,6 +1422,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, diff --git a/test/sync_test/__snapshot__/pipeline_test_constr_propagate_no_payload_mut_enum.json b/test/sync_test/__snapshot__/pipeline_test_constr_propagate_no_payload_mut_enum.json new file mode 100644 index 00000000..bb5b1053 --- /dev/null +++ b/test/sync_test/__snapshot__/pipeline_test_constr_propagate_no_payload_mut_enum.json @@ -0,0 +1,1363 @@ +[ + { + "kind": "Impl::TopTypeDef", + "loc": null, + "children": { + "value": { + "kind": "TypeDecl", + "loc": null, + "children": { + "tycon": "List", + "params": { + "kind": "TypeDecl::ParamList", + "loc": null, + "children": [ + { + "kind": "TypeDeclBinder", + "loc": null, + "children": { + "name": "A" + } + } + ] + }, + "components": { + "kind": "TypeDesc::Variant", + "loc": null, + "children": { + "value": { + "kind": "TypeDesc::Variant::ConstrList", + "loc": null, + "children": [ + { + "kind": "ConstrDecl", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Empty" + } + }, + "args": null, + "tag": null, + "attrs": { + "kind": "ConstrDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + { + "kind": "ConstrDecl", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "More" + } + }, + "args": { + "kind": "ConstrDecl::ArgList", + "loc": null, + "children": [ + { + "kind": "ConstrParam", + "loc": null, + "children": { + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "A" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "mut": false, + "label": null + } + }, + { + "kind": "ConstrParam", + "loc": null, + "children": { + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "List" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [ + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "A" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + ] + } + } + }, + "mut": true, + "label": { + "kind": "Label", + "loc": null, + "children": { + "name": "tail" + } + } + } + } + ] + }, + "tag": null, + "attrs": { + "kind": "ConstrDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + } + ] + } + } + }, + "attrs": { + "kind": "TypeDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "", + "type_vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "is_declare": false, + "deriving": { + "kind": "TypeDecl::DerivingList", + "loc": null, + "children": [] + } + } + } + } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "mut_payload_keeps_identity" + } + }, + "has_error": null, + "is_async": null, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "String" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::Let", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Constraint", + "loc": null, + "children": { + "pat": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "xs" + } + } + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "List" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [ + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Unit" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + ] + } + } + } + } + }, + "expr": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "More" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::NoExtraInfo", + "loc": null, + "children": {} + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Unit", + "loc": null, + "children": { + "faked": false + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Empty" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::NoExtraInfo", + "loc": null, + "children": {} + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Labelled", + "loc": null, + "children": { + "value": { + "kind": "Label", + "loc": null, + "children": { + "name": "tail" + } + } + } + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "body": { + "kind": "Expr::Sequence", + "loc": null, + "children": { + "exprs": { + "kind": "Expr::Sequence::ExprList", + "loc": null, + "children": [ + { + "kind": "Expr::Match", + "loc": null, + "children": { + "expr": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "xs" + } + } + } + } + } + }, + "cases": { + "kind": "Expr::Match::CaseList", + "loc": null, + "children": [ + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Alias", + "loc": null, + "children": { + "pat": { + "kind": "Pattern::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "More" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::NoExtraInfo", + "loc": null, + "children": {} + } + } + }, + "args": { + "kind": "Pattern::Constr::ArgList", + "loc": null, + "children": [ + { + "kind": "ConstrPatArg", + "loc": null, + "children": { + "pat": { + "kind": "Pattern::Any", + "loc": null, + "children": {} + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "is_open": false + } + }, + "alias": { + "kind": "Binder", + "loc": null, + "children": { + "name": "dest" + } + } + } + }, + "guard": null, + "body": { + "kind": "Expr::Mutate", + "loc": null, + "children": { + "record": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "dest" + } + } + } + } + } + }, + "accessor": { + "kind": "Accessor::Label", + "loc": null, + "children": { + "value": { + "kind": "Label", + "loc": null, + "children": { + "name": "tail" + } + } + } + }, + "field": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "More" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::NoExtraInfo", + "loc": null, + "children": {} + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Unit", + "loc": null, + "children": { + "faked": false + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Empty" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::NoExtraInfo", + "loc": null, + "children": {} + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Labelled", + "loc": null, + "children": { + "value": { + "kind": "Label", + "loc": null, + "children": { + "name": "tail" + } + } + } + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "augmented_by": null + } + } + } + }, + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Any", + "loc": null, + "children": {} + }, + "guard": null, + "body": { + "kind": "Expr::Unit", + "loc": null, + "children": { + "faked": false + } + } + } + } + ] + } + } + } + ] + }, + "last_expr": { + "kind": "Expr::Match", + "loc": null, + "children": { + "expr": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "xs" + } + } + } + } + } + }, + "cases": { + "kind": "Expr::Match::CaseList", + "loc": null, + "children": [ + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "More" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::NoExtraInfo", + "loc": null, + "children": {} + } + } + }, + "args": { + "kind": "Pattern::Constr::ArgList", + "loc": null, + "children": [ + { + "kind": "ConstrPatArg", + "loc": null, + "children": { + "pat": { + "kind": "Pattern::Any", + "loc": null, + "children": {} + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "ConstrPatArg", + "loc": null, + "children": { + "pat": { + "kind": "Pattern::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "More" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::NoExtraInfo", + "loc": null, + "children": {} + } + } + }, + "args": { + "kind": "Pattern::Constr::ArgList", + "loc": null, + "children": [ + { + "kind": "ConstrPatArg", + "loc": null, + "children": { + "pat": { + "kind": "Pattern::Any", + "loc": null, + "children": {} + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "is_open": false + } + }, + "kind": { + "kind": "ArgumentKind::Labelled", + "loc": null, + "children": { + "value": { + "kind": "Label", + "loc": null, + "children": { + "name": "tail" + } + } + } + } + } + } + ] + }, + "is_open": false + } + }, + "guard": null, + "body": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "kept" + } + } + } + } + } + }, + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Any", + "loc": null, + "children": {} + }, + "guard": null, + "body": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "lost" + } + } + } + } + } + } + ] + } + } + } + } + } + } + } + } + } + } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "main" + } + }, + "has_error": null, + "is_async": null, + "decl_params": null, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [] + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::Let", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Constraint", + "loc": null, + "children": { + "pat": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "xs" + } + } + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "List" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [ + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Unit" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + ] + } + } + } + } + }, + "expr": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Empty" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::NoExtraInfo", + "loc": null, + "children": {} + } + } + } + } + }, + "body": { + "kind": "Expr::Sequence", + "loc": null, + "children": { + "exprs": { + "kind": "Expr::Sequence::ExprList", + "loc": null, + "children": [ + { + "kind": "Expr::Match", + "loc": null, + "children": { + "expr": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "xs" + } + } + } + } + } + }, + "cases": { + "kind": "Expr::Match::CaseList", + "loc": null, + "children": [ + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Empty" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::NoExtraInfo", + "loc": null, + "children": {} + } + } + }, + "args": null, + "is_open": false + } + }, + "guard": null, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "ok" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + }, + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Any", + "loc": null, + "children": {} + }, + "guard": null, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "not ok" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + ] + } + } + } + ] + }, + "last_expr": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "mut_payload_keeps_identity" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + } + } + } + } + } + } +] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/pipeline_test_constr_propagate_no_payload_mut_enum.mbt b/test/sync_test/__snapshot__/pipeline_test_constr_propagate_no_payload_mut_enum.mbt new file mode 100644 index 00000000..0f4e362d --- /dev/null +++ b/test/sync_test/__snapshot__/pipeline_test_constr_propagate_no_payload_mut_enum.mbt @@ -0,0 +1,28 @@ +///| +enum List[A] { + Empty + More(A, mut tail~ : List[A]) +} + +///| +fn mut_payload_keeps_identity() -> String { + let xs : List[Unit] = More((), tail=Empty) + match xs { + More(_) as dest => dest.tail = More((), tail=Empty) + _ => () + } + match xs { + More(_, tail=More(_)) => "kept" + _ => "lost" + } +} + +///| +fn main { + let xs : List[Unit] = Empty + match xs { + Empty => println("ok") + _ => println("not ok") + } + println(mut_payload_keeps_identity()) +} diff --git a/test/sync_test/__snapshot__/pipeline_test_constr_propagate_no_payload_mut_enum.mbt.tokens.json b/test/sync_test/__snapshot__/pipeline_test_constr_propagate_no_payload_mut_enum.mbt.tokens.json new file mode 100644 index 00000000..0eda7759 --- /dev/null +++ b/test/sync_test/__snapshot__/pipeline_test_constr_propagate_no_payload_mut_enum.mbt.tokens.json @@ -0,0 +1,883 @@ +[ + { + "token": [ + "COMMENT", + { + "content": "///|", + "kind": [ + "Ownline", + { + "leading_blank_line": false, + "trailing_blank_line": false + } + ], + "consumed_by_docstring": false + } + ], + "loc": "1:1-1:5" + }, + { + "token": "NEWLINE", + "loc": "1:5-1:6" + }, + { + "token": "ENUM", + "loc": "2:1-2:5" + }, + { + "token": [ + "UIDENT", + "List" + ], + "loc": "2:6-2:10" + }, + { + "token": "LBRACKET", + "loc": "2:10-2:11" + }, + { + "token": [ + "UIDENT", + "A" + ], + "loc": "2:11-2:12" + }, + { + "token": "RBRACKET", + "loc": "2:12-2:13" + }, + { + "token": "LBRACE", + "loc": "2:14-2:15" + }, + { + "token": "NEWLINE", + "loc": "2:15-2:16" + }, + { + "token": [ + "UIDENT", + "Empty" + ], + "loc": "3:3-3:8" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "3:8-3:8" + }, + { + "token": "NEWLINE", + "loc": "3:8-3:9" + }, + { + "token": [ + "UIDENT", + "More" + ], + "loc": "4:3-4:7" + }, + { + "token": "LPAREN", + "loc": "4:7-4:8" + }, + { + "token": [ + "UIDENT", + "A" + ], + "loc": "4:8-4:9" + }, + { + "token": "COMMA", + "loc": "4:9-4:10" + }, + { + "token": "MUTABLE", + "loc": "4:11-4:14" + }, + { + "token": [ + "POST_LABEL", + "tail" + ], + "loc": "4:15-4:20" + }, + { + "token": "COLON", + "loc": "4:21-4:22" + }, + { + "token": [ + "UIDENT", + "List" + ], + "loc": "4:23-4:27" + }, + { + "token": "LBRACKET", + "loc": "4:27-4:28" + }, + { + "token": [ + "UIDENT", + "A" + ], + "loc": "4:28-4:29" + }, + { + "token": "RBRACKET", + "loc": "4:29-4:30" + }, + { + "token": "RPAREN", + "loc": "4:30-4:31" + }, + { + "token": "NEWLINE", + "loc": "4:31-4:32" + }, + { + "token": "RBRACE", + "loc": "5:1-5:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "5:2-5:2" + }, + { + "token": "NEWLINE", + "loc": "5:2-5:3" + }, + { + "token": "NEWLINE", + "loc": "6:1-6:2" + }, + { + "token": [ + "COMMENT", + { + "content": "///|", + "kind": [ + "Ownline", + { + "leading_blank_line": true, + "trailing_blank_line": false + } + ], + "consumed_by_docstring": false + } + ], + "loc": "7:1-7:5" + }, + { + "token": "NEWLINE", + "loc": "7:5-7:6" + }, + { + "token": "FN", + "loc": "8:1-8:3" + }, + { + "token": [ + "LIDENT", + "mut_payload_keeps_identity" + ], + "loc": "8:4-8:30" + }, + { + "token": "LPAREN", + "loc": "8:30-8:31" + }, + { + "token": "RPAREN", + "loc": "8:31-8:32" + }, + { + "token": "THIN_ARROW", + "loc": "8:33-8:35" + }, + { + "token": [ + "UIDENT", + "String" + ], + "loc": "8:36-8:42" + }, + { + "token": "LBRACE", + "loc": "8:43-8:44" + }, + { + "token": "NEWLINE", + "loc": "8:44-8:45" + }, + { + "token": "LET", + "loc": "9:3-9:6" + }, + { + "token": [ + "LIDENT", + "xs" + ], + "loc": "9:7-9:9" + }, + { + "token": "COLON", + "loc": "9:10-9:11" + }, + { + "token": [ + "UIDENT", + "List" + ], + "loc": "9:12-9:16" + }, + { + "token": "LBRACKET", + "loc": "9:16-9:17" + }, + { + "token": [ + "UIDENT", + "Unit" + ], + "loc": "9:17-9:21" + }, + { + "token": "RBRACKET", + "loc": "9:21-9:22" + }, + { + "token": "EQUAL", + "loc": "9:23-9:24" + }, + { + "token": [ + "UIDENT", + "More" + ], + "loc": "9:25-9:29" + }, + { + "token": "LPAREN", + "loc": "9:29-9:30" + }, + { + "token": "LPAREN", + "loc": "9:30-9:31" + }, + { + "token": "RPAREN", + "loc": "9:31-9:32" + }, + { + "token": "COMMA", + "loc": "9:32-9:33" + }, + { + "token": [ + "LIDENT", + "tail" + ], + "loc": "9:34-9:38" + }, + { + "token": "EQUAL", + "loc": "9:38-9:39" + }, + { + "token": [ + "UIDENT", + "Empty" + ], + "loc": "9:39-9:44" + }, + { + "token": "RPAREN", + "loc": "9:44-9:45" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "9:45-9:45" + }, + { + "token": "NEWLINE", + "loc": "9:45-9:46" + }, + { + "token": "MATCH", + "loc": "10:3-10:8" + }, + { + "token": [ + "LIDENT", + "xs" + ], + "loc": "10:9-10:11" + }, + { + "token": "LBRACE", + "loc": "10:12-10:13" + }, + { + "token": "NEWLINE", + "loc": "10:13-10:14" + }, + { + "token": [ + "UIDENT", + "More" + ], + "loc": "11:5-11:9" + }, + { + "token": "LPAREN", + "loc": "11:9-11:10" + }, + { + "token": "UNDERSCORE", + "loc": "11:10-11:11" + }, + { + "token": "RPAREN", + "loc": "11:11-11:12" + }, + { + "token": "AS", + "loc": "11:13-11:15" + }, + { + "token": [ + "LIDENT", + "dest" + ], + "loc": "11:16-11:20" + }, + { + "token": "FAT_ARROW", + "loc": "11:21-11:23" + }, + { + "token": [ + "LIDENT", + "dest" + ], + "loc": "11:24-11:28" + }, + { + "token": [ + "DOT_LIDENT", + "tail" + ], + "loc": "11:29-11:33" + }, + { + "token": "EQUAL", + "loc": "11:34-11:35" + }, + { + "token": [ + "UIDENT", + "More" + ], + "loc": "11:36-11:40" + }, + { + "token": "LPAREN", + "loc": "11:40-11:41" + }, + { + "token": "LPAREN", + "loc": "11:41-11:42" + }, + { + "token": "RPAREN", + "loc": "11:42-11:43" + }, + { + "token": "COMMA", + "loc": "11:43-11:44" + }, + { + "token": [ + "LIDENT", + "tail" + ], + "loc": "11:45-11:49" + }, + { + "token": "EQUAL", + "loc": "11:49-11:50" + }, + { + "token": [ + "UIDENT", + "Empty" + ], + "loc": "11:50-11:55" + }, + { + "token": "RPAREN", + "loc": "11:55-11:56" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "11:56-11:56" + }, + { + "token": "NEWLINE", + "loc": "11:56-11:57" + }, + { + "token": "UNDERSCORE", + "loc": "12:5-12:6" + }, + { + "token": "FAT_ARROW", + "loc": "12:7-12:9" + }, + { + "token": "LPAREN", + "loc": "12:10-12:11" + }, + { + "token": "RPAREN", + "loc": "12:11-12:12" + }, + { + "token": "NEWLINE", + "loc": "12:12-12:13" + }, + { + "token": "RBRACE", + "loc": "13:3-13:4" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "13:4-13:4" + }, + { + "token": "NEWLINE", + "loc": "13:4-13:5" + }, + { + "token": "MATCH", + "loc": "14:3-14:8" + }, + { + "token": [ + "LIDENT", + "xs" + ], + "loc": "14:9-14:11" + }, + { + "token": "LBRACE", + "loc": "14:12-14:13" + }, + { + "token": "NEWLINE", + "loc": "14:13-14:14" + }, + { + "token": [ + "UIDENT", + "More" + ], + "loc": "15:5-15:9" + }, + { + "token": "LPAREN", + "loc": "15:9-15:10" + }, + { + "token": "UNDERSCORE", + "loc": "15:10-15:11" + }, + { + "token": "COMMA", + "loc": "15:11-15:12" + }, + { + "token": [ + "LIDENT", + "tail" + ], + "loc": "15:13-15:17" + }, + { + "token": "EQUAL", + "loc": "15:17-15:18" + }, + { + "token": [ + "UIDENT", + "More" + ], + "loc": "15:18-15:22" + }, + { + "token": "LPAREN", + "loc": "15:22-15:23" + }, + { + "token": "UNDERSCORE", + "loc": "15:23-15:24" + }, + { + "token": "RPAREN", + "loc": "15:24-15:25" + }, + { + "token": "RPAREN", + "loc": "15:25-15:26" + }, + { + "token": "FAT_ARROW", + "loc": "15:27-15:29" + }, + { + "token": [ + "STRING", + "kept" + ], + "loc": "15:30-15:36" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "15:36-15:36" + }, + { + "token": "NEWLINE", + "loc": "15:36-15:37" + }, + { + "token": "UNDERSCORE", + "loc": "16:5-16:6" + }, + { + "token": "FAT_ARROW", + "loc": "16:7-16:9" + }, + { + "token": [ + "STRING", + "lost" + ], + "loc": "16:10-16:16" + }, + { + "token": "NEWLINE", + "loc": "16:16-16:17" + }, + { + "token": "RBRACE", + "loc": "17:3-17:4" + }, + { + "token": "NEWLINE", + "loc": "17:4-17:5" + }, + { + "token": "RBRACE", + "loc": "18:1-18:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "18:2-18:2" + }, + { + "token": "NEWLINE", + "loc": "18:2-18:3" + }, + { + "token": "NEWLINE", + "loc": "19:1-19:2" + }, + { + "token": [ + "COMMENT", + { + "content": "///|", + "kind": [ + "Ownline", + { + "leading_blank_line": true, + "trailing_blank_line": false + } + ], + "consumed_by_docstring": false + } + ], + "loc": "20:1-20:5" + }, + { + "token": "NEWLINE", + "loc": "20:5-20:6" + }, + { + "token": "FN", + "loc": "21:1-21:3" + }, + { + "token": [ + "LIDENT", + "main" + ], + "loc": "21:4-21:8" + }, + { + "token": "LBRACE", + "loc": "21:9-21:10" + }, + { + "token": "NEWLINE", + "loc": "21:10-21:11" + }, + { + "token": "LET", + "loc": "22:3-22:6" + }, + { + "token": [ + "LIDENT", + "xs" + ], + "loc": "22:7-22:9" + }, + { + "token": "COLON", + "loc": "22:10-22:11" + }, + { + "token": [ + "UIDENT", + "List" + ], + "loc": "22:12-22:16" + }, + { + "token": "LBRACKET", + "loc": "22:16-22:17" + }, + { + "token": [ + "UIDENT", + "Unit" + ], + "loc": "22:17-22:21" + }, + { + "token": "RBRACKET", + "loc": "22:21-22:22" + }, + { + "token": "EQUAL", + "loc": "22:23-22:24" + }, + { + "token": [ + "UIDENT", + "Empty" + ], + "loc": "22:25-22:30" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "22:30-22:30" + }, + { + "token": "NEWLINE", + "loc": "22:30-22:31" + }, + { + "token": "MATCH", + "loc": "23:3-23:8" + }, + { + "token": [ + "LIDENT", + "xs" + ], + "loc": "23:9-23:11" + }, + { + "token": "LBRACE", + "loc": "23:12-23:13" + }, + { + "token": "NEWLINE", + "loc": "23:13-23:14" + }, + { + "token": [ + "UIDENT", + "Empty" + ], + "loc": "24:5-24:10" + }, + { + "token": "FAT_ARROW", + "loc": "24:11-24:13" + }, + { + "token": [ + "LIDENT", + "println" + ], + "loc": "24:14-24:21" + }, + { + "token": "LPAREN", + "loc": "24:21-24:22" + }, + { + "token": [ + "STRING", + "ok" + ], + "loc": "24:22-24:26" + }, + { + "token": "RPAREN", + "loc": "24:26-24:27" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "24:27-24:27" + }, + { + "token": "NEWLINE", + "loc": "24:27-24:28" + }, + { + "token": "UNDERSCORE", + "loc": "25:5-25:6" + }, + { + "token": "FAT_ARROW", + "loc": "25:7-25:9" + }, + { + "token": [ + "LIDENT", + "println" + ], + "loc": "25:10-25:17" + }, + { + "token": "LPAREN", + "loc": "25:17-25:18" + }, + { + "token": [ + "STRING", + "not ok" + ], + "loc": "25:18-25:26" + }, + { + "token": "RPAREN", + "loc": "25:26-25:27" + }, + { + "token": "NEWLINE", + "loc": "25:27-25:28" + }, + { + "token": "RBRACE", + "loc": "26:3-26:4" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "26:4-26:4" + }, + { + "token": "NEWLINE", + "loc": "26:4-26:5" + }, + { + "token": [ + "LIDENT", + "println" + ], + "loc": "27:3-27:10" + }, + { + "token": "LPAREN", + "loc": "27:10-27:11" + }, + { + "token": [ + "LIDENT", + "mut_payload_keeps_identity" + ], + "loc": "27:11-27:37" + }, + { + "token": "LPAREN", + "loc": "27:37-27:38" + }, + { + "token": "RPAREN", + "loc": "27:38-27:39" + }, + { + "token": "RPAREN", + "loc": "27:39-27:40" + }, + { + "token": "NEWLINE", + "loc": "27:40-27:41" + }, + { + "token": "RBRACE", + "loc": "28:1-28:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "28:2-28:2" + }, + { + "token": "NEWLINE", + "loc": "28:2-28:3" + }, + { + "token": "EOF", + "loc": "29:1-29:1" + } +] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/pipeline_test_contify_handle_error.json b/test/sync_test/__snapshot__/pipeline_test_contify_handle_error.json index 79d4a2de..d2e694c4 100644 --- a/test/sync_test/__snapshot__/pipeline_test_contify_handle_error.json +++ b/test/sync_test/__snapshot__/pipeline_test_contify_handle_error.json @@ -1830,71 +1830,137 @@ "loc": null, "children": { "value": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", - "loc": null, - "children": { - "value": "l" - } - } + "value": "to_result" } } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", "loc": null, - "children": [ - { - "kind": "Argument", + "children": { + "value": { + "kind": "Expr::Function", "loc": null, "children": { - "value": { - "kind": "Expr::Constant", + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "constant": { - "kind": "Constant::Int", + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Apply", "loc": null, "children": { - "value": "42" + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "l" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "42" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } } - } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } - ] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} + } } - } + ] }, - "kind": { - "kind": "TryOperatorKind::Question", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -1948,71 +2014,137 @@ "loc": null, "children": { "value": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", - "loc": null, - "children": { - "value": "l" - } - } + "value": "to_result" } } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", "loc": null, - "children": [ - { - "kind": "Argument", + "children": { + "value": { + "kind": "Expr::Function", "loc": null, "children": { - "value": { - "kind": "Expr::Constant", + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "constant": { - "kind": "Constant::Int", + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Apply", "loc": null, "children": { - "value": "0" + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "l" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "0" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } } - } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } - ] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} + } } - } + ] }, - "kind": { - "kind": "TryOperatorKind::Question", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -2066,71 +2198,137 @@ "loc": null, "children": { "value": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", - "loc": null, - "children": { - "value": "c" - } - } + "value": "to_result" } } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", "loc": null, - "children": [ - { - "kind": "Argument", + "children": { + "value": { + "kind": "Expr::Function", "loc": null, "children": { - "value": { - "kind": "Expr::Constant", + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "constant": { - "kind": "Constant::Int", + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Apply", "loc": null, "children": { - "value": "42" + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "c" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "42" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } } - } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } - ] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} + } } - } + ] }, - "kind": { - "kind": "TryOperatorKind::Question", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -2186,71 +2384,137 @@ "loc": null, "children": { "value": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", - "loc": null, - "children": { - "value": "c" - } - } + "value": "to_result" } } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", "loc": null, - "children": [ - { - "kind": "Argument", + "children": { + "value": { + "kind": "Expr::Function", "loc": null, "children": { - "value": { - "kind": "Expr::Constant", + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "constant": { - "kind": "Constant::Int", + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Apply", "loc": null, "children": { - "value": "0" + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "c" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "0" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } } - } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } - ] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} + } } - } + ] }, - "kind": { - "kind": "TryOperatorKind::Question", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -2277,5 +2541,524 @@ } } } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "to_result" + } + }, + "has_error": null, + "is_async": null, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "f" + } + }, + "ty": { + "kind": "Type::Arrow", + "loc": null, + "children": { + "args": { + "kind": "Type::Arrow::ArgList", + "loc": null, + "children": [] + }, + "res": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "T" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "err": { + "kind": "ErrorType::ErrorType", + "loc": null, + "children": { + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "E" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + "is_async": null + } + } + } + } + ] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [ + { + "kind": "TypeVarBinder", + "loc": null, + "children": { + "name": "T", + "constraints": { + "kind": "TypeVarBinder::TypeVarConstraintList", + "loc": null, + "children": [] + } + } + }, + { + "kind": "TypeVarBinder", + "loc": null, + "children": { + "name": "E", + "constraints": { + "kind": "TypeVarBinder::TypeVarConstraintList", + "loc": null, + "children": [ + { + "kind": "TypeVarConstraint", + "loc": null, + "children": { + "trait": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Error" + } + } + } + } + ] + } + } + } + ] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [ + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "T" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "E" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + ] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::Try", + "loc": null, + "children": { + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "f" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "catch": { + "kind": "Expr::Try::CaseList", + "loc": null, + "children": [ + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "err" + } + } + } + }, + "guard": null, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Err" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::TypeName", + "loc": null, + "children": { + "value": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + }, + "is_object": false + } + } + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "err" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + ] + }, + "catch_all": false, + "try_else": { + "kind": "Expr::Try::CaseList", + "loc": null, + "children": [ + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "value" + } + } + } + }, + "guard": null, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Ok" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::TypeName", + "loc": null, + "children": { + "value": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + }, + "is_object": false + } + } + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "value" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + ] + }, + "has_try": true + } + } + } + } + } } ] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/pipeline_test_contify_handle_error.mbt b/test/sync_test/__snapshot__/pipeline_test_contify_handle_error.mbt index 39c1c9c0..ca0da32a 100644 --- a/test/sync_test/__snapshot__/pipeline_test_contify_handle_error.mbt +++ b/test/sync_test/__snapshot__/pipeline_test_contify_handle_error.mbt @@ -44,8 +44,17 @@ fn c(x : Int) -> Int raise { ///| fn main { - debug(try? l(42)) - debug(try? l(0)) - debug(try? c(42)) - debug(try? c(0)) + debug(to_result(() => l(42))) + debug(to_result(() => l(0))) + debug(to_result(() => c(42))) + debug(to_result(() => c(0))) +} + +fn[T, E : Error] to_result(f : () -> T raise E) -> Result[T, E] { + try f() + catch { + err => Result::Err(err) + } noraise { + value => Result::Ok(value) + } } diff --git a/test/sync_test/__snapshot__/pipeline_test_contify_handle_error.mbt.tokens.json b/test/sync_test/__snapshot__/pipeline_test_contify_handle_error.mbt.tokens.json index 2ddff47a..92ef8e8a 100644 --- a/test/sync_test/__snapshot__/pipeline_test_contify_handle_error.mbt.tokens.json +++ b/test/sync_test/__snapshot__/pipeline_test_contify_handle_error.mbt.tokens.json @@ -1160,45 +1160,68 @@ "loc": "47:8-47:9" }, { - "token": "TRY_QUESTION", - "loc": "47:9-47:13" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "47:9-47:18" + }, + { + "token": "LPAREN", + "loc": "47:18-47:19" + }, + { + "token": "LPAREN", + "loc": "47:19-47:20" + }, + { + "token": "RPAREN", + "loc": "47:20-47:21" + }, + { + "token": "FAT_ARROW", + "loc": "47:22-47:24" }, { "token": [ "LIDENT", "l" ], - "loc": "47:14-47:15" + "loc": "47:25-47:26" }, { "token": "LPAREN", - "loc": "47:15-47:16" + "loc": "47:26-47:27" }, { "token": [ "INT", "42" ], - "loc": "47:16-47:18" + "loc": "47:27-47:29" }, { "token": "RPAREN", - "loc": "47:18-47:19" + "loc": "47:29-47:30" }, { "token": "RPAREN", - "loc": "47:19-47:20" + "loc": "47:30-47:31" + }, + { + "token": "RPAREN", + "loc": "47:31-47:32" }, { "token": [ "SEMI", false ], - "loc": "47:20-47:20" + "loc": "47:32-47:32" }, { "token": "NEWLINE", - "loc": "47:20-47:21" + "loc": "47:32-47:33" }, { "token": [ @@ -1212,45 +1235,68 @@ "loc": "48:8-48:9" }, { - "token": "TRY_QUESTION", - "loc": "48:9-48:13" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "48:9-48:18" + }, + { + "token": "LPAREN", + "loc": "48:18-48:19" + }, + { + "token": "LPAREN", + "loc": "48:19-48:20" + }, + { + "token": "RPAREN", + "loc": "48:20-48:21" + }, + { + "token": "FAT_ARROW", + "loc": "48:22-48:24" }, { "token": [ "LIDENT", "l" ], - "loc": "48:14-48:15" + "loc": "48:25-48:26" }, { "token": "LPAREN", - "loc": "48:15-48:16" + "loc": "48:26-48:27" }, { "token": [ "INT", "0" ], - "loc": "48:16-48:17" + "loc": "48:27-48:28" }, { "token": "RPAREN", - "loc": "48:17-48:18" + "loc": "48:28-48:29" }, { "token": "RPAREN", - "loc": "48:18-48:19" + "loc": "48:29-48:30" + }, + { + "token": "RPAREN", + "loc": "48:30-48:31" }, { "token": [ "SEMI", false ], - "loc": "48:19-48:19" + "loc": "48:31-48:31" }, { "token": "NEWLINE", - "loc": "48:19-48:20" + "loc": "48:31-48:32" }, { "token": [ @@ -1264,45 +1310,68 @@ "loc": "49:8-49:9" }, { - "token": "TRY_QUESTION", - "loc": "49:9-49:13" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "49:9-49:18" + }, + { + "token": "LPAREN", + "loc": "49:18-49:19" + }, + { + "token": "LPAREN", + "loc": "49:19-49:20" + }, + { + "token": "RPAREN", + "loc": "49:20-49:21" + }, + { + "token": "FAT_ARROW", + "loc": "49:22-49:24" }, { "token": [ "LIDENT", "c" ], - "loc": "49:14-49:15" + "loc": "49:25-49:26" }, { "token": "LPAREN", - "loc": "49:15-49:16" + "loc": "49:26-49:27" }, { "token": [ "INT", "42" ], - "loc": "49:16-49:18" + "loc": "49:27-49:29" }, { "token": "RPAREN", - "loc": "49:18-49:19" + "loc": "49:29-49:30" }, { "token": "RPAREN", - "loc": "49:19-49:20" + "loc": "49:30-49:31" + }, + { + "token": "RPAREN", + "loc": "49:31-49:32" }, { "token": [ "SEMI", false ], - "loc": "49:20-49:20" + "loc": "49:32-49:32" }, { "token": "NEWLINE", - "loc": "49:20-49:21" + "loc": "49:32-49:33" }, { "token": [ @@ -1316,38 +1385,61 @@ "loc": "50:8-50:9" }, { - "token": "TRY_QUESTION", - "loc": "50:9-50:13" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "50:9-50:18" + }, + { + "token": "LPAREN", + "loc": "50:18-50:19" + }, + { + "token": "LPAREN", + "loc": "50:19-50:20" + }, + { + "token": "RPAREN", + "loc": "50:20-50:21" + }, + { + "token": "FAT_ARROW", + "loc": "50:22-50:24" }, { "token": [ "LIDENT", "c" ], - "loc": "50:14-50:15" + "loc": "50:25-50:26" }, { "token": "LPAREN", - "loc": "50:15-50:16" + "loc": "50:26-50:27" }, { "token": [ "INT", "0" ], - "loc": "50:16-50:17" + "loc": "50:27-50:28" }, { "token": "RPAREN", - "loc": "50:17-50:18" + "loc": "50:28-50:29" }, { "token": "RPAREN", - "loc": "50:18-50:19" + "loc": "50:29-50:30" + }, + { + "token": "RPAREN", + "loc": "50:30-50:31" }, { "token": "NEWLINE", - "loc": "50:19-50:20" + "loc": "50:31-50:32" }, { "token": "RBRACE", @@ -1364,8 +1456,324 @@ "token": "NEWLINE", "loc": "51:2-51:3" }, + { + "token": "NEWLINE", + "loc": "52:1-52:2" + }, + { + "token": "FN", + "loc": "53:1-53:3" + }, + { + "token": "LBRACKET", + "loc": "53:3-53:4" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "53:4-53:5" + }, + { + "token": "COMMA", + "loc": "53:5-53:6" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "53:7-53:8" + }, + { + "token": "COLON", + "loc": "53:9-53:10" + }, + { + "token": [ + "UIDENT", + "Error" + ], + "loc": "53:11-53:16" + }, + { + "token": "RBRACKET", + "loc": "53:16-53:17" + }, + { + "token": [ + "LIDENT", + "to_result" + ], + "loc": "53:18-53:27" + }, + { + "token": "LPAREN", + "loc": "53:27-53:28" + }, + { + "token": [ + "LIDENT", + "f" + ], + "loc": "53:28-53:29" + }, + { + "token": "COLON", + "loc": "53:30-53:31" + }, + { + "token": "LPAREN", + "loc": "53:32-53:33" + }, + { + "token": "RPAREN", + "loc": "53:33-53:34" + }, + { + "token": "THIN_ARROW", + "loc": "53:35-53:37" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "53:38-53:39" + }, + { + "token": "RAISE", + "loc": "53:40-53:45" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "53:46-53:47" + }, + { + "token": "RPAREN", + "loc": "53:47-53:48" + }, + { + "token": "THIN_ARROW", + "loc": "53:49-53:51" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "53:52-53:58" + }, + { + "token": "LBRACKET", + "loc": "53:58-53:59" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "53:59-53:60" + }, + { + "token": "COMMA", + "loc": "53:60-53:61" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "53:62-53:63" + }, + { + "token": "RBRACKET", + "loc": "53:63-53:64" + }, + { + "token": "LBRACE", + "loc": "53:65-53:66" + }, + { + "token": "NEWLINE", + "loc": "53:66-53:67" + }, + { + "token": "TRY", + "loc": "54:3-54:6" + }, + { + "token": [ + "LIDENT", + "f" + ], + "loc": "54:7-54:8" + }, + { + "token": "LPAREN", + "loc": "54:8-54:9" + }, + { + "token": "RPAREN", + "loc": "54:9-54:10" + }, + { + "token": "NEWLINE", + "loc": "54:10-54:11" + }, + { + "token": "CATCH", + "loc": "55:3-55:8" + }, + { + "token": "LBRACE", + "loc": "55:9-55:10" + }, + { + "token": "NEWLINE", + "loc": "55:10-55:11" + }, + { + "token": [ + "LIDENT", + "err" + ], + "loc": "56:5-56:8" + }, + { + "token": "FAT_ARROW", + "loc": "56:9-56:11" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "56:12-56:18" + }, + { + "token": "COLONCOLON", + "loc": "56:18-56:20" + }, + { + "token": [ + "UIDENT", + "Err" + ], + "loc": "56:20-56:23" + }, + { + "token": "LPAREN", + "loc": "56:23-56:24" + }, + { + "token": [ + "LIDENT", + "err" + ], + "loc": "56:24-56:27" + }, + { + "token": "RPAREN", + "loc": "56:27-56:28" + }, + { + "token": "NEWLINE", + "loc": "56:28-56:29" + }, + { + "token": "RBRACE", + "loc": "57:3-57:4" + }, + { + "token": "NORAISE", + "loc": "57:5-57:12" + }, + { + "token": "LBRACE", + "loc": "57:13-57:14" + }, + { + "token": "NEWLINE", + "loc": "57:14-57:15" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "58:5-58:10" + }, + { + "token": "FAT_ARROW", + "loc": "58:11-58:13" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "58:14-58:20" + }, + { + "token": "COLONCOLON", + "loc": "58:20-58:22" + }, + { + "token": [ + "UIDENT", + "Ok" + ], + "loc": "58:22-58:24" + }, + { + "token": "LPAREN", + "loc": "58:24-58:25" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "58:25-58:30" + }, + { + "token": "RPAREN", + "loc": "58:30-58:31" + }, + { + "token": "NEWLINE", + "loc": "58:31-58:32" + }, + { + "token": "RBRACE", + "loc": "59:3-59:4" + }, + { + "token": "NEWLINE", + "loc": "59:4-59:5" + }, + { + "token": "RBRACE", + "loc": "60:1-60:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "60:2-60:2" + }, + { + "token": "NEWLINE", + "loc": "60:2-60:3" + }, { "token": "EOF", - "loc": "52:1-52:1" + "loc": "61:1-61:1" } ] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/pipeline_test_contify_local_error_raising.json b/test/sync_test/__snapshot__/pipeline_test_contify_local_error_raising.json index 117acf6b..d88bd01b 100644 --- a/test/sync_test/__snapshot__/pipeline_test_contify_local_error_raising.json +++ b/test/sync_test/__snapshot__/pipeline_test_contify_local_error_raising.json @@ -340,18 +340,37 @@ "loc": null, "children": { "value": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Group", + "id": { + "kind": "Var", "loc": null, "children": { - "expr": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "to_result" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { "kind": "Expr::Function", "loc": null, "children": { @@ -362,97 +381,179 @@ "parameters": { "kind": "Func::Lambda::ParameterList", "loc": null, - "children": [ - { - "kind": "Parameter::Positional", - "loc": null, - "children": { - "binder": { - "kind": "Binder", - "loc": null, - "children": { - "name": "x" - } - }, - "ty": null - } - } - ] + "children": [] }, "body": { - "kind": "Expr::Raise", + "kind": "Expr::Apply", "loc": null, "children": { - "err_value": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Group", "loc": null, "children": { - "func": { - "kind": "Expr::Constr", + "expr": { + "kind": "Expr::Function", "loc": null, "children": { - "constr": { - "kind": "Constructor", + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "name": { - "kind": "ConstrName", + "parameters": { + "kind": "Func::Lambda::ParameterList", "loc": null, - "children": { - "name": "MyErr" - } + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "x" + } + }, + "ty": null + } + } + ] }, - "extra_info": { - "kind": "ConstructorExtraInfo::NoExtraInfo", - "loc": null, - "children": {} - } - } - } - } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", - "loc": null, - "children": [ - { - "kind": "Argument", - "loc": null, - "children": { - "value": { - "kind": "Expr::Ident", + "body": { + "kind": "Expr::Raise", "loc": null, "children": { - "id": { - "kind": "Var", + "err_value": { + "kind": "Expr::Apply", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", + "func": { + "kind": "Expr::Constr", "loc": null, "children": { - "value": "x" + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "MyErr" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::NoExtraInfo", + "loc": null, + "children": {} + } + } + } } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "x" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} } } } } }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, "kind": { - "kind": "ArgumentKind::Positional", + "kind": "FnKind::Arrow", "loc": null, "children": {} - } + }, + "has_error": null, + "is_async": null } } - ] + } }, - "attr": { - "kind": "ApplyAttr::NoAttr", + "group": { + "kind": "Group::Paren", "loc": null, "children": {} } } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "msg" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} } } }, @@ -473,71 +574,555 @@ } } }, - "group": { - "kind": "Group::Paren", + "kind": { + "kind": "ArgumentKind::Positional", "loc": null, "children": {} } } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "to_result" + } + }, + "has_error": null, + "is_async": null, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "f" + } + }, + "ty": { + "kind": "Type::Arrow", + "loc": null, + "children": { + "args": { + "kind": "Type::Arrow::ArgList", + "loc": null, + "children": [] + }, + "res": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "T" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "err": { + "kind": "ErrorType::ErrorType", + "loc": null, + "children": { + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "E" + } + } + } }, - "args": { - "kind": "Expr::Apply::ArgumentList", + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + "is_async": null + } + } + } + } + ] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [ + { + "kind": "TypeVarBinder", + "loc": null, + "children": { + "name": "T", + "constraints": { + "kind": "TypeVarBinder::TypeVarConstraintList", + "loc": null, + "children": [] + } + } + }, + { + "kind": "TypeVarBinder", + "loc": null, + "children": { + "name": "E", + "constraints": { + "kind": "TypeVarBinder::TypeVarConstraintList", + "loc": null, + "children": [ + { + "kind": "TypeVarConstraint", + "loc": null, + "children": { + "trait": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Error" + } + } + } + } + ] + } + } + } + ] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [ + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "T" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "E" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + ] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::Try", + "loc": null, + "children": { + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "f" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "catch": { + "kind": "Expr::Try::CaseList", + "loc": null, + "children": [ + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "err" + } + } + } + }, + "guard": null, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", "loc": null, - "children": [ - { - "kind": "Argument", + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Err" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::TypeName", "loc": null, "children": { "value": { - "kind": "Expr::Constant", + "kind": "TypeName", "loc": null, "children": { - "constant": { - "kind": "Constant::String", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "value": "msg" + "value": "Result" } - } + }, + "is_object": false } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} } } } - ] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} + } } } }, - "kind": { - "kind": "TryOperatorKind::Question", + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "err" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } } + } + } + } + ] + }, + "catch_all": false, + "try_else": { + "kind": "Expr::Try::CaseList", + "loc": null, + "children": [ + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "value" + } + } + } }, - "kind": { - "kind": "ArgumentKind::Positional", + "guard": null, + "body": { + "kind": "Expr::Apply", "loc": null, - "children": {} + "children": { + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Ok" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::TypeName", + "loc": null, + "children": { + "value": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + }, + "is_object": false + } + } + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "value" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } } } } ] }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} - } + "has_try": true } } } diff --git a/test/sync_test/__snapshot__/pipeline_test_contify_local_error_raising.mbt b/test/sync_test/__snapshot__/pipeline_test_contify_local_error_raising.mbt index 4233beae..f6ce3222 100644 --- a/test/sync_test/__snapshot__/pipeline_test_contify_local_error_raising.mbt +++ b/test/sync_test/__snapshot__/pipeline_test_contify_local_error_raising.mbt @@ -10,5 +10,14 @@ suberror MyErr { ///| fn pipe_failed() -> Unit { - debug(try? (x => raise MyErr(x))("msg")) + debug(to_result(() => (x => raise MyErr(x))("msg"))) +} + +fn[T, E : Error] to_result(f : () -> T raise E) -> Result[T, E] { + try f() + catch { + err => Result::Err(err) + } noraise { + value => Result::Ok(value) + } } diff --git a/test/sync_test/__snapshot__/pipeline_test_contify_local_error_raising.mbt.tokens.json b/test/sync_test/__snapshot__/pipeline_test_contify_local_error_raising.mbt.tokens.json index 74c6d49e..edad23ce 100644 --- a/test/sync_test/__snapshot__/pipeline_test_contify_local_error_raising.mbt.tokens.json +++ b/test/sync_test/__snapshot__/pipeline_test_contify_local_error_raising.mbt.tokens.json @@ -252,76 +252,99 @@ "loc": "13:8-13:9" }, { - "token": "TRY_QUESTION", - "loc": "13:9-13:13" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "13:9-13:18" + }, + { + "token": "LPAREN", + "loc": "13:18-13:19" + }, + { + "token": "LPAREN", + "loc": "13:19-13:20" + }, + { + "token": "RPAREN", + "loc": "13:20-13:21" + }, + { + "token": "FAT_ARROW", + "loc": "13:22-13:24" }, { "token": "LPAREN", - "loc": "13:14-13:15" + "loc": "13:25-13:26" }, { "token": [ "LIDENT", "x" ], - "loc": "13:15-13:16" + "loc": "13:26-13:27" }, { "token": "FAT_ARROW", - "loc": "13:17-13:19" + "loc": "13:28-13:30" }, { "token": "RAISE", - "loc": "13:20-13:25" + "loc": "13:31-13:36" }, { "token": [ "UIDENT", "MyErr" ], - "loc": "13:26-13:31" + "loc": "13:37-13:42" }, { "token": "LPAREN", - "loc": "13:31-13:32" + "loc": "13:42-13:43" }, { "token": [ "LIDENT", "x" ], - "loc": "13:32-13:33" + "loc": "13:43-13:44" }, { "token": "RPAREN", - "loc": "13:33-13:34" + "loc": "13:44-13:45" }, { "token": "RPAREN", - "loc": "13:34-13:35" + "loc": "13:45-13:46" }, { "token": "LPAREN", - "loc": "13:35-13:36" + "loc": "13:46-13:47" }, { "token": [ "STRING", "msg" ], - "loc": "13:36-13:41" + "loc": "13:47-13:52" }, { "token": "RPAREN", - "loc": "13:41-13:42" + "loc": "13:52-13:53" }, { "token": "RPAREN", - "loc": "13:42-13:43" + "loc": "13:53-13:54" + }, + { + "token": "RPAREN", + "loc": "13:54-13:55" }, { "token": "NEWLINE", - "loc": "13:43-13:44" + "loc": "13:55-13:56" }, { "token": "RBRACE", @@ -338,8 +361,324 @@ "token": "NEWLINE", "loc": "14:2-14:3" }, + { + "token": "NEWLINE", + "loc": "15:1-15:2" + }, + { + "token": "FN", + "loc": "16:1-16:3" + }, + { + "token": "LBRACKET", + "loc": "16:3-16:4" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "16:4-16:5" + }, + { + "token": "COMMA", + "loc": "16:5-16:6" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "16:7-16:8" + }, + { + "token": "COLON", + "loc": "16:9-16:10" + }, + { + "token": [ + "UIDENT", + "Error" + ], + "loc": "16:11-16:16" + }, + { + "token": "RBRACKET", + "loc": "16:16-16:17" + }, + { + "token": [ + "LIDENT", + "to_result" + ], + "loc": "16:18-16:27" + }, + { + "token": "LPAREN", + "loc": "16:27-16:28" + }, + { + "token": [ + "LIDENT", + "f" + ], + "loc": "16:28-16:29" + }, + { + "token": "COLON", + "loc": "16:30-16:31" + }, + { + "token": "LPAREN", + "loc": "16:32-16:33" + }, + { + "token": "RPAREN", + "loc": "16:33-16:34" + }, + { + "token": "THIN_ARROW", + "loc": "16:35-16:37" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "16:38-16:39" + }, + { + "token": "RAISE", + "loc": "16:40-16:45" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "16:46-16:47" + }, + { + "token": "RPAREN", + "loc": "16:47-16:48" + }, + { + "token": "THIN_ARROW", + "loc": "16:49-16:51" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "16:52-16:58" + }, + { + "token": "LBRACKET", + "loc": "16:58-16:59" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "16:59-16:60" + }, + { + "token": "COMMA", + "loc": "16:60-16:61" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "16:62-16:63" + }, + { + "token": "RBRACKET", + "loc": "16:63-16:64" + }, + { + "token": "LBRACE", + "loc": "16:65-16:66" + }, + { + "token": "NEWLINE", + "loc": "16:66-16:67" + }, + { + "token": "TRY", + "loc": "17:3-17:6" + }, + { + "token": [ + "LIDENT", + "f" + ], + "loc": "17:7-17:8" + }, + { + "token": "LPAREN", + "loc": "17:8-17:9" + }, + { + "token": "RPAREN", + "loc": "17:9-17:10" + }, + { + "token": "NEWLINE", + "loc": "17:10-17:11" + }, + { + "token": "CATCH", + "loc": "18:3-18:8" + }, + { + "token": "LBRACE", + "loc": "18:9-18:10" + }, + { + "token": "NEWLINE", + "loc": "18:10-18:11" + }, + { + "token": [ + "LIDENT", + "err" + ], + "loc": "19:5-19:8" + }, + { + "token": "FAT_ARROW", + "loc": "19:9-19:11" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "19:12-19:18" + }, + { + "token": "COLONCOLON", + "loc": "19:18-19:20" + }, + { + "token": [ + "UIDENT", + "Err" + ], + "loc": "19:20-19:23" + }, + { + "token": "LPAREN", + "loc": "19:23-19:24" + }, + { + "token": [ + "LIDENT", + "err" + ], + "loc": "19:24-19:27" + }, + { + "token": "RPAREN", + "loc": "19:27-19:28" + }, + { + "token": "NEWLINE", + "loc": "19:28-19:29" + }, + { + "token": "RBRACE", + "loc": "20:3-20:4" + }, + { + "token": "NORAISE", + "loc": "20:5-20:12" + }, + { + "token": "LBRACE", + "loc": "20:13-20:14" + }, + { + "token": "NEWLINE", + "loc": "20:14-20:15" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "21:5-21:10" + }, + { + "token": "FAT_ARROW", + "loc": "21:11-21:13" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "21:14-21:20" + }, + { + "token": "COLONCOLON", + "loc": "21:20-21:22" + }, + { + "token": [ + "UIDENT", + "Ok" + ], + "loc": "21:22-21:24" + }, + { + "token": "LPAREN", + "loc": "21:24-21:25" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "21:25-21:30" + }, + { + "token": "RPAREN", + "loc": "21:30-21:31" + }, + { + "token": "NEWLINE", + "loc": "21:31-21:32" + }, + { + "token": "RBRACE", + "loc": "22:3-22:4" + }, + { + "token": "NEWLINE", + "loc": "22:4-22:5" + }, + { + "token": "RBRACE", + "loc": "23:1-23:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "23:2-23:2" + }, + { + "token": "NEWLINE", + "loc": "23:2-23:3" + }, { "token": "EOF", - "loc": "15:1-15:1" + "loc": "24:1-24:1" } ] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/pipeline_test_contify_return4.json b/test/sync_test/__snapshot__/pipeline_test_contify_return4.json index f7fc246b..521f4c78 100644 --- a/test/sync_test/__snapshot__/pipeline_test_contify_return4.json +++ b/test/sync_test/__snapshot__/pipeline_test_contify_return4.json @@ -435,71 +435,137 @@ "loc": null, "children": { "value": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", - "loc": null, - "children": { - "value": "f" - } - } + "value": "to_result" } } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", "loc": null, - "children": [ - { - "kind": "Argument", + "children": { + "value": { + "kind": "Expr::Function", "loc": null, "children": { - "value": { - "kind": "Expr::Constant", + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "constant": { - "kind": "Constant::Int", + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Apply", "loc": null, "children": { - "value": "0" + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "f" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "0" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } } - } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } - ] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} + } } - } + ] }, - "kind": { - "kind": "TryOperatorKind::Question", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -526,5 +592,524 @@ } } } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "to_result" + } + }, + "has_error": null, + "is_async": null, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "f" + } + }, + "ty": { + "kind": "Type::Arrow", + "loc": null, + "children": { + "args": { + "kind": "Type::Arrow::ArgList", + "loc": null, + "children": [] + }, + "res": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "T" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "err": { + "kind": "ErrorType::ErrorType", + "loc": null, + "children": { + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "E" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + "is_async": null + } + } + } + } + ] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [ + { + "kind": "TypeVarBinder", + "loc": null, + "children": { + "name": "T", + "constraints": { + "kind": "TypeVarBinder::TypeVarConstraintList", + "loc": null, + "children": [] + } + } + }, + { + "kind": "TypeVarBinder", + "loc": null, + "children": { + "name": "E", + "constraints": { + "kind": "TypeVarBinder::TypeVarConstraintList", + "loc": null, + "children": [ + { + "kind": "TypeVarConstraint", + "loc": null, + "children": { + "trait": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Error" + } + } + } + } + ] + } + } + } + ] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [ + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "T" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "E" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + ] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::Try", + "loc": null, + "children": { + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "f" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "catch": { + "kind": "Expr::Try::CaseList", + "loc": null, + "children": [ + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "err" + } + } + } + }, + "guard": null, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Err" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::TypeName", + "loc": null, + "children": { + "value": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + }, + "is_object": false + } + } + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "err" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + ] + }, + "catch_all": false, + "try_else": { + "kind": "Expr::Try::CaseList", + "loc": null, + "children": [ + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "value" + } + } + } + }, + "guard": null, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Ok" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::TypeName", + "loc": null, + "children": { + "value": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + }, + "is_object": false + } + } + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "value" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + ] + }, + "has_try": true + } + } + } + } + } } ] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/pipeline_test_contify_return4.mbt b/test/sync_test/__snapshot__/pipeline_test_contify_return4.mbt index 850d08d8..5e543251 100644 --- a/test/sync_test/__snapshot__/pipeline_test_contify_return4.mbt +++ b/test/sync_test/__snapshot__/pipeline_test_contify_return4.mbt @@ -3,5 +3,14 @@ fn main { if x < 0 { fail("negative") } else { return f(f(-1)) } 42 } - debug(try? f(0)) + debug(to_result(() => f(0))) +} + +fn[T, E : Error] to_result(f : () -> T raise E) -> Result[T, E] { + try f() + catch { + err => Result::Err(err) + } noraise { + value => Result::Ok(value) + } } diff --git a/test/sync_test/__snapshot__/pipeline_test_contify_return4.mbt.tokens.json b/test/sync_test/__snapshot__/pipeline_test_contify_return4.mbt.tokens.json index 30de8c2d..b86b8eb3 100644 --- a/test/sync_test/__snapshot__/pipeline_test_contify_return4.mbt.tokens.json +++ b/test/sync_test/__snapshot__/pipeline_test_contify_return4.mbt.tokens.json @@ -239,38 +239,61 @@ "loc": "6:8-6:9" }, { - "token": "TRY_QUESTION", - "loc": "6:9-6:13" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "6:9-6:18" + }, + { + "token": "LPAREN", + "loc": "6:18-6:19" + }, + { + "token": "LPAREN", + "loc": "6:19-6:20" + }, + { + "token": "RPAREN", + "loc": "6:20-6:21" + }, + { + "token": "FAT_ARROW", + "loc": "6:22-6:24" }, { "token": [ "LIDENT", "f" ], - "loc": "6:14-6:15" + "loc": "6:25-6:26" }, { "token": "LPAREN", - "loc": "6:15-6:16" + "loc": "6:26-6:27" }, { "token": [ "INT", "0" ], - "loc": "6:16-6:17" + "loc": "6:27-6:28" }, { "token": "RPAREN", - "loc": "6:17-6:18" + "loc": "6:28-6:29" }, { "token": "RPAREN", - "loc": "6:18-6:19" + "loc": "6:29-6:30" + }, + { + "token": "RPAREN", + "loc": "6:30-6:31" }, { "token": "NEWLINE", - "loc": "6:19-6:20" + "loc": "6:31-6:32" }, { "token": "RBRACE", @@ -287,8 +310,324 @@ "token": "NEWLINE", "loc": "7:2-7:3" }, + { + "token": "NEWLINE", + "loc": "8:1-8:2" + }, + { + "token": "FN", + "loc": "9:1-9:3" + }, + { + "token": "LBRACKET", + "loc": "9:3-9:4" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "9:4-9:5" + }, + { + "token": "COMMA", + "loc": "9:5-9:6" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "9:7-9:8" + }, + { + "token": "COLON", + "loc": "9:9-9:10" + }, + { + "token": [ + "UIDENT", + "Error" + ], + "loc": "9:11-9:16" + }, + { + "token": "RBRACKET", + "loc": "9:16-9:17" + }, + { + "token": [ + "LIDENT", + "to_result" + ], + "loc": "9:18-9:27" + }, + { + "token": "LPAREN", + "loc": "9:27-9:28" + }, + { + "token": [ + "LIDENT", + "f" + ], + "loc": "9:28-9:29" + }, + { + "token": "COLON", + "loc": "9:30-9:31" + }, + { + "token": "LPAREN", + "loc": "9:32-9:33" + }, + { + "token": "RPAREN", + "loc": "9:33-9:34" + }, + { + "token": "THIN_ARROW", + "loc": "9:35-9:37" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "9:38-9:39" + }, + { + "token": "RAISE", + "loc": "9:40-9:45" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "9:46-9:47" + }, + { + "token": "RPAREN", + "loc": "9:47-9:48" + }, + { + "token": "THIN_ARROW", + "loc": "9:49-9:51" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "9:52-9:58" + }, + { + "token": "LBRACKET", + "loc": "9:58-9:59" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "9:59-9:60" + }, + { + "token": "COMMA", + "loc": "9:60-9:61" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "9:62-9:63" + }, + { + "token": "RBRACKET", + "loc": "9:63-9:64" + }, + { + "token": "LBRACE", + "loc": "9:65-9:66" + }, + { + "token": "NEWLINE", + "loc": "9:66-9:67" + }, + { + "token": "TRY", + "loc": "10:3-10:6" + }, + { + "token": [ + "LIDENT", + "f" + ], + "loc": "10:7-10:8" + }, + { + "token": "LPAREN", + "loc": "10:8-10:9" + }, + { + "token": "RPAREN", + "loc": "10:9-10:10" + }, + { + "token": "NEWLINE", + "loc": "10:10-10:11" + }, + { + "token": "CATCH", + "loc": "11:3-11:8" + }, + { + "token": "LBRACE", + "loc": "11:9-11:10" + }, + { + "token": "NEWLINE", + "loc": "11:10-11:11" + }, + { + "token": [ + "LIDENT", + "err" + ], + "loc": "12:5-12:8" + }, + { + "token": "FAT_ARROW", + "loc": "12:9-12:11" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "12:12-12:18" + }, + { + "token": "COLONCOLON", + "loc": "12:18-12:20" + }, + { + "token": [ + "UIDENT", + "Err" + ], + "loc": "12:20-12:23" + }, + { + "token": "LPAREN", + "loc": "12:23-12:24" + }, + { + "token": [ + "LIDENT", + "err" + ], + "loc": "12:24-12:27" + }, + { + "token": "RPAREN", + "loc": "12:27-12:28" + }, + { + "token": "NEWLINE", + "loc": "12:28-12:29" + }, + { + "token": "RBRACE", + "loc": "13:3-13:4" + }, + { + "token": "NORAISE", + "loc": "13:5-13:12" + }, + { + "token": "LBRACE", + "loc": "13:13-13:14" + }, + { + "token": "NEWLINE", + "loc": "13:14-13:15" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "14:5-14:10" + }, + { + "token": "FAT_ARROW", + "loc": "14:11-14:13" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "14:14-14:20" + }, + { + "token": "COLONCOLON", + "loc": "14:20-14:22" + }, + { + "token": [ + "UIDENT", + "Ok" + ], + "loc": "14:22-14:24" + }, + { + "token": "LPAREN", + "loc": "14:24-14:25" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "14:25-14:30" + }, + { + "token": "RPAREN", + "loc": "14:30-14:31" + }, + { + "token": "NEWLINE", + "loc": "14:31-14:32" + }, + { + "token": "RBRACE", + "loc": "15:3-15:4" + }, + { + "token": "NEWLINE", + "loc": "15:4-15:5" + }, + { + "token": "RBRACE", + "loc": "16:1-16:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "16:2-16:2" + }, + { + "token": "NEWLINE", + "loc": "16:2-16:3" + }, { "token": "EOF", - "loc": "8:1-8:1" + "loc": "17:1-17:1" } ] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/pipeline_test_coroutine.json b/test/sync_test/__snapshot__/pipeline_test_coroutine.json index 8fb375a4..769f5958 100644 --- a/test/sync_test/__snapshot__/pipeline_test_coroutine.json +++ b/test/sync_test/__snapshot__/pipeline_test_coroutine.json @@ -757,7 +757,8 @@ "kind": "Expr::Array::ExprList", "loc": null, "children": [] - } + }, + "is_iter": false } }, "kind": { diff --git a/test/sync_test/__snapshot__/pipeline_test_coroutine_cancel.json b/test/sync_test/__snapshot__/pipeline_test_coroutine_cancel.json index 7f92bfcd..7d7a2972 100644 --- a/test/sync_test/__snapshot__/pipeline_test_coroutine_cancel.json +++ b/test/sync_test/__snapshot__/pipeline_test_coroutine_cancel.json @@ -1276,7 +1276,8 @@ "kind": "Expr::Array::ExprList", "loc": null, "children": [] - } + }, + "is_iter": false } }, "kind": { @@ -4670,54 +4671,120 @@ "loc": null, "children": { "value": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::DotApply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "self": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", + "value": "to_result" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Function", + "loc": null, + "children": { + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "value": "ctx" + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "ctx" + } + } + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "run_all" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null } } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } } - }, - "method_name": { - "kind": "Label", - "loc": null, - "children": { - "name": "run_all" - } - }, - "args": { - "kind": "Expr::DotApply::ArgList", - "loc": null, - "children": [] - }, - "return_self": false, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} } - } + ] }, - "kind": { - "kind": "TryOperatorKind::Question", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -4748,5 +4815,524 @@ } } } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "to_result" + } + }, + "has_error": null, + "is_async": null, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "f" + } + }, + "ty": { + "kind": "Type::Arrow", + "loc": null, + "children": { + "args": { + "kind": "Type::Arrow::ArgList", + "loc": null, + "children": [] + }, + "res": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "T" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "err": { + "kind": "ErrorType::ErrorType", + "loc": null, + "children": { + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "E" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + "is_async": null + } + } + } + } + ] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [ + { + "kind": "TypeVarBinder", + "loc": null, + "children": { + "name": "T", + "constraints": { + "kind": "TypeVarBinder::TypeVarConstraintList", + "loc": null, + "children": [] + } + } + }, + { + "kind": "TypeVarBinder", + "loc": null, + "children": { + "name": "E", + "constraints": { + "kind": "TypeVarBinder::TypeVarConstraintList", + "loc": null, + "children": [ + { + "kind": "TypeVarConstraint", + "loc": null, + "children": { + "trait": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Error" + } + } + } + } + ] + } + } + } + ] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [ + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "T" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "E" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + ] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::Try", + "loc": null, + "children": { + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "f" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "catch": { + "kind": "Expr::Try::CaseList", + "loc": null, + "children": [ + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "err" + } + } + } + }, + "guard": null, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Err" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::TypeName", + "loc": null, + "children": { + "value": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + }, + "is_object": false + } + } + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "err" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + ] + }, + "catch_all": false, + "try_else": { + "kind": "Expr::Try::CaseList", + "loc": null, + "children": [ + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "value" + } + } + } + }, + "guard": null, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Ok" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::TypeName", + "loc": null, + "children": { + "value": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + }, + "is_object": false + } + } + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "value" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + ] + }, + "has_try": true + } + } + } + } + } } ] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/pipeline_test_coroutine_cancel.mbt b/test/sync_test/__snapshot__/pipeline_test_coroutine_cancel.mbt index b02d5e18..331c0b5c 100644 --- a/test/sync_test/__snapshot__/pipeline_test_coroutine_cancel.mbt +++ b/test/sync_test/__snapshot__/pipeline_test_coroutine_cancel.mbt @@ -83,5 +83,14 @@ fn init { for _ in 0..<5 { ctx.spawn(worker) } - debug(try? ctx.run_all()) + debug(to_result(() => ctx.run_all())) +} + +fn[T, E : Error] to_result(f : () -> T raise E) -> Result[T, E] { + try f() + catch { + err => Result::Err(err) + } noraise { + value => Result::Ok(value) + } } diff --git a/test/sync_test/__snapshot__/pipeline_test_coroutine_cancel.mbt.tokens.json b/test/sync_test/__snapshot__/pipeline_test_coroutine_cancel.mbt.tokens.json index cc523756..00d57ea6 100644 --- a/test/sync_test/__snapshot__/pipeline_test_coroutine_cancel.mbt.tokens.json +++ b/test/sync_test/__snapshot__/pipeline_test_coroutine_cancel.mbt.tokens.json @@ -2709,38 +2709,61 @@ "loc": "86:8-86:9" }, { - "token": "TRY_QUESTION", - "loc": "86:9-86:13" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "86:9-86:18" + }, + { + "token": "LPAREN", + "loc": "86:18-86:19" + }, + { + "token": "LPAREN", + "loc": "86:19-86:20" + }, + { + "token": "RPAREN", + "loc": "86:20-86:21" + }, + { + "token": "FAT_ARROW", + "loc": "86:22-86:24" }, { "token": [ "LIDENT", "ctx" ], - "loc": "86:14-86:17" + "loc": "86:25-86:28" }, { "token": [ "DOT_LIDENT", "run_all" ], - "loc": "86:18-86:25" + "loc": "86:29-86:36" }, { "token": "LPAREN", - "loc": "86:25-86:26" + "loc": "86:36-86:37" }, { "token": "RPAREN", - "loc": "86:26-86:27" + "loc": "86:37-86:38" }, { "token": "RPAREN", - "loc": "86:27-86:28" + "loc": "86:38-86:39" + }, + { + "token": "RPAREN", + "loc": "86:39-86:40" }, { "token": "NEWLINE", - "loc": "86:28-86:29" + "loc": "86:40-86:41" }, { "token": "RBRACE", @@ -2757,8 +2780,324 @@ "token": "NEWLINE", "loc": "87:2-87:3" }, + { + "token": "NEWLINE", + "loc": "88:1-88:2" + }, + { + "token": "FN", + "loc": "89:1-89:3" + }, + { + "token": "LBRACKET", + "loc": "89:3-89:4" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "89:4-89:5" + }, + { + "token": "COMMA", + "loc": "89:5-89:6" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "89:7-89:8" + }, + { + "token": "COLON", + "loc": "89:9-89:10" + }, + { + "token": [ + "UIDENT", + "Error" + ], + "loc": "89:11-89:16" + }, + { + "token": "RBRACKET", + "loc": "89:16-89:17" + }, + { + "token": [ + "LIDENT", + "to_result" + ], + "loc": "89:18-89:27" + }, + { + "token": "LPAREN", + "loc": "89:27-89:28" + }, + { + "token": [ + "LIDENT", + "f" + ], + "loc": "89:28-89:29" + }, + { + "token": "COLON", + "loc": "89:30-89:31" + }, + { + "token": "LPAREN", + "loc": "89:32-89:33" + }, + { + "token": "RPAREN", + "loc": "89:33-89:34" + }, + { + "token": "THIN_ARROW", + "loc": "89:35-89:37" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "89:38-89:39" + }, + { + "token": "RAISE", + "loc": "89:40-89:45" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "89:46-89:47" + }, + { + "token": "RPAREN", + "loc": "89:47-89:48" + }, + { + "token": "THIN_ARROW", + "loc": "89:49-89:51" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "89:52-89:58" + }, + { + "token": "LBRACKET", + "loc": "89:58-89:59" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "89:59-89:60" + }, + { + "token": "COMMA", + "loc": "89:60-89:61" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "89:62-89:63" + }, + { + "token": "RBRACKET", + "loc": "89:63-89:64" + }, + { + "token": "LBRACE", + "loc": "89:65-89:66" + }, + { + "token": "NEWLINE", + "loc": "89:66-89:67" + }, + { + "token": "TRY", + "loc": "90:3-90:6" + }, + { + "token": [ + "LIDENT", + "f" + ], + "loc": "90:7-90:8" + }, + { + "token": "LPAREN", + "loc": "90:8-90:9" + }, + { + "token": "RPAREN", + "loc": "90:9-90:10" + }, + { + "token": "NEWLINE", + "loc": "90:10-90:11" + }, + { + "token": "CATCH", + "loc": "91:3-91:8" + }, + { + "token": "LBRACE", + "loc": "91:9-91:10" + }, + { + "token": "NEWLINE", + "loc": "91:10-91:11" + }, + { + "token": [ + "LIDENT", + "err" + ], + "loc": "92:5-92:8" + }, + { + "token": "FAT_ARROW", + "loc": "92:9-92:11" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "92:12-92:18" + }, + { + "token": "COLONCOLON", + "loc": "92:18-92:20" + }, + { + "token": [ + "UIDENT", + "Err" + ], + "loc": "92:20-92:23" + }, + { + "token": "LPAREN", + "loc": "92:23-92:24" + }, + { + "token": [ + "LIDENT", + "err" + ], + "loc": "92:24-92:27" + }, + { + "token": "RPAREN", + "loc": "92:27-92:28" + }, + { + "token": "NEWLINE", + "loc": "92:28-92:29" + }, + { + "token": "RBRACE", + "loc": "93:3-93:4" + }, + { + "token": "NORAISE", + "loc": "93:5-93:12" + }, + { + "token": "LBRACE", + "loc": "93:13-93:14" + }, + { + "token": "NEWLINE", + "loc": "93:14-93:15" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "94:5-94:10" + }, + { + "token": "FAT_ARROW", + "loc": "94:11-94:13" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "94:14-94:20" + }, + { + "token": "COLONCOLON", + "loc": "94:20-94:22" + }, + { + "token": [ + "UIDENT", + "Ok" + ], + "loc": "94:22-94:24" + }, + { + "token": "LPAREN", + "loc": "94:24-94:25" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "94:25-94:30" + }, + { + "token": "RPAREN", + "loc": "94:30-94:31" + }, + { + "token": "NEWLINE", + "loc": "94:31-94:32" + }, + { + "token": "RBRACE", + "loc": "95:3-95:4" + }, + { + "token": "NEWLINE", + "loc": "95:4-95:5" + }, + { + "token": "RBRACE", + "loc": "96:1-96:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "96:2-96:2" + }, + { + "token": "NEWLINE", + "loc": "96:2-96:3" + }, { "token": "EOF", - "loc": "88:1-88:1" + "loc": "97:1-97:1" } ] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/pipeline_test_count.json b/test/sync_test/__snapshot__/pipeline_test_count.json index a83ef906..bfffd3a2 100644 --- a/test/sync_test/__snapshot__/pipeline_test_count.json +++ b/test/sync_test/__snapshot__/pipeline_test_count.json @@ -884,7 +884,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { diff --git a/test/sync_test/__snapshot__/pipeline_test_curry_fn_test.json b/test/sync_test/__snapshot__/pipeline_test_curry_fn_test.json index a15d3fa2..a60044a2 100644 --- a/test/sync_test/__snapshot__/pipeline_test_curry_fn_test.json +++ b/test/sync_test/__snapshot__/pipeline_test_curry_fn_test.json @@ -456,7 +456,8 @@ } } ] - } + }, + "is_iter": false } }, { @@ -494,11 +495,13 @@ } } ] - } + }, + "is_iter": false } } ] - } + }, + "is_iter": false } }, "method_name": { diff --git a/test/sync_test/__snapshot__/pipeline_test_default_arg_effect.json b/test/sync_test/__snapshot__/pipeline_test_default_arg_effect.json index 796292d8..1c87a3c6 100644 --- a/test/sync_test/__snapshot__/pipeline_test_default_arg_effect.json +++ b/test/sync_test/__snapshot__/pipeline_test_default_arg_effect.json @@ -346,46 +346,112 @@ "loc": null, "children": { "value": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "to_result" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Function", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "value": "has_err" + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "has_err" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null } } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", - "loc": null, - "children": [] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} } - } + ] }, - "kind": { - "kind": "TryOperatorKind::Question", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -441,79 +507,145 @@ "loc": null, "children": { "value": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", - "loc": null, - "children": { - "value": "has_err" - } - } + "value": "to_result" } } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", "loc": null, - "children": [ - { - "kind": "Argument", + "children": { + "value": { + "kind": "Expr::Function", "loc": null, "children": { - "value": { - "kind": "Expr::Constant", + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "constant": { - "kind": "Constant::Int", + "parameters": { + "kind": "Func::Lambda::ParameterList", "loc": null, - "children": { - "value": "42" - } - } - } - }, - "kind": { - "kind": "ArgumentKind::Labelled", - "loc": null, - "children": { - "value": { - "kind": "Label", + "children": [] + }, + "body": { + "kind": "Expr::Apply", "loc": null, "children": { - "name": "default" + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "has_err" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "42" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Labelled", + "loc": null, + "children": { + "value": { + "kind": "Label", + "loc": null, + "children": { + "name": "default" + } + } + } + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } } - } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null } } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } - ] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} + } } - } + ] }, - "kind": { - "kind": "TryOperatorKind::Question", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -1621,46 +1753,116 @@ "loc": null, "children": { "value": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "to_result_async" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", "loc": null, "children": { - "id": { - "kind": "Var", + "value": { + "kind": "Expr::Function", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "value": "has_async" + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "has_async" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::DefaultErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Lambda", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": { + "kind": "Async", + "loc": null, + "children": {} + } } } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", - "loc": null, - "children": [] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} } - } + ] }, - "kind": { - "kind": "TryOperatorKind::Question", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -1862,79 +2064,149 @@ "loc": null, "children": { "value": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", - "loc": null, - "children": { - "value": "has_async" - } - } + "value": "to_result_async" } } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", "loc": null, - "children": [ - { - "kind": "Argument", + "children": { + "value": { + "kind": "Expr::Function", "loc": null, "children": { - "value": { - "kind": "Expr::Constant", + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "constant": { - "kind": "Constant::Int", + "parameters": { + "kind": "Func::Lambda::ParameterList", "loc": null, - "children": { - "value": "21" - } - } - } - }, - "kind": { - "kind": "ArgumentKind::Labelled", - "loc": null, - "children": { - "value": { - "kind": "Label", + "children": [] + }, + "body": { + "kind": "Expr::Apply", "loc": null, "children": { - "name": "default1" + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "has_async" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "21" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Labelled", + "loc": null, + "children": { + "value": { + "kind": "Label", + "loc": null, + "children": { + "name": "default1" + } + } + } + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::DefaultErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Lambda", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": { + "kind": "Async", + "loc": null, + "children": {} } } } } - } - ] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } } - } + ] }, - "kind": { - "kind": "TryOperatorKind::Question", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -2136,79 +2408,149 @@ "loc": null, "children": { "value": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", - "loc": null, - "children": { - "value": "has_async" - } - } + "value": "to_result_async" } } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", "loc": null, - "children": [ - { - "kind": "Argument", + "children": { + "value": { + "kind": "Expr::Function", "loc": null, "children": { - "value": { - "kind": "Expr::Constant", + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "constant": { - "kind": "Constant::Int", + "parameters": { + "kind": "Func::Lambda::ParameterList", "loc": null, - "children": { - "value": "42" - } - } - } - }, - "kind": { - "kind": "ArgumentKind::Labelled", - "loc": null, - "children": { - "value": { - "kind": "Label", + "children": [] + }, + "body": { + "kind": "Expr::Apply", "loc": null, "children": { - "name": "default2" + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "has_async" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "42" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Labelled", + "loc": null, + "children": { + "value": { + "kind": "Label", + "loc": null, + "children": { + "name": "default2" + } + } + } + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::DefaultErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Lambda", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": { + "kind": "Async", + "loc": null, + "children": {} } } } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } - ] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} + } } - } + ] }, - "kind": { - "kind": "TryOperatorKind::Question", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -2412,111 +2754,181 @@ "loc": null, "children": { "value": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", - "loc": null, - "children": { - "value": "has_async" - } - } + "value": "to_result_async" } } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", "loc": null, - "children": [ - { - "kind": "Argument", + "children": { + "value": { + "kind": "Expr::Function", "loc": null, "children": { - "value": { - "kind": "Expr::Constant", + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "constant": { - "kind": "Constant::Int", + "parameters": { + "kind": "Func::Lambda::ParameterList", "loc": null, - "children": { - "value": "6" - } - } - } - }, - "kind": { - "kind": "ArgumentKind::Labelled", - "loc": null, - "children": { - "value": { - "kind": "Label", + "children": [] + }, + "body": { + "kind": "Expr::Apply", "loc": null, "children": { - "name": "default1" + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "has_async" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "6" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Labelled", + "loc": null, + "children": { + "value": { + "kind": "Label", + "loc": null, + "children": { + "name": "default1" + } + } + } + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "7" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Labelled", + "loc": null, + "children": { + "value": { + "kind": "Label", + "loc": null, + "children": { + "name": "default2" + } + } + } + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } } - } - } - } - } - }, - { - "kind": "Argument", - "loc": null, - "children": { - "value": { - "kind": "Expr::Constant", - "loc": null, - "children": { - "constant": { - "kind": "Constant::Int", + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::DefaultErrorType", "loc": null, - "children": { - "value": "7" - } - } - } - }, - "kind": { - "kind": "ArgumentKind::Labelled", - "loc": null, - "children": { - "value": { - "kind": "Label", + "children": {} + }, + "kind": { + "kind": "FnKind::Lambda", "loc": null, - "children": { - "name": "default2" - } + "children": {} + }, + "has_error": null, + "is_async": { + "kind": "Async", + "loc": null, + "children": {} } } } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } - ] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} + } } - } + ] }, - "kind": { - "kind": "TryOperatorKind::Question", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -3033,5 +3445,1051 @@ } } } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "to_result" + } + }, + "has_error": null, + "is_async": null, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "f" + } + }, + "ty": { + "kind": "Type::Arrow", + "loc": null, + "children": { + "args": { + "kind": "Type::Arrow::ArgList", + "loc": null, + "children": [] + }, + "res": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "T" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "err": { + "kind": "ErrorType::ErrorType", + "loc": null, + "children": { + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "E" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + "is_async": null + } + } + } + } + ] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [ + { + "kind": "TypeVarBinder", + "loc": null, + "children": { + "name": "T", + "constraints": { + "kind": "TypeVarBinder::TypeVarConstraintList", + "loc": null, + "children": [] + } + } + }, + { + "kind": "TypeVarBinder", + "loc": null, + "children": { + "name": "E", + "constraints": { + "kind": "TypeVarBinder::TypeVarConstraintList", + "loc": null, + "children": [ + { + "kind": "TypeVarConstraint", + "loc": null, + "children": { + "trait": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Error" + } + } + } + } + ] + } + } + } + ] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [ + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "T" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "E" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + ] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::Try", + "loc": null, + "children": { + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "f" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "catch": { + "kind": "Expr::Try::CaseList", + "loc": null, + "children": [ + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "err" + } + } + } + }, + "guard": null, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Err" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::TypeName", + "loc": null, + "children": { + "value": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + }, + "is_object": false + } + } + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "err" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + ] + }, + "catch_all": false, + "try_else": { + "kind": "Expr::Try::CaseList", + "loc": null, + "children": [ + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "value" + } + } + } + }, + "guard": null, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Ok" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::TypeName", + "loc": null, + "children": { + "value": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + }, + "is_object": false + } + } + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "value" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + ] + }, + "has_try": true + } + } + } + } + } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "to_result_async" + } + }, + "has_error": null, + "is_async": { + "kind": "Async", + "loc": null, + "children": {} + }, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "f" + } + }, + "ty": { + "kind": "Type::Arrow", + "loc": null, + "children": { + "args": { + "kind": "Type::Arrow::ArgList", + "loc": null, + "children": [] + }, + "res": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "T" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "err": { + "kind": "ErrorType::ErrorType", + "loc": null, + "children": { + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "E" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + "is_async": { + "kind": "Async", + "loc": null, + "children": {} + } + } + } + } + } + ] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [ + { + "kind": "TypeVarBinder", + "loc": null, + "children": { + "name": "T", + "constraints": { + "kind": "TypeVarBinder::TypeVarConstraintList", + "loc": null, + "children": [] + } + } + }, + { + "kind": "TypeVarBinder", + "loc": null, + "children": { + "name": "E", + "constraints": { + "kind": "TypeVarBinder::TypeVarConstraintList", + "loc": null, + "children": [ + { + "kind": "TypeVarConstraint", + "loc": null, + "children": { + "trait": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Error" + } + } + } + } + ] + } + } + } + ] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [ + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "T" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "E" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + ] + } + } + }, + "error_type": { + "kind": "ErrorType::Noraise", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::Try", + "loc": null, + "children": { + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "f" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "catch": { + "kind": "Expr::Try::CaseList", + "loc": null, + "children": [ + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "err" + } + } + } + }, + "guard": null, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Err" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::TypeName", + "loc": null, + "children": { + "value": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + }, + "is_object": false + } + } + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "err" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + ] + }, + "catch_all": false, + "try_else": { + "kind": "Expr::Try::CaseList", + "loc": null, + "children": [ + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "value" + } + } + } + }, + "guard": null, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Ok" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::TypeName", + "loc": null, + "children": { + "value": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + }, + "is_object": false + } + } + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "value" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + ] + }, + "has_try": true + } + } + } + } + } } ] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/pipeline_test_default_arg_effect.mbt b/test/sync_test/__snapshot__/pipeline_test_default_arg_effect.mbt index 44b80132..c590bed3 100644 --- a/test/sync_test/__snapshot__/pipeline_test_default_arg_effect.mbt +++ b/test/sync_test/__snapshot__/pipeline_test_default_arg_effect.mbt @@ -8,8 +8,8 @@ fn has_err(default? : Int = { raise Err }) -> Int raise { ///| fn init { - debug(try? has_err()) - debug(try? has_err(default=42)) + debug(to_result(() => has_err())) + debug(to_result(() => has_err(default=42))) } ///| @@ -34,19 +34,19 @@ async fn has_async( fn init { println("====") run_async(() => { - debug(try? has_async()) + debug(to_result_async(async fn () raise { has_async() })) }) println("====") run_async(() => { - debug(try? has_async(default1=21)) + debug(to_result_async(async fn () raise { has_async(default1=21) })) }) println("====") run_async(() => { - debug(try? has_async(default2=42)) + debug(to_result_async(async fn () raise { has_async(default2=42) })) }) println("====") run_async(() => { - debug(try? has_async(default1=6, default2=7)) + debug(to_result_async(async fn () raise { has_async(default1=6, default2=7) })) }) } @@ -57,3 +57,23 @@ async fn[X] suspend( ///| fn run_async(f : async () -> Unit noraise) -> Unit = "%async.run" + +fn[T, E : Error] to_result(f : () -> T raise E) -> Result[T, E] { + try f() + catch { + err => Result::Err(err) + } noraise { + value => Result::Ok(value) + } +} + +async fn[T, E : Error] to_result_async( + f : async () -> T raise E +) -> Result[T, E] noraise { + try f() + catch { + err => Result::Err(err) + } noraise { + value => Result::Ok(value) + } +} diff --git a/test/sync_test/__snapshot__/pipeline_test_default_arg_effect.mbt.tokens.json b/test/sync_test/__snapshot__/pipeline_test_default_arg_effect.mbt.tokens.json index 5b0e25bb..b621f273 100644 --- a/test/sync_test/__snapshot__/pipeline_test_default_arg_effect.mbt.tokens.json +++ b/test/sync_test/__snapshot__/pipeline_test_default_arg_effect.mbt.tokens.json @@ -255,38 +255,61 @@ "loc": "11:8-11:9" }, { - "token": "TRY_QUESTION", - "loc": "11:9-11:13" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "11:9-11:18" + }, + { + "token": "LPAREN", + "loc": "11:18-11:19" + }, + { + "token": "LPAREN", + "loc": "11:19-11:20" + }, + { + "token": "RPAREN", + "loc": "11:20-11:21" + }, + { + "token": "FAT_ARROW", + "loc": "11:22-11:24" }, { "token": [ "LIDENT", "has_err" ], - "loc": "11:14-11:21" + "loc": "11:25-11:32" }, { "token": "LPAREN", - "loc": "11:21-11:22" + "loc": "11:32-11:33" + }, + { + "token": "RPAREN", + "loc": "11:33-11:34" }, { "token": "RPAREN", - "loc": "11:22-11:23" + "loc": "11:34-11:35" }, { "token": "RPAREN", - "loc": "11:23-11:24" + "loc": "11:35-11:36" }, { "token": [ "SEMI", false ], - "loc": "11:24-11:24" + "loc": "11:36-11:36" }, { "token": "NEWLINE", - "loc": "11:24-11:25" + "loc": "11:36-11:37" }, { "token": [ @@ -300,49 +323,72 @@ "loc": "12:8-12:9" }, { - "token": "TRY_QUESTION", - "loc": "12:9-12:13" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "12:9-12:18" + }, + { + "token": "LPAREN", + "loc": "12:18-12:19" + }, + { + "token": "LPAREN", + "loc": "12:19-12:20" + }, + { + "token": "RPAREN", + "loc": "12:20-12:21" + }, + { + "token": "FAT_ARROW", + "loc": "12:22-12:24" }, { "token": [ "LIDENT", "has_err" ], - "loc": "12:14-12:21" + "loc": "12:25-12:32" }, { "token": "LPAREN", - "loc": "12:21-12:22" + "loc": "12:32-12:33" }, { "token": [ "LIDENT", "default" ], - "loc": "12:22-12:29" + "loc": "12:33-12:40" }, { "token": "EQUAL", - "loc": "12:29-12:30" + "loc": "12:40-12:41" }, { "token": [ "INT", "42" ], - "loc": "12:30-12:32" + "loc": "12:41-12:43" }, { "token": "RPAREN", - "loc": "12:32-12:33" + "loc": "12:43-12:44" + }, + { + "token": "RPAREN", + "loc": "12:44-12:45" }, { "token": "RPAREN", - "loc": "12:33-12:34" + "loc": "12:45-12:46" }, { "token": "NEWLINE", - "loc": "12:34-12:35" + "loc": "12:46-12:47" }, { "token": "RBRACE", @@ -988,31 +1034,70 @@ "loc": "37:10-37:11" }, { - "token": "TRY_QUESTION", - "loc": "37:11-37:15" + "token": [ + "LIDENT", + "to_result_async" + ], + "loc": "37:11-37:26" + }, + { + "token": "LPAREN", + "loc": "37:26-37:27" + }, + { + "token": "ASYNC", + "loc": "37:27-37:32" + }, + { + "token": "FN", + "loc": "37:33-37:35" + }, + { + "token": "LPAREN", + "loc": "37:36-37:37" + }, + { + "token": "RPAREN", + "loc": "37:37-37:38" + }, + { + "token": "RAISE", + "loc": "37:39-37:44" + }, + { + "token": "LBRACE", + "loc": "37:45-37:46" }, { "token": [ "LIDENT", "has_async" ], - "loc": "37:16-37:25" + "loc": "37:47-37:56" }, { "token": "LPAREN", - "loc": "37:25-37:26" + "loc": "37:56-37:57" }, { "token": "RPAREN", - "loc": "37:26-37:27" + "loc": "37:57-37:58" + }, + { + "token": "RBRACE", + "loc": "37:59-37:60" + }, + { + "token": "RPAREN", + "loc": "37:60-37:61" }, { "token": "RPAREN", - "loc": "37:27-37:28" + "loc": "37:61-37:62" }, { "token": "NEWLINE", - "loc": "37:28-37:29" + "loc": "37:62-37:63" }, { "token": "RBRACE", @@ -1109,49 +1194,88 @@ "loc": "41:10-41:11" }, { - "token": "TRY_QUESTION", - "loc": "41:11-41:15" + "token": [ + "LIDENT", + "to_result_async" + ], + "loc": "41:11-41:26" + }, + { + "token": "LPAREN", + "loc": "41:26-41:27" + }, + { + "token": "ASYNC", + "loc": "41:27-41:32" + }, + { + "token": "FN", + "loc": "41:33-41:35" + }, + { + "token": "LPAREN", + "loc": "41:36-41:37" + }, + { + "token": "RPAREN", + "loc": "41:37-41:38" + }, + { + "token": "RAISE", + "loc": "41:39-41:44" + }, + { + "token": "LBRACE", + "loc": "41:45-41:46" }, { "token": [ "LIDENT", "has_async" ], - "loc": "41:16-41:25" + "loc": "41:47-41:56" }, { "token": "LPAREN", - "loc": "41:25-41:26" + "loc": "41:56-41:57" }, { "token": [ "LIDENT", "default1" ], - "loc": "41:26-41:34" + "loc": "41:57-41:65" }, { "token": "EQUAL", - "loc": "41:34-41:35" + "loc": "41:65-41:66" }, { "token": [ "INT", "21" ], - "loc": "41:35-41:37" + "loc": "41:66-41:68" }, { "token": "RPAREN", - "loc": "41:37-41:38" + "loc": "41:68-41:69" + }, + { + "token": "RBRACE", + "loc": "41:70-41:71" + }, + { + "token": "RPAREN", + "loc": "41:71-41:72" }, { "token": "RPAREN", - "loc": "41:38-41:39" + "loc": "41:72-41:73" }, { "token": "NEWLINE", - "loc": "41:39-41:40" + "loc": "41:73-41:74" }, { "token": "RBRACE", @@ -1248,49 +1372,88 @@ "loc": "45:10-45:11" }, { - "token": "TRY_QUESTION", - "loc": "45:11-45:15" + "token": [ + "LIDENT", + "to_result_async" + ], + "loc": "45:11-45:26" + }, + { + "token": "LPAREN", + "loc": "45:26-45:27" + }, + { + "token": "ASYNC", + "loc": "45:27-45:32" + }, + { + "token": "FN", + "loc": "45:33-45:35" + }, + { + "token": "LPAREN", + "loc": "45:36-45:37" + }, + { + "token": "RPAREN", + "loc": "45:37-45:38" + }, + { + "token": "RAISE", + "loc": "45:39-45:44" + }, + { + "token": "LBRACE", + "loc": "45:45-45:46" }, { "token": [ "LIDENT", "has_async" ], - "loc": "45:16-45:25" + "loc": "45:47-45:56" }, { "token": "LPAREN", - "loc": "45:25-45:26" + "loc": "45:56-45:57" }, { "token": [ "LIDENT", "default2" ], - "loc": "45:26-45:34" + "loc": "45:57-45:65" }, { "token": "EQUAL", - "loc": "45:34-45:35" + "loc": "45:65-45:66" }, { "token": [ "INT", "42" ], - "loc": "45:35-45:37" + "loc": "45:66-45:68" }, { "token": "RPAREN", - "loc": "45:37-45:38" + "loc": "45:68-45:69" + }, + { + "token": "RBRACE", + "loc": "45:70-45:71" + }, + { + "token": "RPAREN", + "loc": "45:71-45:72" }, { "token": "RPAREN", - "loc": "45:38-45:39" + "loc": "45:72-45:73" }, { "token": "NEWLINE", - "loc": "45:39-45:40" + "loc": "45:73-45:74" }, { "token": "RBRACE", @@ -1387,71 +1550,110 @@ "loc": "49:10-49:11" }, { - "token": "TRY_QUESTION", - "loc": "49:11-49:15" + "token": [ + "LIDENT", + "to_result_async" + ], + "loc": "49:11-49:26" + }, + { + "token": "LPAREN", + "loc": "49:26-49:27" + }, + { + "token": "ASYNC", + "loc": "49:27-49:32" + }, + { + "token": "FN", + "loc": "49:33-49:35" + }, + { + "token": "LPAREN", + "loc": "49:36-49:37" + }, + { + "token": "RPAREN", + "loc": "49:37-49:38" + }, + { + "token": "RAISE", + "loc": "49:39-49:44" + }, + { + "token": "LBRACE", + "loc": "49:45-49:46" }, { "token": [ "LIDENT", "has_async" ], - "loc": "49:16-49:25" + "loc": "49:47-49:56" }, { "token": "LPAREN", - "loc": "49:25-49:26" + "loc": "49:56-49:57" }, { "token": [ "LIDENT", "default1" ], - "loc": "49:26-49:34" + "loc": "49:57-49:65" }, { "token": "EQUAL", - "loc": "49:34-49:35" + "loc": "49:65-49:66" }, { "token": [ "INT", "6" ], - "loc": "49:35-49:36" + "loc": "49:66-49:67" }, { "token": "COMMA", - "loc": "49:36-49:37" + "loc": "49:67-49:68" }, { "token": [ "LIDENT", "default2" ], - "loc": "49:38-49:46" + "loc": "49:69-49:77" }, { "token": "EQUAL", - "loc": "49:46-49:47" + "loc": "49:77-49:78" }, { "token": [ "INT", "7" ], - "loc": "49:47-49:48" + "loc": "49:78-49:79" }, { "token": "RPAREN", - "loc": "49:48-49:49" + "loc": "49:79-49:80" + }, + { + "token": "RBRACE", + "loc": "49:81-49:82" + }, + { + "token": "RPAREN", + "loc": "49:82-49:83" }, { "token": "RPAREN", - "loc": "49:49-49:50" + "loc": "49:83-49:84" }, { "token": "NEWLINE", - "loc": "49:50-49:51" + "loc": "49:84-49:85" }, { "token": "RBRACE", @@ -1789,8 +1991,660 @@ "token": "NEWLINE", "loc": "59:66-59:67" }, + { + "token": "NEWLINE", + "loc": "60:1-60:2" + }, + { + "token": "FN", + "loc": "61:1-61:3" + }, + { + "token": "LBRACKET", + "loc": "61:3-61:4" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "61:4-61:5" + }, + { + "token": "COMMA", + "loc": "61:5-61:6" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "61:7-61:8" + }, + { + "token": "COLON", + "loc": "61:9-61:10" + }, + { + "token": [ + "UIDENT", + "Error" + ], + "loc": "61:11-61:16" + }, + { + "token": "RBRACKET", + "loc": "61:16-61:17" + }, + { + "token": [ + "LIDENT", + "to_result" + ], + "loc": "61:18-61:27" + }, + { + "token": "LPAREN", + "loc": "61:27-61:28" + }, + { + "token": [ + "LIDENT", + "f" + ], + "loc": "61:28-61:29" + }, + { + "token": "COLON", + "loc": "61:30-61:31" + }, + { + "token": "LPAREN", + "loc": "61:32-61:33" + }, + { + "token": "RPAREN", + "loc": "61:33-61:34" + }, + { + "token": "THIN_ARROW", + "loc": "61:35-61:37" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "61:38-61:39" + }, + { + "token": "RAISE", + "loc": "61:40-61:45" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "61:46-61:47" + }, + { + "token": "RPAREN", + "loc": "61:47-61:48" + }, + { + "token": "THIN_ARROW", + "loc": "61:49-61:51" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "61:52-61:58" + }, + { + "token": "LBRACKET", + "loc": "61:58-61:59" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "61:59-61:60" + }, + { + "token": "COMMA", + "loc": "61:60-61:61" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "61:62-61:63" + }, + { + "token": "RBRACKET", + "loc": "61:63-61:64" + }, + { + "token": "LBRACE", + "loc": "61:65-61:66" + }, + { + "token": "NEWLINE", + "loc": "61:66-61:67" + }, + { + "token": "TRY", + "loc": "62:3-62:6" + }, + { + "token": [ + "LIDENT", + "f" + ], + "loc": "62:7-62:8" + }, + { + "token": "LPAREN", + "loc": "62:8-62:9" + }, + { + "token": "RPAREN", + "loc": "62:9-62:10" + }, + { + "token": "NEWLINE", + "loc": "62:10-62:11" + }, + { + "token": "CATCH", + "loc": "63:3-63:8" + }, + { + "token": "LBRACE", + "loc": "63:9-63:10" + }, + { + "token": "NEWLINE", + "loc": "63:10-63:11" + }, + { + "token": [ + "LIDENT", + "err" + ], + "loc": "64:5-64:8" + }, + { + "token": "FAT_ARROW", + "loc": "64:9-64:11" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "64:12-64:18" + }, + { + "token": "COLONCOLON", + "loc": "64:18-64:20" + }, + { + "token": [ + "UIDENT", + "Err" + ], + "loc": "64:20-64:23" + }, + { + "token": "LPAREN", + "loc": "64:23-64:24" + }, + { + "token": [ + "LIDENT", + "err" + ], + "loc": "64:24-64:27" + }, + { + "token": "RPAREN", + "loc": "64:27-64:28" + }, + { + "token": "NEWLINE", + "loc": "64:28-64:29" + }, + { + "token": "RBRACE", + "loc": "65:3-65:4" + }, + { + "token": "NORAISE", + "loc": "65:5-65:12" + }, + { + "token": "LBRACE", + "loc": "65:13-65:14" + }, + { + "token": "NEWLINE", + "loc": "65:14-65:15" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "66:5-66:10" + }, + { + "token": "FAT_ARROW", + "loc": "66:11-66:13" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "66:14-66:20" + }, + { + "token": "COLONCOLON", + "loc": "66:20-66:22" + }, + { + "token": [ + "UIDENT", + "Ok" + ], + "loc": "66:22-66:24" + }, + { + "token": "LPAREN", + "loc": "66:24-66:25" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "66:25-66:30" + }, + { + "token": "RPAREN", + "loc": "66:30-66:31" + }, + { + "token": "NEWLINE", + "loc": "66:31-66:32" + }, + { + "token": "RBRACE", + "loc": "67:3-67:4" + }, + { + "token": "NEWLINE", + "loc": "67:4-67:5" + }, + { + "token": "RBRACE", + "loc": "68:1-68:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "68:2-68:2" + }, + { + "token": "NEWLINE", + "loc": "68:2-68:3" + }, + { + "token": "NEWLINE", + "loc": "69:1-69:2" + }, + { + "token": "ASYNC", + "loc": "70:1-70:6" + }, + { + "token": "FN", + "loc": "70:7-70:9" + }, + { + "token": "LBRACKET", + "loc": "70:9-70:10" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "70:10-70:11" + }, + { + "token": "COMMA", + "loc": "70:11-70:12" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "70:13-70:14" + }, + { + "token": "COLON", + "loc": "70:15-70:16" + }, + { + "token": [ + "UIDENT", + "Error" + ], + "loc": "70:17-70:22" + }, + { + "token": "RBRACKET", + "loc": "70:22-70:23" + }, + { + "token": [ + "LIDENT", + "to_result_async" + ], + "loc": "70:24-70:39" + }, + { + "token": "LPAREN", + "loc": "70:39-70:40" + }, + { + "token": "NEWLINE", + "loc": "70:40-70:41" + }, + { + "token": [ + "LIDENT", + "f" + ], + "loc": "71:3-71:4" + }, + { + "token": "COLON", + "loc": "71:5-71:6" + }, + { + "token": "ASYNC", + "loc": "71:7-71:12" + }, + { + "token": "LPAREN", + "loc": "71:13-71:14" + }, + { + "token": "RPAREN", + "loc": "71:14-71:15" + }, + { + "token": "THIN_ARROW", + "loc": "71:16-71:18" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "71:19-71:20" + }, + { + "token": "RAISE", + "loc": "71:21-71:26" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "71:27-71:28" + }, + { + "token": "NEWLINE", + "loc": "71:28-71:29" + }, + { + "token": "RPAREN", + "loc": "72:1-72:2" + }, + { + "token": "THIN_ARROW", + "loc": "72:3-72:5" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "72:6-72:12" + }, + { + "token": "LBRACKET", + "loc": "72:12-72:13" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "72:13-72:14" + }, + { + "token": "COMMA", + "loc": "72:14-72:15" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "72:16-72:17" + }, + { + "token": "RBRACKET", + "loc": "72:17-72:18" + }, + { + "token": "NORAISE", + "loc": "72:19-72:26" + }, + { + "token": "LBRACE", + "loc": "72:27-72:28" + }, + { + "token": "NEWLINE", + "loc": "72:28-72:29" + }, + { + "token": "TRY", + "loc": "73:3-73:6" + }, + { + "token": [ + "LIDENT", + "f" + ], + "loc": "73:7-73:8" + }, + { + "token": "LPAREN", + "loc": "73:8-73:9" + }, + { + "token": "RPAREN", + "loc": "73:9-73:10" + }, + { + "token": "NEWLINE", + "loc": "73:10-73:11" + }, + { + "token": "CATCH", + "loc": "74:3-74:8" + }, + { + "token": "LBRACE", + "loc": "74:9-74:10" + }, + { + "token": "NEWLINE", + "loc": "74:10-74:11" + }, + { + "token": [ + "LIDENT", + "err" + ], + "loc": "75:5-75:8" + }, + { + "token": "FAT_ARROW", + "loc": "75:9-75:11" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "75:12-75:18" + }, + { + "token": "COLONCOLON", + "loc": "75:18-75:20" + }, + { + "token": [ + "UIDENT", + "Err" + ], + "loc": "75:20-75:23" + }, + { + "token": "LPAREN", + "loc": "75:23-75:24" + }, + { + "token": [ + "LIDENT", + "err" + ], + "loc": "75:24-75:27" + }, + { + "token": "RPAREN", + "loc": "75:27-75:28" + }, + { + "token": "NEWLINE", + "loc": "75:28-75:29" + }, + { + "token": "RBRACE", + "loc": "76:3-76:4" + }, + { + "token": "NORAISE", + "loc": "76:5-76:12" + }, + { + "token": "LBRACE", + "loc": "76:13-76:14" + }, + { + "token": "NEWLINE", + "loc": "76:14-76:15" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "77:5-77:10" + }, + { + "token": "FAT_ARROW", + "loc": "77:11-77:13" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "77:14-77:20" + }, + { + "token": "COLONCOLON", + "loc": "77:20-77:22" + }, + { + "token": [ + "UIDENT", + "Ok" + ], + "loc": "77:22-77:24" + }, + { + "token": "LPAREN", + "loc": "77:24-77:25" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "77:25-77:30" + }, + { + "token": "RPAREN", + "loc": "77:30-77:31" + }, + { + "token": "NEWLINE", + "loc": "77:31-77:32" + }, + { + "token": "RBRACE", + "loc": "78:3-78:4" + }, + { + "token": "NEWLINE", + "loc": "78:4-78:5" + }, + { + "token": "RBRACE", + "loc": "79:1-79:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "79:2-79:2" + }, + { + "token": "NEWLINE", + "loc": "79:2-79:3" + }, { "token": "EOF", - "loc": "60:1-60:1" + "loc": "80:1-80:1" } ] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/pipeline_test_default_impl.json b/test/sync_test/__snapshot__/pipeline_test_default_impl.json index af62e762..c1bce80b 100644 --- a/test/sync_test/__snapshot__/pipeline_test_default_impl.json +++ b/test/sync_test/__snapshot__/pipeline_test_default_impl.json @@ -259,6 +259,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, @@ -439,6 +444,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, @@ -1097,6 +1107,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, diff --git a/test/sync_test/__snapshot__/pipeline_test_default_method.json b/test/sync_test/__snapshot__/pipeline_test_default_method.json index 6eea55c6..6271955a 100644 --- a/test/sync_test/__snapshot__/pipeline_test_default_method.json +++ b/test/sync_test/__snapshot__/pipeline_test_default_method.json @@ -259,6 +259,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, @@ -857,6 +862,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, @@ -1597,6 +1607,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, @@ -1808,6 +1823,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, @@ -2444,6 +2464,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, @@ -3042,6 +3067,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, @@ -3322,6 +3352,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, @@ -4564,6 +4599,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, diff --git a/test/sync_test/__snapshot__/pipeline_test_default_value.json b/test/sync_test/__snapshot__/pipeline_test_default_value.json index 37b5f57e..c2951552 100644 --- a/test/sync_test/__snapshot__/pipeline_test_default_value.json +++ b/test/sync_test/__snapshot__/pipeline_test_default_value.json @@ -107,7 +107,8 @@ "kind": "Expr::Array::ExprList", "loc": null, "children": [] - } + }, + "is_iter": false } }, "body": { diff --git a/test/sync_test/__snapshot__/pipeline_test_defer.json b/test/sync_test/__snapshot__/pipeline_test_defer.json index fa20323b..da4f9cef 100644 --- a/test/sync_test/__snapshot__/pipeline_test_defer.json +++ b/test/sync_test/__snapshot__/pipeline_test_defer.json @@ -976,71 +976,137 @@ "loc": null, "children": { "value": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", - "loc": null, - "children": { - "value": "basic_err" - } - } + "value": "to_result" } } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", "loc": null, - "children": [ - { - "kind": "Argument", + "children": { + "value": { + "kind": "Expr::Function", "loc": null, "children": { - "value": { - "kind": "Expr::Constant", + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "constant": { - "kind": "Constant::Bool", + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Apply", "loc": null, "children": { - "value": false + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "basic_err" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Bool", + "loc": null, + "children": { + "value": false + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } } - } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } - ] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} + } } - } + ] }, - "kind": { - "kind": "TryOperatorKind::Question", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -1156,71 +1222,137 @@ "loc": null, "children": { "value": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", - "loc": null, - "children": { - "value": "basic_err" - } - } + "value": "to_result" } } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", "loc": null, - "children": [ - { - "kind": "Argument", + "children": { + "value": { + "kind": "Expr::Function", "loc": null, "children": { - "value": { - "kind": "Expr::Constant", + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "constant": { - "kind": "Constant::Bool", + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Apply", "loc": null, "children": { - "value": true + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "basic_err" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Bool", + "loc": null, + "children": { + "value": true + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } } - } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } - ] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} + } } - } + ] }, - "kind": { - "kind": "TryOperatorKind::Question", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -1965,71 +2097,137 @@ "loc": null, "children": { "value": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", - "loc": null, - "children": { - "value": "basic_try" - } - } + "value": "to_result" } } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", "loc": null, - "children": [ - { - "kind": "Argument", + "children": { + "value": { + "kind": "Expr::Function", "loc": null, "children": { - "value": { - "kind": "Expr::Constant", + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "constant": { - "kind": "Constant::Bool", + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Apply", "loc": null, "children": { - "value": false + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "basic_try" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Bool", + "loc": null, + "children": { + "value": false + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } } - } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } - ] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} + } } - } + ] }, - "kind": { - "kind": "TryOperatorKind::Question", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -2145,71 +2343,137 @@ "loc": null, "children": { "value": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", - "loc": null, - "children": { - "value": "basic_try" - } - } + "value": "to_result" } } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", "loc": null, - "children": [ - { - "kind": "Argument", + "children": { + "value": { + "kind": "Expr::Function", "loc": null, "children": { - "value": { - "kind": "Expr::Constant", + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "constant": { - "kind": "Constant::Bool", + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Apply", "loc": null, "children": { - "value": true + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "basic_try" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Bool", + "loc": null, + "children": { + "value": true + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } } - } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } - ] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} + } } - } + ] }, - "kind": { - "kind": "TryOperatorKind::Question", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -8497,7 +8761,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { @@ -8600,125 +8865,191 @@ "loc": null, "children": { "value": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", - "loc": null, - "children": { - "value": "basic_for_in" - } - } + "value": "to_result" } } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", "loc": null, - "children": [ - { - "kind": "Argument", + "children": { + "value": { + "kind": "Expr::Function", "loc": null, "children": { - "value": { - "kind": "Expr::Constant", + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "constant": { - "kind": "Constant::String", + "parameters": { + "kind": "Func::Lambda::ParameterList", "loc": null, - "children": { - "value": "normal" - } - } - } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} - } - } - }, - { - "kind": "Argument", - "loc": null, - "children": { - "value": { - "kind": "Expr::DotApply", - "loc": null, - "children": { - "self": { - "kind": "Expr::Ident", + "children": [] + }, + "body": { + "kind": "Expr::Apply", "loc": null, "children": { - "id": { - "kind": "Var", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "value": "data" + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "basic_for_in" + } + } } } } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "normal" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "data" + } + } + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "iter" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} } } }, - "method_name": { - "kind": "Label", - "loc": null, - "children": { - "name": "iter" - } - }, - "args": { - "kind": "Expr::DotApply::ArgList", + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", "loc": null, - "children": [] + "children": {} }, - "return_self": false, - "attr": { - "kind": "ApplyAttr::NoAttr", + "kind": { + "kind": "FnKind::Arrow", "loc": null, "children": {} - } + }, + "has_error": null, + "is_async": null } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } - ] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} + } } - } + ] }, - "kind": { - "kind": "TryOperatorKind::Question", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -8832,125 +9163,191 @@ "loc": null, "children": { "value": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", - "loc": null, - "children": { - "value": "basic_for_in" - } - } + "value": "to_result" } } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", "loc": null, - "children": [ - { - "kind": "Argument", + "children": { + "value": { + "kind": "Expr::Function", "loc": null, "children": { - "value": { - "kind": "Expr::Constant", + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "constant": { - "kind": "Constant::String", + "parameters": { + "kind": "Func::Lambda::ParameterList", "loc": null, - "children": { - "value": "continue" - } - } - } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} - } - } - }, - { - "kind": "Argument", - "loc": null, - "children": { - "value": { - "kind": "Expr::DotApply", - "loc": null, - "children": { - "self": { - "kind": "Expr::Ident", + "children": [] + }, + "body": { + "kind": "Expr::Apply", "loc": null, "children": { - "id": { - "kind": "Var", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "value": "data" + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "basic_for_in" + } + } } } } - } - } - }, - "method_name": { - "kind": "Label", - "loc": null, - "children": { - "name": "iter" - } - }, - "args": { - "kind": "Expr::DotApply::ArgList", - "loc": null, - "children": [] - }, - "return_self": false, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} - } - } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "continue" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "data" + } + } + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "iter" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null + } } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } - ] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} + } } - } + ] }, - "kind": { - "kind": "TryOperatorKind::Question", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -9064,125 +9461,191 @@ "loc": null, "children": { "value": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", - "loc": null, - "children": { - "value": "basic_for_in" - } - } + "value": "to_result" } } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", "loc": null, - "children": [ - { - "kind": "Argument", + "children": { + "value": { + "kind": "Expr::Function", "loc": null, "children": { - "value": { - "kind": "Expr::Constant", + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "constant": { - "kind": "Constant::String", + "parameters": { + "kind": "Func::Lambda::ParameterList", "loc": null, - "children": { - "value": "break" - } - } - } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} - } - } - }, - { - "kind": "Argument", - "loc": null, - "children": { - "value": { - "kind": "Expr::DotApply", - "loc": null, - "children": { - "self": { - "kind": "Expr::Ident", + "children": [] + }, + "body": { + "kind": "Expr::Apply", "loc": null, "children": { - "id": { - "kind": "Var", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "value": "data" + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "basic_for_in" + } + } } } } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "break" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "data" + } + } + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "iter" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} } } }, - "method_name": { - "kind": "Label", - "loc": null, - "children": { - "name": "iter" - } - }, - "args": { - "kind": "Expr::DotApply::ArgList", + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", "loc": null, - "children": [] + "children": {} }, - "return_self": false, - "attr": { - "kind": "ApplyAttr::NoAttr", + "kind": { + "kind": "FnKind::Arrow", "loc": null, "children": {} - } + }, + "has_error": null, + "is_async": null } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } - ] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} + } } - } + ] }, - "kind": { - "kind": "TryOperatorKind::Question", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -9296,125 +9759,191 @@ "loc": null, "children": { "value": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", - "loc": null, - "children": { - "value": "basic_for_in" - } - } + "value": "to_result" } } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", "loc": null, - "children": [ - { - "kind": "Argument", + "children": { + "value": { + "kind": "Expr::Function", "loc": null, "children": { - "value": { - "kind": "Expr::Constant", + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "constant": { - "kind": "Constant::String", + "parameters": { + "kind": "Func::Lambda::ParameterList", "loc": null, - "children": { - "value": "continue-outer" - } - } - } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} - } - } - }, - { - "kind": "Argument", - "loc": null, - "children": { - "value": { - "kind": "Expr::DotApply", - "loc": null, - "children": { - "self": { - "kind": "Expr::Ident", + "children": [] + }, + "body": { + "kind": "Expr::Apply", "loc": null, "children": { - "id": { - "kind": "Var", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "value": "data" + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "basic_for_in" + } + } } } } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "continue-outer" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "data" + } + } + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "iter" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} } } }, - "method_name": { - "kind": "Label", - "loc": null, - "children": { - "name": "iter" - } - }, - "args": { - "kind": "Expr::DotApply::ArgList", + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", "loc": null, - "children": [] + "children": {} }, - "return_self": false, - "attr": { - "kind": "ApplyAttr::NoAttr", + "kind": { + "kind": "FnKind::Arrow", "loc": null, "children": {} - } + }, + "has_error": null, + "is_async": null } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } - ] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} + } } - } + ] }, - "kind": { - "kind": "TryOperatorKind::Question", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -9528,125 +10057,191 @@ "loc": null, "children": { "value": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", - "loc": null, - "children": { - "value": "basic_for_in" - } - } + "value": "to_result" } } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", "loc": null, - "children": [ - { - "kind": "Argument", + "children": { + "value": { + "kind": "Expr::Function", "loc": null, "children": { - "value": { - "kind": "Expr::Constant", + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "constant": { - "kind": "Constant::String", + "parameters": { + "kind": "Func::Lambda::ParameterList", "loc": null, - "children": { - "value": "break-outer" - } - } - } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} - } - } - }, - { - "kind": "Argument", - "loc": null, - "children": { - "value": { - "kind": "Expr::DotApply", - "loc": null, - "children": { - "self": { - "kind": "Expr::Ident", + "children": [] + }, + "body": { + "kind": "Expr::Apply", "loc": null, "children": { - "id": { - "kind": "Var", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "value": "data" + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "basic_for_in" + } + } } } } - } - } - }, - "method_name": { - "kind": "Label", - "loc": null, - "children": { - "name": "iter" - } - }, - "args": { - "kind": "Expr::DotApply::ArgList", - "loc": null, - "children": [] - }, - "return_self": false, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} - } - } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} - } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "break-outer" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "data" + } + } + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "iter" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null + } + } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } - ] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} + } } - } + ] }, - "kind": { - "kind": "TryOperatorKind::Question", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -9760,125 +10355,191 @@ "loc": null, "children": { "value": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", - "loc": null, - "children": { - "value": "basic_for_in" - } - } + "value": "to_result" } } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", "loc": null, - "children": [ - { - "kind": "Argument", + "children": { + "value": { + "kind": "Expr::Function", "loc": null, "children": { - "value": { - "kind": "Expr::Constant", + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "constant": { - "kind": "Constant::String", + "parameters": { + "kind": "Func::Lambda::ParameterList", "loc": null, - "children": { - "value": "raise" - } - } - } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} - } - } - }, - { - "kind": "Argument", - "loc": null, - "children": { - "value": { - "kind": "Expr::DotApply", - "loc": null, - "children": { - "self": { - "kind": "Expr::Ident", + "children": [] + }, + "body": { + "kind": "Expr::Apply", "loc": null, "children": { - "id": { - "kind": "Var", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "value": "data" + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "basic_for_in" + } + } } } } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "raise" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "data" + } + } + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "iter" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} } } }, - "method_name": { - "kind": "Label", - "loc": null, - "children": { - "name": "iter" - } - }, - "args": { - "kind": "Expr::DotApply::ArgList", + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", "loc": null, - "children": [] + "children": {} }, - "return_self": false, - "attr": { - "kind": "ApplyAttr::NoAttr", + "kind": { + "kind": "FnKind::Arrow", "loc": null, "children": {} - } + }, + "has_error": null, + "is_async": null } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } - ] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} + } } - } + ] }, - "kind": { - "kind": "TryOperatorKind::Question", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -9994,125 +10655,191 @@ "loc": null, "children": { "value": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", - "loc": null, + "name": { + "kind": "LongIdent::Ident", + "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", - "loc": null, - "children": { - "value": "basic_for_in" - } - } + "value": "to_result" } } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", "loc": null, - "children": [ - { - "kind": "Argument", + "children": { + "value": { + "kind": "Expr::Function", "loc": null, "children": { - "value": { - "kind": "Expr::Constant", + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "constant": { - "kind": "Constant::String", + "parameters": { + "kind": "Func::Lambda::ParameterList", "loc": null, - "children": { - "value": "return" - } - } - } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} - } - } - }, - { - "kind": "Argument", - "loc": null, - "children": { - "value": { - "kind": "Expr::DotApply", - "loc": null, - "children": { - "self": { - "kind": "Expr::Ident", + "children": [] + }, + "body": { + "kind": "Expr::Apply", "loc": null, "children": { - "id": { - "kind": "Var", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "value": "data" + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "basic_for_in" + } + } } } } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "return" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "data" + } + } + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "iter" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} } } }, - "method_name": { - "kind": "Label", - "loc": null, - "children": { - "name": "iter" - } - }, - "args": { - "kind": "Expr::DotApply::ArgList", + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", "loc": null, - "children": [] + "children": {} }, - "return_self": false, - "attr": { - "kind": "ApplyAttr::NoAttr", + "kind": { + "kind": "FnKind::Arrow", "loc": null, "children": {} - } + }, + "has_error": null, + "is_async": null } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } - ] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} + } } - } + ] }, - "kind": { - "kind": "TryOperatorKind::Question", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -10197,6 +10924,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, @@ -10328,5 +11060,524 @@ }, "doc": "" } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "to_result" + } + }, + "has_error": null, + "is_async": null, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "f" + } + }, + "ty": { + "kind": "Type::Arrow", + "loc": null, + "children": { + "args": { + "kind": "Type::Arrow::ArgList", + "loc": null, + "children": [] + }, + "res": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "T" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "err": { + "kind": "ErrorType::ErrorType", + "loc": null, + "children": { + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "E" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + "is_async": null + } + } + } + } + ] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [ + { + "kind": "TypeVarBinder", + "loc": null, + "children": { + "name": "T", + "constraints": { + "kind": "TypeVarBinder::TypeVarConstraintList", + "loc": null, + "children": [] + } + } + }, + { + "kind": "TypeVarBinder", + "loc": null, + "children": { + "name": "E", + "constraints": { + "kind": "TypeVarBinder::TypeVarConstraintList", + "loc": null, + "children": [ + { + "kind": "TypeVarConstraint", + "loc": null, + "children": { + "trait": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Error" + } + } + } + } + ] + } + } + } + ] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [ + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "T" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "E" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + ] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::Try", + "loc": null, + "children": { + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "f" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "catch": { + "kind": "Expr::Try::CaseList", + "loc": null, + "children": [ + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "err" + } + } + } + }, + "guard": null, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Err" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::TypeName", + "loc": null, + "children": { + "value": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + }, + "is_object": false + } + } + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "err" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + ] + }, + "catch_all": false, + "try_else": { + "kind": "Expr::Try::CaseList", + "loc": null, + "children": [ + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "value" + } + } + } + }, + "guard": null, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Ok" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::TypeName", + "loc": null, + "children": { + "value": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + }, + "is_object": false + } + } + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "value" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + ] + }, + "has_try": true + } + } + } + } + } } ] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/pipeline_test_defer.mbt b/test/sync_test/__snapshot__/pipeline_test_defer.mbt index fe9ad62c..4f6e2d03 100644 --- a/test/sync_test/__snapshot__/pipeline_test_defer.mbt +++ b/test/sync_test/__snapshot__/pipeline_test_defer.mbt @@ -20,9 +20,9 @@ fn basic_err(coin : Bool) -> Unit raise { fn init { println("==== basic err, normal return ====") - ignore(try? basic_err(false)) + ignore(to_result(() => basic_err(false))) println("==== basic err, raise error ====") - ignore(try? basic_err(true)) + ignore(to_result(() => basic_err(true))) } fn basic_try(coin : Bool) -> Unit raise { @@ -42,9 +42,9 @@ fn basic_try(coin : Bool) -> Unit raise { fn init { println("==== basic try, normal return ====") - ignore(try? basic_try(false)) + ignore(to_result(() => basic_try(false))) println("==== basic try, raise error ====") - ignore(try? basic_try(true)) + ignore(to_result(() => basic_try(true))) } fn lexical_scope(coin : Bool) -> Unit { @@ -187,21 +187,30 @@ fn basic_for_in(cmd : String, it : Iter[Int]) -> Unit raise { fn init { let data = [ 42 ] println("==== `for .. in`: fallthrough ====") - ignore(try? basic_for_in("normal", data.iter())) + ignore(to_result(() => basic_for_in("normal", data.iter()))) println("==== `for .. in`: continue ====") - ignore(try? basic_for_in("continue", data.iter())) + ignore(to_result(() => basic_for_in("continue", data.iter()))) println("==== `for .. in`: break ====") - ignore(try? basic_for_in("break", data.iter())) + ignore(to_result(() => basic_for_in("break", data.iter()))) println("==== `for .. in`: continue to outer loop ====") - ignore(try? basic_for_in("continue-outer", data.iter())) + ignore(to_result(() => basic_for_in("continue-outer", data.iter()))) println("==== `for .. in`: break to outer loop ====") - ignore(try? basic_for_in("break-outer", data.iter())) + ignore(to_result(() => basic_for_in("break-outer", data.iter()))) println("==== `for .. in`: error ====") - ignore(try? basic_for_in("raise", data.iter())) + ignore(to_result(() => basic_for_in("raise", data.iter()))) println("==== `for .. in`: return ====") - ignore(try? basic_for_in("return", data.iter())) + ignore(to_result(() => basic_for_in("return", data.iter()))) } impl Show for Err with output(self, logger) { logger.write_string("Err") } + +fn[T, E : Error] to_result(f : () -> T raise E) -> Result[T, E] { + try f() + catch { + err => Result::Err(err) + } noraise { + value => Result::Ok(value) + } +} diff --git a/test/sync_test/__snapshot__/pipeline_test_defer.mbt.tokens.json b/test/sync_test/__snapshot__/pipeline_test_defer.mbt.tokens.json index a7563889..5ec08636 100644 --- a/test/sync_test/__snapshot__/pipeline_test_defer.mbt.tokens.json +++ b/test/sync_test/__snapshot__/pipeline_test_defer.mbt.tokens.json @@ -530,42 +530,65 @@ "loc": "23:9-23:10" }, { - "token": "TRY_QUESTION", - "loc": "23:10-23:14" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "23:10-23:19" + }, + { + "token": "LPAREN", + "loc": "23:19-23:20" + }, + { + "token": "LPAREN", + "loc": "23:20-23:21" + }, + { + "token": "RPAREN", + "loc": "23:21-23:22" + }, + { + "token": "FAT_ARROW", + "loc": "23:23-23:25" }, { "token": [ "LIDENT", "basic_err" ], - "loc": "23:15-23:24" + "loc": "23:26-23:35" }, { "token": "LPAREN", - "loc": "23:24-23:25" + "loc": "23:35-23:36" }, { "token": "FALSE", - "loc": "23:25-23:30" + "loc": "23:36-23:41" + }, + { + "token": "RPAREN", + "loc": "23:41-23:42" }, { "token": "RPAREN", - "loc": "23:30-23:31" + "loc": "23:42-23:43" }, { "token": "RPAREN", - "loc": "23:31-23:32" + "loc": "23:43-23:44" }, { "token": [ "SEMI", false ], - "loc": "23:32-23:32" + "loc": "23:44-23:44" }, { "token": "NEWLINE", - "loc": "23:32-23:33" + "loc": "23:44-23:45" }, { "token": [ @@ -612,35 +635,58 @@ "loc": "25:9-25:10" }, { - "token": "TRY_QUESTION", - "loc": "25:10-25:14" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "25:10-25:19" + }, + { + "token": "LPAREN", + "loc": "25:19-25:20" + }, + { + "token": "LPAREN", + "loc": "25:20-25:21" + }, + { + "token": "RPAREN", + "loc": "25:21-25:22" + }, + { + "token": "FAT_ARROW", + "loc": "25:23-25:25" }, { "token": [ "LIDENT", "basic_err" ], - "loc": "25:15-25:24" + "loc": "25:26-25:35" }, { "token": "LPAREN", - "loc": "25:24-25:25" + "loc": "25:35-25:36" }, { "token": "TRUE", - "loc": "25:25-25:29" + "loc": "25:36-25:40" + }, + { + "token": "RPAREN", + "loc": "25:40-25:41" }, { "token": "RPAREN", - "loc": "25:29-25:30" + "loc": "25:41-25:42" }, { "token": "RPAREN", - "loc": "25:30-25:31" + "loc": "25:42-25:43" }, { "token": "NEWLINE", - "loc": "25:31-25:32" + "loc": "25:43-25:44" }, { "token": "RBRACE", @@ -1065,42 +1111,65 @@ "loc": "45:9-45:10" }, { - "token": "TRY_QUESTION", - "loc": "45:10-45:14" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "45:10-45:19" + }, + { + "token": "LPAREN", + "loc": "45:19-45:20" + }, + { + "token": "LPAREN", + "loc": "45:20-45:21" + }, + { + "token": "RPAREN", + "loc": "45:21-45:22" + }, + { + "token": "FAT_ARROW", + "loc": "45:23-45:25" }, { "token": [ "LIDENT", "basic_try" ], - "loc": "45:15-45:24" + "loc": "45:26-45:35" }, { "token": "LPAREN", - "loc": "45:24-45:25" + "loc": "45:35-45:36" }, { "token": "FALSE", - "loc": "45:25-45:30" + "loc": "45:36-45:41" }, { "token": "RPAREN", - "loc": "45:30-45:31" + "loc": "45:41-45:42" }, { "token": "RPAREN", - "loc": "45:31-45:32" + "loc": "45:42-45:43" + }, + { + "token": "RPAREN", + "loc": "45:43-45:44" }, { "token": [ "SEMI", false ], - "loc": "45:32-45:32" + "loc": "45:44-45:44" }, { "token": "NEWLINE", - "loc": "45:32-45:33" + "loc": "45:44-45:45" }, { "token": [ @@ -1147,35 +1216,58 @@ "loc": "47:9-47:10" }, { - "token": "TRY_QUESTION", - "loc": "47:10-47:14" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "47:10-47:19" + }, + { + "token": "LPAREN", + "loc": "47:19-47:20" + }, + { + "token": "LPAREN", + "loc": "47:20-47:21" + }, + { + "token": "RPAREN", + "loc": "47:21-47:22" + }, + { + "token": "FAT_ARROW", + "loc": "47:23-47:25" }, { "token": [ "LIDENT", "basic_try" ], - "loc": "47:15-47:24" + "loc": "47:26-47:35" }, { "token": "LPAREN", - "loc": "47:24-47:25" + "loc": "47:35-47:36" }, { "token": "TRUE", - "loc": "47:25-47:29" + "loc": "47:36-47:40" + }, + { + "token": "RPAREN", + "loc": "47:40-47:41" }, { "token": "RPAREN", - "loc": "47:29-47:30" + "loc": "47:41-47:42" }, { "token": "RPAREN", - "loc": "47:30-47:31" + "loc": "47:42-47:43" }, { "token": "NEWLINE", - "loc": "47:31-47:32" + "loc": "47:43-47:44" }, { "token": "RBRACE", @@ -4952,71 +5044,94 @@ "loc": "190:9-190:10" }, { - "token": "TRY_QUESTION", - "loc": "190:10-190:14" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "190:10-190:19" + }, + { + "token": "LPAREN", + "loc": "190:19-190:20" + }, + { + "token": "LPAREN", + "loc": "190:20-190:21" + }, + { + "token": "RPAREN", + "loc": "190:21-190:22" + }, + { + "token": "FAT_ARROW", + "loc": "190:23-190:25" }, { "token": [ "LIDENT", "basic_for_in" ], - "loc": "190:15-190:27" + "loc": "190:26-190:38" }, { "token": "LPAREN", - "loc": "190:27-190:28" + "loc": "190:38-190:39" }, { "token": [ "STRING", "normal" ], - "loc": "190:28-190:36" + "loc": "190:39-190:47" }, { "token": "COMMA", - "loc": "190:36-190:37" + "loc": "190:47-190:48" }, { "token": [ "LIDENT", "data" ], - "loc": "190:38-190:42" + "loc": "190:49-190:53" }, { "token": [ "DOT_LIDENT", "iter" ], - "loc": "190:43-190:47" + "loc": "190:54-190:58" }, { "token": "LPAREN", - "loc": "190:47-190:48" + "loc": "190:58-190:59" + }, + { + "token": "RPAREN", + "loc": "190:59-190:60" }, { "token": "RPAREN", - "loc": "190:48-190:49" + "loc": "190:60-190:61" }, { "token": "RPAREN", - "loc": "190:49-190:50" + "loc": "190:61-190:62" }, { "token": "RPAREN", - "loc": "190:50-190:51" + "loc": "190:62-190:63" }, { "token": [ "SEMI", false ], - "loc": "190:51-190:51" + "loc": "190:63-190:63" }, { "token": "NEWLINE", - "loc": "190:51-190:52" + "loc": "190:63-190:64" }, { "token": [ @@ -5063,71 +5178,94 @@ "loc": "192:9-192:10" }, { - "token": "TRY_QUESTION", - "loc": "192:10-192:14" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "192:10-192:19" + }, + { + "token": "LPAREN", + "loc": "192:19-192:20" + }, + { + "token": "LPAREN", + "loc": "192:20-192:21" + }, + { + "token": "RPAREN", + "loc": "192:21-192:22" + }, + { + "token": "FAT_ARROW", + "loc": "192:23-192:25" }, { "token": [ "LIDENT", "basic_for_in" ], - "loc": "192:15-192:27" + "loc": "192:26-192:38" }, { "token": "LPAREN", - "loc": "192:27-192:28" + "loc": "192:38-192:39" }, { "token": [ "STRING", "continue" ], - "loc": "192:28-192:38" + "loc": "192:39-192:49" }, { "token": "COMMA", - "loc": "192:38-192:39" + "loc": "192:49-192:50" }, { "token": [ "LIDENT", "data" ], - "loc": "192:40-192:44" + "loc": "192:51-192:55" }, { "token": [ "DOT_LIDENT", "iter" ], - "loc": "192:45-192:49" + "loc": "192:56-192:60" }, { "token": "LPAREN", - "loc": "192:49-192:50" + "loc": "192:60-192:61" + }, + { + "token": "RPAREN", + "loc": "192:61-192:62" }, { "token": "RPAREN", - "loc": "192:50-192:51" + "loc": "192:62-192:63" }, { "token": "RPAREN", - "loc": "192:51-192:52" + "loc": "192:63-192:64" }, { "token": "RPAREN", - "loc": "192:52-192:53" + "loc": "192:64-192:65" }, { "token": [ "SEMI", false ], - "loc": "192:53-192:53" + "loc": "192:65-192:65" }, { "token": "NEWLINE", - "loc": "192:53-192:54" + "loc": "192:65-192:66" }, { "token": [ @@ -5174,71 +5312,94 @@ "loc": "194:9-194:10" }, { - "token": "TRY_QUESTION", - "loc": "194:10-194:14" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "194:10-194:19" + }, + { + "token": "LPAREN", + "loc": "194:19-194:20" + }, + { + "token": "LPAREN", + "loc": "194:20-194:21" + }, + { + "token": "RPAREN", + "loc": "194:21-194:22" + }, + { + "token": "FAT_ARROW", + "loc": "194:23-194:25" }, { "token": [ "LIDENT", "basic_for_in" ], - "loc": "194:15-194:27" + "loc": "194:26-194:38" }, { "token": "LPAREN", - "loc": "194:27-194:28" + "loc": "194:38-194:39" }, { "token": [ "STRING", "break" ], - "loc": "194:28-194:35" + "loc": "194:39-194:46" }, { "token": "COMMA", - "loc": "194:35-194:36" + "loc": "194:46-194:47" }, { "token": [ "LIDENT", "data" ], - "loc": "194:37-194:41" + "loc": "194:48-194:52" }, { "token": [ "DOT_LIDENT", "iter" ], - "loc": "194:42-194:46" + "loc": "194:53-194:57" }, { "token": "LPAREN", - "loc": "194:46-194:47" + "loc": "194:57-194:58" + }, + { + "token": "RPAREN", + "loc": "194:58-194:59" }, { "token": "RPAREN", - "loc": "194:47-194:48" + "loc": "194:59-194:60" }, { "token": "RPAREN", - "loc": "194:48-194:49" + "loc": "194:60-194:61" }, { "token": "RPAREN", - "loc": "194:49-194:50" + "loc": "194:61-194:62" }, { "token": [ "SEMI", false ], - "loc": "194:50-194:50" + "loc": "194:62-194:62" }, { "token": "NEWLINE", - "loc": "194:50-194:51" + "loc": "194:62-194:63" }, { "token": [ @@ -5285,71 +5446,94 @@ "loc": "196:9-196:10" }, { - "token": "TRY_QUESTION", - "loc": "196:10-196:14" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "196:10-196:19" + }, + { + "token": "LPAREN", + "loc": "196:19-196:20" + }, + { + "token": "LPAREN", + "loc": "196:20-196:21" + }, + { + "token": "RPAREN", + "loc": "196:21-196:22" + }, + { + "token": "FAT_ARROW", + "loc": "196:23-196:25" }, { "token": [ "LIDENT", "basic_for_in" ], - "loc": "196:15-196:27" + "loc": "196:26-196:38" }, { "token": "LPAREN", - "loc": "196:27-196:28" + "loc": "196:38-196:39" }, { "token": [ "STRING", "continue-outer" ], - "loc": "196:28-196:44" + "loc": "196:39-196:55" }, { "token": "COMMA", - "loc": "196:44-196:45" + "loc": "196:55-196:56" }, { "token": [ "LIDENT", "data" ], - "loc": "196:46-196:50" + "loc": "196:57-196:61" }, { "token": [ "DOT_LIDENT", "iter" ], - "loc": "196:51-196:55" + "loc": "196:62-196:66" }, { "token": "LPAREN", - "loc": "196:55-196:56" + "loc": "196:66-196:67" + }, + { + "token": "RPAREN", + "loc": "196:67-196:68" }, { "token": "RPAREN", - "loc": "196:56-196:57" + "loc": "196:68-196:69" }, { "token": "RPAREN", - "loc": "196:57-196:58" + "loc": "196:69-196:70" }, { "token": "RPAREN", - "loc": "196:58-196:59" + "loc": "196:70-196:71" }, { "token": [ "SEMI", false ], - "loc": "196:59-196:59" + "loc": "196:71-196:71" }, { "token": "NEWLINE", - "loc": "196:59-196:60" + "loc": "196:71-196:72" }, { "token": [ @@ -5396,71 +5580,94 @@ "loc": "198:9-198:10" }, { - "token": "TRY_QUESTION", - "loc": "198:10-198:14" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "198:10-198:19" + }, + { + "token": "LPAREN", + "loc": "198:19-198:20" + }, + { + "token": "LPAREN", + "loc": "198:20-198:21" + }, + { + "token": "RPAREN", + "loc": "198:21-198:22" + }, + { + "token": "FAT_ARROW", + "loc": "198:23-198:25" }, { "token": [ "LIDENT", "basic_for_in" ], - "loc": "198:15-198:27" + "loc": "198:26-198:38" }, { "token": "LPAREN", - "loc": "198:27-198:28" + "loc": "198:38-198:39" }, { "token": [ "STRING", "break-outer" ], - "loc": "198:28-198:41" + "loc": "198:39-198:52" }, { "token": "COMMA", - "loc": "198:41-198:42" + "loc": "198:52-198:53" }, { "token": [ "LIDENT", "data" ], - "loc": "198:43-198:47" + "loc": "198:54-198:58" }, { "token": [ "DOT_LIDENT", "iter" ], - "loc": "198:48-198:52" + "loc": "198:59-198:63" }, { "token": "LPAREN", - "loc": "198:52-198:53" + "loc": "198:63-198:64" }, { "token": "RPAREN", - "loc": "198:53-198:54" + "loc": "198:64-198:65" }, { "token": "RPAREN", - "loc": "198:54-198:55" + "loc": "198:65-198:66" }, { "token": "RPAREN", - "loc": "198:55-198:56" + "loc": "198:66-198:67" + }, + { + "token": "RPAREN", + "loc": "198:67-198:68" }, { "token": [ "SEMI", false ], - "loc": "198:56-198:56" + "loc": "198:68-198:68" }, { "token": "NEWLINE", - "loc": "198:56-198:57" + "loc": "198:68-198:69" }, { "token": [ @@ -5507,71 +5714,94 @@ "loc": "200:9-200:10" }, { - "token": "TRY_QUESTION", - "loc": "200:10-200:14" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "200:10-200:19" + }, + { + "token": "LPAREN", + "loc": "200:19-200:20" + }, + { + "token": "LPAREN", + "loc": "200:20-200:21" + }, + { + "token": "RPAREN", + "loc": "200:21-200:22" + }, + { + "token": "FAT_ARROW", + "loc": "200:23-200:25" }, { "token": [ "LIDENT", "basic_for_in" ], - "loc": "200:15-200:27" + "loc": "200:26-200:38" }, { "token": "LPAREN", - "loc": "200:27-200:28" + "loc": "200:38-200:39" }, { "token": [ "STRING", "raise" ], - "loc": "200:28-200:35" + "loc": "200:39-200:46" }, { "token": "COMMA", - "loc": "200:35-200:36" + "loc": "200:46-200:47" }, { "token": [ "LIDENT", "data" ], - "loc": "200:37-200:41" + "loc": "200:48-200:52" }, { "token": [ "DOT_LIDENT", "iter" ], - "loc": "200:42-200:46" + "loc": "200:53-200:57" }, { "token": "LPAREN", - "loc": "200:46-200:47" + "loc": "200:57-200:58" }, { "token": "RPAREN", - "loc": "200:47-200:48" + "loc": "200:58-200:59" }, { "token": "RPAREN", - "loc": "200:48-200:49" + "loc": "200:59-200:60" }, { "token": "RPAREN", - "loc": "200:49-200:50" + "loc": "200:60-200:61" + }, + { + "token": "RPAREN", + "loc": "200:61-200:62" }, { "token": [ "SEMI", false ], - "loc": "200:50-200:50" + "loc": "200:62-200:62" }, { "token": "NEWLINE", - "loc": "200:50-200:51" + "loc": "200:62-200:63" }, { "token": [ @@ -5618,64 +5848,87 @@ "loc": "202:9-202:10" }, { - "token": "TRY_QUESTION", - "loc": "202:10-202:14" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "202:10-202:19" + }, + { + "token": "LPAREN", + "loc": "202:19-202:20" + }, + { + "token": "LPAREN", + "loc": "202:20-202:21" + }, + { + "token": "RPAREN", + "loc": "202:21-202:22" + }, + { + "token": "FAT_ARROW", + "loc": "202:23-202:25" }, { "token": [ "LIDENT", "basic_for_in" ], - "loc": "202:15-202:27" + "loc": "202:26-202:38" }, { "token": "LPAREN", - "loc": "202:27-202:28" + "loc": "202:38-202:39" }, { "token": [ "STRING", "return" ], - "loc": "202:28-202:36" + "loc": "202:39-202:47" }, { "token": "COMMA", - "loc": "202:36-202:37" + "loc": "202:47-202:48" }, { "token": [ "LIDENT", "data" ], - "loc": "202:38-202:42" + "loc": "202:49-202:53" }, { "token": [ "DOT_LIDENT", "iter" ], - "loc": "202:43-202:47" + "loc": "202:54-202:58" }, { "token": "LPAREN", - "loc": "202:47-202:48" + "loc": "202:58-202:59" + }, + { + "token": "RPAREN", + "loc": "202:59-202:60" }, { "token": "RPAREN", - "loc": "202:48-202:49" + "loc": "202:60-202:61" }, { "token": "RPAREN", - "loc": "202:49-202:50" + "loc": "202:61-202:62" }, { "token": "RPAREN", - "loc": "202:50-202:51" + "loc": "202:62-202:63" }, { "token": "NEWLINE", - "loc": "202:51-202:52" + "loc": "202:63-202:64" }, { "token": "RBRACE", @@ -5811,8 +6064,324 @@ "token": "NEWLINE", "loc": "207:2-207:3" }, + { + "token": "NEWLINE", + "loc": "208:1-208:2" + }, + { + "token": "FN", + "loc": "209:1-209:3" + }, + { + "token": "LBRACKET", + "loc": "209:3-209:4" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "209:4-209:5" + }, + { + "token": "COMMA", + "loc": "209:5-209:6" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "209:7-209:8" + }, + { + "token": "COLON", + "loc": "209:9-209:10" + }, + { + "token": [ + "UIDENT", + "Error" + ], + "loc": "209:11-209:16" + }, + { + "token": "RBRACKET", + "loc": "209:16-209:17" + }, + { + "token": [ + "LIDENT", + "to_result" + ], + "loc": "209:18-209:27" + }, + { + "token": "LPAREN", + "loc": "209:27-209:28" + }, + { + "token": [ + "LIDENT", + "f" + ], + "loc": "209:28-209:29" + }, + { + "token": "COLON", + "loc": "209:30-209:31" + }, + { + "token": "LPAREN", + "loc": "209:32-209:33" + }, + { + "token": "RPAREN", + "loc": "209:33-209:34" + }, + { + "token": "THIN_ARROW", + "loc": "209:35-209:37" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "209:38-209:39" + }, + { + "token": "RAISE", + "loc": "209:40-209:45" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "209:46-209:47" + }, + { + "token": "RPAREN", + "loc": "209:47-209:48" + }, + { + "token": "THIN_ARROW", + "loc": "209:49-209:51" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "209:52-209:58" + }, + { + "token": "LBRACKET", + "loc": "209:58-209:59" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "209:59-209:60" + }, + { + "token": "COMMA", + "loc": "209:60-209:61" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "209:62-209:63" + }, + { + "token": "RBRACKET", + "loc": "209:63-209:64" + }, + { + "token": "LBRACE", + "loc": "209:65-209:66" + }, + { + "token": "NEWLINE", + "loc": "209:66-209:67" + }, + { + "token": "TRY", + "loc": "210:3-210:6" + }, + { + "token": [ + "LIDENT", + "f" + ], + "loc": "210:7-210:8" + }, + { + "token": "LPAREN", + "loc": "210:8-210:9" + }, + { + "token": "RPAREN", + "loc": "210:9-210:10" + }, + { + "token": "NEWLINE", + "loc": "210:10-210:11" + }, + { + "token": "CATCH", + "loc": "211:3-211:8" + }, + { + "token": "LBRACE", + "loc": "211:9-211:10" + }, + { + "token": "NEWLINE", + "loc": "211:10-211:11" + }, + { + "token": [ + "LIDENT", + "err" + ], + "loc": "212:5-212:8" + }, + { + "token": "FAT_ARROW", + "loc": "212:9-212:11" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "212:12-212:18" + }, + { + "token": "COLONCOLON", + "loc": "212:18-212:20" + }, + { + "token": [ + "UIDENT", + "Err" + ], + "loc": "212:20-212:23" + }, + { + "token": "LPAREN", + "loc": "212:23-212:24" + }, + { + "token": [ + "LIDENT", + "err" + ], + "loc": "212:24-212:27" + }, + { + "token": "RPAREN", + "loc": "212:27-212:28" + }, + { + "token": "NEWLINE", + "loc": "212:28-212:29" + }, + { + "token": "RBRACE", + "loc": "213:3-213:4" + }, + { + "token": "NORAISE", + "loc": "213:5-213:12" + }, + { + "token": "LBRACE", + "loc": "213:13-213:14" + }, + { + "token": "NEWLINE", + "loc": "213:14-213:15" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "214:5-214:10" + }, + { + "token": "FAT_ARROW", + "loc": "214:11-214:13" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "214:14-214:20" + }, + { + "token": "COLONCOLON", + "loc": "214:20-214:22" + }, + { + "token": [ + "UIDENT", + "Ok" + ], + "loc": "214:22-214:24" + }, + { + "token": "LPAREN", + "loc": "214:24-214:25" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "214:25-214:30" + }, + { + "token": "RPAREN", + "loc": "214:30-214:31" + }, + { + "token": "NEWLINE", + "loc": "214:31-214:32" + }, + { + "token": "RBRACE", + "loc": "215:3-215:4" + }, + { + "token": "NEWLINE", + "loc": "215:4-215:5" + }, + { + "token": "RBRACE", + "loc": "216:1-216:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "216:2-216:2" + }, + { + "token": "NEWLINE", + "loc": "216:2-216:3" + }, { "token": "EOF", - "loc": "208:1-208:1" + "loc": "217:1-217:1" } ] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/pipeline_test_derive2.json b/test/sync_test/__snapshot__/pipeline_test_derive2.json index 8091fbfe..6a129a33 100644 --- a/test/sync_test/__snapshot__/pipeline_test_derive2.json +++ b/test/sync_test/__snapshot__/pipeline_test_derive2.json @@ -125,6 +125,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, @@ -722,6 +727,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, @@ -925,6 +935,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, diff --git a/test/sync_test/__snapshot__/pipeline_test_derive_from_json.json b/test/sync_test/__snapshot__/pipeline_test_derive_from_json.json index fef4ff3e..1fb2312e 100644 --- a/test/sync_test/__snapshot__/pipeline_test_derive_from_json.json +++ b/test/sync_test/__snapshot__/pipeline_test_derive_from_json.json @@ -3955,78 +3955,144 @@ "children": [] }, "expr": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Dot", - "loc": null, - "children": { - "pkg": "json", - "id": "from_json" - } - } + "value": "to_result" } } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", "loc": null, - "children": [ - { - "kind": "Argument", + "children": { + "value": { + "kind": "Expr::Function", "loc": null, "children": { - "value": { - "kind": "Expr::Ident", + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "id": { - "kind": "Var", + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Apply", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "value": "j" + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Dot", + "loc": null, + "children": { + "pkg": "json", + "id": "from_json" + } + } + } + } } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "j" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} } } - } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } - ] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} + } } - } + ] }, - "kind": { - "kind": "TryOperatorKind::Question", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -4205,78 +4271,144 @@ "children": [] }, "expr": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Dot", - "loc": null, - "children": { - "pkg": "json", - "id": "from_json" - } - } + "value": "to_result" } } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", "loc": null, - "children": [ - { - "kind": "Argument", + "children": { + "value": { + "kind": "Expr::Function", "loc": null, "children": { - "value": { - "kind": "Expr::Ident", + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "id": { - "kind": "Var", + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Apply", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "value": "j" + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Dot", + "loc": null, + "children": { + "pkg": "json", + "id": "from_json" + } + } + } + } } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "j" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} } } - } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } - ] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} + } } - } + ] }, - "kind": { - "kind": "TryOperatorKind::Question", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -4505,78 +4637,144 @@ "children": [] }, "expr": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", - "loc": null, + "name": { + "kind": "LongIdent::Ident", + "loc": null, "children": { - "name": { - "kind": "LongIdent::Dot", - "loc": null, - "children": { - "pkg": "json", - "id": "from_json" - } - } + "value": "to_result" } } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", "loc": null, - "children": [ - { - "kind": "Argument", + "children": { + "value": { + "kind": "Expr::Function", "loc": null, "children": { - "value": { - "kind": "Expr::Ident", + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "id": { - "kind": "Var", + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Apply", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "value": "j" + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Dot", + "loc": null, + "children": { + "pkg": "json", + "id": "from_json" + } + } + } + } } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "j" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} } } - } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } - ] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} + } } - } + ] }, - "kind": { - "kind": "TryOperatorKind::Question", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -4830,78 +5028,144 @@ "children": [] }, "expr": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Dot", - "loc": null, - "children": { - "pkg": "json", - "id": "from_json" - } - } + "value": "to_result" } } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", "loc": null, - "children": [ - { - "kind": "Argument", + "children": { + "value": { + "kind": "Expr::Function", "loc": null, "children": { - "value": { - "kind": "Expr::Ident", + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "id": { - "kind": "Var", + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Apply", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "value": "j" + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Dot", + "loc": null, + "children": { + "pkg": "json", + "id": "from_json" + } + } + } + } } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "j" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} } } - } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } - ] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} + } } - } + ] }, - "kind": { - "kind": "TryOperatorKind::Question", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -5080,78 +5344,144 @@ "children": [] }, "expr": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Dot", - "loc": null, - "children": { - "pkg": "json", - "id": "from_json" - } - } + "value": "to_result" } } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", "loc": null, - "children": [ - { - "kind": "Argument", + "children": { + "value": { + "kind": "Expr::Function", "loc": null, "children": { - "value": { - "kind": "Expr::Ident", + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "id": { - "kind": "Var", + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Apply", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "value": "j" + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Dot", + "loc": null, + "children": { + "pkg": "json", + "id": "from_json" + } + } + } + } } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "j" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} } } - } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } - ] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} + } } - } + ] }, - "kind": { - "kind": "TryOperatorKind::Question", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -5330,78 +5660,144 @@ "children": [] }, "expr": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Dot", - "loc": null, - "children": { - "pkg": "json", - "id": "from_json" - } - } + "value": "to_result" } } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", "loc": null, - "children": [ - { - "kind": "Argument", + "children": { + "value": { + "kind": "Expr::Function", "loc": null, "children": { - "value": { - "kind": "Expr::Ident", + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "id": { - "kind": "Var", + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Apply", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "value": "j" + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Dot", + "loc": null, + "children": { + "pkg": "json", + "id": "from_json" + } + } + } + } } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "j" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} } } - } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } - ] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} + } } - } + ] }, - "kind": { - "kind": "TryOperatorKind::Question", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -5580,78 +5976,144 @@ "children": [] }, "expr": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Dot", - "loc": null, - "children": { - "pkg": "json", - "id": "from_json" - } - } + "value": "to_result" } } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", - "loc": null, - "children": [ - { - "kind": "Argument", + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Function", "loc": null, "children": { - "value": { - "kind": "Expr::Ident", + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "id": { - "kind": "Var", + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Apply", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "value": "j" + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Dot", + "loc": null, + "children": { + "pkg": "json", + "id": "from_json" + } + } + } + } } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "j" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} } } - } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } - ] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} + } } - } + ] }, - "kind": { - "kind": "TryOperatorKind::Question", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -5830,78 +6292,144 @@ "children": [] }, "expr": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Dot", - "loc": null, - "children": { - "pkg": "json", - "id": "from_json" - } - } + "value": "to_result" } } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", "loc": null, - "children": [ - { - "kind": "Argument", + "children": { + "value": { + "kind": "Expr::Function", "loc": null, "children": { - "value": { - "kind": "Expr::Ident", + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "id": { - "kind": "Var", + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Apply", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "value": "j" + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Dot", + "loc": null, + "children": { + "pkg": "json", + "id": "from_json" + } + } + } + } } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "j" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} } } - } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } - ] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} + } } - } + ] }, - "kind": { - "kind": "TryOperatorKind::Question", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -6080,78 +6608,144 @@ "children": [] }, "expr": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Dot", - "loc": null, - "children": { - "pkg": "json", - "id": "from_json" - } - } + "value": "to_result" } } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", "loc": null, - "children": [ - { - "kind": "Argument", + "children": { + "value": { + "kind": "Expr::Function", "loc": null, "children": { - "value": { - "kind": "Expr::Ident", + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "id": { - "kind": "Var", + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Apply", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "value": "j" + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Dot", + "loc": null, + "children": { + "pkg": "json", + "id": "from_json" + } + } + } + } } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "j" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} } } - } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } - ] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} + } } - } + ] }, - "kind": { - "kind": "TryOperatorKind::Question", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -6330,78 +6924,144 @@ "children": [] }, "expr": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Dot", - "loc": null, - "children": { - "pkg": "json", - "id": "from_json" - } - } + "value": "to_result" } } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", "loc": null, - "children": [ - { - "kind": "Argument", + "children": { + "value": { + "kind": "Expr::Function", "loc": null, "children": { - "value": { - "kind": "Expr::Ident", + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "id": { - "kind": "Var", + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Apply", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "value": "j" + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Dot", + "loc": null, + "children": { + "pkg": "json", + "id": "from_json" + } + } + } + } } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "j" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} } } - } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } - ] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} + } } - } + ] }, - "kind": { - "kind": "TryOperatorKind::Question", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -6580,78 +7240,144 @@ "children": [] }, "expr": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Dot", - "loc": null, - "children": { - "pkg": "json", - "id": "from_json" - } - } + "value": "to_result" } } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", "loc": null, - "children": [ - { - "kind": "Argument", + "children": { + "value": { + "kind": "Expr::Function", "loc": null, "children": { - "value": { - "kind": "Expr::Ident", + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "id": { - "kind": "Var", + "parameters": { + "kind": "Func::Lambda::ParameterList", "loc": null, - "children": { - "name": { - "kind": "LongIdent::Ident", + "children": [] + }, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "value": "j" + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Dot", + "loc": null, + "children": { + "pkg": "json", + "id": "from_json" + } + } + } + } } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "j" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} } } - } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } - ] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} + } } - } + ] }, - "kind": { - "kind": "TryOperatorKind::Question", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -10258,7 +10984,8 @@ } } ] - } + }, + "is_iter": false } }, "is_pun": false @@ -10614,7 +11341,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -10875,7 +11603,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -13613,7 +14342,8 @@ } } ] - } + }, + "is_iter": false } } } @@ -13677,7 +14407,8 @@ } } ] - } + }, + "is_iter": false } } } @@ -13790,78 +14521,144 @@ } }, "expr": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Dot", - "loc": null, - "children": { - "pkg": "json", - "id": "from_json" - } - } + "value": "to_result" } } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", "loc": null, - "children": [ - { - "kind": "Argument", + "children": { + "value": { + "kind": "Expr::Function", "loc": null, "children": { - "value": { - "kind": "Expr::Ident", + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "id": { - "kind": "Var", + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Apply", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "value": "input" + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Dot", + "loc": null, + "children": { + "pkg": "json", + "id": "from_json" + } + } + } + } } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "input" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} } } - } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } - ] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} + } } - } + ] }, - "kind": { - "kind": "TryOperatorKind::Question", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -14567,78 +15364,144 @@ } }, "expr": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Dot", - "loc": null, - "children": { - "pkg": "json", - "id": "from_json" - } - } + "value": "to_result" } } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", "loc": null, - "children": [ - { - "kind": "Argument", + "children": { + "value": { + "kind": "Expr::Function", "loc": null, "children": { - "value": { - "kind": "Expr::Ident", + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "id": { - "kind": "Var", + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Apply", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "value": "input" + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Dot", + "loc": null, + "children": { + "pkg": "json", + "id": "from_json" + } + } + } + } } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "input" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} } } - } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } - ] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} + } } - } + ] }, - "kind": { - "kind": "TryOperatorKind::Question", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -15694,78 +16557,144 @@ } }, "expr": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Dot", - "loc": null, - "children": { - "pkg": "json", - "id": "from_json" - } - } + "value": "to_result" } } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", "loc": null, - "children": [ - { - "kind": "Argument", + "children": { + "value": { + "kind": "Expr::Function", "loc": null, "children": { - "value": { - "kind": "Expr::Ident", + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "id": { - "kind": "Var", + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Apply", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "value": "input" + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Dot", + "loc": null, + "children": { + "pkg": "json", + "id": "from_json" + } + } + } + } } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "input" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} } } - } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } - ] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} + } } - } + ] }, - "kind": { - "kind": "TryOperatorKind::Question", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -17394,78 +18323,144 @@ } }, "expr": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Dot", - "loc": null, - "children": { - "pkg": "json", - "id": "from_json" - } - } + "value": "to_result" } } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", "loc": null, - "children": [ - { - "kind": "Argument", + "children": { + "value": { + "kind": "Expr::Function", "loc": null, "children": { - "value": { - "kind": "Expr::Ident", + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "id": { - "kind": "Var", + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Apply", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "value": "input" + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Dot", + "loc": null, + "children": { + "pkg": "json", + "id": "from_json" + } + } + } + } } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "input" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} } } - } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } - ] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} + } } - } + ] }, - "kind": { - "kind": "TryOperatorKind::Question", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -17629,7 +18624,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { @@ -17710,144 +18706,210 @@ } }, "expr": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Dot", - "loc": null, - "children": { - "pkg": "json", - "id": "from_json" - } - } + "value": "to_result" } } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", - "loc": null, - "children": [ - { - "kind": "Argument", - "loc": null, - "children": { - "value": { - "kind": "Expr::Ident", - "loc": null, - "children": { - "id": { - "kind": "Var", - "loc": null, - "children": { - "name": { - "kind": "LongIdent::Ident", - "loc": null, - "children": { - "value": "input" - } - } - } - } - } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} - } - } - } - ] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} } } }, - "kind": { - "kind": "TryOperatorKind::Question", - "loc": null, - "children": {} - } - } - }, - "body": { - "kind": "Expr::Sequence", - "loc": null, - "children": { - "exprs": { - "kind": "Expr::Sequence::ExprList", + "args": { + "kind": "Expr::Apply::ArgumentList", "loc": null, "children": [ { - "kind": "Expr::Apply", + "kind": "Argument", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "value": { + "kind": "Expr::Function", "loc": null, "children": { - "id": { - "kind": "Var", + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", + "parameters": { + "kind": "Func::Lambda::ParameterList", "loc": null, - "children": { - "value": "debug" - } - } - } - } - } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", - "loc": null, - "children": [ - { - "kind": "Argument", - "loc": null, - "children": { - "value": { - "kind": "Expr::Ident", + "children": [] + }, + "body": { + "kind": "Expr::Apply", "loc": null, "children": { - "id": { - "kind": "Var", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "value": "s" + "name": { + "kind": "LongIdent::Dot", + "loc": null, + "children": { + "pkg": "json", + "id": "from_json" + } + } } } } - } - } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "input" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "body": { + "kind": "Expr::Sequence", + "loc": null, + "children": { + "exprs": { + "kind": "Expr::Sequence::ExprList", + "loc": null, + "children": [ + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "debug" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "s" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, "children": {} } } @@ -18026,142 +19088,208 @@ } }, "expr": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Dot", - "loc": null, - "children": { - "pkg": "json", - "id": "from_json" - } - } + "value": "to_result" } } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", - "loc": null, - "children": [ - { - "kind": "Argument", - "loc": null, - "children": { - "value": { - "kind": "Expr::Ident", - "loc": null, - "children": { - "id": { - "kind": "Var", - "loc": null, - "children": { - "name": { - "kind": "LongIdent::Ident", - "loc": null, - "children": { - "value": "input" - } - } - } - } - } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} - } - } - } - ] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} } } }, - "kind": { - "kind": "TryOperatorKind::Question", - "loc": null, - "children": {} - } - } - }, - "body": { - "kind": "Expr::Sequence", - "loc": null, - "children": { - "exprs": { - "kind": "Expr::Sequence::ExprList", + "args": { + "kind": "Expr::Apply::ArgumentList", "loc": null, "children": [ { - "kind": "Expr::Apply", + "kind": "Argument", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "value": { + "kind": "Expr::Function", "loc": null, "children": { - "id": { - "kind": "Var", + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", + "parameters": { + "kind": "Func::Lambda::ParameterList", "loc": null, - "children": { - "value": "debug" - } - } - } - } - } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", - "loc": null, - "children": [ - { - "kind": "Argument", - "loc": null, - "children": { - "value": { - "kind": "Expr::Ident", + "children": [] + }, + "body": { + "kind": "Expr::Apply", "loc": null, "children": { - "id": { - "kind": "Var", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "value": "s" + "name": { + "kind": "LongIdent::Dot", + "loc": null, + "children": { + "pkg": "json", + "id": "from_json" + } + } } } } - } - } - }, - "kind": { + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "input" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "body": { + "kind": "Expr::Sequence", + "loc": null, + "children": { + "exprs": { + "kind": "Expr::Sequence::ExprList", + "loc": null, + "children": [ + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "debug" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "s" + } + } + } + } + } + }, + "kind": { "kind": "ArgumentKind::Positional", "loc": null, "children": {} @@ -18342,144 +19470,210 @@ } }, "expr": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Dot", - "loc": null, - "children": { - "pkg": "json", - "id": "from_json" - } - } + "value": "to_result" } } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", - "loc": null, - "children": [ - { - "kind": "Argument", - "loc": null, - "children": { - "value": { - "kind": "Expr::Ident", - "loc": null, - "children": { - "id": { - "kind": "Var", - "loc": null, - "children": { - "name": { - "kind": "LongIdent::Ident", - "loc": null, - "children": { - "value": "input" - } - } - } - } - } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} - } - } - } - ] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} } } }, - "kind": { - "kind": "TryOperatorKind::Question", - "loc": null, - "children": {} - } - } - }, - "body": { - "kind": "Expr::Sequence", - "loc": null, - "children": { - "exprs": { - "kind": "Expr::Sequence::ExprList", + "args": { + "kind": "Expr::Apply::ArgumentList", "loc": null, "children": [ { - "kind": "Expr::Apply", + "kind": "Argument", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "value": { + "kind": "Expr::Function", "loc": null, "children": { - "id": { - "kind": "Var", + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", + "parameters": { + "kind": "Func::Lambda::ParameterList", "loc": null, - "children": { - "value": "debug" - } - } - } - } - } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", - "loc": null, - "children": [ - { - "kind": "Argument", - "loc": null, - "children": { - "value": { - "kind": "Expr::Ident", + "children": [] + }, + "body": { + "kind": "Expr::Apply", "loc": null, "children": { - "id": { - "kind": "Var", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "value": "s" + "name": { + "kind": "LongIdent::Dot", + "loc": null, + "children": { + "pkg": "json", + "id": "from_json" + } + } } } } - } - } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "input" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "body": { + "kind": "Expr::Sequence", + "loc": null, + "children": { + "exprs": { + "kind": "Expr::Sequence::ExprList", + "loc": null, + "children": [ + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "debug" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "s" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, "children": {} } } @@ -18577,7 +19771,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { @@ -18658,84 +19853,6 @@ } }, "expr": { - "kind": "Expr::TryOperator", - "loc": null, - "children": { - "body": { - "kind": "Expr::Apply", - "loc": null, - "children": { - "func": { - "kind": "Expr::Ident", - "loc": null, - "children": { - "id": { - "kind": "Var", - "loc": null, - "children": { - "name": { - "kind": "LongIdent::Dot", - "loc": null, - "children": { - "pkg": "json", - "id": "from_json" - } - } - } - } - } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", - "loc": null, - "children": [ - { - "kind": "Argument", - "loc": null, - "children": { - "value": { - "kind": "Expr::Ident", - "loc": null, - "children": { - "id": { - "kind": "Var", - "loc": null, - "children": { - "name": { - "kind": "LongIdent::Ident", - "loc": null, - "children": { - "value": "input" - } - } - } - } - } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} - } - } - } - ] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} - } - } - }, - "kind": { - "kind": "TryOperatorKind::Question", - "loc": null, - "children": {} - } - } - }, - "body": { "kind": "Expr::Apply", "loc": null, "children": { @@ -18751,7 +19868,7 @@ "kind": "LongIdent::Ident", "loc": null, "children": { - "value": "debug" + "value": "to_result" } } } @@ -18767,57 +19884,201 @@ "loc": null, "children": { "value": { - "kind": "Expr::Ident", + "kind": "Expr::Function", "loc": null, "children": { - "id": { - "kind": "Var", + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Apply", "loc": null, "children": { - "value": "s" - } - } - } - } - } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} - } - } - } - ] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Dot", + "loc": null, + "children": { + "pkg": "json", + "id": "from_json" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "input" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "debug" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "s" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } } } } @@ -20007,105 +21268,171 @@ } }, "expr": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Dot", - "loc": null, - "children": { - "pkg": "json", - "id": "from_json" - } - } + "value": "to_result" } } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", - "loc": null, - "children": [ - { - "kind": "Argument", - "loc": null, - "children": { - "value": { - "kind": "Expr::Ident", - "loc": null, - "children": { - "id": { - "kind": "Var", - "loc": null, - "children": { - "name": { - "kind": "LongIdent::Ident", - "loc": null, - "children": { - "value": "input" - } - } - } - } - } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} - } - } - } - ] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} } } }, - "kind": { - "kind": "TryOperatorKind::Question", - "loc": null, - "children": {} - } - } - }, - "body": { - "kind": "Expr::Sequence", - "loc": null, - "children": { - "exprs": { - "kind": "Expr::Sequence::ExprList", + "args": { + "kind": "Expr::Apply::ArgumentList", "loc": null, "children": [ { - "kind": "Expr::Apply", + "kind": "Argument", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "value": { + "kind": "Expr::Function", "loc": null, "children": { - "id": { - "kind": "Var", + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Dot", + "loc": null, + "children": { + "pkg": "json", + "id": "from_json" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "input" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "body": { + "kind": "Expr::Sequence", + "loc": null, + "children": { + "exprs": { + "kind": "Expr::Sequence::ExprList", + "loc": null, + "children": [ + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { "value": "debug" @@ -20349,78 +21676,144 @@ } }, "expr": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Dot", - "loc": null, - "children": { - "pkg": "json", - "id": "from_json" - } - } + "value": "to_result" } } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", "loc": null, - "children": [ - { - "kind": "Argument", + "children": { + "value": { + "kind": "Expr::Function", "loc": null, "children": { - "value": { - "kind": "Expr::Ident", + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "id": { - "kind": "Var", + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Apply", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "value": "input" + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Dot", + "loc": null, + "children": { + "pkg": "json", + "id": "from_json" + } + } + } + } } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "input" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} } } - } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } - ] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} + } } - } + ] }, - "kind": { - "kind": "TryOperatorKind::Question", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -20717,78 +22110,144 @@ } }, "expr": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Dot", - "loc": null, - "children": { - "pkg": "json", - "id": "from_json" - } - } + "value": "to_result" } } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", "loc": null, - "children": [ - { - "kind": "Argument", + "children": { + "value": { + "kind": "Expr::Function", "loc": null, "children": { - "value": { - "kind": "Expr::Ident", + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "id": { - "kind": "Var", + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Apply", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "value": "input" + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Dot", + "loc": null, + "children": { + "pkg": "json", + "id": "from_json" + } + } + } + } } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "input" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} } } - } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } - ] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} + } } - } + ] }, - "kind": { - "kind": "TryOperatorKind::Question", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -21068,78 +22527,144 @@ } }, "expr": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Dot", - "loc": null, - "children": { - "pkg": "json", - "id": "from_json" - } - } + "value": "to_result" } } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", "loc": null, - "children": [ - { - "kind": "Argument", + "children": { + "value": { + "kind": "Expr::Function", "loc": null, "children": { - "value": { - "kind": "Expr::Ident", + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "id": { - "kind": "Var", + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Apply", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "value": "input" + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Dot", + "loc": null, + "children": { + "pkg": "json", + "id": "from_json" + } + } + } + } } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "input" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} } } - } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } - ] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} + } } - } + ] }, - "kind": { - "kind": "TryOperatorKind::Question", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -21303,7 +22828,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { @@ -21384,78 +22910,144 @@ } }, "expr": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Dot", - "loc": null, - "children": { - "pkg": "json", - "id": "from_json" - } - } + "value": "to_result" } } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", "loc": null, - "children": [ - { - "kind": "Argument", + "children": { + "value": { + "kind": "Expr::Function", "loc": null, "children": { - "value": { - "kind": "Expr::Ident", + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "id": { - "kind": "Var", + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Apply", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "value": "input" + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Dot", + "loc": null, + "children": { + "pkg": "json", + "id": "from_json" + } + } + } + } } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "input" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} } } - } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } - ] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} + } } - } + ] }, - "kind": { - "kind": "TryOperatorKind::Question", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -21632,7 +23224,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { @@ -21713,144 +23306,210 @@ } }, "expr": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Dot", - "loc": null, - "children": { - "pkg": "json", - "id": "from_json" - } - } + "value": "to_result" } } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", - "loc": null, - "children": [ - { - "kind": "Argument", - "loc": null, - "children": { - "value": { - "kind": "Expr::Ident", - "loc": null, - "children": { - "id": { - "kind": "Var", - "loc": null, - "children": { - "name": { - "kind": "LongIdent::Ident", - "loc": null, - "children": { - "value": "input" - } - } - } - } - } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} - } - } - } - ] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} } } }, - "kind": { - "kind": "TryOperatorKind::Question", - "loc": null, - "children": {} - } - } - }, - "body": { - "kind": "Expr::Sequence", - "loc": null, - "children": { - "exprs": { - "kind": "Expr::Sequence::ExprList", + "args": { + "kind": "Expr::Apply::ArgumentList", "loc": null, "children": [ { - "kind": "Expr::Apply", + "kind": "Argument", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "value": { + "kind": "Expr::Function", "loc": null, "children": { - "id": { - "kind": "Var", + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", + "parameters": { + "kind": "Func::Lambda::ParameterList", "loc": null, - "children": { - "value": "debug" - } - } - } - } - } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", - "loc": null, - "children": [ - { - "kind": "Argument", - "loc": null, - "children": { - "value": { - "kind": "Expr::Ident", + "children": [] + }, + "body": { + "kind": "Expr::Apply", "loc": null, "children": { - "id": { - "kind": "Var", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "value": "s" + "name": { + "kind": "LongIdent::Dot", + "loc": null, + "children": { + "pkg": "json", + "id": "from_json" + } + } } } } - } - } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "input" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "body": { + "kind": "Expr::Sequence", + "loc": null, + "children": { + "exprs": { + "kind": "Expr::Sequence::ExprList", + "loc": null, + "children": [ + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "debug" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "s" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, "children": {} } } @@ -22025,7 +23684,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { @@ -22106,84 +23766,6 @@ } }, "expr": { - "kind": "Expr::TryOperator", - "loc": null, - "children": { - "body": { - "kind": "Expr::Apply", - "loc": null, - "children": { - "func": { - "kind": "Expr::Ident", - "loc": null, - "children": { - "id": { - "kind": "Var", - "loc": null, - "children": { - "name": { - "kind": "LongIdent::Dot", - "loc": null, - "children": { - "pkg": "json", - "id": "from_json" - } - } - } - } - } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", - "loc": null, - "children": [ - { - "kind": "Argument", - "loc": null, - "children": { - "value": { - "kind": "Expr::Ident", - "loc": null, - "children": { - "id": { - "kind": "Var", - "loc": null, - "children": { - "name": { - "kind": "LongIdent::Ident", - "loc": null, - "children": { - "value": "input" - } - } - } - } - } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} - } - } - } - ] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} - } - } - }, - "kind": { - "kind": "TryOperatorKind::Question", - "loc": null, - "children": {} - } - } - }, - "body": { "kind": "Expr::Apply", "loc": null, "children": { @@ -22199,7 +23781,7 @@ "kind": "LongIdent::Ident", "loc": null, "children": { - "value": "debug" + "value": "to_result" } } } @@ -22215,58 +23797,202 @@ "loc": null, "children": { "value": { - "kind": "Expr::Ident", + "kind": "Expr::Function", "loc": null, "children": { - "id": { - "kind": "Var", + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Apply", "loc": null, "children": { - "value": "s" - } - } - } - } - } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} - } - } - } - ] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Dot", + "loc": null, + "children": { + "pkg": "json", + "id": "from_json" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "input" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "debug" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "s" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } } } } @@ -26152,110 +27878,176 @@ } }, "expr": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Dot", - "loc": null, - "children": { - "pkg": "json", - "id": "from_json" - } - } + "value": "to_result" } } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", - "loc": null, - "children": [ - { - "kind": "Argument", - "loc": null, - "children": { - "value": { - "kind": "Expr::Ident", - "loc": null, - "children": { - "id": { - "kind": "Var", - "loc": null, - "children": { - "name": { - "kind": "LongIdent::Ident", - "loc": null, - "children": { - "value": "ts_json" - } - } - } - } - } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} - } - } - } - ] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} } } }, - "kind": { - "kind": "TryOperatorKind::Question", - "loc": null, - "children": {} - } - } - }, - "body": { - "kind": "Expr::Sequence", - "loc": null, - "children": { - "exprs": { - "kind": "Expr::Sequence::ExprList", + "args": { + "kind": "Expr::Apply::ArgumentList", "loc": null, "children": [ { - "kind": "Expr::Apply", + "kind": "Argument", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "value": { + "kind": "Expr::Function", "loc": null, "children": { - "id": { - "kind": "Var", + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", + "parameters": { + "kind": "Func::Lambda::ParameterList", "loc": null, - "children": { - "value": "println" - } - } + "children": [] + }, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Dot", + "loc": null, + "children": { + "pkg": "json", + "id": "from_json" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "ts_json" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "body": { + "kind": "Expr::Sequence", + "loc": null, + "children": { + "exprs": { + "kind": "Expr::Sequence::ExprList", + "loc": null, + "children": [ + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } } } } @@ -26786,78 +28578,144 @@ } }, "expr": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Dot", - "loc": null, - "children": { - "pkg": "json", - "id": "from_json" - } - } + "value": "to_result" } } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", "loc": null, - "children": [ - { - "kind": "Argument", + "children": { + "value": { + "kind": "Expr::Function", "loc": null, "children": { - "value": { - "kind": "Expr::Ident", + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "id": { - "kind": "Var", + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Apply", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "value": "es_json" + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Dot", + "loc": null, + "children": { + "pkg": "json", + "id": "from_json" + } + } + } + } } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "es_json" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} } } - } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } - ] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} + } } - } + ] }, - "kind": { - "kind": "TryOperatorKind::Question", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -27044,5 +28902,524 @@ } } } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "to_result" + } + }, + "has_error": null, + "is_async": null, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "f" + } + }, + "ty": { + "kind": "Type::Arrow", + "loc": null, + "children": { + "args": { + "kind": "Type::Arrow::ArgList", + "loc": null, + "children": [] + }, + "res": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "T" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "err": { + "kind": "ErrorType::ErrorType", + "loc": null, + "children": { + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "E" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + "is_async": null + } + } + } + } + ] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [ + { + "kind": "TypeVarBinder", + "loc": null, + "children": { + "name": "T", + "constraints": { + "kind": "TypeVarBinder::TypeVarConstraintList", + "loc": null, + "children": [] + } + } + }, + { + "kind": "TypeVarBinder", + "loc": null, + "children": { + "name": "E", + "constraints": { + "kind": "TypeVarBinder::TypeVarConstraintList", + "loc": null, + "children": [ + { + "kind": "TypeVarConstraint", + "loc": null, + "children": { + "trait": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Error" + } + } + } + } + ] + } + } + } + ] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [ + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "T" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "E" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + ] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::Try", + "loc": null, + "children": { + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "f" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "catch": { + "kind": "Expr::Try::CaseList", + "loc": null, + "children": [ + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "err" + } + } + } + }, + "guard": null, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Err" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::TypeName", + "loc": null, + "children": { + "value": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + }, + "is_object": false + } + } + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "err" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + ] + }, + "catch_all": false, + "try_else": { + "kind": "Expr::Try::CaseList", + "loc": null, + "children": [ + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "value" + } + } + } + }, + "guard": null, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Ok" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::TypeName", + "loc": null, + "children": { + "value": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + }, + "is_object": false + } + } + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "value" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + ] + }, + "has_try": true + } + } + } + } + } } ] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/pipeline_test_derive_from_json.mbt b/test/sync_test/__snapshot__/pipeline_test_derive_from_json.mbt index 87de2ebd..719fde8a 100644 --- a/test/sync_test/__snapshot__/pipeline_test_derive_from_json.mbt +++ b/test/sync_test/__snapshot__/pipeline_test_derive_from_json.mbt @@ -87,58 +87,58 @@ enum E0 { ///| fn testErrEnum(j : Json) -> Result[ConnectionError, @json.JsonDecodeError] { - try? @json.from_json(j) + to_result(() => @json.from_json(j)) } ///| fn testE0(j : Json) -> Result[E0, @json.JsonDecodeError] { - try? @json.from_json(j) + to_result(() => @json.from_json(j)) } ///| fn testT1(j : Json) -> Result[T1[Array[Int]], @json.JsonDecodeError] { - try? @json.from_json(j) + to_result(() => @json.from_json(j)) } ///| fn testNT(j : Json) -> Result[NT[T1[Array[Int]]], @json.JsonDecodeError] { - try? @json.from_json(j) + to_result(() => @json.from_json(j)) } ///| fn testEE(j : Json) -> Result[EE, @json.JsonDecodeError] { - try? @json.from_json(j) + to_result(() => @json.from_json(j)) } ///| fn testS(j : Json) -> Result[S, @json.JsonDecodeError] { // let serialized : S = @json.from_json!(j) - try? @json.from_json(j) + to_result(() => @json.from_json(j)) } ///| fn testEEE(j : Json) -> Result[EEE, @json.JsonDecodeError] { - try? @json.from_json(j) + to_result(() => @json.from_json(j)) } ///| fn testA(j : Json) -> Result[A, @json.JsonDecodeError] { - try? @json.from_json(j) + to_result(() => @json.from_json(j)) } ///| fn testE(j : Json) -> Result[E, @json.JsonDecodeError] { - try? @json.from_json(j) + to_result(() => @json.from_json(j)) } ///| fn testEI(j : Json) -> Result[EI, @json.JsonDecodeError] { - try? @json.from_json(j) + to_result(() => @json.from_json(j)) } ///| fn testNested(j : Json) -> Result[Nested3, @json.JsonDecodeError] { - try? @json.from_json(j) + to_result(() => @json.from_json(j)) } ///| @@ -218,7 +218,7 @@ fn init { "nested_optional_string": ["str"], "number2": 42, } - let s : Result[StructWithOptionalFields, _] = try? @json.from_json(input) + let s : Result[StructWithOptionalFields, _] = to_result(() => @json.from_json(input)) println("\{s == expected}, struct:\{Debug::to_repr(s)}") // println("Optional fields missing") @@ -232,7 +232,7 @@ fn init { number2: 42, }) let input : Json = { "number": 42, "string": "str", "number2": 42 } - let s : Result[StructWithOptionalFields, _] = try? @json.from_json(input) + let s : Result[StructWithOptionalFields, _] = to_result(() => @json.from_json(input)) println("\{s == expected}, struct:\{Debug::to_repr(s)}") // println("Some(None) for nested optional fields") @@ -254,7 +254,7 @@ fn init { "nested_optional_string": Json::null(), "number2": 42, } - let s : Result[StructWithOptionalFields, _] = try? @json.from_json(input) + let s : Result[StructWithOptionalFields, _] = to_result(() => @json.from_json(input)) println("\{s == expected}, struct:\{Debug::to_repr(s)}") } @@ -291,19 +291,19 @@ fn init { println("") println("Field and variant renames") let input : Json = { "b": 42 } - let s : Result[FieldRename, _] = try? @json.from_json(input) + let s : Result[FieldRename, _] = to_result(() => @json.from_json(input)) debug(s) let input : Json = ["D1", 42] - let s : Result[VariantRename, _] = try? @json.from_json(input) + let s : Result[VariantRename, _] = to_result(() => @json.from_json(input)) debug(s) let input : Json = { "myField": 42 } - let s : Result[FieldRenameAllCamel, _] = try? @json.from_json(input) + let s : Result[FieldRenameAllCamel, _] = to_result(() => @json.from_json(input)) debug(s) let input : Json = { "MY_FIELD": 42 } - let s : Result[FieldRenameAllScreamingSnake, _] = try? @json.from_json(input) + let s : Result[FieldRenameAllScreamingSnake, _] = to_result(() => @json.from_json(input)) debug(s) let input : Json = ["my_variant", 42] - let s : Result[VariantRenameAllSnake, _] = try? @json.from_json(input) + let s : Result[VariantRenameAllSnake, _] = to_result(() => @json.from_json(input)) debug(s) } @@ -331,27 +331,27 @@ fn init { // println("Legacy style") let input : Json = { "$tag": "C1" } - let s : Result[NewStyleLegacy, _] = try? @json.from_json(input) + let s : Result[NewStyleLegacy, _] = to_result(() => @json.from_json(input)) debug(s) let input : Json = { "$tag": "C2", "0": "str" } - let s : Result[NewStyleLegacy, _] = try? @json.from_json(input) + let s : Result[NewStyleLegacy, _] = to_result(() => @json.from_json(input)) debug(s) let input : Json = { "$tag": "C3", "0": 42, "1": true } - let s : Result[NewStyleLegacy, _] = try? @json.from_json(input) + let s : Result[NewStyleLegacy, _] = to_result(() => @json.from_json(input)) debug(s) // println("Flat style") let input : Json = "C1" - let s : Result[NewStyleFlat, _] = try? @json.from_json(input) + let s : Result[NewStyleFlat, _] = to_result(() => @json.from_json(input)) debug(s) let input : Json = ["C2", "str"] - let s : Result[NewStyleFlat, _] = try? @json.from_json(input) + let s : Result[NewStyleFlat, _] = to_result(() => @json.from_json(input)) debug(s) let input : Json = ["C3", 42, true] - let s : Result[NewStyleFlat, _] = try? @json.from_json(input) + let s : Result[NewStyleFlat, _] = to_result(() => @json.from_json(input)) debug(s) let input : Json = ["C4", 42, 100, { "x": true, "y": "str" }] - let s : Result[NewStyleFlat, _] = try? @json.from_json(input) + let s : Result[NewStyleFlat, _] = to_result(() => @json.from_json(input)) debug(s) } @@ -431,7 +431,7 @@ fn init { let ts_json = ts.to_json() println("Original: \{Debug::to_repr(ts)}") println("JSON: \{ts_json.stringify()}") - let ts_parsed : Result[TupleStruct, _] = try? @json.from_json(ts_json) + let ts_parsed : Result[TupleStruct, _] = to_result(() => @json.from_json(ts_json)) println("Round-trip: \{Debug::to_repr(ts_parsed)}") println("Equal: \{ts_parsed == Result::Ok(ts)}") @@ -441,7 +441,16 @@ fn init { let es_json = es.to_json() println("Original: \{Debug::to_repr(es)}") println("JSON: \{es_json.stringify()}") - let es_parsed : Result[EmptyStruct, _] = try? @json.from_json(es_json) + let es_parsed : Result[EmptyStruct, _] = to_result(() => @json.from_json(es_json)) println("Round-trip: \{Debug::to_repr(es_parsed)}") println("Equal: \{es_parsed == Result::Ok(es)}") } + +fn[T, E : Error] to_result(f : () -> T raise E) -> Result[T, E] { + try f() + catch { + err => Result::Err(err) + } noraise { + value => Result::Ok(value) + } +} diff --git a/test/sync_test/__snapshot__/pipeline_test_derive_from_json.mbt.tokens.json b/test/sync_test/__snapshot__/pipeline_test_derive_from_json.mbt.tokens.json index 105c0a95..290fba15 100644 --- a/test/sync_test/__snapshot__/pipeline_test_derive_from_json.mbt.tokens.json +++ b/test/sync_test/__snapshot__/pipeline_test_derive_from_json.mbt.tokens.json @@ -2625,41 +2625,64 @@ "loc": "89:77-89:78" }, { - "token": "TRY_QUESTION", - "loc": "90:3-90:7" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "90:3-90:12" + }, + { + "token": "LPAREN", + "loc": "90:12-90:13" + }, + { + "token": "LPAREN", + "loc": "90:13-90:14" + }, + { + "token": "RPAREN", + "loc": "90:14-90:15" + }, + { + "token": "FAT_ARROW", + "loc": "90:16-90:18" }, { "token": [ "PACKAGE_NAME", "json" ], - "loc": "90:8-90:13" + "loc": "90:19-90:24" }, { "token": [ "DOT_LIDENT", "from_json" ], - "loc": "90:14-90:23" + "loc": "90:25-90:34" }, { "token": "LPAREN", - "loc": "90:23-90:24" + "loc": "90:34-90:35" }, { "token": [ "LIDENT", "j" ], - "loc": "90:24-90:25" + "loc": "90:35-90:36" + }, + { + "token": "RPAREN", + "loc": "90:36-90:37" }, { "token": "RPAREN", - "loc": "90:25-90:26" + "loc": "90:37-90:38" }, { "token": "NEWLINE", - "loc": "90:26-90:27" + "loc": "90:38-90:39" }, { "token": "RBRACE", @@ -2791,41 +2814,64 @@ "loc": "94:59-94:60" }, { - "token": "TRY_QUESTION", - "loc": "95:3-95:7" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "95:3-95:12" + }, + { + "token": "LPAREN", + "loc": "95:12-95:13" + }, + { + "token": "LPAREN", + "loc": "95:13-95:14" + }, + { + "token": "RPAREN", + "loc": "95:14-95:15" + }, + { + "token": "FAT_ARROW", + "loc": "95:16-95:18" }, { "token": [ "PACKAGE_NAME", "json" ], - "loc": "95:8-95:13" + "loc": "95:19-95:24" }, { "token": [ "DOT_LIDENT", "from_json" ], - "loc": "95:14-95:23" + "loc": "95:25-95:34" }, { "token": "LPAREN", - "loc": "95:23-95:24" + "loc": "95:34-95:35" }, { "token": [ "LIDENT", "j" ], - "loc": "95:24-95:25" + "loc": "95:35-95:36" + }, + { + "token": "RPAREN", + "loc": "95:36-95:37" }, { "token": "RPAREN", - "loc": "95:25-95:26" + "loc": "95:37-95:38" }, { "token": "NEWLINE", - "loc": "95:26-95:27" + "loc": "95:38-95:39" }, { "token": "RBRACE", @@ -2987,41 +3033,64 @@ "loc": "99:71-99:72" }, { - "token": "TRY_QUESTION", - "loc": "100:3-100:7" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "100:3-100:12" + }, + { + "token": "LPAREN", + "loc": "100:12-100:13" + }, + { + "token": "LPAREN", + "loc": "100:13-100:14" + }, + { + "token": "RPAREN", + "loc": "100:14-100:15" + }, + { + "token": "FAT_ARROW", + "loc": "100:16-100:18" }, { "token": [ "PACKAGE_NAME", "json" ], - "loc": "100:8-100:13" + "loc": "100:19-100:24" }, { "token": [ "DOT_LIDENT", "from_json" ], - "loc": "100:14-100:23" + "loc": "100:25-100:34" }, { "token": "LPAREN", - "loc": "100:23-100:24" + "loc": "100:34-100:35" }, { "token": [ "LIDENT", "j" ], - "loc": "100:24-100:25" + "loc": "100:35-100:36" }, { "token": "RPAREN", - "loc": "100:25-100:26" + "loc": "100:36-100:37" + }, + { + "token": "RPAREN", + "loc": "100:37-100:38" }, { "token": "NEWLINE", - "loc": "100:26-100:27" + "loc": "100:38-100:39" }, { "token": "RBRACE", @@ -3198,41 +3267,64 @@ "loc": "104:75-104:76" }, { - "token": "TRY_QUESTION", - "loc": "105:3-105:7" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "105:3-105:12" + }, + { + "token": "LPAREN", + "loc": "105:12-105:13" + }, + { + "token": "LPAREN", + "loc": "105:13-105:14" + }, + { + "token": "RPAREN", + "loc": "105:14-105:15" + }, + { + "token": "FAT_ARROW", + "loc": "105:16-105:18" }, { "token": [ "PACKAGE_NAME", "json" ], - "loc": "105:8-105:13" + "loc": "105:19-105:24" }, { "token": [ "DOT_LIDENT", "from_json" ], - "loc": "105:14-105:23" + "loc": "105:25-105:34" }, { "token": "LPAREN", - "loc": "105:23-105:24" + "loc": "105:34-105:35" }, { "token": [ "LIDENT", "j" ], - "loc": "105:24-105:25" + "loc": "105:35-105:36" + }, + { + "token": "RPAREN", + "loc": "105:36-105:37" }, { "token": "RPAREN", - "loc": "105:25-105:26" + "loc": "105:37-105:38" }, { "token": "NEWLINE", - "loc": "105:26-105:27" + "loc": "105:38-105:39" }, { "token": "RBRACE", @@ -3364,41 +3456,64 @@ "loc": "109:59-109:60" }, { - "token": "TRY_QUESTION", - "loc": "110:3-110:7" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "110:3-110:12" + }, + { + "token": "LPAREN", + "loc": "110:12-110:13" + }, + { + "token": "LPAREN", + "loc": "110:13-110:14" + }, + { + "token": "RPAREN", + "loc": "110:14-110:15" + }, + { + "token": "FAT_ARROW", + "loc": "110:16-110:18" }, { "token": [ "PACKAGE_NAME", "json" ], - "loc": "110:8-110:13" + "loc": "110:19-110:24" }, { "token": [ "DOT_LIDENT", "from_json" ], - "loc": "110:14-110:23" + "loc": "110:25-110:34" }, { "token": "LPAREN", - "loc": "110:23-110:24" + "loc": "110:34-110:35" }, { "token": [ "LIDENT", "j" ], - "loc": "110:24-110:25" + "loc": "110:35-110:36" + }, + { + "token": "RPAREN", + "loc": "110:36-110:37" }, { "token": "RPAREN", - "loc": "110:25-110:26" + "loc": "110:37-110:38" }, { "token": "NEWLINE", - "loc": "110:26-110:27" + "loc": "110:38-110:39" }, { "token": "RBRACE", @@ -3551,41 +3666,64 @@ "loc": "115:46-115:47" }, { - "token": "TRY_QUESTION", - "loc": "116:3-116:7" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "116:3-116:12" + }, + { + "token": "LPAREN", + "loc": "116:12-116:13" + }, + { + "token": "LPAREN", + "loc": "116:13-116:14" + }, + { + "token": "RPAREN", + "loc": "116:14-116:15" + }, + { + "token": "FAT_ARROW", + "loc": "116:16-116:18" }, { "token": [ "PACKAGE_NAME", "json" ], - "loc": "116:8-116:13" + "loc": "116:19-116:24" }, { "token": [ "DOT_LIDENT", "from_json" ], - "loc": "116:14-116:23" + "loc": "116:25-116:34" }, { "token": "LPAREN", - "loc": "116:23-116:24" + "loc": "116:34-116:35" }, { "token": [ "LIDENT", "j" ], - "loc": "116:24-116:25" + "loc": "116:35-116:36" + }, + { + "token": "RPAREN", + "loc": "116:36-116:37" }, { "token": "RPAREN", - "loc": "116:25-116:26" + "loc": "116:37-116:38" }, { "token": "NEWLINE", - "loc": "116:26-116:27" + "loc": "116:38-116:39" }, { "token": "RBRACE", @@ -3717,41 +3855,64 @@ "loc": "120:61-120:62" }, { - "token": "TRY_QUESTION", - "loc": "121:3-121:7" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "121:3-121:12" + }, + { + "token": "LPAREN", + "loc": "121:12-121:13" + }, + { + "token": "LPAREN", + "loc": "121:13-121:14" + }, + { + "token": "RPAREN", + "loc": "121:14-121:15" + }, + { + "token": "FAT_ARROW", + "loc": "121:16-121:18" }, { "token": [ "PACKAGE_NAME", "json" ], - "loc": "121:8-121:13" + "loc": "121:19-121:24" }, { "token": [ "DOT_LIDENT", "from_json" ], - "loc": "121:14-121:23" + "loc": "121:25-121:34" }, { "token": "LPAREN", - "loc": "121:23-121:24" + "loc": "121:34-121:35" }, { "token": [ "LIDENT", "j" ], - "loc": "121:24-121:25" + "loc": "121:35-121:36" }, { "token": "RPAREN", - "loc": "121:25-121:26" + "loc": "121:36-121:37" + }, + { + "token": "RPAREN", + "loc": "121:37-121:38" }, { "token": "NEWLINE", - "loc": "121:26-121:27" + "loc": "121:38-121:39" }, { "token": "RBRACE", @@ -3883,41 +4044,64 @@ "loc": "125:57-125:58" }, { - "token": "TRY_QUESTION", - "loc": "126:3-126:7" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "126:3-126:12" + }, + { + "token": "LPAREN", + "loc": "126:12-126:13" + }, + { + "token": "LPAREN", + "loc": "126:13-126:14" + }, + { + "token": "RPAREN", + "loc": "126:14-126:15" + }, + { + "token": "FAT_ARROW", + "loc": "126:16-126:18" }, { "token": [ "PACKAGE_NAME", "json" ], - "loc": "126:8-126:13" + "loc": "126:19-126:24" }, { "token": [ "DOT_LIDENT", "from_json" ], - "loc": "126:14-126:23" + "loc": "126:25-126:34" }, { "token": "LPAREN", - "loc": "126:23-126:24" + "loc": "126:34-126:35" }, { "token": [ "LIDENT", "j" ], - "loc": "126:24-126:25" + "loc": "126:35-126:36" + }, + { + "token": "RPAREN", + "loc": "126:36-126:37" }, { "token": "RPAREN", - "loc": "126:25-126:26" + "loc": "126:37-126:38" }, { "token": "NEWLINE", - "loc": "126:26-126:27" + "loc": "126:38-126:39" }, { "token": "RBRACE", @@ -4049,41 +4233,64 @@ "loc": "130:57-130:58" }, { - "token": "TRY_QUESTION", - "loc": "131:3-131:7" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "131:3-131:12" + }, + { + "token": "LPAREN", + "loc": "131:12-131:13" + }, + { + "token": "LPAREN", + "loc": "131:13-131:14" + }, + { + "token": "RPAREN", + "loc": "131:14-131:15" + }, + { + "token": "FAT_ARROW", + "loc": "131:16-131:18" }, { "token": [ "PACKAGE_NAME", "json" ], - "loc": "131:8-131:13" + "loc": "131:19-131:24" }, { "token": [ "DOT_LIDENT", "from_json" ], - "loc": "131:14-131:23" + "loc": "131:25-131:34" }, { "token": "LPAREN", - "loc": "131:23-131:24" + "loc": "131:34-131:35" }, { "token": [ "LIDENT", "j" ], - "loc": "131:24-131:25" + "loc": "131:35-131:36" + }, + { + "token": "RPAREN", + "loc": "131:36-131:37" }, { "token": "RPAREN", - "loc": "131:25-131:26" + "loc": "131:37-131:38" }, { "token": "NEWLINE", - "loc": "131:26-131:27" + "loc": "131:38-131:39" }, { "token": "RBRACE", @@ -4215,41 +4422,64 @@ "loc": "135:59-135:60" }, { - "token": "TRY_QUESTION", - "loc": "136:3-136:7" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "136:3-136:12" + }, + { + "token": "LPAREN", + "loc": "136:12-136:13" + }, + { + "token": "LPAREN", + "loc": "136:13-136:14" + }, + { + "token": "RPAREN", + "loc": "136:14-136:15" + }, + { + "token": "FAT_ARROW", + "loc": "136:16-136:18" }, { "token": [ "PACKAGE_NAME", "json" ], - "loc": "136:8-136:13" + "loc": "136:19-136:24" }, { "token": [ "DOT_LIDENT", "from_json" ], - "loc": "136:14-136:23" + "loc": "136:25-136:34" }, { "token": "LPAREN", - "loc": "136:23-136:24" + "loc": "136:34-136:35" }, { "token": [ "LIDENT", "j" ], - "loc": "136:24-136:25" + "loc": "136:35-136:36" + }, + { + "token": "RPAREN", + "loc": "136:36-136:37" }, { "token": "RPAREN", - "loc": "136:25-136:26" + "loc": "136:37-136:38" }, { "token": "NEWLINE", - "loc": "136:26-136:27" + "loc": "136:38-136:39" }, { "token": "RBRACE", @@ -4381,41 +4611,64 @@ "loc": "140:68-140:69" }, { - "token": "TRY_QUESTION", - "loc": "141:3-141:7" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "141:3-141:12" + }, + { + "token": "LPAREN", + "loc": "141:12-141:13" + }, + { + "token": "LPAREN", + "loc": "141:13-141:14" + }, + { + "token": "RPAREN", + "loc": "141:14-141:15" + }, + { + "token": "FAT_ARROW", + "loc": "141:16-141:18" }, { "token": [ "PACKAGE_NAME", "json" ], - "loc": "141:8-141:13" + "loc": "141:19-141:24" }, { "token": [ "DOT_LIDENT", "from_json" ], - "loc": "141:14-141:23" + "loc": "141:25-141:34" }, { "token": "LPAREN", - "loc": "141:23-141:24" + "loc": "141:34-141:35" }, { "token": [ "LIDENT", "j" ], - "loc": "141:24-141:25" + "loc": "141:35-141:36" }, { "token": "RPAREN", - "loc": "141:25-141:26" + "loc": "141:36-141:37" + }, + { + "token": "RPAREN", + "loc": "141:37-141:38" }, { "token": "NEWLINE", - "loc": "141:26-141:27" + "loc": "141:38-141:39" }, { "token": "RBRACE", @@ -8354,48 +8607,71 @@ "loc": "221:47-221:48" }, { - "token": "TRY_QUESTION", - "loc": "221:49-221:53" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "221:49-221:58" + }, + { + "token": "LPAREN", + "loc": "221:58-221:59" + }, + { + "token": "LPAREN", + "loc": "221:59-221:60" + }, + { + "token": "RPAREN", + "loc": "221:60-221:61" + }, + { + "token": "FAT_ARROW", + "loc": "221:62-221:64" }, { "token": [ "PACKAGE_NAME", "json" ], - "loc": "221:54-221:59" + "loc": "221:65-221:70" }, { "token": [ "DOT_LIDENT", "from_json" ], - "loc": "221:60-221:69" + "loc": "221:71-221:80" }, { "token": "LPAREN", - "loc": "221:69-221:70" + "loc": "221:80-221:81" }, { "token": [ "LIDENT", "input" ], - "loc": "221:70-221:75" + "loc": "221:81-221:86" + }, + { + "token": "RPAREN", + "loc": "221:86-221:87" }, { "token": "RPAREN", - "loc": "221:75-221:76" + "loc": "221:87-221:88" }, { "token": [ "SEMI", false ], - "loc": "221:76-221:76" + "loc": "221:88-221:88" }, { "token": "NEWLINE", - "loc": "221:76-221:77" + "loc": "221:88-221:89" }, { "token": [ @@ -8887,48 +9163,71 @@ "loc": "235:47-235:48" }, { - "token": "TRY_QUESTION", - "loc": "235:49-235:53" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "235:49-235:58" + }, + { + "token": "LPAREN", + "loc": "235:58-235:59" + }, + { + "token": "LPAREN", + "loc": "235:59-235:60" + }, + { + "token": "RPAREN", + "loc": "235:60-235:61" + }, + { + "token": "FAT_ARROW", + "loc": "235:62-235:64" }, { "token": [ "PACKAGE_NAME", "json" ], - "loc": "235:54-235:59" + "loc": "235:65-235:70" }, { "token": [ "DOT_LIDENT", "from_json" ], - "loc": "235:60-235:69" + "loc": "235:71-235:80" }, { "token": "LPAREN", - "loc": "235:69-235:70" + "loc": "235:80-235:81" }, { "token": [ "LIDENT", "input" ], - "loc": "235:70-235:75" + "loc": "235:81-235:86" + }, + { + "token": "RPAREN", + "loc": "235:86-235:87" }, { "token": "RPAREN", - "loc": "235:75-235:76" + "loc": "235:87-235:88" }, { "token": [ "SEMI", false ], - "loc": "235:76-235:76" + "loc": "235:88-235:88" }, { "token": "NEWLINE", - "loc": "235:76-235:77" + "loc": "235:88-235:89" }, { "token": [ @@ -9642,48 +9941,71 @@ "loc": "257:47-257:48" }, { - "token": "TRY_QUESTION", - "loc": "257:49-257:53" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "257:49-257:58" + }, + { + "token": "LPAREN", + "loc": "257:58-257:59" + }, + { + "token": "LPAREN", + "loc": "257:59-257:60" + }, + { + "token": "RPAREN", + "loc": "257:60-257:61" + }, + { + "token": "FAT_ARROW", + "loc": "257:62-257:64" }, { "token": [ "PACKAGE_NAME", "json" ], - "loc": "257:54-257:59" + "loc": "257:65-257:70" }, { "token": [ "DOT_LIDENT", "from_json" ], - "loc": "257:60-257:69" + "loc": "257:71-257:80" }, { "token": "LPAREN", - "loc": "257:69-257:70" + "loc": "257:80-257:81" }, { "token": [ "LIDENT", "input" ], - "loc": "257:70-257:75" + "loc": "257:81-257:86" + }, + { + "token": "RPAREN", + "loc": "257:86-257:87" }, { "token": "RPAREN", - "loc": "257:75-257:76" + "loc": "257:87-257:88" }, { "token": [ "SEMI", false ], - "loc": "257:76-257:76" + "loc": "257:88-257:88" }, { "token": "NEWLINE", - "loc": "257:76-257:77" + "loc": "257:88-257:89" }, { "token": [ @@ -10760,48 +11082,71 @@ "loc": "294:34-294:35" }, { - "token": "TRY_QUESTION", - "loc": "294:36-294:40" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "294:36-294:45" + }, + { + "token": "LPAREN", + "loc": "294:45-294:46" + }, + { + "token": "LPAREN", + "loc": "294:46-294:47" + }, + { + "token": "RPAREN", + "loc": "294:47-294:48" + }, + { + "token": "FAT_ARROW", + "loc": "294:49-294:51" }, { "token": [ "PACKAGE_NAME", "json" ], - "loc": "294:41-294:46" + "loc": "294:52-294:57" }, { "token": [ "DOT_LIDENT", "from_json" ], - "loc": "294:47-294:56" + "loc": "294:58-294:67" }, { "token": "LPAREN", - "loc": "294:56-294:57" + "loc": "294:67-294:68" }, { "token": [ "LIDENT", "input" ], - "loc": "294:57-294:62" + "loc": "294:68-294:73" }, { "token": "RPAREN", - "loc": "294:62-294:63" + "loc": "294:73-294:74" + }, + { + "token": "RPAREN", + "loc": "294:74-294:75" }, { "token": [ "SEMI", false ], - "loc": "294:63-294:63" + "loc": "294:75-294:75" }, { "token": "NEWLINE", - "loc": "294:63-294:64" + "loc": "294:75-294:76" }, { "token": [ @@ -10949,48 +11294,71 @@ "loc": "297:36-297:37" }, { - "token": "TRY_QUESTION", - "loc": "297:38-297:42" - }, + "token": [ + "LIDENT", + "to_result" + ], + "loc": "297:38-297:47" + }, + { + "token": "LPAREN", + "loc": "297:47-297:48" + }, + { + "token": "LPAREN", + "loc": "297:48-297:49" + }, + { + "token": "RPAREN", + "loc": "297:49-297:50" + }, + { + "token": "FAT_ARROW", + "loc": "297:51-297:53" + }, { "token": [ "PACKAGE_NAME", "json" ], - "loc": "297:43-297:48" + "loc": "297:54-297:59" }, { "token": [ "DOT_LIDENT", "from_json" ], - "loc": "297:49-297:58" + "loc": "297:60-297:69" }, { "token": "LPAREN", - "loc": "297:58-297:59" + "loc": "297:69-297:70" }, { "token": [ "LIDENT", "input" ], - "loc": "297:59-297:64" + "loc": "297:70-297:75" }, { "token": "RPAREN", - "loc": "297:64-297:65" + "loc": "297:75-297:76" + }, + { + "token": "RPAREN", + "loc": "297:76-297:77" }, { "token": [ "SEMI", false ], - "loc": "297:65-297:65" + "loc": "297:77-297:77" }, { "token": "NEWLINE", - "loc": "297:65-297:66" + "loc": "297:77-297:78" }, { "token": [ @@ -11138,48 +11506,71 @@ "loc": "300:42-300:43" }, { - "token": "TRY_QUESTION", - "loc": "300:44-300:48" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "300:44-300:53" + }, + { + "token": "LPAREN", + "loc": "300:53-300:54" + }, + { + "token": "LPAREN", + "loc": "300:54-300:55" + }, + { + "token": "RPAREN", + "loc": "300:55-300:56" + }, + { + "token": "FAT_ARROW", + "loc": "300:57-300:59" }, { "token": [ "PACKAGE_NAME", "json" ], - "loc": "300:49-300:54" + "loc": "300:60-300:65" }, { "token": [ "DOT_LIDENT", "from_json" ], - "loc": "300:55-300:64" + "loc": "300:66-300:75" }, { "token": "LPAREN", - "loc": "300:64-300:65" + "loc": "300:75-300:76" }, { "token": [ "LIDENT", "input" ], - "loc": "300:65-300:70" + "loc": "300:76-300:81" + }, + { + "token": "RPAREN", + "loc": "300:81-300:82" }, { "token": "RPAREN", - "loc": "300:70-300:71" + "loc": "300:82-300:83" }, { "token": [ "SEMI", false ], - "loc": "300:71-300:71" + "loc": "300:83-300:83" }, { "token": "NEWLINE", - "loc": "300:71-300:72" + "loc": "300:83-300:84" }, { "token": [ @@ -11327,48 +11718,71 @@ "loc": "303:51-303:52" }, { - "token": "TRY_QUESTION", - "loc": "303:53-303:57" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "303:53-303:62" + }, + { + "token": "LPAREN", + "loc": "303:62-303:63" + }, + { + "token": "LPAREN", + "loc": "303:63-303:64" + }, + { + "token": "RPAREN", + "loc": "303:64-303:65" + }, + { + "token": "FAT_ARROW", + "loc": "303:66-303:68" }, { "token": [ "PACKAGE_NAME", "json" ], - "loc": "303:58-303:63" + "loc": "303:69-303:74" }, { "token": [ "DOT_LIDENT", "from_json" ], - "loc": "303:64-303:73" + "loc": "303:75-303:84" }, { "token": "LPAREN", - "loc": "303:73-303:74" + "loc": "303:84-303:85" }, { "token": [ "LIDENT", "input" ], - "loc": "303:74-303:79" + "loc": "303:85-303:90" + }, + { + "token": "RPAREN", + "loc": "303:90-303:91" }, { "token": "RPAREN", - "loc": "303:79-303:80" + "loc": "303:91-303:92" }, { "token": [ "SEMI", false ], - "loc": "303:80-303:80" + "loc": "303:92-303:92" }, { "token": "NEWLINE", - "loc": "303:80-303:81" + "loc": "303:92-303:93" }, { "token": [ @@ -11516,48 +11930,71 @@ "loc": "306:44-306:45" }, { - "token": "TRY_QUESTION", - "loc": "306:46-306:50" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "306:46-306:55" + }, + { + "token": "LPAREN", + "loc": "306:55-306:56" + }, + { + "token": "LPAREN", + "loc": "306:56-306:57" + }, + { + "token": "RPAREN", + "loc": "306:57-306:58" + }, + { + "token": "FAT_ARROW", + "loc": "306:59-306:61" }, { "token": [ "PACKAGE_NAME", "json" ], - "loc": "306:51-306:56" + "loc": "306:62-306:67" }, { "token": [ "DOT_LIDENT", "from_json" ], - "loc": "306:57-306:66" + "loc": "306:68-306:77" }, { "token": "LPAREN", - "loc": "306:66-306:67" + "loc": "306:77-306:78" }, { "token": [ "LIDENT", "input" ], - "loc": "306:67-306:72" + "loc": "306:78-306:83" }, { "token": "RPAREN", - "loc": "306:72-306:73" + "loc": "306:83-306:84" + }, + { + "token": "RPAREN", + "loc": "306:84-306:85" }, { "token": [ "SEMI", false ], - "loc": "306:73-306:73" + "loc": "306:85-306:85" }, { "token": "NEWLINE", - "loc": "306:73-306:74" + "loc": "306:85-306:86" }, { "token": [ @@ -12396,48 +12833,71 @@ "loc": "334:37-334:38" }, { - "token": "TRY_QUESTION", - "loc": "334:39-334:43" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "334:39-334:48" + }, + { + "token": "LPAREN", + "loc": "334:48-334:49" + }, + { + "token": "LPAREN", + "loc": "334:49-334:50" + }, + { + "token": "RPAREN", + "loc": "334:50-334:51" + }, + { + "token": "FAT_ARROW", + "loc": "334:52-334:54" }, { "token": [ "PACKAGE_NAME", "json" ], - "loc": "334:44-334:49" + "loc": "334:55-334:60" }, { "token": [ "DOT_LIDENT", "from_json" ], - "loc": "334:50-334:59" + "loc": "334:61-334:70" }, { "token": "LPAREN", - "loc": "334:59-334:60" + "loc": "334:70-334:71" }, { "token": [ "LIDENT", "input" ], - "loc": "334:60-334:65" + "loc": "334:71-334:76" }, { "token": "RPAREN", - "loc": "334:65-334:66" + "loc": "334:76-334:77" + }, + { + "token": "RPAREN", + "loc": "334:77-334:78" }, { "token": [ "SEMI", false ], - "loc": "334:66-334:66" + "loc": "334:78-334:78" }, { "token": "NEWLINE", - "loc": "334:66-334:67" + "loc": "334:78-334:79" }, { "token": [ @@ -12607,48 +13067,71 @@ "loc": "337:37-337:38" }, { - "token": "TRY_QUESTION", - "loc": "337:39-337:43" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "337:39-337:48" + }, + { + "token": "LPAREN", + "loc": "337:48-337:49" + }, + { + "token": "LPAREN", + "loc": "337:49-337:50" + }, + { + "token": "RPAREN", + "loc": "337:50-337:51" + }, + { + "token": "FAT_ARROW", + "loc": "337:52-337:54" }, { "token": [ "PACKAGE_NAME", "json" ], - "loc": "337:44-337:49" + "loc": "337:55-337:60" }, { "token": [ "DOT_LIDENT", "from_json" ], - "loc": "337:50-337:59" + "loc": "337:61-337:70" }, { "token": "LPAREN", - "loc": "337:59-337:60" + "loc": "337:70-337:71" }, { "token": [ "LIDENT", "input" ], - "loc": "337:60-337:65" + "loc": "337:71-337:76" }, { "token": "RPAREN", - "loc": "337:65-337:66" + "loc": "337:76-337:77" + }, + { + "token": "RPAREN", + "loc": "337:77-337:78" }, { "token": [ "SEMI", false ], - "loc": "337:66-337:66" + "loc": "337:78-337:78" }, { "token": "NEWLINE", - "loc": "337:66-337:67" + "loc": "337:78-337:79" }, { "token": [ @@ -12837,48 +13320,71 @@ "loc": "340:37-340:38" }, { - "token": "TRY_QUESTION", - "loc": "340:39-340:43" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "340:39-340:48" + }, + { + "token": "LPAREN", + "loc": "340:48-340:49" + }, + { + "token": "LPAREN", + "loc": "340:49-340:50" + }, + { + "token": "RPAREN", + "loc": "340:50-340:51" + }, + { + "token": "FAT_ARROW", + "loc": "340:52-340:54" }, { "token": [ "PACKAGE_NAME", "json" ], - "loc": "340:44-340:49" + "loc": "340:55-340:60" }, { "token": [ "DOT_LIDENT", "from_json" ], - "loc": "340:50-340:59" + "loc": "340:61-340:70" }, { "token": "LPAREN", - "loc": "340:59-340:60" + "loc": "340:70-340:71" }, { "token": [ "LIDENT", "input" ], - "loc": "340:60-340:65" + "loc": "340:71-340:76" + }, + { + "token": "RPAREN", + "loc": "340:76-340:77" }, { "token": "RPAREN", - "loc": "340:65-340:66" + "loc": "340:77-340:78" }, { "token": [ "SEMI", false ], - "loc": "340:66-340:66" + "loc": "340:78-340:78" }, { "token": "NEWLINE", - "loc": "340:66-340:67" + "loc": "340:78-340:79" }, { "token": [ @@ -13061,48 +13567,71 @@ "loc": "345:35-345:36" }, { - "token": "TRY_QUESTION", - "loc": "345:37-345:41" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "345:37-345:46" + }, + { + "token": "LPAREN", + "loc": "345:46-345:47" + }, + { + "token": "LPAREN", + "loc": "345:47-345:48" + }, + { + "token": "RPAREN", + "loc": "345:48-345:49" + }, + { + "token": "FAT_ARROW", + "loc": "345:50-345:52" }, { "token": [ "PACKAGE_NAME", "json" ], - "loc": "345:42-345:47" + "loc": "345:53-345:58" }, { "token": [ "DOT_LIDENT", "from_json" ], - "loc": "345:48-345:57" + "loc": "345:59-345:68" }, { "token": "LPAREN", - "loc": "345:57-345:58" + "loc": "345:68-345:69" }, { "token": [ "LIDENT", "input" ], - "loc": "345:58-345:63" + "loc": "345:69-345:74" }, { "token": "RPAREN", - "loc": "345:63-345:64" + "loc": "345:74-345:75" + }, + { + "token": "RPAREN", + "loc": "345:75-345:76" }, { "token": [ "SEMI", false ], - "loc": "345:64-345:64" + "loc": "345:76-345:76" }, { "token": "NEWLINE", - "loc": "345:64-345:65" + "loc": "345:76-345:77" }, { "token": [ @@ -13250,48 +13779,71 @@ "loc": "348:35-348:36" }, { - "token": "TRY_QUESTION", - "loc": "348:37-348:41" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "348:37-348:46" + }, + { + "token": "LPAREN", + "loc": "348:46-348:47" + }, + { + "token": "LPAREN", + "loc": "348:47-348:48" + }, + { + "token": "RPAREN", + "loc": "348:48-348:49" + }, + { + "token": "FAT_ARROW", + "loc": "348:50-348:52" }, { "token": [ "PACKAGE_NAME", "json" ], - "loc": "348:42-348:47" + "loc": "348:53-348:58" }, { "token": [ "DOT_LIDENT", "from_json" ], - "loc": "348:48-348:57" + "loc": "348:59-348:68" }, { "token": "LPAREN", - "loc": "348:57-348:58" + "loc": "348:68-348:69" }, { "token": [ "LIDENT", "input" ], - "loc": "348:58-348:63" + "loc": "348:69-348:74" }, { "token": "RPAREN", - "loc": "348:63-348:64" + "loc": "348:74-348:75" + }, + { + "token": "RPAREN", + "loc": "348:75-348:76" }, { "token": [ "SEMI", false ], - "loc": "348:64-348:64" + "loc": "348:76-348:76" }, { "token": "NEWLINE", - "loc": "348:64-348:65" + "loc": "348:76-348:77" }, { "token": [ @@ -13447,48 +13999,71 @@ "loc": "351:35-351:36" }, { - "token": "TRY_QUESTION", - "loc": "351:37-351:41" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "351:37-351:46" + }, + { + "token": "LPAREN", + "loc": "351:46-351:47" + }, + { + "token": "LPAREN", + "loc": "351:47-351:48" + }, + { + "token": "RPAREN", + "loc": "351:48-351:49" + }, + { + "token": "FAT_ARROW", + "loc": "351:50-351:52" }, { "token": [ "PACKAGE_NAME", "json" ], - "loc": "351:42-351:47" + "loc": "351:53-351:58" }, { "token": [ "DOT_LIDENT", "from_json" ], - "loc": "351:48-351:57" + "loc": "351:59-351:68" }, { "token": "LPAREN", - "loc": "351:57-351:58" + "loc": "351:68-351:69" }, { "token": [ "LIDENT", "input" ], - "loc": "351:58-351:63" + "loc": "351:69-351:74" + }, + { + "token": "RPAREN", + "loc": "351:74-351:75" }, { "token": "RPAREN", - "loc": "351:63-351:64" + "loc": "351:75-351:76" }, { "token": [ "SEMI", false ], - "loc": "351:64-351:64" + "loc": "351:76-351:76" }, { "token": "NEWLINE", - "loc": "351:64-351:65" + "loc": "351:76-351:77" }, { "token": [ @@ -13696,48 +14271,71 @@ "loc": "354:35-354:36" }, { - "token": "TRY_QUESTION", - "loc": "354:37-354:41" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "354:37-354:46" + }, + { + "token": "LPAREN", + "loc": "354:46-354:47" + }, + { + "token": "LPAREN", + "loc": "354:47-354:48" + }, + { + "token": "RPAREN", + "loc": "354:48-354:49" + }, + { + "token": "FAT_ARROW", + "loc": "354:50-354:52" }, { "token": [ "PACKAGE_NAME", "json" ], - "loc": "354:42-354:47" + "loc": "354:53-354:58" }, { "token": [ "DOT_LIDENT", "from_json" ], - "loc": "354:48-354:57" + "loc": "354:59-354:68" }, { "token": "LPAREN", - "loc": "354:57-354:58" + "loc": "354:68-354:69" }, { "token": [ "LIDENT", "input" ], - "loc": "354:58-354:63" + "loc": "354:69-354:74" }, { "token": "RPAREN", - "loc": "354:63-354:64" + "loc": "354:74-354:75" + }, + { + "token": "RPAREN", + "loc": "354:75-354:76" }, { "token": [ "SEMI", false ], - "loc": "354:64-354:64" + "loc": "354:76-354:76" }, { "token": "NEWLINE", - "loc": "354:64-354:65" + "loc": "354:76-354:77" }, { "token": [ @@ -16374,48 +16972,71 @@ "loc": "434:42-434:43" }, { - "token": "TRY_QUESTION", - "loc": "434:44-434:48" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "434:44-434:53" + }, + { + "token": "LPAREN", + "loc": "434:53-434:54" + }, + { + "token": "LPAREN", + "loc": "434:54-434:55" + }, + { + "token": "RPAREN", + "loc": "434:55-434:56" + }, + { + "token": "FAT_ARROW", + "loc": "434:57-434:59" }, { "token": [ "PACKAGE_NAME", "json" ], - "loc": "434:49-434:54" + "loc": "434:60-434:65" }, { "token": [ "DOT_LIDENT", "from_json" ], - "loc": "434:55-434:64" + "loc": "434:66-434:75" }, { "token": "LPAREN", - "loc": "434:64-434:65" + "loc": "434:75-434:76" }, { "token": [ "LIDENT", "ts_json" ], - "loc": "434:65-434:72" + "loc": "434:76-434:83" }, { "token": "RPAREN", - "loc": "434:72-434:73" + "loc": "434:83-434:84" + }, + { + "token": "RPAREN", + "loc": "434:84-434:85" }, { "token": [ "SEMI", false ], - "loc": "434:73-434:73" + "loc": "434:85-434:85" }, { "token": "NEWLINE", - "loc": "434:73-434:74" + "loc": "434:85-434:86" }, { "token": [ @@ -16750,48 +17371,71 @@ "loc": "444:42-444:43" }, { - "token": "TRY_QUESTION", - "loc": "444:44-444:48" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "444:44-444:53" + }, + { + "token": "LPAREN", + "loc": "444:53-444:54" + }, + { + "token": "LPAREN", + "loc": "444:54-444:55" + }, + { + "token": "RPAREN", + "loc": "444:55-444:56" + }, + { + "token": "FAT_ARROW", + "loc": "444:57-444:59" }, { "token": [ "PACKAGE_NAME", "json" ], - "loc": "444:49-444:54" + "loc": "444:60-444:65" }, { "token": [ "DOT_LIDENT", "from_json" ], - "loc": "444:55-444:64" + "loc": "444:66-444:75" }, { "token": "LPAREN", - "loc": "444:64-444:65" + "loc": "444:75-444:76" }, { "token": [ "LIDENT", "es_json" ], - "loc": "444:65-444:72" + "loc": "444:76-444:83" }, { "token": "RPAREN", - "loc": "444:72-444:73" + "loc": "444:83-444:84" + }, + { + "token": "RPAREN", + "loc": "444:84-444:85" }, { "token": [ "SEMI", false ], - "loc": "444:73-444:73" + "loc": "444:85-444:85" }, { "token": "NEWLINE", - "loc": "444:73-444:74" + "loc": "444:85-444:86" }, { "token": [ @@ -16867,8 +17511,324 @@ "token": "NEWLINE", "loc": "447:2-447:3" }, + { + "token": "NEWLINE", + "loc": "448:1-448:2" + }, + { + "token": "FN", + "loc": "449:1-449:3" + }, + { + "token": "LBRACKET", + "loc": "449:3-449:4" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "449:4-449:5" + }, + { + "token": "COMMA", + "loc": "449:5-449:6" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "449:7-449:8" + }, + { + "token": "COLON", + "loc": "449:9-449:10" + }, + { + "token": [ + "UIDENT", + "Error" + ], + "loc": "449:11-449:16" + }, + { + "token": "RBRACKET", + "loc": "449:16-449:17" + }, + { + "token": [ + "LIDENT", + "to_result" + ], + "loc": "449:18-449:27" + }, + { + "token": "LPAREN", + "loc": "449:27-449:28" + }, + { + "token": [ + "LIDENT", + "f" + ], + "loc": "449:28-449:29" + }, + { + "token": "COLON", + "loc": "449:30-449:31" + }, + { + "token": "LPAREN", + "loc": "449:32-449:33" + }, + { + "token": "RPAREN", + "loc": "449:33-449:34" + }, + { + "token": "THIN_ARROW", + "loc": "449:35-449:37" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "449:38-449:39" + }, + { + "token": "RAISE", + "loc": "449:40-449:45" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "449:46-449:47" + }, + { + "token": "RPAREN", + "loc": "449:47-449:48" + }, + { + "token": "THIN_ARROW", + "loc": "449:49-449:51" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "449:52-449:58" + }, + { + "token": "LBRACKET", + "loc": "449:58-449:59" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "449:59-449:60" + }, + { + "token": "COMMA", + "loc": "449:60-449:61" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "449:62-449:63" + }, + { + "token": "RBRACKET", + "loc": "449:63-449:64" + }, + { + "token": "LBRACE", + "loc": "449:65-449:66" + }, + { + "token": "NEWLINE", + "loc": "449:66-449:67" + }, + { + "token": "TRY", + "loc": "450:3-450:6" + }, + { + "token": [ + "LIDENT", + "f" + ], + "loc": "450:7-450:8" + }, + { + "token": "LPAREN", + "loc": "450:8-450:9" + }, + { + "token": "RPAREN", + "loc": "450:9-450:10" + }, + { + "token": "NEWLINE", + "loc": "450:10-450:11" + }, + { + "token": "CATCH", + "loc": "451:3-451:8" + }, + { + "token": "LBRACE", + "loc": "451:9-451:10" + }, + { + "token": "NEWLINE", + "loc": "451:10-451:11" + }, + { + "token": [ + "LIDENT", + "err" + ], + "loc": "452:5-452:8" + }, + { + "token": "FAT_ARROW", + "loc": "452:9-452:11" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "452:12-452:18" + }, + { + "token": "COLONCOLON", + "loc": "452:18-452:20" + }, + { + "token": [ + "UIDENT", + "Err" + ], + "loc": "452:20-452:23" + }, + { + "token": "LPAREN", + "loc": "452:23-452:24" + }, + { + "token": [ + "LIDENT", + "err" + ], + "loc": "452:24-452:27" + }, + { + "token": "RPAREN", + "loc": "452:27-452:28" + }, + { + "token": "NEWLINE", + "loc": "452:28-452:29" + }, + { + "token": "RBRACE", + "loc": "453:3-453:4" + }, + { + "token": "NORAISE", + "loc": "453:5-453:12" + }, + { + "token": "LBRACE", + "loc": "453:13-453:14" + }, + { + "token": "NEWLINE", + "loc": "453:14-453:15" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "454:5-454:10" + }, + { + "token": "FAT_ARROW", + "loc": "454:11-454:13" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "454:14-454:20" + }, + { + "token": "COLONCOLON", + "loc": "454:20-454:22" + }, + { + "token": [ + "UIDENT", + "Ok" + ], + "loc": "454:22-454:24" + }, + { + "token": "LPAREN", + "loc": "454:24-454:25" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "454:25-454:30" + }, + { + "token": "RPAREN", + "loc": "454:30-454:31" + }, + { + "token": "NEWLINE", + "loc": "454:31-454:32" + }, + { + "token": "RBRACE", + "loc": "455:3-455:4" + }, + { + "token": "NEWLINE", + "loc": "455:4-455:5" + }, + { + "token": "RBRACE", + "loc": "456:1-456:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "456:2-456:2" + }, + { + "token": "NEWLINE", + "loc": "456:2-456:3" + }, { "token": "EOF", - "loc": "448:1-448:1" + "loc": "457:1-457:1" } ] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/pipeline_test_derive_from_json_default.mbt b/test/sync_test/__snapshot__/pipeline_test_derive_from_json_default.mbt index e0e7148f..c27f108a 100644 --- a/test/sync_test/__snapshot__/pipeline_test_derive_from_json_default.mbt +++ b/test/sync_test/__snapshot__/pipeline_test_derive_from_json_default.mbt @@ -31,61 +31,61 @@ fn init { println("All fields set") let input : Json = { "a": 100, "b": 200 } let expected : Result[MyType, _] = Ok({ a: 100, b: 200 }) - let actual : Result[MyType, _] = try? @json.from_json(input) + let actual : Result[MyType, _] = to_result(() => @json.from_json(input)) println("\{actual == expected}, \{Debug::to_repr(actual)}, \{Debug::to_repr(expected)}") // println("Struct default, only a set") let input : Json = { "a": 100 } let expected : Result[MyType, _] = Ok({ a: 100, b: 0 }) - let actual : Result[MyType, _] = try? @json.from_json(input) + let actual : Result[MyType, _] = to_result(() => @json.from_json(input)) println("\{actual == expected}, \{Debug::to_repr(actual)}, \{Debug::to_repr(expected)}") // println("Struct default, only b set") let input : Json = { "b": 200 } let expected : Result[MyType, _] = Ok({ a: 0, b: 200 }) - let actual : Result[MyType, _] = try? @json.from_json(input) + let actual : Result[MyType, _] = to_result(() => @json.from_json(input)) println("\{actual == expected}, \{Debug::to_repr(actual)}, \{Debug::to_repr(expected)}") // println("Struct default, both fields missing") let input : Json = {} let expected : Result[MyType, _] = Ok({ a: 0, b: 0 }) - let actual : Result[MyType, _] = try? @json.from_json(input) + let actual : Result[MyType, _] = to_result(() => @json.from_json(input)) println("\{actual == expected}, \{Debug::to_repr(actual)}, \{Debug::to_repr(expected)}") // println("Field default, both fields set") let input : Json = { "a": 100, "b": 200 } let expected : Result[MyTypeOnlyADefault, _] = Ok({ a: 100, b: 200 }) - let actual : Result[MyTypeOnlyADefault, _] = try? @json.from_json(input) + let actual : Result[MyTypeOnlyADefault, _] = to_result(() => @json.from_json(input)) println("\{actual == expected}, \{Debug::to_repr(actual)}, \{Debug::to_repr(expected)}") // println("Field default, only b set") let input : Json = { "b": 200 } let expected : Result[MyTypeOnlyADefault, _] = Ok({ a: 0, b: 200 }) - let actual : Result[MyTypeOnlyADefault, _] = try? @json.from_json(input) + let actual : Result[MyTypeOnlyADefault, _] = to_result(() => @json.from_json(input)) println("\{actual == expected}, \{Debug::to_repr(actual)}, \{Debug::to_repr(expected)}") // println("Field default, only a set, should error") let input : Json = { "a": 100 } - let actual : Result[MyTypeOnlyADefault, _] = try? @json.from_json(input) + let actual : Result[MyTypeOnlyADefault, _] = to_result(() => @json.from_json(input)) debug(actual) // println("Field default with value, both fields set") let input : Json = { "a": 100, "b": 200 } let expected : Result[MyTypeOnlyADefault2, _] = Ok({ a: 100, b: 200 }) - let actual : Result[MyTypeOnlyADefault2, _] = try? @json.from_json(input) + let actual : Result[MyTypeOnlyADefault2, _] = to_result(() => @json.from_json(input)) println("\{actual == expected}, \{Debug::to_repr(actual)}, \{Debug::to_repr(expected)}") // println("Field default with value, only b set") let input : Json = { "b": 200 } let expected : Result[MyTypeOnlyADefault2, _] = Ok({ a: 65536, b: 200 }) - let actual : Result[MyTypeOnlyADefault2, _] = try? @json.from_json(input) + let actual : Result[MyTypeOnlyADefault2, _] = to_result(() => @json.from_json(input)) println("\{actual == expected}, \{Debug::to_repr(actual)}, \{Debug::to_repr(expected)}") // println("Field default with function, both fields set") let input : Json = { "a": 100, "b": 200 } let before_calls = gen_func_calls.val let expected : Result[MyTypeOnlyADefault3, _] = Ok({ a: 100, b: 200 }) - let actual : Result[MyTypeOnlyADefault3, _] = try? @json.from_json(input) + let actual : Result[MyTypeOnlyADefault3, _] = to_result(() => @json.from_json(input)) println("\{actual == expected}, \{Debug::to_repr(actual)}, \{Debug::to_repr(expected)}") let after_calls = gen_func_calls.val println( @@ -96,7 +96,7 @@ fn init { let input : Json = { "b": 200 } let before_calls = gen_func_calls.val let expected : Result[MyTypeOnlyADefault3, _] = Ok({ a: 65536, b: 200 }) - let actual : Result[MyTypeOnlyADefault3, _] = try? @json.from_json(input) + let actual : Result[MyTypeOnlyADefault3, _] = to_result(() => @json.from_json(input)) println("\{actual == expected}, \{Debug::to_repr(actual)}, \{Debug::to_repr(expected)}") let after_calls = gen_func_calls.val println( @@ -120,18 +120,27 @@ fn init { println("Enum default, variant set") let input : Json = { "$tag": "A", "0": 100 } let expected : Result[MyEnumDefault, _] = Ok(MyEnumDefault::A(100)) - let actual : Result[MyEnumDefault, _] = try? @json.from_json(input) + let actual : Result[MyEnumDefault, _] = to_result(() => @json.from_json(input)) println("\{actual == expected}, \{Debug::to_repr(actual)}, \{Debug::to_repr(expected)}") // println("Enum default, variant default") let input : Json = { "$tag": "A" } let expected : Result[MyEnumDefault, _] = Ok(MyEnumDefault::A(0)) - let actual : Result[MyEnumDefault, _] = try? @json.from_json(input) + let actual : Result[MyEnumDefault, _] = to_result(() => @json.from_json(input)) println("\{actual == expected}, \{Debug::to_repr(actual)}, \{Debug::to_repr(expected)}") // // println("Enum default, variant default with value") // let input : Json = { "$tag": "A" } // let expected : Result[MyEnumDefault2, _] = Ok(MyEnumDefault2::A(65536)) - // let actual : Result[MyEnumDefault2, _] = try? @json.from_jsoninput) + // let actual : Result[MyEnumDefault2, _] = to_result(() => @json.from_jsoninput)) // println("\{actual == expected}, \{actual}, \{expected}") } + +fn[T, E : Error] to_result(f : () -> T raise E) -> Result[T, E] { + try f() + catch { + err => Result::Err(err) + } noraise { + value => Result::Ok(value) + } +} diff --git a/test/sync_test/__snapshot__/pipeline_test_derive_from_json_default.mbt.tokens.json b/test/sync_test/__snapshot__/pipeline_test_derive_from_json_default.mbt.tokens.json index 630d3f15..7d74eb30 100644 --- a/test/sync_test/__snapshot__/pipeline_test_derive_from_json_default.mbt.tokens.json +++ b/test/sync_test/__snapshot__/pipeline_test_derive_from_json_default.mbt.tokens.json @@ -1258,48 +1258,71 @@ "loc": "34:34-34:35" }, { - "token": "TRY_QUESTION", - "loc": "34:36-34:40" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "34:36-34:45" + }, + { + "token": "LPAREN", + "loc": "34:45-34:46" + }, + { + "token": "LPAREN", + "loc": "34:46-34:47" + }, + { + "token": "RPAREN", + "loc": "34:47-34:48" + }, + { + "token": "FAT_ARROW", + "loc": "34:49-34:51" }, { "token": [ "PACKAGE_NAME", "json" ], - "loc": "34:41-34:46" + "loc": "34:52-34:57" }, { "token": [ "DOT_LIDENT", "from_json" ], - "loc": "34:47-34:56" + "loc": "34:58-34:67" }, { "token": "LPAREN", - "loc": "34:56-34:57" + "loc": "34:67-34:68" }, { "token": [ "LIDENT", "input" ], - "loc": "34:57-34:62" + "loc": "34:68-34:73" }, { "token": "RPAREN", - "loc": "34:62-34:63" + "loc": "34:73-34:74" + }, + { + "token": "RPAREN", + "loc": "34:74-34:75" }, { "token": [ "SEMI", false ], - "loc": "34:63-34:63" + "loc": "34:75-34:75" }, { "token": "NEWLINE", - "loc": "34:63-34:64" + "loc": "34:75-34:76" }, { "token": [ @@ -1624,48 +1647,71 @@ "loc": "40:34-40:35" }, { - "token": "TRY_QUESTION", - "loc": "40:36-40:40" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "40:36-40:45" + }, + { + "token": "LPAREN", + "loc": "40:45-40:46" + }, + { + "token": "LPAREN", + "loc": "40:46-40:47" + }, + { + "token": "RPAREN", + "loc": "40:47-40:48" + }, + { + "token": "FAT_ARROW", + "loc": "40:49-40:51" }, { "token": [ "PACKAGE_NAME", "json" ], - "loc": "40:41-40:46" + "loc": "40:52-40:57" }, { "token": [ "DOT_LIDENT", "from_json" ], - "loc": "40:47-40:56" + "loc": "40:58-40:67" }, { "token": "LPAREN", - "loc": "40:56-40:57" + "loc": "40:67-40:68" }, { "token": [ "LIDENT", "input" ], - "loc": "40:57-40:62" + "loc": "40:68-40:73" }, { "token": "RPAREN", - "loc": "40:62-40:63" + "loc": "40:73-40:74" + }, + { + "token": "RPAREN", + "loc": "40:74-40:75" }, { "token": [ "SEMI", false ], - "loc": "40:63-40:63" + "loc": "40:75-40:75" }, { "token": "NEWLINE", - "loc": "40:63-40:64" + "loc": "40:75-40:76" }, { "token": [ @@ -1990,48 +2036,71 @@ "loc": "46:34-46:35" }, { - "token": "TRY_QUESTION", - "loc": "46:36-46:40" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "46:36-46:45" + }, + { + "token": "LPAREN", + "loc": "46:45-46:46" + }, + { + "token": "LPAREN", + "loc": "46:46-46:47" + }, + { + "token": "RPAREN", + "loc": "46:47-46:48" + }, + { + "token": "FAT_ARROW", + "loc": "46:49-46:51" }, { "token": [ "PACKAGE_NAME", "json" ], - "loc": "46:41-46:46" + "loc": "46:52-46:57" }, { "token": [ "DOT_LIDENT", "from_json" ], - "loc": "46:47-46:56" + "loc": "46:58-46:67" }, { "token": "LPAREN", - "loc": "46:56-46:57" + "loc": "46:67-46:68" }, { "token": [ "LIDENT", "input" ], - "loc": "46:57-46:62" + "loc": "46:68-46:73" + }, + { + "token": "RPAREN", + "loc": "46:73-46:74" }, { "token": "RPAREN", - "loc": "46:62-46:63" + "loc": "46:74-46:75" }, { "token": [ "SEMI", false ], - "loc": "46:63-46:63" + "loc": "46:75-46:75" }, { "token": "NEWLINE", - "loc": "46:63-46:64" + "loc": "46:75-46:76" }, { "token": [ @@ -2338,48 +2407,71 @@ "loc": "52:34-52:35" }, { - "token": "TRY_QUESTION", - "loc": "52:36-52:40" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "52:36-52:45" + }, + { + "token": "LPAREN", + "loc": "52:45-52:46" + }, + { + "token": "LPAREN", + "loc": "52:46-52:47" + }, + { + "token": "RPAREN", + "loc": "52:47-52:48" + }, + { + "token": "FAT_ARROW", + "loc": "52:49-52:51" }, { "token": [ "PACKAGE_NAME", "json" ], - "loc": "52:41-52:46" + "loc": "52:52-52:57" }, { "token": [ "DOT_LIDENT", "from_json" ], - "loc": "52:47-52:56" + "loc": "52:58-52:67" }, { "token": "LPAREN", - "loc": "52:56-52:57" + "loc": "52:67-52:68" }, { "token": [ "LIDENT", "input" ], - "loc": "52:57-52:62" + "loc": "52:68-52:73" + }, + { + "token": "RPAREN", + "loc": "52:73-52:74" }, { "token": "RPAREN", - "loc": "52:62-52:63" + "loc": "52:74-52:75" }, { "token": [ "SEMI", false ], - "loc": "52:63-52:63" + "loc": "52:75-52:75" }, { "token": "NEWLINE", - "loc": "52:63-52:64" + "loc": "52:75-52:76" }, { "token": [ @@ -2726,48 +2818,71 @@ "loc": "58:46-58:47" }, { - "token": "TRY_QUESTION", - "loc": "58:48-58:52" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "58:48-58:57" + }, + { + "token": "LPAREN", + "loc": "58:57-58:58" + }, + { + "token": "LPAREN", + "loc": "58:58-58:59" + }, + { + "token": "RPAREN", + "loc": "58:59-58:60" + }, + { + "token": "FAT_ARROW", + "loc": "58:61-58:63" }, { "token": [ "PACKAGE_NAME", "json" ], - "loc": "58:53-58:58" + "loc": "58:64-58:69" }, { "token": [ "DOT_LIDENT", "from_json" ], - "loc": "58:59-58:68" + "loc": "58:70-58:79" }, { "token": "LPAREN", - "loc": "58:68-58:69" + "loc": "58:79-58:80" }, { "token": [ "LIDENT", "input" ], - "loc": "58:69-58:74" + "loc": "58:80-58:85" + }, + { + "token": "RPAREN", + "loc": "58:85-58:86" }, { "token": "RPAREN", - "loc": "58:74-58:75" + "loc": "58:86-58:87" }, { "token": [ "SEMI", false ], - "loc": "58:75-58:75" + "loc": "58:87-58:87" }, { "token": "NEWLINE", - "loc": "58:75-58:76" + "loc": "58:87-58:88" }, { "token": [ @@ -3092,48 +3207,71 @@ "loc": "64:46-64:47" }, { - "token": "TRY_QUESTION", - "loc": "64:48-64:52" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "64:48-64:57" + }, + { + "token": "LPAREN", + "loc": "64:57-64:58" + }, + { + "token": "LPAREN", + "loc": "64:58-64:59" + }, + { + "token": "RPAREN", + "loc": "64:59-64:60" + }, + { + "token": "FAT_ARROW", + "loc": "64:61-64:63" }, { "token": [ "PACKAGE_NAME", "json" ], - "loc": "64:53-64:58" + "loc": "64:64-64:69" }, { "token": [ "DOT_LIDENT", "from_json" ], - "loc": "64:59-64:68" + "loc": "64:70-64:79" }, { "token": "LPAREN", - "loc": "64:68-64:69" + "loc": "64:79-64:80" }, { "token": [ "LIDENT", "input" ], - "loc": "64:69-64:74" + "loc": "64:80-64:85" }, { "token": "RPAREN", - "loc": "64:74-64:75" + "loc": "64:85-64:86" + }, + { + "token": "RPAREN", + "loc": "64:86-64:87" }, { "token": [ "SEMI", false ], - "loc": "64:75-64:75" + "loc": "64:87-64:87" }, { "token": "NEWLINE", - "loc": "64:75-64:76" + "loc": "64:87-64:88" }, { "token": [ @@ -3335,48 +3473,71 @@ "loc": "69:46-69:47" }, { - "token": "TRY_QUESTION", - "loc": "69:48-69:52" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "69:48-69:57" + }, + { + "token": "LPAREN", + "loc": "69:57-69:58" + }, + { + "token": "LPAREN", + "loc": "69:58-69:59" + }, + { + "token": "RPAREN", + "loc": "69:59-69:60" + }, + { + "token": "FAT_ARROW", + "loc": "69:61-69:63" }, { "token": [ "PACKAGE_NAME", "json" ], - "loc": "69:53-69:58" + "loc": "69:64-69:69" }, { "token": [ "DOT_LIDENT", "from_json" ], - "loc": "69:59-69:68" + "loc": "69:70-69:79" }, { "token": "LPAREN", - "loc": "69:68-69:69" + "loc": "69:79-69:80" }, { "token": [ "LIDENT", "input" ], - "loc": "69:69-69:74" + "loc": "69:80-69:85" + }, + { + "token": "RPAREN", + "loc": "69:85-69:86" }, { "token": "RPAREN", - "loc": "69:74-69:75" + "loc": "69:86-69:87" }, { "token": [ "SEMI", false ], - "loc": "69:75-69:75" + "loc": "69:87-69:87" }, { "token": "NEWLINE", - "loc": "69:75-69:76" + "loc": "69:87-69:88" }, { "token": [ @@ -3723,48 +3884,71 @@ "loc": "75:47-75:48" }, { - "token": "TRY_QUESTION", - "loc": "75:49-75:53" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "75:49-75:58" + }, + { + "token": "LPAREN", + "loc": "75:58-75:59" + }, + { + "token": "LPAREN", + "loc": "75:59-75:60" + }, + { + "token": "RPAREN", + "loc": "75:60-75:61" + }, + { + "token": "FAT_ARROW", + "loc": "75:62-75:64" }, { "token": [ "PACKAGE_NAME", "json" ], - "loc": "75:54-75:59" + "loc": "75:65-75:70" }, { "token": [ "DOT_LIDENT", "from_json" ], - "loc": "75:60-75:69" + "loc": "75:71-75:80" }, { "token": "LPAREN", - "loc": "75:69-75:70" + "loc": "75:80-75:81" }, { "token": [ "LIDENT", "input" ], - "loc": "75:70-75:75" + "loc": "75:81-75:86" + }, + { + "token": "RPAREN", + "loc": "75:86-75:87" }, { "token": "RPAREN", - "loc": "75:75-75:76" + "loc": "75:87-75:88" }, { "token": [ "SEMI", false ], - "loc": "75:76-75:76" + "loc": "75:88-75:88" }, { "token": "NEWLINE", - "loc": "75:76-75:77" + "loc": "75:88-75:89" }, { "token": [ @@ -4089,48 +4273,71 @@ "loc": "81:47-81:48" }, { - "token": "TRY_QUESTION", - "loc": "81:49-81:53" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "81:49-81:58" + }, + { + "token": "LPAREN", + "loc": "81:58-81:59" + }, + { + "token": "LPAREN", + "loc": "81:59-81:60" + }, + { + "token": "RPAREN", + "loc": "81:60-81:61" + }, + { + "token": "FAT_ARROW", + "loc": "81:62-81:64" }, { "token": [ "PACKAGE_NAME", "json" ], - "loc": "81:54-81:59" + "loc": "81:65-81:70" }, { "token": [ "DOT_LIDENT", "from_json" ], - "loc": "81:60-81:69" + "loc": "81:71-81:80" }, { "token": "LPAREN", - "loc": "81:69-81:70" + "loc": "81:80-81:81" }, { "token": [ "LIDENT", "input" ], - "loc": "81:70-81:75" + "loc": "81:81-81:86" + }, + { + "token": "RPAREN", + "loc": "81:86-81:87" }, { "token": "RPAREN", - "loc": "81:75-81:76" + "loc": "81:87-81:88" }, { "token": [ "SEMI", false ], - "loc": "81:76-81:76" + "loc": "81:88-81:88" }, { "token": "NEWLINE", - "loc": "81:76-81:77" + "loc": "81:88-81:89" }, { "token": [ @@ -4517,48 +4724,71 @@ "loc": "88:47-88:48" }, { - "token": "TRY_QUESTION", - "loc": "88:49-88:53" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "88:49-88:58" + }, + { + "token": "LPAREN", + "loc": "88:58-88:59" + }, + { + "token": "LPAREN", + "loc": "88:59-88:60" + }, + { + "token": "RPAREN", + "loc": "88:60-88:61" + }, + { + "token": "FAT_ARROW", + "loc": "88:62-88:64" }, { "token": [ "PACKAGE_NAME", "json" ], - "loc": "88:54-88:59" + "loc": "88:65-88:70" }, { "token": [ "DOT_LIDENT", "from_json" ], - "loc": "88:60-88:69" + "loc": "88:71-88:80" }, { "token": "LPAREN", - "loc": "88:69-88:70" + "loc": "88:80-88:81" }, { "token": [ "LIDENT", "input" ], - "loc": "88:70-88:75" + "loc": "88:81-88:86" + }, + { + "token": "RPAREN", + "loc": "88:86-88:87" }, { "token": "RPAREN", - "loc": "88:75-88:76" + "loc": "88:87-88:88" }, { "token": [ "SEMI", false ], - "loc": "88:76-88:76" + "loc": "88:88-88:88" }, { "token": "NEWLINE", - "loc": "88:76-88:77" + "loc": "88:88-88:89" }, { "token": [ @@ -5008,48 +5238,71 @@ "loc": "99:47-99:48" }, { - "token": "TRY_QUESTION", - "loc": "99:49-99:53" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "99:49-99:58" + }, + { + "token": "LPAREN", + "loc": "99:58-99:59" + }, + { + "token": "LPAREN", + "loc": "99:59-99:60" + }, + { + "token": "RPAREN", + "loc": "99:60-99:61" + }, + { + "token": "FAT_ARROW", + "loc": "99:62-99:64" }, { "token": [ "PACKAGE_NAME", "json" ], - "loc": "99:54-99:59" + "loc": "99:65-99:70" }, { "token": [ "DOT_LIDENT", "from_json" ], - "loc": "99:60-99:69" + "loc": "99:71-99:80" }, { "token": "LPAREN", - "loc": "99:69-99:70" + "loc": "99:80-99:81" }, { "token": [ "LIDENT", "input" ], - "loc": "99:70-99:75" + "loc": "99:81-99:86" }, { "token": "RPAREN", - "loc": "99:75-99:76" + "loc": "99:86-99:87" + }, + { + "token": "RPAREN", + "loc": "99:87-99:88" }, { "token": [ "SEMI", false ], - "loc": "99:76-99:76" + "loc": "99:88-99:88" }, { "token": "NEWLINE", - "loc": "99:76-99:77" + "loc": "99:88-99:89" }, { "token": [ @@ -5769,48 +6022,71 @@ "loc": "123:41-123:42" }, { - "token": "TRY_QUESTION", - "loc": "123:43-123:47" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "123:43-123:52" + }, + { + "token": "LPAREN", + "loc": "123:52-123:53" + }, + { + "token": "LPAREN", + "loc": "123:53-123:54" + }, + { + "token": "RPAREN", + "loc": "123:54-123:55" + }, + { + "token": "FAT_ARROW", + "loc": "123:56-123:58" }, { "token": [ "PACKAGE_NAME", "json" ], - "loc": "123:48-123:53" + "loc": "123:59-123:64" }, { "token": [ "DOT_LIDENT", "from_json" ], - "loc": "123:54-123:63" + "loc": "123:65-123:74" }, { "token": "LPAREN", - "loc": "123:63-123:64" + "loc": "123:74-123:75" }, { "token": [ "LIDENT", "input" ], - "loc": "123:64-123:69" + "loc": "123:75-123:80" }, { "token": "RPAREN", - "loc": "123:69-123:70" + "loc": "123:80-123:81" + }, + { + "token": "RPAREN", + "loc": "123:81-123:82" }, { "token": [ "SEMI", false ], - "loc": "123:70-123:70" + "loc": "123:82-123:82" }, { "token": "NEWLINE", - "loc": "123:70-123:71" + "loc": "123:82-123:83" }, { "token": [ @@ -6120,48 +6396,71 @@ "loc": "129:41-129:42" }, { - "token": "TRY_QUESTION", - "loc": "129:43-129:47" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "129:43-129:52" + }, + { + "token": "LPAREN", + "loc": "129:52-129:53" + }, + { + "token": "LPAREN", + "loc": "129:53-129:54" + }, + { + "token": "RPAREN", + "loc": "129:54-129:55" + }, + { + "token": "FAT_ARROW", + "loc": "129:56-129:58" }, { "token": [ "PACKAGE_NAME", "json" ], - "loc": "129:48-129:53" + "loc": "129:59-129:64" }, { "token": [ "DOT_LIDENT", "from_json" ], - "loc": "129:54-129:63" + "loc": "129:65-129:74" }, { "token": "LPAREN", - "loc": "129:63-129:64" + "loc": "129:74-129:75" }, { "token": [ "LIDENT", "input" ], - "loc": "129:64-129:69" + "loc": "129:75-129:80" + }, + { + "token": "RPAREN", + "loc": "129:80-129:81" }, { "token": "RPAREN", - "loc": "129:69-129:70" + "loc": "129:81-129:82" }, { "token": [ "SEMI", false ], - "loc": "129:70-129:70" + "loc": "129:82-129:82" }, { "token": "NEWLINE", - "loc": "129:70-129:71" + "loc": "129:82-129:83" }, { "token": [ @@ -6277,7 +6576,7 @@ "token": [ "COMMENT", { - "content": "// let actual : Result[MyEnumDefault2, _] = try? @json.from_jsoninput)", + "content": "// let actual : Result[MyEnumDefault2, _] = to_result(() => @json.from_jsoninput))", "kind": [ "Ownline", { @@ -6288,11 +6587,11 @@ "consumed_by_docstring": false } ], - "loc": "135:3-135:73" + "loc": "135:3-135:85" }, { "token": "NEWLINE", - "loc": "135:73-135:74" + "loc": "135:85-135:86" }, { "token": [ @@ -6330,8 +6629,324 @@ "token": "NEWLINE", "loc": "137:2-137:3" }, + { + "token": "NEWLINE", + "loc": "138:1-138:2" + }, + { + "token": "FN", + "loc": "139:1-139:3" + }, + { + "token": "LBRACKET", + "loc": "139:3-139:4" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "139:4-139:5" + }, + { + "token": "COMMA", + "loc": "139:5-139:6" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "139:7-139:8" + }, + { + "token": "COLON", + "loc": "139:9-139:10" + }, + { + "token": [ + "UIDENT", + "Error" + ], + "loc": "139:11-139:16" + }, + { + "token": "RBRACKET", + "loc": "139:16-139:17" + }, + { + "token": [ + "LIDENT", + "to_result" + ], + "loc": "139:18-139:27" + }, + { + "token": "LPAREN", + "loc": "139:27-139:28" + }, + { + "token": [ + "LIDENT", + "f" + ], + "loc": "139:28-139:29" + }, + { + "token": "COLON", + "loc": "139:30-139:31" + }, + { + "token": "LPAREN", + "loc": "139:32-139:33" + }, + { + "token": "RPAREN", + "loc": "139:33-139:34" + }, + { + "token": "THIN_ARROW", + "loc": "139:35-139:37" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "139:38-139:39" + }, + { + "token": "RAISE", + "loc": "139:40-139:45" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "139:46-139:47" + }, + { + "token": "RPAREN", + "loc": "139:47-139:48" + }, + { + "token": "THIN_ARROW", + "loc": "139:49-139:51" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "139:52-139:58" + }, + { + "token": "LBRACKET", + "loc": "139:58-139:59" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "139:59-139:60" + }, + { + "token": "COMMA", + "loc": "139:60-139:61" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "139:62-139:63" + }, + { + "token": "RBRACKET", + "loc": "139:63-139:64" + }, + { + "token": "LBRACE", + "loc": "139:65-139:66" + }, + { + "token": "NEWLINE", + "loc": "139:66-139:67" + }, + { + "token": "TRY", + "loc": "140:3-140:6" + }, + { + "token": [ + "LIDENT", + "f" + ], + "loc": "140:7-140:8" + }, + { + "token": "LPAREN", + "loc": "140:8-140:9" + }, + { + "token": "RPAREN", + "loc": "140:9-140:10" + }, + { + "token": "NEWLINE", + "loc": "140:10-140:11" + }, + { + "token": "CATCH", + "loc": "141:3-141:8" + }, + { + "token": "LBRACE", + "loc": "141:9-141:10" + }, + { + "token": "NEWLINE", + "loc": "141:10-141:11" + }, + { + "token": [ + "LIDENT", + "err" + ], + "loc": "142:5-142:8" + }, + { + "token": "FAT_ARROW", + "loc": "142:9-142:11" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "142:12-142:18" + }, + { + "token": "COLONCOLON", + "loc": "142:18-142:20" + }, + { + "token": [ + "UIDENT", + "Err" + ], + "loc": "142:20-142:23" + }, + { + "token": "LPAREN", + "loc": "142:23-142:24" + }, + { + "token": [ + "LIDENT", + "err" + ], + "loc": "142:24-142:27" + }, + { + "token": "RPAREN", + "loc": "142:27-142:28" + }, + { + "token": "NEWLINE", + "loc": "142:28-142:29" + }, + { + "token": "RBRACE", + "loc": "143:3-143:4" + }, + { + "token": "NORAISE", + "loc": "143:5-143:12" + }, + { + "token": "LBRACE", + "loc": "143:13-143:14" + }, + { + "token": "NEWLINE", + "loc": "143:14-143:15" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "144:5-144:10" + }, + { + "token": "FAT_ARROW", + "loc": "144:11-144:13" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "144:14-144:20" + }, + { + "token": "COLONCOLON", + "loc": "144:20-144:22" + }, + { + "token": [ + "UIDENT", + "Ok" + ], + "loc": "144:22-144:24" + }, + { + "token": "LPAREN", + "loc": "144:24-144:25" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "144:25-144:30" + }, + { + "token": "RPAREN", + "loc": "144:30-144:31" + }, + { + "token": "NEWLINE", + "loc": "144:31-144:32" + }, + { + "token": "RBRACE", + "loc": "145:3-145:4" + }, + { + "token": "NEWLINE", + "loc": "145:4-145:5" + }, + { + "token": "RBRACE", + "loc": "146:1-146:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "146:2-146:2" + }, + { + "token": "NEWLINE", + "loc": "146:2-146:3" + }, { "token": "EOF", - "loc": "138:1-138:1" + "loc": "147:1-147:1" } ] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/pipeline_test_derive_hash.json b/test/sync_test/__snapshot__/pipeline_test_derive_hash.json index 3f0db46b..5f689da5 100644 --- a/test/sync_test/__snapshot__/pipeline_test_derive_hash.json +++ b/test/sync_test/__snapshot__/pipeline_test_derive_hash.json @@ -3365,6 +3365,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, @@ -4591,6 +4596,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, @@ -5274,6 +5284,11 @@ } ] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, @@ -5855,6 +5870,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, diff --git a/test/sync_test/__snapshot__/pipeline_test_derive_to_json.json b/test/sync_test/__snapshot__/pipeline_test_derive_to_json.json index 524d400e..2166627f 100644 --- a/test/sync_test/__snapshot__/pipeline_test_derive_to_json.json +++ b/test/sync_test/__snapshot__/pipeline_test_derive_to_json.json @@ -1309,7 +1309,8 @@ } } ] - } + }, + "is_iter": false } }, "is_pun": false @@ -1601,7 +1602,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -2106,7 +2108,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -3767,7 +3770,8 @@ } } ] - } + }, + "is_iter": false } } } @@ -3831,7 +3835,8 @@ } } ] - } + }, + "is_iter": false } } } @@ -15181,7 +15186,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { @@ -18666,7 +18672,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { diff --git a/test/sync_test/__snapshot__/pipeline_test_desugared_prim_as_impl.json b/test/sync_test/__snapshot__/pipeline_test_desugared_prim_as_impl.json index d1f34a87..0c4e5de5 100644 --- a/test/sync_test/__snapshot__/pipeline_test_desugared_prim_as_impl.json +++ b/test/sync_test/__snapshot__/pipeline_test_desugared_prim_as_impl.json @@ -507,6 +507,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, @@ -621,6 +626,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, diff --git a/test/sync_test/__snapshot__/pipeline_test_dlist.json b/test/sync_test/__snapshot__/pipeline_test_dlist.json index 7a3922ab..51275896 100644 --- a/test/sync_test/__snapshot__/pipeline_test_dlist.json +++ b/test/sync_test/__snapshot__/pipeline_test_dlist.json @@ -148,7 +148,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { diff --git a/test/sync_test/__snapshot__/pipeline_test_empty_array_test.json b/test/sync_test/__snapshot__/pipeline_test_empty_array_test.json index 7b279501..d7e179a5 100644 --- a/test/sync_test/__snapshot__/pipeline_test_empty_array_test.json +++ b/test/sync_test/__snapshot__/pipeline_test_empty_array_test.json @@ -67,7 +67,8 @@ "kind": "Expr::Array::ExprList", "loc": null, "children": [] - } + }, + "is_iter": false } }, "vis": { @@ -153,7 +154,8 @@ "kind": "Expr::Array::ExprList", "loc": null, "children": [] - } + }, + "is_iter": false } }, "vis": { @@ -239,7 +241,8 @@ "kind": "Expr::Array::ExprList", "loc": null, "children": [] - } + }, + "is_iter": false } }, "vis": { diff --git a/test/sync_test/__snapshot__/pipeline_test_empty_error.json b/test/sync_test/__snapshot__/pipeline_test_empty_error.json index b54a74ff..627c0b92 100644 --- a/test/sync_test/__snapshot__/pipeline_test_empty_error.json +++ b/test/sync_test/__snapshot__/pipeline_test_empty_error.json @@ -181,46 +181,112 @@ "loc": null, "children": { "value": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", + "value": "to_result" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Function", + "loc": null, + "children": { + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "value": "f" + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "f" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null } } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", - "loc": null, - "children": [] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} } - } + ] }, - "kind": { - "kind": "TryOperatorKind::Question", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -245,5 +311,524 @@ } } } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "to_result" + } + }, + "has_error": null, + "is_async": null, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "f" + } + }, + "ty": { + "kind": "Type::Arrow", + "loc": null, + "children": { + "args": { + "kind": "Type::Arrow::ArgList", + "loc": null, + "children": [] + }, + "res": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "T" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "err": { + "kind": "ErrorType::ErrorType", + "loc": null, + "children": { + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "E" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + "is_async": null + } + } + } + } + ] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [ + { + "kind": "TypeVarBinder", + "loc": null, + "children": { + "name": "T", + "constraints": { + "kind": "TypeVarBinder::TypeVarConstraintList", + "loc": null, + "children": [] + } + } + }, + { + "kind": "TypeVarBinder", + "loc": null, + "children": { + "name": "E", + "constraints": { + "kind": "TypeVarBinder::TypeVarConstraintList", + "loc": null, + "children": [ + { + "kind": "TypeVarConstraint", + "loc": null, + "children": { + "trait": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Error" + } + } + } + } + ] + } + } + } + ] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [ + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "T" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "E" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + ] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::Try", + "loc": null, + "children": { + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "f" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "catch": { + "kind": "Expr::Try::CaseList", + "loc": null, + "children": [ + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "err" + } + } + } + }, + "guard": null, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Err" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::TypeName", + "loc": null, + "children": { + "value": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + }, + "is_object": false + } + } + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "err" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + ] + }, + "catch_all": false, + "try_else": { + "kind": "Expr::Try::CaseList", + "loc": null, + "children": [ + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "value" + } + } + } + }, + "guard": null, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Ok" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::TypeName", + "loc": null, + "children": { + "value": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + }, + "is_object": false + } + } + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "value" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + ] + }, + "has_try": true + } + } + } + } + } } ] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/pipeline_test_empty_error.mbt b/test/sync_test/__snapshot__/pipeline_test_empty_error.mbt index 58dd6fa2..10ab9e8a 100644 --- a/test/sync_test/__snapshot__/pipeline_test_empty_error.mbt +++ b/test/sync_test/__snapshot__/pipeline_test_empty_error.mbt @@ -3,5 +3,14 @@ fn f() -> Int raise { } fn main { - debug(try? f()) + debug(to_result(() => f())) +} + +fn[T, E : Error] to_result(f : () -> T raise E) -> Result[T, E] { + try f() + catch { + err => Result::Err(err) + } noraise { + value => Result::Ok(value) + } } diff --git a/test/sync_test/__snapshot__/pipeline_test_empty_error.mbt.tokens.json b/test/sync_test/__snapshot__/pipeline_test_empty_error.mbt.tokens.json index dcb43604..28177474 100644 --- a/test/sync_test/__snapshot__/pipeline_test_empty_error.mbt.tokens.json +++ b/test/sync_test/__snapshot__/pipeline_test_empty_error.mbt.tokens.json @@ -102,31 +102,54 @@ "loc": "6:10-6:11" }, { - "token": "TRY_QUESTION", - "loc": "6:11-6:15" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "6:11-6:20" + }, + { + "token": "LPAREN", + "loc": "6:20-6:21" + }, + { + "token": "LPAREN", + "loc": "6:21-6:22" + }, + { + "token": "RPAREN", + "loc": "6:22-6:23" + }, + { + "token": "FAT_ARROW", + "loc": "6:24-6:26" }, { "token": [ "LIDENT", "f" ], - "loc": "6:16-6:17" + "loc": "6:27-6:28" }, { "token": "LPAREN", - "loc": "6:17-6:18" + "loc": "6:28-6:29" }, { "token": "RPAREN", - "loc": "6:18-6:19" + "loc": "6:29-6:30" }, { "token": "RPAREN", - "loc": "6:19-6:20" + "loc": "6:30-6:31" + }, + { + "token": "RPAREN", + "loc": "6:31-6:32" }, { "token": "NEWLINE", - "loc": "6:20-6:21" + "loc": "6:32-6:33" }, { "token": "RBRACE", @@ -143,8 +166,324 @@ "token": "NEWLINE", "loc": "7:2-7:3" }, + { + "token": "NEWLINE", + "loc": "8:1-8:2" + }, + { + "token": "FN", + "loc": "9:1-9:3" + }, + { + "token": "LBRACKET", + "loc": "9:3-9:4" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "9:4-9:5" + }, + { + "token": "COMMA", + "loc": "9:5-9:6" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "9:7-9:8" + }, + { + "token": "COLON", + "loc": "9:9-9:10" + }, + { + "token": [ + "UIDENT", + "Error" + ], + "loc": "9:11-9:16" + }, + { + "token": "RBRACKET", + "loc": "9:16-9:17" + }, + { + "token": [ + "LIDENT", + "to_result" + ], + "loc": "9:18-9:27" + }, + { + "token": "LPAREN", + "loc": "9:27-9:28" + }, + { + "token": [ + "LIDENT", + "f" + ], + "loc": "9:28-9:29" + }, + { + "token": "COLON", + "loc": "9:30-9:31" + }, + { + "token": "LPAREN", + "loc": "9:32-9:33" + }, + { + "token": "RPAREN", + "loc": "9:33-9:34" + }, + { + "token": "THIN_ARROW", + "loc": "9:35-9:37" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "9:38-9:39" + }, + { + "token": "RAISE", + "loc": "9:40-9:45" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "9:46-9:47" + }, + { + "token": "RPAREN", + "loc": "9:47-9:48" + }, + { + "token": "THIN_ARROW", + "loc": "9:49-9:51" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "9:52-9:58" + }, + { + "token": "LBRACKET", + "loc": "9:58-9:59" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "9:59-9:60" + }, + { + "token": "COMMA", + "loc": "9:60-9:61" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "9:62-9:63" + }, + { + "token": "RBRACKET", + "loc": "9:63-9:64" + }, + { + "token": "LBRACE", + "loc": "9:65-9:66" + }, + { + "token": "NEWLINE", + "loc": "9:66-9:67" + }, + { + "token": "TRY", + "loc": "10:3-10:6" + }, + { + "token": [ + "LIDENT", + "f" + ], + "loc": "10:7-10:8" + }, + { + "token": "LPAREN", + "loc": "10:8-10:9" + }, + { + "token": "RPAREN", + "loc": "10:9-10:10" + }, + { + "token": "NEWLINE", + "loc": "10:10-10:11" + }, + { + "token": "CATCH", + "loc": "11:3-11:8" + }, + { + "token": "LBRACE", + "loc": "11:9-11:10" + }, + { + "token": "NEWLINE", + "loc": "11:10-11:11" + }, + { + "token": [ + "LIDENT", + "err" + ], + "loc": "12:5-12:8" + }, + { + "token": "FAT_ARROW", + "loc": "12:9-12:11" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "12:12-12:18" + }, + { + "token": "COLONCOLON", + "loc": "12:18-12:20" + }, + { + "token": [ + "UIDENT", + "Err" + ], + "loc": "12:20-12:23" + }, + { + "token": "LPAREN", + "loc": "12:23-12:24" + }, + { + "token": [ + "LIDENT", + "err" + ], + "loc": "12:24-12:27" + }, + { + "token": "RPAREN", + "loc": "12:27-12:28" + }, + { + "token": "NEWLINE", + "loc": "12:28-12:29" + }, + { + "token": "RBRACE", + "loc": "13:3-13:4" + }, + { + "token": "NORAISE", + "loc": "13:5-13:12" + }, + { + "token": "LBRACE", + "loc": "13:13-13:14" + }, + { + "token": "NEWLINE", + "loc": "13:14-13:15" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "14:5-14:10" + }, + { + "token": "FAT_ARROW", + "loc": "14:11-14:13" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "14:14-14:20" + }, + { + "token": "COLONCOLON", + "loc": "14:20-14:22" + }, + { + "token": [ + "UIDENT", + "Ok" + ], + "loc": "14:22-14:24" + }, + { + "token": "LPAREN", + "loc": "14:24-14:25" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "14:25-14:30" + }, + { + "token": "RPAREN", + "loc": "14:30-14:31" + }, + { + "token": "NEWLINE", + "loc": "14:31-14:32" + }, + { + "token": "RBRACE", + "loc": "15:3-15:4" + }, + { + "token": "NEWLINE", + "loc": "15:4-15:5" + }, + { + "token": "RBRACE", + "loc": "16:1-16:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "16:2-16:2" + }, + { + "token": "NEWLINE", + "loc": "16:2-16:3" + }, { "token": "EOF", - "loc": "8:1-8:1" + "loc": "17:1-17:1" } ] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/pipeline_test_empty_json.json b/test/sync_test/__snapshot__/pipeline_test_empty_json.json index ef259218..c102a371 100644 --- a/test/sync_test/__snapshot__/pipeline_test_empty_json.json +++ b/test/sync_test/__snapshot__/pipeline_test_empty_json.json @@ -419,7 +419,8 @@ "kind": "Expr::Array::ExprList", "loc": null, "children": [] - } + }, + "is_iter": false } }, "kind": { diff --git a/test/sync_test/__snapshot__/pipeline_test_empty_record2.json b/test/sync_test/__snapshot__/pipeline_test_empty_record2.json index e428308f..8957b0f2 100644 --- a/test/sync_test/__snapshot__/pipeline_test_empty_record2.json +++ b/test/sync_test/__snapshot__/pipeline_test_empty_record2.json @@ -665,6 +665,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, diff --git a/test/sync_test/__snapshot__/pipeline_test_enum_custom_tag.json b/test/sync_test/__snapshot__/pipeline_test_enum_custom_tag.json index 8be85a8d..945c2b86 100644 --- a/test/sync_test/__snapshot__/pipeline_test_enum_custom_tag.json +++ b/test/sync_test/__snapshot__/pipeline_test_enum_custom_tag.json @@ -1090,7 +1090,8 @@ } } ] - } + }, + "is_iter": false } }, "init": { diff --git a/test/sync_test/__snapshot__/pipeline_test_eq_operator.json b/test/sync_test/__snapshot__/pipeline_test_eq_operator.json index 7374b735..c9794386 100644 --- a/test/sync_test/__snapshot__/pipeline_test_eq_operator.json +++ b/test/sync_test/__snapshot__/pipeline_test_eq_operator.json @@ -380,6 +380,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, diff --git a/test/sync_test/__snapshot__/pipeline_test_eq_type.json b/test/sync_test/__snapshot__/pipeline_test_eq_type.json index ed3a875e..08086075 100644 --- a/test/sync_test/__snapshot__/pipeline_test_eq_type.json +++ b/test/sync_test/__snapshot__/pipeline_test_eq_type.json @@ -699,6 +699,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, @@ -1130,6 +1135,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, @@ -1415,6 +1425,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, diff --git a/test/sync_test/__snapshot__/pipeline_test_err_array_get.json b/test/sync_test/__snapshot__/pipeline_test_err_array_get.json index c5a1428b..0b0c1fae 100644 --- a/test/sync_test/__snapshot__/pipeline_test_err_array_get.json +++ b/test/sync_test/__snapshot__/pipeline_test_err_array_get.json @@ -172,7 +172,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { diff --git a/test/sync_test/__snapshot__/pipeline_test_err_bound_check.json b/test/sync_test/__snapshot__/pipeline_test_err_bound_check.json index 27b8f496..04a27923 100644 --- a/test/sync_test/__snapshot__/pipeline_test_err_bound_check.json +++ b/test/sync_test/__snapshot__/pipeline_test_err_bound_check.json @@ -135,7 +135,8 @@ } } ] - } + }, + "is_iter": false } }, "index": { diff --git a/test/sync_test/__snapshot__/pipeline_test_err_main_with_raise.json b/test/sync_test/__snapshot__/pipeline_test_err_main_with_raise.json index 2db5bca3..9edab2ce 100644 --- a/test/sync_test/__snapshot__/pipeline_test_err_main_with_raise.json +++ b/test/sync_test/__snapshot__/pipeline_test_err_main_with_raise.json @@ -187,6 +187,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, diff --git a/test/sync_test/__snapshot__/pipeline_test_err_panic.json b/test/sync_test/__snapshot__/pipeline_test_err_panic.json index 7d00a304..55b4c3eb 100644 --- a/test/sync_test/__snapshot__/pipeline_test_err_panic.json +++ b/test/sync_test/__snapshot__/pipeline_test_err_panic.json @@ -622,7 +622,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { diff --git a/test/sync_test/__snapshot__/pipeline_test_error_enum.json b/test/sync_test/__snapshot__/pipeline_test_error_enum.json index 3bd58d86..8a905964 100644 --- a/test/sync_test/__snapshot__/pipeline_test_error_enum.json +++ b/test/sync_test/__snapshot__/pipeline_test_error_enum.json @@ -3579,6 +3579,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, @@ -5296,6 +5301,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, diff --git a/test/sync_test/__snapshot__/pipeline_test_error_handle10.json b/test/sync_test/__snapshot__/pipeline_test_error_handle10.json index 8e0377ec..a0b00094 100644 --- a/test/sync_test/__snapshot__/pipeline_test_error_handle10.json +++ b/test/sync_test/__snapshot__/pipeline_test_error_handle10.json @@ -350,71 +350,137 @@ "loc": null, "children": { "value": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", - "loc": null, - "children": { - "value": "f" - } - } + "value": "to_result" } } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", "loc": null, - "children": [ - { - "kind": "Argument", + "children": { + "value": { + "kind": "Expr::Function", "loc": null, "children": { - "value": { - "kind": "Expr::Constant", + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "constant": { - "kind": "Constant::Int", + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Apply", "loc": null, "children": { - "value": "0" + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "f" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "0" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } } - } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } - ] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} + } } - } + ] }, - "kind": { - "kind": "TryOperatorKind::Question", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -470,71 +536,137 @@ "loc": null, "children": { "value": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", - "loc": null, - "children": { - "value": "f" - } - } + "value": "to_result" } } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", "loc": null, - "children": [ - { - "kind": "Argument", + "children": { + "value": { + "kind": "Expr::Function", "loc": null, "children": { - "value": { - "kind": "Expr::Constant", + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "constant": { - "kind": "Constant::Int", + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Apply", "loc": null, "children": { - "value": "1" + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "f" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "1" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } } - } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } - ] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} + } } - } + ] }, - "kind": { - "kind": "TryOperatorKind::Question", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -561,5 +693,524 @@ } } } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "to_result" + } + }, + "has_error": null, + "is_async": null, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "f" + } + }, + "ty": { + "kind": "Type::Arrow", + "loc": null, + "children": { + "args": { + "kind": "Type::Arrow::ArgList", + "loc": null, + "children": [] + }, + "res": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "T" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "err": { + "kind": "ErrorType::ErrorType", + "loc": null, + "children": { + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "E" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + "is_async": null + } + } + } + } + ] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [ + { + "kind": "TypeVarBinder", + "loc": null, + "children": { + "name": "T", + "constraints": { + "kind": "TypeVarBinder::TypeVarConstraintList", + "loc": null, + "children": [] + } + } + }, + { + "kind": "TypeVarBinder", + "loc": null, + "children": { + "name": "E", + "constraints": { + "kind": "TypeVarBinder::TypeVarConstraintList", + "loc": null, + "children": [ + { + "kind": "TypeVarConstraint", + "loc": null, + "children": { + "trait": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Error" + } + } + } + } + ] + } + } + } + ] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [ + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "T" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "E" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + ] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::Try", + "loc": null, + "children": { + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "f" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "catch": { + "kind": "Expr::Try::CaseList", + "loc": null, + "children": [ + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "err" + } + } + } + }, + "guard": null, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Err" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::TypeName", + "loc": null, + "children": { + "value": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + }, + "is_object": false + } + } + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "err" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + ] + }, + "catch_all": false, + "try_else": { + "kind": "Expr::Try::CaseList", + "loc": null, + "children": [ + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "value" + } + } + } + }, + "guard": null, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Ok" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::TypeName", + "loc": null, + "children": { + "value": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + }, + "is_object": false + } + } + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "value" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + ] + }, + "has_try": true + } + } + } + } + } } ] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/pipeline_test_error_handle10.mbt b/test/sync_test/__snapshot__/pipeline_test_error_handle10.mbt index e74109ea..9b0b6ede 100644 --- a/test/sync_test/__snapshot__/pipeline_test_error_handle10.mbt +++ b/test/sync_test/__snapshot__/pipeline_test_error_handle10.mbt @@ -7,6 +7,15 @@ fn f(x : UInt64) -> UInt64 raise { } fn main { - debug(try? f(0)) - debug(try? f(1)) + debug(to_result(() => f(0))) + debug(to_result(() => f(1))) +} + +fn[T, E : Error] to_result(f : () -> T raise E) -> Result[T, E] { + try f() + catch { + err => Result::Err(err) + } noraise { + value => Result::Ok(value) + } } diff --git a/test/sync_test/__snapshot__/pipeline_test_error_handle10.mbt.tokens.json b/test/sync_test/__snapshot__/pipeline_test_error_handle10.mbt.tokens.json index 7e229e9c..394e6460 100644 --- a/test/sync_test/__snapshot__/pipeline_test_error_handle10.mbt.tokens.json +++ b/test/sync_test/__snapshot__/pipeline_test_error_handle10.mbt.tokens.json @@ -203,45 +203,68 @@ "loc": "10:8-10:9" }, { - "token": "TRY_QUESTION", - "loc": "10:9-10:13" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "10:9-10:18" + }, + { + "token": "LPAREN", + "loc": "10:18-10:19" + }, + { + "token": "LPAREN", + "loc": "10:19-10:20" + }, + { + "token": "RPAREN", + "loc": "10:20-10:21" + }, + { + "token": "FAT_ARROW", + "loc": "10:22-10:24" }, { "token": [ "LIDENT", "f" ], - "loc": "10:14-10:15" + "loc": "10:25-10:26" }, { "token": "LPAREN", - "loc": "10:15-10:16" + "loc": "10:26-10:27" }, { "token": [ "INT", "0" ], - "loc": "10:16-10:17" + "loc": "10:27-10:28" }, { "token": "RPAREN", - "loc": "10:17-10:18" + "loc": "10:28-10:29" }, { "token": "RPAREN", - "loc": "10:18-10:19" + "loc": "10:29-10:30" + }, + { + "token": "RPAREN", + "loc": "10:30-10:31" }, { "token": [ "SEMI", false ], - "loc": "10:19-10:19" + "loc": "10:31-10:31" }, { "token": "NEWLINE", - "loc": "10:19-10:20" + "loc": "10:31-10:32" }, { "token": [ @@ -255,38 +278,61 @@ "loc": "11:8-11:9" }, { - "token": "TRY_QUESTION", - "loc": "11:9-11:13" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "11:9-11:18" + }, + { + "token": "LPAREN", + "loc": "11:18-11:19" + }, + { + "token": "LPAREN", + "loc": "11:19-11:20" + }, + { + "token": "RPAREN", + "loc": "11:20-11:21" + }, + { + "token": "FAT_ARROW", + "loc": "11:22-11:24" }, { "token": [ "LIDENT", "f" ], - "loc": "11:14-11:15" + "loc": "11:25-11:26" }, { "token": "LPAREN", - "loc": "11:15-11:16" + "loc": "11:26-11:27" }, { "token": [ "INT", "1" ], - "loc": "11:16-11:17" + "loc": "11:27-11:28" }, { "token": "RPAREN", - "loc": "11:17-11:18" + "loc": "11:28-11:29" }, { "token": "RPAREN", - "loc": "11:18-11:19" + "loc": "11:29-11:30" + }, + { + "token": "RPAREN", + "loc": "11:30-11:31" }, { "token": "NEWLINE", - "loc": "11:19-11:20" + "loc": "11:31-11:32" }, { "token": "RBRACE", @@ -303,8 +349,324 @@ "token": "NEWLINE", "loc": "12:2-12:3" }, + { + "token": "NEWLINE", + "loc": "13:1-13:2" + }, + { + "token": "FN", + "loc": "14:1-14:3" + }, + { + "token": "LBRACKET", + "loc": "14:3-14:4" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "14:4-14:5" + }, + { + "token": "COMMA", + "loc": "14:5-14:6" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "14:7-14:8" + }, + { + "token": "COLON", + "loc": "14:9-14:10" + }, + { + "token": [ + "UIDENT", + "Error" + ], + "loc": "14:11-14:16" + }, + { + "token": "RBRACKET", + "loc": "14:16-14:17" + }, + { + "token": [ + "LIDENT", + "to_result" + ], + "loc": "14:18-14:27" + }, + { + "token": "LPAREN", + "loc": "14:27-14:28" + }, + { + "token": [ + "LIDENT", + "f" + ], + "loc": "14:28-14:29" + }, + { + "token": "COLON", + "loc": "14:30-14:31" + }, + { + "token": "LPAREN", + "loc": "14:32-14:33" + }, + { + "token": "RPAREN", + "loc": "14:33-14:34" + }, + { + "token": "THIN_ARROW", + "loc": "14:35-14:37" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "14:38-14:39" + }, + { + "token": "RAISE", + "loc": "14:40-14:45" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "14:46-14:47" + }, + { + "token": "RPAREN", + "loc": "14:47-14:48" + }, + { + "token": "THIN_ARROW", + "loc": "14:49-14:51" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "14:52-14:58" + }, + { + "token": "LBRACKET", + "loc": "14:58-14:59" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "14:59-14:60" + }, + { + "token": "COMMA", + "loc": "14:60-14:61" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "14:62-14:63" + }, + { + "token": "RBRACKET", + "loc": "14:63-14:64" + }, + { + "token": "LBRACE", + "loc": "14:65-14:66" + }, + { + "token": "NEWLINE", + "loc": "14:66-14:67" + }, + { + "token": "TRY", + "loc": "15:3-15:6" + }, + { + "token": [ + "LIDENT", + "f" + ], + "loc": "15:7-15:8" + }, + { + "token": "LPAREN", + "loc": "15:8-15:9" + }, + { + "token": "RPAREN", + "loc": "15:9-15:10" + }, + { + "token": "NEWLINE", + "loc": "15:10-15:11" + }, + { + "token": "CATCH", + "loc": "16:3-16:8" + }, + { + "token": "LBRACE", + "loc": "16:9-16:10" + }, + { + "token": "NEWLINE", + "loc": "16:10-16:11" + }, + { + "token": [ + "LIDENT", + "err" + ], + "loc": "17:5-17:8" + }, + { + "token": "FAT_ARROW", + "loc": "17:9-17:11" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "17:12-17:18" + }, + { + "token": "COLONCOLON", + "loc": "17:18-17:20" + }, + { + "token": [ + "UIDENT", + "Err" + ], + "loc": "17:20-17:23" + }, + { + "token": "LPAREN", + "loc": "17:23-17:24" + }, + { + "token": [ + "LIDENT", + "err" + ], + "loc": "17:24-17:27" + }, + { + "token": "RPAREN", + "loc": "17:27-17:28" + }, + { + "token": "NEWLINE", + "loc": "17:28-17:29" + }, + { + "token": "RBRACE", + "loc": "18:3-18:4" + }, + { + "token": "NORAISE", + "loc": "18:5-18:12" + }, + { + "token": "LBRACE", + "loc": "18:13-18:14" + }, + { + "token": "NEWLINE", + "loc": "18:14-18:15" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "19:5-19:10" + }, + { + "token": "FAT_ARROW", + "loc": "19:11-19:13" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "19:14-19:20" + }, + { + "token": "COLONCOLON", + "loc": "19:20-19:22" + }, + { + "token": [ + "UIDENT", + "Ok" + ], + "loc": "19:22-19:24" + }, + { + "token": "LPAREN", + "loc": "19:24-19:25" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "19:25-19:30" + }, + { + "token": "RPAREN", + "loc": "19:30-19:31" + }, + { + "token": "NEWLINE", + "loc": "19:31-19:32" + }, + { + "token": "RBRACE", + "loc": "20:3-20:4" + }, + { + "token": "NEWLINE", + "loc": "20:4-20:5" + }, + { + "token": "RBRACE", + "loc": "21:1-21:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "21:2-21:2" + }, + { + "token": "NEWLINE", + "loc": "21:2-21:3" + }, { "token": "EOF", - "loc": "13:1-13:1" + "loc": "22:1-22:1" } ] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/pipeline_test_error_handle2.json b/test/sync_test/__snapshot__/pipeline_test_error_handle2.json index 08601789..6ec71a43 100644 --- a/test/sync_test/__snapshot__/pipeline_test_error_handle2.json +++ b/test/sync_test/__snapshot__/pipeline_test_error_handle2.json @@ -297,6 +297,11 @@ } ] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, @@ -3339,7 +3344,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { diff --git a/test/sync_test/__snapshot__/pipeline_test_error_handle3.json b/test/sync_test/__snapshot__/pipeline_test_error_handle3.json index 07b86ce6..81c4fcc2 100644 --- a/test/sync_test/__snapshot__/pipeline_test_error_handle3.json +++ b/test/sync_test/__snapshot__/pipeline_test_error_handle3.json @@ -533,6 +533,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, @@ -863,6 +868,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, @@ -1780,6 +1790,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, @@ -2018,6 +2033,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, @@ -2304,6 +2324,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, @@ -2626,6 +2651,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, @@ -2973,6 +3003,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, @@ -3272,6 +3307,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, @@ -4047,6 +4087,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, @@ -4522,6 +4567,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, diff --git a/test/sync_test/__snapshot__/pipeline_test_error_handle4.json b/test/sync_test/__snapshot__/pipeline_test_error_handle4.json index 57ca5bfa..c436059c 100644 --- a/test/sync_test/__snapshot__/pipeline_test_error_handle4.json +++ b/test/sync_test/__snapshot__/pipeline_test_error_handle4.json @@ -323,6 +323,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, diff --git a/test/sync_test/__snapshot__/pipeline_test_error_handle5.json b/test/sync_test/__snapshot__/pipeline_test_error_handle5.json index 028b9447..d79891ef 100644 --- a/test/sync_test/__snapshot__/pipeline_test_error_handle5.json +++ b/test/sync_test/__snapshot__/pipeline_test_error_handle5.json @@ -814,6 +814,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, diff --git a/test/sync_test/__snapshot__/pipeline_test_error_handle7.json b/test/sync_test/__snapshot__/pipeline_test_error_handle7.json index 2468cdf1..87b0b2b3 100644 --- a/test/sync_test/__snapshot__/pipeline_test_error_handle7.json +++ b/test/sync_test/__snapshot__/pipeline_test_error_handle7.json @@ -514,71 +514,137 @@ } }, "expr": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", - "loc": null, - "children": { - "value": "f" - } - } + "value": "to_result" } } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", "loc": null, - "children": [ - { - "kind": "Argument", + "children": { + "value": { + "kind": "Expr::Function", "loc": null, "children": { - "value": { - "kind": "Expr::Constant", + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "constant": { - "kind": "Constant::Int", + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Apply", "loc": null, "children": { - "value": "42" + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "f" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "42" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } } - } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } - ] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} + } } - } + ] }, - "kind": { - "kind": "TryOperatorKind::Question", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -678,71 +744,137 @@ } }, "expr": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", - "loc": null, - "children": { - "value": "f" - } - } + "value": "to_result" } } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", "loc": null, - "children": [ - { - "kind": "Argument", + "children": { + "value": { + "kind": "Expr::Function", "loc": null, "children": { - "value": { - "kind": "Expr::Constant", + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "constant": { - "kind": "Constant::Int", + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Apply", "loc": null, "children": { - "value": "-42" + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "f" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "-42" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } } - } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } - ] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} + } } - } + ] }, - "kind": { - "kind": "TryOperatorKind::Question", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -1207,5 +1339,524 @@ } } } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "to_result" + } + }, + "has_error": null, + "is_async": null, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "f" + } + }, + "ty": { + "kind": "Type::Arrow", + "loc": null, + "children": { + "args": { + "kind": "Type::Arrow::ArgList", + "loc": null, + "children": [] + }, + "res": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "T" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "err": { + "kind": "ErrorType::ErrorType", + "loc": null, + "children": { + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "E" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + "is_async": null + } + } + } + } + ] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [ + { + "kind": "TypeVarBinder", + "loc": null, + "children": { + "name": "T", + "constraints": { + "kind": "TypeVarBinder::TypeVarConstraintList", + "loc": null, + "children": [] + } + } + }, + { + "kind": "TypeVarBinder", + "loc": null, + "children": { + "name": "E", + "constraints": { + "kind": "TypeVarBinder::TypeVarConstraintList", + "loc": null, + "children": [ + { + "kind": "TypeVarConstraint", + "loc": null, + "children": { + "trait": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Error" + } + } + } + } + ] + } + } + } + ] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [ + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "T" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "E" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + ] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::Try", + "loc": null, + "children": { + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "f" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "catch": { + "kind": "Expr::Try::CaseList", + "loc": null, + "children": [ + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "err" + } + } + } + }, + "guard": null, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Err" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::TypeName", + "loc": null, + "children": { + "value": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + }, + "is_object": false + } + } + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "err" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + ] + }, + "catch_all": false, + "try_else": { + "kind": "Expr::Try::CaseList", + "loc": null, + "children": [ + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "value" + } + } + } + }, + "guard": null, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Ok" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::TypeName", + "loc": null, + "children": { + "value": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + }, + "is_object": false + } + } + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "value" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + ] + }, + "has_try": true + } + } + } + } + } } ] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/pipeline_test_error_handle7.mbt b/test/sync_test/__snapshot__/pipeline_test_error_handle7.mbt index fcc68839..0951c160 100644 --- a/test/sync_test/__snapshot__/pipeline_test_error_handle7.mbt +++ b/test/sync_test/__snapshot__/pipeline_test_error_handle7.mbt @@ -10,9 +10,9 @@ fn f(x: Int) -> Int raise StringError { } fn init { - let a = try? f(42) + let a = to_result(() => f(42)) debug(a) - let b = try? f(-42) + let b = to_result(() => f(-42)) debug(b) } @@ -22,3 +22,12 @@ fn g(x: Int) -> Option[Int] raise StringError { } Some(x) } + +fn[T, E : Error] to_result(f : () -> T raise E) -> Result[T, E] { + try f() + catch { + err => Result::Err(err) + } noraise { + value => Result::Ok(value) + } +} diff --git a/test/sync_test/__snapshot__/pipeline_test_error_handle7.mbt.tokens.json b/test/sync_test/__snapshot__/pipeline_test_error_handle7.mbt.tokens.json index 8bfd9dbc..be253b25 100644 --- a/test/sync_test/__snapshot__/pipeline_test_error_handle7.mbt.tokens.json +++ b/test/sync_test/__snapshot__/pipeline_test_error_handle7.mbt.tokens.json @@ -292,41 +292,64 @@ "loc": "13:9-13:10" }, { - "token": "TRY_QUESTION", - "loc": "13:11-13:15" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "13:11-13:20" + }, + { + "token": "LPAREN", + "loc": "13:20-13:21" + }, + { + "token": "LPAREN", + "loc": "13:21-13:22" + }, + { + "token": "RPAREN", + "loc": "13:22-13:23" + }, + { + "token": "FAT_ARROW", + "loc": "13:24-13:26" }, { "token": [ "LIDENT", "f" ], - "loc": "13:16-13:17" + "loc": "13:27-13:28" }, { "token": "LPAREN", - "loc": "13:17-13:18" + "loc": "13:28-13:29" }, { "token": [ "INT", "42" ], - "loc": "13:18-13:20" + "loc": "13:29-13:31" }, { "token": "RPAREN", - "loc": "13:20-13:21" + "loc": "13:31-13:32" + }, + { + "token": "RPAREN", + "loc": "13:32-13:33" }, { "token": [ "SEMI", false ], - "loc": "13:21-13:21" + "loc": "13:33-13:33" }, { "token": "NEWLINE", - "loc": "13:21-13:22" + "loc": "13:33-13:34" }, { "token": [ @@ -377,45 +400,68 @@ "loc": "15:9-15:10" }, { - "token": "TRY_QUESTION", - "loc": "15:11-15:15" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "15:11-15:20" + }, + { + "token": "LPAREN", + "loc": "15:20-15:21" + }, + { + "token": "LPAREN", + "loc": "15:21-15:22" + }, + { + "token": "RPAREN", + "loc": "15:22-15:23" + }, + { + "token": "FAT_ARROW", + "loc": "15:24-15:26" }, { "token": [ "LIDENT", "f" ], - "loc": "15:16-15:17" + "loc": "15:27-15:28" }, { "token": "LPAREN", - "loc": "15:17-15:18" + "loc": "15:28-15:29" }, { "token": "MINUS", - "loc": "15:18-15:19" + "loc": "15:29-15:30" }, { "token": [ "INT", "42" ], - "loc": "15:19-15:21" + "loc": "15:30-15:32" }, { "token": "RPAREN", - "loc": "15:21-15:22" + "loc": "15:32-15:33" + }, + { + "token": "RPAREN", + "loc": "15:33-15:34" }, { "token": [ "SEMI", false ], - "loc": "15:22-15:22" + "loc": "15:34-15:34" }, { "token": "NEWLINE", - "loc": "15:22-15:23" + "loc": "15:34-15:35" }, { "token": [ @@ -663,8 +709,324 @@ "token": "NEWLINE", "loc": "24:2-24:3" }, + { + "token": "NEWLINE", + "loc": "25:1-25:2" + }, + { + "token": "FN", + "loc": "26:1-26:3" + }, + { + "token": "LBRACKET", + "loc": "26:3-26:4" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "26:4-26:5" + }, + { + "token": "COMMA", + "loc": "26:5-26:6" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "26:7-26:8" + }, + { + "token": "COLON", + "loc": "26:9-26:10" + }, + { + "token": [ + "UIDENT", + "Error" + ], + "loc": "26:11-26:16" + }, + { + "token": "RBRACKET", + "loc": "26:16-26:17" + }, + { + "token": [ + "LIDENT", + "to_result" + ], + "loc": "26:18-26:27" + }, + { + "token": "LPAREN", + "loc": "26:27-26:28" + }, + { + "token": [ + "LIDENT", + "f" + ], + "loc": "26:28-26:29" + }, + { + "token": "COLON", + "loc": "26:30-26:31" + }, + { + "token": "LPAREN", + "loc": "26:32-26:33" + }, + { + "token": "RPAREN", + "loc": "26:33-26:34" + }, + { + "token": "THIN_ARROW", + "loc": "26:35-26:37" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "26:38-26:39" + }, + { + "token": "RAISE", + "loc": "26:40-26:45" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "26:46-26:47" + }, + { + "token": "RPAREN", + "loc": "26:47-26:48" + }, + { + "token": "THIN_ARROW", + "loc": "26:49-26:51" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "26:52-26:58" + }, + { + "token": "LBRACKET", + "loc": "26:58-26:59" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "26:59-26:60" + }, + { + "token": "COMMA", + "loc": "26:60-26:61" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "26:62-26:63" + }, + { + "token": "RBRACKET", + "loc": "26:63-26:64" + }, + { + "token": "LBRACE", + "loc": "26:65-26:66" + }, + { + "token": "NEWLINE", + "loc": "26:66-26:67" + }, + { + "token": "TRY", + "loc": "27:3-27:6" + }, + { + "token": [ + "LIDENT", + "f" + ], + "loc": "27:7-27:8" + }, + { + "token": "LPAREN", + "loc": "27:8-27:9" + }, + { + "token": "RPAREN", + "loc": "27:9-27:10" + }, + { + "token": "NEWLINE", + "loc": "27:10-27:11" + }, + { + "token": "CATCH", + "loc": "28:3-28:8" + }, + { + "token": "LBRACE", + "loc": "28:9-28:10" + }, + { + "token": "NEWLINE", + "loc": "28:10-28:11" + }, + { + "token": [ + "LIDENT", + "err" + ], + "loc": "29:5-29:8" + }, + { + "token": "FAT_ARROW", + "loc": "29:9-29:11" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "29:12-29:18" + }, + { + "token": "COLONCOLON", + "loc": "29:18-29:20" + }, + { + "token": [ + "UIDENT", + "Err" + ], + "loc": "29:20-29:23" + }, + { + "token": "LPAREN", + "loc": "29:23-29:24" + }, + { + "token": [ + "LIDENT", + "err" + ], + "loc": "29:24-29:27" + }, + { + "token": "RPAREN", + "loc": "29:27-29:28" + }, + { + "token": "NEWLINE", + "loc": "29:28-29:29" + }, + { + "token": "RBRACE", + "loc": "30:3-30:4" + }, + { + "token": "NORAISE", + "loc": "30:5-30:12" + }, + { + "token": "LBRACE", + "loc": "30:13-30:14" + }, + { + "token": "NEWLINE", + "loc": "30:14-30:15" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "31:5-31:10" + }, + { + "token": "FAT_ARROW", + "loc": "31:11-31:13" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "31:14-31:20" + }, + { + "token": "COLONCOLON", + "loc": "31:20-31:22" + }, + { + "token": [ + "UIDENT", + "Ok" + ], + "loc": "31:22-31:24" + }, + { + "token": "LPAREN", + "loc": "31:24-31:25" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "31:25-31:30" + }, + { + "token": "RPAREN", + "loc": "31:30-31:31" + }, + { + "token": "NEWLINE", + "loc": "31:31-31:32" + }, + { + "token": "RBRACE", + "loc": "32:3-32:4" + }, + { + "token": "NEWLINE", + "loc": "32:4-32:5" + }, + { + "token": "RBRACE", + "loc": "33:1-33:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "33:2-33:2" + }, + { + "token": "NEWLINE", + "loc": "33:2-33:3" + }, { "token": "EOF", - "loc": "25:1-25:1" + "loc": "34:1-34:1" } ] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/pipeline_test_error_handle8.json b/test/sync_test/__snapshot__/pipeline_test_error_handle8.json index 8af59a78..80fb905a 100644 --- a/test/sync_test/__snapshot__/pipeline_test_error_handle8.json +++ b/test/sync_test/__snapshot__/pipeline_test_error_handle8.json @@ -511,7 +511,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { @@ -780,46 +781,112 @@ } }, "expr": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", + "value": "to_result" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Function", + "loc": null, + "children": { + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "value": "f" + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "f" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null } } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", - "loc": null, - "children": [] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} } - } + ] }, - "kind": { - "kind": "TryOperatorKind::Question", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -905,5 +972,524 @@ } } } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "to_result" + } + }, + "has_error": null, + "is_async": null, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "f" + } + }, + "ty": { + "kind": "Type::Arrow", + "loc": null, + "children": { + "args": { + "kind": "Type::Arrow::ArgList", + "loc": null, + "children": [] + }, + "res": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "T" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "err": { + "kind": "ErrorType::ErrorType", + "loc": null, + "children": { + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "E" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + "is_async": null + } + } + } + } + ] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [ + { + "kind": "TypeVarBinder", + "loc": null, + "children": { + "name": "T", + "constraints": { + "kind": "TypeVarBinder::TypeVarConstraintList", + "loc": null, + "children": [] + } + } + }, + { + "kind": "TypeVarBinder", + "loc": null, + "children": { + "name": "E", + "constraints": { + "kind": "TypeVarBinder::TypeVarConstraintList", + "loc": null, + "children": [ + { + "kind": "TypeVarConstraint", + "loc": null, + "children": { + "trait": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Error" + } + } + } + } + ] + } + } + } + ] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [ + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "T" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "E" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + ] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::Try", + "loc": null, + "children": { + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "f" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "catch": { + "kind": "Expr::Try::CaseList", + "loc": null, + "children": [ + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "err" + } + } + } + }, + "guard": null, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Err" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::TypeName", + "loc": null, + "children": { + "value": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + }, + "is_object": false + } + } + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "err" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + ] + }, + "catch_all": false, + "try_else": { + "kind": "Expr::Try::CaseList", + "loc": null, + "children": [ + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "value" + } + } + } + }, + "guard": null, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Ok" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::TypeName", + "loc": null, + "children": { + "value": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + }, + "is_object": false + } + } + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "value" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + ] + }, + "has_try": true + } + } + } + } + } } ] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/pipeline_test_error_handle8.mbt b/test/sync_test/__snapshot__/pipeline_test_error_handle8.mbt index f91b7297..e988b7b7 100644 --- a/test/sync_test/__snapshot__/pipeline_test_error_handle8.mbt +++ b/test/sync_test/__snapshot__/pipeline_test_error_handle8.mbt @@ -10,7 +10,16 @@ fn init { let tests : Array[() -> Unit raise StringError] = [f] for k = 0; k < tests.length(); k = k + 1 { let f = tests[k] - let result = try? f() + let result = to_result(() => f()) debug(result) } } + +fn[T, E : Error] to_result(f : () -> T raise E) -> Result[T, E] { + try f() + catch { + err => Result::Err(err) + } noraise { + value => Result::Ok(value) + } +} diff --git a/test/sync_test/__snapshot__/pipeline_test_error_handle8.mbt.tokens.json b/test/sync_test/__snapshot__/pipeline_test_error_handle8.mbt.tokens.json index 2aa954f5..6a2c0019 100644 --- a/test/sync_test/__snapshot__/pipeline_test_error_handle8.mbt.tokens.json +++ b/test/sync_test/__snapshot__/pipeline_test_error_handle8.mbt.tokens.json @@ -462,34 +462,57 @@ "loc": "13:16-13:17" }, { - "token": "TRY_QUESTION", - "loc": "13:18-13:22" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "13:18-13:27" + }, + { + "token": "LPAREN", + "loc": "13:27-13:28" + }, + { + "token": "LPAREN", + "loc": "13:28-13:29" + }, + { + "token": "RPAREN", + "loc": "13:29-13:30" + }, + { + "token": "FAT_ARROW", + "loc": "13:31-13:33" }, { "token": [ "LIDENT", "f" ], - "loc": "13:23-13:24" + "loc": "13:34-13:35" }, { "token": "LPAREN", - "loc": "13:24-13:25" + "loc": "13:35-13:36" }, { "token": "RPAREN", - "loc": "13:25-13:26" + "loc": "13:36-13:37" + }, + { + "token": "RPAREN", + "loc": "13:37-13:38" }, { "token": [ "SEMI", false ], - "loc": "13:26-13:26" + "loc": "13:38-13:38" }, { "token": "NEWLINE", - "loc": "13:26-13:27" + "loc": "13:38-13:39" }, { "token": [ @@ -540,8 +563,324 @@ "token": "NEWLINE", "loc": "16:2-16:3" }, + { + "token": "NEWLINE", + "loc": "17:1-17:2" + }, + { + "token": "FN", + "loc": "18:1-18:3" + }, + { + "token": "LBRACKET", + "loc": "18:3-18:4" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "18:4-18:5" + }, + { + "token": "COMMA", + "loc": "18:5-18:6" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "18:7-18:8" + }, + { + "token": "COLON", + "loc": "18:9-18:10" + }, + { + "token": [ + "UIDENT", + "Error" + ], + "loc": "18:11-18:16" + }, + { + "token": "RBRACKET", + "loc": "18:16-18:17" + }, + { + "token": [ + "LIDENT", + "to_result" + ], + "loc": "18:18-18:27" + }, + { + "token": "LPAREN", + "loc": "18:27-18:28" + }, + { + "token": [ + "LIDENT", + "f" + ], + "loc": "18:28-18:29" + }, + { + "token": "COLON", + "loc": "18:30-18:31" + }, + { + "token": "LPAREN", + "loc": "18:32-18:33" + }, + { + "token": "RPAREN", + "loc": "18:33-18:34" + }, + { + "token": "THIN_ARROW", + "loc": "18:35-18:37" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "18:38-18:39" + }, + { + "token": "RAISE", + "loc": "18:40-18:45" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "18:46-18:47" + }, + { + "token": "RPAREN", + "loc": "18:47-18:48" + }, + { + "token": "THIN_ARROW", + "loc": "18:49-18:51" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "18:52-18:58" + }, + { + "token": "LBRACKET", + "loc": "18:58-18:59" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "18:59-18:60" + }, + { + "token": "COMMA", + "loc": "18:60-18:61" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "18:62-18:63" + }, + { + "token": "RBRACKET", + "loc": "18:63-18:64" + }, + { + "token": "LBRACE", + "loc": "18:65-18:66" + }, + { + "token": "NEWLINE", + "loc": "18:66-18:67" + }, + { + "token": "TRY", + "loc": "19:3-19:6" + }, + { + "token": [ + "LIDENT", + "f" + ], + "loc": "19:7-19:8" + }, + { + "token": "LPAREN", + "loc": "19:8-19:9" + }, + { + "token": "RPAREN", + "loc": "19:9-19:10" + }, + { + "token": "NEWLINE", + "loc": "19:10-19:11" + }, + { + "token": "CATCH", + "loc": "20:3-20:8" + }, + { + "token": "LBRACE", + "loc": "20:9-20:10" + }, + { + "token": "NEWLINE", + "loc": "20:10-20:11" + }, + { + "token": [ + "LIDENT", + "err" + ], + "loc": "21:5-21:8" + }, + { + "token": "FAT_ARROW", + "loc": "21:9-21:11" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "21:12-21:18" + }, + { + "token": "COLONCOLON", + "loc": "21:18-21:20" + }, + { + "token": [ + "UIDENT", + "Err" + ], + "loc": "21:20-21:23" + }, + { + "token": "LPAREN", + "loc": "21:23-21:24" + }, + { + "token": [ + "LIDENT", + "err" + ], + "loc": "21:24-21:27" + }, + { + "token": "RPAREN", + "loc": "21:27-21:28" + }, + { + "token": "NEWLINE", + "loc": "21:28-21:29" + }, + { + "token": "RBRACE", + "loc": "22:3-22:4" + }, + { + "token": "NORAISE", + "loc": "22:5-22:12" + }, + { + "token": "LBRACE", + "loc": "22:13-22:14" + }, + { + "token": "NEWLINE", + "loc": "22:14-22:15" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "23:5-23:10" + }, + { + "token": "FAT_ARROW", + "loc": "23:11-23:13" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "23:14-23:20" + }, + { + "token": "COLONCOLON", + "loc": "23:20-23:22" + }, + { + "token": [ + "UIDENT", + "Ok" + ], + "loc": "23:22-23:24" + }, + { + "token": "LPAREN", + "loc": "23:24-23:25" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "23:25-23:30" + }, + { + "token": "RPAREN", + "loc": "23:30-23:31" + }, + { + "token": "NEWLINE", + "loc": "23:31-23:32" + }, + { + "token": "RBRACE", + "loc": "24:3-24:4" + }, + { + "token": "NEWLINE", + "loc": "24:4-24:5" + }, + { + "token": "RBRACE", + "loc": "25:1-25:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "25:2-25:2" + }, + { + "token": "NEWLINE", + "loc": "25:2-25:3" + }, { "token": "EOF", - "loc": "17:1-17:1" + "loc": "26:1-26:1" } ] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/pipeline_test_error_handle9.json b/test/sync_test/__snapshot__/pipeline_test_error_handle9.json index 19031b86..c509106f 100644 --- a/test/sync_test/__snapshot__/pipeline_test_error_handle9.json +++ b/test/sync_test/__snapshot__/pipeline_test_error_handle9.json @@ -473,147 +473,213 @@ } }, "expr": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", - "loc": null, - "children": { - "value": "foo" - } - } + "value": "to_result" } } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", "loc": null, - "children": [ - { - "kind": "Argument", + "children": { + "value": { + "kind": "Expr::Function", "loc": null, "children": { - "value": { - "kind": "Expr::Apply", + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "func": { - "kind": "Expr::Constr", + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Apply", "loc": null, "children": { - "constr": { - "kind": "Constructor", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "name": { - "kind": "ConstrName", + "id": { + "kind": "Var", "loc": null, "children": { - "name": "Ref" + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "foo" + } + } } - }, - "extra_info": { - "kind": "ConstructorExtraInfo::NoExtraInfo", - "loc": null, - "children": {} } } - } - } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", - "loc": null, - "children": [ - { - "kind": "Argument", + }, + "args": { + "kind": "Expr::Apply::ArgumentList", "loc": null, - "children": { - "value": { - "kind": "Expr::Constant", + "children": [ + { + "kind": "Argument", "loc": null, "children": { - "constant": { - "kind": "Constant::Int", + "value": { + "kind": "Expr::Apply", "loc": null, "children": { - "value": "0" + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Ref" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::NoExtraInfo", + "loc": null, + "children": {} + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "0" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } } }, - "kind": { - "kind": "ArgumentKind::Positional", + { + "kind": "Argument", "loc": null, - "children": {} + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Bool", + "loc": null, + "children": { + "value": false + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } } - } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} } - ] + } }, - "attr": { - "kind": "ApplyAttr::NoAttr", + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", "loc": null, "children": {} - } + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} } } }, - { - "kind": "Argument", + "kind": { + "kind": "ArgumentKind::Positional", "loc": null, - "children": { - "value": { - "kind": "Expr::Constant", - "loc": null, - "children": { - "constant": { - "kind": "Constant::Bool", - "loc": null, - "children": { - "value": false - } - } - } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} - } - } + "children": {} } - ] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} + } } - } + ] }, - "kind": { - "kind": "TryOperatorKind::Question", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -690,5 +756,524 @@ } } } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "to_result" + } + }, + "has_error": null, + "is_async": null, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "f" + } + }, + "ty": { + "kind": "Type::Arrow", + "loc": null, + "children": { + "args": { + "kind": "Type::Arrow::ArgList", + "loc": null, + "children": [] + }, + "res": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "T" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "err": { + "kind": "ErrorType::ErrorType", + "loc": null, + "children": { + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "E" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + "is_async": null + } + } + } + } + ] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [ + { + "kind": "TypeVarBinder", + "loc": null, + "children": { + "name": "T", + "constraints": { + "kind": "TypeVarBinder::TypeVarConstraintList", + "loc": null, + "children": [] + } + } + }, + { + "kind": "TypeVarBinder", + "loc": null, + "children": { + "name": "E", + "constraints": { + "kind": "TypeVarBinder::TypeVarConstraintList", + "loc": null, + "children": [ + { + "kind": "TypeVarConstraint", + "loc": null, + "children": { + "trait": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Error" + } + } + } + } + ] + } + } + } + ] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [ + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "T" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "E" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + ] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::Try", + "loc": null, + "children": { + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "f" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "catch": { + "kind": "Expr::Try::CaseList", + "loc": null, + "children": [ + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "err" + } + } + } + }, + "guard": null, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Err" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::TypeName", + "loc": null, + "children": { + "value": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + }, + "is_object": false + } + } + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "err" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + ] + }, + "catch_all": false, + "try_else": { + "kind": "Expr::Try::CaseList", + "loc": null, + "children": [ + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "value" + } + } + } + }, + "guard": null, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Ok" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::TypeName", + "loc": null, + "children": { + "value": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + }, + "is_object": false + } + } + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "value" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + ] + }, + "has_try": true + } + } + } + } + } } ] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/pipeline_test_error_handle9.mbt b/test/sync_test/__snapshot__/pipeline_test_error_handle9.mbt index 91a2e08a..a4dacc94 100644 --- a/test/sync_test/__snapshot__/pipeline_test_error_handle9.mbt +++ b/test/sync_test/__snapshot__/pipeline_test_error_handle9.mbt @@ -8,6 +8,15 @@ fn foo(r : Ref[Int], err : Bool) -> Unit raise FooError { } fn main { - let r = try? foo(Ref(0), false) + let r = to_result(() => foo(Ref(0), false)) debug(r) } + +fn[T, E : Error] to_result(f : () -> T raise E) -> Result[T, E] { + try f() + catch { + err => Result::Err(err) + } noraise { + value => Result::Ok(value) + } +} diff --git a/test/sync_test/__snapshot__/pipeline_test_error_handle9.mbt.tokens.json b/test/sync_test/__snapshot__/pipeline_test_error_handle9.mbt.tokens.json index 1af0c04e..44c504d4 100644 --- a/test/sync_test/__snapshot__/pipeline_test_error_handle9.mbt.tokens.json +++ b/test/sync_test/__snapshot__/pipeline_test_error_handle9.mbt.tokens.json @@ -299,64 +299,87 @@ "loc": "11:9-11:10" }, { - "token": "TRY_QUESTION", - "loc": "11:11-11:15" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "11:11-11:20" + }, + { + "token": "LPAREN", + "loc": "11:20-11:21" + }, + { + "token": "LPAREN", + "loc": "11:21-11:22" + }, + { + "token": "RPAREN", + "loc": "11:22-11:23" + }, + { + "token": "FAT_ARROW", + "loc": "11:24-11:26" }, { "token": [ "LIDENT", "foo" ], - "loc": "11:16-11:19" + "loc": "11:27-11:30" }, { "token": "LPAREN", - "loc": "11:19-11:20" + "loc": "11:30-11:31" }, { "token": [ "UIDENT", "Ref" ], - "loc": "11:20-11:23" + "loc": "11:31-11:34" }, { "token": "LPAREN", - "loc": "11:23-11:24" + "loc": "11:34-11:35" }, { "token": [ "INT", "0" ], - "loc": "11:24-11:25" + "loc": "11:35-11:36" }, { "token": "RPAREN", - "loc": "11:25-11:26" + "loc": "11:36-11:37" }, { "token": "COMMA", - "loc": "11:26-11:27" + "loc": "11:37-11:38" }, { "token": "FALSE", - "loc": "11:28-11:33" + "loc": "11:39-11:44" }, { "token": "RPAREN", - "loc": "11:33-11:34" + "loc": "11:44-11:45" + }, + { + "token": "RPAREN", + "loc": "11:45-11:46" }, { "token": [ "SEMI", false ], - "loc": "11:34-11:34" + "loc": "11:46-11:46" }, { "token": "NEWLINE", - "loc": "11:34-11:35" + "loc": "11:46-11:47" }, { "token": [ @@ -399,8 +422,324 @@ "token": "NEWLINE", "loc": "13:2-13:3" }, + { + "token": "NEWLINE", + "loc": "14:1-14:2" + }, + { + "token": "FN", + "loc": "15:1-15:3" + }, + { + "token": "LBRACKET", + "loc": "15:3-15:4" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "15:4-15:5" + }, + { + "token": "COMMA", + "loc": "15:5-15:6" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "15:7-15:8" + }, + { + "token": "COLON", + "loc": "15:9-15:10" + }, + { + "token": [ + "UIDENT", + "Error" + ], + "loc": "15:11-15:16" + }, + { + "token": "RBRACKET", + "loc": "15:16-15:17" + }, + { + "token": [ + "LIDENT", + "to_result" + ], + "loc": "15:18-15:27" + }, + { + "token": "LPAREN", + "loc": "15:27-15:28" + }, + { + "token": [ + "LIDENT", + "f" + ], + "loc": "15:28-15:29" + }, + { + "token": "COLON", + "loc": "15:30-15:31" + }, + { + "token": "LPAREN", + "loc": "15:32-15:33" + }, + { + "token": "RPAREN", + "loc": "15:33-15:34" + }, + { + "token": "THIN_ARROW", + "loc": "15:35-15:37" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "15:38-15:39" + }, + { + "token": "RAISE", + "loc": "15:40-15:45" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "15:46-15:47" + }, + { + "token": "RPAREN", + "loc": "15:47-15:48" + }, + { + "token": "THIN_ARROW", + "loc": "15:49-15:51" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "15:52-15:58" + }, + { + "token": "LBRACKET", + "loc": "15:58-15:59" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "15:59-15:60" + }, + { + "token": "COMMA", + "loc": "15:60-15:61" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "15:62-15:63" + }, + { + "token": "RBRACKET", + "loc": "15:63-15:64" + }, + { + "token": "LBRACE", + "loc": "15:65-15:66" + }, + { + "token": "NEWLINE", + "loc": "15:66-15:67" + }, + { + "token": "TRY", + "loc": "16:3-16:6" + }, + { + "token": [ + "LIDENT", + "f" + ], + "loc": "16:7-16:8" + }, + { + "token": "LPAREN", + "loc": "16:8-16:9" + }, + { + "token": "RPAREN", + "loc": "16:9-16:10" + }, + { + "token": "NEWLINE", + "loc": "16:10-16:11" + }, + { + "token": "CATCH", + "loc": "17:3-17:8" + }, + { + "token": "LBRACE", + "loc": "17:9-17:10" + }, + { + "token": "NEWLINE", + "loc": "17:10-17:11" + }, + { + "token": [ + "LIDENT", + "err" + ], + "loc": "18:5-18:8" + }, + { + "token": "FAT_ARROW", + "loc": "18:9-18:11" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "18:12-18:18" + }, + { + "token": "COLONCOLON", + "loc": "18:18-18:20" + }, + { + "token": [ + "UIDENT", + "Err" + ], + "loc": "18:20-18:23" + }, + { + "token": "LPAREN", + "loc": "18:23-18:24" + }, + { + "token": [ + "LIDENT", + "err" + ], + "loc": "18:24-18:27" + }, + { + "token": "RPAREN", + "loc": "18:27-18:28" + }, + { + "token": "NEWLINE", + "loc": "18:28-18:29" + }, + { + "token": "RBRACE", + "loc": "19:3-19:4" + }, + { + "token": "NORAISE", + "loc": "19:5-19:12" + }, + { + "token": "LBRACE", + "loc": "19:13-19:14" + }, + { + "token": "NEWLINE", + "loc": "19:14-19:15" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "20:5-20:10" + }, + { + "token": "FAT_ARROW", + "loc": "20:11-20:13" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "20:14-20:20" + }, + { + "token": "COLONCOLON", + "loc": "20:20-20:22" + }, + { + "token": [ + "UIDENT", + "Ok" + ], + "loc": "20:22-20:24" + }, + { + "token": "LPAREN", + "loc": "20:24-20:25" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "20:25-20:30" + }, + { + "token": "RPAREN", + "loc": "20:30-20:31" + }, + { + "token": "NEWLINE", + "loc": "20:31-20:32" + }, + { + "token": "RBRACE", + "loc": "21:3-21:4" + }, + { + "token": "NEWLINE", + "loc": "21:4-21:5" + }, + { + "token": "RBRACE", + "loc": "22:1-22:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "22:2-22:2" + }, + { + "token": "NEWLINE", + "loc": "22:2-22:3" + }, { "token": "EOF", - "loc": "14:1-14:1" + "loc": "23:1-23:1" } ] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/pipeline_test_error_poly_dce.json b/test/sync_test/__snapshot__/pipeline_test_error_poly_dce.json index 07ee0e29..92e5018c 100644 --- a/test/sync_test/__snapshot__/pipeline_test_error_poly_dce.json +++ b/test/sync_test/__snapshot__/pipeline_test_error_poly_dce.json @@ -805,180 +805,246 @@ "loc": null, "children": { "value": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", - "loc": null, - "children": { - "value": "h" - } - } + "value": "to_result" } } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", "loc": null, - "children": [ - { - "kind": "Argument", + "children": { + "value": { + "kind": "Expr::Function", "loc": null, "children": { - "value": { - "kind": "Expr::Function", + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "func": { - "kind": "Func::Lambda", + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Apply", "loc": null, "children": { - "parameters": { - "kind": "Func::Lambda::ParameterList", + "func": { + "kind": "Expr::Ident", "loc": null, - "children": [ - { - "kind": "Parameter::Positional", + "children": { + "id": { + "kind": "Var", "loc": null, "children": { - "binder": { - "kind": "Binder", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": "x" + "value": "h" } - }, - "ty": null + } } } - ] + } }, - "body": { - "kind": "Expr::Raise", + "args": { + "kind": "Expr::Apply::ArgumentList", "loc": null, - "children": { - "err_value": { - "kind": "Expr::Apply", + "children": [ + { + "kind": "Argument", "loc": null, "children": { - "func": { - "kind": "Expr::Constr", + "value": { + "kind": "Expr::Function", "loc": null, "children": { - "constr": { - "kind": "Constructor", + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "name": { - "kind": "ConstrName", + "parameters": { + "kind": "Func::Lambda::ParameterList", "loc": null, - "children": { - "name": "E" - } + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "x" + } + }, + "ty": null + } + } + ] }, - "extra_info": { - "kind": "ConstructorExtraInfo::NoExtraInfo", - "loc": null, - "children": {} - } - } - } - } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", - "loc": null, - "children": [ - { - "kind": "Argument", - "loc": null, - "children": { - "value": { - "kind": "Expr::Ident", + "body": { + "kind": "Expr::Raise", "loc": null, "children": { - "id": { - "kind": "Var", + "err_value": { + "kind": "Expr::Apply", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", + "func": { + "kind": "Expr::Constr", "loc": null, "children": { - "value": "x" + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "E" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::NoExtraInfo", + "loc": null, + "children": {} + } + } + } } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "x" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} } } } } }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, "kind": { - "kind": "ArgumentKind::Positional", + "kind": "FnKind::Arrow", "loc": null, "children": {} - } + }, + "has_error": null, + "is_async": null } } - ] + } }, - "attr": { - "kind": "ApplyAttr::NoAttr", + "kind": { + "kind": "ArgumentKind::Positional", "loc": null, "children": {} } } } - } - }, - "return_type": null, - "error_type": { - "kind": "ErrorType::NoErrorType", - "loc": null, - "children": {} + ] }, - "kind": { - "kind": "FnKind::Arrow", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} - }, - "has_error": null, - "is_async": null + } } - } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } - ] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} + } } - } + ] }, - "kind": { - "kind": "TryOperatorKind::Question", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -1165,5 +1231,524 @@ } } } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "to_result" + } + }, + "has_error": null, + "is_async": null, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "f" + } + }, + "ty": { + "kind": "Type::Arrow", + "loc": null, + "children": { + "args": { + "kind": "Type::Arrow::ArgList", + "loc": null, + "children": [] + }, + "res": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "T" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "err": { + "kind": "ErrorType::ErrorType", + "loc": null, + "children": { + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "E" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + "is_async": null + } + } + } + } + ] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [ + { + "kind": "TypeVarBinder", + "loc": null, + "children": { + "name": "T", + "constraints": { + "kind": "TypeVarBinder::TypeVarConstraintList", + "loc": null, + "children": [] + } + } + }, + { + "kind": "TypeVarBinder", + "loc": null, + "children": { + "name": "E", + "constraints": { + "kind": "TypeVarBinder::TypeVarConstraintList", + "loc": null, + "children": [ + { + "kind": "TypeVarConstraint", + "loc": null, + "children": { + "trait": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Error" + } + } + } + } + ] + } + } + } + ] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [ + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "T" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "E" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + ] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::Try", + "loc": null, + "children": { + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "f" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "catch": { + "kind": "Expr::Try::CaseList", + "loc": null, + "children": [ + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "err" + } + } + } + }, + "guard": null, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Err" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::TypeName", + "loc": null, + "children": { + "value": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + }, + "is_object": false + } + } + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "err" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + ] + }, + "catch_all": false, + "try_else": { + "kind": "Expr::Try::CaseList", + "loc": null, + "children": [ + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "value" + } + } + } + }, + "guard": null, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Ok" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::TypeName", + "loc": null, + "children": { + "value": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + }, + "is_object": false + } + } + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "value" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + ] + }, + "has_try": true + } + } + } + } + } } ] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/pipeline_test_error_poly_dce.mbt b/test/sync_test/__snapshot__/pipeline_test_error_poly_dce.mbt index caa400ad..4d45a42e 100644 --- a/test/sync_test/__snapshot__/pipeline_test_error_poly_dce.mbt +++ b/test/sync_test/__snapshot__/pipeline_test_error_poly_dce.mbt @@ -18,6 +18,15 @@ suberror E { ///| fn main { - debug(try? h(x => raise E(x))) + debug(to_result(() => h(x => raise E(x)))) h(fn(x) { println(x) }) } + +fn[T, E : Error] to_result(f : () -> T raise E) -> Result[T, E] { + try f() + catch { + err => Result::Err(err) + } noraise { + value => Result::Ok(value) + } +} diff --git a/test/sync_test/__snapshot__/pipeline_test_error_poly_dce.mbt.tokens.json b/test/sync_test/__snapshot__/pipeline_test_error_poly_dce.mbt.tokens.json index cc9d0cba..5c102c0a 100644 --- a/test/sync_test/__snapshot__/pipeline_test_error_poly_dce.mbt.tokens.json +++ b/test/sync_test/__snapshot__/pipeline_test_error_poly_dce.mbt.tokens.json @@ -490,75 +490,98 @@ "loc": "21:8-21:9" }, { - "token": "TRY_QUESTION", - "loc": "21:9-21:13" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "21:9-21:18" + }, + { + "token": "LPAREN", + "loc": "21:18-21:19" + }, + { + "token": "LPAREN", + "loc": "21:19-21:20" + }, + { + "token": "RPAREN", + "loc": "21:20-21:21" + }, + { + "token": "FAT_ARROW", + "loc": "21:22-21:24" }, { "token": [ "LIDENT", "h" ], - "loc": "21:14-21:15" + "loc": "21:25-21:26" }, { "token": "LPAREN", - "loc": "21:15-21:16" + "loc": "21:26-21:27" }, { "token": [ "LIDENT", "x" ], - "loc": "21:16-21:17" + "loc": "21:27-21:28" }, { "token": "FAT_ARROW", - "loc": "21:18-21:20" + "loc": "21:29-21:31" }, { "token": "RAISE", - "loc": "21:21-21:26" + "loc": "21:32-21:37" }, { "token": [ "UIDENT", "E" ], - "loc": "21:27-21:28" + "loc": "21:38-21:39" }, { "token": "LPAREN", - "loc": "21:28-21:29" + "loc": "21:39-21:40" }, { "token": [ "LIDENT", "x" ], - "loc": "21:29-21:30" + "loc": "21:40-21:41" + }, + { + "token": "RPAREN", + "loc": "21:41-21:42" }, { "token": "RPAREN", - "loc": "21:30-21:31" + "loc": "21:42-21:43" }, { "token": "RPAREN", - "loc": "21:31-21:32" + "loc": "21:43-21:44" }, { "token": "RPAREN", - "loc": "21:32-21:33" + "loc": "21:44-21:45" }, { "token": [ "SEMI", false ], - "loc": "21:33-21:33" + "loc": "21:45-21:45" }, { "token": "NEWLINE", - "loc": "21:33-21:34" + "loc": "21:45-21:46" }, { "token": [ @@ -643,8 +666,324 @@ "token": "NEWLINE", "loc": "23:2-23:3" }, + { + "token": "NEWLINE", + "loc": "24:1-24:2" + }, + { + "token": "FN", + "loc": "25:1-25:3" + }, + { + "token": "LBRACKET", + "loc": "25:3-25:4" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "25:4-25:5" + }, + { + "token": "COMMA", + "loc": "25:5-25:6" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "25:7-25:8" + }, + { + "token": "COLON", + "loc": "25:9-25:10" + }, + { + "token": [ + "UIDENT", + "Error" + ], + "loc": "25:11-25:16" + }, + { + "token": "RBRACKET", + "loc": "25:16-25:17" + }, + { + "token": [ + "LIDENT", + "to_result" + ], + "loc": "25:18-25:27" + }, + { + "token": "LPAREN", + "loc": "25:27-25:28" + }, + { + "token": [ + "LIDENT", + "f" + ], + "loc": "25:28-25:29" + }, + { + "token": "COLON", + "loc": "25:30-25:31" + }, + { + "token": "LPAREN", + "loc": "25:32-25:33" + }, + { + "token": "RPAREN", + "loc": "25:33-25:34" + }, + { + "token": "THIN_ARROW", + "loc": "25:35-25:37" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "25:38-25:39" + }, + { + "token": "RAISE", + "loc": "25:40-25:45" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "25:46-25:47" + }, + { + "token": "RPAREN", + "loc": "25:47-25:48" + }, + { + "token": "THIN_ARROW", + "loc": "25:49-25:51" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "25:52-25:58" + }, + { + "token": "LBRACKET", + "loc": "25:58-25:59" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "25:59-25:60" + }, + { + "token": "COMMA", + "loc": "25:60-25:61" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "25:62-25:63" + }, + { + "token": "RBRACKET", + "loc": "25:63-25:64" + }, + { + "token": "LBRACE", + "loc": "25:65-25:66" + }, + { + "token": "NEWLINE", + "loc": "25:66-25:67" + }, + { + "token": "TRY", + "loc": "26:3-26:6" + }, + { + "token": [ + "LIDENT", + "f" + ], + "loc": "26:7-26:8" + }, + { + "token": "LPAREN", + "loc": "26:8-26:9" + }, + { + "token": "RPAREN", + "loc": "26:9-26:10" + }, + { + "token": "NEWLINE", + "loc": "26:10-26:11" + }, + { + "token": "CATCH", + "loc": "27:3-27:8" + }, + { + "token": "LBRACE", + "loc": "27:9-27:10" + }, + { + "token": "NEWLINE", + "loc": "27:10-27:11" + }, + { + "token": [ + "LIDENT", + "err" + ], + "loc": "28:5-28:8" + }, + { + "token": "FAT_ARROW", + "loc": "28:9-28:11" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "28:12-28:18" + }, + { + "token": "COLONCOLON", + "loc": "28:18-28:20" + }, + { + "token": [ + "UIDENT", + "Err" + ], + "loc": "28:20-28:23" + }, + { + "token": "LPAREN", + "loc": "28:23-28:24" + }, + { + "token": [ + "LIDENT", + "err" + ], + "loc": "28:24-28:27" + }, + { + "token": "RPAREN", + "loc": "28:27-28:28" + }, + { + "token": "NEWLINE", + "loc": "28:28-28:29" + }, + { + "token": "RBRACE", + "loc": "29:3-29:4" + }, + { + "token": "NORAISE", + "loc": "29:5-29:12" + }, + { + "token": "LBRACE", + "loc": "29:13-29:14" + }, + { + "token": "NEWLINE", + "loc": "29:14-29:15" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "30:5-30:10" + }, + { + "token": "FAT_ARROW", + "loc": "30:11-30:13" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "30:14-30:20" + }, + { + "token": "COLONCOLON", + "loc": "30:20-30:22" + }, + { + "token": [ + "UIDENT", + "Ok" + ], + "loc": "30:22-30:24" + }, + { + "token": "LPAREN", + "loc": "30:24-30:25" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "30:25-30:30" + }, + { + "token": "RPAREN", + "loc": "30:30-30:31" + }, + { + "token": "NEWLINE", + "loc": "30:31-30:32" + }, + { + "token": "RBRACE", + "loc": "31:3-31:4" + }, + { + "token": "NEWLINE", + "loc": "31:4-31:5" + }, + { + "token": "RBRACE", + "loc": "32:1-32:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "32:2-32:2" + }, + { + "token": "NEWLINE", + "loc": "32:2-32:3" + }, { "token": "EOF", - "loc": "24:1-24:1" + "loc": "33:1-33:1" } ] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/pipeline_test_error_poly_iter.json b/test/sync_test/__snapshot__/pipeline_test_error_poly_iter.json index ec4d0d7f..95880ec0 100644 --- a/test/sync_test/__snapshot__/pipeline_test_error_poly_iter.json +++ b/test/sync_test/__snapshot__/pipeline_test_error_poly_iter.json @@ -1583,7 +1583,8 @@ "kind": "Expr::Array::ExprList", "loc": null, "children": [] - } + }, + "is_iter": false } }, "body": { @@ -9715,119 +9716,185 @@ "loc": null, "children": { "value": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", - "loc": null, - "children": { - "value": "bytes_to_utf16" - } - } + "value": "to_result" } } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", "loc": null, - "children": [ - { - "kind": "Argument", + "children": { + "value": { + "kind": "Expr::Function", "loc": null, "children": { - "value": { - "kind": "Expr::Apply", + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Apply", "loc": null, "children": { - "id": { - "kind": "Var", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Dot", + "id": { + "kind": "Var", "loc": null, "children": { - "pkg": "encoding/utf16", - "id": "encode" + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "bytes_to_utf16" + } + } } } } - } - } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", - "loc": null, - "children": [ - { - "kind": "Argument", + }, + "args": { + "kind": "Expr::Apply::ArgumentList", "loc": null, - "children": { - "value": { - "kind": "Expr::Constant", + "children": [ + { + "kind": "Argument", "loc": null, "children": { - "constant": { - "kind": "Constant::String", + "value": { + "kind": "Expr::Apply", "loc": null, "children": { - "value": "abc" + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Dot", + "loc": null, + "children": { + "pkg": "encoding/utf16", + "id": "encode" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "abc" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} } - } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} } - ] + } }, - "attr": { - "kind": "ApplyAttr::NoAttr", + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", "loc": null, "children": {} - } + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } - ] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} + } } - } + ] }, - "kind": { - "kind": "TryOperatorKind::Question", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -9881,119 +9948,185 @@ "loc": null, "children": { "value": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", - "loc": null, - "children": { - "value": "bytes_to_utf16" - } - } + "value": "to_result" } } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", "loc": null, - "children": [ - { - "kind": "Argument", + "children": { + "value": { + "kind": "Expr::Function", "loc": null, "children": { - "value": { - "kind": "Expr::Apply", + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Apply", "loc": null, "children": { - "id": { - "kind": "Var", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Dot", + "id": { + "kind": "Var", "loc": null, "children": { - "pkg": "encoding/utf16", - "id": "encode" + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "bytes_to_utf16" + } + } } } } - } - } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", - "loc": null, - "children": [ - { - "kind": "Argument", + }, + "args": { + "kind": "Expr::Apply::ArgumentList", "loc": null, - "children": { - "value": { - "kind": "Expr::Constant", + "children": [ + { + "kind": "Argument", "loc": null, "children": { - "constant": { - "kind": "Constant::String", + "value": { + "kind": "Expr::Apply", "loc": null, "children": { - "value": "中文" + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Dot", + "loc": null, + "children": { + "pkg": "encoding/utf16", + "id": "encode" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "中文" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} } - } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} } - ] + } }, - "attr": { - "kind": "ApplyAttr::NoAttr", + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", "loc": null, "children": {} - } + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } - ] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} + } } - } + ] }, - "kind": { - "kind": "TryOperatorKind::Question", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -10047,119 +10180,185 @@ "loc": null, "children": { "value": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", - "loc": null, - "children": { - "value": "bytes_to_utf16" - } - } + "value": "to_result" } } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", "loc": null, - "children": [ - { - "kind": "Argument", + "children": { + "value": { + "kind": "Expr::Function", "loc": null, "children": { - "value": { - "kind": "Expr::Apply", + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Apply", "loc": null, "children": { - "id": { - "kind": "Var", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Dot", + "id": { + "kind": "Var", "loc": null, "children": { - "pkg": "encoding/utf16", - "id": "encode" + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "bytes_to_utf16" + } + } } } } - } - } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", - "loc": null, - "children": [ - { - "kind": "Argument", + }, + "args": { + "kind": "Expr::Apply::ArgumentList", "loc": null, - "children": { - "value": { - "kind": "Expr::Constant", + "children": [ + { + "kind": "Argument", "loc": null, "children": { - "constant": { - "kind": "Constant::String", + "value": { + "kind": "Expr::Apply", "loc": null, "children": { - "value": "🤣" + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Dot", + "loc": null, + "children": { + "pkg": "encoding/utf16", + "id": "encode" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "🤣" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} } - } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} } - ] + } }, - "attr": { - "kind": "ApplyAttr::NoAttr", + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", "loc": null, "children": {} - } + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } - ] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} + } } - } + ] }, - "kind": { - "kind": "TryOperatorKind::Question", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -10213,122 +10412,189 @@ "loc": null, "children": { "value": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", - "loc": null, - "children": { - "value": "bytes_to_utf16" - } - } + "value": "to_result" } } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", "loc": null, - "children": [ - { - "kind": "Argument", + "children": { + "value": { + "kind": "Expr::Function", "loc": null, "children": { - "value": { - "kind": "Expr::Array", + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "exprs": { - "kind": "Expr::Array::ExprList", + "parameters": { + "kind": "Func::Lambda::ParameterList", "loc": null, - "children": [ - { - "kind": "Expr::Constant", - "loc": null, - "children": { - "constant": { - "kind": "Constant::Int", - "loc": null, - "children": { - "value": "0x00" - } - } - } - }, - { - "kind": "Expr::Constant", + "children": [] + }, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "constant": { - "kind": "Constant::Int", + "id": { + "kind": "Var", "loc": null, "children": { - "value": "0xD8" + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "bytes_to_utf16" + } + } } } } }, - { - "kind": "Expr::Constant", + "args": { + "kind": "Expr::Apply::ArgumentList", "loc": null, - "children": { - "constant": { - "kind": "Constant::Int", + "children": [ + { + "kind": "Argument", "loc": null, "children": { - "value": "0x00" + "value": { + "kind": "Expr::Array", + "loc": null, + "children": { + "exprs": { + "kind": "Expr::Array::ExprList", + "loc": null, + "children": [ + { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "0x00" + } + } + } + }, + { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "0xD8" + } + } + } + }, + { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "0x00" + } + } + } + }, + { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "0x61" + } + } + } + } + ] + }, + "is_iter": false + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } } } - } + ] }, - { - "kind": "Expr::Constant", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, - "children": { - "constant": { - "kind": "Constant::Int", - "loc": null, - "children": { - "value": "0x61" - } - } - } + "children": {} } - ] - } + } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } - ] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} + } } - } + ] }, - "kind": { - "kind": "TryOperatorKind::Question", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -10384,96 +10650,163 @@ "loc": null, "children": { "value": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", - "loc": null, - "children": { - "value": "bytes_to_utf16" - } - } + "value": "to_result" } } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", "loc": null, - "children": [ - { - "kind": "Argument", - "loc": null, + "children": { + "value": { + "kind": "Expr::Function", + "loc": null, "children": { - "value": { - "kind": "Expr::Array", + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "exprs": { - "kind": "Expr::Array::ExprList", + "parameters": { + "kind": "Func::Lambda::ParameterList", "loc": null, - "children": [ - { - "kind": "Expr::Constant", + "children": [] + }, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "constant": { - "kind": "Constant::Int", + "id": { + "kind": "Var", "loc": null, "children": { - "value": "0x00" + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "bytes_to_utf16" + } + } } } } }, - { - "kind": "Expr::Constant", + "args": { + "kind": "Expr::Apply::ArgumentList", "loc": null, - "children": { - "constant": { - "kind": "Constant::Int", + "children": [ + { + "kind": "Argument", "loc": null, "children": { - "value": "0xDC" + "value": { + "kind": "Expr::Array", + "loc": null, + "children": { + "exprs": { + "kind": "Expr::Array::ExprList", + "loc": null, + "children": [ + { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "0x00" + } + } + } + }, + { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "0xDC" + } + } + } + } + ] + }, + "is_iter": false + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } } } - } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} } - ] - } + } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } - ] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} + } } - } + ] }, - "kind": { - "kind": "TryOperatorKind::Question", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -11548,307 +11881,374 @@ "loc": null, "children": { "value": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", - "loc": null, - "children": { - "value": "run" - } - } + "value": "to_result" } } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", "loc": null, - "children": [ - { - "kind": "Argument", + "children": { + "value": { + "kind": "Expr::Function", "loc": null, "children": { - "value": { - "kind": "Expr::DotApply", + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "self": { - "kind": "Expr::Array", + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Apply", "loc": null, "children": { - "exprs": { - "kind": "Expr::Array::ExprList", + "func": { + "kind": "Expr::Ident", "loc": null, - "children": [ - { - "kind": "Expr::Constant", - "loc": null, - "children": { - "constant": { - "kind": "Constant::String", - "loc": null, - "children": { - "value": "一二" - } - } - } - }, - { - "kind": "Expr::Constant", - "loc": null, - "children": { - "constant": { - "kind": "Constant::String", - "loc": null, - "children": { - "value": "三四" - } - } - } - }, - { - "kind": "Expr::Constant", - "loc": null, - "children": { - "constant": { - "kind": "Constant::String", - "loc": null, - "children": { - "value": "五六" - } - } - } - }, - { - "kind": "Expr::Constant", - "loc": null, - "children": { - "constant": { - "kind": "Constant::String", - "loc": null, - "children": { - "value": "七八" - } - } - } - }, - { - "kind": "Expr::Constant", + "children": { + "id": { + "kind": "Var", "loc": null, "children": { - "constant": { - "kind": "Constant::String", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "value": "九十" + "value": "run" } } } } - ] - } - } - }, - "method_name": { - "kind": "Label", - "loc": null, - "children": { - "name": "map" - } - }, - "args": { - "kind": "Expr::DotApply::ArgList", - "loc": null, - "children": [ - { - "kind": "Argument", + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", "loc": null, - "children": { - "value": { - "kind": "Expr::Function", + "children": [ + { + "kind": "Argument", "loc": null, "children": { - "func": { - "kind": "Func::Lambda", + "value": { + "kind": "Expr::DotApply", "loc": null, "children": { - "parameters": { - "kind": "Func::Lambda::ParameterList", - "loc": null, - "children": [ - { - "kind": "Parameter::Positional", - "loc": null, - "children": { - "binder": { - "kind": "Binder", - "loc": null, - "children": { - "name": "s" - } - }, - "ty": null - } - } - ] - }, - "body": { - "kind": "Expr::Apply", + "self": { + "kind": "Expr::Array", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "exprs": { + "kind": "Expr::Array::ExprList", "loc": null, - "children": { - "id": { - "kind": "Var", + "children": [ + { + "kind": "Expr::Constant", "loc": null, "children": { - "name": { - "kind": "LongIdent::Dot", + "constant": { + "kind": "Constant::String", "loc": null, "children": { - "pkg": "encoding/utf16", - "id": "encode" + "value": "一二" + } + } + } + }, + { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "三四" + } + } + } + }, + { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "五六" + } + } + } + }, + { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "七八" + } + } + } + }, + { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "九十" } } } } - } + ] }, - "args": { - "kind": "Expr::Apply::ArgumentList", + "is_iter": false + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "map" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [ + { + "kind": "Argument", "loc": null, - "children": [ - { - "kind": "Argument", + "children": { + "value": { + "kind": "Expr::Function", "loc": null, "children": { - "value": { - "kind": "Expr::Ident", + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "id": { - "kind": "Var", + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "s" + } + }, + "ty": null + } + } + ] + }, + "body": { + "kind": "Expr::Apply", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "value": "s" + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Dot", + "loc": null, + "children": { + "pkg": "encoding/utf16", + "id": "encode" + } + } + } + } } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "s" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} } } - } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } - ] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} + } } - } - }, - "return_type": null, - "error_type": { - "kind": "ErrorType::NoErrorType", - "loc": null, - "children": {} + ] }, - "kind": { - "kind": "FnKind::Arrow", + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} - }, - "has_error": null, - "is_async": null + } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } } }, - "kind": { - "kind": "ArgumentKind::Positional", + { + "kind": "Argument", "loc": null, - "children": {} + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "7" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } } - } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} } - ] + } }, - "return_self": false, - "attr": { - "kind": "ApplyAttr::NoAttr", + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", "loc": null, "children": {} - } + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} } } }, - { - "kind": "Argument", + "kind": { + "kind": "ArgumentKind::Positional", "loc": null, - "children": { - "value": { - "kind": "Expr::Constant", - "loc": null, - "children": { - "constant": { - "kind": "Constant::Int", - "loc": null, - "children": { - "value": "7" - } - } - } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} - } - } + "children": {} } - ] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} + } } - } + ] }, - "kind": { - "kind": "TryOperatorKind::Question", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -11904,281 +12304,348 @@ "loc": null, "children": { "value": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", - "loc": null, + "name": { + "kind": "LongIdent::Ident", + "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", - "loc": null, - "children": { - "value": "run" - } - } + "value": "to_result" } } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", "loc": null, - "children": [ - { - "kind": "Argument", + "children": { + "value": { + "kind": "Expr::Function", "loc": null, "children": { - "value": { - "kind": "Expr::DotApply", + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "self": { - "kind": "Expr::Array", + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Apply", "loc": null, "children": { - "exprs": { - "kind": "Expr::Array::ExprList", + "func": { + "kind": "Expr::Ident", "loc": null, - "children": [ - { - "kind": "Expr::Constant", - "loc": null, - "children": { - "constant": { - "kind": "Constant::String", - "loc": null, - "children": { - "value": "abcdefghij" - } - } - } - }, - { - "kind": "Expr::Constant", - "loc": null, - "children": { - "constant": { - "kind": "Constant::String", - "loc": null, - "children": { - "value": "klmnopqrst" - } - } - } - }, - { - "kind": "Expr::Constant", + "children": { + "id": { + "kind": "Var", "loc": null, "children": { - "constant": { - "kind": "Constant::String", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "value": "uvwxyz" + "value": "run" } } } } - ] - } - } - }, - "method_name": { - "kind": "Label", - "loc": null, - "children": { - "name": "map" - } - }, - "args": { - "kind": "Expr::DotApply::ArgList", - "loc": null, - "children": [ - { - "kind": "Argument", + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", "loc": null, - "children": { - "value": { - "kind": "Expr::Function", + "children": [ + { + "kind": "Argument", "loc": null, "children": { - "func": { - "kind": "Func::Lambda", + "value": { + "kind": "Expr::DotApply", "loc": null, "children": { - "parameters": { - "kind": "Func::Lambda::ParameterList", + "self": { + "kind": "Expr::Array", "loc": null, - "children": [ - { - "kind": "Parameter::Positional", + "children": { + "exprs": { + "kind": "Expr::Array::ExprList", "loc": null, - "children": { - "binder": { - "kind": "Binder", + "children": [ + { + "kind": "Expr::Constant", "loc": null, "children": { - "name": "s" + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "abcdefghij" + } + } } }, - "ty": null - } - } - ] - }, - "body": { - "kind": "Expr::Apply", - "loc": null, - "children": { - "func": { - "kind": "Expr::Ident", - "loc": null, - "children": { - "id": { - "kind": "Var", + { + "kind": "Expr::Constant", "loc": null, "children": { - "name": { - "kind": "LongIdent::Dot", + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "klmnopqrst" + } + } + } + }, + { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", "loc": null, "children": { - "pkg": "encoding/utf16", - "id": "encode" + "value": "uvwxyz" } } } } - } + ] }, - "args": { - "kind": "Expr::Apply::ArgumentList", + "is_iter": false + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "map" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [ + { + "kind": "Argument", "loc": null, - "children": [ - { - "kind": "Argument", + "children": { + "value": { + "kind": "Expr::Function", "loc": null, "children": { - "value": { - "kind": "Expr::Ident", + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "id": { - "kind": "Var", + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "s" + } + }, + "ty": null + } + } + ] + }, + "body": { + "kind": "Expr::Apply", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "value": "s" + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Dot", + "loc": null, + "children": { + "pkg": "encoding/utf16", + "id": "encode" + } + } + } + } } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "s" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} } } - } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } - ] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} + } } - } - }, - "return_type": null, - "error_type": { - "kind": "ErrorType::NoErrorType", - "loc": null, - "children": {} + ] }, - "kind": { - "kind": "FnKind::Arrow", + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} - }, - "has_error": null, - "is_async": null + } } - } - } - }, - "kind": { - "kind": "ArgumentKind::Positional", + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", "loc": null, - "children": {} + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "10" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } } - } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} } - ] + } }, - "return_self": false, - "attr": { - "kind": "ApplyAttr::NoAttr", + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", "loc": null, "children": {} - } + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} } } }, - { - "kind": "Argument", + "kind": { + "kind": "ArgumentKind::Positional", "loc": null, - "children": { - "value": { - "kind": "Expr::Constant", - "loc": null, - "children": { - "constant": { - "kind": "Constant::Int", - "loc": null, - "children": { - "value": "10" - } - } - } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} - } - } + "children": {} } - ] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} + } } - } + ] }, - "kind": { - "kind": "TryOperatorKind::Question", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -12207,5 +12674,524 @@ } } } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "to_result" + } + }, + "has_error": null, + "is_async": null, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "f" + } + }, + "ty": { + "kind": "Type::Arrow", + "loc": null, + "children": { + "args": { + "kind": "Type::Arrow::ArgList", + "loc": null, + "children": [] + }, + "res": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "T" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "err": { + "kind": "ErrorType::ErrorType", + "loc": null, + "children": { + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "E" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + "is_async": null + } + } + } + } + ] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [ + { + "kind": "TypeVarBinder", + "loc": null, + "children": { + "name": "T", + "constraints": { + "kind": "TypeVarBinder::TypeVarConstraintList", + "loc": null, + "children": [] + } + } + }, + { + "kind": "TypeVarBinder", + "loc": null, + "children": { + "name": "E", + "constraints": { + "kind": "TypeVarBinder::TypeVarConstraintList", + "loc": null, + "children": [ + { + "kind": "TypeVarConstraint", + "loc": null, + "children": { + "trait": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Error" + } + } + } + } + ] + } + } + } + ] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [ + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "T" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "E" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + ] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::Try", + "loc": null, + "children": { + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "f" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "catch": { + "kind": "Expr::Try::CaseList", + "loc": null, + "children": [ + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "err" + } + } + } + }, + "guard": null, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Err" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::TypeName", + "loc": null, + "children": { + "value": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + }, + "is_object": false + } + } + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "err" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + ] + }, + "catch_all": false, + "try_else": { + "kind": "Expr::Try::CaseList", + "loc": null, + "children": [ + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "value" + } + } + } + }, + "guard": null, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Ok" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::TypeName", + "loc": null, + "children": { + "value": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + }, + "is_object": false + } + } + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "value" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + ] + }, + "has_try": true + } + } + } + } + } } ] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/pipeline_test_error_poly_iter.mbt b/test/sync_test/__snapshot__/pipeline_test_error_poly_iter.mbt index a1f81e7e..052653e5 100644 --- a/test/sync_test/__snapshot__/pipeline_test_error_poly_iter.mbt +++ b/test/sync_test/__snapshot__/pipeline_test_error_poly_iter.mbt @@ -184,11 +184,11 @@ fn bytes_to_utf16(b : Bytes) -> Array[Char] raise { } fn init { - debug(try? bytes_to_utf16(@encoding/utf16.encode("abc"))) - debug(try? bytes_to_utf16(@encoding/utf16.encode("中文"))) - debug(try? bytes_to_utf16(@encoding/utf16.encode("🤣"))) - debug(try? bytes_to_utf16([ 0x00, 0xD8, 0x00, 0x61 ])) - debug(try? bytes_to_utf16([ 0x00, 0xDC ])) + debug(to_result(() => bytes_to_utf16(@encoding/utf16.encode("abc")))) + debug(to_result(() => bytes_to_utf16(@encoding/utf16.encode("中文")))) + debug(to_result(() => bytes_to_utf16(@encoding/utf16.encode("🤣")))) + debug(to_result(() => bytes_to_utf16([ 0x00, 0xD8, 0x00, 0x61 ]))) + debug(to_result(() => bytes_to_utf16([ 0x00, 0xDC ]))) } fn bytes_arary_to_iter( @@ -213,6 +213,15 @@ fn init { |> decode_utf16 take(it, n) |> collect } - debug(try? run([ "一二", "三四", "五六", "七八", "九十" ].map(s => @encoding/utf16.encode(s)), 7)) - debug(try? run([ "abcdefghij", "klmnopqrst", "uvwxyz" ].map(s => @encoding/utf16.encode(s)), 10)) + debug(to_result(() => run([ "一二", "三四", "五六", "七八", "九十" ].map(s => @encoding/utf16.encode(s)), 7))) + debug(to_result(() => run([ "abcdefghij", "klmnopqrst", "uvwxyz" ].map(s => @encoding/utf16.encode(s)), 10))) +} + +fn[T, E : Error] to_result(f : () -> T raise E) -> Result[T, E] { + try f() + catch { + err => Result::Err(err) + } noraise { + value => Result::Ok(value) + } } diff --git a/test/sync_test/__snapshot__/pipeline_test_error_poly_iter.mbt.tokens.json b/test/sync_test/__snapshot__/pipeline_test_error_poly_iter.mbt.tokens.json index 415ed021..8c05dfea 100644 --- a/test/sync_test/__snapshot__/pipeline_test_error_poly_iter.mbt.tokens.json +++ b/test/sync_test/__snapshot__/pipeline_test_error_poly_iter.mbt.tokens.json @@ -5487,67 +5487,90 @@ "loc": "187:8-187:9" }, { - "token": "TRY_QUESTION", - "loc": "187:9-187:13" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "187:9-187:18" + }, + { + "token": "LPAREN", + "loc": "187:18-187:19" + }, + { + "token": "LPAREN", + "loc": "187:19-187:20" + }, + { + "token": "RPAREN", + "loc": "187:20-187:21" + }, + { + "token": "FAT_ARROW", + "loc": "187:22-187:24" }, { "token": [ "LIDENT", "bytes_to_utf16" ], - "loc": "187:14-187:28" + "loc": "187:25-187:39" }, { "token": "LPAREN", - "loc": "187:28-187:29" + "loc": "187:39-187:40" }, { "token": [ "PACKAGE_NAME", "encoding/utf16" ], - "loc": "187:29-187:44" + "loc": "187:40-187:55" }, { "token": [ "DOT_LIDENT", "encode" ], - "loc": "187:45-187:51" + "loc": "187:56-187:62" }, { "token": "LPAREN", - "loc": "187:51-187:52" + "loc": "187:62-187:63" }, { "token": [ "STRING", "abc" ], - "loc": "187:52-187:57" + "loc": "187:63-187:68" + }, + { + "token": "RPAREN", + "loc": "187:68-187:69" }, { "token": "RPAREN", - "loc": "187:57-187:58" + "loc": "187:69-187:70" }, { "token": "RPAREN", - "loc": "187:58-187:59" + "loc": "187:70-187:71" }, { "token": "RPAREN", - "loc": "187:59-187:60" + "loc": "187:71-187:72" }, { "token": [ "SEMI", false ], - "loc": "187:60-187:60" + "loc": "187:72-187:72" }, { "token": "NEWLINE", - "loc": "187:60-187:61" + "loc": "187:72-187:73" }, { "token": [ @@ -5561,67 +5584,90 @@ "loc": "188:8-188:9" }, { - "token": "TRY_QUESTION", - "loc": "188:9-188:13" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "188:9-188:18" + }, + { + "token": "LPAREN", + "loc": "188:18-188:19" + }, + { + "token": "LPAREN", + "loc": "188:19-188:20" + }, + { + "token": "RPAREN", + "loc": "188:20-188:21" + }, + { + "token": "FAT_ARROW", + "loc": "188:22-188:24" }, { "token": [ "LIDENT", "bytes_to_utf16" ], - "loc": "188:14-188:28" + "loc": "188:25-188:39" }, { "token": "LPAREN", - "loc": "188:28-188:29" + "loc": "188:39-188:40" }, { "token": [ "PACKAGE_NAME", "encoding/utf16" ], - "loc": "188:29-188:44" + "loc": "188:40-188:55" }, { "token": [ "DOT_LIDENT", "encode" ], - "loc": "188:45-188:51" + "loc": "188:56-188:62" }, { "token": "LPAREN", - "loc": "188:51-188:52" + "loc": "188:62-188:63" }, { "token": [ "STRING", "中文" ], - "loc": "188:52-188:56" + "loc": "188:63-188:67" }, { "token": "RPAREN", - "loc": "188:56-188:57" + "loc": "188:67-188:68" }, { "token": "RPAREN", - "loc": "188:57-188:58" + "loc": "188:68-188:69" }, { "token": "RPAREN", - "loc": "188:58-188:59" + "loc": "188:69-188:70" + }, + { + "token": "RPAREN", + "loc": "188:70-188:71" }, { "token": [ "SEMI", false ], - "loc": "188:59-188:59" + "loc": "188:71-188:71" }, { "token": "NEWLINE", - "loc": "188:59-188:60" + "loc": "188:71-188:72" }, { "token": [ @@ -5635,67 +5681,90 @@ "loc": "189:8-189:9" }, { - "token": "TRY_QUESTION", - "loc": "189:9-189:13" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "189:9-189:18" + }, + { + "token": "LPAREN", + "loc": "189:18-189:19" + }, + { + "token": "LPAREN", + "loc": "189:19-189:20" + }, + { + "token": "RPAREN", + "loc": "189:20-189:21" + }, + { + "token": "FAT_ARROW", + "loc": "189:22-189:24" }, { "token": [ "LIDENT", "bytes_to_utf16" ], - "loc": "189:14-189:28" + "loc": "189:25-189:39" }, { "token": "LPAREN", - "loc": "189:28-189:29" + "loc": "189:39-189:40" }, { "token": [ "PACKAGE_NAME", "encoding/utf16" ], - "loc": "189:29-189:44" + "loc": "189:40-189:55" }, { "token": [ "DOT_LIDENT", "encode" ], - "loc": "189:45-189:51" + "loc": "189:56-189:62" }, { "token": "LPAREN", - "loc": "189:51-189:52" + "loc": "189:62-189:63" }, { "token": [ "STRING", "🤣" ], - "loc": "189:52-189:55" + "loc": "189:63-189:66" + }, + { + "token": "RPAREN", + "loc": "189:66-189:67" }, { "token": "RPAREN", - "loc": "189:55-189:56" + "loc": "189:67-189:68" }, { "token": "RPAREN", - "loc": "189:56-189:57" + "loc": "189:68-189:69" }, { "token": "RPAREN", - "loc": "189:57-189:58" + "loc": "189:69-189:70" }, { "token": [ "SEMI", false ], - "loc": "189:58-189:58" + "loc": "189:70-189:70" }, { "token": "NEWLINE", - "loc": "189:58-189:59" + "loc": "189:70-189:71" }, { "token": [ @@ -5709,86 +5778,109 @@ "loc": "190:8-190:9" }, { - "token": "TRY_QUESTION", - "loc": "190:9-190:13" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "190:9-190:18" + }, + { + "token": "LPAREN", + "loc": "190:18-190:19" + }, + { + "token": "LPAREN", + "loc": "190:19-190:20" + }, + { + "token": "RPAREN", + "loc": "190:20-190:21" + }, + { + "token": "FAT_ARROW", + "loc": "190:22-190:24" }, { "token": [ "LIDENT", "bytes_to_utf16" ], - "loc": "190:14-190:28" + "loc": "190:25-190:39" }, { "token": "LPAREN", - "loc": "190:28-190:29" + "loc": "190:39-190:40" }, { "token": "LBRACKET", - "loc": "190:29-190:30" + "loc": "190:40-190:41" }, { "token": [ "INT", "0x00" ], - "loc": "190:31-190:35" + "loc": "190:42-190:46" }, { "token": "COMMA", - "loc": "190:35-190:36" + "loc": "190:46-190:47" }, { "token": [ "INT", "0xD8" ], - "loc": "190:37-190:41" + "loc": "190:48-190:52" }, { "token": "COMMA", - "loc": "190:41-190:42" + "loc": "190:52-190:53" }, { "token": [ "INT", "0x00" ], - "loc": "190:43-190:47" + "loc": "190:54-190:58" }, { "token": "COMMA", - "loc": "190:47-190:48" + "loc": "190:58-190:59" }, { "token": [ "INT", "0x61" ], - "loc": "190:49-190:53" + "loc": "190:60-190:64" }, { "token": "RBRACKET", - "loc": "190:54-190:55" + "loc": "190:65-190:66" }, { "token": "RPAREN", - "loc": "190:55-190:56" + "loc": "190:66-190:67" }, { "token": "RPAREN", - "loc": "190:56-190:57" + "loc": "190:67-190:68" + }, + { + "token": "RPAREN", + "loc": "190:68-190:69" }, { "token": [ "SEMI", false ], - "loc": "190:57-190:57" + "loc": "190:69-190:69" }, { "token": "NEWLINE", - "loc": "190:57-190:58" + "loc": "190:69-190:70" }, { "token": [ @@ -5802,57 +5894,80 @@ "loc": "191:8-191:9" }, { - "token": "TRY_QUESTION", - "loc": "191:9-191:13" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "191:9-191:18" + }, + { + "token": "LPAREN", + "loc": "191:18-191:19" + }, + { + "token": "LPAREN", + "loc": "191:19-191:20" + }, + { + "token": "RPAREN", + "loc": "191:20-191:21" + }, + { + "token": "FAT_ARROW", + "loc": "191:22-191:24" }, { "token": [ "LIDENT", "bytes_to_utf16" ], - "loc": "191:14-191:28" + "loc": "191:25-191:39" }, { "token": "LPAREN", - "loc": "191:28-191:29" + "loc": "191:39-191:40" }, { "token": "LBRACKET", - "loc": "191:29-191:30" + "loc": "191:40-191:41" }, { "token": [ "INT", "0x00" ], - "loc": "191:31-191:35" + "loc": "191:42-191:46" }, { "token": "COMMA", - "loc": "191:35-191:36" + "loc": "191:46-191:47" }, { "token": [ "INT", "0xDC" ], - "loc": "191:37-191:41" + "loc": "191:48-191:52" }, { "token": "RBRACKET", - "loc": "191:42-191:43" + "loc": "191:53-191:54" }, { "token": "RPAREN", - "loc": "191:43-191:44" + "loc": "191:54-191:55" }, { "token": "RPAREN", - "loc": "191:44-191:45" + "loc": "191:55-191:56" + }, + { + "token": "RPAREN", + "loc": "191:56-191:57" }, { "token": "NEWLINE", - "loc": "191:45-191:46" + "loc": "191:57-191:58" }, { "token": "RBRACE", @@ -6482,163 +6597,186 @@ "loc": "216:8-216:9" }, { - "token": "TRY_QUESTION", - "loc": "216:9-216:13" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "216:9-216:18" + }, + { + "token": "LPAREN", + "loc": "216:18-216:19" + }, + { + "token": "LPAREN", + "loc": "216:19-216:20" + }, + { + "token": "RPAREN", + "loc": "216:20-216:21" + }, + { + "token": "FAT_ARROW", + "loc": "216:22-216:24" }, { "token": [ "LIDENT", "run" ], - "loc": "216:14-216:17" + "loc": "216:25-216:28" }, { "token": "LPAREN", - "loc": "216:17-216:18" + "loc": "216:28-216:29" }, { "token": "LBRACKET", - "loc": "216:18-216:19" + "loc": "216:29-216:30" }, { "token": [ "STRING", "一二" ], - "loc": "216:20-216:24" + "loc": "216:31-216:35" }, { "token": "COMMA", - "loc": "216:24-216:25" + "loc": "216:35-216:36" }, { "token": [ "STRING", "三四" ], - "loc": "216:26-216:30" + "loc": "216:37-216:41" }, { "token": "COMMA", - "loc": "216:30-216:31" + "loc": "216:41-216:42" }, { "token": [ "STRING", "五六" ], - "loc": "216:32-216:36" + "loc": "216:43-216:47" }, { "token": "COMMA", - "loc": "216:36-216:37" + "loc": "216:47-216:48" }, { "token": [ "STRING", "七八" ], - "loc": "216:38-216:42" + "loc": "216:49-216:53" }, { "token": "COMMA", - "loc": "216:42-216:43" + "loc": "216:53-216:54" }, { "token": [ "STRING", "九十" ], - "loc": "216:44-216:48" + "loc": "216:55-216:59" }, { "token": "RBRACKET", - "loc": "216:49-216:50" + "loc": "216:60-216:61" }, { "token": [ "DOT_LIDENT", "map" ], - "loc": "216:51-216:54" + "loc": "216:62-216:65" }, { "token": "LPAREN", - "loc": "216:54-216:55" + "loc": "216:65-216:66" }, { "token": [ "LIDENT", "s" ], - "loc": "216:55-216:56" + "loc": "216:66-216:67" }, { "token": "FAT_ARROW", - "loc": "216:57-216:59" + "loc": "216:68-216:70" }, { "token": [ "PACKAGE_NAME", "encoding/utf16" ], - "loc": "216:60-216:75" + "loc": "216:71-216:86" }, { "token": [ "DOT_LIDENT", "encode" ], - "loc": "216:76-216:82" + "loc": "216:87-216:93" }, { "token": "LPAREN", - "loc": "216:82-216:83" + "loc": "216:93-216:94" }, { "token": [ "LIDENT", "s" ], - "loc": "216:83-216:84" + "loc": "216:94-216:95" }, { "token": "RPAREN", - "loc": "216:84-216:85" + "loc": "216:95-216:96" }, { "token": "RPAREN", - "loc": "216:85-216:86" + "loc": "216:96-216:97" }, { "token": "COMMA", - "loc": "216:86-216:87" + "loc": "216:97-216:98" }, { "token": [ "INT", "7" ], - "loc": "216:88-216:89" + "loc": "216:99-216:100" + }, + { + "token": "RPAREN", + "loc": "216:100-216:101" }, { "token": "RPAREN", - "loc": "216:89-216:90" + "loc": "216:101-216:102" }, { "token": "RPAREN", - "loc": "216:90-216:91" + "loc": "216:102-216:103" }, { "token": [ "SEMI", false ], - "loc": "216:91-216:91" + "loc": "216:103-216:103" }, { "token": "NEWLINE", - "loc": "216:91-216:92" + "loc": "216:103-216:104" }, { "token": [ @@ -6652,134 +6790,157 @@ "loc": "217:8-217:9" }, { - "token": "TRY_QUESTION", - "loc": "217:9-217:13" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "217:9-217:18" + }, + { + "token": "LPAREN", + "loc": "217:18-217:19" + }, + { + "token": "LPAREN", + "loc": "217:19-217:20" + }, + { + "token": "RPAREN", + "loc": "217:20-217:21" + }, + { + "token": "FAT_ARROW", + "loc": "217:22-217:24" }, { "token": [ "LIDENT", "run" ], - "loc": "217:14-217:17" + "loc": "217:25-217:28" }, { "token": "LPAREN", - "loc": "217:17-217:18" + "loc": "217:28-217:29" }, { "token": "LBRACKET", - "loc": "217:18-217:19" + "loc": "217:29-217:30" }, { "token": [ "STRING", "abcdefghij" ], - "loc": "217:20-217:32" + "loc": "217:31-217:43" }, { "token": "COMMA", - "loc": "217:32-217:33" + "loc": "217:43-217:44" }, { "token": [ "STRING", "klmnopqrst" ], - "loc": "217:34-217:46" + "loc": "217:45-217:57" }, { "token": "COMMA", - "loc": "217:46-217:47" + "loc": "217:57-217:58" }, { "token": [ "STRING", "uvwxyz" ], - "loc": "217:48-217:56" + "loc": "217:59-217:67" }, { "token": "RBRACKET", - "loc": "217:57-217:58" + "loc": "217:68-217:69" }, { "token": [ "DOT_LIDENT", "map" ], - "loc": "217:59-217:62" + "loc": "217:70-217:73" }, { "token": "LPAREN", - "loc": "217:62-217:63" + "loc": "217:73-217:74" }, { "token": [ "LIDENT", "s" ], - "loc": "217:63-217:64" + "loc": "217:74-217:75" }, { "token": "FAT_ARROW", - "loc": "217:65-217:67" + "loc": "217:76-217:78" }, { "token": [ "PACKAGE_NAME", "encoding/utf16" ], - "loc": "217:68-217:83" + "loc": "217:79-217:94" }, { "token": [ "DOT_LIDENT", "encode" ], - "loc": "217:84-217:90" + "loc": "217:95-217:101" }, { "token": "LPAREN", - "loc": "217:90-217:91" + "loc": "217:101-217:102" }, { "token": [ "LIDENT", "s" ], - "loc": "217:91-217:92" + "loc": "217:102-217:103" }, { "token": "RPAREN", - "loc": "217:92-217:93" + "loc": "217:103-217:104" }, { "token": "RPAREN", - "loc": "217:93-217:94" + "loc": "217:104-217:105" }, { "token": "COMMA", - "loc": "217:94-217:95" + "loc": "217:105-217:106" }, { "token": [ "INT", "10" ], - "loc": "217:96-217:98" + "loc": "217:107-217:109" + }, + { + "token": "RPAREN", + "loc": "217:109-217:110" }, { "token": "RPAREN", - "loc": "217:98-217:99" + "loc": "217:110-217:111" }, { "token": "RPAREN", - "loc": "217:99-217:100" + "loc": "217:111-217:112" }, { "token": "NEWLINE", - "loc": "217:100-217:101" + "loc": "217:112-217:113" }, { "token": "RBRACE", @@ -6796,8 +6957,324 @@ "token": "NEWLINE", "loc": "218:2-218:3" }, + { + "token": "NEWLINE", + "loc": "219:1-219:2" + }, + { + "token": "FN", + "loc": "220:1-220:3" + }, + { + "token": "LBRACKET", + "loc": "220:3-220:4" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "220:4-220:5" + }, + { + "token": "COMMA", + "loc": "220:5-220:6" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "220:7-220:8" + }, + { + "token": "COLON", + "loc": "220:9-220:10" + }, + { + "token": [ + "UIDENT", + "Error" + ], + "loc": "220:11-220:16" + }, + { + "token": "RBRACKET", + "loc": "220:16-220:17" + }, + { + "token": [ + "LIDENT", + "to_result" + ], + "loc": "220:18-220:27" + }, + { + "token": "LPAREN", + "loc": "220:27-220:28" + }, + { + "token": [ + "LIDENT", + "f" + ], + "loc": "220:28-220:29" + }, + { + "token": "COLON", + "loc": "220:30-220:31" + }, + { + "token": "LPAREN", + "loc": "220:32-220:33" + }, + { + "token": "RPAREN", + "loc": "220:33-220:34" + }, + { + "token": "THIN_ARROW", + "loc": "220:35-220:37" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "220:38-220:39" + }, + { + "token": "RAISE", + "loc": "220:40-220:45" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "220:46-220:47" + }, + { + "token": "RPAREN", + "loc": "220:47-220:48" + }, + { + "token": "THIN_ARROW", + "loc": "220:49-220:51" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "220:52-220:58" + }, + { + "token": "LBRACKET", + "loc": "220:58-220:59" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "220:59-220:60" + }, + { + "token": "COMMA", + "loc": "220:60-220:61" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "220:62-220:63" + }, + { + "token": "RBRACKET", + "loc": "220:63-220:64" + }, + { + "token": "LBRACE", + "loc": "220:65-220:66" + }, + { + "token": "NEWLINE", + "loc": "220:66-220:67" + }, + { + "token": "TRY", + "loc": "221:3-221:6" + }, + { + "token": [ + "LIDENT", + "f" + ], + "loc": "221:7-221:8" + }, + { + "token": "LPAREN", + "loc": "221:8-221:9" + }, + { + "token": "RPAREN", + "loc": "221:9-221:10" + }, + { + "token": "NEWLINE", + "loc": "221:10-221:11" + }, + { + "token": "CATCH", + "loc": "222:3-222:8" + }, + { + "token": "LBRACE", + "loc": "222:9-222:10" + }, + { + "token": "NEWLINE", + "loc": "222:10-222:11" + }, + { + "token": [ + "LIDENT", + "err" + ], + "loc": "223:5-223:8" + }, + { + "token": "FAT_ARROW", + "loc": "223:9-223:11" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "223:12-223:18" + }, + { + "token": "COLONCOLON", + "loc": "223:18-223:20" + }, + { + "token": [ + "UIDENT", + "Err" + ], + "loc": "223:20-223:23" + }, + { + "token": "LPAREN", + "loc": "223:23-223:24" + }, + { + "token": [ + "LIDENT", + "err" + ], + "loc": "223:24-223:27" + }, + { + "token": "RPAREN", + "loc": "223:27-223:28" + }, + { + "token": "NEWLINE", + "loc": "223:28-223:29" + }, + { + "token": "RBRACE", + "loc": "224:3-224:4" + }, + { + "token": "NORAISE", + "loc": "224:5-224:12" + }, + { + "token": "LBRACE", + "loc": "224:13-224:14" + }, + { + "token": "NEWLINE", + "loc": "224:14-224:15" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "225:5-225:10" + }, + { + "token": "FAT_ARROW", + "loc": "225:11-225:13" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "225:14-225:20" + }, + { + "token": "COLONCOLON", + "loc": "225:20-225:22" + }, + { + "token": [ + "UIDENT", + "Ok" + ], + "loc": "225:22-225:24" + }, + { + "token": "LPAREN", + "loc": "225:24-225:25" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "225:25-225:30" + }, + { + "token": "RPAREN", + "loc": "225:30-225:31" + }, + { + "token": "NEWLINE", + "loc": "225:31-225:32" + }, + { + "token": "RBRACE", + "loc": "226:3-226:4" + }, + { + "token": "NEWLINE", + "loc": "226:4-226:5" + }, + { + "token": "RBRACE", + "loc": "227:1-227:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "227:2-227:2" + }, + { + "token": "NEWLINE", + "loc": "227:2-227:3" + }, { "token": "EOF", - "loc": "219:1-219:1" + "loc": "228:1-228:1" } ] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/pipeline_test_error_poly_iter2.json b/test/sync_test/__snapshot__/pipeline_test_error_poly_iter2.json index cacd94fe..8a937a99 100644 --- a/test/sync_test/__snapshot__/pipeline_test_error_poly_iter2.json +++ b/test/sync_test/__snapshot__/pipeline_test_error_poly_iter2.json @@ -1276,7 +1276,8 @@ "kind": "Expr::Array::ExprList", "loc": null, "children": [] - } + }, + "is_iter": false } }, "body": { diff --git a/test/sync_test/__snapshot__/pipeline_test_error_poly_raise.json b/test/sync_test/__snapshot__/pipeline_test_error_poly_raise.json index 24869f79..d7cab41d 100644 --- a/test/sync_test/__snapshot__/pipeline_test_error_poly_raise.json +++ b/test/sync_test/__snapshot__/pipeline_test_error_poly_raise.json @@ -504,172 +504,238 @@ "loc": null, "children": { "value": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", - "loc": null, - "children": { - "value": "error_poly_but_may_raise" - } - } + "value": "to_result" } } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", "loc": null, - "children": [ - { - "kind": "Argument", + "children": { + "value": { + "kind": "Expr::Function", "loc": null, "children": { - "value": { - "kind": "Expr::Constant", + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "constant": { - "kind": "Constant::Bool", + "parameters": { + "kind": "Func::Lambda::ParameterList", "loc": null, - "children": { - "value": true - } - } - } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} - } - } - }, - { - "kind": "Argument", - "loc": null, - "children": { - "value": { - "kind": "Expr::Function", - "loc": null, - "children": { - "func": { - "kind": "Func::Lambda", + "children": [] + }, + "body": { + "kind": "Expr::Apply", "loc": null, "children": { - "parameters": { - "kind": "Func::Lambda::ParameterList", + "func": { + "kind": "Expr::Ident", "loc": null, - "children": [] + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "error_poly_but_may_raise" + } + } + } + } + } }, - "body": { - "kind": "Expr::Apply", + "args": { + "kind": "Expr::Apply::ArgumentList", "loc": null, - "children": { - "func": { - "kind": "Expr::Ident", + "children": [ + { + "kind": "Argument", "loc": null, "children": { - "id": { - "kind": "Var", + "value": { + "kind": "Expr::Constant", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", + "constant": { + "kind": "Constant::Bool", "loc": null, "children": { - "value": "println" + "value": true } } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } } }, - "args": { - "kind": "Expr::Apply::ArgumentList", + { + "kind": "Argument", "loc": null, - "children": [ - { - "kind": "Argument", + "children": { + "value": { + "kind": "Expr::Function", "loc": null, "children": { - "value": { - "kind": "Expr::Constant", + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "constant": { - "kind": "Constant::String", + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Apply", "loc": null, "children": { - "value": "callback" + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "callback" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } } - } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } - ] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} + } } - } - }, - "return_type": null, - "error_type": { - "kind": "ErrorType::NoErrorType", - "loc": null, - "children": {} + ] }, - "kind": { - "kind": "FnKind::Arrow", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} - }, - "has_error": null, - "is_async": null + } } - } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } - ] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} + } } - } + ] }, - "kind": { - "kind": "TryOperatorKind::Question", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -723,172 +789,238 @@ "loc": null, "children": { "value": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", - "loc": null, - "children": { - "value": "error_poly_but_may_raise" - } - } + "value": "to_result" } } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", "loc": null, - "children": [ - { - "kind": "Argument", + "children": { + "value": { + "kind": "Expr::Function", "loc": null, "children": { - "value": { - "kind": "Expr::Constant", + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "constant": { - "kind": "Constant::Bool", + "parameters": { + "kind": "Func::Lambda::ParameterList", "loc": null, - "children": { - "value": false - } - } - } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} - } - } - }, - { - "kind": "Argument", - "loc": null, - "children": { - "value": { - "kind": "Expr::Function", - "loc": null, - "children": { - "func": { - "kind": "Func::Lambda", + "children": [] + }, + "body": { + "kind": "Expr::Apply", "loc": null, "children": { - "parameters": { - "kind": "Func::Lambda::ParameterList", + "func": { + "kind": "Expr::Ident", "loc": null, - "children": [] + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "error_poly_but_may_raise" + } + } + } + } + } }, - "body": { - "kind": "Expr::Apply", + "args": { + "kind": "Expr::Apply::ArgumentList", "loc": null, - "children": { - "func": { - "kind": "Expr::Ident", + "children": [ + { + "kind": "Argument", "loc": null, "children": { - "id": { - "kind": "Var", + "value": { + "kind": "Expr::Constant", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", + "constant": { + "kind": "Constant::Bool", "loc": null, "children": { - "value": "println" + "value": false } } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } } }, - "args": { - "kind": "Expr::Apply::ArgumentList", + { + "kind": "Argument", "loc": null, - "children": [ - { - "kind": "Argument", + "children": { + "value": { + "kind": "Expr::Function", "loc": null, "children": { - "value": { - "kind": "Expr::Constant", + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "constant": { - "kind": "Constant::String", + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Apply", "loc": null, "children": { - "value": "callback" + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "callback" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } } - } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } - ] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} + } } - } + ] }, - "return_type": null, - "error_type": { - "kind": "ErrorType::NoErrorType", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} - }, - "kind": { - "kind": "FnKind::Arrow", - "loc": null, - "children": {} - }, - "has_error": null, - "is_async": null + } } - } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } - ] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} + } } - } + ] }, - "kind": { - "kind": "TryOperatorKind::Question", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -942,142 +1074,208 @@ "loc": null, "children": { "value": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", - "loc": null, - "children": { - "value": "error_poly_but_may_raise" - } - } + "value": "to_result" } } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", "loc": null, - "children": [ - { - "kind": "Argument", - "loc": null, - "children": { - "value": { - "kind": "Expr::Constant", - "loc": null, - "children": { - "constant": { - "kind": "Constant::Bool", - "loc": null, - "children": { - "value": true - } - } - } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} - } - } - }, - { - "kind": "Argument", + "children": { + "value": { + "kind": "Expr::Function", "loc": null, "children": { - "value": { - "kind": "Expr::Function", + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "func": { - "kind": "Func::Lambda", + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Apply", "loc": null, "children": { - "parameters": { - "kind": "Func::Lambda::ParameterList", + "func": { + "kind": "Expr::Ident", "loc": null, - "children": [] + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "error_poly_but_may_raise" + } + } + } + } + } }, - "body": { - "kind": "Expr::Raise", + "args": { + "kind": "Expr::Apply::ArgumentList", "loc": null, - "children": { - "err_value": { - "kind": "Expr::Constr", + "children": [ + { + "kind": "Argument", "loc": null, "children": { - "constr": { - "kind": "Constructor", + "value": { + "kind": "Expr::Constant", "loc": null, "children": { - "name": { - "kind": "ConstrName", + "constant": { + "kind": "Constant::Bool", "loc": null, "children": { - "name": "Err2" + "value": true } - }, - "extra_info": { - "kind": "ConstructorExtraInfo::NoExtraInfo", + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Function", + "loc": null, + "children": { + "func": { + "kind": "Func::Lambda", "loc": null, - "children": {} + "children": { + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Raise", + "loc": null, + "children": { + "err_value": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Err2" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::NoExtraInfo", + "loc": null, + "children": {} + } + } + } + } + } + } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null + } } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } } } - } - }, - "return_type": null, - "error_type": { - "kind": "ErrorType::NoErrorType", - "loc": null, - "children": {} + ] }, - "kind": { - "kind": "FnKind::Arrow", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} - }, - "has_error": null, - "is_async": null + } } - } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } - ] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} + } } - } + ] }, - "kind": { - "kind": "TryOperatorKind::Question", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -1133,142 +1331,208 @@ "loc": null, "children": { "value": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", - "loc": null, - "children": { - "value": "error_poly_but_may_raise" - } - } + "value": "to_result" } } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", "loc": null, - "children": [ - { - "kind": "Argument", + "children": { + "value": { + "kind": "Expr::Function", "loc": null, "children": { - "value": { - "kind": "Expr::Constant", + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "constant": { - "kind": "Constant::Bool", + "parameters": { + "kind": "Func::Lambda::ParameterList", "loc": null, - "children": { - "value": false - } - } - } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} - } - } - }, - { - "kind": "Argument", - "loc": null, - "children": { - "value": { - "kind": "Expr::Function", - "loc": null, - "children": { - "func": { - "kind": "Func::Lambda", + "children": [] + }, + "body": { + "kind": "Expr::Apply", "loc": null, "children": { - "parameters": { - "kind": "Func::Lambda::ParameterList", + "func": { + "kind": "Expr::Ident", "loc": null, - "children": [] + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "error_poly_but_may_raise" + } + } + } + } + } }, - "body": { - "kind": "Expr::Raise", + "args": { + "kind": "Expr::Apply::ArgumentList", "loc": null, - "children": { - "err_value": { - "kind": "Expr::Constr", + "children": [ + { + "kind": "Argument", "loc": null, "children": { - "constr": { - "kind": "Constructor", + "value": { + "kind": "Expr::Constant", "loc": null, "children": { - "name": { - "kind": "ConstrName", + "constant": { + "kind": "Constant::Bool", "loc": null, "children": { - "name": "Err2" + "value": false } - }, - "extra_info": { - "kind": "ConstructorExtraInfo::NoExtraInfo", + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Function", + "loc": null, + "children": { + "func": { + "kind": "Func::Lambda", "loc": null, - "children": {} + "children": { + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Raise", + "loc": null, + "children": { + "err_value": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Err2" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::NoExtraInfo", + "loc": null, + "children": {} + } + } + } + } + } + } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null + } } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } } } - } - }, - "return_type": null, - "error_type": { - "kind": "ErrorType::NoErrorType", - "loc": null, - "children": {} + ] }, - "kind": { - "kind": "FnKind::Arrow", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} - }, - "has_error": null, - "is_async": null + } } - } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } - ] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} + } } - } + ] }, - "kind": { - "kind": "TryOperatorKind::Question", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -1295,5 +1559,524 @@ } } } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "to_result" + } + }, + "has_error": null, + "is_async": null, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "f" + } + }, + "ty": { + "kind": "Type::Arrow", + "loc": null, + "children": { + "args": { + "kind": "Type::Arrow::ArgList", + "loc": null, + "children": [] + }, + "res": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "T" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "err": { + "kind": "ErrorType::ErrorType", + "loc": null, + "children": { + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "E" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + "is_async": null + } + } + } + } + ] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [ + { + "kind": "TypeVarBinder", + "loc": null, + "children": { + "name": "T", + "constraints": { + "kind": "TypeVarBinder::TypeVarConstraintList", + "loc": null, + "children": [] + } + } + }, + { + "kind": "TypeVarBinder", + "loc": null, + "children": { + "name": "E", + "constraints": { + "kind": "TypeVarBinder::TypeVarConstraintList", + "loc": null, + "children": [ + { + "kind": "TypeVarConstraint", + "loc": null, + "children": { + "trait": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Error" + } + } + } + } + ] + } + } + } + ] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [ + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "T" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "E" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + ] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::Try", + "loc": null, + "children": { + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "f" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "catch": { + "kind": "Expr::Try::CaseList", + "loc": null, + "children": [ + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "err" + } + } + } + }, + "guard": null, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Err" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::TypeName", + "loc": null, + "children": { + "value": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + }, + "is_object": false + } + } + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "err" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + ] + }, + "catch_all": false, + "try_else": { + "kind": "Expr::Try::CaseList", + "loc": null, + "children": [ + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "value" + } + } + } + }, + "guard": null, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Ok" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::TypeName", + "loc": null, + "children": { + "value": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + }, + "is_object": false + } + } + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "value" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + ] + }, + "has_try": true + } + } + } + } + } } ] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/pipeline_test_error_poly_raise.mbt b/test/sync_test/__snapshot__/pipeline_test_error_poly_raise.mbt index f0ec427a..4c7d7ea5 100644 --- a/test/sync_test/__snapshot__/pipeline_test_error_poly_raise.mbt +++ b/test/sync_test/__snapshot__/pipeline_test_error_poly_raise.mbt @@ -15,8 +15,17 @@ fn error_poly_but_may_raise(flag : Bool, f : () -> Unit raise?) -> Unit raise { ///| fn init { - debug(try? error_poly_but_may_raise(true, () => println("callback"))) - debug(try? error_poly_but_may_raise(false, () => println("callback"))) - debug(try? error_poly_but_may_raise(true, () => raise Err2)) - debug(try? error_poly_but_may_raise(false, () => raise Err2)) + debug(to_result(() => error_poly_but_may_raise(true, () => println("callback")))) + debug(to_result(() => error_poly_but_may_raise(false, () => println("callback")))) + debug(to_result(() => error_poly_but_may_raise(true, () => raise Err2))) + debug(to_result(() => error_poly_but_may_raise(false, () => raise Err2))) +} + +fn[T, E : Error] to_result(f : () -> T raise E) -> Result[T, E] { + try f() + catch { + err => Result::Err(err) + } noraise { + value => Result::Ok(value) + } } diff --git a/test/sync_test/__snapshot__/pipeline_test_error_poly_raise.mbt.tokens.json b/test/sync_test/__snapshot__/pipeline_test_error_poly_raise.mbt.tokens.json index 36780dec..e8892822 100644 --- a/test/sync_test/__snapshot__/pipeline_test_error_poly_raise.mbt.tokens.json +++ b/test/sync_test/__snapshot__/pipeline_test_error_poly_raise.mbt.tokens.json @@ -377,80 +377,103 @@ "loc": "18:8-18:9" }, { - "token": "TRY_QUESTION", - "loc": "18:9-18:13" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "18:9-18:18" + }, + { + "token": "LPAREN", + "loc": "18:18-18:19" + }, + { + "token": "LPAREN", + "loc": "18:19-18:20" + }, + { + "token": "RPAREN", + "loc": "18:20-18:21" + }, + { + "token": "FAT_ARROW", + "loc": "18:22-18:24" }, { "token": [ "LIDENT", "error_poly_but_may_raise" ], - "loc": "18:14-18:38" + "loc": "18:25-18:49" }, { "token": "LPAREN", - "loc": "18:38-18:39" + "loc": "18:49-18:50" }, { "token": "TRUE", - "loc": "18:39-18:43" + "loc": "18:50-18:54" }, { "token": "COMMA", - "loc": "18:43-18:44" + "loc": "18:54-18:55" }, { "token": "LPAREN", - "loc": "18:45-18:46" + "loc": "18:56-18:57" }, { "token": "RPAREN", - "loc": "18:46-18:47" + "loc": "18:57-18:58" }, { "token": "FAT_ARROW", - "loc": "18:48-18:50" + "loc": "18:59-18:61" }, { "token": [ "LIDENT", "println" ], - "loc": "18:51-18:58" + "loc": "18:62-18:69" }, { "token": "LPAREN", - "loc": "18:58-18:59" + "loc": "18:69-18:70" }, { "token": [ "STRING", "callback" ], - "loc": "18:59-18:69" + "loc": "18:70-18:80" }, { "token": "RPAREN", - "loc": "18:69-18:70" + "loc": "18:80-18:81" + }, + { + "token": "RPAREN", + "loc": "18:81-18:82" }, { "token": "RPAREN", - "loc": "18:70-18:71" + "loc": "18:82-18:83" }, { "token": "RPAREN", - "loc": "18:71-18:72" + "loc": "18:83-18:84" }, { "token": [ "SEMI", false ], - "loc": "18:72-18:72" + "loc": "18:84-18:84" }, { "token": "NEWLINE", - "loc": "18:72-18:73" + "loc": "18:84-18:85" }, { "token": [ @@ -464,80 +487,103 @@ "loc": "19:8-19:9" }, { - "token": "TRY_QUESTION", - "loc": "19:9-19:13" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "19:9-19:18" + }, + { + "token": "LPAREN", + "loc": "19:18-19:19" + }, + { + "token": "LPAREN", + "loc": "19:19-19:20" + }, + { + "token": "RPAREN", + "loc": "19:20-19:21" + }, + { + "token": "FAT_ARROW", + "loc": "19:22-19:24" }, { "token": [ "LIDENT", "error_poly_but_may_raise" ], - "loc": "19:14-19:38" + "loc": "19:25-19:49" }, { "token": "LPAREN", - "loc": "19:38-19:39" + "loc": "19:49-19:50" }, { "token": "FALSE", - "loc": "19:39-19:44" + "loc": "19:50-19:55" }, { "token": "COMMA", - "loc": "19:44-19:45" + "loc": "19:55-19:56" }, { "token": "LPAREN", - "loc": "19:46-19:47" + "loc": "19:57-19:58" }, { "token": "RPAREN", - "loc": "19:47-19:48" + "loc": "19:58-19:59" }, { "token": "FAT_ARROW", - "loc": "19:49-19:51" + "loc": "19:60-19:62" }, { "token": [ "LIDENT", "println" ], - "loc": "19:52-19:59" + "loc": "19:63-19:70" }, { "token": "LPAREN", - "loc": "19:59-19:60" + "loc": "19:70-19:71" }, { "token": [ "STRING", "callback" ], - "loc": "19:60-19:70" + "loc": "19:71-19:81" }, { "token": "RPAREN", - "loc": "19:70-19:71" + "loc": "19:81-19:82" + }, + { + "token": "RPAREN", + "loc": "19:82-19:83" }, { "token": "RPAREN", - "loc": "19:71-19:72" + "loc": "19:83-19:84" }, { "token": "RPAREN", - "loc": "19:72-19:73" + "loc": "19:84-19:85" }, { "token": [ "SEMI", false ], - "loc": "19:73-19:73" + "loc": "19:85-19:85" }, { "token": "NEWLINE", - "loc": "19:73-19:74" + "loc": "19:85-19:86" }, { "token": [ @@ -551,69 +597,92 @@ "loc": "20:8-20:9" }, { - "token": "TRY_QUESTION", - "loc": "20:9-20:13" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "20:9-20:18" + }, + { + "token": "LPAREN", + "loc": "20:18-20:19" + }, + { + "token": "LPAREN", + "loc": "20:19-20:20" + }, + { + "token": "RPAREN", + "loc": "20:20-20:21" + }, + { + "token": "FAT_ARROW", + "loc": "20:22-20:24" }, { "token": [ "LIDENT", "error_poly_but_may_raise" ], - "loc": "20:14-20:38" + "loc": "20:25-20:49" }, { "token": "LPAREN", - "loc": "20:38-20:39" + "loc": "20:49-20:50" }, { "token": "TRUE", - "loc": "20:39-20:43" + "loc": "20:50-20:54" }, { "token": "COMMA", - "loc": "20:43-20:44" + "loc": "20:54-20:55" }, { "token": "LPAREN", - "loc": "20:45-20:46" + "loc": "20:56-20:57" }, { "token": "RPAREN", - "loc": "20:46-20:47" + "loc": "20:57-20:58" }, { "token": "FAT_ARROW", - "loc": "20:48-20:50" + "loc": "20:59-20:61" }, { "token": "RAISE", - "loc": "20:51-20:56" + "loc": "20:62-20:67" }, { "token": [ "UIDENT", "Err2" ], - "loc": "20:57-20:61" + "loc": "20:68-20:72" + }, + { + "token": "RPAREN", + "loc": "20:72-20:73" }, { "token": "RPAREN", - "loc": "20:61-20:62" + "loc": "20:73-20:74" }, { "token": "RPAREN", - "loc": "20:62-20:63" + "loc": "20:74-20:75" }, { "token": [ "SEMI", false ], - "loc": "20:63-20:63" + "loc": "20:75-20:75" }, { "token": "NEWLINE", - "loc": "20:63-20:64" + "loc": "20:75-20:76" }, { "token": [ @@ -627,62 +696,85 @@ "loc": "21:8-21:9" }, { - "token": "TRY_QUESTION", - "loc": "21:9-21:13" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "21:9-21:18" + }, + { + "token": "LPAREN", + "loc": "21:18-21:19" + }, + { + "token": "LPAREN", + "loc": "21:19-21:20" + }, + { + "token": "RPAREN", + "loc": "21:20-21:21" + }, + { + "token": "FAT_ARROW", + "loc": "21:22-21:24" }, { "token": [ "LIDENT", "error_poly_but_may_raise" ], - "loc": "21:14-21:38" + "loc": "21:25-21:49" }, { "token": "LPAREN", - "loc": "21:38-21:39" + "loc": "21:49-21:50" }, { "token": "FALSE", - "loc": "21:39-21:44" + "loc": "21:50-21:55" }, { "token": "COMMA", - "loc": "21:44-21:45" + "loc": "21:55-21:56" }, { "token": "LPAREN", - "loc": "21:46-21:47" + "loc": "21:57-21:58" }, { "token": "RPAREN", - "loc": "21:47-21:48" + "loc": "21:58-21:59" }, { "token": "FAT_ARROW", - "loc": "21:49-21:51" + "loc": "21:60-21:62" }, { "token": "RAISE", - "loc": "21:52-21:57" + "loc": "21:63-21:68" }, { "token": [ "UIDENT", "Err2" ], - "loc": "21:58-21:62" + "loc": "21:69-21:73" + }, + { + "token": "RPAREN", + "loc": "21:73-21:74" }, { "token": "RPAREN", - "loc": "21:62-21:63" + "loc": "21:74-21:75" }, { "token": "RPAREN", - "loc": "21:63-21:64" + "loc": "21:75-21:76" }, { "token": "NEWLINE", - "loc": "21:64-21:65" + "loc": "21:76-21:77" }, { "token": "RBRACE", @@ -699,8 +791,324 @@ "token": "NEWLINE", "loc": "22:2-22:3" }, + { + "token": "NEWLINE", + "loc": "23:1-23:2" + }, + { + "token": "FN", + "loc": "24:1-24:3" + }, + { + "token": "LBRACKET", + "loc": "24:3-24:4" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "24:4-24:5" + }, + { + "token": "COMMA", + "loc": "24:5-24:6" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "24:7-24:8" + }, + { + "token": "COLON", + "loc": "24:9-24:10" + }, + { + "token": [ + "UIDENT", + "Error" + ], + "loc": "24:11-24:16" + }, + { + "token": "RBRACKET", + "loc": "24:16-24:17" + }, + { + "token": [ + "LIDENT", + "to_result" + ], + "loc": "24:18-24:27" + }, + { + "token": "LPAREN", + "loc": "24:27-24:28" + }, + { + "token": [ + "LIDENT", + "f" + ], + "loc": "24:28-24:29" + }, + { + "token": "COLON", + "loc": "24:30-24:31" + }, + { + "token": "LPAREN", + "loc": "24:32-24:33" + }, + { + "token": "RPAREN", + "loc": "24:33-24:34" + }, + { + "token": "THIN_ARROW", + "loc": "24:35-24:37" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "24:38-24:39" + }, + { + "token": "RAISE", + "loc": "24:40-24:45" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "24:46-24:47" + }, + { + "token": "RPAREN", + "loc": "24:47-24:48" + }, + { + "token": "THIN_ARROW", + "loc": "24:49-24:51" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "24:52-24:58" + }, + { + "token": "LBRACKET", + "loc": "24:58-24:59" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "24:59-24:60" + }, + { + "token": "COMMA", + "loc": "24:60-24:61" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "24:62-24:63" + }, + { + "token": "RBRACKET", + "loc": "24:63-24:64" + }, + { + "token": "LBRACE", + "loc": "24:65-24:66" + }, + { + "token": "NEWLINE", + "loc": "24:66-24:67" + }, + { + "token": "TRY", + "loc": "25:3-25:6" + }, + { + "token": [ + "LIDENT", + "f" + ], + "loc": "25:7-25:8" + }, + { + "token": "LPAREN", + "loc": "25:8-25:9" + }, + { + "token": "RPAREN", + "loc": "25:9-25:10" + }, + { + "token": "NEWLINE", + "loc": "25:10-25:11" + }, + { + "token": "CATCH", + "loc": "26:3-26:8" + }, + { + "token": "LBRACE", + "loc": "26:9-26:10" + }, + { + "token": "NEWLINE", + "loc": "26:10-26:11" + }, + { + "token": [ + "LIDENT", + "err" + ], + "loc": "27:5-27:8" + }, + { + "token": "FAT_ARROW", + "loc": "27:9-27:11" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "27:12-27:18" + }, + { + "token": "COLONCOLON", + "loc": "27:18-27:20" + }, + { + "token": [ + "UIDENT", + "Err" + ], + "loc": "27:20-27:23" + }, + { + "token": "LPAREN", + "loc": "27:23-27:24" + }, + { + "token": [ + "LIDENT", + "err" + ], + "loc": "27:24-27:27" + }, + { + "token": "RPAREN", + "loc": "27:27-27:28" + }, + { + "token": "NEWLINE", + "loc": "27:28-27:29" + }, + { + "token": "RBRACE", + "loc": "28:3-28:4" + }, + { + "token": "NORAISE", + "loc": "28:5-28:12" + }, + { + "token": "LBRACE", + "loc": "28:13-28:14" + }, + { + "token": "NEWLINE", + "loc": "28:14-28:15" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "29:5-29:10" + }, + { + "token": "FAT_ARROW", + "loc": "29:11-29:13" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "29:14-29:20" + }, + { + "token": "COLONCOLON", + "loc": "29:20-29:22" + }, + { + "token": [ + "UIDENT", + "Ok" + ], + "loc": "29:22-29:24" + }, + { + "token": "LPAREN", + "loc": "29:24-29:25" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "29:25-29:30" + }, + { + "token": "RPAREN", + "loc": "29:30-29:31" + }, + { + "token": "NEWLINE", + "loc": "29:31-29:32" + }, + { + "token": "RBRACE", + "loc": "30:3-30:4" + }, + { + "token": "NEWLINE", + "loc": "30:4-30:5" + }, + { + "token": "RBRACE", + "loc": "31:1-31:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "31:2-31:2" + }, + { + "token": "NEWLINE", + "loc": "31:2-31:3" + }, { "token": "EOF", - "loc": "23:1-23:1" + "loc": "32:1-32:1" } ] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/pipeline_test_error_poly_tail_rec.json b/test/sync_test/__snapshot__/pipeline_test_error_poly_tail_rec.json index 2ccde9ed..30741aee 100644 --- a/test/sync_test/__snapshot__/pipeline_test_error_poly_tail_rec.json +++ b/test/sync_test/__snapshot__/pipeline_test_error_poly_tail_rec.json @@ -840,282 +840,348 @@ } }, "expr": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", - "loc": null, - "children": { - "value": "err_poly_tail_rec" - } - } + "value": "to_result" } } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", "loc": null, - "children": [ - { - "kind": "Argument", + "children": { + "value": { + "kind": "Expr::Function", "loc": null, "children": { - "value": { - "kind": "Expr::Constant", + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "constant": { - "kind": "Constant::Int", + "parameters": { + "kind": "Func::Lambda::ParameterList", "loc": null, - "children": { - "value": "1000000" - } - } - } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} - } - } - }, - { - "kind": "Argument", - "loc": null, - "children": { - "value": { - "kind": "Expr::Function", - "loc": null, - "children": { - "func": { - "kind": "Func::Lambda", + "children": [] + }, + "body": { + "kind": "Expr::Apply", "loc": null, "children": { - "parameters": { - "kind": "Func::Lambda::ParameterList", + "func": { + "kind": "Expr::Ident", "loc": null, - "children": [ - { - "kind": "Parameter::Positional", + "children": { + "id": { + "kind": "Var", "loc": null, "children": { - "binder": { - "kind": "Binder", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": "x" + "value": "err_poly_tail_rec" } - }, - "ty": null + } } } - ] + } }, - "body": { - "kind": "Expr::Group", + "args": { + "kind": "Expr::Apply::ArgumentList", "loc": null, - "children": { - "expr": { - "kind": "Expr::If", + "children": [ + { + "kind": "Argument", "loc": null, "children": { - "cond": { - "kind": "Expr::Infix", + "value": { + "kind": "Expr::Constant", "loc": null, "children": { - "op": { - "kind": "Var", - "loc": null, - "children": { - "name": { - "kind": "LongIdent::Ident", - "loc": null, - "children": { - "value": "==" - } - } - } - }, - "lhs": { - "kind": "Expr::Ident", + "constant": { + "kind": "Constant::Int", "loc": null, "children": { - "id": { - "kind": "Var", - "loc": null, - "children": { - "name": { - "kind": "LongIdent::Ident", - "loc": null, - "children": { - "value": "x" - } - } - } - } - } - }, - "rhs": { - "kind": "Expr::Constant", - "loc": null, - "children": { - "constant": { - "kind": "Constant::Int", - "loc": null, - "children": { - "value": "999999" - } - } + "value": "1000000" } } } }, - "ifso": { - "kind": "Expr::Raise", + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Function", "loc": null, "children": { - "err_value": { - "kind": "Expr::Apply", + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "func": { - "kind": "Expr::Constr", + "parameters": { + "kind": "Func::Lambda::ParameterList", "loc": null, - "children": { - "constr": { - "kind": "Constructor", + "children": [ + { + "kind": "Parameter::Positional", "loc": null, "children": { - "name": { - "kind": "ConstrName", + "binder": { + "kind": "Binder", "loc": null, "children": { - "name": "Failure" + "name": "x" } }, - "extra_info": { - "kind": "ConstructorExtraInfo::TypeName", + "ty": null + } + } + ] + }, + "body": { + "kind": "Expr::Group", + "loc": null, + "children": { + "expr": { + "kind": "Expr::If", + "loc": null, + "children": { + "cond": { + "kind": "Expr::Infix", "loc": null, "children": { - "value": { - "kind": "TypeName", + "op": { + "kind": "Var", "loc": null, "children": { "name": { "kind": "LongIdent::Ident", "loc": null, "children": { - "value": "Failure" + "value": "==" } - }, - "is_object": false + } + } + }, + "lhs": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "x" + } + } + } + } + } + }, + "rhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "999999" + } + } } } } - } - } - } - } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", - "loc": null, - "children": [ - { - "kind": "Argument", - "loc": null, - "children": { - "value": { - "kind": "Expr::Constant", + }, + "ifso": { + "kind": "Expr::Raise", "loc": null, "children": { - "constant": { - "kind": "Constant::String", + "err_value": { + "kind": "Expr::Apply", "loc": null, "children": { - "value": "err" + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Failure" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::TypeName", + "loc": null, + "children": { + "value": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Failure" + } + }, + "is_object": false + } + } + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "err" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } } } } }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} - } + "ifnot": null } + }, + "group": { + "kind": "Group::Brace", + "loc": null, + "children": {} } - ] + } }, - "attr": { - "kind": "ApplyAttr::NoAttr", + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", "loc": null, "children": {} - } + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null } } } }, - "ifnot": null + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } } - }, - "group": { - "kind": "Group::Brace", - "loc": null, - "children": {} } - } - }, - "return_type": null, - "error_type": { - "kind": "ErrorType::NoErrorType", - "loc": null, - "children": {} + ] }, - "kind": { - "kind": "FnKind::Arrow", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} - }, - "has_error": null, - "is_async": null + } } - } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } - ] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} + } } - } + ] }, - "kind": { - "kind": "TryOperatorKind::Question", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -1196,5 +1262,524 @@ } } } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "to_result" + } + }, + "has_error": null, + "is_async": null, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "f" + } + }, + "ty": { + "kind": "Type::Arrow", + "loc": null, + "children": { + "args": { + "kind": "Type::Arrow::ArgList", + "loc": null, + "children": [] + }, + "res": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "T" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "err": { + "kind": "ErrorType::ErrorType", + "loc": null, + "children": { + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "E" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + "is_async": null + } + } + } + } + ] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [ + { + "kind": "TypeVarBinder", + "loc": null, + "children": { + "name": "T", + "constraints": { + "kind": "TypeVarBinder::TypeVarConstraintList", + "loc": null, + "children": [] + } + } + }, + { + "kind": "TypeVarBinder", + "loc": null, + "children": { + "name": "E", + "constraints": { + "kind": "TypeVarBinder::TypeVarConstraintList", + "loc": null, + "children": [ + { + "kind": "TypeVarConstraint", + "loc": null, + "children": { + "trait": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Error" + } + } + } + } + ] + } + } + } + ] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [ + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "T" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "E" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + ] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::Try", + "loc": null, + "children": { + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "f" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "catch": { + "kind": "Expr::Try::CaseList", + "loc": null, + "children": [ + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "err" + } + } + } + }, + "guard": null, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Err" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::TypeName", + "loc": null, + "children": { + "value": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + }, + "is_object": false + } + } + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "err" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + ] + }, + "catch_all": false, + "try_else": { + "kind": "Expr::Try::CaseList", + "loc": null, + "children": [ + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "value" + } + } + } + }, + "guard": null, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Ok" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::TypeName", + "loc": null, + "children": { + "value": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + }, + "is_object": false + } + } + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "value" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + ] + }, + "has_try": true + } + } + } + } + } } ] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/pipeline_test_error_poly_tail_rec.mbt b/test/sync_test/__snapshot__/pipeline_test_error_poly_tail_rec.mbt index f1809436..6e72b1c0 100644 --- a/test/sync_test/__snapshot__/pipeline_test_error_poly_tail_rec.mbt +++ b/test/sync_test/__snapshot__/pipeline_test_error_poly_tail_rec.mbt @@ -12,10 +12,19 @@ fn main { err_poly_tail_rec(100000, _ => x += 1) println(x) - let result = try? err_poly_tail_rec(1000000, x => { + let result = to_result(() => err_poly_tail_rec(1000000, x => { if x == 999999 { raise Failure::Failure("err") } - }) + })) debug(result) } + +fn[T, E : Error] to_result(f : () -> T raise E) -> Result[T, E] { + try f() + catch { + err => Result::Err(err) + } noraise { + value => Result::Ok(value) + } +} diff --git a/test/sync_test/__snapshot__/pipeline_test_error_poly_tail_rec.mbt.tokens.json b/test/sync_test/__snapshot__/pipeline_test_error_poly_tail_rec.mbt.tokens.json index ae14b21e..3a1ecbec 100644 --- a/test/sync_test/__snapshot__/pipeline_test_error_poly_tail_rec.mbt.tokens.json +++ b/test/sync_test/__snapshot__/pipeline_test_error_poly_tail_rec.mbt.tokens.json @@ -467,49 +467,68 @@ "loc": "15:14-15:15" }, { - "token": "TRY_QUESTION", - "loc": "15:16-15:20" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "15:16-15:25" + }, + { + "token": "LPAREN", + "loc": "15:25-15:26" + }, + { + "token": "LPAREN", + "loc": "15:26-15:27" + }, + { + "token": "RPAREN", + "loc": "15:27-15:28" + }, + { + "token": "FAT_ARROW", + "loc": "15:29-15:31" }, { "token": [ "LIDENT", "err_poly_tail_rec" ], - "loc": "15:21-15:38" + "loc": "15:32-15:49" }, { "token": "LPAREN", - "loc": "15:38-15:39" + "loc": "15:49-15:50" }, { "token": [ "INT", "1000000" ], - "loc": "15:39-15:46" + "loc": "15:50-15:57" }, { "token": "COMMA", - "loc": "15:46-15:47" + "loc": "15:57-15:58" }, { "token": [ "LIDENT", "x" ], - "loc": "15:48-15:49" + "loc": "15:59-15:60" }, { "token": "FAT_ARROW", - "loc": "15:50-15:52" + "loc": "15:61-15:63" }, { "token": "LBRACE", - "loc": "15:53-15:54" + "loc": "15:64-15:65" }, { "token": "NEWLINE", - "loc": "15:54-15:55" + "loc": "15:65-15:66" }, { "token": "IF", @@ -601,16 +620,20 @@ "token": "RPAREN", "loc": "19:4-19:5" }, + { + "token": "RPAREN", + "loc": "19:5-19:6" + }, { "token": [ "SEMI", false ], - "loc": "19:5-19:5" + "loc": "19:6-19:6" }, { "token": "NEWLINE", - "loc": "19:5-19:6" + "loc": "19:6-19:7" }, { "token": [ @@ -653,8 +676,324 @@ "token": "NEWLINE", "loc": "21:2-21:3" }, + { + "token": "NEWLINE", + "loc": "22:1-22:2" + }, + { + "token": "FN", + "loc": "23:1-23:3" + }, + { + "token": "LBRACKET", + "loc": "23:3-23:4" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "23:4-23:5" + }, + { + "token": "COMMA", + "loc": "23:5-23:6" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "23:7-23:8" + }, + { + "token": "COLON", + "loc": "23:9-23:10" + }, + { + "token": [ + "UIDENT", + "Error" + ], + "loc": "23:11-23:16" + }, + { + "token": "RBRACKET", + "loc": "23:16-23:17" + }, + { + "token": [ + "LIDENT", + "to_result" + ], + "loc": "23:18-23:27" + }, + { + "token": "LPAREN", + "loc": "23:27-23:28" + }, + { + "token": [ + "LIDENT", + "f" + ], + "loc": "23:28-23:29" + }, + { + "token": "COLON", + "loc": "23:30-23:31" + }, + { + "token": "LPAREN", + "loc": "23:32-23:33" + }, + { + "token": "RPAREN", + "loc": "23:33-23:34" + }, + { + "token": "THIN_ARROW", + "loc": "23:35-23:37" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "23:38-23:39" + }, + { + "token": "RAISE", + "loc": "23:40-23:45" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "23:46-23:47" + }, + { + "token": "RPAREN", + "loc": "23:47-23:48" + }, + { + "token": "THIN_ARROW", + "loc": "23:49-23:51" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "23:52-23:58" + }, + { + "token": "LBRACKET", + "loc": "23:58-23:59" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "23:59-23:60" + }, + { + "token": "COMMA", + "loc": "23:60-23:61" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "23:62-23:63" + }, + { + "token": "RBRACKET", + "loc": "23:63-23:64" + }, + { + "token": "LBRACE", + "loc": "23:65-23:66" + }, + { + "token": "NEWLINE", + "loc": "23:66-23:67" + }, + { + "token": "TRY", + "loc": "24:3-24:6" + }, + { + "token": [ + "LIDENT", + "f" + ], + "loc": "24:7-24:8" + }, + { + "token": "LPAREN", + "loc": "24:8-24:9" + }, + { + "token": "RPAREN", + "loc": "24:9-24:10" + }, + { + "token": "NEWLINE", + "loc": "24:10-24:11" + }, + { + "token": "CATCH", + "loc": "25:3-25:8" + }, + { + "token": "LBRACE", + "loc": "25:9-25:10" + }, + { + "token": "NEWLINE", + "loc": "25:10-25:11" + }, + { + "token": [ + "LIDENT", + "err" + ], + "loc": "26:5-26:8" + }, + { + "token": "FAT_ARROW", + "loc": "26:9-26:11" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "26:12-26:18" + }, + { + "token": "COLONCOLON", + "loc": "26:18-26:20" + }, + { + "token": [ + "UIDENT", + "Err" + ], + "loc": "26:20-26:23" + }, + { + "token": "LPAREN", + "loc": "26:23-26:24" + }, + { + "token": [ + "LIDENT", + "err" + ], + "loc": "26:24-26:27" + }, + { + "token": "RPAREN", + "loc": "26:27-26:28" + }, + { + "token": "NEWLINE", + "loc": "26:28-26:29" + }, + { + "token": "RBRACE", + "loc": "27:3-27:4" + }, + { + "token": "NORAISE", + "loc": "27:5-27:12" + }, + { + "token": "LBRACE", + "loc": "27:13-27:14" + }, + { + "token": "NEWLINE", + "loc": "27:14-27:15" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "28:5-28:10" + }, + { + "token": "FAT_ARROW", + "loc": "28:11-28:13" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "28:14-28:20" + }, + { + "token": "COLONCOLON", + "loc": "28:20-28:22" + }, + { + "token": [ + "UIDENT", + "Ok" + ], + "loc": "28:22-28:24" + }, + { + "token": "LPAREN", + "loc": "28:24-28:25" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "28:25-28:30" + }, + { + "token": "RPAREN", + "loc": "28:30-28:31" + }, + { + "token": "NEWLINE", + "loc": "28:31-28:32" + }, + { + "token": "RBRACE", + "loc": "29:3-29:4" + }, + { + "token": "NEWLINE", + "loc": "29:4-29:5" + }, + { + "token": "RBRACE", + "loc": "30:1-30:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "30:2-30:2" + }, + { + "token": "NEWLINE", + "loc": "30:2-30:3" + }, { "token": "EOF", - "loc": "22:1-22:1" + "loc": "31:1-31:1" } ] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/pipeline_test_error_polymorphism.json b/test/sync_test/__snapshot__/pipeline_test_error_polymorphism.json index 8cb99af3..b27dd31e 100644 --- a/test/sync_test/__snapshot__/pipeline_test_error_polymorphism.json +++ b/test/sync_test/__snapshot__/pipeline_test_error_polymorphism.json @@ -701,7 +701,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -1077,7 +1078,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -1527,57 +1529,112 @@ "loc": null, "children": { "lhs": { - "kind": "Expr::Group", + "kind": "Expr::Apply", "loc": null, "children": { - "expr": { - "kind": "Expr::TryOperator", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "id": { + "kind": "Var", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "id": { - "kind": "Var", + "value": "to_result" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Function", + "loc": null, + "children": { + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Apply", "loc": null, "children": { - "value": "has_error" + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "has_error" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } } - } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null } } } }, - "args": { - "kind": "Expr::Apply::ArgumentList", - "loc": null, - "children": [] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", + "kind": { + "kind": "ArgumentKind::Positional", "loc": null, "children": {} } } - }, - "kind": { - "kind": "TryOperatorKind::Question", - "loc": null, - "children": {} } - } + ] }, - "group": { - "kind": "Group::Paren", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -2058,159 +2115,225 @@ "loc": null, "children": { "value": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", - "loc": null, - "children": { - "value": "rethrow" - } - } + "value": "to_result" } } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", "loc": null, - "children": [ - { - "kind": "Argument", + "children": { + "value": { + "kind": "Expr::Function", "loc": null, "children": { - "value": { - "kind": "Expr::Function", + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "func": { - "kind": "Func::Lambda", + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Apply", "loc": null, "children": { - "parameters": { - "kind": "Func::Lambda::ParameterList", + "func": { + "kind": "Expr::Ident", "loc": null, - "children": [] + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "rethrow" + } + } + } + } + } }, - "body": { - "kind": "Expr::Raise", + "args": { + "kind": "Expr::Apply::ArgumentList", "loc": null, - "children": { - "err_value": { - "kind": "Expr::Apply", + "children": [ + { + "kind": "Argument", "loc": null, "children": { - "func": { - "kind": "Expr::Constr", + "value": { + "kind": "Expr::Function", "loc": null, "children": { - "constr": { - "kind": "Constructor", + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "name": { - "kind": "ConstrName", + "parameters": { + "kind": "Func::Lambda::ParameterList", "loc": null, - "children": { - "name": "MyErr" - } + "children": [] }, - "extra_info": { - "kind": "ConstructorExtraInfo::NoExtraInfo", - "loc": null, - "children": {} - } - } - } - } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", - "loc": null, - "children": [ - { - "kind": "Argument", - "loc": null, - "children": { - "value": { - "kind": "Expr::Constant", + "body": { + "kind": "Expr::Raise", "loc": null, "children": { - "constant": { - "kind": "Constant::Int", + "err_value": { + "kind": "Expr::Apply", "loc": null, "children": { - "value": "42" + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "MyErr" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::NoExtraInfo", + "loc": null, + "children": {} + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "42" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } } } } }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, "kind": { - "kind": "ArgumentKind::Positional", + "kind": "FnKind::Arrow", "loc": null, "children": {} - } + }, + "has_error": null, + "is_async": null } } - ] + } }, - "attr": { - "kind": "ApplyAttr::NoAttr", + "kind": { + "kind": "ArgumentKind::Positional", "loc": null, "children": {} } } } - } - }, - "return_type": null, - "error_type": { - "kind": "ErrorType::NoErrorType", - "loc": null, - "children": {} + ] }, - "kind": { - "kind": "FnKind::Arrow", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} - }, - "has_error": null, - "is_async": null + } } - } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } - ] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} + } } - } + ] }, - "kind": { - "kind": "TryOperatorKind::Question", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -2649,7 +2772,8 @@ "kind": "Expr::Array::ExprList", "loc": null, "children": [] - } + }, + "is_iter": false } }, "body": { @@ -3167,7 +3291,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -3539,7 +3664,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -3647,5 +3773,524 @@ } } } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "to_result" + } + }, + "has_error": null, + "is_async": null, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "f" + } + }, + "ty": { + "kind": "Type::Arrow", + "loc": null, + "children": { + "args": { + "kind": "Type::Arrow::ArgList", + "loc": null, + "children": [] + }, + "res": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "T" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "err": { + "kind": "ErrorType::ErrorType", + "loc": null, + "children": { + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "E" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + "is_async": null + } + } + } + } + ] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [ + { + "kind": "TypeVarBinder", + "loc": null, + "children": { + "name": "T", + "constraints": { + "kind": "TypeVarBinder::TypeVarConstraintList", + "loc": null, + "children": [] + } + } + }, + { + "kind": "TypeVarBinder", + "loc": null, + "children": { + "name": "E", + "constraints": { + "kind": "TypeVarBinder::TypeVarConstraintList", + "loc": null, + "children": [ + { + "kind": "TypeVarConstraint", + "loc": null, + "children": { + "trait": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Error" + } + } + } + } + ] + } + } + } + ] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [ + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "T" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "E" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + ] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::Try", + "loc": null, + "children": { + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "f" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "catch": { + "kind": "Expr::Try::CaseList", + "loc": null, + "children": [ + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "err" + } + } + } + }, + "guard": null, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Err" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::TypeName", + "loc": null, + "children": { + "value": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + }, + "is_object": false + } + } + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "err" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + ] + }, + "catch_all": false, + "try_else": { + "kind": "Expr::Try::CaseList", + "loc": null, + "children": [ + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "value" + } + } + } + }, + "guard": null, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Ok" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::TypeName", + "loc": null, + "children": { + "value": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + }, + "is_object": false + } + } + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "value" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + ] + }, + "has_try": true + } + } + } + } + } } ] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/pipeline_test_error_polymorphism.mbt b/test/sync_test/__snapshot__/pipeline_test_error_polymorphism.mbt index e1a5b1c6..d65f9f21 100644 --- a/test/sync_test/__snapshot__/pipeline_test_error_polymorphism.mbt +++ b/test/sync_test/__snapshot__/pipeline_test_error_polymorphism.mbt @@ -29,7 +29,7 @@ fn has_error() -> Unit raise { fn init { println("===") - (try? has_error()) |> debug + to_result(() => has_error()) |> debug } fn rethrow(f : () -> Int raise?) -> Int raise? { @@ -42,7 +42,7 @@ fn rethrow(f : () -> Int raise?) -> Int raise? { fn init { println("===") - debug(try? rethrow(() => raise MyErr(42))) + debug(to_result(() => rethrow(() => raise MyErr(42)))) println(rethrow(fn () { 42 })) } @@ -69,3 +69,12 @@ fn init { no_error_in_array([ 1, 2, 3, 4 ], _x => ()) |> println } + +fn[T, E : Error] to_result(f : () -> T raise E) -> Result[T, E] { + try f() + catch { + err => Result::Err(err) + } noraise { + value => Result::Ok(value) + } +} diff --git a/test/sync_test/__snapshot__/pipeline_test_error_polymorphism.mbt.tokens.json b/test/sync_test/__snapshot__/pipeline_test_error_polymorphism.mbt.tokens.json index dbbce764..85a508d4 100644 --- a/test/sync_test/__snapshot__/pipeline_test_error_polymorphism.mbt.tokens.json +++ b/test/sync_test/__snapshot__/pipeline_test_error_polymorphism.mbt.tokens.json @@ -845,47 +845,62 @@ "token": "NEWLINE", "loc": "31:17-31:18" }, + { + "token": [ + "LIDENT", + "to_result" + ], + "loc": "32:3-32:12" + }, { "token": "LPAREN", - "loc": "32:3-32:4" + "loc": "32:12-32:13" }, { - "token": "TRY_QUESTION", - "loc": "32:4-32:8" + "token": "LPAREN", + "loc": "32:13-32:14" + }, + { + "token": "RPAREN", + "loc": "32:14-32:15" + }, + { + "token": "FAT_ARROW", + "loc": "32:16-32:18" }, { "token": [ "LIDENT", "has_error" ], - "loc": "32:9-32:18" + "loc": "32:19-32:28" }, { "token": "LPAREN", - "loc": "32:18-32:19" + "loc": "32:28-32:29" }, { "token": "RPAREN", - "loc": "32:19-32:20" + "loc": "32:29-32:30" }, { "token": "RPAREN", - "loc": "32:20-32:21" + "loc": "32:30-32:31" }, { "token": "PIPE", - "loc": "32:22-32:24" + "loc": "32:32-32:34" }, { "token": [ "LIDENT", "debug" ], - "loc": "32:25-32:30" + "loc": "32:35-32:40" }, { "token": "NEWLINE", - "loc": "32:30-32:31" + "loc": "32:40-32:41" }, { "token": "RBRACE", @@ -1154,76 +1169,99 @@ "loc": "45:8-45:9" }, { - "token": "TRY_QUESTION", - "loc": "45:9-45:13" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "45:9-45:18" + }, + { + "token": "LPAREN", + "loc": "45:18-45:19" + }, + { + "token": "LPAREN", + "loc": "45:19-45:20" + }, + { + "token": "RPAREN", + "loc": "45:20-45:21" + }, + { + "token": "FAT_ARROW", + "loc": "45:22-45:24" }, { "token": [ "LIDENT", "rethrow" ], - "loc": "45:14-45:21" + "loc": "45:25-45:32" }, { "token": "LPAREN", - "loc": "45:21-45:22" + "loc": "45:32-45:33" }, { "token": "LPAREN", - "loc": "45:22-45:23" + "loc": "45:33-45:34" }, { "token": "RPAREN", - "loc": "45:23-45:24" + "loc": "45:34-45:35" }, { "token": "FAT_ARROW", - "loc": "45:25-45:27" + "loc": "45:36-45:38" }, { "token": "RAISE", - "loc": "45:28-45:33" + "loc": "45:39-45:44" }, { "token": [ "UIDENT", "MyErr" ], - "loc": "45:34-45:39" + "loc": "45:45-45:50" }, { "token": "LPAREN", - "loc": "45:39-45:40" + "loc": "45:50-45:51" }, { "token": [ "INT", "42" ], - "loc": "45:40-45:42" + "loc": "45:51-45:53" + }, + { + "token": "RPAREN", + "loc": "45:53-45:54" }, { "token": "RPAREN", - "loc": "45:42-45:43" + "loc": "45:54-45:55" }, { "token": "RPAREN", - "loc": "45:43-45:44" + "loc": "45:55-45:56" }, { "token": "RPAREN", - "loc": "45:44-45:45" + "loc": "45:56-45:57" }, { "token": [ "SEMI", false ], - "loc": "45:45-45:45" + "loc": "45:57-45:57" }, { "token": "NEWLINE", - "loc": "45:45-45:46" + "loc": "45:57-45:58" }, { "token": [ @@ -2028,8 +2066,324 @@ "token": "NEWLINE", "loc": "71:2-71:3" }, + { + "token": "NEWLINE", + "loc": "72:1-72:2" + }, + { + "token": "FN", + "loc": "73:1-73:3" + }, + { + "token": "LBRACKET", + "loc": "73:3-73:4" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "73:4-73:5" + }, + { + "token": "COMMA", + "loc": "73:5-73:6" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "73:7-73:8" + }, + { + "token": "COLON", + "loc": "73:9-73:10" + }, + { + "token": [ + "UIDENT", + "Error" + ], + "loc": "73:11-73:16" + }, + { + "token": "RBRACKET", + "loc": "73:16-73:17" + }, + { + "token": [ + "LIDENT", + "to_result" + ], + "loc": "73:18-73:27" + }, + { + "token": "LPAREN", + "loc": "73:27-73:28" + }, + { + "token": [ + "LIDENT", + "f" + ], + "loc": "73:28-73:29" + }, + { + "token": "COLON", + "loc": "73:30-73:31" + }, + { + "token": "LPAREN", + "loc": "73:32-73:33" + }, + { + "token": "RPAREN", + "loc": "73:33-73:34" + }, + { + "token": "THIN_ARROW", + "loc": "73:35-73:37" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "73:38-73:39" + }, + { + "token": "RAISE", + "loc": "73:40-73:45" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "73:46-73:47" + }, + { + "token": "RPAREN", + "loc": "73:47-73:48" + }, + { + "token": "THIN_ARROW", + "loc": "73:49-73:51" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "73:52-73:58" + }, + { + "token": "LBRACKET", + "loc": "73:58-73:59" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "73:59-73:60" + }, + { + "token": "COMMA", + "loc": "73:60-73:61" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "73:62-73:63" + }, + { + "token": "RBRACKET", + "loc": "73:63-73:64" + }, + { + "token": "LBRACE", + "loc": "73:65-73:66" + }, + { + "token": "NEWLINE", + "loc": "73:66-73:67" + }, + { + "token": "TRY", + "loc": "74:3-74:6" + }, + { + "token": [ + "LIDENT", + "f" + ], + "loc": "74:7-74:8" + }, + { + "token": "LPAREN", + "loc": "74:8-74:9" + }, + { + "token": "RPAREN", + "loc": "74:9-74:10" + }, + { + "token": "NEWLINE", + "loc": "74:10-74:11" + }, + { + "token": "CATCH", + "loc": "75:3-75:8" + }, + { + "token": "LBRACE", + "loc": "75:9-75:10" + }, + { + "token": "NEWLINE", + "loc": "75:10-75:11" + }, + { + "token": [ + "LIDENT", + "err" + ], + "loc": "76:5-76:8" + }, + { + "token": "FAT_ARROW", + "loc": "76:9-76:11" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "76:12-76:18" + }, + { + "token": "COLONCOLON", + "loc": "76:18-76:20" + }, + { + "token": [ + "UIDENT", + "Err" + ], + "loc": "76:20-76:23" + }, + { + "token": "LPAREN", + "loc": "76:23-76:24" + }, + { + "token": [ + "LIDENT", + "err" + ], + "loc": "76:24-76:27" + }, + { + "token": "RPAREN", + "loc": "76:27-76:28" + }, + { + "token": "NEWLINE", + "loc": "76:28-76:29" + }, + { + "token": "RBRACE", + "loc": "77:3-77:4" + }, + { + "token": "NORAISE", + "loc": "77:5-77:12" + }, + { + "token": "LBRACE", + "loc": "77:13-77:14" + }, + { + "token": "NEWLINE", + "loc": "77:14-77:15" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "78:5-78:10" + }, + { + "token": "FAT_ARROW", + "loc": "78:11-78:13" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "78:14-78:20" + }, + { + "token": "COLONCOLON", + "loc": "78:20-78:22" + }, + { + "token": [ + "UIDENT", + "Ok" + ], + "loc": "78:22-78:24" + }, + { + "token": "LPAREN", + "loc": "78:24-78:25" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "78:25-78:30" + }, + { + "token": "RPAREN", + "loc": "78:30-78:31" + }, + { + "token": "NEWLINE", + "loc": "78:31-78:32" + }, + { + "token": "RBRACE", + "loc": "79:3-79:4" + }, + { + "token": "NEWLINE", + "loc": "79:4-79:5" + }, + { + "token": "RBRACE", + "loc": "80:1-80:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "80:2-80:2" + }, + { + "token": "NEWLINE", + "loc": "80:2-80:3" + }, { "token": "EOF", - "loc": "72:1-72:1" + "loc": "81:1-81:1" } ] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/pipeline_test_error_to_json_generic.json b/test/sync_test/__snapshot__/pipeline_test_error_to_json_generic.json index f92adf3e..e8cecc15 100644 --- a/test/sync_test/__snapshot__/pipeline_test_error_to_json_generic.json +++ b/test/sync_test/__snapshot__/pipeline_test_error_to_json_generic.json @@ -187,6 +187,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, @@ -380,6 +385,11 @@ } ] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, diff --git a/test/sync_test/__snapshot__/pipeline_test_error_to_repr.json b/test/sync_test/__snapshot__/pipeline_test_error_to_repr.json index 7baf2b9e..46f150af 100644 --- a/test/sync_test/__snapshot__/pipeline_test_error_to_repr.json +++ b/test/sync_test/__snapshot__/pipeline_test_error_to_repr.json @@ -1344,6 +1344,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, @@ -1508,7 +1513,8 @@ "kind": "Expr::Array::ExprList", "loc": null, "children": [] - } + }, + "is_iter": false } }, "kind": { @@ -1631,7 +1637,8 @@ "kind": "Expr::Array::ExprList", "loc": null, "children": [] - } + }, + "is_iter": false } }, "kind": { diff --git a/test/sync_test/__snapshot__/pipeline_test_error_to_string.json b/test/sync_test/__snapshot__/pipeline_test_error_to_string.json index 585be6f6..8c0b6ea5 100644 --- a/test/sync_test/__snapshot__/pipeline_test_error_to_string.json +++ b/test/sync_test/__snapshot__/pipeline_test_error_to_string.json @@ -1292,6 +1292,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, @@ -2653,6 +2658,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, @@ -3128,6 +3138,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, diff --git a/test/sync_test/__snapshot__/pipeline_test_error_type_variable.json b/test/sync_test/__snapshot__/pipeline_test_error_type_variable.json index 60f87b2b..2c0499cf 100644 --- a/test/sync_test/__snapshot__/pipeline_test_error_type_variable.json +++ b/test/sync_test/__snapshot__/pipeline_test_error_type_variable.json @@ -755,6 +755,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, diff --git a/test/sync_test/__snapshot__/pipeline_test_eval_order.json b/test/sync_test/__snapshot__/pipeline_test_eval_order.json index 64a466b9..aa31483f 100644 --- a/test/sync_test/__snapshot__/pipeline_test_eval_order.json +++ b/test/sync_test/__snapshot__/pipeline_test_eval_order.json @@ -1630,7 +1630,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { diff --git a/test/sync_test/__snapshot__/pipeline_test_explicit_method.json b/test/sync_test/__snapshot__/pipeline_test_explicit_method.json index c686706d..23970381 100644 --- a/test/sync_test/__snapshot__/pipeline_test_explicit_method.json +++ b/test/sync_test/__snapshot__/pipeline_test_explicit_method.json @@ -176,6 +176,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, @@ -919,6 +924,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, @@ -1662,6 +1672,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, @@ -2405,6 +2420,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, @@ -3336,6 +3356,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, diff --git a/test/sync_test/__snapshot__/pipeline_test_export_test.json b/test/sync_test/__snapshot__/pipeline_test_export_test.json index 7bd0fecc..787a106b 100644 --- a/test/sync_test/__snapshot__/pipeline_test_export_test.json +++ b/test/sync_test/__snapshot__/pipeline_test_export_test.json @@ -5452,6 +5452,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, diff --git a/test/sync_test/__snapshot__/pipeline_test_ext_method_override.json b/test/sync_test/__snapshot__/pipeline_test_ext_method_override.json index d81dcc2c..0615c730 100644 --- a/test/sync_test/__snapshot__/pipeline_test_ext_method_override.json +++ b/test/sync_test/__snapshot__/pipeline_test_ext_method_override.json @@ -664,6 +664,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, diff --git a/test/sync_test/__snapshot__/pipeline_test_extension_method.json b/test/sync_test/__snapshot__/pipeline_test_extension_method.json index 359de925..c326f5dd 100644 --- a/test/sync_test/__snapshot__/pipeline_test_extension_method.json +++ b/test/sync_test/__snapshot__/pipeline_test_extension_method.json @@ -379,6 +379,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, diff --git a/test/sync_test/__snapshot__/pipeline_test_first_class_trait_method.json b/test/sync_test/__snapshot__/pipeline_test_first_class_trait_method.json index 41c5f8f5..a5668362 100644 --- a/test/sync_test/__snapshot__/pipeline_test_first_class_trait_method.json +++ b/test/sync_test/__snapshot__/pipeline_test_first_class_trait_method.json @@ -187,6 +187,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, @@ -390,7 +395,8 @@ } } ] - } + }, + "is_iter": false } }, "method_name": { @@ -500,7 +506,8 @@ } } ] - } + }, + "is_iter": false } }, "method_name": { @@ -745,7 +752,8 @@ } } ] - } + }, + "is_iter": false } }, "method_name": { diff --git a/test/sync_test/__snapshot__/pipeline_test_first_class_unit.json b/test/sync_test/__snapshot__/pipeline_test_first_class_unit.json index 1858d3e7..60869eb1 100644 --- a/test/sync_test/__snapshot__/pipeline_test_first_class_unit.json +++ b/test/sync_test/__snapshot__/pipeline_test_first_class_unit.json @@ -1652,6 +1652,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, diff --git a/test/sync_test/__snapshot__/pipeline_test_fixedarray_convert_view.json b/test/sync_test/__snapshot__/pipeline_test_fixedarray_convert_view.json index 2ccdbe3f..ead9a70a 100644 --- a/test/sync_test/__snapshot__/pipeline_test_fixedarray_convert_view.json +++ b/test/sync_test/__snapshot__/pipeline_test_fixedarray_convert_view.json @@ -634,7 +634,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { @@ -1064,7 +1065,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { diff --git a/test/sync_test/__snapshot__/pipeline_test_fixedarray_fill.json b/test/sync_test/__snapshot__/pipeline_test_fixedarray_fill.json index 92713dc5..3c79ddce 100644 --- a/test/sync_test/__snapshot__/pipeline_test_fixedarray_fill.json +++ b/test/sync_test/__snapshot__/pipeline_test_fixedarray_fill.json @@ -720,7 +720,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { @@ -1239,7 +1240,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { diff --git a/test/sync_test/__snapshot__/pipeline_test_fixedarray_make_with_blit.json b/test/sync_test/__snapshot__/pipeline_test_fixedarray_make_with_blit.json index 58ef1938..f5d19bfc 100644 --- a/test/sync_test/__snapshot__/pipeline_test_fixedarray_make_with_blit.json +++ b/test/sync_test/__snapshot__/pipeline_test_fixedarray_make_with_blit.json @@ -2157,7 +2157,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { @@ -3016,7 +3017,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { @@ -4635,7 +4637,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { diff --git a/test/sync_test/__snapshot__/pipeline_test_float32.json b/test/sync_test/__snapshot__/pipeline_test_float32.json index dfe22d1a..9afb08a9 100644 --- a/test/sync_test/__snapshot__/pipeline_test_float32.json +++ b/test/sync_test/__snapshot__/pipeline_test_float32.json @@ -8389,7 +8389,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { diff --git a/test/sync_test/__snapshot__/pipeline_test_float_array.json b/test/sync_test/__snapshot__/pipeline_test_float_array.json index 923b1cfb..498bb7d9 100644 --- a/test/sync_test/__snapshot__/pipeline_test_float_array.json +++ b/test/sync_test/__snapshot__/pipeline_test_float_array.json @@ -153,7 +153,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { @@ -3219,7 +3220,8 @@ "kind": "Expr::Array::ExprList", "loc": null, "children": [] - } + }, + "is_iter": false } }, "kind": { @@ -3291,7 +3293,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -3376,7 +3379,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -3474,7 +3478,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -3585,7 +3590,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -3711,7 +3717,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { diff --git a/test/sync_test/__snapshot__/pipeline_test_fn_alias_test.json b/test/sync_test/__snapshot__/pipeline_test_fn_alias_test.json index b5564f97..e031f5f7 100644 --- a/test/sync_test/__snapshot__/pipeline_test_fn_alias_test.json +++ b/test/sync_test/__snapshot__/pipeline_test_fn_alias_test.json @@ -326,6 +326,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, diff --git a/test/sync_test/__snapshot__/pipeline_test_foreach.json b/test/sync_test/__snapshot__/pipeline_test_foreach.json index 09237320..347da5c6 100644 --- a/test/sync_test/__snapshot__/pipeline_test_foreach.json +++ b/test/sync_test/__snapshot__/pipeline_test_foreach.json @@ -142,7 +142,8 @@ } } ] - } + }, + "is_iter": false } }, "method_name": { @@ -695,7 +696,8 @@ } } ] - } + }, + "is_iter": false } }, "method_name": { @@ -1119,7 +1121,8 @@ } } ] - } + }, + "is_iter": false } }, "method_name": { @@ -1474,7 +1477,8 @@ } } ] - } + }, + "is_iter": false } }, "method_name": { @@ -2029,7 +2033,8 @@ } } ] - } + }, + "is_iter": false } }, "method_name": { @@ -2383,7 +2388,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { @@ -2451,7 +2457,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { @@ -3958,7 +3965,8 @@ } } ] - } + }, + "is_iter": false } }, "method_name": { @@ -4222,7 +4230,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { diff --git a/test/sync_test/__snapshot__/pipeline_test_foreach_break_label.json b/test/sync_test/__snapshot__/pipeline_test_foreach_break_label.json index cc4563cc..f7c7ded3 100644 --- a/test/sync_test/__snapshot__/pipeline_test_foreach_break_label.json +++ b/test/sync_test/__snapshot__/pipeline_test_foreach_break_label.json @@ -584,7 +584,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -706,7 +707,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { diff --git a/test/sync_test/__snapshot__/pipeline_test_foreach_external.json b/test/sync_test/__snapshot__/pipeline_test_foreach_external.json index 5bcc8781..d936d627 100644 --- a/test/sync_test/__snapshot__/pipeline_test_foreach_external.json +++ b/test/sync_test/__snapshot__/pipeline_test_foreach_external.json @@ -202,7 +202,8 @@ } } ] - } + }, + "is_iter": false } }, "method_name": { @@ -397,7 +398,8 @@ } } ] - } + }, + "is_iter": false } }, "method_name": { diff --git a/test/sync_test/__snapshot__/pipeline_test_foreach_nested_loop.json b/test/sync_test/__snapshot__/pipeline_test_foreach_nested_loop.json index 4a0d4462..f55ff0d6 100644 --- a/test/sync_test/__snapshot__/pipeline_test_foreach_nested_loop.json +++ b/test/sync_test/__snapshot__/pipeline_test_foreach_nested_loop.json @@ -579,71 +579,137 @@ "loc": null, "children": { "value": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", - "loc": null, - "children": { - "value": "f" - } - } + "value": "to_result" } } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", "loc": null, - "children": [ - { - "kind": "Argument", + "children": { + "value": { + "kind": "Expr::Function", "loc": null, "children": { - "value": { - "kind": "Expr::Constant", + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "constant": { - "kind": "Constant::Int", + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Apply", "loc": null, "children": { - "value": "0" + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "f" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "0" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } } - } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } - ] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} + } } - } + ] }, - "kind": { - "kind": "TryOperatorKind::Question", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -697,71 +763,137 @@ "loc": null, "children": { "value": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", - "loc": null, - "children": { - "value": "f" - } - } + "value": "to_result" } } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", "loc": null, - "children": [ - { - "kind": "Argument", + "children": { + "value": { + "kind": "Expr::Function", "loc": null, "children": { - "value": { - "kind": "Expr::Constant", + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "constant": { - "kind": "Constant::Int", + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Apply", "loc": null, "children": { - "value": "1" + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "f" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "1" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } } - } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } - ] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} + } } - } + ] }, - "kind": { - "kind": "TryOperatorKind::Question", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -817,71 +949,137 @@ "loc": null, "children": { "value": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", - "loc": null, - "children": { - "value": "f" - } - } + "value": "to_result" } } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", "loc": null, - "children": [ - { - "kind": "Argument", + "children": { + "value": { + "kind": "Expr::Function", "loc": null, "children": { - "value": { - "kind": "Expr::Constant", + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "constant": { - "kind": "Constant::Int", + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Apply", "loc": null, "children": { - "value": "2" - } - } - } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} - } - } - } - ] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} - } - } - }, - "kind": { - "kind": "TryOperatorKind::Question", + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "f" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "2" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -908,5 +1106,524 @@ } } } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "to_result" + } + }, + "has_error": null, + "is_async": null, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "f" + } + }, + "ty": { + "kind": "Type::Arrow", + "loc": null, + "children": { + "args": { + "kind": "Type::Arrow::ArgList", + "loc": null, + "children": [] + }, + "res": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "T" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "err": { + "kind": "ErrorType::ErrorType", + "loc": null, + "children": { + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "E" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + "is_async": null + } + } + } + } + ] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [ + { + "kind": "TypeVarBinder", + "loc": null, + "children": { + "name": "T", + "constraints": { + "kind": "TypeVarBinder::TypeVarConstraintList", + "loc": null, + "children": [] + } + } + }, + { + "kind": "TypeVarBinder", + "loc": null, + "children": { + "name": "E", + "constraints": { + "kind": "TypeVarBinder::TypeVarConstraintList", + "loc": null, + "children": [ + { + "kind": "TypeVarConstraint", + "loc": null, + "children": { + "trait": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Error" + } + } + } + } + ] + } + } + } + ] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [ + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "T" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "E" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + ] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::Try", + "loc": null, + "children": { + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "f" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "catch": { + "kind": "Expr::Try::CaseList", + "loc": null, + "children": [ + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "err" + } + } + } + }, + "guard": null, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Err" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::TypeName", + "loc": null, + "children": { + "value": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + }, + "is_object": false + } + } + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "err" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + ] + }, + "catch_all": false, + "try_else": { + "kind": "Expr::Try::CaseList", + "loc": null, + "children": [ + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "value" + } + } + } + }, + "guard": null, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Ok" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::TypeName", + "loc": null, + "children": { + "value": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + }, + "is_object": false + } + } + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "value" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + ] + }, + "has_try": true + } + } + } + } + } } ] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/pipeline_test_foreach_nested_loop.mbt b/test/sync_test/__snapshot__/pipeline_test_foreach_nested_loop.mbt index 3a43ca47..b3022d87 100644 --- a/test/sync_test/__snapshot__/pipeline_test_foreach_nested_loop.mbt +++ b/test/sync_test/__snapshot__/pipeline_test_foreach_nested_loop.mbt @@ -14,7 +14,16 @@ fn f(x : Int) -> String raise { } fn init { - debug(try? f(0)) - debug(try? f(1)) - debug(try? f(2)) + debug(to_result(() => f(0))) + debug(to_result(() => f(1))) + debug(to_result(() => f(2))) +} + +fn[T, E : Error] to_result(f : () -> T raise E) -> Result[T, E] { + try f() + catch { + err => Result::Err(err) + } noraise { + value => Result::Ok(value) + } } diff --git a/test/sync_test/__snapshot__/pipeline_test_foreach_nested_loop.mbt.tokens.json b/test/sync_test/__snapshot__/pipeline_test_foreach_nested_loop.mbt.tokens.json index 17b944dc..7e097ef3 100644 --- a/test/sync_test/__snapshot__/pipeline_test_foreach_nested_loop.mbt.tokens.json +++ b/test/sync_test/__snapshot__/pipeline_test_foreach_nested_loop.mbt.tokens.json @@ -403,45 +403,68 @@ "loc": "17:8-17:9" }, { - "token": "TRY_QUESTION", - "loc": "17:9-17:13" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "17:9-17:18" + }, + { + "token": "LPAREN", + "loc": "17:18-17:19" + }, + { + "token": "LPAREN", + "loc": "17:19-17:20" + }, + { + "token": "RPAREN", + "loc": "17:20-17:21" + }, + { + "token": "FAT_ARROW", + "loc": "17:22-17:24" }, { "token": [ "LIDENT", "f" ], - "loc": "17:14-17:15" + "loc": "17:25-17:26" }, { "token": "LPAREN", - "loc": "17:15-17:16" + "loc": "17:26-17:27" }, { "token": [ "INT", "0" ], - "loc": "17:16-17:17" + "loc": "17:27-17:28" }, { "token": "RPAREN", - "loc": "17:17-17:18" + "loc": "17:28-17:29" }, { "token": "RPAREN", - "loc": "17:18-17:19" + "loc": "17:29-17:30" + }, + { + "token": "RPAREN", + "loc": "17:30-17:31" }, { "token": [ "SEMI", false ], - "loc": "17:19-17:19" + "loc": "17:31-17:31" }, { "token": "NEWLINE", - "loc": "17:19-17:20" + "loc": "17:31-17:32" }, { "token": [ @@ -455,45 +478,68 @@ "loc": "18:8-18:9" }, { - "token": "TRY_QUESTION", - "loc": "18:9-18:13" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "18:9-18:18" + }, + { + "token": "LPAREN", + "loc": "18:18-18:19" + }, + { + "token": "LPAREN", + "loc": "18:19-18:20" + }, + { + "token": "RPAREN", + "loc": "18:20-18:21" + }, + { + "token": "FAT_ARROW", + "loc": "18:22-18:24" }, { "token": [ "LIDENT", "f" ], - "loc": "18:14-18:15" + "loc": "18:25-18:26" }, { "token": "LPAREN", - "loc": "18:15-18:16" + "loc": "18:26-18:27" }, { "token": [ "INT", "1" ], - "loc": "18:16-18:17" + "loc": "18:27-18:28" }, { "token": "RPAREN", - "loc": "18:17-18:18" + "loc": "18:28-18:29" }, { "token": "RPAREN", - "loc": "18:18-18:19" + "loc": "18:29-18:30" + }, + { + "token": "RPAREN", + "loc": "18:30-18:31" }, { "token": [ "SEMI", false ], - "loc": "18:19-18:19" + "loc": "18:31-18:31" }, { "token": "NEWLINE", - "loc": "18:19-18:20" + "loc": "18:31-18:32" }, { "token": [ @@ -507,38 +553,61 @@ "loc": "19:8-19:9" }, { - "token": "TRY_QUESTION", - "loc": "19:9-19:13" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "19:9-19:18" + }, + { + "token": "LPAREN", + "loc": "19:18-19:19" + }, + { + "token": "LPAREN", + "loc": "19:19-19:20" + }, + { + "token": "RPAREN", + "loc": "19:20-19:21" + }, + { + "token": "FAT_ARROW", + "loc": "19:22-19:24" }, { "token": [ "LIDENT", "f" ], - "loc": "19:14-19:15" + "loc": "19:25-19:26" }, { "token": "LPAREN", - "loc": "19:15-19:16" + "loc": "19:26-19:27" }, { "token": [ "INT", "2" ], - "loc": "19:16-19:17" + "loc": "19:27-19:28" }, { "token": "RPAREN", - "loc": "19:17-19:18" + "loc": "19:28-19:29" }, { "token": "RPAREN", - "loc": "19:18-19:19" + "loc": "19:29-19:30" + }, + { + "token": "RPAREN", + "loc": "19:30-19:31" }, { "token": "NEWLINE", - "loc": "19:19-19:20" + "loc": "19:31-19:32" }, { "token": "RBRACE", @@ -555,8 +624,324 @@ "token": "NEWLINE", "loc": "20:2-20:3" }, + { + "token": "NEWLINE", + "loc": "21:1-21:2" + }, + { + "token": "FN", + "loc": "22:1-22:3" + }, + { + "token": "LBRACKET", + "loc": "22:3-22:4" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "22:4-22:5" + }, + { + "token": "COMMA", + "loc": "22:5-22:6" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "22:7-22:8" + }, + { + "token": "COLON", + "loc": "22:9-22:10" + }, + { + "token": [ + "UIDENT", + "Error" + ], + "loc": "22:11-22:16" + }, + { + "token": "RBRACKET", + "loc": "22:16-22:17" + }, + { + "token": [ + "LIDENT", + "to_result" + ], + "loc": "22:18-22:27" + }, + { + "token": "LPAREN", + "loc": "22:27-22:28" + }, + { + "token": [ + "LIDENT", + "f" + ], + "loc": "22:28-22:29" + }, + { + "token": "COLON", + "loc": "22:30-22:31" + }, + { + "token": "LPAREN", + "loc": "22:32-22:33" + }, + { + "token": "RPAREN", + "loc": "22:33-22:34" + }, + { + "token": "THIN_ARROW", + "loc": "22:35-22:37" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "22:38-22:39" + }, + { + "token": "RAISE", + "loc": "22:40-22:45" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "22:46-22:47" + }, + { + "token": "RPAREN", + "loc": "22:47-22:48" + }, + { + "token": "THIN_ARROW", + "loc": "22:49-22:51" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "22:52-22:58" + }, + { + "token": "LBRACKET", + "loc": "22:58-22:59" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "22:59-22:60" + }, + { + "token": "COMMA", + "loc": "22:60-22:61" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "22:62-22:63" + }, + { + "token": "RBRACKET", + "loc": "22:63-22:64" + }, + { + "token": "LBRACE", + "loc": "22:65-22:66" + }, + { + "token": "NEWLINE", + "loc": "22:66-22:67" + }, + { + "token": "TRY", + "loc": "23:3-23:6" + }, + { + "token": [ + "LIDENT", + "f" + ], + "loc": "23:7-23:8" + }, + { + "token": "LPAREN", + "loc": "23:8-23:9" + }, + { + "token": "RPAREN", + "loc": "23:9-23:10" + }, + { + "token": "NEWLINE", + "loc": "23:10-23:11" + }, + { + "token": "CATCH", + "loc": "24:3-24:8" + }, + { + "token": "LBRACE", + "loc": "24:9-24:10" + }, + { + "token": "NEWLINE", + "loc": "24:10-24:11" + }, + { + "token": [ + "LIDENT", + "err" + ], + "loc": "25:5-25:8" + }, + { + "token": "FAT_ARROW", + "loc": "25:9-25:11" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "25:12-25:18" + }, + { + "token": "COLONCOLON", + "loc": "25:18-25:20" + }, + { + "token": [ + "UIDENT", + "Err" + ], + "loc": "25:20-25:23" + }, + { + "token": "LPAREN", + "loc": "25:23-25:24" + }, + { + "token": [ + "LIDENT", + "err" + ], + "loc": "25:24-25:27" + }, + { + "token": "RPAREN", + "loc": "25:27-25:28" + }, + { + "token": "NEWLINE", + "loc": "25:28-25:29" + }, + { + "token": "RBRACE", + "loc": "26:3-26:4" + }, + { + "token": "NORAISE", + "loc": "26:5-26:12" + }, + { + "token": "LBRACE", + "loc": "26:13-26:14" + }, + { + "token": "NEWLINE", + "loc": "26:14-26:15" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "27:5-27:10" + }, + { + "token": "FAT_ARROW", + "loc": "27:11-27:13" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "27:14-27:20" + }, + { + "token": "COLONCOLON", + "loc": "27:20-27:22" + }, + { + "token": [ + "UIDENT", + "Ok" + ], + "loc": "27:22-27:24" + }, + { + "token": "LPAREN", + "loc": "27:24-27:25" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "27:25-27:30" + }, + { + "token": "RPAREN", + "loc": "27:30-27:31" + }, + { + "token": "NEWLINE", + "loc": "27:31-27:32" + }, + { + "token": "RBRACE", + "loc": "28:3-28:4" + }, + { + "token": "NEWLINE", + "loc": "28:4-28:5" + }, + { + "token": "RBRACE", + "loc": "29:1-29:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "29:2-29:2" + }, + { + "token": "NEWLINE", + "loc": "29:2-29:3" + }, { "token": "EOF", - "loc": "21:1-21:1" + "loc": "30:1-30:1" } ] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/pipeline_test_foreach_specialize.json b/test/sync_test/__snapshot__/pipeline_test_foreach_specialize.json index 817fe12e..2efe59cf 100644 --- a/test/sync_test/__snapshot__/pipeline_test_foreach_specialize.json +++ b/test/sync_test/__snapshot__/pipeline_test_foreach_specialize.json @@ -117,7 +117,8 @@ } } ] - } + }, + "is_iter": false } }, "init": { @@ -495,7 +496,8 @@ } } ] - } + }, + "is_iter": false } }, "ty": { @@ -759,7 +761,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { @@ -1042,7 +1045,8 @@ } } ] - } + }, + "is_iter": false } }, "init": { diff --git a/test/sync_test/__snapshot__/pipeline_test_foreach_with_init.json b/test/sync_test/__snapshot__/pipeline_test_foreach_with_init.json index 6970f3d3..084b45e8 100644 --- a/test/sync_test/__snapshot__/pipeline_test_foreach_with_init.json +++ b/test/sync_test/__snapshot__/pipeline_test_foreach_with_init.json @@ -2572,7 +2572,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { diff --git a/test/sync_test/__snapshot__/pipeline_test_func_as_object.json b/test/sync_test/__snapshot__/pipeline_test_func_as_object.json index f10e46f1..f4505398 100644 --- a/test/sync_test/__snapshot__/pipeline_test_func_as_object.json +++ b/test/sync_test/__snapshot__/pipeline_test_func_as_object.json @@ -300,6 +300,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, diff --git a/test/sync_test/__snapshot__/pipeline_test_get_slice_corner_case.json b/test/sync_test/__snapshot__/pipeline_test_get_slice_corner_case.json index 05205f51..67c050fe 100644 --- a/test/sync_test/__snapshot__/pipeline_test_get_slice_corner_case.json +++ b/test/sync_test/__snapshot__/pipeline_test_get_slice_corner_case.json @@ -187,7 +187,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { @@ -550,7 +551,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { @@ -644,7 +646,8 @@ "kind": "Expr::Array::ExprList", "loc": null, "children": [] - } + }, + "is_iter": false } }, "augmented_by": null @@ -889,7 +892,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { @@ -1413,7 +1417,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { diff --git a/test/sync_test/__snapshot__/pipeline_test_github_54.json b/test/sync_test/__snapshot__/pipeline_test_github_54.json index 3b1e7b87..00ff7187 100644 --- a/test/sync_test/__snapshot__/pipeline_test_github_54.json +++ b/test/sync_test/__snapshot__/pipeline_test_github_54.json @@ -152,6 +152,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, diff --git a/test/sync_test/__snapshot__/pipeline_test_global.json b/test/sync_test/__snapshot__/pipeline_test_global.json index 063d75a5..e13a42ca 100644 --- a/test/sync_test/__snapshot__/pipeline_test_global.json +++ b/test/sync_test/__snapshot__/pipeline_test_global.json @@ -287,7 +287,8 @@ } } ] - } + }, + "is_iter": false } }, "vis": { diff --git a/test/sync_test/__snapshot__/pipeline_test_guard.json b/test/sync_test/__snapshot__/pipeline_test_guard.json index 93d5699c..d35a9e0c 100644 --- a/test/sync_test/__snapshot__/pipeline_test_guard.json +++ b/test/sync_test/__snapshot__/pipeline_test_guard.json @@ -3098,199 +3098,265 @@ "loc": null, "children": { "value": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", - "loc": null, - "children": { - "value": "div" - } - } + "value": "to_result" } } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", "loc": null, - "children": [ - { - "kind": "Argument", + "children": { + "value": { + "kind": "Expr::Function", "loc": null, "children": { - "value": { - "kind": "Expr::Apply", + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "func": { - "kind": "Expr::Constr", + "parameters": { + "kind": "Func::Lambda::ParameterList", "loc": null, - "children": { - "constr": { - "kind": "Constructor", - "loc": null, - "children": { - "name": { - "kind": "ConstrName", - "loc": null, - "children": { - "name": "Some" - } - }, - "extra_info": { - "kind": "ConstructorExtraInfo::NoExtraInfo", - "loc": null, - "children": {} - } - } - } - } + "children": [] }, - "args": { - "kind": "Expr::Apply::ArgumentList", + "body": { + "kind": "Expr::Apply", "loc": null, - "children": [ - { - "kind": "Argument", + "children": { + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "value": { - "kind": "Expr::Constant", + "id": { + "kind": "Var", "loc": null, "children": { - "constant": { - "kind": "Constant::Int", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "value": "10" + "value": "div" } } } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} } } - } - ] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} - } - } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} - } - } - }, - { - "kind": "Argument", - "loc": null, - "children": { - "value": { - "kind": "Expr::Apply", - "loc": null, - "children": { - "func": { - "kind": "Expr::Constr", - "loc": null, - "children": { - "constr": { - "kind": "Constructor", + }, + "args": { + "kind": "Expr::Apply::ArgumentList", "loc": null, - "children": { - "name": { - "kind": "ConstrName", + "children": [ + { + "kind": "Argument", "loc": null, "children": { - "name": "Some" + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Some" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::NoExtraInfo", + "loc": null, + "children": {} + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "10" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } } }, - "extra_info": { - "kind": "ConstructorExtraInfo::NoExtraInfo", - "loc": null, - "children": {} - } - } - } - } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", - "loc": null, - "children": [ - { - "kind": "Argument", - "loc": null, - "children": { - "value": { - "kind": "Expr::Constant", + { + "kind": "Argument", "loc": null, "children": { - "constant": { - "kind": "Constant::Int", + "value": { + "kind": "Expr::Apply", "loc": null, "children": { - "value": "2" + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Some" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::NoExtraInfo", + "loc": null, + "children": {} + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "2" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} } - } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} } - ] + } }, - "attr": { - "kind": "ApplyAttr::NoAttr", + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", "loc": null, "children": {} - } + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } - ] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} + } } - } + ] }, - "kind": { - "kind": "TryOperatorKind::Question", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -3344,199 +3410,265 @@ "loc": null, "children": { "value": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", - "loc": null, - "children": { - "value": "div" - } - } + "value": "to_result" } } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", "loc": null, - "children": [ - { - "kind": "Argument", + "children": { + "value": { + "kind": "Expr::Function", "loc": null, "children": { - "value": { - "kind": "Expr::Apply", + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "func": { - "kind": "Expr::Constr", + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Apply", "loc": null, "children": { - "constr": { - "kind": "Constructor", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "name": { - "kind": "ConstrName", + "id": { + "kind": "Var", "loc": null, "children": { - "name": "Some" + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "div" + } + } } - }, - "extra_info": { - "kind": "ConstructorExtraInfo::NoExtraInfo", - "loc": null, - "children": {} } } - } - } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", - "loc": null, - "children": [ - { - "kind": "Argument", + }, + "args": { + "kind": "Expr::Apply::ArgumentList", "loc": null, - "children": { - "value": { - "kind": "Expr::Constant", + "children": [ + { + "kind": "Argument", "loc": null, "children": { - "constant": { - "kind": "Constant::Int", + "value": { + "kind": "Expr::Apply", "loc": null, "children": { - "value": "10" + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Some" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::NoExtraInfo", + "loc": null, + "children": {} + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "10" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } } }, - "kind": { - "kind": "ArgumentKind::Positional", + { + "kind": "Argument", "loc": null, - "children": {} + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Some" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::NoExtraInfo", + "loc": null, + "children": {} + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "0" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } } - } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} } - ] + } }, - "attr": { - "kind": "ApplyAttr::NoAttr", + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", "loc": null, "children": {} - } + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} } } }, - { - "kind": "Argument", + "kind": { + "kind": "ArgumentKind::Positional", "loc": null, - "children": { - "value": { - "kind": "Expr::Apply", - "loc": null, - "children": { - "func": { - "kind": "Expr::Constr", - "loc": null, - "children": { - "constr": { - "kind": "Constructor", - "loc": null, - "children": { - "name": { - "kind": "ConstrName", - "loc": null, - "children": { - "name": "Some" - } - }, - "extra_info": { - "kind": "ConstructorExtraInfo::NoExtraInfo", - "loc": null, - "children": {} - } - } - } - } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", - "loc": null, - "children": [ - { - "kind": "Argument", - "loc": null, - "children": { - "value": { - "kind": "Expr::Constant", - "loc": null, - "children": { - "constant": { - "kind": "Constant::Int", - "loc": null, - "children": { - "value": "0" - } - } - } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} - } - } - } - ] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} - } - } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} - } - } + "children": {} } - ] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} + } } - } + ] }, - "kind": { - "kind": "TryOperatorKind::Question", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -3590,158 +3722,224 @@ "loc": null, "children": { "value": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", - "loc": null, - "children": { - "value": "div" - } - } + "value": "to_result" } } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", "loc": null, - "children": [ - { - "kind": "Argument", + "children": { + "value": { + "kind": "Expr::Function", "loc": null, "children": { - "value": { - "kind": "Expr::Apply", + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "func": { - "kind": "Expr::Constr", + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Apply", "loc": null, "children": { - "constr": { - "kind": "Constructor", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "name": { - "kind": "ConstrName", + "id": { + "kind": "Var", "loc": null, "children": { - "name": "Some" + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "div" + } + } } - }, - "extra_info": { - "kind": "ConstructorExtraInfo::NoExtraInfo", - "loc": null, - "children": {} } } - } - } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", - "loc": null, - "children": [ - { - "kind": "Argument", + }, + "args": { + "kind": "Expr::Apply::ArgumentList", "loc": null, - "children": { - "value": { - "kind": "Expr::Constant", + "children": [ + { + "kind": "Argument", "loc": null, "children": { - "constant": { - "kind": "Constant::Int", + "value": { + "kind": "Expr::Apply", "loc": null, "children": { - "value": "10" + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Some" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::NoExtraInfo", + "loc": null, + "children": {} + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "10" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } } }, - "kind": { - "kind": "ArgumentKind::Positional", + { + "kind": "Argument", "loc": null, - "children": {} + "children": { + "value": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "None" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::NoExtraInfo", + "loc": null, + "children": {} + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } } - } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} } - ] + } }, - "attr": { - "kind": "ApplyAttr::NoAttr", + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", "loc": null, "children": {} - } + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} } } }, - { - "kind": "Argument", + "kind": { + "kind": "ArgumentKind::Positional", "loc": null, - "children": { - "value": { - "kind": "Expr::Constr", - "loc": null, - "children": { - "constr": { - "kind": "Constructor", - "loc": null, - "children": { - "name": { - "kind": "ConstrName", - "loc": null, - "children": { - "name": "None" - } - }, - "extra_info": { - "kind": "ConstructorExtraInfo::NoExtraInfo", - "loc": null, - "children": {} - } - } - } - } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} - } - } + "children": {} } - ] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} + } } - } + ] }, - "kind": { - "kind": "TryOperatorKind::Question", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -3795,158 +3993,224 @@ "loc": null, "children": { "value": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", - "loc": null, - "children": { - "value": "div" - } - } + "value": "to_result" } } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", "loc": null, - "children": [ - { - "kind": "Argument", + "children": { + "value": { + "kind": "Expr::Function", "loc": null, "children": { - "value": { - "kind": "Expr::Constr", + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "constr": { - "kind": "Constructor", + "parameters": { + "kind": "Func::Lambda::ParameterList", "loc": null, - "children": { - "name": { - "kind": "ConstrName", - "loc": null, - "children": { - "name": "None" - } - }, - "extra_info": { - "kind": "ConstructorExtraInfo::NoExtraInfo", - "loc": null, - "children": {} - } - } - } - } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} - } - } - }, - { - "kind": "Argument", - "loc": null, - "children": { - "value": { - "kind": "Expr::Apply", - "loc": null, - "children": { - "func": { - "kind": "Expr::Constr", + "children": [] + }, + "body": { + "kind": "Expr::Apply", "loc": null, "children": { - "constr": { - "kind": "Constructor", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "name": { - "kind": "ConstrName", + "id": { + "kind": "Var", "loc": null, "children": { - "name": "Some" + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "div" + } + } } - }, - "extra_info": { - "kind": "ConstructorExtraInfo::NoExtraInfo", - "loc": null, - "children": {} } } - } - } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", - "loc": null, - "children": [ - { - "kind": "Argument", + }, + "args": { + "kind": "Expr::Apply::ArgumentList", "loc": null, - "children": { - "value": { - "kind": "Expr::Constant", + "children": [ + { + "kind": "Argument", "loc": null, "children": { - "constant": { - "kind": "Constant::Int", + "value": { + "kind": "Expr::Constr", "loc": null, "children": { - "value": "2" + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "None" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::NoExtraInfo", + "loc": null, + "children": {} + } + } + } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } } }, - "kind": { - "kind": "ArgumentKind::Positional", + { + "kind": "Argument", "loc": null, - "children": {} + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Some" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::NoExtraInfo", + "loc": null, + "children": {} + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "2" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } } - } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} } - ] + } }, - "attr": { - "kind": "ApplyAttr::NoAttr", + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", "loc": null, "children": {} - } + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } - ] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} + } } - } + ] }, - "kind": { - "kind": "TryOperatorKind::Question", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -4000,117 +4264,183 @@ "loc": null, "children": { "value": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", - "loc": null, - "children": { - "value": "div" - } - } + "value": "to_result" } } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", "loc": null, - "children": [ - { - "kind": "Argument", + "children": { + "value": { + "kind": "Expr::Function", "loc": null, "children": { - "value": { - "kind": "Expr::Constr", + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "constr": { - "kind": "Constructor", + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Apply", "loc": null, "children": { - "name": { - "kind": "ConstrName", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "name": "None" + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "div" + } + } + } + } } }, - "extra_info": { - "kind": "ConstructorExtraInfo::NoExtraInfo", - "loc": null, - "children": {} - } - } - } - } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} - } - } - }, - { - "kind": "Argument", - "loc": null, - "children": { - "value": { - "kind": "Expr::Constr", - "loc": null, - "children": { - "constr": { - "kind": "Constructor", - "loc": null, - "children": { - "name": { - "kind": "ConstrName", + "args": { + "kind": "Expr::Apply::ArgumentList", "loc": null, - "children": { - "name": "None" - } + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "None" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::NoExtraInfo", + "loc": null, + "children": {} + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "None" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::NoExtraInfo", + "loc": null, + "children": {} + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] }, - "extra_info": { - "kind": "ConstructorExtraInfo::NoExtraInfo", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } } - } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } - ] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} + } } - } + ] }, - "kind": { - "kind": "TryOperatorKind::Question", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -4628,7 +4958,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -4834,7 +5165,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -5040,7 +5372,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -5107,96 +5440,162 @@ "loc": null, "children": { "value": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", - "loc": null, - "children": { - "value": "get_data" - } - } + "value": "to_result" } } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", "loc": null, - "children": [ - { - "kind": "Argument", + "children": { + "value": { + "kind": "Expr::Function", "loc": null, "children": { - "value": { - "kind": "Expr::Map", + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "elems": { - "kind": "Expr::Map::ElemList", + "parameters": { + "kind": "Func::Lambda::ParameterList", "loc": null, - "children": [ - { - "kind": "MapExprElem", + "children": [] + }, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "key": { - "kind": "Constant::String", + "id": { + "kind": "Var", "loc": null, "children": { - "value": "data" + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "get_data" + } + } } - }, - "expr": { - "kind": "Expr::Constant", + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", "loc": null, "children": { - "constant": { - "kind": "Constant::String", + "value": { + "kind": "Expr::Map", "loc": null, "children": { - "value": "hello" + "elems": { + "kind": "Expr::Map::ElemList", + "loc": null, + "children": [ + { + "kind": "MapExprElem", + "loc": null, + "children": { + "key": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "data" + } + }, + "expr": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "hello" + } + } + } + } + } + } + ] + } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } } } - } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} } - ] - } - } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} + } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null + } } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } - ] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} + } } - } + ] }, - "kind": { - "kind": "TryOperatorKind::Question", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -5250,109 +5649,176 @@ "loc": null, "children": { "value": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", - "loc": null, - "children": { - "value": "get_data" - } - } + "value": "to_result" } } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", "loc": null, - "children": [ - { - "kind": "Argument", + "children": { + "value": { + "kind": "Expr::Function", "loc": null, "children": { - "value": { - "kind": "Expr::Array", + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "exprs": { - "kind": "Expr::Array::ExprList", + "parameters": { + "kind": "Func::Lambda::ParameterList", "loc": null, - "children": [ - { - "kind": "Expr::Constant", + "children": [] + }, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "constant": { - "kind": "Constant::Int", + "id": { + "kind": "Var", "loc": null, "children": { - "value": "1" + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "get_data" + } + } } } } }, - { - "kind": "Expr::Constant", + "args": { + "kind": "Expr::Apply::ArgumentList", "loc": null, - "children": { - "constant": { - "kind": "Constant::Int", + "children": [ + { + "kind": "Argument", "loc": null, "children": { - "value": "2" + "value": { + "kind": "Expr::Array", + "loc": null, + "children": { + "exprs": { + "kind": "Expr::Array::ExprList", + "loc": null, + "children": [ + { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "1" + } + } + } + }, + { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "2" + } + } + } + }, + { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "3" + } + } + } + } + ] + }, + "is_iter": false + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } } } - } + ] }, - { - "kind": "Expr::Constant", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, - "children": { - "constant": { - "kind": "Constant::Int", - "loc": null, - "children": { - "value": "3" - } - } - } + "children": {} } - ] - } + } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } - ] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} + } } - } + ] }, - "kind": { - "kind": "TryOperatorKind::Question", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -5406,101 +5872,167 @@ "loc": null, "children": { "value": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", - "loc": null, - "children": { - "value": "get_data" - } - } + "value": "to_result" } } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", "loc": null, - "children": [ - { - "kind": "Argument", + "children": { + "value": { + "kind": "Expr::Function", "loc": null, "children": { - "value": { - "kind": "Expr::Apply", + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "func": { - "kind": "Expr::Method", + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Apply", "loc": null, "children": { - "type_name": { - "kind": "TypeName", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "value": "Json" + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "get_data" + } + } } - }, - "is_object": false + } } }, - "method_name": { - "kind": "Label", + "args": { + "kind": "Expr::Apply::ArgumentList", "loc": null, - "children": { - "name": "null" - } + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Method", + "loc": null, + "children": { + "type_name": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Json" + } + }, + "is_object": false + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "null" + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} } } }, - "args": { - "kind": "Expr::Apply::ArgumentList", + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", "loc": null, - "children": [] + "children": {} }, - "attr": { - "kind": "ApplyAttr::NoAttr", + "kind": { + "kind": "FnKind::Arrow", "loc": null, "children": {} - } + }, + "has_error": null, + "is_async": null } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } - ] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} + } } - } + ] }, - "kind": { - "kind": "TryOperatorKind::Question", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -5554,71 +6086,137 @@ "loc": null, "children": { "value": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", - "loc": null, - "children": { - "value": "get_data" - } - } + "value": "to_result" } } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", "loc": null, - "children": [ - { - "kind": "Argument", + "children": { + "value": { + "kind": "Expr::Function", "loc": null, "children": { - "value": { - "kind": "Expr::Constant", + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "constant": { - "kind": "Constant::Bool", + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Apply", "loc": null, "children": { - "value": true - } - } - } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} - } - } - } - ] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "get_data" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Bool", + "loc": null, + "children": { + "value": true + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } } - } + ] }, - "kind": { - "kind": "TryOperatorKind::Question", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -5672,71 +6270,137 @@ "loc": null, "children": { "value": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", - "loc": null, - "children": { - "value": "get_data" - } - } + "value": "to_result" } } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", "loc": null, - "children": [ - { - "kind": "Argument", + "children": { + "value": { + "kind": "Expr::Function", "loc": null, "children": { - "value": { - "kind": "Expr::Constant", + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "constant": { - "kind": "Constant::Bool", + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Apply", "loc": null, "children": { - "value": false + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "get_data" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Bool", + "loc": null, + "children": { + "value": false + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } } - } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } - ] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} + } } - } + ] }, - "kind": { - "kind": "TryOperatorKind::Question", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -5790,71 +6454,137 @@ "loc": null, "children": { "value": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", - "loc": null, - "children": { - "value": "get_data" - } - } + "value": "to_result" } } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", "loc": null, - "children": [ - { - "kind": "Argument", + "children": { + "value": { + "kind": "Expr::Function", "loc": null, "children": { - "value": { - "kind": "Expr::Constant", + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "constant": { - "kind": "Constant::Int", + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Apply", "loc": null, "children": { - "value": "100" + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "get_data" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "100" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } } - } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } - ] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} + } } - } + ] }, - "kind": { - "kind": "TryOperatorKind::Question", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -5910,71 +6640,137 @@ "loc": null, "children": { "value": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", - "loc": null, - "children": { - "value": "get_data" - } - } + "value": "to_result" } } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", - "loc": null, - "children": [ - { - "kind": "Argument", - "loc": null, - "children": { - "value": { - "kind": "Expr::Constant", + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Function", + "loc": null, + "children": { + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "constant": { - "kind": "Constant::String", + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Apply", "loc": null, "children": { - "value": "string" + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "get_data" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "string" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } } - } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } - ] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} + } } - } + ] }, - "kind": { - "kind": "TryOperatorKind::Question", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -6001,5 +6797,524 @@ } } } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "to_result" + } + }, + "has_error": null, + "is_async": null, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "f" + } + }, + "ty": { + "kind": "Type::Arrow", + "loc": null, + "children": { + "args": { + "kind": "Type::Arrow::ArgList", + "loc": null, + "children": [] + }, + "res": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "T" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "err": { + "kind": "ErrorType::ErrorType", + "loc": null, + "children": { + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "E" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + "is_async": null + } + } + } + } + ] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [ + { + "kind": "TypeVarBinder", + "loc": null, + "children": { + "name": "T", + "constraints": { + "kind": "TypeVarBinder::TypeVarConstraintList", + "loc": null, + "children": [] + } + } + }, + { + "kind": "TypeVarBinder", + "loc": null, + "children": { + "name": "E", + "constraints": { + "kind": "TypeVarBinder::TypeVarConstraintList", + "loc": null, + "children": [ + { + "kind": "TypeVarConstraint", + "loc": null, + "children": { + "trait": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Error" + } + } + } + } + ] + } + } + } + ] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [ + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "T" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "E" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + ] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::Try", + "loc": null, + "children": { + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "f" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "catch": { + "kind": "Expr::Try::CaseList", + "loc": null, + "children": [ + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "err" + } + } + } + }, + "guard": null, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Err" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::TypeName", + "loc": null, + "children": { + "value": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + }, + "is_object": false + } + } + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "err" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + ] + }, + "catch_all": false, + "try_else": { + "kind": "Expr::Try::CaseList", + "loc": null, + "children": [ + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "value" + } + } + } + }, + "guard": null, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Ok" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::TypeName", + "loc": null, + "children": { + "value": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + }, + "is_object": false + } + } + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "value" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + ] + }, + "has_try": true + } + } + } + } + } } ] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/pipeline_test_guard.mbt b/test/sync_test/__snapshot__/pipeline_test_guard.mbt index 4a594221..bd939d1d 100644 --- a/test/sync_test/__snapshot__/pipeline_test_guard.mbt +++ b/test/sync_test/__snapshot__/pipeline_test_guard.mbt @@ -48,11 +48,11 @@ fn get_data(x : Json) -> String raise InvalidJson { } fn init { - debug(try? div(Some(10), Some(2))) - debug(try? div(Some(10), Some(0))) - debug(try? div(Some(10), None)) - debug(try? div(None, Some(2))) - debug(try? div(None, None)) + debug(to_result(() => div(Some(10), Some(2)))) + debug(to_result(() => div(Some(10), Some(0)))) + debug(to_result(() => div(Some(10), None))) + debug(to_result(() => div(None, Some(2)))) + debug(to_result(() => div(None, None))) println(default_value(Some(10), 5)) println(default_value(None, 5)) @@ -61,14 +61,22 @@ fn init { println(local_control_flow(1, 10, [0,0,20,20])) println(local_control_flow(1, 10, [7,7,7,7])) - debug(try? get_data({"data": "hello"})) - debug(try? get_data([1,2,3])) - debug(try? get_data(Json::null())) - debug(try? get_data(true)) - debug(try? get_data(false)) - debug(try? get_data(100)) - debug(try? get_data("string")) + debug(to_result(() => get_data({"data": "hello"}))) + debug(to_result(() => get_data([1,2,3]))) + debug(to_result(() => get_data(Json::null()))) + debug(to_result(() => get_data(true))) + debug(to_result(() => get_data(false))) + debug(to_result(() => get_data(100))) + debug(to_result(() => get_data("string"))) } +fn[T, E : Error] to_result(f : () -> T raise E) -> Result[T, E] { + try f() + catch { + err => Result::Err(err) + } noraise { + value => Result::Ok(value) + } +} diff --git a/test/sync_test/__snapshot__/pipeline_test_guard.mbt.tokens.json b/test/sync_test/__snapshot__/pipeline_test_guard.mbt.tokens.json index 1ce96420..723fe8cf 100644 --- a/test/sync_test/__snapshot__/pipeline_test_guard.mbt.tokens.json +++ b/test/sync_test/__snapshot__/pipeline_test_guard.mbt.tokens.json @@ -1811,86 +1811,109 @@ "loc": "51:8-51:9" }, { - "token": "TRY_QUESTION", - "loc": "51:9-51:13" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "51:9-51:18" + }, + { + "token": "LPAREN", + "loc": "51:18-51:19" + }, + { + "token": "LPAREN", + "loc": "51:19-51:20" + }, + { + "token": "RPAREN", + "loc": "51:20-51:21" + }, + { + "token": "FAT_ARROW", + "loc": "51:22-51:24" }, { "token": [ "LIDENT", "div" ], - "loc": "51:14-51:17" + "loc": "51:25-51:28" }, { "token": "LPAREN", - "loc": "51:17-51:18" + "loc": "51:28-51:29" }, { "token": [ "UIDENT", "Some" ], - "loc": "51:18-51:22" + "loc": "51:29-51:33" }, { "token": "LPAREN", - "loc": "51:22-51:23" + "loc": "51:33-51:34" }, { "token": [ "INT", "10" ], - "loc": "51:23-51:25" + "loc": "51:34-51:36" }, { "token": "RPAREN", - "loc": "51:25-51:26" + "loc": "51:36-51:37" }, { "token": "COMMA", - "loc": "51:26-51:27" + "loc": "51:37-51:38" }, { "token": [ "UIDENT", "Some" ], - "loc": "51:28-51:32" + "loc": "51:39-51:43" }, { "token": "LPAREN", - "loc": "51:32-51:33" + "loc": "51:43-51:44" }, { "token": [ "INT", "2" ], - "loc": "51:33-51:34" + "loc": "51:44-51:45" }, { "token": "RPAREN", - "loc": "51:34-51:35" + "loc": "51:45-51:46" }, { "token": "RPAREN", - "loc": "51:35-51:36" + "loc": "51:46-51:47" }, { "token": "RPAREN", - "loc": "51:36-51:37" + "loc": "51:47-51:48" + }, + { + "token": "RPAREN", + "loc": "51:48-51:49" }, { "token": [ "SEMI", false ], - "loc": "51:37-51:37" + "loc": "51:49-51:49" }, { "token": "NEWLINE", - "loc": "51:37-51:38" + "loc": "51:49-51:50" }, { "token": [ @@ -1904,86 +1927,109 @@ "loc": "52:8-52:9" }, { - "token": "TRY_QUESTION", - "loc": "52:9-52:13" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "52:9-52:18" + }, + { + "token": "LPAREN", + "loc": "52:18-52:19" + }, + { + "token": "LPAREN", + "loc": "52:19-52:20" + }, + { + "token": "RPAREN", + "loc": "52:20-52:21" + }, + { + "token": "FAT_ARROW", + "loc": "52:22-52:24" }, { "token": [ "LIDENT", "div" ], - "loc": "52:14-52:17" + "loc": "52:25-52:28" }, { "token": "LPAREN", - "loc": "52:17-52:18" + "loc": "52:28-52:29" }, { "token": [ "UIDENT", "Some" ], - "loc": "52:18-52:22" + "loc": "52:29-52:33" }, { "token": "LPAREN", - "loc": "52:22-52:23" + "loc": "52:33-52:34" }, { "token": [ "INT", "10" ], - "loc": "52:23-52:25" + "loc": "52:34-52:36" }, { "token": "RPAREN", - "loc": "52:25-52:26" + "loc": "52:36-52:37" }, { "token": "COMMA", - "loc": "52:26-52:27" + "loc": "52:37-52:38" }, { "token": [ "UIDENT", "Some" ], - "loc": "52:28-52:32" + "loc": "52:39-52:43" }, { "token": "LPAREN", - "loc": "52:32-52:33" + "loc": "52:43-52:44" }, { "token": [ "INT", "0" ], - "loc": "52:33-52:34" + "loc": "52:44-52:45" }, { "token": "RPAREN", - "loc": "52:34-52:35" + "loc": "52:45-52:46" }, { "token": "RPAREN", - "loc": "52:35-52:36" + "loc": "52:46-52:47" }, { "token": "RPAREN", - "loc": "52:36-52:37" + "loc": "52:47-52:48" + }, + { + "token": "RPAREN", + "loc": "52:48-52:49" }, { "token": [ "SEMI", false ], - "loc": "52:37-52:37" + "loc": "52:49-52:49" }, { "token": "NEWLINE", - "loc": "52:37-52:38" + "loc": "52:49-52:50" }, { "token": [ @@ -1997,71 +2043,94 @@ "loc": "53:8-53:9" }, { - "token": "TRY_QUESTION", - "loc": "53:9-53:13" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "53:9-53:18" + }, + { + "token": "LPAREN", + "loc": "53:18-53:19" + }, + { + "token": "LPAREN", + "loc": "53:19-53:20" + }, + { + "token": "RPAREN", + "loc": "53:20-53:21" + }, + { + "token": "FAT_ARROW", + "loc": "53:22-53:24" }, { "token": [ "LIDENT", "div" ], - "loc": "53:14-53:17" + "loc": "53:25-53:28" }, { "token": "LPAREN", - "loc": "53:17-53:18" + "loc": "53:28-53:29" }, { "token": [ "UIDENT", "Some" ], - "loc": "53:18-53:22" + "loc": "53:29-53:33" }, { "token": "LPAREN", - "loc": "53:22-53:23" + "loc": "53:33-53:34" }, { "token": [ "INT", "10" ], - "loc": "53:23-53:25" + "loc": "53:34-53:36" }, { "token": "RPAREN", - "loc": "53:25-53:26" + "loc": "53:36-53:37" }, { "token": "COMMA", - "loc": "53:26-53:27" + "loc": "53:37-53:38" }, { "token": [ "UIDENT", "None" ], - "loc": "53:28-53:32" + "loc": "53:39-53:43" }, { "token": "RPAREN", - "loc": "53:32-53:33" + "loc": "53:43-53:44" }, { "token": "RPAREN", - "loc": "53:33-53:34" + "loc": "53:44-53:45" + }, + { + "token": "RPAREN", + "loc": "53:45-53:46" }, { "token": [ "SEMI", false ], - "loc": "53:34-53:34" + "loc": "53:46-53:46" }, { "token": "NEWLINE", - "loc": "53:34-53:35" + "loc": "53:46-53:47" }, { "token": [ @@ -2075,71 +2144,94 @@ "loc": "54:8-54:9" }, { - "token": "TRY_QUESTION", - "loc": "54:9-54:13" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "54:9-54:18" + }, + { + "token": "LPAREN", + "loc": "54:18-54:19" + }, + { + "token": "LPAREN", + "loc": "54:19-54:20" + }, + { + "token": "RPAREN", + "loc": "54:20-54:21" + }, + { + "token": "FAT_ARROW", + "loc": "54:22-54:24" }, { "token": [ "LIDENT", "div" ], - "loc": "54:14-54:17" + "loc": "54:25-54:28" }, { "token": "LPAREN", - "loc": "54:17-54:18" + "loc": "54:28-54:29" }, { "token": [ "UIDENT", "None" ], - "loc": "54:18-54:22" + "loc": "54:29-54:33" }, { "token": "COMMA", - "loc": "54:22-54:23" + "loc": "54:33-54:34" }, { "token": [ "UIDENT", "Some" ], - "loc": "54:24-54:28" + "loc": "54:35-54:39" }, { "token": "LPAREN", - "loc": "54:28-54:29" + "loc": "54:39-54:40" }, { "token": [ "INT", "2" ], - "loc": "54:29-54:30" + "loc": "54:40-54:41" + }, + { + "token": "RPAREN", + "loc": "54:41-54:42" }, { "token": "RPAREN", - "loc": "54:30-54:31" + "loc": "54:42-54:43" }, { "token": "RPAREN", - "loc": "54:31-54:32" + "loc": "54:43-54:44" }, { "token": "RPAREN", - "loc": "54:32-54:33" + "loc": "54:44-54:45" }, { "token": [ "SEMI", false ], - "loc": "54:33-54:33" + "loc": "54:45-54:45" }, { "token": "NEWLINE", - "loc": "54:33-54:34" + "loc": "54:45-54:46" }, { "token": [ @@ -2153,56 +2245,79 @@ "loc": "55:8-55:9" }, { - "token": "TRY_QUESTION", - "loc": "55:9-55:13" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "55:9-55:18" + }, + { + "token": "LPAREN", + "loc": "55:18-55:19" + }, + { + "token": "LPAREN", + "loc": "55:19-55:20" + }, + { + "token": "RPAREN", + "loc": "55:20-55:21" + }, + { + "token": "FAT_ARROW", + "loc": "55:22-55:24" }, { "token": [ "LIDENT", "div" ], - "loc": "55:14-55:17" + "loc": "55:25-55:28" }, { "token": "LPAREN", - "loc": "55:17-55:18" + "loc": "55:28-55:29" }, { "token": [ "UIDENT", "None" ], - "loc": "55:18-55:22" + "loc": "55:29-55:33" }, { "token": "COMMA", - "loc": "55:22-55:23" + "loc": "55:33-55:34" }, { "token": [ "UIDENT", "None" ], - "loc": "55:24-55:28" + "loc": "55:35-55:39" }, { "token": "RPAREN", - "loc": "55:28-55:29" + "loc": "55:39-55:40" }, { "token": "RPAREN", - "loc": "55:29-55:30" + "loc": "55:40-55:41" + }, + { + "token": "RPAREN", + "loc": "55:41-55:42" }, { "token": [ "SEMI", false ], - "loc": "55:30-55:30" + "loc": "55:42-55:42" }, { "token": "NEWLINE", - "loc": "55:30-55:31" + "loc": "55:42-55:43" }, { "token": "NEWLINE", @@ -2694,64 +2809,87 @@ "loc": "64:8-64:9" }, { - "token": "TRY_QUESTION", - "loc": "64:9-64:13" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "64:9-64:18" + }, + { + "token": "LPAREN", + "loc": "64:18-64:19" + }, + { + "token": "LPAREN", + "loc": "64:19-64:20" + }, + { + "token": "RPAREN", + "loc": "64:20-64:21" + }, + { + "token": "FAT_ARROW", + "loc": "64:22-64:24" }, { "token": [ "LIDENT", "get_data" ], - "loc": "64:14-64:22" + "loc": "64:25-64:33" }, { "token": "LPAREN", - "loc": "64:22-64:23" + "loc": "64:33-64:34" }, { "token": "LBRACE", - "loc": "64:23-64:24" + "loc": "64:34-64:35" }, { "token": [ "STRING", "data" ], - "loc": "64:24-64:30" + "loc": "64:35-64:41" }, { "token": "COLON", - "loc": "64:30-64:31" + "loc": "64:41-64:42" }, { "token": [ "STRING", "hello" ], - "loc": "64:32-64:39" + "loc": "64:43-64:50" }, { "token": "RBRACE", - "loc": "64:39-64:40" + "loc": "64:50-64:51" }, { "token": "RPAREN", - "loc": "64:40-64:41" + "loc": "64:51-64:52" }, { "token": "RPAREN", - "loc": "64:41-64:42" + "loc": "64:52-64:53" + }, + { + "token": "RPAREN", + "loc": "64:53-64:54" }, { "token": [ "SEMI", false ], - "loc": "64:42-64:42" + "loc": "64:54-64:54" }, { "token": "NEWLINE", - "loc": "64:42-64:43" + "loc": "64:54-64:55" }, { "token": [ @@ -2765,75 +2903,98 @@ "loc": "65:8-65:9" }, { - "token": "TRY_QUESTION", - "loc": "65:9-65:13" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "65:9-65:18" + }, + { + "token": "LPAREN", + "loc": "65:18-65:19" + }, + { + "token": "LPAREN", + "loc": "65:19-65:20" + }, + { + "token": "RPAREN", + "loc": "65:20-65:21" + }, + { + "token": "FAT_ARROW", + "loc": "65:22-65:24" }, { "token": [ "LIDENT", "get_data" ], - "loc": "65:14-65:22" + "loc": "65:25-65:33" }, { "token": "LPAREN", - "loc": "65:22-65:23" + "loc": "65:33-65:34" }, { "token": "LBRACKET", - "loc": "65:23-65:24" + "loc": "65:34-65:35" }, { "token": [ "INT", "1" ], - "loc": "65:24-65:25" + "loc": "65:35-65:36" }, { "token": "COMMA", - "loc": "65:25-65:26" + "loc": "65:36-65:37" }, { "token": [ "INT", "2" ], - "loc": "65:26-65:27" + "loc": "65:37-65:38" }, { "token": "COMMA", - "loc": "65:27-65:28" + "loc": "65:38-65:39" }, { "token": [ "INT", "3" ], - "loc": "65:28-65:29" + "loc": "65:39-65:40" }, { "token": "RBRACKET", - "loc": "65:29-65:30" + "loc": "65:40-65:41" + }, + { + "token": "RPAREN", + "loc": "65:41-65:42" }, { "token": "RPAREN", - "loc": "65:30-65:31" + "loc": "65:42-65:43" }, { "token": "RPAREN", - "loc": "65:31-65:32" + "loc": "65:43-65:44" }, { "token": [ "SEMI", false ], - "loc": "65:32-65:32" + "loc": "65:44-65:44" }, { "token": "NEWLINE", - "loc": "65:32-65:33" + "loc": "65:44-65:45" }, { "token": [ @@ -2847,64 +3008,87 @@ "loc": "66:8-66:9" }, { - "token": "TRY_QUESTION", - "loc": "66:9-66:13" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "66:9-66:18" + }, + { + "token": "LPAREN", + "loc": "66:18-66:19" + }, + { + "token": "LPAREN", + "loc": "66:19-66:20" + }, + { + "token": "RPAREN", + "loc": "66:20-66:21" + }, + { + "token": "FAT_ARROW", + "loc": "66:22-66:24" }, { "token": [ "LIDENT", "get_data" ], - "loc": "66:14-66:22" + "loc": "66:25-66:33" }, { "token": "LPAREN", - "loc": "66:22-66:23" + "loc": "66:33-66:34" }, { "token": [ "UIDENT", "Json" ], - "loc": "66:23-66:27" + "loc": "66:34-66:38" }, { "token": "COLONCOLON", - "loc": "66:27-66:29" + "loc": "66:38-66:40" }, { "token": [ "LIDENT", "null" ], - "loc": "66:29-66:33" + "loc": "66:40-66:44" }, { "token": "LPAREN", - "loc": "66:33-66:34" + "loc": "66:44-66:45" }, { "token": "RPAREN", - "loc": "66:34-66:35" + "loc": "66:45-66:46" }, { "token": "RPAREN", - "loc": "66:35-66:36" + "loc": "66:46-66:47" }, { "token": "RPAREN", - "loc": "66:36-66:37" + "loc": "66:47-66:48" + }, + { + "token": "RPAREN", + "loc": "66:48-66:49" }, { "token": [ "SEMI", false ], - "loc": "66:37-66:37" + "loc": "66:49-66:49" }, { "token": "NEWLINE", - "loc": "66:37-66:38" + "loc": "66:49-66:50" }, { "token": [ @@ -2918,42 +3102,65 @@ "loc": "67:8-67:9" }, { - "token": "TRY_QUESTION", - "loc": "67:9-67:13" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "67:9-67:18" + }, + { + "token": "LPAREN", + "loc": "67:18-67:19" + }, + { + "token": "LPAREN", + "loc": "67:19-67:20" + }, + { + "token": "RPAREN", + "loc": "67:20-67:21" + }, + { + "token": "FAT_ARROW", + "loc": "67:22-67:24" }, { "token": [ "LIDENT", "get_data" ], - "loc": "67:14-67:22" + "loc": "67:25-67:33" }, { "token": "LPAREN", - "loc": "67:22-67:23" + "loc": "67:33-67:34" }, { "token": "TRUE", - "loc": "67:23-67:27" + "loc": "67:34-67:38" }, { "token": "RPAREN", - "loc": "67:27-67:28" + "loc": "67:38-67:39" }, { "token": "RPAREN", - "loc": "67:28-67:29" + "loc": "67:39-67:40" + }, + { + "token": "RPAREN", + "loc": "67:40-67:41" }, { "token": [ "SEMI", false ], - "loc": "67:29-67:29" + "loc": "67:41-67:41" }, { "token": "NEWLINE", - "loc": "67:29-67:30" + "loc": "67:41-67:42" }, { "token": [ @@ -2967,42 +3174,65 @@ "loc": "68:8-68:9" }, { - "token": "TRY_QUESTION", - "loc": "68:9-68:13" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "68:9-68:18" + }, + { + "token": "LPAREN", + "loc": "68:18-68:19" + }, + { + "token": "LPAREN", + "loc": "68:19-68:20" + }, + { + "token": "RPAREN", + "loc": "68:20-68:21" + }, + { + "token": "FAT_ARROW", + "loc": "68:22-68:24" }, { "token": [ "LIDENT", "get_data" ], - "loc": "68:14-68:22" + "loc": "68:25-68:33" }, { "token": "LPAREN", - "loc": "68:22-68:23" + "loc": "68:33-68:34" }, { "token": "FALSE", - "loc": "68:23-68:28" + "loc": "68:34-68:39" }, { "token": "RPAREN", - "loc": "68:28-68:29" + "loc": "68:39-68:40" }, { "token": "RPAREN", - "loc": "68:29-68:30" + "loc": "68:40-68:41" + }, + { + "token": "RPAREN", + "loc": "68:41-68:42" }, { "token": [ "SEMI", false ], - "loc": "68:30-68:30" + "loc": "68:42-68:42" }, { "token": "NEWLINE", - "loc": "68:30-68:31" + "loc": "68:42-68:43" }, { "token": [ @@ -3016,45 +3246,68 @@ "loc": "69:8-69:9" }, { - "token": "TRY_QUESTION", - "loc": "69:9-69:13" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "69:9-69:18" + }, + { + "token": "LPAREN", + "loc": "69:18-69:19" + }, + { + "token": "LPAREN", + "loc": "69:19-69:20" + }, + { + "token": "RPAREN", + "loc": "69:20-69:21" + }, + { + "token": "FAT_ARROW", + "loc": "69:22-69:24" }, { "token": [ "LIDENT", "get_data" ], - "loc": "69:14-69:22" + "loc": "69:25-69:33" }, { "token": "LPAREN", - "loc": "69:22-69:23" + "loc": "69:33-69:34" }, { "token": [ "INT", "100" ], - "loc": "69:23-69:26" + "loc": "69:34-69:37" }, { "token": "RPAREN", - "loc": "69:26-69:27" + "loc": "69:37-69:38" }, { "token": "RPAREN", - "loc": "69:27-69:28" + "loc": "69:38-69:39" + }, + { + "token": "RPAREN", + "loc": "69:39-69:40" }, { "token": [ "SEMI", false ], - "loc": "69:28-69:28" + "loc": "69:40-69:40" }, { "token": "NEWLINE", - "loc": "69:28-69:29" + "loc": "69:40-69:41" }, { "token": [ @@ -3068,38 +3321,61 @@ "loc": "70:8-70:9" }, { - "token": "TRY_QUESTION", - "loc": "70:9-70:13" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "70:9-70:18" + }, + { + "token": "LPAREN", + "loc": "70:18-70:19" + }, + { + "token": "LPAREN", + "loc": "70:19-70:20" + }, + { + "token": "RPAREN", + "loc": "70:20-70:21" + }, + { + "token": "FAT_ARROW", + "loc": "70:22-70:24" }, { "token": [ "LIDENT", "get_data" ], - "loc": "70:14-70:22" + "loc": "70:25-70:33" }, { "token": "LPAREN", - "loc": "70:22-70:23" + "loc": "70:33-70:34" }, { "token": [ "STRING", "string" ], - "loc": "70:23-70:31" + "loc": "70:34-70:42" + }, + { + "token": "RPAREN", + "loc": "70:42-70:43" }, { "token": "RPAREN", - "loc": "70:31-70:32" + "loc": "70:43-70:44" }, { "token": "RPAREN", - "loc": "70:32-70:33" + "loc": "70:44-70:45" }, { "token": "NEWLINE", - "loc": "70:33-70:34" + "loc": "70:45-70:46" }, { "token": "NEWLINE", @@ -3128,8 +3404,320 @@ "token": "NEWLINE", "loc": "74:1-74:2" }, + { + "token": "FN", + "loc": "75:1-75:3" + }, + { + "token": "LBRACKET", + "loc": "75:3-75:4" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "75:4-75:5" + }, + { + "token": "COMMA", + "loc": "75:5-75:6" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "75:7-75:8" + }, + { + "token": "COLON", + "loc": "75:9-75:10" + }, + { + "token": [ + "UIDENT", + "Error" + ], + "loc": "75:11-75:16" + }, + { + "token": "RBRACKET", + "loc": "75:16-75:17" + }, + { + "token": [ + "LIDENT", + "to_result" + ], + "loc": "75:18-75:27" + }, + { + "token": "LPAREN", + "loc": "75:27-75:28" + }, + { + "token": [ + "LIDENT", + "f" + ], + "loc": "75:28-75:29" + }, + { + "token": "COLON", + "loc": "75:30-75:31" + }, + { + "token": "LPAREN", + "loc": "75:32-75:33" + }, + { + "token": "RPAREN", + "loc": "75:33-75:34" + }, + { + "token": "THIN_ARROW", + "loc": "75:35-75:37" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "75:38-75:39" + }, + { + "token": "RAISE", + "loc": "75:40-75:45" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "75:46-75:47" + }, + { + "token": "RPAREN", + "loc": "75:47-75:48" + }, + { + "token": "THIN_ARROW", + "loc": "75:49-75:51" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "75:52-75:58" + }, + { + "token": "LBRACKET", + "loc": "75:58-75:59" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "75:59-75:60" + }, + { + "token": "COMMA", + "loc": "75:60-75:61" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "75:62-75:63" + }, + { + "token": "RBRACKET", + "loc": "75:63-75:64" + }, + { + "token": "LBRACE", + "loc": "75:65-75:66" + }, + { + "token": "NEWLINE", + "loc": "75:66-75:67" + }, + { + "token": "TRY", + "loc": "76:3-76:6" + }, + { + "token": [ + "LIDENT", + "f" + ], + "loc": "76:7-76:8" + }, + { + "token": "LPAREN", + "loc": "76:8-76:9" + }, + { + "token": "RPAREN", + "loc": "76:9-76:10" + }, + { + "token": "NEWLINE", + "loc": "76:10-76:11" + }, + { + "token": "CATCH", + "loc": "77:3-77:8" + }, + { + "token": "LBRACE", + "loc": "77:9-77:10" + }, + { + "token": "NEWLINE", + "loc": "77:10-77:11" + }, + { + "token": [ + "LIDENT", + "err" + ], + "loc": "78:5-78:8" + }, + { + "token": "FAT_ARROW", + "loc": "78:9-78:11" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "78:12-78:18" + }, + { + "token": "COLONCOLON", + "loc": "78:18-78:20" + }, + { + "token": [ + "UIDENT", + "Err" + ], + "loc": "78:20-78:23" + }, + { + "token": "LPAREN", + "loc": "78:23-78:24" + }, + { + "token": [ + "LIDENT", + "err" + ], + "loc": "78:24-78:27" + }, + { + "token": "RPAREN", + "loc": "78:27-78:28" + }, + { + "token": "NEWLINE", + "loc": "78:28-78:29" + }, + { + "token": "RBRACE", + "loc": "79:3-79:4" + }, + { + "token": "NORAISE", + "loc": "79:5-79:12" + }, + { + "token": "LBRACE", + "loc": "79:13-79:14" + }, + { + "token": "NEWLINE", + "loc": "79:14-79:15" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "80:5-80:10" + }, + { + "token": "FAT_ARROW", + "loc": "80:11-80:13" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "80:14-80:20" + }, + { + "token": "COLONCOLON", + "loc": "80:20-80:22" + }, + { + "token": [ + "UIDENT", + "Ok" + ], + "loc": "80:22-80:24" + }, + { + "token": "LPAREN", + "loc": "80:24-80:25" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "80:25-80:30" + }, + { + "token": "RPAREN", + "loc": "80:30-80:31" + }, + { + "token": "NEWLINE", + "loc": "80:31-80:32" + }, + { + "token": "RBRACE", + "loc": "81:3-81:4" + }, + { + "token": "NEWLINE", + "loc": "81:4-81:5" + }, + { + "token": "RBRACE", + "loc": "82:1-82:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "82:2-82:2" + }, + { + "token": "NEWLINE", + "loc": "82:2-82:3" + }, { "token": "EOF", - "loc": "75:1-75:1" + "loc": "83:1-83:1" } ] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/pipeline_test_guard_is.json b/test/sync_test/__snapshot__/pipeline_test_guard_is.json index 509fbb12..bc4e0ca2 100644 --- a/test/sync_test/__snapshot__/pipeline_test_guard_is.json +++ b/test/sync_test/__snapshot__/pipeline_test_guard_is.json @@ -977,7 +977,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -1122,7 +1123,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { diff --git a/test/sync_test/__snapshot__/pipeline_test_id.json b/test/sync_test/__snapshot__/pipeline_test_id.json index cfa28efe..25609e9d 100644 --- a/test/sync_test/__snapshot__/pipeline_test_id.json +++ b/test/sync_test/__snapshot__/pipeline_test_id.json @@ -434,7 +434,8 @@ } } ] - } + }, + "is_iter": false } }, "ty": { diff --git a/test/sync_test/__snapshot__/pipeline_test_if_branches_as.json b/test/sync_test/__snapshot__/pipeline_test_if_branches_as.json index cde47fe5..f69a9fde 100644 --- a/test/sync_test/__snapshot__/pipeline_test_if_branches_as.json +++ b/test/sync_test/__snapshot__/pipeline_test_if_branches_as.json @@ -991,6 +991,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, @@ -1245,6 +1250,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, @@ -1650,6 +1660,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, @@ -1901,6 +1916,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, diff --git a/test/sync_test/__snapshot__/pipeline_test_if_with_no_else_in_spread.json b/test/sync_test/__snapshot__/pipeline_test_if_with_no_else_in_spread.json new file mode 100644 index 00000000..c9c62822 --- /dev/null +++ b/test/sync_test/__snapshot__/pipeline_test_if_with_no_else_in_spread.json @@ -0,0 +1,1421 @@ +[ + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "array" + } + }, + "has_error": null, + "is_async": null, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "it" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Iter" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [ + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Int" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + ] + } + } + } + } + }, + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "cond" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Bool" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + } + ] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Array" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [ + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Int" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + ] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::ArraySpread", + "loc": null, + "children": { + "elems": { + "kind": "Expr::ArraySpread::ElemList", + "loc": null, + "children": [ + { + "kind": "SpreadableElem::Regular", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "0" + } + } + } + } + } + }, + { + "kind": "SpreadableElem::Spread", + "loc": null, + "children": { + "expr": { + "kind": "Expr::If", + "loc": null, + "children": { + "cond": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "cond" + } + } + } + } + } + }, + "ifso": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "it" + } + } + } + } + } + }, + "ifnot": null + } + } + } + }, + { + "kind": "SpreadableElem::Regular", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "42" + } + } + } + } + } + } + ] + }, + "is_iter": false + } + } + } + } + } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "iter" + } + }, + "has_error": null, + "is_async": null, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "it" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Iter" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [ + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Int" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + ] + } + } + } + } + }, + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "cond" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Bool" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + } + ] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Iter" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [ + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Int" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + ] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::ArraySpread", + "loc": null, + "children": { + "elems": { + "kind": "Expr::ArraySpread::ElemList", + "loc": null, + "children": [ + { + "kind": "SpreadableElem::Regular", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "0" + } + } + } + } + } + }, + { + "kind": "SpreadableElem::Spread", + "loc": null, + "children": { + "expr": { + "kind": "Expr::If", + "loc": null, + "children": { + "cond": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "cond" + } + } + } + } + } + }, + "ifso": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "it" + } + } + } + } + } + }, + "ifnot": null + } + } + } + }, + { + "kind": "SpreadableElem::Regular", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "42" + } + } + } + } + } + } + ] + }, + "is_iter": true + } + } + } + } + } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "main" + } + }, + "has_error": null, + "is_async": null, + "decl_params": null, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [] + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::Sequence", + "loc": null, + "children": { + "exprs": { + "kind": "Expr::Sequence::ExprList", + "loc": null, + "children": [ + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "debug" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "array" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Array", + "loc": null, + "children": { + "exprs": { + "kind": "Expr::Array::ExprList", + "loc": null, + "children": [ + { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "1" + } + } + } + }, + { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "2" + } + } + } + }, + { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "3" + } + } + } + } + ] + }, + "is_iter": true + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Bool", + "loc": null, + "children": { + "value": true + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "debug" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "array" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Array", + "loc": null, + "children": { + "exprs": { + "kind": "Expr::Array::ExprList", + "loc": null, + "children": [ + { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "1" + } + } + } + }, + { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "2" + } + } + } + }, + { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "3" + } + } + } + } + ] + }, + "is_iter": true + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Bool", + "loc": null, + "children": { + "value": false + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "debug" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "iter" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Array", + "loc": null, + "children": { + "exprs": { + "kind": "Expr::Array::ExprList", + "loc": null, + "children": [ + { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "1" + } + } + } + }, + { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "2" + } + } + } + }, + { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "3" + } + } + } + } + ] + }, + "is_iter": true + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Bool", + "loc": null, + "children": { + "value": true + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "collect" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + ] + }, + "last_expr": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "debug" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "iter" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Array", + "loc": null, + "children": { + "exprs": { + "kind": "Expr::Array::ExprList", + "loc": null, + "children": [ + { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "1" + } + } + } + }, + { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "2" + } + } + } + }, + { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "3" + } + } + } + } + ] + }, + "is_iter": true + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Bool", + "loc": null, + "children": { + "value": false + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "collect" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + } + } + } + } +] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/pipeline_test_if_with_no_else_in_spread.mbt b/test/sync_test/__snapshot__/pipeline_test_if_with_no_else_in_spread.mbt new file mode 100644 index 00000000..4b85efb0 --- /dev/null +++ b/test/sync_test/__snapshot__/pipeline_test_if_with_no_else_in_spread.mbt @@ -0,0 +1,17 @@ +///| +fn array(it : Iter[Int], cond : Bool) -> Array[Int] { + [ 0, ..if cond { it }, 42 ] +} + +///| +fn iter(it : Iter[Int], cond : Bool) -> Iter[Int] { + [| 0, ..if cond { it }, 42 |] +} + +///| +fn main { + debug(array([| 1, 2, 3 |], true)) + debug(array([| 1, 2, 3 |], false)) + debug(iter([| 1, 2, 3 |], true).collect()) + debug(iter([| 1, 2, 3 |], false).collect()) +} diff --git a/test/sync_test/__snapshot__/pipeline_test_if_with_no_else_in_spread.mbt.tokens.json b/test/sync_test/__snapshot__/pipeline_test_if_with_no_else_in_spread.mbt.tokens.json new file mode 100644 index 00000000..315809ee --- /dev/null +++ b/test/sync_test/__snapshot__/pipeline_test_if_with_no_else_in_spread.mbt.tokens.json @@ -0,0 +1,852 @@ +[ + { + "token": [ + "COMMENT", + { + "content": "///|", + "kind": [ + "Ownline", + { + "leading_blank_line": false, + "trailing_blank_line": false + } + ], + "consumed_by_docstring": false + } + ], + "loc": "1:1-1:5" + }, + { + "token": "NEWLINE", + "loc": "1:5-1:6" + }, + { + "token": "FN", + "loc": "2:1-2:3" + }, + { + "token": [ + "LIDENT", + "array" + ], + "loc": "2:4-2:9" + }, + { + "token": "LPAREN", + "loc": "2:9-2:10" + }, + { + "token": [ + "LIDENT", + "it" + ], + "loc": "2:10-2:12" + }, + { + "token": "COLON", + "loc": "2:13-2:14" + }, + { + "token": [ + "UIDENT", + "Iter" + ], + "loc": "2:15-2:19" + }, + { + "token": "LBRACKET", + "loc": "2:19-2:20" + }, + { + "token": [ + "UIDENT", + "Int" + ], + "loc": "2:20-2:23" + }, + { + "token": "RBRACKET", + "loc": "2:23-2:24" + }, + { + "token": "COMMA", + "loc": "2:24-2:25" + }, + { + "token": [ + "LIDENT", + "cond" + ], + "loc": "2:26-2:30" + }, + { + "token": "COLON", + "loc": "2:31-2:32" + }, + { + "token": [ + "UIDENT", + "Bool" + ], + "loc": "2:33-2:37" + }, + { + "token": "RPAREN", + "loc": "2:37-2:38" + }, + { + "token": "THIN_ARROW", + "loc": "2:39-2:41" + }, + { + "token": [ + "UIDENT", + "Array" + ], + "loc": "2:42-2:47" + }, + { + "token": "LBRACKET", + "loc": "2:47-2:48" + }, + { + "token": [ + "UIDENT", + "Int" + ], + "loc": "2:48-2:51" + }, + { + "token": "RBRACKET", + "loc": "2:51-2:52" + }, + { + "token": "LBRACE", + "loc": "2:53-2:54" + }, + { + "token": "NEWLINE", + "loc": "2:54-2:55" + }, + { + "token": "LBRACKET", + "loc": "3:3-3:4" + }, + { + "token": [ + "INT", + "0" + ], + "loc": "3:5-3:6" + }, + { + "token": "COMMA", + "loc": "3:6-3:7" + }, + { + "token": "DOTDOT", + "loc": "3:8-3:10" + }, + { + "token": "IF", + "loc": "3:10-3:12" + }, + { + "token": [ + "LIDENT", + "cond" + ], + "loc": "3:13-3:17" + }, + { + "token": "LBRACE", + "loc": "3:18-3:19" + }, + { + "token": [ + "LIDENT", + "it" + ], + "loc": "3:20-3:22" + }, + { + "token": "RBRACE", + "loc": "3:23-3:24" + }, + { + "token": "COMMA", + "loc": "3:24-3:25" + }, + { + "token": [ + "INT", + "42" + ], + "loc": "3:26-3:28" + }, + { + "token": "RBRACKET", + "loc": "3:29-3:30" + }, + { + "token": "NEWLINE", + "loc": "3:30-3:31" + }, + { + "token": "RBRACE", + "loc": "4:1-4:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "4:2-4:2" + }, + { + "token": "NEWLINE", + "loc": "4:2-4:3" + }, + { + "token": "NEWLINE", + "loc": "5:1-5:2" + }, + { + "token": [ + "COMMENT", + { + "content": "///|", + "kind": [ + "Ownline", + { + "leading_blank_line": true, + "trailing_blank_line": false + } + ], + "consumed_by_docstring": false + } + ], + "loc": "6:1-6:5" + }, + { + "token": "NEWLINE", + "loc": "6:5-6:6" + }, + { + "token": "FN", + "loc": "7:1-7:3" + }, + { + "token": [ + "LIDENT", + "iter" + ], + "loc": "7:4-7:8" + }, + { + "token": "LPAREN", + "loc": "7:8-7:9" + }, + { + "token": [ + "LIDENT", + "it" + ], + "loc": "7:9-7:11" + }, + { + "token": "COLON", + "loc": "7:12-7:13" + }, + { + "token": [ + "UIDENT", + "Iter" + ], + "loc": "7:14-7:18" + }, + { + "token": "LBRACKET", + "loc": "7:18-7:19" + }, + { + "token": [ + "UIDENT", + "Int" + ], + "loc": "7:19-7:22" + }, + { + "token": "RBRACKET", + "loc": "7:22-7:23" + }, + { + "token": "COMMA", + "loc": "7:23-7:24" + }, + { + "token": [ + "LIDENT", + "cond" + ], + "loc": "7:25-7:29" + }, + { + "token": "COLON", + "loc": "7:30-7:31" + }, + { + "token": [ + "UIDENT", + "Bool" + ], + "loc": "7:32-7:36" + }, + { + "token": "RPAREN", + "loc": "7:36-7:37" + }, + { + "token": "THIN_ARROW", + "loc": "7:38-7:40" + }, + { + "token": [ + "UIDENT", + "Iter" + ], + "loc": "7:41-7:45" + }, + { + "token": "LBRACKET", + "loc": "7:45-7:46" + }, + { + "token": [ + "UIDENT", + "Int" + ], + "loc": "7:46-7:49" + }, + { + "token": "RBRACKET", + "loc": "7:49-7:50" + }, + { + "token": "LBRACE", + "loc": "7:51-7:52" + }, + { + "token": "NEWLINE", + "loc": "7:52-7:53" + }, + { + "token": "LBRACKET_BAR", + "loc": "8:3-8:5" + }, + { + "token": [ + "INT", + "0" + ], + "loc": "8:6-8:7" + }, + { + "token": "COMMA", + "loc": "8:7-8:8" + }, + { + "token": "DOTDOT", + "loc": "8:9-8:11" + }, + { + "token": "IF", + "loc": "8:11-8:13" + }, + { + "token": [ + "LIDENT", + "cond" + ], + "loc": "8:14-8:18" + }, + { + "token": "LBRACE", + "loc": "8:19-8:20" + }, + { + "token": [ + "LIDENT", + "it" + ], + "loc": "8:21-8:23" + }, + { + "token": "RBRACE", + "loc": "8:24-8:25" + }, + { + "token": "COMMA", + "loc": "8:25-8:26" + }, + { + "token": [ + "INT", + "42" + ], + "loc": "8:27-8:29" + }, + { + "token": "BAR_RBRACKET", + "loc": "8:30-8:32" + }, + { + "token": "NEWLINE", + "loc": "8:32-8:33" + }, + { + "token": "RBRACE", + "loc": "9:1-9:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "9:2-9:2" + }, + { + "token": "NEWLINE", + "loc": "9:2-9:3" + }, + { + "token": "NEWLINE", + "loc": "10:1-10:2" + }, + { + "token": [ + "COMMENT", + { + "content": "///|", + "kind": [ + "Ownline", + { + "leading_blank_line": true, + "trailing_blank_line": false + } + ], + "consumed_by_docstring": false + } + ], + "loc": "11:1-11:5" + }, + { + "token": "NEWLINE", + "loc": "11:5-11:6" + }, + { + "token": "FN", + "loc": "12:1-12:3" + }, + { + "token": [ + "LIDENT", + "main" + ], + "loc": "12:4-12:8" + }, + { + "token": "LBRACE", + "loc": "12:9-12:10" + }, + { + "token": "NEWLINE", + "loc": "12:10-12:11" + }, + { + "token": [ + "LIDENT", + "debug" + ], + "loc": "13:3-13:8" + }, + { + "token": "LPAREN", + "loc": "13:8-13:9" + }, + { + "token": [ + "LIDENT", + "array" + ], + "loc": "13:9-13:14" + }, + { + "token": "LPAREN", + "loc": "13:14-13:15" + }, + { + "token": "LBRACKET_BAR", + "loc": "13:15-13:17" + }, + { + "token": [ + "INT", + "1" + ], + "loc": "13:18-13:19" + }, + { + "token": "COMMA", + "loc": "13:19-13:20" + }, + { + "token": [ + "INT", + "2" + ], + "loc": "13:21-13:22" + }, + { + "token": "COMMA", + "loc": "13:22-13:23" + }, + { + "token": [ + "INT", + "3" + ], + "loc": "13:24-13:25" + }, + { + "token": "BAR_RBRACKET", + "loc": "13:26-13:28" + }, + { + "token": "COMMA", + "loc": "13:28-13:29" + }, + { + "token": "TRUE", + "loc": "13:30-13:34" + }, + { + "token": "RPAREN", + "loc": "13:34-13:35" + }, + { + "token": "RPAREN", + "loc": "13:35-13:36" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "13:36-13:36" + }, + { + "token": "NEWLINE", + "loc": "13:36-13:37" + }, + { + "token": [ + "LIDENT", + "debug" + ], + "loc": "14:3-14:8" + }, + { + "token": "LPAREN", + "loc": "14:8-14:9" + }, + { + "token": [ + "LIDENT", + "array" + ], + "loc": "14:9-14:14" + }, + { + "token": "LPAREN", + "loc": "14:14-14:15" + }, + { + "token": "LBRACKET_BAR", + "loc": "14:15-14:17" + }, + { + "token": [ + "INT", + "1" + ], + "loc": "14:18-14:19" + }, + { + "token": "COMMA", + "loc": "14:19-14:20" + }, + { + "token": [ + "INT", + "2" + ], + "loc": "14:21-14:22" + }, + { + "token": "COMMA", + "loc": "14:22-14:23" + }, + { + "token": [ + "INT", + "3" + ], + "loc": "14:24-14:25" + }, + { + "token": "BAR_RBRACKET", + "loc": "14:26-14:28" + }, + { + "token": "COMMA", + "loc": "14:28-14:29" + }, + { + "token": "FALSE", + "loc": "14:30-14:35" + }, + { + "token": "RPAREN", + "loc": "14:35-14:36" + }, + { + "token": "RPAREN", + "loc": "14:36-14:37" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "14:37-14:37" + }, + { + "token": "NEWLINE", + "loc": "14:37-14:38" + }, + { + "token": [ + "LIDENT", + "debug" + ], + "loc": "15:3-15:8" + }, + { + "token": "LPAREN", + "loc": "15:8-15:9" + }, + { + "token": [ + "LIDENT", + "iter" + ], + "loc": "15:9-15:13" + }, + { + "token": "LPAREN", + "loc": "15:13-15:14" + }, + { + "token": "LBRACKET_BAR", + "loc": "15:14-15:16" + }, + { + "token": [ + "INT", + "1" + ], + "loc": "15:17-15:18" + }, + { + "token": "COMMA", + "loc": "15:18-15:19" + }, + { + "token": [ + "INT", + "2" + ], + "loc": "15:20-15:21" + }, + { + "token": "COMMA", + "loc": "15:21-15:22" + }, + { + "token": [ + "INT", + "3" + ], + "loc": "15:23-15:24" + }, + { + "token": "BAR_RBRACKET", + "loc": "15:25-15:27" + }, + { + "token": "COMMA", + "loc": "15:27-15:28" + }, + { + "token": "TRUE", + "loc": "15:29-15:33" + }, + { + "token": "RPAREN", + "loc": "15:33-15:34" + }, + { + "token": [ + "DOT_LIDENT", + "collect" + ], + "loc": "15:35-15:42" + }, + { + "token": "LPAREN", + "loc": "15:42-15:43" + }, + { + "token": "RPAREN", + "loc": "15:43-15:44" + }, + { + "token": "RPAREN", + "loc": "15:44-15:45" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "15:45-15:45" + }, + { + "token": "NEWLINE", + "loc": "15:45-15:46" + }, + { + "token": [ + "LIDENT", + "debug" + ], + "loc": "16:3-16:8" + }, + { + "token": "LPAREN", + "loc": "16:8-16:9" + }, + { + "token": [ + "LIDENT", + "iter" + ], + "loc": "16:9-16:13" + }, + { + "token": "LPAREN", + "loc": "16:13-16:14" + }, + { + "token": "LBRACKET_BAR", + "loc": "16:14-16:16" + }, + { + "token": [ + "INT", + "1" + ], + "loc": "16:17-16:18" + }, + { + "token": "COMMA", + "loc": "16:18-16:19" + }, + { + "token": [ + "INT", + "2" + ], + "loc": "16:20-16:21" + }, + { + "token": "COMMA", + "loc": "16:21-16:22" + }, + { + "token": [ + "INT", + "3" + ], + "loc": "16:23-16:24" + }, + { + "token": "BAR_RBRACKET", + "loc": "16:25-16:27" + }, + { + "token": "COMMA", + "loc": "16:27-16:28" + }, + { + "token": "FALSE", + "loc": "16:29-16:34" + }, + { + "token": "RPAREN", + "loc": "16:34-16:35" + }, + { + "token": [ + "DOT_LIDENT", + "collect" + ], + "loc": "16:36-16:43" + }, + { + "token": "LPAREN", + "loc": "16:43-16:44" + }, + { + "token": "RPAREN", + "loc": "16:44-16:45" + }, + { + "token": "RPAREN", + "loc": "16:45-16:46" + }, + { + "token": "NEWLINE", + "loc": "16:46-16:47" + }, + { + "token": "RBRACE", + "loc": "17:1-17:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "17:2-17:2" + }, + { + "token": "NEWLINE", + "loc": "17:2-17:3" + }, + { + "token": "EOF", + "loc": "18:1-18:1" + } +] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/pipeline_test_ignore_aggregate_param.json b/test/sync_test/__snapshot__/pipeline_test_ignore_aggregate_param.json new file mode 100644 index 00000000..723c6bbc --- /dev/null +++ b/test/sync_test/__snapshot__/pipeline_test_ignore_aggregate_param.json @@ -0,0 +1,663 @@ +[ + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "g" + } + }, + "has_error": null, + "is_async": null, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "v" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "StringView" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + } + ] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Int" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::Sequence", + "loc": null, + "children": { + "exprs": { + "kind": "Expr::Sequence::ExprList", + "loc": null, + "children": [ + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "ignore" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + ] + }, + "last_expr": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "2" + } + } + } + } + } + } + } + } + } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "main" + } + }, + "has_error": null, + "is_async": null, + "decl_params": null, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [] + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::Sequence", + "loc": null, + "children": { + "exprs": { + "kind": "Expr::Sequence::ExprList", + "loc": null, + "children": [ + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "g" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "abc" + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "view" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + ] + }, + "last_expr": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "f" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + } + } + } + }, + { + "kind": "Impl::TopLetDef", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "x" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "StringView" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "expr": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "abc" + } + } + } + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "is_constant": false, + "is_declare": false, + "attrs": { + "kind": "Impl::TopLetDef::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "f" + } + }, + "has_error": null, + "is_async": null, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Unit" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "ignore" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "x" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + } + } +] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/pipeline_test_ignore_aggregate_param.mbt b/test/sync_test/__snapshot__/pipeline_test_ignore_aggregate_param.mbt new file mode 100644 index 00000000..0618e019 --- /dev/null +++ b/test/sync_test/__snapshot__/pipeline_test_ignore_aggregate_param.mbt @@ -0,0 +1,18 @@ +///| +fn g(v : StringView) -> Int { + ignore(v) + 2 +} + +///| +fn main { + println(g("abc".view())) + f() +} + +let x : StringView = "abc" + +fn f() -> Unit { + ignore(x) +} + diff --git a/test/sync_test/__snapshot__/pipeline_test_ignore_aggregate_param.mbt.tokens.json b/test/sync_test/__snapshot__/pipeline_test_ignore_aggregate_param.mbt.tokens.json new file mode 100644 index 00000000..d9a35335 --- /dev/null +++ b/test/sync_test/__snapshot__/pipeline_test_ignore_aggregate_param.mbt.tokens.json @@ -0,0 +1,418 @@ +[ + { + "token": [ + "COMMENT", + { + "content": "///|", + "kind": [ + "Ownline", + { + "leading_blank_line": false, + "trailing_blank_line": false + } + ], + "consumed_by_docstring": false + } + ], + "loc": "1:1-1:5" + }, + { + "token": "NEWLINE", + "loc": "1:5-1:6" + }, + { + "token": "FN", + "loc": "2:1-2:3" + }, + { + "token": [ + "LIDENT", + "g" + ], + "loc": "2:4-2:5" + }, + { + "token": "LPAREN", + "loc": "2:5-2:6" + }, + { + "token": [ + "LIDENT", + "v" + ], + "loc": "2:6-2:7" + }, + { + "token": "COLON", + "loc": "2:8-2:9" + }, + { + "token": [ + "UIDENT", + "StringView" + ], + "loc": "2:10-2:20" + }, + { + "token": "RPAREN", + "loc": "2:20-2:21" + }, + { + "token": "THIN_ARROW", + "loc": "2:22-2:24" + }, + { + "token": [ + "UIDENT", + "Int" + ], + "loc": "2:25-2:28" + }, + { + "token": "LBRACE", + "loc": "2:29-2:30" + }, + { + "token": "NEWLINE", + "loc": "2:30-2:31" + }, + { + "token": [ + "LIDENT", + "ignore" + ], + "loc": "3:3-3:9" + }, + { + "token": "LPAREN", + "loc": "3:9-3:10" + }, + { + "token": [ + "LIDENT", + "v" + ], + "loc": "3:10-3:11" + }, + { + "token": "RPAREN", + "loc": "3:11-3:12" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "3:12-3:12" + }, + { + "token": "NEWLINE", + "loc": "3:12-3:13" + }, + { + "token": [ + "INT", + "2" + ], + "loc": "4:3-4:4" + }, + { + "token": "NEWLINE", + "loc": "4:4-4:5" + }, + { + "token": "RBRACE", + "loc": "5:1-5:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "5:2-5:2" + }, + { + "token": "NEWLINE", + "loc": "5:2-5:3" + }, + { + "token": "NEWLINE", + "loc": "6:1-6:2" + }, + { + "token": [ + "COMMENT", + { + "content": "///|", + "kind": [ + "Ownline", + { + "leading_blank_line": true, + "trailing_blank_line": false + } + ], + "consumed_by_docstring": false + } + ], + "loc": "7:1-7:5" + }, + { + "token": "NEWLINE", + "loc": "7:5-7:6" + }, + { + "token": "FN", + "loc": "8:1-8:3" + }, + { + "token": [ + "LIDENT", + "main" + ], + "loc": "8:4-8:8" + }, + { + "token": "LBRACE", + "loc": "8:9-8:10" + }, + { + "token": "NEWLINE", + "loc": "8:10-8:11" + }, + { + "token": [ + "LIDENT", + "println" + ], + "loc": "9:3-9:10" + }, + { + "token": "LPAREN", + "loc": "9:10-9:11" + }, + { + "token": [ + "LIDENT", + "g" + ], + "loc": "9:11-9:12" + }, + { + "token": "LPAREN", + "loc": "9:12-9:13" + }, + { + "token": [ + "STRING", + "abc" + ], + "loc": "9:13-9:18" + }, + { + "token": [ + "DOT_LIDENT", + "view" + ], + "loc": "9:19-9:23" + }, + { + "token": "LPAREN", + "loc": "9:23-9:24" + }, + { + "token": "RPAREN", + "loc": "9:24-9:25" + }, + { + "token": "RPAREN", + "loc": "9:25-9:26" + }, + { + "token": "RPAREN", + "loc": "9:26-9:27" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "9:27-9:27" + }, + { + "token": "NEWLINE", + "loc": "9:27-9:28" + }, + { + "token": [ + "LIDENT", + "f" + ], + "loc": "10:3-10:4" + }, + { + "token": "LPAREN", + "loc": "10:4-10:5" + }, + { + "token": "RPAREN", + "loc": "10:5-10:6" + }, + { + "token": "NEWLINE", + "loc": "10:6-10:7" + }, + { + "token": "RBRACE", + "loc": "11:1-11:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "11:2-11:2" + }, + { + "token": "NEWLINE", + "loc": "11:2-11:3" + }, + { + "token": "NEWLINE", + "loc": "12:1-12:2" + }, + { + "token": "LET", + "loc": "13:1-13:4" + }, + { + "token": [ + "LIDENT", + "x" + ], + "loc": "13:5-13:6" + }, + { + "token": "COLON", + "loc": "13:7-13:8" + }, + { + "token": [ + "UIDENT", + "StringView" + ], + "loc": "13:9-13:19" + }, + { + "token": "EQUAL", + "loc": "13:20-13:21" + }, + { + "token": [ + "STRING", + "abc" + ], + "loc": "13:22-13:27" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "13:27-13:27" + }, + { + "token": "NEWLINE", + "loc": "13:27-13:28" + }, + { + "token": "NEWLINE", + "loc": "14:1-14:2" + }, + { + "token": "FN", + "loc": "15:1-15:3" + }, + { + "token": [ + "LIDENT", + "f" + ], + "loc": "15:4-15:5" + }, + { + "token": "LPAREN", + "loc": "15:5-15:6" + }, + { + "token": "RPAREN", + "loc": "15:6-15:7" + }, + { + "token": "THIN_ARROW", + "loc": "15:8-15:10" + }, + { + "token": [ + "UIDENT", + "Unit" + ], + "loc": "15:11-15:15" + }, + { + "token": "LBRACE", + "loc": "15:16-15:17" + }, + { + "token": "NEWLINE", + "loc": "15:17-15:18" + }, + { + "token": [ + "LIDENT", + "ignore" + ], + "loc": "16:3-16:9" + }, + { + "token": "LPAREN", + "loc": "16:9-16:10" + }, + { + "token": [ + "LIDENT", + "x" + ], + "loc": "16:10-16:11" + }, + { + "token": "RPAREN", + "loc": "16:11-16:12" + }, + { + "token": "NEWLINE", + "loc": "16:12-16:13" + }, + { + "token": "RBRACE", + "loc": "17:1-17:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "17:2-17:2" + }, + { + "token": "NEWLINE", + "loc": "17:2-17:3" + }, + { + "token": "NEWLINE", + "loc": "18:1-18:2" + }, + { + "token": "EOF", + "loc": "19:1-19:1" + } +] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/pipeline_test_impl_intrinsic.json b/test/sync_test/__snapshot__/pipeline_test_impl_intrinsic.json index 019e9267..27d592ad 100644 --- a/test/sync_test/__snapshot__/pipeline_test_impl_intrinsic.json +++ b/test/sync_test/__snapshot__/pipeline_test_impl_intrinsic.json @@ -125,6 +125,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, diff --git a/test/sync_test/__snapshot__/pipeline_test_impl_poly_prim.json b/test/sync_test/__snapshot__/pipeline_test_impl_poly_prim.json index d179feb8..794ca126 100644 --- a/test/sync_test/__snapshot__/pipeline_test_impl_poly_prim.json +++ b/test/sync_test/__snapshot__/pipeline_test_impl_poly_prim.json @@ -225,6 +225,11 @@ } ] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, @@ -630,7 +635,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { diff --git a/test/sync_test/__snapshot__/pipeline_test_init_order.json b/test/sync_test/__snapshot__/pipeline_test_init_order.json index 4612cd0e..f1c55611 100644 --- a/test/sync_test/__snapshot__/pipeline_test_init_order.json +++ b/test/sync_test/__snapshot__/pipeline_test_init_order.json @@ -420,6 +420,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, diff --git a/test/sync_test/__snapshot__/pipeline_test_inline_error_handle.json b/test/sync_test/__snapshot__/pipeline_test_inline_error_handle.json index 865bfadb..d2d0a8c8 100644 --- a/test/sync_test/__snapshot__/pipeline_test_inline_error_handle.json +++ b/test/sync_test/__snapshot__/pipeline_test_inline_error_handle.json @@ -1380,71 +1380,137 @@ } }, "expr": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", - "loc": null, - "children": { - "value": "f" - } - } + "value": "to_result" } } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", "loc": null, - "children": [ - { - "kind": "Argument", + "children": { + "value": { + "kind": "Expr::Function", "loc": null, "children": { - "value": { - "kind": "Expr::Constant", + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "constant": { - "kind": "Constant::Int", + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Apply", "loc": null, "children": { - "value": "42" + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "f" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "42" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } } - } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } - ] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} + } } - } + ] }, - "kind": { - "kind": "TryOperatorKind::Question", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -1544,71 +1610,137 @@ } }, "expr": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", - "loc": null, - "children": { - "value": "g" - } - } + "value": "to_result" } } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", "loc": null, - "children": [ - { - "kind": "Argument", + "children": { + "value": { + "kind": "Expr::Function", "loc": null, "children": { - "value": { - "kind": "Expr::Constant", + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "constant": { - "kind": "Constant::Int", + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Apply", "loc": null, "children": { - "value": "0" + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "g" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "0" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } } - } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } - ] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} + } } - } + ] }, - "kind": { - "kind": "TryOperatorKind::Question", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -1689,5 +1821,524 @@ } } } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "to_result" + } + }, + "has_error": null, + "is_async": null, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "f" + } + }, + "ty": { + "kind": "Type::Arrow", + "loc": null, + "children": { + "args": { + "kind": "Type::Arrow::ArgList", + "loc": null, + "children": [] + }, + "res": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "T" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "err": { + "kind": "ErrorType::ErrorType", + "loc": null, + "children": { + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "E" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + "is_async": null + } + } + } + } + ] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [ + { + "kind": "TypeVarBinder", + "loc": null, + "children": { + "name": "T", + "constraints": { + "kind": "TypeVarBinder::TypeVarConstraintList", + "loc": null, + "children": [] + } + } + }, + { + "kind": "TypeVarBinder", + "loc": null, + "children": { + "name": "E", + "constraints": { + "kind": "TypeVarBinder::TypeVarConstraintList", + "loc": null, + "children": [ + { + "kind": "TypeVarConstraint", + "loc": null, + "children": { + "trait": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Error" + } + } + } + } + ] + } + } + } + ] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [ + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "T" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "E" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + ] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::Try", + "loc": null, + "children": { + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "f" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "catch": { + "kind": "Expr::Try::CaseList", + "loc": null, + "children": [ + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "err" + } + } + } + }, + "guard": null, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Err" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::TypeName", + "loc": null, + "children": { + "value": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + }, + "is_object": false + } + } + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "err" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + ] + }, + "catch_all": false, + "try_else": { + "kind": "Expr::Try::CaseList", + "loc": null, + "children": [ + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "value" + } + } + } + }, + "guard": null, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Ok" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::TypeName", + "loc": null, + "children": { + "value": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + }, + "is_object": false + } + } + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "value" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + ] + }, + "has_try": true + } + } + } + } + } } ] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/pipeline_test_inline_error_handle.mbt b/test/sync_test/__snapshot__/pipeline_test_inline_error_handle.mbt index a1e149b9..9b9aec7a 100644 --- a/test/sync_test/__snapshot__/pipeline_test_inline_error_handle.mbt +++ b/test/sync_test/__snapshot__/pipeline_test_inline_error_handle.mbt @@ -29,8 +29,17 @@ pub fn g(x: Int) -> Int raise { } fn main { - let a = try? f(42) + let a = to_result(() => f(42)) debug(a) - let b = try? g(0) + let b = to_result(() => g(0)) debug(b) } + +fn[T, E : Error] to_result(f : () -> T raise E) -> Result[T, E] { + try f() + catch { + err => Result::Err(err) + } noraise { + value => Result::Ok(value) + } +} diff --git a/test/sync_test/__snapshot__/pipeline_test_inline_error_handle.mbt.tokens.json b/test/sync_test/__snapshot__/pipeline_test_inline_error_handle.mbt.tokens.json index 2a043ca4..f420ac42 100644 --- a/test/sync_test/__snapshot__/pipeline_test_inline_error_handle.mbt.tokens.json +++ b/test/sync_test/__snapshot__/pipeline_test_inline_error_handle.mbt.tokens.json @@ -825,41 +825,64 @@ "loc": "32:9-32:10" }, { - "token": "TRY_QUESTION", - "loc": "32:11-32:15" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "32:11-32:20" + }, + { + "token": "LPAREN", + "loc": "32:20-32:21" + }, + { + "token": "LPAREN", + "loc": "32:21-32:22" + }, + { + "token": "RPAREN", + "loc": "32:22-32:23" + }, + { + "token": "FAT_ARROW", + "loc": "32:24-32:26" }, { "token": [ "LIDENT", "f" ], - "loc": "32:16-32:17" + "loc": "32:27-32:28" }, { "token": "LPAREN", - "loc": "32:17-32:18" + "loc": "32:28-32:29" }, { "token": [ "INT", "42" ], - "loc": "32:18-32:20" + "loc": "32:29-32:31" }, { "token": "RPAREN", - "loc": "32:20-32:21" + "loc": "32:31-32:32" + }, + { + "token": "RPAREN", + "loc": "32:32-32:33" }, { "token": [ "SEMI", false ], - "loc": "32:21-32:21" + "loc": "32:33-32:33" }, { "token": "NEWLINE", - "loc": "32:21-32:22" + "loc": "32:33-32:34" }, { "token": [ @@ -910,41 +933,64 @@ "loc": "34:9-34:10" }, { - "token": "TRY_QUESTION", - "loc": "34:11-34:15" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "34:11-34:20" + }, + { + "token": "LPAREN", + "loc": "34:20-34:21" + }, + { + "token": "LPAREN", + "loc": "34:21-34:22" + }, + { + "token": "RPAREN", + "loc": "34:22-34:23" + }, + { + "token": "FAT_ARROW", + "loc": "34:24-34:26" }, { "token": [ "LIDENT", "g" ], - "loc": "34:16-34:17" + "loc": "34:27-34:28" }, { "token": "LPAREN", - "loc": "34:17-34:18" + "loc": "34:28-34:29" }, { "token": [ "INT", "0" ], - "loc": "34:18-34:19" + "loc": "34:29-34:30" + }, + { + "token": "RPAREN", + "loc": "34:30-34:31" }, { "token": "RPAREN", - "loc": "34:19-34:20" + "loc": "34:31-34:32" }, { "token": [ "SEMI", false ], - "loc": "34:20-34:20" + "loc": "34:32-34:32" }, { "token": "NEWLINE", - "loc": "34:20-34:21" + "loc": "34:32-34:33" }, { "token": [ @@ -987,8 +1033,324 @@ "token": "NEWLINE", "loc": "36:2-36:3" }, + { + "token": "NEWLINE", + "loc": "37:1-37:2" + }, + { + "token": "FN", + "loc": "38:1-38:3" + }, + { + "token": "LBRACKET", + "loc": "38:3-38:4" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "38:4-38:5" + }, + { + "token": "COMMA", + "loc": "38:5-38:6" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "38:7-38:8" + }, + { + "token": "COLON", + "loc": "38:9-38:10" + }, + { + "token": [ + "UIDENT", + "Error" + ], + "loc": "38:11-38:16" + }, + { + "token": "RBRACKET", + "loc": "38:16-38:17" + }, + { + "token": [ + "LIDENT", + "to_result" + ], + "loc": "38:18-38:27" + }, + { + "token": "LPAREN", + "loc": "38:27-38:28" + }, + { + "token": [ + "LIDENT", + "f" + ], + "loc": "38:28-38:29" + }, + { + "token": "COLON", + "loc": "38:30-38:31" + }, + { + "token": "LPAREN", + "loc": "38:32-38:33" + }, + { + "token": "RPAREN", + "loc": "38:33-38:34" + }, + { + "token": "THIN_ARROW", + "loc": "38:35-38:37" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "38:38-38:39" + }, + { + "token": "RAISE", + "loc": "38:40-38:45" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "38:46-38:47" + }, + { + "token": "RPAREN", + "loc": "38:47-38:48" + }, + { + "token": "THIN_ARROW", + "loc": "38:49-38:51" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "38:52-38:58" + }, + { + "token": "LBRACKET", + "loc": "38:58-38:59" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "38:59-38:60" + }, + { + "token": "COMMA", + "loc": "38:60-38:61" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "38:62-38:63" + }, + { + "token": "RBRACKET", + "loc": "38:63-38:64" + }, + { + "token": "LBRACE", + "loc": "38:65-38:66" + }, + { + "token": "NEWLINE", + "loc": "38:66-38:67" + }, + { + "token": "TRY", + "loc": "39:3-39:6" + }, + { + "token": [ + "LIDENT", + "f" + ], + "loc": "39:7-39:8" + }, + { + "token": "LPAREN", + "loc": "39:8-39:9" + }, + { + "token": "RPAREN", + "loc": "39:9-39:10" + }, + { + "token": "NEWLINE", + "loc": "39:10-39:11" + }, + { + "token": "CATCH", + "loc": "40:3-40:8" + }, + { + "token": "LBRACE", + "loc": "40:9-40:10" + }, + { + "token": "NEWLINE", + "loc": "40:10-40:11" + }, + { + "token": [ + "LIDENT", + "err" + ], + "loc": "41:5-41:8" + }, + { + "token": "FAT_ARROW", + "loc": "41:9-41:11" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "41:12-41:18" + }, + { + "token": "COLONCOLON", + "loc": "41:18-41:20" + }, + { + "token": [ + "UIDENT", + "Err" + ], + "loc": "41:20-41:23" + }, + { + "token": "LPAREN", + "loc": "41:23-41:24" + }, + { + "token": [ + "LIDENT", + "err" + ], + "loc": "41:24-41:27" + }, + { + "token": "RPAREN", + "loc": "41:27-41:28" + }, + { + "token": "NEWLINE", + "loc": "41:28-41:29" + }, + { + "token": "RBRACE", + "loc": "42:3-42:4" + }, + { + "token": "NORAISE", + "loc": "42:5-42:12" + }, + { + "token": "LBRACE", + "loc": "42:13-42:14" + }, + { + "token": "NEWLINE", + "loc": "42:14-42:15" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "43:5-43:10" + }, + { + "token": "FAT_ARROW", + "loc": "43:11-43:13" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "43:14-43:20" + }, + { + "token": "COLONCOLON", + "loc": "43:20-43:22" + }, + { + "token": [ + "UIDENT", + "Ok" + ], + "loc": "43:22-43:24" + }, + { + "token": "LPAREN", + "loc": "43:24-43:25" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "43:25-43:30" + }, + { + "token": "RPAREN", + "loc": "43:30-43:31" + }, + { + "token": "NEWLINE", + "loc": "43:31-43:32" + }, + { + "token": "RBRACE", + "loc": "44:3-44:4" + }, + { + "token": "NEWLINE", + "loc": "44:4-44:5" + }, + { + "token": "RBRACE", + "loc": "45:1-45:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "45:2-45:2" + }, + { + "token": "NEWLINE", + "loc": "45:2-45:3" + }, { "token": "EOF", - "loc": "37:1-37:1" + "loc": "46:1-46:1" } ] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/pipeline_test_inline_nested_error_ctx.json b/test/sync_test/__snapshot__/pipeline_test_inline_nested_error_ctx.json new file mode 100644 index 00000000..98fec1a8 --- /dev/null +++ b/test/sync_test/__snapshot__/pipeline_test_inline_nested_error_ctx.json @@ -0,0 +1,635 @@ +[ + { + "kind": "Impl::TopTypeDef", + "loc": null, + "children": { + "value": { + "kind": "TypeDecl", + "loc": null, + "children": { + "tycon": "E", + "params": { + "kind": "TypeDecl::ParamList", + "loc": null, + "children": [] + }, + "components": { + "kind": "TypeDesc::Error", + "loc": null, + "children": { + "value": { + "kind": "ExceptionDecl::NoPayload", + "loc": null, + "children": {} + } + } + }, + "attrs": { + "kind": "TypeDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "", + "type_vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "is_declare": false, + "deriving": { + "kind": "TypeDecl::DerivingList", + "loc": null, + "children": [] + } + } + } + } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "outer" + } + }, + "has_error": null, + "is_async": null, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Unit" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::Try", + "loc": null, + "children": { + "body": { + "kind": "Expr::Group", + "loc": null, + "children": { + "expr": { + "kind": "Expr::LetFn", + "loc": null, + "children": { + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "nested" + } + }, + "func": { + "kind": "Func::Lambda", + "loc": null, + "children": { + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::LetFn", + "loc": null, + "children": { + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "helper" + } + }, + "func": { + "kind": "Func::Lambda", + "loc": null, + "children": { + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Raise", + "loc": null, + "children": { + "err_value": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "E" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::NoExtraInfo", + "loc": null, + "children": {} + } + } + } + } + } + } + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Unit" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "error_type": { + "kind": "ErrorType::DefaultErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Lambda", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null + } + }, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "helper" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Unit" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "error_type": { + "kind": "ErrorType::DefaultErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Lambda", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null + } + }, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "nested" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + }, + "group": { + "kind": "Group::Brace", + "loc": null, + "children": {} + } + } + }, + "catch": { + "kind": "Expr::Try::CaseList", + "loc": null, + "children": [ + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "E" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::NoExtraInfo", + "loc": null, + "children": {} + } + } + }, + "args": null, + "is_open": false + } + }, + "guard": null, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "0" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + }, + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Any", + "loc": null, + "children": {} + }, + "guard": null, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "1" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + ] + }, + "catch_all": false, + "try_else": null, + "has_try": true + } + } + } + } + } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "main" + } + }, + "has_error": null, + "is_async": null, + "decl_params": null, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [] + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "outer" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + } + } +] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/pipeline_test_inline_nested_error_ctx.mbt b/test/sync_test/__snapshot__/pipeline_test_inline_nested_error_ctx.mbt new file mode 100644 index 00000000..58166740 --- /dev/null +++ b/test/sync_test/__snapshot__/pipeline_test_inline_nested_error_ctx.mbt @@ -0,0 +1,20 @@ +suberror E + +fn outer() -> Unit { + try { + fn nested() -> Unit raise { + fn helper() -> Unit raise { + raise E + } + helper() + } + nested() + } catch { + E => println(0) + _ => println(1) + } +} + +fn main { + outer() +} diff --git a/test/sync_test/__snapshot__/pipeline_test_inline_nested_error_ctx.mbt.tokens.json b/test/sync_test/__snapshot__/pipeline_test_inline_nested_error_ctx.mbt.tokens.json new file mode 100644 index 00000000..fe6708a4 --- /dev/null +++ b/test/sync_test/__snapshot__/pipeline_test_inline_nested_error_ctx.mbt.tokens.json @@ -0,0 +1,423 @@ +[ + { + "token": "SUBERROR", + "loc": "1:1-1:9" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "1:10-1:11" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "1:11-1:11" + }, + { + "token": "NEWLINE", + "loc": "1:11-1:12" + }, + { + "token": "NEWLINE", + "loc": "2:1-2:2" + }, + { + "token": "FN", + "loc": "3:1-3:3" + }, + { + "token": [ + "LIDENT", + "outer" + ], + "loc": "3:4-3:9" + }, + { + "token": "LPAREN", + "loc": "3:9-3:10" + }, + { + "token": "RPAREN", + "loc": "3:10-3:11" + }, + { + "token": "THIN_ARROW", + "loc": "3:12-3:14" + }, + { + "token": [ + "UIDENT", + "Unit" + ], + "loc": "3:15-3:19" + }, + { + "token": "LBRACE", + "loc": "3:20-3:21" + }, + { + "token": "NEWLINE", + "loc": "3:21-3:22" + }, + { + "token": "TRY", + "loc": "4:3-4:6" + }, + { + "token": "LBRACE", + "loc": "4:7-4:8" + }, + { + "token": "NEWLINE", + "loc": "4:8-4:9" + }, + { + "token": "FN", + "loc": "5:5-5:7" + }, + { + "token": [ + "LIDENT", + "nested" + ], + "loc": "5:8-5:14" + }, + { + "token": "LPAREN", + "loc": "5:14-5:15" + }, + { + "token": "RPAREN", + "loc": "5:15-5:16" + }, + { + "token": "THIN_ARROW", + "loc": "5:17-5:19" + }, + { + "token": [ + "UIDENT", + "Unit" + ], + "loc": "5:20-5:24" + }, + { + "token": "RAISE", + "loc": "5:25-5:30" + }, + { + "token": "LBRACE", + "loc": "5:31-5:32" + }, + { + "token": "NEWLINE", + "loc": "5:32-5:33" + }, + { + "token": "FN", + "loc": "6:7-6:9" + }, + { + "token": [ + "LIDENT", + "helper" + ], + "loc": "6:10-6:16" + }, + { + "token": "LPAREN", + "loc": "6:16-6:17" + }, + { + "token": "RPAREN", + "loc": "6:17-6:18" + }, + { + "token": "THIN_ARROW", + "loc": "6:19-6:21" + }, + { + "token": [ + "UIDENT", + "Unit" + ], + "loc": "6:22-6:26" + }, + { + "token": "RAISE", + "loc": "6:27-6:32" + }, + { + "token": "LBRACE", + "loc": "6:33-6:34" + }, + { + "token": "NEWLINE", + "loc": "6:34-6:35" + }, + { + "token": "RAISE", + "loc": "7:9-7:14" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "7:15-7:16" + }, + { + "token": "NEWLINE", + "loc": "7:17-7:18" + }, + { + "token": "RBRACE", + "loc": "8:7-8:8" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "8:8-8:8" + }, + { + "token": "NEWLINE", + "loc": "8:8-8:9" + }, + { + "token": [ + "LIDENT", + "helper" + ], + "loc": "9:7-9:13" + }, + { + "token": "LPAREN", + "loc": "9:13-9:14" + }, + { + "token": "RPAREN", + "loc": "9:14-9:15" + }, + { + "token": "NEWLINE", + "loc": "9:15-9:16" + }, + { + "token": "RBRACE", + "loc": "10:5-10:6" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "10:6-10:6" + }, + { + "token": "NEWLINE", + "loc": "10:6-10:7" + }, + { + "token": [ + "LIDENT", + "nested" + ], + "loc": "11:5-11:11" + }, + { + "token": "LPAREN", + "loc": "11:11-11:12" + }, + { + "token": "RPAREN", + "loc": "11:12-11:13" + }, + { + "token": "NEWLINE", + "loc": "11:13-11:14" + }, + { + "token": "RBRACE", + "loc": "12:3-12:4" + }, + { + "token": "CATCH", + "loc": "12:5-12:10" + }, + { + "token": "LBRACE", + "loc": "12:11-12:12" + }, + { + "token": "NEWLINE", + "loc": "12:12-12:13" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "13:5-13:6" + }, + { + "token": "FAT_ARROW", + "loc": "13:7-13:9" + }, + { + "token": [ + "LIDENT", + "println" + ], + "loc": "13:10-13:17" + }, + { + "token": "LPAREN", + "loc": "13:17-13:18" + }, + { + "token": [ + "INT", + "0" + ], + "loc": "13:18-13:19" + }, + { + "token": "RPAREN", + "loc": "13:19-13:20" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "13:20-13:20" + }, + { + "token": "NEWLINE", + "loc": "13:20-13:21" + }, + { + "token": "UNDERSCORE", + "loc": "14:5-14:6" + }, + { + "token": "FAT_ARROW", + "loc": "14:7-14:9" + }, + { + "token": [ + "LIDENT", + "println" + ], + "loc": "14:10-14:17" + }, + { + "token": "LPAREN", + "loc": "14:17-14:18" + }, + { + "token": [ + "INT", + "1" + ], + "loc": "14:18-14:19" + }, + { + "token": "RPAREN", + "loc": "14:19-14:20" + }, + { + "token": "NEWLINE", + "loc": "14:20-14:21" + }, + { + "token": "RBRACE", + "loc": "15:3-15:4" + }, + { + "token": "NEWLINE", + "loc": "15:4-15:5" + }, + { + "token": "RBRACE", + "loc": "16:1-16:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "16:2-16:2" + }, + { + "token": "NEWLINE", + "loc": "16:2-16:3" + }, + { + "token": "NEWLINE", + "loc": "17:1-17:2" + }, + { + "token": "FN", + "loc": "18:1-18:3" + }, + { + "token": [ + "LIDENT", + "main" + ], + "loc": "18:4-18:8" + }, + { + "token": "LBRACE", + "loc": "18:9-18:10" + }, + { + "token": "NEWLINE", + "loc": "18:10-18:11" + }, + { + "token": [ + "LIDENT", + "outer" + ], + "loc": "19:3-19:8" + }, + { + "token": "LPAREN", + "loc": "19:8-19:9" + }, + { + "token": "RPAREN", + "loc": "19:9-19:10" + }, + { + "token": "NEWLINE", + "loc": "19:10-19:11" + }, + { + "token": "RBRACE", + "loc": "20:1-20:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "20:2-20:2" + }, + { + "token": "NEWLINE", + "loc": "20:2-20:3" + }, + { + "token": "EOF", + "loc": "21:1-21:1" + } +] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/pipeline_test_inline_raise.json b/test/sync_test/__snapshot__/pipeline_test_inline_raise.json index 31a4ee88..bb6b1e76 100644 --- a/test/sync_test/__snapshot__/pipeline_test_inline_raise.json +++ b/test/sync_test/__snapshot__/pipeline_test_inline_raise.json @@ -773,114 +773,699 @@ "loc": null, "children": { "value": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", + "value": "to_result" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Function", + "loc": null, + "children": { + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "value": "g" + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "g" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "-1" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Bool", + "loc": null, + "children": { + "value": false + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null } } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "to_result" + } + }, + "has_error": null, + "is_async": null, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "f" + } + }, + "ty": { + "kind": "Type::Arrow", + "loc": null, + "children": { + "args": { + "kind": "Type::Arrow::ArgList", + "loc": null, + "children": [] + }, + "res": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "T" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "err": { + "kind": "ErrorType::ErrorType", + "loc": null, + "children": { + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "E" + } } } }, - "args": { - "kind": "Expr::Apply::ArgumentList", + "tys": { + "kind": "Type::Name::TypeList", "loc": null, - "children": [ - { - "kind": "Argument", + "children": [] + } + } + } + } + }, + "is_async": null + } + } + } + } + ] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [ + { + "kind": "TypeVarBinder", + "loc": null, + "children": { + "name": "T", + "constraints": { + "kind": "TypeVarBinder::TypeVarConstraintList", + "loc": null, + "children": [] + } + } + }, + { + "kind": "TypeVarBinder", + "loc": null, + "children": { + "name": "E", + "constraints": { + "kind": "TypeVarBinder::TypeVarConstraintList", + "loc": null, + "children": [ + { + "kind": "TypeVarConstraint", + "loc": null, + "children": { + "trait": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Error" + } + } + } + } + ] + } + } + } + ] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [ + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "T" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "E" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + ] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::Try", + "loc": null, + "children": { + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "f" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "catch": { + "kind": "Expr::Try::CaseList", + "loc": null, + "children": [ + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "err" + } + } + } + }, + "guard": null, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Err" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::TypeName", "loc": null, "children": { "value": { - "kind": "Expr::Constant", + "kind": "TypeName", "loc": null, "children": { - "constant": { - "kind": "Constant::Int", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "value": "-1" + "value": "Result" } - } + }, + "is_object": false } - }, - "kind": { - "kind": "ArgumentKind::Positional", + } + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", "loc": null, - "children": {} + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "err" + } + } + } } } }, - { - "kind": "Argument", + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + ] + }, + "catch_all": false, + "try_else": { + "kind": "Expr::Try::CaseList", + "loc": null, + "children": [ + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "value" + } + } + } + }, + "guard": null, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Ok" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::TypeName", "loc": null, "children": { "value": { - "kind": "Expr::Constant", + "kind": "TypeName", "loc": null, "children": { - "constant": { - "kind": "Constant::Bool", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "value": false + "value": "Result" } - } + }, + "is_object": false } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} } } } - ] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} + } } } }, - "kind": { - "kind": "TryOperatorKind::Question", + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "value" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} } } } ] }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} - } + "has_try": true } } } diff --git a/test/sync_test/__snapshot__/pipeline_test_inline_raise.mbt b/test/sync_test/__snapshot__/pipeline_test_inline_raise.mbt index a6b74b50..f0347fdc 100644 --- a/test/sync_test/__snapshot__/pipeline_test_inline_raise.mbt +++ b/test/sync_test/__snapshot__/pipeline_test_inline_raise.mbt @@ -19,5 +19,14 @@ fn g(x : Int, b : Bool) -> Int raise E { ///| fn main { - debug(try? g(-1, false)) + debug(to_result(() => g(-1, false))) +} + +fn[T, E : Error] to_result(f : () -> T raise E) -> Result[T, E] { + try f() + catch { + err => Result::Err(err) + } noraise { + value => Result::Ok(value) + } } diff --git a/test/sync_test/__snapshot__/pipeline_test_inline_raise.mbt.tokens.json b/test/sync_test/__snapshot__/pipeline_test_inline_raise.mbt.tokens.json index 4ee579df..1a09eae8 100644 --- a/test/sync_test/__snapshot__/pipeline_test_inline_raise.mbt.tokens.json +++ b/test/sync_test/__snapshot__/pipeline_test_inline_raise.mbt.tokens.json @@ -513,50 +513,73 @@ "loc": "22:8-22:9" }, { - "token": "TRY_QUESTION", - "loc": "22:9-22:13" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "22:9-22:18" + }, + { + "token": "LPAREN", + "loc": "22:18-22:19" + }, + { + "token": "LPAREN", + "loc": "22:19-22:20" + }, + { + "token": "RPAREN", + "loc": "22:20-22:21" + }, + { + "token": "FAT_ARROW", + "loc": "22:22-22:24" }, { "token": [ "LIDENT", "g" ], - "loc": "22:14-22:15" + "loc": "22:25-22:26" }, { "token": "LPAREN", - "loc": "22:15-22:16" + "loc": "22:26-22:27" }, { "token": "MINUS", - "loc": "22:16-22:17" + "loc": "22:27-22:28" }, { "token": [ "INT", "1" ], - "loc": "22:17-22:18" + "loc": "22:28-22:29" }, { "token": "COMMA", - "loc": "22:18-22:19" + "loc": "22:29-22:30" }, { "token": "FALSE", - "loc": "22:20-22:25" + "loc": "22:31-22:36" }, { "token": "RPAREN", - "loc": "22:25-22:26" + "loc": "22:36-22:37" }, { "token": "RPAREN", - "loc": "22:26-22:27" + "loc": "22:37-22:38" + }, + { + "token": "RPAREN", + "loc": "22:38-22:39" }, { "token": "NEWLINE", - "loc": "22:27-22:28" + "loc": "22:39-22:40" }, { "token": "RBRACE", @@ -573,8 +596,324 @@ "token": "NEWLINE", "loc": "23:2-23:3" }, + { + "token": "NEWLINE", + "loc": "24:1-24:2" + }, + { + "token": "FN", + "loc": "25:1-25:3" + }, + { + "token": "LBRACKET", + "loc": "25:3-25:4" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "25:4-25:5" + }, + { + "token": "COMMA", + "loc": "25:5-25:6" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "25:7-25:8" + }, + { + "token": "COLON", + "loc": "25:9-25:10" + }, + { + "token": [ + "UIDENT", + "Error" + ], + "loc": "25:11-25:16" + }, + { + "token": "RBRACKET", + "loc": "25:16-25:17" + }, + { + "token": [ + "LIDENT", + "to_result" + ], + "loc": "25:18-25:27" + }, + { + "token": "LPAREN", + "loc": "25:27-25:28" + }, + { + "token": [ + "LIDENT", + "f" + ], + "loc": "25:28-25:29" + }, + { + "token": "COLON", + "loc": "25:30-25:31" + }, + { + "token": "LPAREN", + "loc": "25:32-25:33" + }, + { + "token": "RPAREN", + "loc": "25:33-25:34" + }, + { + "token": "THIN_ARROW", + "loc": "25:35-25:37" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "25:38-25:39" + }, + { + "token": "RAISE", + "loc": "25:40-25:45" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "25:46-25:47" + }, + { + "token": "RPAREN", + "loc": "25:47-25:48" + }, + { + "token": "THIN_ARROW", + "loc": "25:49-25:51" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "25:52-25:58" + }, + { + "token": "LBRACKET", + "loc": "25:58-25:59" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "25:59-25:60" + }, + { + "token": "COMMA", + "loc": "25:60-25:61" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "25:62-25:63" + }, + { + "token": "RBRACKET", + "loc": "25:63-25:64" + }, + { + "token": "LBRACE", + "loc": "25:65-25:66" + }, + { + "token": "NEWLINE", + "loc": "25:66-25:67" + }, + { + "token": "TRY", + "loc": "26:3-26:6" + }, + { + "token": [ + "LIDENT", + "f" + ], + "loc": "26:7-26:8" + }, + { + "token": "LPAREN", + "loc": "26:8-26:9" + }, + { + "token": "RPAREN", + "loc": "26:9-26:10" + }, + { + "token": "NEWLINE", + "loc": "26:10-26:11" + }, + { + "token": "CATCH", + "loc": "27:3-27:8" + }, + { + "token": "LBRACE", + "loc": "27:9-27:10" + }, + { + "token": "NEWLINE", + "loc": "27:10-27:11" + }, + { + "token": [ + "LIDENT", + "err" + ], + "loc": "28:5-28:8" + }, + { + "token": "FAT_ARROW", + "loc": "28:9-28:11" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "28:12-28:18" + }, + { + "token": "COLONCOLON", + "loc": "28:18-28:20" + }, + { + "token": [ + "UIDENT", + "Err" + ], + "loc": "28:20-28:23" + }, + { + "token": "LPAREN", + "loc": "28:23-28:24" + }, + { + "token": [ + "LIDENT", + "err" + ], + "loc": "28:24-28:27" + }, + { + "token": "RPAREN", + "loc": "28:27-28:28" + }, + { + "token": "NEWLINE", + "loc": "28:28-28:29" + }, + { + "token": "RBRACE", + "loc": "29:3-29:4" + }, + { + "token": "NORAISE", + "loc": "29:5-29:12" + }, + { + "token": "LBRACE", + "loc": "29:13-29:14" + }, + { + "token": "NEWLINE", + "loc": "29:14-29:15" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "30:5-30:10" + }, + { + "token": "FAT_ARROW", + "loc": "30:11-30:13" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "30:14-30:20" + }, + { + "token": "COLONCOLON", + "loc": "30:20-30:22" + }, + { + "token": [ + "UIDENT", + "Ok" + ], + "loc": "30:22-30:24" + }, + { + "token": "LPAREN", + "loc": "30:24-30:25" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "30:25-30:30" + }, + { + "token": "RPAREN", + "loc": "30:30-30:31" + }, + { + "token": "NEWLINE", + "loc": "30:31-30:32" + }, + { + "token": "RBRACE", + "loc": "31:3-31:4" + }, + { + "token": "NEWLINE", + "loc": "31:4-31:5" + }, + { + "token": "RBRACE", + "loc": "32:1-32:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "32:2-32:2" + }, + { + "token": "NEWLINE", + "loc": "32:2-32:3" + }, { "token": "EOF", - "loc": "24:1-24:1" + "loc": "33:1-33:1" } ] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/pipeline_test_int16_common.json b/test/sync_test/__snapshot__/pipeline_test_int16_common.json index d0da654d..6485625d 100644 --- a/test/sync_test/__snapshot__/pipeline_test_int16_common.json +++ b/test/sync_test/__snapshot__/pipeline_test_int16_common.json @@ -2569,7 +2569,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { @@ -3641,7 +3642,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { diff --git a/test/sync_test/__snapshot__/pipeline_test_int16_option_repr.json b/test/sync_test/__snapshot__/pipeline_test_int16_option_repr.json index c5bffc4b..477e0d15 100644 --- a/test/sync_test/__snapshot__/pipeline_test_int16_option_repr.json +++ b/test/sync_test/__snapshot__/pipeline_test_int16_option_repr.json @@ -409,7 +409,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { diff --git a/test/sync_test/__snapshot__/pipeline_test_int64_array.json b/test/sync_test/__snapshot__/pipeline_test_int64_array.json index eba331a1..1a414970 100644 --- a/test/sync_test/__snapshot__/pipeline_test_int64_array.json +++ b/test/sync_test/__snapshot__/pipeline_test_int64_array.json @@ -554,7 +554,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { diff --git a/test/sync_test/__snapshot__/pipeline_test_interp_const.json b/test/sync_test/__snapshot__/pipeline_test_interp_const.json index 2e8967d1..38611284 100644 --- a/test/sync_test/__snapshot__/pipeline_test_interp_const.json +++ b/test/sync_test/__snapshot__/pipeline_test_interp_const.json @@ -1,1013 +1,4 @@ [ - { - "kind": "Impl::TopLetDef", - "loc": null, - "children": { - "binder": { - "kind": "Binder", - "loc": null, - "children": { - "name": "IntConst" - } - }, - "ty": { - "kind": "Type::Name", - "loc": null, - "children": { - "constr_id": { - "kind": "ConstrId", - "loc": null, - "children": { - "id": { - "kind": "LongIdent::Ident", - "loc": null, - "children": { - "value": "Int" - } - } - } - }, - "tys": { - "kind": "Type::Name::TypeList", - "loc": null, - "children": [] - } - } - }, - "expr": { - "kind": "Expr::Constant", - "loc": null, - "children": { - "constant": { - "kind": "Constant::Int", - "loc": null, - "children": { - "value": "42" - } - } - } - }, - "vis": { - "kind": "Visibility::Default", - "loc": null, - "children": {} - }, - "is_constant": true, - "is_declare": false, - "attrs": { - "kind": "Impl::TopLetDef::AttrList", - "loc": null, - "children": [] - }, - "doc": "" - } - }, - { - "kind": "Impl::TopLetDef", - "loc": null, - "children": { - "binder": { - "kind": "Binder", - "loc": null, - "children": { - "name": "ByteConst" - } - }, - "ty": { - "kind": "Type::Name", - "loc": null, - "children": { - "constr_id": { - "kind": "ConstrId", - "loc": null, - "children": { - "id": { - "kind": "LongIdent::Ident", - "loc": null, - "children": { - "value": "Byte" - } - } - } - }, - "tys": { - "kind": "Type::Name::TypeList", - "loc": null, - "children": [] - } - } - }, - "expr": { - "kind": "Expr::Constant", - "loc": null, - "children": { - "constant": { - "kind": "Constant::Int", - "loc": null, - "children": { - "value": "42" - } - } - } - }, - "vis": { - "kind": "Visibility::Default", - "loc": null, - "children": {} - }, - "is_constant": true, - "is_declare": false, - "attrs": { - "kind": "Impl::TopLetDef::AttrList", - "loc": null, - "children": [] - }, - "doc": "" - } - }, - { - "kind": "Impl::TopLetDef", - "loc": null, - "children": { - "binder": { - "kind": "Binder", - "loc": null, - "children": { - "name": "StringConst" - } - }, - "ty": { - "kind": "Type::Name", - "loc": null, - "children": { - "constr_id": { - "kind": "ConstrId", - "loc": null, - "children": { - "id": { - "kind": "LongIdent::Ident", - "loc": null, - "children": { - "value": "String" - } - } - } - }, - "tys": { - "kind": "Type::Name::TypeList", - "loc": null, - "children": [] - } - } - }, - "expr": { - "kind": "Expr::Constant", - "loc": null, - "children": { - "constant": { - "kind": "Constant::String", - "loc": null, - "children": { - "value": "😆😆" - } - } - } - }, - "vis": { - "kind": "Visibility::Default", - "loc": null, - "children": {} - }, - "is_constant": true, - "is_declare": false, - "attrs": { - "kind": "Impl::TopLetDef::AttrList", - "loc": null, - "children": [] - }, - "doc": "" - } - }, - { - "kind": "Impl::TopLetDef", - "loc": null, - "children": { - "binder": { - "kind": "Binder", - "loc": null, - "children": { - "name": "CharConst" - } - }, - "ty": { - "kind": "Type::Name", - "loc": null, - "children": { - "constr_id": { - "kind": "ConstrId", - "loc": null, - "children": { - "id": { - "kind": "LongIdent::Ident", - "loc": null, - "children": { - "value": "Char" - } - } - } - }, - "tys": { - "kind": "Type::Name::TypeList", - "loc": null, - "children": [] - } - } - }, - "expr": { - "kind": "Expr::Constant", - "loc": null, - "children": { - "constant": { - "kind": "Constant::Char", - "loc": null, - "children": { - "value": "→" - } - } - } - }, - "vis": { - "kind": "Visibility::Default", - "loc": null, - "children": {} - }, - "is_constant": true, - "is_declare": false, - "attrs": { - "kind": "Impl::TopLetDef::AttrList", - "loc": null, - "children": [] - }, - "doc": "" - } - }, - { - "kind": "Impl::TopLetDef", - "loc": null, - "children": { - "binder": { - "kind": "Binder", - "loc": null, - "children": { - "name": "Int64Const" - } - }, - "ty": { - "kind": "Type::Name", - "loc": null, - "children": { - "constr_id": { - "kind": "ConstrId", - "loc": null, - "children": { - "id": { - "kind": "LongIdent::Ident", - "loc": null, - "children": { - "value": "Int64" - } - } - } - }, - "tys": { - "kind": "Type::Name::TypeList", - "loc": null, - "children": [] - } - } - }, - "expr": { - "kind": "Expr::Constant", - "loc": null, - "children": { - "constant": { - "kind": "Constant::Int", - "loc": null, - "children": { - "value": "42" - } - } - } - }, - "vis": { - "kind": "Visibility::Default", - "loc": null, - "children": {} - }, - "is_constant": true, - "is_declare": false, - "attrs": { - "kind": "Impl::TopLetDef::AttrList", - "loc": null, - "children": [] - }, - "doc": "" - } - }, - { - "kind": "Impl::TopLetDef", - "loc": null, - "children": { - "binder": { - "kind": "Binder", - "loc": null, - "children": { - "name": "UIntConst" - } - }, - "ty": { - "kind": "Type::Name", - "loc": null, - "children": { - "constr_id": { - "kind": "ConstrId", - "loc": null, - "children": { - "id": { - "kind": "LongIdent::Ident", - "loc": null, - "children": { - "value": "UInt" - } - } - } - }, - "tys": { - "kind": "Type::Name::TypeList", - "loc": null, - "children": [] - } - } - }, - "expr": { - "kind": "Expr::Constant", - "loc": null, - "children": { - "constant": { - "kind": "Constant::Int", - "loc": null, - "children": { - "value": "42" - } - } - } - }, - "vis": { - "kind": "Visibility::Default", - "loc": null, - "children": {} - }, - "is_constant": true, - "is_declare": false, - "attrs": { - "kind": "Impl::TopLetDef::AttrList", - "loc": null, - "children": [] - }, - "doc": "" - } - }, - { - "kind": "Impl::TopLetDef", - "loc": null, - "children": { - "binder": { - "kind": "Binder", - "loc": null, - "children": { - "name": "UInt64Const" - } - }, - "ty": { - "kind": "Type::Name", - "loc": null, - "children": { - "constr_id": { - "kind": "ConstrId", - "loc": null, - "children": { - "id": { - "kind": "LongIdent::Ident", - "loc": null, - "children": { - "value": "UInt64" - } - } - } - }, - "tys": { - "kind": "Type::Name::TypeList", - "loc": null, - "children": [] - } - } - }, - "expr": { - "kind": "Expr::Constant", - "loc": null, - "children": { - "constant": { - "kind": "Constant::Int", - "loc": null, - "children": { - "value": "42" - } - } - } - }, - "vis": { - "kind": "Visibility::Default", - "loc": null, - "children": {} - }, - "is_constant": true, - "is_declare": false, - "attrs": { - "kind": "Impl::TopLetDef::AttrList", - "loc": null, - "children": [] - }, - "doc": "" - } - }, - { - "kind": "Impl::TopLetDef", - "loc": null, - "children": { - "binder": { - "kind": "Binder", - "loc": null, - "children": { - "name": "Interp" - } - }, - "ty": { - "kind": "Type::Name", - "loc": null, - "children": { - "constr_id": { - "kind": "ConstrId", - "loc": null, - "children": { - "id": { - "kind": "LongIdent::Ident", - "loc": null, - "children": { - "value": "String" - } - } - } - }, - "tys": { - "kind": "Type::Name::TypeList", - "loc": null, - "children": [] - } - } - }, - "expr": { - "kind": "Expr::MultilineString", - "loc": null, - "children": { - "elems": { - "kind": "Expr::MultilineString::ElemList", - "loc": null, - "children": [ - { - "kind": "MultilineString::Interp", - "loc": null, - "children": { - "value": { - "kind": "MultilineString::Interp::ElemList", - "loc": null, - "children": [ - { - "kind": "InterpElem::Source", - "loc": null, - "children": { - "source": "true" - } - }, - { - "kind": "InterpElem::Literal", - "loc": null, - "children": { - "repr": "," - } - }, - { - "kind": "InterpElem::Source", - "loc": null, - "children": { - "source": "false" - } - }, - { - "kind": "InterpElem::Literal", - "loc": null, - "children": { - "repr": " : Bool" - } - } - ] - } - } - }, - { - "kind": "MultilineString::Interp", - "loc": null, - "children": { - "value": { - "kind": "MultilineString::Interp::ElemList", - "loc": null, - "children": [ - { - "kind": "InterpElem::Source", - "loc": null, - "children": { - "source": "IntConst" - } - }, - { - "kind": "InterpElem::Literal", - "loc": null, - "children": { - "repr": " : Int" - } - } - ] - } - } - }, - { - "kind": "MultilineString::Interp", - "loc": null, - "children": { - "value": { - "kind": "MultilineString::Interp::ElemList", - "loc": null, - "children": [ - { - "kind": "InterpElem::Source", - "loc": null, - "children": { - "source": "ByteConst" - } - }, - { - "kind": "InterpElem::Literal", - "loc": null, - "children": { - "repr": " : Byte" - } - } - ] - } - } - }, - { - "kind": "MultilineString::Interp", - "loc": null, - "children": { - "value": { - "kind": "MultilineString::Interp::ElemList", - "loc": null, - "children": [ - { - "kind": "InterpElem::Source", - "loc": null, - "children": { - "source": "Int64Const" - } - }, - { - "kind": "InterpElem::Literal", - "loc": null, - "children": { - "repr": " : Int64" - } - } - ] - } - } - }, - { - "kind": "MultilineString::Interp", - "loc": null, - "children": { - "value": { - "kind": "MultilineString::Interp::ElemList", - "loc": null, - "children": [ - { - "kind": "InterpElem::Source", - "loc": null, - "children": { - "source": "UIntConst" - } - }, - { - "kind": "InterpElem::Literal", - "loc": null, - "children": { - "repr": " : UInt" - } - } - ] - } - } - }, - { - "kind": "MultilineString::Interp", - "loc": null, - "children": { - "value": { - "kind": "MultilineString::Interp::ElemList", - "loc": null, - "children": [ - { - "kind": "InterpElem::Source", - "loc": null, - "children": { - "source": "UInt64Const" - } - }, - { - "kind": "InterpElem::Literal", - "loc": null, - "children": { - "repr": " : UInt64" - } - } - ] - } - } - }, - { - "kind": "MultilineString::Interp", - "loc": null, - "children": { - "value": { - "kind": "MultilineString::Interp::ElemList", - "loc": null, - "children": [ - { - "kind": "InterpElem::Source", - "loc": null, - "children": { - "source": "CharConst" - } - }, - { - "kind": "InterpElem::Literal", - "loc": null, - "children": { - "repr": " : Char" - } - } - ] - } - } - }, - { - "kind": "MultilineString::Interp", - "loc": null, - "children": { - "value": { - "kind": "MultilineString::Interp::ElemList", - "loc": null, - "children": [ - { - "kind": "InterpElem::Source", - "loc": null, - "children": { - "source": "StringConst" - } - }, - { - "kind": "InterpElem::Literal", - "loc": null, - "children": { - "repr": " : String" - } - } - ] - } - } - } - ] - } - } - }, - "vis": { - "kind": "Visibility::Default", - "loc": null, - "children": {} - }, - "is_constant": true, - "is_declare": false, - "attrs": { - "kind": "Impl::TopLetDef::AttrList", - "loc": null, - "children": [] - }, - "doc": "" - } - }, - { - "kind": "Impl::TopLetDef", - "loc": null, - "children": { - "binder": { - "kind": "Binder", - "loc": null, - "children": { - "name": "interp" - } - }, - "ty": { - "kind": "Type::Name", - "loc": null, - "children": { - "constr_id": { - "kind": "ConstrId", - "loc": null, - "children": { - "id": { - "kind": "LongIdent::Ident", - "loc": null, - "children": { - "value": "String" - } - } - } - }, - "tys": { - "kind": "Type::Name::TypeList", - "loc": null, - "children": [] - } - } - }, - "expr": { - "kind": "Expr::MultilineString", - "loc": null, - "children": { - "elems": { - "kind": "Expr::MultilineString::ElemList", - "loc": null, - "children": [ - { - "kind": "MultilineString::Interp", - "loc": null, - "children": { - "value": { - "kind": "MultilineString::Interp::ElemList", - "loc": null, - "children": [ - { - "kind": "InterpElem::Source", - "loc": null, - "children": { - "source": "true" - } - }, - { - "kind": "InterpElem::Literal", - "loc": null, - "children": { - "repr": "," - } - }, - { - "kind": "InterpElem::Source", - "loc": null, - "children": { - "source": "false" - } - }, - { - "kind": "InterpElem::Literal", - "loc": null, - "children": { - "repr": " : Bool" - } - } - ] - } - } - }, - { - "kind": "MultilineString::Interp", - "loc": null, - "children": { - "value": { - "kind": "MultilineString::Interp::ElemList", - "loc": null, - "children": [ - { - "kind": "InterpElem::Source", - "loc": null, - "children": { - "source": "IntConst" - } - }, - { - "kind": "InterpElem::Literal", - "loc": null, - "children": { - "repr": " : Int" - } - } - ] - } - } - }, - { - "kind": "MultilineString::Interp", - "loc": null, - "children": { - "value": { - "kind": "MultilineString::Interp::ElemList", - "loc": null, - "children": [ - { - "kind": "InterpElem::Source", - "loc": null, - "children": { - "source": "ByteConst" - } - }, - { - "kind": "InterpElem::Literal", - "loc": null, - "children": { - "repr": " : Byte" - } - } - ] - } - } - }, - { - "kind": "MultilineString::Interp", - "loc": null, - "children": { - "value": { - "kind": "MultilineString::Interp::ElemList", - "loc": null, - "children": [ - { - "kind": "InterpElem::Source", - "loc": null, - "children": { - "source": "Int64Const" - } - }, - { - "kind": "InterpElem::Literal", - "loc": null, - "children": { - "repr": " : Int64" - } - } - ] - } - } - }, - { - "kind": "MultilineString::Interp", - "loc": null, - "children": { - "value": { - "kind": "MultilineString::Interp::ElemList", - "loc": null, - "children": [ - { - "kind": "InterpElem::Source", - "loc": null, - "children": { - "source": "UIntConst" - } - }, - { - "kind": "InterpElem::Literal", - "loc": null, - "children": { - "repr": " : UInt" - } - } - ] - } - } - }, - { - "kind": "MultilineString::Interp", - "loc": null, - "children": { - "value": { - "kind": "MultilineString::Interp::ElemList", - "loc": null, - "children": [ - { - "kind": "InterpElem::Source", - "loc": null, - "children": { - "source": "UInt64Const" - } - }, - { - "kind": "InterpElem::Literal", - "loc": null, - "children": { - "repr": " : UInt64" - } - } - ] - } - } - }, - { - "kind": "MultilineString::Interp", - "loc": null, - "children": { - "value": { - "kind": "MultilineString::Interp::ElemList", - "loc": null, - "children": [ - { - "kind": "InterpElem::Source", - "loc": null, - "children": { - "source": "CharConst" - } - }, - { - "kind": "InterpElem::Literal", - "loc": null, - "children": { - "repr": " : Char" - } - } - ] - } - } - }, - { - "kind": "MultilineString::Interp", - "loc": null, - "children": { - "value": { - "kind": "MultilineString::Interp::ElemList", - "loc": null, - "children": [ - { - "kind": "InterpElem::Source", - "loc": null, - "children": { - "source": "StringConst" - } - }, - { - "kind": "InterpElem::Literal", - "loc": null, - "children": { - "repr": " : String" - } - } - ] - } - } - } - ] - } - } - }, - "vis": { - "kind": "Visibility::Default", - "loc": null, - "children": {} - }, - "is_constant": false, - "is_declare": false, - "attrs": { - "kind": "Impl::TopLetDef::AttrList", - "loc": null, - "children": [] - }, - "doc": "" - } - }, { "kind": "Impl::TopFuncDef", "loc": null, @@ -1062,31 +53,237 @@ "children": [] }, "expr": { - "kind": "Expr::Sequence", + "kind": "Expr::Let", "loc": null, "children": { - "exprs": { - "kind": "Expr::Sequence::ExprList", + "pattern": { + "kind": "Pattern::Constraint", + "loc": null, + "children": { + "pat": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "r1" + } + } + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Ref" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [ + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Int" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + ] + } + } + } + } + }, + "expr": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Ref" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::NoExtraInfo", + "loc": null, + "children": {} + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "34" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "body": { + "kind": "Expr::Let", "loc": null, - "children": [ - { + "children": { + "pattern": { + "kind": "Pattern::Constraint", + "loc": null, + "children": { + "pat": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "r2" + } + } + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Ref" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [ + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "UInt" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + ] + } + } + } + } + }, + "expr": { "kind": "Expr::Apply", "loc": null, "children": { "func": { - "kind": "Expr::Ident", + "kind": "Expr::Constr", "loc": null, "children": { - "id": { - "kind": "Var", + "constr": { + "kind": "Constructor", "loc": null, "children": { "name": { - "kind": "LongIdent::Ident", + "kind": "ConstrName", "loc": null, "children": { - "value": "println" + "name": "Ref" } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::NoExtraInfo", + "loc": null, + "children": {} } } } @@ -1101,25 +298,14 @@ "loc": null, "children": { "value": { - "kind": "Expr::Constr", + "kind": "Expr::Constant", "loc": null, "children": { - "constr": { - "kind": "Constructor", + "constant": { + "kind": "Constant::Int", "loc": null, "children": { - "name": { - "kind": "ConstrName", - "loc": null, - "children": { - "name": "Interp" - } - }, - "extra_info": { - "kind": "ConstructorExtraInfo::NoExtraInfo", - "loc": null, - "children": {} - } + "value": "34" } } } @@ -1139,65 +325,222 @@ "children": {} } } - } - ] - }, - "last_expr": { - "kind": "Expr::Apply", - "loc": null, - "children": { - "func": { - "kind": "Expr::Ident", + }, + "body": { + "kind": "Expr::Let", "loc": null, "children": { - "id": { - "kind": "Var", + "pattern": { + "kind": "Pattern::Constraint", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", + "pat": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "r3" + } + } + } + }, + "ty": { + "kind": "Type::Name", "loc": null, "children": { - "value": "println" + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Ref" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [ + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Int64" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + ] + } } } } - } - } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", - "loc": null, - "children": [ - { - "kind": "Argument", + }, + "expr": { + "kind": "Expr::Apply", "loc": null, "children": { - "value": { - "kind": "Expr::Is", + "func": { + "kind": "Expr::Constr", "loc": null, "children": { - "expr": { - "kind": "Expr::Ident", + "constr": { + "kind": "Constructor", "loc": null, "children": { - "id": { - "kind": "Var", + "name": { + "kind": "ConstrName", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", + "name": "Ref" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::NoExtraInfo", + "loc": null, + "children": {} + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", "loc": null, "children": { - "value": "interp" + "value": "34" } } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } } - }, + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "body": { + "kind": "Expr::Let", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Constraint", + "loc": null, + "children": { "pat": { - "kind": "Pattern::Constr", + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "r4" + } + } + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Ref" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [ + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "UInt64" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + ] + } + } + } + } + }, + "expr": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Constr", "loc": null, "children": { "constr": { @@ -1208,7 +551,7 @@ "kind": "ConstrName", "loc": null, "children": { - "name": "Interp" + "name": "Ref" } }, "extra_info": { @@ -1217,26 +560,989 @@ "children": {} } } - }, - "args": null, - "is_open": false + } } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "34" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} } } }, - "kind": { - "kind": "ArgumentKind::Positional", + "body": { + "kind": "Expr::Let", "loc": null, - "children": {} + "children": { + "pattern": { + "kind": "Pattern::Constraint", + "loc": null, + "children": { + "pat": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "r5" + } + } + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Ref" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [ + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Char" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + ] + } + } + } + } + }, + "expr": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Ref" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::NoExtraInfo", + "loc": null, + "children": {} + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Char", + "loc": null, + "children": { + "value": "d" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "body": { + "kind": "Expr::Let", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Constraint", + "loc": null, + "children": { + "pat": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "r6" + } + } + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Ref" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [ + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Byte" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + ] + } + } + } + } + }, + "expr": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Ref" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::NoExtraInfo", + "loc": null, + "children": {} + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Byte", + "loc": null, + "children": { + "value": "d" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "body": { + "kind": "Expr::Let", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Constraint", + "loc": null, + "children": { + "pat": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "r7" + } + } + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Ref" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [ + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "String" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + ] + } + } + } + } + }, + "expr": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Ref" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::NoExtraInfo", + "loc": null, + "children": {} + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "cd" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "body": { + "kind": "Expr::Sequence", + "loc": null, + "children": { + "exprs": { + "kind": "Expr::Sequence::ExprList", + "loc": null, + "children": [ + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::BytesInterp", + "loc": null, + "children": { + "elems": { + "kind": "Expr::BytesInterp::ElemList", + "loc": null, + "children": [ + { + "kind": "InterpElem::Literal", + "loc": null, + "children": { + "repr": "12" + } + }, + { + "kind": "InterpElem::Source", + "loc": null, + "children": { + "source": "r1.val" + } + } + ] + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::BytesInterp", + "loc": null, + "children": { + "elems": { + "kind": "Expr::BytesInterp::ElemList", + "loc": null, + "children": [ + { + "kind": "InterpElem::Literal", + "loc": null, + "children": { + "repr": "12" + } + }, + { + "kind": "InterpElem::Source", + "loc": null, + "children": { + "source": "r2.val" + } + } + ] + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::BytesInterp", + "loc": null, + "children": { + "elems": { + "kind": "Expr::BytesInterp::ElemList", + "loc": null, + "children": [ + { + "kind": "InterpElem::Literal", + "loc": null, + "children": { + "repr": "12" + } + }, + { + "kind": "InterpElem::Source", + "loc": null, + "children": { + "source": "r3.val" + } + } + ] + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::BytesInterp", + "loc": null, + "children": { + "elems": { + "kind": "Expr::BytesInterp::ElemList", + "loc": null, + "children": [ + { + "kind": "InterpElem::Literal", + "loc": null, + "children": { + "repr": "12" + } + }, + { + "kind": "InterpElem::Source", + "loc": null, + "children": { + "source": "r4.val" + } + } + ] + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::BytesInterp", + "loc": null, + "children": { + "elems": { + "kind": "Expr::BytesInterp::ElemList", + "loc": null, + "children": [ + { + "kind": "InterpElem::Literal", + "loc": null, + "children": { + "repr": "abc" + } + }, + { + "kind": "InterpElem::Source", + "loc": null, + "children": { + "source": "r5.val" + } + } + ] + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::BytesInterp", + "loc": null, + "children": { + "elems": { + "kind": "Expr::BytesInterp::ElemList", + "loc": null, + "children": [ + { + "kind": "InterpElem::Literal", + "loc": null, + "children": { + "repr": "abc" + } + }, + { + "kind": "InterpElem::Source", + "loc": null, + "children": { + "source": "r6.val" + } + } + ] + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + ] + }, + "last_expr": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::BytesInterp", + "loc": null, + "children": { + "elems": { + "kind": "Expr::BytesInterp::ElemList", + "loc": null, + "children": [ + { + "kind": "InterpElem::Literal", + "loc": null, + "children": { + "repr": "ab" + } + }, + { + "kind": "InterpElem::Source", + "loc": null, + "children": { + "source": "r7.val" + } + } + ] + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + } + } + } + } + } } } } - ] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} + } } } } diff --git a/test/sync_test/__snapshot__/pipeline_test_interp_const.mbt b/test/sync_test/__snapshot__/pipeline_test_interp_const.mbt index 865818fe..dedb4b3d 100644 --- a/test/sync_test/__snapshot__/pipeline_test_interp_const.mbt +++ b/test/sync_test/__snapshot__/pipeline_test_interp_const.mbt @@ -1,48 +1,16 @@ -///| -const IntConst : Int = 42 - -///| -const ByteConst : Byte = 42 - -///| -const StringConst : String = "😆😆" - -///| -const CharConst : Char = '→' - -///| -const Int64Const : Int64 = 42 - -///| -const UIntConst : UInt = 42 - -///| -const UInt64Const : UInt64 = 42 - -///| -const Interp : String = - $|\{true},\{false} : Bool - $|\{IntConst} : Int - $|\{ByteConst} : Byte - $|\{Int64Const} : Int64 - $|\{UIntConst} : UInt - $|\{UInt64Const} : UInt64 - $|\{CharConst} : Char - $|\{StringConst} : String - -///| -let interp : String = - $|\{true},\{false} : Bool - $|\{IntConst} : Int - $|\{ByteConst} : Byte - $|\{Int64Const} : Int64 - $|\{UIntConst} : UInt - $|\{UInt64Const} : UInt64 - $|\{CharConst} : Char - $|\{StringConst} : String - -///| fn main { - println(Interp) - println(interp is Interp) + let r1 : Ref[Int] = Ref(34) + let r2 : Ref[UInt] = Ref(34) + let r3 : Ref[Int64] = Ref(34) + let r4 : Ref[UInt64] = Ref(34) + let r5 : Ref[Char] = Ref('d') + let r6 : Ref[Byte] = Ref(b'd') + let r7 : Ref[String] = Ref("cd") + println(b"12\{r1.val}") + println(b"12\{r2.val}") + println(b"12\{r3.val}") + println(b"12\{r4.val}") + println(b"abc\{r5.val}") + println(b"abc\{r6.val}") + println(b"ab\{r7.val}") } diff --git a/test/sync_test/__snapshot__/pipeline_test_interp_const.mbt.tokens.json b/test/sync_test/__snapshot__/pipeline_test_interp_const.mbt.tokens.json index 5a69ecad..ce31ce40 100644 --- a/test/sync_test/__snapshot__/pipeline_test_interp_const.mbt.tokens.json +++ b/test/sync_test/__snapshot__/pipeline_test_interp_const.mbt.tokens.json @@ -1,914 +1,782 @@ [ + { + "token": "FN", + "loc": "1:1-1:3" + }, { "token": [ - "COMMENT", - { - "content": "///|", - "kind": [ - "Ownline", - { - "leading_blank_line": false, - "trailing_blank_line": false - } - ], - "consumed_by_docstring": false - } + "LIDENT", + "main" ], - "loc": "1:1-1:5" + "loc": "1:4-1:8" + }, + { + "token": "LBRACE", + "loc": "1:9-1:10" }, { "token": "NEWLINE", - "loc": "1:5-1:6" + "loc": "1:10-1:11" }, { - "token": "CONST", - "loc": "2:1-2:6" + "token": "LET", + "loc": "2:3-2:6" }, { "token": [ - "UIDENT", - "IntConst" + "LIDENT", + "r1" ], - "loc": "2:7-2:15" + "loc": "2:7-2:9" }, { "token": "COLON", - "loc": "2:16-2:17" + "loc": "2:10-2:11" }, { "token": [ "UIDENT", - "Int" + "Ref" ], - "loc": "2:18-2:21" + "loc": "2:12-2:15" }, { - "token": "EQUAL", - "loc": "2:22-2:23" - }, - { - "token": [ - "INT", - "42" - ], - "loc": "2:24-2:26" + "token": "LBRACKET", + "loc": "2:15-2:16" }, { "token": [ - "SEMI", - false - ], - "loc": "2:26-2:26" - }, - { - "token": "NEWLINE", - "loc": "2:26-2:27" - }, - { - "token": "NEWLINE", - "loc": "3:1-3:2" - }, - { - "token": [ - "COMMENT", - { - "content": "///|", - "kind": [ - "Ownline", - { - "leading_blank_line": true, - "trailing_blank_line": false - } - ], - "consumed_by_docstring": false - } + "UIDENT", + "Int" ], - "loc": "4:1-4:5" + "loc": "2:16-2:19" }, { - "token": "NEWLINE", - "loc": "4:5-4:6" + "token": "RBRACKET", + "loc": "2:19-2:20" }, { - "token": "CONST", - "loc": "5:1-5:6" + "token": "EQUAL", + "loc": "2:21-2:22" }, { "token": [ "UIDENT", - "ByteConst" + "Ref" ], - "loc": "5:7-5:16" + "loc": "2:23-2:26" }, { - "token": "COLON", - "loc": "5:17-5:18" + "token": "LPAREN", + "loc": "2:26-2:27" }, { "token": [ - "UIDENT", - "Byte" + "INT", + "34" ], - "loc": "5:19-5:23" - }, - { - "token": "EQUAL", - "loc": "5:24-5:25" + "loc": "2:27-2:29" }, { - "token": [ - "INT", - "42" - ], - "loc": "5:26-5:28" + "token": "RPAREN", + "loc": "2:29-2:30" }, { "token": [ "SEMI", false ], - "loc": "5:28-5:28" + "loc": "2:30-2:30" }, { "token": "NEWLINE", - "loc": "5:28-5:29" + "loc": "2:30-2:31" }, { - "token": "NEWLINE", - "loc": "6:1-6:2" + "token": "LET", + "loc": "3:3-3:6" }, { "token": [ - "COMMENT", - { - "content": "///|", - "kind": [ - "Ownline", - { - "leading_blank_line": true, - "trailing_blank_line": false - } - ], - "consumed_by_docstring": false - } + "LIDENT", + "r2" ], - "loc": "7:1-7:5" + "loc": "3:7-3:9" }, { - "token": "NEWLINE", - "loc": "7:5-7:6" - }, - { - "token": "CONST", - "loc": "8:1-8:6" + "token": "COLON", + "loc": "3:10-3:11" }, { "token": [ "UIDENT", - "StringConst" + "Ref" ], - "loc": "8:7-8:18" + "loc": "3:12-3:15" }, { - "token": "COLON", - "loc": "8:19-8:20" + "token": "LBRACKET", + "loc": "3:15-3:16" }, { "token": [ "UIDENT", - "String" + "UInt" ], - "loc": "8:21-8:27" + "loc": "3:16-3:20" + }, + { + "token": "RBRACKET", + "loc": "3:20-3:21" }, { "token": "EQUAL", - "loc": "8:28-8:29" + "loc": "3:22-3:23" }, { "token": [ - "STRING", - "😆😆" + "UIDENT", + "Ref" ], - "loc": "8:30-8:34" + "loc": "3:24-3:27" }, { - "token": [ - "SEMI", - false - ], - "loc": "8:34-8:34" + "token": "LPAREN", + "loc": "3:27-3:28" }, { - "token": "NEWLINE", - "loc": "8:34-8:35" + "token": [ + "INT", + "34" + ], + "loc": "3:28-3:30" }, { - "token": "NEWLINE", - "loc": "9:1-9:2" + "token": "RPAREN", + "loc": "3:30-3:31" }, { "token": [ - "COMMENT", - { - "content": "///|", - "kind": [ - "Ownline", - { - "leading_blank_line": true, - "trailing_blank_line": false - } - ], - "consumed_by_docstring": false - } + "SEMI", + false ], - "loc": "10:1-10:5" + "loc": "3:31-3:31" }, { "token": "NEWLINE", - "loc": "10:5-10:6" + "loc": "3:31-3:32" }, { - "token": "CONST", - "loc": "11:1-11:6" + "token": "LET", + "loc": "4:3-4:6" }, { "token": [ - "UIDENT", - "CharConst" + "LIDENT", + "r3" ], - "loc": "11:7-11:16" + "loc": "4:7-4:9" }, { "token": "COLON", - "loc": "11:17-11:18" + "loc": "4:10-4:11" }, { "token": [ "UIDENT", - "Char" + "Ref" ], - "loc": "11:19-11:23" + "loc": "4:12-4:15" }, { - "token": "EQUAL", - "loc": "11:24-11:25" - }, - { - "token": [ - "CHAR", - "→" - ], - "loc": "11:26-11:29" + "token": "LBRACKET", + "loc": "4:15-4:16" }, { "token": [ - "SEMI", - false - ], - "loc": "11:29-11:29" - }, - { - "token": "NEWLINE", - "loc": "11:29-11:30" - }, - { - "token": "NEWLINE", - "loc": "12:1-12:2" - }, - { - "token": [ - "COMMENT", - { - "content": "///|", - "kind": [ - "Ownline", - { - "leading_blank_line": true, - "trailing_blank_line": false - } - ], - "consumed_by_docstring": false - } + "UIDENT", + "Int64" ], - "loc": "13:1-13:5" + "loc": "4:16-4:21" }, { - "token": "NEWLINE", - "loc": "13:5-13:6" + "token": "RBRACKET", + "loc": "4:21-4:22" }, { - "token": "CONST", - "loc": "14:1-14:6" + "token": "EQUAL", + "loc": "4:23-4:24" }, { "token": [ "UIDENT", - "Int64Const" + "Ref" ], - "loc": "14:7-14:17" + "loc": "4:25-4:28" }, { - "token": "COLON", - "loc": "14:18-14:19" + "token": "LPAREN", + "loc": "4:28-4:29" }, { "token": [ - "UIDENT", - "Int64" + "INT", + "34" ], - "loc": "14:20-14:25" + "loc": "4:29-4:31" }, { - "token": "EQUAL", - "loc": "14:26-14:27" - }, - { - "token": [ - "INT", - "42" - ], - "loc": "14:28-14:30" + "token": "RPAREN", + "loc": "4:31-4:32" }, { "token": [ "SEMI", false ], - "loc": "14:30-14:30" + "loc": "4:32-4:32" }, { "token": "NEWLINE", - "loc": "14:30-14:31" + "loc": "4:32-4:33" }, { - "token": "NEWLINE", - "loc": "15:1-15:2" + "token": "LET", + "loc": "5:3-5:6" }, { "token": [ - "COMMENT", - { - "content": "///|", - "kind": [ - "Ownline", - { - "leading_blank_line": true, - "trailing_blank_line": false - } - ], - "consumed_by_docstring": false - } + "LIDENT", + "r4" ], - "loc": "16:1-16:5" + "loc": "5:7-5:9" }, { - "token": "NEWLINE", - "loc": "16:5-16:6" + "token": "COLON", + "loc": "5:10-5:11" }, { - "token": "CONST", - "loc": "17:1-17:6" + "token": [ + "UIDENT", + "Ref" + ], + "loc": "5:12-5:15" + }, + { + "token": "LBRACKET", + "loc": "5:15-5:16" }, { "token": [ "UIDENT", - "UIntConst" + "UInt64" ], - "loc": "17:7-17:16" + "loc": "5:16-5:22" }, { - "token": "COLON", - "loc": "17:17-17:18" + "token": "RBRACKET", + "loc": "5:22-5:23" + }, + { + "token": "EQUAL", + "loc": "5:24-5:25" }, { "token": [ "UIDENT", - "UInt" + "Ref" ], - "loc": "17:19-17:23" + "loc": "5:26-5:29" }, { - "token": "EQUAL", - "loc": "17:24-17:25" + "token": "LPAREN", + "loc": "5:29-5:30" }, { "token": [ "INT", - "42" + "34" ], - "loc": "17:26-17:28" + "loc": "5:30-5:32" + }, + { + "token": "RPAREN", + "loc": "5:32-5:33" }, { "token": [ "SEMI", false ], - "loc": "17:28-17:28" + "loc": "5:33-5:33" }, { "token": "NEWLINE", - "loc": "17:28-17:29" + "loc": "5:33-5:34" }, { - "token": "NEWLINE", - "loc": "18:1-18:2" + "token": "LET", + "loc": "6:3-6:6" }, { "token": [ - "COMMENT", - { - "content": "///|", - "kind": [ - "Ownline", - { - "leading_blank_line": true, - "trailing_blank_line": false - } - ], - "consumed_by_docstring": false - } + "LIDENT", + "r5" ], - "loc": "19:1-19:5" + "loc": "6:7-6:9" }, { - "token": "NEWLINE", - "loc": "19:5-19:6" + "token": "COLON", + "loc": "6:10-6:11" + }, + { + "token": [ + "UIDENT", + "Ref" + ], + "loc": "6:12-6:15" }, { - "token": "CONST", - "loc": "20:1-20:6" + "token": "LBRACKET", + "loc": "6:15-6:16" }, { "token": [ "UIDENT", - "UInt64Const" + "Char" ], - "loc": "20:7-20:18" + "loc": "6:16-6:20" }, { - "token": "COLON", - "loc": "20:19-20:20" + "token": "RBRACKET", + "loc": "6:20-6:21" + }, + { + "token": "EQUAL", + "loc": "6:22-6:23" }, { "token": [ "UIDENT", - "UInt64" + "Ref" ], - "loc": "20:21-20:27" + "loc": "6:24-6:27" }, { - "token": "EQUAL", - "loc": "20:28-20:29" + "token": "LPAREN", + "loc": "6:27-6:28" }, { "token": [ - "INT", - "42" + "CHAR", + "d" ], - "loc": "20:30-20:32" + "loc": "6:28-6:31" + }, + { + "token": "RPAREN", + "loc": "6:31-6:32" }, { "token": [ "SEMI", false ], - "loc": "20:32-20:32" + "loc": "6:32-6:32" }, { "token": "NEWLINE", - "loc": "20:32-20:33" + "loc": "6:32-6:33" }, { - "token": "NEWLINE", - "loc": "21:1-21:2" + "token": "LET", + "loc": "7:3-7:6" }, { "token": [ - "COMMENT", - { - "content": "///|", - "kind": [ - "Ownline", - { - "leading_blank_line": true, - "trailing_blank_line": false - } - ], - "consumed_by_docstring": false - } + "LIDENT", + "r6" ], - "loc": "22:1-22:5" + "loc": "7:7-7:9" }, { - "token": "NEWLINE", - "loc": "22:5-22:6" - }, - { - "token": "CONST", - "loc": "23:1-23:6" + "token": "COLON", + "loc": "7:10-7:11" }, { "token": [ "UIDENT", - "Interp" + "Ref" ], - "loc": "23:7-23:13" + "loc": "7:12-7:15" }, { - "token": "COLON", - "loc": "23:14-23:15" + "token": "LBRACKET", + "loc": "7:15-7:16" }, { "token": [ "UIDENT", - "String" + "Byte" ], - "loc": "23:16-23:22" + "loc": "7:16-7:20" }, { - "token": "EQUAL", - "loc": "23:23-23:24" + "token": "RBRACKET", + "loc": "7:20-7:21" }, { - "token": "NEWLINE", - "loc": "23:24-23:25" + "token": "EQUAL", + "loc": "7:22-7:23" }, { "token": [ - "MULTILINE_INTERP", - "\"\\{true},\\{false} : Bool\"" + "UIDENT", + "Ref" ], - "loc": "24:3-24:28" + "loc": "7:24-7:27" }, { - "token": "NEWLINE", - "loc": "24:28-24:29" + "token": "LPAREN", + "loc": "7:27-7:28" }, { "token": [ - "MULTILINE_INTERP", - "\"\\{IntConst} : Int\"" + "BYTE", + "d" ], - "loc": "25:3-25:22" + "loc": "7:28-7:32" }, { - "token": "NEWLINE", - "loc": "25:22-25:23" + "token": "RPAREN", + "loc": "7:32-7:33" }, { "token": [ - "MULTILINE_INTERP", - "\"\\{ByteConst} : Byte\"" + "SEMI", + false ], - "loc": "26:3-26:24" + "loc": "7:33-7:33" }, { "token": "NEWLINE", - "loc": "26:24-26:25" + "loc": "7:33-7:34" + }, + { + "token": "LET", + "loc": "8:3-8:6" }, { "token": [ - "MULTILINE_INTERP", - "\"\\{Int64Const} : Int64\"" + "LIDENT", + "r7" ], - "loc": "27:3-27:26" + "loc": "8:7-8:9" }, { - "token": "NEWLINE", - "loc": "27:26-27:27" + "token": "COLON", + "loc": "8:10-8:11" }, { "token": [ - "MULTILINE_INTERP", - "\"\\{UIntConst} : UInt\"" + "UIDENT", + "Ref" ], - "loc": "28:3-28:24" + "loc": "8:12-8:15" }, { - "token": "NEWLINE", - "loc": "28:24-28:25" + "token": "LBRACKET", + "loc": "8:15-8:16" }, { "token": [ - "MULTILINE_INTERP", - "\"\\{UInt64Const} : UInt64\"" + "UIDENT", + "String" ], - "loc": "29:3-29:28" + "loc": "8:16-8:22" }, { - "token": "NEWLINE", - "loc": "29:28-29:29" + "token": "RBRACKET", + "loc": "8:22-8:23" + }, + { + "token": "EQUAL", + "loc": "8:24-8:25" }, { "token": [ - "MULTILINE_INTERP", - "\"\\{CharConst} : Char\"" + "UIDENT", + "Ref" ], - "loc": "30:3-30:24" + "loc": "8:26-8:29" }, { - "token": "NEWLINE", - "loc": "30:24-30:25" + "token": "LPAREN", + "loc": "8:29-8:30" }, { "token": [ - "MULTILINE_INTERP", - "\"\\{StringConst} : String\"" + "STRING", + "cd" ], - "loc": "31:3-31:28" + "loc": "8:30-8:34" + }, + { + "token": "RPAREN", + "loc": "8:34-8:35" }, { "token": [ "SEMI", false ], - "loc": "31:28-31:28" + "loc": "8:35-8:35" }, { "token": "NEWLINE", - "loc": "31:28-31:29" - }, - { - "token": "NEWLINE", - "loc": "32:1-32:2" + "loc": "8:35-8:36" }, { "token": [ - "COMMENT", - { - "content": "///|", - "kind": [ - "Ownline", - { - "leading_blank_line": true, - "trailing_blank_line": false - } - ], - "consumed_by_docstring": false - } + "LIDENT", + "println" ], - "loc": "33:1-33:5" + "loc": "9:3-9:10" }, { - "token": "NEWLINE", - "loc": "33:5-33:6" - }, - { - "token": "LET", - "loc": "34:1-34:4" + "token": "LPAREN", + "loc": "9:10-9:11" }, { "token": [ - "LIDENT", - "interp" + "BYTES_INTERP", + "\"12\\{r1.val}\"" ], - "loc": "34:5-34:11" + "loc": "9:11-9:25" }, { - "token": "COLON", - "loc": "34:12-34:13" + "token": "RPAREN", + "loc": "9:25-9:26" }, { "token": [ - "UIDENT", - "String" + "SEMI", + false ], - "loc": "34:14-34:20" - }, - { - "token": "EQUAL", - "loc": "34:21-34:22" + "loc": "9:26-9:26" }, { "token": "NEWLINE", - "loc": "34:22-34:23" + "loc": "9:26-9:27" }, { "token": [ - "MULTILINE_INTERP", - "\"\\{true},\\{false} : Bool\"" + "LIDENT", + "println" ], - "loc": "35:3-35:28" + "loc": "10:3-10:10" }, { - "token": "NEWLINE", - "loc": "35:28-35:29" + "token": "LPAREN", + "loc": "10:10-10:11" }, { "token": [ - "MULTILINE_INTERP", - "\"\\{IntConst} : Int\"" + "BYTES_INTERP", + "\"12\\{r2.val}\"" ], - "loc": "36:3-36:22" + "loc": "10:11-10:25" }, { - "token": "NEWLINE", - "loc": "36:22-36:23" + "token": "RPAREN", + "loc": "10:25-10:26" }, { "token": [ - "MULTILINE_INTERP", - "\"\\{ByteConst} : Byte\"" + "SEMI", + false ], - "loc": "37:3-37:24" + "loc": "10:26-10:26" }, { "token": "NEWLINE", - "loc": "37:24-37:25" + "loc": "10:26-10:27" }, { "token": [ - "MULTILINE_INTERP", - "\"\\{Int64Const} : Int64\"" + "LIDENT", + "println" ], - "loc": "38:3-38:26" + "loc": "11:3-11:10" }, { - "token": "NEWLINE", - "loc": "38:26-38:27" + "token": "LPAREN", + "loc": "11:10-11:11" }, { "token": [ - "MULTILINE_INTERP", - "\"\\{UIntConst} : UInt\"" + "BYTES_INTERP", + "\"12\\{r3.val}\"" ], - "loc": "39:3-39:24" + "loc": "11:11-11:25" }, { - "token": "NEWLINE", - "loc": "39:24-39:25" + "token": "RPAREN", + "loc": "11:25-11:26" }, { "token": [ - "MULTILINE_INTERP", - "\"\\{UInt64Const} : UInt64\"" + "SEMI", + false ], - "loc": "40:3-40:28" + "loc": "11:26-11:26" }, { "token": "NEWLINE", - "loc": "40:28-40:29" + "loc": "11:26-11:27" }, { "token": [ - "MULTILINE_INTERP", - "\"\\{CharConst} : Char\"" + "LIDENT", + "println" ], - "loc": "41:3-41:24" + "loc": "12:3-12:10" }, { - "token": "NEWLINE", - "loc": "41:24-41:25" + "token": "LPAREN", + "loc": "12:10-12:11" }, { "token": [ - "MULTILINE_INTERP", - "\"\\{StringConst} : String\"" + "BYTES_INTERP", + "\"12\\{r4.val}\"" ], - "loc": "42:3-42:28" + "loc": "12:11-12:25" + }, + { + "token": "RPAREN", + "loc": "12:25-12:26" }, { "token": [ "SEMI", false ], - "loc": "42:28-42:28" + "loc": "12:26-12:26" }, { "token": "NEWLINE", - "loc": "42:28-42:29" - }, - { - "token": "NEWLINE", - "loc": "43:1-43:2" + "loc": "12:26-12:27" }, { "token": [ - "COMMENT", - { - "content": "///|", - "kind": [ - "Ownline", - { - "leading_blank_line": true, - "trailing_blank_line": false - } - ], - "consumed_by_docstring": false - } + "LIDENT", + "println" ], - "loc": "44:1-44:5" + "loc": "13:3-13:10" }, { - "token": "NEWLINE", - "loc": "44:5-44:6" - }, - { - "token": "FN", - "loc": "45:1-45:3" + "token": "LPAREN", + "loc": "13:10-13:11" }, { "token": [ - "LIDENT", - "main" + "BYTES_INTERP", + "\"abc\\{r5.val}\"" ], - "loc": "45:4-45:8" + "loc": "13:11-13:26" }, { - "token": "LBRACE", - "loc": "45:9-45:10" + "token": "RPAREN", + "loc": "13:26-13:27" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "13:27-13:27" }, { "token": "NEWLINE", - "loc": "45:10-45:11" + "loc": "13:27-13:28" }, { "token": [ "LIDENT", "println" ], - "loc": "46:3-46:10" + "loc": "14:3-14:10" }, { "token": "LPAREN", - "loc": "46:10-46:11" + "loc": "14:10-14:11" }, { "token": [ - "UIDENT", - "Interp" + "BYTES_INTERP", + "\"abc\\{r6.val}\"" ], - "loc": "46:11-46:17" + "loc": "14:11-14:26" }, { "token": "RPAREN", - "loc": "46:17-46:18" + "loc": "14:26-14:27" }, { "token": [ "SEMI", false ], - "loc": "46:18-46:18" + "loc": "14:27-14:27" }, { "token": "NEWLINE", - "loc": "46:18-46:19" + "loc": "14:27-14:28" }, { "token": [ "LIDENT", "println" ], - "loc": "47:3-47:10" + "loc": "15:3-15:10" }, { "token": "LPAREN", - "loc": "47:10-47:11" + "loc": "15:10-15:11" }, { "token": [ - "LIDENT", - "interp" - ], - "loc": "47:11-47:17" - }, - { - "token": "IS", - "loc": "47:18-47:20" - }, - { - "token": [ - "UIDENT", - "Interp" + "BYTES_INTERP", + "\"ab\\{r7.val}\"" ], - "loc": "47:21-47:27" + "loc": "15:11-15:25" }, { "token": "RPAREN", - "loc": "47:27-47:28" + "loc": "15:25-15:26" }, { "token": "NEWLINE", - "loc": "47:28-47:29" + "loc": "15:26-15:27" }, { "token": "RBRACE", - "loc": "48:1-48:2" + "loc": "16:1-16:2" }, { "token": [ "SEMI", false ], - "loc": "48:2-48:2" + "loc": "16:2-16:2" }, { "token": "NEWLINE", - "loc": "48:2-48:3" + "loc": "16:2-16:3" }, { "token": "EOF", - "loc": "49:1-49:1" + "loc": "17:1-17:1" } ] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/pipeline_test_intrinsic_callback2.json b/test/sync_test/__snapshot__/pipeline_test_intrinsic_callback2.json index fa08f8c3..b661d20e 100644 --- a/test/sync_test/__snapshot__/pipeline_test_intrinsic_callback2.json +++ b/test/sync_test/__snapshot__/pipeline_test_intrinsic_callback2.json @@ -231,6 +231,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, @@ -407,6 +412,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, diff --git a/test/sync_test/__snapshot__/pipeline_test_is_expr.json b/test/sync_test/__snapshot__/pipeline_test_is_expr.json index 667ad092..62ad1708 100644 --- a/test/sync_test/__snapshot__/pipeline_test_is_expr.json +++ b/test/sync_test/__snapshot__/pipeline_test_is_expr.json @@ -3785,7 +3785,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -3857,7 +3858,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -3944,7 +3946,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { diff --git a/test/sync_test/__snapshot__/pipeline_test_is_expr_no_binder.json b/test/sync_test/__snapshot__/pipeline_test_is_expr_no_binder.json index e5bd591f..c99aa242 100644 --- a/test/sync_test/__snapshot__/pipeline_test_is_expr_no_binder.json +++ b/test/sync_test/__snapshot__/pipeline_test_is_expr_no_binder.json @@ -2367,7 +2367,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { diff --git a/test/sync_test/__snapshot__/pipeline_test_is_in_for_cond.json b/test/sync_test/__snapshot__/pipeline_test_is_in_for_cond.json index 3302de2d..700af5f6 100644 --- a/test/sync_test/__snapshot__/pipeline_test_is_in_for_cond.json +++ b/test/sync_test/__snapshot__/pipeline_test_is_in_for_cond.json @@ -1080,7 +1080,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { @@ -2291,7 +2292,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { @@ -2938,7 +2940,8 @@ } } ] - } + }, + "is_iter": false } }, { @@ -2976,7 +2979,8 @@ } } ] - } + }, + "is_iter": false } }, { @@ -3014,11 +3018,13 @@ } } ] - } + }, + "is_iter": false } } ] - } + }, + "is_iter": false } }, "body": { @@ -5366,7 +5372,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { @@ -8539,7 +8546,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { @@ -9348,7 +9356,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { diff --git a/test/sync_test/__snapshot__/pipeline_test_issue915.json b/test/sync_test/__snapshot__/pipeline_test_issue915.json index 3ef0a205..293ac114 100644 --- a/test/sync_test/__snapshot__/pipeline_test_issue915.json +++ b/test/sync_test/__snapshot__/pipeline_test_issue915.json @@ -505,7 +505,8 @@ } } ] - } + }, + "is_iter": false } }, "ty": { @@ -966,6 +967,11 @@ } ] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, @@ -1114,6 +1120,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, diff --git a/test/sync_test/__snapshot__/pipeline_test_iter.json b/test/sync_test/__snapshot__/pipeline_test_iter.json index c0351302..5286cb7b 100644 --- a/test/sync_test/__snapshot__/pipeline_test_iter.json +++ b/test/sync_test/__snapshot__/pipeline_test_iter.json @@ -1588,7 +1588,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { diff --git a/test/sync_test/__snapshot__/pipeline_test_iter2.json b/test/sync_test/__snapshot__/pipeline_test_iter2.json index 784f89e4..19d28255 100644 --- a/test/sync_test/__snapshot__/pipeline_test_iter2.json +++ b/test/sync_test/__snapshot__/pipeline_test_iter2.json @@ -193,7 +193,8 @@ } } ] - } + }, + "is_iter": false } }, "method_name": { @@ -333,7 +334,8 @@ } } ] - } + }, + "is_iter": false } }, "method_name": { diff --git a/test/sync_test/__snapshot__/pipeline_test_iter_by_default_places.json b/test/sync_test/__snapshot__/pipeline_test_iter_by_default_places.json index 24ed7d2b..269b31bb 100644 --- a/test/sync_test/__snapshot__/pipeline_test_iter_by_default_places.json +++ b/test/sync_test/__snapshot__/pipeline_test_iter_by_default_places.json @@ -745,7 +745,8 @@ } } ] - } + }, + "is_iter": false } }, "init": { @@ -1171,13 +1172,15 @@ } } ] - } + }, + "is_iter": false } } } } ] - } + }, + "is_iter": true } }, "body": { diff --git a/test/sync_test/__snapshot__/pipeline_test_iter_by_default_places.mbt b/test/sync_test/__snapshot__/pipeline_test_iter_by_default_places.mbt index 8b00a5aa..7342851a 100644 --- a/test/sync_test/__snapshot__/pipeline_test_iter_by_default_places.mbt +++ b/test/sync_test/__snapshot__/pipeline_test_iter_by_default_places.mbt @@ -10,7 +10,7 @@ fn main { println("loop: got element \{x}") } println("========") - let it : Iter[Int] = [..tapped_range(0, 2), ..[..tapped_range(2, 4)]] + let it : Iter[Int] = [| ..tapped_range(0, 2), ..[..tapped_range(2, 4)] |] println("finished evaluating the iter") for x in it { println("loop: got element \{x}") diff --git a/test/sync_test/__snapshot__/pipeline_test_iter_by_default_places.mbt.tokens.json b/test/sync_test/__snapshot__/pipeline_test_iter_by_default_places.mbt.tokens.json index bdb65a55..28a06f23 100644 --- a/test/sync_test/__snapshot__/pipeline_test_iter_by_default_places.mbt.tokens.json +++ b/test/sync_test/__snapshot__/pipeline_test_iter_by_default_places.mbt.tokens.json @@ -511,113 +511,113 @@ "loc": "13:22-13:23" }, { - "token": "LBRACKET", - "loc": "13:24-13:25" + "token": "LBRACKET_BAR", + "loc": "13:24-13:26" }, { "token": "DOTDOT", - "loc": "13:25-13:27" + "loc": "13:27-13:29" }, { "token": [ "LIDENT", "tapped_range" ], - "loc": "13:27-13:39" + "loc": "13:29-13:41" }, { "token": "LPAREN", - "loc": "13:39-13:40" + "loc": "13:41-13:42" }, { "token": [ "INT", "0" ], - "loc": "13:40-13:41" + "loc": "13:42-13:43" }, { "token": "COMMA", - "loc": "13:41-13:42" + "loc": "13:43-13:44" }, { "token": [ "INT", "2" ], - "loc": "13:43-13:44" + "loc": "13:45-13:46" }, { "token": "RPAREN", - "loc": "13:44-13:45" + "loc": "13:46-13:47" }, { "token": "COMMA", - "loc": "13:45-13:46" + "loc": "13:47-13:48" }, { "token": "DOTDOT", - "loc": "13:47-13:49" + "loc": "13:49-13:51" }, { "token": "LBRACKET", - "loc": "13:49-13:50" + "loc": "13:51-13:52" }, { "token": "DOTDOT", - "loc": "13:50-13:52" + "loc": "13:52-13:54" }, { "token": [ "LIDENT", "tapped_range" ], - "loc": "13:52-13:64" + "loc": "13:54-13:66" }, { "token": "LPAREN", - "loc": "13:64-13:65" + "loc": "13:66-13:67" }, { "token": [ "INT", "2" ], - "loc": "13:65-13:66" + "loc": "13:67-13:68" }, { "token": "COMMA", - "loc": "13:66-13:67" + "loc": "13:68-13:69" }, { "token": [ "INT", "4" ], - "loc": "13:68-13:69" + "loc": "13:70-13:71" }, { "token": "RPAREN", - "loc": "13:69-13:70" + "loc": "13:71-13:72" }, { "token": "RBRACKET", - "loc": "13:70-13:71" + "loc": "13:72-13:73" }, { - "token": "RBRACKET", - "loc": "13:71-13:72" + "token": "BAR_RBRACKET", + "loc": "13:74-13:76" }, { "token": [ "SEMI", false ], - "loc": "13:72-13:72" + "loc": "13:76-13:76" }, { "token": "NEWLINE", - "loc": "13:72-13:73" + "loc": "13:76-13:77" }, { "token": [ diff --git a/test/sync_test/__snapshot__/pipeline_test_iter_fuse.json b/test/sync_test/__snapshot__/pipeline_test_iter_fuse.json index 48bab43c..487a4a22 100644 --- a/test/sync_test/__snapshot__/pipeline_test_iter_fuse.json +++ b/test/sync_test/__snapshot__/pipeline_test_iter_fuse.json @@ -617,7 +617,8 @@ } } ] - } + }, + "is_iter": false } }, "method_name": { @@ -1662,7 +1663,8 @@ } } ] - } + }, + "is_iter": false } }, "method_name": { @@ -2225,7 +2227,8 @@ } } ] - } + }, + "is_iter": false } }, "method_name": { @@ -3240,7 +3243,8 @@ } } ] - } + }, + "is_iter": false } }, "method_name": { @@ -3847,7 +3851,8 @@ } } ] - } + }, + "is_iter": false } }, "method_name": { @@ -5136,7 +5141,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -5498,7 +5504,8 @@ } } ] - } + }, + "is_iter": false } }, "method_name": { @@ -5737,7 +5744,8 @@ } } ] - } + }, + "is_iter": false } }, "method_name": { @@ -6286,7 +6294,8 @@ } } ] - } + }, + "is_iter": false } }, "method_name": { @@ -6376,7 +6385,8 @@ } } ] - } + }, + "is_iter": false } }, "method_name": { @@ -6841,7 +6851,8 @@ } } ] - } + }, + "is_iter": false } }, "method_name": { @@ -6980,7 +6991,8 @@ } } ] - } + }, + "is_iter": false } }, "method_name": { @@ -7219,7 +7231,8 @@ } } ] - } + }, + "is_iter": false } }, "method_name": { @@ -7772,7 +7785,8 @@ } } ] - } + }, + "is_iter": false } }, "method_name": { @@ -7907,7 +7921,8 @@ } } ] - } + }, + "is_iter": false } }, "method_name": { @@ -8432,7 +8447,8 @@ } } ] - } + }, + "is_iter": false } }, "method_name": { diff --git a/test/sync_test/__snapshot__/pipeline_test_iter_literal.json b/test/sync_test/__snapshot__/pipeline_test_iter_literal.json index f9d0913f..8c1e8cf4 100644 --- a/test/sync_test/__snapshot__/pipeline_test_iter_literal.json +++ b/test/sync_test/__snapshot__/pipeline_test_iter_literal.json @@ -1103,7 +1103,8 @@ } } ] - } + }, + "is_iter": true } }, "kind": { @@ -1336,7 +1337,8 @@ } } ] - } + }, + "is_iter": true } }, "kind": { @@ -1808,7 +1810,8 @@ } } ] - } + }, + "is_iter": true } }, "kind": { @@ -2006,7 +2009,8 @@ } } ] - } + }, + "is_iter": true } }, "kind": { @@ -2159,7 +2163,8 @@ } } ] - } + }, + "is_iter": true } }, "kind": { @@ -2486,7 +2491,8 @@ } } ] - } + }, + "is_iter": true } }, "kind": { diff --git a/test/sync_test/__snapshot__/pipeline_test_iter_literal.mbt b/test/sync_test/__snapshot__/pipeline_test_iter_literal.mbt index 49a10381..601ca1dd 100644 --- a/test/sync_test/__snapshot__/pipeline_test_iter_literal.mbt +++ b/test/sync_test/__snapshot__/pipeline_test_iter_literal.mbt @@ -15,25 +15,25 @@ fn[X : Show] tee(x : X) -> X { ///| fn main { println("=====") - dump_iter(Iter::tap([ tee(1), tee(2), tee(3), tee(4) ], println)) + dump_iter(Iter::tap([| tee(1), tee(2), tee(3), tee(4) |], println)) println("=====") { - let it = Iter::tap([ 42, 43, 44 ], println) - dump_iter([ + let it = Iter::tap([| 42, 43, 44 |], println) + dump_iter([| tee(1), tee(2), ..({ println("eval iter"); it }), tee(3), tee(4), - ]) + |]) } println("=====") { - let it1 = Iter::tap([ 1, 2, 3 ], println) - let it2 = Iter::tap([ 4, 5, 6 ], println) - dump_iter([ + let it1 = Iter::tap([| 1, 2, 3 |], println) + let it2 = Iter::tap([| 4, 5, 6 |], println) + dump_iter([| ..({ println("eval iter 1"); it1 }), ..({ println("eval iter 2"); it2 }), - ]) + |]) } } diff --git a/test/sync_test/__snapshot__/pipeline_test_iter_literal.mbt.tokens.json b/test/sync_test/__snapshot__/pipeline_test_iter_literal.mbt.tokens.json index 84419252..7b34dd6e 100644 --- a/test/sync_test/__snapshot__/pipeline_test_iter_literal.mbt.tokens.json +++ b/test/sync_test/__snapshot__/pipeline_test_iter_literal.mbt.tokens.json @@ -510,142 +510,142 @@ "loc": "18:22-18:23" }, { - "token": "LBRACKET", - "loc": "18:23-18:24" + "token": "LBRACKET_BAR", + "loc": "18:23-18:25" }, { "token": [ "LIDENT", "tee" ], - "loc": "18:25-18:28" + "loc": "18:26-18:29" }, { "token": "LPAREN", - "loc": "18:28-18:29" + "loc": "18:29-18:30" }, { "token": [ "INT", "1" ], - "loc": "18:29-18:30" + "loc": "18:30-18:31" }, { "token": "RPAREN", - "loc": "18:30-18:31" + "loc": "18:31-18:32" }, { "token": "COMMA", - "loc": "18:31-18:32" + "loc": "18:32-18:33" }, { "token": [ "LIDENT", "tee" ], - "loc": "18:33-18:36" + "loc": "18:34-18:37" }, { "token": "LPAREN", - "loc": "18:36-18:37" + "loc": "18:37-18:38" }, { "token": [ "INT", "2" ], - "loc": "18:37-18:38" + "loc": "18:38-18:39" }, { "token": "RPAREN", - "loc": "18:38-18:39" + "loc": "18:39-18:40" }, { "token": "COMMA", - "loc": "18:39-18:40" + "loc": "18:40-18:41" }, { "token": [ "LIDENT", "tee" ], - "loc": "18:41-18:44" + "loc": "18:42-18:45" }, { "token": "LPAREN", - "loc": "18:44-18:45" + "loc": "18:45-18:46" }, { "token": [ "INT", "3" ], - "loc": "18:45-18:46" + "loc": "18:46-18:47" }, { "token": "RPAREN", - "loc": "18:46-18:47" + "loc": "18:47-18:48" }, { "token": "COMMA", - "loc": "18:47-18:48" + "loc": "18:48-18:49" }, { "token": [ "LIDENT", "tee" ], - "loc": "18:49-18:52" + "loc": "18:50-18:53" }, { "token": "LPAREN", - "loc": "18:52-18:53" + "loc": "18:53-18:54" }, { "token": [ "INT", "4" ], - "loc": "18:53-18:54" + "loc": "18:54-18:55" }, { "token": "RPAREN", - "loc": "18:54-18:55" + "loc": "18:55-18:56" }, { - "token": "RBRACKET", - "loc": "18:56-18:57" + "token": "BAR_RBRACKET", + "loc": "18:57-18:59" }, { "token": "COMMA", - "loc": "18:57-18:58" + "loc": "18:59-18:60" }, { "token": [ "LIDENT", "println" ], - "loc": "18:59-18:66" + "loc": "18:61-18:68" }, { "token": "RPAREN", - "loc": "18:66-18:67" + "loc": "18:68-18:69" }, { "token": "RPAREN", - "loc": "18:67-18:68" + "loc": "18:69-18:70" }, { "token": [ "SEMI", false ], - "loc": "18:68-18:68" + "loc": "18:70-18:70" }, { "token": "NEWLINE", - "loc": "18:68-18:69" + "loc": "18:70-18:71" }, { "token": [ @@ -726,67 +726,67 @@ "loc": "21:23-21:24" }, { - "token": "LBRACKET", - "loc": "21:24-21:25" + "token": "LBRACKET_BAR", + "loc": "21:24-21:26" }, { "token": [ "INT", "42" ], - "loc": "21:26-21:28" + "loc": "21:27-21:29" }, { "token": "COMMA", - "loc": "21:28-21:29" + "loc": "21:29-21:30" }, { "token": [ "INT", "43" ], - "loc": "21:30-21:32" + "loc": "21:31-21:33" }, { "token": "COMMA", - "loc": "21:32-21:33" + "loc": "21:33-21:34" }, { "token": [ "INT", "44" ], - "loc": "21:34-21:36" + "loc": "21:35-21:37" }, { - "token": "RBRACKET", - "loc": "21:37-21:38" + "token": "BAR_RBRACKET", + "loc": "21:38-21:40" }, { "token": "COMMA", - "loc": "21:38-21:39" + "loc": "21:40-21:41" }, { "token": [ "LIDENT", "println" ], - "loc": "21:40-21:47" + "loc": "21:42-21:49" }, { "token": "RPAREN", - "loc": "21:47-21:48" + "loc": "21:49-21:50" }, { "token": [ "SEMI", false ], - "loc": "21:48-21:48" + "loc": "21:50-21:50" }, { "token": "NEWLINE", - "loc": "21:48-21:49" + "loc": "21:50-21:51" }, { "token": [ @@ -800,12 +800,12 @@ "loc": "22:14-22:15" }, { - "token": "LBRACKET", - "loc": "22:15-22:16" + "token": "LBRACKET_BAR", + "loc": "22:15-22:17" }, { "token": "NEWLINE", - "loc": "22:16-22:17" + "loc": "22:17-22:18" }, { "token": [ @@ -992,16 +992,16 @@ "loc": "27:14-27:15" }, { - "token": "RBRACKET", - "loc": "28:5-28:6" + "token": "BAR_RBRACKET", + "loc": "28:5-28:7" }, { "token": "RPAREN", - "loc": "28:6-28:7" + "loc": "28:7-28:8" }, { "token": "NEWLINE", - "loc": "28:7-28:8" + "loc": "28:8-28:9" }, { "token": "RBRACE", @@ -1097,67 +1097,67 @@ "loc": "32:24-32:25" }, { - "token": "LBRACKET", - "loc": "32:25-32:26" + "token": "LBRACKET_BAR", + "loc": "32:25-32:27" }, { "token": [ "INT", "1" ], - "loc": "32:27-32:28" + "loc": "32:28-32:29" }, { "token": "COMMA", - "loc": "32:28-32:29" + "loc": "32:29-32:30" }, { "token": [ "INT", "2" ], - "loc": "32:30-32:31" + "loc": "32:31-32:32" }, { "token": "COMMA", - "loc": "32:31-32:32" + "loc": "32:32-32:33" }, { "token": [ "INT", "3" ], - "loc": "32:33-32:34" + "loc": "32:34-32:35" }, { - "token": "RBRACKET", - "loc": "32:35-32:36" + "token": "BAR_RBRACKET", + "loc": "32:36-32:38" }, { "token": "COMMA", - "loc": "32:36-32:37" + "loc": "32:38-32:39" }, { "token": [ "LIDENT", "println" ], - "loc": "32:38-32:45" + "loc": "32:40-32:47" }, { "token": "RPAREN", - "loc": "32:45-32:46" + "loc": "32:47-32:48" }, { "token": [ "SEMI", false ], - "loc": "32:46-32:46" + "loc": "32:48-32:48" }, { "token": "NEWLINE", - "loc": "32:46-32:47" + "loc": "32:48-32:49" }, { "token": "LET", @@ -1197,67 +1197,67 @@ "loc": "33:24-33:25" }, { - "token": "LBRACKET", - "loc": "33:25-33:26" + "token": "LBRACKET_BAR", + "loc": "33:25-33:27" }, { "token": [ "INT", "4" ], - "loc": "33:27-33:28" + "loc": "33:28-33:29" }, { "token": "COMMA", - "loc": "33:28-33:29" + "loc": "33:29-33:30" }, { "token": [ "INT", "5" ], - "loc": "33:30-33:31" + "loc": "33:31-33:32" }, { "token": "COMMA", - "loc": "33:31-33:32" + "loc": "33:32-33:33" }, { "token": [ "INT", "6" ], - "loc": "33:33-33:34" + "loc": "33:34-33:35" }, { - "token": "RBRACKET", - "loc": "33:35-33:36" + "token": "BAR_RBRACKET", + "loc": "33:36-33:38" }, { "token": "COMMA", - "loc": "33:36-33:37" + "loc": "33:38-33:39" }, { "token": [ "LIDENT", "println" ], - "loc": "33:38-33:45" + "loc": "33:40-33:47" }, { "token": "RPAREN", - "loc": "33:45-33:46" + "loc": "33:47-33:48" }, { "token": [ "SEMI", false ], - "loc": "33:46-33:46" + "loc": "33:48-33:48" }, { "token": "NEWLINE", - "loc": "33:46-33:47" + "loc": "33:48-33:49" }, { "token": [ @@ -1271,12 +1271,12 @@ "loc": "34:14-34:15" }, { - "token": "LBRACKET", - "loc": "34:15-34:16" + "token": "LBRACKET_BAR", + "loc": "34:15-34:17" }, { "token": "NEWLINE", - "loc": "34:16-34:17" + "loc": "34:17-34:18" }, { "token": "DOTDOT", @@ -1407,16 +1407,16 @@ "loc": "36:43-36:44" }, { - "token": "RBRACKET", - "loc": "37:5-37:6" + "token": "BAR_RBRACKET", + "loc": "37:5-37:7" }, { "token": "RPAREN", - "loc": "37:6-37:7" + "loc": "37:7-37:8" }, { "token": "NEWLINE", - "loc": "37:7-37:8" + "loc": "37:8-37:9" }, { "token": "RBRACE", diff --git a/test/sync_test/__snapshot__/pipeline_test_iter_range.json b/test/sync_test/__snapshot__/pipeline_test_iter_range.json index 1d48d09f..f0f5c0a4 100644 --- a/test/sync_test/__snapshot__/pipeline_test_iter_range.json +++ b/test/sync_test/__snapshot__/pipeline_test_iter_range.json @@ -867,7 +867,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { @@ -1268,7 +1269,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { diff --git a/test/sync_test/__snapshot__/pipeline_test_iter_string.json b/test/sync_test/__snapshot__/pipeline_test_iter_string.json new file mode 100644 index 00000000..3892a118 --- /dev/null +++ b/test/sync_test/__snapshot__/pipeline_test_iter_string.json @@ -0,0 +1,4858 @@ +[ + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "String" + } + }, + "is_object": false + } + }, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "code_units_for_test" + } + }, + "has_error": null, + "is_async": null, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "self" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "String" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + } + ] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "ArrayView" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [ + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "UInt16" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + ] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [ + { + "kind": "Attribute", + "loc": null, + "children": { + "raw": "#intrinsic(\"%string.code_units\")" + } + } + ] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "self" + } + } + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "code_units" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "StringView" + } + }, + "is_object": false + } + }, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "code_units_for_test" + } + }, + "has_error": null, + "is_async": null, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "self" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "StringView" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + } + ] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "ArrayView" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [ + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "UInt16" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + ] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [ + { + "kind": "Attribute", + "loc": null, + "children": { + "raw": "#intrinsic(\"%stringview.code_units\")" + } + } + ] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "self" + } + } + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "code_units" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "main" + } + }, + "has_error": null, + "is_async": null, + "decl_params": null, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [] + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::Let", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "str" + } + } + } + }, + "expr": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "A🤣B" + } + } + } + }, + "body": { + "kind": "Expr::Sequence", + "loc": null, + "children": { + "exprs": { + "kind": "Expr::Sequence::ExprList", + "loc": null, + "children": [ + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "String chars" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::ForEach", + "loc": null, + "children": { + "binders": { + "kind": "Expr::ForEach::BinderList", + "loc": null, + "children": [ + { + "kind": "Binder", + "loc": null, + "children": { + "name": "c" + } + } + ] + }, + "expr": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "str" + } + } + } + } + } + }, + "init": { + "kind": "Expr::ForEach::Init", + "loc": null, + "children": [] + }, + "continue_block": { + "kind": "Expr::ForEach::ContinueBlock", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "c" + } + } + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "to_int" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "else_block": null, + "where_clause": null, + "label": null + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "String indexed chars" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::ForEach", + "loc": null, + "children": { + "binders": { + "kind": "Expr::ForEach::BinderList", + "loc": null, + "children": [ + { + "kind": "Binder", + "loc": null, + "children": { + "name": "i" + } + }, + { + "kind": "Binder", + "loc": null, + "children": { + "name": "c" + } + } + ] + }, + "expr": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "str" + } + } + } + } + } + }, + "init": { + "kind": "Expr::ForEach::Init", + "loc": null, + "children": [] + }, + "continue_block": { + "kind": "Expr::ForEach::ContinueBlock", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Interp", + "loc": null, + "children": { + "elems": { + "kind": "Expr::Interp::ElemList", + "loc": null, + "children": [ + { + "kind": "InterpElem::Source", + "loc": null, + "children": { + "source": "i" + } + }, + { + "kind": "InterpElem::Literal", + "loc": null, + "children": { + "repr": ":" + } + }, + { + "kind": "InterpElem::Source", + "loc": null, + "children": { + "source": "c.to_int()" + } + } + ] + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "else_block": null, + "where_clause": null, + "label": null + } + } + ] + }, + "last_expr": { + "kind": "Expr::Let", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "view" + } + } + } + }, + "expr": { + "kind": "Expr::ArrayGetSlice", + "loc": null, + "children": { + "array": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "str" + } + } + } + } + } + }, + "start_index": null, + "end_index": null + } + }, + "body": { + "kind": "Expr::Sequence", + "loc": null, + "children": { + "exprs": { + "kind": "Expr::Sequence::ExprList", + "loc": null, + "children": [ + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "StringView chars" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::ForEach", + "loc": null, + "children": { + "binders": { + "kind": "Expr::ForEach::BinderList", + "loc": null, + "children": [ + { + "kind": "Binder", + "loc": null, + "children": { + "name": "c" + } + } + ] + }, + "expr": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "view" + } + } + } + } + } + }, + "init": { + "kind": "Expr::ForEach::Init", + "loc": null, + "children": [] + }, + "continue_block": { + "kind": "Expr::ForEach::ContinueBlock", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "c" + } + } + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "to_int" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "else_block": null, + "where_clause": null, + "label": null + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "StringView indexed chars" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::ForEach", + "loc": null, + "children": { + "binders": { + "kind": "Expr::ForEach::BinderList", + "loc": null, + "children": [ + { + "kind": "Binder", + "loc": null, + "children": { + "name": "i" + } + }, + { + "kind": "Binder", + "loc": null, + "children": { + "name": "c" + } + } + ] + }, + "expr": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "view" + } + } + } + } + } + }, + "init": { + "kind": "Expr::ForEach::Init", + "loc": null, + "children": [] + }, + "continue_block": { + "kind": "Expr::ForEach::ContinueBlock", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Interp", + "loc": null, + "children": { + "elems": { + "kind": "Expr::Interp::ElemList", + "loc": null, + "children": [ + { + "kind": "InterpElem::Source", + "loc": null, + "children": { + "source": "i" + } + }, + { + "kind": "InterpElem::Literal", + "loc": null, + "children": { + "repr": ":" + } + }, + { + "kind": "InterpElem::Source", + "loc": null, + "children": { + "source": "c.to_int()" + } + } + ] + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "else_block": null, + "where_clause": null, + "label": null + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "String loop vars" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::ForEach", + "loc": null, + "children": { + "binders": { + "kind": "Expr::ForEach::BinderList", + "loc": null, + "children": [ + { + "kind": "Binder", + "loc": null, + "children": { + "name": "c" + } + } + ] + }, + "expr": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "str" + } + } + } + } + } + }, + "init": { + "kind": "Expr::ForEach::Init", + "loc": null, + "children": [ + { + "kind": "ForEach::Init", + "loc": null, + "children": { + "init": { + "kind": "Binder", + "loc": null, + "children": { + "name": "i" + } + }, + "expr": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "0" + } + } + } + } + } + } + ] + }, + "continue_block": { + "kind": "Expr::ForEach::ContinueBlock", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Sequence", + "loc": null, + "children": { + "exprs": { + "kind": "Expr::Sequence::ExprList", + "loc": null, + "children": [ + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Interp", + "loc": null, + "children": { + "elems": { + "kind": "Expr::Interp::ElemList", + "loc": null, + "children": [ + { + "kind": "InterpElem::Source", + "loc": null, + "children": { + "source": "i" + } + }, + { + "kind": "InterpElem::Literal", + "loc": null, + "children": { + "repr": ":" + } + }, + { + "kind": "InterpElem::Source", + "loc": null, + "children": { + "source": "c.to_int()" + } + } + ] + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + ] + }, + "last_expr": { + "kind": "Expr::Continue", + "loc": null, + "children": { + "args": { + "kind": "Expr::Continue::ExprList", + "loc": null, + "children": [ + { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "+" + } + } + } + }, + "lhs": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "i" + } + } + } + } + } + }, + "rhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "1" + } + } + } + } + } + } + ] + }, + "label": null + } + } + } + }, + "else_block": null, + "where_clause": null, + "label": null + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "StringView loop vars" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::ForEach", + "loc": null, + "children": { + "binders": { + "kind": "Expr::ForEach::BinderList", + "loc": null, + "children": [ + { + "kind": "Binder", + "loc": null, + "children": { + "name": "c" + } + } + ] + }, + "expr": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "view" + } + } + } + } + } + }, + "init": { + "kind": "Expr::ForEach::Init", + "loc": null, + "children": [ + { + "kind": "ForEach::Init", + "loc": null, + "children": { + "init": { + "kind": "Binder", + "loc": null, + "children": { + "name": "i" + } + }, + "expr": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "0" + } + } + } + } + } + } + ] + }, + "continue_block": { + "kind": "Expr::ForEach::ContinueBlock", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Sequence", + "loc": null, + "children": { + "exprs": { + "kind": "Expr::Sequence::ExprList", + "loc": null, + "children": [ + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Interp", + "loc": null, + "children": { + "elems": { + "kind": "Expr::Interp::ElemList", + "loc": null, + "children": [ + { + "kind": "InterpElem::Source", + "loc": null, + "children": { + "source": "i" + } + }, + { + "kind": "InterpElem::Literal", + "loc": null, + "children": { + "repr": ":" + } + }, + { + "kind": "InterpElem::Source", + "loc": null, + "children": { + "source": "c.to_int()" + } + } + ] + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + ] + }, + "last_expr": { + "kind": "Expr::Continue", + "loc": null, + "children": { + "args": { + "kind": "Expr::Continue::ExprList", + "loc": null, + "children": [ + { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "+" + } + } + } + }, + "lhs": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "i" + } + } + } + } + } + }, + "rhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "1" + } + } + } + } + } + } + ] + }, + "label": null + } + } + } + }, + "else_block": null, + "where_clause": null, + "label": null + } + } + ] + }, + "last_expr": { + "kind": "Expr::Let", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "shifted_view" + } + } + } + }, + "expr": { + "kind": "Expr::ArrayGetSlice", + "loc": null, + "children": { + "array": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "ZA🤣B" + } + } + } + }, + "start_index": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "1" + } + } + } + }, + "end_index": null + } + }, + "body": { + "kind": "Expr::Sequence", + "loc": null, + "children": { + "exprs": { + "kind": "Expr::Sequence::ExprList", + "loc": null, + "children": [ + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "StringView nonzero start" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::ForEach", + "loc": null, + "children": { + "binders": { + "kind": "Expr::ForEach::BinderList", + "loc": null, + "children": [ + { + "kind": "Binder", + "loc": null, + "children": { + "name": "i" + } + }, + { + "kind": "Binder", + "loc": null, + "children": { + "name": "c" + } + } + ] + }, + "expr": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "shifted_view" + } + } + } + } + } + }, + "init": { + "kind": "Expr::ForEach::Init", + "loc": null, + "children": [] + }, + "continue_block": { + "kind": "Expr::ForEach::ContinueBlock", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Interp", + "loc": null, + "children": { + "elems": { + "kind": "Expr::Interp::ElemList", + "loc": null, + "children": [ + { + "kind": "InterpElem::Source", + "loc": null, + "children": { + "source": "i" + } + }, + { + "kind": "InterpElem::Literal", + "loc": null, + "children": { + "repr": ":" + } + }, + { + "kind": "InterpElem::Source", + "loc": null, + "children": { + "source": "c.to_int()" + } + } + ] + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "else_block": null, + "where_clause": null, + "label": null + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "StringView nonzero start loop vars" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::ForEach", + "loc": null, + "children": { + "binders": { + "kind": "Expr::ForEach::BinderList", + "loc": null, + "children": [ + { + "kind": "Binder", + "loc": null, + "children": { + "name": "c" + } + } + ] + }, + "expr": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "shifted_view" + } + } + } + } + } + }, + "init": { + "kind": "Expr::ForEach::Init", + "loc": null, + "children": [ + { + "kind": "ForEach::Init", + "loc": null, + "children": { + "init": { + "kind": "Binder", + "loc": null, + "children": { + "name": "i" + } + }, + "expr": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "0" + } + } + } + } + } + } + ] + }, + "continue_block": { + "kind": "Expr::ForEach::ContinueBlock", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Sequence", + "loc": null, + "children": { + "exprs": { + "kind": "Expr::Sequence::ExprList", + "loc": null, + "children": [ + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Interp", + "loc": null, + "children": { + "elems": { + "kind": "Expr::Interp::ElemList", + "loc": null, + "children": [ + { + "kind": "InterpElem::Source", + "loc": null, + "children": { + "source": "i" + } + }, + { + "kind": "InterpElem::Literal", + "loc": null, + "children": { + "repr": ":" + } + }, + { + "kind": "InterpElem::Source", + "loc": null, + "children": { + "source": "c.to_int()" + } + } + ] + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + ] + }, + "last_expr": { + "kind": "Expr::Continue", + "loc": null, + "children": { + "args": { + "kind": "Expr::Continue::ExprList", + "loc": null, + "children": [ + { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "+" + } + } + } + }, + "lhs": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "i" + } + } + } + } + } + }, + "rhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "1" + } + } + } + } + } + } + ] + }, + "label": null + } + } + } + }, + "else_block": null, + "where_clause": null, + "label": null + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "String code units" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::ForEach", + "loc": null, + "children": { + "binders": { + "kind": "Expr::ForEach::BinderList", + "loc": null, + "children": [ + { + "kind": "Binder", + "loc": null, + "children": { + "name": "u" + } + } + ] + }, + "expr": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "str" + } + } + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "code_units_for_test" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "init": { + "kind": "Expr::ForEach::Init", + "loc": null, + "children": [] + }, + "continue_block": { + "kind": "Expr::ForEach::ContinueBlock", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "u" + } + } + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "to_int" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "else_block": null, + "where_clause": null, + "label": null + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "String code units loop vars" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::ForEach", + "loc": null, + "children": { + "binders": { + "kind": "Expr::ForEach::BinderList", + "loc": null, + "children": [ + { + "kind": "Binder", + "loc": null, + "children": { + "name": "u" + } + } + ] + }, + "expr": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "str" + } + } + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "code_units_for_test" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "init": { + "kind": "Expr::ForEach::Init", + "loc": null, + "children": [ + { + "kind": "ForEach::Init", + "loc": null, + "children": { + "init": { + "kind": "Binder", + "loc": null, + "children": { + "name": "i" + } + }, + "expr": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "0" + } + } + } + } + } + } + ] + }, + "continue_block": { + "kind": "Expr::ForEach::ContinueBlock", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Sequence", + "loc": null, + "children": { + "exprs": { + "kind": "Expr::Sequence::ExprList", + "loc": null, + "children": [ + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Interp", + "loc": null, + "children": { + "elems": { + "kind": "Expr::Interp::ElemList", + "loc": null, + "children": [ + { + "kind": "InterpElem::Source", + "loc": null, + "children": { + "source": "i" + } + }, + { + "kind": "InterpElem::Literal", + "loc": null, + "children": { + "repr": ":" + } + }, + { + "kind": "InterpElem::Source", + "loc": null, + "children": { + "source": "u.to_int()" + } + } + ] + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + ] + }, + "last_expr": { + "kind": "Expr::Continue", + "loc": null, + "children": { + "args": { + "kind": "Expr::Continue::ExprList", + "loc": null, + "children": [ + { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "+" + } + } + } + }, + "lhs": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "i" + } + } + } + } + } + }, + "rhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "1" + } + } + } + } + } + } + ] + }, + "label": null + } + } + } + }, + "else_block": null, + "where_clause": null, + "label": null + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "String indexed code units" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::ForEach", + "loc": null, + "children": { + "binders": { + "kind": "Expr::ForEach::BinderList", + "loc": null, + "children": [ + { + "kind": "Binder", + "loc": null, + "children": { + "name": "i" + } + }, + { + "kind": "Binder", + "loc": null, + "children": { + "name": "u" + } + } + ] + }, + "expr": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "str" + } + } + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "code_units_for_test" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "init": { + "kind": "Expr::ForEach::Init", + "loc": null, + "children": [ + { + "kind": "ForEach::Init", + "loc": null, + "children": { + "init": { + "kind": "Binder", + "loc": null, + "children": { + "name": "sum" + } + }, + "expr": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "0" + } + } + } + } + } + } + ] + }, + "continue_block": { + "kind": "Expr::ForEach::ContinueBlock", + "loc": null, + "children": [ + { + "kind": "ForEach::ContinueBlock", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "sum" + } + }, + "expr": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "+" + } + } + } + }, + "lhs": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "+" + } + } + } + }, + "lhs": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "sum" + } + } + } + } + } + }, + "rhs": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "i" + } + } + } + } + } + } + } + }, + "rhs": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "u" + } + } + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "to_int" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + } + } + ] + }, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Interp", + "loc": null, + "children": { + "elems": { + "kind": "Expr::Interp::ElemList", + "loc": null, + "children": [ + { + "kind": "InterpElem::Source", + "loc": null, + "children": { + "source": "i" + } + }, + { + "kind": "InterpElem::Literal", + "loc": null, + "children": { + "repr": ":" + } + }, + { + "kind": "InterpElem::Source", + "loc": null, + "children": { + "source": "u.to_int()" + } + } + ] + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "else_block": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "sum" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "where_clause": null, + "label": null + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "String direct call code units" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::ForEach", + "loc": null, + "children": { + "binders": { + "kind": "Expr::ForEach::BinderList", + "loc": null, + "children": [ + { + "kind": "Binder", + "loc": null, + "children": { + "name": "u" + } + } + ] + }, + "expr": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Method", + "loc": null, + "children": { + "type_name": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "String" + } + }, + "is_object": false + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "code_units_for_test" + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "str" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "init": { + "kind": "Expr::ForEach::Init", + "loc": null, + "children": [ + { + "kind": "ForEach::Init", + "loc": null, + "children": { + "init": { + "kind": "Binder", + "loc": null, + "children": { + "name": "i" + } + }, + "expr": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "0" + } + } + } + } + } + } + ] + }, + "continue_block": { + "kind": "Expr::ForEach::ContinueBlock", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Sequence", + "loc": null, + "children": { + "exprs": { + "kind": "Expr::Sequence::ExprList", + "loc": null, + "children": [ + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Interp", + "loc": null, + "children": { + "elems": { + "kind": "Expr::Interp::ElemList", + "loc": null, + "children": [ + { + "kind": "InterpElem::Source", + "loc": null, + "children": { + "source": "i" + } + }, + { + "kind": "InterpElem::Literal", + "loc": null, + "children": { + "repr": ":" + } + }, + { + "kind": "InterpElem::Source", + "loc": null, + "children": { + "source": "u.to_int()" + } + } + ] + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + ] + }, + "last_expr": { + "kind": "Expr::Continue", + "loc": null, + "children": { + "args": { + "kind": "Expr::Continue::ExprList", + "loc": null, + "children": [ + { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "+" + } + } + } + }, + "lhs": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "i" + } + } + } + } + } + }, + "rhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "1" + } + } + } + } + } + } + ] + }, + "label": null + } + } + } + }, + "else_block": null, + "where_clause": null, + "label": null + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "String pipe code units" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::ForEach", + "loc": null, + "children": { + "binders": { + "kind": "Expr::ForEach::BinderList", + "loc": null, + "children": [ + { + "kind": "Binder", + "loc": null, + "children": { + "name": "u" + } + } + ] + }, + "expr": { + "kind": "Expr::Group", + "loc": null, + "children": { + "expr": { + "kind": "Expr::Pipe", + "loc": null, + "children": { + "lhs": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "str" + } + } + } + } + } + }, + "rhs": { + "kind": "Expr::Method", + "loc": null, + "children": { + "type_name": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "String" + } + }, + "is_object": false + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "code_units_for_test" + } + } + } + } + } + }, + "group": { + "kind": "Group::Paren", + "loc": null, + "children": {} + } + } + }, + "init": { + "kind": "Expr::ForEach::Init", + "loc": null, + "children": [ + { + "kind": "ForEach::Init", + "loc": null, + "children": { + "init": { + "kind": "Binder", + "loc": null, + "children": { + "name": "i" + } + }, + "expr": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "0" + } + } + } + } + } + } + ] + }, + "continue_block": { + "kind": "Expr::ForEach::ContinueBlock", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Sequence", + "loc": null, + "children": { + "exprs": { + "kind": "Expr::Sequence::ExprList", + "loc": null, + "children": [ + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Interp", + "loc": null, + "children": { + "elems": { + "kind": "Expr::Interp::ElemList", + "loc": null, + "children": [ + { + "kind": "InterpElem::Source", + "loc": null, + "children": { + "source": "i" + } + }, + { + "kind": "InterpElem::Literal", + "loc": null, + "children": { + "repr": ":" + } + }, + { + "kind": "InterpElem::Source", + "loc": null, + "children": { + "source": "u.to_int()" + } + } + ] + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + ] + }, + "last_expr": { + "kind": "Expr::Continue", + "loc": null, + "children": { + "args": { + "kind": "Expr::Continue::ExprList", + "loc": null, + "children": [ + { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "+" + } + } + } + }, + "lhs": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "i" + } + } + } + } + } + }, + "rhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "1" + } + } + } + } + } + } + ] + }, + "label": null + } + } + } + }, + "else_block": null, + "where_clause": null, + "label": null + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "String reverse pipe code units" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::ForEach", + "loc": null, + "children": { + "binders": { + "kind": "Expr::ForEach::BinderList", + "loc": null, + "children": [ + { + "kind": "Binder", + "loc": null, + "children": { + "name": "u" + } + } + ] + }, + "expr": { + "kind": "Expr::Group", + "loc": null, + "children": { + "expr": { + "kind": "Expr::RevPipe", + "loc": null, + "children": { + "lhs": { + "kind": "Expr::Method", + "loc": null, + "children": { + "type_name": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "String" + } + }, + "is_object": false + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "code_units_for_test" + } + } + } + }, + "rhs": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "str" + } + } + } + } + } + } + } + }, + "group": { + "kind": "Group::Paren", + "loc": null, + "children": {} + } + } + }, + "init": { + "kind": "Expr::ForEach::Init", + "loc": null, + "children": [ + { + "kind": "ForEach::Init", + "loc": null, + "children": { + "init": { + "kind": "Binder", + "loc": null, + "children": { + "name": "i" + } + }, + "expr": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "0" + } + } + } + } + } + } + ] + }, + "continue_block": { + "kind": "Expr::ForEach::ContinueBlock", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Sequence", + "loc": null, + "children": { + "exprs": { + "kind": "Expr::Sequence::ExprList", + "loc": null, + "children": [ + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Interp", + "loc": null, + "children": { + "elems": { + "kind": "Expr::Interp::ElemList", + "loc": null, + "children": [ + { + "kind": "InterpElem::Source", + "loc": null, + "children": { + "source": "i" + } + }, + { + "kind": "InterpElem::Literal", + "loc": null, + "children": { + "repr": ":" + } + }, + { + "kind": "InterpElem::Source", + "loc": null, + "children": { + "source": "u.to_int()" + } + } + ] + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + ] + }, + "last_expr": { + "kind": "Expr::Continue", + "loc": null, + "children": { + "args": { + "kind": "Expr::Continue::ExprList", + "loc": null, + "children": [ + { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "+" + } + } + } + }, + "lhs": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "i" + } + } + } + } + } + }, + "rhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "1" + } + } + } + } + } + } + ] + }, + "label": null + } + } + } + }, + "else_block": null, + "where_clause": null, + "label": null + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "StringView code units loop vars" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + ] + }, + "last_expr": { + "kind": "Expr::ForEach", + "loc": null, + "children": { + "binders": { + "kind": "Expr::ForEach::BinderList", + "loc": null, + "children": [ + { + "kind": "Binder", + "loc": null, + "children": { + "name": "u" + } + } + ] + }, + "expr": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "shifted_view" + } + } + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "code_units_for_test" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "init": { + "kind": "Expr::ForEach::Init", + "loc": null, + "children": [ + { + "kind": "ForEach::Init", + "loc": null, + "children": { + "init": { + "kind": "Binder", + "loc": null, + "children": { + "name": "i" + } + }, + "expr": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "0" + } + } + } + } + } + } + ] + }, + "continue_block": { + "kind": "Expr::ForEach::ContinueBlock", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Sequence", + "loc": null, + "children": { + "exprs": { + "kind": "Expr::Sequence::ExprList", + "loc": null, + "children": [ + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Interp", + "loc": null, + "children": { + "elems": { + "kind": "Expr::Interp::ElemList", + "loc": null, + "children": [ + { + "kind": "InterpElem::Source", + "loc": null, + "children": { + "source": "i" + } + }, + { + "kind": "InterpElem::Literal", + "loc": null, + "children": { + "repr": ":" + } + }, + { + "kind": "InterpElem::Source", + "loc": null, + "children": { + "source": "u.to_int()" + } + } + ] + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + ] + }, + "last_expr": { + "kind": "Expr::Continue", + "loc": null, + "children": { + "args": { + "kind": "Expr::Continue::ExprList", + "loc": null, + "children": [ + { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "+" + } + } + } + }, + "lhs": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "i" + } + } + } + } + } + }, + "rhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "1" + } + } + } + } + } + } + ] + }, + "label": null + } + } + } + }, + "else_block": null, + "where_clause": null, + "label": null + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } +] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/pipeline_test_iter_string.mbt b/test/sync_test/__snapshot__/pipeline_test_iter_string.mbt new file mode 100644 index 00000000..f2ae47d3 --- /dev/null +++ b/test/sync_test/__snapshot__/pipeline_test_iter_string.mbt @@ -0,0 +1,99 @@ +#intrinsic("%string.code_units") +fn String::code_units_for_test(self : String) -> ArrayView[UInt16] { + self.code_units() +} + +#intrinsic("%stringview.code_units") +fn StringView::code_units_for_test(self : StringView) -> ArrayView[UInt16] { + self.code_units() +} + +fn main { + let str = "A🤣B" + println("String chars") + for c in str { + println(c.to_int()) + } + + println("String indexed chars") + for i, c in str { + println("\{i}:\{c.to_int()}") + } + + let view = str[:] + println("StringView chars") + for c in view { + println(c.to_int()) + } + + println("StringView indexed chars") + for i, c in view { + println("\{i}:\{c.to_int()}") + } + + println("String loop vars") + for c in str; i = 0 { + println("\{i}:\{c.to_int()}") + continue i + 1 + } + + println("StringView loop vars") + for c in view; i = 0 { + println("\{i}:\{c.to_int()}") + continue i + 1 + } + + let shifted_view = "ZA🤣B"[1:] + println("StringView nonzero start") + for i, c in shifted_view { + println("\{i}:\{c.to_int()}") + } + + println("StringView nonzero start loop vars") + for c in shifted_view; i = 0 { + println("\{i}:\{c.to_int()}") + continue i + 1 + } + + println("String code units") + for u in str.code_units_for_test() { + println(u.to_int()) + } + + println("String code units loop vars") + for u in str.code_units_for_test(); i = 0 { + println("\{i}:\{u.to_int()}") + continue i + 1 + } + + println("String indexed code units") + for i, u in str.code_units_for_test(); sum = 0; sum = sum + i + u.to_int() { + println("\{i}:\{u.to_int()}") + } nobreak { + println(sum) + } + + println("String direct call code units") + for u in String::code_units_for_test(str); i = 0 { + println("\{i}:\{u.to_int()}") + continue i + 1 + } + + println("String pipe code units") + for u in (str |> String::code_units_for_test); i = 0 { + println("\{i}:\{u.to_int()}") + continue i + 1 + } + + println("String reverse pipe code units") + for u in (String::code_units_for_test <| str); i = 0 { + println("\{i}:\{u.to_int()}") + continue i + 1 + } + + println("StringView code units loop vars") + for u in shifted_view.code_units_for_test(); i = 0 { + println("\{i}:\{u.to_int()}") + continue i + 1 + } +} diff --git a/test/sync_test/__snapshot__/pipeline_test_iter_string.mbt.tokens.json b/test/sync_test/__snapshot__/pipeline_test_iter_string.mbt.tokens.json new file mode 100644 index 00000000..adb75567 --- /dev/null +++ b/test/sync_test/__snapshot__/pipeline_test_iter_string.mbt.tokens.json @@ -0,0 +1,2891 @@ +[ + { + "token": [ + "ATTRIBUTE", + { + "id": "intrinsic", + "dot_id": "", + "raw_payload": "(\"%string.code_units\")" + } + ], + "loc": "1:1-1:33" + }, + { + "token": "NEWLINE", + "loc": "1:33-1:34" + }, + { + "token": "FN", + "loc": "2:1-2:3" + }, + { + "token": [ + "UIDENT", + "String" + ], + "loc": "2:4-2:10" + }, + { + "token": "COLONCOLON", + "loc": "2:10-2:12" + }, + { + "token": [ + "LIDENT", + "code_units_for_test" + ], + "loc": "2:12-2:31" + }, + { + "token": "LPAREN", + "loc": "2:31-2:32" + }, + { + "token": [ + "LIDENT", + "self" + ], + "loc": "2:32-2:36" + }, + { + "token": "COLON", + "loc": "2:37-2:38" + }, + { + "token": [ + "UIDENT", + "String" + ], + "loc": "2:39-2:45" + }, + { + "token": "RPAREN", + "loc": "2:45-2:46" + }, + { + "token": "THIN_ARROW", + "loc": "2:47-2:49" + }, + { + "token": [ + "UIDENT", + "ArrayView" + ], + "loc": "2:50-2:59" + }, + { + "token": "LBRACKET", + "loc": "2:59-2:60" + }, + { + "token": [ + "UIDENT", + "UInt16" + ], + "loc": "2:60-2:66" + }, + { + "token": "RBRACKET", + "loc": "2:66-2:67" + }, + { + "token": "LBRACE", + "loc": "2:68-2:69" + }, + { + "token": "NEWLINE", + "loc": "2:69-2:70" + }, + { + "token": [ + "LIDENT", + "self" + ], + "loc": "3:3-3:7" + }, + { + "token": [ + "DOT_LIDENT", + "code_units" + ], + "loc": "3:8-3:18" + }, + { + "token": "LPAREN", + "loc": "3:18-3:19" + }, + { + "token": "RPAREN", + "loc": "3:19-3:20" + }, + { + "token": "NEWLINE", + "loc": "3:20-3:21" + }, + { + "token": "RBRACE", + "loc": "4:1-4:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "4:2-4:2" + }, + { + "token": "NEWLINE", + "loc": "4:2-4:3" + }, + { + "token": "NEWLINE", + "loc": "5:1-5:2" + }, + { + "token": [ + "ATTRIBUTE", + { + "id": "intrinsic", + "dot_id": "", + "raw_payload": "(\"%stringview.code_units\")" + } + ], + "loc": "6:1-6:37" + }, + { + "token": "NEWLINE", + "loc": "6:37-6:38" + }, + { + "token": "FN", + "loc": "7:1-7:3" + }, + { + "token": [ + "UIDENT", + "StringView" + ], + "loc": "7:4-7:14" + }, + { + "token": "COLONCOLON", + "loc": "7:14-7:16" + }, + { + "token": [ + "LIDENT", + "code_units_for_test" + ], + "loc": "7:16-7:35" + }, + { + "token": "LPAREN", + "loc": "7:35-7:36" + }, + { + "token": [ + "LIDENT", + "self" + ], + "loc": "7:36-7:40" + }, + { + "token": "COLON", + "loc": "7:41-7:42" + }, + { + "token": [ + "UIDENT", + "StringView" + ], + "loc": "7:43-7:53" + }, + { + "token": "RPAREN", + "loc": "7:53-7:54" + }, + { + "token": "THIN_ARROW", + "loc": "7:55-7:57" + }, + { + "token": [ + "UIDENT", + "ArrayView" + ], + "loc": "7:58-7:67" + }, + { + "token": "LBRACKET", + "loc": "7:67-7:68" + }, + { + "token": [ + "UIDENT", + "UInt16" + ], + "loc": "7:68-7:74" + }, + { + "token": "RBRACKET", + "loc": "7:74-7:75" + }, + { + "token": "LBRACE", + "loc": "7:76-7:77" + }, + { + "token": "NEWLINE", + "loc": "7:77-7:78" + }, + { + "token": [ + "LIDENT", + "self" + ], + "loc": "8:3-8:7" + }, + { + "token": [ + "DOT_LIDENT", + "code_units" + ], + "loc": "8:8-8:18" + }, + { + "token": "LPAREN", + "loc": "8:18-8:19" + }, + { + "token": "RPAREN", + "loc": "8:19-8:20" + }, + { + "token": "NEWLINE", + "loc": "8:20-8:21" + }, + { + "token": "RBRACE", + "loc": "9:1-9:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "9:2-9:2" + }, + { + "token": "NEWLINE", + "loc": "9:2-9:3" + }, + { + "token": "NEWLINE", + "loc": "10:1-10:2" + }, + { + "token": "FN", + "loc": "11:1-11:3" + }, + { + "token": [ + "LIDENT", + "main" + ], + "loc": "11:4-11:8" + }, + { + "token": "LBRACE", + "loc": "11:9-11:10" + }, + { + "token": "NEWLINE", + "loc": "11:10-11:11" + }, + { + "token": "LET", + "loc": "12:3-12:6" + }, + { + "token": [ + "LIDENT", + "str" + ], + "loc": "12:7-12:10" + }, + { + "token": "EQUAL", + "loc": "12:11-12:12" + }, + { + "token": [ + "STRING", + "A🤣B" + ], + "loc": "12:13-12:18" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "12:18-12:18" + }, + { + "token": "NEWLINE", + "loc": "12:18-12:19" + }, + { + "token": [ + "LIDENT", + "println" + ], + "loc": "13:3-13:10" + }, + { + "token": "LPAREN", + "loc": "13:10-13:11" + }, + { + "token": [ + "STRING", + "String chars" + ], + "loc": "13:11-13:25" + }, + { + "token": "RPAREN", + "loc": "13:25-13:26" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "13:26-13:26" + }, + { + "token": "NEWLINE", + "loc": "13:26-13:27" + }, + { + "token": "FOR", + "loc": "14:3-14:6" + }, + { + "token": [ + "LIDENT", + "c" + ], + "loc": "14:7-14:8" + }, + { + "token": "IN", + "loc": "14:9-14:11" + }, + { + "token": [ + "LIDENT", + "str" + ], + "loc": "14:12-14:15" + }, + { + "token": "LBRACE", + "loc": "14:16-14:17" + }, + { + "token": "NEWLINE", + "loc": "14:17-14:18" + }, + { + "token": [ + "LIDENT", + "println" + ], + "loc": "15:5-15:12" + }, + { + "token": "LPAREN", + "loc": "15:12-15:13" + }, + { + "token": [ + "LIDENT", + "c" + ], + "loc": "15:13-15:14" + }, + { + "token": [ + "DOT_LIDENT", + "to_int" + ], + "loc": "15:15-15:21" + }, + { + "token": "LPAREN", + "loc": "15:21-15:22" + }, + { + "token": "RPAREN", + "loc": "15:22-15:23" + }, + { + "token": "RPAREN", + "loc": "15:23-15:24" + }, + { + "token": "NEWLINE", + "loc": "15:24-15:25" + }, + { + "token": "RBRACE", + "loc": "16:3-16:4" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "16:4-16:4" + }, + { + "token": "NEWLINE", + "loc": "16:4-16:5" + }, + { + "token": "NEWLINE", + "loc": "17:1-17:2" + }, + { + "token": [ + "LIDENT", + "println" + ], + "loc": "18:3-18:10" + }, + { + "token": "LPAREN", + "loc": "18:10-18:11" + }, + { + "token": [ + "STRING", + "String indexed chars" + ], + "loc": "18:11-18:33" + }, + { + "token": "RPAREN", + "loc": "18:33-18:34" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "18:34-18:34" + }, + { + "token": "NEWLINE", + "loc": "18:34-18:35" + }, + { + "token": "FOR", + "loc": "19:3-19:6" + }, + { + "token": [ + "LIDENT", + "i" + ], + "loc": "19:7-19:8" + }, + { + "token": "COMMA", + "loc": "19:8-19:9" + }, + { + "token": [ + "LIDENT", + "c" + ], + "loc": "19:10-19:11" + }, + { + "token": "IN", + "loc": "19:12-19:14" + }, + { + "token": [ + "LIDENT", + "str" + ], + "loc": "19:15-19:18" + }, + { + "token": "LBRACE", + "loc": "19:19-19:20" + }, + { + "token": "NEWLINE", + "loc": "19:20-19:21" + }, + { + "token": [ + "LIDENT", + "println" + ], + "loc": "20:5-20:12" + }, + { + "token": "LPAREN", + "loc": "20:12-20:13" + }, + { + "token": [ + "INTERP", + "\"\\{i}:\\{c.to_int()}\"" + ], + "loc": "20:13-20:33" + }, + { + "token": "RPAREN", + "loc": "20:33-20:34" + }, + { + "token": "NEWLINE", + "loc": "20:34-20:35" + }, + { + "token": "RBRACE", + "loc": "21:3-21:4" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "21:4-21:4" + }, + { + "token": "NEWLINE", + "loc": "21:4-21:5" + }, + { + "token": "NEWLINE", + "loc": "22:1-22:2" + }, + { + "token": "LET", + "loc": "23:3-23:6" + }, + { + "token": [ + "LIDENT", + "view" + ], + "loc": "23:7-23:11" + }, + { + "token": "EQUAL", + "loc": "23:12-23:13" + }, + { + "token": [ + "LIDENT", + "str" + ], + "loc": "23:14-23:17" + }, + { + "token": "LBRACKET", + "loc": "23:17-23:18" + }, + { + "token": "COLON", + "loc": "23:18-23:19" + }, + { + "token": "RBRACKET", + "loc": "23:19-23:20" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "23:20-23:20" + }, + { + "token": "NEWLINE", + "loc": "23:20-23:21" + }, + { + "token": [ + "LIDENT", + "println" + ], + "loc": "24:3-24:10" + }, + { + "token": "LPAREN", + "loc": "24:10-24:11" + }, + { + "token": [ + "STRING", + "StringView chars" + ], + "loc": "24:11-24:29" + }, + { + "token": "RPAREN", + "loc": "24:29-24:30" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "24:30-24:30" + }, + { + "token": "NEWLINE", + "loc": "24:30-24:31" + }, + { + "token": "FOR", + "loc": "25:3-25:6" + }, + { + "token": [ + "LIDENT", + "c" + ], + "loc": "25:7-25:8" + }, + { + "token": "IN", + "loc": "25:9-25:11" + }, + { + "token": [ + "LIDENT", + "view" + ], + "loc": "25:12-25:16" + }, + { + "token": "LBRACE", + "loc": "25:17-25:18" + }, + { + "token": "NEWLINE", + "loc": "25:18-25:19" + }, + { + "token": [ + "LIDENT", + "println" + ], + "loc": "26:5-26:12" + }, + { + "token": "LPAREN", + "loc": "26:12-26:13" + }, + { + "token": [ + "LIDENT", + "c" + ], + "loc": "26:13-26:14" + }, + { + "token": [ + "DOT_LIDENT", + "to_int" + ], + "loc": "26:15-26:21" + }, + { + "token": "LPAREN", + "loc": "26:21-26:22" + }, + { + "token": "RPAREN", + "loc": "26:22-26:23" + }, + { + "token": "RPAREN", + "loc": "26:23-26:24" + }, + { + "token": "NEWLINE", + "loc": "26:24-26:25" + }, + { + "token": "RBRACE", + "loc": "27:3-27:4" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "27:4-27:4" + }, + { + "token": "NEWLINE", + "loc": "27:4-27:5" + }, + { + "token": "NEWLINE", + "loc": "28:1-28:2" + }, + { + "token": [ + "LIDENT", + "println" + ], + "loc": "29:3-29:10" + }, + { + "token": "LPAREN", + "loc": "29:10-29:11" + }, + { + "token": [ + "STRING", + "StringView indexed chars" + ], + "loc": "29:11-29:37" + }, + { + "token": "RPAREN", + "loc": "29:37-29:38" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "29:38-29:38" + }, + { + "token": "NEWLINE", + "loc": "29:38-29:39" + }, + { + "token": "FOR", + "loc": "30:3-30:6" + }, + { + "token": [ + "LIDENT", + "i" + ], + "loc": "30:7-30:8" + }, + { + "token": "COMMA", + "loc": "30:8-30:9" + }, + { + "token": [ + "LIDENT", + "c" + ], + "loc": "30:10-30:11" + }, + { + "token": "IN", + "loc": "30:12-30:14" + }, + { + "token": [ + "LIDENT", + "view" + ], + "loc": "30:15-30:19" + }, + { + "token": "LBRACE", + "loc": "30:20-30:21" + }, + { + "token": "NEWLINE", + "loc": "30:21-30:22" + }, + { + "token": [ + "LIDENT", + "println" + ], + "loc": "31:5-31:12" + }, + { + "token": "LPAREN", + "loc": "31:12-31:13" + }, + { + "token": [ + "INTERP", + "\"\\{i}:\\{c.to_int()}\"" + ], + "loc": "31:13-31:33" + }, + { + "token": "RPAREN", + "loc": "31:33-31:34" + }, + { + "token": "NEWLINE", + "loc": "31:34-31:35" + }, + { + "token": "RBRACE", + "loc": "32:3-32:4" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "32:4-32:4" + }, + { + "token": "NEWLINE", + "loc": "32:4-32:5" + }, + { + "token": "NEWLINE", + "loc": "33:1-33:2" + }, + { + "token": [ + "LIDENT", + "println" + ], + "loc": "34:3-34:10" + }, + { + "token": "LPAREN", + "loc": "34:10-34:11" + }, + { + "token": [ + "STRING", + "String loop vars" + ], + "loc": "34:11-34:29" + }, + { + "token": "RPAREN", + "loc": "34:29-34:30" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "34:30-34:30" + }, + { + "token": "NEWLINE", + "loc": "34:30-34:31" + }, + { + "token": "FOR", + "loc": "35:3-35:6" + }, + { + "token": [ + "LIDENT", + "c" + ], + "loc": "35:7-35:8" + }, + { + "token": "IN", + "loc": "35:9-35:11" + }, + { + "token": [ + "LIDENT", + "str" + ], + "loc": "35:12-35:15" + }, + { + "token": [ + "SEMI", + true + ], + "loc": "35:15-35:16" + }, + { + "token": [ + "LIDENT", + "i" + ], + "loc": "35:17-35:18" + }, + { + "token": "EQUAL", + "loc": "35:19-35:20" + }, + { + "token": [ + "INT", + "0" + ], + "loc": "35:21-35:22" + }, + { + "token": "LBRACE", + "loc": "35:23-35:24" + }, + { + "token": "NEWLINE", + "loc": "35:24-35:25" + }, + { + "token": [ + "LIDENT", + "println" + ], + "loc": "36:5-36:12" + }, + { + "token": "LPAREN", + "loc": "36:12-36:13" + }, + { + "token": [ + "INTERP", + "\"\\{i}:\\{c.to_int()}\"" + ], + "loc": "36:13-36:33" + }, + { + "token": "RPAREN", + "loc": "36:33-36:34" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "36:34-36:34" + }, + { + "token": "NEWLINE", + "loc": "36:34-36:35" + }, + { + "token": "CONTINUE", + "loc": "37:5-37:13" + }, + { + "token": [ + "LIDENT", + "i" + ], + "loc": "37:14-37:15" + }, + { + "token": "PLUS", + "loc": "37:16-37:17" + }, + { + "token": [ + "INT", + "1" + ], + "loc": "37:18-37:19" + }, + { + "token": "NEWLINE", + "loc": "37:19-37:20" + }, + { + "token": "RBRACE", + "loc": "38:3-38:4" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "38:4-38:4" + }, + { + "token": "NEWLINE", + "loc": "38:4-38:5" + }, + { + "token": "NEWLINE", + "loc": "39:1-39:2" + }, + { + "token": [ + "LIDENT", + "println" + ], + "loc": "40:3-40:10" + }, + { + "token": "LPAREN", + "loc": "40:10-40:11" + }, + { + "token": [ + "STRING", + "StringView loop vars" + ], + "loc": "40:11-40:33" + }, + { + "token": "RPAREN", + "loc": "40:33-40:34" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "40:34-40:34" + }, + { + "token": "NEWLINE", + "loc": "40:34-40:35" + }, + { + "token": "FOR", + "loc": "41:3-41:6" + }, + { + "token": [ + "LIDENT", + "c" + ], + "loc": "41:7-41:8" + }, + { + "token": "IN", + "loc": "41:9-41:11" + }, + { + "token": [ + "LIDENT", + "view" + ], + "loc": "41:12-41:16" + }, + { + "token": [ + "SEMI", + true + ], + "loc": "41:16-41:17" + }, + { + "token": [ + "LIDENT", + "i" + ], + "loc": "41:18-41:19" + }, + { + "token": "EQUAL", + "loc": "41:20-41:21" + }, + { + "token": [ + "INT", + "0" + ], + "loc": "41:22-41:23" + }, + { + "token": "LBRACE", + "loc": "41:24-41:25" + }, + { + "token": "NEWLINE", + "loc": "41:25-41:26" + }, + { + "token": [ + "LIDENT", + "println" + ], + "loc": "42:5-42:12" + }, + { + "token": "LPAREN", + "loc": "42:12-42:13" + }, + { + "token": [ + "INTERP", + "\"\\{i}:\\{c.to_int()}\"" + ], + "loc": "42:13-42:33" + }, + { + "token": "RPAREN", + "loc": "42:33-42:34" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "42:34-42:34" + }, + { + "token": "NEWLINE", + "loc": "42:34-42:35" + }, + { + "token": "CONTINUE", + "loc": "43:5-43:13" + }, + { + "token": [ + "LIDENT", + "i" + ], + "loc": "43:14-43:15" + }, + { + "token": "PLUS", + "loc": "43:16-43:17" + }, + { + "token": [ + "INT", + "1" + ], + "loc": "43:18-43:19" + }, + { + "token": "NEWLINE", + "loc": "43:19-43:20" + }, + { + "token": "RBRACE", + "loc": "44:3-44:4" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "44:4-44:4" + }, + { + "token": "NEWLINE", + "loc": "44:4-44:5" + }, + { + "token": "NEWLINE", + "loc": "45:1-45:2" + }, + { + "token": "LET", + "loc": "46:3-46:6" + }, + { + "token": [ + "LIDENT", + "shifted_view" + ], + "loc": "46:7-46:19" + }, + { + "token": "EQUAL", + "loc": "46:20-46:21" + }, + { + "token": [ + "STRING", + "ZA🤣B" + ], + "loc": "46:22-46:28" + }, + { + "token": "LBRACKET", + "loc": "46:28-46:29" + }, + { + "token": [ + "INT", + "1" + ], + "loc": "46:29-46:30" + }, + { + "token": "COLON", + "loc": "46:30-46:31" + }, + { + "token": "RBRACKET", + "loc": "46:31-46:32" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "46:32-46:32" + }, + { + "token": "NEWLINE", + "loc": "46:32-46:33" + }, + { + "token": [ + "LIDENT", + "println" + ], + "loc": "47:3-47:10" + }, + { + "token": "LPAREN", + "loc": "47:10-47:11" + }, + { + "token": [ + "STRING", + "StringView nonzero start" + ], + "loc": "47:11-47:37" + }, + { + "token": "RPAREN", + "loc": "47:37-47:38" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "47:38-47:38" + }, + { + "token": "NEWLINE", + "loc": "47:38-47:39" + }, + { + "token": "FOR", + "loc": "48:3-48:6" + }, + { + "token": [ + "LIDENT", + "i" + ], + "loc": "48:7-48:8" + }, + { + "token": "COMMA", + "loc": "48:8-48:9" + }, + { + "token": [ + "LIDENT", + "c" + ], + "loc": "48:10-48:11" + }, + { + "token": "IN", + "loc": "48:12-48:14" + }, + { + "token": [ + "LIDENT", + "shifted_view" + ], + "loc": "48:15-48:27" + }, + { + "token": "LBRACE", + "loc": "48:28-48:29" + }, + { + "token": "NEWLINE", + "loc": "48:29-48:30" + }, + { + "token": [ + "LIDENT", + "println" + ], + "loc": "49:5-49:12" + }, + { + "token": "LPAREN", + "loc": "49:12-49:13" + }, + { + "token": [ + "INTERP", + "\"\\{i}:\\{c.to_int()}\"" + ], + "loc": "49:13-49:33" + }, + { + "token": "RPAREN", + "loc": "49:33-49:34" + }, + { + "token": "NEWLINE", + "loc": "49:34-49:35" + }, + { + "token": "RBRACE", + "loc": "50:3-50:4" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "50:4-50:4" + }, + { + "token": "NEWLINE", + "loc": "50:4-50:5" + }, + { + "token": "NEWLINE", + "loc": "51:1-51:2" + }, + { + "token": [ + "LIDENT", + "println" + ], + "loc": "52:3-52:10" + }, + { + "token": "LPAREN", + "loc": "52:10-52:11" + }, + { + "token": [ + "STRING", + "StringView nonzero start loop vars" + ], + "loc": "52:11-52:47" + }, + { + "token": "RPAREN", + "loc": "52:47-52:48" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "52:48-52:48" + }, + { + "token": "NEWLINE", + "loc": "52:48-52:49" + }, + { + "token": "FOR", + "loc": "53:3-53:6" + }, + { + "token": [ + "LIDENT", + "c" + ], + "loc": "53:7-53:8" + }, + { + "token": "IN", + "loc": "53:9-53:11" + }, + { + "token": [ + "LIDENT", + "shifted_view" + ], + "loc": "53:12-53:24" + }, + { + "token": [ + "SEMI", + true + ], + "loc": "53:24-53:25" + }, + { + "token": [ + "LIDENT", + "i" + ], + "loc": "53:26-53:27" + }, + { + "token": "EQUAL", + "loc": "53:28-53:29" + }, + { + "token": [ + "INT", + "0" + ], + "loc": "53:30-53:31" + }, + { + "token": "LBRACE", + "loc": "53:32-53:33" + }, + { + "token": "NEWLINE", + "loc": "53:33-53:34" + }, + { + "token": [ + "LIDENT", + "println" + ], + "loc": "54:5-54:12" + }, + { + "token": "LPAREN", + "loc": "54:12-54:13" + }, + { + "token": [ + "INTERP", + "\"\\{i}:\\{c.to_int()}\"" + ], + "loc": "54:13-54:33" + }, + { + "token": "RPAREN", + "loc": "54:33-54:34" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "54:34-54:34" + }, + { + "token": "NEWLINE", + "loc": "54:34-54:35" + }, + { + "token": "CONTINUE", + "loc": "55:5-55:13" + }, + { + "token": [ + "LIDENT", + "i" + ], + "loc": "55:14-55:15" + }, + { + "token": "PLUS", + "loc": "55:16-55:17" + }, + { + "token": [ + "INT", + "1" + ], + "loc": "55:18-55:19" + }, + { + "token": "NEWLINE", + "loc": "55:19-55:20" + }, + { + "token": "RBRACE", + "loc": "56:3-56:4" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "56:4-56:4" + }, + { + "token": "NEWLINE", + "loc": "56:4-56:5" + }, + { + "token": "NEWLINE", + "loc": "57:1-57:2" + }, + { + "token": [ + "LIDENT", + "println" + ], + "loc": "58:3-58:10" + }, + { + "token": "LPAREN", + "loc": "58:10-58:11" + }, + { + "token": [ + "STRING", + "String code units" + ], + "loc": "58:11-58:30" + }, + { + "token": "RPAREN", + "loc": "58:30-58:31" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "58:31-58:31" + }, + { + "token": "NEWLINE", + "loc": "58:31-58:32" + }, + { + "token": "FOR", + "loc": "59:3-59:6" + }, + { + "token": [ + "LIDENT", + "u" + ], + "loc": "59:7-59:8" + }, + { + "token": "IN", + "loc": "59:9-59:11" + }, + { + "token": [ + "LIDENT", + "str" + ], + "loc": "59:12-59:15" + }, + { + "token": [ + "DOT_LIDENT", + "code_units_for_test" + ], + "loc": "59:16-59:35" + }, + { + "token": "LPAREN", + "loc": "59:35-59:36" + }, + { + "token": "RPAREN", + "loc": "59:36-59:37" + }, + { + "token": "LBRACE", + "loc": "59:38-59:39" + }, + { + "token": "NEWLINE", + "loc": "59:39-59:40" + }, + { + "token": [ + "LIDENT", + "println" + ], + "loc": "60:5-60:12" + }, + { + "token": "LPAREN", + "loc": "60:12-60:13" + }, + { + "token": [ + "LIDENT", + "u" + ], + "loc": "60:13-60:14" + }, + { + "token": [ + "DOT_LIDENT", + "to_int" + ], + "loc": "60:15-60:21" + }, + { + "token": "LPAREN", + "loc": "60:21-60:22" + }, + { + "token": "RPAREN", + "loc": "60:22-60:23" + }, + { + "token": "RPAREN", + "loc": "60:23-60:24" + }, + { + "token": "NEWLINE", + "loc": "60:24-60:25" + }, + { + "token": "RBRACE", + "loc": "61:3-61:4" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "61:4-61:4" + }, + { + "token": "NEWLINE", + "loc": "61:4-61:5" + }, + { + "token": "NEWLINE", + "loc": "62:1-62:2" + }, + { + "token": [ + "LIDENT", + "println" + ], + "loc": "63:3-63:10" + }, + { + "token": "LPAREN", + "loc": "63:10-63:11" + }, + { + "token": [ + "STRING", + "String code units loop vars" + ], + "loc": "63:11-63:40" + }, + { + "token": "RPAREN", + "loc": "63:40-63:41" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "63:41-63:41" + }, + { + "token": "NEWLINE", + "loc": "63:41-63:42" + }, + { + "token": "FOR", + "loc": "64:3-64:6" + }, + { + "token": [ + "LIDENT", + "u" + ], + "loc": "64:7-64:8" + }, + { + "token": "IN", + "loc": "64:9-64:11" + }, + { + "token": [ + "LIDENT", + "str" + ], + "loc": "64:12-64:15" + }, + { + "token": [ + "DOT_LIDENT", + "code_units_for_test" + ], + "loc": "64:16-64:35" + }, + { + "token": "LPAREN", + "loc": "64:35-64:36" + }, + { + "token": "RPAREN", + "loc": "64:36-64:37" + }, + { + "token": [ + "SEMI", + true + ], + "loc": "64:37-64:38" + }, + { + "token": [ + "LIDENT", + "i" + ], + "loc": "64:39-64:40" + }, + { + "token": "EQUAL", + "loc": "64:41-64:42" + }, + { + "token": [ + "INT", + "0" + ], + "loc": "64:43-64:44" + }, + { + "token": "LBRACE", + "loc": "64:45-64:46" + }, + { + "token": "NEWLINE", + "loc": "64:46-64:47" + }, + { + "token": [ + "LIDENT", + "println" + ], + "loc": "65:5-65:12" + }, + { + "token": "LPAREN", + "loc": "65:12-65:13" + }, + { + "token": [ + "INTERP", + "\"\\{i}:\\{u.to_int()}\"" + ], + "loc": "65:13-65:33" + }, + { + "token": "RPAREN", + "loc": "65:33-65:34" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "65:34-65:34" + }, + { + "token": "NEWLINE", + "loc": "65:34-65:35" + }, + { + "token": "CONTINUE", + "loc": "66:5-66:13" + }, + { + "token": [ + "LIDENT", + "i" + ], + "loc": "66:14-66:15" + }, + { + "token": "PLUS", + "loc": "66:16-66:17" + }, + { + "token": [ + "INT", + "1" + ], + "loc": "66:18-66:19" + }, + { + "token": "NEWLINE", + "loc": "66:19-66:20" + }, + { + "token": "RBRACE", + "loc": "67:3-67:4" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "67:4-67:4" + }, + { + "token": "NEWLINE", + "loc": "67:4-67:5" + }, + { + "token": "NEWLINE", + "loc": "68:1-68:2" + }, + { + "token": [ + "LIDENT", + "println" + ], + "loc": "69:3-69:10" + }, + { + "token": "LPAREN", + "loc": "69:10-69:11" + }, + { + "token": [ + "STRING", + "String indexed code units" + ], + "loc": "69:11-69:38" + }, + { + "token": "RPAREN", + "loc": "69:38-69:39" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "69:39-69:39" + }, + { + "token": "NEWLINE", + "loc": "69:39-69:40" + }, + { + "token": "FOR", + "loc": "70:3-70:6" + }, + { + "token": [ + "LIDENT", + "i" + ], + "loc": "70:7-70:8" + }, + { + "token": "COMMA", + "loc": "70:8-70:9" + }, + { + "token": [ + "LIDENT", + "u" + ], + "loc": "70:10-70:11" + }, + { + "token": "IN", + "loc": "70:12-70:14" + }, + { + "token": [ + "LIDENT", + "str" + ], + "loc": "70:15-70:18" + }, + { + "token": [ + "DOT_LIDENT", + "code_units_for_test" + ], + "loc": "70:19-70:38" + }, + { + "token": "LPAREN", + "loc": "70:38-70:39" + }, + { + "token": "RPAREN", + "loc": "70:39-70:40" + }, + { + "token": [ + "SEMI", + true + ], + "loc": "70:40-70:41" + }, + { + "token": [ + "LIDENT", + "sum" + ], + "loc": "70:42-70:45" + }, + { + "token": "EQUAL", + "loc": "70:46-70:47" + }, + { + "token": [ + "INT", + "0" + ], + "loc": "70:48-70:49" + }, + { + "token": [ + "SEMI", + true + ], + "loc": "70:49-70:50" + }, + { + "token": [ + "LIDENT", + "sum" + ], + "loc": "70:51-70:54" + }, + { + "token": "EQUAL", + "loc": "70:55-70:56" + }, + { + "token": [ + "LIDENT", + "sum" + ], + "loc": "70:57-70:60" + }, + { + "token": "PLUS", + "loc": "70:61-70:62" + }, + { + "token": [ + "LIDENT", + "i" + ], + "loc": "70:63-70:64" + }, + { + "token": "PLUS", + "loc": "70:65-70:66" + }, + { + "token": [ + "LIDENT", + "u" + ], + "loc": "70:67-70:68" + }, + { + "token": [ + "DOT_LIDENT", + "to_int" + ], + "loc": "70:69-70:75" + }, + { + "token": "LPAREN", + "loc": "70:75-70:76" + }, + { + "token": "RPAREN", + "loc": "70:76-70:77" + }, + { + "token": "LBRACE", + "loc": "70:78-70:79" + }, + { + "token": "NEWLINE", + "loc": "70:79-70:80" + }, + { + "token": [ + "LIDENT", + "println" + ], + "loc": "71:5-71:12" + }, + { + "token": "LPAREN", + "loc": "71:12-71:13" + }, + { + "token": [ + "INTERP", + "\"\\{i}:\\{u.to_int()}\"" + ], + "loc": "71:13-71:33" + }, + { + "token": "RPAREN", + "loc": "71:33-71:34" + }, + { + "token": "NEWLINE", + "loc": "71:34-71:35" + }, + { + "token": "RBRACE", + "loc": "72:3-72:4" + }, + { + "token": "NOBREAK", + "loc": "72:5-72:12" + }, + { + "token": "LBRACE", + "loc": "72:13-72:14" + }, + { + "token": "NEWLINE", + "loc": "72:14-72:15" + }, + { + "token": [ + "LIDENT", + "println" + ], + "loc": "73:5-73:12" + }, + { + "token": "LPAREN", + "loc": "73:12-73:13" + }, + { + "token": [ + "LIDENT", + "sum" + ], + "loc": "73:13-73:16" + }, + { + "token": "RPAREN", + "loc": "73:16-73:17" + }, + { + "token": "NEWLINE", + "loc": "73:17-73:18" + }, + { + "token": "RBRACE", + "loc": "74:3-74:4" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "74:4-74:4" + }, + { + "token": "NEWLINE", + "loc": "74:4-74:5" + }, + { + "token": "NEWLINE", + "loc": "75:1-75:2" + }, + { + "token": [ + "LIDENT", + "println" + ], + "loc": "76:3-76:10" + }, + { + "token": "LPAREN", + "loc": "76:10-76:11" + }, + { + "token": [ + "STRING", + "String direct call code units" + ], + "loc": "76:11-76:42" + }, + { + "token": "RPAREN", + "loc": "76:42-76:43" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "76:43-76:43" + }, + { + "token": "NEWLINE", + "loc": "76:43-76:44" + }, + { + "token": "FOR", + "loc": "77:3-77:6" + }, + { + "token": [ + "LIDENT", + "u" + ], + "loc": "77:7-77:8" + }, + { + "token": "IN", + "loc": "77:9-77:11" + }, + { + "token": [ + "UIDENT", + "String" + ], + "loc": "77:12-77:18" + }, + { + "token": "COLONCOLON", + "loc": "77:18-77:20" + }, + { + "token": [ + "LIDENT", + "code_units_for_test" + ], + "loc": "77:20-77:39" + }, + { + "token": "LPAREN", + "loc": "77:39-77:40" + }, + { + "token": [ + "LIDENT", + "str" + ], + "loc": "77:40-77:43" + }, + { + "token": "RPAREN", + "loc": "77:43-77:44" + }, + { + "token": [ + "SEMI", + true + ], + "loc": "77:44-77:45" + }, + { + "token": [ + "LIDENT", + "i" + ], + "loc": "77:46-77:47" + }, + { + "token": "EQUAL", + "loc": "77:48-77:49" + }, + { + "token": [ + "INT", + "0" + ], + "loc": "77:50-77:51" + }, + { + "token": "LBRACE", + "loc": "77:52-77:53" + }, + { + "token": "NEWLINE", + "loc": "77:53-77:54" + }, + { + "token": [ + "LIDENT", + "println" + ], + "loc": "78:5-78:12" + }, + { + "token": "LPAREN", + "loc": "78:12-78:13" + }, + { + "token": [ + "INTERP", + "\"\\{i}:\\{u.to_int()}\"" + ], + "loc": "78:13-78:33" + }, + { + "token": "RPAREN", + "loc": "78:33-78:34" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "78:34-78:34" + }, + { + "token": "NEWLINE", + "loc": "78:34-78:35" + }, + { + "token": "CONTINUE", + "loc": "79:5-79:13" + }, + { + "token": [ + "LIDENT", + "i" + ], + "loc": "79:14-79:15" + }, + { + "token": "PLUS", + "loc": "79:16-79:17" + }, + { + "token": [ + "INT", + "1" + ], + "loc": "79:18-79:19" + }, + { + "token": "NEWLINE", + "loc": "79:19-79:20" + }, + { + "token": "RBRACE", + "loc": "80:3-80:4" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "80:4-80:4" + }, + { + "token": "NEWLINE", + "loc": "80:4-80:5" + }, + { + "token": "NEWLINE", + "loc": "81:1-81:2" + }, + { + "token": [ + "LIDENT", + "println" + ], + "loc": "82:3-82:10" + }, + { + "token": "LPAREN", + "loc": "82:10-82:11" + }, + { + "token": [ + "STRING", + "String pipe code units" + ], + "loc": "82:11-82:35" + }, + { + "token": "RPAREN", + "loc": "82:35-82:36" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "82:36-82:36" + }, + { + "token": "NEWLINE", + "loc": "82:36-82:37" + }, + { + "token": "FOR", + "loc": "83:3-83:6" + }, + { + "token": [ + "LIDENT", + "u" + ], + "loc": "83:7-83:8" + }, + { + "token": "IN", + "loc": "83:9-83:11" + }, + { + "token": "LPAREN", + "loc": "83:12-83:13" + }, + { + "token": [ + "LIDENT", + "str" + ], + "loc": "83:13-83:16" + }, + { + "token": "PIPE", + "loc": "83:17-83:19" + }, + { + "token": [ + "UIDENT", + "String" + ], + "loc": "83:20-83:26" + }, + { + "token": "COLONCOLON", + "loc": "83:26-83:28" + }, + { + "token": [ + "LIDENT", + "code_units_for_test" + ], + "loc": "83:28-83:47" + }, + { + "token": "RPAREN", + "loc": "83:47-83:48" + }, + { + "token": [ + "SEMI", + true + ], + "loc": "83:48-83:49" + }, + { + "token": [ + "LIDENT", + "i" + ], + "loc": "83:50-83:51" + }, + { + "token": "EQUAL", + "loc": "83:52-83:53" + }, + { + "token": [ + "INT", + "0" + ], + "loc": "83:54-83:55" + }, + { + "token": "LBRACE", + "loc": "83:56-83:57" + }, + { + "token": "NEWLINE", + "loc": "83:57-83:58" + }, + { + "token": [ + "LIDENT", + "println" + ], + "loc": "84:5-84:12" + }, + { + "token": "LPAREN", + "loc": "84:12-84:13" + }, + { + "token": [ + "INTERP", + "\"\\{i}:\\{u.to_int()}\"" + ], + "loc": "84:13-84:33" + }, + { + "token": "RPAREN", + "loc": "84:33-84:34" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "84:34-84:34" + }, + { + "token": "NEWLINE", + "loc": "84:34-84:35" + }, + { + "token": "CONTINUE", + "loc": "85:5-85:13" + }, + { + "token": [ + "LIDENT", + "i" + ], + "loc": "85:14-85:15" + }, + { + "token": "PLUS", + "loc": "85:16-85:17" + }, + { + "token": [ + "INT", + "1" + ], + "loc": "85:18-85:19" + }, + { + "token": "NEWLINE", + "loc": "85:19-85:20" + }, + { + "token": "RBRACE", + "loc": "86:3-86:4" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "86:4-86:4" + }, + { + "token": "NEWLINE", + "loc": "86:4-86:5" + }, + { + "token": "NEWLINE", + "loc": "87:1-87:2" + }, + { + "token": [ + "LIDENT", + "println" + ], + "loc": "88:3-88:10" + }, + { + "token": "LPAREN", + "loc": "88:10-88:11" + }, + { + "token": [ + "STRING", + "String reverse pipe code units" + ], + "loc": "88:11-88:43" + }, + { + "token": "RPAREN", + "loc": "88:43-88:44" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "88:44-88:44" + }, + { + "token": "NEWLINE", + "loc": "88:44-88:45" + }, + { + "token": "FOR", + "loc": "89:3-89:6" + }, + { + "token": [ + "LIDENT", + "u" + ], + "loc": "89:7-89:8" + }, + { + "token": "IN", + "loc": "89:9-89:11" + }, + { + "token": "LPAREN", + "loc": "89:12-89:13" + }, + { + "token": [ + "UIDENT", + "String" + ], + "loc": "89:13-89:19" + }, + { + "token": "COLONCOLON", + "loc": "89:19-89:21" + }, + { + "token": [ + "LIDENT", + "code_units_for_test" + ], + "loc": "89:21-89:40" + }, + { + "token": "PIPE_LEFT", + "loc": "89:41-89:43" + }, + { + "token": [ + "LIDENT", + "str" + ], + "loc": "89:44-89:47" + }, + { + "token": "RPAREN", + "loc": "89:47-89:48" + }, + { + "token": [ + "SEMI", + true + ], + "loc": "89:48-89:49" + }, + { + "token": [ + "LIDENT", + "i" + ], + "loc": "89:50-89:51" + }, + { + "token": "EQUAL", + "loc": "89:52-89:53" + }, + { + "token": [ + "INT", + "0" + ], + "loc": "89:54-89:55" + }, + { + "token": "LBRACE", + "loc": "89:56-89:57" + }, + { + "token": "NEWLINE", + "loc": "89:57-89:58" + }, + { + "token": [ + "LIDENT", + "println" + ], + "loc": "90:5-90:12" + }, + { + "token": "LPAREN", + "loc": "90:12-90:13" + }, + { + "token": [ + "INTERP", + "\"\\{i}:\\{u.to_int()}\"" + ], + "loc": "90:13-90:33" + }, + { + "token": "RPAREN", + "loc": "90:33-90:34" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "90:34-90:34" + }, + { + "token": "NEWLINE", + "loc": "90:34-90:35" + }, + { + "token": "CONTINUE", + "loc": "91:5-91:13" + }, + { + "token": [ + "LIDENT", + "i" + ], + "loc": "91:14-91:15" + }, + { + "token": "PLUS", + "loc": "91:16-91:17" + }, + { + "token": [ + "INT", + "1" + ], + "loc": "91:18-91:19" + }, + { + "token": "NEWLINE", + "loc": "91:19-91:20" + }, + { + "token": "RBRACE", + "loc": "92:3-92:4" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "92:4-92:4" + }, + { + "token": "NEWLINE", + "loc": "92:4-92:5" + }, + { + "token": "NEWLINE", + "loc": "93:1-93:2" + }, + { + "token": [ + "LIDENT", + "println" + ], + "loc": "94:3-94:10" + }, + { + "token": "LPAREN", + "loc": "94:10-94:11" + }, + { + "token": [ + "STRING", + "StringView code units loop vars" + ], + "loc": "94:11-94:44" + }, + { + "token": "RPAREN", + "loc": "94:44-94:45" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "94:45-94:45" + }, + { + "token": "NEWLINE", + "loc": "94:45-94:46" + }, + { + "token": "FOR", + "loc": "95:3-95:6" + }, + { + "token": [ + "LIDENT", + "u" + ], + "loc": "95:7-95:8" + }, + { + "token": "IN", + "loc": "95:9-95:11" + }, + { + "token": [ + "LIDENT", + "shifted_view" + ], + "loc": "95:12-95:24" + }, + { + "token": [ + "DOT_LIDENT", + "code_units_for_test" + ], + "loc": "95:25-95:44" + }, + { + "token": "LPAREN", + "loc": "95:44-95:45" + }, + { + "token": "RPAREN", + "loc": "95:45-95:46" + }, + { + "token": [ + "SEMI", + true + ], + "loc": "95:46-95:47" + }, + { + "token": [ + "LIDENT", + "i" + ], + "loc": "95:48-95:49" + }, + { + "token": "EQUAL", + "loc": "95:50-95:51" + }, + { + "token": [ + "INT", + "0" + ], + "loc": "95:52-95:53" + }, + { + "token": "LBRACE", + "loc": "95:54-95:55" + }, + { + "token": "NEWLINE", + "loc": "95:55-95:56" + }, + { + "token": [ + "LIDENT", + "println" + ], + "loc": "96:5-96:12" + }, + { + "token": "LPAREN", + "loc": "96:12-96:13" + }, + { + "token": [ + "INTERP", + "\"\\{i}:\\{u.to_int()}\"" + ], + "loc": "96:13-96:33" + }, + { + "token": "RPAREN", + "loc": "96:33-96:34" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "96:34-96:34" + }, + { + "token": "NEWLINE", + "loc": "96:34-96:35" + }, + { + "token": "CONTINUE", + "loc": "97:5-97:13" + }, + { + "token": [ + "LIDENT", + "i" + ], + "loc": "97:14-97:15" + }, + { + "token": "PLUS", + "loc": "97:16-97:17" + }, + { + "token": [ + "INT", + "1" + ], + "loc": "97:18-97:19" + }, + { + "token": "NEWLINE", + "loc": "97:19-97:20" + }, + { + "token": "RBRACE", + "loc": "98:3-98:4" + }, + { + "token": "NEWLINE", + "loc": "98:4-98:5" + }, + { + "token": "RBRACE", + "loc": "99:1-99:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "99:2-99:2" + }, + { + "token": "NEWLINE", + "loc": "99:2-99:3" + }, + { + "token": "EOF", + "loc": "100:1-100:1" + } +] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/pipeline_test_iter_string_concat.json b/test/sync_test/__snapshot__/pipeline_test_iter_string_concat.json index c4d2f2b8..d509a3bc 100644 --- a/test/sync_test/__snapshot__/pipeline_test_iter_string_concat.json +++ b/test/sync_test/__snapshot__/pipeline_test_iter_string_concat.json @@ -489,7 +489,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { diff --git a/test/sync_test/__snapshot__/pipeline_test_iterator.json b/test/sync_test/__snapshot__/pipeline_test_iterator.json index d3139d89..d6bfa7e8 100644 --- a/test/sync_test/__snapshot__/pipeline_test_iterator.json +++ b/test/sync_test/__snapshot__/pipeline_test_iterator.json @@ -1212,6 +1212,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, @@ -1918,6 +1923,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, @@ -3211,7 +3221,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { diff --git a/test/sync_test/__snapshot__/pipeline_test_js_comp_perf.json b/test/sync_test/__snapshot__/pipeline_test_js_comp_perf.json index 332b90f8..8845ac2b 100644 --- a/test/sync_test/__snapshot__/pipeline_test_js_comp_perf.json +++ b/test/sync_test/__snapshot__/pipeline_test_js_comp_perf.json @@ -5494,7 +5494,8 @@ } } ] - } + }, + "is_iter": false } } } @@ -10038,7 +10039,8 @@ } } ] - } + }, + "is_iter": false } } } @@ -10644,7 +10646,8 @@ } } ] - } + }, + "is_iter": false } } } diff --git a/test/sync_test/__snapshot__/pipeline_test_json_literal2.json b/test/sync_test/__snapshot__/pipeline_test_json_literal2.json index 7a1cc3c3..0bcdce04 100644 --- a/test/sync_test/__snapshot__/pipeline_test_json_literal2.json +++ b/test/sync_test/__snapshot__/pipeline_test_json_literal2.json @@ -125,6 +125,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, @@ -410,7 +415,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { @@ -602,7 +608,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { @@ -776,11 +783,13 @@ } } ] - } + }, + "is_iter": false } } ] - } + }, + "is_iter": false } }, "body": { @@ -1277,7 +1286,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { @@ -1399,7 +1409,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { @@ -1521,7 +1532,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { @@ -2652,6 +2664,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, @@ -2815,7 +2832,8 @@ } } ] - } + }, + "is_iter": false } } } @@ -3007,7 +3025,8 @@ } } ] - } + }, + "is_iter": false } } } diff --git a/test/sync_test/__snapshot__/pipeline_test_json_pattern.json b/test/sync_test/__snapshot__/pipeline_test_json_pattern.json index 91e9e9d6..a6653e46 100644 --- a/test/sync_test/__snapshot__/pipeline_test_json_pattern.json +++ b/test/sync_test/__snapshot__/pipeline_test_json_pattern.json @@ -1089,7 +1089,8 @@ } } ] - } + }, + "is_iter": false } } } diff --git a/test/sync_test/__snapshot__/pipeline_test_json_roundtrip.mbt b/test/sync_test/__snapshot__/pipeline_test_json_roundtrip.mbt index 3ce9976f..9eedb939 100644 --- a/test/sync_test/__snapshot__/pipeline_test_json_roundtrip.mbt +++ b/test/sync_test/__snapshot__/pipeline_test_json_roundtrip.mbt @@ -150,7 +150,7 @@ enum EdgeCaseEnum { // Helper function to test roundtrip with detailed output fn[T : ToJson + FromJson + Eq + Debug] test_roundtrip(value : T, test_name : String) -> Unit { let json = value.to_json() - let result : Result[T, @json.JsonDecodeError] = try? @json.from_json(json) + let result : Result[T, @json.JsonDecodeError] = to_result(() => @json.from_json(json)) match result { Ok(decoded) => { if decoded == value { @@ -384,3 +384,12 @@ fn init { println("JSON roundtrip tests completed") } + +fn[T, E : Error] to_result(f : () -> T raise E) -> Result[T, E] { + try f() + catch { + err => Result::Err(err) + } noraise { + value => Result::Ok(value) + } +} diff --git a/test/sync_test/__snapshot__/pipeline_test_json_roundtrip.mbt.tokens.json b/test/sync_test/__snapshot__/pipeline_test_json_roundtrip.mbt.tokens.json index 183a5a5c..65af8c7b 100644 --- a/test/sync_test/__snapshot__/pipeline_test_json_roundtrip.mbt.tokens.json +++ b/test/sync_test/__snapshot__/pipeline_test_json_roundtrip.mbt.tokens.json @@ -5769,48 +5769,71 @@ "loc": "153:49-153:50" }, { - "token": "TRY_QUESTION", - "loc": "153:51-153:55" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "153:51-153:60" + }, + { + "token": "LPAREN", + "loc": "153:60-153:61" + }, + { + "token": "LPAREN", + "loc": "153:61-153:62" + }, + { + "token": "RPAREN", + "loc": "153:62-153:63" + }, + { + "token": "FAT_ARROW", + "loc": "153:64-153:66" }, { "token": [ "PACKAGE_NAME", "json" ], - "loc": "153:56-153:61" + "loc": "153:67-153:72" }, { "token": [ "DOT_LIDENT", "from_json" ], - "loc": "153:62-153:71" + "loc": "153:73-153:82" }, { "token": "LPAREN", - "loc": "153:71-153:72" + "loc": "153:82-153:83" }, { "token": [ "LIDENT", "json" ], - "loc": "153:72-153:76" + "loc": "153:83-153:87" }, { "token": "RPAREN", - "loc": "153:76-153:77" + "loc": "153:87-153:88" + }, + { + "token": "RPAREN", + "loc": "153:88-153:89" }, { "token": [ "SEMI", false ], - "loc": "153:77-153:77" + "loc": "153:89-153:89" }, { "token": "NEWLINE", - "loc": "153:77-153:78" + "loc": "153:89-153:90" }, { "token": "MATCH", @@ -16460,8 +16483,324 @@ "token": "NEWLINE", "loc": "386:2-386:3" }, + { + "token": "NEWLINE", + "loc": "387:1-387:2" + }, + { + "token": "FN", + "loc": "388:1-388:3" + }, + { + "token": "LBRACKET", + "loc": "388:3-388:4" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "388:4-388:5" + }, + { + "token": "COMMA", + "loc": "388:5-388:6" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "388:7-388:8" + }, + { + "token": "COLON", + "loc": "388:9-388:10" + }, + { + "token": [ + "UIDENT", + "Error" + ], + "loc": "388:11-388:16" + }, + { + "token": "RBRACKET", + "loc": "388:16-388:17" + }, + { + "token": [ + "LIDENT", + "to_result" + ], + "loc": "388:18-388:27" + }, + { + "token": "LPAREN", + "loc": "388:27-388:28" + }, + { + "token": [ + "LIDENT", + "f" + ], + "loc": "388:28-388:29" + }, + { + "token": "COLON", + "loc": "388:30-388:31" + }, + { + "token": "LPAREN", + "loc": "388:32-388:33" + }, + { + "token": "RPAREN", + "loc": "388:33-388:34" + }, + { + "token": "THIN_ARROW", + "loc": "388:35-388:37" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "388:38-388:39" + }, + { + "token": "RAISE", + "loc": "388:40-388:45" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "388:46-388:47" + }, + { + "token": "RPAREN", + "loc": "388:47-388:48" + }, + { + "token": "THIN_ARROW", + "loc": "388:49-388:51" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "388:52-388:58" + }, + { + "token": "LBRACKET", + "loc": "388:58-388:59" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "388:59-388:60" + }, + { + "token": "COMMA", + "loc": "388:60-388:61" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "388:62-388:63" + }, + { + "token": "RBRACKET", + "loc": "388:63-388:64" + }, + { + "token": "LBRACE", + "loc": "388:65-388:66" + }, + { + "token": "NEWLINE", + "loc": "388:66-388:67" + }, + { + "token": "TRY", + "loc": "389:3-389:6" + }, + { + "token": [ + "LIDENT", + "f" + ], + "loc": "389:7-389:8" + }, + { + "token": "LPAREN", + "loc": "389:8-389:9" + }, + { + "token": "RPAREN", + "loc": "389:9-389:10" + }, + { + "token": "NEWLINE", + "loc": "389:10-389:11" + }, + { + "token": "CATCH", + "loc": "390:3-390:8" + }, + { + "token": "LBRACE", + "loc": "390:9-390:10" + }, + { + "token": "NEWLINE", + "loc": "390:10-390:11" + }, + { + "token": [ + "LIDENT", + "err" + ], + "loc": "391:5-391:8" + }, + { + "token": "FAT_ARROW", + "loc": "391:9-391:11" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "391:12-391:18" + }, + { + "token": "COLONCOLON", + "loc": "391:18-391:20" + }, + { + "token": [ + "UIDENT", + "Err" + ], + "loc": "391:20-391:23" + }, + { + "token": "LPAREN", + "loc": "391:23-391:24" + }, + { + "token": [ + "LIDENT", + "err" + ], + "loc": "391:24-391:27" + }, + { + "token": "RPAREN", + "loc": "391:27-391:28" + }, + { + "token": "NEWLINE", + "loc": "391:28-391:29" + }, + { + "token": "RBRACE", + "loc": "392:3-392:4" + }, + { + "token": "NORAISE", + "loc": "392:5-392:12" + }, + { + "token": "LBRACE", + "loc": "392:13-392:14" + }, + { + "token": "NEWLINE", + "loc": "392:14-392:15" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "393:5-393:10" + }, + { + "token": "FAT_ARROW", + "loc": "393:11-393:13" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "393:14-393:20" + }, + { + "token": "COLONCOLON", + "loc": "393:20-393:22" + }, + { + "token": [ + "UIDENT", + "Ok" + ], + "loc": "393:22-393:24" + }, + { + "token": "LPAREN", + "loc": "393:24-393:25" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "393:25-393:30" + }, + { + "token": "RPAREN", + "loc": "393:30-393:31" + }, + { + "token": "NEWLINE", + "loc": "393:31-393:32" + }, + { + "token": "RBRACE", + "loc": "394:3-394:4" + }, + { + "token": "NEWLINE", + "loc": "394:4-394:5" + }, + { + "token": "RBRACE", + "loc": "395:1-395:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "395:2-395:2" + }, + { + "token": "NEWLINE", + "loc": "395:2-395:3" + }, { "token": "EOF", - "loc": "387:1-387:1" + "loc": "396:1-396:1" } ] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/pipeline_test_label_loop_foreach2.json b/test/sync_test/__snapshot__/pipeline_test_label_loop_foreach2.json index 5d7b46ae..fdfad467 100644 --- a/test/sync_test/__snapshot__/pipeline_test_label_loop_foreach2.json +++ b/test/sync_test/__snapshot__/pipeline_test_label_loop_foreach2.json @@ -2612,7 +2612,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -2661,7 +2662,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -2710,7 +2712,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -2746,7 +2749,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -2831,7 +2835,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -2880,7 +2885,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -2929,7 +2935,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -2965,7 +2972,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -3050,7 +3058,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -3099,7 +3108,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -3148,7 +3158,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -3184,7 +3195,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -3269,7 +3281,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -3318,7 +3331,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -3367,7 +3381,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -3403,7 +3418,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -3501,7 +3517,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -3550,7 +3567,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -3599,7 +3617,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -3635,7 +3654,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -3720,7 +3740,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -3769,7 +3790,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -3818,7 +3840,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -3854,7 +3877,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -3939,7 +3963,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -3988,7 +4013,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -4050,7 +4076,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -4086,7 +4113,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -4158,7 +4186,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -4194,7 +4223,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -4230,7 +4260,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -4292,7 +4323,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -4366,7 +4398,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -4402,7 +4435,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -4438,7 +4472,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -4474,7 +4509,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { diff --git a/test/sync_test/__snapshot__/pipeline_test_label_loop_foreach3.json b/test/sync_test/__snapshot__/pipeline_test_label_loop_foreach3.json index d002bb0f..df878716 100644 --- a/test/sync_test/__snapshot__/pipeline_test_label_loop_foreach3.json +++ b/test/sync_test/__snapshot__/pipeline_test_label_loop_foreach3.json @@ -1658,7 +1658,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -1707,7 +1708,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -1756,7 +1758,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -1841,7 +1844,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -1890,7 +1894,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -1926,7 +1931,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -2011,7 +2017,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -2060,7 +2067,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -2096,7 +2104,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -2181,7 +2190,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -2230,7 +2240,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -2266,7 +2277,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -2351,7 +2363,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -2400,7 +2413,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -2436,7 +2450,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -2521,7 +2536,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -2570,7 +2586,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -2619,7 +2636,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -2706,7 +2724,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -2755,7 +2774,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -2804,7 +2824,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { diff --git a/test/sync_test/__snapshot__/pipeline_test_labeled_arg2.json b/test/sync_test/__snapshot__/pipeline_test_labeled_arg2.json index e057c078..f2f593dd 100644 --- a/test/sync_test/__snapshot__/pipeline_test_labeled_arg2.json +++ b/test/sync_test/__snapshot__/pipeline_test_labeled_arg2.json @@ -760,7 +760,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -907,7 +908,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { diff --git a/test/sync_test/__snapshot__/pipeline_test_large_static_array.json b/test/sync_test/__snapshot__/pipeline_test_large_static_array.json index 0cb0e64b..7ae13bf0 100644 --- a/test/sync_test/__snapshot__/pipeline_test_large_static_array.json +++ b/test/sync_test/__snapshot__/pipeline_test_large_static_array.json @@ -168704,7 +168704,8 @@ } } ] - } + }, + "is_iter": false } }, "vis": { diff --git a/test/sync_test/__snapshot__/pipeline_test_large_struct.json b/test/sync_test/__snapshot__/pipeline_test_large_struct.json index 516fbf98..9b2cb5ae 100644 --- a/test/sync_test/__snapshot__/pipeline_test_large_struct.json +++ b/test/sync_test/__snapshot__/pipeline_test_large_struct.json @@ -1079,6 +1079,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, diff --git a/test/sync_test/__snapshot__/pipeline_test_layout_table_pressure.json b/test/sync_test/__snapshot__/pipeline_test_layout_table_pressure.json new file mode 100644 index 00000000..cc17215e --- /dev/null +++ b/test/sync_test/__snapshot__/pipeline_test_layout_table_pressure.json @@ -0,0 +1,8161 @@ +[ + { + "kind": "Impl::TopTypeDef", + "loc": null, + "children": { + "value": { + "kind": "TypeDecl", + "loc": null, + "children": { + "tycon": "LayoutLeaf", + "params": { + "kind": "TypeDecl::ParamList", + "loc": null, + "children": [] + }, + "components": { + "kind": "TypeDesc::Record", + "loc": null, + "children": { + "value": { + "kind": "TypeDesc::Record::FieldList", + "loc": null, + "children": [ + { + "kind": "FieldDecl", + "loc": null, + "children": { + "name": { + "kind": "FieldName", + "loc": null, + "children": { + "label": "i0" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Int" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "mut": false, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FieldDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + { + "kind": "FieldDecl", + "loc": null, + "children": { + "name": { + "kind": "FieldName", + "loc": null, + "children": { + "label": "r0" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "String" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "mut": false, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FieldDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + { + "kind": "FieldDecl", + "loc": null, + "children": { + "name": { + "kind": "FieldName", + "loc": null, + "children": { + "label": "i1" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Int64" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "mut": false, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FieldDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + { + "kind": "FieldDecl", + "loc": null, + "children": { + "name": { + "kind": "FieldName", + "loc": null, + "children": { + "label": "r1" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Bytes" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "mut": false, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FieldDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + { + "kind": "FieldDecl", + "loc": null, + "children": { + "name": { + "kind": "FieldName", + "loc": null, + "children": { + "label": "d0" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Double" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "mut": false, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FieldDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + { + "kind": "FieldDecl", + "loc": null, + "children": { + "name": { + "kind": "FieldName", + "loc": null, + "children": { + "label": "r2" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "String" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "mut": false, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FieldDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + } + ] + } + } + }, + "attrs": { + "kind": "TypeDecl::AttrList", + "loc": null, + "children": [ + { + "kind": "Attribute", + "loc": null, + "children": { + "raw": "#valtype" + } + } + ] + }, + "doc": "", + "type_vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "is_declare": false, + "deriving": { + "kind": "TypeDecl::DerivingList", + "loc": null, + "children": [ + { + "kind": "DerivingDirective", + "loc": null, + "children": { + "type_name": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Debug" + } + }, + "is_object": false + } + }, + "args": { + "kind": "DerivingDirective::ArgList", + "loc": null, + "children": [] + } + } + } + ] + } + } + } + } + }, + { + "kind": "Impl::TopTypeDef", + "loc": null, + "children": { + "value": { + "kind": "TypeDecl", + "loc": null, + "children": { + "tycon": "LayoutBranch", + "params": { + "kind": "TypeDecl::ParamList", + "loc": null, + "children": [] + }, + "components": { + "kind": "TypeDesc::Record", + "loc": null, + "children": { + "value": { + "kind": "TypeDesc::Record::FieldList", + "loc": null, + "children": [ + { + "kind": "FieldDecl", + "loc": null, + "children": { + "name": { + "kind": "FieldName", + "loc": null, + "children": { + "label": "first" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "LayoutLeaf" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "mut": false, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FieldDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + { + "kind": "FieldDecl", + "loc": null, + "children": { + "name": { + "kind": "FieldName", + "loc": null, + "children": { + "label": "mark" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "String" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "mut": false, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FieldDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + { + "kind": "FieldDecl", + "loc": null, + "children": { + "name": { + "kind": "FieldName", + "loc": null, + "children": { + "label": "serial" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Int64" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "mut": false, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FieldDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + { + "kind": "FieldDecl", + "loc": null, + "children": { + "name": { + "kind": "FieldName", + "loc": null, + "children": { + "label": "second" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "LayoutLeaf" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "mut": false, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FieldDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + { + "kind": "FieldDecl", + "loc": null, + "children": { + "name": { + "kind": "FieldName", + "loc": null, + "children": { + "label": "payload" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Bytes" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "mut": false, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FieldDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + { + "kind": "FieldDecl", + "loc": null, + "children": { + "name": { + "kind": "FieldName", + "loc": null, + "children": { + "label": "tail" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "String" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "mut": false, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FieldDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + { + "kind": "FieldDecl", + "loc": null, + "children": { + "name": { + "kind": "FieldName", + "loc": null, + "children": { + "label": "alternate" + } + }, + "ty": { + "kind": "Type::Option", + "loc": null, + "children": { + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "String" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + "mut": false, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FieldDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + } + ] + } + } + }, + "attrs": { + "kind": "TypeDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "", + "type_vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "is_declare": false, + "deriving": { + "kind": "TypeDecl::DerivingList", + "loc": null, + "children": [ + { + "kind": "DerivingDirective", + "loc": null, + "children": { + "type_name": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Debug" + } + }, + "is_object": false + } + }, + "args": { + "kind": "DerivingDirective::ArgList", + "loc": null, + "children": [] + } + } + } + ] + } + } + } + } + }, + { + "kind": "Impl::TopTypeDef", + "loc": null, + "children": { + "value": { + "kind": "TypeDecl", + "loc": null, + "children": { + "tycon": "LayoutBox", + "params": { + "kind": "TypeDecl::ParamList", + "loc": null, + "children": [] + }, + "components": { + "kind": "TypeDesc::Record", + "loc": null, + "children": { + "value": { + "kind": "TypeDesc::Record::FieldList", + "loc": null, + "children": [ + { + "kind": "FieldDecl", + "loc": null, + "children": { + "name": { + "kind": "FieldName", + "loc": null, + "children": { + "label": "name" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "String" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "mut": false, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FieldDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + { + "kind": "FieldDecl", + "loc": null, + "children": { + "name": { + "kind": "FieldName", + "loc": null, + "children": { + "label": "n0" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Int" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "mut": false, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FieldDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + { + "kind": "FieldDecl", + "loc": null, + "children": { + "name": { + "kind": "FieldName", + "loc": null, + "children": { + "label": "left" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "LayoutBranch" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "mut": false, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FieldDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + { + "kind": "FieldDecl", + "loc": null, + "children": { + "name": { + "kind": "FieldName", + "loc": null, + "children": { + "label": "blob" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Bytes" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "mut": false, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FieldDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + { + "kind": "FieldDecl", + "loc": null, + "children": { + "name": { + "kind": "FieldName", + "loc": null, + "children": { + "label": "n1" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Int64" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "mut": false, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FieldDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + { + "kind": "FieldDecl", + "loc": null, + "children": { + "name": { + "kind": "FieldName", + "loc": null, + "children": { + "label": "right" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "LayoutBranch" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "mut": false, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FieldDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + { + "kind": "FieldDecl", + "loc": null, + "children": { + "name": { + "kind": "FieldName", + "loc": null, + "children": { + "label": "checkpoint" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "String" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "mut": false, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FieldDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + { + "kind": "FieldDecl", + "loc": null, + "children": { + "name": { + "kind": "FieldName", + "loc": null, + "children": { + "label": "factor" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Double" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "mut": false, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FieldDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + { + "kind": "FieldDecl", + "loc": null, + "children": { + "name": { + "kind": "FieldName", + "loc": null, + "children": { + "label": "leaf" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "LayoutLeaf" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "mut": false, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FieldDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + { + "kind": "FieldDecl", + "loc": null, + "children": { + "name": { + "kind": "FieldName", + "loc": null, + "children": { + "label": "payload2" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Bytes" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "mut": false, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FieldDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + { + "kind": "FieldDecl", + "loc": null, + "children": { + "name": { + "kind": "FieldName", + "loc": null, + "children": { + "label": "trailer" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "String" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "mut": false, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FieldDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + { + "kind": "FieldDecl", + "loc": null, + "children": { + "name": { + "kind": "FieldName", + "loc": null, + "children": { + "label": "n2" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Int" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "mut": false, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FieldDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + { + "kind": "FieldDecl", + "loc": null, + "children": { + "name": { + "kind": "FieldName", + "loc": null, + "children": { + "label": "flag" + } + }, + "ty": { + "kind": "Type::Option", + "loc": null, + "children": { + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "String" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + "mut": false, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FieldDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + } + ] + } + } + }, + "attrs": { + "kind": "TypeDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "", + "type_vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "is_declare": false, + "deriving": { + "kind": "TypeDecl::DerivingList", + "loc": null, + "children": [ + { + "kind": "DerivingDirective", + "loc": null, + "children": { + "type_name": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Debug" + } + }, + "is_object": false + } + }, + "args": { + "kind": "DerivingDirective::ArgList", + "loc": null, + "children": [] + } + } + } + ] + } + } + } + } + }, + { + "kind": "Impl::TopTypeDef", + "loc": null, + "children": { + "value": { + "kind": "TypeDecl", + "loc": null, + "children": { + "tycon": "LayoutEnvelope", + "params": { + "kind": "TypeDecl::ParamList", + "loc": null, + "children": [] + }, + "components": { + "kind": "TypeDesc::Variant", + "loc": null, + "children": { + "value": { + "kind": "TypeDesc::Variant::ConstrList", + "loc": null, + "children": [ + { + "kind": "ConstrDecl", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Empty" + } + }, + "args": null, + "tag": null, + "attrs": { + "kind": "ConstrDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + { + "kind": "ConstrDecl", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Packed" + } + }, + "args": { + "kind": "ConstrDecl::ArgList", + "loc": null, + "children": [ + { + "kind": "ConstrParam", + "loc": null, + "children": { + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "LayoutBox" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "mut": false, + "label": null + } + }, + { + "kind": "ConstrParam", + "loc": null, + "children": { + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "FixedArray" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [ + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "LayoutBranch" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + ] + } + } + }, + "mut": false, + "label": null + } + }, + { + "kind": "ConstrParam", + "loc": null, + "children": { + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "FixedArray" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [ + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "LayoutLeaf" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + ] + } + } + }, + "mut": false, + "label": null + } + }, + { + "kind": "ConstrParam", + "loc": null, + "children": { + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "String" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "mut": false, + "label": null + } + } + ] + }, + "tag": null, + "attrs": { + "kind": "ConstrDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + } + ] + } + } + }, + "attrs": { + "kind": "TypeDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "", + "type_vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "is_declare": false, + "deriving": { + "kind": "TypeDecl::DerivingList", + "loc": null, + "children": [ + { + "kind": "DerivingDirective", + "loc": null, + "children": { + "type_name": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Debug" + } + }, + "is_object": false + } + }, + "args": { + "kind": "DerivingDirective::ArgList", + "loc": null, + "children": [] + } + } + } + ] + } + } + } + } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "mk_bytes" + } + }, + "has_error": null, + "is_async": null, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "seed" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Int" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "len" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Int" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + } + ] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Bytes" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Method", + "loc": null, + "children": { + "type_name": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Bytes" + } + }, + "is_object": false + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "makei" + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "len" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Function", + "loc": null, + "children": { + "func": { + "kind": "Func::Lambda", + "loc": null, + "children": { + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "i" + } + }, + "ty": null + } + } + ] + }, + "body": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Group", + "loc": null, + "children": { + "expr": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "+" + } + } + } + }, + "lhs": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "+" + } + } + } + }, + "lhs": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "seed" + } + } + } + } + } + }, + "rhs": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "i" + } + } + } + } + } + } + } + }, + "rhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "65" + } + } + } + } + } + }, + "group": { + "kind": "Group::Paren", + "loc": null, + "children": {} + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "to_byte" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "mk_leaf" + } + }, + "has_error": null, + "is_async": null, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "n" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Int" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "ch" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Char" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "label" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "String" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + } + ] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "LayoutLeaf" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::Record", + "loc": null, + "children": { + "type_name": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "LayoutLeaf" + } + }, + "is_object": false + } + }, + "fields": { + "kind": "Expr::Record::FieldList", + "loc": null, + "children": [ + { + "kind": "FieldDef", + "loc": null, + "children": { + "label": { + "kind": "Label", + "loc": null, + "children": { + "name": "i0" + } + }, + "expr": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "n" + } + } + } + } + } + }, + "is_pun": false + } + }, + { + "kind": "FieldDef", + "loc": null, + "children": { + "label": { + "kind": "Label", + "loc": null, + "children": { + "name": "r0" + } + }, + "expr": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "+" + } + } + } + }, + "lhs": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "+" + } + } + } + }, + "lhs": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "label" + } + } + } + } + } + }, + "rhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": ":" + } + } + } + } + } + }, + "rhs": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Method", + "loc": null, + "children": { + "type_name": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "String" + } + }, + "is_object": false + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "make" + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "+" + } + } + } + }, + "lhs": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "n" + } + } + } + } + } + }, + "rhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "1" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "ch" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + }, + "is_pun": false + } + }, + { + "kind": "FieldDef", + "loc": null, + "children": { + "label": { + "kind": "Label", + "loc": null, + "children": { + "name": "i1" + } + }, + "expr": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "n" + } + } + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "to_int64" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "is_pun": false + } + }, + { + "kind": "FieldDef", + "loc": null, + "children": { + "label": { + "kind": "Label", + "loc": null, + "children": { + "name": "r1" + } + }, + "expr": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "mk_bytes" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "n" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "+" + } + } + } + }, + "lhs": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "n" + } + } + } + } + } + }, + "rhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "3" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "is_pun": false + } + }, + { + "kind": "FieldDef", + "loc": null, + "children": { + "label": { + "kind": "Label", + "loc": null, + "children": { + "name": "d0" + } + }, + "expr": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "+" + } + } + } + }, + "lhs": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "n" + } + } + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "to_double" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "rhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Double", + "loc": null, + "children": { + "value": "0.25" + } + } + } + } + } + }, + "is_pun": false + } + }, + { + "kind": "FieldDef", + "loc": null, + "children": { + "label": { + "kind": "Label", + "loc": null, + "children": { + "name": "r2" + } + }, + "expr": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "+" + } + } + } + }, + "lhs": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "label" + } + } + } + } + } + }, + "rhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": ":mid" + } + } + } + } + } + }, + "is_pun": false + } + } + ] + }, + "trailing": { + "kind": "Trailing::Comma", + "loc": null, + "children": {} + } + } + } + } + } + } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "mk_branch" + } + }, + "has_error": null, + "is_async": null, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "a" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "LayoutLeaf" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "b" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "LayoutLeaf" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "label" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "String" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + } + ] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "LayoutBranch" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::Record", + "loc": null, + "children": { + "type_name": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "LayoutBranch" + } + }, + "is_object": false + } + }, + "fields": { + "kind": "Expr::Record::FieldList", + "loc": null, + "children": [ + { + "kind": "FieldDef", + "loc": null, + "children": { + "label": { + "kind": "Label", + "loc": null, + "children": { + "name": "first" + } + }, + "expr": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "a" + } + } + } + } + } + }, + "is_pun": false + } + }, + { + "kind": "FieldDef", + "loc": null, + "children": { + "label": { + "kind": "Label", + "loc": null, + "children": { + "name": "mark" + } + }, + "expr": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "+" + } + } + } + }, + "lhs": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "label" + } + } + } + } + } + }, + "rhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": ":mark" + } + } + } + } + } + }, + "is_pun": false + } + }, + { + "kind": "FieldDef", + "loc": null, + "children": { + "label": { + "kind": "Label", + "loc": null, + "children": { + "name": "serial" + } + }, + "expr": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "1000" + } + } + } + }, + "is_pun": false + } + }, + { + "kind": "FieldDef", + "loc": null, + "children": { + "label": { + "kind": "Label", + "loc": null, + "children": { + "name": "second" + } + }, + "expr": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "b" + } + } + } + } + } + }, + "is_pun": false + } + }, + { + "kind": "FieldDef", + "loc": null, + "children": { + "label": { + "kind": "Label", + "loc": null, + "children": { + "name": "payload" + } + }, + "expr": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "mk_bytes" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "20" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "7" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "is_pun": false + } + }, + { + "kind": "FieldDef", + "loc": null, + "children": { + "label": { + "kind": "Label", + "loc": null, + "children": { + "name": "tail" + } + }, + "expr": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "+" + } + } + } + }, + "lhs": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "label" + } + } + } + } + } + }, + "rhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": ":tail" + } + } + } + } + } + }, + "is_pun": false + } + }, + { + "kind": "FieldDef", + "loc": null, + "children": { + "label": { + "kind": "Label", + "loc": null, + "children": { + "name": "alternate" + } + }, + "expr": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Some" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::NoExtraInfo", + "loc": null, + "children": {} + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "+" + } + } + } + }, + "lhs": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "label" + } + } + } + } + } + }, + "rhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": ":alternate" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "is_pun": false + } + } + ] + }, + "trailing": { + "kind": "Trailing::Comma", + "loc": null, + "children": {} + } + } + } + } + } + } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "mk_box" + } + }, + "has_error": null, + "is_async": null, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "leaf0" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "LayoutLeaf" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "leaf1" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "LayoutLeaf" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "leaf2" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "LayoutLeaf" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "branch0" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "LayoutBranch" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "branch1" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "LayoutBranch" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + } + ] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "LayoutBox" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::Record", + "loc": null, + "children": { + "type_name": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "LayoutBox" + } + }, + "is_object": false + } + }, + "fields": { + "kind": "Expr::Record::FieldList", + "loc": null, + "children": [ + { + "kind": "FieldDef", + "loc": null, + "children": { + "label": { + "kind": "Label", + "loc": null, + "children": { + "name": "name" + } + }, + "expr": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "box-root" + } + } + } + }, + "is_pun": false + } + }, + { + "kind": "FieldDef", + "loc": null, + "children": { + "label": { + "kind": "Label", + "loc": null, + "children": { + "name": "n0" + } + }, + "expr": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "7" + } + } + } + }, + "is_pun": false + } + }, + { + "kind": "FieldDef", + "loc": null, + "children": { + "label": { + "kind": "Label", + "loc": null, + "children": { + "name": "left" + } + }, + "expr": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "branch0" + } + } + } + } + } + }, + "is_pun": false + } + }, + { + "kind": "FieldDef", + "loc": null, + "children": { + "label": { + "kind": "Label", + "loc": null, + "children": { + "name": "blob" + } + }, + "expr": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "mk_bytes" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "30" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "8" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "is_pun": false + } + }, + { + "kind": "FieldDef", + "loc": null, + "children": { + "label": { + "kind": "Label", + "loc": null, + "children": { + "name": "n1" + } + }, + "expr": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "64" + } + } + } + }, + "is_pun": false + } + }, + { + "kind": "FieldDef", + "loc": null, + "children": { + "label": { + "kind": "Label", + "loc": null, + "children": { + "name": "right" + } + }, + "expr": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "branch1" + } + } + } + } + } + }, + "is_pun": false + } + }, + { + "kind": "FieldDef", + "loc": null, + "children": { + "label": { + "kind": "Label", + "loc": null, + "children": { + "name": "checkpoint" + } + }, + "expr": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "checkpoint" + } + } + } + }, + "is_pun": false + } + }, + { + "kind": "FieldDef", + "loc": null, + "children": { + "label": { + "kind": "Label", + "loc": null, + "children": { + "name": "factor" + } + }, + "expr": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Double", + "loc": null, + "children": { + "value": "3.5" + } + } + } + }, + "is_pun": false + } + }, + { + "kind": "FieldDef", + "loc": null, + "children": { + "label": { + "kind": "Label", + "loc": null, + "children": { + "name": "leaf" + } + }, + "expr": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "leaf2" + } + } + } + } + } + }, + "is_pun": false + } + }, + { + "kind": "FieldDef", + "loc": null, + "children": { + "label": { + "kind": "Label", + "loc": null, + "children": { + "name": "payload2" + } + }, + "expr": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "mk_bytes" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "40" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "9" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "is_pun": false + } + }, + { + "kind": "FieldDef", + "loc": null, + "children": { + "label": { + "kind": "Label", + "loc": null, + "children": { + "name": "trailer" + } + }, + "expr": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "+" + } + } + } + }, + "lhs": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "+" + } + } + } + }, + "lhs": { + "kind": "Expr::Field", + "loc": null, + "children": { + "record": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "leaf0" + } + } + } + } + } + }, + "accessor": { + "kind": "Accessor::Label", + "loc": null, + "children": { + "value": { + "kind": "Label", + "loc": null, + "children": { + "name": "r2" + } + } + } + } + } + }, + "rhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": ":" + } + } + } + } + } + }, + "rhs": { + "kind": "Expr::Field", + "loc": null, + "children": { + "record": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "leaf1" + } + } + } + } + } + }, + "accessor": { + "kind": "Accessor::Label", + "loc": null, + "children": { + "value": { + "kind": "Label", + "loc": null, + "children": { + "name": "r2" + } + } + } + } + } + } + } + }, + "is_pun": false + } + }, + { + "kind": "FieldDef", + "loc": null, + "children": { + "label": { + "kind": "Label", + "loc": null, + "children": { + "name": "n2" + } + }, + "expr": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "9" + } + } + } + }, + "is_pun": false + } + }, + { + "kind": "FieldDef", + "loc": null, + "children": { + "label": { + "kind": "Label", + "loc": null, + "children": { + "name": "flag" + } + }, + "expr": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Some" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::NoExtraInfo", + "loc": null, + "children": {} + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "maybe" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "is_pun": false + } + } + ] + }, + "trailing": { + "kind": "Trailing::Comma", + "loc": null, + "children": {} + } + } + } + } + } + } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "main" + } + }, + "has_error": null, + "is_async": null, + "decl_params": null, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [] + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::Let", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "leaf0" + } + } + } + }, + "expr": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "mk_leaf" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "0" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Char", + "loc": null, + "children": { + "value": "a" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "leaf0" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "body": { + "kind": "Expr::Let", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "leaf1" + } + } + } + }, + "expr": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "mk_leaf" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "1" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Char", + "loc": null, + "children": { + "value": "b" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "leaf1" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "body": { + "kind": "Expr::Let", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "leaf2" + } + } + } + }, + "expr": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "mk_leaf" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "2" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Char", + "loc": null, + "children": { + "value": "c" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "leaf2" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "body": { + "kind": "Expr::Let", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "branch0" + } + } + } + }, + "expr": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "mk_branch" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "leaf0" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "leaf1" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "branch0" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "body": { + "kind": "Expr::Let", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "branch1" + } + } + } + }, + "expr": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "mk_branch" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "leaf2" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "leaf1" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "branch1" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "body": { + "kind": "Expr::Let", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "branch2" + } + } + } + }, + "expr": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "mk_branch" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "leaf1" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "leaf0" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "branch2" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "body": { + "kind": "Expr::Let", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "box" + } + } + } + }, + "expr": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "mk_box" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "leaf0" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "leaf1" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "leaf2" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "branch0" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "branch1" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "body": { + "kind": "Expr::Let", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Constraint", + "loc": null, + "children": { + "pat": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "branches" + } + } + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "FixedArray" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [ + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "LayoutBranch" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + ] + } + } + } + } + }, + "expr": { + "kind": "Expr::Array", + "loc": null, + "children": { + "exprs": { + "kind": "Expr::Array::ExprList", + "loc": null, + "children": [ + { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "branch0" + } + } + } + } + } + }, + { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "branch1" + } + } + } + } + } + }, + { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "branch2" + } + } + } + } + } + } + ] + }, + "is_iter": false + } + }, + "body": { + "kind": "Expr::Let", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Constraint", + "loc": null, + "children": { + "pat": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "leaves" + } + } + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "FixedArray" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [ + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "LayoutLeaf" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + ] + } + } + } + } + }, + "expr": { + "kind": "Expr::Array", + "loc": null, + "children": { + "exprs": { + "kind": "Expr::Array::ExprList", + "loc": null, + "children": [ + { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "leaf0" + } + } + } + } + } + }, + { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "leaf1" + } + } + } + } + } + }, + { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "leaf2" + } + } + } + } + } + }, + { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "leaf1" + } + } + } + } + } + } + ] + }, + "is_iter": false + } + }, + "body": { + "kind": "Expr::Let", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "envelope" + } + } + } + }, + "expr": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Packed" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::TypeName", + "loc": null, + "children": { + "value": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "LayoutEnvelope" + } + }, + "is_object": false + } + } + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "box" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "branches" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "leaves" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "done" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "body": { + "kind": "Expr::Sequence", + "loc": null, + "children": { + "exprs": { + "kind": "Expr::Sequence::ExprList", + "loc": null, + "children": [ + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Field", + "loc": null, + "children": { + "record": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "box" + } + } + } + } + } + }, + "accessor": { + "kind": "Accessor::Label", + "loc": null, + "children": { + "value": { + "kind": "Label", + "loc": null, + "children": { + "name": "name" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Field", + "loc": null, + "children": { + "record": { + "kind": "Expr::Field", + "loc": null, + "children": { + "record": { + "kind": "Expr::Field", + "loc": null, + "children": { + "record": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "box" + } + } + } + } + } + }, + "accessor": { + "kind": "Accessor::Label", + "loc": null, + "children": { + "value": { + "kind": "Label", + "loc": null, + "children": { + "name": "left" + } + } + } + } + } + }, + "accessor": { + "kind": "Accessor::Label", + "loc": null, + "children": { + "value": { + "kind": "Label", + "loc": null, + "children": { + "name": "first" + } + } + } + } + } + }, + "accessor": { + "kind": "Accessor::Label", + "loc": null, + "children": { + "value": { + "kind": "Label", + "loc": null, + "children": { + "name": "r0" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Field", + "loc": null, + "children": { + "record": { + "kind": "Expr::Field", + "loc": null, + "children": { + "record": { + "kind": "Expr::Field", + "loc": null, + "children": { + "record": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "box" + } + } + } + } + } + }, + "accessor": { + "kind": "Accessor::Label", + "loc": null, + "children": { + "value": { + "kind": "Label", + "loc": null, + "children": { + "name": "left" + } + } + } + } + } + }, + "accessor": { + "kind": "Accessor::Label", + "loc": null, + "children": { + "value": { + "kind": "Label", + "loc": null, + "children": { + "name": "second" + } + } + } + } + } + }, + "accessor": { + "kind": "Accessor::Label", + "loc": null, + "children": { + "value": { + "kind": "Label", + "loc": null, + "children": { + "name": "r0" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Field", + "loc": null, + "children": { + "record": { + "kind": "Expr::Field", + "loc": null, + "children": { + "record": { + "kind": "Expr::Field", + "loc": null, + "children": { + "record": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "box" + } + } + } + } + } + }, + "accessor": { + "kind": "Accessor::Label", + "loc": null, + "children": { + "value": { + "kind": "Label", + "loc": null, + "children": { + "name": "right" + } + } + } + } + } + }, + "accessor": { + "kind": "Accessor::Label", + "loc": null, + "children": { + "value": { + "kind": "Label", + "loc": null, + "children": { + "name": "first" + } + } + } + } + } + }, + "accessor": { + "kind": "Accessor::Label", + "loc": null, + "children": { + "value": { + "kind": "Label", + "loc": null, + "children": { + "name": "r2" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Field", + "loc": null, + "children": { + "record": { + "kind": "Expr::ArrayGet", + "loc": null, + "children": { + "array": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "branches" + } + } + } + } + } + }, + "index": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "1" + } + } + } + } + } + }, + "accessor": { + "kind": "Accessor::Label", + "loc": null, + "children": { + "value": { + "kind": "Label", + "loc": null, + "children": { + "name": "mark" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Field", + "loc": null, + "children": { + "record": { + "kind": "Expr::Field", + "loc": null, + "children": { + "record": { + "kind": "Expr::ArrayGet", + "loc": null, + "children": { + "array": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "branches" + } + } + } + } + } + }, + "index": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "2" + } + } + } + } + } + }, + "accessor": { + "kind": "Accessor::Label", + "loc": null, + "children": { + "value": { + "kind": "Label", + "loc": null, + "children": { + "name": "second" + } + } + } + } + } + }, + "accessor": { + "kind": "Accessor::Label", + "loc": null, + "children": { + "value": { + "kind": "Label", + "loc": null, + "children": { + "name": "r0" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Field", + "loc": null, + "children": { + "record": { + "kind": "Expr::ArrayGet", + "loc": null, + "children": { + "array": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "branches" + } + } + } + } + } + }, + "index": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "0" + } + } + } + } + } + }, + "accessor": { + "kind": "Accessor::Label", + "loc": null, + "children": { + "value": { + "kind": "Label", + "loc": null, + "children": { + "name": "payload" + } + } + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "length" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Field", + "loc": null, + "children": { + "record": { + "kind": "Expr::ArrayGet", + "loc": null, + "children": { + "array": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "leaves" + } + } + } + } + } + }, + "index": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "2" + } + } + } + } + } + }, + "accessor": { + "kind": "Accessor::Label", + "loc": null, + "children": { + "value": { + "kind": "Label", + "loc": null, + "children": { + "name": "r1" + } + } + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "length" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + ] + }, + "last_expr": { + "kind": "Expr::Match", + "loc": null, + "children": { + "expr": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "envelope" + } + } + } + } + } + }, + "cases": { + "kind": "Expr::Match::CaseList", + "loc": null, + "children": [ + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Packed" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::NoExtraInfo", + "loc": null, + "children": {} + } + } + }, + "args": { + "kind": "Pattern::Constr::ArgList", + "loc": null, + "children": [ + { + "kind": "ConstrPatArg", + "loc": null, + "children": { + "pat": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "box2" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "ConstrPatArg", + "loc": null, + "children": { + "pat": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "branches2" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "ConstrPatArg", + "loc": null, + "children": { + "pat": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "leaves2" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "ConstrPatArg", + "loc": null, + "children": { + "pat": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "suffix" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "is_open": false + } + }, + "guard": null, + "body": { + "kind": "Expr::Group", + "loc": null, + "children": { + "expr": { + "kind": "Expr::Sequence", + "loc": null, + "children": { + "exprs": { + "kind": "Expr::Sequence::ExprList", + "loc": null, + "children": [ + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Field", + "loc": null, + "children": { + "record": { + "kind": "Expr::ArrayGet", + "loc": null, + "children": { + "array": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "branches2" + } + } + } + } + } + }, + "index": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "1" + } + } + } + } + } + }, + "accessor": { + "kind": "Accessor::Label", + "loc": null, + "children": { + "value": { + "kind": "Label", + "loc": null, + "children": { + "name": "tail" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "suffix" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Field", + "loc": null, + "children": { + "record": { + "kind": "Expr::Field", + "loc": null, + "children": { + "record": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "box2" + } + } + } + } + } + }, + "accessor": { + "kind": "Accessor::Label", + "loc": null, + "children": { + "value": { + "kind": "Label", + "loc": null, + "children": { + "name": "leaf" + } + } + } + } + } + }, + "accessor": { + "kind": "Accessor::Label", + "loc": null, + "children": { + "value": { + "kind": "Label", + "loc": null, + "children": { + "name": "r1" + } + } + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "length" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Field", + "loc": null, + "children": { + "record": { + "kind": "Expr::ArrayGet", + "loc": null, + "children": { + "array": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "leaves2" + } + } + } + } + } + }, + "index": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "1" + } + } + } + } + } + }, + "accessor": { + "kind": "Accessor::Label", + "loc": null, + "children": { + "value": { + "kind": "Label", + "loc": null, + "children": { + "name": "r2" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + ] + }, + "last_expr": { + "kind": "Expr::Match", + "loc": null, + "children": { + "expr": { + "kind": "Expr::Field", + "loc": null, + "children": { + "record": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "box2" + } + } + } + } + } + }, + "accessor": { + "kind": "Accessor::Label", + "loc": null, + "children": { + "value": { + "kind": "Label", + "loc": null, + "children": { + "name": "flag" + } + } + } + } + } + }, + "cases": { + "kind": "Expr::Match::CaseList", + "loc": null, + "children": [ + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Some" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::NoExtraInfo", + "loc": null, + "children": {} + } + } + }, + "args": { + "kind": "Pattern::Constr::ArgList", + "loc": null, + "children": [ + { + "kind": "ConstrPatArg", + "loc": null, + "children": { + "pat": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "flag" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "is_open": false + } + }, + "guard": null, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "flag" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + }, + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "None" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::NoExtraInfo", + "loc": null, + "children": {} + } + } + }, + "args": null, + "is_open": false + } + }, + "guard": null, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "none" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + ] + } + } + } + } + }, + "group": { + "kind": "Group::Brace", + "loc": null, + "children": {} + } + } + } + } + }, + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Empty" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::NoExtraInfo", + "loc": null, + "children": {} + } + } + }, + "args": null, + "is_open": false + } + }, + "guard": null, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "empty" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + ] + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } +] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/pipeline_test_layout_table_pressure.mbt b/test/sync_test/__snapshot__/pipeline_test_layout_table_pressure.mbt new file mode 100644 index 00000000..8855d92a --- /dev/null +++ b/test/sync_test/__snapshot__/pipeline_test_layout_table_pressure.mbt @@ -0,0 +1,135 @@ +///| +#valtype +struct LayoutLeaf { + i0 : Int + r0 : String + i1 : Int64 + r1 : Bytes + d0 : Double + r2 : String +} derive(Debug) + +///| +struct LayoutBranch { + first : LayoutLeaf + mark : String + serial : Int64 + second : LayoutLeaf + payload : Bytes + tail : String + alternate : String? +} derive(Debug) + +///| +struct LayoutBox { + name : String + n0 : Int + left : LayoutBranch + blob : Bytes + n1 : Int64 + right : LayoutBranch + checkpoint : String + factor : Double + leaf : LayoutLeaf + payload2 : Bytes + trailer : String + n2 : Int + flag : String? +} derive(Debug) + +///| +enum LayoutEnvelope { + Empty + Packed(LayoutBox, FixedArray[LayoutBranch], FixedArray[LayoutLeaf], String) +} derive(Debug) + +///| +fn mk_bytes(seed : Int, len : Int) -> Bytes { + Bytes::makei(len, i => (seed + i + 65).to_byte()) +} + +///| +fn mk_leaf(n : Int, ch : Char, label : String) -> LayoutLeaf { + LayoutLeaf::{ + i0: n, + r0: label + ":" + String::make(n + 1, ch), + i1: n.to_int64(), + r1: mk_bytes(n, n + 3), + d0: n.to_double() + 0.25, + r2: label + ":mid", + } +} + +///| +fn mk_branch(a : LayoutLeaf, b : LayoutLeaf, label : String) -> LayoutBranch { + LayoutBranch::{ + first: a, + mark: label + ":mark", + serial: 1000, + second: b, + payload: mk_bytes(20, 7), + tail: label + ":tail", + alternate: Some(label + ":alternate"), + } +} + +///| +fn mk_box( + leaf0 : LayoutLeaf, + leaf1 : LayoutLeaf, + leaf2 : LayoutLeaf, + branch0 : LayoutBranch, + branch1 : LayoutBranch +) -> LayoutBox { + LayoutBox::{ + name: "box-root", + n0: 7, + left: branch0, + blob: mk_bytes(30, 8), + n1: 64, + right: branch1, + checkpoint: "checkpoint", + factor: 3.5, + leaf: leaf2, + payload2: mk_bytes(40, 9), + trailer: leaf0.r2 + ":" + leaf1.r2, + n2: 9, + flag: Some("maybe"), + } +} + +///| +fn main { + let leaf0 = mk_leaf(0, 'a', "leaf0") + let leaf1 = mk_leaf(1, 'b', "leaf1") + let leaf2 = mk_leaf(2, 'c', "leaf2") + let branch0 = mk_branch(leaf0, leaf1, "branch0") + let branch1 = mk_branch(leaf2, leaf1, "branch1") + let branch2 = mk_branch(leaf1, leaf0, "branch2") + let box = mk_box(leaf0, leaf1, leaf2, branch0, branch1) + let branches : FixedArray[LayoutBranch] = [branch0, branch1, branch2] + let leaves : FixedArray[LayoutLeaf] = [leaf0, leaf1, leaf2, leaf1] + let envelope = LayoutEnvelope::Packed(box, branches, leaves, "done") + + println(box.name) + println(box.left.first.r0) + println(box.left.second.r0) + println(box.right.first.r2) + println(branches[1].mark) + println(branches[2].second.r0) + println(branches[0].payload.length()) + println(leaves[2].r1.length()) + match envelope { + Packed(box2, branches2, leaves2, suffix) => { + println(branches2[1].tail) + println(suffix) + println(box2.leaf.r1.length()) + println(leaves2[1].r2) + match box2.flag { + Some(flag) => println(flag) + None => println("none") + } + } + Empty => println("empty") + } +} diff --git a/test/sync_test/__snapshot__/pipeline_test_layout_table_pressure.mbt.tokens.json b/test/sync_test/__snapshot__/pipeline_test_layout_table_pressure.mbt.tokens.json new file mode 100644 index 00000000..adef14d9 --- /dev/null +++ b/test/sync_test/__snapshot__/pipeline_test_layout_table_pressure.mbt.tokens.json @@ -0,0 +1,4776 @@ +[ + { + "token": [ + "COMMENT", + { + "content": "///|", + "kind": [ + "Ownline", + { + "leading_blank_line": false, + "trailing_blank_line": false + } + ], + "consumed_by_docstring": false + } + ], + "loc": "1:1-1:5" + }, + { + "token": "NEWLINE", + "loc": "1:5-1:6" + }, + { + "token": [ + "ATTRIBUTE", + { + "id": "valtype", + "dot_id": "", + "raw_payload": "" + } + ], + "loc": "2:1-2:9" + }, + { + "token": "NEWLINE", + "loc": "2:9-2:10" + }, + { + "token": "STRUCT", + "loc": "3:1-3:7" + }, + { + "token": [ + "UIDENT", + "LayoutLeaf" + ], + "loc": "3:8-3:18" + }, + { + "token": "LBRACE", + "loc": "3:19-3:20" + }, + { + "token": "NEWLINE", + "loc": "3:20-3:21" + }, + { + "token": [ + "LIDENT", + "i0" + ], + "loc": "4:3-4:5" + }, + { + "token": "COLON", + "loc": "4:6-4:7" + }, + { + "token": [ + "UIDENT", + "Int" + ], + "loc": "4:8-4:11" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "4:11-4:11" + }, + { + "token": "NEWLINE", + "loc": "4:11-4:12" + }, + { + "token": [ + "LIDENT", + "r0" + ], + "loc": "5:3-5:5" + }, + { + "token": "COLON", + "loc": "5:6-5:7" + }, + { + "token": [ + "UIDENT", + "String" + ], + "loc": "5:8-5:14" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "5:14-5:14" + }, + { + "token": "NEWLINE", + "loc": "5:14-5:15" + }, + { + "token": [ + "LIDENT", + "i1" + ], + "loc": "6:3-6:5" + }, + { + "token": "COLON", + "loc": "6:6-6:7" + }, + { + "token": [ + "UIDENT", + "Int64" + ], + "loc": "6:8-6:13" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "6:13-6:13" + }, + { + "token": "NEWLINE", + "loc": "6:13-6:14" + }, + { + "token": [ + "LIDENT", + "r1" + ], + "loc": "7:3-7:5" + }, + { + "token": "COLON", + "loc": "7:6-7:7" + }, + { + "token": [ + "UIDENT", + "Bytes" + ], + "loc": "7:8-7:13" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "7:13-7:13" + }, + { + "token": "NEWLINE", + "loc": "7:13-7:14" + }, + { + "token": [ + "LIDENT", + "d0" + ], + "loc": "8:3-8:5" + }, + { + "token": "COLON", + "loc": "8:6-8:7" + }, + { + "token": [ + "UIDENT", + "Double" + ], + "loc": "8:8-8:14" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "8:14-8:14" + }, + { + "token": "NEWLINE", + "loc": "8:14-8:15" + }, + { + "token": [ + "LIDENT", + "r2" + ], + "loc": "9:3-9:5" + }, + { + "token": "COLON", + "loc": "9:6-9:7" + }, + { + "token": [ + "UIDENT", + "String" + ], + "loc": "9:8-9:14" + }, + { + "token": "NEWLINE", + "loc": "9:14-9:15" + }, + { + "token": "RBRACE", + "loc": "10:1-10:2" + }, + { + "token": "DERIVE", + "loc": "10:3-10:9" + }, + { + "token": "LPAREN", + "loc": "10:9-10:10" + }, + { + "token": [ + "UIDENT", + "Debug" + ], + "loc": "10:10-10:15" + }, + { + "token": "RPAREN", + "loc": "10:15-10:16" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "10:16-10:16" + }, + { + "token": "NEWLINE", + "loc": "10:16-10:17" + }, + { + "token": "NEWLINE", + "loc": "11:1-11:2" + }, + { + "token": [ + "COMMENT", + { + "content": "///|", + "kind": [ + "Ownline", + { + "leading_blank_line": true, + "trailing_blank_line": false + } + ], + "consumed_by_docstring": false + } + ], + "loc": "12:1-12:5" + }, + { + "token": "NEWLINE", + "loc": "12:5-12:6" + }, + { + "token": "STRUCT", + "loc": "13:1-13:7" + }, + { + "token": [ + "UIDENT", + "LayoutBranch" + ], + "loc": "13:8-13:20" + }, + { + "token": "LBRACE", + "loc": "13:21-13:22" + }, + { + "token": "NEWLINE", + "loc": "13:22-13:23" + }, + { + "token": [ + "LIDENT", + "first" + ], + "loc": "14:3-14:8" + }, + { + "token": "COLON", + "loc": "14:9-14:10" + }, + { + "token": [ + "UIDENT", + "LayoutLeaf" + ], + "loc": "14:11-14:21" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "14:21-14:21" + }, + { + "token": "NEWLINE", + "loc": "14:21-14:22" + }, + { + "token": [ + "LIDENT", + "mark" + ], + "loc": "15:3-15:7" + }, + { + "token": "COLON", + "loc": "15:8-15:9" + }, + { + "token": [ + "UIDENT", + "String" + ], + "loc": "15:10-15:16" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "15:16-15:16" + }, + { + "token": "NEWLINE", + "loc": "15:16-15:17" + }, + { + "token": [ + "LIDENT", + "serial" + ], + "loc": "16:3-16:9" + }, + { + "token": "COLON", + "loc": "16:10-16:11" + }, + { + "token": [ + "UIDENT", + "Int64" + ], + "loc": "16:12-16:17" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "16:17-16:17" + }, + { + "token": "NEWLINE", + "loc": "16:17-16:18" + }, + { + "token": [ + "LIDENT", + "second" + ], + "loc": "17:3-17:9" + }, + { + "token": "COLON", + "loc": "17:10-17:11" + }, + { + "token": [ + "UIDENT", + "LayoutLeaf" + ], + "loc": "17:12-17:22" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "17:22-17:22" + }, + { + "token": "NEWLINE", + "loc": "17:22-17:23" + }, + { + "token": [ + "LIDENT", + "payload" + ], + "loc": "18:3-18:10" + }, + { + "token": "COLON", + "loc": "18:11-18:12" + }, + { + "token": [ + "UIDENT", + "Bytes" + ], + "loc": "18:13-18:18" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "18:18-18:18" + }, + { + "token": "NEWLINE", + "loc": "18:18-18:19" + }, + { + "token": [ + "LIDENT", + "tail" + ], + "loc": "19:3-19:7" + }, + { + "token": "COLON", + "loc": "19:8-19:9" + }, + { + "token": [ + "UIDENT", + "String" + ], + "loc": "19:10-19:16" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "19:16-19:16" + }, + { + "token": "NEWLINE", + "loc": "19:16-19:17" + }, + { + "token": [ + "LIDENT", + "alternate" + ], + "loc": "20:3-20:12" + }, + { + "token": "COLON", + "loc": "20:13-20:14" + }, + { + "token": [ + "UIDENT", + "String" + ], + "loc": "20:15-20:21" + }, + { + "token": "QUESTION", + "loc": "20:21-20:22" + }, + { + "token": "NEWLINE", + "loc": "20:22-20:23" + }, + { + "token": "RBRACE", + "loc": "21:1-21:2" + }, + { + "token": "DERIVE", + "loc": "21:3-21:9" + }, + { + "token": "LPAREN", + "loc": "21:9-21:10" + }, + { + "token": [ + "UIDENT", + "Debug" + ], + "loc": "21:10-21:15" + }, + { + "token": "RPAREN", + "loc": "21:15-21:16" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "21:16-21:16" + }, + { + "token": "NEWLINE", + "loc": "21:16-21:17" + }, + { + "token": "NEWLINE", + "loc": "22:1-22:2" + }, + { + "token": [ + "COMMENT", + { + "content": "///|", + "kind": [ + "Ownline", + { + "leading_blank_line": true, + "trailing_blank_line": false + } + ], + "consumed_by_docstring": false + } + ], + "loc": "23:1-23:5" + }, + { + "token": "NEWLINE", + "loc": "23:5-23:6" + }, + { + "token": "STRUCT", + "loc": "24:1-24:7" + }, + { + "token": [ + "UIDENT", + "LayoutBox" + ], + "loc": "24:8-24:17" + }, + { + "token": "LBRACE", + "loc": "24:18-24:19" + }, + { + "token": "NEWLINE", + "loc": "24:19-24:20" + }, + { + "token": [ + "LIDENT", + "name" + ], + "loc": "25:3-25:7" + }, + { + "token": "COLON", + "loc": "25:8-25:9" + }, + { + "token": [ + "UIDENT", + "String" + ], + "loc": "25:10-25:16" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "25:16-25:16" + }, + { + "token": "NEWLINE", + "loc": "25:16-25:17" + }, + { + "token": [ + "LIDENT", + "n0" + ], + "loc": "26:3-26:5" + }, + { + "token": "COLON", + "loc": "26:6-26:7" + }, + { + "token": [ + "UIDENT", + "Int" + ], + "loc": "26:8-26:11" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "26:11-26:11" + }, + { + "token": "NEWLINE", + "loc": "26:11-26:12" + }, + { + "token": [ + "LIDENT", + "left" + ], + "loc": "27:3-27:7" + }, + { + "token": "COLON", + "loc": "27:8-27:9" + }, + { + "token": [ + "UIDENT", + "LayoutBranch" + ], + "loc": "27:10-27:22" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "27:22-27:22" + }, + { + "token": "NEWLINE", + "loc": "27:22-27:23" + }, + { + "token": [ + "LIDENT", + "blob" + ], + "loc": "28:3-28:7" + }, + { + "token": "COLON", + "loc": "28:8-28:9" + }, + { + "token": [ + "UIDENT", + "Bytes" + ], + "loc": "28:10-28:15" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "28:15-28:15" + }, + { + "token": "NEWLINE", + "loc": "28:15-28:16" + }, + { + "token": [ + "LIDENT", + "n1" + ], + "loc": "29:3-29:5" + }, + { + "token": "COLON", + "loc": "29:6-29:7" + }, + { + "token": [ + "UIDENT", + "Int64" + ], + "loc": "29:8-29:13" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "29:13-29:13" + }, + { + "token": "NEWLINE", + "loc": "29:13-29:14" + }, + { + "token": [ + "LIDENT", + "right" + ], + "loc": "30:3-30:8" + }, + { + "token": "COLON", + "loc": "30:9-30:10" + }, + { + "token": [ + "UIDENT", + "LayoutBranch" + ], + "loc": "30:11-30:23" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "30:23-30:23" + }, + { + "token": "NEWLINE", + "loc": "30:23-30:24" + }, + { + "token": [ + "LIDENT", + "checkpoint" + ], + "loc": "31:3-31:13" + }, + { + "token": "COLON", + "loc": "31:14-31:15" + }, + { + "token": [ + "UIDENT", + "String" + ], + "loc": "31:16-31:22" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "31:22-31:22" + }, + { + "token": "NEWLINE", + "loc": "31:22-31:23" + }, + { + "token": [ + "LIDENT", + "factor" + ], + "loc": "32:3-32:9" + }, + { + "token": "COLON", + "loc": "32:10-32:11" + }, + { + "token": [ + "UIDENT", + "Double" + ], + "loc": "32:12-32:18" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "32:18-32:18" + }, + { + "token": "NEWLINE", + "loc": "32:18-32:19" + }, + { + "token": [ + "LIDENT", + "leaf" + ], + "loc": "33:3-33:7" + }, + { + "token": "COLON", + "loc": "33:8-33:9" + }, + { + "token": [ + "UIDENT", + "LayoutLeaf" + ], + "loc": "33:10-33:20" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "33:20-33:20" + }, + { + "token": "NEWLINE", + "loc": "33:20-33:21" + }, + { + "token": [ + "LIDENT", + "payload2" + ], + "loc": "34:3-34:11" + }, + { + "token": "COLON", + "loc": "34:12-34:13" + }, + { + "token": [ + "UIDENT", + "Bytes" + ], + "loc": "34:14-34:19" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "34:19-34:19" + }, + { + "token": "NEWLINE", + "loc": "34:19-34:20" + }, + { + "token": [ + "LIDENT", + "trailer" + ], + "loc": "35:3-35:10" + }, + { + "token": "COLON", + "loc": "35:11-35:12" + }, + { + "token": [ + "UIDENT", + "String" + ], + "loc": "35:13-35:19" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "35:19-35:19" + }, + { + "token": "NEWLINE", + "loc": "35:19-35:20" + }, + { + "token": [ + "LIDENT", + "n2" + ], + "loc": "36:3-36:5" + }, + { + "token": "COLON", + "loc": "36:6-36:7" + }, + { + "token": [ + "UIDENT", + "Int" + ], + "loc": "36:8-36:11" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "36:11-36:11" + }, + { + "token": "NEWLINE", + "loc": "36:11-36:12" + }, + { + "token": [ + "LIDENT", + "flag" + ], + "loc": "37:3-37:7" + }, + { + "token": "COLON", + "loc": "37:8-37:9" + }, + { + "token": [ + "UIDENT", + "String" + ], + "loc": "37:10-37:16" + }, + { + "token": "QUESTION", + "loc": "37:16-37:17" + }, + { + "token": "NEWLINE", + "loc": "37:17-37:18" + }, + { + "token": "RBRACE", + "loc": "38:1-38:2" + }, + { + "token": "DERIVE", + "loc": "38:3-38:9" + }, + { + "token": "LPAREN", + "loc": "38:9-38:10" + }, + { + "token": [ + "UIDENT", + "Debug" + ], + "loc": "38:10-38:15" + }, + { + "token": "RPAREN", + "loc": "38:15-38:16" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "38:16-38:16" + }, + { + "token": "NEWLINE", + "loc": "38:16-38:17" + }, + { + "token": "NEWLINE", + "loc": "39:1-39:2" + }, + { + "token": [ + "COMMENT", + { + "content": "///|", + "kind": [ + "Ownline", + { + "leading_blank_line": true, + "trailing_blank_line": false + } + ], + "consumed_by_docstring": false + } + ], + "loc": "40:1-40:5" + }, + { + "token": "NEWLINE", + "loc": "40:5-40:6" + }, + { + "token": "ENUM", + "loc": "41:1-41:5" + }, + { + "token": [ + "UIDENT", + "LayoutEnvelope" + ], + "loc": "41:6-41:20" + }, + { + "token": "LBRACE", + "loc": "41:21-41:22" + }, + { + "token": "NEWLINE", + "loc": "41:22-41:23" + }, + { + "token": [ + "UIDENT", + "Empty" + ], + "loc": "42:3-42:8" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "42:8-42:8" + }, + { + "token": "NEWLINE", + "loc": "42:8-42:9" + }, + { + "token": [ + "UIDENT", + "Packed" + ], + "loc": "43:3-43:9" + }, + { + "token": "LPAREN", + "loc": "43:9-43:10" + }, + { + "token": [ + "UIDENT", + "LayoutBox" + ], + "loc": "43:10-43:19" + }, + { + "token": "COMMA", + "loc": "43:19-43:20" + }, + { + "token": [ + "UIDENT", + "FixedArray" + ], + "loc": "43:21-43:31" + }, + { + "token": "LBRACKET", + "loc": "43:31-43:32" + }, + { + "token": [ + "UIDENT", + "LayoutBranch" + ], + "loc": "43:32-43:44" + }, + { + "token": "RBRACKET", + "loc": "43:44-43:45" + }, + { + "token": "COMMA", + "loc": "43:45-43:46" + }, + { + "token": [ + "UIDENT", + "FixedArray" + ], + "loc": "43:47-43:57" + }, + { + "token": "LBRACKET", + "loc": "43:57-43:58" + }, + { + "token": [ + "UIDENT", + "LayoutLeaf" + ], + "loc": "43:58-43:68" + }, + { + "token": "RBRACKET", + "loc": "43:68-43:69" + }, + { + "token": "COMMA", + "loc": "43:69-43:70" + }, + { + "token": [ + "UIDENT", + "String" + ], + "loc": "43:71-43:77" + }, + { + "token": "RPAREN", + "loc": "43:77-43:78" + }, + { + "token": "NEWLINE", + "loc": "43:78-43:79" + }, + { + "token": "RBRACE", + "loc": "44:1-44:2" + }, + { + "token": "DERIVE", + "loc": "44:3-44:9" + }, + { + "token": "LPAREN", + "loc": "44:9-44:10" + }, + { + "token": [ + "UIDENT", + "Debug" + ], + "loc": "44:10-44:15" + }, + { + "token": "RPAREN", + "loc": "44:15-44:16" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "44:16-44:16" + }, + { + "token": "NEWLINE", + "loc": "44:16-44:17" + }, + { + "token": "NEWLINE", + "loc": "45:1-45:2" + }, + { + "token": [ + "COMMENT", + { + "content": "///|", + "kind": [ + "Ownline", + { + "leading_blank_line": true, + "trailing_blank_line": false + } + ], + "consumed_by_docstring": false + } + ], + "loc": "46:1-46:5" + }, + { + "token": "NEWLINE", + "loc": "46:5-46:6" + }, + { + "token": "FN", + "loc": "47:1-47:3" + }, + { + "token": [ + "LIDENT", + "mk_bytes" + ], + "loc": "47:4-47:12" + }, + { + "token": "LPAREN", + "loc": "47:12-47:13" + }, + { + "token": [ + "LIDENT", + "seed" + ], + "loc": "47:13-47:17" + }, + { + "token": "COLON", + "loc": "47:18-47:19" + }, + { + "token": [ + "UIDENT", + "Int" + ], + "loc": "47:20-47:23" + }, + { + "token": "COMMA", + "loc": "47:23-47:24" + }, + { + "token": [ + "LIDENT", + "len" + ], + "loc": "47:25-47:28" + }, + { + "token": "COLON", + "loc": "47:29-47:30" + }, + { + "token": [ + "UIDENT", + "Int" + ], + "loc": "47:31-47:34" + }, + { + "token": "RPAREN", + "loc": "47:34-47:35" + }, + { + "token": "THIN_ARROW", + "loc": "47:36-47:38" + }, + { + "token": [ + "UIDENT", + "Bytes" + ], + "loc": "47:39-47:44" + }, + { + "token": "LBRACE", + "loc": "47:45-47:46" + }, + { + "token": "NEWLINE", + "loc": "47:46-47:47" + }, + { + "token": [ + "UIDENT", + "Bytes" + ], + "loc": "48:3-48:8" + }, + { + "token": "COLONCOLON", + "loc": "48:8-48:10" + }, + { + "token": [ + "LIDENT", + "makei" + ], + "loc": "48:10-48:15" + }, + { + "token": "LPAREN", + "loc": "48:15-48:16" + }, + { + "token": [ + "LIDENT", + "len" + ], + "loc": "48:16-48:19" + }, + { + "token": "COMMA", + "loc": "48:19-48:20" + }, + { + "token": [ + "LIDENT", + "i" + ], + "loc": "48:21-48:22" + }, + { + "token": "FAT_ARROW", + "loc": "48:23-48:25" + }, + { + "token": "LPAREN", + "loc": "48:26-48:27" + }, + { + "token": [ + "LIDENT", + "seed" + ], + "loc": "48:27-48:31" + }, + { + "token": "PLUS", + "loc": "48:32-48:33" + }, + { + "token": [ + "LIDENT", + "i" + ], + "loc": "48:34-48:35" + }, + { + "token": "PLUS", + "loc": "48:36-48:37" + }, + { + "token": [ + "INT", + "65" + ], + "loc": "48:38-48:40" + }, + { + "token": "RPAREN", + "loc": "48:40-48:41" + }, + { + "token": [ + "DOT_LIDENT", + "to_byte" + ], + "loc": "48:42-48:49" + }, + { + "token": "LPAREN", + "loc": "48:49-48:50" + }, + { + "token": "RPAREN", + "loc": "48:50-48:51" + }, + { + "token": "RPAREN", + "loc": "48:51-48:52" + }, + { + "token": "NEWLINE", + "loc": "48:52-48:53" + }, + { + "token": "RBRACE", + "loc": "49:1-49:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "49:2-49:2" + }, + { + "token": "NEWLINE", + "loc": "49:2-49:3" + }, + { + "token": "NEWLINE", + "loc": "50:1-50:2" + }, + { + "token": [ + "COMMENT", + { + "content": "///|", + "kind": [ + "Ownline", + { + "leading_blank_line": true, + "trailing_blank_line": false + } + ], + "consumed_by_docstring": false + } + ], + "loc": "51:1-51:5" + }, + { + "token": "NEWLINE", + "loc": "51:5-51:6" + }, + { + "token": "FN", + "loc": "52:1-52:3" + }, + { + "token": [ + "LIDENT", + "mk_leaf" + ], + "loc": "52:4-52:11" + }, + { + "token": "LPAREN", + "loc": "52:11-52:12" + }, + { + "token": [ + "LIDENT", + "n" + ], + "loc": "52:12-52:13" + }, + { + "token": "COLON", + "loc": "52:14-52:15" + }, + { + "token": [ + "UIDENT", + "Int" + ], + "loc": "52:16-52:19" + }, + { + "token": "COMMA", + "loc": "52:19-52:20" + }, + { + "token": [ + "LIDENT", + "ch" + ], + "loc": "52:21-52:23" + }, + { + "token": "COLON", + "loc": "52:24-52:25" + }, + { + "token": [ + "UIDENT", + "Char" + ], + "loc": "52:26-52:30" + }, + { + "token": "COMMA", + "loc": "52:30-52:31" + }, + { + "token": [ + "LIDENT", + "label" + ], + "loc": "52:32-52:37" + }, + { + "token": "COLON", + "loc": "52:38-52:39" + }, + { + "token": [ + "UIDENT", + "String" + ], + "loc": "52:40-52:46" + }, + { + "token": "RPAREN", + "loc": "52:46-52:47" + }, + { + "token": "THIN_ARROW", + "loc": "52:48-52:50" + }, + { + "token": [ + "UIDENT", + "LayoutLeaf" + ], + "loc": "52:51-52:61" + }, + { + "token": "LBRACE", + "loc": "52:62-52:63" + }, + { + "token": "NEWLINE", + "loc": "52:63-52:64" + }, + { + "token": [ + "UIDENT", + "LayoutLeaf" + ], + "loc": "53:3-53:13" + }, + { + "token": "COLONCOLON", + "loc": "53:13-53:15" + }, + { + "token": "LBRACE", + "loc": "53:15-53:16" + }, + { + "token": "NEWLINE", + "loc": "53:16-53:17" + }, + { + "token": [ + "LIDENT", + "i0" + ], + "loc": "54:5-54:7" + }, + { + "token": "COLON", + "loc": "54:7-54:8" + }, + { + "token": [ + "LIDENT", + "n" + ], + "loc": "54:9-54:10" + }, + { + "token": "COMMA", + "loc": "54:10-54:11" + }, + { + "token": "NEWLINE", + "loc": "54:11-54:12" + }, + { + "token": [ + "LIDENT", + "r0" + ], + "loc": "55:5-55:7" + }, + { + "token": "COLON", + "loc": "55:7-55:8" + }, + { + "token": [ + "LIDENT", + "label" + ], + "loc": "55:9-55:14" + }, + { + "token": "PLUS", + "loc": "55:15-55:16" + }, + { + "token": [ + "STRING", + ":" + ], + "loc": "55:17-55:20" + }, + { + "token": "PLUS", + "loc": "55:21-55:22" + }, + { + "token": [ + "UIDENT", + "String" + ], + "loc": "55:23-55:29" + }, + { + "token": "COLONCOLON", + "loc": "55:29-55:31" + }, + { + "token": [ + "LIDENT", + "make" + ], + "loc": "55:31-55:35" + }, + { + "token": "LPAREN", + "loc": "55:35-55:36" + }, + { + "token": [ + "LIDENT", + "n" + ], + "loc": "55:36-55:37" + }, + { + "token": "PLUS", + "loc": "55:38-55:39" + }, + { + "token": [ + "INT", + "1" + ], + "loc": "55:40-55:41" + }, + { + "token": "COMMA", + "loc": "55:41-55:42" + }, + { + "token": [ + "LIDENT", + "ch" + ], + "loc": "55:43-55:45" + }, + { + "token": "RPAREN", + "loc": "55:45-55:46" + }, + { + "token": "COMMA", + "loc": "55:46-55:47" + }, + { + "token": "NEWLINE", + "loc": "55:47-55:48" + }, + { + "token": [ + "LIDENT", + "i1" + ], + "loc": "56:5-56:7" + }, + { + "token": "COLON", + "loc": "56:7-56:8" + }, + { + "token": [ + "LIDENT", + "n" + ], + "loc": "56:9-56:10" + }, + { + "token": [ + "DOT_LIDENT", + "to_int64" + ], + "loc": "56:11-56:19" + }, + { + "token": "LPAREN", + "loc": "56:19-56:20" + }, + { + "token": "RPAREN", + "loc": "56:20-56:21" + }, + { + "token": "COMMA", + "loc": "56:21-56:22" + }, + { + "token": "NEWLINE", + "loc": "56:22-56:23" + }, + { + "token": [ + "LIDENT", + "r1" + ], + "loc": "57:5-57:7" + }, + { + "token": "COLON", + "loc": "57:7-57:8" + }, + { + "token": [ + "LIDENT", + "mk_bytes" + ], + "loc": "57:9-57:17" + }, + { + "token": "LPAREN", + "loc": "57:17-57:18" + }, + { + "token": [ + "LIDENT", + "n" + ], + "loc": "57:18-57:19" + }, + { + "token": "COMMA", + "loc": "57:19-57:20" + }, + { + "token": [ + "LIDENT", + "n" + ], + "loc": "57:21-57:22" + }, + { + "token": "PLUS", + "loc": "57:23-57:24" + }, + { + "token": [ + "INT", + "3" + ], + "loc": "57:25-57:26" + }, + { + "token": "RPAREN", + "loc": "57:26-57:27" + }, + { + "token": "COMMA", + "loc": "57:27-57:28" + }, + { + "token": "NEWLINE", + "loc": "57:28-57:29" + }, + { + "token": [ + "LIDENT", + "d0" + ], + "loc": "58:5-58:7" + }, + { + "token": "COLON", + "loc": "58:7-58:8" + }, + { + "token": [ + "LIDENT", + "n" + ], + "loc": "58:9-58:10" + }, + { + "token": [ + "DOT_LIDENT", + "to_double" + ], + "loc": "58:11-58:20" + }, + { + "token": "LPAREN", + "loc": "58:20-58:21" + }, + { + "token": "RPAREN", + "loc": "58:21-58:22" + }, + { + "token": "PLUS", + "loc": "58:23-58:24" + }, + { + "token": [ + "DOUBLE", + "0.25" + ], + "loc": "58:25-58:29" + }, + { + "token": "COMMA", + "loc": "58:29-58:30" + }, + { + "token": "NEWLINE", + "loc": "58:30-58:31" + }, + { + "token": [ + "LIDENT", + "r2" + ], + "loc": "59:5-59:7" + }, + { + "token": "COLON", + "loc": "59:7-59:8" + }, + { + "token": [ + "LIDENT", + "label" + ], + "loc": "59:9-59:14" + }, + { + "token": "PLUS", + "loc": "59:15-59:16" + }, + { + "token": [ + "STRING", + ":mid" + ], + "loc": "59:17-59:23" + }, + { + "token": "COMMA", + "loc": "59:23-59:24" + }, + { + "token": "NEWLINE", + "loc": "59:24-59:25" + }, + { + "token": "RBRACE", + "loc": "60:3-60:4" + }, + { + "token": "NEWLINE", + "loc": "60:4-60:5" + }, + { + "token": "RBRACE", + "loc": "61:1-61:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "61:2-61:2" + }, + { + "token": "NEWLINE", + "loc": "61:2-61:3" + }, + { + "token": "NEWLINE", + "loc": "62:1-62:2" + }, + { + "token": [ + "COMMENT", + { + "content": "///|", + "kind": [ + "Ownline", + { + "leading_blank_line": true, + "trailing_blank_line": false + } + ], + "consumed_by_docstring": false + } + ], + "loc": "63:1-63:5" + }, + { + "token": "NEWLINE", + "loc": "63:5-63:6" + }, + { + "token": "FN", + "loc": "64:1-64:3" + }, + { + "token": [ + "LIDENT", + "mk_branch" + ], + "loc": "64:4-64:13" + }, + { + "token": "LPAREN", + "loc": "64:13-64:14" + }, + { + "token": [ + "LIDENT", + "a" + ], + "loc": "64:14-64:15" + }, + { + "token": "COLON", + "loc": "64:16-64:17" + }, + { + "token": [ + "UIDENT", + "LayoutLeaf" + ], + "loc": "64:18-64:28" + }, + { + "token": "COMMA", + "loc": "64:28-64:29" + }, + { + "token": [ + "LIDENT", + "b" + ], + "loc": "64:30-64:31" + }, + { + "token": "COLON", + "loc": "64:32-64:33" + }, + { + "token": [ + "UIDENT", + "LayoutLeaf" + ], + "loc": "64:34-64:44" + }, + { + "token": "COMMA", + "loc": "64:44-64:45" + }, + { + "token": [ + "LIDENT", + "label" + ], + "loc": "64:46-64:51" + }, + { + "token": "COLON", + "loc": "64:52-64:53" + }, + { + "token": [ + "UIDENT", + "String" + ], + "loc": "64:54-64:60" + }, + { + "token": "RPAREN", + "loc": "64:60-64:61" + }, + { + "token": "THIN_ARROW", + "loc": "64:62-64:64" + }, + { + "token": [ + "UIDENT", + "LayoutBranch" + ], + "loc": "64:65-64:77" + }, + { + "token": "LBRACE", + "loc": "64:78-64:79" + }, + { + "token": "NEWLINE", + "loc": "64:79-64:80" + }, + { + "token": [ + "UIDENT", + "LayoutBranch" + ], + "loc": "65:3-65:15" + }, + { + "token": "COLONCOLON", + "loc": "65:15-65:17" + }, + { + "token": "LBRACE", + "loc": "65:17-65:18" + }, + { + "token": "NEWLINE", + "loc": "65:18-65:19" + }, + { + "token": [ + "LIDENT", + "first" + ], + "loc": "66:5-66:10" + }, + { + "token": "COLON", + "loc": "66:10-66:11" + }, + { + "token": [ + "LIDENT", + "a" + ], + "loc": "66:12-66:13" + }, + { + "token": "COMMA", + "loc": "66:13-66:14" + }, + { + "token": "NEWLINE", + "loc": "66:14-66:15" + }, + { + "token": [ + "LIDENT", + "mark" + ], + "loc": "67:5-67:9" + }, + { + "token": "COLON", + "loc": "67:9-67:10" + }, + { + "token": [ + "LIDENT", + "label" + ], + "loc": "67:11-67:16" + }, + { + "token": "PLUS", + "loc": "67:17-67:18" + }, + { + "token": [ + "STRING", + ":mark" + ], + "loc": "67:19-67:26" + }, + { + "token": "COMMA", + "loc": "67:26-67:27" + }, + { + "token": "NEWLINE", + "loc": "67:27-67:28" + }, + { + "token": [ + "LIDENT", + "serial" + ], + "loc": "68:5-68:11" + }, + { + "token": "COLON", + "loc": "68:11-68:12" + }, + { + "token": [ + "INT", + "1000" + ], + "loc": "68:13-68:17" + }, + { + "token": "COMMA", + "loc": "68:17-68:18" + }, + { + "token": "NEWLINE", + "loc": "68:18-68:19" + }, + { + "token": [ + "LIDENT", + "second" + ], + "loc": "69:5-69:11" + }, + { + "token": "COLON", + "loc": "69:11-69:12" + }, + { + "token": [ + "LIDENT", + "b" + ], + "loc": "69:13-69:14" + }, + { + "token": "COMMA", + "loc": "69:14-69:15" + }, + { + "token": "NEWLINE", + "loc": "69:15-69:16" + }, + { + "token": [ + "LIDENT", + "payload" + ], + "loc": "70:5-70:12" + }, + { + "token": "COLON", + "loc": "70:12-70:13" + }, + { + "token": [ + "LIDENT", + "mk_bytes" + ], + "loc": "70:14-70:22" + }, + { + "token": "LPAREN", + "loc": "70:22-70:23" + }, + { + "token": [ + "INT", + "20" + ], + "loc": "70:23-70:25" + }, + { + "token": "COMMA", + "loc": "70:25-70:26" + }, + { + "token": [ + "INT", + "7" + ], + "loc": "70:27-70:28" + }, + { + "token": "RPAREN", + "loc": "70:28-70:29" + }, + { + "token": "COMMA", + "loc": "70:29-70:30" + }, + { + "token": "NEWLINE", + "loc": "70:30-70:31" + }, + { + "token": [ + "LIDENT", + "tail" + ], + "loc": "71:5-71:9" + }, + { + "token": "COLON", + "loc": "71:9-71:10" + }, + { + "token": [ + "LIDENT", + "label" + ], + "loc": "71:11-71:16" + }, + { + "token": "PLUS", + "loc": "71:17-71:18" + }, + { + "token": [ + "STRING", + ":tail" + ], + "loc": "71:19-71:26" + }, + { + "token": "COMMA", + "loc": "71:26-71:27" + }, + { + "token": "NEWLINE", + "loc": "71:27-71:28" + }, + { + "token": [ + "LIDENT", + "alternate" + ], + "loc": "72:5-72:14" + }, + { + "token": "COLON", + "loc": "72:14-72:15" + }, + { + "token": [ + "UIDENT", + "Some" + ], + "loc": "72:16-72:20" + }, + { + "token": "LPAREN", + "loc": "72:20-72:21" + }, + { + "token": [ + "LIDENT", + "label" + ], + "loc": "72:21-72:26" + }, + { + "token": "PLUS", + "loc": "72:27-72:28" + }, + { + "token": [ + "STRING", + ":alternate" + ], + "loc": "72:29-72:41" + }, + { + "token": "RPAREN", + "loc": "72:41-72:42" + }, + { + "token": "COMMA", + "loc": "72:42-72:43" + }, + { + "token": "NEWLINE", + "loc": "72:43-72:44" + }, + { + "token": "RBRACE", + "loc": "73:3-73:4" + }, + { + "token": "NEWLINE", + "loc": "73:4-73:5" + }, + { + "token": "RBRACE", + "loc": "74:1-74:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "74:2-74:2" + }, + { + "token": "NEWLINE", + "loc": "74:2-74:3" + }, + { + "token": "NEWLINE", + "loc": "75:1-75:2" + }, + { + "token": [ + "COMMENT", + { + "content": "///|", + "kind": [ + "Ownline", + { + "leading_blank_line": true, + "trailing_blank_line": false + } + ], + "consumed_by_docstring": false + } + ], + "loc": "76:1-76:5" + }, + { + "token": "NEWLINE", + "loc": "76:5-76:6" + }, + { + "token": "FN", + "loc": "77:1-77:3" + }, + { + "token": [ + "LIDENT", + "mk_box" + ], + "loc": "77:4-77:10" + }, + { + "token": "LPAREN", + "loc": "77:10-77:11" + }, + { + "token": "NEWLINE", + "loc": "77:11-77:12" + }, + { + "token": [ + "LIDENT", + "leaf0" + ], + "loc": "78:3-78:8" + }, + { + "token": "COLON", + "loc": "78:9-78:10" + }, + { + "token": [ + "UIDENT", + "LayoutLeaf" + ], + "loc": "78:11-78:21" + }, + { + "token": "COMMA", + "loc": "78:21-78:22" + }, + { + "token": "NEWLINE", + "loc": "78:22-78:23" + }, + { + "token": [ + "LIDENT", + "leaf1" + ], + "loc": "79:3-79:8" + }, + { + "token": "COLON", + "loc": "79:9-79:10" + }, + { + "token": [ + "UIDENT", + "LayoutLeaf" + ], + "loc": "79:11-79:21" + }, + { + "token": "COMMA", + "loc": "79:21-79:22" + }, + { + "token": "NEWLINE", + "loc": "79:22-79:23" + }, + { + "token": [ + "LIDENT", + "leaf2" + ], + "loc": "80:3-80:8" + }, + { + "token": "COLON", + "loc": "80:9-80:10" + }, + { + "token": [ + "UIDENT", + "LayoutLeaf" + ], + "loc": "80:11-80:21" + }, + { + "token": "COMMA", + "loc": "80:21-80:22" + }, + { + "token": "NEWLINE", + "loc": "80:22-80:23" + }, + { + "token": [ + "LIDENT", + "branch0" + ], + "loc": "81:3-81:10" + }, + { + "token": "COLON", + "loc": "81:11-81:12" + }, + { + "token": [ + "UIDENT", + "LayoutBranch" + ], + "loc": "81:13-81:25" + }, + { + "token": "COMMA", + "loc": "81:25-81:26" + }, + { + "token": "NEWLINE", + "loc": "81:26-81:27" + }, + { + "token": [ + "LIDENT", + "branch1" + ], + "loc": "82:3-82:10" + }, + { + "token": "COLON", + "loc": "82:11-82:12" + }, + { + "token": [ + "UIDENT", + "LayoutBranch" + ], + "loc": "82:13-82:25" + }, + { + "token": "NEWLINE", + "loc": "82:25-82:26" + }, + { + "token": "RPAREN", + "loc": "83:1-83:2" + }, + { + "token": "THIN_ARROW", + "loc": "83:3-83:5" + }, + { + "token": [ + "UIDENT", + "LayoutBox" + ], + "loc": "83:6-83:15" + }, + { + "token": "LBRACE", + "loc": "83:16-83:17" + }, + { + "token": "NEWLINE", + "loc": "83:17-83:18" + }, + { + "token": [ + "UIDENT", + "LayoutBox" + ], + "loc": "84:3-84:12" + }, + { + "token": "COLONCOLON", + "loc": "84:12-84:14" + }, + { + "token": "LBRACE", + "loc": "84:14-84:15" + }, + { + "token": "NEWLINE", + "loc": "84:15-84:16" + }, + { + "token": [ + "LIDENT", + "name" + ], + "loc": "85:5-85:9" + }, + { + "token": "COLON", + "loc": "85:9-85:10" + }, + { + "token": [ + "STRING", + "box-root" + ], + "loc": "85:11-85:21" + }, + { + "token": "COMMA", + "loc": "85:21-85:22" + }, + { + "token": "NEWLINE", + "loc": "85:22-85:23" + }, + { + "token": [ + "LIDENT", + "n0" + ], + "loc": "86:5-86:7" + }, + { + "token": "COLON", + "loc": "86:7-86:8" + }, + { + "token": [ + "INT", + "7" + ], + "loc": "86:9-86:10" + }, + { + "token": "COMMA", + "loc": "86:10-86:11" + }, + { + "token": "NEWLINE", + "loc": "86:11-86:12" + }, + { + "token": [ + "LIDENT", + "left" + ], + "loc": "87:5-87:9" + }, + { + "token": "COLON", + "loc": "87:9-87:10" + }, + { + "token": [ + "LIDENT", + "branch0" + ], + "loc": "87:11-87:18" + }, + { + "token": "COMMA", + "loc": "87:18-87:19" + }, + { + "token": "NEWLINE", + "loc": "87:19-87:20" + }, + { + "token": [ + "LIDENT", + "blob" + ], + "loc": "88:5-88:9" + }, + { + "token": "COLON", + "loc": "88:9-88:10" + }, + { + "token": [ + "LIDENT", + "mk_bytes" + ], + "loc": "88:11-88:19" + }, + { + "token": "LPAREN", + "loc": "88:19-88:20" + }, + { + "token": [ + "INT", + "30" + ], + "loc": "88:20-88:22" + }, + { + "token": "COMMA", + "loc": "88:22-88:23" + }, + { + "token": [ + "INT", + "8" + ], + "loc": "88:24-88:25" + }, + { + "token": "RPAREN", + "loc": "88:25-88:26" + }, + { + "token": "COMMA", + "loc": "88:26-88:27" + }, + { + "token": "NEWLINE", + "loc": "88:27-88:28" + }, + { + "token": [ + "LIDENT", + "n1" + ], + "loc": "89:5-89:7" + }, + { + "token": "COLON", + "loc": "89:7-89:8" + }, + { + "token": [ + "INT", + "64" + ], + "loc": "89:9-89:11" + }, + { + "token": "COMMA", + "loc": "89:11-89:12" + }, + { + "token": "NEWLINE", + "loc": "89:12-89:13" + }, + { + "token": [ + "LIDENT", + "right" + ], + "loc": "90:5-90:10" + }, + { + "token": "COLON", + "loc": "90:10-90:11" + }, + { + "token": [ + "LIDENT", + "branch1" + ], + "loc": "90:12-90:19" + }, + { + "token": "COMMA", + "loc": "90:19-90:20" + }, + { + "token": "NEWLINE", + "loc": "90:20-90:21" + }, + { + "token": [ + "LIDENT", + "checkpoint" + ], + "loc": "91:5-91:15" + }, + { + "token": "COLON", + "loc": "91:15-91:16" + }, + { + "token": [ + "STRING", + "checkpoint" + ], + "loc": "91:17-91:29" + }, + { + "token": "COMMA", + "loc": "91:29-91:30" + }, + { + "token": "NEWLINE", + "loc": "91:30-91:31" + }, + { + "token": [ + "LIDENT", + "factor" + ], + "loc": "92:5-92:11" + }, + { + "token": "COLON", + "loc": "92:11-92:12" + }, + { + "token": [ + "DOUBLE", + "3.5" + ], + "loc": "92:13-92:16" + }, + { + "token": "COMMA", + "loc": "92:16-92:17" + }, + { + "token": "NEWLINE", + "loc": "92:17-92:18" + }, + { + "token": [ + "LIDENT", + "leaf" + ], + "loc": "93:5-93:9" + }, + { + "token": "COLON", + "loc": "93:9-93:10" + }, + { + "token": [ + "LIDENT", + "leaf2" + ], + "loc": "93:11-93:16" + }, + { + "token": "COMMA", + "loc": "93:16-93:17" + }, + { + "token": "NEWLINE", + "loc": "93:17-93:18" + }, + { + "token": [ + "LIDENT", + "payload2" + ], + "loc": "94:5-94:13" + }, + { + "token": "COLON", + "loc": "94:13-94:14" + }, + { + "token": [ + "LIDENT", + "mk_bytes" + ], + "loc": "94:15-94:23" + }, + { + "token": "LPAREN", + "loc": "94:23-94:24" + }, + { + "token": [ + "INT", + "40" + ], + "loc": "94:24-94:26" + }, + { + "token": "COMMA", + "loc": "94:26-94:27" + }, + { + "token": [ + "INT", + "9" + ], + "loc": "94:28-94:29" + }, + { + "token": "RPAREN", + "loc": "94:29-94:30" + }, + { + "token": "COMMA", + "loc": "94:30-94:31" + }, + { + "token": "NEWLINE", + "loc": "94:31-94:32" + }, + { + "token": [ + "LIDENT", + "trailer" + ], + "loc": "95:5-95:12" + }, + { + "token": "COLON", + "loc": "95:12-95:13" + }, + { + "token": [ + "LIDENT", + "leaf0" + ], + "loc": "95:14-95:19" + }, + { + "token": [ + "DOT_LIDENT", + "r2" + ], + "loc": "95:20-95:22" + }, + { + "token": "PLUS", + "loc": "95:23-95:24" + }, + { + "token": [ + "STRING", + ":" + ], + "loc": "95:25-95:28" + }, + { + "token": "PLUS", + "loc": "95:29-95:30" + }, + { + "token": [ + "LIDENT", + "leaf1" + ], + "loc": "95:31-95:36" + }, + { + "token": [ + "DOT_LIDENT", + "r2" + ], + "loc": "95:37-95:39" + }, + { + "token": "COMMA", + "loc": "95:39-95:40" + }, + { + "token": "NEWLINE", + "loc": "95:40-95:41" + }, + { + "token": [ + "LIDENT", + "n2" + ], + "loc": "96:5-96:7" + }, + { + "token": "COLON", + "loc": "96:7-96:8" + }, + { + "token": [ + "INT", + "9" + ], + "loc": "96:9-96:10" + }, + { + "token": "COMMA", + "loc": "96:10-96:11" + }, + { + "token": "NEWLINE", + "loc": "96:11-96:12" + }, + { + "token": [ + "LIDENT", + "flag" + ], + "loc": "97:5-97:9" + }, + { + "token": "COLON", + "loc": "97:9-97:10" + }, + { + "token": [ + "UIDENT", + "Some" + ], + "loc": "97:11-97:15" + }, + { + "token": "LPAREN", + "loc": "97:15-97:16" + }, + { + "token": [ + "STRING", + "maybe" + ], + "loc": "97:16-97:23" + }, + { + "token": "RPAREN", + "loc": "97:23-97:24" + }, + { + "token": "COMMA", + "loc": "97:24-97:25" + }, + { + "token": "NEWLINE", + "loc": "97:25-97:26" + }, + { + "token": "RBRACE", + "loc": "98:3-98:4" + }, + { + "token": "NEWLINE", + "loc": "98:4-98:5" + }, + { + "token": "RBRACE", + "loc": "99:1-99:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "99:2-99:2" + }, + { + "token": "NEWLINE", + "loc": "99:2-99:3" + }, + { + "token": "NEWLINE", + "loc": "100:1-100:2" + }, + { + "token": [ + "COMMENT", + { + "content": "///|", + "kind": [ + "Ownline", + { + "leading_blank_line": true, + "trailing_blank_line": false + } + ], + "consumed_by_docstring": false + } + ], + "loc": "101:1-101:5" + }, + { + "token": "NEWLINE", + "loc": "101:5-101:6" + }, + { + "token": "FN", + "loc": "102:1-102:3" + }, + { + "token": [ + "LIDENT", + "main" + ], + "loc": "102:4-102:8" + }, + { + "token": "LBRACE", + "loc": "102:9-102:10" + }, + { + "token": "NEWLINE", + "loc": "102:10-102:11" + }, + { + "token": "LET", + "loc": "103:3-103:6" + }, + { + "token": [ + "LIDENT", + "leaf0" + ], + "loc": "103:7-103:12" + }, + { + "token": "EQUAL", + "loc": "103:13-103:14" + }, + { + "token": [ + "LIDENT", + "mk_leaf" + ], + "loc": "103:15-103:22" + }, + { + "token": "LPAREN", + "loc": "103:22-103:23" + }, + { + "token": [ + "INT", + "0" + ], + "loc": "103:23-103:24" + }, + { + "token": "COMMA", + "loc": "103:24-103:25" + }, + { + "token": [ + "CHAR", + "a" + ], + "loc": "103:26-103:29" + }, + { + "token": "COMMA", + "loc": "103:29-103:30" + }, + { + "token": [ + "STRING", + "leaf0" + ], + "loc": "103:31-103:38" + }, + { + "token": "RPAREN", + "loc": "103:38-103:39" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "103:39-103:39" + }, + { + "token": "NEWLINE", + "loc": "103:39-103:40" + }, + { + "token": "LET", + "loc": "104:3-104:6" + }, + { + "token": [ + "LIDENT", + "leaf1" + ], + "loc": "104:7-104:12" + }, + { + "token": "EQUAL", + "loc": "104:13-104:14" + }, + { + "token": [ + "LIDENT", + "mk_leaf" + ], + "loc": "104:15-104:22" + }, + { + "token": "LPAREN", + "loc": "104:22-104:23" + }, + { + "token": [ + "INT", + "1" + ], + "loc": "104:23-104:24" + }, + { + "token": "COMMA", + "loc": "104:24-104:25" + }, + { + "token": [ + "CHAR", + "b" + ], + "loc": "104:26-104:29" + }, + { + "token": "COMMA", + "loc": "104:29-104:30" + }, + { + "token": [ + "STRING", + "leaf1" + ], + "loc": "104:31-104:38" + }, + { + "token": "RPAREN", + "loc": "104:38-104:39" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "104:39-104:39" + }, + { + "token": "NEWLINE", + "loc": "104:39-104:40" + }, + { + "token": "LET", + "loc": "105:3-105:6" + }, + { + "token": [ + "LIDENT", + "leaf2" + ], + "loc": "105:7-105:12" + }, + { + "token": "EQUAL", + "loc": "105:13-105:14" + }, + { + "token": [ + "LIDENT", + "mk_leaf" + ], + "loc": "105:15-105:22" + }, + { + "token": "LPAREN", + "loc": "105:22-105:23" + }, + { + "token": [ + "INT", + "2" + ], + "loc": "105:23-105:24" + }, + { + "token": "COMMA", + "loc": "105:24-105:25" + }, + { + "token": [ + "CHAR", + "c" + ], + "loc": "105:26-105:29" + }, + { + "token": "COMMA", + "loc": "105:29-105:30" + }, + { + "token": [ + "STRING", + "leaf2" + ], + "loc": "105:31-105:38" + }, + { + "token": "RPAREN", + "loc": "105:38-105:39" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "105:39-105:39" + }, + { + "token": "NEWLINE", + "loc": "105:39-105:40" + }, + { + "token": "LET", + "loc": "106:3-106:6" + }, + { + "token": [ + "LIDENT", + "branch0" + ], + "loc": "106:7-106:14" + }, + { + "token": "EQUAL", + "loc": "106:15-106:16" + }, + { + "token": [ + "LIDENT", + "mk_branch" + ], + "loc": "106:17-106:26" + }, + { + "token": "LPAREN", + "loc": "106:26-106:27" + }, + { + "token": [ + "LIDENT", + "leaf0" + ], + "loc": "106:27-106:32" + }, + { + "token": "COMMA", + "loc": "106:32-106:33" + }, + { + "token": [ + "LIDENT", + "leaf1" + ], + "loc": "106:34-106:39" + }, + { + "token": "COMMA", + "loc": "106:39-106:40" + }, + { + "token": [ + "STRING", + "branch0" + ], + "loc": "106:41-106:50" + }, + { + "token": "RPAREN", + "loc": "106:50-106:51" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "106:51-106:51" + }, + { + "token": "NEWLINE", + "loc": "106:51-106:52" + }, + { + "token": "LET", + "loc": "107:3-107:6" + }, + { + "token": [ + "LIDENT", + "branch1" + ], + "loc": "107:7-107:14" + }, + { + "token": "EQUAL", + "loc": "107:15-107:16" + }, + { + "token": [ + "LIDENT", + "mk_branch" + ], + "loc": "107:17-107:26" + }, + { + "token": "LPAREN", + "loc": "107:26-107:27" + }, + { + "token": [ + "LIDENT", + "leaf2" + ], + "loc": "107:27-107:32" + }, + { + "token": "COMMA", + "loc": "107:32-107:33" + }, + { + "token": [ + "LIDENT", + "leaf1" + ], + "loc": "107:34-107:39" + }, + { + "token": "COMMA", + "loc": "107:39-107:40" + }, + { + "token": [ + "STRING", + "branch1" + ], + "loc": "107:41-107:50" + }, + { + "token": "RPAREN", + "loc": "107:50-107:51" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "107:51-107:51" + }, + { + "token": "NEWLINE", + "loc": "107:51-107:52" + }, + { + "token": "LET", + "loc": "108:3-108:6" + }, + { + "token": [ + "LIDENT", + "branch2" + ], + "loc": "108:7-108:14" + }, + { + "token": "EQUAL", + "loc": "108:15-108:16" + }, + { + "token": [ + "LIDENT", + "mk_branch" + ], + "loc": "108:17-108:26" + }, + { + "token": "LPAREN", + "loc": "108:26-108:27" + }, + { + "token": [ + "LIDENT", + "leaf1" + ], + "loc": "108:27-108:32" + }, + { + "token": "COMMA", + "loc": "108:32-108:33" + }, + { + "token": [ + "LIDENT", + "leaf0" + ], + "loc": "108:34-108:39" + }, + { + "token": "COMMA", + "loc": "108:39-108:40" + }, + { + "token": [ + "STRING", + "branch2" + ], + "loc": "108:41-108:50" + }, + { + "token": "RPAREN", + "loc": "108:50-108:51" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "108:51-108:51" + }, + { + "token": "NEWLINE", + "loc": "108:51-108:52" + }, + { + "token": "LET", + "loc": "109:3-109:6" + }, + { + "token": [ + "LIDENT", + "box" + ], + "loc": "109:7-109:10" + }, + { + "token": "EQUAL", + "loc": "109:11-109:12" + }, + { + "token": [ + "LIDENT", + "mk_box" + ], + "loc": "109:13-109:19" + }, + { + "token": "LPAREN", + "loc": "109:19-109:20" + }, + { + "token": [ + "LIDENT", + "leaf0" + ], + "loc": "109:20-109:25" + }, + { + "token": "COMMA", + "loc": "109:25-109:26" + }, + { + "token": [ + "LIDENT", + "leaf1" + ], + "loc": "109:27-109:32" + }, + { + "token": "COMMA", + "loc": "109:32-109:33" + }, + { + "token": [ + "LIDENT", + "leaf2" + ], + "loc": "109:34-109:39" + }, + { + "token": "COMMA", + "loc": "109:39-109:40" + }, + { + "token": [ + "LIDENT", + "branch0" + ], + "loc": "109:41-109:48" + }, + { + "token": "COMMA", + "loc": "109:48-109:49" + }, + { + "token": [ + "LIDENT", + "branch1" + ], + "loc": "109:50-109:57" + }, + { + "token": "RPAREN", + "loc": "109:57-109:58" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "109:58-109:58" + }, + { + "token": "NEWLINE", + "loc": "109:58-109:59" + }, + { + "token": "LET", + "loc": "110:3-110:6" + }, + { + "token": [ + "LIDENT", + "branches" + ], + "loc": "110:7-110:15" + }, + { + "token": "COLON", + "loc": "110:16-110:17" + }, + { + "token": [ + "UIDENT", + "FixedArray" + ], + "loc": "110:18-110:28" + }, + { + "token": "LBRACKET", + "loc": "110:28-110:29" + }, + { + "token": [ + "UIDENT", + "LayoutBranch" + ], + "loc": "110:29-110:41" + }, + { + "token": "RBRACKET", + "loc": "110:41-110:42" + }, + { + "token": "EQUAL", + "loc": "110:43-110:44" + }, + { + "token": "LBRACKET", + "loc": "110:45-110:46" + }, + { + "token": [ + "LIDENT", + "branch0" + ], + "loc": "110:46-110:53" + }, + { + "token": "COMMA", + "loc": "110:53-110:54" + }, + { + "token": [ + "LIDENT", + "branch1" + ], + "loc": "110:55-110:62" + }, + { + "token": "COMMA", + "loc": "110:62-110:63" + }, + { + "token": [ + "LIDENT", + "branch2" + ], + "loc": "110:64-110:71" + }, + { + "token": "RBRACKET", + "loc": "110:71-110:72" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "110:72-110:72" + }, + { + "token": "NEWLINE", + "loc": "110:72-110:73" + }, + { + "token": "LET", + "loc": "111:3-111:6" + }, + { + "token": [ + "LIDENT", + "leaves" + ], + "loc": "111:7-111:13" + }, + { + "token": "COLON", + "loc": "111:14-111:15" + }, + { + "token": [ + "UIDENT", + "FixedArray" + ], + "loc": "111:16-111:26" + }, + { + "token": "LBRACKET", + "loc": "111:26-111:27" + }, + { + "token": [ + "UIDENT", + "LayoutLeaf" + ], + "loc": "111:27-111:37" + }, + { + "token": "RBRACKET", + "loc": "111:37-111:38" + }, + { + "token": "EQUAL", + "loc": "111:39-111:40" + }, + { + "token": "LBRACKET", + "loc": "111:41-111:42" + }, + { + "token": [ + "LIDENT", + "leaf0" + ], + "loc": "111:42-111:47" + }, + { + "token": "COMMA", + "loc": "111:47-111:48" + }, + { + "token": [ + "LIDENT", + "leaf1" + ], + "loc": "111:49-111:54" + }, + { + "token": "COMMA", + "loc": "111:54-111:55" + }, + { + "token": [ + "LIDENT", + "leaf2" + ], + "loc": "111:56-111:61" + }, + { + "token": "COMMA", + "loc": "111:61-111:62" + }, + { + "token": [ + "LIDENT", + "leaf1" + ], + "loc": "111:63-111:68" + }, + { + "token": "RBRACKET", + "loc": "111:68-111:69" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "111:69-111:69" + }, + { + "token": "NEWLINE", + "loc": "111:69-111:70" + }, + { + "token": "LET", + "loc": "112:3-112:6" + }, + { + "token": [ + "LIDENT", + "envelope" + ], + "loc": "112:7-112:15" + }, + { + "token": "EQUAL", + "loc": "112:16-112:17" + }, + { + "token": [ + "UIDENT", + "LayoutEnvelope" + ], + "loc": "112:18-112:32" + }, + { + "token": "COLONCOLON", + "loc": "112:32-112:34" + }, + { + "token": [ + "UIDENT", + "Packed" + ], + "loc": "112:34-112:40" + }, + { + "token": "LPAREN", + "loc": "112:40-112:41" + }, + { + "token": [ + "LIDENT", + "box" + ], + "loc": "112:41-112:44" + }, + { + "token": "COMMA", + "loc": "112:44-112:45" + }, + { + "token": [ + "LIDENT", + "branches" + ], + "loc": "112:46-112:54" + }, + { + "token": "COMMA", + "loc": "112:54-112:55" + }, + { + "token": [ + "LIDENT", + "leaves" + ], + "loc": "112:56-112:62" + }, + { + "token": "COMMA", + "loc": "112:62-112:63" + }, + { + "token": [ + "STRING", + "done" + ], + "loc": "112:64-112:70" + }, + { + "token": "RPAREN", + "loc": "112:70-112:71" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "112:71-112:71" + }, + { + "token": "NEWLINE", + "loc": "112:71-112:72" + }, + { + "token": "NEWLINE", + "loc": "113:1-113:2" + }, + { + "token": [ + "LIDENT", + "println" + ], + "loc": "114:3-114:10" + }, + { + "token": "LPAREN", + "loc": "114:10-114:11" + }, + { + "token": [ + "LIDENT", + "box" + ], + "loc": "114:11-114:14" + }, + { + "token": [ + "DOT_LIDENT", + "name" + ], + "loc": "114:15-114:19" + }, + { + "token": "RPAREN", + "loc": "114:19-114:20" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "114:20-114:20" + }, + { + "token": "NEWLINE", + "loc": "114:20-114:21" + }, + { + "token": [ + "LIDENT", + "println" + ], + "loc": "115:3-115:10" + }, + { + "token": "LPAREN", + "loc": "115:10-115:11" + }, + { + "token": [ + "LIDENT", + "box" + ], + "loc": "115:11-115:14" + }, + { + "token": [ + "DOT_LIDENT", + "left" + ], + "loc": "115:15-115:19" + }, + { + "token": [ + "DOT_LIDENT", + "first" + ], + "loc": "115:20-115:25" + }, + { + "token": [ + "DOT_LIDENT", + "r0" + ], + "loc": "115:26-115:28" + }, + { + "token": "RPAREN", + "loc": "115:28-115:29" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "115:29-115:29" + }, + { + "token": "NEWLINE", + "loc": "115:29-115:30" + }, + { + "token": [ + "LIDENT", + "println" + ], + "loc": "116:3-116:10" + }, + { + "token": "LPAREN", + "loc": "116:10-116:11" + }, + { + "token": [ + "LIDENT", + "box" + ], + "loc": "116:11-116:14" + }, + { + "token": [ + "DOT_LIDENT", + "left" + ], + "loc": "116:15-116:19" + }, + { + "token": [ + "DOT_LIDENT", + "second" + ], + "loc": "116:20-116:26" + }, + { + "token": [ + "DOT_LIDENT", + "r0" + ], + "loc": "116:27-116:29" + }, + { + "token": "RPAREN", + "loc": "116:29-116:30" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "116:30-116:30" + }, + { + "token": "NEWLINE", + "loc": "116:30-116:31" + }, + { + "token": [ + "LIDENT", + "println" + ], + "loc": "117:3-117:10" + }, + { + "token": "LPAREN", + "loc": "117:10-117:11" + }, + { + "token": [ + "LIDENT", + "box" + ], + "loc": "117:11-117:14" + }, + { + "token": [ + "DOT_LIDENT", + "right" + ], + "loc": "117:15-117:20" + }, + { + "token": [ + "DOT_LIDENT", + "first" + ], + "loc": "117:21-117:26" + }, + { + "token": [ + "DOT_LIDENT", + "r2" + ], + "loc": "117:27-117:29" + }, + { + "token": "RPAREN", + "loc": "117:29-117:30" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "117:30-117:30" + }, + { + "token": "NEWLINE", + "loc": "117:30-117:31" + }, + { + "token": [ + "LIDENT", + "println" + ], + "loc": "118:3-118:10" + }, + { + "token": "LPAREN", + "loc": "118:10-118:11" + }, + { + "token": [ + "LIDENT", + "branches" + ], + "loc": "118:11-118:19" + }, + { + "token": "LBRACKET", + "loc": "118:19-118:20" + }, + { + "token": [ + "INT", + "1" + ], + "loc": "118:20-118:21" + }, + { + "token": "RBRACKET", + "loc": "118:21-118:22" + }, + { + "token": [ + "DOT_LIDENT", + "mark" + ], + "loc": "118:23-118:27" + }, + { + "token": "RPAREN", + "loc": "118:27-118:28" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "118:28-118:28" + }, + { + "token": "NEWLINE", + "loc": "118:28-118:29" + }, + { + "token": [ + "LIDENT", + "println" + ], + "loc": "119:3-119:10" + }, + { + "token": "LPAREN", + "loc": "119:10-119:11" + }, + { + "token": [ + "LIDENT", + "branches" + ], + "loc": "119:11-119:19" + }, + { + "token": "LBRACKET", + "loc": "119:19-119:20" + }, + { + "token": [ + "INT", + "2" + ], + "loc": "119:20-119:21" + }, + { + "token": "RBRACKET", + "loc": "119:21-119:22" + }, + { + "token": [ + "DOT_LIDENT", + "second" + ], + "loc": "119:23-119:29" + }, + { + "token": [ + "DOT_LIDENT", + "r0" + ], + "loc": "119:30-119:32" + }, + { + "token": "RPAREN", + "loc": "119:32-119:33" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "119:33-119:33" + }, + { + "token": "NEWLINE", + "loc": "119:33-119:34" + }, + { + "token": [ + "LIDENT", + "println" + ], + "loc": "120:3-120:10" + }, + { + "token": "LPAREN", + "loc": "120:10-120:11" + }, + { + "token": [ + "LIDENT", + "branches" + ], + "loc": "120:11-120:19" + }, + { + "token": "LBRACKET", + "loc": "120:19-120:20" + }, + { + "token": [ + "INT", + "0" + ], + "loc": "120:20-120:21" + }, + { + "token": "RBRACKET", + "loc": "120:21-120:22" + }, + { + "token": [ + "DOT_LIDENT", + "payload" + ], + "loc": "120:23-120:30" + }, + { + "token": [ + "DOT_LIDENT", + "length" + ], + "loc": "120:31-120:37" + }, + { + "token": "LPAREN", + "loc": "120:37-120:38" + }, + { + "token": "RPAREN", + "loc": "120:38-120:39" + }, + { + "token": "RPAREN", + "loc": "120:39-120:40" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "120:40-120:40" + }, + { + "token": "NEWLINE", + "loc": "120:40-120:41" + }, + { + "token": [ + "LIDENT", + "println" + ], + "loc": "121:3-121:10" + }, + { + "token": "LPAREN", + "loc": "121:10-121:11" + }, + { + "token": [ + "LIDENT", + "leaves" + ], + "loc": "121:11-121:17" + }, + { + "token": "LBRACKET", + "loc": "121:17-121:18" + }, + { + "token": [ + "INT", + "2" + ], + "loc": "121:18-121:19" + }, + { + "token": "RBRACKET", + "loc": "121:19-121:20" + }, + { + "token": [ + "DOT_LIDENT", + "r1" + ], + "loc": "121:21-121:23" + }, + { + "token": [ + "DOT_LIDENT", + "length" + ], + "loc": "121:24-121:30" + }, + { + "token": "LPAREN", + "loc": "121:30-121:31" + }, + { + "token": "RPAREN", + "loc": "121:31-121:32" + }, + { + "token": "RPAREN", + "loc": "121:32-121:33" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "121:33-121:33" + }, + { + "token": "NEWLINE", + "loc": "121:33-121:34" + }, + { + "token": "MATCH", + "loc": "122:3-122:8" + }, + { + "token": [ + "LIDENT", + "envelope" + ], + "loc": "122:9-122:17" + }, + { + "token": "LBRACE", + "loc": "122:18-122:19" + }, + { + "token": "NEWLINE", + "loc": "122:19-122:20" + }, + { + "token": [ + "UIDENT", + "Packed" + ], + "loc": "123:5-123:11" + }, + { + "token": "LPAREN", + "loc": "123:11-123:12" + }, + { + "token": [ + "LIDENT", + "box2" + ], + "loc": "123:12-123:16" + }, + { + "token": "COMMA", + "loc": "123:16-123:17" + }, + { + "token": [ + "LIDENT", + "branches2" + ], + "loc": "123:18-123:27" + }, + { + "token": "COMMA", + "loc": "123:27-123:28" + }, + { + "token": [ + "LIDENT", + "leaves2" + ], + "loc": "123:29-123:36" + }, + { + "token": "COMMA", + "loc": "123:36-123:37" + }, + { + "token": [ + "LIDENT", + "suffix" + ], + "loc": "123:38-123:44" + }, + { + "token": "RPAREN", + "loc": "123:44-123:45" + }, + { + "token": "FAT_ARROW", + "loc": "123:46-123:48" + }, + { + "token": "LBRACE", + "loc": "123:49-123:50" + }, + { + "token": "NEWLINE", + "loc": "123:50-123:51" + }, + { + "token": [ + "LIDENT", + "println" + ], + "loc": "124:7-124:14" + }, + { + "token": "LPAREN", + "loc": "124:14-124:15" + }, + { + "token": [ + "LIDENT", + "branches2" + ], + "loc": "124:15-124:24" + }, + { + "token": "LBRACKET", + "loc": "124:24-124:25" + }, + { + "token": [ + "INT", + "1" + ], + "loc": "124:25-124:26" + }, + { + "token": "RBRACKET", + "loc": "124:26-124:27" + }, + { + "token": [ + "DOT_LIDENT", + "tail" + ], + "loc": "124:28-124:32" + }, + { + "token": "RPAREN", + "loc": "124:32-124:33" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "124:33-124:33" + }, + { + "token": "NEWLINE", + "loc": "124:33-124:34" + }, + { + "token": [ + "LIDENT", + "println" + ], + "loc": "125:7-125:14" + }, + { + "token": "LPAREN", + "loc": "125:14-125:15" + }, + { + "token": [ + "LIDENT", + "suffix" + ], + "loc": "125:15-125:21" + }, + { + "token": "RPAREN", + "loc": "125:21-125:22" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "125:22-125:22" + }, + { + "token": "NEWLINE", + "loc": "125:22-125:23" + }, + { + "token": [ + "LIDENT", + "println" + ], + "loc": "126:7-126:14" + }, + { + "token": "LPAREN", + "loc": "126:14-126:15" + }, + { + "token": [ + "LIDENT", + "box2" + ], + "loc": "126:15-126:19" + }, + { + "token": [ + "DOT_LIDENT", + "leaf" + ], + "loc": "126:20-126:24" + }, + { + "token": [ + "DOT_LIDENT", + "r1" + ], + "loc": "126:25-126:27" + }, + { + "token": [ + "DOT_LIDENT", + "length" + ], + "loc": "126:28-126:34" + }, + { + "token": "LPAREN", + "loc": "126:34-126:35" + }, + { + "token": "RPAREN", + "loc": "126:35-126:36" + }, + { + "token": "RPAREN", + "loc": "126:36-126:37" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "126:37-126:37" + }, + { + "token": "NEWLINE", + "loc": "126:37-126:38" + }, + { + "token": [ + "LIDENT", + "println" + ], + "loc": "127:7-127:14" + }, + { + "token": "LPAREN", + "loc": "127:14-127:15" + }, + { + "token": [ + "LIDENT", + "leaves2" + ], + "loc": "127:15-127:22" + }, + { + "token": "LBRACKET", + "loc": "127:22-127:23" + }, + { + "token": [ + "INT", + "1" + ], + "loc": "127:23-127:24" + }, + { + "token": "RBRACKET", + "loc": "127:24-127:25" + }, + { + "token": [ + "DOT_LIDENT", + "r2" + ], + "loc": "127:26-127:28" + }, + { + "token": "RPAREN", + "loc": "127:28-127:29" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "127:29-127:29" + }, + { + "token": "NEWLINE", + "loc": "127:29-127:30" + }, + { + "token": "MATCH", + "loc": "128:7-128:12" + }, + { + "token": [ + "LIDENT", + "box2" + ], + "loc": "128:13-128:17" + }, + { + "token": [ + "DOT_LIDENT", + "flag" + ], + "loc": "128:18-128:22" + }, + { + "token": "LBRACE", + "loc": "128:23-128:24" + }, + { + "token": "NEWLINE", + "loc": "128:24-128:25" + }, + { + "token": [ + "UIDENT", + "Some" + ], + "loc": "129:9-129:13" + }, + { + "token": "LPAREN", + "loc": "129:13-129:14" + }, + { + "token": [ + "LIDENT", + "flag" + ], + "loc": "129:14-129:18" + }, + { + "token": "RPAREN", + "loc": "129:18-129:19" + }, + { + "token": "FAT_ARROW", + "loc": "129:20-129:22" + }, + { + "token": [ + "LIDENT", + "println" + ], + "loc": "129:23-129:30" + }, + { + "token": "LPAREN", + "loc": "129:30-129:31" + }, + { + "token": [ + "LIDENT", + "flag" + ], + "loc": "129:31-129:35" + }, + { + "token": "RPAREN", + "loc": "129:35-129:36" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "129:36-129:36" + }, + { + "token": "NEWLINE", + "loc": "129:36-129:37" + }, + { + "token": [ + "UIDENT", + "None" + ], + "loc": "130:9-130:13" + }, + { + "token": "FAT_ARROW", + "loc": "130:14-130:16" + }, + { + "token": [ + "LIDENT", + "println" + ], + "loc": "130:17-130:24" + }, + { + "token": "LPAREN", + "loc": "130:24-130:25" + }, + { + "token": [ + "STRING", + "none" + ], + "loc": "130:25-130:31" + }, + { + "token": "RPAREN", + "loc": "130:31-130:32" + }, + { + "token": "NEWLINE", + "loc": "130:32-130:33" + }, + { + "token": "RBRACE", + "loc": "131:7-131:8" + }, + { + "token": "NEWLINE", + "loc": "131:8-131:9" + }, + { + "token": "RBRACE", + "loc": "132:5-132:6" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "132:6-132:6" + }, + { + "token": "NEWLINE", + "loc": "132:6-132:7" + }, + { + "token": [ + "UIDENT", + "Empty" + ], + "loc": "133:5-133:10" + }, + { + "token": "FAT_ARROW", + "loc": "133:11-133:13" + }, + { + "token": [ + "LIDENT", + "println" + ], + "loc": "133:14-133:21" + }, + { + "token": "LPAREN", + "loc": "133:21-133:22" + }, + { + "token": [ + "STRING", + "empty" + ], + "loc": "133:22-133:29" + }, + { + "token": "RPAREN", + "loc": "133:29-133:30" + }, + { + "token": "NEWLINE", + "loc": "133:30-133:31" + }, + { + "token": "RBRACE", + "loc": "134:3-134:4" + }, + { + "token": "NEWLINE", + "loc": "134:4-134:5" + }, + { + "token": "RBRACE", + "loc": "135:1-135:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "135:2-135:2" + }, + { + "token": "NEWLINE", + "loc": "135:2-135:3" + }, + { + "token": "EOF", + "loc": "136:1-136:1" + } +] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/pipeline_test_lexmatch_first.mbt b/test/sync_test/__snapshot__/pipeline_test_lexmatch_first.mbt index 495e307b..062c18bc 100644 --- a/test/sync_test/__snapshot__/pipeline_test_lexmatch_first.mbt +++ b/test/sync_test/__snapshot__/pipeline_test_lexmatch_first.mbt @@ -1,4 +1,4 @@ -//!build: -w -20-27 +//!build: -w -20-27-lexmatch_first_match ///| fn test_firstmatch() -> Unit raise { diff --git a/test/sync_test/__snapshot__/pipeline_test_lexmatch_first.mbt.tokens.json b/test/sync_test/__snapshot__/pipeline_test_lexmatch_first.mbt.tokens.json index d40386a1..83296a4e 100644 --- a/test/sync_test/__snapshot__/pipeline_test_lexmatch_first.mbt.tokens.json +++ b/test/sync_test/__snapshot__/pipeline_test_lexmatch_first.mbt.tokens.json @@ -3,7 +3,7 @@ "token": [ "COMMENT", { - "content": "//!build: -w -20-27", + "content": "//!build: -w -20-27-lexmatch_first_match", "kind": [ "Ownline", { @@ -14,11 +14,11 @@ "consumed_by_docstring": false } ], - "loc": "1:1-1:20" + "loc": "1:1-1:41" }, { "token": "NEWLINE", - "loc": "1:20-1:21" + "loc": "1:41-1:42" }, { "token": "NEWLINE", diff --git a/test/sync_test/__snapshot__/pipeline_test_lexmatch_first_guard.mbt b/test/sync_test/__snapshot__/pipeline_test_lexmatch_first_guard.mbt index f945ad73..b998db9e 100644 --- a/test/sync_test/__snapshot__/pipeline_test_lexmatch_first_guard.mbt +++ b/test/sync_test/__snapshot__/pipeline_test_lexmatch_first_guard.mbt @@ -1,4 +1,4 @@ -//!build: -w -20-27 +//!build: -w -20-27-lexmatch_first_match ///| enum FizzBuzz { diff --git a/test/sync_test/__snapshot__/pipeline_test_lexmatch_first_guard.mbt.tokens.json b/test/sync_test/__snapshot__/pipeline_test_lexmatch_first_guard.mbt.tokens.json index b795f18c..964eeff1 100644 --- a/test/sync_test/__snapshot__/pipeline_test_lexmatch_first_guard.mbt.tokens.json +++ b/test/sync_test/__snapshot__/pipeline_test_lexmatch_first_guard.mbt.tokens.json @@ -3,7 +3,7 @@ "token": [ "COMMENT", { - "content": "//!build: -w -20-27", + "content": "//!build: -w -20-27-lexmatch_first_match", "kind": [ "Ownline", { @@ -14,11 +14,11 @@ "consumed_by_docstring": false } ], - "loc": "1:1-1:20" + "loc": "1:1-1:41" }, { "token": "NEWLINE", - "loc": "1:20-1:21" + "loc": "1:41-1:42" }, { "token": "NEWLINE", diff --git a/test/sync_test/__snapshot__/pipeline_test_lexmatch_no_regex.mbt b/test/sync_test/__snapshot__/pipeline_test_lexmatch_no_regex.mbt index cfc35f22..ab1fe2d4 100644 --- a/test/sync_test/__snapshot__/pipeline_test_lexmatch_no_regex.mbt +++ b/test/sync_test/__snapshot__/pipeline_test_lexmatch_no_regex.mbt @@ -1,4 +1,4 @@ -//!build: -w -20-27 +//!build: -w -20-27-lexmatch_first_match fn main { let h = "hello" diff --git a/test/sync_test/__snapshot__/pipeline_test_lexmatch_no_regex.mbt.tokens.json b/test/sync_test/__snapshot__/pipeline_test_lexmatch_no_regex.mbt.tokens.json index cc42b5c1..2a0d2a55 100644 --- a/test/sync_test/__snapshot__/pipeline_test_lexmatch_no_regex.mbt.tokens.json +++ b/test/sync_test/__snapshot__/pipeline_test_lexmatch_no_regex.mbt.tokens.json @@ -3,7 +3,7 @@ "token": [ "COMMENT", { - "content": "//!build: -w -20-27", + "content": "//!build: -w -20-27-lexmatch_first_match", "kind": [ "Ownline", { @@ -14,11 +14,11 @@ "consumed_by_docstring": false } ], - "loc": "1:1-1:20" + "loc": "1:1-1:41" }, { "token": "NEWLINE", - "loc": "1:20-1:21" + "loc": "1:41-1:42" }, { "token": "NEWLINE", diff --git a/test/sync_test/__snapshot__/pipeline_test_lexmatch_unix_path.json b/test/sync_test/__snapshot__/pipeline_test_lexmatch_unix_path.json index e686cb8e..7d2f6a4e 100644 --- a/test/sync_test/__snapshot__/pipeline_test_lexmatch_unix_path.json +++ b/test/sync_test/__snapshot__/pipeline_test_lexmatch_unix_path.json @@ -865,7 +865,8 @@ "kind": "Expr::Array::ExprList", "loc": null, "children": [] - } + }, + "is_iter": false } }, "body": { diff --git a/test/sync_test/__snapshot__/pipeline_test_lexscan.json b/test/sync_test/__snapshot__/pipeline_test_lexscan.json new file mode 100644 index 00000000..1457e3a3 --- /dev/null +++ b/test/sync_test/__snapshot__/pipeline_test_lexscan.json @@ -0,0 +1,3266 @@ +[ + { + "kind": "Impl::TopTypeDef", + "loc": null, + "children": { + "value": { + "kind": "TypeDecl", + "loc": null, + "children": { + "tycon": "LexBuf", + "params": { + "kind": "TypeDecl::ParamList", + "loc": null, + "children": [] + }, + "components": { + "kind": "TypeDesc::Record", + "loc": null, + "children": { + "value": { + "kind": "TypeDesc::Record::FieldList", + "loc": null, + "children": [ + { + "kind": "FieldDecl", + "loc": null, + "children": { + "name": { + "kind": "FieldName", + "loc": null, + "children": { + "label": "buffer" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "String" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "mut": false, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FieldDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + { + "kind": "FieldDecl", + "loc": null, + "children": { + "name": { + "kind": "FieldName", + "loc": null, + "children": { + "label": "cursor" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Int" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "mut": true, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FieldDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + } + ] + } + } + }, + "attrs": { + "kind": "TypeDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "", + "type_vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "is_declare": false, + "deriving": { + "kind": "TypeDecl::DerivingList", + "loc": null, + "children": [] + } + } + } + } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "LexBuf" + } + }, + "is_object": false + } + }, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "set_backup" + } + }, + "has_error": null, + "is_async": null, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "_self" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "LexBuf" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + } + ] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Unit" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::Unit", + "loc": null, + "children": { + "faked": false + } + } + } + } + } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "LexBuf" + } + }, + "is_object": false + } + }, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "clear_backup" + } + }, + "has_error": null, + "is_async": null, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "_self" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "LexBuf" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + } + ] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Unit" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::Unit", + "loc": null, + "children": { + "faked": false + } + } + } + } + } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "LexBuf" + } + }, + "is_object": false + } + }, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "refill" + } + }, + "has_error": null, + "is_async": null, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "_self" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "LexBuf" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + } + ] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Unit" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::Unit", + "loc": null, + "children": { + "faked": false + } + } + } + } + } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "LexBuf" + } + }, + "is_object": false + } + }, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "eof_reached" + } + }, + "has_error": null, + "is_async": null, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "self" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "LexBuf" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + } + ] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Bool" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": ">=" + } + } + } + }, + "lhs": { + "kind": "Expr::Field", + "loc": null, + "children": { + "record": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "self" + } + } + } + } + } + }, + "accessor": { + "kind": "Accessor::Label", + "loc": null, + "children": { + "value": { + "kind": "Label", + "loc": null, + "children": { + "name": "cursor" + } + } + } + } + } + }, + "rhs": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Field", + "loc": null, + "children": { + "record": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "self" + } + } + } + } + } + }, + "accessor": { + "kind": "Accessor::Label", + "loc": null, + "children": { + "value": { + "kind": "Label", + "loc": null, + "children": { + "name": "buffer" + } + } + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "length" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + } + } + } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "LexBuf" + } + }, + "is_object": false + } + }, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "get_cursor" + } + }, + "has_error": null, + "is_async": null, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "self" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "LexBuf" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + } + ] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Int" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::Field", + "loc": null, + "children": { + "record": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "self" + } + } + } + } + } + }, + "accessor": { + "kind": "Accessor::Label", + "loc": null, + "children": { + "value": { + "kind": "Label", + "loc": null, + "children": { + "name": "cursor" + } + } + } + } + } + } + } + } + } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "LexBuf" + } + }, + "is_object": false + } + }, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "buffer_end" + } + }, + "has_error": null, + "is_async": null, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "self" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "LexBuf" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + } + ] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Int" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Field", + "loc": null, + "children": { + "record": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "self" + } + } + } + } + } + }, + "accessor": { + "kind": "Accessor::Label", + "loc": null, + "children": { + "value": { + "kind": "Label", + "loc": null, + "children": { + "name": "buffer" + } + } + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "length" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "LexBuf" + } + }, + "is_object": false + } + }, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "get_char" + } + }, + "has_error": null, + "is_async": null, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "self" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "LexBuf" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "pos" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Int" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + } + ] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Int" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::If", + "loc": null, + "children": { + "cond": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "<" + } + } + } + }, + "lhs": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "pos" + } + } + } + } + } + }, + "rhs": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Field", + "loc": null, + "children": { + "record": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "self" + } + } + } + } + } + }, + "accessor": { + "kind": "Accessor::Label", + "loc": null, + "children": { + "value": { + "kind": "Label", + "loc": null, + "children": { + "name": "buffer" + } + } + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "length" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + }, + "ifso": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Field", + "loc": null, + "children": { + "record": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "self" + } + } + } + } + } + }, + "accessor": { + "kind": "Accessor::Label", + "loc": null, + "children": { + "value": { + "kind": "Label", + "loc": null, + "children": { + "name": "buffer" + } + } + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "unsafe_get" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "pos" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "to_int" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "ifnot": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "-1" + } + } + } + } + } + } + } + } + } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "LexBuf" + } + }, + "is_object": false + } + }, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "advance" + } + }, + "has_error": null, + "is_async": null, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "self" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "LexBuf" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "len" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Int" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + } + ] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Unit" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::Mutate", + "loc": null, + "children": { + "record": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "self" + } + } + } + } + } + }, + "accessor": { + "kind": "Accessor::Label", + "loc": null, + "children": { + "value": { + "kind": "Label", + "loc": null, + "children": { + "name": "cursor" + } + } + } + }, + "field": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "len" + } + } + } + } + } + }, + "augmented_by": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "+" + } + } + } + } + } + } + } + } + } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "LexBuf" + } + }, + "is_object": false + } + }, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "get_stringview" + } + }, + "has_error": null, + "is_async": null, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "self" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "LexBuf" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "start" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Int" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "end" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Int" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + } + ] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "StringView" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Field", + "loc": null, + "children": { + "record": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "self" + } + } + } + } + } + }, + "accessor": { + "kind": "Accessor::Label", + "loc": null, + "children": { + "value": { + "kind": "Label", + "loc": null, + "children": { + "name": "buffer" + } + } + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "view" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "start" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Labelled", + "loc": null, + "children": { + "value": { + "kind": "Label", + "loc": null, + "children": { + "name": "start_offset" + } + } + } + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "end" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Labelled", + "loc": null, + "children": { + "value": { + "kind": "Label", + "loc": null, + "children": { + "name": "end_offset" + } + } + } + } + } + } + ] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "scan" + } + }, + "has_error": null, + "is_async": null, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "lexbuf" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "LexBuf" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + } + ] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "String" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::Lexscan", + "loc": null, + "children": { + "expr": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "lexbuf" + } + } + } + } + } + }, + "cases": { + "kind": "Expr::Lexscan::CaseList", + "loc": null, + "children": [ + { + "kind": "LexscanCase", + "loc": null, + "children": { + "pat": { + "kind": "LexscanCasePattern::Pattern", + "loc": null, + "children": { + "value": { + "kind": "RegexPattern::Alias", + "loc": null, + "children": { + "pat": { + "kind": "RegexPattern::Literal", + "loc": null, + "children": { + "lit": "^[a-z]+" + } + }, + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "word" + } + } + } + } + } + }, + "guard": null, + "body": { + "kind": "Expr::Interp", + "loc": null, + "children": { + "elems": { + "kind": "Expr::Interp::ElemList", + "loc": null, + "children": [ + { + "kind": "InterpElem::Literal", + "loc": null, + "children": { + "repr": "word:" + } + }, + { + "kind": "InterpElem::Source", + "loc": null, + "children": { + "source": "word" + } + } + ] + } + } + } + } + }, + { + "kind": "LexscanCase", + "loc": null, + "children": { + "pat": { + "kind": "LexscanCasePattern::Pattern", + "loc": null, + "children": { + "value": { + "kind": "RegexPattern::Literal", + "loc": null, + "children": { + "lit": "^[0-9]+" + } + } + } + }, + "guard": null, + "body": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "int" + } + } + } + } + } + }, + { + "kind": "LexscanCase", + "loc": null, + "children": { + "pat": { + "kind": "LexscanCasePattern::Pattern", + "loc": null, + "children": { + "value": { + "kind": "RegexPattern::Literal", + "loc": null, + "children": { + "lit": "^ +" + } + } + } + }, + "guard": null, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "scan" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "lexbuf" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + }, + { + "kind": "LexscanCase", + "loc": null, + "children": { + "pat": { + "kind": "LexscanCasePattern::Wildcard", + "loc": null, + "children": {} + }, + "guard": null, + "body": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "other" + } + } + } + } + } + } + ] + } + } + } + } + } + } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "main" + } + }, + "has_error": null, + "is_async": null, + "decl_params": null, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [] + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::Let", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "lexbuf" + } + } + } + }, + "expr": { + "kind": "Expr::Record", + "loc": null, + "children": { + "type_name": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "LexBuf" + } + }, + "is_object": false + } + }, + "fields": { + "kind": "Expr::Record::FieldList", + "loc": null, + "children": [ + { + "kind": "FieldDef", + "loc": null, + "children": { + "label": { + "kind": "Label", + "loc": null, + "children": { + "name": "buffer" + } + }, + "expr": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "abc 123 ?!" + } + } + } + }, + "is_pun": false + } + }, + { + "kind": "FieldDef", + "loc": null, + "children": { + "label": { + "kind": "Label", + "loc": null, + "children": { + "name": "cursor" + } + }, + "expr": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "0" + } + } + } + }, + "is_pun": false + } + } + ] + }, + "trailing": { + "kind": "Trailing::None", + "loc": null, + "children": {} + } + } + }, + "body": { + "kind": "Expr::Sequence", + "loc": null, + "children": { + "exprs": { + "kind": "Expr::Sequence::ExprList", + "loc": null, + "children": [ + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "scan" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "lexbuf" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "scan" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "lexbuf" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "scan" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "lexbuf" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "scan" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "lexbuf" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + ] + }, + "last_expr": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "lexbuf" + } + } + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "get_cursor" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + } + } + } + } + } + } +] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/pipeline_test_lexscan.mbt b/test/sync_test/__snapshot__/pipeline_test_lexscan.mbt new file mode 100644 index 00000000..b5d102a1 --- /dev/null +++ b/test/sync_test/__snapshot__/pipeline_test_lexscan.mbt @@ -0,0 +1,66 @@ +struct LexBuf { + buffer : String + mut cursor : Int +} + +fn LexBuf::set_backup(_self : LexBuf) -> Unit { + () +} + +fn LexBuf::clear_backup(_self : LexBuf) -> Unit { + () +} + +fn LexBuf::refill(_self : LexBuf) -> Unit { + () +} + +fn LexBuf::eof_reached(self : LexBuf) -> Bool { + self.cursor >= self.buffer.length() +} + +fn LexBuf::get_cursor(self : LexBuf) -> Int { + self.cursor +} + +fn LexBuf::buffer_end(self : LexBuf) -> Int { + self.buffer.length() +} + +fn LexBuf::get_char(self : LexBuf, pos : Int) -> Int { + if pos < self.buffer.length() { + self.buffer.unsafe_get(pos).to_int() + } else { + -1 + } +} + +fn LexBuf::advance(self : LexBuf, len : Int) -> Unit { + self.cursor += len +} + +fn LexBuf::get_stringview( + self : LexBuf, + start : Int, + end : Int, +) -> StringView { + self.buffer.view(start_offset=start, end_offset=end) +} + +fn scan(lexbuf : LexBuf) -> String { + lexscan lexbuf { + (re"^[a-z]+") as word => "word:\{word}" + re"^[0-9]+" => "int" + re"^ +" => scan(lexbuf) + _ => "other" + } +} + +fn main { + let lexbuf = LexBuf::{ buffer: "abc 123 ?!", cursor: 0 } + println(scan(lexbuf)) + println(scan(lexbuf)) + println(scan(lexbuf)) + println(scan(lexbuf)) + println(lexbuf.get_cursor()) +} diff --git a/test/sync_test/__snapshot__/pipeline_test_lexscan.mbt.tokens.json b/test/sync_test/__snapshot__/pipeline_test_lexscan.mbt.tokens.json new file mode 100644 index 00000000..39e2f3a1 --- /dev/null +++ b/test/sync_test/__snapshot__/pipeline_test_lexscan.mbt.tokens.json @@ -0,0 +1,1967 @@ +[ + { + "token": "STRUCT", + "loc": "1:1-1:7" + }, + { + "token": [ + "UIDENT", + "LexBuf" + ], + "loc": "1:8-1:14" + }, + { + "token": "LBRACE", + "loc": "1:15-1:16" + }, + { + "token": "NEWLINE", + "loc": "1:16-1:17" + }, + { + "token": [ + "LIDENT", + "buffer" + ], + "loc": "2:3-2:9" + }, + { + "token": "COLON", + "loc": "2:10-2:11" + }, + { + "token": [ + "UIDENT", + "String" + ], + "loc": "2:12-2:18" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "2:18-2:18" + }, + { + "token": "NEWLINE", + "loc": "2:18-2:19" + }, + { + "token": "MUTABLE", + "loc": "3:3-3:6" + }, + { + "token": [ + "LIDENT", + "cursor" + ], + "loc": "3:7-3:13" + }, + { + "token": "COLON", + "loc": "3:14-3:15" + }, + { + "token": [ + "UIDENT", + "Int" + ], + "loc": "3:16-3:19" + }, + { + "token": "NEWLINE", + "loc": "3:19-3:20" + }, + { + "token": "RBRACE", + "loc": "4:1-4:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "4:2-4:2" + }, + { + "token": "NEWLINE", + "loc": "4:2-4:3" + }, + { + "token": "NEWLINE", + "loc": "5:1-5:2" + }, + { + "token": "FN", + "loc": "6:1-6:3" + }, + { + "token": [ + "UIDENT", + "LexBuf" + ], + "loc": "6:4-6:10" + }, + { + "token": "COLONCOLON", + "loc": "6:10-6:12" + }, + { + "token": [ + "LIDENT", + "set_backup" + ], + "loc": "6:12-6:22" + }, + { + "token": "LPAREN", + "loc": "6:22-6:23" + }, + { + "token": [ + "LIDENT", + "_self" + ], + "loc": "6:23-6:28" + }, + { + "token": "COLON", + "loc": "6:29-6:30" + }, + { + "token": [ + "UIDENT", + "LexBuf" + ], + "loc": "6:31-6:37" + }, + { + "token": "RPAREN", + "loc": "6:37-6:38" + }, + { + "token": "THIN_ARROW", + "loc": "6:39-6:41" + }, + { + "token": [ + "UIDENT", + "Unit" + ], + "loc": "6:42-6:46" + }, + { + "token": "LBRACE", + "loc": "6:47-6:48" + }, + { + "token": "NEWLINE", + "loc": "6:48-6:49" + }, + { + "token": "LPAREN", + "loc": "7:3-7:4" + }, + { + "token": "RPAREN", + "loc": "7:4-7:5" + }, + { + "token": "NEWLINE", + "loc": "7:5-7:6" + }, + { + "token": "RBRACE", + "loc": "8:1-8:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "8:2-8:2" + }, + { + "token": "NEWLINE", + "loc": "8:2-8:3" + }, + { + "token": "NEWLINE", + "loc": "9:1-9:2" + }, + { + "token": "FN", + "loc": "10:1-10:3" + }, + { + "token": [ + "UIDENT", + "LexBuf" + ], + "loc": "10:4-10:10" + }, + { + "token": "COLONCOLON", + "loc": "10:10-10:12" + }, + { + "token": [ + "LIDENT", + "clear_backup" + ], + "loc": "10:12-10:24" + }, + { + "token": "LPAREN", + "loc": "10:24-10:25" + }, + { + "token": [ + "LIDENT", + "_self" + ], + "loc": "10:25-10:30" + }, + { + "token": "COLON", + "loc": "10:31-10:32" + }, + { + "token": [ + "UIDENT", + "LexBuf" + ], + "loc": "10:33-10:39" + }, + { + "token": "RPAREN", + "loc": "10:39-10:40" + }, + { + "token": "THIN_ARROW", + "loc": "10:41-10:43" + }, + { + "token": [ + "UIDENT", + "Unit" + ], + "loc": "10:44-10:48" + }, + { + "token": "LBRACE", + "loc": "10:49-10:50" + }, + { + "token": "NEWLINE", + "loc": "10:50-10:51" + }, + { + "token": "LPAREN", + "loc": "11:3-11:4" + }, + { + "token": "RPAREN", + "loc": "11:4-11:5" + }, + { + "token": "NEWLINE", + "loc": "11:5-11:6" + }, + { + "token": "RBRACE", + "loc": "12:1-12:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "12:2-12:2" + }, + { + "token": "NEWLINE", + "loc": "12:2-12:3" + }, + { + "token": "NEWLINE", + "loc": "13:1-13:2" + }, + { + "token": "FN", + "loc": "14:1-14:3" + }, + { + "token": [ + "UIDENT", + "LexBuf" + ], + "loc": "14:4-14:10" + }, + { + "token": "COLONCOLON", + "loc": "14:10-14:12" + }, + { + "token": [ + "LIDENT", + "refill" + ], + "loc": "14:12-14:18" + }, + { + "token": "LPAREN", + "loc": "14:18-14:19" + }, + { + "token": [ + "LIDENT", + "_self" + ], + "loc": "14:19-14:24" + }, + { + "token": "COLON", + "loc": "14:25-14:26" + }, + { + "token": [ + "UIDENT", + "LexBuf" + ], + "loc": "14:27-14:33" + }, + { + "token": "RPAREN", + "loc": "14:33-14:34" + }, + { + "token": "THIN_ARROW", + "loc": "14:35-14:37" + }, + { + "token": [ + "UIDENT", + "Unit" + ], + "loc": "14:38-14:42" + }, + { + "token": "LBRACE", + "loc": "14:43-14:44" + }, + { + "token": "NEWLINE", + "loc": "14:44-14:45" + }, + { + "token": "LPAREN", + "loc": "15:3-15:4" + }, + { + "token": "RPAREN", + "loc": "15:4-15:5" + }, + { + "token": "NEWLINE", + "loc": "15:5-15:6" + }, + { + "token": "RBRACE", + "loc": "16:1-16:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "16:2-16:2" + }, + { + "token": "NEWLINE", + "loc": "16:2-16:3" + }, + { + "token": "NEWLINE", + "loc": "17:1-17:2" + }, + { + "token": "FN", + "loc": "18:1-18:3" + }, + { + "token": [ + "UIDENT", + "LexBuf" + ], + "loc": "18:4-18:10" + }, + { + "token": "COLONCOLON", + "loc": "18:10-18:12" + }, + { + "token": [ + "LIDENT", + "eof_reached" + ], + "loc": "18:12-18:23" + }, + { + "token": "LPAREN", + "loc": "18:23-18:24" + }, + { + "token": [ + "LIDENT", + "self" + ], + "loc": "18:24-18:28" + }, + { + "token": "COLON", + "loc": "18:29-18:30" + }, + { + "token": [ + "UIDENT", + "LexBuf" + ], + "loc": "18:31-18:37" + }, + { + "token": "RPAREN", + "loc": "18:37-18:38" + }, + { + "token": "THIN_ARROW", + "loc": "18:39-18:41" + }, + { + "token": [ + "UIDENT", + "Bool" + ], + "loc": "18:42-18:46" + }, + { + "token": "LBRACE", + "loc": "18:47-18:48" + }, + { + "token": "NEWLINE", + "loc": "18:48-18:49" + }, + { + "token": [ + "LIDENT", + "self" + ], + "loc": "19:3-19:7" + }, + { + "token": [ + "DOT_LIDENT", + "cursor" + ], + "loc": "19:8-19:14" + }, + { + "token": [ + "INFIX1", + ">=" + ], + "loc": "19:15-19:17" + }, + { + "token": [ + "LIDENT", + "self" + ], + "loc": "19:18-19:22" + }, + { + "token": [ + "DOT_LIDENT", + "buffer" + ], + "loc": "19:23-19:29" + }, + { + "token": [ + "DOT_LIDENT", + "length" + ], + "loc": "19:30-19:36" + }, + { + "token": "LPAREN", + "loc": "19:36-19:37" + }, + { + "token": "RPAREN", + "loc": "19:37-19:38" + }, + { + "token": "NEWLINE", + "loc": "19:38-19:39" + }, + { + "token": "RBRACE", + "loc": "20:1-20:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "20:2-20:2" + }, + { + "token": "NEWLINE", + "loc": "20:2-20:3" + }, + { + "token": "NEWLINE", + "loc": "21:1-21:2" + }, + { + "token": "FN", + "loc": "22:1-22:3" + }, + { + "token": [ + "UIDENT", + "LexBuf" + ], + "loc": "22:4-22:10" + }, + { + "token": "COLONCOLON", + "loc": "22:10-22:12" + }, + { + "token": [ + "LIDENT", + "get_cursor" + ], + "loc": "22:12-22:22" + }, + { + "token": "LPAREN", + "loc": "22:22-22:23" + }, + { + "token": [ + "LIDENT", + "self" + ], + "loc": "22:23-22:27" + }, + { + "token": "COLON", + "loc": "22:28-22:29" + }, + { + "token": [ + "UIDENT", + "LexBuf" + ], + "loc": "22:30-22:36" + }, + { + "token": "RPAREN", + "loc": "22:36-22:37" + }, + { + "token": "THIN_ARROW", + "loc": "22:38-22:40" + }, + { + "token": [ + "UIDENT", + "Int" + ], + "loc": "22:41-22:44" + }, + { + "token": "LBRACE", + "loc": "22:45-22:46" + }, + { + "token": "NEWLINE", + "loc": "22:46-22:47" + }, + { + "token": [ + "LIDENT", + "self" + ], + "loc": "23:3-23:7" + }, + { + "token": [ + "DOT_LIDENT", + "cursor" + ], + "loc": "23:8-23:14" + }, + { + "token": "NEWLINE", + "loc": "23:14-23:15" + }, + { + "token": "RBRACE", + "loc": "24:1-24:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "24:2-24:2" + }, + { + "token": "NEWLINE", + "loc": "24:2-24:3" + }, + { + "token": "NEWLINE", + "loc": "25:1-25:2" + }, + { + "token": "FN", + "loc": "26:1-26:3" + }, + { + "token": [ + "UIDENT", + "LexBuf" + ], + "loc": "26:4-26:10" + }, + { + "token": "COLONCOLON", + "loc": "26:10-26:12" + }, + { + "token": [ + "LIDENT", + "buffer_end" + ], + "loc": "26:12-26:22" + }, + { + "token": "LPAREN", + "loc": "26:22-26:23" + }, + { + "token": [ + "LIDENT", + "self" + ], + "loc": "26:23-26:27" + }, + { + "token": "COLON", + "loc": "26:28-26:29" + }, + { + "token": [ + "UIDENT", + "LexBuf" + ], + "loc": "26:30-26:36" + }, + { + "token": "RPAREN", + "loc": "26:36-26:37" + }, + { + "token": "THIN_ARROW", + "loc": "26:38-26:40" + }, + { + "token": [ + "UIDENT", + "Int" + ], + "loc": "26:41-26:44" + }, + { + "token": "LBRACE", + "loc": "26:45-26:46" + }, + { + "token": "NEWLINE", + "loc": "26:46-26:47" + }, + { + "token": [ + "LIDENT", + "self" + ], + "loc": "27:3-27:7" + }, + { + "token": [ + "DOT_LIDENT", + "buffer" + ], + "loc": "27:8-27:14" + }, + { + "token": [ + "DOT_LIDENT", + "length" + ], + "loc": "27:15-27:21" + }, + { + "token": "LPAREN", + "loc": "27:21-27:22" + }, + { + "token": "RPAREN", + "loc": "27:22-27:23" + }, + { + "token": "NEWLINE", + "loc": "27:23-27:24" + }, + { + "token": "RBRACE", + "loc": "28:1-28:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "28:2-28:2" + }, + { + "token": "NEWLINE", + "loc": "28:2-28:3" + }, + { + "token": "NEWLINE", + "loc": "29:1-29:2" + }, + { + "token": "FN", + "loc": "30:1-30:3" + }, + { + "token": [ + "UIDENT", + "LexBuf" + ], + "loc": "30:4-30:10" + }, + { + "token": "COLONCOLON", + "loc": "30:10-30:12" + }, + { + "token": [ + "LIDENT", + "get_char" + ], + "loc": "30:12-30:20" + }, + { + "token": "LPAREN", + "loc": "30:20-30:21" + }, + { + "token": [ + "LIDENT", + "self" + ], + "loc": "30:21-30:25" + }, + { + "token": "COLON", + "loc": "30:26-30:27" + }, + { + "token": [ + "UIDENT", + "LexBuf" + ], + "loc": "30:28-30:34" + }, + { + "token": "COMMA", + "loc": "30:34-30:35" + }, + { + "token": [ + "LIDENT", + "pos" + ], + "loc": "30:36-30:39" + }, + { + "token": "COLON", + "loc": "30:40-30:41" + }, + { + "token": [ + "UIDENT", + "Int" + ], + "loc": "30:42-30:45" + }, + { + "token": "RPAREN", + "loc": "30:45-30:46" + }, + { + "token": "THIN_ARROW", + "loc": "30:47-30:49" + }, + { + "token": [ + "UIDENT", + "Int" + ], + "loc": "30:50-30:53" + }, + { + "token": "LBRACE", + "loc": "30:54-30:55" + }, + { + "token": "NEWLINE", + "loc": "30:55-30:56" + }, + { + "token": "IF", + "loc": "31:3-31:5" + }, + { + "token": [ + "LIDENT", + "pos" + ], + "loc": "31:6-31:9" + }, + { + "token": [ + "INFIX1", + "<" + ], + "loc": "31:10-31:11" + }, + { + "token": [ + "LIDENT", + "self" + ], + "loc": "31:12-31:16" + }, + { + "token": [ + "DOT_LIDENT", + "buffer" + ], + "loc": "31:17-31:23" + }, + { + "token": [ + "DOT_LIDENT", + "length" + ], + "loc": "31:24-31:30" + }, + { + "token": "LPAREN", + "loc": "31:30-31:31" + }, + { + "token": "RPAREN", + "loc": "31:31-31:32" + }, + { + "token": "LBRACE", + "loc": "31:33-31:34" + }, + { + "token": "NEWLINE", + "loc": "31:34-31:35" + }, + { + "token": [ + "LIDENT", + "self" + ], + "loc": "32:5-32:9" + }, + { + "token": [ + "DOT_LIDENT", + "buffer" + ], + "loc": "32:10-32:16" + }, + { + "token": [ + "DOT_LIDENT", + "unsafe_get" + ], + "loc": "32:17-32:27" + }, + { + "token": "LPAREN", + "loc": "32:27-32:28" + }, + { + "token": [ + "LIDENT", + "pos" + ], + "loc": "32:28-32:31" + }, + { + "token": "RPAREN", + "loc": "32:31-32:32" + }, + { + "token": [ + "DOT_LIDENT", + "to_int" + ], + "loc": "32:33-32:39" + }, + { + "token": "LPAREN", + "loc": "32:39-32:40" + }, + { + "token": "RPAREN", + "loc": "32:40-32:41" + }, + { + "token": "NEWLINE", + "loc": "32:41-32:42" + }, + { + "token": "RBRACE", + "loc": "33:3-33:4" + }, + { + "token": "ELSE", + "loc": "33:5-33:9" + }, + { + "token": "LBRACE", + "loc": "33:10-33:11" + }, + { + "token": "NEWLINE", + "loc": "33:11-33:12" + }, + { + "token": "MINUS", + "loc": "34:5-34:6" + }, + { + "token": [ + "INT", + "1" + ], + "loc": "34:6-34:7" + }, + { + "token": "NEWLINE", + "loc": "34:7-34:8" + }, + { + "token": "RBRACE", + "loc": "35:3-35:4" + }, + { + "token": "NEWLINE", + "loc": "35:4-35:5" + }, + { + "token": "RBRACE", + "loc": "36:1-36:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "36:2-36:2" + }, + { + "token": "NEWLINE", + "loc": "36:2-36:3" + }, + { + "token": "NEWLINE", + "loc": "37:1-37:2" + }, + { + "token": "FN", + "loc": "38:1-38:3" + }, + { + "token": [ + "UIDENT", + "LexBuf" + ], + "loc": "38:4-38:10" + }, + { + "token": "COLONCOLON", + "loc": "38:10-38:12" + }, + { + "token": [ + "LIDENT", + "advance" + ], + "loc": "38:12-38:19" + }, + { + "token": "LPAREN", + "loc": "38:19-38:20" + }, + { + "token": [ + "LIDENT", + "self" + ], + "loc": "38:20-38:24" + }, + { + "token": "COLON", + "loc": "38:25-38:26" + }, + { + "token": [ + "UIDENT", + "LexBuf" + ], + "loc": "38:27-38:33" + }, + { + "token": "COMMA", + "loc": "38:33-38:34" + }, + { + "token": [ + "LIDENT", + "len" + ], + "loc": "38:35-38:38" + }, + { + "token": "COLON", + "loc": "38:39-38:40" + }, + { + "token": [ + "UIDENT", + "Int" + ], + "loc": "38:41-38:44" + }, + { + "token": "RPAREN", + "loc": "38:44-38:45" + }, + { + "token": "THIN_ARROW", + "loc": "38:46-38:48" + }, + { + "token": [ + "UIDENT", + "Unit" + ], + "loc": "38:49-38:53" + }, + { + "token": "LBRACE", + "loc": "38:54-38:55" + }, + { + "token": "NEWLINE", + "loc": "38:55-38:56" + }, + { + "token": [ + "LIDENT", + "self" + ], + "loc": "39:3-39:7" + }, + { + "token": [ + "DOT_LIDENT", + "cursor" + ], + "loc": "39:8-39:14" + }, + { + "token": "PLUS_EQUAL", + "loc": "39:15-39:17" + }, + { + "token": [ + "LIDENT", + "len" + ], + "loc": "39:18-39:21" + }, + { + "token": "NEWLINE", + "loc": "39:21-39:22" + }, + { + "token": "RBRACE", + "loc": "40:1-40:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "40:2-40:2" + }, + { + "token": "NEWLINE", + "loc": "40:2-40:3" + }, + { + "token": "NEWLINE", + "loc": "41:1-41:2" + }, + { + "token": "FN", + "loc": "42:1-42:3" + }, + { + "token": [ + "UIDENT", + "LexBuf" + ], + "loc": "42:4-42:10" + }, + { + "token": "COLONCOLON", + "loc": "42:10-42:12" + }, + { + "token": [ + "LIDENT", + "get_stringview" + ], + "loc": "42:12-42:26" + }, + { + "token": "LPAREN", + "loc": "42:26-42:27" + }, + { + "token": "NEWLINE", + "loc": "42:27-42:28" + }, + { + "token": [ + "LIDENT", + "self" + ], + "loc": "43:3-43:7" + }, + { + "token": "COLON", + "loc": "43:8-43:9" + }, + { + "token": [ + "UIDENT", + "LexBuf" + ], + "loc": "43:10-43:16" + }, + { + "token": "COMMA", + "loc": "43:16-43:17" + }, + { + "token": "NEWLINE", + "loc": "43:17-43:18" + }, + { + "token": [ + "LIDENT", + "start" + ], + "loc": "44:3-44:8" + }, + { + "token": "COLON", + "loc": "44:9-44:10" + }, + { + "token": [ + "UIDENT", + "Int" + ], + "loc": "44:11-44:14" + }, + { + "token": "COMMA", + "loc": "44:14-44:15" + }, + { + "token": "NEWLINE", + "loc": "44:15-44:16" + }, + { + "token": [ + "LIDENT", + "end" + ], + "loc": "45:3-45:6" + }, + { + "token": "COLON", + "loc": "45:7-45:8" + }, + { + "token": [ + "UIDENT", + "Int" + ], + "loc": "45:9-45:12" + }, + { + "token": "COMMA", + "loc": "45:12-45:13" + }, + { + "token": "NEWLINE", + "loc": "45:13-45:14" + }, + { + "token": "RPAREN", + "loc": "46:1-46:2" + }, + { + "token": "THIN_ARROW", + "loc": "46:3-46:5" + }, + { + "token": [ + "UIDENT", + "StringView" + ], + "loc": "46:6-46:16" + }, + { + "token": "LBRACE", + "loc": "46:17-46:18" + }, + { + "token": "NEWLINE", + "loc": "46:18-46:19" + }, + { + "token": [ + "LIDENT", + "self" + ], + "loc": "47:3-47:7" + }, + { + "token": [ + "DOT_LIDENT", + "buffer" + ], + "loc": "47:8-47:14" + }, + { + "token": [ + "DOT_LIDENT", + "view" + ], + "loc": "47:15-47:19" + }, + { + "token": "LPAREN", + "loc": "47:19-47:20" + }, + { + "token": [ + "LIDENT", + "start_offset" + ], + "loc": "47:20-47:32" + }, + { + "token": "EQUAL", + "loc": "47:32-47:33" + }, + { + "token": [ + "LIDENT", + "start" + ], + "loc": "47:33-47:38" + }, + { + "token": "COMMA", + "loc": "47:38-47:39" + }, + { + "token": [ + "LIDENT", + "end_offset" + ], + "loc": "47:40-47:50" + }, + { + "token": "EQUAL", + "loc": "47:50-47:51" + }, + { + "token": [ + "LIDENT", + "end" + ], + "loc": "47:51-47:54" + }, + { + "token": "RPAREN", + "loc": "47:54-47:55" + }, + { + "token": "NEWLINE", + "loc": "47:55-47:56" + }, + { + "token": "RBRACE", + "loc": "48:1-48:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "48:2-48:2" + }, + { + "token": "NEWLINE", + "loc": "48:2-48:3" + }, + { + "token": "NEWLINE", + "loc": "49:1-49:2" + }, + { + "token": "FN", + "loc": "50:1-50:3" + }, + { + "token": [ + "LIDENT", + "scan" + ], + "loc": "50:4-50:8" + }, + { + "token": "LPAREN", + "loc": "50:8-50:9" + }, + { + "token": [ + "LIDENT", + "lexbuf" + ], + "loc": "50:9-50:15" + }, + { + "token": "COLON", + "loc": "50:16-50:17" + }, + { + "token": [ + "UIDENT", + "LexBuf" + ], + "loc": "50:18-50:24" + }, + { + "token": "RPAREN", + "loc": "50:24-50:25" + }, + { + "token": "THIN_ARROW", + "loc": "50:26-50:28" + }, + { + "token": [ + "UIDENT", + "String" + ], + "loc": "50:29-50:35" + }, + { + "token": "LBRACE", + "loc": "50:36-50:37" + }, + { + "token": "NEWLINE", + "loc": "50:37-50:38" + }, + { + "token": "LEXSCAN", + "loc": "51:3-51:10" + }, + { + "token": [ + "LIDENT", + "lexbuf" + ], + "loc": "51:11-51:17" + }, + { + "token": "LBRACE", + "loc": "51:18-51:19" + }, + { + "token": "NEWLINE", + "loc": "51:19-51:20" + }, + { + "token": "LPAREN", + "loc": "52:5-52:6" + }, + { + "token": [ + "REGEX_LITERAL", + "^[a-z]+" + ], + "loc": "52:6-52:17" + }, + { + "token": "RPAREN", + "loc": "52:17-52:18" + }, + { + "token": "AS", + "loc": "52:19-52:21" + }, + { + "token": [ + "LIDENT", + "word" + ], + "loc": "52:22-52:26" + }, + { + "token": "FAT_ARROW", + "loc": "52:27-52:29" + }, + { + "token": [ + "INTERP", + "\"word:\\{word}\"" + ], + "loc": "52:30-52:44" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "52:44-52:44" + }, + { + "token": "NEWLINE", + "loc": "52:44-52:45" + }, + { + "token": [ + "REGEX_LITERAL", + "^[0-9]+" + ], + "loc": "53:5-53:16" + }, + { + "token": "FAT_ARROW", + "loc": "53:17-53:19" + }, + { + "token": [ + "STRING", + "int" + ], + "loc": "53:20-53:25" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "53:25-53:25" + }, + { + "token": "NEWLINE", + "loc": "53:25-53:26" + }, + { + "token": [ + "REGEX_LITERAL", + "^ +" + ], + "loc": "54:5-54:12" + }, + { + "token": "FAT_ARROW", + "loc": "54:13-54:15" + }, + { + "token": [ + "LIDENT", + "scan" + ], + "loc": "54:16-54:20" + }, + { + "token": "LPAREN", + "loc": "54:20-54:21" + }, + { + "token": [ + "LIDENT", + "lexbuf" + ], + "loc": "54:21-54:27" + }, + { + "token": "RPAREN", + "loc": "54:27-54:28" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "54:28-54:28" + }, + { + "token": "NEWLINE", + "loc": "54:28-54:29" + }, + { + "token": "UNDERSCORE", + "loc": "55:5-55:6" + }, + { + "token": "FAT_ARROW", + "loc": "55:7-55:9" + }, + { + "token": [ + "STRING", + "other" + ], + "loc": "55:10-55:17" + }, + { + "token": "NEWLINE", + "loc": "55:17-55:18" + }, + { + "token": "RBRACE", + "loc": "56:3-56:4" + }, + { + "token": "NEWLINE", + "loc": "56:4-56:5" + }, + { + "token": "RBRACE", + "loc": "57:1-57:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "57:2-57:2" + }, + { + "token": "NEWLINE", + "loc": "57:2-57:3" + }, + { + "token": "NEWLINE", + "loc": "58:1-58:2" + }, + { + "token": "FN", + "loc": "59:1-59:3" + }, + { + "token": [ + "LIDENT", + "main" + ], + "loc": "59:4-59:8" + }, + { + "token": "LBRACE", + "loc": "59:9-59:10" + }, + { + "token": "NEWLINE", + "loc": "59:10-59:11" + }, + { + "token": "LET", + "loc": "60:3-60:6" + }, + { + "token": [ + "LIDENT", + "lexbuf" + ], + "loc": "60:7-60:13" + }, + { + "token": "EQUAL", + "loc": "60:14-60:15" + }, + { + "token": [ + "UIDENT", + "LexBuf" + ], + "loc": "60:16-60:22" + }, + { + "token": "COLONCOLON", + "loc": "60:22-60:24" + }, + { + "token": "LBRACE", + "loc": "60:24-60:25" + }, + { + "token": [ + "LIDENT", + "buffer" + ], + "loc": "60:26-60:32" + }, + { + "token": "COLON", + "loc": "60:32-60:33" + }, + { + "token": [ + "STRING", + "abc 123 ?!" + ], + "loc": "60:34-60:46" + }, + { + "token": "COMMA", + "loc": "60:46-60:47" + }, + { + "token": [ + "LIDENT", + "cursor" + ], + "loc": "60:48-60:54" + }, + { + "token": "COLON", + "loc": "60:54-60:55" + }, + { + "token": [ + "INT", + "0" + ], + "loc": "60:56-60:57" + }, + { + "token": "RBRACE", + "loc": "60:58-60:59" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "60:59-60:59" + }, + { + "token": "NEWLINE", + "loc": "60:59-60:60" + }, + { + "token": [ + "LIDENT", + "println" + ], + "loc": "61:3-61:10" + }, + { + "token": "LPAREN", + "loc": "61:10-61:11" + }, + { + "token": [ + "LIDENT", + "scan" + ], + "loc": "61:11-61:15" + }, + { + "token": "LPAREN", + "loc": "61:15-61:16" + }, + { + "token": [ + "LIDENT", + "lexbuf" + ], + "loc": "61:16-61:22" + }, + { + "token": "RPAREN", + "loc": "61:22-61:23" + }, + { + "token": "RPAREN", + "loc": "61:23-61:24" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "61:24-61:24" + }, + { + "token": "NEWLINE", + "loc": "61:24-61:25" + }, + { + "token": [ + "LIDENT", + "println" + ], + "loc": "62:3-62:10" + }, + { + "token": "LPAREN", + "loc": "62:10-62:11" + }, + { + "token": [ + "LIDENT", + "scan" + ], + "loc": "62:11-62:15" + }, + { + "token": "LPAREN", + "loc": "62:15-62:16" + }, + { + "token": [ + "LIDENT", + "lexbuf" + ], + "loc": "62:16-62:22" + }, + { + "token": "RPAREN", + "loc": "62:22-62:23" + }, + { + "token": "RPAREN", + "loc": "62:23-62:24" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "62:24-62:24" + }, + { + "token": "NEWLINE", + "loc": "62:24-62:25" + }, + { + "token": [ + "LIDENT", + "println" + ], + "loc": "63:3-63:10" + }, + { + "token": "LPAREN", + "loc": "63:10-63:11" + }, + { + "token": [ + "LIDENT", + "scan" + ], + "loc": "63:11-63:15" + }, + { + "token": "LPAREN", + "loc": "63:15-63:16" + }, + { + "token": [ + "LIDENT", + "lexbuf" + ], + "loc": "63:16-63:22" + }, + { + "token": "RPAREN", + "loc": "63:22-63:23" + }, + { + "token": "RPAREN", + "loc": "63:23-63:24" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "63:24-63:24" + }, + { + "token": "NEWLINE", + "loc": "63:24-63:25" + }, + { + "token": [ + "LIDENT", + "println" + ], + "loc": "64:3-64:10" + }, + { + "token": "LPAREN", + "loc": "64:10-64:11" + }, + { + "token": [ + "LIDENT", + "scan" + ], + "loc": "64:11-64:15" + }, + { + "token": "LPAREN", + "loc": "64:15-64:16" + }, + { + "token": [ + "LIDENT", + "lexbuf" + ], + "loc": "64:16-64:22" + }, + { + "token": "RPAREN", + "loc": "64:22-64:23" + }, + { + "token": "RPAREN", + "loc": "64:23-64:24" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "64:24-64:24" + }, + { + "token": "NEWLINE", + "loc": "64:24-64:25" + }, + { + "token": [ + "LIDENT", + "println" + ], + "loc": "65:3-65:10" + }, + { + "token": "LPAREN", + "loc": "65:10-65:11" + }, + { + "token": [ + "LIDENT", + "lexbuf" + ], + "loc": "65:11-65:17" + }, + { + "token": [ + "DOT_LIDENT", + "get_cursor" + ], + "loc": "65:18-65:28" + }, + { + "token": "LPAREN", + "loc": "65:28-65:29" + }, + { + "token": "RPAREN", + "loc": "65:29-65:30" + }, + { + "token": "RPAREN", + "loc": "65:30-65:31" + }, + { + "token": "NEWLINE", + "loc": "65:31-65:32" + }, + { + "token": "RBRACE", + "loc": "66:1-66:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "66:2-66:2" + }, + { + "token": "NEWLINE", + "loc": "66:2-66:3" + }, + { + "token": "EOF", + "loc": "67:1-67:1" + } +] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/pipeline_test_lexscan_async.json b/test/sync_test/__snapshot__/pipeline_test_lexscan_async.json new file mode 100644 index 00000000..f93eb3e8 --- /dev/null +++ b/test/sync_test/__snapshot__/pipeline_test_lexscan_async.json @@ -0,0 +1,5142 @@ +[ + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "suspend" + } + }, + "has_error": null, + "is_async": { + "kind": "Async", + "loc": null, + "children": {} + }, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "f" + } + }, + "ty": { + "kind": "Type::Arrow", + "loc": null, + "children": { + "args": { + "kind": "Type::Arrow::ArgList", + "loc": null, + "children": [ + { + "kind": "Type::Arrow", + "loc": null, + "children": { + "args": { + "kind": "Type::Arrow::ArgList", + "loc": null, + "children": [ + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "T" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + ] + }, + "res": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Unit" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "err": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "is_async": null + } + } + ] + }, + "res": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Unit" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "err": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "is_async": null + } + } + } + } + ] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [ + { + "kind": "TypeVarBinder", + "loc": null, + "children": { + "name": "T", + "constraints": { + "kind": "TypeVarBinder::TypeVarConstraintList", + "loc": null, + "children": [] + } + } + } + ] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "T" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "error_type": { + "kind": "ErrorType::Noraise", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclStubs", + "loc": null, + "children": { + "value": { + "kind": "FuncStubs::Embedded", + "loc": null, + "children": { + "language": null, + "code": { + "kind": "EmbeddedCode::CodeString", + "loc": null, + "children": { + "value": "%async.suspend" + } + } + } + } + } + } + } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "run_async" + } + }, + "has_error": null, + "is_async": null, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "f" + } + }, + "ty": { + "kind": "Type::Arrow", + "loc": null, + "children": { + "args": { + "kind": "Type::Arrow::ArgList", + "loc": null, + "children": [] + }, + "res": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Unit" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "err": { + "kind": "ErrorType::Noraise", + "loc": null, + "children": {} + }, + "is_async": { + "kind": "Async", + "loc": null, + "children": {} + } + } + } + } + } + ] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Unit" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclStubs", + "loc": null, + "children": { + "value": { + "kind": "FuncStubs::Embedded", + "loc": null, + "children": { + "language": null, + "code": { + "kind": "EmbeddedCode::CodeString", + "loc": null, + "children": { + "value": "%async.run" + } + } + } + } + } + } + } + }, + { + "kind": "Impl::TopTypeDef", + "loc": null, + "children": { + "value": { + "kind": "TypeDecl", + "loc": null, + "children": { + "tycon": "LexBuf", + "params": { + "kind": "TypeDecl::ParamList", + "loc": null, + "children": [] + }, + "components": { + "kind": "TypeDesc::Record", + "loc": null, + "children": { + "value": { + "kind": "TypeDesc::Record::FieldList", + "loc": null, + "children": [ + { + "kind": "FieldDecl", + "loc": null, + "children": { + "name": { + "kind": "FieldName", + "loc": null, + "children": { + "label": "chunks" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "FixedArray" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [ + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "String" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + ] + } + } + }, + "mut": false, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FieldDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + { + "kind": "FieldDecl", + "loc": null, + "children": { + "name": { + "kind": "FieldName", + "loc": null, + "children": { + "label": "chunk_index" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Int" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "mut": true, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FieldDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + { + "kind": "FieldDecl", + "loc": null, + "children": { + "name": { + "kind": "FieldName", + "loc": null, + "children": { + "label": "buffer" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "String" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "mut": true, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FieldDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + { + "kind": "FieldDecl", + "loc": null, + "children": { + "name": { + "kind": "FieldName", + "loc": null, + "children": { + "label": "cursor" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Int" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "mut": true, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FieldDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + { + "kind": "FieldDecl", + "loc": null, + "children": { + "name": { + "kind": "FieldName", + "loc": null, + "children": { + "label": "clear_count" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Int" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "mut": true, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FieldDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + { + "kind": "FieldDecl", + "loc": null, + "children": { + "name": { + "kind": "FieldName", + "loc": null, + "children": { + "label": "refill_count" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Int" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "mut": true, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FieldDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + { + "kind": "FieldDecl", + "loc": null, + "children": { + "name": { + "kind": "FieldName", + "loc": null, + "children": { + "label": "backup_alive" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Bool" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "mut": true, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FieldDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + } + ] + } + } + }, + "attrs": { + "kind": "TypeDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "", + "type_vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "is_declare": false, + "deriving": { + "kind": "TypeDecl::DerivingList", + "loc": null, + "children": [] + } + } + } + } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "pause" + } + }, + "has_error": null, + "is_async": { + "kind": "Async", + "loc": null, + "children": {} + }, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Unit" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "error_type": { + "kind": "ErrorType::Noraise", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "suspend" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Function", + "loc": null, + "children": { + "func": { + "kind": "Func::Lambda", + "loc": null, + "children": { + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "k" + } + }, + "ty": null + } + } + ] + }, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "k" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Unit", + "loc": null, + "children": { + "faked": false + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "LexBuf" + } + }, + "is_object": false + } + }, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "refill" + } + }, + "has_error": null, + "is_async": { + "kind": "Async", + "loc": null, + "children": {} + }, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "self" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "LexBuf" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + } + ] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Unit" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "error_type": { + "kind": "ErrorType::Noraise", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [ + { + "kind": "Attribute", + "loc": null, + "children": { + "raw": "#inline(never)" + } + } + ] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::Sequence", + "loc": null, + "children": { + "exprs": { + "kind": "Expr::Sequence::ExprList", + "loc": null, + "children": [ + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "pause" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + ] + }, + "last_expr": { + "kind": "Expr::If", + "loc": null, + "children": { + "cond": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "<" + } + } + } + }, + "lhs": { + "kind": "Expr::Field", + "loc": null, + "children": { + "record": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "self" + } + } + } + } + } + }, + "accessor": { + "kind": "Accessor::Label", + "loc": null, + "children": { + "value": { + "kind": "Label", + "loc": null, + "children": { + "name": "chunk_index" + } + } + } + } + } + }, + "rhs": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Field", + "loc": null, + "children": { + "record": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "self" + } + } + } + } + } + }, + "accessor": { + "kind": "Accessor::Label", + "loc": null, + "children": { + "value": { + "kind": "Label", + "loc": null, + "children": { + "name": "chunks" + } + } + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "length" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + }, + "ifso": { + "kind": "Expr::Sequence", + "loc": null, + "children": { + "exprs": { + "kind": "Expr::Sequence::ExprList", + "loc": null, + "children": [ + { + "kind": "Expr::Mutate", + "loc": null, + "children": { + "record": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "self" + } + } + } + } + } + }, + "accessor": { + "kind": "Accessor::Label", + "loc": null, + "children": { + "value": { + "kind": "Label", + "loc": null, + "children": { + "name": "buffer" + } + } + } + }, + "field": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "+" + } + } + } + }, + "lhs": { + "kind": "Expr::Field", + "loc": null, + "children": { + "record": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "self" + } + } + } + } + } + }, + "accessor": { + "kind": "Accessor::Label", + "loc": null, + "children": { + "value": { + "kind": "Label", + "loc": null, + "children": { + "name": "buffer" + } + } + } + } + } + }, + "rhs": { + "kind": "Expr::ArrayGet", + "loc": null, + "children": { + "array": { + "kind": "Expr::Field", + "loc": null, + "children": { + "record": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "self" + } + } + } + } + } + }, + "accessor": { + "kind": "Accessor::Label", + "loc": null, + "children": { + "value": { + "kind": "Label", + "loc": null, + "children": { + "name": "chunks" + } + } + } + } + } + }, + "index": { + "kind": "Expr::Field", + "loc": null, + "children": { + "record": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "self" + } + } + } + } + } + }, + "accessor": { + "kind": "Accessor::Label", + "loc": null, + "children": { + "value": { + "kind": "Label", + "loc": null, + "children": { + "name": "chunk_index" + } + } + } + } + } + } + } + } + } + }, + "augmented_by": null + } + }, + { + "kind": "Expr::Mutate", + "loc": null, + "children": { + "record": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "self" + } + } + } + } + } + }, + "accessor": { + "kind": "Accessor::Label", + "loc": null, + "children": { + "value": { + "kind": "Label", + "loc": null, + "children": { + "name": "chunk_index" + } + } + } + }, + "field": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "1" + } + } + } + }, + "augmented_by": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "+" + } + } + } + } + } + } + ] + }, + "last_expr": { + "kind": "Expr::Mutate", + "loc": null, + "children": { + "record": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "self" + } + } + } + } + } + }, + "accessor": { + "kind": "Accessor::Label", + "loc": null, + "children": { + "value": { + "kind": "Label", + "loc": null, + "children": { + "name": "refill_count" + } + } + } + }, + "field": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "1" + } + } + } + }, + "augmented_by": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "+" + } + } + } + } + } + } + } + }, + "ifnot": null + } + } + } + } + } + } + } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "LexBuf" + } + }, + "is_object": false + } + }, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "eof_reached" + } + }, + "has_error": null, + "is_async": null, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "self" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "LexBuf" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + } + ] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Bool" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [ + { + "kind": "Attribute", + "loc": null, + "children": { + "raw": "#inline(never)" + } + } + ] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "&&" + } + } + } + }, + "lhs": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": ">=" + } + } + } + }, + "lhs": { + "kind": "Expr::Field", + "loc": null, + "children": { + "record": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "self" + } + } + } + } + } + }, + "accessor": { + "kind": "Accessor::Label", + "loc": null, + "children": { + "value": { + "kind": "Label", + "loc": null, + "children": { + "name": "chunk_index" + } + } + } + } + } + }, + "rhs": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Field", + "loc": null, + "children": { + "record": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "self" + } + } + } + } + } + }, + "accessor": { + "kind": "Accessor::Label", + "loc": null, + "children": { + "value": { + "kind": "Label", + "loc": null, + "children": { + "name": "chunks" + } + } + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "length" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + }, + "rhs": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": ">=" + } + } + } + }, + "lhs": { + "kind": "Expr::Field", + "loc": null, + "children": { + "record": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "self" + } + } + } + } + } + }, + "accessor": { + "kind": "Accessor::Label", + "loc": null, + "children": { + "value": { + "kind": "Label", + "loc": null, + "children": { + "name": "cursor" + } + } + } + } + } + }, + "rhs": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Field", + "loc": null, + "children": { + "record": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "self" + } + } + } + } + } + }, + "accessor": { + "kind": "Accessor::Label", + "loc": null, + "children": { + "value": { + "kind": "Label", + "loc": null, + "children": { + "name": "buffer" + } + } + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "length" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + } + } + } + } + } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "LexBuf" + } + }, + "is_object": false + } + }, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "set_backup" + } + }, + "has_error": null, + "is_async": null, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "self" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "LexBuf" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + } + ] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Unit" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [ + { + "kind": "Attribute", + "loc": null, + "children": { + "raw": "#inline(never)" + } + } + ] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::Mutate", + "loc": null, + "children": { + "record": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "self" + } + } + } + } + } + }, + "accessor": { + "kind": "Accessor::Label", + "loc": null, + "children": { + "value": { + "kind": "Label", + "loc": null, + "children": { + "name": "backup_alive" + } + } + } + }, + "field": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Bool", + "loc": null, + "children": { + "value": true + } + } + } + }, + "augmented_by": null + } + } + } + } + } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "LexBuf" + } + }, + "is_object": false + } + }, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "clear_backup" + } + }, + "has_error": null, + "is_async": { + "kind": "Async", + "loc": null, + "children": {} + }, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "self" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "LexBuf" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + } + ] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Unit" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "error_type": { + "kind": "ErrorType::Noraise", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [ + { + "kind": "Attribute", + "loc": null, + "children": { + "raw": "#inline(never)" + } + } + ] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::Sequence", + "loc": null, + "children": { + "exprs": { + "kind": "Expr::Sequence::ExprList", + "loc": null, + "children": [ + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "pause" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::Mutate", + "loc": null, + "children": { + "record": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "self" + } + } + } + } + } + }, + "accessor": { + "kind": "Accessor::Label", + "loc": null, + "children": { + "value": { + "kind": "Label", + "loc": null, + "children": { + "name": "clear_count" + } + } + } + }, + "field": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "1" + } + } + } + }, + "augmented_by": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "+" + } + } + } + } + } + } + ] + }, + "last_expr": { + "kind": "Expr::Mutate", + "loc": null, + "children": { + "record": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "self" + } + } + } + } + } + }, + "accessor": { + "kind": "Accessor::Label", + "loc": null, + "children": { + "value": { + "kind": "Label", + "loc": null, + "children": { + "name": "backup_alive" + } + } + } + }, + "field": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Bool", + "loc": null, + "children": { + "value": false + } + } + } + }, + "augmented_by": null + } + } + } + } + } + } + } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "LexBuf" + } + }, + "is_object": false + } + }, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "get_cursor" + } + }, + "has_error": null, + "is_async": null, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "self" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "LexBuf" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + } + ] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Int" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [ + { + "kind": "Attribute", + "loc": null, + "children": { + "raw": "#inline(never)" + } + } + ] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::Field", + "loc": null, + "children": { + "record": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "self" + } + } + } + } + } + }, + "accessor": { + "kind": "Accessor::Label", + "loc": null, + "children": { + "value": { + "kind": "Label", + "loc": null, + "children": { + "name": "cursor" + } + } + } + } + } + } + } + } + } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "LexBuf" + } + }, + "is_object": false + } + }, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "buffer_end" + } + }, + "has_error": null, + "is_async": null, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "self" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "LexBuf" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + } + ] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Int" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [ + { + "kind": "Attribute", + "loc": null, + "children": { + "raw": "#inline(never)" + } + } + ] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Field", + "loc": null, + "children": { + "record": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "self" + } + } + } + } + } + }, + "accessor": { + "kind": "Accessor::Label", + "loc": null, + "children": { + "value": { + "kind": "Label", + "loc": null, + "children": { + "name": "buffer" + } + } + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "length" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "LexBuf" + } + }, + "is_object": false + } + }, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "get_char" + } + }, + "has_error": null, + "is_async": null, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "self" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "LexBuf" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "pos" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Int" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + } + ] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Int" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [ + { + "kind": "Attribute", + "loc": null, + "children": { + "raw": "#inline(never)" + } + } + ] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::If", + "loc": null, + "children": { + "cond": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "<" + } + } + } + }, + "lhs": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "pos" + } + } + } + } + } + }, + "rhs": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Field", + "loc": null, + "children": { + "record": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "self" + } + } + } + } + } + }, + "accessor": { + "kind": "Accessor::Label", + "loc": null, + "children": { + "value": { + "kind": "Label", + "loc": null, + "children": { + "name": "buffer" + } + } + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "length" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + }, + "ifso": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Field", + "loc": null, + "children": { + "record": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "self" + } + } + } + } + } + }, + "accessor": { + "kind": "Accessor::Label", + "loc": null, + "children": { + "value": { + "kind": "Label", + "loc": null, + "children": { + "name": "buffer" + } + } + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "unsafe_get" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "pos" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "to_int" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "ifnot": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "-1" + } + } + } + } + } + } + } + } + } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "LexBuf" + } + }, + "is_object": false + } + }, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "advance" + } + }, + "has_error": null, + "is_async": null, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "self" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "LexBuf" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "len" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Int" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + } + ] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Unit" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [ + { + "kind": "Attribute", + "loc": null, + "children": { + "raw": "#inline(never)" + } + } + ] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::Mutate", + "loc": null, + "children": { + "record": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "self" + } + } + } + } + } + }, + "accessor": { + "kind": "Accessor::Label", + "loc": null, + "children": { + "value": { + "kind": "Label", + "loc": null, + "children": { + "name": "cursor" + } + } + } + }, + "field": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "len" + } + } + } + } + } + }, + "augmented_by": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "+" + } + } + } + } + } + } + } + } + } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "LexBuf" + } + }, + "is_object": false + } + }, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "get_stringview" + } + }, + "has_error": null, + "is_async": null, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "self" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "LexBuf" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "start" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Int" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "end" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Int" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + } + ] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "StringView" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [ + { + "kind": "Attribute", + "loc": null, + "children": { + "raw": "#inline(never)" + } + } + ] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::If", + "loc": null, + "children": { + "cond": { + "kind": "Expr::Field", + "loc": null, + "children": { + "record": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "self" + } + } + } + } + } + }, + "accessor": { + "kind": "Accessor::Label", + "loc": null, + "children": { + "value": { + "kind": "Label", + "loc": null, + "children": { + "name": "backup_alive" + } + } + } + } + } + }, + "ifso": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Field", + "loc": null, + "children": { + "record": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "self" + } + } + } + } + } + }, + "accessor": { + "kind": "Accessor::Label", + "loc": null, + "children": { + "value": { + "kind": "Label", + "loc": null, + "children": { + "name": "buffer" + } + } + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "view" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "start" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Labelled", + "loc": null, + "children": { + "value": { + "kind": "Label", + "loc": null, + "children": { + "name": "start_offset" + } + } + } + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "end" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Labelled", + "loc": null, + "children": { + "value": { + "kind": "Label", + "loc": null, + "children": { + "name": "end_offset" + } + } + } + } + } + } + ] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "ifnot": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "lost" + } + } + } + } + } + } + } + } + } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "scan" + } + }, + "has_error": null, + "is_async": { + "kind": "Async", + "loc": null, + "children": {} + }, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "lexbuf" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "LexBuf" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + } + ] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "String" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "error_type": { + "kind": "ErrorType::Noraise", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::Lexscan", + "loc": null, + "children": { + "expr": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "lexbuf" + } + } + } + } + } + }, + "cases": { + "kind": "Expr::Lexscan::CaseList", + "loc": null, + "children": [ + { + "kind": "LexscanCase", + "loc": null, + "children": { + "pat": { + "kind": "LexscanCasePattern::Pattern", + "loc": null, + "children": { + "value": { + "kind": "RegexPattern::Alias", + "loc": null, + "children": { + "pat": { + "kind": "RegexPattern::Literal", + "loc": null, + "children": { + "lit": "^[a-z]+" + } + }, + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "word" + } + } + } + } + } + }, + "guard": null, + "body": { + "kind": "Expr::Interp", + "loc": null, + "children": { + "elems": { + "kind": "Expr::Interp::ElemList", + "loc": null, + "children": [ + { + "kind": "InterpElem::Literal", + "loc": null, + "children": { + "repr": "word:" + } + }, + { + "kind": "InterpElem::Source", + "loc": null, + "children": { + "source": "word" + } + }, + { + "kind": "InterpElem::Literal", + "loc": null, + "children": { + "repr": ":alive=" + } + }, + { + "kind": "InterpElem::Source", + "loc": null, + "children": { + "source": "lexbuf.backup_alive" + } + } + ] + } + } + } + } + }, + { + "kind": "LexscanCase", + "loc": null, + "children": { + "pat": { + "kind": "LexscanCasePattern::Wildcard", + "loc": null, + "children": {} + }, + "guard": null, + "body": { + "kind": "Expr::Interp", + "loc": null, + "children": { + "elems": { + "kind": "Expr::Interp::ElemList", + "loc": null, + "children": [ + { + "kind": "InterpElem::Literal", + "loc": null, + "children": { + "repr": "token:alive=" + } + }, + { + "kind": "InterpElem::Source", + "loc": null, + "children": { + "source": "lexbuf.backup_alive" + } + } + ] + } + } + } + } + } + ] + } + } + } + } + } + } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "main" + } + }, + "has_error": null, + "is_async": null, + "decl_params": null, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [] + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::Let", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "lexbuf" + } + } + } + }, + "expr": { + "kind": "Expr::Record", + "loc": null, + "children": { + "type_name": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "LexBuf" + } + }, + "is_object": false + } + }, + "fields": { + "kind": "Expr::Record::FieldList", + "loc": null, + "children": [ + { + "kind": "FieldDef", + "loc": null, + "children": { + "label": { + "kind": "Label", + "loc": null, + "children": { + "name": "chunks" + } + }, + "expr": { + "kind": "Expr::Array", + "loc": null, + "children": { + "exprs": { + "kind": "Expr::Array::ExprList", + "loc": null, + "children": [ + { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "ab" + } + } + } + }, + { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "cd" + } + } + } + }, + { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "!" + } + } + } + } + ] + }, + "is_iter": false + } + }, + "is_pun": false + } + }, + { + "kind": "FieldDef", + "loc": null, + "children": { + "label": { + "kind": "Label", + "loc": null, + "children": { + "name": "chunk_index" + } + }, + "expr": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "0" + } + } + } + }, + "is_pun": false + } + }, + { + "kind": "FieldDef", + "loc": null, + "children": { + "label": { + "kind": "Label", + "loc": null, + "children": { + "name": "buffer" + } + }, + "expr": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "" + } + } + } + }, + "is_pun": false + } + }, + { + "kind": "FieldDef", + "loc": null, + "children": { + "label": { + "kind": "Label", + "loc": null, + "children": { + "name": "cursor" + } + }, + "expr": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "0" + } + } + } + }, + "is_pun": false + } + }, + { + "kind": "FieldDef", + "loc": null, + "children": { + "label": { + "kind": "Label", + "loc": null, + "children": { + "name": "clear_count" + } + }, + "expr": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "0" + } + } + } + }, + "is_pun": false + } + }, + { + "kind": "FieldDef", + "loc": null, + "children": { + "label": { + "kind": "Label", + "loc": null, + "children": { + "name": "refill_count" + } + }, + "expr": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "0" + } + } + } + }, + "is_pun": false + } + }, + { + "kind": "FieldDef", + "loc": null, + "children": { + "label": { + "kind": "Label", + "loc": null, + "children": { + "name": "backup_alive" + } + }, + "expr": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Bool", + "loc": null, + "children": { + "value": false + } + } + } + }, + "is_pun": false + } + } + ] + }, + "trailing": { + "kind": "Trailing::Comma", + "loc": null, + "children": {} + } + } + }, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "run_async" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Function", + "loc": null, + "children": { + "func": { + "kind": "Func::Lambda", + "loc": null, + "children": { + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Group", + "loc": null, + "children": { + "expr": { + "kind": "Expr::Sequence", + "loc": null, + "children": { + "exprs": { + "kind": "Expr::Sequence::ExprList", + "loc": null, + "children": [ + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "scan" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "lexbuf" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "scan" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "lexbuf" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Field", + "loc": null, + "children": { + "record": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "lexbuf" + } + } + } + } + } + }, + "accessor": { + "kind": "Accessor::Label", + "loc": null, + "children": { + "value": { + "kind": "Label", + "loc": null, + "children": { + "name": "clear_count" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + ] + }, + "last_expr": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Field", + "loc": null, + "children": { + "record": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "lexbuf" + } + } + } + } + } + }, + "accessor": { + "kind": "Accessor::Label", + "loc": null, + "children": { + "value": { + "kind": "Label", + "loc": null, + "children": { + "name": "refill_count" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + }, + "group": { + "kind": "Group::Brace", + "loc": null, + "children": {} + } + } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + } + } + } + } +] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/pipeline_test_lexscan_async.mbt b/test/sync_test/__snapshot__/pipeline_test_lexscan_async.mbt new file mode 100644 index 00000000..1116415b --- /dev/null +++ b/test/sync_test/__snapshot__/pipeline_test_lexscan_async.mbt @@ -0,0 +1,105 @@ +async fn[T] suspend(f : ((T) -> Unit) -> Unit) -> T noraise = "%async.suspend" +fn run_async(f : async () -> Unit noraise) -> Unit = "%async.run" + +struct LexBuf { + chunks : FixedArray[String] + mut chunk_index : Int + mut buffer : String + mut cursor : Int + mut clear_count : Int + mut refill_count : Int + mut backup_alive : Bool +} + +async fn pause() -> Unit noraise { + suspend(k => k(())) +} + +#inline(never) +async fn LexBuf::refill(self : LexBuf) -> Unit noraise { + pause() + if self.chunk_index < self.chunks.length() { + self.buffer = self.buffer + self.chunks[self.chunk_index] + self.chunk_index += 1 + self.refill_count += 1 + } +} + +#inline(never) +fn LexBuf::eof_reached(self : LexBuf) -> Bool { + self.chunk_index >= self.chunks.length() && self.cursor >= self.buffer.length() +} + +#inline(never) +fn LexBuf::set_backup(self : LexBuf) -> Unit { + self.backup_alive = true +} + +#inline(never) +async fn LexBuf::clear_backup(self : LexBuf) -> Unit noraise { + pause() + self.clear_count += 1 + self.backup_alive = false +} + +#inline(never) +fn LexBuf::get_cursor(self : LexBuf) -> Int { + self.cursor +} + +#inline(never) +fn LexBuf::buffer_end(self : LexBuf) -> Int { + self.buffer.length() +} + +#inline(never) +fn LexBuf::get_char(self : LexBuf, pos : Int) -> Int { + if pos < self.buffer.length() { + self.buffer.unsafe_get(pos).to_int() + } else { + -1 + } +} + +#inline(never) +fn LexBuf::advance(self : LexBuf, len : Int) -> Unit { + self.cursor += len +} + +#inline(never) +fn LexBuf::get_stringview( + self : LexBuf, + start : Int, + end : Int, +) -> StringView { + if self.backup_alive { + self.buffer.view(start_offset=start, end_offset=end) + } else { + "lost" + } +} + +async fn scan(lexbuf : LexBuf) -> String noraise { + lexscan lexbuf { + (re"^[a-z]+") as word => "word:\{word}:alive=\{lexbuf.backup_alive}" + _ => "token:alive=\{lexbuf.backup_alive}" + } +} + +fn main { + let lexbuf = LexBuf::{ + chunks: ["ab", "cd", "!"], + chunk_index: 0, + buffer: "", + cursor: 0, + clear_count: 0, + refill_count: 0, + backup_alive: false, + } + run_async(() => { + println(scan(lexbuf)) + println(scan(lexbuf)) + println(lexbuf.clear_count) + println(lexbuf.refill_count) + }) +} diff --git a/test/sync_test/__snapshot__/pipeline_test_lexscan_async.mbt.tokens.json b/test/sync_test/__snapshot__/pipeline_test_lexscan_async.mbt.tokens.json new file mode 100644 index 00000000..ca1a8c4f --- /dev/null +++ b/test/sync_test/__snapshot__/pipeline_test_lexscan_async.mbt.tokens.json @@ -0,0 +1,3165 @@ +[ + { + "token": "ASYNC", + "loc": "1:1-1:6" + }, + { + "token": "FN", + "loc": "1:7-1:9" + }, + { + "token": "LBRACKET", + "loc": "1:9-1:10" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "1:10-1:11" + }, + { + "token": "RBRACKET", + "loc": "1:11-1:12" + }, + { + "token": [ + "LIDENT", + "suspend" + ], + "loc": "1:13-1:20" + }, + { + "token": "LPAREN", + "loc": "1:20-1:21" + }, + { + "token": [ + "LIDENT", + "f" + ], + "loc": "1:21-1:22" + }, + { + "token": "COLON", + "loc": "1:23-1:24" + }, + { + "token": "LPAREN", + "loc": "1:25-1:26" + }, + { + "token": "LPAREN", + "loc": "1:26-1:27" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "1:27-1:28" + }, + { + "token": "RPAREN", + "loc": "1:28-1:29" + }, + { + "token": "THIN_ARROW", + "loc": "1:30-1:32" + }, + { + "token": [ + "UIDENT", + "Unit" + ], + "loc": "1:33-1:37" + }, + { + "token": "RPAREN", + "loc": "1:37-1:38" + }, + { + "token": "THIN_ARROW", + "loc": "1:39-1:41" + }, + { + "token": [ + "UIDENT", + "Unit" + ], + "loc": "1:42-1:46" + }, + { + "token": "RPAREN", + "loc": "1:46-1:47" + }, + { + "token": "THIN_ARROW", + "loc": "1:48-1:50" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "1:51-1:52" + }, + { + "token": "NORAISE", + "loc": "1:53-1:60" + }, + { + "token": "EQUAL", + "loc": "1:61-1:62" + }, + { + "token": [ + "STRING", + "%async.suspend" + ], + "loc": "1:63-1:79" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "1:79-1:79" + }, + { + "token": "NEWLINE", + "loc": "1:79-1:80" + }, + { + "token": "FN", + "loc": "2:1-2:3" + }, + { + "token": [ + "LIDENT", + "run_async" + ], + "loc": "2:4-2:13" + }, + { + "token": "LPAREN", + "loc": "2:13-2:14" + }, + { + "token": [ + "LIDENT", + "f" + ], + "loc": "2:14-2:15" + }, + { + "token": "COLON", + "loc": "2:16-2:17" + }, + { + "token": "ASYNC", + "loc": "2:18-2:23" + }, + { + "token": "LPAREN", + "loc": "2:24-2:25" + }, + { + "token": "RPAREN", + "loc": "2:25-2:26" + }, + { + "token": "THIN_ARROW", + "loc": "2:27-2:29" + }, + { + "token": [ + "UIDENT", + "Unit" + ], + "loc": "2:30-2:34" + }, + { + "token": "NORAISE", + "loc": "2:35-2:42" + }, + { + "token": "RPAREN", + "loc": "2:42-2:43" + }, + { + "token": "THIN_ARROW", + "loc": "2:44-2:46" + }, + { + "token": [ + "UIDENT", + "Unit" + ], + "loc": "2:47-2:51" + }, + { + "token": "EQUAL", + "loc": "2:52-2:53" + }, + { + "token": [ + "STRING", + "%async.run" + ], + "loc": "2:54-2:66" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "2:66-2:66" + }, + { + "token": "NEWLINE", + "loc": "2:66-2:67" + }, + { + "token": "NEWLINE", + "loc": "3:1-3:2" + }, + { + "token": "STRUCT", + "loc": "4:1-4:7" + }, + { + "token": [ + "UIDENT", + "LexBuf" + ], + "loc": "4:8-4:14" + }, + { + "token": "LBRACE", + "loc": "4:15-4:16" + }, + { + "token": "NEWLINE", + "loc": "4:16-4:17" + }, + { + "token": [ + "LIDENT", + "chunks" + ], + "loc": "5:3-5:9" + }, + { + "token": "COLON", + "loc": "5:10-5:11" + }, + { + "token": [ + "UIDENT", + "FixedArray" + ], + "loc": "5:12-5:22" + }, + { + "token": "LBRACKET", + "loc": "5:22-5:23" + }, + { + "token": [ + "UIDENT", + "String" + ], + "loc": "5:23-5:29" + }, + { + "token": "RBRACKET", + "loc": "5:29-5:30" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "5:30-5:30" + }, + { + "token": "NEWLINE", + "loc": "5:30-5:31" + }, + { + "token": "MUTABLE", + "loc": "6:3-6:6" + }, + { + "token": [ + "LIDENT", + "chunk_index" + ], + "loc": "6:7-6:18" + }, + { + "token": "COLON", + "loc": "6:19-6:20" + }, + { + "token": [ + "UIDENT", + "Int" + ], + "loc": "6:21-6:24" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "6:24-6:24" + }, + { + "token": "NEWLINE", + "loc": "6:24-6:25" + }, + { + "token": "MUTABLE", + "loc": "7:3-7:6" + }, + { + "token": [ + "LIDENT", + "buffer" + ], + "loc": "7:7-7:13" + }, + { + "token": "COLON", + "loc": "7:14-7:15" + }, + { + "token": [ + "UIDENT", + "String" + ], + "loc": "7:16-7:22" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "7:22-7:22" + }, + { + "token": "NEWLINE", + "loc": "7:22-7:23" + }, + { + "token": "MUTABLE", + "loc": "8:3-8:6" + }, + { + "token": [ + "LIDENT", + "cursor" + ], + "loc": "8:7-8:13" + }, + { + "token": "COLON", + "loc": "8:14-8:15" + }, + { + "token": [ + "UIDENT", + "Int" + ], + "loc": "8:16-8:19" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "8:19-8:19" + }, + { + "token": "NEWLINE", + "loc": "8:19-8:20" + }, + { + "token": "MUTABLE", + "loc": "9:3-9:6" + }, + { + "token": [ + "LIDENT", + "clear_count" + ], + "loc": "9:7-9:18" + }, + { + "token": "COLON", + "loc": "9:19-9:20" + }, + { + "token": [ + "UIDENT", + "Int" + ], + "loc": "9:21-9:24" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "9:24-9:24" + }, + { + "token": "NEWLINE", + "loc": "9:24-9:25" + }, + { + "token": "MUTABLE", + "loc": "10:3-10:6" + }, + { + "token": [ + "LIDENT", + "refill_count" + ], + "loc": "10:7-10:19" + }, + { + "token": "COLON", + "loc": "10:20-10:21" + }, + { + "token": [ + "UIDENT", + "Int" + ], + "loc": "10:22-10:25" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "10:25-10:25" + }, + { + "token": "NEWLINE", + "loc": "10:25-10:26" + }, + { + "token": "MUTABLE", + "loc": "11:3-11:6" + }, + { + "token": [ + "LIDENT", + "backup_alive" + ], + "loc": "11:7-11:19" + }, + { + "token": "COLON", + "loc": "11:20-11:21" + }, + { + "token": [ + "UIDENT", + "Bool" + ], + "loc": "11:22-11:26" + }, + { + "token": "NEWLINE", + "loc": "11:26-11:27" + }, + { + "token": "RBRACE", + "loc": "12:1-12:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "12:2-12:2" + }, + { + "token": "NEWLINE", + "loc": "12:2-12:3" + }, + { + "token": "NEWLINE", + "loc": "13:1-13:2" + }, + { + "token": "ASYNC", + "loc": "14:1-14:6" + }, + { + "token": "FN", + "loc": "14:7-14:9" + }, + { + "token": [ + "LIDENT", + "pause" + ], + "loc": "14:10-14:15" + }, + { + "token": "LPAREN", + "loc": "14:15-14:16" + }, + { + "token": "RPAREN", + "loc": "14:16-14:17" + }, + { + "token": "THIN_ARROW", + "loc": "14:18-14:20" + }, + { + "token": [ + "UIDENT", + "Unit" + ], + "loc": "14:21-14:25" + }, + { + "token": "NORAISE", + "loc": "14:26-14:33" + }, + { + "token": "LBRACE", + "loc": "14:34-14:35" + }, + { + "token": "NEWLINE", + "loc": "14:35-14:36" + }, + { + "token": [ + "LIDENT", + "suspend" + ], + "loc": "15:3-15:10" + }, + { + "token": "LPAREN", + "loc": "15:10-15:11" + }, + { + "token": [ + "LIDENT", + "k" + ], + "loc": "15:11-15:12" + }, + { + "token": "FAT_ARROW", + "loc": "15:13-15:15" + }, + { + "token": [ + "LIDENT", + "k" + ], + "loc": "15:16-15:17" + }, + { + "token": "LPAREN", + "loc": "15:17-15:18" + }, + { + "token": "LPAREN", + "loc": "15:18-15:19" + }, + { + "token": "RPAREN", + "loc": "15:19-15:20" + }, + { + "token": "RPAREN", + "loc": "15:20-15:21" + }, + { + "token": "RPAREN", + "loc": "15:21-15:22" + }, + { + "token": "NEWLINE", + "loc": "15:22-15:23" + }, + { + "token": "RBRACE", + "loc": "16:1-16:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "16:2-16:2" + }, + { + "token": "NEWLINE", + "loc": "16:2-16:3" + }, + { + "token": "NEWLINE", + "loc": "17:1-17:2" + }, + { + "token": [ + "ATTRIBUTE", + { + "id": "inline", + "dot_id": "", + "raw_payload": "(never)" + } + ], + "loc": "18:1-18:15" + }, + { + "token": "NEWLINE", + "loc": "18:15-18:16" + }, + { + "token": "ASYNC", + "loc": "19:1-19:6" + }, + { + "token": "FN", + "loc": "19:7-19:9" + }, + { + "token": [ + "UIDENT", + "LexBuf" + ], + "loc": "19:10-19:16" + }, + { + "token": "COLONCOLON", + "loc": "19:16-19:18" + }, + { + "token": [ + "LIDENT", + "refill" + ], + "loc": "19:18-19:24" + }, + { + "token": "LPAREN", + "loc": "19:24-19:25" + }, + { + "token": [ + "LIDENT", + "self" + ], + "loc": "19:25-19:29" + }, + { + "token": "COLON", + "loc": "19:30-19:31" + }, + { + "token": [ + "UIDENT", + "LexBuf" + ], + "loc": "19:32-19:38" + }, + { + "token": "RPAREN", + "loc": "19:38-19:39" + }, + { + "token": "THIN_ARROW", + "loc": "19:40-19:42" + }, + { + "token": [ + "UIDENT", + "Unit" + ], + "loc": "19:43-19:47" + }, + { + "token": "NORAISE", + "loc": "19:48-19:55" + }, + { + "token": "LBRACE", + "loc": "19:56-19:57" + }, + { + "token": "NEWLINE", + "loc": "19:57-19:58" + }, + { + "token": [ + "LIDENT", + "pause" + ], + "loc": "20:3-20:8" + }, + { + "token": "LPAREN", + "loc": "20:8-20:9" + }, + { + "token": "RPAREN", + "loc": "20:9-20:10" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "20:10-20:10" + }, + { + "token": "NEWLINE", + "loc": "20:10-20:11" + }, + { + "token": "IF", + "loc": "21:3-21:5" + }, + { + "token": [ + "LIDENT", + "self" + ], + "loc": "21:6-21:10" + }, + { + "token": [ + "DOT_LIDENT", + "chunk_index" + ], + "loc": "21:11-21:22" + }, + { + "token": [ + "INFIX1", + "<" + ], + "loc": "21:23-21:24" + }, + { + "token": [ + "LIDENT", + "self" + ], + "loc": "21:25-21:29" + }, + { + "token": [ + "DOT_LIDENT", + "chunks" + ], + "loc": "21:30-21:36" + }, + { + "token": [ + "DOT_LIDENT", + "length" + ], + "loc": "21:37-21:43" + }, + { + "token": "LPAREN", + "loc": "21:43-21:44" + }, + { + "token": "RPAREN", + "loc": "21:44-21:45" + }, + { + "token": "LBRACE", + "loc": "21:46-21:47" + }, + { + "token": "NEWLINE", + "loc": "21:47-21:48" + }, + { + "token": [ + "LIDENT", + "self" + ], + "loc": "22:5-22:9" + }, + { + "token": [ + "DOT_LIDENT", + "buffer" + ], + "loc": "22:10-22:16" + }, + { + "token": "EQUAL", + "loc": "22:17-22:18" + }, + { + "token": [ + "LIDENT", + "self" + ], + "loc": "22:19-22:23" + }, + { + "token": [ + "DOT_LIDENT", + "buffer" + ], + "loc": "22:24-22:30" + }, + { + "token": "PLUS", + "loc": "22:31-22:32" + }, + { + "token": [ + "LIDENT", + "self" + ], + "loc": "22:33-22:37" + }, + { + "token": [ + "DOT_LIDENT", + "chunks" + ], + "loc": "22:38-22:44" + }, + { + "token": "LBRACKET", + "loc": "22:44-22:45" + }, + { + "token": [ + "LIDENT", + "self" + ], + "loc": "22:45-22:49" + }, + { + "token": [ + "DOT_LIDENT", + "chunk_index" + ], + "loc": "22:50-22:61" + }, + { + "token": "RBRACKET", + "loc": "22:61-22:62" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "22:62-22:62" + }, + { + "token": "NEWLINE", + "loc": "22:62-22:63" + }, + { + "token": [ + "LIDENT", + "self" + ], + "loc": "23:5-23:9" + }, + { + "token": [ + "DOT_LIDENT", + "chunk_index" + ], + "loc": "23:10-23:21" + }, + { + "token": "PLUS_EQUAL", + "loc": "23:22-23:24" + }, + { + "token": [ + "INT", + "1" + ], + "loc": "23:25-23:26" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "23:26-23:26" + }, + { + "token": "NEWLINE", + "loc": "23:26-23:27" + }, + { + "token": [ + "LIDENT", + "self" + ], + "loc": "24:5-24:9" + }, + { + "token": [ + "DOT_LIDENT", + "refill_count" + ], + "loc": "24:10-24:22" + }, + { + "token": "PLUS_EQUAL", + "loc": "24:23-24:25" + }, + { + "token": [ + "INT", + "1" + ], + "loc": "24:26-24:27" + }, + { + "token": "NEWLINE", + "loc": "24:27-24:28" + }, + { + "token": "RBRACE", + "loc": "25:3-25:4" + }, + { + "token": "NEWLINE", + "loc": "25:4-25:5" + }, + { + "token": "RBRACE", + "loc": "26:1-26:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "26:2-26:2" + }, + { + "token": "NEWLINE", + "loc": "26:2-26:3" + }, + { + "token": "NEWLINE", + "loc": "27:1-27:2" + }, + { + "token": [ + "ATTRIBUTE", + { + "id": "inline", + "dot_id": "", + "raw_payload": "(never)" + } + ], + "loc": "28:1-28:15" + }, + { + "token": "NEWLINE", + "loc": "28:15-28:16" + }, + { + "token": "FN", + "loc": "29:1-29:3" + }, + { + "token": [ + "UIDENT", + "LexBuf" + ], + "loc": "29:4-29:10" + }, + { + "token": "COLONCOLON", + "loc": "29:10-29:12" + }, + { + "token": [ + "LIDENT", + "eof_reached" + ], + "loc": "29:12-29:23" + }, + { + "token": "LPAREN", + "loc": "29:23-29:24" + }, + { + "token": [ + "LIDENT", + "self" + ], + "loc": "29:24-29:28" + }, + { + "token": "COLON", + "loc": "29:29-29:30" + }, + { + "token": [ + "UIDENT", + "LexBuf" + ], + "loc": "29:31-29:37" + }, + { + "token": "RPAREN", + "loc": "29:37-29:38" + }, + { + "token": "THIN_ARROW", + "loc": "29:39-29:41" + }, + { + "token": [ + "UIDENT", + "Bool" + ], + "loc": "29:42-29:46" + }, + { + "token": "LBRACE", + "loc": "29:47-29:48" + }, + { + "token": "NEWLINE", + "loc": "29:48-29:49" + }, + { + "token": [ + "LIDENT", + "self" + ], + "loc": "30:3-30:7" + }, + { + "token": [ + "DOT_LIDENT", + "chunk_index" + ], + "loc": "30:8-30:19" + }, + { + "token": [ + "INFIX1", + ">=" + ], + "loc": "30:20-30:22" + }, + { + "token": [ + "LIDENT", + "self" + ], + "loc": "30:23-30:27" + }, + { + "token": [ + "DOT_LIDENT", + "chunks" + ], + "loc": "30:28-30:34" + }, + { + "token": [ + "DOT_LIDENT", + "length" + ], + "loc": "30:35-30:41" + }, + { + "token": "LPAREN", + "loc": "30:41-30:42" + }, + { + "token": "RPAREN", + "loc": "30:42-30:43" + }, + { + "token": "AMPERAMPER", + "loc": "30:44-30:46" + }, + { + "token": [ + "LIDENT", + "self" + ], + "loc": "30:47-30:51" + }, + { + "token": [ + "DOT_LIDENT", + "cursor" + ], + "loc": "30:52-30:58" + }, + { + "token": [ + "INFIX1", + ">=" + ], + "loc": "30:59-30:61" + }, + { + "token": [ + "LIDENT", + "self" + ], + "loc": "30:62-30:66" + }, + { + "token": [ + "DOT_LIDENT", + "buffer" + ], + "loc": "30:67-30:73" + }, + { + "token": [ + "DOT_LIDENT", + "length" + ], + "loc": "30:74-30:80" + }, + { + "token": "LPAREN", + "loc": "30:80-30:81" + }, + { + "token": "RPAREN", + "loc": "30:81-30:82" + }, + { + "token": "NEWLINE", + "loc": "30:82-30:83" + }, + { + "token": "RBRACE", + "loc": "31:1-31:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "31:2-31:2" + }, + { + "token": "NEWLINE", + "loc": "31:2-31:3" + }, + { + "token": "NEWLINE", + "loc": "32:1-32:2" + }, + { + "token": [ + "ATTRIBUTE", + { + "id": "inline", + "dot_id": "", + "raw_payload": "(never)" + } + ], + "loc": "33:1-33:15" + }, + { + "token": "NEWLINE", + "loc": "33:15-33:16" + }, + { + "token": "FN", + "loc": "34:1-34:3" + }, + { + "token": [ + "UIDENT", + "LexBuf" + ], + "loc": "34:4-34:10" + }, + { + "token": "COLONCOLON", + "loc": "34:10-34:12" + }, + { + "token": [ + "LIDENT", + "set_backup" + ], + "loc": "34:12-34:22" + }, + { + "token": "LPAREN", + "loc": "34:22-34:23" + }, + { + "token": [ + "LIDENT", + "self" + ], + "loc": "34:23-34:27" + }, + { + "token": "COLON", + "loc": "34:28-34:29" + }, + { + "token": [ + "UIDENT", + "LexBuf" + ], + "loc": "34:30-34:36" + }, + { + "token": "RPAREN", + "loc": "34:36-34:37" + }, + { + "token": "THIN_ARROW", + "loc": "34:38-34:40" + }, + { + "token": [ + "UIDENT", + "Unit" + ], + "loc": "34:41-34:45" + }, + { + "token": "LBRACE", + "loc": "34:46-34:47" + }, + { + "token": "NEWLINE", + "loc": "34:47-34:48" + }, + { + "token": [ + "LIDENT", + "self" + ], + "loc": "35:3-35:7" + }, + { + "token": [ + "DOT_LIDENT", + "backup_alive" + ], + "loc": "35:8-35:20" + }, + { + "token": "EQUAL", + "loc": "35:21-35:22" + }, + { + "token": "TRUE", + "loc": "35:23-35:27" + }, + { + "token": "NEWLINE", + "loc": "35:27-35:28" + }, + { + "token": "RBRACE", + "loc": "36:1-36:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "36:2-36:2" + }, + { + "token": "NEWLINE", + "loc": "36:2-36:3" + }, + { + "token": "NEWLINE", + "loc": "37:1-37:2" + }, + { + "token": [ + "ATTRIBUTE", + { + "id": "inline", + "dot_id": "", + "raw_payload": "(never)" + } + ], + "loc": "38:1-38:15" + }, + { + "token": "NEWLINE", + "loc": "38:15-38:16" + }, + { + "token": "ASYNC", + "loc": "39:1-39:6" + }, + { + "token": "FN", + "loc": "39:7-39:9" + }, + { + "token": [ + "UIDENT", + "LexBuf" + ], + "loc": "39:10-39:16" + }, + { + "token": "COLONCOLON", + "loc": "39:16-39:18" + }, + { + "token": [ + "LIDENT", + "clear_backup" + ], + "loc": "39:18-39:30" + }, + { + "token": "LPAREN", + "loc": "39:30-39:31" + }, + { + "token": [ + "LIDENT", + "self" + ], + "loc": "39:31-39:35" + }, + { + "token": "COLON", + "loc": "39:36-39:37" + }, + { + "token": [ + "UIDENT", + "LexBuf" + ], + "loc": "39:38-39:44" + }, + { + "token": "RPAREN", + "loc": "39:44-39:45" + }, + { + "token": "THIN_ARROW", + "loc": "39:46-39:48" + }, + { + "token": [ + "UIDENT", + "Unit" + ], + "loc": "39:49-39:53" + }, + { + "token": "NORAISE", + "loc": "39:54-39:61" + }, + { + "token": "LBRACE", + "loc": "39:62-39:63" + }, + { + "token": "NEWLINE", + "loc": "39:63-39:64" + }, + { + "token": [ + "LIDENT", + "pause" + ], + "loc": "40:3-40:8" + }, + { + "token": "LPAREN", + "loc": "40:8-40:9" + }, + { + "token": "RPAREN", + "loc": "40:9-40:10" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "40:10-40:10" + }, + { + "token": "NEWLINE", + "loc": "40:10-40:11" + }, + { + "token": [ + "LIDENT", + "self" + ], + "loc": "41:3-41:7" + }, + { + "token": [ + "DOT_LIDENT", + "clear_count" + ], + "loc": "41:8-41:19" + }, + { + "token": "PLUS_EQUAL", + "loc": "41:20-41:22" + }, + { + "token": [ + "INT", + "1" + ], + "loc": "41:23-41:24" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "41:24-41:24" + }, + { + "token": "NEWLINE", + "loc": "41:24-41:25" + }, + { + "token": [ + "LIDENT", + "self" + ], + "loc": "42:3-42:7" + }, + { + "token": [ + "DOT_LIDENT", + "backup_alive" + ], + "loc": "42:8-42:20" + }, + { + "token": "EQUAL", + "loc": "42:21-42:22" + }, + { + "token": "FALSE", + "loc": "42:23-42:28" + }, + { + "token": "NEWLINE", + "loc": "42:28-42:29" + }, + { + "token": "RBRACE", + "loc": "43:1-43:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "43:2-43:2" + }, + { + "token": "NEWLINE", + "loc": "43:2-43:3" + }, + { + "token": "NEWLINE", + "loc": "44:1-44:2" + }, + { + "token": [ + "ATTRIBUTE", + { + "id": "inline", + "dot_id": "", + "raw_payload": "(never)" + } + ], + "loc": "45:1-45:15" + }, + { + "token": "NEWLINE", + "loc": "45:15-45:16" + }, + { + "token": "FN", + "loc": "46:1-46:3" + }, + { + "token": [ + "UIDENT", + "LexBuf" + ], + "loc": "46:4-46:10" + }, + { + "token": "COLONCOLON", + "loc": "46:10-46:12" + }, + { + "token": [ + "LIDENT", + "get_cursor" + ], + "loc": "46:12-46:22" + }, + { + "token": "LPAREN", + "loc": "46:22-46:23" + }, + { + "token": [ + "LIDENT", + "self" + ], + "loc": "46:23-46:27" + }, + { + "token": "COLON", + "loc": "46:28-46:29" + }, + { + "token": [ + "UIDENT", + "LexBuf" + ], + "loc": "46:30-46:36" + }, + { + "token": "RPAREN", + "loc": "46:36-46:37" + }, + { + "token": "THIN_ARROW", + "loc": "46:38-46:40" + }, + { + "token": [ + "UIDENT", + "Int" + ], + "loc": "46:41-46:44" + }, + { + "token": "LBRACE", + "loc": "46:45-46:46" + }, + { + "token": "NEWLINE", + "loc": "46:46-46:47" + }, + { + "token": [ + "LIDENT", + "self" + ], + "loc": "47:3-47:7" + }, + { + "token": [ + "DOT_LIDENT", + "cursor" + ], + "loc": "47:8-47:14" + }, + { + "token": "NEWLINE", + "loc": "47:14-47:15" + }, + { + "token": "RBRACE", + "loc": "48:1-48:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "48:2-48:2" + }, + { + "token": "NEWLINE", + "loc": "48:2-48:3" + }, + { + "token": "NEWLINE", + "loc": "49:1-49:2" + }, + { + "token": [ + "ATTRIBUTE", + { + "id": "inline", + "dot_id": "", + "raw_payload": "(never)" + } + ], + "loc": "50:1-50:15" + }, + { + "token": "NEWLINE", + "loc": "50:15-50:16" + }, + { + "token": "FN", + "loc": "51:1-51:3" + }, + { + "token": [ + "UIDENT", + "LexBuf" + ], + "loc": "51:4-51:10" + }, + { + "token": "COLONCOLON", + "loc": "51:10-51:12" + }, + { + "token": [ + "LIDENT", + "buffer_end" + ], + "loc": "51:12-51:22" + }, + { + "token": "LPAREN", + "loc": "51:22-51:23" + }, + { + "token": [ + "LIDENT", + "self" + ], + "loc": "51:23-51:27" + }, + { + "token": "COLON", + "loc": "51:28-51:29" + }, + { + "token": [ + "UIDENT", + "LexBuf" + ], + "loc": "51:30-51:36" + }, + { + "token": "RPAREN", + "loc": "51:36-51:37" + }, + { + "token": "THIN_ARROW", + "loc": "51:38-51:40" + }, + { + "token": [ + "UIDENT", + "Int" + ], + "loc": "51:41-51:44" + }, + { + "token": "LBRACE", + "loc": "51:45-51:46" + }, + { + "token": "NEWLINE", + "loc": "51:46-51:47" + }, + { + "token": [ + "LIDENT", + "self" + ], + "loc": "52:3-52:7" + }, + { + "token": [ + "DOT_LIDENT", + "buffer" + ], + "loc": "52:8-52:14" + }, + { + "token": [ + "DOT_LIDENT", + "length" + ], + "loc": "52:15-52:21" + }, + { + "token": "LPAREN", + "loc": "52:21-52:22" + }, + { + "token": "RPAREN", + "loc": "52:22-52:23" + }, + { + "token": "NEWLINE", + "loc": "52:23-52:24" + }, + { + "token": "RBRACE", + "loc": "53:1-53:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "53:2-53:2" + }, + { + "token": "NEWLINE", + "loc": "53:2-53:3" + }, + { + "token": "NEWLINE", + "loc": "54:1-54:2" + }, + { + "token": [ + "ATTRIBUTE", + { + "id": "inline", + "dot_id": "", + "raw_payload": "(never)" + } + ], + "loc": "55:1-55:15" + }, + { + "token": "NEWLINE", + "loc": "55:15-55:16" + }, + { + "token": "FN", + "loc": "56:1-56:3" + }, + { + "token": [ + "UIDENT", + "LexBuf" + ], + "loc": "56:4-56:10" + }, + { + "token": "COLONCOLON", + "loc": "56:10-56:12" + }, + { + "token": [ + "LIDENT", + "get_char" + ], + "loc": "56:12-56:20" + }, + { + "token": "LPAREN", + "loc": "56:20-56:21" + }, + { + "token": [ + "LIDENT", + "self" + ], + "loc": "56:21-56:25" + }, + { + "token": "COLON", + "loc": "56:26-56:27" + }, + { + "token": [ + "UIDENT", + "LexBuf" + ], + "loc": "56:28-56:34" + }, + { + "token": "COMMA", + "loc": "56:34-56:35" + }, + { + "token": [ + "LIDENT", + "pos" + ], + "loc": "56:36-56:39" + }, + { + "token": "COLON", + "loc": "56:40-56:41" + }, + { + "token": [ + "UIDENT", + "Int" + ], + "loc": "56:42-56:45" + }, + { + "token": "RPAREN", + "loc": "56:45-56:46" + }, + { + "token": "THIN_ARROW", + "loc": "56:47-56:49" + }, + { + "token": [ + "UIDENT", + "Int" + ], + "loc": "56:50-56:53" + }, + { + "token": "LBRACE", + "loc": "56:54-56:55" + }, + { + "token": "NEWLINE", + "loc": "56:55-56:56" + }, + { + "token": "IF", + "loc": "57:3-57:5" + }, + { + "token": [ + "LIDENT", + "pos" + ], + "loc": "57:6-57:9" + }, + { + "token": [ + "INFIX1", + "<" + ], + "loc": "57:10-57:11" + }, + { + "token": [ + "LIDENT", + "self" + ], + "loc": "57:12-57:16" + }, + { + "token": [ + "DOT_LIDENT", + "buffer" + ], + "loc": "57:17-57:23" + }, + { + "token": [ + "DOT_LIDENT", + "length" + ], + "loc": "57:24-57:30" + }, + { + "token": "LPAREN", + "loc": "57:30-57:31" + }, + { + "token": "RPAREN", + "loc": "57:31-57:32" + }, + { + "token": "LBRACE", + "loc": "57:33-57:34" + }, + { + "token": "NEWLINE", + "loc": "57:34-57:35" + }, + { + "token": [ + "LIDENT", + "self" + ], + "loc": "58:5-58:9" + }, + { + "token": [ + "DOT_LIDENT", + "buffer" + ], + "loc": "58:10-58:16" + }, + { + "token": [ + "DOT_LIDENT", + "unsafe_get" + ], + "loc": "58:17-58:27" + }, + { + "token": "LPAREN", + "loc": "58:27-58:28" + }, + { + "token": [ + "LIDENT", + "pos" + ], + "loc": "58:28-58:31" + }, + { + "token": "RPAREN", + "loc": "58:31-58:32" + }, + { + "token": [ + "DOT_LIDENT", + "to_int" + ], + "loc": "58:33-58:39" + }, + { + "token": "LPAREN", + "loc": "58:39-58:40" + }, + { + "token": "RPAREN", + "loc": "58:40-58:41" + }, + { + "token": "NEWLINE", + "loc": "58:41-58:42" + }, + { + "token": "RBRACE", + "loc": "59:3-59:4" + }, + { + "token": "ELSE", + "loc": "59:5-59:9" + }, + { + "token": "LBRACE", + "loc": "59:10-59:11" + }, + { + "token": "NEWLINE", + "loc": "59:11-59:12" + }, + { + "token": "MINUS", + "loc": "60:5-60:6" + }, + { + "token": [ + "INT", + "1" + ], + "loc": "60:6-60:7" + }, + { + "token": "NEWLINE", + "loc": "60:7-60:8" + }, + { + "token": "RBRACE", + "loc": "61:3-61:4" + }, + { + "token": "NEWLINE", + "loc": "61:4-61:5" + }, + { + "token": "RBRACE", + "loc": "62:1-62:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "62:2-62:2" + }, + { + "token": "NEWLINE", + "loc": "62:2-62:3" + }, + { + "token": "NEWLINE", + "loc": "63:1-63:2" + }, + { + "token": [ + "ATTRIBUTE", + { + "id": "inline", + "dot_id": "", + "raw_payload": "(never)" + } + ], + "loc": "64:1-64:15" + }, + { + "token": "NEWLINE", + "loc": "64:15-64:16" + }, + { + "token": "FN", + "loc": "65:1-65:3" + }, + { + "token": [ + "UIDENT", + "LexBuf" + ], + "loc": "65:4-65:10" + }, + { + "token": "COLONCOLON", + "loc": "65:10-65:12" + }, + { + "token": [ + "LIDENT", + "advance" + ], + "loc": "65:12-65:19" + }, + { + "token": "LPAREN", + "loc": "65:19-65:20" + }, + { + "token": [ + "LIDENT", + "self" + ], + "loc": "65:20-65:24" + }, + { + "token": "COLON", + "loc": "65:25-65:26" + }, + { + "token": [ + "UIDENT", + "LexBuf" + ], + "loc": "65:27-65:33" + }, + { + "token": "COMMA", + "loc": "65:33-65:34" + }, + { + "token": [ + "LIDENT", + "len" + ], + "loc": "65:35-65:38" + }, + { + "token": "COLON", + "loc": "65:39-65:40" + }, + { + "token": [ + "UIDENT", + "Int" + ], + "loc": "65:41-65:44" + }, + { + "token": "RPAREN", + "loc": "65:44-65:45" + }, + { + "token": "THIN_ARROW", + "loc": "65:46-65:48" + }, + { + "token": [ + "UIDENT", + "Unit" + ], + "loc": "65:49-65:53" + }, + { + "token": "LBRACE", + "loc": "65:54-65:55" + }, + { + "token": "NEWLINE", + "loc": "65:55-65:56" + }, + { + "token": [ + "LIDENT", + "self" + ], + "loc": "66:3-66:7" + }, + { + "token": [ + "DOT_LIDENT", + "cursor" + ], + "loc": "66:8-66:14" + }, + { + "token": "PLUS_EQUAL", + "loc": "66:15-66:17" + }, + { + "token": [ + "LIDENT", + "len" + ], + "loc": "66:18-66:21" + }, + { + "token": "NEWLINE", + "loc": "66:21-66:22" + }, + { + "token": "RBRACE", + "loc": "67:1-67:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "67:2-67:2" + }, + { + "token": "NEWLINE", + "loc": "67:2-67:3" + }, + { + "token": "NEWLINE", + "loc": "68:1-68:2" + }, + { + "token": [ + "ATTRIBUTE", + { + "id": "inline", + "dot_id": "", + "raw_payload": "(never)" + } + ], + "loc": "69:1-69:15" + }, + { + "token": "NEWLINE", + "loc": "69:15-69:16" + }, + { + "token": "FN", + "loc": "70:1-70:3" + }, + { + "token": [ + "UIDENT", + "LexBuf" + ], + "loc": "70:4-70:10" + }, + { + "token": "COLONCOLON", + "loc": "70:10-70:12" + }, + { + "token": [ + "LIDENT", + "get_stringview" + ], + "loc": "70:12-70:26" + }, + { + "token": "LPAREN", + "loc": "70:26-70:27" + }, + { + "token": "NEWLINE", + "loc": "70:27-70:28" + }, + { + "token": [ + "LIDENT", + "self" + ], + "loc": "71:3-71:7" + }, + { + "token": "COLON", + "loc": "71:8-71:9" + }, + { + "token": [ + "UIDENT", + "LexBuf" + ], + "loc": "71:10-71:16" + }, + { + "token": "COMMA", + "loc": "71:16-71:17" + }, + { + "token": "NEWLINE", + "loc": "71:17-71:18" + }, + { + "token": [ + "LIDENT", + "start" + ], + "loc": "72:3-72:8" + }, + { + "token": "COLON", + "loc": "72:9-72:10" + }, + { + "token": [ + "UIDENT", + "Int" + ], + "loc": "72:11-72:14" + }, + { + "token": "COMMA", + "loc": "72:14-72:15" + }, + { + "token": "NEWLINE", + "loc": "72:15-72:16" + }, + { + "token": [ + "LIDENT", + "end" + ], + "loc": "73:3-73:6" + }, + { + "token": "COLON", + "loc": "73:7-73:8" + }, + { + "token": [ + "UIDENT", + "Int" + ], + "loc": "73:9-73:12" + }, + { + "token": "COMMA", + "loc": "73:12-73:13" + }, + { + "token": "NEWLINE", + "loc": "73:13-73:14" + }, + { + "token": "RPAREN", + "loc": "74:1-74:2" + }, + { + "token": "THIN_ARROW", + "loc": "74:3-74:5" + }, + { + "token": [ + "UIDENT", + "StringView" + ], + "loc": "74:6-74:16" + }, + { + "token": "LBRACE", + "loc": "74:17-74:18" + }, + { + "token": "NEWLINE", + "loc": "74:18-74:19" + }, + { + "token": "IF", + "loc": "75:3-75:5" + }, + { + "token": [ + "LIDENT", + "self" + ], + "loc": "75:6-75:10" + }, + { + "token": [ + "DOT_LIDENT", + "backup_alive" + ], + "loc": "75:11-75:23" + }, + { + "token": "LBRACE", + "loc": "75:24-75:25" + }, + { + "token": "NEWLINE", + "loc": "75:25-75:26" + }, + { + "token": [ + "LIDENT", + "self" + ], + "loc": "76:5-76:9" + }, + { + "token": [ + "DOT_LIDENT", + "buffer" + ], + "loc": "76:10-76:16" + }, + { + "token": [ + "DOT_LIDENT", + "view" + ], + "loc": "76:17-76:21" + }, + { + "token": "LPAREN", + "loc": "76:21-76:22" + }, + { + "token": [ + "LIDENT", + "start_offset" + ], + "loc": "76:22-76:34" + }, + { + "token": "EQUAL", + "loc": "76:34-76:35" + }, + { + "token": [ + "LIDENT", + "start" + ], + "loc": "76:35-76:40" + }, + { + "token": "COMMA", + "loc": "76:40-76:41" + }, + { + "token": [ + "LIDENT", + "end_offset" + ], + "loc": "76:42-76:52" + }, + { + "token": "EQUAL", + "loc": "76:52-76:53" + }, + { + "token": [ + "LIDENT", + "end" + ], + "loc": "76:53-76:56" + }, + { + "token": "RPAREN", + "loc": "76:56-76:57" + }, + { + "token": "NEWLINE", + "loc": "76:57-76:58" + }, + { + "token": "RBRACE", + "loc": "77:3-77:4" + }, + { + "token": "ELSE", + "loc": "77:5-77:9" + }, + { + "token": "LBRACE", + "loc": "77:10-77:11" + }, + { + "token": "NEWLINE", + "loc": "77:11-77:12" + }, + { + "token": [ + "STRING", + "lost" + ], + "loc": "78:5-78:11" + }, + { + "token": "NEWLINE", + "loc": "78:11-78:12" + }, + { + "token": "RBRACE", + "loc": "79:3-79:4" + }, + { + "token": "NEWLINE", + "loc": "79:4-79:5" + }, + { + "token": "RBRACE", + "loc": "80:1-80:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "80:2-80:2" + }, + { + "token": "NEWLINE", + "loc": "80:2-80:3" + }, + { + "token": "NEWLINE", + "loc": "81:1-81:2" + }, + { + "token": "ASYNC", + "loc": "82:1-82:6" + }, + { + "token": "FN", + "loc": "82:7-82:9" + }, + { + "token": [ + "LIDENT", + "scan" + ], + "loc": "82:10-82:14" + }, + { + "token": "LPAREN", + "loc": "82:14-82:15" + }, + { + "token": [ + "LIDENT", + "lexbuf" + ], + "loc": "82:15-82:21" + }, + { + "token": "COLON", + "loc": "82:22-82:23" + }, + { + "token": [ + "UIDENT", + "LexBuf" + ], + "loc": "82:24-82:30" + }, + { + "token": "RPAREN", + "loc": "82:30-82:31" + }, + { + "token": "THIN_ARROW", + "loc": "82:32-82:34" + }, + { + "token": [ + "UIDENT", + "String" + ], + "loc": "82:35-82:41" + }, + { + "token": "NORAISE", + "loc": "82:42-82:49" + }, + { + "token": "LBRACE", + "loc": "82:50-82:51" + }, + { + "token": "NEWLINE", + "loc": "82:51-82:52" + }, + { + "token": "LEXSCAN", + "loc": "83:3-83:10" + }, + { + "token": [ + "LIDENT", + "lexbuf" + ], + "loc": "83:11-83:17" + }, + { + "token": "LBRACE", + "loc": "83:18-83:19" + }, + { + "token": "NEWLINE", + "loc": "83:19-83:20" + }, + { + "token": "LPAREN", + "loc": "84:5-84:6" + }, + { + "token": [ + "REGEX_LITERAL", + "^[a-z]+" + ], + "loc": "84:6-84:17" + }, + { + "token": "RPAREN", + "loc": "84:17-84:18" + }, + { + "token": "AS", + "loc": "84:19-84:21" + }, + { + "token": [ + "LIDENT", + "word" + ], + "loc": "84:22-84:26" + }, + { + "token": "FAT_ARROW", + "loc": "84:27-84:29" + }, + { + "token": [ + "INTERP", + "\"word:\\{word}:alive=\\{lexbuf.backup_alive}\"" + ], + "loc": "84:30-84:73" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "84:73-84:73" + }, + { + "token": "NEWLINE", + "loc": "84:73-84:74" + }, + { + "token": "UNDERSCORE", + "loc": "85:5-85:6" + }, + { + "token": "FAT_ARROW", + "loc": "85:7-85:9" + }, + { + "token": [ + "INTERP", + "\"token:alive=\\{lexbuf.backup_alive}\"" + ], + "loc": "85:10-85:46" + }, + { + "token": "NEWLINE", + "loc": "85:46-85:47" + }, + { + "token": "RBRACE", + "loc": "86:3-86:4" + }, + { + "token": "NEWLINE", + "loc": "86:4-86:5" + }, + { + "token": "RBRACE", + "loc": "87:1-87:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "87:2-87:2" + }, + { + "token": "NEWLINE", + "loc": "87:2-87:3" + }, + { + "token": "NEWLINE", + "loc": "88:1-88:2" + }, + { + "token": "FN", + "loc": "89:1-89:3" + }, + { + "token": [ + "LIDENT", + "main" + ], + "loc": "89:4-89:8" + }, + { + "token": "LBRACE", + "loc": "89:9-89:10" + }, + { + "token": "NEWLINE", + "loc": "89:10-89:11" + }, + { + "token": "LET", + "loc": "90:3-90:6" + }, + { + "token": [ + "LIDENT", + "lexbuf" + ], + "loc": "90:7-90:13" + }, + { + "token": "EQUAL", + "loc": "90:14-90:15" + }, + { + "token": [ + "UIDENT", + "LexBuf" + ], + "loc": "90:16-90:22" + }, + { + "token": "COLONCOLON", + "loc": "90:22-90:24" + }, + { + "token": "LBRACE", + "loc": "90:24-90:25" + }, + { + "token": "NEWLINE", + "loc": "90:25-90:26" + }, + { + "token": [ + "LIDENT", + "chunks" + ], + "loc": "91:5-91:11" + }, + { + "token": "COLON", + "loc": "91:11-91:12" + }, + { + "token": "LBRACKET", + "loc": "91:13-91:14" + }, + { + "token": [ + "STRING", + "ab" + ], + "loc": "91:14-91:18" + }, + { + "token": "COMMA", + "loc": "91:18-91:19" + }, + { + "token": [ + "STRING", + "cd" + ], + "loc": "91:20-91:24" + }, + { + "token": "COMMA", + "loc": "91:24-91:25" + }, + { + "token": [ + "STRING", + "!" + ], + "loc": "91:26-91:29" + }, + { + "token": "RBRACKET", + "loc": "91:29-91:30" + }, + { + "token": "COMMA", + "loc": "91:30-91:31" + }, + { + "token": "NEWLINE", + "loc": "91:31-91:32" + }, + { + "token": [ + "LIDENT", + "chunk_index" + ], + "loc": "92:5-92:16" + }, + { + "token": "COLON", + "loc": "92:16-92:17" + }, + { + "token": [ + "INT", + "0" + ], + "loc": "92:18-92:19" + }, + { + "token": "COMMA", + "loc": "92:19-92:20" + }, + { + "token": "NEWLINE", + "loc": "92:20-92:21" + }, + { + "token": [ + "LIDENT", + "buffer" + ], + "loc": "93:5-93:11" + }, + { + "token": "COLON", + "loc": "93:11-93:12" + }, + { + "token": [ + "STRING", + "" + ], + "loc": "93:13-93:15" + }, + { + "token": "COMMA", + "loc": "93:15-93:16" + }, + { + "token": "NEWLINE", + "loc": "93:16-93:17" + }, + { + "token": [ + "LIDENT", + "cursor" + ], + "loc": "94:5-94:11" + }, + { + "token": "COLON", + "loc": "94:11-94:12" + }, + { + "token": [ + "INT", + "0" + ], + "loc": "94:13-94:14" + }, + { + "token": "COMMA", + "loc": "94:14-94:15" + }, + { + "token": "NEWLINE", + "loc": "94:15-94:16" + }, + { + "token": [ + "LIDENT", + "clear_count" + ], + "loc": "95:5-95:16" + }, + { + "token": "COLON", + "loc": "95:16-95:17" + }, + { + "token": [ + "INT", + "0" + ], + "loc": "95:18-95:19" + }, + { + "token": "COMMA", + "loc": "95:19-95:20" + }, + { + "token": "NEWLINE", + "loc": "95:20-95:21" + }, + { + "token": [ + "LIDENT", + "refill_count" + ], + "loc": "96:5-96:17" + }, + { + "token": "COLON", + "loc": "96:17-96:18" + }, + { + "token": [ + "INT", + "0" + ], + "loc": "96:19-96:20" + }, + { + "token": "COMMA", + "loc": "96:20-96:21" + }, + { + "token": "NEWLINE", + "loc": "96:21-96:22" + }, + { + "token": [ + "LIDENT", + "backup_alive" + ], + "loc": "97:5-97:17" + }, + { + "token": "COLON", + "loc": "97:17-97:18" + }, + { + "token": "FALSE", + "loc": "97:19-97:24" + }, + { + "token": "COMMA", + "loc": "97:24-97:25" + }, + { + "token": "NEWLINE", + "loc": "97:25-97:26" + }, + { + "token": "RBRACE", + "loc": "98:3-98:4" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "98:4-98:4" + }, + { + "token": "NEWLINE", + "loc": "98:4-98:5" + }, + { + "token": [ + "LIDENT", + "run_async" + ], + "loc": "99:3-99:12" + }, + { + "token": "LPAREN", + "loc": "99:12-99:13" + }, + { + "token": "LPAREN", + "loc": "99:13-99:14" + }, + { + "token": "RPAREN", + "loc": "99:14-99:15" + }, + { + "token": "FAT_ARROW", + "loc": "99:16-99:18" + }, + { + "token": "LBRACE", + "loc": "99:19-99:20" + }, + { + "token": "NEWLINE", + "loc": "99:20-99:21" + }, + { + "token": [ + "LIDENT", + "println" + ], + "loc": "100:5-100:12" + }, + { + "token": "LPAREN", + "loc": "100:12-100:13" + }, + { + "token": [ + "LIDENT", + "scan" + ], + "loc": "100:13-100:17" + }, + { + "token": "LPAREN", + "loc": "100:17-100:18" + }, + { + "token": [ + "LIDENT", + "lexbuf" + ], + "loc": "100:18-100:24" + }, + { + "token": "RPAREN", + "loc": "100:24-100:25" + }, + { + "token": "RPAREN", + "loc": "100:25-100:26" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "100:26-100:26" + }, + { + "token": "NEWLINE", + "loc": "100:26-100:27" + }, + { + "token": [ + "LIDENT", + "println" + ], + "loc": "101:5-101:12" + }, + { + "token": "LPAREN", + "loc": "101:12-101:13" + }, + { + "token": [ + "LIDENT", + "scan" + ], + "loc": "101:13-101:17" + }, + { + "token": "LPAREN", + "loc": "101:17-101:18" + }, + { + "token": [ + "LIDENT", + "lexbuf" + ], + "loc": "101:18-101:24" + }, + { + "token": "RPAREN", + "loc": "101:24-101:25" + }, + { + "token": "RPAREN", + "loc": "101:25-101:26" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "101:26-101:26" + }, + { + "token": "NEWLINE", + "loc": "101:26-101:27" + }, + { + "token": [ + "LIDENT", + "println" + ], + "loc": "102:5-102:12" + }, + { + "token": "LPAREN", + "loc": "102:12-102:13" + }, + { + "token": [ + "LIDENT", + "lexbuf" + ], + "loc": "102:13-102:19" + }, + { + "token": [ + "DOT_LIDENT", + "clear_count" + ], + "loc": "102:20-102:31" + }, + { + "token": "RPAREN", + "loc": "102:31-102:32" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "102:32-102:32" + }, + { + "token": "NEWLINE", + "loc": "102:32-102:33" + }, + { + "token": [ + "LIDENT", + "println" + ], + "loc": "103:5-103:12" + }, + { + "token": "LPAREN", + "loc": "103:12-103:13" + }, + { + "token": [ + "LIDENT", + "lexbuf" + ], + "loc": "103:13-103:19" + }, + { + "token": [ + "DOT_LIDENT", + "refill_count" + ], + "loc": "103:20-103:32" + }, + { + "token": "RPAREN", + "loc": "103:32-103:33" + }, + { + "token": "NEWLINE", + "loc": "103:33-103:34" + }, + { + "token": "RBRACE", + "loc": "104:3-104:4" + }, + { + "token": "RPAREN", + "loc": "104:4-104:5" + }, + { + "token": "NEWLINE", + "loc": "104:5-104:6" + }, + { + "token": "RBRACE", + "loc": "105:1-105:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "105:2-105:2" + }, + { + "token": "NEWLINE", + "loc": "105:2-105:3" + }, + { + "token": "EOF", + "loc": "106:1-106:1" + } +] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/pipeline_test_lisp_tokenizer.json b/test/sync_test/__snapshot__/pipeline_test_lisp_tokenizer.json index 7ea780a4..1d400bed 100644 --- a/test/sync_test/__snapshot__/pipeline_test_lisp_tokenizer.json +++ b/test/sync_test/__snapshot__/pipeline_test_lisp_tokenizer.json @@ -461,7 +461,8 @@ "kind": "Expr::Array::ExprList", "loc": null, "children": [] - } + }, + "is_iter": false } }, "body": { @@ -1801,71 +1802,137 @@ "loc": null, "children": { "value": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", - "loc": null, - "children": { - "value": "lex_token" - } - } + "value": "to_result" } } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", "loc": null, - "children": [ - { - "kind": "Argument", + "children": { + "value": { + "kind": "Expr::Function", "loc": null, "children": { - "value": { - "kind": "Expr::Constant", + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "constant": { - "kind": "Constant::String", + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Apply", "loc": null, "children": { - "value": " (1 2 (a b) (2) 3)" + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "lex_token" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": " (1 2 (a b) (2) 3)" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } } - } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } - ] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} + } } - } + ] }, - "kind": { - "kind": "TryOperatorKind::Question", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -1921,71 +1988,137 @@ "loc": null, "children": { "value": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", - "loc": null, - "children": { - "value": "lex_token" - } - } + "value": "to_result" } } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", "loc": null, - "children": [ - { - "kind": "Argument", + "children": { + "value": { + "kind": "Expr::Function", "loc": null, "children": { - "value": { - "kind": "Expr::Constant", + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "constant": { - "kind": "Constant::String", + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Apply", "loc": null, "children": { - "value": " (1 2 左括号a 右括号b) (2) 3)" + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "lex_token" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": " (1 2 左括号a 右括号b) (2) 3)" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } } - } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } - ] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} + } } - } + ] }, - "kind": { - "kind": "TryOperatorKind::Question", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -2012,5 +2145,524 @@ } } } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "to_result" + } + }, + "has_error": null, + "is_async": null, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "f" + } + }, + "ty": { + "kind": "Type::Arrow", + "loc": null, + "children": { + "args": { + "kind": "Type::Arrow::ArgList", + "loc": null, + "children": [] + }, + "res": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "T" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "err": { + "kind": "ErrorType::ErrorType", + "loc": null, + "children": { + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "E" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + "is_async": null + } + } + } + } + ] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [ + { + "kind": "TypeVarBinder", + "loc": null, + "children": { + "name": "T", + "constraints": { + "kind": "TypeVarBinder::TypeVarConstraintList", + "loc": null, + "children": [] + } + } + }, + { + "kind": "TypeVarBinder", + "loc": null, + "children": { + "name": "E", + "constraints": { + "kind": "TypeVarBinder::TypeVarConstraintList", + "loc": null, + "children": [ + { + "kind": "TypeVarConstraint", + "loc": null, + "children": { + "trait": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Error" + } + } + } + } + ] + } + } + } + ] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [ + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "T" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "E" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + ] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::Try", + "loc": null, + "children": { + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "f" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "catch": { + "kind": "Expr::Try::CaseList", + "loc": null, + "children": [ + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "err" + } + } + } + }, + "guard": null, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Err" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::TypeName", + "loc": null, + "children": { + "value": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + }, + "is_object": false + } + } + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "err" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + ] + }, + "catch_all": false, + "try_else": { + "kind": "Expr::Try::CaseList", + "loc": null, + "children": [ + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "value" + } + } + } + }, + "guard": null, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Ok" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::TypeName", + "loc": null, + "children": { + "value": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + }, + "is_object": false + } + } + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "value" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + ] + }, + "has_try": true + } + } + } + } + } } ] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/pipeline_test_lisp_tokenizer.mbt b/test/sync_test/__snapshot__/pipeline_test_lisp_tokenizer.mbt index 523dbecc..d599be3d 100644 --- a/test/sync_test/__snapshot__/pipeline_test_lisp_tokenizer.mbt +++ b/test/sync_test/__snapshot__/pipeline_test_lisp_tokenizer.mbt @@ -41,6 +41,15 @@ fn lex_token(str : StringView) -> Array[Token] raise { fn main { - debug(try? lex_token(" (1 2 (a b) (2) 3)")) - debug(try? lex_token(" (1 2 左括号a 右括号b) (2) 3)")) + debug(to_result(() => lex_token(" (1 2 (a b) (2) 3)"))) + debug(to_result(() => lex_token(" (1 2 左括号a 右括号b) (2) 3)"))) +} + +fn[T, E : Error] to_result(f : () -> T raise E) -> Result[T, E] { + try f() + catch { + err => Result::Err(err) + } noraise { + value => Result::Ok(value) + } } diff --git a/test/sync_test/__snapshot__/pipeline_test_lisp_tokenizer.mbt.tokens.json b/test/sync_test/__snapshot__/pipeline_test_lisp_tokenizer.mbt.tokens.json index f1aa2c39..44968ecb 100644 --- a/test/sync_test/__snapshot__/pipeline_test_lisp_tokenizer.mbt.tokens.json +++ b/test/sync_test/__snapshot__/pipeline_test_lisp_tokenizer.mbt.tokens.json @@ -1209,45 +1209,68 @@ "loc": "44:8-44:9" }, { - "token": "TRY_QUESTION", - "loc": "44:9-44:13" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "44:9-44:18" + }, + { + "token": "LPAREN", + "loc": "44:18-44:19" + }, + { + "token": "LPAREN", + "loc": "44:19-44:20" + }, + { + "token": "RPAREN", + "loc": "44:20-44:21" + }, + { + "token": "FAT_ARROW", + "loc": "44:22-44:24" }, { "token": [ "LIDENT", "lex_token" ], - "loc": "44:14-44:23" + "loc": "44:25-44:34" }, { "token": "LPAREN", - "loc": "44:23-44:24" + "loc": "44:34-44:35" }, { "token": [ "STRING", " (1 2 (a b) (2) 3)" ], - "loc": "44:24-44:46" + "loc": "44:35-44:57" + }, + { + "token": "RPAREN", + "loc": "44:57-44:58" }, { "token": "RPAREN", - "loc": "44:46-44:47" + "loc": "44:58-44:59" }, { "token": "RPAREN", - "loc": "44:47-44:48" + "loc": "44:59-44:60" }, { "token": [ "SEMI", false ], - "loc": "44:48-44:48" + "loc": "44:60-44:60" }, { "token": "NEWLINE", - "loc": "44:48-44:49" + "loc": "44:60-44:61" }, { "token": [ @@ -1261,38 +1284,61 @@ "loc": "45:8-45:9" }, { - "token": "TRY_QUESTION", - "loc": "45:9-45:13" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "45:9-45:18" + }, + { + "token": "LPAREN", + "loc": "45:18-45:19" + }, + { + "token": "LPAREN", + "loc": "45:19-45:20" + }, + { + "token": "RPAREN", + "loc": "45:20-45:21" + }, + { + "token": "FAT_ARROW", + "loc": "45:22-45:24" }, { "token": [ "LIDENT", "lex_token" ], - "loc": "45:14-45:23" + "loc": "45:25-45:34" }, { "token": "LPAREN", - "loc": "45:23-45:24" + "loc": "45:34-45:35" }, { "token": [ "STRING", " (1 2 左括号a 右括号b) (2) 3)" ], - "loc": "45:24-45:51" + "loc": "45:35-45:62" }, { "token": "RPAREN", - "loc": "45:51-45:52" + "loc": "45:62-45:63" }, { "token": "RPAREN", - "loc": "45:52-45:53" + "loc": "45:63-45:64" + }, + { + "token": "RPAREN", + "loc": "45:64-45:65" }, { "token": "NEWLINE", - "loc": "45:53-45:54" + "loc": "45:65-45:66" }, { "token": "RBRACE", @@ -1309,8 +1355,324 @@ "token": "NEWLINE", "loc": "46:2-46:3" }, + { + "token": "NEWLINE", + "loc": "47:1-47:2" + }, + { + "token": "FN", + "loc": "48:1-48:3" + }, + { + "token": "LBRACKET", + "loc": "48:3-48:4" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "48:4-48:5" + }, + { + "token": "COMMA", + "loc": "48:5-48:6" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "48:7-48:8" + }, + { + "token": "COLON", + "loc": "48:9-48:10" + }, + { + "token": [ + "UIDENT", + "Error" + ], + "loc": "48:11-48:16" + }, + { + "token": "RBRACKET", + "loc": "48:16-48:17" + }, + { + "token": [ + "LIDENT", + "to_result" + ], + "loc": "48:18-48:27" + }, + { + "token": "LPAREN", + "loc": "48:27-48:28" + }, + { + "token": [ + "LIDENT", + "f" + ], + "loc": "48:28-48:29" + }, + { + "token": "COLON", + "loc": "48:30-48:31" + }, + { + "token": "LPAREN", + "loc": "48:32-48:33" + }, + { + "token": "RPAREN", + "loc": "48:33-48:34" + }, + { + "token": "THIN_ARROW", + "loc": "48:35-48:37" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "48:38-48:39" + }, + { + "token": "RAISE", + "loc": "48:40-48:45" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "48:46-48:47" + }, + { + "token": "RPAREN", + "loc": "48:47-48:48" + }, + { + "token": "THIN_ARROW", + "loc": "48:49-48:51" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "48:52-48:58" + }, + { + "token": "LBRACKET", + "loc": "48:58-48:59" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "48:59-48:60" + }, + { + "token": "COMMA", + "loc": "48:60-48:61" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "48:62-48:63" + }, + { + "token": "RBRACKET", + "loc": "48:63-48:64" + }, + { + "token": "LBRACE", + "loc": "48:65-48:66" + }, + { + "token": "NEWLINE", + "loc": "48:66-48:67" + }, + { + "token": "TRY", + "loc": "49:3-49:6" + }, + { + "token": [ + "LIDENT", + "f" + ], + "loc": "49:7-49:8" + }, + { + "token": "LPAREN", + "loc": "49:8-49:9" + }, + { + "token": "RPAREN", + "loc": "49:9-49:10" + }, + { + "token": "NEWLINE", + "loc": "49:10-49:11" + }, + { + "token": "CATCH", + "loc": "50:3-50:8" + }, + { + "token": "LBRACE", + "loc": "50:9-50:10" + }, + { + "token": "NEWLINE", + "loc": "50:10-50:11" + }, + { + "token": [ + "LIDENT", + "err" + ], + "loc": "51:5-51:8" + }, + { + "token": "FAT_ARROW", + "loc": "51:9-51:11" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "51:12-51:18" + }, + { + "token": "COLONCOLON", + "loc": "51:18-51:20" + }, + { + "token": [ + "UIDENT", + "Err" + ], + "loc": "51:20-51:23" + }, + { + "token": "LPAREN", + "loc": "51:23-51:24" + }, + { + "token": [ + "LIDENT", + "err" + ], + "loc": "51:24-51:27" + }, + { + "token": "RPAREN", + "loc": "51:27-51:28" + }, + { + "token": "NEWLINE", + "loc": "51:28-51:29" + }, + { + "token": "RBRACE", + "loc": "52:3-52:4" + }, + { + "token": "NORAISE", + "loc": "52:5-52:12" + }, + { + "token": "LBRACE", + "loc": "52:13-52:14" + }, + { + "token": "NEWLINE", + "loc": "52:14-52:15" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "53:5-53:10" + }, + { + "token": "FAT_ARROW", + "loc": "53:11-53:13" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "53:14-53:20" + }, + { + "token": "COLONCOLON", + "loc": "53:20-53:22" + }, + { + "token": [ + "UIDENT", + "Ok" + ], + "loc": "53:22-53:24" + }, + { + "token": "LPAREN", + "loc": "53:24-53:25" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "53:25-53:30" + }, + { + "token": "RPAREN", + "loc": "53:30-53:31" + }, + { + "token": "NEWLINE", + "loc": "53:31-53:32" + }, + { + "token": "RBRACE", + "loc": "54:3-54:4" + }, + { + "token": "NEWLINE", + "loc": "54:4-54:5" + }, + { + "token": "RBRACE", + "loc": "55:1-55:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "55:2-55:2" + }, + { + "token": "NEWLINE", + "loc": "55:2-55:3" + }, { "token": "EOF", - "loc": "47:1-47:1" + "loc": "56:1-56:1" } ] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/pipeline_test_list_comprehension.json b/test/sync_test/__snapshot__/pipeline_test_list_comprehension.json index 305ba141..404d2bc1 100644 --- a/test/sync_test/__snapshot__/pipeline_test_list_comprehension.json +++ b/test/sync_test/__snapshot__/pipeline_test_list_comprehension.json @@ -107,7 +107,8 @@ } } ] - } + }, + "is_iter": false } }, "vis": { @@ -459,7 +460,8 @@ "kind": "Expr::ForEach::ContinueBlock", "loc": null, "children": [] - } + }, + "is_iter": false } }, "guard": null, @@ -662,7 +664,8 @@ "kind": "Expr::ForEach::ContinueBlock", "loc": null, "children": [] - } + }, + "is_iter": false } }, "guard": null, @@ -872,7 +875,8 @@ "kind": "Expr::ForEach::ContinueBlock", "loc": null, "children": [] - } + }, + "is_iter": false } }, "guard": null, @@ -1107,7 +1111,8 @@ "kind": "Expr::ForEach::ContinueBlock", "loc": null, "children": [] - } + }, + "is_iter": false } }, "guard": null, @@ -1385,7 +1390,8 @@ "kind": "Expr::ForEach::ContinueBlock", "loc": null, "children": [] - } + }, + "is_iter": false } }, "guard": null, @@ -1673,7 +1679,8 @@ "kind": "Expr::ForEach::ContinueBlock", "loc": null, "children": [] - } + }, + "is_iter": false } }, "guard": null, @@ -1865,7 +1872,8 @@ "kind": "Expr::ForEach::ContinueBlock", "loc": null, "children": [] - } + }, + "is_iter": false } }, "guard": { @@ -2431,7 +2439,8 @@ } } ] - } + }, + "is_iter": false } }, "guard": null, @@ -2793,7 +2802,8 @@ } } ] - } + }, + "is_iter": false } }, "guard": { @@ -3276,7 +3286,8 @@ } } ] - } + }, + "is_iter": false } }, "guard": null, @@ -3302,37 +3313,18 @@ } }, "body": { - "kind": "Expr::Apply", + "kind": "Expr::Sequence", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", - "loc": null, - "children": { - "id": { - "kind": "Var", - "loc": null, - "children": { - "name": { - "kind": "LongIdent::Ident", - "loc": null, - "children": { - "value": "debug" - } - } - } - } - } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", + "exprs": { + "kind": "Expr::Sequence::ExprList", "loc": null, "children": [ { - "kind": "Argument", + "kind": "Expr::Apply", "loc": null, "children": { - "value": { + "func": { "kind": "Expr::Ident", "loc": null, "children": { @@ -3344,15 +3336,51 @@ "kind": "LongIdent::Ident", "loc": null, "children": { - "value": "fib_alt" + "value": "debug" } } } } } }, - "kind": { - "kind": "ArgumentKind::Positional", + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "fib_alt" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -3360,10 +3388,2175 @@ } ] }, - "attr": { - "kind": "ApplyAttr::NoAttr", + "last_expr": { + "kind": "Expr::Let", "loc": null, - "children": {} + "children": { + "pattern": { + "kind": "Pattern::Any", + "loc": null, + "children": {} + }, + "expr": { + "kind": "Expr::Try", + "loc": null, + "children": { + "body": { + "kind": "Expr::ListComprehension", + "loc": null, + "children": { + "kind": { + "kind": "Expr::ListComprehension::Kind::Foreach", + "loc": null, + "children": { + "binders": { + "kind": "Expr::ForEach::BinderList", + "loc": null, + "children": [ + null + ] + }, + "expr": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "..<" + } + } + } + }, + "lhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "0" + } + } + } + }, + "rhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "10" + } + } + } + } + } + }, + "init": { + "kind": "Expr::ForEach::Init", + "loc": null, + "children": [] + }, + "continue_block": { + "kind": "Expr::ForEach::ContinueBlock", + "loc": null, + "children": [] + }, + "is_iter": false + } + }, + "guard": null, + "body": { + "kind": "Expr::Group", + "loc": null, + "children": { + "expr": { + "kind": "Expr::Raise", + "loc": null, + "children": { + "err_value": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "MyErr" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::NoExtraInfo", + "loc": null, + "children": {} + } + } + } + } + } + } + }, + "group": { + "kind": "Group::Brace", + "loc": null, + "children": {} + } + } + } + } + }, + "catch": { + "kind": "Expr::Try::CaseList", + "loc": null, + "children": [ + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "err" + } + } + } + }, + "guard": null, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "debug" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "err" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + ] + }, + "catch_all": false, + "try_else": { + "kind": "Expr::Try::CaseList", + "loc": null, + "children": [ + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Any", + "loc": null, + "children": {} + }, + "guard": null, + "body": { + "kind": "Expr::Unit", + "loc": null, + "children": { + "faked": false + } + } + } + } + ] + }, + "has_try": true + } + }, + "body": { + "kind": "Expr::Let", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Any", + "loc": null, + "children": {} + }, + "expr": { + "kind": "Expr::Try", + "loc": null, + "children": { + "body": { + "kind": "Expr::ListComprehension", + "loc": null, + "children": { + "kind": { + "kind": "Expr::ListComprehension::Kind::Foreach", + "loc": null, + "children": { + "binders": { + "kind": "Expr::ForEach::BinderList", + "loc": null, + "children": [ + null + ] + }, + "expr": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "arr" + } + } + } + } + } + }, + "init": { + "kind": "Expr::ForEach::Init", + "loc": null, + "children": [] + }, + "continue_block": { + "kind": "Expr::ForEach::ContinueBlock", + "loc": null, + "children": [] + }, + "is_iter": false + } + }, + "guard": null, + "body": { + "kind": "Expr::Group", + "loc": null, + "children": { + "expr": { + "kind": "Expr::Raise", + "loc": null, + "children": { + "err_value": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "MyErr" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::NoExtraInfo", + "loc": null, + "children": {} + } + } + } + } + } + } + }, + "group": { + "kind": "Group::Brace", + "loc": null, + "children": {} + } + } + } + } + }, + "catch": { + "kind": "Expr::Try::CaseList", + "loc": null, + "children": [ + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "err" + } + } + } + }, + "guard": null, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "debug" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "err" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + ] + }, + "catch_all": false, + "try_else": { + "kind": "Expr::Try::CaseList", + "loc": null, + "children": [ + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Any", + "loc": null, + "children": {} + }, + "guard": null, + "body": { + "kind": "Expr::Unit", + "loc": null, + "children": { + "faked": false + } + } + } + } + ] + }, + "has_try": true + } + }, + "body": { + "kind": "Expr::Let", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Any", + "loc": null, + "children": {} + }, + "expr": { + "kind": "Expr::Try", + "loc": null, + "children": { + "body": { + "kind": "Expr::ListComprehension", + "loc": null, + "children": { + "kind": { + "kind": "Expr::ListComprehension::Kind::Foreach", + "loc": null, + "children": { + "binders": { + "kind": "Expr::ForEach::BinderList", + "loc": null, + "children": [ + null + ] + }, + "expr": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "map" + } + } + } + } + } + }, + "init": { + "kind": "Expr::ForEach::Init", + "loc": null, + "children": [] + }, + "continue_block": { + "kind": "Expr::ForEach::ContinueBlock", + "loc": null, + "children": [] + }, + "is_iter": false + } + }, + "guard": null, + "body": { + "kind": "Expr::Group", + "loc": null, + "children": { + "expr": { + "kind": "Expr::Raise", + "loc": null, + "children": { + "err_value": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "MyErr" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::NoExtraInfo", + "loc": null, + "children": {} + } + } + } + } + } + } + }, + "group": { + "kind": "Group::Brace", + "loc": null, + "children": {} + } + } + } + } + }, + "catch": { + "kind": "Expr::Try::CaseList", + "loc": null, + "children": [ + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "err" + } + } + } + }, + "guard": null, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "debug" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "err" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + ] + }, + "catch_all": false, + "try_else": { + "kind": "Expr::Try::CaseList", + "loc": null, + "children": [ + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Any", + "loc": null, + "children": {} + }, + "guard": null, + "body": { + "kind": "Expr::Unit", + "loc": null, + "children": { + "faked": false + } + } + } + } + ] + }, + "has_try": true + } + }, + "body": { + "kind": "Expr::Let", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Any", + "loc": null, + "children": {} + }, + "expr": { + "kind": "Expr::Try", + "loc": null, + "children": { + "body": { + "kind": "Expr::ListComprehension", + "loc": null, + "children": { + "kind": { + "kind": "Expr::ListComprehension::Kind::For", + "loc": null, + "children": { + "binders": { + "kind": "Expr::For::BindingList", + "loc": null, + "children": [ + { + "kind": "For::Binding", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "i" + } + }, + "expr": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "0" + } + } + } + } + } + } + ] + }, + "condition": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "<" + } + } + } + }, + "lhs": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "i" + } + } + } + } + } + }, + "rhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "10" + } + } + } + } + } + }, + "continue_block": { + "kind": "Expr::For::ContBindingList", + "loc": null, + "children": [ + { + "kind": "For::ContBinding", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "i" + } + }, + "expr": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "+" + } + } + } + }, + "lhs": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "i" + } + } + } + } + } + }, + "rhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "1" + } + } + } + } + } + } + } + } + ] + }, + "is_iter": false + } + }, + "guard": null, + "body": { + "kind": "Expr::Group", + "loc": null, + "children": { + "expr": { + "kind": "Expr::Raise", + "loc": null, + "children": { + "err_value": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "MyErr" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::NoExtraInfo", + "loc": null, + "children": {} + } + } + } + } + } + } + }, + "group": { + "kind": "Group::Brace", + "loc": null, + "children": {} + } + } + } + } + }, + "catch": { + "kind": "Expr::Try::CaseList", + "loc": null, + "children": [ + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "err" + } + } + } + }, + "guard": null, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "debug" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "err" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + ] + }, + "catch_all": false, + "try_else": { + "kind": "Expr::Try::CaseList", + "loc": null, + "children": [ + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Any", + "loc": null, + "children": {} + }, + "guard": null, + "body": { + "kind": "Expr::Unit", + "loc": null, + "children": { + "faked": false + } + } + } + } + ] + }, + "has_try": true + } + }, + "body": { + "kind": "Expr::Sequence", + "loc": null, + "children": { + "exprs": { + "kind": "Expr::Sequence::ExprList", + "loc": null, + "children": [ + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::ForEach", + "loc": null, + "children": { + "binders": { + "kind": "Expr::ForEach::BinderList", + "loc": null, + "children": [ + null + ] + }, + "expr": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "..<" + } + } + } + }, + "lhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "0" + } + } + } + }, + "rhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "1" + } + } + } + } + } + }, + "init": { + "kind": "Expr::ForEach::Init", + "loc": null, + "children": [] + }, + "continue_block": { + "kind": "Expr::ForEach::ContinueBlock", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Let", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Any", + "loc": null, + "children": {} + }, + "expr": { + "kind": "Expr::ListComprehension", + "loc": null, + "children": { + "kind": { + "kind": "Expr::ListComprehension::Kind::Foreach", + "loc": null, + "children": { + "binders": { + "kind": "Expr::ForEach::BinderList", + "loc": null, + "children": [ + null + ] + }, + "expr": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "..<" + } + } + } + }, + "lhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "0" + } + } + } + }, + "rhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "10" + } + } + } + } + } + }, + "init": { + "kind": "Expr::ForEach::Init", + "loc": null, + "children": [] + }, + "continue_block": { + "kind": "Expr::ForEach::ContinueBlock", + "loc": null, + "children": [] + }, + "is_iter": false + } + }, + "guard": null, + "body": { + "kind": "Expr::Group", + "loc": null, + "children": { + "expr": { + "kind": "Expr::Break", + "loc": null, + "children": { + "arg": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "42" + } + } + } + }, + "label": { + "kind": "Label", + "loc": null, + "children": { + "name": "label" + } + } + } + }, + "group": { + "kind": "Group::Brace", + "loc": null, + "children": {} + } + } + } + } + }, + "body": { + "kind": "Expr::Unit", + "loc": null, + "children": { + "faked": true + } + } + } + }, + "else_block": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "0" + } + } + } + }, + "where_clause": null, + "label": { + "kind": "Label", + "loc": null, + "children": { + "name": "label" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::ForEach", + "loc": null, + "children": { + "binders": { + "kind": "Expr::ForEach::BinderList", + "loc": null, + "children": [ + null + ] + }, + "expr": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "..<" + } + } + } + }, + "lhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "0" + } + } + } + }, + "rhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "1" + } + } + } + } + } + }, + "init": { + "kind": "Expr::ForEach::Init", + "loc": null, + "children": [] + }, + "continue_block": { + "kind": "Expr::ForEach::ContinueBlock", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Let", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Any", + "loc": null, + "children": {} + }, + "expr": { + "kind": "Expr::ListComprehension", + "loc": null, + "children": { + "kind": { + "kind": "Expr::ListComprehension::Kind::Foreach", + "loc": null, + "children": { + "binders": { + "kind": "Expr::ForEach::BinderList", + "loc": null, + "children": [ + null + ] + }, + "expr": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "arr" + } + } + } + } + } + }, + "init": { + "kind": "Expr::ForEach::Init", + "loc": null, + "children": [] + }, + "continue_block": { + "kind": "Expr::ForEach::ContinueBlock", + "loc": null, + "children": [] + }, + "is_iter": false + } + }, + "guard": null, + "body": { + "kind": "Expr::Group", + "loc": null, + "children": { + "expr": { + "kind": "Expr::Break", + "loc": null, + "children": { + "arg": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "42" + } + } + } + }, + "label": { + "kind": "Label", + "loc": null, + "children": { + "name": "label" + } + } + } + }, + "group": { + "kind": "Group::Brace", + "loc": null, + "children": {} + } + } + } + } + }, + "body": { + "kind": "Expr::Unit", + "loc": null, + "children": { + "faked": true + } + } + } + }, + "else_block": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "0" + } + } + } + }, + "where_clause": null, + "label": { + "kind": "Label", + "loc": null, + "children": { + "name": "label" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::ForEach", + "loc": null, + "children": { + "binders": { + "kind": "Expr::ForEach::BinderList", + "loc": null, + "children": [ + null + ] + }, + "expr": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "..<" + } + } + } + }, + "lhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "0" + } + } + } + }, + "rhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "1" + } + } + } + } + } + }, + "init": { + "kind": "Expr::ForEach::Init", + "loc": null, + "children": [] + }, + "continue_block": { + "kind": "Expr::ForEach::ContinueBlock", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Let", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Any", + "loc": null, + "children": {} + }, + "expr": { + "kind": "Expr::ListComprehension", + "loc": null, + "children": { + "kind": { + "kind": "Expr::ListComprehension::Kind::Foreach", + "loc": null, + "children": { + "binders": { + "kind": "Expr::ForEach::BinderList", + "loc": null, + "children": [ + null + ] + }, + "expr": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "map" + } + } + } + } + } + }, + "init": { + "kind": "Expr::ForEach::Init", + "loc": null, + "children": [] + }, + "continue_block": { + "kind": "Expr::ForEach::ContinueBlock", + "loc": null, + "children": [] + }, + "is_iter": false + } + }, + "guard": null, + "body": { + "kind": "Expr::Group", + "loc": null, + "children": { + "expr": { + "kind": "Expr::Break", + "loc": null, + "children": { + "arg": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "42" + } + } + } + }, + "label": { + "kind": "Label", + "loc": null, + "children": { + "name": "label" + } + } + } + }, + "group": { + "kind": "Group::Brace", + "loc": null, + "children": {} + } + } + } + } + }, + "body": { + "kind": "Expr::Unit", + "loc": null, + "children": { + "faked": true + } + } + } + }, + "else_block": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "0" + } + } + } + }, + "where_clause": null, + "label": { + "kind": "Label", + "loc": null, + "children": { + "name": "label" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + ] + }, + "last_expr": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::ForEach", + "loc": null, + "children": { + "binders": { + "kind": "Expr::ForEach::BinderList", + "loc": null, + "children": [ + null + ] + }, + "expr": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "..<" + } + } + } + }, + "lhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "0" + } + } + } + }, + "rhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "1" + } + } + } + } + } + }, + "init": { + "kind": "Expr::ForEach::Init", + "loc": null, + "children": [] + }, + "continue_block": { + "kind": "Expr::ForEach::ContinueBlock", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Let", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Any", + "loc": null, + "children": {} + }, + "expr": { + "kind": "Expr::ListComprehension", + "loc": null, + "children": { + "kind": { + "kind": "Expr::ListComprehension::Kind::For", + "loc": null, + "children": { + "binders": { + "kind": "Expr::For::BindingList", + "loc": null, + "children": [ + { + "kind": "For::Binding", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "i" + } + }, + "expr": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "0" + } + } + } + } + } + } + ] + }, + "condition": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "<" + } + } + } + }, + "lhs": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "i" + } + } + } + } + } + }, + "rhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "10" + } + } + } + } + } + }, + "continue_block": { + "kind": "Expr::For::ContBindingList", + "loc": null, + "children": [ + { + "kind": "For::ContBinding", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "i" + } + }, + "expr": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "+" + } + } + } + }, + "lhs": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "i" + } + } + } + } + } + }, + "rhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "1" + } + } + } + } + } + } + } + } + ] + }, + "is_iter": false + } + }, + "guard": null, + "body": { + "kind": "Expr::Group", + "loc": null, + "children": { + "expr": { + "kind": "Expr::Break", + "loc": null, + "children": { + "arg": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "42" + } + } + } + }, + "label": { + "kind": "Label", + "loc": null, + "children": { + "name": "label" + } + } + } + }, + "group": { + "kind": "Group::Brace", + "loc": null, + "children": {} + } + } + } + } + }, + "body": { + "kind": "Expr::Unit", + "loc": null, + "children": { + "faked": true + } + } + } + }, + "else_block": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "0" + } + } + } + }, + "where_clause": null, + "label": { + "kind": "Label", + "loc": null, + "children": { + "name": "label" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + } + } + } + } + } + } + } } } } @@ -3408,5 +5601,77 @@ } } } + }, + { + "kind": "Impl::TopTypeDef", + "loc": null, + "children": { + "value": { + "kind": "TypeDecl", + "loc": null, + "children": { + "tycon": "MyErr", + "params": { + "kind": "TypeDecl::ParamList", + "loc": null, + "children": [] + }, + "components": { + "kind": "TypeDesc::Error", + "loc": null, + "children": { + "value": { + "kind": "ExceptionDecl::NoPayload", + "loc": null, + "children": {} + } + } + }, + "attrs": { + "kind": "TypeDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "", + "type_vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "is_declare": false, + "deriving": { + "kind": "TypeDecl::DerivingList", + "loc": null, + "children": [ + { + "kind": "DerivingDirective", + "loc": null, + "children": { + "type_name": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Debug" + } + }, + "is_object": false + } + }, + "args": { + "kind": "DerivingDirective::ArgList", + "loc": null, + "children": [] + } + } + } + ] + } + } + } + } } ] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/pipeline_test_list_comprehension.mbt b/test/sync_test/__snapshot__/pipeline_test_list_comprehension.mbt index 410a8036..724e6115 100644 --- a/test/sync_test/__snapshot__/pipeline_test_list_comprehension.mbt +++ b/test/sync_test/__snapshot__/pipeline_test_list_comprehension.mbt @@ -38,4 +38,79 @@ fn main { p1 ] debug(fib_alt) + + let _ = try [ + for _ in 0..<10 => { raise MyErr } + ] catch { + err => debug(err) + } noraise { + _ => () + } + + let _ = try [ + for _ in arr => { raise MyErr } + ] catch { + err => debug(err) + } noraise { + _ => () + } + + let _ = try [ + for _ in map => { raise MyErr } + ] catch { + err => debug(err) + } noraise { + _ => () + } + + let _ = try [ + for i = 0; i < 10; i = i + 1 => { raise MyErr } + ] catch { + err => debug(err) + } noraise { + _ => () + } + + println(label~: for _ in 0..<1 { + let _ = [ + for _ in 0..<10 => { + break label~ 42 + } + ] + } nobreak { + 0 + }) + + println(label~: for _ in 0..<1 { + let _ = [ + for _ in arr => { + break label~ 42 + } + ] + } nobreak { + 0 + }) + + println(label~: for _ in 0..<1 { + let _ = [ + for _ in map => { + break label~ 42 + } + ] + } nobreak { + 0 + }) + + println(label~: for _ in 0..<1 { + let _ = [ + for i = 0; i < 10; i = i + 1 => { + break label~ 42 + } + ] + } nobreak { + 0 + }) } + +///| +suberror MyErr derive(Debug) diff --git a/test/sync_test/__snapshot__/pipeline_test_list_comprehension.mbt.tokens.json b/test/sync_test/__snapshot__/pipeline_test_list_comprehension.mbt.tokens.json index 541ba0e2..4e4c708c 100644 --- a/test/sync_test/__snapshot__/pipeline_test_list_comprehension.mbt.tokens.json +++ b/test/sync_test/__snapshot__/pipeline_test_list_comprehension.mbt.tokens.json @@ -2091,27 +2091,1757 @@ "token": "RPAREN", "loc": "40:16-40:17" }, + { + "token": [ + "SEMI", + false + ], + "loc": "40:17-40:17" + }, { "token": "NEWLINE", "loc": "40:17-40:18" }, { - "token": "RBRACE", + "token": "NEWLINE", "loc": "41:1-41:2" }, + { + "token": "LET", + "loc": "42:3-42:6" + }, + { + "token": "UNDERSCORE", + "loc": "42:7-42:8" + }, + { + "token": "EQUAL", + "loc": "42:9-42:10" + }, + { + "token": "TRY", + "loc": "42:11-42:14" + }, + { + "token": "LBRACKET", + "loc": "42:15-42:16" + }, + { + "token": "NEWLINE", + "loc": "42:16-42:17" + }, + { + "token": "FOR", + "loc": "43:5-43:8" + }, + { + "token": "UNDERSCORE", + "loc": "43:9-43:10" + }, + { + "token": "IN", + "loc": "43:11-43:13" + }, + { + "token": [ + "INT", + "0" + ], + "loc": "43:14-43:15" + }, + { + "token": "RANGE_EXCLUSIVE", + "loc": "43:15-43:18" + }, + { + "token": [ + "INT", + "10" + ], + "loc": "43:18-43:20" + }, + { + "token": "FAT_ARROW", + "loc": "43:21-43:23" + }, + { + "token": "LBRACE", + "loc": "43:24-43:25" + }, + { + "token": "RAISE", + "loc": "43:26-43:31" + }, + { + "token": [ + "UIDENT", + "MyErr" + ], + "loc": "43:32-43:37" + }, + { + "token": "RBRACE", + "loc": "43:38-43:39" + }, + { + "token": "NEWLINE", + "loc": "43:39-43:40" + }, + { + "token": "RBRACKET", + "loc": "44:3-44:4" + }, + { + "token": "CATCH", + "loc": "44:5-44:10" + }, + { + "token": "LBRACE", + "loc": "44:11-44:12" + }, + { + "token": "NEWLINE", + "loc": "44:12-44:13" + }, + { + "token": [ + "LIDENT", + "err" + ], + "loc": "45:5-45:8" + }, + { + "token": "FAT_ARROW", + "loc": "45:9-45:11" + }, + { + "token": [ + "LIDENT", + "debug" + ], + "loc": "45:12-45:17" + }, + { + "token": "LPAREN", + "loc": "45:17-45:18" + }, + { + "token": [ + "LIDENT", + "err" + ], + "loc": "45:18-45:21" + }, + { + "token": "RPAREN", + "loc": "45:21-45:22" + }, + { + "token": "NEWLINE", + "loc": "45:22-45:23" + }, + { + "token": "RBRACE", + "loc": "46:3-46:4" + }, + { + "token": "NORAISE", + "loc": "46:5-46:12" + }, + { + "token": "LBRACE", + "loc": "46:13-46:14" + }, + { + "token": "NEWLINE", + "loc": "46:14-46:15" + }, + { + "token": "UNDERSCORE", + "loc": "47:5-47:6" + }, + { + "token": "FAT_ARROW", + "loc": "47:7-47:9" + }, + { + "token": "LPAREN", + "loc": "47:10-47:11" + }, + { + "token": "RPAREN", + "loc": "47:11-47:12" + }, + { + "token": "NEWLINE", + "loc": "47:12-47:13" + }, + { + "token": "RBRACE", + "loc": "48:3-48:4" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "48:4-48:4" + }, + { + "token": "NEWLINE", + "loc": "48:4-48:5" + }, + { + "token": "NEWLINE", + "loc": "49:1-49:2" + }, + { + "token": "LET", + "loc": "50:3-50:6" + }, + { + "token": "UNDERSCORE", + "loc": "50:7-50:8" + }, + { + "token": "EQUAL", + "loc": "50:9-50:10" + }, + { + "token": "TRY", + "loc": "50:11-50:14" + }, + { + "token": "LBRACKET", + "loc": "50:15-50:16" + }, + { + "token": "NEWLINE", + "loc": "50:16-50:17" + }, + { + "token": "FOR", + "loc": "51:5-51:8" + }, + { + "token": "UNDERSCORE", + "loc": "51:9-51:10" + }, + { + "token": "IN", + "loc": "51:11-51:13" + }, + { + "token": [ + "LIDENT", + "arr" + ], + "loc": "51:14-51:17" + }, + { + "token": "FAT_ARROW", + "loc": "51:18-51:20" + }, + { + "token": "LBRACE", + "loc": "51:21-51:22" + }, + { + "token": "RAISE", + "loc": "51:23-51:28" + }, + { + "token": [ + "UIDENT", + "MyErr" + ], + "loc": "51:29-51:34" + }, + { + "token": "RBRACE", + "loc": "51:35-51:36" + }, + { + "token": "NEWLINE", + "loc": "51:36-51:37" + }, + { + "token": "RBRACKET", + "loc": "52:3-52:4" + }, + { + "token": "CATCH", + "loc": "52:5-52:10" + }, + { + "token": "LBRACE", + "loc": "52:11-52:12" + }, + { + "token": "NEWLINE", + "loc": "52:12-52:13" + }, + { + "token": [ + "LIDENT", + "err" + ], + "loc": "53:5-53:8" + }, + { + "token": "FAT_ARROW", + "loc": "53:9-53:11" + }, + { + "token": [ + "LIDENT", + "debug" + ], + "loc": "53:12-53:17" + }, + { + "token": "LPAREN", + "loc": "53:17-53:18" + }, + { + "token": [ + "LIDENT", + "err" + ], + "loc": "53:18-53:21" + }, + { + "token": "RPAREN", + "loc": "53:21-53:22" + }, + { + "token": "NEWLINE", + "loc": "53:22-53:23" + }, + { + "token": "RBRACE", + "loc": "54:3-54:4" + }, + { + "token": "NORAISE", + "loc": "54:5-54:12" + }, + { + "token": "LBRACE", + "loc": "54:13-54:14" + }, + { + "token": "NEWLINE", + "loc": "54:14-54:15" + }, + { + "token": "UNDERSCORE", + "loc": "55:5-55:6" + }, + { + "token": "FAT_ARROW", + "loc": "55:7-55:9" + }, + { + "token": "LPAREN", + "loc": "55:10-55:11" + }, + { + "token": "RPAREN", + "loc": "55:11-55:12" + }, + { + "token": "NEWLINE", + "loc": "55:12-55:13" + }, + { + "token": "RBRACE", + "loc": "56:3-56:4" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "56:4-56:4" + }, + { + "token": "NEWLINE", + "loc": "56:4-56:5" + }, + { + "token": "NEWLINE", + "loc": "57:1-57:2" + }, + { + "token": "LET", + "loc": "58:3-58:6" + }, + { + "token": "UNDERSCORE", + "loc": "58:7-58:8" + }, + { + "token": "EQUAL", + "loc": "58:9-58:10" + }, + { + "token": "TRY", + "loc": "58:11-58:14" + }, + { + "token": "LBRACKET", + "loc": "58:15-58:16" + }, + { + "token": "NEWLINE", + "loc": "58:16-58:17" + }, + { + "token": "FOR", + "loc": "59:5-59:8" + }, + { + "token": "UNDERSCORE", + "loc": "59:9-59:10" + }, + { + "token": "IN", + "loc": "59:11-59:13" + }, + { + "token": [ + "LIDENT", + "map" + ], + "loc": "59:14-59:17" + }, + { + "token": "FAT_ARROW", + "loc": "59:18-59:20" + }, + { + "token": "LBRACE", + "loc": "59:21-59:22" + }, + { + "token": "RAISE", + "loc": "59:23-59:28" + }, + { + "token": [ + "UIDENT", + "MyErr" + ], + "loc": "59:29-59:34" + }, + { + "token": "RBRACE", + "loc": "59:35-59:36" + }, + { + "token": "NEWLINE", + "loc": "59:36-59:37" + }, + { + "token": "RBRACKET", + "loc": "60:3-60:4" + }, + { + "token": "CATCH", + "loc": "60:5-60:10" + }, + { + "token": "LBRACE", + "loc": "60:11-60:12" + }, + { + "token": "NEWLINE", + "loc": "60:12-60:13" + }, + { + "token": [ + "LIDENT", + "err" + ], + "loc": "61:5-61:8" + }, + { + "token": "FAT_ARROW", + "loc": "61:9-61:11" + }, + { + "token": [ + "LIDENT", + "debug" + ], + "loc": "61:12-61:17" + }, + { + "token": "LPAREN", + "loc": "61:17-61:18" + }, + { + "token": [ + "LIDENT", + "err" + ], + "loc": "61:18-61:21" + }, + { + "token": "RPAREN", + "loc": "61:21-61:22" + }, + { + "token": "NEWLINE", + "loc": "61:22-61:23" + }, + { + "token": "RBRACE", + "loc": "62:3-62:4" + }, + { + "token": "NORAISE", + "loc": "62:5-62:12" + }, + { + "token": "LBRACE", + "loc": "62:13-62:14" + }, + { + "token": "NEWLINE", + "loc": "62:14-62:15" + }, + { + "token": "UNDERSCORE", + "loc": "63:5-63:6" + }, + { + "token": "FAT_ARROW", + "loc": "63:7-63:9" + }, + { + "token": "LPAREN", + "loc": "63:10-63:11" + }, + { + "token": "RPAREN", + "loc": "63:11-63:12" + }, + { + "token": "NEWLINE", + "loc": "63:12-63:13" + }, + { + "token": "RBRACE", + "loc": "64:3-64:4" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "64:4-64:4" + }, + { + "token": "NEWLINE", + "loc": "64:4-64:5" + }, + { + "token": "NEWLINE", + "loc": "65:1-65:2" + }, + { + "token": "LET", + "loc": "66:3-66:6" + }, + { + "token": "UNDERSCORE", + "loc": "66:7-66:8" + }, + { + "token": "EQUAL", + "loc": "66:9-66:10" + }, + { + "token": "TRY", + "loc": "66:11-66:14" + }, + { + "token": "LBRACKET", + "loc": "66:15-66:16" + }, + { + "token": "NEWLINE", + "loc": "66:16-66:17" + }, + { + "token": "FOR", + "loc": "67:5-67:8" + }, + { + "token": [ + "LIDENT", + "i" + ], + "loc": "67:9-67:10" + }, + { + "token": "EQUAL", + "loc": "67:11-67:12" + }, + { + "token": [ + "INT", + "0" + ], + "loc": "67:13-67:14" + }, + { + "token": [ + "SEMI", + true + ], + "loc": "67:14-67:15" + }, + { + "token": [ + "LIDENT", + "i" + ], + "loc": "67:16-67:17" + }, + { + "token": [ + "INFIX1", + "<" + ], + "loc": "67:18-67:19" + }, + { + "token": [ + "INT", + "10" + ], + "loc": "67:20-67:22" + }, + { + "token": [ + "SEMI", + true + ], + "loc": "67:22-67:23" + }, + { + "token": [ + "LIDENT", + "i" + ], + "loc": "67:24-67:25" + }, + { + "token": "EQUAL", + "loc": "67:26-67:27" + }, + { + "token": [ + "LIDENT", + "i" + ], + "loc": "67:28-67:29" + }, + { + "token": "PLUS", + "loc": "67:30-67:31" + }, + { + "token": [ + "INT", + "1" + ], + "loc": "67:32-67:33" + }, + { + "token": "FAT_ARROW", + "loc": "67:34-67:36" + }, + { + "token": "LBRACE", + "loc": "67:37-67:38" + }, + { + "token": "RAISE", + "loc": "67:39-67:44" + }, + { + "token": [ + "UIDENT", + "MyErr" + ], + "loc": "67:45-67:50" + }, + { + "token": "RBRACE", + "loc": "67:51-67:52" + }, + { + "token": "NEWLINE", + "loc": "67:52-67:53" + }, + { + "token": "RBRACKET", + "loc": "68:3-68:4" + }, + { + "token": "CATCH", + "loc": "68:5-68:10" + }, + { + "token": "LBRACE", + "loc": "68:11-68:12" + }, + { + "token": "NEWLINE", + "loc": "68:12-68:13" + }, + { + "token": [ + "LIDENT", + "err" + ], + "loc": "69:5-69:8" + }, + { + "token": "FAT_ARROW", + "loc": "69:9-69:11" + }, + { + "token": [ + "LIDENT", + "debug" + ], + "loc": "69:12-69:17" + }, + { + "token": "LPAREN", + "loc": "69:17-69:18" + }, + { + "token": [ + "LIDENT", + "err" + ], + "loc": "69:18-69:21" + }, + { + "token": "RPAREN", + "loc": "69:21-69:22" + }, + { + "token": "NEWLINE", + "loc": "69:22-69:23" + }, + { + "token": "RBRACE", + "loc": "70:3-70:4" + }, + { + "token": "NORAISE", + "loc": "70:5-70:12" + }, + { + "token": "LBRACE", + "loc": "70:13-70:14" + }, + { + "token": "NEWLINE", + "loc": "70:14-70:15" + }, + { + "token": "UNDERSCORE", + "loc": "71:5-71:6" + }, + { + "token": "FAT_ARROW", + "loc": "71:7-71:9" + }, + { + "token": "LPAREN", + "loc": "71:10-71:11" + }, + { + "token": "RPAREN", + "loc": "71:11-71:12" + }, + { + "token": "NEWLINE", + "loc": "71:12-71:13" + }, + { + "token": "RBRACE", + "loc": "72:3-72:4" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "72:4-72:4" + }, + { + "token": "NEWLINE", + "loc": "72:4-72:5" + }, + { + "token": "NEWLINE", + "loc": "73:1-73:2" + }, + { + "token": [ + "LIDENT", + "println" + ], + "loc": "74:3-74:10" + }, + { + "token": "LPAREN", + "loc": "74:10-74:11" + }, + { + "token": [ + "POST_LABEL", + "label" + ], + "loc": "74:11-74:17" + }, + { + "token": "COLON", + "loc": "74:17-74:18" + }, + { + "token": "FOR", + "loc": "74:19-74:22" + }, + { + "token": "UNDERSCORE", + "loc": "74:23-74:24" + }, + { + "token": "IN", + "loc": "74:25-74:27" + }, + { + "token": [ + "INT", + "0" + ], + "loc": "74:28-74:29" + }, + { + "token": "RANGE_EXCLUSIVE", + "loc": "74:29-74:32" + }, + { + "token": [ + "INT", + "1" + ], + "loc": "74:32-74:33" + }, + { + "token": "LBRACE", + "loc": "74:34-74:35" + }, + { + "token": "NEWLINE", + "loc": "74:35-74:36" + }, + { + "token": "LET", + "loc": "75:5-75:8" + }, + { + "token": "UNDERSCORE", + "loc": "75:9-75:10" + }, + { + "token": "EQUAL", + "loc": "75:11-75:12" + }, + { + "token": "LBRACKET", + "loc": "75:13-75:14" + }, + { + "token": "NEWLINE", + "loc": "75:14-75:15" + }, + { + "token": "FOR", + "loc": "76:7-76:10" + }, + { + "token": "UNDERSCORE", + "loc": "76:11-76:12" + }, + { + "token": "IN", + "loc": "76:13-76:15" + }, + { + "token": [ + "INT", + "0" + ], + "loc": "76:16-76:17" + }, + { + "token": "RANGE_EXCLUSIVE", + "loc": "76:17-76:20" + }, + { + "token": [ + "INT", + "10" + ], + "loc": "76:20-76:22" + }, + { + "token": "FAT_ARROW", + "loc": "76:23-76:25" + }, + { + "token": "LBRACE", + "loc": "76:26-76:27" + }, + { + "token": "NEWLINE", + "loc": "76:27-76:28" + }, + { + "token": "BREAK", + "loc": "77:9-77:14" + }, + { + "token": [ + "POST_LABEL", + "label" + ], + "loc": "77:15-77:21" + }, + { + "token": [ + "INT", + "42" + ], + "loc": "77:22-77:24" + }, + { + "token": "NEWLINE", + "loc": "77:24-77:25" + }, + { + "token": "RBRACE", + "loc": "78:7-78:8" + }, + { + "token": "NEWLINE", + "loc": "78:8-78:9" + }, + { + "token": "RBRACKET", + "loc": "79:5-79:6" + }, + { + "token": "NEWLINE", + "loc": "79:6-79:7" + }, + { + "token": "RBRACE", + "loc": "80:3-80:4" + }, + { + "token": "NOBREAK", + "loc": "80:5-80:12" + }, + { + "token": "LBRACE", + "loc": "80:13-80:14" + }, + { + "token": "NEWLINE", + "loc": "80:14-80:15" + }, + { + "token": [ + "INT", + "0" + ], + "loc": "81:5-81:6" + }, + { + "token": "NEWLINE", + "loc": "81:6-81:7" + }, + { + "token": "RBRACE", + "loc": "82:3-82:4" + }, + { + "token": "RPAREN", + "loc": "82:4-82:5" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "82:5-82:5" + }, + { + "token": "NEWLINE", + "loc": "82:5-82:6" + }, + { + "token": "NEWLINE", + "loc": "83:1-83:2" + }, + { + "token": [ + "LIDENT", + "println" + ], + "loc": "84:3-84:10" + }, + { + "token": "LPAREN", + "loc": "84:10-84:11" + }, + { + "token": [ + "POST_LABEL", + "label" + ], + "loc": "84:11-84:17" + }, + { + "token": "COLON", + "loc": "84:17-84:18" + }, + { + "token": "FOR", + "loc": "84:19-84:22" + }, + { + "token": "UNDERSCORE", + "loc": "84:23-84:24" + }, + { + "token": "IN", + "loc": "84:25-84:27" + }, + { + "token": [ + "INT", + "0" + ], + "loc": "84:28-84:29" + }, + { + "token": "RANGE_EXCLUSIVE", + "loc": "84:29-84:32" + }, + { + "token": [ + "INT", + "1" + ], + "loc": "84:32-84:33" + }, + { + "token": "LBRACE", + "loc": "84:34-84:35" + }, + { + "token": "NEWLINE", + "loc": "84:35-84:36" + }, + { + "token": "LET", + "loc": "85:5-85:8" + }, + { + "token": "UNDERSCORE", + "loc": "85:9-85:10" + }, + { + "token": "EQUAL", + "loc": "85:11-85:12" + }, + { + "token": "LBRACKET", + "loc": "85:13-85:14" + }, + { + "token": "NEWLINE", + "loc": "85:14-85:15" + }, + { + "token": "FOR", + "loc": "86:7-86:10" + }, + { + "token": "UNDERSCORE", + "loc": "86:11-86:12" + }, + { + "token": "IN", + "loc": "86:13-86:15" + }, + { + "token": [ + "LIDENT", + "arr" + ], + "loc": "86:16-86:19" + }, + { + "token": "FAT_ARROW", + "loc": "86:20-86:22" + }, + { + "token": "LBRACE", + "loc": "86:23-86:24" + }, + { + "token": "NEWLINE", + "loc": "86:24-86:25" + }, + { + "token": "BREAK", + "loc": "87:9-87:14" + }, + { + "token": [ + "POST_LABEL", + "label" + ], + "loc": "87:15-87:21" + }, + { + "token": [ + "INT", + "42" + ], + "loc": "87:22-87:24" + }, + { + "token": "NEWLINE", + "loc": "87:24-87:25" + }, + { + "token": "RBRACE", + "loc": "88:7-88:8" + }, + { + "token": "NEWLINE", + "loc": "88:8-88:9" + }, + { + "token": "RBRACKET", + "loc": "89:5-89:6" + }, + { + "token": "NEWLINE", + "loc": "89:6-89:7" + }, + { + "token": "RBRACE", + "loc": "90:3-90:4" + }, + { + "token": "NOBREAK", + "loc": "90:5-90:12" + }, + { + "token": "LBRACE", + "loc": "90:13-90:14" + }, + { + "token": "NEWLINE", + "loc": "90:14-90:15" + }, + { + "token": [ + "INT", + "0" + ], + "loc": "91:5-91:6" + }, + { + "token": "NEWLINE", + "loc": "91:6-91:7" + }, + { + "token": "RBRACE", + "loc": "92:3-92:4" + }, + { + "token": "RPAREN", + "loc": "92:4-92:5" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "92:5-92:5" + }, + { + "token": "NEWLINE", + "loc": "92:5-92:6" + }, + { + "token": "NEWLINE", + "loc": "93:1-93:2" + }, + { + "token": [ + "LIDENT", + "println" + ], + "loc": "94:3-94:10" + }, + { + "token": "LPAREN", + "loc": "94:10-94:11" + }, + { + "token": [ + "POST_LABEL", + "label" + ], + "loc": "94:11-94:17" + }, + { + "token": "COLON", + "loc": "94:17-94:18" + }, + { + "token": "FOR", + "loc": "94:19-94:22" + }, + { + "token": "UNDERSCORE", + "loc": "94:23-94:24" + }, + { + "token": "IN", + "loc": "94:25-94:27" + }, + { + "token": [ + "INT", + "0" + ], + "loc": "94:28-94:29" + }, + { + "token": "RANGE_EXCLUSIVE", + "loc": "94:29-94:32" + }, + { + "token": [ + "INT", + "1" + ], + "loc": "94:32-94:33" + }, + { + "token": "LBRACE", + "loc": "94:34-94:35" + }, + { + "token": "NEWLINE", + "loc": "94:35-94:36" + }, + { + "token": "LET", + "loc": "95:5-95:8" + }, + { + "token": "UNDERSCORE", + "loc": "95:9-95:10" + }, + { + "token": "EQUAL", + "loc": "95:11-95:12" + }, + { + "token": "LBRACKET", + "loc": "95:13-95:14" + }, + { + "token": "NEWLINE", + "loc": "95:14-95:15" + }, + { + "token": "FOR", + "loc": "96:7-96:10" + }, + { + "token": "UNDERSCORE", + "loc": "96:11-96:12" + }, + { + "token": "IN", + "loc": "96:13-96:15" + }, + { + "token": [ + "LIDENT", + "map" + ], + "loc": "96:16-96:19" + }, + { + "token": "FAT_ARROW", + "loc": "96:20-96:22" + }, + { + "token": "LBRACE", + "loc": "96:23-96:24" + }, + { + "token": "NEWLINE", + "loc": "96:24-96:25" + }, + { + "token": "BREAK", + "loc": "97:9-97:14" + }, + { + "token": [ + "POST_LABEL", + "label" + ], + "loc": "97:15-97:21" + }, + { + "token": [ + "INT", + "42" + ], + "loc": "97:22-97:24" + }, + { + "token": "NEWLINE", + "loc": "97:24-97:25" + }, + { + "token": "RBRACE", + "loc": "98:7-98:8" + }, + { + "token": "NEWLINE", + "loc": "98:8-98:9" + }, + { + "token": "RBRACKET", + "loc": "99:5-99:6" + }, + { + "token": "NEWLINE", + "loc": "99:6-99:7" + }, + { + "token": "RBRACE", + "loc": "100:3-100:4" + }, + { + "token": "NOBREAK", + "loc": "100:5-100:12" + }, + { + "token": "LBRACE", + "loc": "100:13-100:14" + }, + { + "token": "NEWLINE", + "loc": "100:14-100:15" + }, + { + "token": [ + "INT", + "0" + ], + "loc": "101:5-101:6" + }, + { + "token": "NEWLINE", + "loc": "101:6-101:7" + }, + { + "token": "RBRACE", + "loc": "102:3-102:4" + }, + { + "token": "RPAREN", + "loc": "102:4-102:5" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "102:5-102:5" + }, + { + "token": "NEWLINE", + "loc": "102:5-102:6" + }, + { + "token": "NEWLINE", + "loc": "103:1-103:2" + }, + { + "token": [ + "LIDENT", + "println" + ], + "loc": "104:3-104:10" + }, + { + "token": "LPAREN", + "loc": "104:10-104:11" + }, + { + "token": [ + "POST_LABEL", + "label" + ], + "loc": "104:11-104:17" + }, + { + "token": "COLON", + "loc": "104:17-104:18" + }, + { + "token": "FOR", + "loc": "104:19-104:22" + }, + { + "token": "UNDERSCORE", + "loc": "104:23-104:24" + }, + { + "token": "IN", + "loc": "104:25-104:27" + }, + { + "token": [ + "INT", + "0" + ], + "loc": "104:28-104:29" + }, + { + "token": "RANGE_EXCLUSIVE", + "loc": "104:29-104:32" + }, + { + "token": [ + "INT", + "1" + ], + "loc": "104:32-104:33" + }, + { + "token": "LBRACE", + "loc": "104:34-104:35" + }, + { + "token": "NEWLINE", + "loc": "104:35-104:36" + }, + { + "token": "LET", + "loc": "105:5-105:8" + }, + { + "token": "UNDERSCORE", + "loc": "105:9-105:10" + }, + { + "token": "EQUAL", + "loc": "105:11-105:12" + }, + { + "token": "LBRACKET", + "loc": "105:13-105:14" + }, + { + "token": "NEWLINE", + "loc": "105:14-105:15" + }, + { + "token": "FOR", + "loc": "106:7-106:10" + }, + { + "token": [ + "LIDENT", + "i" + ], + "loc": "106:11-106:12" + }, + { + "token": "EQUAL", + "loc": "106:13-106:14" + }, + { + "token": [ + "INT", + "0" + ], + "loc": "106:15-106:16" + }, + { + "token": [ + "SEMI", + true + ], + "loc": "106:16-106:17" + }, + { + "token": [ + "LIDENT", + "i" + ], + "loc": "106:18-106:19" + }, + { + "token": [ + "INFIX1", + "<" + ], + "loc": "106:20-106:21" + }, + { + "token": [ + "INT", + "10" + ], + "loc": "106:22-106:24" + }, + { + "token": [ + "SEMI", + true + ], + "loc": "106:24-106:25" + }, + { + "token": [ + "LIDENT", + "i" + ], + "loc": "106:26-106:27" + }, + { + "token": "EQUAL", + "loc": "106:28-106:29" + }, + { + "token": [ + "LIDENT", + "i" + ], + "loc": "106:30-106:31" + }, + { + "token": "PLUS", + "loc": "106:32-106:33" + }, + { + "token": [ + "INT", + "1" + ], + "loc": "106:34-106:35" + }, + { + "token": "FAT_ARROW", + "loc": "106:36-106:38" + }, + { + "token": "LBRACE", + "loc": "106:39-106:40" + }, + { + "token": "NEWLINE", + "loc": "106:40-106:41" + }, + { + "token": "BREAK", + "loc": "107:9-107:14" + }, + { + "token": [ + "POST_LABEL", + "label" + ], + "loc": "107:15-107:21" + }, + { + "token": [ + "INT", + "42" + ], + "loc": "107:22-107:24" + }, + { + "token": "NEWLINE", + "loc": "107:24-107:25" + }, + { + "token": "RBRACE", + "loc": "108:7-108:8" + }, + { + "token": "NEWLINE", + "loc": "108:8-108:9" + }, + { + "token": "RBRACKET", + "loc": "109:5-109:6" + }, + { + "token": "NEWLINE", + "loc": "109:6-109:7" + }, + { + "token": "RBRACE", + "loc": "110:3-110:4" + }, + { + "token": "NOBREAK", + "loc": "110:5-110:12" + }, + { + "token": "LBRACE", + "loc": "110:13-110:14" + }, + { + "token": "NEWLINE", + "loc": "110:14-110:15" + }, + { + "token": [ + "INT", + "0" + ], + "loc": "111:5-111:6" + }, + { + "token": "NEWLINE", + "loc": "111:6-111:7" + }, + { + "token": "RBRACE", + "loc": "112:3-112:4" + }, + { + "token": "RPAREN", + "loc": "112:4-112:5" + }, + { + "token": "NEWLINE", + "loc": "112:5-112:6" + }, + { + "token": "RBRACE", + "loc": "113:1-113:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "113:2-113:2" + }, + { + "token": "NEWLINE", + "loc": "113:2-113:3" + }, + { + "token": "NEWLINE", + "loc": "114:1-114:2" + }, + { + "token": [ + "COMMENT", + { + "content": "///|", + "kind": [ + "Ownline", + { + "leading_blank_line": true, + "trailing_blank_line": false + } + ], + "consumed_by_docstring": false + } + ], + "loc": "115:1-115:5" + }, + { + "token": "NEWLINE", + "loc": "115:5-115:6" + }, + { + "token": "SUBERROR", + "loc": "116:1-116:9" + }, + { + "token": [ + "UIDENT", + "MyErr" + ], + "loc": "116:10-116:15" + }, + { + "token": "DERIVE", + "loc": "116:16-116:22" + }, + { + "token": "LPAREN", + "loc": "116:22-116:23" + }, + { + "token": [ + "UIDENT", + "Debug" + ], + "loc": "116:23-116:28" + }, + { + "token": "RPAREN", + "loc": "116:28-116:29" + }, { "token": [ "SEMI", false ], - "loc": "41:2-41:2" + "loc": "116:29-116:29" }, { "token": "NEWLINE", - "loc": "41:2-41:3" + "loc": "116:29-116:30" }, { "token": "EOF", - "loc": "42:1-42:1" + "loc": "117:1-117:1" } ] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/pipeline_test_list_comprehension_iter.json b/test/sync_test/__snapshot__/pipeline_test_list_comprehension_iter.json index 772570f8..bc2c1158 100644 --- a/test/sync_test/__snapshot__/pipeline_test_list_comprehension_iter.json +++ b/test/sync_test/__snapshot__/pipeline_test_list_comprehension_iter.json @@ -107,7 +107,8 @@ } } ] - } + }, + "is_iter": false } }, "vis": { @@ -1232,7 +1233,8 @@ "kind": "Expr::ForEach::ContinueBlock", "loc": null, "children": [] - } + }, + "is_iter": true } }, "guard": null, @@ -1426,7 +1428,8 @@ "kind": "Expr::ForEach::ContinueBlock", "loc": null, "children": [] - } + }, + "is_iter": true } }, "guard": null, @@ -1652,7 +1655,8 @@ "kind": "Expr::ForEach::ContinueBlock", "loc": null, "children": [] - } + }, + "is_iter": true } }, "guard": null, @@ -1846,7 +1850,8 @@ "kind": "Expr::ForEach::ContinueBlock", "loc": null, "children": [] - } + }, + "is_iter": true } }, "guard": null, @@ -2166,7 +2171,8 @@ "kind": "Expr::ForEach::ContinueBlock", "loc": null, "children": [] - } + }, + "is_iter": true } }, "guard": { @@ -2497,7 +2503,8 @@ "kind": "Expr::ForEach::ContinueBlock", "loc": null, "children": [] - } + }, + "is_iter": true } }, "guard": null, @@ -2665,7 +2672,8 @@ "kind": "Expr::ForEach::ContinueBlock", "loc": null, "children": [] - } + }, + "is_iter": true } }, "guard": { @@ -2968,7 +2976,8 @@ "kind": "Expr::ForEach::ContinueBlock", "loc": null, "children": [] - } + }, + "is_iter": true } }, "guard": null, @@ -3130,7 +3139,8 @@ "kind": "Expr::ForEach::ContinueBlock", "loc": null, "children": [] - } + }, + "is_iter": true } }, "guard": { @@ -3336,7 +3346,8 @@ "kind": "Expr::ForEach::ContinueBlock", "loc": null, "children": [] - } + }, + "is_iter": true } }, "guard": null, @@ -3547,7 +3558,8 @@ "kind": "Expr::ForEach::ContinueBlock", "loc": null, "children": [] - } + }, + "is_iter": true } }, "guard": null, @@ -3656,69 +3668,14 @@ "loc": null, "children": { "pattern": { - "kind": "Pattern::Constraint", + "kind": "Pattern::Var", "loc": null, "children": { - "pat": { - "kind": "Pattern::Var", + "value": { + "kind": "Binder", "loc": null, "children": { - "value": { - "kind": "Binder", - "loc": null, - "children": { - "name": "nats" - } - } - } - }, - "ty": { - "kind": "Type::Name", - "loc": null, - "children": { - "constr_id": { - "kind": "ConstrId", - "loc": null, - "children": { - "id": { - "kind": "LongIdent::Ident", - "loc": null, - "children": { - "value": "Iter" - } - } - } - }, - "tys": { - "kind": "Type::Name::TypeList", - "loc": null, - "children": [ - { - "kind": "Type::Name", - "loc": null, - "children": { - "constr_id": { - "kind": "ConstrId", - "loc": null, - "children": { - "id": { - "kind": "LongIdent::Ident", - "loc": null, - "children": { - "value": "Int" - } - } - } - }, - "tys": { - "kind": "Type::Name::TypeList", - "loc": null, - "children": [] - } - } - } - ] - } + "name": "nats" } } } @@ -3833,7 +3790,8 @@ } } ] - } + }, + "is_iter": true } }, "guard": null, @@ -3910,69 +3868,14 @@ "loc": null, "children": { "pattern": { - "kind": "Pattern::Constraint", + "kind": "Pattern::Var", "loc": null, "children": { - "pat": { - "kind": "Pattern::Var", + "value": { + "kind": "Binder", "loc": null, "children": { - "value": { - "kind": "Binder", - "loc": null, - "children": { - "name": "evens" - } - } - } - }, - "ty": { - "kind": "Type::Name", - "loc": null, - "children": { - "constr_id": { - "kind": "ConstrId", - "loc": null, - "children": { - "id": { - "kind": "LongIdent::Ident", - "loc": null, - "children": { - "value": "Iter" - } - } - } - }, - "tys": { - "kind": "Type::Name::TypeList", - "loc": null, - "children": [ - { - "kind": "Type::Name", - "loc": null, - "children": { - "constr_id": { - "kind": "ConstrId", - "loc": null, - "children": { - "id": { - "kind": "LongIdent::Ident", - "loc": null, - "children": { - "value": "Int" - } - } - } - }, - "tys": { - "kind": "Type::Name::TypeList", - "loc": null, - "children": [] - } - } - } - ] - } + "name": "evens" } } } @@ -4026,7 +3929,8 @@ "kind": "Expr::ForEach::ContinueBlock", "loc": null, "children": [] - } + }, + "is_iter": true } }, "guard": { @@ -4792,7 +4696,8 @@ } } ] - } + }, + "is_iter": true } }, "guard": null, @@ -5187,7 +5092,8 @@ } } ] - } + }, + "is_iter": true } }, "guard": null, @@ -5523,7 +5429,8 @@ } } ] - } + }, + "is_iter": true } }, "guard": null, diff --git a/test/sync_test/__snapshot__/pipeline_test_list_comprehension_iter.mbt b/test/sync_test/__snapshot__/pipeline_test_list_comprehension_iter.mbt index 24d592f9..89c8cbb6 100644 --- a/test/sync_test/__snapshot__/pipeline_test_list_comprehension_iter.mbt +++ b/test/sync_test/__snapshot__/pipeline_test_list_comprehension_iter.mbt @@ -22,44 +22,44 @@ fn[X : Show] tee(x : X) -> X { ///| fn main { // range - dump_iter([ for x in 0..<3 => tee(x) ]) - dump_iter([ for x in 1..<=4 => tee(x - 1) ]) - dump_iter([ for x in 3>..0 => tee(x) ]) - dump_iter([ for x in 4>=..1 => tee(x - 1) ]) - dump_iter([ for x in tee(0).. x ]) + dump_iter([| for x in 0..<3 => tee(x) |]) + dump_iter([| for x in 1..<=4 => tee(x - 1) |]) + dump_iter([| for x in 3>..0 => tee(x) |]) + dump_iter([| for x in 4>=..1 => tee(x - 1) |]) + dump_iter([| for x in tee(0).. x |]) // array-like - dump_iter([ for x in { println("evaluating arr"); arr } => tee(x) ]) - dump_iter([ for x in arr if map.get(tee(x)) is Some(y) => y ]) - dump_iter([ for i, _ in arr => tee(i) ]) - dump_iter([ for c in "Hello" if !(c is 'A'..='Z') => c ]) - dump_iter([ for b in b"hello" => b ]) + dump_iter([| for x in { println("evaluating arr"); arr } => tee(x) |]) + dump_iter([| for x in arr if map.get(tee(x)) is Some(y) => y |]) + dump_iter([| for i, _ in arr => tee(i) |]) + dump_iter([| for c in "Hello" if !(c is 'A'..='Z') => c |]) + dump_iter([| for b in b"hello" => b |]) // iterator - dump_iter([ for k, v in { println("evaluating iter"); map } => tee("\{k}: \{v}") ]) - let nats : Iter[Int] = [ for i = 0;; i = i + 1 => tee(i) ] - let evens : Iter[Int] = [ + dump_iter([| for k, v in { println("evaluating iter"); map } => tee("\{k}: \{v}") |]) + let nats = [| for i = 0;; i = i + 1 => tee(i) |] + let evens = [| for x in nats if x % 2 == 0 => { println("\{x} is even") x } - ] + |] dump_iter(evens.take(5)) // normal for loop - dump_iter([ + dump_iter([| for i = { println("init"); 0 } { println("condition"); i < 3 } i = { println("update"); i + 1 } => tee(i) - ]) - dump_iter([ + |]) + dump_iter([| for i = 0, x = 1, y = 2 i < 3 i = i + 1, x = y, y = x => (x, y) - ]) - dump_iter([ + |]) + dump_iter([| for i in 0..<10 p1 = 1, p2 = 0 p1 = p1 + p2, p2 = p1 => p1 - ]) + |]) } diff --git a/test/sync_test/__snapshot__/pipeline_test_list_comprehension_iter.mbt.tokens.json b/test/sync_test/__snapshot__/pipeline_test_list_comprehension_iter.mbt.tokens.json index 7c47a4fe..01fdb41f 100644 --- a/test/sync_test/__snapshot__/pipeline_test_list_comprehension_iter.mbt.tokens.json +++ b/test/sync_test/__snapshot__/pipeline_test_list_comprehension_iter.mbt.tokens.json @@ -807,86 +807,86 @@ "loc": "25:12-25:13" }, { - "token": "LBRACKET", - "loc": "25:13-25:14" + "token": "LBRACKET_BAR", + "loc": "25:13-25:15" }, { "token": "FOR", - "loc": "25:15-25:18" + "loc": "25:16-25:19" }, { "token": [ "LIDENT", "x" ], - "loc": "25:19-25:20" + "loc": "25:20-25:21" }, { "token": "IN", - "loc": "25:21-25:23" + "loc": "25:22-25:24" }, { "token": [ "INT", "0" ], - "loc": "25:24-25:25" + "loc": "25:25-25:26" }, { "token": "RANGE_EXCLUSIVE", - "loc": "25:25-25:28" + "loc": "25:26-25:29" }, { "token": [ "INT", "3" ], - "loc": "25:28-25:29" + "loc": "25:29-25:30" }, { "token": "FAT_ARROW", - "loc": "25:30-25:32" + "loc": "25:31-25:33" }, { "token": [ "LIDENT", "tee" ], - "loc": "25:33-25:36" + "loc": "25:34-25:37" }, { "token": "LPAREN", - "loc": "25:36-25:37" + "loc": "25:37-25:38" }, { "token": [ "LIDENT", "x" ], - "loc": "25:37-25:38" + "loc": "25:38-25:39" }, { "token": "RPAREN", - "loc": "25:38-25:39" + "loc": "25:39-25:40" }, { - "token": "RBRACKET", - "loc": "25:40-25:41" + "token": "BAR_RBRACKET", + "loc": "25:41-25:43" }, { "token": "RPAREN", - "loc": "25:41-25:42" + "loc": "25:43-25:44" }, { "token": [ "SEMI", false ], - "loc": "25:42-25:42" + "loc": "25:44-25:44" }, { "token": "NEWLINE", - "loc": "25:42-25:43" + "loc": "25:44-25:45" }, { "token": [ @@ -900,97 +900,97 @@ "loc": "26:12-26:13" }, { - "token": "LBRACKET", - "loc": "26:13-26:14" + "token": "LBRACKET_BAR", + "loc": "26:13-26:15" }, { "token": "FOR", - "loc": "26:15-26:18" + "loc": "26:16-26:19" }, { "token": [ "LIDENT", "x" ], - "loc": "26:19-26:20" + "loc": "26:20-26:21" }, { "token": "IN", - "loc": "26:21-26:23" + "loc": "26:22-26:24" }, { "token": [ "INT", "1" ], - "loc": "26:24-26:25" + "loc": "26:25-26:26" }, { "token": "RANGE_LT_INCLUSIVE", - "loc": "26:25-26:29" + "loc": "26:26-26:30" }, { "token": [ "INT", "4" ], - "loc": "26:29-26:30" + "loc": "26:30-26:31" }, { "token": "FAT_ARROW", - "loc": "26:31-26:33" + "loc": "26:32-26:34" }, { "token": [ "LIDENT", "tee" ], - "loc": "26:34-26:37" + "loc": "26:35-26:38" }, { "token": "LPAREN", - "loc": "26:37-26:38" + "loc": "26:38-26:39" }, { "token": [ "LIDENT", "x" ], - "loc": "26:38-26:39" + "loc": "26:39-26:40" }, { "token": "MINUS", - "loc": "26:40-26:41" + "loc": "26:41-26:42" }, { "token": [ "INT", "1" ], - "loc": "26:42-26:43" + "loc": "26:43-26:44" }, { "token": "RPAREN", - "loc": "26:43-26:44" + "loc": "26:44-26:45" }, { - "token": "RBRACKET", - "loc": "26:45-26:46" + "token": "BAR_RBRACKET", + "loc": "26:46-26:48" }, { "token": "RPAREN", - "loc": "26:46-26:47" + "loc": "26:48-26:49" }, { "token": [ "SEMI", false ], - "loc": "26:47-26:47" + "loc": "26:49-26:49" }, { "token": "NEWLINE", - "loc": "26:47-26:48" + "loc": "26:49-26:50" }, { "token": [ @@ -1004,86 +1004,86 @@ "loc": "27:12-27:13" }, { - "token": "LBRACKET", - "loc": "27:13-27:14" + "token": "LBRACKET_BAR", + "loc": "27:13-27:15" }, { "token": "FOR", - "loc": "27:15-27:18" + "loc": "27:16-27:19" }, { "token": [ "LIDENT", "x" ], - "loc": "27:19-27:20" + "loc": "27:20-27:21" }, { "token": "IN", - "loc": "27:21-27:23" + "loc": "27:22-27:24" }, { "token": [ "INT", "3" ], - "loc": "27:24-27:25" + "loc": "27:25-27:26" }, { "token": "RANGE_EXCLUSIVE_REV", - "loc": "27:25-27:28" + "loc": "27:26-27:29" }, { "token": [ "INT", "0" ], - "loc": "27:28-27:29" + "loc": "27:29-27:30" }, { "token": "FAT_ARROW", - "loc": "27:30-27:32" + "loc": "27:31-27:33" }, { "token": [ "LIDENT", "tee" ], - "loc": "27:33-27:36" + "loc": "27:34-27:37" }, { "token": "LPAREN", - "loc": "27:36-27:37" + "loc": "27:37-27:38" }, { "token": [ "LIDENT", "x" ], - "loc": "27:37-27:38" + "loc": "27:38-27:39" }, { "token": "RPAREN", - "loc": "27:38-27:39" + "loc": "27:39-27:40" }, { - "token": "RBRACKET", - "loc": "27:40-27:41" + "token": "BAR_RBRACKET", + "loc": "27:41-27:43" }, { "token": "RPAREN", - "loc": "27:41-27:42" + "loc": "27:43-27:44" }, { "token": [ "SEMI", false ], - "loc": "27:42-27:42" + "loc": "27:44-27:44" }, { "token": "NEWLINE", - "loc": "27:42-27:43" + "loc": "27:44-27:45" }, { "token": [ @@ -1097,97 +1097,97 @@ "loc": "28:12-28:13" }, { - "token": "LBRACKET", - "loc": "28:13-28:14" + "token": "LBRACKET_BAR", + "loc": "28:13-28:15" }, { "token": "FOR", - "loc": "28:15-28:18" + "loc": "28:16-28:19" }, { "token": [ "LIDENT", "x" ], - "loc": "28:19-28:20" + "loc": "28:20-28:21" }, { "token": "IN", - "loc": "28:21-28:23" + "loc": "28:22-28:24" }, { "token": [ "INT", "4" ], - "loc": "28:24-28:25" + "loc": "28:25-28:26" }, { "token": "RANGE_INCLUSIVE_REV", - "loc": "28:25-28:29" + "loc": "28:26-28:30" }, { "token": [ "INT", "1" ], - "loc": "28:29-28:30" + "loc": "28:30-28:31" }, { "token": "FAT_ARROW", - "loc": "28:31-28:33" + "loc": "28:32-28:34" }, { "token": [ "LIDENT", "tee" ], - "loc": "28:34-28:37" + "loc": "28:35-28:38" }, { "token": "LPAREN", - "loc": "28:37-28:38" + "loc": "28:38-28:39" }, { "token": [ "LIDENT", "x" ], - "loc": "28:38-28:39" + "loc": "28:39-28:40" }, { "token": "MINUS", - "loc": "28:40-28:41" + "loc": "28:41-28:42" }, { "token": [ "INT", "1" ], - "loc": "28:42-28:43" + "loc": "28:43-28:44" }, { "token": "RPAREN", - "loc": "28:43-28:44" + "loc": "28:44-28:45" }, { - "token": "RBRACKET", - "loc": "28:45-28:46" + "token": "BAR_RBRACKET", + "loc": "28:46-28:48" }, { "token": "RPAREN", - "loc": "28:46-28:47" + "loc": "28:48-28:49" }, { "token": [ "SEMI", false ], - "loc": "28:47-28:47" + "loc": "28:49-28:49" }, { "token": "NEWLINE", - "loc": "28:47-28:48" + "loc": "28:49-28:50" }, { "token": [ @@ -1201,160 +1201,160 @@ "loc": "29:12-29:13" }, { - "token": "LBRACKET", - "loc": "29:13-29:14" + "token": "LBRACKET_BAR", + "loc": "29:13-29:15" }, { "token": "FOR", - "loc": "29:15-29:18" + "loc": "29:16-29:19" }, { "token": [ "LIDENT", "x" ], - "loc": "29:19-29:20" + "loc": "29:20-29:21" }, { "token": "IN", - "loc": "29:21-29:23" + "loc": "29:22-29:24" }, { "token": [ "LIDENT", "tee" ], - "loc": "29:24-29:27" + "loc": "29:25-29:28" }, { "token": "LPAREN", - "loc": "29:27-29:28" + "loc": "29:28-29:29" }, { "token": [ "INT", "0" ], - "loc": "29:28-29:29" + "loc": "29:29-29:30" }, { "token": "RPAREN", - "loc": "29:29-29:30" + "loc": "29:30-29:31" }, { "token": "RANGE_EXCLUSIVE", - "loc": "29:30-29:33" + "loc": "29:31-29:34" }, { "token": [ "LIDENT", "tee" ], - "loc": "29:33-29:36" + "loc": "29:34-29:37" }, { "token": "LPAREN", - "loc": "29:36-29:37" + "loc": "29:37-29:38" }, { "token": [ "INT", "10" ], - "loc": "29:37-29:39" + "loc": "29:38-29:40" }, { "token": "RPAREN", - "loc": "29:39-29:40" + "loc": "29:40-29:41" }, { "token": "IF", - "loc": "29:41-29:43" + "loc": "29:42-29:44" }, { "token": "LPAREN", - "loc": "29:44-29:45" + "loc": "29:45-29:46" }, { "token": [ "LIDENT", "tee" ], - "loc": "29:45-29:48" + "loc": "29:46-29:49" }, { "token": "LPAREN", - "loc": "29:48-29:49" + "loc": "29:49-29:50" }, { "token": [ "LIDENT", "x" ], - "loc": "29:49-29:50" + "loc": "29:50-29:51" }, { "token": "RPAREN", - "loc": "29:50-29:51" + "loc": "29:51-29:52" }, { "token": [ "INFIX3", "%" ], - "loc": "29:52-29:53" + "loc": "29:53-29:54" }, { "token": [ "INT", "2" ], - "loc": "29:54-29:55" + "loc": "29:55-29:56" }, { "token": "RPAREN", - "loc": "29:55-29:56" + "loc": "29:56-29:57" }, { "token": "IS", - "loc": "29:57-29:59" + "loc": "29:58-29:60" }, { "token": [ "INT", "0" ], - "loc": "29:60-29:61" + "loc": "29:61-29:62" }, { "token": "FAT_ARROW", - "loc": "29:62-29:64" + "loc": "29:63-29:65" }, { "token": [ "LIDENT", "x" ], - "loc": "29:65-29:66" + "loc": "29:66-29:67" }, { - "token": "RBRACKET", - "loc": "29:67-29:68" + "token": "BAR_RBRACKET", + "loc": "29:68-29:70" }, { "token": "RPAREN", - "loc": "29:68-29:69" + "loc": "29:70-29:71" }, { "token": [ "SEMI", false ], - "loc": "29:69-29:69" + "loc": "29:71-29:71" }, { "token": "NEWLINE", - "loc": "29:69-29:70" + "loc": "29:71-29:72" }, { "token": [ @@ -1389,112 +1389,112 @@ "loc": "31:12-31:13" }, { - "token": "LBRACKET", - "loc": "31:13-31:14" + "token": "LBRACKET_BAR", + "loc": "31:13-31:15" }, { "token": "FOR", - "loc": "31:15-31:18" + "loc": "31:16-31:19" }, { "token": [ "LIDENT", "x" ], - "loc": "31:19-31:20" + "loc": "31:20-31:21" }, { "token": "IN", - "loc": "31:21-31:23" + "loc": "31:22-31:24" }, { "token": "LBRACE", - "loc": "31:24-31:25" + "loc": "31:25-31:26" }, { "token": [ "LIDENT", "println" ], - "loc": "31:26-31:33" + "loc": "31:27-31:34" }, { "token": "LPAREN", - "loc": "31:33-31:34" + "loc": "31:34-31:35" }, { "token": [ "STRING", "evaluating arr" ], - "loc": "31:34-31:50" + "loc": "31:35-31:51" }, { "token": "RPAREN", - "loc": "31:50-31:51" + "loc": "31:51-31:52" }, { "token": [ "SEMI", true ], - "loc": "31:51-31:52" + "loc": "31:52-31:53" }, { "token": [ "LIDENT", "arr" ], - "loc": "31:53-31:56" + "loc": "31:54-31:57" }, { "token": "RBRACE", - "loc": "31:57-31:58" + "loc": "31:58-31:59" }, { "token": "FAT_ARROW", - "loc": "31:59-31:61" + "loc": "31:60-31:62" }, { "token": [ "LIDENT", "tee" ], - "loc": "31:62-31:65" + "loc": "31:63-31:66" }, { "token": "LPAREN", - "loc": "31:65-31:66" + "loc": "31:66-31:67" }, { "token": [ "LIDENT", "x" ], - "loc": "31:66-31:67" + "loc": "31:67-31:68" }, { "token": "RPAREN", - "loc": "31:67-31:68" + "loc": "31:68-31:69" }, { - "token": "RBRACKET", - "loc": "31:69-31:70" + "token": "BAR_RBRACKET", + "loc": "31:70-31:72" }, { "token": "RPAREN", - "loc": "31:70-31:71" + "loc": "31:72-31:73" }, { "token": [ "SEMI", false ], - "loc": "31:71-31:71" + "loc": "31:73-31:73" }, { "token": "NEWLINE", - "loc": "31:71-31:72" + "loc": "31:73-31:74" }, { "token": [ @@ -1508,134 +1508,134 @@ "loc": "32:12-32:13" }, { - "token": "LBRACKET", - "loc": "32:13-32:14" + "token": "LBRACKET_BAR", + "loc": "32:13-32:15" }, { "token": "FOR", - "loc": "32:15-32:18" + "loc": "32:16-32:19" }, { "token": [ "LIDENT", "x" ], - "loc": "32:19-32:20" + "loc": "32:20-32:21" }, { "token": "IN", - "loc": "32:21-32:23" + "loc": "32:22-32:24" }, { "token": [ "LIDENT", "arr" ], - "loc": "32:24-32:27" + "loc": "32:25-32:28" }, { "token": "IF", - "loc": "32:28-32:30" + "loc": "32:29-32:31" }, { "token": [ "LIDENT", "map" ], - "loc": "32:31-32:34" + "loc": "32:32-32:35" }, { "token": [ "DOT_LIDENT", "get" ], - "loc": "32:35-32:38" + "loc": "32:36-32:39" }, { "token": "LPAREN", - "loc": "32:38-32:39" + "loc": "32:39-32:40" }, { "token": [ "LIDENT", "tee" ], - "loc": "32:39-32:42" + "loc": "32:40-32:43" }, { "token": "LPAREN", - "loc": "32:42-32:43" + "loc": "32:43-32:44" }, { "token": [ "LIDENT", "x" ], - "loc": "32:43-32:44" + "loc": "32:44-32:45" }, { "token": "RPAREN", - "loc": "32:44-32:45" + "loc": "32:45-32:46" }, { "token": "RPAREN", - "loc": "32:45-32:46" + "loc": "32:46-32:47" }, { "token": "IS", - "loc": "32:47-32:49" + "loc": "32:48-32:50" }, { "token": [ "UIDENT", "Some" ], - "loc": "32:50-32:54" + "loc": "32:51-32:55" }, { "token": "LPAREN", - "loc": "32:54-32:55" + "loc": "32:55-32:56" }, { "token": [ "LIDENT", "y" ], - "loc": "32:55-32:56" + "loc": "32:56-32:57" }, { "token": "RPAREN", - "loc": "32:56-32:57" + "loc": "32:57-32:58" }, { "token": "FAT_ARROW", - "loc": "32:58-32:60" + "loc": "32:59-32:61" }, { "token": [ "LIDENT", "y" ], - "loc": "32:61-32:62" + "loc": "32:62-32:63" }, { - "token": "RBRACKET", - "loc": "32:63-32:64" + "token": "BAR_RBRACKET", + "loc": "32:64-32:66" }, { "token": "RPAREN", - "loc": "32:64-32:65" + "loc": "32:66-32:67" }, { "token": [ "SEMI", false ], - "loc": "32:65-32:65" + "loc": "32:67-32:67" }, { "token": "NEWLINE", - "loc": "32:65-32:66" + "loc": "32:67-32:68" }, { "token": [ @@ -1649,83 +1649,83 @@ "loc": "33:12-33:13" }, { - "token": "LBRACKET", - "loc": "33:13-33:14" + "token": "LBRACKET_BAR", + "loc": "33:13-33:15" }, { "token": "FOR", - "loc": "33:15-33:18" + "loc": "33:16-33:19" }, { "token": [ "LIDENT", "i" ], - "loc": "33:19-33:20" + "loc": "33:20-33:21" }, { "token": "COMMA", - "loc": "33:20-33:21" + "loc": "33:21-33:22" }, { "token": "UNDERSCORE", - "loc": "33:22-33:23" + "loc": "33:23-33:24" }, { "token": "IN", - "loc": "33:24-33:26" + "loc": "33:25-33:27" }, { "token": [ "LIDENT", "arr" ], - "loc": "33:27-33:30" + "loc": "33:28-33:31" }, { "token": "FAT_ARROW", - "loc": "33:31-33:33" + "loc": "33:32-33:34" }, { "token": [ "LIDENT", "tee" ], - "loc": "33:34-33:37" + "loc": "33:35-33:38" }, { "token": "LPAREN", - "loc": "33:37-33:38" + "loc": "33:38-33:39" }, { "token": [ "LIDENT", "i" ], - "loc": "33:38-33:39" + "loc": "33:39-33:40" }, { "token": "RPAREN", - "loc": "33:39-33:40" + "loc": "33:40-33:41" }, { - "token": "RBRACKET", - "loc": "33:41-33:42" + "token": "BAR_RBRACKET", + "loc": "33:42-33:44" }, { "token": "RPAREN", - "loc": "33:42-33:43" + "loc": "33:44-33:45" }, { "token": [ "SEMI", false ], - "loc": "33:43-33:43" + "loc": "33:45-33:45" }, { "token": "NEWLINE", - "loc": "33:43-33:44" + "loc": "33:45-33:46" }, { "token": [ @@ -1739,105 +1739,105 @@ "loc": "34:12-34:13" }, { - "token": "LBRACKET", - "loc": "34:13-34:14" + "token": "LBRACKET_BAR", + "loc": "34:13-34:15" }, { "token": "FOR", - "loc": "34:15-34:18" + "loc": "34:16-34:19" }, { "token": [ "LIDENT", "c" ], - "loc": "34:19-34:20" + "loc": "34:20-34:21" }, { "token": "IN", - "loc": "34:21-34:23" + "loc": "34:22-34:24" }, { "token": [ "STRING", "Hello" ], - "loc": "34:24-34:31" + "loc": "34:25-34:32" }, { "token": "IF", - "loc": "34:32-34:34" + "loc": "34:33-34:35" }, { "token": "EXCLAMATION", - "loc": "34:35-34:36" + "loc": "34:36-34:37" }, { "token": "LPAREN", - "loc": "34:36-34:37" + "loc": "34:37-34:38" }, { "token": [ "LIDENT", "c" ], - "loc": "34:37-34:38" + "loc": "34:38-34:39" }, { "token": "IS", - "loc": "34:39-34:41" + "loc": "34:40-34:42" }, { "token": [ "CHAR", "A" ], - "loc": "34:42-34:45" + "loc": "34:43-34:46" }, { "token": "RANGE_INCLUSIVE", - "loc": "34:45-34:48" + "loc": "34:46-34:49" }, { "token": [ "CHAR", "Z" ], - "loc": "34:48-34:51" + "loc": "34:49-34:52" }, { "token": "RPAREN", - "loc": "34:51-34:52" + "loc": "34:52-34:53" }, { "token": "FAT_ARROW", - "loc": "34:53-34:55" + "loc": "34:54-34:56" }, { "token": [ "LIDENT", "c" ], - "loc": "34:56-34:57" + "loc": "34:57-34:58" }, { - "token": "RBRACKET", - "loc": "34:58-34:59" + "token": "BAR_RBRACKET", + "loc": "34:59-34:61" }, { "token": "RPAREN", - "loc": "34:59-34:60" + "loc": "34:61-34:62" }, { "token": [ "SEMI", false ], - "loc": "34:60-34:60" + "loc": "34:62-34:62" }, { "token": "NEWLINE", - "loc": "34:60-34:61" + "loc": "34:62-34:63" }, { "token": [ @@ -1851,60 +1851,60 @@ "loc": "35:12-35:13" }, { - "token": "LBRACKET", - "loc": "35:13-35:14" + "token": "LBRACKET_BAR", + "loc": "35:13-35:15" }, { "token": "FOR", - "loc": "35:15-35:18" + "loc": "35:16-35:19" }, { "token": [ "LIDENT", "b" ], - "loc": "35:19-35:20" + "loc": "35:20-35:21" }, { "token": "IN", - "loc": "35:21-35:23" + "loc": "35:22-35:24" }, { "token": [ "BYTES", "hello" ], - "loc": "35:24-35:32" + "loc": "35:25-35:33" }, { "token": "FAT_ARROW", - "loc": "35:33-35:35" + "loc": "35:34-35:36" }, { "token": [ "LIDENT", "b" ], - "loc": "35:36-35:37" + "loc": "35:37-35:38" }, { - "token": "RBRACKET", - "loc": "35:38-35:39" + "token": "BAR_RBRACKET", + "loc": "35:39-35:41" }, { "token": "RPAREN", - "loc": "35:39-35:40" + "loc": "35:41-35:42" }, { "token": [ "SEMI", false ], - "loc": "35:40-35:40" + "loc": "35:42-35:42" }, { "token": "NEWLINE", - "loc": "35:40-35:41" + "loc": "35:42-35:43" }, { "token": [ @@ -1939,123 +1939,123 @@ "loc": "37:12-37:13" }, { - "token": "LBRACKET", - "loc": "37:13-37:14" + "token": "LBRACKET_BAR", + "loc": "37:13-37:15" }, { "token": "FOR", - "loc": "37:15-37:18" + "loc": "37:16-37:19" }, { "token": [ "LIDENT", "k" ], - "loc": "37:19-37:20" + "loc": "37:20-37:21" }, { "token": "COMMA", - "loc": "37:20-37:21" + "loc": "37:21-37:22" }, { "token": [ "LIDENT", "v" ], - "loc": "37:22-37:23" + "loc": "37:23-37:24" }, { "token": "IN", - "loc": "37:24-37:26" + "loc": "37:25-37:27" }, { "token": "LBRACE", - "loc": "37:27-37:28" + "loc": "37:28-37:29" }, { "token": [ "LIDENT", "println" ], - "loc": "37:29-37:36" + "loc": "37:30-37:37" }, { "token": "LPAREN", - "loc": "37:36-37:37" + "loc": "37:37-37:38" }, { "token": [ "STRING", "evaluating iter" ], - "loc": "37:37-37:54" + "loc": "37:38-37:55" }, { "token": "RPAREN", - "loc": "37:54-37:55" + "loc": "37:55-37:56" }, { "token": [ "SEMI", true ], - "loc": "37:55-37:56" + "loc": "37:56-37:57" }, { "token": [ "LIDENT", "map" ], - "loc": "37:57-37:60" + "loc": "37:58-37:61" }, { "token": "RBRACE", - "loc": "37:61-37:62" + "loc": "37:62-37:63" }, { "token": "FAT_ARROW", - "loc": "37:63-37:65" + "loc": "37:64-37:66" }, { "token": [ "LIDENT", "tee" ], - "loc": "37:66-37:69" + "loc": "37:67-37:70" }, { "token": "LPAREN", - "loc": "37:69-37:70" + "loc": "37:70-37:71" }, { "token": [ "INTERP", "\"\\{k}: \\{v}\"" ], - "loc": "37:70-37:82" + "loc": "37:71-37:83" }, { "token": "RPAREN", - "loc": "37:82-37:83" + "loc": "37:83-37:84" }, { - "token": "RBRACKET", - "loc": "37:84-37:85" + "token": "BAR_RBRACKET", + "loc": "37:85-37:87" }, { "token": "RPAREN", - "loc": "37:85-37:86" + "loc": "37:87-37:88" }, { "token": [ "SEMI", false ], - "loc": "37:86-37:86" + "loc": "37:88-37:88" }, { "token": "NEWLINE", - "loc": "37:86-37:87" + "loc": "37:88-37:89" }, { "token": "LET", @@ -2068,145 +2068,119 @@ ], "loc": "38:7-38:11" }, - { - "token": "COLON", - "loc": "38:12-38:13" - }, - { - "token": [ - "UIDENT", - "Iter" - ], - "loc": "38:14-38:18" - }, - { - "token": "LBRACKET", - "loc": "38:18-38:19" - }, - { - "token": [ - "UIDENT", - "Int" - ], - "loc": "38:19-38:22" - }, - { - "token": "RBRACKET", - "loc": "38:22-38:23" - }, { "token": "EQUAL", - "loc": "38:24-38:25" + "loc": "38:12-38:13" }, { - "token": "LBRACKET", - "loc": "38:26-38:27" + "token": "LBRACKET_BAR", + "loc": "38:14-38:16" }, { "token": "FOR", - "loc": "38:28-38:31" + "loc": "38:17-38:20" }, { "token": [ "LIDENT", "i" ], - "loc": "38:32-38:33" + "loc": "38:21-38:22" }, { "token": "EQUAL", - "loc": "38:34-38:35" + "loc": "38:23-38:24" }, { "token": [ "INT", "0" ], - "loc": "38:36-38:37" + "loc": "38:25-38:26" }, { "token": [ "SEMI", true ], - "loc": "38:37-38:38" + "loc": "38:26-38:27" }, { "token": [ "SEMI", true ], - "loc": "38:38-38:39" + "loc": "38:27-38:28" }, { "token": [ "LIDENT", "i" ], - "loc": "38:40-38:41" + "loc": "38:29-38:30" }, { "token": "EQUAL", - "loc": "38:42-38:43" + "loc": "38:31-38:32" }, { "token": [ "LIDENT", "i" ], - "loc": "38:44-38:45" + "loc": "38:33-38:34" }, { "token": "PLUS", - "loc": "38:46-38:47" + "loc": "38:35-38:36" }, { "token": [ "INT", "1" ], - "loc": "38:48-38:49" + "loc": "38:37-38:38" }, { "token": "FAT_ARROW", - "loc": "38:50-38:52" + "loc": "38:39-38:41" }, { "token": [ "LIDENT", "tee" ], - "loc": "38:53-38:56" + "loc": "38:42-38:45" }, { "token": "LPAREN", - "loc": "38:56-38:57" + "loc": "38:45-38:46" }, { "token": [ "LIDENT", "i" ], - "loc": "38:57-38:58" + "loc": "38:46-38:47" }, { "token": "RPAREN", - "loc": "38:58-38:59" + "loc": "38:47-38:48" }, { - "token": "RBRACKET", - "loc": "38:60-38:61" + "token": "BAR_RBRACKET", + "loc": "38:49-38:51" }, { "token": [ "SEMI", false ], - "loc": "38:61-38:61" + "loc": "38:51-38:51" }, { "token": "NEWLINE", - "loc": "38:61-38:62" + "loc": "38:51-38:52" }, { "token": "LET", @@ -2219,43 +2193,17 @@ ], "loc": "39:7-39:12" }, - { - "token": "COLON", - "loc": "39:13-39:14" - }, - { - "token": [ - "UIDENT", - "Iter" - ], - "loc": "39:15-39:19" - }, - { - "token": "LBRACKET", - "loc": "39:19-39:20" - }, - { - "token": [ - "UIDENT", - "Int" - ], - "loc": "39:20-39:23" - }, - { - "token": "RBRACKET", - "loc": "39:23-39:24" - }, { "token": "EQUAL", - "loc": "39:25-39:26" + "loc": "39:13-39:14" }, { - "token": "LBRACKET", - "loc": "39:27-39:28" + "token": "LBRACKET_BAR", + "loc": "39:15-39:17" }, { "token": "NEWLINE", - "loc": "39:28-39:29" + "loc": "39:17-39:18" }, { "token": "FOR", @@ -2383,19 +2331,19 @@ "loc": "43:6-43:7" }, { - "token": "RBRACKET", - "loc": "44:3-44:4" + "token": "BAR_RBRACKET", + "loc": "44:3-44:5" }, { "token": [ "SEMI", false ], - "loc": "44:4-44:4" + "loc": "44:5-44:5" }, { "token": "NEWLINE", - "loc": "44:4-44:5" + "loc": "44:5-44:6" }, { "token": [ @@ -2485,12 +2433,12 @@ "loc": "47:12-47:13" }, { - "token": "LBRACKET", - "loc": "47:13-47:14" + "token": "LBRACKET_BAR", + "loc": "47:13-47:15" }, { "token": "NEWLINE", - "loc": "47:14-47:15" + "loc": "47:15-47:16" }, { "token": "FOR", @@ -2732,23 +2680,23 @@ "loc": "51:49-51:50" }, { - "token": "RBRACKET", - "loc": "52:3-52:4" + "token": "BAR_RBRACKET", + "loc": "52:3-52:5" }, { "token": "RPAREN", - "loc": "52:4-52:5" + "loc": "52:5-52:6" }, { "token": [ "SEMI", false ], - "loc": "52:5-52:5" + "loc": "52:6-52:6" }, { "token": "NEWLINE", - "loc": "52:5-52:6" + "loc": "52:6-52:7" }, { "token": [ @@ -2762,12 +2710,12 @@ "loc": "53:12-53:13" }, { - "token": "LBRACKET", - "loc": "53:13-53:14" + "token": "LBRACKET_BAR", + "loc": "53:13-53:15" }, { "token": "NEWLINE", - "loc": "53:14-53:15" + "loc": "53:15-53:16" }, { "token": "FOR", @@ -2990,23 +2938,23 @@ "loc": "57:14-57:15" }, { - "token": "RBRACKET", - "loc": "58:3-58:4" + "token": "BAR_RBRACKET", + "loc": "58:3-58:5" }, { "token": "RPAREN", - "loc": "58:4-58:5" + "loc": "58:5-58:6" }, { "token": [ "SEMI", false ], - "loc": "58:5-58:5" + "loc": "58:6-58:6" }, { "token": "NEWLINE", - "loc": "58:5-58:6" + "loc": "58:6-58:7" }, { "token": [ @@ -3020,12 +2968,12 @@ "loc": "59:12-59:13" }, { - "token": "LBRACKET", - "loc": "59:13-59:14" + "token": "LBRACKET_BAR", + "loc": "59:13-59:15" }, { "token": "NEWLINE", - "loc": "59:14-59:15" + "loc": "59:15-59:16" }, { "token": "FOR", @@ -3193,16 +3141,16 @@ "loc": "63:9-63:10" }, { - "token": "RBRACKET", - "loc": "64:3-64:4" + "token": "BAR_RBRACKET", + "loc": "64:3-64:5" }, { "token": "RPAREN", - "loc": "64:4-64:5" + "loc": "64:5-64:6" }, { "token": "NEWLINE", - "loc": "64:5-64:6" + "loc": "64:6-64:7" }, { "token": "RBRACE", diff --git a/test/sync_test/__snapshot__/pipeline_test_list_mutual_recursion.json b/test/sync_test/__snapshot__/pipeline_test_list_mutual_recursion.json index f586286e..6cde4035 100644 --- a/test/sync_test/__snapshot__/pipeline_test_list_mutual_recursion.json +++ b/test/sync_test/__snapshot__/pipeline_test_list_mutual_recursion.json @@ -1377,7 +1377,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -1585,7 +1586,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { diff --git a/test/sync_test/__snapshot__/pipeline_test_literal_array.json b/test/sync_test/__snapshot__/pipeline_test_literal_array.json index 864bf54b..3bc4cdab 100644 --- a/test/sync_test/__snapshot__/pipeline_test_literal_array.json +++ b/test/sync_test/__snapshot__/pipeline_test_literal_array.json @@ -132,7 +132,8 @@ "kind": "Expr::Array::ExprList", "loc": null, "children": [] - } + }, + "is_iter": false } }, "body": { @@ -310,7 +311,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { @@ -501,7 +503,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { @@ -705,7 +708,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { @@ -922,7 +926,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { @@ -1152,7 +1157,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { @@ -1421,7 +1427,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { @@ -1685,7 +1692,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { @@ -2008,7 +2016,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { @@ -2472,7 +2481,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { @@ -2737,7 +2747,8 @@ "kind": "Expr::Array::ExprList", "loc": null, "children": [] - } + }, + "is_iter": false } }, "body": { @@ -2915,7 +2926,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { @@ -3106,7 +3118,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { @@ -3310,7 +3323,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { @@ -3527,7 +3541,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { @@ -3757,7 +3772,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { @@ -4026,7 +4042,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { @@ -4290,7 +4307,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { @@ -4613,7 +4631,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { @@ -5077,7 +5096,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { diff --git a/test/sync_test/__snapshot__/pipeline_test_local_type5.mbt b/test/sync_test/__snapshot__/pipeline_test_local_type5.mbt index aa38dd74..8732e50c 100644 --- a/test/sync_test/__snapshot__/pipeline_test_local_type5.mbt +++ b/test/sync_test/__snapshot__/pipeline_test_local_type5.mbt @@ -14,8 +14,8 @@ fn main { raise LE(x) } } - println(to_repr(try? f1(42))) - println(to_repr(try? f1(-1))) + println(to_repr(to_result(() => f1(42)))) + println(to_repr(to_result(() => f1(-1)))) } // test recursive newtype @@ -70,3 +70,12 @@ fn[X: Show, Y: Show] f(a: X, b: Y) -> Unit { fn init { f("xxx", 42) } + +fn[T, E : Error] to_result(f : () -> T raise E) -> Result[T, E] { + try f() + catch { + err => Result::Err(err) + } noraise { + value => Result::Ok(value) + } +} diff --git a/test/sync_test/__snapshot__/pipeline_test_local_type5.mbt.tokens.json b/test/sync_test/__snapshot__/pipeline_test_local_type5.mbt.tokens.json index f233fe7a..8c9c39d8 100644 --- a/test/sync_test/__snapshot__/pipeline_test_local_type5.mbt.tokens.json +++ b/test/sync_test/__snapshot__/pipeline_test_local_type5.mbt.tokens.json @@ -438,49 +438,72 @@ "loc": "17:18-17:19" }, { - "token": "TRY_QUESTION", - "loc": "17:19-17:23" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "17:19-17:28" + }, + { + "token": "LPAREN", + "loc": "17:28-17:29" + }, + { + "token": "LPAREN", + "loc": "17:29-17:30" + }, + { + "token": "RPAREN", + "loc": "17:30-17:31" + }, + { + "token": "FAT_ARROW", + "loc": "17:32-17:34" }, { "token": [ "LIDENT", "f1" ], - "loc": "17:24-17:26" + "loc": "17:35-17:37" }, { "token": "LPAREN", - "loc": "17:26-17:27" + "loc": "17:37-17:38" }, { "token": [ "INT", "42" ], - "loc": "17:27-17:29" + "loc": "17:38-17:40" }, { "token": "RPAREN", - "loc": "17:29-17:30" + "loc": "17:40-17:41" }, { "token": "RPAREN", - "loc": "17:30-17:31" + "loc": "17:41-17:42" }, { "token": "RPAREN", - "loc": "17:31-17:32" + "loc": "17:42-17:43" + }, + { + "token": "RPAREN", + "loc": "17:43-17:44" }, { "token": [ "SEMI", false ], - "loc": "17:32-17:32" + "loc": "17:44-17:44" }, { "token": "NEWLINE", - "loc": "17:32-17:33" + "loc": "17:44-17:45" }, { "token": [ @@ -505,46 +528,69 @@ "loc": "18:18-18:19" }, { - "token": "TRY_QUESTION", - "loc": "18:19-18:23" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "18:19-18:28" + }, + { + "token": "LPAREN", + "loc": "18:28-18:29" + }, + { + "token": "LPAREN", + "loc": "18:29-18:30" + }, + { + "token": "RPAREN", + "loc": "18:30-18:31" + }, + { + "token": "FAT_ARROW", + "loc": "18:32-18:34" }, { "token": [ "LIDENT", "f1" ], - "loc": "18:24-18:26" + "loc": "18:35-18:37" }, { "token": "LPAREN", - "loc": "18:26-18:27" + "loc": "18:37-18:38" }, { "token": "MINUS", - "loc": "18:27-18:28" + "loc": "18:38-18:39" }, { "token": [ "INT", "1" ], - "loc": "18:28-18:29" + "loc": "18:39-18:40" }, { "token": "RPAREN", - "loc": "18:29-18:30" + "loc": "18:40-18:41" }, { "token": "RPAREN", - "loc": "18:30-18:31" + "loc": "18:41-18:42" + }, + { + "token": "RPAREN", + "loc": "18:42-18:43" }, { "token": "RPAREN", - "loc": "18:31-18:32" + "loc": "18:43-18:44" }, { "token": "NEWLINE", - "loc": "18:32-18:33" + "loc": "18:44-18:45" }, { "token": "RBRACE", @@ -2669,8 +2715,324 @@ "token": "NEWLINE", "loc": "72:2-72:3" }, + { + "token": "NEWLINE", + "loc": "73:1-73:2" + }, + { + "token": "FN", + "loc": "74:1-74:3" + }, + { + "token": "LBRACKET", + "loc": "74:3-74:4" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "74:4-74:5" + }, + { + "token": "COMMA", + "loc": "74:5-74:6" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "74:7-74:8" + }, + { + "token": "COLON", + "loc": "74:9-74:10" + }, + { + "token": [ + "UIDENT", + "Error" + ], + "loc": "74:11-74:16" + }, + { + "token": "RBRACKET", + "loc": "74:16-74:17" + }, + { + "token": [ + "LIDENT", + "to_result" + ], + "loc": "74:18-74:27" + }, + { + "token": "LPAREN", + "loc": "74:27-74:28" + }, + { + "token": [ + "LIDENT", + "f" + ], + "loc": "74:28-74:29" + }, + { + "token": "COLON", + "loc": "74:30-74:31" + }, + { + "token": "LPAREN", + "loc": "74:32-74:33" + }, + { + "token": "RPAREN", + "loc": "74:33-74:34" + }, + { + "token": "THIN_ARROW", + "loc": "74:35-74:37" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "74:38-74:39" + }, + { + "token": "RAISE", + "loc": "74:40-74:45" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "74:46-74:47" + }, + { + "token": "RPAREN", + "loc": "74:47-74:48" + }, + { + "token": "THIN_ARROW", + "loc": "74:49-74:51" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "74:52-74:58" + }, + { + "token": "LBRACKET", + "loc": "74:58-74:59" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "74:59-74:60" + }, + { + "token": "COMMA", + "loc": "74:60-74:61" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "74:62-74:63" + }, + { + "token": "RBRACKET", + "loc": "74:63-74:64" + }, + { + "token": "LBRACE", + "loc": "74:65-74:66" + }, + { + "token": "NEWLINE", + "loc": "74:66-74:67" + }, + { + "token": "TRY", + "loc": "75:3-75:6" + }, + { + "token": [ + "LIDENT", + "f" + ], + "loc": "75:7-75:8" + }, + { + "token": "LPAREN", + "loc": "75:8-75:9" + }, + { + "token": "RPAREN", + "loc": "75:9-75:10" + }, + { + "token": "NEWLINE", + "loc": "75:10-75:11" + }, + { + "token": "CATCH", + "loc": "76:3-76:8" + }, + { + "token": "LBRACE", + "loc": "76:9-76:10" + }, + { + "token": "NEWLINE", + "loc": "76:10-76:11" + }, + { + "token": [ + "LIDENT", + "err" + ], + "loc": "77:5-77:8" + }, + { + "token": "FAT_ARROW", + "loc": "77:9-77:11" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "77:12-77:18" + }, + { + "token": "COLONCOLON", + "loc": "77:18-77:20" + }, + { + "token": [ + "UIDENT", + "Err" + ], + "loc": "77:20-77:23" + }, + { + "token": "LPAREN", + "loc": "77:23-77:24" + }, + { + "token": [ + "LIDENT", + "err" + ], + "loc": "77:24-77:27" + }, + { + "token": "RPAREN", + "loc": "77:27-77:28" + }, + { + "token": "NEWLINE", + "loc": "77:28-77:29" + }, + { + "token": "RBRACE", + "loc": "78:3-78:4" + }, + { + "token": "NORAISE", + "loc": "78:5-78:12" + }, + { + "token": "LBRACE", + "loc": "78:13-78:14" + }, + { + "token": "NEWLINE", + "loc": "78:14-78:15" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "79:5-79:10" + }, + { + "token": "FAT_ARROW", + "loc": "79:11-79:13" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "79:14-79:20" + }, + { + "token": "COLONCOLON", + "loc": "79:20-79:22" + }, + { + "token": [ + "UIDENT", + "Ok" + ], + "loc": "79:22-79:24" + }, + { + "token": "LPAREN", + "loc": "79:24-79:25" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "79:25-79:30" + }, + { + "token": "RPAREN", + "loc": "79:30-79:31" + }, + { + "token": "NEWLINE", + "loc": "79:31-79:32" + }, + { + "token": "RBRACE", + "loc": "80:3-80:4" + }, + { + "token": "NEWLINE", + "loc": "80:4-80:5" + }, + { + "token": "RBRACE", + "loc": "81:1-81:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "81:2-81:2" + }, + { + "token": "NEWLINE", + "loc": "81:2-81:3" + }, { "token": "EOF", - "loc": "73:1-73:1" + "loc": "82:1-82:1" } ] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/pipeline_test_local_type6.mbt b/test/sync_test/__snapshot__/pipeline_test_local_type6.mbt index 8d9f2d46..aed2b5ce 100644 --- a/test/sync_test/__snapshot__/pipeline_test_local_type6.mbt +++ b/test/sync_test/__snapshot__/pipeline_test_local_type6.mbt @@ -24,7 +24,7 @@ fn[T : Debug + ToJson + Default + @json.FromJson] id(_x : T) -> Unit { debug(ToJson::to_json(v)) println(to_repr(v.0)) let u = fn(x) raise { @json.from_json(x) } - debug(try? u([1])) + debug(to_result(() => u([1]))) } ///| @@ -41,3 +41,12 @@ fn main { id(1) id2(1) } + +fn[T, E : Error] to_result(f : () -> T raise E) -> Result[T, E] { + try f() + catch { + err => Result::Err(err) + } noraise { + value => Result::Ok(value) + } +} diff --git a/test/sync_test/__snapshot__/pipeline_test_local_type6.mbt.tokens.json b/test/sync_test/__snapshot__/pipeline_test_local_type6.mbt.tokens.json index 531ef5e3..dfdb62ae 100644 --- a/test/sync_test/__snapshot__/pipeline_test_local_type6.mbt.tokens.json +++ b/test/sync_test/__snapshot__/pipeline_test_local_type6.mbt.tokens.json @@ -966,46 +966,69 @@ "loc": "27:8-27:9" }, { - "token": "TRY_QUESTION", - "loc": "27:9-27:13" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "27:9-27:18" + }, + { + "token": "LPAREN", + "loc": "27:18-27:19" + }, + { + "token": "LPAREN", + "loc": "27:19-27:20" + }, + { + "token": "RPAREN", + "loc": "27:20-27:21" + }, + { + "token": "FAT_ARROW", + "loc": "27:22-27:24" }, { "token": [ "LIDENT", "u" ], - "loc": "27:14-27:15" + "loc": "27:25-27:26" }, { "token": "LPAREN", - "loc": "27:15-27:16" + "loc": "27:26-27:27" }, { "token": "LBRACKET", - "loc": "27:16-27:17" + "loc": "27:27-27:28" }, { "token": [ "INT", "1" ], - "loc": "27:17-27:18" + "loc": "27:28-27:29" }, { "token": "RBRACKET", - "loc": "27:18-27:19" + "loc": "27:29-27:30" }, { "token": "RPAREN", - "loc": "27:19-27:20" + "loc": "27:30-27:31" }, { "token": "RPAREN", - "loc": "27:20-27:21" + "loc": "27:31-27:32" + }, + { + "token": "RPAREN", + "loc": "27:32-27:33" }, { "token": "NEWLINE", - "loc": "27:21-27:22" + "loc": "27:33-27:34" }, { "token": "RBRACE", @@ -1590,8 +1613,324 @@ "token": "NEWLINE", "loc": "43:2-43:3" }, + { + "token": "NEWLINE", + "loc": "44:1-44:2" + }, + { + "token": "FN", + "loc": "45:1-45:3" + }, + { + "token": "LBRACKET", + "loc": "45:3-45:4" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "45:4-45:5" + }, + { + "token": "COMMA", + "loc": "45:5-45:6" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "45:7-45:8" + }, + { + "token": "COLON", + "loc": "45:9-45:10" + }, + { + "token": [ + "UIDENT", + "Error" + ], + "loc": "45:11-45:16" + }, + { + "token": "RBRACKET", + "loc": "45:16-45:17" + }, + { + "token": [ + "LIDENT", + "to_result" + ], + "loc": "45:18-45:27" + }, + { + "token": "LPAREN", + "loc": "45:27-45:28" + }, + { + "token": [ + "LIDENT", + "f" + ], + "loc": "45:28-45:29" + }, + { + "token": "COLON", + "loc": "45:30-45:31" + }, + { + "token": "LPAREN", + "loc": "45:32-45:33" + }, + { + "token": "RPAREN", + "loc": "45:33-45:34" + }, + { + "token": "THIN_ARROW", + "loc": "45:35-45:37" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "45:38-45:39" + }, + { + "token": "RAISE", + "loc": "45:40-45:45" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "45:46-45:47" + }, + { + "token": "RPAREN", + "loc": "45:47-45:48" + }, + { + "token": "THIN_ARROW", + "loc": "45:49-45:51" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "45:52-45:58" + }, + { + "token": "LBRACKET", + "loc": "45:58-45:59" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "45:59-45:60" + }, + { + "token": "COMMA", + "loc": "45:60-45:61" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "45:62-45:63" + }, + { + "token": "RBRACKET", + "loc": "45:63-45:64" + }, + { + "token": "LBRACE", + "loc": "45:65-45:66" + }, + { + "token": "NEWLINE", + "loc": "45:66-45:67" + }, + { + "token": "TRY", + "loc": "46:3-46:6" + }, + { + "token": [ + "LIDENT", + "f" + ], + "loc": "46:7-46:8" + }, + { + "token": "LPAREN", + "loc": "46:8-46:9" + }, + { + "token": "RPAREN", + "loc": "46:9-46:10" + }, + { + "token": "NEWLINE", + "loc": "46:10-46:11" + }, + { + "token": "CATCH", + "loc": "47:3-47:8" + }, + { + "token": "LBRACE", + "loc": "47:9-47:10" + }, + { + "token": "NEWLINE", + "loc": "47:10-47:11" + }, + { + "token": [ + "LIDENT", + "err" + ], + "loc": "48:5-48:8" + }, + { + "token": "FAT_ARROW", + "loc": "48:9-48:11" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "48:12-48:18" + }, + { + "token": "COLONCOLON", + "loc": "48:18-48:20" + }, + { + "token": [ + "UIDENT", + "Err" + ], + "loc": "48:20-48:23" + }, + { + "token": "LPAREN", + "loc": "48:23-48:24" + }, + { + "token": [ + "LIDENT", + "err" + ], + "loc": "48:24-48:27" + }, + { + "token": "RPAREN", + "loc": "48:27-48:28" + }, + { + "token": "NEWLINE", + "loc": "48:28-48:29" + }, + { + "token": "RBRACE", + "loc": "49:3-49:4" + }, + { + "token": "NORAISE", + "loc": "49:5-49:12" + }, + { + "token": "LBRACE", + "loc": "49:13-49:14" + }, + { + "token": "NEWLINE", + "loc": "49:14-49:15" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "50:5-50:10" + }, + { + "token": "FAT_ARROW", + "loc": "50:11-50:13" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "50:14-50:20" + }, + { + "token": "COLONCOLON", + "loc": "50:20-50:22" + }, + { + "token": [ + "UIDENT", + "Ok" + ], + "loc": "50:22-50:24" + }, + { + "token": "LPAREN", + "loc": "50:24-50:25" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "50:25-50:30" + }, + { + "token": "RPAREN", + "loc": "50:30-50:31" + }, + { + "token": "NEWLINE", + "loc": "50:31-50:32" + }, + { + "token": "RBRACE", + "loc": "51:3-51:4" + }, + { + "token": "NEWLINE", + "loc": "51:4-51:5" + }, + { + "token": "RBRACE", + "loc": "52:1-52:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "52:2-52:2" + }, + { + "token": "NEWLINE", + "loc": "52:2-52:3" + }, { "token": "EOF", - "loc": "44:1-44:1" + "loc": "53:1-53:1" } ] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/pipeline_test_local_type_in_foreign_impl.mbt b/test/sync_test/__snapshot__/pipeline_test_local_type_in_foreign_impl.mbt index 6a4d9d57..33b07c37 100644 --- a/test/sync_test/__snapshot__/pipeline_test_local_type_in_foreign_impl.mbt +++ b/test/sync_test/__snapshot__/pipeline_test_local_type_in_foreign_impl.mbt @@ -14,5 +14,14 @@ impl @json.FromJson for T with from_json(json, _path) { } fn init { - debug((try? @json.from_json(42) : Result[T, _])) + debug((to_result(() => @json.from_json(42)) : Result[T, _])) +} + +fn[T, E : Error] to_result(f : () -> T raise E) -> Result[T, E] { + try f() + catch { + err => Result::Err(err) + } noraise { + value => Result::Ok(value) + } } diff --git a/test/sync_test/__snapshot__/pipeline_test_local_type_in_foreign_impl.mbt.tokens.json b/test/sync_test/__snapshot__/pipeline_test_local_type_in_foreign_impl.mbt.tokens.json index 48a8b059..bba847df 100644 --- a/test/sync_test/__snapshot__/pipeline_test_local_type_in_foreign_impl.mbt.tokens.json +++ b/test/sync_test/__snapshot__/pipeline_test_local_type_in_foreign_impl.mbt.tokens.json @@ -466,83 +466,106 @@ "loc": "17:9-17:10" }, { - "token": "TRY_QUESTION", - "loc": "17:10-17:14" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "17:10-17:19" + }, + { + "token": "LPAREN", + "loc": "17:19-17:20" + }, + { + "token": "LPAREN", + "loc": "17:20-17:21" + }, + { + "token": "RPAREN", + "loc": "17:21-17:22" + }, + { + "token": "FAT_ARROW", + "loc": "17:23-17:25" }, { "token": [ "PACKAGE_NAME", "json" ], - "loc": "17:15-17:20" + "loc": "17:26-17:31" }, { "token": [ "DOT_LIDENT", "from_json" ], - "loc": "17:21-17:30" + "loc": "17:32-17:41" }, { "token": "LPAREN", - "loc": "17:30-17:31" + "loc": "17:41-17:42" }, { "token": [ "INT", "42" ], - "loc": "17:31-17:33" + "loc": "17:42-17:44" + }, + { + "token": "RPAREN", + "loc": "17:44-17:45" }, { "token": "RPAREN", - "loc": "17:33-17:34" + "loc": "17:45-17:46" }, { "token": "COLON", - "loc": "17:35-17:36" + "loc": "17:47-17:48" }, { "token": [ "UIDENT", "Result" ], - "loc": "17:37-17:43" + "loc": "17:49-17:55" }, { "token": "LBRACKET", - "loc": "17:43-17:44" + "loc": "17:55-17:56" }, { "token": [ "UIDENT", "T" ], - "loc": "17:44-17:45" + "loc": "17:56-17:57" }, { "token": "COMMA", - "loc": "17:45-17:46" + "loc": "17:57-17:58" }, { "token": "UNDERSCORE", - "loc": "17:47-17:48" + "loc": "17:59-17:60" }, { "token": "RBRACKET", - "loc": "17:48-17:49" + "loc": "17:60-17:61" }, { "token": "RPAREN", - "loc": "17:49-17:50" + "loc": "17:61-17:62" }, { "token": "RPAREN", - "loc": "17:50-17:51" + "loc": "17:62-17:63" }, { "token": "NEWLINE", - "loc": "17:51-17:52" + "loc": "17:63-17:64" }, { "token": "RBRACE", @@ -559,8 +582,324 @@ "token": "NEWLINE", "loc": "18:2-18:3" }, + { + "token": "NEWLINE", + "loc": "19:1-19:2" + }, + { + "token": "FN", + "loc": "20:1-20:3" + }, + { + "token": "LBRACKET", + "loc": "20:3-20:4" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "20:4-20:5" + }, + { + "token": "COMMA", + "loc": "20:5-20:6" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "20:7-20:8" + }, + { + "token": "COLON", + "loc": "20:9-20:10" + }, + { + "token": [ + "UIDENT", + "Error" + ], + "loc": "20:11-20:16" + }, + { + "token": "RBRACKET", + "loc": "20:16-20:17" + }, + { + "token": [ + "LIDENT", + "to_result" + ], + "loc": "20:18-20:27" + }, + { + "token": "LPAREN", + "loc": "20:27-20:28" + }, + { + "token": [ + "LIDENT", + "f" + ], + "loc": "20:28-20:29" + }, + { + "token": "COLON", + "loc": "20:30-20:31" + }, + { + "token": "LPAREN", + "loc": "20:32-20:33" + }, + { + "token": "RPAREN", + "loc": "20:33-20:34" + }, + { + "token": "THIN_ARROW", + "loc": "20:35-20:37" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "20:38-20:39" + }, + { + "token": "RAISE", + "loc": "20:40-20:45" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "20:46-20:47" + }, + { + "token": "RPAREN", + "loc": "20:47-20:48" + }, + { + "token": "THIN_ARROW", + "loc": "20:49-20:51" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "20:52-20:58" + }, + { + "token": "LBRACKET", + "loc": "20:58-20:59" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "20:59-20:60" + }, + { + "token": "COMMA", + "loc": "20:60-20:61" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "20:62-20:63" + }, + { + "token": "RBRACKET", + "loc": "20:63-20:64" + }, + { + "token": "LBRACE", + "loc": "20:65-20:66" + }, + { + "token": "NEWLINE", + "loc": "20:66-20:67" + }, + { + "token": "TRY", + "loc": "21:3-21:6" + }, + { + "token": [ + "LIDENT", + "f" + ], + "loc": "21:7-21:8" + }, + { + "token": "LPAREN", + "loc": "21:8-21:9" + }, + { + "token": "RPAREN", + "loc": "21:9-21:10" + }, + { + "token": "NEWLINE", + "loc": "21:10-21:11" + }, + { + "token": "CATCH", + "loc": "22:3-22:8" + }, + { + "token": "LBRACE", + "loc": "22:9-22:10" + }, + { + "token": "NEWLINE", + "loc": "22:10-22:11" + }, + { + "token": [ + "LIDENT", + "err" + ], + "loc": "23:5-23:8" + }, + { + "token": "FAT_ARROW", + "loc": "23:9-23:11" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "23:12-23:18" + }, + { + "token": "COLONCOLON", + "loc": "23:18-23:20" + }, + { + "token": [ + "UIDENT", + "Err" + ], + "loc": "23:20-23:23" + }, + { + "token": "LPAREN", + "loc": "23:23-23:24" + }, + { + "token": [ + "LIDENT", + "err" + ], + "loc": "23:24-23:27" + }, + { + "token": "RPAREN", + "loc": "23:27-23:28" + }, + { + "token": "NEWLINE", + "loc": "23:28-23:29" + }, + { + "token": "RBRACE", + "loc": "24:3-24:4" + }, + { + "token": "NORAISE", + "loc": "24:5-24:12" + }, + { + "token": "LBRACE", + "loc": "24:13-24:14" + }, + { + "token": "NEWLINE", + "loc": "24:14-24:15" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "25:5-25:10" + }, + { + "token": "FAT_ARROW", + "loc": "25:11-25:13" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "25:14-25:20" + }, + { + "token": "COLONCOLON", + "loc": "25:20-25:22" + }, + { + "token": [ + "UIDENT", + "Ok" + ], + "loc": "25:22-25:24" + }, + { + "token": "LPAREN", + "loc": "25:24-25:25" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "25:25-25:30" + }, + { + "token": "RPAREN", + "loc": "25:30-25:31" + }, + { + "token": "NEWLINE", + "loc": "25:31-25:32" + }, + { + "token": "RBRACE", + "loc": "26:3-26:4" + }, + { + "token": "NEWLINE", + "loc": "26:4-26:5" + }, + { + "token": "RBRACE", + "loc": "27:1-27:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "27:2-27:2" + }, + { + "token": "NEWLINE", + "loc": "27:2-27:3" + }, { "token": "EOF", - "loc": "19:1-19:1" + "loc": "28:1-28:1" } ] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/pipeline_test_locals_contify.json b/test/sync_test/__snapshot__/pipeline_test_locals_contify.json new file mode 100644 index 00000000..0f13e9a3 --- /dev/null +++ b/test/sync_test/__snapshot__/pipeline_test_locals_contify.json @@ -0,0 +1,893 @@ +[ + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "rec" + } + }, + "has_error": null, + "is_async": null, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "f" + } + }, + "ty": { + "kind": "Type::Arrow", + "loc": null, + "children": { + "args": { + "kind": "Type::Arrow::ArgList", + "loc": null, + "children": [ + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Int" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + ] + }, + "res": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Int" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "err": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "is_async": null + } + } + } + }, + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "n" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Int" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + } + ] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Unit" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [ + { + "kind": "Attribute", + "loc": null, + "children": { + "raw": "#locals(f)" + } + } + ] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::If", + "loc": null, + "children": { + "cond": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "<=" + } + } + } + }, + "lhs": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "n" + } + } + } + } + } + }, + "rhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "10" + } + } + } + } + } + }, + "ifso": { + "kind": "Expr::ForEach", + "loc": null, + "children": { + "binders": { + "kind": "Expr::ForEach::BinderList", + "loc": null, + "children": [ + { + "kind": "Binder", + "loc": null, + "children": { + "name": "i" + } + } + ] + }, + "expr": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "..<" + } + } + } + }, + "lhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "0" + } + } + } + }, + "rhs": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "n" + } + } + } + } + } + } + } + }, + "init": { + "kind": "Expr::ForEach::Init", + "loc": null, + "children": [] + }, + "continue_block": { + "kind": "Expr::ForEach::ContinueBlock", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "f" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "i" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "else_block": null, + "where_clause": null, + "label": null + } + }, + "ifnot": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "rec" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Function", + "loc": null, + "children": { + "func": { + "kind": "Func::Lambda", + "loc": null, + "children": { + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "i" + } + }, + "ty": null + } + } + ] + }, + "body": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "+" + } + } + } + }, + "lhs": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "i" + } + } + } + } + } + }, + "rhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "1" + } + } + } + } + } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "-" + } + } + } + }, + "lhs": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "n" + } + } + } + } + } + }, + "rhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "1" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + } + } + } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "main" + } + }, + "has_error": null, + "is_async": null, + "decl_params": null, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [] + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "rec" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Function", + "loc": null, + "children": { + "func": { + "kind": "Func::Lambda", + "loc": null, + "children": { + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "i" + } + }, + "ty": null + } + } + ] + }, + "body": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "+" + } + } + } + }, + "lhs": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "i" + } + } + } + } + } + }, + "rhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "1" + } + } + } + } + } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "10" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + } + } +] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/pipeline_test_locals_contify.mbt b/test/sync_test/__snapshot__/pipeline_test_locals_contify.mbt new file mode 100644 index 00000000..3ab5fdfa --- /dev/null +++ b/test/sync_test/__snapshot__/pipeline_test_locals_contify.mbt @@ -0,0 +1,14 @@ +#locals(f) +fn rec(f: (Int) -> Int, n: Int) -> Unit { + if n <= 10 { + for i in 0.. i + 1, n-1) + } +} + +fn main { + rec(i => i + 1, 10) +} diff --git a/test/sync_test/__snapshot__/pipeline_test_locals_contify.mbt.tokens.json b/test/sync_test/__snapshot__/pipeline_test_locals_contify.mbt.tokens.json new file mode 100644 index 00000000..46b96201 --- /dev/null +++ b/test/sync_test/__snapshot__/pipeline_test_locals_contify.mbt.tokens.json @@ -0,0 +1,447 @@ +[ + { + "token": [ + "ATTRIBUTE", + { + "id": "locals", + "dot_id": "", + "raw_payload": "(f)" + } + ], + "loc": "1:1-1:11" + }, + { + "token": "NEWLINE", + "loc": "1:11-1:12" + }, + { + "token": "FN", + "loc": "2:1-2:3" + }, + { + "token": [ + "LIDENT", + "rec" + ], + "loc": "2:4-2:7" + }, + { + "token": "LPAREN", + "loc": "2:7-2:8" + }, + { + "token": [ + "LIDENT", + "f" + ], + "loc": "2:8-2:9" + }, + { + "token": "COLON", + "loc": "2:9-2:10" + }, + { + "token": "LPAREN", + "loc": "2:11-2:12" + }, + { + "token": [ + "UIDENT", + "Int" + ], + "loc": "2:12-2:15" + }, + { + "token": "RPAREN", + "loc": "2:15-2:16" + }, + { + "token": "THIN_ARROW", + "loc": "2:17-2:19" + }, + { + "token": [ + "UIDENT", + "Int" + ], + "loc": "2:20-2:23" + }, + { + "token": "COMMA", + "loc": "2:23-2:24" + }, + { + "token": [ + "LIDENT", + "n" + ], + "loc": "2:25-2:26" + }, + { + "token": "COLON", + "loc": "2:26-2:27" + }, + { + "token": [ + "UIDENT", + "Int" + ], + "loc": "2:28-2:31" + }, + { + "token": "RPAREN", + "loc": "2:31-2:32" + }, + { + "token": "THIN_ARROW", + "loc": "2:33-2:35" + }, + { + "token": [ + "UIDENT", + "Unit" + ], + "loc": "2:36-2:40" + }, + { + "token": "LBRACE", + "loc": "2:41-2:42" + }, + { + "token": "NEWLINE", + "loc": "2:42-2:43" + }, + { + "token": "IF", + "loc": "3:3-3:5" + }, + { + "token": [ + "LIDENT", + "n" + ], + "loc": "3:6-3:7" + }, + { + "token": [ + "INFIX1", + "<=" + ], + "loc": "3:8-3:10" + }, + { + "token": [ + "INT", + "10" + ], + "loc": "3:11-3:13" + }, + { + "token": "LBRACE", + "loc": "3:14-3:15" + }, + { + "token": "NEWLINE", + "loc": "3:15-3:16" + }, + { + "token": "FOR", + "loc": "4:5-4:8" + }, + { + "token": [ + "LIDENT", + "i" + ], + "loc": "4:9-4:10" + }, + { + "token": "IN", + "loc": "4:11-4:13" + }, + { + "token": [ + "INT", + "0" + ], + "loc": "4:14-4:15" + }, + { + "token": "RANGE_EXCLUSIVE", + "loc": "4:15-4:18" + }, + { + "token": [ + "LIDENT", + "n" + ], + "loc": "4:18-4:19" + }, + { + "token": "LBRACE", + "loc": "4:20-4:21" + }, + { + "token": "NEWLINE", + "loc": "4:21-4:22" + }, + { + "token": [ + "LIDENT", + "println" + ], + "loc": "5:7-5:14" + }, + { + "token": "LPAREN", + "loc": "5:14-5:15" + }, + { + "token": [ + "LIDENT", + "f" + ], + "loc": "5:15-5:16" + }, + { + "token": "LPAREN", + "loc": "5:16-5:17" + }, + { + "token": [ + "LIDENT", + "i" + ], + "loc": "5:17-5:18" + }, + { + "token": "RPAREN", + "loc": "5:18-5:19" + }, + { + "token": "RPAREN", + "loc": "5:19-5:20" + }, + { + "token": "NEWLINE", + "loc": "5:20-5:21" + }, + { + "token": "RBRACE", + "loc": "6:5-6:6" + }, + { + "token": "NEWLINE", + "loc": "6:6-6:7" + }, + { + "token": "RBRACE", + "loc": "7:3-7:4" + }, + { + "token": "ELSE", + "loc": "7:5-7:9" + }, + { + "token": "LBRACE", + "loc": "7:10-7:11" + }, + { + "token": "NEWLINE", + "loc": "7:11-7:12" + }, + { + "token": [ + "LIDENT", + "rec" + ], + "loc": "8:5-8:8" + }, + { + "token": "LPAREN", + "loc": "8:8-8:9" + }, + { + "token": [ + "LIDENT", + "i" + ], + "loc": "8:9-8:10" + }, + { + "token": "FAT_ARROW", + "loc": "8:11-8:13" + }, + { + "token": [ + "LIDENT", + "i" + ], + "loc": "8:14-8:15" + }, + { + "token": "PLUS", + "loc": "8:16-8:17" + }, + { + "token": [ + "INT", + "1" + ], + "loc": "8:18-8:19" + }, + { + "token": "COMMA", + "loc": "8:19-8:20" + }, + { + "token": [ + "LIDENT", + "n" + ], + "loc": "8:21-8:22" + }, + { + "token": "MINUS", + "loc": "8:22-8:23" + }, + { + "token": [ + "INT", + "1" + ], + "loc": "8:23-8:24" + }, + { + "token": "RPAREN", + "loc": "8:24-8:25" + }, + { + "token": "NEWLINE", + "loc": "8:25-8:26" + }, + { + "token": "RBRACE", + "loc": "9:3-9:4" + }, + { + "token": "NEWLINE", + "loc": "9:4-9:5" + }, + { + "token": "RBRACE", + "loc": "10:1-10:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "10:2-10:2" + }, + { + "token": "NEWLINE", + "loc": "10:2-10:3" + }, + { + "token": "NEWLINE", + "loc": "11:1-11:2" + }, + { + "token": "FN", + "loc": "12:1-12:3" + }, + { + "token": [ + "LIDENT", + "main" + ], + "loc": "12:4-12:8" + }, + { + "token": "LBRACE", + "loc": "12:9-12:10" + }, + { + "token": "NEWLINE", + "loc": "12:10-12:11" + }, + { + "token": [ + "LIDENT", + "rec" + ], + "loc": "13:3-13:6" + }, + { + "token": "LPAREN", + "loc": "13:6-13:7" + }, + { + "token": [ + "LIDENT", + "i" + ], + "loc": "13:7-13:8" + }, + { + "token": "FAT_ARROW", + "loc": "13:9-13:11" + }, + { + "token": [ + "LIDENT", + "i" + ], + "loc": "13:12-13:13" + }, + { + "token": "PLUS", + "loc": "13:14-13:15" + }, + { + "token": [ + "INT", + "1" + ], + "loc": "13:16-13:17" + }, + { + "token": "COMMA", + "loc": "13:17-13:18" + }, + { + "token": [ + "INT", + "10" + ], + "loc": "13:19-13:21" + }, + { + "token": "RPAREN", + "loc": "13:21-13:22" + }, + { + "token": "NEWLINE", + "loc": "13:22-13:23" + }, + { + "token": "RBRACE", + "loc": "14:1-14:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "14:2-14:2" + }, + { + "token": "NEWLINE", + "loc": "14:2-14:3" + }, + { + "token": "EOF", + "loc": "15:1-15:1" + } +] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/pipeline_test_locals_inline.json b/test/sync_test/__snapshot__/pipeline_test_locals_inline.json index 15758ddd..b173f74d 100644 --- a/test/sync_test/__snapshot__/pipeline_test_locals_inline.json +++ b/test/sync_test/__snapshot__/pipeline_test_locals_inline.json @@ -2095,7 +2095,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -2240,7 +2241,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -2415,7 +2417,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -2724,7 +2727,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -2901,7 +2905,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { diff --git a/test/sync_test/__snapshot__/pipeline_test_long_package.json b/test/sync_test/__snapshot__/pipeline_test_long_package.json index 6d49ffd9..8793ec0c 100644 --- a/test/sync_test/__snapshot__/pipeline_test_long_package.json +++ b/test/sync_test/__snapshot__/pipeline_test_long_package.json @@ -151,7 +151,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { diff --git a/test/sync_test/__snapshot__/pipeline_test_loop_in_tail_rec.json b/test/sync_test/__snapshot__/pipeline_test_loop_in_tail_rec.json index 7ae99356..2a341f44 100644 --- a/test/sync_test/__snapshot__/pipeline_test_loop_in_tail_rec.json +++ b/test/sync_test/__snapshot__/pipeline_test_loop_in_tail_rec.json @@ -1354,7 +1354,8 @@ } } ] - } + }, + "is_iter": false } }, "is_pun": false diff --git a/test/sync_test/__snapshot__/pipeline_test_loop_invariant.json b/test/sync_test/__snapshot__/pipeline_test_loop_invariant.json index a8d8732b..781fae39 100644 --- a/test/sync_test/__snapshot__/pipeline_test_loop_invariant.json +++ b/test/sync_test/__snapshot__/pipeline_test_loop_invariant.json @@ -2131,7 +2131,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { diff --git a/test/sync_test/__snapshot__/pipeline_test_loopify_corner_case.json b/test/sync_test/__snapshot__/pipeline_test_loopify_corner_case.json index f34aa1e2..97d90682 100644 --- a/test/sync_test/__snapshot__/pipeline_test_loopify_corner_case.json +++ b/test/sync_test/__snapshot__/pipeline_test_loopify_corner_case.json @@ -1235,6 +1235,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, diff --git a/test/sync_test/__snapshot__/pipeline_test_map_pattern.json b/test/sync_test/__snapshot__/pipeline_test_map_pattern.json index e291029f..9924c1f0 100644 --- a/test/sync_test/__snapshot__/pipeline_test_map_pattern.json +++ b/test/sync_test/__snapshot__/pipeline_test_map_pattern.json @@ -403,7 +403,8 @@ "kind": "Expr::Array::ExprList", "loc": null, "children": [] - } + }, + "is_iter": false } }, "kind": { @@ -1385,7 +1386,8 @@ "kind": "Expr::Array::ExprList", "loc": null, "children": [] - } + }, + "is_iter": false } }, "kind": { @@ -2732,7 +2734,8 @@ "kind": "Expr::Array::ExprList", "loc": null, "children": [] - } + }, + "is_iter": false } }, "kind": { @@ -3767,7 +3770,8 @@ "kind": "Expr::Array::ExprList", "loc": null, "children": [] - } + }, + "is_iter": false } }, "kind": { diff --git a/test/sync_test/__snapshot__/pipeline_test_map_pattern2.json b/test/sync_test/__snapshot__/pipeline_test_map_pattern2.json index 6f7851dc..37c316f8 100644 --- a/test/sync_test/__snapshot__/pipeline_test_map_pattern2.json +++ b/test/sync_test/__snapshot__/pipeline_test_map_pattern2.json @@ -942,7 +942,8 @@ "kind": "Expr::Array::ExprList", "loc": null, "children": [] - } + }, + "is_iter": false } }, "kind": { diff --git a/test/sync_test/__snapshot__/pipeline_test_match_3.json b/test/sync_test/__snapshot__/pipeline_test_match_3.json index 9aaab30c..c59c812e 100644 --- a/test/sync_test/__snapshot__/pipeline_test_match_3.json +++ b/test/sync_test/__snapshot__/pipeline_test_match_3.json @@ -5983,7 +5983,8 @@ "kind": "Expr::Array::ExprList", "loc": null, "children": [] - } + }, + "is_iter": false } }, "kind": { @@ -6102,7 +6103,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -6221,7 +6223,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -6353,7 +6356,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -6485,7 +6489,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -6617,7 +6622,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -6749,7 +6755,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -6894,7 +6901,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -7059,7 +7067,8 @@ "kind": "Expr::Array::ExprList", "loc": null, "children": [] - } + }, + "is_iter": false } }, "kind": { @@ -7178,7 +7187,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -7310,7 +7320,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -7455,7 +7466,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -7644,7 +7656,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { diff --git a/test/sync_test/__snapshot__/pipeline_test_match_4.json b/test/sync_test/__snapshot__/pipeline_test_match_4.json index aaf79c1c..6d6b29a9 100644 --- a/test/sync_test/__snapshot__/pipeline_test_match_4.json +++ b/test/sync_test/__snapshot__/pipeline_test_match_4.json @@ -2828,7 +2828,8 @@ "kind": "Expr::Array::ExprList", "loc": null, "children": [] - } + }, + "is_iter": false } }, "kind": { @@ -2971,7 +2972,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -3127,7 +3129,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -3296,7 +3299,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -3491,7 +3495,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -3673,7 +3678,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -3802,7 +3808,8 @@ "kind": "Expr::Array::ExprList", "loc": null, "children": [] - } + }, + "is_iter": false } }, "kind": { @@ -3953,7 +3960,8 @@ } } ] - } + }, + "is_iter": false } }, { @@ -3978,11 +3986,13 @@ } } ] - } + }, + "is_iter": false } } ] - } + }, + "is_iter": false } }, "kind": { @@ -4146,7 +4156,8 @@ } } ] - } + }, + "is_iter": false } }, { @@ -4197,11 +4208,13 @@ } } ] - } + }, + "is_iter": false } } ] - } + }, + "is_iter": false } }, "kind": { @@ -4443,7 +4456,8 @@ } } ] - } + }, + "is_iter": false } }, { @@ -4454,7 +4468,8 @@ "kind": "Expr::Array::ExprList", "loc": null, "children": [] - } + }, + "is_iter": false } }, { @@ -4465,11 +4480,13 @@ "kind": "Expr::Array::ExprList", "loc": null, "children": [] - } + }, + "is_iter": false } } ] - } + }, + "is_iter": false } }, "kind": { @@ -4606,7 +4623,8 @@ "kind": "Expr::Array::ExprList", "loc": null, "children": [] - } + }, + "is_iter": false } }, { @@ -4631,7 +4649,8 @@ } } ] - } + }, + "is_iter": false } }, { @@ -4642,7 +4661,8 @@ "kind": "Expr::Array::ExprList", "loc": null, "children": [] - } + }, + "is_iter": false } }, { @@ -4667,7 +4687,8 @@ } } ] - } + }, + "is_iter": false } }, { @@ -4678,11 +4699,13 @@ "kind": "Expr::Array::ExprList", "loc": null, "children": [] - } + }, + "is_iter": false } } ] - } + }, + "is_iter": false } }, "kind": { @@ -4819,7 +4842,8 @@ "kind": "Expr::Array::ExprList", "loc": null, "children": [] - } + }, + "is_iter": false } }, { @@ -4870,7 +4894,8 @@ } } ] - } + }, + "is_iter": false } }, { @@ -4881,7 +4906,8 @@ "kind": "Expr::Array::ExprList", "loc": null, "children": [] - } + }, + "is_iter": false } }, { @@ -4932,7 +4958,8 @@ } } ] - } + }, + "is_iter": false } }, { @@ -4943,11 +4970,13 @@ "kind": "Expr::Array::ExprList", "loc": null, "children": [] - } + }, + "is_iter": false } } ] - } + }, + "is_iter": false } }, "kind": { @@ -5084,7 +5113,8 @@ "kind": "Expr::Array::ExprList", "loc": null, "children": [] - } + }, + "is_iter": false } }, { @@ -5095,7 +5125,8 @@ "kind": "Expr::Array::ExprList", "loc": null, "children": [] - } + }, + "is_iter": false } }, { @@ -5106,7 +5137,8 @@ "kind": "Expr::Array::ExprList", "loc": null, "children": [] - } + }, + "is_iter": false } }, { @@ -5157,7 +5189,8 @@ } } ] - } + }, + "is_iter": false } }, { @@ -5168,11 +5201,13 @@ "kind": "Expr::Array::ExprList", "loc": null, "children": [] - } + }, + "is_iter": false } } ] - } + }, + "is_iter": false } }, "kind": { @@ -5325,7 +5360,8 @@ } } ] - } + }, + "is_iter": false } }, { @@ -5376,7 +5412,8 @@ } } ] - } + }, + "is_iter": false } }, { @@ -5387,7 +5424,8 @@ "kind": "Expr::Array::ExprList", "loc": null, "children": [] - } + }, + "is_iter": false } }, { @@ -5438,7 +5476,8 @@ } } ] - } + }, + "is_iter": false } }, { @@ -5449,11 +5488,13 @@ "kind": "Expr::Array::ExprList", "loc": null, "children": [] - } + }, + "is_iter": false } } ] - } + }, + "is_iter": false } }, "kind": { diff --git a/test/sync_test/__snapshot__/pipeline_test_match_array_shortcut.json b/test/sync_test/__snapshot__/pipeline_test_match_array_shortcut.json index 842e1baa..f2da76f2 100644 --- a/test/sync_test/__snapshot__/pipeline_test_match_array_shortcut.json +++ b/test/sync_test/__snapshot__/pipeline_test_match_array_shortcut.json @@ -2309,7 +2309,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -2522,7 +2523,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -2776,7 +2778,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -2989,7 +2992,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -3202,7 +3206,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -3335,7 +3340,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { diff --git a/test/sync_test/__snapshot__/pipeline_test_match_arraylike_view_rest.json b/test/sync_test/__snapshot__/pipeline_test_match_arraylike_view_rest.json index 4d348ed2..e787c247 100644 --- a/test/sync_test/__snapshot__/pipeline_test_match_arraylike_view_rest.json +++ b/test/sync_test/__snapshot__/pipeline_test_match_arraylike_view_rest.json @@ -2978,7 +2978,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { @@ -3127,7 +3128,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { @@ -3280,7 +3282,8 @@ } } ] - } + }, + "is_iter": false } }, "start_index": null, @@ -3915,7 +3918,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { diff --git a/test/sync_test/__snapshot__/pipeline_test_match_newtype.json b/test/sync_test/__snapshot__/pipeline_test_match_newtype.json index d14260c1..669d8da9 100644 --- a/test/sync_test/__snapshot__/pipeline_test_match_newtype.json +++ b/test/sync_test/__snapshot__/pipeline_test_match_newtype.json @@ -998,6 +998,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, @@ -1669,6 +1674,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, diff --git a/test/sync_test/__snapshot__/pipeline_test_match_readonlyarray.json b/test/sync_test/__snapshot__/pipeline_test_match_readonlyarray.json index 0a69ca95..94164d94 100644 --- a/test/sync_test/__snapshot__/pipeline_test_match_readonlyarray.json +++ b/test/sync_test/__snapshot__/pipeline_test_match_readonlyarray.json @@ -1295,7 +1295,8 @@ } } ] - } + }, + "is_iter": false } }, "vis": { @@ -1528,7 +1529,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -1652,7 +1654,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -1714,7 +1717,8 @@ "kind": "Expr::Array::ExprList", "loc": null, "children": [] - } + }, + "is_iter": false } }, "ty": { @@ -1862,7 +1866,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -1920,7 +1925,8 @@ "kind": "Expr::Array::ExprList", "loc": null, "children": [] - } + }, + "is_iter": false } }, "kind": { @@ -2030,7 +2036,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { diff --git a/test/sync_test/__snapshot__/pipeline_test_match_string_const.json b/test/sync_test/__snapshot__/pipeline_test_match_string_const.json index b437eb9f..52036855 100644 --- a/test/sync_test/__snapshot__/pipeline_test_match_string_const.json +++ b/test/sync_test/__snapshot__/pipeline_test_match_string_const.json @@ -1111,7 +1111,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { diff --git a/test/sync_test/__snapshot__/pipeline_test_match_stringview_using_regex.json b/test/sync_test/__snapshot__/pipeline_test_match_stringview_using_regex.json index 402dd2ed..3acf4963 100644 --- a/test/sync_test/__snapshot__/pipeline_test_match_stringview_using_regex.json +++ b/test/sync_test/__snapshot__/pipeline_test_match_stringview_using_regex.json @@ -2181,46 +2181,112 @@ "loc": null, "children": { "value": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", + "value": "to_result" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Function", + "loc": null, + "children": { + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "value": "test_unicode_support" + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "test_unicode_support" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null } } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", - "loc": null, - "children": [] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} } - } + ] }, - "kind": { - "kind": "TryOperatorKind::Question", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -2336,46 +2402,112 @@ "loc": null, "children": { "value": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", + "value": "to_result" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Function", + "loc": null, + "children": { + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "value": "test_unicode_support2" + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "test_unicode_support2" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null } } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", - "loc": null, - "children": [] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} } - } + ] }, - "kind": { - "kind": "TryOperatorKind::Question", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -2402,5 +2534,524 @@ } } } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "to_result" + } + }, + "has_error": null, + "is_async": null, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "f" + } + }, + "ty": { + "kind": "Type::Arrow", + "loc": null, + "children": { + "args": { + "kind": "Type::Arrow::ArgList", + "loc": null, + "children": [] + }, + "res": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "T" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "err": { + "kind": "ErrorType::ErrorType", + "loc": null, + "children": { + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "E" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + "is_async": null + } + } + } + } + ] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [ + { + "kind": "TypeVarBinder", + "loc": null, + "children": { + "name": "T", + "constraints": { + "kind": "TypeVarBinder::TypeVarConstraintList", + "loc": null, + "children": [] + } + } + }, + { + "kind": "TypeVarBinder", + "loc": null, + "children": { + "name": "E", + "constraints": { + "kind": "TypeVarBinder::TypeVarConstraintList", + "loc": null, + "children": [ + { + "kind": "TypeVarConstraint", + "loc": null, + "children": { + "trait": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Error" + } + } + } + } + ] + } + } + } + ] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [ + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "T" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "E" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + ] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::Try", + "loc": null, + "children": { + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "f" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "catch": { + "kind": "Expr::Try::CaseList", + "loc": null, + "children": [ + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "err" + } + } + } + }, + "guard": null, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Err" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::TypeName", + "loc": null, + "children": { + "value": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + }, + "is_object": false + } + } + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "err" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + ] + }, + "catch_all": false, + "try_else": { + "kind": "Expr::Try::CaseList", + "loc": null, + "children": [ + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "value" + } + } + } + }, + "guard": null, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Ok" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::TypeName", + "loc": null, + "children": { + "value": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + }, + "is_object": false + } + } + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "value" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + ] + }, + "has_try": true + } + } + } + } + } } ] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/pipeline_test_match_stringview_using_regex.mbt b/test/sync_test/__snapshot__/pipeline_test_match_stringview_using_regex.mbt index ad36e53e..aeb6053a 100644 --- a/test/sync_test/__snapshot__/pipeline_test_match_stringview_using_regex.mbt +++ b/test/sync_test/__snapshot__/pipeline_test_match_stringview_using_regex.mbt @@ -38,7 +38,16 @@ fn test_unicode_support2() -> Unit raise { ///| fn main { println("test_unicode_support") - debug(try? test_unicode_support()) + debug(to_result(() => test_unicode_support())) println("test_unicode_support2") - debug(try? test_unicode_support2()) + debug(to_result(() => test_unicode_support2())) +} + +fn[T, E : Error] to_result(f : () -> T raise E) -> Result[T, E] { + try f() + catch { + err => Result::Err(err) + } noraise { + value => Result::Ok(value) + } } diff --git a/test/sync_test/__snapshot__/pipeline_test_match_stringview_using_regex.mbt.tokens.json b/test/sync_test/__snapshot__/pipeline_test_match_stringview_using_regex.mbt.tokens.json index 9c33acb2..5aee67f1 100644 --- a/test/sync_test/__snapshot__/pipeline_test_match_stringview_using_regex.mbt.tokens.json +++ b/test/sync_test/__snapshot__/pipeline_test_match_stringview_using_regex.mbt.tokens.json @@ -1295,38 +1295,61 @@ "loc": "41:8-41:9" }, { - "token": "TRY_QUESTION", - "loc": "41:9-41:13" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "41:9-41:18" + }, + { + "token": "LPAREN", + "loc": "41:18-41:19" + }, + { + "token": "LPAREN", + "loc": "41:19-41:20" + }, + { + "token": "RPAREN", + "loc": "41:20-41:21" + }, + { + "token": "FAT_ARROW", + "loc": "41:22-41:24" }, { "token": [ "LIDENT", "test_unicode_support" ], - "loc": "41:14-41:34" + "loc": "41:25-41:45" }, { "token": "LPAREN", - "loc": "41:34-41:35" + "loc": "41:45-41:46" }, { "token": "RPAREN", - "loc": "41:35-41:36" + "loc": "41:46-41:47" }, { "token": "RPAREN", - "loc": "41:36-41:37" + "loc": "41:47-41:48" + }, + { + "token": "RPAREN", + "loc": "41:48-41:49" }, { "token": [ "SEMI", false ], - "loc": "41:37-41:37" + "loc": "41:49-41:49" }, { "token": "NEWLINE", - "loc": "41:37-41:38" + "loc": "41:49-41:50" }, { "token": [ @@ -1373,31 +1396,54 @@ "loc": "43:8-43:9" }, { - "token": "TRY_QUESTION", - "loc": "43:9-43:13" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "43:9-43:18" + }, + { + "token": "LPAREN", + "loc": "43:18-43:19" + }, + { + "token": "LPAREN", + "loc": "43:19-43:20" + }, + { + "token": "RPAREN", + "loc": "43:20-43:21" + }, + { + "token": "FAT_ARROW", + "loc": "43:22-43:24" }, { "token": [ "LIDENT", "test_unicode_support2" ], - "loc": "43:14-43:35" + "loc": "43:25-43:46" }, { "token": "LPAREN", - "loc": "43:35-43:36" + "loc": "43:46-43:47" }, { "token": "RPAREN", - "loc": "43:36-43:37" + "loc": "43:47-43:48" }, { "token": "RPAREN", - "loc": "43:37-43:38" + "loc": "43:48-43:49" + }, + { + "token": "RPAREN", + "loc": "43:49-43:50" }, { "token": "NEWLINE", - "loc": "43:38-43:39" + "loc": "43:50-43:51" }, { "token": "RBRACE", @@ -1414,8 +1460,324 @@ "token": "NEWLINE", "loc": "44:2-44:3" }, + { + "token": "NEWLINE", + "loc": "45:1-45:2" + }, + { + "token": "FN", + "loc": "46:1-46:3" + }, + { + "token": "LBRACKET", + "loc": "46:3-46:4" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "46:4-46:5" + }, + { + "token": "COMMA", + "loc": "46:5-46:6" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "46:7-46:8" + }, + { + "token": "COLON", + "loc": "46:9-46:10" + }, + { + "token": [ + "UIDENT", + "Error" + ], + "loc": "46:11-46:16" + }, + { + "token": "RBRACKET", + "loc": "46:16-46:17" + }, + { + "token": [ + "LIDENT", + "to_result" + ], + "loc": "46:18-46:27" + }, + { + "token": "LPAREN", + "loc": "46:27-46:28" + }, + { + "token": [ + "LIDENT", + "f" + ], + "loc": "46:28-46:29" + }, + { + "token": "COLON", + "loc": "46:30-46:31" + }, + { + "token": "LPAREN", + "loc": "46:32-46:33" + }, + { + "token": "RPAREN", + "loc": "46:33-46:34" + }, + { + "token": "THIN_ARROW", + "loc": "46:35-46:37" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "46:38-46:39" + }, + { + "token": "RAISE", + "loc": "46:40-46:45" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "46:46-46:47" + }, + { + "token": "RPAREN", + "loc": "46:47-46:48" + }, + { + "token": "THIN_ARROW", + "loc": "46:49-46:51" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "46:52-46:58" + }, + { + "token": "LBRACKET", + "loc": "46:58-46:59" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "46:59-46:60" + }, + { + "token": "COMMA", + "loc": "46:60-46:61" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "46:62-46:63" + }, + { + "token": "RBRACKET", + "loc": "46:63-46:64" + }, + { + "token": "LBRACE", + "loc": "46:65-46:66" + }, + { + "token": "NEWLINE", + "loc": "46:66-46:67" + }, + { + "token": "TRY", + "loc": "47:3-47:6" + }, + { + "token": [ + "LIDENT", + "f" + ], + "loc": "47:7-47:8" + }, + { + "token": "LPAREN", + "loc": "47:8-47:9" + }, + { + "token": "RPAREN", + "loc": "47:9-47:10" + }, + { + "token": "NEWLINE", + "loc": "47:10-47:11" + }, + { + "token": "CATCH", + "loc": "48:3-48:8" + }, + { + "token": "LBRACE", + "loc": "48:9-48:10" + }, + { + "token": "NEWLINE", + "loc": "48:10-48:11" + }, + { + "token": [ + "LIDENT", + "err" + ], + "loc": "49:5-49:8" + }, + { + "token": "FAT_ARROW", + "loc": "49:9-49:11" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "49:12-49:18" + }, + { + "token": "COLONCOLON", + "loc": "49:18-49:20" + }, + { + "token": [ + "UIDENT", + "Err" + ], + "loc": "49:20-49:23" + }, + { + "token": "LPAREN", + "loc": "49:23-49:24" + }, + { + "token": [ + "LIDENT", + "err" + ], + "loc": "49:24-49:27" + }, + { + "token": "RPAREN", + "loc": "49:27-49:28" + }, + { + "token": "NEWLINE", + "loc": "49:28-49:29" + }, + { + "token": "RBRACE", + "loc": "50:3-50:4" + }, + { + "token": "NORAISE", + "loc": "50:5-50:12" + }, + { + "token": "LBRACE", + "loc": "50:13-50:14" + }, + { + "token": "NEWLINE", + "loc": "50:14-50:15" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "51:5-51:10" + }, + { + "token": "FAT_ARROW", + "loc": "51:11-51:13" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "51:14-51:20" + }, + { + "token": "COLONCOLON", + "loc": "51:20-51:22" + }, + { + "token": [ + "UIDENT", + "Ok" + ], + "loc": "51:22-51:24" + }, + { + "token": "LPAREN", + "loc": "51:24-51:25" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "51:25-51:30" + }, + { + "token": "RPAREN", + "loc": "51:30-51:31" + }, + { + "token": "NEWLINE", + "loc": "51:31-51:32" + }, + { + "token": "RBRACE", + "loc": "52:3-52:4" + }, + { + "token": "NEWLINE", + "loc": "52:4-52:5" + }, + { + "token": "RBRACE", + "loc": "53:1-53:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "53:2-53:2" + }, + { + "token": "NEWLINE", + "loc": "53:2-53:3" + }, { "token": "EOF", - "loc": "45:1-45:1" + "loc": "54:1-54:1" } ] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/pipeline_test_match_using_regex.mbt b/test/sync_test/__snapshot__/pipeline_test_match_using_regex.mbt index c58b6e5a..619094f6 100644 --- a/test/sync_test/__snapshot__/pipeline_test_match_using_regex.mbt +++ b/test/sync_test/__snapshot__/pipeline_test_match_using_regex.mbt @@ -1,4 +1,4 @@ -//!build: -w -20-27-28 +//!build: -w -20-27-28-lexmatch_first_match ///| fn simple(input : BytesView) -> Unit { diff --git a/test/sync_test/__snapshot__/pipeline_test_match_using_regex.mbt.tokens.json b/test/sync_test/__snapshot__/pipeline_test_match_using_regex.mbt.tokens.json index 3dd148b0..ca1d9923 100644 --- a/test/sync_test/__snapshot__/pipeline_test_match_using_regex.mbt.tokens.json +++ b/test/sync_test/__snapshot__/pipeline_test_match_using_regex.mbt.tokens.json @@ -3,7 +3,7 @@ "token": [ "COMMENT", { - "content": "//!build: -w -20-27-28", + "content": "//!build: -w -20-27-28-lexmatch_first_match", "kind": [ "Ownline", { @@ -14,11 +14,11 @@ "consumed_by_docstring": false } ], - "loc": "1:1-1:23" + "loc": "1:1-1:44" }, { "token": "NEWLINE", - "loc": "1:23-1:24" + "loc": "1:44-1:45" }, { "token": "NEWLINE", diff --git a/test/sync_test/__snapshot__/pipeline_test_match_using_regex_calc.json b/test/sync_test/__snapshot__/pipeline_test_match_using_regex_calc.json index a4c51f22..55c1678a 100644 --- a/test/sync_test/__snapshot__/pipeline_test_match_using_regex_calc.json +++ b/test/sync_test/__snapshot__/pipeline_test_match_using_regex_calc.json @@ -941,7 +941,8 @@ "kind": "Expr::Array::ExprList", "loc": null, "children": [] - } + }, + "is_iter": false } }, "body": { diff --git a/test/sync_test/__snapshot__/pipeline_test_mcore_inline.json b/test/sync_test/__snapshot__/pipeline_test_mcore_inline.json index 26ebba71..ba0bc5f6 100644 --- a/test/sync_test/__snapshot__/pipeline_test_mcore_inline.json +++ b/test/sync_test/__snapshot__/pipeline_test_mcore_inline.json @@ -615,7 +615,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { diff --git a/test/sync_test/__snapshot__/pipeline_test_mcore_inline_err.json b/test/sync_test/__snapshot__/pipeline_test_mcore_inline_err.json index dd7ff599..a0ee315d 100644 --- a/test/sync_test/__snapshot__/pipeline_test_mcore_inline_err.json +++ b/test/sync_test/__snapshot__/pipeline_test_mcore_inline_err.json @@ -354,7 +354,8 @@ "kind": "Expr::Array::ExprList", "loc": null, "children": [] - } + }, + "is_iter": false } }, "body": { @@ -943,7 +944,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { @@ -986,120 +988,81 @@ "loc": null, "children": { "value": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", - "loc": null, - "children": { - "value": "map_err" - } - } + "value": "to_result" } } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", "loc": null, - "children": [ - { - "kind": "Argument", + "children": { + "value": { + "kind": "Expr::Function", "loc": null, "children": { - "value": { - "kind": "Expr::Ident", + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "id": { - "kind": "Var", + "parameters": { + "kind": "Func::Lambda::ParameterList", "loc": null, - "children": { - "name": { - "kind": "LongIdent::Ident", - "loc": null, - "children": { - "value": "arr" - } - } - } - } - } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} - } - } - }, - { - "kind": "Argument", - "loc": null, - "children": { - "value": { - "kind": "Expr::Function", - "loc": null, - "children": { - "func": { - "kind": "Func::Lambda", + "children": [] + }, + "body": { + "kind": "Expr::Apply", "loc": null, "children": { - "parameters": { - "kind": "Func::Lambda::ParameterList", + "func": { + "kind": "Expr::Ident", "loc": null, - "children": [ - { - "kind": "Parameter::Positional", + "children": { + "id": { + "kind": "Var", "loc": null, "children": { - "binder": { - "kind": "Binder", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": "x" + "value": "map_err" } - }, - "ty": null + } } } - ] + } }, - "body": { - "kind": "Expr::If", + "args": { + "kind": "Expr::Apply::ArgumentList", "loc": null, - "children": { - "cond": { - "kind": "Expr::Infix", + "children": [ + { + "kind": "Argument", "loc": null, "children": { - "op": { - "kind": "Var", - "loc": null, - "children": { - "name": { - "kind": "LongIdent::Ident", - "loc": null, - "children": { - "value": "<" - } - } - } - }, - "lhs": { + "value": { "kind": "Expr::Ident", "loc": null, "children": { @@ -1111,88 +1074,57 @@ "kind": "LongIdent::Ident", "loc": null, "children": { - "value": "x" + "value": "arr" } } } } } }, - "rhs": { - "kind": "Expr::Constant", + "kind": { + "kind": "ArgumentKind::Positional", "loc": null, - "children": { - "constant": { - "kind": "Constant::Int", - "loc": null, - "children": { - "value": "0" - } - } - } + "children": {} } } }, - "ifso": { - "kind": "Expr::Raise", + { + "kind": "Argument", "loc": null, "children": { - "err_value": { - "kind": "Expr::Constr", + "value": { + "kind": "Expr::Function", "loc": null, "children": { - "constr": { - "kind": "Constructor", - "loc": null, - "children": { - "name": { - "kind": "ConstrName", - "loc": null, - "children": { - "name": "E2" - } - }, - "extra_info": { - "kind": "ConstructorExtraInfo::NoExtraInfo", - "loc": null, - "children": {} - } - } - } - } - } - } - }, - "ifnot": { - "kind": "Expr::Sequence", - "loc": null, - "children": { - "exprs": { - "kind": "Expr::Sequence::ExprList", - "loc": null, - "children": [ - { - "kind": "Expr::If", + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "cond": { - "kind": "Expr::Infix", + "parameters": { + "kind": "Func::Lambda::ParameterList", "loc": null, - "children": { - "op": { - "kind": "Var", + "children": [ + { + "kind": "Parameter::Positional", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", + "binder": { + "kind": "Binder", "loc": null, "children": { - "value": "==" + "name": "x" } - } + }, + "ty": null } - }, - "lhs": { + } + ] + }, + "body": { + "kind": "Expr::If", + "loc": null, + "children": { + "cond": { "kind": "Expr::Infix", "loc": null, "children": { @@ -1204,7 +1136,7 @@ "kind": "LongIdent::Ident", "loc": null, "children": { - "value": "%" + "value": "<" } } } @@ -1236,54 +1168,205 @@ "kind": "Constant::Int", "loc": null, "children": { - "value": "2" + "value": "0" } } } } } }, - "rhs": { - "kind": "Expr::Constant", + "ifso": { + "kind": "Expr::Raise", "loc": null, "children": { - "constant": { - "kind": "Constant::Int", + "err_value": { + "kind": "Expr::Constr", "loc": null, "children": { - "value": "0" + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "E2" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::NoExtraInfo", + "loc": null, + "children": {} + } + } + } } } } - } - } - }, - "ifso": { - "kind": "Expr::Return", - "loc": null, - "children": { - "return_value": { - "kind": "Expr::Infix", + }, + "ifnot": { + "kind": "Expr::Sequence", "loc": null, "children": { - "op": { - "kind": "Var", + "exprs": { + "kind": "Expr::Sequence::ExprList", "loc": null, - "children": { - "name": { - "kind": "LongIdent::Ident", + "children": [ + { + "kind": "Expr::If", "loc": null, "children": { - "value": "+" + "cond": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "==" + } + } + } + }, + "lhs": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "%" + } + } + } + }, + "lhs": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "x" + } + } + } + } + } + }, + "rhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "2" + } + } + } + } + } + }, + "rhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "0" + } + } + } + } + } + }, + "ifso": { + "kind": "Expr::Return", + "loc": null, + "children": { + "return_value": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "+" + } + } + } + }, + "lhs": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "x" + } + } + } + } + } + }, + "rhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "2" + } + } + } + } + } + } + } + }, + "ifnot": null } } - } + ] }, - "lhs": { - "kind": "Expr::Ident", + "last_expr": { + "kind": "Expr::Infix", "loc": null, "children": { - "id": { + "op": { "kind": "Var", "loc": null, "children": { @@ -1291,22 +1374,41 @@ "kind": "LongIdent::Ident", "loc": null, "children": { - "value": "x" + "value": "+" } } } - } - } - }, - "rhs": { - "kind": "Expr::Constant", - "loc": null, - "children": { - "constant": { - "kind": "Constant::Int", + }, + "lhs": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "x" + } + } + } + } + } + }, + "rhs": { + "kind": "Expr::Constant", "loc": null, "children": { - "value": "2" + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "1" + } + } } } } @@ -1315,101 +1417,67 @@ } } }, - "ifnot": null - } - } - ] - }, - "last_expr": { - "kind": "Expr::Infix", - "loc": null, - "children": { - "op": { - "kind": "Var", - "loc": null, - "children": { - "name": { - "kind": "LongIdent::Ident", - "loc": null, - "children": { - "value": "+" - } - } - } - }, - "lhs": { - "kind": "Expr::Ident", - "loc": null, - "children": { - "id": { - "kind": "Var", + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", "loc": null, - "children": { - "name": { - "kind": "LongIdent::Ident", - "loc": null, - "children": { - "value": "x" - } - } - } - } - } - }, - "rhs": { - "kind": "Expr::Constant", - "loc": null, - "children": { - "constant": { - "kind": "Constant::Int", + "children": {} + }, + "kind": { + "kind": "FnKind::Arrow", "loc": null, - "children": { - "value": "1" - } - } + "children": {} + }, + "has_error": null, + "is_async": null } } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } } } - } - }, - "return_type": null, - "error_type": { - "kind": "ErrorType::NoErrorType", - "loc": null, - "children": {} + ] }, - "kind": { - "kind": "FnKind::Arrow", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} - }, - "has_error": null, - "is_async": null + } } - } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } - ] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} + } } - } + ] }, - "kind": { - "kind": "TryOperatorKind::Question", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -1463,256 +1531,187 @@ "loc": null, "children": { "value": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", - "loc": null, - "children": { - "value": "map_err" - } - } + "value": "to_result" } } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", "loc": null, - "children": [ - { - "kind": "Argument", + "children": { + "value": { + "kind": "Expr::Function", "loc": null, "children": { - "value": { - "kind": "Expr::ArraySpread", + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "elems": { - "kind": "Expr::ArraySpread::ElemList", + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Apply", "loc": null, - "children": [ - { - "kind": "SpreadableElem::Spread", + "children": { + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "expr": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", - "loc": null, - "children": { - "value": "arr" - } - } + "value": "map_err" } } } } } }, - { - "kind": "SpreadableElem::Spread", + "args": { + "kind": "Expr::Apply::ArgumentList", "loc": null, - "children": { - "expr": { - "kind": "Expr::Ident", + "children": [ + { + "kind": "Argument", "loc": null, "children": { - "id": { - "kind": "Var", + "value": { + "kind": "Expr::ArraySpread", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", + "elems": { + "kind": "Expr::ArraySpread::ElemList", "loc": null, - "children": { - "value": "arr" - } - } - } - } - } - } - } - } - ] - } - } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} - } - } - }, - { - "kind": "Argument", - "loc": null, - "children": { - "value": { - "kind": "Expr::Function", - "loc": null, - "children": { - "func": { - "kind": "Func::Lambda", - "loc": null, - "children": { - "parameters": { - "kind": "Func::Lambda::ParameterList", - "loc": null, - "children": [ - { - "kind": "Parameter::Positional", - "loc": null, - "children": { - "binder": { - "kind": "Binder", - "loc": null, - "children": { - "name": "x" - } - }, - "ty": null - } - } - ] - }, - "body": { - "kind": "Expr::If", - "loc": null, - "children": { - "cond": { - "kind": "Expr::Infix", - "loc": null, - "children": { - "op": { - "kind": "Var", - "loc": null, - "children": { - "name": { - "kind": "LongIdent::Ident", - "loc": null, - "children": { - "value": "<" - } - } - } - }, - "lhs": { - "kind": "Expr::Ident", - "loc": null, - "children": { - "id": { - "kind": "Var", - "loc": null, - "children": { - "name": { - "kind": "LongIdent::Ident", + "children": [ + { + "kind": "SpreadableElem::Spread", + "loc": null, + "children": { + "expr": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "arr" + } + } + } + } + } + } + } + }, + { + "kind": "SpreadableElem::Spread", "loc": null, "children": { - "value": "x" + "expr": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "arr" + } + } + } + } + } + } } } - } - } + ] + }, + "is_iter": false } }, - "rhs": { - "kind": "Expr::Constant", + "kind": { + "kind": "ArgumentKind::Positional", "loc": null, - "children": { - "constant": { - "kind": "Constant::Int", - "loc": null, - "children": { - "value": "0" - } - } - } + "children": {} } } }, - "ifso": { - "kind": "Expr::Raise", + { + "kind": "Argument", "loc": null, "children": { - "err_value": { - "kind": "Expr::Constr", + "value": { + "kind": "Expr::Function", "loc": null, "children": { - "constr": { - "kind": "Constructor", - "loc": null, - "children": { - "name": { - "kind": "ConstrName", - "loc": null, - "children": { - "name": "E2" - } - }, - "extra_info": { - "kind": "ConstructorExtraInfo::NoExtraInfo", - "loc": null, - "children": {} - } - } - } - } - } - } - }, - "ifnot": { - "kind": "Expr::Sequence", - "loc": null, - "children": { - "exprs": { - "kind": "Expr::Sequence::ExprList", - "loc": null, - "children": [ - { - "kind": "Expr::If", + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "cond": { - "kind": "Expr::Infix", + "parameters": { + "kind": "Func::Lambda::ParameterList", "loc": null, - "children": { - "op": { - "kind": "Var", + "children": [ + { + "kind": "Parameter::Positional", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", + "binder": { + "kind": "Binder", "loc": null, "children": { - "value": "==" + "name": "x" } - } + }, + "ty": null } - }, - "lhs": { + } + ] + }, + "body": { + "kind": "Expr::If", + "loc": null, + "children": { + "cond": { "kind": "Expr::Infix", "loc": null, "children": { @@ -1724,7 +1723,7 @@ "kind": "LongIdent::Ident", "loc": null, "children": { - "value": "%" + "value": "<" } } } @@ -1756,54 +1755,205 @@ "kind": "Constant::Int", "loc": null, "children": { - "value": "2" + "value": "0" } } } } } }, - "rhs": { - "kind": "Expr::Constant", + "ifso": { + "kind": "Expr::Raise", "loc": null, "children": { - "constant": { - "kind": "Constant::Int", + "err_value": { + "kind": "Expr::Constr", "loc": null, "children": { - "value": "0" + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "E2" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::NoExtraInfo", + "loc": null, + "children": {} + } + } + } } } } - } - } - }, - "ifso": { - "kind": "Expr::Return", - "loc": null, - "children": { - "return_value": { - "kind": "Expr::Infix", + }, + "ifnot": { + "kind": "Expr::Sequence", "loc": null, "children": { - "op": { - "kind": "Var", + "exprs": { + "kind": "Expr::Sequence::ExprList", "loc": null, - "children": { - "name": { - "kind": "LongIdent::Ident", + "children": [ + { + "kind": "Expr::If", "loc": null, "children": { - "value": "+" + "cond": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "==" + } + } + } + }, + "lhs": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "%" + } + } + } + }, + "lhs": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "x" + } + } + } + } + } + }, + "rhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "2" + } + } + } + } + } + }, + "rhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "0" + } + } + } + } + } + }, + "ifso": { + "kind": "Expr::Return", + "loc": null, + "children": { + "return_value": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "+" + } + } + } + }, + "lhs": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "x" + } + } + } + } + } + }, + "rhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "2" + } + } + } + } + } + } + } + }, + "ifnot": null } } - } + ] }, - "lhs": { - "kind": "Expr::Ident", + "last_expr": { + "kind": "Expr::Infix", "loc": null, "children": { - "id": { + "op": { "kind": "Var", "loc": null, "children": { @@ -1811,22 +1961,41 @@ "kind": "LongIdent::Ident", "loc": null, "children": { - "value": "x" + "value": "+" } } } - } - } - }, - "rhs": { - "kind": "Expr::Constant", - "loc": null, - "children": { - "constant": { - "kind": "Constant::Int", + }, + "lhs": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "x" + } + } + } + } + } + }, + "rhs": { + "kind": "Expr::Constant", "loc": null, "children": { - "value": "2" + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "1" + } + } } } } @@ -1835,101 +2004,67 @@ } } }, - "ifnot": null - } - } - ] - }, - "last_expr": { - "kind": "Expr::Infix", - "loc": null, - "children": { - "op": { - "kind": "Var", - "loc": null, - "children": { - "name": { - "kind": "LongIdent::Ident", - "loc": null, - "children": { - "value": "+" - } - } - } - }, - "lhs": { - "kind": "Expr::Ident", - "loc": null, - "children": { - "id": { - "kind": "Var", + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", "loc": null, - "children": { - "name": { - "kind": "LongIdent::Ident", - "loc": null, - "children": { - "value": "x" - } - } - } - } - } - }, - "rhs": { - "kind": "Expr::Constant", - "loc": null, - "children": { - "constant": { - "kind": "Constant::Int", + "children": {} + }, + "kind": { + "kind": "FnKind::Arrow", "loc": null, - "children": { - "value": "1" - } - } + "children": {} + }, + "has_error": null, + "is_async": null } } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } } } - } - }, - "return_type": null, - "error_type": { - "kind": "ErrorType::NoErrorType", - "loc": null, - "children": {} + ] }, - "kind": { - "kind": "FnKind::Arrow", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} - }, - "has_error": null, - "is_async": null + } } - } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } - ] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} + } } - } + ] }, - "kind": { - "kind": "TryOperatorKind::Question", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -2044,7 +2179,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { @@ -2079,120 +2215,81 @@ "loc": null, "children": { "value": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", - "loc": null, - "children": { - "value": "map_err" - } - } + "value": "to_result" } } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", "loc": null, - "children": [ - { - "kind": "Argument", + "children": { + "value": { + "kind": "Expr::Function", "loc": null, "children": { - "value": { - "kind": "Expr::Ident", + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "id": { - "kind": "Var", + "parameters": { + "kind": "Func::Lambda::ParameterList", "loc": null, - "children": { - "name": { - "kind": "LongIdent::Ident", - "loc": null, - "children": { - "value": "arr1" - } - } - } - } - } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} - } - } - }, - { - "kind": "Argument", - "loc": null, - "children": { - "value": { - "kind": "Expr::Function", - "loc": null, - "children": { - "func": { - "kind": "Func::Lambda", + "children": [] + }, + "body": { + "kind": "Expr::Apply", "loc": null, "children": { - "parameters": { - "kind": "Func::Lambda::ParameterList", + "func": { + "kind": "Expr::Ident", "loc": null, - "children": [ - { - "kind": "Parameter::Positional", + "children": { + "id": { + "kind": "Var", "loc": null, "children": { - "binder": { - "kind": "Binder", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": "x" + "value": "map_err" } - }, - "ty": null + } } } - ] + } }, - "body": { - "kind": "Expr::If", + "args": { + "kind": "Expr::Apply::ArgumentList", "loc": null, - "children": { - "cond": { - "kind": "Expr::Infix", + "children": [ + { + "kind": "Argument", "loc": null, "children": { - "op": { - "kind": "Var", - "loc": null, - "children": { - "name": { - "kind": "LongIdent::Ident", - "loc": null, - "children": { - "value": "<" - } - } - } - }, - "lhs": { + "value": { "kind": "Expr::Ident", "loc": null, "children": { @@ -2204,88 +2301,57 @@ "kind": "LongIdent::Ident", "loc": null, "children": { - "value": "x" + "value": "arr1" } } } } } }, - "rhs": { - "kind": "Expr::Constant", + "kind": { + "kind": "ArgumentKind::Positional", "loc": null, - "children": { - "constant": { - "kind": "Constant::Int", - "loc": null, - "children": { - "value": "0" - } - } - } + "children": {} } } }, - "ifso": { - "kind": "Expr::Raise", + { + "kind": "Argument", "loc": null, "children": { - "err_value": { - "kind": "Expr::Constr", + "value": { + "kind": "Expr::Function", "loc": null, "children": { - "constr": { - "kind": "Constructor", - "loc": null, - "children": { - "name": { - "kind": "ConstrName", - "loc": null, - "children": { - "name": "E2" - } - }, - "extra_info": { - "kind": "ConstructorExtraInfo::NoExtraInfo", - "loc": null, - "children": {} - } - } - } - } - } - } - }, - "ifnot": { - "kind": "Expr::Sequence", - "loc": null, - "children": { - "exprs": { - "kind": "Expr::Sequence::ExprList", - "loc": null, - "children": [ - { - "kind": "Expr::If", + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "cond": { - "kind": "Expr::Infix", + "parameters": { + "kind": "Func::Lambda::ParameterList", "loc": null, - "children": { - "op": { - "kind": "Var", + "children": [ + { + "kind": "Parameter::Positional", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", + "binder": { + "kind": "Binder", "loc": null, "children": { - "value": "==" + "name": "x" } - } + }, + "ty": null } - }, - "lhs": { + } + ] + }, + "body": { + "kind": "Expr::If", + "loc": null, + "children": { + "cond": { "kind": "Expr::Infix", "loc": null, "children": { @@ -2297,7 +2363,7 @@ "kind": "LongIdent::Ident", "loc": null, "children": { - "value": "%" + "value": "<" } } } @@ -2329,54 +2395,205 @@ "kind": "Constant::Int", "loc": null, "children": { - "value": "2" + "value": "0" } } } } } }, - "rhs": { - "kind": "Expr::Constant", + "ifso": { + "kind": "Expr::Raise", "loc": null, "children": { - "constant": { - "kind": "Constant::Int", + "err_value": { + "kind": "Expr::Constr", "loc": null, "children": { - "value": "0" + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "E2" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::NoExtraInfo", + "loc": null, + "children": {} + } + } + } } } } - } - } - }, - "ifso": { - "kind": "Expr::Return", - "loc": null, - "children": { - "return_value": { - "kind": "Expr::Infix", + }, + "ifnot": { + "kind": "Expr::Sequence", "loc": null, "children": { - "op": { - "kind": "Var", + "exprs": { + "kind": "Expr::Sequence::ExprList", "loc": null, - "children": { - "name": { - "kind": "LongIdent::Ident", + "children": [ + { + "kind": "Expr::If", "loc": null, "children": { - "value": "+" + "cond": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "==" + } + } + } + }, + "lhs": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "%" + } + } + } + }, + "lhs": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "x" + } + } + } + } + } + }, + "rhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "2" + } + } + } + } + } + }, + "rhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "0" + } + } + } + } + } + }, + "ifso": { + "kind": "Expr::Return", + "loc": null, + "children": { + "return_value": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "+" + } + } + } + }, + "lhs": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "x" + } + } + } + } + } + }, + "rhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "2" + } + } + } + } + } + } + } + }, + "ifnot": null } } - } + ] }, - "lhs": { - "kind": "Expr::Ident", + "last_expr": { + "kind": "Expr::Infix", "loc": null, "children": { - "id": { + "op": { "kind": "Var", "loc": null, "children": { @@ -2384,22 +2601,41 @@ "kind": "LongIdent::Ident", "loc": null, "children": { - "value": "x" + "value": "+" } } } - } - } - }, - "rhs": { - "kind": "Expr::Constant", - "loc": null, - "children": { - "constant": { - "kind": "Constant::Int", + }, + "lhs": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "x" + } + } + } + } + } + }, + "rhs": { + "kind": "Expr::Constant", "loc": null, "children": { - "value": "2" + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "1" + } + } } } } @@ -2408,101 +2644,67 @@ } } }, - "ifnot": null - } - } - ] - }, - "last_expr": { - "kind": "Expr::Infix", - "loc": null, - "children": { - "op": { - "kind": "Var", - "loc": null, - "children": { - "name": { - "kind": "LongIdent::Ident", - "loc": null, - "children": { - "value": "+" - } - } - } - }, - "lhs": { - "kind": "Expr::Ident", - "loc": null, - "children": { - "id": { - "kind": "Var", + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", "loc": null, - "children": { - "name": { - "kind": "LongIdent::Ident", - "loc": null, - "children": { - "value": "x" - } - } - } - } - } - }, - "rhs": { - "kind": "Expr::Constant", - "loc": null, - "children": { - "constant": { - "kind": "Constant::Int", + "children": {} + }, + "kind": { + "kind": "FnKind::Arrow", "loc": null, - "children": { - "value": "1" - } - } + "children": {} + }, + "has_error": null, + "is_async": null } } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } } } - } - }, - "return_type": null, - "error_type": { - "kind": "ErrorType::NoErrorType", - "loc": null, - "children": {} + ] }, - "kind": { - "kind": "FnKind::Arrow", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} - }, - "has_error": null, - "is_async": null + } } - } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } - ] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} + } } - } + ] }, - "kind": { - "kind": "TryOperatorKind::Question", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -2533,5 +2735,524 @@ } } } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "to_result" + } + }, + "has_error": null, + "is_async": null, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "f" + } + }, + "ty": { + "kind": "Type::Arrow", + "loc": null, + "children": { + "args": { + "kind": "Type::Arrow::ArgList", + "loc": null, + "children": [] + }, + "res": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "T" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "err": { + "kind": "ErrorType::ErrorType", + "loc": null, + "children": { + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "E" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + "is_async": null + } + } + } + } + ] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [ + { + "kind": "TypeVarBinder", + "loc": null, + "children": { + "name": "T", + "constraints": { + "kind": "TypeVarBinder::TypeVarConstraintList", + "loc": null, + "children": [] + } + } + }, + { + "kind": "TypeVarBinder", + "loc": null, + "children": { + "name": "E", + "constraints": { + "kind": "TypeVarBinder::TypeVarConstraintList", + "loc": null, + "children": [ + { + "kind": "TypeVarConstraint", + "loc": null, + "children": { + "trait": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Error" + } + } + } + } + ] + } + } + } + ] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [ + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "T" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "E" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + ] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::Try", + "loc": null, + "children": { + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "f" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "catch": { + "kind": "Expr::Try::CaseList", + "loc": null, + "children": [ + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "err" + } + } + } + }, + "guard": null, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Err" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::TypeName", + "loc": null, + "children": { + "value": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + }, + "is_object": false + } + } + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "err" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + ] + }, + "catch_all": false, + "try_else": { + "kind": "Expr::Try::CaseList", + "loc": null, + "children": [ + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "value" + } + } + } + }, + "guard": null, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Ok" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::TypeName", + "loc": null, + "children": { + "value": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + }, + "is_object": false + } + } + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "value" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + ] + }, + "has_try": true + } + } + } + } + } } ] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/pipeline_test_mcore_inline_err.mbt b/test/sync_test/__snapshot__/pipeline_test_mcore_inline_err.mbt index d59cc059..94ec8470 100644 --- a/test/sync_test/__snapshot__/pipeline_test_mcore_inline_err.mbt +++ b/test/sync_test/__snapshot__/pipeline_test_mcore_inline_err.mbt @@ -20,7 +20,7 @@ suberror Err { ///| fn main { let arr = [1, 2, 3, 4, 5] - debug(try? map_err(arr, x => + debug(to_result(() => map_err(arr, x => if x < 0 { raise E2 } else { @@ -29,8 +29,8 @@ fn main { } x + 1 } - )) - debug(try? map_err([..arr, ..arr], x => + ))) + debug(to_result(() => map_err([..arr, ..arr], x => if x < 0 { raise E2 } else { @@ -39,9 +39,9 @@ fn main { } x + 1 } - )) + ))) let arr1 = [-1, 2, 3, 4, 5] - debug(try? map_err(arr1, x => + debug(to_result(() => map_err(arr1, x => if x < 0 { raise E2 } else { @@ -50,5 +50,14 @@ fn main { } x + 1 } - )) + ))) +} + +fn[T, E : Error] to_result(f : () -> T raise E) -> Result[T, E] { + try f() + catch { + err => Result::Err(err) + } noraise { + value => Result::Ok(value) + } } diff --git a/test/sync_test/__snapshot__/pipeline_test_mcore_inline_err.mbt.tokens.json b/test/sync_test/__snapshot__/pipeline_test_mcore_inline_err.mbt.tokens.json index 2f0b2361..7baafdb4 100644 --- a/test/sync_test/__snapshot__/pipeline_test_mcore_inline_err.mbt.tokens.json +++ b/test/sync_test/__snapshot__/pipeline_test_mcore_inline_err.mbt.tokens.json @@ -689,45 +689,64 @@ "loc": "23:8-23:9" }, { - "token": "TRY_QUESTION", - "loc": "23:9-23:13" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "23:9-23:18" + }, + { + "token": "LPAREN", + "loc": "23:18-23:19" + }, + { + "token": "LPAREN", + "loc": "23:19-23:20" + }, + { + "token": "RPAREN", + "loc": "23:20-23:21" + }, + { + "token": "FAT_ARROW", + "loc": "23:22-23:24" }, { "token": [ "LIDENT", "map_err" ], - "loc": "23:14-23:21" + "loc": "23:25-23:32" }, { "token": "LPAREN", - "loc": "23:21-23:22" + "loc": "23:32-23:33" }, { "token": [ "LIDENT", "arr" ], - "loc": "23:22-23:25" + "loc": "23:33-23:36" }, { "token": "COMMA", - "loc": "23:25-23:26" + "loc": "23:36-23:37" }, { "token": [ "LIDENT", "x" ], - "loc": "23:27-23:28" + "loc": "23:38-23:39" }, { "token": "FAT_ARROW", - "loc": "23:29-23:31" + "loc": "23:40-23:42" }, { "token": "NEWLINE", - "loc": "23:31-23:32" + "loc": "23:42-23:43" }, { "token": "IF", @@ -919,16 +938,20 @@ "token": "RPAREN", "loc": "32:4-32:5" }, + { + "token": "RPAREN", + "loc": "32:5-32:6" + }, { "token": [ "SEMI", false ], - "loc": "32:5-32:5" + "loc": "32:6-32:6" }, { "token": "NEWLINE", - "loc": "32:5-32:6" + "loc": "32:6-32:7" }, { "token": [ @@ -942,72 +965,91 @@ "loc": "33:8-33:9" }, { - "token": "TRY_QUESTION", - "loc": "33:9-33:13" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "33:9-33:18" + }, + { + "token": "LPAREN", + "loc": "33:18-33:19" + }, + { + "token": "LPAREN", + "loc": "33:19-33:20" + }, + { + "token": "RPAREN", + "loc": "33:20-33:21" + }, + { + "token": "FAT_ARROW", + "loc": "33:22-33:24" }, { "token": [ "LIDENT", "map_err" ], - "loc": "33:14-33:21" + "loc": "33:25-33:32" }, { "token": "LPAREN", - "loc": "33:21-33:22" + "loc": "33:32-33:33" }, { "token": "LBRACKET", - "loc": "33:22-33:23" + "loc": "33:33-33:34" }, { "token": "DOTDOT", - "loc": "33:23-33:25" + "loc": "33:34-33:36" }, { "token": [ "LIDENT", "arr" ], - "loc": "33:25-33:28" + "loc": "33:36-33:39" }, { "token": "COMMA", - "loc": "33:28-33:29" + "loc": "33:39-33:40" }, { "token": "DOTDOT", - "loc": "33:30-33:32" + "loc": "33:41-33:43" }, { "token": [ "LIDENT", "arr" ], - "loc": "33:32-33:35" + "loc": "33:43-33:46" }, { "token": "RBRACKET", - "loc": "33:35-33:36" + "loc": "33:46-33:47" }, { "token": "COMMA", - "loc": "33:36-33:37" + "loc": "33:47-33:48" }, { "token": [ "LIDENT", "x" ], - "loc": "33:38-33:39" + "loc": "33:49-33:50" }, { "token": "FAT_ARROW", - "loc": "33:40-33:42" + "loc": "33:51-33:53" }, { "token": "NEWLINE", - "loc": "33:42-33:43" + "loc": "33:53-33:54" }, { "token": "IF", @@ -1199,16 +1241,20 @@ "token": "RPAREN", "loc": "42:4-42:5" }, + { + "token": "RPAREN", + "loc": "42:5-42:6" + }, { "token": [ "SEMI", false ], - "loc": "42:5-42:5" + "loc": "42:6-42:6" }, { "token": "NEWLINE", - "loc": "42:5-42:6" + "loc": "42:6-42:7" }, { "token": "LET", @@ -1311,45 +1357,64 @@ "loc": "44:8-44:9" }, { - "token": "TRY_QUESTION", - "loc": "44:9-44:13" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "44:9-44:18" + }, + { + "token": "LPAREN", + "loc": "44:18-44:19" + }, + { + "token": "LPAREN", + "loc": "44:19-44:20" + }, + { + "token": "RPAREN", + "loc": "44:20-44:21" + }, + { + "token": "FAT_ARROW", + "loc": "44:22-44:24" }, { "token": [ "LIDENT", "map_err" ], - "loc": "44:14-44:21" + "loc": "44:25-44:32" }, { "token": "LPAREN", - "loc": "44:21-44:22" + "loc": "44:32-44:33" }, { "token": [ "LIDENT", "arr1" ], - "loc": "44:22-44:26" + "loc": "44:33-44:37" }, { "token": "COMMA", - "loc": "44:26-44:27" + "loc": "44:37-44:38" }, { "token": [ "LIDENT", "x" ], - "loc": "44:28-44:29" + "loc": "44:39-44:40" }, { "token": "FAT_ARROW", - "loc": "44:30-44:32" + "loc": "44:41-44:43" }, { "token": "NEWLINE", - "loc": "44:32-44:33" + "loc": "44:43-44:44" }, { "token": "IF", @@ -1542,9 +1607,13 @@ "loc": "53:4-53:5" }, { - "token": "NEWLINE", + "token": "RPAREN", "loc": "53:5-53:6" }, + { + "token": "NEWLINE", + "loc": "53:6-53:7" + }, { "token": "RBRACE", "loc": "54:1-54:2" @@ -1560,8 +1629,324 @@ "token": "NEWLINE", "loc": "54:2-54:3" }, + { + "token": "NEWLINE", + "loc": "55:1-55:2" + }, + { + "token": "FN", + "loc": "56:1-56:3" + }, + { + "token": "LBRACKET", + "loc": "56:3-56:4" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "56:4-56:5" + }, + { + "token": "COMMA", + "loc": "56:5-56:6" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "56:7-56:8" + }, + { + "token": "COLON", + "loc": "56:9-56:10" + }, + { + "token": [ + "UIDENT", + "Error" + ], + "loc": "56:11-56:16" + }, + { + "token": "RBRACKET", + "loc": "56:16-56:17" + }, + { + "token": [ + "LIDENT", + "to_result" + ], + "loc": "56:18-56:27" + }, + { + "token": "LPAREN", + "loc": "56:27-56:28" + }, + { + "token": [ + "LIDENT", + "f" + ], + "loc": "56:28-56:29" + }, + { + "token": "COLON", + "loc": "56:30-56:31" + }, + { + "token": "LPAREN", + "loc": "56:32-56:33" + }, + { + "token": "RPAREN", + "loc": "56:33-56:34" + }, + { + "token": "THIN_ARROW", + "loc": "56:35-56:37" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "56:38-56:39" + }, + { + "token": "RAISE", + "loc": "56:40-56:45" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "56:46-56:47" + }, + { + "token": "RPAREN", + "loc": "56:47-56:48" + }, + { + "token": "THIN_ARROW", + "loc": "56:49-56:51" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "56:52-56:58" + }, + { + "token": "LBRACKET", + "loc": "56:58-56:59" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "56:59-56:60" + }, + { + "token": "COMMA", + "loc": "56:60-56:61" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "56:62-56:63" + }, + { + "token": "RBRACKET", + "loc": "56:63-56:64" + }, + { + "token": "LBRACE", + "loc": "56:65-56:66" + }, + { + "token": "NEWLINE", + "loc": "56:66-56:67" + }, + { + "token": "TRY", + "loc": "57:3-57:6" + }, + { + "token": [ + "LIDENT", + "f" + ], + "loc": "57:7-57:8" + }, + { + "token": "LPAREN", + "loc": "57:8-57:9" + }, + { + "token": "RPAREN", + "loc": "57:9-57:10" + }, + { + "token": "NEWLINE", + "loc": "57:10-57:11" + }, + { + "token": "CATCH", + "loc": "58:3-58:8" + }, + { + "token": "LBRACE", + "loc": "58:9-58:10" + }, + { + "token": "NEWLINE", + "loc": "58:10-58:11" + }, + { + "token": [ + "LIDENT", + "err" + ], + "loc": "59:5-59:8" + }, + { + "token": "FAT_ARROW", + "loc": "59:9-59:11" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "59:12-59:18" + }, + { + "token": "COLONCOLON", + "loc": "59:18-59:20" + }, + { + "token": [ + "UIDENT", + "Err" + ], + "loc": "59:20-59:23" + }, + { + "token": "LPAREN", + "loc": "59:23-59:24" + }, + { + "token": [ + "LIDENT", + "err" + ], + "loc": "59:24-59:27" + }, + { + "token": "RPAREN", + "loc": "59:27-59:28" + }, + { + "token": "NEWLINE", + "loc": "59:28-59:29" + }, + { + "token": "RBRACE", + "loc": "60:3-60:4" + }, + { + "token": "NORAISE", + "loc": "60:5-60:12" + }, + { + "token": "LBRACE", + "loc": "60:13-60:14" + }, + { + "token": "NEWLINE", + "loc": "60:14-60:15" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "61:5-61:10" + }, + { + "token": "FAT_ARROW", + "loc": "61:11-61:13" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "61:14-61:20" + }, + { + "token": "COLONCOLON", + "loc": "61:20-61:22" + }, + { + "token": [ + "UIDENT", + "Ok" + ], + "loc": "61:22-61:24" + }, + { + "token": "LPAREN", + "loc": "61:24-61:25" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "61:25-61:30" + }, + { + "token": "RPAREN", + "loc": "61:30-61:31" + }, + { + "token": "NEWLINE", + "loc": "61:31-61:32" + }, + { + "token": "RBRACE", + "loc": "62:3-62:4" + }, + { + "token": "NEWLINE", + "loc": "62:4-62:5" + }, + { + "token": "RBRACE", + "loc": "63:1-63:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "63:2-63:2" + }, + { + "token": "NEWLINE", + "loc": "63:2-63:3" + }, { "token": "EOF", - "loc": "55:1-55:1" + "loc": "64:1-64:1" } ] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/pipeline_test_mcore_inline_mut.json b/test/sync_test/__snapshot__/pipeline_test_mcore_inline_mut.json index 1e1146c9..cb21b904 100644 --- a/test/sync_test/__snapshot__/pipeline_test_mcore_inline_mut.json +++ b/test/sync_test/__snapshot__/pipeline_test_mcore_inline_mut.json @@ -677,7 +677,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { diff --git a/test/sync_test/__snapshot__/pipeline_test_mcore_inline_rec.json b/test/sync_test/__snapshot__/pipeline_test_mcore_inline_rec.json index 404d6c70..8c640cf3 100644 --- a/test/sync_test/__snapshot__/pipeline_test_mcore_inline_rec.json +++ b/test/sync_test/__snapshot__/pipeline_test_mcore_inline_rec.json @@ -304,7 +304,8 @@ "kind": "Expr::Array::ExprList", "loc": null, "children": [] - } + }, + "is_iter": false } }, "body": { @@ -1633,7 +1634,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { diff --git a/test/sync_test/__snapshot__/pipeline_test_method.json b/test/sync_test/__snapshot__/pipeline_test_method.json index 421d5064..be294b0c 100644 --- a/test/sync_test/__snapshot__/pipeline_test_method.json +++ b/test/sync_test/__snapshot__/pipeline_test_method.json @@ -985,7 +985,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { diff --git a/test/sync_test/__snapshot__/pipeline_test_method1.json b/test/sync_test/__snapshot__/pipeline_test_method1.json index 3b3a62b1..9ecfdae8 100644 --- a/test/sync_test/__snapshot__/pipeline_test_method1.json +++ b/test/sync_test/__snapshot__/pipeline_test_method1.json @@ -419,6 +419,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, @@ -963,6 +968,11 @@ } ] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, diff --git a/test/sync_test/__snapshot__/pipeline_test_method_on_object.json b/test/sync_test/__snapshot__/pipeline_test_method_on_object.json index 86d150b3..1b7d12c9 100644 --- a/test/sync_test/__snapshot__/pipeline_test_method_on_object.json +++ b/test/sync_test/__snapshot__/pipeline_test_method_on_object.json @@ -217,6 +217,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, @@ -1184,6 +1189,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, @@ -1490,6 +1500,11 @@ } ] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, diff --git a/test/sync_test/__snapshot__/pipeline_test_method_on_object2.json b/test/sync_test/__snapshot__/pipeline_test_method_on_object2.json index 9aaf0563..a69d4048 100644 --- a/test/sync_test/__snapshot__/pipeline_test_method_on_object2.json +++ b/test/sync_test/__snapshot__/pipeline_test_method_on_object2.json @@ -187,6 +187,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, @@ -1357,6 +1362,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, diff --git a/test/sync_test/__snapshot__/pipeline_test_mut.json b/test/sync_test/__snapshot__/pipeline_test_mut.json index 4ec2d37e..2031dda3 100644 --- a/test/sync_test/__snapshot__/pipeline_test_mut.json +++ b/test/sync_test/__snapshot__/pipeline_test_mut.json @@ -694,7 +694,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { diff --git a/test/sync_test/__snapshot__/pipeline_test_nested_assign.json b/test/sync_test/__snapshot__/pipeline_test_nested_assign.json index 95e02145..9699e238 100644 --- a/test/sync_test/__snapshot__/pipeline_test_nested_assign.json +++ b/test/sync_test/__snapshot__/pipeline_test_nested_assign.json @@ -1052,7 +1052,8 @@ } } ] - } + }, + "is_iter": false } }, { @@ -1103,19 +1104,23 @@ } } ] - } + }, + "is_iter": false } } ] - } + }, + "is_iter": false } } ] - } + }, + "is_iter": false } } ] - } + }, + "is_iter": false } }, "body": { diff --git a/test/sync_test/__snapshot__/pipeline_test_newtype4.json b/test/sync_test/__snapshot__/pipeline_test_newtype4.json index 51a5e165..51800e87 100644 --- a/test/sync_test/__snapshot__/pipeline_test_newtype4.json +++ b/test/sync_test/__snapshot__/pipeline_test_newtype4.json @@ -125,6 +125,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, diff --git a/test/sync_test/__snapshot__/pipeline_test_newtype_array.json b/test/sync_test/__snapshot__/pipeline_test_newtype_array.json index 8408bf8b..be7e609b 100644 --- a/test/sync_test/__snapshot__/pipeline_test_newtype_array.json +++ b/test/sync_test/__snapshot__/pipeline_test_newtype_array.json @@ -243,7 +243,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { @@ -968,7 +969,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { @@ -1396,7 +1398,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { diff --git a/test/sync_test/__snapshot__/pipeline_test_newtype_in_arr.json b/test/sync_test/__snapshot__/pipeline_test_newtype_in_arr.json index 07b6f7f6..86536536 100644 --- a/test/sync_test/__snapshot__/pipeline_test_newtype_in_arr.json +++ b/test/sync_test/__snapshot__/pipeline_test_newtype_in_arr.json @@ -265,7 +265,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { diff --git a/test/sync_test/__snapshot__/pipeline_test_newtype_interface.json b/test/sync_test/__snapshot__/pipeline_test_newtype_interface.json index 8b1de052..6579426b 100644 --- a/test/sync_test/__snapshot__/pipeline_test_newtype_interface.json +++ b/test/sync_test/__snapshot__/pipeline_test_newtype_interface.json @@ -784,6 +784,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, diff --git a/test/sync_test/__snapshot__/pipeline_test_no_payload_match.json b/test/sync_test/__snapshot__/pipeline_test_no_payload_match.json index 604ca1b1..bb1a0bec 100644 --- a/test/sync_test/__snapshot__/pipeline_test_no_payload_match.json +++ b/test/sync_test/__snapshot__/pipeline_test_no_payload_match.json @@ -726,6 +726,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, diff --git a/test/sync_test/__snapshot__/pipeline_test_noraise.json b/test/sync_test/__snapshot__/pipeline_test_noraise.json index f9bdf6bb..639f916a 100644 --- a/test/sync_test/__snapshot__/pipeline_test_noraise.json +++ b/test/sync_test/__snapshot__/pipeline_test_noraise.json @@ -366,46 +366,116 @@ "loc": null, "children": { "value": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", + "value": "to_result_async" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Function", + "loc": null, + "children": { + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "value": "a" + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "a" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::DefaultErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Lambda", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": { + "kind": "Async", + "loc": null, + "children": {} + } } } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", - "loc": null, - "children": [] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} } - } + ] }, - "kind": { - "kind": "TryOperatorKind::Question", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -622,5 +692,1051 @@ } } } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "to_result" + } + }, + "has_error": null, + "is_async": null, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "f" + } + }, + "ty": { + "kind": "Type::Arrow", + "loc": null, + "children": { + "args": { + "kind": "Type::Arrow::ArgList", + "loc": null, + "children": [] + }, + "res": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "T" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "err": { + "kind": "ErrorType::ErrorType", + "loc": null, + "children": { + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "E" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + "is_async": null + } + } + } + } + ] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [ + { + "kind": "TypeVarBinder", + "loc": null, + "children": { + "name": "T", + "constraints": { + "kind": "TypeVarBinder::TypeVarConstraintList", + "loc": null, + "children": [] + } + } + }, + { + "kind": "TypeVarBinder", + "loc": null, + "children": { + "name": "E", + "constraints": { + "kind": "TypeVarBinder::TypeVarConstraintList", + "loc": null, + "children": [ + { + "kind": "TypeVarConstraint", + "loc": null, + "children": { + "trait": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Error" + } + } + } + } + ] + } + } + } + ] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [ + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "T" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "E" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + ] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::Try", + "loc": null, + "children": { + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "f" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "catch": { + "kind": "Expr::Try::CaseList", + "loc": null, + "children": [ + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "err" + } + } + } + }, + "guard": null, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Err" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::TypeName", + "loc": null, + "children": { + "value": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + }, + "is_object": false + } + } + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "err" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + ] + }, + "catch_all": false, + "try_else": { + "kind": "Expr::Try::CaseList", + "loc": null, + "children": [ + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "value" + } + } + } + }, + "guard": null, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Ok" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::TypeName", + "loc": null, + "children": { + "value": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + }, + "is_object": false + } + } + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "value" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + ] + }, + "has_try": true + } + } + } + } + } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "to_result_async" + } + }, + "has_error": null, + "is_async": { + "kind": "Async", + "loc": null, + "children": {} + }, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "f" + } + }, + "ty": { + "kind": "Type::Arrow", + "loc": null, + "children": { + "args": { + "kind": "Type::Arrow::ArgList", + "loc": null, + "children": [] + }, + "res": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "T" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "err": { + "kind": "ErrorType::ErrorType", + "loc": null, + "children": { + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "E" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + "is_async": { + "kind": "Async", + "loc": null, + "children": {} + } + } + } + } + } + ] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [ + { + "kind": "TypeVarBinder", + "loc": null, + "children": { + "name": "T", + "constraints": { + "kind": "TypeVarBinder::TypeVarConstraintList", + "loc": null, + "children": [] + } + } + }, + { + "kind": "TypeVarBinder", + "loc": null, + "children": { + "name": "E", + "constraints": { + "kind": "TypeVarBinder::TypeVarConstraintList", + "loc": null, + "children": [ + { + "kind": "TypeVarConstraint", + "loc": null, + "children": { + "trait": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Error" + } + } + } + } + ] + } + } + } + ] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [ + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "T" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "E" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + ] + } + } + }, + "error_type": { + "kind": "ErrorType::Noraise", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::Try", + "loc": null, + "children": { + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "f" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "catch": { + "kind": "Expr::Try::CaseList", + "loc": null, + "children": [ + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "err" + } + } + } + }, + "guard": null, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Err" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::TypeName", + "loc": null, + "children": { + "value": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + }, + "is_object": false + } + } + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "err" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + ] + }, + "catch_all": false, + "try_else": { + "kind": "Expr::Try::CaseList", + "loc": null, + "children": [ + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "value" + } + } + } + }, + "guard": null, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Ok" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::TypeName", + "loc": null, + "children": { + "value": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + }, + "is_object": false + } + } + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "value" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + ] + }, + "has_try": true + } + } + } + } + } } ] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/pipeline_test_noraise.mbt b/test/sync_test/__snapshot__/pipeline_test_noraise.mbt index d0c3ff38..537bb3bf 100644 --- a/test/sync_test/__snapshot__/pipeline_test_noraise.mbt +++ b/test/sync_test/__snapshot__/pipeline_test_noraise.mbt @@ -2,7 +2,7 @@ fn run_async(f : async () -> Unit noraise) -> Unit = "%async.run" ///| fn ff(a : async () -> Int raise) -> Unit { - run_async(() => debug(try? a())) + run_async(() => debug(to_result_async(async fn () raise { a() }))) } ///| @@ -10,3 +10,23 @@ fn ff(a : async () -> Int raise) -> Unit { fn main { ff(async fn() noraise { 42 }) } + +fn[T, E : Error] to_result(f : () -> T raise E) -> Result[T, E] { + try f() + catch { + err => Result::Err(err) + } noraise { + value => Result::Ok(value) + } +} + +async fn[T, E : Error] to_result_async( + f : async () -> T raise E +) -> Result[T, E] noraise { + try f() + catch { + err => Result::Err(err) + } noraise { + value => Result::Ok(value) + } +} diff --git a/test/sync_test/__snapshot__/pipeline_test_noraise.mbt.tokens.json b/test/sync_test/__snapshot__/pipeline_test_noraise.mbt.tokens.json index ddfc5ab2..23b42358 100644 --- a/test/sync_test/__snapshot__/pipeline_test_noraise.mbt.tokens.json +++ b/test/sync_test/__snapshot__/pipeline_test_noraise.mbt.tokens.json @@ -225,35 +225,74 @@ "loc": "5:24-5:25" }, { - "token": "TRY_QUESTION", - "loc": "5:25-5:29" + "token": [ + "LIDENT", + "to_result_async" + ], + "loc": "5:25-5:40" + }, + { + "token": "LPAREN", + "loc": "5:40-5:41" + }, + { + "token": "ASYNC", + "loc": "5:41-5:46" + }, + { + "token": "FN", + "loc": "5:47-5:49" + }, + { + "token": "LPAREN", + "loc": "5:50-5:51" + }, + { + "token": "RPAREN", + "loc": "5:51-5:52" + }, + { + "token": "RAISE", + "loc": "5:53-5:58" + }, + { + "token": "LBRACE", + "loc": "5:59-5:60" }, { "token": [ "LIDENT", "a" ], - "loc": "5:30-5:31" + "loc": "5:61-5:62" }, { "token": "LPAREN", - "loc": "5:31-5:32" + "loc": "5:62-5:63" }, { "token": "RPAREN", - "loc": "5:32-5:33" + "loc": "5:63-5:64" + }, + { + "token": "RBRACE", + "loc": "5:65-5:66" }, { "token": "RPAREN", - "loc": "5:33-5:34" + "loc": "5:66-5:67" }, { "token": "RPAREN", - "loc": "5:34-5:35" + "loc": "5:67-5:68" + }, + { + "token": "RPAREN", + "loc": "5:68-5:69" }, { "token": "NEWLINE", - "loc": "5:35-5:36" + "loc": "5:69-5:70" }, { "token": "RBRACE", @@ -398,8 +437,660 @@ "token": "NEWLINE", "loc": "12:2-12:3" }, + { + "token": "NEWLINE", + "loc": "13:1-13:2" + }, + { + "token": "FN", + "loc": "14:1-14:3" + }, + { + "token": "LBRACKET", + "loc": "14:3-14:4" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "14:4-14:5" + }, + { + "token": "COMMA", + "loc": "14:5-14:6" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "14:7-14:8" + }, + { + "token": "COLON", + "loc": "14:9-14:10" + }, + { + "token": [ + "UIDENT", + "Error" + ], + "loc": "14:11-14:16" + }, + { + "token": "RBRACKET", + "loc": "14:16-14:17" + }, + { + "token": [ + "LIDENT", + "to_result" + ], + "loc": "14:18-14:27" + }, + { + "token": "LPAREN", + "loc": "14:27-14:28" + }, + { + "token": [ + "LIDENT", + "f" + ], + "loc": "14:28-14:29" + }, + { + "token": "COLON", + "loc": "14:30-14:31" + }, + { + "token": "LPAREN", + "loc": "14:32-14:33" + }, + { + "token": "RPAREN", + "loc": "14:33-14:34" + }, + { + "token": "THIN_ARROW", + "loc": "14:35-14:37" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "14:38-14:39" + }, + { + "token": "RAISE", + "loc": "14:40-14:45" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "14:46-14:47" + }, + { + "token": "RPAREN", + "loc": "14:47-14:48" + }, + { + "token": "THIN_ARROW", + "loc": "14:49-14:51" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "14:52-14:58" + }, + { + "token": "LBRACKET", + "loc": "14:58-14:59" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "14:59-14:60" + }, + { + "token": "COMMA", + "loc": "14:60-14:61" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "14:62-14:63" + }, + { + "token": "RBRACKET", + "loc": "14:63-14:64" + }, + { + "token": "LBRACE", + "loc": "14:65-14:66" + }, + { + "token": "NEWLINE", + "loc": "14:66-14:67" + }, + { + "token": "TRY", + "loc": "15:3-15:6" + }, + { + "token": [ + "LIDENT", + "f" + ], + "loc": "15:7-15:8" + }, + { + "token": "LPAREN", + "loc": "15:8-15:9" + }, + { + "token": "RPAREN", + "loc": "15:9-15:10" + }, + { + "token": "NEWLINE", + "loc": "15:10-15:11" + }, + { + "token": "CATCH", + "loc": "16:3-16:8" + }, + { + "token": "LBRACE", + "loc": "16:9-16:10" + }, + { + "token": "NEWLINE", + "loc": "16:10-16:11" + }, + { + "token": [ + "LIDENT", + "err" + ], + "loc": "17:5-17:8" + }, + { + "token": "FAT_ARROW", + "loc": "17:9-17:11" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "17:12-17:18" + }, + { + "token": "COLONCOLON", + "loc": "17:18-17:20" + }, + { + "token": [ + "UIDENT", + "Err" + ], + "loc": "17:20-17:23" + }, + { + "token": "LPAREN", + "loc": "17:23-17:24" + }, + { + "token": [ + "LIDENT", + "err" + ], + "loc": "17:24-17:27" + }, + { + "token": "RPAREN", + "loc": "17:27-17:28" + }, + { + "token": "NEWLINE", + "loc": "17:28-17:29" + }, + { + "token": "RBRACE", + "loc": "18:3-18:4" + }, + { + "token": "NORAISE", + "loc": "18:5-18:12" + }, + { + "token": "LBRACE", + "loc": "18:13-18:14" + }, + { + "token": "NEWLINE", + "loc": "18:14-18:15" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "19:5-19:10" + }, + { + "token": "FAT_ARROW", + "loc": "19:11-19:13" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "19:14-19:20" + }, + { + "token": "COLONCOLON", + "loc": "19:20-19:22" + }, + { + "token": [ + "UIDENT", + "Ok" + ], + "loc": "19:22-19:24" + }, + { + "token": "LPAREN", + "loc": "19:24-19:25" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "19:25-19:30" + }, + { + "token": "RPAREN", + "loc": "19:30-19:31" + }, + { + "token": "NEWLINE", + "loc": "19:31-19:32" + }, + { + "token": "RBRACE", + "loc": "20:3-20:4" + }, + { + "token": "NEWLINE", + "loc": "20:4-20:5" + }, + { + "token": "RBRACE", + "loc": "21:1-21:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "21:2-21:2" + }, + { + "token": "NEWLINE", + "loc": "21:2-21:3" + }, + { + "token": "NEWLINE", + "loc": "22:1-22:2" + }, + { + "token": "ASYNC", + "loc": "23:1-23:6" + }, + { + "token": "FN", + "loc": "23:7-23:9" + }, + { + "token": "LBRACKET", + "loc": "23:9-23:10" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "23:10-23:11" + }, + { + "token": "COMMA", + "loc": "23:11-23:12" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "23:13-23:14" + }, + { + "token": "COLON", + "loc": "23:15-23:16" + }, + { + "token": [ + "UIDENT", + "Error" + ], + "loc": "23:17-23:22" + }, + { + "token": "RBRACKET", + "loc": "23:22-23:23" + }, + { + "token": [ + "LIDENT", + "to_result_async" + ], + "loc": "23:24-23:39" + }, + { + "token": "LPAREN", + "loc": "23:39-23:40" + }, + { + "token": "NEWLINE", + "loc": "23:40-23:41" + }, + { + "token": [ + "LIDENT", + "f" + ], + "loc": "24:3-24:4" + }, + { + "token": "COLON", + "loc": "24:5-24:6" + }, + { + "token": "ASYNC", + "loc": "24:7-24:12" + }, + { + "token": "LPAREN", + "loc": "24:13-24:14" + }, + { + "token": "RPAREN", + "loc": "24:14-24:15" + }, + { + "token": "THIN_ARROW", + "loc": "24:16-24:18" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "24:19-24:20" + }, + { + "token": "RAISE", + "loc": "24:21-24:26" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "24:27-24:28" + }, + { + "token": "NEWLINE", + "loc": "24:28-24:29" + }, + { + "token": "RPAREN", + "loc": "25:1-25:2" + }, + { + "token": "THIN_ARROW", + "loc": "25:3-25:5" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "25:6-25:12" + }, + { + "token": "LBRACKET", + "loc": "25:12-25:13" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "25:13-25:14" + }, + { + "token": "COMMA", + "loc": "25:14-25:15" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "25:16-25:17" + }, + { + "token": "RBRACKET", + "loc": "25:17-25:18" + }, + { + "token": "NORAISE", + "loc": "25:19-25:26" + }, + { + "token": "LBRACE", + "loc": "25:27-25:28" + }, + { + "token": "NEWLINE", + "loc": "25:28-25:29" + }, + { + "token": "TRY", + "loc": "26:3-26:6" + }, + { + "token": [ + "LIDENT", + "f" + ], + "loc": "26:7-26:8" + }, + { + "token": "LPAREN", + "loc": "26:8-26:9" + }, + { + "token": "RPAREN", + "loc": "26:9-26:10" + }, + { + "token": "NEWLINE", + "loc": "26:10-26:11" + }, + { + "token": "CATCH", + "loc": "27:3-27:8" + }, + { + "token": "LBRACE", + "loc": "27:9-27:10" + }, + { + "token": "NEWLINE", + "loc": "27:10-27:11" + }, + { + "token": [ + "LIDENT", + "err" + ], + "loc": "28:5-28:8" + }, + { + "token": "FAT_ARROW", + "loc": "28:9-28:11" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "28:12-28:18" + }, + { + "token": "COLONCOLON", + "loc": "28:18-28:20" + }, + { + "token": [ + "UIDENT", + "Err" + ], + "loc": "28:20-28:23" + }, + { + "token": "LPAREN", + "loc": "28:23-28:24" + }, + { + "token": [ + "LIDENT", + "err" + ], + "loc": "28:24-28:27" + }, + { + "token": "RPAREN", + "loc": "28:27-28:28" + }, + { + "token": "NEWLINE", + "loc": "28:28-28:29" + }, + { + "token": "RBRACE", + "loc": "29:3-29:4" + }, + { + "token": "NORAISE", + "loc": "29:5-29:12" + }, + { + "token": "LBRACE", + "loc": "29:13-29:14" + }, + { + "token": "NEWLINE", + "loc": "29:14-29:15" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "30:5-30:10" + }, + { + "token": "FAT_ARROW", + "loc": "30:11-30:13" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "30:14-30:20" + }, + { + "token": "COLONCOLON", + "loc": "30:20-30:22" + }, + { + "token": [ + "UIDENT", + "Ok" + ], + "loc": "30:22-30:24" + }, + { + "token": "LPAREN", + "loc": "30:24-30:25" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "30:25-30:30" + }, + { + "token": "RPAREN", + "loc": "30:30-30:31" + }, + { + "token": "NEWLINE", + "loc": "30:31-30:32" + }, + { + "token": "RBRACE", + "loc": "31:3-31:4" + }, + { + "token": "NEWLINE", + "loc": "31:4-31:5" + }, + { + "token": "RBRACE", + "loc": "32:1-32:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "32:2-32:2" + }, + { + "token": "NEWLINE", + "loc": "32:2-32:3" + }, { "token": "EOF", - "loc": "13:1-13:1" + "loc": "33:1-33:1" } ] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/pipeline_test_notequal.json b/test/sync_test/__snapshot__/pipeline_test_notequal.json index 82b2ce89..97414f10 100644 --- a/test/sync_test/__snapshot__/pipeline_test_notequal.json +++ b/test/sync_test/__snapshot__/pipeline_test_notequal.json @@ -150,6 +150,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, diff --git a/test/sync_test/__snapshot__/pipeline_test_obj_in_arr.json b/test/sync_test/__snapshot__/pipeline_test_obj_in_arr.json index 2b916a1a..720ebafa 100644 --- a/test/sync_test/__snapshot__/pipeline_test_obj_in_arr.json +++ b/test/sync_test/__snapshot__/pipeline_test_obj_in_arr.json @@ -1342,7 +1342,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -1477,7 +1478,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -1523,7 +1525,8 @@ "kind": "Expr::Array::ExprList", "loc": null, "children": [] - } + }, + "is_iter": false } }, "body": { diff --git a/test/sync_test/__snapshot__/pipeline_test_object_as_object.json b/test/sync_test/__snapshot__/pipeline_test_object_as_object.json index 2a71f947..cf4320cc 100644 --- a/test/sync_test/__snapshot__/pipeline_test_object_as_object.json +++ b/test/sync_test/__snapshot__/pipeline_test_object_as_object.json @@ -386,6 +386,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, @@ -698,6 +703,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, @@ -1533,6 +1543,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, diff --git a/test/sync_test/__snapshot__/pipeline_test_object_as_object2.json b/test/sync_test/__snapshot__/pipeline_test_object_as_object2.json index d578e7d2..801b96f2 100644 --- a/test/sync_test/__snapshot__/pipeline_test_object_as_object2.json +++ b/test/sync_test/__snapshot__/pipeline_test_object_as_object2.json @@ -187,6 +187,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, @@ -571,6 +576,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, @@ -755,6 +765,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, diff --git a/test/sync_test/__snapshot__/pipeline_test_only_tag_enum_as.json b/test/sync_test/__snapshot__/pipeline_test_only_tag_enum_as.json index 700c6f15..daee54ed 100644 --- a/test/sync_test/__snapshot__/pipeline_test_only_tag_enum_as.json +++ b/test/sync_test/__snapshot__/pipeline_test_only_tag_enum_as.json @@ -731,6 +731,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, diff --git a/test/sync_test/__snapshot__/pipeline_test_oop.json b/test/sync_test/__snapshot__/pipeline_test_oop.json index 99c99a15..d31d9e26 100644 --- a/test/sync_test/__snapshot__/pipeline_test_oop.json +++ b/test/sync_test/__snapshot__/pipeline_test_oop.json @@ -1132,6 +1132,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, @@ -2228,6 +2233,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, @@ -2407,6 +2417,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, @@ -2531,6 +2546,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, @@ -2744,6 +2764,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, @@ -3415,6 +3440,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, @@ -3691,6 +3721,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, @@ -3809,6 +3844,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, @@ -4284,6 +4324,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, diff --git a/test/sync_test/__snapshot__/pipeline_test_op_as_view.json b/test/sync_test/__snapshot__/pipeline_test_op_as_view.json index d9a611cf..a6499094 100644 --- a/test/sync_test/__snapshot__/pipeline_test_op_as_view.json +++ b/test/sync_test/__snapshot__/pipeline_test_op_as_view.json @@ -3091,7 +3091,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -4346,7 +4347,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { diff --git a/test/sync_test/__snapshot__/pipeline_test_option.json b/test/sync_test/__snapshot__/pipeline_test_option.json index 826676e8..dbbb4044 100644 --- a/test/sync_test/__snapshot__/pipeline_test_option.json +++ b/test/sync_test/__snapshot__/pipeline_test_option.json @@ -2909,7 +2909,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -7288,7 +7289,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { diff --git a/test/sync_test/__snapshot__/pipeline_test_option_func.json b/test/sync_test/__snapshot__/pipeline_test_option_func.json index 97bfb265..0c9c7907 100644 --- a/test/sync_test/__snapshot__/pipeline_test_option_func.json +++ b/test/sync_test/__snapshot__/pipeline_test_option_func.json @@ -11021,7 +11021,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -11786,7 +11787,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { diff --git a/test/sync_test/__snapshot__/pipeline_test_option_func2.json b/test/sync_test/__snapshot__/pipeline_test_option_func2.json index edfe30d4..ff6a4896 100644 --- a/test/sync_test/__snapshot__/pipeline_test_option_func2.json +++ b/test/sync_test/__snapshot__/pipeline_test_option_func2.json @@ -1320,7 +1320,8 @@ "kind": "Expr::Array::ExprList", "loc": null, "children": [] - } + }, + "is_iter": false } }, "body": { diff --git a/test/sync_test/__snapshot__/pipeline_test_option_optimization.json b/test/sync_test/__snapshot__/pipeline_test_option_optimization.json index 87caada3..16c8b89c 100644 --- a/test/sync_test/__snapshot__/pipeline_test_option_optimization.json +++ b/test/sync_test/__snapshot__/pipeline_test_option_optimization.json @@ -5222,7 +5222,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -5435,7 +5436,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -5648,7 +5650,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -5733,7 +5736,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -5934,7 +5938,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -6147,7 +6152,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -6360,7 +6366,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -6573,7 +6580,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -6786,7 +6794,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -6999,7 +7008,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -7212,7 +7222,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -7529,7 +7540,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -7742,7 +7754,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -8005,7 +8018,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -8147,7 +8161,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -8274,7 +8289,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -8294,7 +8310,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -8507,7 +8524,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -8914,7 +8932,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -9193,7 +9212,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -9542,7 +9562,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { diff --git a/test/sync_test/__snapshot__/pipeline_test_option_return_test.json b/test/sync_test/__snapshot__/pipeline_test_option_return_test.json index 1c9fcbe0..3f3f28dc 100644 --- a/test/sync_test/__snapshot__/pipeline_test_option_return_test.json +++ b/test/sync_test/__snapshot__/pipeline_test_option_return_test.json @@ -932,6 +932,11 @@ } ] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, @@ -1691,7 +1696,8 @@ } } ] - } + }, + "is_iter": false } }, "is_pun": false diff --git a/test/sync_test/__snapshot__/pipeline_test_option_test.json b/test/sync_test/__snapshot__/pipeline_test_option_test.json index 95f429df..3d81b600 100644 --- a/test/sync_test/__snapshot__/pipeline_test_option_test.json +++ b/test/sync_test/__snapshot__/pipeline_test_option_test.json @@ -307,7 +307,8 @@ "kind": "Expr::Array::ExprList", "loc": null, "children": [] - } + }, + "is_iter": false } }, "body": { @@ -391,7 +392,8 @@ "kind": "Expr::Array::ExprList", "loc": null, "children": [] - } + }, + "is_iter": false } }, "body": { diff --git a/test/sync_test/__snapshot__/pipeline_test_option_uint2.json b/test/sync_test/__snapshot__/pipeline_test_option_uint2.json index d14e202e..3ff92906 100644 --- a/test/sync_test/__snapshot__/pipeline_test_option_uint2.json +++ b/test/sync_test/__snapshot__/pipeline_test_option_uint2.json @@ -484,7 +484,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { diff --git a/test/sync_test/__snapshot__/pipeline_test_optional_arg.json b/test/sync_test/__snapshot__/pipeline_test_optional_arg.json index 0ef48513..78fbdb08 100644 --- a/test/sync_test/__snapshot__/pipeline_test_optional_arg.json +++ b/test/sync_test/__snapshot__/pipeline_test_optional_arg.json @@ -1369,6 +1369,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, @@ -1472,6 +1477,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, diff --git a/test/sync_test/__snapshot__/pipeline_test_optional_in_trait.json b/test/sync_test/__snapshot__/pipeline_test_optional_in_trait.json index 48ed0bf9..85ca3c55 100644 --- a/test/sync_test/__snapshot__/pipeline_test_optional_in_trait.json +++ b/test/sync_test/__snapshot__/pipeline_test_optional_in_trait.json @@ -242,6 +242,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, @@ -634,6 +639,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, diff --git a/test/sync_test/__snapshot__/pipeline_test_optional_type_abbrv.json b/test/sync_test/__snapshot__/pipeline_test_optional_type_abbrv.json index 88a9c51a..48f417b7 100644 --- a/test/sync_test/__snapshot__/pipeline_test_optional_type_abbrv.json +++ b/test/sync_test/__snapshot__/pipeline_test_optional_type_abbrv.json @@ -362,7 +362,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { diff --git a/test/sync_test/__snapshot__/pipeline_test_overload_char_escape_sequences.json b/test/sync_test/__snapshot__/pipeline_test_overload_char_escape_sequences.json index 2c60ddd3..7ea22350 100644 --- a/test/sync_test/__snapshot__/pipeline_test_overload_char_escape_sequences.json +++ b/test/sync_test/__snapshot__/pipeline_test_overload_char_escape_sequences.json @@ -692,7 +692,8 @@ } } ] - } + }, + "is_iter": false } }, "ty": { @@ -882,7 +883,8 @@ } } ] - } + }, + "is_iter": false } }, "ty": { diff --git a/test/sync_test/__snapshot__/pipeline_test_palindrome.json b/test/sync_test/__snapshot__/pipeline_test_palindrome.json index 4311d17e..1889fb36 100644 --- a/test/sync_test/__snapshot__/pipeline_test_palindrome.json +++ b/test/sync_test/__snapshot__/pipeline_test_palindrome.json @@ -605,7 +605,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { @@ -822,7 +823,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { @@ -1615,7 +1617,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { @@ -1832,7 +1835,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { diff --git a/test/sync_test/__snapshot__/pipeline_test_partial_application.mbt b/test/sync_test/__snapshot__/pipeline_test_partial_application.mbt index 4cd17510..b7fdc89f 100644 --- a/test/sync_test/__snapshot__/pipeline_test_partial_application.mbt +++ b/test/sync_test/__snapshot__/pipeline_test_partial_application.mbt @@ -95,9 +95,11 @@ fn main { hof(false, Foo::C(1, _, "hello", 3.14)) |> println // used as higher-order function in check mode, for error and async - (try? hof_err(1, f_err(_, false, "hello", 3.14))) |> ignore + to_result(() => hof_err(1, f_err(_, false, "hello", 3.14))) |> ignore let _ = async fn() noraise { - (try? hof_async(1, f_async(_, false, "hello", 3.14))) |> ignore + to_result_async(async fn () raise { + hof_async(1, f_async(_, false, "hello", 3.14)) + }) |> ignore } // dot application @@ -122,3 +124,23 @@ impl Show for Foo with output(self, logger) { } } } + +fn[T, E : Error] to_result(f : () -> T raise E) -> Result[T, E] { + try f() + catch { + err => Result::Err(err) + } noraise { + value => Result::Ok(value) + } +} + +async fn[T, E : Error] to_result_async( + f : async () -> T raise E +) -> Result[T, E] noraise { + try f() + catch { + err => Result::Err(err) + } noraise { + value => Result::Ok(value) + } +} diff --git a/test/sync_test/__snapshot__/pipeline_test_partial_application.mbt.tokens.json b/test/sync_test/__snapshot__/pipeline_test_partial_application.mbt.tokens.json index b732bce9..9bd7217e 100644 --- a/test/sync_test/__snapshot__/pipeline_test_partial_application.mbt.tokens.json +++ b/test/sync_test/__snapshot__/pipeline_test_partial_application.mbt.tokens.json @@ -4173,114 +4173,129 @@ "token": "NEWLINE", "loc": "97:70-97:71" }, + { + "token": [ + "LIDENT", + "to_result" + ], + "loc": "98:3-98:12" + }, + { + "token": "LPAREN", + "loc": "98:12-98:13" + }, { "token": "LPAREN", - "loc": "98:3-98:4" + "loc": "98:13-98:14" }, { - "token": "TRY_QUESTION", - "loc": "98:4-98:8" + "token": "RPAREN", + "loc": "98:14-98:15" + }, + { + "token": "FAT_ARROW", + "loc": "98:16-98:18" }, { "token": [ "LIDENT", "hof_err" ], - "loc": "98:9-98:16" + "loc": "98:19-98:26" }, { "token": "LPAREN", - "loc": "98:16-98:17" + "loc": "98:26-98:27" }, { "token": [ "INT", "1" ], - "loc": "98:17-98:18" + "loc": "98:27-98:28" }, { "token": "COMMA", - "loc": "98:18-98:19" + "loc": "98:28-98:29" }, { "token": [ "LIDENT", "f_err" ], - "loc": "98:20-98:25" + "loc": "98:30-98:35" }, { "token": "LPAREN", - "loc": "98:25-98:26" + "loc": "98:35-98:36" }, { "token": "UNDERSCORE", - "loc": "98:26-98:27" + "loc": "98:36-98:37" }, { "token": "COMMA", - "loc": "98:27-98:28" + "loc": "98:37-98:38" }, { "token": "FALSE", - "loc": "98:29-98:34" + "loc": "98:39-98:44" }, { "token": "COMMA", - "loc": "98:34-98:35" + "loc": "98:44-98:45" }, { "token": [ "STRING", "hello" ], - "loc": "98:36-98:43" + "loc": "98:46-98:53" }, { "token": "COMMA", - "loc": "98:43-98:44" + "loc": "98:53-98:54" }, { "token": [ "DOUBLE", "3.14" ], - "loc": "98:45-98:49" + "loc": "98:55-98:59" }, { "token": "RPAREN", - "loc": "98:49-98:50" + "loc": "98:59-98:60" }, { "token": "RPAREN", - "loc": "98:50-98:51" + "loc": "98:60-98:61" }, { "token": "RPAREN", - "loc": "98:51-98:52" + "loc": "98:61-98:62" }, { "token": "PIPE", - "loc": "98:53-98:55" + "loc": "98:63-98:65" }, { "token": [ "LIDENT", "ignore" ], - "loc": "98:56-98:62" + "loc": "98:66-98:72" }, { "token": [ "SEMI", false ], - "loc": "98:62-98:62" + "loc": "98:72-98:72" }, { "token": "NEWLINE", - "loc": "98:62-98:63" + "loc": "98:72-98:73" }, { "token": "LET", @@ -4322,126 +4337,165 @@ "token": "NEWLINE", "loc": "99:31-99:32" }, + { + "token": [ + "LIDENT", + "to_result_async" + ], + "loc": "100:5-100:20" + }, + { + "token": "LPAREN", + "loc": "100:20-100:21" + }, + { + "token": "ASYNC", + "loc": "100:21-100:26" + }, + { + "token": "FN", + "loc": "100:27-100:29" + }, { "token": "LPAREN", - "loc": "100:5-100:6" + "loc": "100:30-100:31" + }, + { + "token": "RPAREN", + "loc": "100:31-100:32" + }, + { + "token": "RAISE", + "loc": "100:33-100:38" + }, + { + "token": "LBRACE", + "loc": "100:39-100:40" }, { - "token": "TRY_QUESTION", - "loc": "100:6-100:10" + "token": "NEWLINE", + "loc": "100:40-100:41" }, { "token": [ "LIDENT", "hof_async" ], - "loc": "100:11-100:20" + "loc": "101:7-101:16" }, { "token": "LPAREN", - "loc": "100:20-100:21" + "loc": "101:16-101:17" }, { "token": [ "INT", "1" ], - "loc": "100:21-100:22" + "loc": "101:17-101:18" }, { "token": "COMMA", - "loc": "100:22-100:23" + "loc": "101:18-101:19" }, { "token": [ "LIDENT", "f_async" ], - "loc": "100:24-100:31" + "loc": "101:20-101:27" }, { "token": "LPAREN", - "loc": "100:31-100:32" + "loc": "101:27-101:28" }, { "token": "UNDERSCORE", - "loc": "100:32-100:33" + "loc": "101:28-101:29" }, { "token": "COMMA", - "loc": "100:33-100:34" + "loc": "101:29-101:30" }, { "token": "FALSE", - "loc": "100:35-100:40" + "loc": "101:31-101:36" }, { "token": "COMMA", - "loc": "100:40-100:41" + "loc": "101:36-101:37" }, { "token": [ "STRING", "hello" ], - "loc": "100:42-100:49" + "loc": "101:38-101:45" }, { "token": "COMMA", - "loc": "100:49-100:50" + "loc": "101:45-101:46" }, { "token": [ "DOUBLE", "3.14" ], - "loc": "100:51-100:55" + "loc": "101:47-101:51" }, { "token": "RPAREN", - "loc": "100:55-100:56" + "loc": "101:51-101:52" }, { "token": "RPAREN", - "loc": "100:56-100:57" + "loc": "101:52-101:53" + }, + { + "token": "NEWLINE", + "loc": "101:53-101:54" + }, + { + "token": "RBRACE", + "loc": "102:5-102:6" }, { "token": "RPAREN", - "loc": "100:57-100:58" + "loc": "102:6-102:7" }, { "token": "PIPE", - "loc": "100:59-100:61" + "loc": "102:8-102:10" }, { "token": [ "LIDENT", "ignore" ], - "loc": "100:62-100:68" + "loc": "102:11-102:17" }, { "token": "NEWLINE", - "loc": "100:68-100:69" + "loc": "102:17-102:18" }, { "token": "RBRACE", - "loc": "101:3-101:4" + "loc": "103:3-103:4" }, { "token": [ "SEMI", false ], - "loc": "101:4-101:4" + "loc": "103:4-103:4" }, { "token": "NEWLINE", - "loc": "101:4-101:5" + "loc": "103:4-103:5" }, { "token": "NEWLINE", - "loc": "102:1-102:2" + "loc": "104:1-104:2" }, { "token": [ @@ -4458,135 +4512,135 @@ "consumed_by_docstring": false } ], - "loc": "103:3-103:21" + "loc": "105:3-105:21" }, { "token": "NEWLINE", - "loc": "103:21-103:22" + "loc": "105:21-105:22" }, { "token": "LBRACKET", - "loc": "104:3-104:4" + "loc": "106:3-106:4" }, { "token": [ "UIDENT", "C" ], - "loc": "104:5-104:6" + "loc": "106:5-106:6" }, { "token": "LPAREN", - "loc": "104:6-104:7" + "loc": "106:6-106:7" }, { "token": [ "INT", "1" ], - "loc": "104:7-104:8" + "loc": "106:7-106:8" }, { "token": "COMMA", - "loc": "104:8-104:9" + "loc": "106:8-106:9" }, { "token": "TRUE", - "loc": "104:10-104:14" + "loc": "106:10-106:14" }, { "token": "COMMA", - "loc": "104:14-104:15" + "loc": "106:14-106:15" }, { "token": [ "STRING", "s" ], - "loc": "104:16-104:19" + "loc": "106:16-106:19" }, { "token": "COMMA", - "loc": "104:19-104:20" + "loc": "106:19-106:20" }, { "token": [ "DOUBLE", "2.0" ], - "loc": "104:21-104:24" + "loc": "106:21-106:24" }, { "token": "RPAREN", - "loc": "104:24-104:25" + "loc": "106:24-106:25" }, { "token": "RBRACKET", - "loc": "104:26-104:27" + "loc": "106:26-106:27" }, { "token": [ "DOT_LIDENT", "each" ], - "loc": "104:28-104:32" + "loc": "106:28-106:32" }, { "token": "LPAREN", - "loc": "104:32-104:33" + "loc": "106:32-106:33" }, { "token": "UNDERSCORE", - "loc": "104:33-104:34" + "loc": "106:33-106:34" }, { "token": [ "DOT_LIDENT", "g" ], - "loc": "104:35-104:36" + "loc": "106:35-106:36" }, { "token": "LPAREN", - "loc": "104:36-104:37" + "loc": "106:36-106:37" }, { "token": "FALSE", - "loc": "104:37-104:42" + "loc": "106:37-106:42" }, { "token": "COMMA", - "loc": "104:42-104:43" + "loc": "106:42-106:43" }, { "token": [ "STRING", "x" ], - "loc": "104:44-104:47" + "loc": "106:44-106:47" }, { "token": "RPAREN", - "loc": "104:47-104:48" + "loc": "106:47-106:48" }, { "token": "RPAREN", - "loc": "104:48-104:49" + "loc": "106:48-106:49" }, { "token": [ "SEMI", false ], - "loc": "104:49-104:49" + "loc": "106:49-106:49" }, { "token": "NEWLINE", - "loc": "104:49-104:50" + "loc": "106:49-106:50" }, { "token": "NEWLINE", - "loc": "105:1-105:2" + "loc": "107:1-107:2" }, { "token": [ @@ -4603,679 +4657,1331 @@ "consumed_by_docstring": false } ], - "loc": "106:3-106:28" + "loc": "108:3-108:28" }, { "token": "NEWLINE", - "loc": "106:28-106:29" + "loc": "108:28-108:29" }, { "token": [ "LIDENT", "obj" ], - "loc": "107:3-107:6" + "loc": "109:3-109:6" }, { "token": "PIPE", - "loc": "107:7-107:9" + "loc": "109:7-109:9" }, { "token": "UNDERSCORE", - "loc": "107:10-107:11" + "loc": "109:10-109:11" }, { "token": [ "DOT_LIDENT", "g" ], - "loc": "107:12-107:13" + "loc": "109:12-109:13" }, { "token": "LPAREN", - "loc": "107:13-107:14" + "loc": "109:13-109:14" }, { "token": "TRUE", - "loc": "107:14-107:18" + "loc": "109:14-109:18" }, { "token": "COMMA", - "loc": "107:18-107:19" + "loc": "109:18-109:19" }, { "token": [ "STRING", "y" ], - "loc": "107:20-107:23" + "loc": "109:20-109:23" }, { "token": "RPAREN", - "loc": "107:23-107:24" + "loc": "109:23-109:24" }, { "token": "NEWLINE", - "loc": "107:24-107:25" + "loc": "109:24-109:25" }, { "token": "RBRACE", - "loc": "108:1-108:2" + "loc": "110:1-110:2" }, { "token": [ "SEMI", false ], - "loc": "108:2-108:2" + "loc": "110:2-110:2" }, { "token": "NEWLINE", - "loc": "108:2-108:3" + "loc": "110:2-110:3" }, { "token": "NEWLINE", - "loc": "109:1-109:2" + "loc": "111:1-111:2" }, { "token": "IMPL", - "loc": "110:1-110:5" + "loc": "112:1-112:5" }, { "token": [ "UIDENT", "Show" ], - "loc": "110:6-110:10" + "loc": "112:6-112:10" }, { "token": "FOR", - "loc": "110:11-110:14" + "loc": "112:11-112:14" }, { "token": [ "UIDENT", "Foo" ], - "loc": "110:15-110:18" + "loc": "112:15-112:18" }, { "token": "WITH", - "loc": "110:19-110:23" + "loc": "112:19-112:23" }, { "token": [ "LIDENT", "output" ], - "loc": "110:24-110:30" + "loc": "112:24-112:30" }, { "token": "LPAREN", - "loc": "110:30-110:31" + "loc": "112:30-112:31" }, { "token": [ "LIDENT", "self" ], - "loc": "110:31-110:35" + "loc": "112:31-112:35" }, { "token": "COMMA", - "loc": "110:35-110:36" + "loc": "112:35-112:36" }, { "token": [ "LIDENT", "logger" ], - "loc": "110:37-110:43" + "loc": "112:37-112:43" }, { "token": "RPAREN", - "loc": "110:43-110:44" + "loc": "112:43-112:44" }, { "token": "LBRACE", - "loc": "110:45-110:46" + "loc": "112:45-112:46" }, { "token": "NEWLINE", - "loc": "110:46-110:47" + "loc": "112:46-112:47" }, { "token": "MATCH", - "loc": "111:3-111:8" + "loc": "113:3-113:8" }, { "token": [ "LIDENT", "self" ], - "loc": "111:9-111:13" + "loc": "113:9-113:13" }, { "token": "LBRACE", - "loc": "111:14-111:15" + "loc": "113:14-113:15" }, { "token": "NEWLINE", - "loc": "111:15-111:16" + "loc": "113:15-113:16" }, { "token": [ "UIDENT", "C" ], - "loc": "112:5-112:6" + "loc": "114:5-114:6" }, { "token": "LPAREN", - "loc": "112:6-112:7" + "loc": "114:6-114:7" }, { "token": [ "LIDENT", "v0" ], - "loc": "112:7-112:9" + "loc": "114:7-114:9" }, { "token": "COMMA", - "loc": "112:9-112:10" + "loc": "114:9-114:10" }, { "token": [ "LIDENT", "v1" ], - "loc": "112:11-112:13" + "loc": "114:11-114:13" }, { "token": "COMMA", - "loc": "112:13-112:14" + "loc": "114:13-114:14" }, { "token": [ "LIDENT", "v2" ], - "loc": "112:15-112:17" + "loc": "114:15-114:17" }, { "token": "COMMA", - "loc": "112:17-112:18" + "loc": "114:17-114:18" }, { "token": [ "LIDENT", "v3" ], - "loc": "112:19-112:21" + "loc": "114:19-114:21" }, { "token": "RPAREN", - "loc": "112:21-112:22" + "loc": "114:21-114:22" }, { "token": "FAT_ARROW", - "loc": "112:23-112:25" + "loc": "114:23-114:25" }, { "token": "LBRACE", - "loc": "112:26-112:27" + "loc": "114:26-114:27" }, { "token": "NEWLINE", - "loc": "112:27-112:28" + "loc": "114:27-114:28" }, { "token": [ "LIDENT", "logger" ], - "loc": "113:7-113:13" + "loc": "115:7-115:13" }, { "token": [ "DOT_LIDENT", "write_string" ], - "loc": "113:14-113:26" + "loc": "115:14-115:26" }, { "token": "LPAREN", - "loc": "113:26-113:27" + "loc": "115:26-115:27" }, { "token": [ "STRING", "C(" ], - "loc": "113:27-113:31" + "loc": "115:27-115:31" }, { "token": "RPAREN", - "loc": "113:31-113:32" + "loc": "115:31-115:32" }, { "token": [ "SEMI", false ], - "loc": "113:32-113:32" + "loc": "115:32-115:32" }, { "token": "NEWLINE", - "loc": "113:32-113:33" + "loc": "115:32-115:33" }, { "token": [ "UIDENT", "Show" ], - "loc": "114:7-114:11" + "loc": "116:7-116:11" }, { "token": "COLONCOLON", - "loc": "114:11-114:13" + "loc": "116:11-116:13" }, { "token": [ "LIDENT", "output" ], - "loc": "114:13-114:19" + "loc": "116:13-116:19" }, { "token": "LPAREN", - "loc": "114:19-114:20" + "loc": "116:19-116:20" }, { "token": [ "LIDENT", "v0" ], - "loc": "114:20-114:22" + "loc": "116:20-116:22" }, { "token": "COMMA", - "loc": "114:22-114:23" + "loc": "116:22-116:23" }, { "token": [ "LIDENT", "logger" ], - "loc": "114:24-114:30" + "loc": "116:24-116:30" }, { "token": "RPAREN", - "loc": "114:30-114:31" + "loc": "116:30-116:31" }, { "token": [ "SEMI", false ], - "loc": "114:31-114:31" + "loc": "116:31-116:31" }, { "token": "NEWLINE", - "loc": "114:31-114:32" + "loc": "116:31-116:32" }, { "token": [ "LIDENT", "logger" ], - "loc": "115:7-115:13" + "loc": "117:7-117:13" }, { "token": [ "DOT_LIDENT", "write_string" ], - "loc": "115:14-115:26" + "loc": "117:14-117:26" }, { "token": "LPAREN", - "loc": "115:26-115:27" + "loc": "117:26-117:27" }, { "token": [ "STRING", ", " ], - "loc": "115:27-115:31" + "loc": "117:27-117:31" }, { "token": "RPAREN", - "loc": "115:31-115:32" + "loc": "117:31-117:32" }, { "token": [ "SEMI", false ], - "loc": "115:32-115:32" + "loc": "117:32-117:32" }, { "token": "NEWLINE", - "loc": "115:32-115:33" + "loc": "117:32-117:33" }, { "token": [ "UIDENT", "Show" ], - "loc": "116:7-116:11" + "loc": "118:7-118:11" }, { "token": "COLONCOLON", - "loc": "116:11-116:13" + "loc": "118:11-118:13" }, { "token": [ "LIDENT", "output" ], - "loc": "116:13-116:19" + "loc": "118:13-118:19" }, { "token": "LPAREN", - "loc": "116:19-116:20" + "loc": "118:19-118:20" }, { "token": [ "LIDENT", "v1" ], - "loc": "116:20-116:22" + "loc": "118:20-118:22" }, { "token": "COMMA", - "loc": "116:22-116:23" + "loc": "118:22-118:23" }, { "token": [ "LIDENT", "logger" ], - "loc": "116:24-116:30" + "loc": "118:24-118:30" }, { "token": "RPAREN", - "loc": "116:30-116:31" + "loc": "118:30-118:31" }, { "token": [ "SEMI", false ], - "loc": "116:31-116:31" + "loc": "118:31-118:31" }, { "token": "NEWLINE", - "loc": "116:31-116:32" + "loc": "118:31-118:32" }, { "token": [ "LIDENT", "logger" ], - "loc": "117:7-117:13" + "loc": "119:7-119:13" }, { "token": [ "DOT_LIDENT", "write_string" ], - "loc": "117:14-117:26" + "loc": "119:14-119:26" }, { "token": "LPAREN", - "loc": "117:26-117:27" + "loc": "119:26-119:27" }, { "token": [ "STRING", ", " ], - "loc": "117:27-117:31" + "loc": "119:27-119:31" }, { "token": "RPAREN", - "loc": "117:31-117:32" + "loc": "119:31-119:32" }, { "token": [ "SEMI", false ], - "loc": "117:32-117:32" + "loc": "119:32-119:32" }, { "token": "NEWLINE", - "loc": "117:32-117:33" + "loc": "119:32-119:33" }, { "token": [ "UIDENT", "Show" ], - "loc": "118:7-118:11" + "loc": "120:7-120:11" }, { "token": "COLONCOLON", - "loc": "118:11-118:13" + "loc": "120:11-120:13" }, { "token": [ "LIDENT", "output" ], - "loc": "118:13-118:19" + "loc": "120:13-120:19" }, { "token": "LPAREN", - "loc": "118:19-118:20" + "loc": "120:19-120:20" }, { "token": [ "LIDENT", "v2" ], - "loc": "118:20-118:22" + "loc": "120:20-120:22" }, { "token": "COMMA", - "loc": "118:22-118:23" + "loc": "120:22-120:23" }, { "token": [ "LIDENT", "logger" ], - "loc": "118:24-118:30" + "loc": "120:24-120:30" }, { "token": "RPAREN", - "loc": "118:30-118:31" + "loc": "120:30-120:31" }, { "token": [ "SEMI", false ], - "loc": "118:31-118:31" + "loc": "120:31-120:31" }, { "token": "NEWLINE", - "loc": "118:31-118:32" + "loc": "120:31-120:32" }, { "token": [ "LIDENT", "logger" ], - "loc": "119:7-119:13" + "loc": "121:7-121:13" }, { "token": [ "DOT_LIDENT", "write_string" ], - "loc": "119:14-119:26" + "loc": "121:14-121:26" }, { "token": "LPAREN", - "loc": "119:26-119:27" + "loc": "121:26-121:27" }, { "token": [ "STRING", ", " ], - "loc": "119:27-119:31" + "loc": "121:27-121:31" }, { "token": "RPAREN", - "loc": "119:31-119:32" + "loc": "121:31-121:32" }, { "token": [ "SEMI", false ], - "loc": "119:32-119:32" + "loc": "121:32-121:32" }, { "token": "NEWLINE", - "loc": "119:32-119:33" + "loc": "121:32-121:33" }, { "token": [ "UIDENT", "Show" ], - "loc": "120:7-120:11" + "loc": "122:7-122:11" }, { "token": "COLONCOLON", - "loc": "120:11-120:13" + "loc": "122:11-122:13" }, { "token": [ "LIDENT", "output" ], - "loc": "120:13-120:19" + "loc": "122:13-122:19" }, { "token": "LPAREN", - "loc": "120:19-120:20" + "loc": "122:19-122:20" }, { "token": [ "LIDENT", "v3" ], - "loc": "120:20-120:22" + "loc": "122:20-122:22" }, { "token": "COMMA", - "loc": "120:22-120:23" + "loc": "122:22-122:23" }, { "token": [ "LIDENT", "logger" ], - "loc": "120:24-120:30" + "loc": "122:24-122:30" }, { "token": "RPAREN", - "loc": "120:30-120:31" + "loc": "122:30-122:31" }, { "token": [ "SEMI", false ], - "loc": "120:31-120:31" + "loc": "122:31-122:31" }, { "token": "NEWLINE", - "loc": "120:31-120:32" + "loc": "122:31-122:32" }, { "token": [ "LIDENT", "logger" ], - "loc": "121:7-121:13" + "loc": "123:7-123:13" }, { "token": [ "DOT_LIDENT", "write_string" ], - "loc": "121:14-121:26" + "loc": "123:14-123:26" }, { "token": "LPAREN", - "loc": "121:26-121:27" + "loc": "123:26-123:27" }, { "token": [ "STRING", ")" ], - "loc": "121:27-121:30" + "loc": "123:27-123:30" }, { "token": "RPAREN", - "loc": "121:30-121:31" + "loc": "123:30-123:31" }, { "token": "NEWLINE", - "loc": "121:31-121:32" + "loc": "123:31-123:32" + }, + { + "token": "RBRACE", + "loc": "124:5-124:6" + }, + { + "token": "NEWLINE", + "loc": "124:6-124:7" + }, + { + "token": "RBRACE", + "loc": "125:3-125:4" + }, + { + "token": "NEWLINE", + "loc": "125:4-125:5" }, { "token": "RBRACE", - "loc": "122:5-122:6" + "loc": "126:1-126:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "126:2-126:2" + }, + { + "token": "NEWLINE", + "loc": "126:2-126:3" + }, + { + "token": "NEWLINE", + "loc": "127:1-127:2" + }, + { + "token": "FN", + "loc": "128:1-128:3" + }, + { + "token": "LBRACKET", + "loc": "128:3-128:4" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "128:4-128:5" + }, + { + "token": "COMMA", + "loc": "128:5-128:6" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "128:7-128:8" + }, + { + "token": "COLON", + "loc": "128:9-128:10" + }, + { + "token": [ + "UIDENT", + "Error" + ], + "loc": "128:11-128:16" + }, + { + "token": "RBRACKET", + "loc": "128:16-128:17" + }, + { + "token": [ + "LIDENT", + "to_result" + ], + "loc": "128:18-128:27" + }, + { + "token": "LPAREN", + "loc": "128:27-128:28" + }, + { + "token": [ + "LIDENT", + "f" + ], + "loc": "128:28-128:29" + }, + { + "token": "COLON", + "loc": "128:30-128:31" + }, + { + "token": "LPAREN", + "loc": "128:32-128:33" + }, + { + "token": "RPAREN", + "loc": "128:33-128:34" + }, + { + "token": "THIN_ARROW", + "loc": "128:35-128:37" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "128:38-128:39" + }, + { + "token": "RAISE", + "loc": "128:40-128:45" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "128:46-128:47" + }, + { + "token": "RPAREN", + "loc": "128:47-128:48" + }, + { + "token": "THIN_ARROW", + "loc": "128:49-128:51" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "128:52-128:58" + }, + { + "token": "LBRACKET", + "loc": "128:58-128:59" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "128:59-128:60" + }, + { + "token": "COMMA", + "loc": "128:60-128:61" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "128:62-128:63" + }, + { + "token": "RBRACKET", + "loc": "128:63-128:64" + }, + { + "token": "LBRACE", + "loc": "128:65-128:66" + }, + { + "token": "NEWLINE", + "loc": "128:66-128:67" + }, + { + "token": "TRY", + "loc": "129:3-129:6" + }, + { + "token": [ + "LIDENT", + "f" + ], + "loc": "129:7-129:8" + }, + { + "token": "LPAREN", + "loc": "129:8-129:9" + }, + { + "token": "RPAREN", + "loc": "129:9-129:10" + }, + { + "token": "NEWLINE", + "loc": "129:10-129:11" + }, + { + "token": "CATCH", + "loc": "130:3-130:8" + }, + { + "token": "LBRACE", + "loc": "130:9-130:10" + }, + { + "token": "NEWLINE", + "loc": "130:10-130:11" + }, + { + "token": [ + "LIDENT", + "err" + ], + "loc": "131:5-131:8" + }, + { + "token": "FAT_ARROW", + "loc": "131:9-131:11" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "131:12-131:18" + }, + { + "token": "COLONCOLON", + "loc": "131:18-131:20" + }, + { + "token": [ + "UIDENT", + "Err" + ], + "loc": "131:20-131:23" + }, + { + "token": "LPAREN", + "loc": "131:23-131:24" + }, + { + "token": [ + "LIDENT", + "err" + ], + "loc": "131:24-131:27" + }, + { + "token": "RPAREN", + "loc": "131:27-131:28" + }, + { + "token": "NEWLINE", + "loc": "131:28-131:29" + }, + { + "token": "RBRACE", + "loc": "132:3-132:4" + }, + { + "token": "NORAISE", + "loc": "132:5-132:12" + }, + { + "token": "LBRACE", + "loc": "132:13-132:14" + }, + { + "token": "NEWLINE", + "loc": "132:14-132:15" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "133:5-133:10" + }, + { + "token": "FAT_ARROW", + "loc": "133:11-133:13" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "133:14-133:20" + }, + { + "token": "COLONCOLON", + "loc": "133:20-133:22" + }, + { + "token": [ + "UIDENT", + "Ok" + ], + "loc": "133:22-133:24" + }, + { + "token": "LPAREN", + "loc": "133:24-133:25" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "133:25-133:30" + }, + { + "token": "RPAREN", + "loc": "133:30-133:31" + }, + { + "token": "NEWLINE", + "loc": "133:31-133:32" + }, + { + "token": "RBRACE", + "loc": "134:3-134:4" + }, + { + "token": "NEWLINE", + "loc": "134:4-134:5" + }, + { + "token": "RBRACE", + "loc": "135:1-135:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "135:2-135:2" + }, + { + "token": "NEWLINE", + "loc": "135:2-135:3" + }, + { + "token": "NEWLINE", + "loc": "136:1-136:2" + }, + { + "token": "ASYNC", + "loc": "137:1-137:6" + }, + { + "token": "FN", + "loc": "137:7-137:9" + }, + { + "token": "LBRACKET", + "loc": "137:9-137:10" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "137:10-137:11" + }, + { + "token": "COMMA", + "loc": "137:11-137:12" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "137:13-137:14" + }, + { + "token": "COLON", + "loc": "137:15-137:16" + }, + { + "token": [ + "UIDENT", + "Error" + ], + "loc": "137:17-137:22" + }, + { + "token": "RBRACKET", + "loc": "137:22-137:23" + }, + { + "token": [ + "LIDENT", + "to_result_async" + ], + "loc": "137:24-137:39" + }, + { + "token": "LPAREN", + "loc": "137:39-137:40" + }, + { + "token": "NEWLINE", + "loc": "137:40-137:41" + }, + { + "token": [ + "LIDENT", + "f" + ], + "loc": "138:3-138:4" + }, + { + "token": "COLON", + "loc": "138:5-138:6" + }, + { + "token": "ASYNC", + "loc": "138:7-138:12" + }, + { + "token": "LPAREN", + "loc": "138:13-138:14" + }, + { + "token": "RPAREN", + "loc": "138:14-138:15" + }, + { + "token": "THIN_ARROW", + "loc": "138:16-138:18" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "138:19-138:20" + }, + { + "token": "RAISE", + "loc": "138:21-138:26" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "138:27-138:28" + }, + { + "token": "NEWLINE", + "loc": "138:28-138:29" + }, + { + "token": "RPAREN", + "loc": "139:1-139:2" + }, + { + "token": "THIN_ARROW", + "loc": "139:3-139:5" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "139:6-139:12" + }, + { + "token": "LBRACKET", + "loc": "139:12-139:13" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "139:13-139:14" + }, + { + "token": "COMMA", + "loc": "139:14-139:15" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "139:16-139:17" + }, + { + "token": "RBRACKET", + "loc": "139:17-139:18" + }, + { + "token": "NORAISE", + "loc": "139:19-139:26" + }, + { + "token": "LBRACE", + "loc": "139:27-139:28" + }, + { + "token": "NEWLINE", + "loc": "139:28-139:29" + }, + { + "token": "TRY", + "loc": "140:3-140:6" + }, + { + "token": [ + "LIDENT", + "f" + ], + "loc": "140:7-140:8" + }, + { + "token": "LPAREN", + "loc": "140:8-140:9" + }, + { + "token": "RPAREN", + "loc": "140:9-140:10" + }, + { + "token": "NEWLINE", + "loc": "140:10-140:11" + }, + { + "token": "CATCH", + "loc": "141:3-141:8" + }, + { + "token": "LBRACE", + "loc": "141:9-141:10" + }, + { + "token": "NEWLINE", + "loc": "141:10-141:11" + }, + { + "token": [ + "LIDENT", + "err" + ], + "loc": "142:5-142:8" + }, + { + "token": "FAT_ARROW", + "loc": "142:9-142:11" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "142:12-142:18" + }, + { + "token": "COLONCOLON", + "loc": "142:18-142:20" + }, + { + "token": [ + "UIDENT", + "Err" + ], + "loc": "142:20-142:23" + }, + { + "token": "LPAREN", + "loc": "142:23-142:24" + }, + { + "token": [ + "LIDENT", + "err" + ], + "loc": "142:24-142:27" + }, + { + "token": "RPAREN", + "loc": "142:27-142:28" + }, + { + "token": "NEWLINE", + "loc": "142:28-142:29" + }, + { + "token": "RBRACE", + "loc": "143:3-143:4" + }, + { + "token": "NORAISE", + "loc": "143:5-143:12" + }, + { + "token": "LBRACE", + "loc": "143:13-143:14" + }, + { + "token": "NEWLINE", + "loc": "143:14-143:15" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "144:5-144:10" + }, + { + "token": "FAT_ARROW", + "loc": "144:11-144:13" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "144:14-144:20" + }, + { + "token": "COLONCOLON", + "loc": "144:20-144:22" + }, + { + "token": [ + "UIDENT", + "Ok" + ], + "loc": "144:22-144:24" + }, + { + "token": "LPAREN", + "loc": "144:24-144:25" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "144:25-144:30" + }, + { + "token": "RPAREN", + "loc": "144:30-144:31" }, { "token": "NEWLINE", - "loc": "122:6-122:7" + "loc": "144:31-144:32" }, { "token": "RBRACE", - "loc": "123:3-123:4" + "loc": "145:3-145:4" }, { "token": "NEWLINE", - "loc": "123:4-123:5" + "loc": "145:4-145:5" }, { "token": "RBRACE", - "loc": "124:1-124:2" + "loc": "146:1-146:2" }, { "token": [ "SEMI", false ], - "loc": "124:2-124:2" + "loc": "146:2-146:2" }, { "token": "NEWLINE", - "loc": "124:2-124:3" + "loc": "146:2-146:3" }, { "token": "EOF", - "loc": "125:1-125:1" + "loc": "147:1-147:1" } ] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/pipeline_test_pattern_guard.json b/test/sync_test/__snapshot__/pipeline_test_pattern_guard.json index d35a0dc3..513bab10 100644 --- a/test/sync_test/__snapshot__/pipeline_test_pattern_guard.json +++ b/test/sync_test/__snapshot__/pipeline_test_pattern_guard.json @@ -4845,7 +4845,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -5082,7 +5083,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -5278,7 +5280,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -5336,7 +5339,8 @@ "kind": "Expr::Array::ExprList", "loc": null, "children": [] - } + }, + "is_iter": false } }, "kind": { diff --git a/test/sync_test/__snapshot__/pipeline_test_pattern_guard_binding.json b/test/sync_test/__snapshot__/pipeline_test_pattern_guard_binding.json new file mode 100644 index 00000000..4028b4b9 --- /dev/null +++ b/test/sync_test/__snapshot__/pipeline_test_pattern_guard_binding.json @@ -0,0 +1,2036 @@ +[ + { + "kind": "Impl::TopTypeDef", + "loc": null, + "children": { + "value": { + "kind": "TypeDecl", + "loc": null, + "children": { + "tycon": "Parsed", + "params": { + "kind": "TypeDecl::ParamList", + "loc": null, + "children": [] + }, + "components": { + "kind": "TypeDesc::Variant", + "loc": null, + "children": { + "value": { + "kind": "TypeDesc::Variant::ConstrList", + "loc": null, + "children": [ + { + "kind": "ConstrDecl", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Integer" + } + }, + "args": { + "kind": "ConstrDecl::ArgList", + "loc": null, + "children": [ + { + "kind": "ConstrParam", + "loc": null, + "children": { + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Int64" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "mut": false, + "label": null + } + } + ] + }, + "tag": null, + "attrs": { + "kind": "ConstrDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + { + "kind": "ConstrDecl", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "String" + } + }, + "args": { + "kind": "ConstrDecl::ArgList", + "loc": null, + "children": [ + { + "kind": "ConstrParam", + "loc": null, + "children": { + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "String" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "mut": false, + "label": null + } + } + ] + }, + "tag": null, + "attrs": { + "kind": "ConstrDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + } + ] + } + } + }, + "attrs": { + "kind": "TypeDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "", + "type_vis": { + "kind": "Visibility::Priv", + "loc": null, + "children": {} + }, + "is_declare": false, + "deriving": { + "kind": "TypeDecl::DerivingList", + "loc": null, + "children": [] + } + } + } + } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "parse_scalar" + } + }, + "has_error": null, + "is_async": null, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "v" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "String" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + } + ] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Parsed" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::Match", + "loc": null, + "children": { + "expr": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v" + } + } + } + } + } + }, + "cases": { + "kind": "Expr::Match::CaseList", + "loc": null, + "children": [ + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Array", + "loc": null, + "children": { + "pats": { + "kind": "ArrayPatterns::Open", + "loc": null, + "children": { + "0": { + "kind": "ArrayPatterns::Open::LPatternList", + "loc": null, + "children": [ + { + "kind": "ArrayPattern::Pattern", + "loc": null, + "children": { + "value": { + "kind": "Pattern::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Char", + "loc": null, + "children": { + "value": "0" + } + } + } + } + } + }, + { + "kind": "ArrayPattern::Pattern", + "loc": null, + "children": { + "value": { + "kind": "Pattern::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Char", + "loc": null, + "children": { + "value": "x" + } + } + } + } + } + } + ] + }, + "1": { + "kind": "ArrayPatterns::Open::RPatternList", + "loc": null, + "children": [] + }, + "2": { + "kind": "DotDotBinder::Binder", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "number" + } + } + } + } + } + } + } + }, + "guard": { + "kind": "Expr::Is", + "loc": null, + "children": { + "expr": { + "kind": "Expr::Group", + "loc": null, + "children": { + "expr": { + "kind": "Expr::Try", + "loc": null, + "children": { + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Dot", + "loc": null, + "children": { + "pkg": "string", + "id": "parse_int64" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "number" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "16" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Labelled", + "loc": null, + "children": { + "value": { + "kind": "Label", + "loc": null, + "children": { + "name": "base" + } + } + } + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "catch": { + "kind": "Expr::Try::CaseList", + "loc": null, + "children": [ + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "err" + } + } + } + }, + "guard": null, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Err" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::NoExtraInfo", + "loc": null, + "children": {} + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "err" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + ] + }, + "catch_all": false, + "try_else": { + "kind": "Expr::Try::CaseList", + "loc": null, + "children": [ + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "value" + } + } + } + }, + "guard": null, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Ok" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::NoExtraInfo", + "loc": null, + "children": {} + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "value" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + ] + }, + "has_try": true + } + }, + "group": { + "kind": "Group::Paren", + "loc": null, + "children": {} + } + } + }, + "pat": { + "kind": "Pattern::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Ok" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::NoExtraInfo", + "loc": null, + "children": {} + } + } + }, + "args": { + "kind": "Pattern::Constr::ArgList", + "loc": null, + "children": [ + { + "kind": "ConstrPatArg", + "loc": null, + "children": { + "pat": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "i" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "is_open": false + } + } + } + }, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Integer" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::TypeName", + "loc": null, + "children": { + "value": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Parsed" + } + }, + "is_object": false + } + } + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "i" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + }, + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Array", + "loc": null, + "children": { + "pats": { + "kind": "ArrayPatterns::Open", + "loc": null, + "children": { + "0": { + "kind": "ArrayPatterns::Open::LPatternList", + "loc": null, + "children": [ + { + "kind": "ArrayPattern::Pattern", + "loc": null, + "children": { + "value": { + "kind": "Pattern::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Char", + "loc": null, + "children": { + "value": "+" + } + } + } + } + } + } + ] + }, + "1": { + "kind": "ArrayPatterns::Open::RPatternList", + "loc": null, + "children": [] + }, + "2": { + "kind": "DotDotBinder::Binder", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "number" + } + } + } + } + } + } + } + }, + "guard": { + "kind": "Expr::Is", + "loc": null, + "children": { + "expr": { + "kind": "Expr::Group", + "loc": null, + "children": { + "expr": { + "kind": "Expr::Try", + "loc": null, + "children": { + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Dot", + "loc": null, + "children": { + "pkg": "string", + "id": "parse_int64" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "number" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "catch": { + "kind": "Expr::Try::CaseList", + "loc": null, + "children": [ + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "err" + } + } + } + }, + "guard": null, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Err" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::NoExtraInfo", + "loc": null, + "children": {} + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "err" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + ] + }, + "catch_all": false, + "try_else": { + "kind": "Expr::Try::CaseList", + "loc": null, + "children": [ + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "value" + } + } + } + }, + "guard": null, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Ok" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::NoExtraInfo", + "loc": null, + "children": {} + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "value" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + ] + }, + "has_try": true + } + }, + "group": { + "kind": "Group::Paren", + "loc": null, + "children": {} + } + } + }, + "pat": { + "kind": "Pattern::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Ok" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::NoExtraInfo", + "loc": null, + "children": {} + } + } + }, + "args": { + "kind": "Pattern::Constr::ArgList", + "loc": null, + "children": [ + { + "kind": "ConstrPatArg", + "loc": null, + "children": { + "pat": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "i" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "is_open": false + } + } + } + }, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Integer" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::TypeName", + "loc": null, + "children": { + "value": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Parsed" + } + }, + "is_object": false + } + } + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "i" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + }, + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Any", + "loc": null, + "children": {} + }, + "guard": null, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "String" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::TypeName", + "loc": null, + "children": { + "value": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Parsed" + } + }, + "is_object": false + } + } + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + ] + } + } + } + } + } + } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "main" + } + }, + "has_error": null, + "is_async": null, + "decl_params": null, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [] + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::Sequence", + "loc": null, + "children": { + "exprs": { + "kind": "Expr::Sequence::ExprList", + "loc": null, + "children": [ + { + "kind": "Expr::Match", + "loc": null, + "children": { + "expr": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "parse_scalar" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "+42" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "cases": { + "kind": "Expr::Match::CaseList", + "loc": null, + "children": [ + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Integer" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::TypeName", + "loc": null, + "children": { + "value": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Parsed" + } + }, + "is_object": false + } + } + } + } + } + }, + "args": { + "kind": "Pattern::Constr::ArgList", + "loc": null, + "children": [ + { + "kind": "ConstrPatArg", + "loc": null, + "children": { + "pat": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "i" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "is_open": false + } + }, + "guard": null, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "i" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + }, + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Any", + "loc": null, + "children": {} + }, + "guard": null, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "panic" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + ] + } + } + } + ] + }, + "last_expr": { + "kind": "Expr::Match", + "loc": null, + "children": { + "expr": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "parse_scalar" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "plain" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "cases": { + "kind": "Expr::Match::CaseList", + "loc": null, + "children": [ + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "String" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::TypeName", + "loc": null, + "children": { + "value": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Parsed" + } + }, + "is_object": false + } + } + } + } + } + }, + "args": { + "kind": "Pattern::Constr::ArgList", + "loc": null, + "children": [ + { + "kind": "ConstrPatArg", + "loc": null, + "children": { + "pat": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "s" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "is_open": false + } + }, + "guard": null, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "s" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + }, + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Any", + "loc": null, + "children": {} + }, + "guard": null, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "panic" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + ] + } + } + } + } + } + } + } + } + } +] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/pipeline_test_pattern_guard_binding.mbt b/test/sync_test/__snapshot__/pipeline_test_pattern_guard_binding.mbt new file mode 100644 index 00000000..8e6f4a98 --- /dev/null +++ b/test/sync_test/__snapshot__/pipeline_test_pattern_guard_binding.mbt @@ -0,0 +1,37 @@ + +///| +priv enum Parsed { + Integer(Int64) + String(String) +} + +///| +fn parse_scalar(v : String) -> Parsed { + match v { + ['0', 'x', .. number] if (try @string.parse_int64(number, base=16) catch { + err => Err(err) + } noraise { + value => Ok(value) + }) + is Ok(i) => Parsed::Integer(i) + ['+', .. number] if (try @string.parse_int64(number) catch { + err => Err(err) + } noraise { + value => Ok(value) + }) + is Ok(i) => Parsed::Integer(i) + _ => Parsed::String(v) + } +} + +///| +fn main { + match parse_scalar("+42") { + Parsed::Integer(i) => println(i) + _ => panic() + } + match parse_scalar("plain") { + Parsed::String(s) => println(s) + _ => panic() + } +} diff --git a/test/sync_test/__snapshot__/pipeline_test_pattern_guard_binding.mbt.tokens.json b/test/sync_test/__snapshot__/pipeline_test_pattern_guard_binding.mbt.tokens.json new file mode 100644 index 00000000..8b4eeab7 --- /dev/null +++ b/test/sync_test/__snapshot__/pipeline_test_pattern_guard_binding.mbt.tokens.json @@ -0,0 +1,1191 @@ +[ + { + "token": "NEWLINE", + "loc": "1:1-1:2" + }, + { + "token": [ + "COMMENT", + { + "content": "///|", + "kind": [ + "Ownline", + { + "leading_blank_line": false, + "trailing_blank_line": false + } + ], + "consumed_by_docstring": false + } + ], + "loc": "2:1-2:5" + }, + { + "token": "NEWLINE", + "loc": "2:5-2:6" + }, + { + "token": "PRIV", + "loc": "3:1-3:5" + }, + { + "token": "ENUM", + "loc": "3:6-3:10" + }, + { + "token": [ + "UIDENT", + "Parsed" + ], + "loc": "3:11-3:17" + }, + { + "token": "LBRACE", + "loc": "3:18-3:19" + }, + { + "token": "NEWLINE", + "loc": "3:19-3:20" + }, + { + "token": [ + "UIDENT", + "Integer" + ], + "loc": "4:3-4:10" + }, + { + "token": "LPAREN", + "loc": "4:10-4:11" + }, + { + "token": [ + "UIDENT", + "Int64" + ], + "loc": "4:11-4:16" + }, + { + "token": "RPAREN", + "loc": "4:16-4:17" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "4:17-4:17" + }, + { + "token": "NEWLINE", + "loc": "4:17-4:18" + }, + { + "token": [ + "UIDENT", + "String" + ], + "loc": "5:3-5:9" + }, + { + "token": "LPAREN", + "loc": "5:9-5:10" + }, + { + "token": [ + "UIDENT", + "String" + ], + "loc": "5:10-5:16" + }, + { + "token": "RPAREN", + "loc": "5:16-5:17" + }, + { + "token": "NEWLINE", + "loc": "5:17-5:18" + }, + { + "token": "RBRACE", + "loc": "6:1-6:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "6:2-6:2" + }, + { + "token": "NEWLINE", + "loc": "6:2-6:3" + }, + { + "token": "NEWLINE", + "loc": "7:1-7:2" + }, + { + "token": [ + "COMMENT", + { + "content": "///|", + "kind": [ + "Ownline", + { + "leading_blank_line": true, + "trailing_blank_line": false + } + ], + "consumed_by_docstring": false + } + ], + "loc": "8:1-8:5" + }, + { + "token": "NEWLINE", + "loc": "8:5-8:6" + }, + { + "token": "FN", + "loc": "9:1-9:3" + }, + { + "token": [ + "LIDENT", + "parse_scalar" + ], + "loc": "9:4-9:16" + }, + { + "token": "LPAREN", + "loc": "9:16-9:17" + }, + { + "token": [ + "LIDENT", + "v" + ], + "loc": "9:17-9:18" + }, + { + "token": "COLON", + "loc": "9:19-9:20" + }, + { + "token": [ + "UIDENT", + "String" + ], + "loc": "9:21-9:27" + }, + { + "token": "RPAREN", + "loc": "9:27-9:28" + }, + { + "token": "THIN_ARROW", + "loc": "9:29-9:31" + }, + { + "token": [ + "UIDENT", + "Parsed" + ], + "loc": "9:32-9:38" + }, + { + "token": "LBRACE", + "loc": "9:39-9:40" + }, + { + "token": "NEWLINE", + "loc": "9:40-9:41" + }, + { + "token": "MATCH", + "loc": "10:3-10:8" + }, + { + "token": [ + "LIDENT", + "v" + ], + "loc": "10:9-10:10" + }, + { + "token": "LBRACE", + "loc": "10:11-10:12" + }, + { + "token": "NEWLINE", + "loc": "10:12-10:13" + }, + { + "token": "LBRACKET", + "loc": "11:5-11:6" + }, + { + "token": [ + "CHAR", + "0" + ], + "loc": "11:6-11:9" + }, + { + "token": "COMMA", + "loc": "11:9-11:10" + }, + { + "token": [ + "CHAR", + "x" + ], + "loc": "11:11-11:14" + }, + { + "token": "COMMA", + "loc": "11:14-11:15" + }, + { + "token": "DOTDOT", + "loc": "11:16-11:18" + }, + { + "token": [ + "LIDENT", + "number" + ], + "loc": "11:19-11:25" + }, + { + "token": "RBRACKET", + "loc": "11:25-11:26" + }, + { + "token": "IF", + "loc": "11:27-11:29" + }, + { + "token": "LPAREN", + "loc": "11:30-11:31" + }, + { + "token": "TRY", + "loc": "11:31-11:34" + }, + { + "token": [ + "PACKAGE_NAME", + "string" + ], + "loc": "11:35-11:42" + }, + { + "token": [ + "DOT_LIDENT", + "parse_int64" + ], + "loc": "11:43-11:54" + }, + { + "token": "LPAREN", + "loc": "11:54-11:55" + }, + { + "token": [ + "LIDENT", + "number" + ], + "loc": "11:55-11:61" + }, + { + "token": "COMMA", + "loc": "11:61-11:62" + }, + { + "token": [ + "LIDENT", + "base" + ], + "loc": "11:63-11:67" + }, + { + "token": "EQUAL", + "loc": "11:67-11:68" + }, + { + "token": [ + "INT", + "16" + ], + "loc": "11:68-11:70" + }, + { + "token": "RPAREN", + "loc": "11:70-11:71" + }, + { + "token": "CATCH", + "loc": "11:72-11:77" + }, + { + "token": "LBRACE", + "loc": "11:78-11:79" + }, + { + "token": "NEWLINE", + "loc": "11:79-11:80" + }, + { + "token": [ + "LIDENT", + "err" + ], + "loc": "12:9-12:12" + }, + { + "token": "FAT_ARROW", + "loc": "12:13-12:15" + }, + { + "token": [ + "UIDENT", + "Err" + ], + "loc": "12:16-12:19" + }, + { + "token": "LPAREN", + "loc": "12:19-12:20" + }, + { + "token": [ + "LIDENT", + "err" + ], + "loc": "12:20-12:23" + }, + { + "token": "RPAREN", + "loc": "12:23-12:24" + }, + { + "token": "NEWLINE", + "loc": "12:24-12:25" + }, + { + "token": "RBRACE", + "loc": "13:7-13:8" + }, + { + "token": "NORAISE", + "loc": "13:9-13:16" + }, + { + "token": "LBRACE", + "loc": "13:17-13:18" + }, + { + "token": "NEWLINE", + "loc": "13:18-13:19" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "14:9-14:14" + }, + { + "token": "FAT_ARROW", + "loc": "14:15-14:17" + }, + { + "token": [ + "UIDENT", + "Ok" + ], + "loc": "14:18-14:20" + }, + { + "token": "LPAREN", + "loc": "14:20-14:21" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "14:21-14:26" + }, + { + "token": "RPAREN", + "loc": "14:26-14:27" + }, + { + "token": "NEWLINE", + "loc": "14:27-14:28" + }, + { + "token": "RBRACE", + "loc": "15:7-15:8" + }, + { + "token": "RPAREN", + "loc": "15:8-15:9" + }, + { + "token": "NEWLINE", + "loc": "15:9-15:10" + }, + { + "token": "IS", + "loc": "16:7-16:9" + }, + { + "token": [ + "UIDENT", + "Ok" + ], + "loc": "16:10-16:12" + }, + { + "token": "LPAREN", + "loc": "16:12-16:13" + }, + { + "token": [ + "LIDENT", + "i" + ], + "loc": "16:13-16:14" + }, + { + "token": "RPAREN", + "loc": "16:14-16:15" + }, + { + "token": "FAT_ARROW", + "loc": "16:16-16:18" + }, + { + "token": [ + "UIDENT", + "Parsed" + ], + "loc": "16:19-16:25" + }, + { + "token": "COLONCOLON", + "loc": "16:25-16:27" + }, + { + "token": [ + "UIDENT", + "Integer" + ], + "loc": "16:27-16:34" + }, + { + "token": "LPAREN", + "loc": "16:34-16:35" + }, + { + "token": [ + "LIDENT", + "i" + ], + "loc": "16:35-16:36" + }, + { + "token": "RPAREN", + "loc": "16:36-16:37" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "16:37-16:37" + }, + { + "token": "NEWLINE", + "loc": "16:37-16:38" + }, + { + "token": "LBRACKET", + "loc": "17:5-17:6" + }, + { + "token": [ + "CHAR", + "+" + ], + "loc": "17:6-17:9" + }, + { + "token": "COMMA", + "loc": "17:9-17:10" + }, + { + "token": "DOTDOT", + "loc": "17:11-17:13" + }, + { + "token": [ + "LIDENT", + "number" + ], + "loc": "17:14-17:20" + }, + { + "token": "RBRACKET", + "loc": "17:20-17:21" + }, + { + "token": "IF", + "loc": "17:22-17:24" + }, + { + "token": "LPAREN", + "loc": "17:25-17:26" + }, + { + "token": "TRY", + "loc": "17:26-17:29" + }, + { + "token": [ + "PACKAGE_NAME", + "string" + ], + "loc": "17:30-17:37" + }, + { + "token": [ + "DOT_LIDENT", + "parse_int64" + ], + "loc": "17:38-17:49" + }, + { + "token": "LPAREN", + "loc": "17:49-17:50" + }, + { + "token": [ + "LIDENT", + "number" + ], + "loc": "17:50-17:56" + }, + { + "token": "RPAREN", + "loc": "17:56-17:57" + }, + { + "token": "CATCH", + "loc": "17:58-17:63" + }, + { + "token": "LBRACE", + "loc": "17:64-17:65" + }, + { + "token": "NEWLINE", + "loc": "17:65-17:66" + }, + { + "token": [ + "LIDENT", + "err" + ], + "loc": "18:9-18:12" + }, + { + "token": "FAT_ARROW", + "loc": "18:13-18:15" + }, + { + "token": [ + "UIDENT", + "Err" + ], + "loc": "18:16-18:19" + }, + { + "token": "LPAREN", + "loc": "18:19-18:20" + }, + { + "token": [ + "LIDENT", + "err" + ], + "loc": "18:20-18:23" + }, + { + "token": "RPAREN", + "loc": "18:23-18:24" + }, + { + "token": "NEWLINE", + "loc": "18:24-18:25" + }, + { + "token": "RBRACE", + "loc": "19:7-19:8" + }, + { + "token": "NORAISE", + "loc": "19:9-19:16" + }, + { + "token": "LBRACE", + "loc": "19:17-19:18" + }, + { + "token": "NEWLINE", + "loc": "19:18-19:19" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "20:9-20:14" + }, + { + "token": "FAT_ARROW", + "loc": "20:15-20:17" + }, + { + "token": [ + "UIDENT", + "Ok" + ], + "loc": "20:18-20:20" + }, + { + "token": "LPAREN", + "loc": "20:20-20:21" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "20:21-20:26" + }, + { + "token": "RPAREN", + "loc": "20:26-20:27" + }, + { + "token": "NEWLINE", + "loc": "20:27-20:28" + }, + { + "token": "RBRACE", + "loc": "21:7-21:8" + }, + { + "token": "RPAREN", + "loc": "21:8-21:9" + }, + { + "token": "NEWLINE", + "loc": "21:9-21:10" + }, + { + "token": "IS", + "loc": "22:7-22:9" + }, + { + "token": [ + "UIDENT", + "Ok" + ], + "loc": "22:10-22:12" + }, + { + "token": "LPAREN", + "loc": "22:12-22:13" + }, + { + "token": [ + "LIDENT", + "i" + ], + "loc": "22:13-22:14" + }, + { + "token": "RPAREN", + "loc": "22:14-22:15" + }, + { + "token": "FAT_ARROW", + "loc": "22:16-22:18" + }, + { + "token": [ + "UIDENT", + "Parsed" + ], + "loc": "22:19-22:25" + }, + { + "token": "COLONCOLON", + "loc": "22:25-22:27" + }, + { + "token": [ + "UIDENT", + "Integer" + ], + "loc": "22:27-22:34" + }, + { + "token": "LPAREN", + "loc": "22:34-22:35" + }, + { + "token": [ + "LIDENT", + "i" + ], + "loc": "22:35-22:36" + }, + { + "token": "RPAREN", + "loc": "22:36-22:37" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "22:37-22:37" + }, + { + "token": "NEWLINE", + "loc": "22:37-22:38" + }, + { + "token": "UNDERSCORE", + "loc": "23:5-23:6" + }, + { + "token": "FAT_ARROW", + "loc": "23:7-23:9" + }, + { + "token": [ + "UIDENT", + "Parsed" + ], + "loc": "23:10-23:16" + }, + { + "token": "COLONCOLON", + "loc": "23:16-23:18" + }, + { + "token": [ + "UIDENT", + "String" + ], + "loc": "23:18-23:24" + }, + { + "token": "LPAREN", + "loc": "23:24-23:25" + }, + { + "token": [ + "LIDENT", + "v" + ], + "loc": "23:25-23:26" + }, + { + "token": "RPAREN", + "loc": "23:26-23:27" + }, + { + "token": "NEWLINE", + "loc": "23:27-23:28" + }, + { + "token": "RBRACE", + "loc": "24:3-24:4" + }, + { + "token": "NEWLINE", + "loc": "24:4-24:5" + }, + { + "token": "RBRACE", + "loc": "25:1-25:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "25:2-25:2" + }, + { + "token": "NEWLINE", + "loc": "25:2-25:3" + }, + { + "token": "NEWLINE", + "loc": "26:1-26:2" + }, + { + "token": [ + "COMMENT", + { + "content": "///|", + "kind": [ + "Ownline", + { + "leading_blank_line": true, + "trailing_blank_line": false + } + ], + "consumed_by_docstring": false + } + ], + "loc": "27:1-27:5" + }, + { + "token": "NEWLINE", + "loc": "27:5-27:6" + }, + { + "token": "FN", + "loc": "28:1-28:3" + }, + { + "token": [ + "LIDENT", + "main" + ], + "loc": "28:4-28:8" + }, + { + "token": "LBRACE", + "loc": "28:9-28:10" + }, + { + "token": "NEWLINE", + "loc": "28:10-28:11" + }, + { + "token": "MATCH", + "loc": "29:3-29:8" + }, + { + "token": [ + "LIDENT", + "parse_scalar" + ], + "loc": "29:9-29:21" + }, + { + "token": "LPAREN", + "loc": "29:21-29:22" + }, + { + "token": [ + "STRING", + "+42" + ], + "loc": "29:22-29:27" + }, + { + "token": "RPAREN", + "loc": "29:27-29:28" + }, + { + "token": "LBRACE", + "loc": "29:29-29:30" + }, + { + "token": "NEWLINE", + "loc": "29:30-29:31" + }, + { + "token": [ + "UIDENT", + "Parsed" + ], + "loc": "30:5-30:11" + }, + { + "token": "COLONCOLON", + "loc": "30:11-30:13" + }, + { + "token": [ + "UIDENT", + "Integer" + ], + "loc": "30:13-30:20" + }, + { + "token": "LPAREN", + "loc": "30:20-30:21" + }, + { + "token": [ + "LIDENT", + "i" + ], + "loc": "30:21-30:22" + }, + { + "token": "RPAREN", + "loc": "30:22-30:23" + }, + { + "token": "FAT_ARROW", + "loc": "30:24-30:26" + }, + { + "token": [ + "LIDENT", + "println" + ], + "loc": "30:27-30:34" + }, + { + "token": "LPAREN", + "loc": "30:34-30:35" + }, + { + "token": [ + "LIDENT", + "i" + ], + "loc": "30:35-30:36" + }, + { + "token": "RPAREN", + "loc": "30:36-30:37" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "30:37-30:37" + }, + { + "token": "NEWLINE", + "loc": "30:37-30:38" + }, + { + "token": "UNDERSCORE", + "loc": "31:5-31:6" + }, + { + "token": "FAT_ARROW", + "loc": "31:7-31:9" + }, + { + "token": [ + "LIDENT", + "panic" + ], + "loc": "31:10-31:15" + }, + { + "token": "LPAREN", + "loc": "31:15-31:16" + }, + { + "token": "RPAREN", + "loc": "31:16-31:17" + }, + { + "token": "NEWLINE", + "loc": "31:17-31:18" + }, + { + "token": "RBRACE", + "loc": "32:3-32:4" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "32:4-32:4" + }, + { + "token": "NEWLINE", + "loc": "32:4-32:5" + }, + { + "token": "MATCH", + "loc": "33:3-33:8" + }, + { + "token": [ + "LIDENT", + "parse_scalar" + ], + "loc": "33:9-33:21" + }, + { + "token": "LPAREN", + "loc": "33:21-33:22" + }, + { + "token": [ + "STRING", + "plain" + ], + "loc": "33:22-33:29" + }, + { + "token": "RPAREN", + "loc": "33:29-33:30" + }, + { + "token": "LBRACE", + "loc": "33:31-33:32" + }, + { + "token": "NEWLINE", + "loc": "33:32-33:33" + }, + { + "token": [ + "UIDENT", + "Parsed" + ], + "loc": "34:5-34:11" + }, + { + "token": "COLONCOLON", + "loc": "34:11-34:13" + }, + { + "token": [ + "UIDENT", + "String" + ], + "loc": "34:13-34:19" + }, + { + "token": "LPAREN", + "loc": "34:19-34:20" + }, + { + "token": [ + "LIDENT", + "s" + ], + "loc": "34:20-34:21" + }, + { + "token": "RPAREN", + "loc": "34:21-34:22" + }, + { + "token": "FAT_ARROW", + "loc": "34:23-34:25" + }, + { + "token": [ + "LIDENT", + "println" + ], + "loc": "34:26-34:33" + }, + { + "token": "LPAREN", + "loc": "34:33-34:34" + }, + { + "token": [ + "LIDENT", + "s" + ], + "loc": "34:34-34:35" + }, + { + "token": "RPAREN", + "loc": "34:35-34:36" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "34:36-34:36" + }, + { + "token": "NEWLINE", + "loc": "34:36-34:37" + }, + { + "token": "UNDERSCORE", + "loc": "35:5-35:6" + }, + { + "token": "FAT_ARROW", + "loc": "35:7-35:9" + }, + { + "token": [ + "LIDENT", + "panic" + ], + "loc": "35:10-35:15" + }, + { + "token": "LPAREN", + "loc": "35:15-35:16" + }, + { + "token": "RPAREN", + "loc": "35:16-35:17" + }, + { + "token": "NEWLINE", + "loc": "35:17-35:18" + }, + { + "token": "RBRACE", + "loc": "36:3-36:4" + }, + { + "token": "NEWLINE", + "loc": "36:4-36:5" + }, + { + "token": "RBRACE", + "loc": "37:1-37:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "37:2-37:2" + }, + { + "token": "NEWLINE", + "loc": "37:2-37:3" + }, + { + "token": "EOF", + "loc": "38:1-38:1" + } +] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/pipeline_test_pattern_guard_evil.json b/test/sync_test/__snapshot__/pipeline_test_pattern_guard_evil.json index 1b9d3d93..00d9321a 100644 --- a/test/sync_test/__snapshot__/pipeline_test_pattern_guard_evil.json +++ b/test/sync_test/__snapshot__/pipeline_test_pattern_guard_evil.json @@ -2643,7 +2643,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -2728,7 +2729,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { diff --git a/test/sync_test/__snapshot__/pipeline_test_pattern_guard_or.json b/test/sync_test/__snapshot__/pipeline_test_pattern_guard_or.json index 49fa3d95..aa0ceab5 100644 --- a/test/sync_test/__snapshot__/pipeline_test_pattern_guard_or.json +++ b/test/sync_test/__snapshot__/pipeline_test_pattern_guard_or.json @@ -3894,6 +3894,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, diff --git a/test/sync_test/__snapshot__/pipeline_test_pipe_arrow_fn.json b/test/sync_test/__snapshot__/pipeline_test_pipe_arrow_fn.json index f2998437..9e8c76c0 100644 --- a/test/sync_test/__snapshot__/pipeline_test_pipe_arrow_fn.json +++ b/test/sync_test/__snapshot__/pipeline_test_pipe_arrow_fn.json @@ -6396,31 +6396,37 @@ "loc": null, "children": { "value": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Group", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "expr": { - "kind": "Expr::Pipe", + "id": { + "kind": "Var", "loc": null, "children": { - "lhs": { - "kind": "Expr::Constant", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "constant": { - "kind": "Constant::String", - "loc": null, - "children": { - "value": "msg" - } - } + "value": "to_result" } - }, - "rhs": { + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { "kind": "Expr::Function", "loc": null, "children": { @@ -6431,97 +6437,157 @@ "parameters": { "kind": "Func::Lambda::ParameterList", "loc": null, - "children": [ - { - "kind": "Parameter::Positional", - "loc": null, - "children": { - "binder": { - "kind": "Binder", - "loc": null, - "children": { - "name": "x" - } - }, - "ty": null - } - } - ] + "children": [] }, "body": { - "kind": "Expr::Raise", + "kind": "Expr::Group", "loc": null, "children": { - "err_value": { - "kind": "Expr::Apply", + "expr": { + "kind": "Expr::Pipe", "loc": null, "children": { - "func": { - "kind": "Expr::Constr", + "lhs": { + "kind": "Expr::Constant", "loc": null, "children": { - "constr": { - "kind": "Constructor", + "constant": { + "kind": "Constant::String", "loc": null, "children": { - "name": { - "kind": "ConstrName", - "loc": null, - "children": { - "name": "MyErr" - } - }, - "extra_info": { - "kind": "ConstructorExtraInfo::NoExtraInfo", - "loc": null, - "children": {} - } + "value": "msg" } } } }, - "args": { - "kind": "Expr::Apply::ArgumentList", + "rhs": { + "kind": "Expr::Function", "loc": null, - "children": [ - { - "kind": "Argument", + "children": { + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "value": { - "kind": "Expr::Ident", + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "x" + } + }, + "ty": null + } + } + ] + }, + "body": { + "kind": "Expr::Raise", "loc": null, "children": { - "id": { - "kind": "Var", + "err_value": { + "kind": "Expr::Apply", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", + "func": { + "kind": "Expr::Constr", "loc": null, "children": { - "value": "x" + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "MyErr" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::NoExtraInfo", + "loc": null, + "children": {} + } + } + } } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "x" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} } } } } }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, "kind": { - "kind": "ArgumentKind::Positional", + "kind": "FnKind::Arrow", "loc": null, "children": {} - } + }, + "has_error": null, + "is_async": null } } - ] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} + } } } + }, + "group": { + "kind": "Group::Brace", + "loc": null, + "children": {} } } }, @@ -6541,18 +6607,18 @@ } } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } } - }, - "group": { - "kind": "Group::Brace", - "loc": null, - "children": {} } - } + ] }, - "kind": { - "kind": "TryOperatorKind::Question", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -6743,98 +6809,164 @@ ] }, "body": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Pipe", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "lhs": { - "kind": "Expr::Group", + "id": { + "kind": "Var", "loc": null, "children": { - "expr": { - "kind": "Expr::Infix", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "op": { - "kind": "Var", + "value": "to_result" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Function", + "loc": null, + "children": { + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", + "parameters": { + "kind": "Func::Lambda::ParameterList", "loc": null, - "children": { - "value": "+" - } - } - } - }, - "lhs": { - "kind": "Expr::Ident", - "loc": null, - "children": { - "id": { - "kind": "Var", + "children": [] + }, + "body": { + "kind": "Expr::Pipe", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", + "lhs": { + "kind": "Expr::Group", + "loc": null, + "children": { + "expr": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "+" + } + } + } + }, + "lhs": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "x" + } + } + } + } + } + }, + "rhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "2" + } + } + } + } + } + }, + "group": { + "kind": "Group::Paren", + "loc": null, + "children": {} + } + } + }, + "rhs": { + "kind": "Expr::Ident", "loc": null, "children": { - "value": "x" + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "fail" + } + } + } + } } } } - } - } - }, - "rhs": { - "kind": "Expr::Constant", - "loc": null, - "children": { - "constant": { - "kind": "Constant::String", + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", "loc": null, - "children": { - "value": "2" - } - } + "children": {} + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null } } } }, - "group": { - "kind": "Group::Paren", + "kind": { + "kind": "ArgumentKind::Positional", "loc": null, "children": {} } } - }, - "rhs": { - "kind": "Expr::Ident", - "loc": null, - "children": { - "id": { - "kind": "Var", - "loc": null, - "children": { - "name": { - "kind": "LongIdent::Ident", - "loc": null, - "children": { - "value": "fail" - } - } - } - } - } } - } + ] }, - "kind": { - "kind": "TryOperatorKind::Question", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -7601,5 +7733,524 @@ } } } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "to_result" + } + }, + "has_error": null, + "is_async": null, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "f" + } + }, + "ty": { + "kind": "Type::Arrow", + "loc": null, + "children": { + "args": { + "kind": "Type::Arrow::ArgList", + "loc": null, + "children": [] + }, + "res": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "T" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "err": { + "kind": "ErrorType::ErrorType", + "loc": null, + "children": { + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "E" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + "is_async": null + } + } + } + } + ] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [ + { + "kind": "TypeVarBinder", + "loc": null, + "children": { + "name": "T", + "constraints": { + "kind": "TypeVarBinder::TypeVarConstraintList", + "loc": null, + "children": [] + } + } + }, + { + "kind": "TypeVarBinder", + "loc": null, + "children": { + "name": "E", + "constraints": { + "kind": "TypeVarBinder::TypeVarConstraintList", + "loc": null, + "children": [ + { + "kind": "TypeVarConstraint", + "loc": null, + "children": { + "trait": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Error" + } + } + } + } + ] + } + } + } + ] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [ + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "T" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "E" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + ] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::Try", + "loc": null, + "children": { + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "f" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "catch": { + "kind": "Expr::Try::CaseList", + "loc": null, + "children": [ + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "err" + } + } + } + }, + "guard": null, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Err" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::TypeName", + "loc": null, + "children": { + "value": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + }, + "is_object": false + } + } + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "err" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + ] + }, + "catch_all": false, + "try_else": { + "kind": "Expr::Try::CaseList", + "loc": null, + "children": [ + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "value" + } + } + } + }, + "guard": null, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Ok" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::TypeName", + "loc": null, + "children": { + "value": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + }, + "is_object": false + } + } + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "value" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + ] + }, + "has_try": true + } + } + } + } + } } ] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/pipeline_test_pipe_arrow_fn.mbt b/test/sync_test/__snapshot__/pipeline_test_pipe_arrow_fn.mbt index 218f48e0..1350cfcd 100644 --- a/test/sync_test/__snapshot__/pipeline_test_pipe_arrow_fn.mbt +++ b/test/sync_test/__snapshot__/pipeline_test_pipe_arrow_fn.mbt @@ -113,13 +113,13 @@ suberror MyErr { } derive(Debug) fn pipe_failed() -> Unit { - debug(try? { + debug(to_result(() => { "msg" |> x => { raise MyErr(x) } - }) + })) } fn pipe_failed2() -> Unit { - debug("msg" |> x => { try? (x + "2") |> fail }) + debug("msg" |> x => { to_result(() => (x + "2") |> fail) }) ("msg3" |> x => { fail(x) } |> println) catch { e => println(e.to_string()) } "msg4" |> x => { fail(x) catch { _ => x } } |> println } @@ -128,3 +128,12 @@ fn pipe_early_return() -> Unit { "" |> x => { return } println("ok") } + +fn[T, E : Error] to_result(f : () -> T raise E) -> Result[T, E] { + try f() + catch { + err => Result::Err(err) + } noraise { + value => Result::Ok(value) + } +} diff --git a/test/sync_test/__snapshot__/pipeline_test_pipe_arrow_fn.mbt.tokens.json b/test/sync_test/__snapshot__/pipeline_test_pipe_arrow_fn.mbt.tokens.json index 22974e7b..dc61d478 100644 --- a/test/sync_test/__snapshot__/pipeline_test_pipe_arrow_fn.mbt.tokens.json +++ b/test/sync_test/__snapshot__/pipeline_test_pipe_arrow_fn.mbt.tokens.json @@ -3620,16 +3620,35 @@ "loc": "116:8-116:9" }, { - "token": "TRY_QUESTION", - "loc": "116:9-116:13" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "116:9-116:18" + }, + { + "token": "LPAREN", + "loc": "116:18-116:19" + }, + { + "token": "LPAREN", + "loc": "116:19-116:20" + }, + { + "token": "RPAREN", + "loc": "116:20-116:21" + }, + { + "token": "FAT_ARROW", + "loc": "116:22-116:24" }, { "token": "LBRACE", - "loc": "116:14-116:15" + "loc": "116:25-116:26" }, { "token": "NEWLINE", - "loc": "116:15-116:16" + "loc": "116:26-116:27" }, { "token": [ @@ -3700,9 +3719,13 @@ "loc": "118:4-118:5" }, { - "token": "NEWLINE", + "token": "RPAREN", "loc": "118:5-118:6" }, + { + "token": "NEWLINE", + "loc": "118:6-118:7" + }, { "token": "RBRACE", "loc": "119:1-119:2" @@ -3798,64 +3821,87 @@ "loc": "122:23-122:24" }, { - "token": "TRY_QUESTION", - "loc": "122:25-122:29" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "122:25-122:34" + }, + { + "token": "LPAREN", + "loc": "122:34-122:35" + }, + { + "token": "LPAREN", + "loc": "122:35-122:36" + }, + { + "token": "RPAREN", + "loc": "122:36-122:37" + }, + { + "token": "FAT_ARROW", + "loc": "122:38-122:40" }, { "token": "LPAREN", - "loc": "122:30-122:31" + "loc": "122:41-122:42" }, { "token": [ "LIDENT", "x" ], - "loc": "122:31-122:32" + "loc": "122:42-122:43" }, { "token": "PLUS", - "loc": "122:33-122:34" + "loc": "122:44-122:45" }, { "token": [ "STRING", "2" ], - "loc": "122:35-122:38" + "loc": "122:46-122:49" }, { "token": "RPAREN", - "loc": "122:38-122:39" + "loc": "122:49-122:50" }, { "token": "PIPE", - "loc": "122:40-122:42" + "loc": "122:51-122:53" }, { "token": [ "LIDENT", "fail" ], - "loc": "122:43-122:47" + "loc": "122:54-122:58" + }, + { + "token": "RPAREN", + "loc": "122:58-122:59" }, { "token": "RBRACE", - "loc": "122:48-122:49" + "loc": "122:60-122:61" }, { "token": "RPAREN", - "loc": "122:49-122:50" + "loc": "122:61-122:62" }, { "token": [ "SEMI", false ], - "loc": "122:50-122:50" + "loc": "122:62-122:62" }, { "token": "NEWLINE", - "loc": "122:50-122:51" + "loc": "122:62-122:63" }, { "token": "LPAREN", @@ -4236,8 +4282,324 @@ "token": "NEWLINE", "loc": "130:2-130:3" }, + { + "token": "NEWLINE", + "loc": "131:1-131:2" + }, + { + "token": "FN", + "loc": "132:1-132:3" + }, + { + "token": "LBRACKET", + "loc": "132:3-132:4" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "132:4-132:5" + }, + { + "token": "COMMA", + "loc": "132:5-132:6" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "132:7-132:8" + }, + { + "token": "COLON", + "loc": "132:9-132:10" + }, + { + "token": [ + "UIDENT", + "Error" + ], + "loc": "132:11-132:16" + }, + { + "token": "RBRACKET", + "loc": "132:16-132:17" + }, + { + "token": [ + "LIDENT", + "to_result" + ], + "loc": "132:18-132:27" + }, + { + "token": "LPAREN", + "loc": "132:27-132:28" + }, + { + "token": [ + "LIDENT", + "f" + ], + "loc": "132:28-132:29" + }, + { + "token": "COLON", + "loc": "132:30-132:31" + }, + { + "token": "LPAREN", + "loc": "132:32-132:33" + }, + { + "token": "RPAREN", + "loc": "132:33-132:34" + }, + { + "token": "THIN_ARROW", + "loc": "132:35-132:37" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "132:38-132:39" + }, + { + "token": "RAISE", + "loc": "132:40-132:45" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "132:46-132:47" + }, + { + "token": "RPAREN", + "loc": "132:47-132:48" + }, + { + "token": "THIN_ARROW", + "loc": "132:49-132:51" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "132:52-132:58" + }, + { + "token": "LBRACKET", + "loc": "132:58-132:59" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "132:59-132:60" + }, + { + "token": "COMMA", + "loc": "132:60-132:61" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "132:62-132:63" + }, + { + "token": "RBRACKET", + "loc": "132:63-132:64" + }, + { + "token": "LBRACE", + "loc": "132:65-132:66" + }, + { + "token": "NEWLINE", + "loc": "132:66-132:67" + }, + { + "token": "TRY", + "loc": "133:3-133:6" + }, + { + "token": [ + "LIDENT", + "f" + ], + "loc": "133:7-133:8" + }, + { + "token": "LPAREN", + "loc": "133:8-133:9" + }, + { + "token": "RPAREN", + "loc": "133:9-133:10" + }, + { + "token": "NEWLINE", + "loc": "133:10-133:11" + }, + { + "token": "CATCH", + "loc": "134:3-134:8" + }, + { + "token": "LBRACE", + "loc": "134:9-134:10" + }, + { + "token": "NEWLINE", + "loc": "134:10-134:11" + }, + { + "token": [ + "LIDENT", + "err" + ], + "loc": "135:5-135:8" + }, + { + "token": "FAT_ARROW", + "loc": "135:9-135:11" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "135:12-135:18" + }, + { + "token": "COLONCOLON", + "loc": "135:18-135:20" + }, + { + "token": [ + "UIDENT", + "Err" + ], + "loc": "135:20-135:23" + }, + { + "token": "LPAREN", + "loc": "135:23-135:24" + }, + { + "token": [ + "LIDENT", + "err" + ], + "loc": "135:24-135:27" + }, + { + "token": "RPAREN", + "loc": "135:27-135:28" + }, + { + "token": "NEWLINE", + "loc": "135:28-135:29" + }, + { + "token": "RBRACE", + "loc": "136:3-136:4" + }, + { + "token": "NORAISE", + "loc": "136:5-136:12" + }, + { + "token": "LBRACE", + "loc": "136:13-136:14" + }, + { + "token": "NEWLINE", + "loc": "136:14-136:15" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "137:5-137:10" + }, + { + "token": "FAT_ARROW", + "loc": "137:11-137:13" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "137:14-137:20" + }, + { + "token": "COLONCOLON", + "loc": "137:20-137:22" + }, + { + "token": [ + "UIDENT", + "Ok" + ], + "loc": "137:22-137:24" + }, + { + "token": "LPAREN", + "loc": "137:24-137:25" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "137:25-137:30" + }, + { + "token": "RPAREN", + "loc": "137:30-137:31" + }, + { + "token": "NEWLINE", + "loc": "137:31-137:32" + }, + { + "token": "RBRACE", + "loc": "138:3-138:4" + }, + { + "token": "NEWLINE", + "loc": "138:4-138:5" + }, + { + "token": "RBRACE", + "loc": "139:1-139:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "139:2-139:2" + }, + { + "token": "NEWLINE", + "loc": "139:2-139:3" + }, { "token": "EOF", - "loc": "131:1-131:1" + "loc": "140:1-140:1" } ] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/pipeline_test_predef_method.json b/test/sync_test/__snapshot__/pipeline_test_predef_method.json index 2dfddb6a..e27ffd20 100644 --- a/test/sync_test/__snapshot__/pipeline_test_predef_method.json +++ b/test/sync_test/__snapshot__/pipeline_test_predef_method.json @@ -153,7 +153,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { diff --git a/test/sync_test/__snapshot__/pipeline_test_promoted_default_impl.json b/test/sync_test/__snapshot__/pipeline_test_promoted_default_impl.json index 88e9dd32..914507a3 100644 --- a/test/sync_test/__snapshot__/pipeline_test_promoted_default_impl.json +++ b/test/sync_test/__snapshot__/pipeline_test_promoted_default_impl.json @@ -259,6 +259,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, @@ -478,6 +483,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, @@ -937,6 +947,11 @@ } ] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, @@ -1724,6 +1739,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, @@ -2210,6 +2230,11 @@ } ] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, diff --git a/test/sync_test/__snapshot__/pipeline_test_raise_return.json b/test/sync_test/__snapshot__/pipeline_test_raise_return.json index e690b865..df00ad75 100644 --- a/test/sync_test/__snapshot__/pipeline_test_raise_return.json +++ b/test/sync_test/__snapshot__/pipeline_test_raise_return.json @@ -204,46 +204,112 @@ "loc": null, "children": { "value": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "to_result" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Function", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "value": "f" + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "f" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null } } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", - "loc": null, - "children": [] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} } - } + ] }, - "kind": { - "kind": "TryOperatorKind::Question", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -268,5 +334,524 @@ } } } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "to_result" + } + }, + "has_error": null, + "is_async": null, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "f" + } + }, + "ty": { + "kind": "Type::Arrow", + "loc": null, + "children": { + "args": { + "kind": "Type::Arrow::ArgList", + "loc": null, + "children": [] + }, + "res": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "T" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "err": { + "kind": "ErrorType::ErrorType", + "loc": null, + "children": { + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "E" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + "is_async": null + } + } + } + } + ] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [ + { + "kind": "TypeVarBinder", + "loc": null, + "children": { + "name": "T", + "constraints": { + "kind": "TypeVarBinder::TypeVarConstraintList", + "loc": null, + "children": [] + } + } + }, + { + "kind": "TypeVarBinder", + "loc": null, + "children": { + "name": "E", + "constraints": { + "kind": "TypeVarBinder::TypeVarConstraintList", + "loc": null, + "children": [ + { + "kind": "TypeVarConstraint", + "loc": null, + "children": { + "trait": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Error" + } + } + } + } + ] + } + } + } + ] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [ + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "T" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "E" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + ] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::Try", + "loc": null, + "children": { + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "f" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "catch": { + "kind": "Expr::Try::CaseList", + "loc": null, + "children": [ + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "err" + } + } + } + }, + "guard": null, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Err" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::TypeName", + "loc": null, + "children": { + "value": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + }, + "is_object": false + } + } + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "err" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + ] + }, + "catch_all": false, + "try_else": { + "kind": "Expr::Try::CaseList", + "loc": null, + "children": [ + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "value" + } + } + } + }, + "guard": null, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Ok" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::TypeName", + "loc": null, + "children": { + "value": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + }, + "is_object": false + } + } + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "value" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + ] + }, + "has_try": true + } + } + } + } + } } ] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/pipeline_test_raise_return.mbt b/test/sync_test/__snapshot__/pipeline_test_raise_return.mbt index 267847f2..c15c95a8 100644 --- a/test/sync_test/__snapshot__/pipeline_test_raise_return.mbt +++ b/test/sync_test/__snapshot__/pipeline_test_raise_return.mbt @@ -3,5 +3,14 @@ fn f() -> Int raise { } fn main { - debug(try? f()) + debug(to_result(() => f())) +} + +fn[T, E : Error] to_result(f : () -> T raise E) -> Result[T, E] { + try f() + catch { + err => Result::Err(err) + } noraise { + value => Result::Ok(value) + } } diff --git a/test/sync_test/__snapshot__/pipeline_test_raise_return.mbt.tokens.json b/test/sync_test/__snapshot__/pipeline_test_raise_return.mbt.tokens.json index 584f03f3..4cd1a117 100644 --- a/test/sync_test/__snapshot__/pipeline_test_raise_return.mbt.tokens.json +++ b/test/sync_test/__snapshot__/pipeline_test_raise_return.mbt.tokens.json @@ -118,31 +118,54 @@ "loc": "6:10-6:11" }, { - "token": "TRY_QUESTION", - "loc": "6:11-6:15" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "6:11-6:20" + }, + { + "token": "LPAREN", + "loc": "6:20-6:21" + }, + { + "token": "LPAREN", + "loc": "6:21-6:22" + }, + { + "token": "RPAREN", + "loc": "6:22-6:23" + }, + { + "token": "FAT_ARROW", + "loc": "6:24-6:26" }, { "token": [ "LIDENT", "f" ], - "loc": "6:16-6:17" + "loc": "6:27-6:28" }, { "token": "LPAREN", - "loc": "6:17-6:18" + "loc": "6:28-6:29" }, { "token": "RPAREN", - "loc": "6:18-6:19" + "loc": "6:29-6:30" }, { "token": "RPAREN", - "loc": "6:19-6:20" + "loc": "6:30-6:31" + }, + { + "token": "RPAREN", + "loc": "6:31-6:32" }, { "token": "NEWLINE", - "loc": "6:20-6:21" + "loc": "6:32-6:33" }, { "token": "RBRACE", @@ -159,8 +182,324 @@ "token": "NEWLINE", "loc": "7:2-7:3" }, + { + "token": "NEWLINE", + "loc": "8:1-8:2" + }, + { + "token": "FN", + "loc": "9:1-9:3" + }, + { + "token": "LBRACKET", + "loc": "9:3-9:4" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "9:4-9:5" + }, + { + "token": "COMMA", + "loc": "9:5-9:6" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "9:7-9:8" + }, + { + "token": "COLON", + "loc": "9:9-9:10" + }, + { + "token": [ + "UIDENT", + "Error" + ], + "loc": "9:11-9:16" + }, + { + "token": "RBRACKET", + "loc": "9:16-9:17" + }, + { + "token": [ + "LIDENT", + "to_result" + ], + "loc": "9:18-9:27" + }, + { + "token": "LPAREN", + "loc": "9:27-9:28" + }, + { + "token": [ + "LIDENT", + "f" + ], + "loc": "9:28-9:29" + }, + { + "token": "COLON", + "loc": "9:30-9:31" + }, + { + "token": "LPAREN", + "loc": "9:32-9:33" + }, + { + "token": "RPAREN", + "loc": "9:33-9:34" + }, + { + "token": "THIN_ARROW", + "loc": "9:35-9:37" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "9:38-9:39" + }, + { + "token": "RAISE", + "loc": "9:40-9:45" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "9:46-9:47" + }, + { + "token": "RPAREN", + "loc": "9:47-9:48" + }, + { + "token": "THIN_ARROW", + "loc": "9:49-9:51" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "9:52-9:58" + }, + { + "token": "LBRACKET", + "loc": "9:58-9:59" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "9:59-9:60" + }, + { + "token": "COMMA", + "loc": "9:60-9:61" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "9:62-9:63" + }, + { + "token": "RBRACKET", + "loc": "9:63-9:64" + }, + { + "token": "LBRACE", + "loc": "9:65-9:66" + }, + { + "token": "NEWLINE", + "loc": "9:66-9:67" + }, + { + "token": "TRY", + "loc": "10:3-10:6" + }, + { + "token": [ + "LIDENT", + "f" + ], + "loc": "10:7-10:8" + }, + { + "token": "LPAREN", + "loc": "10:8-10:9" + }, + { + "token": "RPAREN", + "loc": "10:9-10:10" + }, + { + "token": "NEWLINE", + "loc": "10:10-10:11" + }, + { + "token": "CATCH", + "loc": "11:3-11:8" + }, + { + "token": "LBRACE", + "loc": "11:9-11:10" + }, + { + "token": "NEWLINE", + "loc": "11:10-11:11" + }, + { + "token": [ + "LIDENT", + "err" + ], + "loc": "12:5-12:8" + }, + { + "token": "FAT_ARROW", + "loc": "12:9-12:11" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "12:12-12:18" + }, + { + "token": "COLONCOLON", + "loc": "12:18-12:20" + }, + { + "token": [ + "UIDENT", + "Err" + ], + "loc": "12:20-12:23" + }, + { + "token": "LPAREN", + "loc": "12:23-12:24" + }, + { + "token": [ + "LIDENT", + "err" + ], + "loc": "12:24-12:27" + }, + { + "token": "RPAREN", + "loc": "12:27-12:28" + }, + { + "token": "NEWLINE", + "loc": "12:28-12:29" + }, + { + "token": "RBRACE", + "loc": "13:3-13:4" + }, + { + "token": "NORAISE", + "loc": "13:5-13:12" + }, + { + "token": "LBRACE", + "loc": "13:13-13:14" + }, + { + "token": "NEWLINE", + "loc": "13:14-13:15" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "14:5-14:10" + }, + { + "token": "FAT_ARROW", + "loc": "14:11-14:13" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "14:14-14:20" + }, + { + "token": "COLONCOLON", + "loc": "14:20-14:22" + }, + { + "token": [ + "UIDENT", + "Ok" + ], + "loc": "14:22-14:24" + }, + { + "token": "LPAREN", + "loc": "14:24-14:25" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "14:25-14:30" + }, + { + "token": "RPAREN", + "loc": "14:30-14:31" + }, + { + "token": "NEWLINE", + "loc": "14:31-14:32" + }, + { + "token": "RBRACE", + "loc": "15:3-15:4" + }, + { + "token": "NEWLINE", + "loc": "15:4-15:5" + }, + { + "token": "RBRACE", + "loc": "16:1-16:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "16:2-16:2" + }, + { + "token": "NEWLINE", + "loc": "16:2-16:3" + }, { "token": "EOF", - "loc": "8:1-8:1" + "loc": "17:1-17:1" } ] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/pipeline_test_readonlyarray.json b/test/sync_test/__snapshot__/pipeline_test_readonlyarray.json index 64886ff6..9487b5d7 100644 --- a/test/sync_test/__snapshot__/pipeline_test_readonlyarray.json +++ b/test/sync_test/__snapshot__/pipeline_test_readonlyarray.json @@ -405,7 +405,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { diff --git a/test/sync_test/__snapshot__/pipeline_test_readonlyarray2.json b/test/sync_test/__snapshot__/pipeline_test_readonlyarray2.json index d05d69a7..4296ce1a 100644 --- a/test/sync_test/__snapshot__/pipeline_test_readonlyarray2.json +++ b/test/sync_test/__snapshot__/pipeline_test_readonlyarray2.json @@ -133,7 +133,8 @@ } } ] - } + }, + "is_iter": false } }, "vis": { @@ -446,7 +447,8 @@ } } ] - } + }, + "is_iter": false } }, "vis": { @@ -1358,7 +1360,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -1539,7 +1542,8 @@ } } ] - } + }, + "is_iter": false } }, { @@ -1616,11 +1620,13 @@ } } ] - } + }, + "is_iter": false } } ] - } + }, + "is_iter": false } }, "body": { @@ -1835,7 +1841,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { diff --git a/test/sync_test/__snapshot__/pipeline_test_readonlyarray_recgroup.json b/test/sync_test/__snapshot__/pipeline_test_readonlyarray_recgroup.json index 99a59e21..76c0c6bc 100644 --- a/test/sync_test/__snapshot__/pipeline_test_readonlyarray_recgroup.json +++ b/test/sync_test/__snapshot__/pipeline_test_readonlyarray_recgroup.json @@ -253,7 +253,8 @@ "kind": "Expr::Array::ExprList", "loc": null, "children": [] - } + }, + "is_iter": false } }, "body": { diff --git a/test/sync_test/__snapshot__/pipeline_test_rec_type2.json b/test/sync_test/__snapshot__/pipeline_test_rec_type2.json index 176e323e..6692412a 100644 --- a/test/sync_test/__snapshot__/pipeline_test_rec_type2.json +++ b/test/sync_test/__snapshot__/pipeline_test_rec_type2.json @@ -4646,7 +4646,8 @@ "kind": "Expr::Array::ExprList", "loc": null, "children": [] - } + }, + "is_iter": false } }, "is_pun": false @@ -4772,7 +4773,8 @@ } } ] - } + }, + "is_iter": false } }, "is_pun": false @@ -4917,7 +4919,8 @@ } } ] - } + }, + "is_iter": false } }, "is_pun": false @@ -5043,7 +5046,8 @@ } } ] - } + }, + "is_iter": false } }, "is_pun": false diff --git a/test/sync_test/__snapshot__/pipeline_test_recursive_capture2.json b/test/sync_test/__snapshot__/pipeline_test_recursive_capture2.json index c3a294db..426f75ff 100644 --- a/test/sync_test/__snapshot__/pipeline_test_recursive_capture2.json +++ b/test/sync_test/__snapshot__/pipeline_test_recursive_capture2.json @@ -129,7 +129,8 @@ } } ] - } + }, + "is_iter": false } }, "vis": { diff --git a/test/sync_test/__snapshot__/pipeline_test_recursive_ltype.json b/test/sync_test/__snapshot__/pipeline_test_recursive_ltype.json index b5f6691d..121a5cb6 100644 --- a/test/sync_test/__snapshot__/pipeline_test_recursive_ltype.json +++ b/test/sync_test/__snapshot__/pipeline_test_recursive_ltype.json @@ -183,7 +183,8 @@ "kind": "Expr::Array::ExprList", "loc": null, "children": [] - } + }, + "is_iter": false } }, "is_pun": false diff --git a/test/sync_test/__snapshot__/pipeline_test_regex_intrinsics.json b/test/sync_test/__snapshot__/pipeline_test_regex_intrinsics.json index 6c852fff..8c2ea913 100644 --- a/test/sync_test/__snapshot__/pipeline_test_regex_intrinsics.json +++ b/test/sync_test/__snapshot__/pipeline_test_regex_intrinsics.json @@ -610,6 +610,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, diff --git a/test/sync_test/__snapshot__/pipeline_test_regex_match_expr.json b/test/sync_test/__snapshot__/pipeline_test_regex_match_expr.json index e7a464bd..1a11858b 100644 --- a/test/sync_test/__snapshot__/pipeline_test_regex_match_expr.json +++ b/test/sync_test/__snapshot__/pipeline_test_regex_match_expr.json @@ -5759,46 +5759,112 @@ "loc": null, "children": { "value": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", + "value": "to_result" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Function", + "loc": null, + "children": { + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "value": "test_value_context" + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "test_value_context" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null } } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", - "loc": null, - "children": [] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} } - } + ] }, - "kind": { - "kind": "TryOperatorKind::Question", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -5912,46 +5978,112 @@ "loc": null, "children": { "value": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", + "value": "to_result" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Function", + "loc": null, + "children": { + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "value": "test_hidden_capture_in_regex_constant" + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "test_hidden_capture_in_regex_constant" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null } } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", - "loc": null, - "children": [] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} } - } + ] }, - "kind": { - "kind": "TryOperatorKind::Question", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -6065,46 +6197,112 @@ "loc": null, "children": { "value": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", + "value": "to_result" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Function", + "loc": null, + "children": { + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "value": "test_hidden_capture_in_composed_regex_constant" + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "test_hidden_capture_in_composed_regex_constant" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null } } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", - "loc": null, - "children": [] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} } - } + ] }, - "kind": { - "kind": "TryOperatorKind::Question", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -6218,46 +6416,112 @@ "loc": null, "children": { "value": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", + "value": "to_result" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Function", + "loc": null, + "children": { + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "value": "test_before_after_rest" + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "test_before_after_rest" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null } } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", - "loc": null, - "children": [] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} } - } + ] }, - "kind": { - "kind": "TryOperatorKind::Question", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -6371,46 +6635,112 @@ "loc": null, "children": { "value": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", + "value": "to_result" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Function", + "loc": null, + "children": { + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "value": "test_anchored_before_regression" + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "test_anchored_before_regression" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null } } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", - "loc": null, - "children": [] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} } - } + ] }, - "kind": { - "kind": "TryOperatorKind::Question", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -6524,46 +6854,112 @@ "loc": null, "children": { "value": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", + "value": "to_result" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Function", + "loc": null, + "children": { + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "value": "test_anchored_empty_regression" + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "test_anchored_empty_regression" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null } } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", - "loc": null, - "children": [] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} } - } + ] }, - "kind": { - "kind": "TryOperatorKind::Question", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -6677,46 +7073,112 @@ "loc": null, "children": { "value": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", + "value": "to_result" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Function", + "loc": null, + "children": { + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "value": "test_multiple_captures" + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "test_multiple_captures" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null } } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", - "loc": null, - "children": [] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} } - } + ] }, - "kind": { - "kind": "TryOperatorKind::Question", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -6830,46 +7292,112 @@ "loc": null, "children": { "value": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", + "value": "to_result" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Function", + "loc": null, + "children": { + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "value": "test_char_capture" + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "test_char_capture" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null } } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", - "loc": null, - "children": [] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} } - } + ] }, - "kind": { - "kind": "TryOperatorKind::Question", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -6983,46 +7511,112 @@ "loc": null, "children": { "value": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", + "value": "to_result" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Function", + "loc": null, + "children": { + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "value": "test_short_circuit_scope" + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "test_short_circuit_scope" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null } } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", - "loc": null, - "children": [] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} } - } + ] }, - "kind": { - "kind": "TryOperatorKind::Question", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -7138,46 +7732,112 @@ "loc": null, "children": { "value": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", + "value": "to_result" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Function", + "loc": null, + "children": { + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "value": "test_alternation_and_no_match" + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "test_alternation_and_no_match" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null } } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", - "loc": null, - "children": [] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} } - } + ] }, - "kind": { - "kind": "TryOperatorKind::Question", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -7204,5 +7864,524 @@ } } } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "to_result" + } + }, + "has_error": null, + "is_async": null, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "f" + } + }, + "ty": { + "kind": "Type::Arrow", + "loc": null, + "children": { + "args": { + "kind": "Type::Arrow::ArgList", + "loc": null, + "children": [] + }, + "res": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "T" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "err": { + "kind": "ErrorType::ErrorType", + "loc": null, + "children": { + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "E" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + "is_async": null + } + } + } + } + ] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [ + { + "kind": "TypeVarBinder", + "loc": null, + "children": { + "name": "T", + "constraints": { + "kind": "TypeVarBinder::TypeVarConstraintList", + "loc": null, + "children": [] + } + } + }, + { + "kind": "TypeVarBinder", + "loc": null, + "children": { + "name": "E", + "constraints": { + "kind": "TypeVarBinder::TypeVarConstraintList", + "loc": null, + "children": [ + { + "kind": "TypeVarConstraint", + "loc": null, + "children": { + "trait": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Error" + } + } + } + } + ] + } + } + } + ] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [ + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "T" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "E" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + ] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::Try", + "loc": null, + "children": { + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "f" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "catch": { + "kind": "Expr::Try::CaseList", + "loc": null, + "children": [ + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "err" + } + } + } + }, + "guard": null, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Err" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::TypeName", + "loc": null, + "children": { + "value": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + }, + "is_object": false + } + } + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "err" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + ] + }, + "catch_all": false, + "try_else": { + "kind": "Expr::Try::CaseList", + "loc": null, + "children": [ + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "value" + } + } + } + }, + "guard": null, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Ok" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::TypeName", + "loc": null, + "children": { + "value": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + }, + "is_object": false + } + } + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "value" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + ] + }, + "has_try": true + } + } + } + } + } } ] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/pipeline_test_regex_match_expr.mbt b/test/sync_test/__snapshot__/pipeline_test_regex_match_expr.mbt index a079a2bd..2776ceb5 100644 --- a/test/sync_test/__snapshot__/pipeline_test_regex_match_expr.mbt +++ b/test/sync_test/__snapshot__/pipeline_test_regex_match_expr.mbt @@ -124,23 +124,32 @@ fn test_alternation_and_no_match() -> Unit raise { ///| fn main { println("test_value_context") - debug(try? test_value_context()) + debug(to_result(() => test_value_context())) println("test_hidden_capture_in_regex_constant") - debug(try? test_hidden_capture_in_regex_constant()) + debug(to_result(() => test_hidden_capture_in_regex_constant())) println("test_hidden_capture_in_composed_regex_constant") - debug(try? test_hidden_capture_in_composed_regex_constant()) + debug(to_result(() => test_hidden_capture_in_composed_regex_constant())) println("test_before_after_rest") - debug(try? test_before_after_rest()) + debug(to_result(() => test_before_after_rest())) println("test_anchored_before_regression") - debug(try? test_anchored_before_regression()) + debug(to_result(() => test_anchored_before_regression())) println("test_anchored_empty_regression") - debug(try? test_anchored_empty_regression()) + debug(to_result(() => test_anchored_empty_regression())) println("test_multiple_captures") - debug(try? test_multiple_captures()) + debug(to_result(() => test_multiple_captures())) println("test_char_capture") - debug(try? test_char_capture()) + debug(to_result(() => test_char_capture())) println("test_short_circuit_scope") - debug(try? test_short_circuit_scope()) + debug(to_result(() => test_short_circuit_scope())) println("test_alternation_and_no_match") - debug(try? test_alternation_and_no_match()) + debug(to_result(() => test_alternation_and_no_match())) +} + +fn[T, E : Error] to_result(f : () -> T raise E) -> Result[T, E] { + try f() + catch { + err => Result::Err(err) + } noraise { + value => Result::Ok(value) + } } diff --git a/test/sync_test/__snapshot__/pipeline_test_regex_match_expr.mbt.tokens.json b/test/sync_test/__snapshot__/pipeline_test_regex_match_expr.mbt.tokens.json index 3b93f2d9..877b5ea1 100644 --- a/test/sync_test/__snapshot__/pipeline_test_regex_match_expr.mbt.tokens.json +++ b/test/sync_test/__snapshot__/pipeline_test_regex_match_expr.mbt.tokens.json @@ -4020,38 +4020,61 @@ "loc": "127:8-127:9" }, { - "token": "TRY_QUESTION", - "loc": "127:9-127:13" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "127:9-127:18" + }, + { + "token": "LPAREN", + "loc": "127:18-127:19" + }, + { + "token": "LPAREN", + "loc": "127:19-127:20" + }, + { + "token": "RPAREN", + "loc": "127:20-127:21" + }, + { + "token": "FAT_ARROW", + "loc": "127:22-127:24" }, { "token": [ "LIDENT", "test_value_context" ], - "loc": "127:14-127:32" + "loc": "127:25-127:43" }, { "token": "LPAREN", - "loc": "127:32-127:33" + "loc": "127:43-127:44" + }, + { + "token": "RPAREN", + "loc": "127:44-127:45" }, { "token": "RPAREN", - "loc": "127:33-127:34" + "loc": "127:45-127:46" }, { "token": "RPAREN", - "loc": "127:34-127:35" + "loc": "127:46-127:47" }, { "token": [ "SEMI", false ], - "loc": "127:35-127:35" + "loc": "127:47-127:47" }, { "token": "NEWLINE", - "loc": "127:35-127:36" + "loc": "127:47-127:48" }, { "token": [ @@ -4098,38 +4121,61 @@ "loc": "129:8-129:9" }, { - "token": "TRY_QUESTION", - "loc": "129:9-129:13" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "129:9-129:18" + }, + { + "token": "LPAREN", + "loc": "129:18-129:19" + }, + { + "token": "LPAREN", + "loc": "129:19-129:20" + }, + { + "token": "RPAREN", + "loc": "129:20-129:21" + }, + { + "token": "FAT_ARROW", + "loc": "129:22-129:24" }, { "token": [ "LIDENT", "test_hidden_capture_in_regex_constant" ], - "loc": "129:14-129:51" + "loc": "129:25-129:62" }, { "token": "LPAREN", - "loc": "129:51-129:52" + "loc": "129:62-129:63" }, { "token": "RPAREN", - "loc": "129:52-129:53" + "loc": "129:63-129:64" }, { "token": "RPAREN", - "loc": "129:53-129:54" + "loc": "129:64-129:65" + }, + { + "token": "RPAREN", + "loc": "129:65-129:66" }, { "token": [ "SEMI", false ], - "loc": "129:54-129:54" + "loc": "129:66-129:66" }, { "token": "NEWLINE", - "loc": "129:54-129:55" + "loc": "129:66-129:67" }, { "token": [ @@ -4176,38 +4222,61 @@ "loc": "131:8-131:9" }, { - "token": "TRY_QUESTION", - "loc": "131:9-131:13" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "131:9-131:18" + }, + { + "token": "LPAREN", + "loc": "131:18-131:19" + }, + { + "token": "LPAREN", + "loc": "131:19-131:20" + }, + { + "token": "RPAREN", + "loc": "131:20-131:21" + }, + { + "token": "FAT_ARROW", + "loc": "131:22-131:24" }, { "token": [ "LIDENT", "test_hidden_capture_in_composed_regex_constant" ], - "loc": "131:14-131:60" + "loc": "131:25-131:71" }, { "token": "LPAREN", - "loc": "131:60-131:61" + "loc": "131:71-131:72" }, { "token": "RPAREN", - "loc": "131:61-131:62" + "loc": "131:72-131:73" }, { "token": "RPAREN", - "loc": "131:62-131:63" + "loc": "131:73-131:74" + }, + { + "token": "RPAREN", + "loc": "131:74-131:75" }, { "token": [ "SEMI", false ], - "loc": "131:63-131:63" + "loc": "131:75-131:75" }, { "token": "NEWLINE", - "loc": "131:63-131:64" + "loc": "131:75-131:76" }, { "token": [ @@ -4254,38 +4323,61 @@ "loc": "133:8-133:9" }, { - "token": "TRY_QUESTION", - "loc": "133:9-133:13" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "133:9-133:18" + }, + { + "token": "LPAREN", + "loc": "133:18-133:19" + }, + { + "token": "LPAREN", + "loc": "133:19-133:20" + }, + { + "token": "RPAREN", + "loc": "133:20-133:21" + }, + { + "token": "FAT_ARROW", + "loc": "133:22-133:24" }, { "token": [ "LIDENT", "test_before_after_rest" ], - "loc": "133:14-133:36" + "loc": "133:25-133:47" }, { "token": "LPAREN", - "loc": "133:36-133:37" + "loc": "133:47-133:48" + }, + { + "token": "RPAREN", + "loc": "133:48-133:49" }, { "token": "RPAREN", - "loc": "133:37-133:38" + "loc": "133:49-133:50" }, { "token": "RPAREN", - "loc": "133:38-133:39" + "loc": "133:50-133:51" }, { "token": [ "SEMI", false ], - "loc": "133:39-133:39" + "loc": "133:51-133:51" }, { "token": "NEWLINE", - "loc": "133:39-133:40" + "loc": "133:51-133:52" }, { "token": [ @@ -4332,38 +4424,61 @@ "loc": "135:8-135:9" }, { - "token": "TRY_QUESTION", - "loc": "135:9-135:13" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "135:9-135:18" + }, + { + "token": "LPAREN", + "loc": "135:18-135:19" + }, + { + "token": "LPAREN", + "loc": "135:19-135:20" + }, + { + "token": "RPAREN", + "loc": "135:20-135:21" + }, + { + "token": "FAT_ARROW", + "loc": "135:22-135:24" }, { "token": [ "LIDENT", "test_anchored_before_regression" ], - "loc": "135:14-135:45" + "loc": "135:25-135:56" }, { "token": "LPAREN", - "loc": "135:45-135:46" + "loc": "135:56-135:57" + }, + { + "token": "RPAREN", + "loc": "135:57-135:58" }, { "token": "RPAREN", - "loc": "135:46-135:47" + "loc": "135:58-135:59" }, { "token": "RPAREN", - "loc": "135:47-135:48" + "loc": "135:59-135:60" }, { "token": [ "SEMI", false ], - "loc": "135:48-135:48" + "loc": "135:60-135:60" }, { "token": "NEWLINE", - "loc": "135:48-135:49" + "loc": "135:60-135:61" }, { "token": [ @@ -4410,38 +4525,61 @@ "loc": "137:8-137:9" }, { - "token": "TRY_QUESTION", - "loc": "137:9-137:13" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "137:9-137:18" + }, + { + "token": "LPAREN", + "loc": "137:18-137:19" + }, + { + "token": "LPAREN", + "loc": "137:19-137:20" + }, + { + "token": "RPAREN", + "loc": "137:20-137:21" + }, + { + "token": "FAT_ARROW", + "loc": "137:22-137:24" }, { "token": [ "LIDENT", "test_anchored_empty_regression" ], - "loc": "137:14-137:44" + "loc": "137:25-137:55" }, { "token": "LPAREN", - "loc": "137:44-137:45" + "loc": "137:55-137:56" }, { "token": "RPAREN", - "loc": "137:45-137:46" + "loc": "137:56-137:57" }, { "token": "RPAREN", - "loc": "137:46-137:47" + "loc": "137:57-137:58" + }, + { + "token": "RPAREN", + "loc": "137:58-137:59" }, { "token": [ "SEMI", false ], - "loc": "137:47-137:47" + "loc": "137:59-137:59" }, { "token": "NEWLINE", - "loc": "137:47-137:48" + "loc": "137:59-137:60" }, { "token": [ @@ -4488,38 +4626,61 @@ "loc": "139:8-139:9" }, { - "token": "TRY_QUESTION", - "loc": "139:9-139:13" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "139:9-139:18" + }, + { + "token": "LPAREN", + "loc": "139:18-139:19" + }, + { + "token": "LPAREN", + "loc": "139:19-139:20" + }, + { + "token": "RPAREN", + "loc": "139:20-139:21" + }, + { + "token": "FAT_ARROW", + "loc": "139:22-139:24" }, { "token": [ "LIDENT", "test_multiple_captures" ], - "loc": "139:14-139:36" + "loc": "139:25-139:47" }, { "token": "LPAREN", - "loc": "139:36-139:37" + "loc": "139:47-139:48" + }, + { + "token": "RPAREN", + "loc": "139:48-139:49" }, { "token": "RPAREN", - "loc": "139:37-139:38" + "loc": "139:49-139:50" }, { "token": "RPAREN", - "loc": "139:38-139:39" + "loc": "139:50-139:51" }, { "token": [ "SEMI", false ], - "loc": "139:39-139:39" + "loc": "139:51-139:51" }, { "token": "NEWLINE", - "loc": "139:39-139:40" + "loc": "139:51-139:52" }, { "token": [ @@ -4566,38 +4727,61 @@ "loc": "141:8-141:9" }, { - "token": "TRY_QUESTION", - "loc": "141:9-141:13" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "141:9-141:18" + }, + { + "token": "LPAREN", + "loc": "141:18-141:19" + }, + { + "token": "LPAREN", + "loc": "141:19-141:20" + }, + { + "token": "RPAREN", + "loc": "141:20-141:21" + }, + { + "token": "FAT_ARROW", + "loc": "141:22-141:24" }, { "token": [ "LIDENT", "test_char_capture" ], - "loc": "141:14-141:31" + "loc": "141:25-141:42" }, { "token": "LPAREN", - "loc": "141:31-141:32" + "loc": "141:42-141:43" + }, + { + "token": "RPAREN", + "loc": "141:43-141:44" }, { "token": "RPAREN", - "loc": "141:32-141:33" + "loc": "141:44-141:45" }, { "token": "RPAREN", - "loc": "141:33-141:34" + "loc": "141:45-141:46" }, { "token": [ "SEMI", false ], - "loc": "141:34-141:34" + "loc": "141:46-141:46" }, { "token": "NEWLINE", - "loc": "141:34-141:35" + "loc": "141:46-141:47" }, { "token": [ @@ -4644,38 +4828,61 @@ "loc": "143:8-143:9" }, { - "token": "TRY_QUESTION", - "loc": "143:9-143:13" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "143:9-143:18" + }, + { + "token": "LPAREN", + "loc": "143:18-143:19" + }, + { + "token": "LPAREN", + "loc": "143:19-143:20" + }, + { + "token": "RPAREN", + "loc": "143:20-143:21" + }, + { + "token": "FAT_ARROW", + "loc": "143:22-143:24" }, { "token": [ "LIDENT", "test_short_circuit_scope" ], - "loc": "143:14-143:38" + "loc": "143:25-143:49" }, { "token": "LPAREN", - "loc": "143:38-143:39" + "loc": "143:49-143:50" + }, + { + "token": "RPAREN", + "loc": "143:50-143:51" }, { "token": "RPAREN", - "loc": "143:39-143:40" + "loc": "143:51-143:52" }, { "token": "RPAREN", - "loc": "143:40-143:41" + "loc": "143:52-143:53" }, { "token": [ "SEMI", false ], - "loc": "143:41-143:41" + "loc": "143:53-143:53" }, { "token": "NEWLINE", - "loc": "143:41-143:42" + "loc": "143:53-143:54" }, { "token": [ @@ -4722,31 +4929,54 @@ "loc": "145:8-145:9" }, { - "token": "TRY_QUESTION", - "loc": "145:9-145:13" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "145:9-145:18" + }, + { + "token": "LPAREN", + "loc": "145:18-145:19" + }, + { + "token": "LPAREN", + "loc": "145:19-145:20" + }, + { + "token": "RPAREN", + "loc": "145:20-145:21" + }, + { + "token": "FAT_ARROW", + "loc": "145:22-145:24" }, { "token": [ "LIDENT", "test_alternation_and_no_match" ], - "loc": "145:14-145:43" + "loc": "145:25-145:54" }, { "token": "LPAREN", - "loc": "145:43-145:44" + "loc": "145:54-145:55" + }, + { + "token": "RPAREN", + "loc": "145:55-145:56" }, { "token": "RPAREN", - "loc": "145:44-145:45" + "loc": "145:56-145:57" }, { "token": "RPAREN", - "loc": "145:45-145:46" + "loc": "145:57-145:58" }, { "token": "NEWLINE", - "loc": "145:46-145:47" + "loc": "145:58-145:59" }, { "token": "RBRACE", @@ -4763,8 +4993,324 @@ "token": "NEWLINE", "loc": "146:2-146:3" }, + { + "token": "NEWLINE", + "loc": "147:1-147:2" + }, + { + "token": "FN", + "loc": "148:1-148:3" + }, + { + "token": "LBRACKET", + "loc": "148:3-148:4" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "148:4-148:5" + }, + { + "token": "COMMA", + "loc": "148:5-148:6" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "148:7-148:8" + }, + { + "token": "COLON", + "loc": "148:9-148:10" + }, + { + "token": [ + "UIDENT", + "Error" + ], + "loc": "148:11-148:16" + }, + { + "token": "RBRACKET", + "loc": "148:16-148:17" + }, + { + "token": [ + "LIDENT", + "to_result" + ], + "loc": "148:18-148:27" + }, + { + "token": "LPAREN", + "loc": "148:27-148:28" + }, + { + "token": [ + "LIDENT", + "f" + ], + "loc": "148:28-148:29" + }, + { + "token": "COLON", + "loc": "148:30-148:31" + }, + { + "token": "LPAREN", + "loc": "148:32-148:33" + }, + { + "token": "RPAREN", + "loc": "148:33-148:34" + }, + { + "token": "THIN_ARROW", + "loc": "148:35-148:37" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "148:38-148:39" + }, + { + "token": "RAISE", + "loc": "148:40-148:45" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "148:46-148:47" + }, + { + "token": "RPAREN", + "loc": "148:47-148:48" + }, + { + "token": "THIN_ARROW", + "loc": "148:49-148:51" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "148:52-148:58" + }, + { + "token": "LBRACKET", + "loc": "148:58-148:59" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "148:59-148:60" + }, + { + "token": "COMMA", + "loc": "148:60-148:61" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "148:62-148:63" + }, + { + "token": "RBRACKET", + "loc": "148:63-148:64" + }, + { + "token": "LBRACE", + "loc": "148:65-148:66" + }, + { + "token": "NEWLINE", + "loc": "148:66-148:67" + }, + { + "token": "TRY", + "loc": "149:3-149:6" + }, + { + "token": [ + "LIDENT", + "f" + ], + "loc": "149:7-149:8" + }, + { + "token": "LPAREN", + "loc": "149:8-149:9" + }, + { + "token": "RPAREN", + "loc": "149:9-149:10" + }, + { + "token": "NEWLINE", + "loc": "149:10-149:11" + }, + { + "token": "CATCH", + "loc": "150:3-150:8" + }, + { + "token": "LBRACE", + "loc": "150:9-150:10" + }, + { + "token": "NEWLINE", + "loc": "150:10-150:11" + }, + { + "token": [ + "LIDENT", + "err" + ], + "loc": "151:5-151:8" + }, + { + "token": "FAT_ARROW", + "loc": "151:9-151:11" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "151:12-151:18" + }, + { + "token": "COLONCOLON", + "loc": "151:18-151:20" + }, + { + "token": [ + "UIDENT", + "Err" + ], + "loc": "151:20-151:23" + }, + { + "token": "LPAREN", + "loc": "151:23-151:24" + }, + { + "token": [ + "LIDENT", + "err" + ], + "loc": "151:24-151:27" + }, + { + "token": "RPAREN", + "loc": "151:27-151:28" + }, + { + "token": "NEWLINE", + "loc": "151:28-151:29" + }, + { + "token": "RBRACE", + "loc": "152:3-152:4" + }, + { + "token": "NORAISE", + "loc": "152:5-152:12" + }, + { + "token": "LBRACE", + "loc": "152:13-152:14" + }, + { + "token": "NEWLINE", + "loc": "152:14-152:15" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "153:5-153:10" + }, + { + "token": "FAT_ARROW", + "loc": "153:11-153:13" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "153:14-153:20" + }, + { + "token": "COLONCOLON", + "loc": "153:20-153:22" + }, + { + "token": [ + "UIDENT", + "Ok" + ], + "loc": "153:22-153:24" + }, + { + "token": "LPAREN", + "loc": "153:24-153:25" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "153:25-153:30" + }, + { + "token": "RPAREN", + "loc": "153:30-153:31" + }, + { + "token": "NEWLINE", + "loc": "153:31-153:32" + }, + { + "token": "RBRACE", + "loc": "154:3-154:4" + }, + { + "token": "NEWLINE", + "loc": "154:4-154:5" + }, + { + "token": "RBRACE", + "loc": "155:1-155:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "155:2-155:2" + }, + { + "token": "NEWLINE", + "loc": "155:2-155:3" + }, { "token": "EOF", - "loc": "147:1-147:1" + "loc": "156:1-156:1" } ] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/pipeline_test_relaxed_for.json b/test/sync_test/__snapshot__/pipeline_test_relaxed_for.json index d07bb706..ba1a59d9 100644 --- a/test/sync_test/__snapshot__/pipeline_test_relaxed_for.json +++ b/test/sync_test/__snapshot__/pipeline_test_relaxed_for.json @@ -166,7 +166,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { diff --git a/test/sync_test/__snapshot__/pipeline_test_rename_mono.json b/test/sync_test/__snapshot__/pipeline_test_rename_mono.json index e4e60ff2..68c19230 100644 --- a/test/sync_test/__snapshot__/pipeline_test_rename_mono.json +++ b/test/sync_test/__snapshot__/pipeline_test_rename_mono.json @@ -1301,7 +1301,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { @@ -1392,7 +1393,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { diff --git a/test/sync_test/__snapshot__/pipeline_test_return_beta.json b/test/sync_test/__snapshot__/pipeline_test_return_beta.json index 6e2cd59b..36467a97 100644 --- a/test/sync_test/__snapshot__/pipeline_test_return_beta.json +++ b/test/sync_test/__snapshot__/pipeline_test_return_beta.json @@ -339,7 +339,8 @@ "kind": "Expr::Array::ExprList", "loc": null, "children": [] - } + }, + "is_iter": false } }, "body": { @@ -1173,7 +1174,8 @@ "kind": "Expr::Array::ExprList", "loc": null, "children": [] - } + }, + "is_iter": false } }, "body": { @@ -1799,7 +1801,8 @@ "kind": "Expr::Array::ExprList", "loc": null, "children": [] - } + }, + "is_iter": false } }, "body": { diff --git a/test/sync_test/__snapshot__/pipeline_test_return_in_join.json b/test/sync_test/__snapshot__/pipeline_test_return_in_join.json index e90f5118..2e682f69 100644 --- a/test/sync_test/__snapshot__/pipeline_test_return_in_join.json +++ b/test/sync_test/__snapshot__/pipeline_test_return_in_join.json @@ -855,71 +855,137 @@ "loc": null, "children": { "value": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", - "loc": null, - "children": { - "value": "g" - } - } + "value": "to_result" } } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", "loc": null, - "children": [ - { - "kind": "Argument", + "children": { + "value": { + "kind": "Expr::Function", "loc": null, "children": { - "value": { - "kind": "Expr::Constant", + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "constant": { - "kind": "Constant::Int", + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Apply", "loc": null, "children": { - "value": "42" + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "g" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "42" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } } - } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } - ] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} + } } - } + ] }, - "kind": { - "kind": "TryOperatorKind::Question", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -944,5 +1010,524 @@ } } } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "to_result" + } + }, + "has_error": null, + "is_async": null, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "f" + } + }, + "ty": { + "kind": "Type::Arrow", + "loc": null, + "children": { + "args": { + "kind": "Type::Arrow::ArgList", + "loc": null, + "children": [] + }, + "res": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "T" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "err": { + "kind": "ErrorType::ErrorType", + "loc": null, + "children": { + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "E" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + "is_async": null + } + } + } + } + ] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [ + { + "kind": "TypeVarBinder", + "loc": null, + "children": { + "name": "T", + "constraints": { + "kind": "TypeVarBinder::TypeVarConstraintList", + "loc": null, + "children": [] + } + } + }, + { + "kind": "TypeVarBinder", + "loc": null, + "children": { + "name": "E", + "constraints": { + "kind": "TypeVarBinder::TypeVarConstraintList", + "loc": null, + "children": [ + { + "kind": "TypeVarConstraint", + "loc": null, + "children": { + "trait": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Error" + } + } + } + } + ] + } + } + } + ] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [ + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "T" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "E" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + ] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::Try", + "loc": null, + "children": { + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "f" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "catch": { + "kind": "Expr::Try::CaseList", + "loc": null, + "children": [ + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "err" + } + } + } + }, + "guard": null, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Err" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::TypeName", + "loc": null, + "children": { + "value": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + }, + "is_object": false + } + } + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "err" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + ] + }, + "catch_all": false, + "try_else": { + "kind": "Expr::Try::CaseList", + "loc": null, + "children": [ + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "value" + } + } + } + }, + "guard": null, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Ok" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::TypeName", + "loc": null, + "children": { + "value": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + }, + "is_object": false + } + } + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "value" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + ] + }, + "has_try": true + } + } + } + } + } } ] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/pipeline_test_return_in_join.mbt b/test/sync_test/__snapshot__/pipeline_test_return_in_join.mbt index 60bbe102..a79114e2 100644 --- a/test/sync_test/__snapshot__/pipeline_test_return_in_join.mbt +++ b/test/sync_test/__snapshot__/pipeline_test_return_in_join.mbt @@ -14,5 +14,14 @@ fn g(x : Int) -> String raise Error { } fn init { - debug(try? g(42)) + debug(to_result(() => g(42))) +} + +fn[T, E : Error] to_result(f : () -> T raise E) -> Result[T, E] { + try f() + catch { + err => Result::Err(err) + } noraise { + value => Result::Ok(value) + } } diff --git a/test/sync_test/__snapshot__/pipeline_test_return_in_join.mbt.tokens.json b/test/sync_test/__snapshot__/pipeline_test_return_in_join.mbt.tokens.json index 6453ea49..4103bad8 100644 --- a/test/sync_test/__snapshot__/pipeline_test_return_in_join.mbt.tokens.json +++ b/test/sync_test/__snapshot__/pipeline_test_return_in_join.mbt.tokens.json @@ -484,38 +484,61 @@ "loc": "17:8-17:9" }, { - "token": "TRY_QUESTION", - "loc": "17:9-17:13" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "17:9-17:18" + }, + { + "token": "LPAREN", + "loc": "17:18-17:19" + }, + { + "token": "LPAREN", + "loc": "17:19-17:20" + }, + { + "token": "RPAREN", + "loc": "17:20-17:21" + }, + { + "token": "FAT_ARROW", + "loc": "17:22-17:24" }, { "token": [ "LIDENT", "g" ], - "loc": "17:14-17:15" + "loc": "17:25-17:26" }, { "token": "LPAREN", - "loc": "17:15-17:16" + "loc": "17:26-17:27" }, { "token": [ "INT", "42" ], - "loc": "17:16-17:18" + "loc": "17:27-17:29" }, { "token": "RPAREN", - "loc": "17:18-17:19" + "loc": "17:29-17:30" }, { "token": "RPAREN", - "loc": "17:19-17:20" + "loc": "17:30-17:31" + }, + { + "token": "RPAREN", + "loc": "17:31-17:32" }, { "token": "NEWLINE", - "loc": "17:20-17:21" + "loc": "17:32-17:33" }, { "token": "RBRACE", @@ -532,8 +555,324 @@ "token": "NEWLINE", "loc": "18:2-18:3" }, + { + "token": "NEWLINE", + "loc": "19:1-19:2" + }, + { + "token": "FN", + "loc": "20:1-20:3" + }, + { + "token": "LBRACKET", + "loc": "20:3-20:4" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "20:4-20:5" + }, + { + "token": "COMMA", + "loc": "20:5-20:6" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "20:7-20:8" + }, + { + "token": "COLON", + "loc": "20:9-20:10" + }, + { + "token": [ + "UIDENT", + "Error" + ], + "loc": "20:11-20:16" + }, + { + "token": "RBRACKET", + "loc": "20:16-20:17" + }, + { + "token": [ + "LIDENT", + "to_result" + ], + "loc": "20:18-20:27" + }, + { + "token": "LPAREN", + "loc": "20:27-20:28" + }, + { + "token": [ + "LIDENT", + "f" + ], + "loc": "20:28-20:29" + }, + { + "token": "COLON", + "loc": "20:30-20:31" + }, + { + "token": "LPAREN", + "loc": "20:32-20:33" + }, + { + "token": "RPAREN", + "loc": "20:33-20:34" + }, + { + "token": "THIN_ARROW", + "loc": "20:35-20:37" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "20:38-20:39" + }, + { + "token": "RAISE", + "loc": "20:40-20:45" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "20:46-20:47" + }, + { + "token": "RPAREN", + "loc": "20:47-20:48" + }, + { + "token": "THIN_ARROW", + "loc": "20:49-20:51" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "20:52-20:58" + }, + { + "token": "LBRACKET", + "loc": "20:58-20:59" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "20:59-20:60" + }, + { + "token": "COMMA", + "loc": "20:60-20:61" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "20:62-20:63" + }, + { + "token": "RBRACKET", + "loc": "20:63-20:64" + }, + { + "token": "LBRACE", + "loc": "20:65-20:66" + }, + { + "token": "NEWLINE", + "loc": "20:66-20:67" + }, + { + "token": "TRY", + "loc": "21:3-21:6" + }, + { + "token": [ + "LIDENT", + "f" + ], + "loc": "21:7-21:8" + }, + { + "token": "LPAREN", + "loc": "21:8-21:9" + }, + { + "token": "RPAREN", + "loc": "21:9-21:10" + }, + { + "token": "NEWLINE", + "loc": "21:10-21:11" + }, + { + "token": "CATCH", + "loc": "22:3-22:8" + }, + { + "token": "LBRACE", + "loc": "22:9-22:10" + }, + { + "token": "NEWLINE", + "loc": "22:10-22:11" + }, + { + "token": [ + "LIDENT", + "err" + ], + "loc": "23:5-23:8" + }, + { + "token": "FAT_ARROW", + "loc": "23:9-23:11" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "23:12-23:18" + }, + { + "token": "COLONCOLON", + "loc": "23:18-23:20" + }, + { + "token": [ + "UIDENT", + "Err" + ], + "loc": "23:20-23:23" + }, + { + "token": "LPAREN", + "loc": "23:23-23:24" + }, + { + "token": [ + "LIDENT", + "err" + ], + "loc": "23:24-23:27" + }, + { + "token": "RPAREN", + "loc": "23:27-23:28" + }, + { + "token": "NEWLINE", + "loc": "23:28-23:29" + }, + { + "token": "RBRACE", + "loc": "24:3-24:4" + }, + { + "token": "NORAISE", + "loc": "24:5-24:12" + }, + { + "token": "LBRACE", + "loc": "24:13-24:14" + }, + { + "token": "NEWLINE", + "loc": "24:14-24:15" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "25:5-25:10" + }, + { + "token": "FAT_ARROW", + "loc": "25:11-25:13" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "25:14-25:20" + }, + { + "token": "COLONCOLON", + "loc": "25:20-25:22" + }, + { + "token": [ + "UIDENT", + "Ok" + ], + "loc": "25:22-25:24" + }, + { + "token": "LPAREN", + "loc": "25:24-25:25" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "25:25-25:30" + }, + { + "token": "RPAREN", + "loc": "25:30-25:31" + }, + { + "token": "NEWLINE", + "loc": "25:31-25:32" + }, + { + "token": "RBRACE", + "loc": "26:3-26:4" + }, + { + "token": "NEWLINE", + "loc": "26:4-26:5" + }, + { + "token": "RBRACE", + "loc": "27:1-27:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "27:2-27:2" + }, + { + "token": "NEWLINE", + "loc": "27:2-27:3" + }, { "token": "EOF", - "loc": "19:1-19:1" + "loc": "28:1-28:1" } ] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/pipeline_test_return_test.json b/test/sync_test/__snapshot__/pipeline_test_return_test.json index f287a55e..3d935df2 100644 --- a/test/sync_test/__snapshot__/pipeline_test_return_test.json +++ b/test/sync_test/__snapshot__/pipeline_test_return_test.json @@ -729,7 +729,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -1003,7 +1004,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { diff --git a/test/sync_test/__snapshot__/pipeline_test_shadow_builtin_pkg.json b/test/sync_test/__snapshot__/pipeline_test_shadow_builtin_pkg.json index d5398468..d34ad985 100644 --- a/test/sync_test/__snapshot__/pipeline_test_shadow_builtin_pkg.json +++ b/test/sync_test/__snapshot__/pipeline_test_shadow_builtin_pkg.json @@ -330,6 +330,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, diff --git a/test/sync_test/__snapshot__/pipeline_test_show.json b/test/sync_test/__snapshot__/pipeline_test_show.json index 3170f92e..7b21de2e 100644 --- a/test/sync_test/__snapshot__/pipeline_test_show.json +++ b/test/sync_test/__snapshot__/pipeline_test_show.json @@ -212,6 +212,11 @@ } ] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, @@ -690,6 +695,11 @@ } ] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, diff --git a/test/sync_test/__snapshot__/pipeline_test_signed_bitstring.json b/test/sync_test/__snapshot__/pipeline_test_signed_bitstring.json index 64b745aa..5db7a78b 100644 --- a/test/sync_test/__snapshot__/pipeline_test_signed_bitstring.json +++ b/test/sync_test/__snapshot__/pipeline_test_signed_bitstring.json @@ -2496,7 +2496,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -2620,7 +2621,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -2770,7 +2772,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -2985,7 +2988,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -3306,7 +3310,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { diff --git a/test/sync_test/__snapshot__/pipeline_test_specialize_local_fn.json b/test/sync_test/__snapshot__/pipeline_test_specialize_local_fn.json index 58d5b51f..5ca1c5e8 100644 --- a/test/sync_test/__snapshot__/pipeline_test_specialize_local_fn.json +++ b/test/sync_test/__snapshot__/pipeline_test_specialize_local_fn.json @@ -305,7 +305,8 @@ "kind": "Expr::Array::ExprList", "loc": null, "children": [] - } + }, + "is_iter": false } }, "ifnot": { diff --git a/test/sync_test/__snapshot__/pipeline_test_stackalloc.json b/test/sync_test/__snapshot__/pipeline_test_stackalloc.json index 421db1e6..937a76cf 100644 --- a/test/sync_test/__snapshot__/pipeline_test_stackalloc.json +++ b/test/sync_test/__snapshot__/pipeline_test_stackalloc.json @@ -457,7 +457,8 @@ } } ] - } + }, + "is_iter": false } }, "ty": { diff --git a/test/sync_test/__snapshot__/pipeline_test_stackallow_joinpoint.json b/test/sync_test/__snapshot__/pipeline_test_stackallow_joinpoint.json index a7ae4256..ef2ccea9 100644 --- a/test/sync_test/__snapshot__/pipeline_test_stackallow_joinpoint.json +++ b/test/sync_test/__snapshot__/pipeline_test_stackallow_joinpoint.json @@ -870,7 +870,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { diff --git a/test/sync_test/__snapshot__/pipeline_test_static_data.json b/test/sync_test/__snapshot__/pipeline_test_static_data.json index 19376c26..42f087ad 100644 --- a/test/sync_test/__snapshot__/pipeline_test_static_data.json +++ b/test/sync_test/__snapshot__/pipeline_test_static_data.json @@ -417,7 +417,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { diff --git a/test/sync_test/__snapshot__/pipeline_test_static_toplevel_let.json b/test/sync_test/__snapshot__/pipeline_test_static_toplevel_let.json index 98b528cd..f3d4950b 100644 --- a/test/sync_test/__snapshot__/pipeline_test_static_toplevel_let.json +++ b/test/sync_test/__snapshot__/pipeline_test_static_toplevel_let.json @@ -1016,7 +1016,8 @@ } } ] - } + }, + "is_iter": false } }, "vis": { @@ -1207,7 +1208,8 @@ } } ] - } + }, + "is_iter": false } }, "vis": { diff --git a/test/sync_test/__snapshot__/pipeline_test_static_toplevel_let_big_enum.json b/test/sync_test/__snapshot__/pipeline_test_static_toplevel_let_big_enum.json index 4d03166a..c3002d46 100644 --- a/test/sync_test/__snapshot__/pipeline_test_static_toplevel_let_big_enum.json +++ b/test/sync_test/__snapshot__/pipeline_test_static_toplevel_let_big_enum.json @@ -7036,6 +7036,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, diff --git a/test/sync_test/__snapshot__/pipeline_test_string_from_uint16_array.json b/test/sync_test/__snapshot__/pipeline_test_string_from_uint16_array.json index 906a9f32..20ff69a8 100644 --- a/test/sync_test/__snapshot__/pipeline_test_string_from_uint16_array.json +++ b/test/sync_test/__snapshot__/pipeline_test_string_from_uint16_array.json @@ -419,7 +419,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { @@ -1406,7 +1407,8 @@ } } ] - } + }, + "is_iter": false } }, "vis": { @@ -1492,7 +1494,8 @@ "kind": "Expr::Array::ExprList", "loc": null, "children": [] - } + }, + "is_iter": false } }, "vis": { diff --git a/test/sync_test/__snapshot__/pipeline_test_string_interp_lambda.json b/test/sync_test/__snapshot__/pipeline_test_string_interp_lambda.json new file mode 100644 index 00000000..aba34248 --- /dev/null +++ b/test/sync_test/__snapshot__/pipeline_test_string_interp_lambda.json @@ -0,0 +1,556 @@ +[ + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "StringBuilder" + } + }, + "is_object": false + } + }, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "f" + } + }, + "has_error": null, + "is_async": null, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "self" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "StringBuilder" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + } + ] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Unit" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "self" + } + } + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "write_string" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "[f]" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "main" + } + }, + "has_error": null, + "is_async": null, + "decl_params": null, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [] + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::Let", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "value" + } + } + } + }, + "expr": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "value" + } + } + } + }, + "body": { + "kind": "Expr::Let", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "direct" + } + } + } + }, + "expr": { + "kind": "Expr::Interp", + "loc": null, + "children": { + "elems": { + "kind": "Expr::Interp::ElemList", + "loc": null, + "children": [ + { + "kind": "InterpElem::Literal", + "loc": null, + "children": { + "repr": "direct " + } + }, + { + "kind": "InterpElem::Source", + "loc": null, + "children": { + "source": "sb => sb.f()" + } + }, + { + "kind": "InterpElem::Literal", + "loc": null, + "children": { + "repr": " " + } + }, + { + "kind": "InterpElem::Source", + "loc": null, + "children": { + "source": "value" + } + } + ] + } + } + }, + "body": { + "kind": "Expr::Sequence", + "loc": null, + "children": { + "exprs": { + "kind": "Expr::Sequence::ExprList", + "loc": null, + "children": [ + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "direct" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + ] + }, + "last_expr": { + "kind": "Expr::Let", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "block" + } + } + } + }, + "expr": { + "kind": "Expr::Interp", + "loc": null, + "children": { + "elems": { + "kind": "Expr::Interp::ElemList", + "loc": null, + "children": [ + { + "kind": "InterpElem::Literal", + "loc": null, + "children": { + "repr": "block " + } + }, + { + "kind": "InterpElem::Source", + "loc": null, + "children": { + "source": "sb => { println(\"callback\"); sb.f() }" + } + }, + { + "kind": "InterpElem::Literal", + "loc": null, + "children": { + "repr": " end" + } + }, + { + "kind": "InterpElem::Source", + "loc": null, + "children": { + "source": "_ => ()" + } + } + ] + } + } + }, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "block" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } +] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/pipeline_test_string_interp_lambda.mbt b/test/sync_test/__snapshot__/pipeline_test_string_interp_lambda.mbt new file mode 100644 index 00000000..a39964c6 --- /dev/null +++ b/test/sync_test/__snapshot__/pipeline_test_string_interp_lambda.mbt @@ -0,0 +1,11 @@ +fn StringBuilder::f(self : StringBuilder) -> Unit { + self.write_string("[f]") +} + +fn main { + let value = "value" + let direct = "direct \{sb => sb.f()} \{value}" + println(direct) + let block = "block \{sb => { println("callback"); sb.f() }} end\{_ => ()}" + println(block) +} diff --git a/test/sync_test/__snapshot__/pipeline_test_string_interp_lambda.mbt.tokens.json b/test/sync_test/__snapshot__/pipeline_test_string_interp_lambda.mbt.tokens.json new file mode 100644 index 00000000..b5577d0c --- /dev/null +++ b/test/sync_test/__snapshot__/pipeline_test_string_interp_lambda.mbt.tokens.json @@ -0,0 +1,317 @@ +[ + { + "token": "FN", + "loc": "1:1-1:3" + }, + { + "token": [ + "UIDENT", + "StringBuilder" + ], + "loc": "1:4-1:17" + }, + { + "token": "COLONCOLON", + "loc": "1:17-1:19" + }, + { + "token": [ + "LIDENT", + "f" + ], + "loc": "1:19-1:20" + }, + { + "token": "LPAREN", + "loc": "1:20-1:21" + }, + { + "token": [ + "LIDENT", + "self" + ], + "loc": "1:21-1:25" + }, + { + "token": "COLON", + "loc": "1:26-1:27" + }, + { + "token": [ + "UIDENT", + "StringBuilder" + ], + "loc": "1:28-1:41" + }, + { + "token": "RPAREN", + "loc": "1:41-1:42" + }, + { + "token": "THIN_ARROW", + "loc": "1:43-1:45" + }, + { + "token": [ + "UIDENT", + "Unit" + ], + "loc": "1:46-1:50" + }, + { + "token": "LBRACE", + "loc": "1:51-1:52" + }, + { + "token": "NEWLINE", + "loc": "1:52-1:53" + }, + { + "token": [ + "LIDENT", + "self" + ], + "loc": "2:3-2:7" + }, + { + "token": [ + "DOT_LIDENT", + "write_string" + ], + "loc": "2:8-2:20" + }, + { + "token": "LPAREN", + "loc": "2:20-2:21" + }, + { + "token": [ + "STRING", + "[f]" + ], + "loc": "2:21-2:26" + }, + { + "token": "RPAREN", + "loc": "2:26-2:27" + }, + { + "token": "NEWLINE", + "loc": "2:27-2:28" + }, + { + "token": "RBRACE", + "loc": "3:1-3:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "3:2-3:2" + }, + { + "token": "NEWLINE", + "loc": "3:2-3:3" + }, + { + "token": "NEWLINE", + "loc": "4:1-4:2" + }, + { + "token": "FN", + "loc": "5:1-5:3" + }, + { + "token": [ + "LIDENT", + "main" + ], + "loc": "5:4-5:8" + }, + { + "token": "LBRACE", + "loc": "5:9-5:10" + }, + { + "token": "NEWLINE", + "loc": "5:10-5:11" + }, + { + "token": "LET", + "loc": "6:3-6:6" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "6:7-6:12" + }, + { + "token": "EQUAL", + "loc": "6:13-6:14" + }, + { + "token": [ + "STRING", + "value" + ], + "loc": "6:15-6:22" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "6:22-6:22" + }, + { + "token": "NEWLINE", + "loc": "6:22-6:23" + }, + { + "token": "LET", + "loc": "7:3-7:6" + }, + { + "token": [ + "LIDENT", + "direct" + ], + "loc": "7:7-7:13" + }, + { + "token": "EQUAL", + "loc": "7:14-7:15" + }, + { + "token": [ + "INTERP", + "\"direct \\{sb => sb.f()} \\{value}\"" + ], + "loc": "7:16-7:49" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "7:49-7:49" + }, + { + "token": "NEWLINE", + "loc": "7:49-7:50" + }, + { + "token": [ + "LIDENT", + "println" + ], + "loc": "8:3-8:10" + }, + { + "token": "LPAREN", + "loc": "8:10-8:11" + }, + { + "token": [ + "LIDENT", + "direct" + ], + "loc": "8:11-8:17" + }, + { + "token": "RPAREN", + "loc": "8:17-8:18" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "8:18-8:18" + }, + { + "token": "NEWLINE", + "loc": "8:18-8:19" + }, + { + "token": "LET", + "loc": "9:3-9:6" + }, + { + "token": [ + "LIDENT", + "block" + ], + "loc": "9:7-9:12" + }, + { + "token": "EQUAL", + "loc": "9:13-9:14" + }, + { + "token": [ + "INTERP", + "\"block \\{sb => { println(\"callback\"); sb.f() }} end\\{_ => ()}\"" + ], + "loc": "9:15-9:77" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "9:77-9:77" + }, + { + "token": "NEWLINE", + "loc": "9:77-9:78" + }, + { + "token": [ + "LIDENT", + "println" + ], + "loc": "10:3-10:10" + }, + { + "token": "LPAREN", + "loc": "10:10-10:11" + }, + { + "token": [ + "LIDENT", + "block" + ], + "loc": "10:11-10:16" + }, + { + "token": "RPAREN", + "loc": "10:16-10:17" + }, + { + "token": "NEWLINE", + "loc": "10:17-10:18" + }, + { + "token": "RBRACE", + "loc": "11:1-11:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "11:2-11:2" + }, + { + "token": "NEWLINE", + "loc": "11:2-11:3" + }, + { + "token": "EOF", + "loc": "12:1-12:1" + } +] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/pipeline_test_string_spread.json b/test/sync_test/__snapshot__/pipeline_test_string_spread.json index c4793993..f113b3ba 100644 --- a/test/sync_test/__snapshot__/pipeline_test_string_spread.json +++ b/test/sync_test/__snapshot__/pipeline_test_string_spread.json @@ -378,7 +378,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { @@ -798,7 +799,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { @@ -1732,7 +1734,8 @@ } } ] - } + }, + "is_iter": false } } } @@ -1781,7 +1784,8 @@ } } ] - } + }, + "is_iter": false } } } diff --git a/test/sync_test/__snapshot__/pipeline_test_struct_constructor.json b/test/sync_test/__snapshot__/pipeline_test_struct_constructor.json index d55b0312..e447ad63 100644 --- a/test/sync_test/__snapshot__/pipeline_test_struct_constructor.json +++ b/test/sync_test/__snapshot__/pipeline_test_struct_constructor.json @@ -840,84 +840,150 @@ "loc": null, "children": { "value": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Constr", + "id": { + "kind": "Var", "loc": null, "children": { - "constr": { - "kind": "Constructor", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": { - "kind": "ConstrName", - "loc": null, - "children": { - "name": "S" - } - }, - "extra_info": { - "kind": "ConstructorExtraInfo::NoExtraInfo", - "loc": null, - "children": {} - } + "value": "to_result" } } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", "loc": null, - "children": [ - { - "kind": "Argument", + "children": { + "value": { + "kind": "Expr::Function", "loc": null, "children": { - "value": { - "kind": "Expr::Constant", + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "constant": { - "kind": "Constant::Int", + "parameters": { + "kind": "Func::Lambda::ParameterList", "loc": null, - "children": { - "value": "1" - } - } - } - }, - "kind": { - "kind": "ArgumentKind::Labelled", - "loc": null, - "children": { - "value": { - "kind": "Label", + "children": [] + }, + "body": { + "kind": "Expr::Apply", "loc": null, "children": { - "name": "x" + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "S" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::NoExtraInfo", + "loc": null, + "children": {} + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "1" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Labelled", + "loc": null, + "children": { + "value": { + "kind": "Label", + "loc": null, + "children": { + "name": "x" + } + } + } + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } } - } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null } } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } - ] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} + } } - } + ] }, - "kind": { - "kind": "TryOperatorKind::Question", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -971,131 +1037,197 @@ "loc": null, "children": { "value": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Constr", + "id": { + "kind": "Var", "loc": null, "children": { - "constr": { - "kind": "Constructor", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": { - "kind": "ConstrName", - "loc": null, - "children": { - "name": "S" - } - }, - "extra_info": { - "kind": "ConstructorExtraInfo::TypeName", - "loc": null, - "children": { - "value": { - "kind": "TypeName", - "loc": null, - "children": { - "name": { - "kind": "LongIdent::Ident", - "loc": null, - "children": { - "value": "S" - } - }, - "is_object": false - } - } - } - } + "value": "to_result" } } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", "loc": null, - "children": [ - { - "kind": "Argument", + "children": { + "value": { + "kind": "Expr::Function", "loc": null, "children": { - "value": { - "kind": "Expr::Constant", + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "constant": { - "kind": "Constant::Int", + "parameters": { + "kind": "Func::Lambda::ParameterList", "loc": null, - "children": { - "value": "2" - } - } - } - }, - "kind": { - "kind": "ArgumentKind::Labelled", - "loc": null, - "children": { - "value": { - "kind": "Label", + "children": [] + }, + "body": { + "kind": "Expr::Apply", "loc": null, "children": { - "name": "x" + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "S" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::TypeName", + "loc": null, + "children": { + "value": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "S" + } + }, + "is_object": false + } + } + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "2" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Labelled", + "loc": null, + "children": { + "value": { + "kind": "Label", + "loc": null, + "children": { + "name": "x" + } + } + } + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "3" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Labelled", + "loc": null, + "children": { + "value": { + "kind": "Label", + "loc": null, + "children": { + "name": "y" + } + } + } + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } } - } - } - } - } - }, - { - "kind": "Argument", - "loc": null, - "children": { - "value": { - "kind": "Expr::Constant", - "loc": null, - "children": { - "constant": { - "kind": "Constant::Int", + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", "loc": null, - "children": { - "value": "3" - } - } - } - }, - "kind": { - "kind": "ArgumentKind::Labelled", - "loc": null, - "children": { - "value": { - "kind": "Label", + "children": {} + }, + "kind": { + "kind": "FnKind::Arrow", "loc": null, - "children": { - "name": "y" - } - } + "children": {} + }, + "has_error": null, + "is_async": null } } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } - ] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} + } } - } + ] }, - "kind": { - "kind": "TryOperatorKind::Question", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -1151,146 +1283,212 @@ "loc": null, "children": { "value": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Constraint", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "expr": { - "kind": "Expr::Apply", + "id": { + "kind": "Var", "loc": null, "children": { - "func": { - "kind": "Expr::Constr", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "constr": { - "kind": "Constructor", - "loc": null, - "children": { - "name": { - "kind": "ConstrName", - "loc": null, - "children": { - "name": "S" - } - }, - "extra_info": { - "kind": "ConstructorExtraInfo::NoExtraInfo", - "loc": null, - "children": {} - } - } - } + "value": "to_result" } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Function", "loc": null, - "children": [ - { - "kind": "Argument", + "children": { + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "value": { - "kind": "Expr::Constant", + "parameters": { + "kind": "Func::Lambda::ParameterList", "loc": null, - "children": { - "constant": { - "kind": "Constant::Int", - "loc": null, - "children": { - "value": "4" - } - } - } + "children": [] }, - "kind": { - "kind": "ArgumentKind::Labelled", + "body": { + "kind": "Expr::Constraint", "loc": null, "children": { - "value": { - "kind": "Label", + "expr": { + "kind": "Expr::Apply", "loc": null, "children": { - "name": "x" + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "S" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::NoExtraInfo", + "loc": null, + "children": {} + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "4" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Labelled", + "loc": null, + "children": { + "value": { + "kind": "Label", + "loc": null, + "children": { + "name": "x" + } + } + } + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "42" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Labelled", + "loc": null, + "children": { + "value": { + "kind": "Label", + "loc": null, + "children": { + "name": "y" + } + } + } + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } } - } - } - } - } - }, - { - "kind": "Argument", - "loc": null, - "children": { - "value": { - "kind": "Expr::Constant", - "loc": null, - "children": { - "constant": { - "kind": "Constant::Int", + }, + "ty": { + "kind": "Type::Name", "loc": null, "children": { - "value": "42" + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "S" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } } } } }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, "kind": { - "kind": "ArgumentKind::Labelled", + "kind": "FnKind::Arrow", "loc": null, - "children": { - "value": { - "kind": "Label", - "loc": null, - "children": { - "name": "y" - } - } - } - } - } - } - ] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} - } - } - }, - "ty": { - "kind": "Type::Name", - "loc": null, - "children": { - "constr_id": { - "kind": "ConstrId", - "loc": null, - "children": { - "id": { - "kind": "LongIdent::Ident", - "loc": null, - "children": { - "value": "S" + "children": {} + }, + "has_error": null, + "is_async": null } } } }, - "tys": { - "kind": "Type::Name::TypeList", + "kind": { + "kind": "ArgumentKind::Positional", "loc": null, - "children": [] + "children": {} } } } - } + ] }, - "kind": { - "kind": "TryOperatorKind::Question", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -1317,5 +1515,524 @@ } } } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "to_result" + } + }, + "has_error": null, + "is_async": null, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "f" + } + }, + "ty": { + "kind": "Type::Arrow", + "loc": null, + "children": { + "args": { + "kind": "Type::Arrow::ArgList", + "loc": null, + "children": [] + }, + "res": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "T" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "err": { + "kind": "ErrorType::ErrorType", + "loc": null, + "children": { + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "E" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + "is_async": null + } + } + } + } + ] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [ + { + "kind": "TypeVarBinder", + "loc": null, + "children": { + "name": "T", + "constraints": { + "kind": "TypeVarBinder::TypeVarConstraintList", + "loc": null, + "children": [] + } + } + }, + { + "kind": "TypeVarBinder", + "loc": null, + "children": { + "name": "E", + "constraints": { + "kind": "TypeVarBinder::TypeVarConstraintList", + "loc": null, + "children": [ + { + "kind": "TypeVarConstraint", + "loc": null, + "children": { + "trait": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Error" + } + } + } + } + ] + } + } + } + ] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [ + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "T" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "E" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + ] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::Try", + "loc": null, + "children": { + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "f" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "catch": { + "kind": "Expr::Try::CaseList", + "loc": null, + "children": [ + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "err" + } + } + } + }, + "guard": null, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Err" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::TypeName", + "loc": null, + "children": { + "value": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + }, + "is_object": false + } + } + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "err" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + ] + }, + "catch_all": false, + "try_else": { + "kind": "Expr::Try::CaseList", + "loc": null, + "children": [ + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "value" + } + } + } + }, + "guard": null, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Ok" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::TypeName", + "loc": null, + "children": { + "value": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + }, + "is_object": false + } + } + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "value" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + ] + }, + "has_try": true + } + } + } + } + } } ] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/pipeline_test_struct_constructor.mbt b/test/sync_test/__snapshot__/pipeline_test_struct_constructor.mbt index 59d4ffe8..35fc9596 100644 --- a/test/sync_test/__snapshot__/pipeline_test_struct_constructor.mbt +++ b/test/sync_test/__snapshot__/pipeline_test_struct_constructor.mbt @@ -16,7 +16,16 @@ fn S::S(x~ : Int, y? : Int = x, loc~ : SourceLoc) -> S raise { ///| fn init { - debug(try? S(x=1)) - debug(try? S::S(x=2, y=3)) - debug(try? (S(x=4, y=42) : S)) + debug(to_result(() => S(x=1))) + debug(to_result(() => S::S(x=2, y=3))) + debug(to_result(() => (S(x=4, y=42) : S))) +} + +fn[T, E : Error] to_result(f : () -> T raise E) -> Result[T, E] { + try f() + catch { + err => Result::Err(err) + } noraise { + value => Result::Ok(value) + } } diff --git a/test/sync_test/__snapshot__/pipeline_test_struct_constructor.mbt.tokens.json b/test/sync_test/__snapshot__/pipeline_test_struct_constructor.mbt.tokens.json index d1fba724..5af25c55 100644 --- a/test/sync_test/__snapshot__/pipeline_test_struct_constructor.mbt.tokens.json +++ b/test/sync_test/__snapshot__/pipeline_test_struct_constructor.mbt.tokens.json @@ -517,56 +517,79 @@ "loc": "19:8-19:9" }, { - "token": "TRY_QUESTION", - "loc": "19:9-19:13" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "19:9-19:18" + }, + { + "token": "LPAREN", + "loc": "19:18-19:19" + }, + { + "token": "LPAREN", + "loc": "19:19-19:20" + }, + { + "token": "RPAREN", + "loc": "19:20-19:21" + }, + { + "token": "FAT_ARROW", + "loc": "19:22-19:24" }, { "token": [ "UIDENT", "S" ], - "loc": "19:14-19:15" + "loc": "19:25-19:26" }, { "token": "LPAREN", - "loc": "19:15-19:16" + "loc": "19:26-19:27" }, { "token": [ "LIDENT", "x" ], - "loc": "19:16-19:17" + "loc": "19:27-19:28" }, { "token": "EQUAL", - "loc": "19:17-19:18" + "loc": "19:28-19:29" }, { "token": [ "INT", "1" ], - "loc": "19:18-19:19" + "loc": "19:29-19:30" }, { "token": "RPAREN", - "loc": "19:19-19:20" + "loc": "19:30-19:31" }, { "token": "RPAREN", - "loc": "19:20-19:21" + "loc": "19:31-19:32" + }, + { + "token": "RPAREN", + "loc": "19:32-19:33" }, { "token": [ "SEMI", false ], - "loc": "19:21-19:21" + "loc": "19:33-19:33" }, { "token": "NEWLINE", - "loc": "19:21-19:22" + "loc": "19:33-19:34" }, { "token": [ @@ -580,89 +603,112 @@ "loc": "20:8-20:9" }, { - "token": "TRY_QUESTION", - "loc": "20:9-20:13" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "20:9-20:18" + }, + { + "token": "LPAREN", + "loc": "20:18-20:19" + }, + { + "token": "LPAREN", + "loc": "20:19-20:20" + }, + { + "token": "RPAREN", + "loc": "20:20-20:21" + }, + { + "token": "FAT_ARROW", + "loc": "20:22-20:24" }, { "token": [ "UIDENT", "S" ], - "loc": "20:14-20:15" + "loc": "20:25-20:26" }, { "token": "COLONCOLON", - "loc": "20:15-20:17" + "loc": "20:26-20:28" }, { "token": [ "UIDENT", "S" ], - "loc": "20:17-20:18" + "loc": "20:28-20:29" }, { "token": "LPAREN", - "loc": "20:18-20:19" + "loc": "20:29-20:30" }, { "token": [ "LIDENT", "x" ], - "loc": "20:19-20:20" + "loc": "20:30-20:31" }, { "token": "EQUAL", - "loc": "20:20-20:21" + "loc": "20:31-20:32" }, { "token": [ "INT", "2" ], - "loc": "20:21-20:22" + "loc": "20:32-20:33" }, { "token": "COMMA", - "loc": "20:22-20:23" + "loc": "20:33-20:34" }, { "token": [ "LIDENT", "y" ], - "loc": "20:24-20:25" + "loc": "20:35-20:36" }, { "token": "EQUAL", - "loc": "20:25-20:26" + "loc": "20:36-20:37" }, { "token": [ "INT", "3" ], - "loc": "20:26-20:27" + "loc": "20:37-20:38" }, { "token": "RPAREN", - "loc": "20:27-20:28" + "loc": "20:38-20:39" }, { "token": "RPAREN", - "loc": "20:28-20:29" + "loc": "20:39-20:40" + }, + { + "token": "RPAREN", + "loc": "20:40-20:41" }, { "token": [ "SEMI", false ], - "loc": "20:29-20:29" + "loc": "20:41-20:41" }, { "token": "NEWLINE", - "loc": "20:29-20:30" + "loc": "20:41-20:42" }, { "token": [ @@ -676,90 +722,113 @@ "loc": "21:8-21:9" }, { - "token": "TRY_QUESTION", - "loc": "21:9-21:13" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "21:9-21:18" }, { "token": "LPAREN", - "loc": "21:14-21:15" + "loc": "21:18-21:19" + }, + { + "token": "LPAREN", + "loc": "21:19-21:20" + }, + { + "token": "RPAREN", + "loc": "21:20-21:21" + }, + { + "token": "FAT_ARROW", + "loc": "21:22-21:24" + }, + { + "token": "LPAREN", + "loc": "21:25-21:26" }, { "token": [ "UIDENT", "S" ], - "loc": "21:15-21:16" + "loc": "21:26-21:27" }, { "token": "LPAREN", - "loc": "21:16-21:17" + "loc": "21:27-21:28" }, { "token": [ "LIDENT", "x" ], - "loc": "21:17-21:18" + "loc": "21:28-21:29" }, { "token": "EQUAL", - "loc": "21:18-21:19" + "loc": "21:29-21:30" }, { "token": [ "INT", "4" ], - "loc": "21:19-21:20" + "loc": "21:30-21:31" }, { "token": "COMMA", - "loc": "21:20-21:21" + "loc": "21:31-21:32" }, { "token": [ "LIDENT", "y" ], - "loc": "21:22-21:23" + "loc": "21:33-21:34" }, { "token": "EQUAL", - "loc": "21:23-21:24" + "loc": "21:34-21:35" }, { "token": [ "INT", "42" ], - "loc": "21:24-21:26" + "loc": "21:35-21:37" }, { "token": "RPAREN", - "loc": "21:26-21:27" + "loc": "21:37-21:38" }, { "token": "COLON", - "loc": "21:28-21:29" + "loc": "21:39-21:40" }, { "token": [ "UIDENT", "S" ], - "loc": "21:30-21:31" + "loc": "21:41-21:42" }, { "token": "RPAREN", - "loc": "21:31-21:32" + "loc": "21:42-21:43" + }, + { + "token": "RPAREN", + "loc": "21:43-21:44" }, { "token": "RPAREN", - "loc": "21:32-21:33" + "loc": "21:44-21:45" }, { "token": "NEWLINE", - "loc": "21:33-21:34" + "loc": "21:45-21:46" }, { "token": "RBRACE", @@ -776,8 +845,324 @@ "token": "NEWLINE", "loc": "22:2-22:3" }, + { + "token": "NEWLINE", + "loc": "23:1-23:2" + }, + { + "token": "FN", + "loc": "24:1-24:3" + }, + { + "token": "LBRACKET", + "loc": "24:3-24:4" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "24:4-24:5" + }, + { + "token": "COMMA", + "loc": "24:5-24:6" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "24:7-24:8" + }, + { + "token": "COLON", + "loc": "24:9-24:10" + }, + { + "token": [ + "UIDENT", + "Error" + ], + "loc": "24:11-24:16" + }, + { + "token": "RBRACKET", + "loc": "24:16-24:17" + }, + { + "token": [ + "LIDENT", + "to_result" + ], + "loc": "24:18-24:27" + }, + { + "token": "LPAREN", + "loc": "24:27-24:28" + }, + { + "token": [ + "LIDENT", + "f" + ], + "loc": "24:28-24:29" + }, + { + "token": "COLON", + "loc": "24:30-24:31" + }, + { + "token": "LPAREN", + "loc": "24:32-24:33" + }, + { + "token": "RPAREN", + "loc": "24:33-24:34" + }, + { + "token": "THIN_ARROW", + "loc": "24:35-24:37" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "24:38-24:39" + }, + { + "token": "RAISE", + "loc": "24:40-24:45" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "24:46-24:47" + }, + { + "token": "RPAREN", + "loc": "24:47-24:48" + }, + { + "token": "THIN_ARROW", + "loc": "24:49-24:51" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "24:52-24:58" + }, + { + "token": "LBRACKET", + "loc": "24:58-24:59" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "24:59-24:60" + }, + { + "token": "COMMA", + "loc": "24:60-24:61" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "24:62-24:63" + }, + { + "token": "RBRACKET", + "loc": "24:63-24:64" + }, + { + "token": "LBRACE", + "loc": "24:65-24:66" + }, + { + "token": "NEWLINE", + "loc": "24:66-24:67" + }, + { + "token": "TRY", + "loc": "25:3-25:6" + }, + { + "token": [ + "LIDENT", + "f" + ], + "loc": "25:7-25:8" + }, + { + "token": "LPAREN", + "loc": "25:8-25:9" + }, + { + "token": "RPAREN", + "loc": "25:9-25:10" + }, + { + "token": "NEWLINE", + "loc": "25:10-25:11" + }, + { + "token": "CATCH", + "loc": "26:3-26:8" + }, + { + "token": "LBRACE", + "loc": "26:9-26:10" + }, + { + "token": "NEWLINE", + "loc": "26:10-26:11" + }, + { + "token": [ + "LIDENT", + "err" + ], + "loc": "27:5-27:8" + }, + { + "token": "FAT_ARROW", + "loc": "27:9-27:11" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "27:12-27:18" + }, + { + "token": "COLONCOLON", + "loc": "27:18-27:20" + }, + { + "token": [ + "UIDENT", + "Err" + ], + "loc": "27:20-27:23" + }, + { + "token": "LPAREN", + "loc": "27:23-27:24" + }, + { + "token": [ + "LIDENT", + "err" + ], + "loc": "27:24-27:27" + }, + { + "token": "RPAREN", + "loc": "27:27-27:28" + }, + { + "token": "NEWLINE", + "loc": "27:28-27:29" + }, + { + "token": "RBRACE", + "loc": "28:3-28:4" + }, + { + "token": "NORAISE", + "loc": "28:5-28:12" + }, + { + "token": "LBRACE", + "loc": "28:13-28:14" + }, + { + "token": "NEWLINE", + "loc": "28:14-28:15" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "29:5-29:10" + }, + { + "token": "FAT_ARROW", + "loc": "29:11-29:13" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "29:14-29:20" + }, + { + "token": "COLONCOLON", + "loc": "29:20-29:22" + }, + { + "token": [ + "UIDENT", + "Ok" + ], + "loc": "29:22-29:24" + }, + { + "token": "LPAREN", + "loc": "29:24-29:25" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "29:25-29:30" + }, + { + "token": "RPAREN", + "loc": "29:30-29:31" + }, + { + "token": "NEWLINE", + "loc": "29:31-29:32" + }, + { + "token": "RBRACE", + "loc": "30:3-30:4" + }, + { + "token": "NEWLINE", + "loc": "30:4-30:5" + }, + { + "token": "RBRACE", + "loc": "31:1-31:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "31:2-31:2" + }, + { + "token": "NEWLINE", + "loc": "31:2-31:3" + }, { "token": "EOF", - "loc": "23:1-23:1" + "loc": "32:1-32:1" } ] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/pipeline_test_struct_layout.json b/test/sync_test/__snapshot__/pipeline_test_struct_layout.json index c54a1525..c84e3b39 100644 --- a/test/sync_test/__snapshot__/pipeline_test_struct_layout.json +++ b/test/sync_test/__snapshot__/pipeline_test_struct_layout.json @@ -1021,6 +1021,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, diff --git a/test/sync_test/__snapshot__/pipeline_test_stub_method.json b/test/sync_test/__snapshot__/pipeline_test_stub_method.json index dfd83c1d..a60fd216 100644 --- a/test/sync_test/__snapshot__/pipeline_test_stub_method.json +++ b/test/sync_test/__snapshot__/pipeline_test_stub_method.json @@ -288,6 +288,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, @@ -793,6 +798,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, diff --git a/test/sync_test/__snapshot__/pipeline_test_sub_trait_method_clash.json b/test/sync_test/__snapshot__/pipeline_test_sub_trait_method_clash.json index 3e977825..bd436cb1 100644 --- a/test/sync_test/__snapshot__/pipeline_test_sub_trait_method_clash.json +++ b/test/sync_test/__snapshot__/pipeline_test_sub_trait_method_clash.json @@ -334,6 +334,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, @@ -458,6 +463,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, diff --git a/test/sync_test/__snapshot__/pipeline_test_suberror_derive.json b/test/sync_test/__snapshot__/pipeline_test_suberror_derive.json index 2b9171aa..b6185c89 100644 --- a/test/sync_test/__snapshot__/pipeline_test_suberror_derive.json +++ b/test/sync_test/__snapshot__/pipeline_test_suberror_derive.json @@ -2894,6 +2894,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, @@ -3369,6 +3374,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, diff --git a/test/sync_test/__snapshot__/pipeline_test_super_trait.json b/test/sync_test/__snapshot__/pipeline_test_super_trait.json index 3091e7a3..d64189df 100644 --- a/test/sync_test/__snapshot__/pipeline_test_super_trait.json +++ b/test/sync_test/__snapshot__/pipeline_test_super_trait.json @@ -1099,6 +1099,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, @@ -1310,6 +1315,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, @@ -1968,6 +1978,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, @@ -2133,6 +2148,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, @@ -3025,6 +3045,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, @@ -3190,6 +3215,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, diff --git a/test/sync_test/__snapshot__/pipeline_test_super_trait2.json b/test/sync_test/__snapshot__/pipeline_test_super_trait2.json index 55bf4051..fbf59b59 100644 --- a/test/sync_test/__snapshot__/pipeline_test_super_trait2.json +++ b/test/sync_test/__snapshot__/pipeline_test_super_trait2.json @@ -272,6 +272,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, @@ -697,6 +702,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, diff --git a/test/sync_test/__snapshot__/pipeline_test_super_trait3.json b/test/sync_test/__snapshot__/pipeline_test_super_trait3.json index 8cbf5535..0b4973cf 100644 --- a/test/sync_test/__snapshot__/pipeline_test_super_trait3.json +++ b/test/sync_test/__snapshot__/pipeline_test_super_trait3.json @@ -1689,6 +1689,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, @@ -2073,6 +2078,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, diff --git a/test/sync_test/__snapshot__/pipeline_test_switch_wrap_ok.json b/test/sync_test/__snapshot__/pipeline_test_switch_wrap_ok.json index 207abaa0..75aa5030 100644 --- a/test/sync_test/__snapshot__/pipeline_test_switch_wrap_ok.json +++ b/test/sync_test/__snapshot__/pipeline_test_switch_wrap_ok.json @@ -365,123 +365,189 @@ "loc": null, "children": { "value": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", - "loc": null, - "children": { - "value": "f" - } - } + "value": "to_result" } } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", "loc": null, - "children": [ - { - "kind": "Argument", + "children": { + "value": { + "kind": "Expr::Function", "loc": null, "children": { - "value": { - "kind": "Expr::Apply", + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "func": { - "kind": "Expr::Constr", + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Apply", "loc": null, "children": { - "constr": { - "kind": "Constructor", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "name": { - "kind": "ConstrName", + "id": { + "kind": "Var", "loc": null, "children": { - "name": "Some" + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "f" + } + } } - }, - "extra_info": { - "kind": "ConstructorExtraInfo::NoExtraInfo", - "loc": null, - "children": {} } } - } - } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", - "loc": null, - "children": [ - { - "kind": "Argument", + }, + "args": { + "kind": "Expr::Apply::ArgumentList", "loc": null, - "children": { - "value": { - "kind": "Expr::Constant", + "children": [ + { + "kind": "Argument", "loc": null, "children": { - "constant": { - "kind": "Constant::Int", + "value": { + "kind": "Expr::Apply", "loc": null, "children": { - "value": "42" + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Some" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::NoExtraInfo", + "loc": null, + "children": {} + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "42" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} } - } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} } - ] + } }, - "attr": { - "kind": "ApplyAttr::NoAttr", + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", "loc": null, "children": {} - } + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } - ] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} + } } - } + ] }, - "kind": { - "kind": "TryOperatorKind::Question", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -506,5 +572,524 @@ } } } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "to_result" + } + }, + "has_error": null, + "is_async": null, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "f" + } + }, + "ty": { + "kind": "Type::Arrow", + "loc": null, + "children": { + "args": { + "kind": "Type::Arrow::ArgList", + "loc": null, + "children": [] + }, + "res": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "T" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "err": { + "kind": "ErrorType::ErrorType", + "loc": null, + "children": { + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "E" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + "is_async": null + } + } + } + } + ] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [ + { + "kind": "TypeVarBinder", + "loc": null, + "children": { + "name": "T", + "constraints": { + "kind": "TypeVarBinder::TypeVarConstraintList", + "loc": null, + "children": [] + } + } + }, + { + "kind": "TypeVarBinder", + "loc": null, + "children": { + "name": "E", + "constraints": { + "kind": "TypeVarBinder::TypeVarConstraintList", + "loc": null, + "children": [ + { + "kind": "TypeVarConstraint", + "loc": null, + "children": { + "trait": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Error" + } + } + } + } + ] + } + } + } + ] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [ + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "T" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "E" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + ] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::Try", + "loc": null, + "children": { + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "f" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "catch": { + "kind": "Expr::Try::CaseList", + "loc": null, + "children": [ + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "err" + } + } + } + }, + "guard": null, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Err" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::TypeName", + "loc": null, + "children": { + "value": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + }, + "is_object": false + } + } + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "err" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + ] + }, + "catch_all": false, + "try_else": { + "kind": "Expr::Try::CaseList", + "loc": null, + "children": [ + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "value" + } + } + } + }, + "guard": null, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Ok" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::TypeName", + "loc": null, + "children": { + "value": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + }, + "is_object": false + } + } + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "value" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + ] + }, + "has_try": true + } + } + } + } + } } ] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/pipeline_test_switch_wrap_ok.mbt b/test/sync_test/__snapshot__/pipeline_test_switch_wrap_ok.mbt index 95ddccef..3c72f657 100644 --- a/test/sync_test/__snapshot__/pipeline_test_switch_wrap_ok.mbt +++ b/test/sync_test/__snapshot__/pipeline_test_switch_wrap_ok.mbt @@ -6,5 +6,14 @@ pub fn f(x : Int?) -> Int raise { ///| fn main { - debug(try? f(Some(42))) + debug(to_result(() => f(Some(42)))) +} + +fn[T, E : Error] to_result(f : () -> T raise E) -> Result[T, E] { + try f() + catch { + err => Result::Err(err) + } noraise { + value => Result::Ok(value) + } } diff --git a/test/sync_test/__snapshot__/pipeline_test_switch_wrap_ok.mbt.tokens.json b/test/sync_test/__snapshot__/pipeline_test_switch_wrap_ok.mbt.tokens.json index c34a3b56..ce971a85 100644 --- a/test/sync_test/__snapshot__/pipeline_test_switch_wrap_ok.mbt.tokens.json +++ b/test/sync_test/__snapshot__/pipeline_test_switch_wrap_ok.mbt.tokens.json @@ -249,53 +249,76 @@ "loc": "9:8-9:9" }, { - "token": "TRY_QUESTION", - "loc": "9:9-9:13" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "9:9-9:18" + }, + { + "token": "LPAREN", + "loc": "9:18-9:19" + }, + { + "token": "LPAREN", + "loc": "9:19-9:20" + }, + { + "token": "RPAREN", + "loc": "9:20-9:21" + }, + { + "token": "FAT_ARROW", + "loc": "9:22-9:24" }, { "token": [ "LIDENT", "f" ], - "loc": "9:14-9:15" + "loc": "9:25-9:26" }, { "token": "LPAREN", - "loc": "9:15-9:16" + "loc": "9:26-9:27" }, { "token": [ "UIDENT", "Some" ], - "loc": "9:16-9:20" + "loc": "9:27-9:31" }, { "token": "LPAREN", - "loc": "9:20-9:21" + "loc": "9:31-9:32" }, { "token": [ "INT", "42" ], - "loc": "9:21-9:23" + "loc": "9:32-9:34" }, { "token": "RPAREN", - "loc": "9:23-9:24" + "loc": "9:34-9:35" }, { "token": "RPAREN", - "loc": "9:24-9:25" + "loc": "9:35-9:36" }, { "token": "RPAREN", - "loc": "9:25-9:26" + "loc": "9:36-9:37" + }, + { + "token": "RPAREN", + "loc": "9:37-9:38" }, { "token": "NEWLINE", - "loc": "9:26-9:27" + "loc": "9:38-9:39" }, { "token": "RBRACE", @@ -312,8 +335,324 @@ "token": "NEWLINE", "loc": "10:2-10:3" }, + { + "token": "NEWLINE", + "loc": "11:1-11:2" + }, + { + "token": "FN", + "loc": "12:1-12:3" + }, + { + "token": "LBRACKET", + "loc": "12:3-12:4" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "12:4-12:5" + }, + { + "token": "COMMA", + "loc": "12:5-12:6" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "12:7-12:8" + }, + { + "token": "COLON", + "loc": "12:9-12:10" + }, + { + "token": [ + "UIDENT", + "Error" + ], + "loc": "12:11-12:16" + }, + { + "token": "RBRACKET", + "loc": "12:16-12:17" + }, + { + "token": [ + "LIDENT", + "to_result" + ], + "loc": "12:18-12:27" + }, + { + "token": "LPAREN", + "loc": "12:27-12:28" + }, + { + "token": [ + "LIDENT", + "f" + ], + "loc": "12:28-12:29" + }, + { + "token": "COLON", + "loc": "12:30-12:31" + }, + { + "token": "LPAREN", + "loc": "12:32-12:33" + }, + { + "token": "RPAREN", + "loc": "12:33-12:34" + }, + { + "token": "THIN_ARROW", + "loc": "12:35-12:37" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "12:38-12:39" + }, + { + "token": "RAISE", + "loc": "12:40-12:45" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "12:46-12:47" + }, + { + "token": "RPAREN", + "loc": "12:47-12:48" + }, + { + "token": "THIN_ARROW", + "loc": "12:49-12:51" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "12:52-12:58" + }, + { + "token": "LBRACKET", + "loc": "12:58-12:59" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "12:59-12:60" + }, + { + "token": "COMMA", + "loc": "12:60-12:61" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "12:62-12:63" + }, + { + "token": "RBRACKET", + "loc": "12:63-12:64" + }, + { + "token": "LBRACE", + "loc": "12:65-12:66" + }, + { + "token": "NEWLINE", + "loc": "12:66-12:67" + }, + { + "token": "TRY", + "loc": "13:3-13:6" + }, + { + "token": [ + "LIDENT", + "f" + ], + "loc": "13:7-13:8" + }, + { + "token": "LPAREN", + "loc": "13:8-13:9" + }, + { + "token": "RPAREN", + "loc": "13:9-13:10" + }, + { + "token": "NEWLINE", + "loc": "13:10-13:11" + }, + { + "token": "CATCH", + "loc": "14:3-14:8" + }, + { + "token": "LBRACE", + "loc": "14:9-14:10" + }, + { + "token": "NEWLINE", + "loc": "14:10-14:11" + }, + { + "token": [ + "LIDENT", + "err" + ], + "loc": "15:5-15:8" + }, + { + "token": "FAT_ARROW", + "loc": "15:9-15:11" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "15:12-15:18" + }, + { + "token": "COLONCOLON", + "loc": "15:18-15:20" + }, + { + "token": [ + "UIDENT", + "Err" + ], + "loc": "15:20-15:23" + }, + { + "token": "LPAREN", + "loc": "15:23-15:24" + }, + { + "token": [ + "LIDENT", + "err" + ], + "loc": "15:24-15:27" + }, + { + "token": "RPAREN", + "loc": "15:27-15:28" + }, + { + "token": "NEWLINE", + "loc": "15:28-15:29" + }, + { + "token": "RBRACE", + "loc": "16:3-16:4" + }, + { + "token": "NORAISE", + "loc": "16:5-16:12" + }, + { + "token": "LBRACE", + "loc": "16:13-16:14" + }, + { + "token": "NEWLINE", + "loc": "16:14-16:15" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "17:5-17:10" + }, + { + "token": "FAT_ARROW", + "loc": "17:11-17:13" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "17:14-17:20" + }, + { + "token": "COLONCOLON", + "loc": "17:20-17:22" + }, + { + "token": [ + "UIDENT", + "Ok" + ], + "loc": "17:22-17:24" + }, + { + "token": "LPAREN", + "loc": "17:24-17:25" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "17:25-17:30" + }, + { + "token": "RPAREN", + "loc": "17:30-17:31" + }, + { + "token": "NEWLINE", + "loc": "17:31-17:32" + }, + { + "token": "RBRACE", + "loc": "18:3-18:4" + }, + { + "token": "NEWLINE", + "loc": "18:4-18:5" + }, + { + "token": "RBRACE", + "loc": "19:1-19:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "19:2-19:2" + }, + { + "token": "NEWLINE", + "loc": "19:2-19:3" + }, { "token": "EOF", - "loc": "11:1-11:1" + "loc": "20:1-20:1" } ] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/pipeline_test_tail_catch.json b/test/sync_test/__snapshot__/pipeline_test_tail_catch.json index d57bef72..58789608 100644 --- a/test/sync_test/__snapshot__/pipeline_test_tail_catch.json +++ b/test/sync_test/__snapshot__/pipeline_test_tail_catch.json @@ -686,95 +686,161 @@ "loc": null, "children": { "value": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", - "loc": null, - "children": { - "value": "f" - } - } + "value": "to_result" } } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", "loc": null, - "children": [ - { - "kind": "Argument", + "children": { + "value": { + "kind": "Expr::Function", "loc": null, "children": { - "value": { - "kind": "Expr::Constant", + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "constant": { - "kind": "Constant::Bool", + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Apply", "loc": null, "children": { - "value": true + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "f" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Bool", + "loc": null, + "children": { + "value": true + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Bool", + "loc": null, + "children": { + "value": true + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } } - } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} } } }, - { - "kind": "Argument", + "kind": { + "kind": "ArgumentKind::Positional", "loc": null, - "children": { - "value": { - "kind": "Expr::Constant", - "loc": null, - "children": { - "constant": { - "kind": "Constant::Bool", - "loc": null, - "children": { - "value": true - } - } - } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} - } - } + "children": {} } - ] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} + } } - } + ] }, - "kind": { - "kind": "TryOperatorKind::Question", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -828,95 +894,161 @@ "loc": null, "children": { "value": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", - "loc": null, - "children": { - "value": "f" - } - } + "value": "to_result" } } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", "loc": null, - "children": [ - { - "kind": "Argument", + "children": { + "value": { + "kind": "Expr::Function", "loc": null, "children": { - "value": { - "kind": "Expr::Constant", + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "constant": { - "kind": "Constant::Bool", + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Apply", "loc": null, "children": { - "value": false + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "f" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Bool", + "loc": null, + "children": { + "value": false + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Bool", + "loc": null, + "children": { + "value": false + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } } - } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} } } }, - { - "kind": "Argument", + "kind": { + "kind": "ArgumentKind::Positional", "loc": null, - "children": { - "value": { - "kind": "Expr::Constant", - "loc": null, - "children": { - "constant": { - "kind": "Constant::Bool", - "loc": null, - "children": { - "value": false - } - } - } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} - } - } + "children": {} } - ] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} + } } - } + ] }, - "kind": { - "kind": "TryOperatorKind::Question", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -970,95 +1102,161 @@ "loc": null, "children": { "value": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", - "loc": null, - "children": { - "value": "f" - } - } + "value": "to_result" } } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", "loc": null, - "children": [ - { - "kind": "Argument", + "children": { + "value": { + "kind": "Expr::Function", "loc": null, "children": { - "value": { - "kind": "Expr::Constant", + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "constant": { - "kind": "Constant::Bool", + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Apply", "loc": null, "children": { - "value": true + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "f" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Bool", + "loc": null, + "children": { + "value": true + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Bool", + "loc": null, + "children": { + "value": false + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } } - } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} } } }, - { - "kind": "Argument", + "kind": { + "kind": "ArgumentKind::Positional", "loc": null, - "children": { - "value": { - "kind": "Expr::Constant", - "loc": null, - "children": { - "constant": { - "kind": "Constant::Bool", - "loc": null, - "children": { - "value": false - } - } - } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} - } - } + "children": {} } - ] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} + } } - } + ] }, - "kind": { - "kind": "TryOperatorKind::Question", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -1114,95 +1312,161 @@ "loc": null, "children": { "value": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", - "loc": null, - "children": { - "value": "f" - } - } + "value": "to_result" } } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", "loc": null, - "children": [ - { - "kind": "Argument", + "children": { + "value": { + "kind": "Expr::Function", "loc": null, "children": { - "value": { - "kind": "Expr::Constant", + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "constant": { - "kind": "Constant::Bool", + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Apply", "loc": null, "children": { - "value": false + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "f" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Bool", + "loc": null, + "children": { + "value": false + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Bool", + "loc": null, + "children": { + "value": true + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } } - } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} } } }, - { - "kind": "Argument", + "kind": { + "kind": "ArgumentKind::Positional", "loc": null, - "children": { - "value": { - "kind": "Expr::Constant", - "loc": null, - "children": { - "constant": { - "kind": "Constant::Bool", - "loc": null, - "children": { - "value": true - } - } - } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} - } - } + "children": {} } - ] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} + } } - } + ] }, - "kind": { - "kind": "TryOperatorKind::Question", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -1229,5 +1493,524 @@ } } } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "to_result" + } + }, + "has_error": null, + "is_async": null, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "f" + } + }, + "ty": { + "kind": "Type::Arrow", + "loc": null, + "children": { + "args": { + "kind": "Type::Arrow::ArgList", + "loc": null, + "children": [] + }, + "res": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "T" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "err": { + "kind": "ErrorType::ErrorType", + "loc": null, + "children": { + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "E" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + "is_async": null + } + } + } + } + ] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [ + { + "kind": "TypeVarBinder", + "loc": null, + "children": { + "name": "T", + "constraints": { + "kind": "TypeVarBinder::TypeVarConstraintList", + "loc": null, + "children": [] + } + } + }, + { + "kind": "TypeVarBinder", + "loc": null, + "children": { + "name": "E", + "constraints": { + "kind": "TypeVarBinder::TypeVarConstraintList", + "loc": null, + "children": [ + { + "kind": "TypeVarConstraint", + "loc": null, + "children": { + "trait": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Error" + } + } + } + } + ] + } + } + } + ] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [ + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "T" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "E" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + ] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::Try", + "loc": null, + "children": { + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "f" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "catch": { + "kind": "Expr::Try::CaseList", + "loc": null, + "children": [ + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "err" + } + } + } + }, + "guard": null, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Err" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::TypeName", + "loc": null, + "children": { + "value": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + }, + "is_object": false + } + } + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "err" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + ] + }, + "catch_all": false, + "try_else": { + "kind": "Expr::Try::CaseList", + "loc": null, + "children": [ + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "value" + } + } + } + }, + "guard": null, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Ok" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::TypeName", + "loc": null, + "children": { + "value": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + }, + "is_object": false + } + } + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "value" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + ] + }, + "has_try": true + } + } + } + } + } } ] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/pipeline_test_tail_catch.mbt b/test/sync_test/__snapshot__/pipeline_test_tail_catch.mbt index d5dadd9e..9a8535cc 100644 --- a/test/sync_test/__snapshot__/pipeline_test_tail_catch.mbt +++ b/test/sync_test/__snapshot__/pipeline_test_tail_catch.mbt @@ -17,8 +17,17 @@ fn f(b1 : Bool, b2 : Bool) -> Int raise { ///| fn main { - debug(try? f(true, true)) - debug(try? f(false, false)) - debug(try? f(true, false)) - debug(try? f(false, true)) + debug(to_result(() => f(true, true))) + debug(to_result(() => f(false, false))) + debug(to_result(() => f(true, false))) + debug(to_result(() => f(false, true))) +} + +fn[T, E : Error] to_result(f : () -> T raise E) -> Result[T, E] { + try f() + catch { + err => Result::Err(err) + } noraise { + value => Result::Ok(value) + } } diff --git a/test/sync_test/__snapshot__/pipeline_test_tail_catch.mbt.tokens.json b/test/sync_test/__snapshot__/pipeline_test_tail_catch.mbt.tokens.json index 59014f7d..0eacae77 100644 --- a/test/sync_test/__snapshot__/pipeline_test_tail_catch.mbt.tokens.json +++ b/test/sync_test/__snapshot__/pipeline_test_tail_catch.mbt.tokens.json @@ -478,50 +478,73 @@ "loc": "20:8-20:9" }, { - "token": "TRY_QUESTION", - "loc": "20:9-20:13" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "20:9-20:18" + }, + { + "token": "LPAREN", + "loc": "20:18-20:19" + }, + { + "token": "LPAREN", + "loc": "20:19-20:20" + }, + { + "token": "RPAREN", + "loc": "20:20-20:21" + }, + { + "token": "FAT_ARROW", + "loc": "20:22-20:24" }, { "token": [ "LIDENT", "f" ], - "loc": "20:14-20:15" + "loc": "20:25-20:26" }, { "token": "LPAREN", - "loc": "20:15-20:16" + "loc": "20:26-20:27" }, { "token": "TRUE", - "loc": "20:16-20:20" + "loc": "20:27-20:31" }, { "token": "COMMA", - "loc": "20:20-20:21" + "loc": "20:31-20:32" }, { "token": "TRUE", - "loc": "20:22-20:26" + "loc": "20:33-20:37" }, { "token": "RPAREN", - "loc": "20:26-20:27" + "loc": "20:37-20:38" }, { "token": "RPAREN", - "loc": "20:27-20:28" + "loc": "20:38-20:39" + }, + { + "token": "RPAREN", + "loc": "20:39-20:40" }, { "token": [ "SEMI", false ], - "loc": "20:28-20:28" + "loc": "20:40-20:40" }, { "token": "NEWLINE", - "loc": "20:28-20:29" + "loc": "20:40-20:41" }, { "token": [ @@ -535,50 +558,73 @@ "loc": "21:8-21:9" }, { - "token": "TRY_QUESTION", - "loc": "21:9-21:13" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "21:9-21:18" + }, + { + "token": "LPAREN", + "loc": "21:18-21:19" + }, + { + "token": "LPAREN", + "loc": "21:19-21:20" + }, + { + "token": "RPAREN", + "loc": "21:20-21:21" + }, + { + "token": "FAT_ARROW", + "loc": "21:22-21:24" }, { "token": [ "LIDENT", "f" ], - "loc": "21:14-21:15" + "loc": "21:25-21:26" }, { "token": "LPAREN", - "loc": "21:15-21:16" + "loc": "21:26-21:27" }, { "token": "FALSE", - "loc": "21:16-21:21" + "loc": "21:27-21:32" }, { "token": "COMMA", - "loc": "21:21-21:22" + "loc": "21:32-21:33" }, { "token": "FALSE", - "loc": "21:23-21:28" + "loc": "21:34-21:39" }, { "token": "RPAREN", - "loc": "21:28-21:29" + "loc": "21:39-21:40" }, { "token": "RPAREN", - "loc": "21:29-21:30" + "loc": "21:40-21:41" + }, + { + "token": "RPAREN", + "loc": "21:41-21:42" }, { "token": [ "SEMI", false ], - "loc": "21:30-21:30" + "loc": "21:42-21:42" }, { "token": "NEWLINE", - "loc": "21:30-21:31" + "loc": "21:42-21:43" }, { "token": [ @@ -592,50 +638,73 @@ "loc": "22:8-22:9" }, { - "token": "TRY_QUESTION", - "loc": "22:9-22:13" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "22:9-22:18" + }, + { + "token": "LPAREN", + "loc": "22:18-22:19" + }, + { + "token": "LPAREN", + "loc": "22:19-22:20" + }, + { + "token": "RPAREN", + "loc": "22:20-22:21" + }, + { + "token": "FAT_ARROW", + "loc": "22:22-22:24" }, { "token": [ "LIDENT", "f" ], - "loc": "22:14-22:15" + "loc": "22:25-22:26" }, { "token": "LPAREN", - "loc": "22:15-22:16" + "loc": "22:26-22:27" }, { "token": "TRUE", - "loc": "22:16-22:20" + "loc": "22:27-22:31" }, { "token": "COMMA", - "loc": "22:20-22:21" + "loc": "22:31-22:32" }, { "token": "FALSE", - "loc": "22:22-22:27" + "loc": "22:33-22:38" + }, + { + "token": "RPAREN", + "loc": "22:38-22:39" }, { "token": "RPAREN", - "loc": "22:27-22:28" + "loc": "22:39-22:40" }, { "token": "RPAREN", - "loc": "22:28-22:29" + "loc": "22:40-22:41" }, { "token": [ "SEMI", false ], - "loc": "22:29-22:29" + "loc": "22:41-22:41" }, { "token": "NEWLINE", - "loc": "22:29-22:30" + "loc": "22:41-22:42" }, { "token": [ @@ -649,43 +718,66 @@ "loc": "23:8-23:9" }, { - "token": "TRY_QUESTION", - "loc": "23:9-23:13" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "23:9-23:18" + }, + { + "token": "LPAREN", + "loc": "23:18-23:19" + }, + { + "token": "LPAREN", + "loc": "23:19-23:20" + }, + { + "token": "RPAREN", + "loc": "23:20-23:21" + }, + { + "token": "FAT_ARROW", + "loc": "23:22-23:24" }, { "token": [ "LIDENT", "f" ], - "loc": "23:14-23:15" + "loc": "23:25-23:26" }, { "token": "LPAREN", - "loc": "23:15-23:16" + "loc": "23:26-23:27" }, { "token": "FALSE", - "loc": "23:16-23:21" + "loc": "23:27-23:32" }, { "token": "COMMA", - "loc": "23:21-23:22" + "loc": "23:32-23:33" }, { "token": "TRUE", - "loc": "23:23-23:27" + "loc": "23:34-23:38" }, { "token": "RPAREN", - "loc": "23:27-23:28" + "loc": "23:38-23:39" }, { "token": "RPAREN", - "loc": "23:28-23:29" + "loc": "23:39-23:40" + }, + { + "token": "RPAREN", + "loc": "23:40-23:41" }, { "token": "NEWLINE", - "loc": "23:29-23:30" + "loc": "23:41-23:42" }, { "token": "RBRACE", @@ -702,8 +794,324 @@ "token": "NEWLINE", "loc": "24:2-24:3" }, + { + "token": "NEWLINE", + "loc": "25:1-25:2" + }, + { + "token": "FN", + "loc": "26:1-26:3" + }, + { + "token": "LBRACKET", + "loc": "26:3-26:4" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "26:4-26:5" + }, + { + "token": "COMMA", + "loc": "26:5-26:6" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "26:7-26:8" + }, + { + "token": "COLON", + "loc": "26:9-26:10" + }, + { + "token": [ + "UIDENT", + "Error" + ], + "loc": "26:11-26:16" + }, + { + "token": "RBRACKET", + "loc": "26:16-26:17" + }, + { + "token": [ + "LIDENT", + "to_result" + ], + "loc": "26:18-26:27" + }, + { + "token": "LPAREN", + "loc": "26:27-26:28" + }, + { + "token": [ + "LIDENT", + "f" + ], + "loc": "26:28-26:29" + }, + { + "token": "COLON", + "loc": "26:30-26:31" + }, + { + "token": "LPAREN", + "loc": "26:32-26:33" + }, + { + "token": "RPAREN", + "loc": "26:33-26:34" + }, + { + "token": "THIN_ARROW", + "loc": "26:35-26:37" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "26:38-26:39" + }, + { + "token": "RAISE", + "loc": "26:40-26:45" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "26:46-26:47" + }, + { + "token": "RPAREN", + "loc": "26:47-26:48" + }, + { + "token": "THIN_ARROW", + "loc": "26:49-26:51" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "26:52-26:58" + }, + { + "token": "LBRACKET", + "loc": "26:58-26:59" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "26:59-26:60" + }, + { + "token": "COMMA", + "loc": "26:60-26:61" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "26:62-26:63" + }, + { + "token": "RBRACKET", + "loc": "26:63-26:64" + }, + { + "token": "LBRACE", + "loc": "26:65-26:66" + }, + { + "token": "NEWLINE", + "loc": "26:66-26:67" + }, + { + "token": "TRY", + "loc": "27:3-27:6" + }, + { + "token": [ + "LIDENT", + "f" + ], + "loc": "27:7-27:8" + }, + { + "token": "LPAREN", + "loc": "27:8-27:9" + }, + { + "token": "RPAREN", + "loc": "27:9-27:10" + }, + { + "token": "NEWLINE", + "loc": "27:10-27:11" + }, + { + "token": "CATCH", + "loc": "28:3-28:8" + }, + { + "token": "LBRACE", + "loc": "28:9-28:10" + }, + { + "token": "NEWLINE", + "loc": "28:10-28:11" + }, + { + "token": [ + "LIDENT", + "err" + ], + "loc": "29:5-29:8" + }, + { + "token": "FAT_ARROW", + "loc": "29:9-29:11" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "29:12-29:18" + }, + { + "token": "COLONCOLON", + "loc": "29:18-29:20" + }, + { + "token": [ + "UIDENT", + "Err" + ], + "loc": "29:20-29:23" + }, + { + "token": "LPAREN", + "loc": "29:23-29:24" + }, + { + "token": [ + "LIDENT", + "err" + ], + "loc": "29:24-29:27" + }, + { + "token": "RPAREN", + "loc": "29:27-29:28" + }, + { + "token": "NEWLINE", + "loc": "29:28-29:29" + }, + { + "token": "RBRACE", + "loc": "30:3-30:4" + }, + { + "token": "NORAISE", + "loc": "30:5-30:12" + }, + { + "token": "LBRACE", + "loc": "30:13-30:14" + }, + { + "token": "NEWLINE", + "loc": "30:14-30:15" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "31:5-31:10" + }, + { + "token": "FAT_ARROW", + "loc": "31:11-31:13" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "31:14-31:20" + }, + { + "token": "COLONCOLON", + "loc": "31:20-31:22" + }, + { + "token": [ + "UIDENT", + "Ok" + ], + "loc": "31:22-31:24" + }, + { + "token": "LPAREN", + "loc": "31:24-31:25" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "31:25-31:30" + }, + { + "token": "RPAREN", + "loc": "31:30-31:31" + }, + { + "token": "NEWLINE", + "loc": "31:31-31:32" + }, + { + "token": "RBRACE", + "loc": "32:3-32:4" + }, + { + "token": "NEWLINE", + "loc": "32:4-32:5" + }, + { + "token": "RBRACE", + "loc": "33:1-33:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "33:2-33:2" + }, + { + "token": "NEWLINE", + "loc": "33:2-33:3" + }, { "token": "EOF", - "loc": "25:1-25:1" + "loc": "34:1-34:1" } ] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/pipeline_test_templated_writing.json b/test/sync_test/__snapshot__/pipeline_test_templated_writing.json index f0b005e7..367bf977 100644 --- a/test/sync_test/__snapshot__/pipeline_test_templated_writing.json +++ b/test/sync_test/__snapshot__/pipeline_test_templated_writing.json @@ -96,7 +96,7 @@ "kind": "Binder", "loc": null, "children": { - "name": "write" + "name": "write_string_interpolation" } }, "has_error": null, @@ -783,7 +783,7 @@ "kind": "Binder", "loc": null, "children": { - "name": "write" + "name": "write_string_interpolation" } }, "has_error": null, @@ -1721,6 +1721,102 @@ } } }, + { + "kind": "Impl::TopTypeDef", + "loc": null, + "children": { + "value": { + "kind": "TypeDecl", + "loc": null, + "children": { + "tycon": "Holder", + "params": { + "kind": "TypeDecl::ParamList", + "loc": null, + "children": [] + }, + "components": { + "kind": "TypeDesc::Record", + "loc": null, + "children": { + "value": { + "kind": "TypeDesc::Record::FieldList", + "loc": null, + "children": [ + { + "kind": "FieldDecl", + "loc": null, + "children": { + "name": { + "kind": "FieldName", + "loc": null, + "children": { + "label": "builder" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "StringBuilder" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "mut": false, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FieldDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + } + ] + } + } + }, + "attrs": { + "kind": "TypeDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "", + "type_vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "is_declare": false, + "deriving": { + "kind": "TypeDecl::DerivingList", + "loc": null, + "children": [] + } + } + } + } + }, { "kind": "Impl::TopTypeDef", "loc": null, @@ -2087,7 +2183,7 @@ "kind": "Binder", "loc": null, "children": { - "name": "write" + "name": "write_string_interpolation" } }, "has_error": null, @@ -3058,6 +3154,147 @@ } } }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "get_builder" + } + }, + "has_error": null, + "is_async": null, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "builder" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "StringBuilder" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + } + ] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "StringBuilder" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "builder" + } + } + } + } + } + } + } + } + } + }, { "kind": "Impl::TopFuncDef", "loc": null, @@ -3347,7 +3584,7 @@ } } }, - "loc": null + "is_conditional": false } }, { @@ -3439,7 +3676,7 @@ } } }, - "loc": null + "is_conditional": false } }, { @@ -3567,7 +3804,7 @@ } } }, - "loc": null + "is_conditional": false } }, { @@ -3612,7 +3849,7 @@ } } }, - "loc": null + "is_conditional": false } }, { @@ -3854,7 +4091,7 @@ } } }, - "loc": null + "is_conditional": false } }, { @@ -3906,7 +4143,7 @@ } } }, - "loc": null + "is_conditional": false } }, { @@ -4011,166 +4248,67 @@ "children": {} } } + } + ] + }, + "last_expr": { + "kind": "Expr::Let", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "sql" + } + } + } }, - { + "expr": { "kind": "Expr::Apply", "loc": null, "children": { "func": { - "kind": "Expr::Ident", + "kind": "Expr::Constr", "loc": null, "children": { - "id": { - "kind": "Var", + "constr": { + "kind": "Constructor", "loc": null, "children": { "name": { - "kind": "LongIdent::Ident", + "kind": "ConstrName", "loc": null, "children": { - "value": "consume_sql" + "name": "Sql" } - } - } - } - } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", - "loc": null, - "children": [ - { - "kind": "Argument", - "loc": null, - "children": { - "value": { - "kind": "Expr::TemplateWriting", + }, + "extra_info": { + "kind": "ConstructorExtraInfo::TypeName", "loc": null, "children": { - "expr": { - "kind": "Expr::Constr", + "value": { + "kind": "TypeName", "loc": null, "children": { - "constr": { - "kind": "Constructor", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": { - "kind": "ConstrName", - "loc": null, - "children": { - "name": "Sql" - } - }, - "extra_info": { - "kind": "ConstructorExtraInfo::NoExtraInfo", - "loc": null, - "children": {} - } + "value": "Sql" } - } - } - }, - "template": { - "kind": "Expr::Interp", - "loc": null, - "children": { - "elems": { - "kind": "Expr::Interp::ElemList", - "loc": null, - "children": [ - { - "kind": "InterpElem::Literal", - "loc": null, - "children": { - "repr": "select " - } - }, - { - "kind": "InterpElem::Source", - "loc": null, - "children": { - "source": "def" - } - }, - { - "kind": "InterpElem::Literal", - "loc": null, - "children": { - "repr": " from dual" - } - } - ] - } + }, + "is_object": false } - }, - "loc": null + } } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} } } } - ] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} - } - } - } - ] - }, - "last_expr": { - "kind": "Expr::Let", - "loc": null, - "children": { - "pattern": { - "kind": "Pattern::Var", - "loc": null, - "children": { - "value": { - "kind": "Binder", - "loc": null, - "children": { - "name": "builder" - } - } - } - }, - "expr": { - "kind": "Expr::Apply", - "loc": null, - "children": { - "func": { - "kind": "Expr::Method", - "loc": null, - "children": { - "type_name": { - "kind": "TypeName", - "loc": null, - "children": { - "name": { - "kind": "LongIdent::Ident", - "loc": null, - "children": { - "value": "StringBuilder" - } - }, - "is_object": false - } - }, - "method_name": { - "kind": "Label", - "loc": null, - "children": { - "name": "new" - } - } } }, "args": { @@ -4209,7 +4347,7 @@ "kind": "LongIdent::Ident", "loc": null, "children": { - "value": "builder" + "value": "sql" } } } @@ -4228,68 +4366,195 @@ "kind": "InterpElem::Literal", "loc": null, "children": { - "repr": "abc" + "repr": "select " } }, { "kind": "InterpElem::Source", "loc": null, "children": { - "source": "to_repr(def)" + "source": "def" } }, { "kind": "InterpElem::Literal", "loc": null, "children": { - "repr": "ghi" + "repr": " from dual" } } ] } } }, - "loc": null + "is_conditional": false + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "consume_sql" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "sql" + } + } + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "write_end" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } } } ] }, "last_expr": { - "kind": "Expr::Apply", + "kind": "Expr::Let", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "pattern": { + "kind": "Pattern::Var", "loc": null, "children": { - "id": { - "kind": "Var", + "value": { + "kind": "Binder", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", + "name": "builder" + } + } + } + }, + "expr": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Method", + "loc": null, + "children": { + "type_name": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "StringBuilder" + } + }, + "is_object": false + } + }, + "method_name": { + "kind": "Label", "loc": null, "children": { - "value": "println" + "name": "new" } } } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} } } }, - "args": { - "kind": "Expr::Apply::ArgumentList", + "body": { + "kind": "Expr::Sequence", "loc": null, - "children": [ - { - "kind": "Argument", + "children": { + "exprs": { + "kind": "Expr::Sequence::ExprList", "loc": null, - "children": { - "value": { - "kind": "Expr::DotApply", + "children": [ + { + "kind": "Expr::TemplateWriting", "loc": null, "children": { - "self": { + "expr": { "kind": "Expr::Ident", "loc": null, "children": { @@ -4308,19 +4573,187 @@ } } }, - "method_name": { - "kind": "Label", + "template": { + "kind": "Expr::Interp", + "loc": null, + "children": { + "elems": { + "kind": "Expr::Interp::ElemList", + "loc": null, + "children": [ + { + "kind": "InterpElem::Literal", + "loc": null, + "children": { + "repr": "abc" + } + }, + { + "kind": "InterpElem::Source", + "loc": null, + "children": { + "source": "to_repr(def)" + } + }, + { + "kind": "InterpElem::Literal", + "loc": null, + "children": { + "repr": "ghi" + } + } + ] + } + } + }, + "is_conditional": false + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "builder" + } + } + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "to_string" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + ] + }, + "last_expr": { + "kind": "Expr::Let", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "call_builder" + } + } + } + }, + "expr": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Method", "loc": null, "children": { - "name": "to_string" + "type_name": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "StringBuilder" + } + }, + "is_object": false + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "new" + } + } } }, "args": { - "kind": "Expr::DotApply::ArgList", + "kind": "Expr::Apply::ArgumentList", "loc": null, "children": [] }, - "return_self": false, "attr": { "kind": "ApplyAttr::NoAttr", "loc": null, @@ -4328,19 +4761,981 @@ } } }, - "kind": { - "kind": "ArgumentKind::Positional", + "body": { + "kind": "Expr::Sequence", "loc": null, - "children": {} + "children": { + "exprs": { + "kind": "Expr::Sequence::ExprList", + "loc": null, + "children": [ + { + "kind": "Expr::TemplateWriting", + "loc": null, + "children": { + "expr": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "get_builder" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "call_builder" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "template": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "call" + } + } + } + }, + "is_conditional": false + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "call_builder" + } + } + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "to_string" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + ] + }, + "last_expr": { + "kind": "Expr::Let", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Constraint", + "loc": null, + "children": { + "pat": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "holder" + } + } + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Holder" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + "expr": { + "kind": "Expr::Record", + "loc": null, + "children": { + "type_name": null, + "fields": { + "kind": "Expr::Record::FieldList", + "loc": null, + "children": [ + { + "kind": "FieldDef", + "loc": null, + "children": { + "label": { + "kind": "Label", + "loc": null, + "children": { + "name": "builder" + } + }, + "expr": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Method", + "loc": null, + "children": { + "type_name": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "StringBuilder" + } + }, + "is_object": false + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "new" + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "is_pun": false + } + } + ] + }, + "trailing": { + "kind": "Trailing::None", + "loc": null, + "children": {} + } + } + }, + "body": { + "kind": "Expr::Sequence", + "loc": null, + "children": { + "exprs": { + "kind": "Expr::Sequence::ExprList", + "loc": null, + "children": [ + { + "kind": "Expr::TemplateWriting", + "loc": null, + "children": { + "expr": { + "kind": "Expr::Field", + "loc": null, + "children": { + "record": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "holder" + } + } + } + } + } + }, + "accessor": { + "kind": "Accessor::Label", + "loc": null, + "children": { + "value": { + "kind": "Label", + "loc": null, + "children": { + "name": "builder" + } + } + } + } + } + }, + "template": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "field" + } + } + } + }, + "is_conditional": false + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Field", + "loc": null, + "children": { + "record": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "holder" + } + } + } + } + } + }, + "accessor": { + "kind": "Accessor::Label", + "loc": null, + "children": { + "value": { + "kind": "Label", + "loc": null, + "children": { + "name": "builder" + } + } + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "to_string" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + ] + }, + "last_expr": { + "kind": "Expr::Let", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "builders" + } + } + } + }, + "expr": { + "kind": "Expr::Array", + "loc": null, + "children": { + "exprs": { + "kind": "Expr::Array::ExprList", + "loc": null, + "children": [ + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Method", + "loc": null, + "children": { + "type_name": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "StringBuilder" + } + }, + "is_object": false + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "new" + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + ] + }, + "is_iter": false + } + }, + "body": { + "kind": "Expr::Sequence", + "loc": null, + "children": { + "exprs": { + "kind": "Expr::Sequence::ExprList", + "loc": null, + "children": [ + { + "kind": "Expr::TemplateWriting", + "loc": null, + "children": { + "expr": { + "kind": "Expr::ArrayGet", + "loc": null, + "children": { + "array": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "builders" + } + } + } + } + } + }, + "index": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "0" + } + } + } + } + } + }, + "template": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "index" + } + } + } + }, + "is_conditional": false + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::ArrayGet", + "loc": null, + "children": { + "array": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "builders" + } + } + } + } + } + }, + "index": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "0" + } + } + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "to_string" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + ] + }, + "last_expr": { + "kind": "Expr::Let", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "paren_builder" + } + } + } + }, + "expr": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Method", + "loc": null, + "children": { + "type_name": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "StringBuilder" + } + }, + "is_object": false + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "new" + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "body": { + "kind": "Expr::Sequence", + "loc": null, + "children": { + "exprs": { + "kind": "Expr::Sequence::ExprList", + "loc": null, + "children": [ + { + "kind": "Expr::TemplateWriting", + "loc": null, + "children": { + "expr": { + "kind": "Expr::Group", + "loc": null, + "children": { + "expr": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "paren_builder" + } + } + } + } + } + }, + "group": { + "kind": "Group::Paren", + "loc": null, + "children": {} + } + } + }, + "template": { + "kind": "Expr::Interp", + "loc": null, + "children": { + "elems": { + "kind": "Expr::Interp::ElemList", + "loc": null, + "children": [ + { + "kind": "InterpElem::Literal", + "loc": null, + "children": { + "repr": "paren " + } + }, + { + "kind": "InterpElem::Source", + "loc": null, + "children": { + "source": "1" + } + } + ] + } + } + }, + "is_conditional": false + } + } + ] + }, + "last_expr": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "paren_builder" + } + } + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "to_string" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } } } } - ] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} + } } } } diff --git a/test/sync_test/__snapshot__/pipeline_test_templated_writing.mbt b/test/sync_test/__snapshot__/pipeline_test_templated_writing.mbt index cc3b5212..b394f504 100644 --- a/test/sync_test/__snapshot__/pipeline_test_templated_writing.mbt +++ b/test/sync_test/__snapshot__/pipeline_test_templated_writing.mbt @@ -1,5 +1,5 @@ struct Writer (StringBuilder) -fn[T : Debug] Writer::write(self : Self, x : T) -> Unit { +fn[T : Debug] Writer::write_string_interpolation(self : Self, x : T) -> Unit { self.0.write_string(to_repr(x).to_string()) } fn Writer::write_string(self : Self, s : String) -> Unit { @@ -7,7 +7,7 @@ fn Writer::write_string(self : Self, s : String) -> Unit { } struct TraceWriter (StringBuilder) -fn[T : Debug] TraceWriter::write(self : Self, x : T) -> Unit { +fn[T : Debug] TraceWriter::write_string_interpolation(self : Self, x : T) -> Unit { self.0.write_string("[value:") self.0.write_string(to_repr(x).to_string()) self.0.write_string("]") @@ -18,6 +18,10 @@ fn TraceWriter::write_string(self : Self, s : String) -> Unit { self.0.write_string("]") } +struct Holder { + builder : StringBuilder +} + struct Sql { builder : StringBuilder } @@ -25,7 +29,7 @@ fn Sql::Sql() -> Sql { println("Sql::Sql() was called. It should only be called once.") { builder: StringBuilder::new() } } -fn[T : Show] Sql::write(self : Self, x : T) -> Unit { +fn[T : Show] Sql::write_string_interpolation(self : Self, x : T) -> Unit { self.builder.write_string(Show::to_string(x)) } fn Sql::write_string(self : Self, s : String) -> Unit { @@ -39,6 +43,10 @@ fn consume_sql(sql : String) -> Unit { println(sql) } +fn get_builder(builder : StringBuilder) -> StringBuilder { + builder +} + fn main { let writer : Writer = StringBuilder::new() let def = Some("text") @@ -67,9 +75,27 @@ fn main { trace <+ "asdf\{def}" println(trace.0.to_string()) - consume_sql(Sql <+ "select \{def} from dual") + let sql = Sql::Sql() + sql <+ "select \{def} from dual" + consume_sql(sql.write_end()) let builder = StringBuilder::new() builder <+ "abc\{to_repr(def)}ghi" println(builder.to_string()) + + let call_builder = StringBuilder::new() + get_builder(call_builder) <+ "call" + println(call_builder.to_string()) + + let holder : Holder = { builder: StringBuilder::new() } + holder.builder <+ "field" + println(holder.builder.to_string()) + + let builders = [StringBuilder::new()] + builders[0] <+ "index" + println(builders[0].to_string()) + + let paren_builder = StringBuilder::new() + (paren_builder) <+ "paren \{1}" + println(paren_builder.to_string()) } diff --git a/test/sync_test/__snapshot__/pipeline_test_templated_writing.mbt.tokens.json b/test/sync_test/__snapshot__/pipeline_test_templated_writing.mbt.tokens.json index 93d8aab1..c3d2847d 100644 --- a/test/sync_test/__snapshot__/pipeline_test_templated_writing.mbt.tokens.json +++ b/test/sync_test/__snapshot__/pipeline_test_templated_writing.mbt.tokens.json @@ -80,76 +80,76 @@ { "token": [ "LIDENT", - "write" + "write_string_interpolation" ], - "loc": "2:23-2:28" + "loc": "2:23-2:49" }, { "token": "LPAREN", - "loc": "2:28-2:29" + "loc": "2:49-2:50" }, { "token": [ "LIDENT", "self" ], - "loc": "2:29-2:33" + "loc": "2:50-2:54" }, { "token": "COLON", - "loc": "2:34-2:35" + "loc": "2:55-2:56" }, { "token": [ "UIDENT", "Self" ], - "loc": "2:36-2:40" + "loc": "2:57-2:61" }, { "token": "COMMA", - "loc": "2:40-2:41" + "loc": "2:61-2:62" }, { "token": [ "LIDENT", "x" ], - "loc": "2:42-2:43" + "loc": "2:63-2:64" }, { "token": "COLON", - "loc": "2:44-2:45" + "loc": "2:65-2:66" }, { "token": [ "UIDENT", "T" ], - "loc": "2:46-2:47" + "loc": "2:67-2:68" }, { "token": "RPAREN", - "loc": "2:47-2:48" + "loc": "2:68-2:69" }, { "token": "THIN_ARROW", - "loc": "2:49-2:51" + "loc": "2:70-2:72" }, { "token": [ "UIDENT", "Unit" ], - "loc": "2:52-2:56" + "loc": "2:73-2:77" }, { "token": "LBRACE", - "loc": "2:57-2:58" + "loc": "2:78-2:79" }, { "token": "NEWLINE", - "loc": "2:58-2:59" + "loc": "2:79-2:80" }, { "token": [ @@ -465,76 +465,76 @@ { "token": [ "LIDENT", - "write" + "write_string_interpolation" ], - "loc": "10:28-10:33" + "loc": "10:28-10:54" }, { "token": "LPAREN", - "loc": "10:33-10:34" + "loc": "10:54-10:55" }, { "token": [ "LIDENT", "self" ], - "loc": "10:34-10:38" + "loc": "10:55-10:59" }, { "token": "COLON", - "loc": "10:39-10:40" + "loc": "10:60-10:61" }, { "token": [ "UIDENT", "Self" ], - "loc": "10:41-10:45" + "loc": "10:62-10:66" }, { "token": "COMMA", - "loc": "10:45-10:46" + "loc": "10:66-10:67" }, { "token": [ "LIDENT", "x" ], - "loc": "10:47-10:48" + "loc": "10:68-10:69" }, { "token": "COLON", - "loc": "10:49-10:50" + "loc": "10:70-10:71" }, { "token": [ "UIDENT", "T" ], - "loc": "10:51-10:52" + "loc": "10:72-10:73" }, { "token": "RPAREN", - "loc": "10:52-10:53" + "loc": "10:73-10:74" }, { "token": "THIN_ARROW", - "loc": "10:54-10:56" + "loc": "10:75-10:77" }, { "token": [ "UIDENT", "Unit" ], - "loc": "10:57-10:61" + "loc": "10:78-10:82" }, { "token": "LBRACE", - "loc": "10:62-10:63" + "loc": "10:83-10:84" }, { "token": "NEWLINE", - "loc": "10:63-10:64" + "loc": "10:84-10:85" }, { "token": [ @@ -964,17 +964,17 @@ { "token": [ "UIDENT", - "Sql" + "Holder" ], - "loc": "21:8-21:11" + "loc": "21:8-21:14" }, { "token": "LBRACE", - "loc": "21:12-21:13" + "loc": "21:15-21:16" }, { "token": "NEWLINE", - "loc": "21:13-21:14" + "loc": "21:16-21:17" }, { "token": [ @@ -1013,1482 +1013,2350 @@ "token": "NEWLINE", "loc": "23:2-23:3" }, + { + "token": "NEWLINE", + "loc": "24:1-24:2" + }, + { + "token": "STRUCT", + "loc": "25:1-25:7" + }, + { + "token": [ + "UIDENT", + "Sql" + ], + "loc": "25:8-25:11" + }, + { + "token": "LBRACE", + "loc": "25:12-25:13" + }, + { + "token": "NEWLINE", + "loc": "25:13-25:14" + }, + { + "token": [ + "LIDENT", + "builder" + ], + "loc": "26:3-26:10" + }, + { + "token": "COLON", + "loc": "26:11-26:12" + }, + { + "token": [ + "UIDENT", + "StringBuilder" + ], + "loc": "26:13-26:26" + }, + { + "token": "NEWLINE", + "loc": "26:26-26:27" + }, + { + "token": "RBRACE", + "loc": "27:1-27:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "27:2-27:2" + }, + { + "token": "NEWLINE", + "loc": "27:2-27:3" + }, { "token": "FN", - "loc": "24:1-24:3" + "loc": "28:1-28:3" }, { "token": [ "UIDENT", "Sql" ], - "loc": "24:4-24:7" + "loc": "28:4-28:7" }, { "token": "COLONCOLON", - "loc": "24:7-24:9" + "loc": "28:7-28:9" }, { "token": [ "UIDENT", "Sql" ], - "loc": "24:9-24:12" + "loc": "28:9-28:12" }, { "token": "LPAREN", - "loc": "24:12-24:13" + "loc": "28:12-28:13" }, { "token": "RPAREN", - "loc": "24:13-24:14" + "loc": "28:13-28:14" }, { "token": "THIN_ARROW", - "loc": "24:15-24:17" + "loc": "28:15-28:17" }, { "token": [ "UIDENT", "Sql" ], - "loc": "24:18-24:21" + "loc": "28:18-28:21" }, { "token": "LBRACE", - "loc": "24:22-24:23" + "loc": "28:22-28:23" }, { "token": "NEWLINE", - "loc": "24:23-24:24" + "loc": "28:23-28:24" }, { "token": [ "LIDENT", "println" ], - "loc": "25:3-25:10" + "loc": "29:3-29:10" }, { "token": "LPAREN", - "loc": "25:10-25:11" + "loc": "29:10-29:11" }, { "token": [ "STRING", "Sql::Sql() was called. It should only be called once." ], - "loc": "25:11-25:66" + "loc": "29:11-29:66" }, { "token": "RPAREN", - "loc": "25:66-25:67" + "loc": "29:66-29:67" }, { "token": [ "SEMI", false ], - "loc": "25:67-25:67" + "loc": "29:67-29:67" }, { "token": "NEWLINE", - "loc": "25:67-25:68" + "loc": "29:67-29:68" }, { "token": "LBRACE", - "loc": "26:3-26:4" + "loc": "30:3-30:4" }, { "token": [ "LIDENT", "builder" ], - "loc": "26:5-26:12" + "loc": "30:5-30:12" }, { "token": "COLON", - "loc": "26:12-26:13" + "loc": "30:12-30:13" }, { "token": [ "UIDENT", "StringBuilder" ], - "loc": "26:14-26:27" + "loc": "30:14-30:27" }, { "token": "COLONCOLON", - "loc": "26:27-26:29" + "loc": "30:27-30:29" }, { "token": [ "LIDENT", "new" ], - "loc": "26:29-26:32" + "loc": "30:29-30:32" }, { "token": "LPAREN", - "loc": "26:32-26:33" + "loc": "30:32-30:33" }, { "token": "RPAREN", - "loc": "26:33-26:34" + "loc": "30:33-30:34" }, { "token": "RBRACE", - "loc": "26:35-26:36" + "loc": "30:35-30:36" }, { "token": "NEWLINE", - "loc": "26:36-26:37" + "loc": "30:36-30:37" }, { "token": "RBRACE", - "loc": "27:1-27:2" + "loc": "31:1-31:2" }, { "token": [ "SEMI", false ], - "loc": "27:2-27:2" + "loc": "31:2-31:2" }, { "token": "NEWLINE", - "loc": "27:2-27:3" + "loc": "31:2-31:3" }, { "token": "FN", - "loc": "28:1-28:3" + "loc": "32:1-32:3" }, { "token": "LBRACKET", - "loc": "28:3-28:4" + "loc": "32:3-32:4" }, { "token": [ "UIDENT", "T" ], - "loc": "28:4-28:5" + "loc": "32:4-32:5" }, { "token": "COLON", - "loc": "28:6-28:7" + "loc": "32:6-32:7" }, { "token": [ "UIDENT", "Show" ], - "loc": "28:8-28:12" + "loc": "32:8-32:12" }, { "token": "RBRACKET", - "loc": "28:12-28:13" + "loc": "32:12-32:13" }, { "token": [ "UIDENT", "Sql" ], - "loc": "28:14-28:17" + "loc": "32:14-32:17" }, { "token": "COLONCOLON", - "loc": "28:17-28:19" + "loc": "32:17-32:19" }, { "token": [ "LIDENT", - "write" + "write_string_interpolation" ], - "loc": "28:19-28:24" + "loc": "32:19-32:45" }, { "token": "LPAREN", - "loc": "28:24-28:25" + "loc": "32:45-32:46" }, { "token": [ "LIDENT", "self" ], - "loc": "28:25-28:29" + "loc": "32:46-32:50" }, { "token": "COLON", - "loc": "28:30-28:31" + "loc": "32:51-32:52" }, { "token": [ "UIDENT", "Self" ], - "loc": "28:32-28:36" + "loc": "32:53-32:57" }, { "token": "COMMA", - "loc": "28:36-28:37" + "loc": "32:57-32:58" }, { "token": [ "LIDENT", "x" ], - "loc": "28:38-28:39" + "loc": "32:59-32:60" }, { "token": "COLON", - "loc": "28:40-28:41" + "loc": "32:61-32:62" }, { "token": [ "UIDENT", "T" ], - "loc": "28:42-28:43" + "loc": "32:63-32:64" }, { "token": "RPAREN", - "loc": "28:43-28:44" + "loc": "32:64-32:65" }, { "token": "THIN_ARROW", - "loc": "28:45-28:47" + "loc": "32:66-32:68" }, { "token": [ "UIDENT", "Unit" ], - "loc": "28:48-28:52" + "loc": "32:69-32:73" }, { "token": "LBRACE", - "loc": "28:53-28:54" + "loc": "32:74-32:75" }, { "token": "NEWLINE", - "loc": "28:54-28:55" + "loc": "32:75-32:76" }, { "token": [ "LIDENT", "self" ], - "loc": "29:3-29:7" + "loc": "33:3-33:7" }, { "token": [ "DOT_LIDENT", "builder" ], - "loc": "29:8-29:15" + "loc": "33:8-33:15" }, { "token": [ "DOT_LIDENT", "write_string" ], - "loc": "29:16-29:28" + "loc": "33:16-33:28" }, { "token": "LPAREN", - "loc": "29:28-29:29" + "loc": "33:28-33:29" }, { "token": [ "UIDENT", "Show" ], - "loc": "29:29-29:33" + "loc": "33:29-33:33" }, { "token": "COLONCOLON", - "loc": "29:33-29:35" + "loc": "33:33-33:35" }, { "token": [ "LIDENT", "to_string" ], - "loc": "29:35-29:44" + "loc": "33:35-33:44" }, { "token": "LPAREN", - "loc": "29:44-29:45" + "loc": "33:44-33:45" }, { "token": [ "LIDENT", "x" ], - "loc": "29:45-29:46" + "loc": "33:45-33:46" }, { "token": "RPAREN", - "loc": "29:46-29:47" + "loc": "33:46-33:47" }, { "token": "RPAREN", - "loc": "29:47-29:48" + "loc": "33:47-33:48" }, { "token": "NEWLINE", - "loc": "29:48-29:49" + "loc": "33:48-33:49" }, { "token": "RBRACE", - "loc": "30:1-30:2" + "loc": "34:1-34:2" }, { "token": [ "SEMI", false ], - "loc": "30:2-30:2" + "loc": "34:2-34:2" }, { "token": "NEWLINE", - "loc": "30:2-30:3" + "loc": "34:2-34:3" }, { "token": "FN", - "loc": "31:1-31:3" + "loc": "35:1-35:3" }, { "token": [ "UIDENT", "Sql" ], - "loc": "31:4-31:7" + "loc": "35:4-35:7" }, { "token": "COLONCOLON", - "loc": "31:7-31:9" + "loc": "35:7-35:9" }, { "token": [ "LIDENT", "write_string" ], - "loc": "31:9-31:21" + "loc": "35:9-35:21" }, { "token": "LPAREN", - "loc": "31:21-31:22" + "loc": "35:21-35:22" }, { "token": [ "LIDENT", "self" ], - "loc": "31:22-31:26" + "loc": "35:22-35:26" }, { "token": "COLON", - "loc": "31:27-31:28" + "loc": "35:27-35:28" }, { "token": [ "UIDENT", "Self" ], - "loc": "31:29-31:33" + "loc": "35:29-35:33" }, { "token": "COMMA", - "loc": "31:33-31:34" + "loc": "35:33-35:34" }, { "token": [ "LIDENT", "s" ], - "loc": "31:35-31:36" + "loc": "35:35-35:36" }, { "token": "COLON", - "loc": "31:37-31:38" + "loc": "35:37-35:38" }, { "token": [ "UIDENT", "String" ], - "loc": "31:39-31:45" + "loc": "35:39-35:45" }, { "token": "RPAREN", - "loc": "31:45-31:46" + "loc": "35:45-35:46" }, { "token": "THIN_ARROW", - "loc": "31:47-31:49" + "loc": "35:47-35:49" }, { "token": [ "UIDENT", "Unit" ], - "loc": "31:50-31:54" + "loc": "35:50-35:54" }, { "token": "LBRACE", - "loc": "31:55-31:56" + "loc": "35:55-35:56" }, { "token": "NEWLINE", - "loc": "31:56-31:57" + "loc": "35:56-35:57" }, { "token": [ "LIDENT", "self" ], - "loc": "32:3-32:7" + "loc": "36:3-36:7" }, { "token": [ "DOT_LIDENT", "builder" ], - "loc": "32:8-32:15" + "loc": "36:8-36:15" }, { "token": [ "DOT_LIDENT", "write_string" ], - "loc": "32:16-32:28" + "loc": "36:16-36:28" }, { "token": "LPAREN", - "loc": "32:28-32:29" + "loc": "36:28-36:29" }, { "token": [ "LIDENT", "s" ], - "loc": "32:29-32:30" + "loc": "36:29-36:30" }, { "token": "RPAREN", - "loc": "32:30-32:31" + "loc": "36:30-36:31" }, { "token": "NEWLINE", - "loc": "32:31-32:32" + "loc": "36:31-36:32" }, { "token": "RBRACE", - "loc": "33:1-33:2" + "loc": "37:1-37:2" }, { "token": [ "SEMI", false ], - "loc": "33:2-33:2" + "loc": "37:2-37:2" }, { "token": "NEWLINE", - "loc": "33:2-33:3" + "loc": "37:2-37:3" }, { "token": "FN", - "loc": "34:1-34:3" + "loc": "38:1-38:3" }, { "token": [ "UIDENT", "Sql" ], - "loc": "34:4-34:7" + "loc": "38:4-38:7" }, { "token": "COLONCOLON", - "loc": "34:7-34:9" + "loc": "38:7-38:9" }, { "token": [ "LIDENT", "write_end" ], - "loc": "34:9-34:18" + "loc": "38:9-38:18" }, { "token": "LPAREN", - "loc": "34:18-34:19" + "loc": "38:18-38:19" }, { "token": [ "LIDENT", "self" ], - "loc": "34:19-34:23" + "loc": "38:19-38:23" }, { "token": "COLON", - "loc": "34:24-34:25" + "loc": "38:24-38:25" }, { "token": [ "UIDENT", "Self" ], - "loc": "34:26-34:30" + "loc": "38:26-38:30" }, { "token": "RPAREN", - "loc": "34:30-34:31" + "loc": "38:30-38:31" }, { "token": "THIN_ARROW", - "loc": "34:32-34:34" + "loc": "38:32-38:34" }, { "token": [ "UIDENT", "String" ], - "loc": "34:35-34:41" + "loc": "38:35-38:41" }, { "token": "LBRACE", - "loc": "34:42-34:43" + "loc": "38:42-38:43" }, { "token": "NEWLINE", - "loc": "34:43-34:44" + "loc": "38:43-38:44" }, { "token": [ "LIDENT", "self" ], - "loc": "35:3-35:7" + "loc": "39:3-39:7" }, { "token": [ "DOT_LIDENT", "builder" ], - "loc": "35:8-35:15" + "loc": "39:8-39:15" }, { "token": [ "DOT_LIDENT", "to_string" ], - "loc": "35:16-35:25" + "loc": "39:16-39:25" }, { "token": "LPAREN", - "loc": "35:25-35:26" + "loc": "39:25-39:26" }, { "token": "RPAREN", - "loc": "35:26-35:27" + "loc": "39:26-39:27" }, { "token": "NEWLINE", - "loc": "35:27-35:28" + "loc": "39:27-39:28" }, { "token": "RBRACE", - "loc": "36:1-36:2" + "loc": "40:1-40:2" }, { "token": [ "SEMI", false ], - "loc": "36:2-36:2" + "loc": "40:2-40:2" }, { "token": "NEWLINE", - "loc": "36:2-36:3" + "loc": "40:2-40:3" }, { "token": "NEWLINE", - "loc": "37:1-37:2" + "loc": "41:1-41:2" }, { "token": "FN", - "loc": "38:1-38:3" + "loc": "42:1-42:3" }, { "token": [ "LIDENT", "consume_sql" ], - "loc": "38:4-38:15" + "loc": "42:4-42:15" }, { "token": "LPAREN", - "loc": "38:15-38:16" + "loc": "42:15-42:16" }, { "token": [ "LIDENT", "sql" ], - "loc": "38:16-38:19" + "loc": "42:16-42:19" }, { "token": "COLON", - "loc": "38:20-38:21" + "loc": "42:20-42:21" }, { "token": [ "UIDENT", "String" ], - "loc": "38:22-38:28" + "loc": "42:22-42:28" }, { "token": "RPAREN", - "loc": "38:28-38:29" + "loc": "42:28-42:29" }, { "token": "THIN_ARROW", - "loc": "38:30-38:32" + "loc": "42:30-42:32" }, { "token": [ "UIDENT", "Unit" ], - "loc": "38:33-38:37" + "loc": "42:33-42:37" }, { "token": "LBRACE", - "loc": "38:38-38:39" + "loc": "42:38-42:39" }, { "token": "NEWLINE", - "loc": "38:39-38:40" + "loc": "42:39-42:40" }, { "token": [ "LIDENT", "println" ], - "loc": "39:3-39:10" + "loc": "43:3-43:10" }, { "token": "LPAREN", - "loc": "39:10-39:11" + "loc": "43:10-43:11" }, { "token": [ "LIDENT", "sql" ], - "loc": "39:11-39:14" + "loc": "43:11-43:14" }, { "token": "RPAREN", - "loc": "39:14-39:15" + "loc": "43:14-43:15" }, { "token": "NEWLINE", - "loc": "39:15-39:16" + "loc": "43:15-43:16" }, { "token": "RBRACE", - "loc": "40:1-40:2" + "loc": "44:1-44:2" }, { "token": [ "SEMI", false ], - "loc": "40:2-40:2" + "loc": "44:2-44:2" }, { "token": "NEWLINE", - "loc": "40:2-40:3" + "loc": "44:2-44:3" }, { "token": "NEWLINE", - "loc": "41:1-41:2" + "loc": "45:1-45:2" }, { "token": "FN", - "loc": "42:1-42:3" + "loc": "46:1-46:3" + }, + { + "token": [ + "LIDENT", + "get_builder" + ], + "loc": "46:4-46:15" + }, + { + "token": "LPAREN", + "loc": "46:15-46:16" + }, + { + "token": [ + "LIDENT", + "builder" + ], + "loc": "46:16-46:23" + }, + { + "token": "COLON", + "loc": "46:24-46:25" + }, + { + "token": [ + "UIDENT", + "StringBuilder" + ], + "loc": "46:26-46:39" + }, + { + "token": "RPAREN", + "loc": "46:39-46:40" + }, + { + "token": "THIN_ARROW", + "loc": "46:41-46:43" + }, + { + "token": [ + "UIDENT", + "StringBuilder" + ], + "loc": "46:44-46:57" + }, + { + "token": "LBRACE", + "loc": "46:58-46:59" + }, + { + "token": "NEWLINE", + "loc": "46:59-46:60" + }, + { + "token": [ + "LIDENT", + "builder" + ], + "loc": "47:3-47:10" + }, + { + "token": "NEWLINE", + "loc": "47:10-47:11" + }, + { + "token": "RBRACE", + "loc": "48:1-48:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "48:2-48:2" + }, + { + "token": "NEWLINE", + "loc": "48:2-48:3" + }, + { + "token": "NEWLINE", + "loc": "49:1-49:2" + }, + { + "token": "FN", + "loc": "50:1-50:3" }, { "token": [ "LIDENT", "main" ], - "loc": "42:4-42:8" + "loc": "50:4-50:8" }, { "token": "LBRACE", - "loc": "42:9-42:10" + "loc": "50:9-50:10" }, { "token": "NEWLINE", - "loc": "42:10-42:11" + "loc": "50:10-50:11" }, { "token": "LET", - "loc": "43:3-43:6" + "loc": "51:3-51:6" }, { "token": [ "LIDENT", "writer" ], - "loc": "43:7-43:13" + "loc": "51:7-51:13" }, { "token": "COLON", - "loc": "43:14-43:15" + "loc": "51:14-51:15" }, { "token": [ "UIDENT", "Writer" ], - "loc": "43:16-43:22" + "loc": "51:16-51:22" }, { "token": "EQUAL", - "loc": "43:23-43:24" + "loc": "51:23-51:24" }, { "token": [ "UIDENT", "StringBuilder" ], - "loc": "43:25-43:38" + "loc": "51:25-51:38" }, { "token": "COLONCOLON", - "loc": "43:38-43:40" + "loc": "51:38-51:40" }, { "token": [ "LIDENT", "new" ], - "loc": "43:40-43:43" + "loc": "51:40-51:43" }, { "token": "LPAREN", - "loc": "43:43-43:44" + "loc": "51:43-51:44" }, { "token": "RPAREN", - "loc": "43:44-43:45" + "loc": "51:44-51:45" }, { "token": [ "SEMI", false ], - "loc": "43:45-43:45" + "loc": "51:45-51:45" }, { "token": "NEWLINE", - "loc": "43:45-43:46" + "loc": "51:45-51:46" }, { "token": "LET", - "loc": "44:3-44:6" + "loc": "52:3-52:6" }, { "token": [ "LIDENT", "def" ], - "loc": "44:7-44:10" + "loc": "52:7-52:10" }, { "token": "EQUAL", - "loc": "44:11-44:12" + "loc": "52:11-52:12" }, { "token": [ "UIDENT", "Some" ], - "loc": "44:13-44:17" + "loc": "52:13-52:17" }, { "token": "LPAREN", - "loc": "44:17-44:18" + "loc": "52:17-52:18" }, { "token": [ "STRING", "text" ], - "loc": "44:18-44:24" + "loc": "52:18-52:24" }, { "token": "RPAREN", - "loc": "44:24-44:25" + "loc": "52:24-52:25" }, { "token": [ "SEMI", false ], - "loc": "44:25-44:25" + "loc": "52:25-52:25" }, { "token": "NEWLINE", - "loc": "44:25-44:26" + "loc": "52:25-52:26" }, { "token": "NEWLINE", - "loc": "45:1-45:2" + "loc": "53:1-53:2" }, { "token": [ "LIDENT", "writer" ], - "loc": "46:3-46:9" + "loc": "54:3-54:9" }, { "token": "LT_PLUS", - "loc": "46:10-46:12" + "loc": "54:10-54:12" }, { "token": [ "INTERP", "\"abc\\{def}ghi\\u{1F430}\\n\"" ], - "loc": "46:13-46:38" + "loc": "54:13-54:38" }, { "token": [ "SEMI", false ], - "loc": "46:38-46:38" + "loc": "54:38-54:38" }, { "token": "NEWLINE", - "loc": "46:38-46:39" + "loc": "54:38-54:39" }, { "token": [ "LIDENT", "writer" ], - "loc": "47:3-47:9" + "loc": "55:3-55:9" }, { "token": "LT_PLUS", - "loc": "47:10-47:12" + "loc": "55:10-55:12" }, { "token": [ "MULTILINE_STRING", "\\n\\t\\{def}" ], - "loc": "47:13-47:25" + "loc": "55:13-55:25" }, { "token": "NEWLINE", - "loc": "47:25-47:26" + "loc": "55:25-55:26" }, { "token": [ "MULTILINE_INTERP", "\"\\t\\{def}jkl\"" ], - "loc": "48:13-48:26" + "loc": "56:13-56:26" }, { "token": "NEWLINE", - "loc": "48:26-48:27" + "loc": "56:26-56:27" }, { "token": [ "MULTILINE_STRING", "mn" ], - "loc": "49:13-49:17" + "loc": "57:13-57:17" }, { "token": "NEWLINE", - "loc": "49:17-49:18" + "loc": "57:17-57:18" }, { "token": [ "MULTILINE_STRING", "" ], - "loc": "50:13-50:15" + "loc": "58:13-58:15" }, { "token": [ "SEMI", false ], - "loc": "50:15-50:15" + "loc": "58:15-58:15" }, { "token": "NEWLINE", - "loc": "50:15-50:16" + "loc": "58:15-58:16" }, { "token": "NEWLINE", - "loc": "51:1-51:2" + "loc": "59:1-59:2" }, { "token": [ "LIDENT", "writer" ], - "loc": "52:3-52:9" + "loc": "60:3-60:9" }, { "token": "NEWLINE", - "loc": "52:9-52:10" + "loc": "60:9-60:10" }, { "token": "LT_PLUS", - "loc": "53:5-53:7" + "loc": "61:5-61:7" }, { "token": "NEWLINE", - "loc": "53:7-53:8" + "loc": "61:7-61:8" }, { "token": [ "MULTILINE_INTERP", "\"0000\"" ], - "loc": "54:5-54:11" + "loc": "62:5-62:11" }, { "token": "NEWLINE", - "loc": "54:11-54:12" + "loc": "62:11-62:12" }, { "token": [ "MULTILINE_INTERP", "\"1111\\{def}2222\"" ], - "loc": "55:5-55:21" + "loc": "63:5-63:21" }, { "token": "NEWLINE", - "loc": "55:21-55:22" + "loc": "63:21-63:22" }, { "token": [ "MULTILINE_INTERP", "\"3333\"" ], - "loc": "56:5-56:11" + "loc": "64:5-64:11" }, { "token": "NEWLINE", - "loc": "56:11-56:12" + "loc": "64:11-64:12" }, { "token": [ "MULTILINE_INTERP", "\"\"" ], - "loc": "57:5-57:7" + "loc": "65:5-65:7" }, { "token": [ "SEMI", false ], - "loc": "57:7-57:7" + "loc": "65:7-65:7" }, { "token": "NEWLINE", - "loc": "57:7-57:8" + "loc": "65:7-65:8" }, { "token": "NEWLINE", - "loc": "58:1-58:2" + "loc": "66:1-66:2" }, { "token": [ "LIDENT", "writer" ], - "loc": "59:3-59:9" + "loc": "67:3-67:9" }, { "token": "NEWLINE", - "loc": "59:9-59:10" + "loc": "67:9-67:10" }, { "token": "LT_PLUS", - "loc": "60:5-60:7" + "loc": "68:5-68:7" }, { "token": "NEWLINE", - "loc": "60:7-60:8" + "loc": "68:7-68:8" }, { "token": [ "MULTILINE_STRING", "end" ], - "loc": "61:5-61:10" + "loc": "69:5-69:10" }, { "token": [ "SEMI", false ], - "loc": "61:10-61:10" + "loc": "69:10-69:10" }, { "token": "NEWLINE", - "loc": "61:10-61:11" + "loc": "69:10-69:11" }, { "token": "NEWLINE", - "loc": "62:1-62:2" + "loc": "70:1-70:2" }, { "token": [ "LIDENT", "println" ], - "loc": "63:3-63:10" + "loc": "71:3-71:10" }, { "token": "LPAREN", - "loc": "63:10-63:11" + "loc": "71:10-71:11" }, { "token": [ "LIDENT", "writer" ], - "loc": "63:11-63:17" + "loc": "71:11-71:17" }, { "token": [ "DOT_INT", 0 ], - "loc": "63:18-63:19" + "loc": "71:18-71:19" }, { "token": [ "DOT_LIDENT", "to_string" ], - "loc": "63:20-63:29" + "loc": "71:20-71:29" }, { "token": "LPAREN", - "loc": "63:29-63:30" + "loc": "71:29-71:30" }, { "token": "RPAREN", - "loc": "63:30-63:31" + "loc": "71:30-71:31" }, { "token": "RPAREN", - "loc": "63:31-63:32" + "loc": "71:31-71:32" }, { "token": [ "SEMI", false ], - "loc": "63:32-63:32" + "loc": "71:32-71:32" }, { "token": "NEWLINE", - "loc": "63:32-63:33" + "loc": "71:32-71:33" }, { "token": "NEWLINE", - "loc": "64:1-64:2" + "loc": "72:1-72:2" }, { "token": "LET", - "loc": "65:3-65:6" + "loc": "73:3-73:6" }, { "token": [ "LIDENT", "trace" ], - "loc": "65:7-65:12" + "loc": "73:7-73:12" }, { "token": "COLON", - "loc": "65:13-65:14" + "loc": "73:13-73:14" }, { "token": [ "UIDENT", "TraceWriter" ], - "loc": "65:15-65:26" + "loc": "73:15-73:26" }, { "token": "EQUAL", - "loc": "65:27-65:28" + "loc": "73:27-73:28" }, { "token": [ "UIDENT", "StringBuilder" ], - "loc": "65:29-65:42" + "loc": "73:29-73:42" }, { "token": "COLONCOLON", - "loc": "65:42-65:44" + "loc": "73:42-73:44" }, { "token": [ "LIDENT", "new" ], - "loc": "65:44-65:47" + "loc": "73:44-73:47" }, { "token": "LPAREN", - "loc": "65:47-65:48" + "loc": "73:47-73:48" }, { "token": "RPAREN", - "loc": "65:48-65:49" + "loc": "73:48-73:49" }, { "token": [ "SEMI", false ], - "loc": "65:49-65:49" + "loc": "73:49-73:49" }, { "token": "NEWLINE", - "loc": "65:49-65:50" + "loc": "73:49-73:50" }, { "token": [ "LIDENT", "trace" ], - "loc": "66:3-66:8" + "loc": "74:3-74:8" }, { "token": "LT_PLUS", - "loc": "66:9-66:11" + "loc": "74:9-74:11" }, { "token": [ "STRING", "" ], - "loc": "66:12-66:14" + "loc": "74:12-74:14" }, { "token": [ "SEMI", false ], - "loc": "66:14-66:14" + "loc": "74:14-74:14" }, { "token": "NEWLINE", - "loc": "66:14-66:15" + "loc": "74:14-74:15" }, { "token": [ "LIDENT", "trace" ], - "loc": "67:3-67:8" + "loc": "75:3-75:8" }, { "token": "LT_PLUS", - "loc": "67:9-67:11" + "loc": "75:9-75:11" }, { "token": [ "INTERP", "\"asdf\\{def}\"" ], - "loc": "67:12-67:24" + "loc": "75:12-75:24" }, { "token": [ "SEMI", false ], - "loc": "67:24-67:24" + "loc": "75:24-75:24" }, { "token": "NEWLINE", - "loc": "67:24-67:25" + "loc": "75:24-75:25" }, { "token": [ "LIDENT", "println" ], - "loc": "68:3-68:10" + "loc": "76:3-76:10" }, { "token": "LPAREN", - "loc": "68:10-68:11" + "loc": "76:10-76:11" }, { "token": [ "LIDENT", "trace" ], - "loc": "68:11-68:16" + "loc": "76:11-76:16" }, { "token": [ "DOT_INT", 0 ], - "loc": "68:17-68:18" + "loc": "76:17-76:18" }, { "token": [ "DOT_LIDENT", "to_string" ], - "loc": "68:19-68:28" + "loc": "76:19-76:28" }, { "token": "LPAREN", - "loc": "68:28-68:29" + "loc": "76:28-76:29" }, { "token": "RPAREN", - "loc": "68:29-68:30" + "loc": "76:29-76:30" }, { "token": "RPAREN", - "loc": "68:30-68:31" + "loc": "76:30-76:31" }, { "token": [ "SEMI", false ], - "loc": "68:31-68:31" + "loc": "76:31-76:31" }, { "token": "NEWLINE", - "loc": "68:31-68:32" + "loc": "76:31-76:32" }, { "token": "NEWLINE", - "loc": "69:1-69:2" + "loc": "77:1-77:2" + }, + { + "token": "LET", + "loc": "78:3-78:6" }, { "token": [ "LIDENT", - "consume_sql" + "sql" ], - "loc": "70:3-70:14" + "loc": "78:7-78:10" }, { - "token": "LPAREN", - "loc": "70:14-70:15" + "token": "EQUAL", + "loc": "78:11-78:12" + }, + { + "token": [ + "UIDENT", + "Sql" + ], + "loc": "78:13-78:16" + }, + { + "token": "COLONCOLON", + "loc": "78:16-78:18" }, { "token": [ "UIDENT", "Sql" ], - "loc": "70:15-70:18" + "loc": "78:18-78:21" + }, + { + "token": "LPAREN", + "loc": "78:21-78:22" + }, + { + "token": "RPAREN", + "loc": "78:22-78:23" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "78:23-78:23" + }, + { + "token": "NEWLINE", + "loc": "78:23-78:24" + }, + { + "token": [ + "LIDENT", + "sql" + ], + "loc": "79:3-79:6" }, { "token": "LT_PLUS", - "loc": "70:19-70:21" + "loc": "79:7-79:9" }, { "token": [ "INTERP", "\"select \\{def} from dual\"" ], - "loc": "70:22-70:47" + "loc": "79:10-79:35" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "79:35-79:35" + }, + { + "token": "NEWLINE", + "loc": "79:35-79:36" + }, + { + "token": [ + "LIDENT", + "consume_sql" + ], + "loc": "80:3-80:14" + }, + { + "token": "LPAREN", + "loc": "80:14-80:15" + }, + { + "token": [ + "LIDENT", + "sql" + ], + "loc": "80:15-80:18" + }, + { + "token": [ + "DOT_LIDENT", + "write_end" + ], + "loc": "80:19-80:28" + }, + { + "token": "LPAREN", + "loc": "80:28-80:29" + }, + { + "token": "RPAREN", + "loc": "80:29-80:30" }, { "token": "RPAREN", - "loc": "70:47-70:48" + "loc": "80:30-80:31" }, { "token": [ "SEMI", false ], - "loc": "70:48-70:48" + "loc": "80:31-80:31" }, { "token": "NEWLINE", - "loc": "70:48-70:49" + "loc": "80:31-80:32" }, { "token": "NEWLINE", - "loc": "71:1-71:2" + "loc": "81:1-81:2" }, { "token": "LET", - "loc": "72:3-72:6" + "loc": "82:3-82:6" }, { "token": [ "LIDENT", "builder" ], - "loc": "72:7-72:14" + "loc": "82:7-82:14" }, { "token": "EQUAL", - "loc": "72:15-72:16" + "loc": "82:15-82:16" }, { "token": [ "UIDENT", "StringBuilder" ], - "loc": "72:17-72:30" + "loc": "82:17-82:30" }, { "token": "COLONCOLON", - "loc": "72:30-72:32" + "loc": "82:30-82:32" }, { "token": [ "LIDENT", "new" ], - "loc": "72:32-72:35" + "loc": "82:32-82:35" }, { "token": "LPAREN", - "loc": "72:35-72:36" + "loc": "82:35-82:36" }, { "token": "RPAREN", - "loc": "72:36-72:37" + "loc": "82:36-82:37" }, { "token": [ "SEMI", false ], - "loc": "72:37-72:37" + "loc": "82:37-82:37" }, { "token": "NEWLINE", - "loc": "72:37-72:38" + "loc": "82:37-82:38" }, { "token": [ "LIDENT", "builder" ], - "loc": "73:3-73:10" + "loc": "83:3-83:10" }, { "token": "LT_PLUS", - "loc": "73:11-73:13" + "loc": "83:11-83:13" }, { "token": [ "INTERP", "\"abc\\{to_repr(def)}ghi\"" ], - "loc": "73:14-73:37" + "loc": "83:14-83:37" }, { "token": [ "SEMI", false ], - "loc": "73:37-73:37" + "loc": "83:37-83:37" }, { "token": "NEWLINE", - "loc": "73:37-73:38" + "loc": "83:37-83:38" }, { "token": [ "LIDENT", "println" ], - "loc": "74:3-74:10" + "loc": "84:3-84:10" }, { "token": "LPAREN", - "loc": "74:10-74:11" + "loc": "84:10-84:11" }, { "token": [ "LIDENT", "builder" ], - "loc": "74:11-74:18" + "loc": "84:11-84:18" + }, + { + "token": [ + "DOT_LIDENT", + "to_string" + ], + "loc": "84:19-84:28" + }, + { + "token": "LPAREN", + "loc": "84:28-84:29" + }, + { + "token": "RPAREN", + "loc": "84:29-84:30" + }, + { + "token": "RPAREN", + "loc": "84:30-84:31" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "84:31-84:31" + }, + { + "token": "NEWLINE", + "loc": "84:31-84:32" + }, + { + "token": "NEWLINE", + "loc": "85:1-85:2" + }, + { + "token": "LET", + "loc": "86:3-86:6" + }, + { + "token": [ + "LIDENT", + "call_builder" + ], + "loc": "86:7-86:19" + }, + { + "token": "EQUAL", + "loc": "86:20-86:21" + }, + { + "token": [ + "UIDENT", + "StringBuilder" + ], + "loc": "86:22-86:35" + }, + { + "token": "COLONCOLON", + "loc": "86:35-86:37" + }, + { + "token": [ + "LIDENT", + "new" + ], + "loc": "86:37-86:40" + }, + { + "token": "LPAREN", + "loc": "86:40-86:41" + }, + { + "token": "RPAREN", + "loc": "86:41-86:42" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "86:42-86:42" + }, + { + "token": "NEWLINE", + "loc": "86:42-86:43" + }, + { + "token": [ + "LIDENT", + "get_builder" + ], + "loc": "87:3-87:14" + }, + { + "token": "LPAREN", + "loc": "87:14-87:15" + }, + { + "token": [ + "LIDENT", + "call_builder" + ], + "loc": "87:15-87:27" + }, + { + "token": "RPAREN", + "loc": "87:27-87:28" + }, + { + "token": "LT_PLUS", + "loc": "87:29-87:31" + }, + { + "token": [ + "STRING", + "call" + ], + "loc": "87:32-87:38" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "87:38-87:38" + }, + { + "token": "NEWLINE", + "loc": "87:38-87:39" + }, + { + "token": [ + "LIDENT", + "println" + ], + "loc": "88:3-88:10" + }, + { + "token": "LPAREN", + "loc": "88:10-88:11" + }, + { + "token": [ + "LIDENT", + "call_builder" + ], + "loc": "88:11-88:23" + }, + { + "token": [ + "DOT_LIDENT", + "to_string" + ], + "loc": "88:24-88:33" + }, + { + "token": "LPAREN", + "loc": "88:33-88:34" + }, + { + "token": "RPAREN", + "loc": "88:34-88:35" + }, + { + "token": "RPAREN", + "loc": "88:35-88:36" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "88:36-88:36" + }, + { + "token": "NEWLINE", + "loc": "88:36-88:37" + }, + { + "token": "NEWLINE", + "loc": "89:1-89:2" + }, + { + "token": "LET", + "loc": "90:3-90:6" + }, + { + "token": [ + "LIDENT", + "holder" + ], + "loc": "90:7-90:13" + }, + { + "token": "COLON", + "loc": "90:14-90:15" + }, + { + "token": [ + "UIDENT", + "Holder" + ], + "loc": "90:16-90:22" + }, + { + "token": "EQUAL", + "loc": "90:23-90:24" + }, + { + "token": "LBRACE", + "loc": "90:25-90:26" + }, + { + "token": [ + "LIDENT", + "builder" + ], + "loc": "90:27-90:34" + }, + { + "token": "COLON", + "loc": "90:34-90:35" + }, + { + "token": [ + "UIDENT", + "StringBuilder" + ], + "loc": "90:36-90:49" + }, + { + "token": "COLONCOLON", + "loc": "90:49-90:51" + }, + { + "token": [ + "LIDENT", + "new" + ], + "loc": "90:51-90:54" + }, + { + "token": "LPAREN", + "loc": "90:54-90:55" + }, + { + "token": "RPAREN", + "loc": "90:55-90:56" + }, + { + "token": "RBRACE", + "loc": "90:57-90:58" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "90:58-90:58" + }, + { + "token": "NEWLINE", + "loc": "90:58-90:59" + }, + { + "token": [ + "LIDENT", + "holder" + ], + "loc": "91:3-91:9" + }, + { + "token": [ + "DOT_LIDENT", + "builder" + ], + "loc": "91:10-91:17" + }, + { + "token": "LT_PLUS", + "loc": "91:18-91:20" + }, + { + "token": [ + "STRING", + "field" + ], + "loc": "91:21-91:28" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "91:28-91:28" + }, + { + "token": "NEWLINE", + "loc": "91:28-91:29" + }, + { + "token": [ + "LIDENT", + "println" + ], + "loc": "92:3-92:10" + }, + { + "token": "LPAREN", + "loc": "92:10-92:11" + }, + { + "token": [ + "LIDENT", + "holder" + ], + "loc": "92:11-92:17" + }, + { + "token": [ + "DOT_LIDENT", + "builder" + ], + "loc": "92:18-92:25" + }, + { + "token": [ + "DOT_LIDENT", + "to_string" + ], + "loc": "92:26-92:35" + }, + { + "token": "LPAREN", + "loc": "92:35-92:36" + }, + { + "token": "RPAREN", + "loc": "92:36-92:37" + }, + { + "token": "RPAREN", + "loc": "92:37-92:38" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "92:38-92:38" + }, + { + "token": "NEWLINE", + "loc": "92:38-92:39" + }, + { + "token": "NEWLINE", + "loc": "93:1-93:2" + }, + { + "token": "LET", + "loc": "94:3-94:6" + }, + { + "token": [ + "LIDENT", + "builders" + ], + "loc": "94:7-94:15" + }, + { + "token": "EQUAL", + "loc": "94:16-94:17" + }, + { + "token": "LBRACKET", + "loc": "94:18-94:19" + }, + { + "token": [ + "UIDENT", + "StringBuilder" + ], + "loc": "94:19-94:32" + }, + { + "token": "COLONCOLON", + "loc": "94:32-94:34" + }, + { + "token": [ + "LIDENT", + "new" + ], + "loc": "94:34-94:37" + }, + { + "token": "LPAREN", + "loc": "94:37-94:38" + }, + { + "token": "RPAREN", + "loc": "94:38-94:39" + }, + { + "token": "RBRACKET", + "loc": "94:39-94:40" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "94:40-94:40" + }, + { + "token": "NEWLINE", + "loc": "94:40-94:41" + }, + { + "token": [ + "LIDENT", + "builders" + ], + "loc": "95:3-95:11" + }, + { + "token": "LBRACKET", + "loc": "95:11-95:12" + }, + { + "token": [ + "INT", + "0" + ], + "loc": "95:12-95:13" + }, + { + "token": "RBRACKET", + "loc": "95:13-95:14" + }, + { + "token": "LT_PLUS", + "loc": "95:15-95:17" + }, + { + "token": [ + "STRING", + "index" + ], + "loc": "95:18-95:25" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "95:25-95:25" + }, + { + "token": "NEWLINE", + "loc": "95:25-95:26" + }, + { + "token": [ + "LIDENT", + "println" + ], + "loc": "96:3-96:10" + }, + { + "token": "LPAREN", + "loc": "96:10-96:11" + }, + { + "token": [ + "LIDENT", + "builders" + ], + "loc": "96:11-96:19" + }, + { + "token": "LBRACKET", + "loc": "96:19-96:20" + }, + { + "token": [ + "INT", + "0" + ], + "loc": "96:20-96:21" + }, + { + "token": "RBRACKET", + "loc": "96:21-96:22" + }, + { + "token": [ + "DOT_LIDENT", + "to_string" + ], + "loc": "96:23-96:32" + }, + { + "token": "LPAREN", + "loc": "96:32-96:33" + }, + { + "token": "RPAREN", + "loc": "96:33-96:34" + }, + { + "token": "RPAREN", + "loc": "96:34-96:35" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "96:35-96:35" + }, + { + "token": "NEWLINE", + "loc": "96:35-96:36" + }, + { + "token": "NEWLINE", + "loc": "97:1-97:2" + }, + { + "token": "LET", + "loc": "98:3-98:6" + }, + { + "token": [ + "LIDENT", + "paren_builder" + ], + "loc": "98:7-98:20" + }, + { + "token": "EQUAL", + "loc": "98:21-98:22" + }, + { + "token": [ + "UIDENT", + "StringBuilder" + ], + "loc": "98:23-98:36" + }, + { + "token": "COLONCOLON", + "loc": "98:36-98:38" + }, + { + "token": [ + "LIDENT", + "new" + ], + "loc": "98:38-98:41" + }, + { + "token": "LPAREN", + "loc": "98:41-98:42" + }, + { + "token": "RPAREN", + "loc": "98:42-98:43" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "98:43-98:43" + }, + { + "token": "NEWLINE", + "loc": "98:43-98:44" + }, + { + "token": "LPAREN", + "loc": "99:3-99:4" + }, + { + "token": [ + "LIDENT", + "paren_builder" + ], + "loc": "99:4-99:17" + }, + { + "token": "RPAREN", + "loc": "99:17-99:18" + }, + { + "token": "LT_PLUS", + "loc": "99:19-99:21" + }, + { + "token": [ + "INTERP", + "\"paren \\{1}\"" + ], + "loc": "99:22-99:34" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "99:34-99:34" + }, + { + "token": "NEWLINE", + "loc": "99:34-99:35" + }, + { + "token": [ + "LIDENT", + "println" + ], + "loc": "100:3-100:10" + }, + { + "token": "LPAREN", + "loc": "100:10-100:11" + }, + { + "token": [ + "LIDENT", + "paren_builder" + ], + "loc": "100:11-100:24" }, { "token": [ "DOT_LIDENT", "to_string" ], - "loc": "74:19-74:28" + "loc": "100:25-100:34" }, { "token": "LPAREN", - "loc": "74:28-74:29" + "loc": "100:34-100:35" }, { "token": "RPAREN", - "loc": "74:29-74:30" + "loc": "100:35-100:36" }, { "token": "RPAREN", - "loc": "74:30-74:31" + "loc": "100:36-100:37" }, { "token": "NEWLINE", - "loc": "74:31-74:32" + "loc": "100:37-100:38" }, { "token": "RBRACE", - "loc": "75:1-75:2" + "loc": "101:1-101:2" }, { "token": [ "SEMI", false ], - "loc": "75:2-75:2" + "loc": "101:2-101:2" }, { "token": "NEWLINE", - "loc": "75:2-75:3" + "loc": "101:2-101:3" }, { "token": "EOF", - "loc": "76:1-76:1" + "loc": "102:1-102:1" } ] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/pipeline_test_templated_writing_lambda.json b/test/sync_test/__snapshot__/pipeline_test_templated_writing_lambda.json index 7dddffbe..50493d0f 100644 --- a/test/sync_test/__snapshot__/pipeline_test_templated_writing_lambda.json +++ b/test/sync_test/__snapshot__/pipeline_test_templated_writing_lambda.json @@ -96,7 +96,7 @@ "kind": "Binder", "loc": null, "children": { - "name": "write" + "name": "write_string_interpolation" } }, "has_error": null, @@ -1396,7 +1396,7 @@ } } }, - "loc": null + "is_conditional": false } } ] diff --git a/test/sync_test/__snapshot__/pipeline_test_templated_writing_lambda.mbt b/test/sync_test/__snapshot__/pipeline_test_templated_writing_lambda.mbt index 7f3c2c95..dde4ff58 100644 --- a/test/sync_test/__snapshot__/pipeline_test_templated_writing_lambda.mbt +++ b/test/sync_test/__snapshot__/pipeline_test_templated_writing_lambda.mbt @@ -1,6 +1,6 @@ struct Writer(StringBuilder) -fn Writer::write(self : Self, value : String) -> Unit { +fn Writer::write_string_interpolation(self : Self, value : String) -> Unit { self.0.write_string("[write:") self.0.write_string(value) self.0.write_string("]") diff --git a/test/sync_test/__snapshot__/pipeline_test_templated_writing_lambda.mbt.tokens.json b/test/sync_test/__snapshot__/pipeline_test_templated_writing_lambda.mbt.tokens.json index 56f14f3a..5c5775e2 100644 --- a/test/sync_test/__snapshot__/pipeline_test_templated_writing_lambda.mbt.tokens.json +++ b/test/sync_test/__snapshot__/pipeline_test_templated_writing_lambda.mbt.tokens.json @@ -58,76 +58,76 @@ { "token": [ "LIDENT", - "write" + "write_string_interpolation" ], - "loc": "3:12-3:17" + "loc": "3:12-3:38" }, { "token": "LPAREN", - "loc": "3:17-3:18" + "loc": "3:38-3:39" }, { "token": [ "LIDENT", "self" ], - "loc": "3:18-3:22" + "loc": "3:39-3:43" }, { "token": "COLON", - "loc": "3:23-3:24" + "loc": "3:44-3:45" }, { "token": [ "UIDENT", "Self" ], - "loc": "3:25-3:29" + "loc": "3:46-3:50" }, { "token": "COMMA", - "loc": "3:29-3:30" + "loc": "3:50-3:51" }, { "token": [ "LIDENT", "value" ], - "loc": "3:31-3:36" + "loc": "3:52-3:57" }, { "token": "COLON", - "loc": "3:37-3:38" + "loc": "3:58-3:59" }, { "token": [ "UIDENT", "String" ], - "loc": "3:39-3:45" + "loc": "3:60-3:66" }, { "token": "RPAREN", - "loc": "3:45-3:46" + "loc": "3:66-3:67" }, { "token": "THIN_ARROW", - "loc": "3:47-3:49" + "loc": "3:68-3:70" }, { "token": [ "UIDENT", "Unit" ], - "loc": "3:50-3:54" + "loc": "3:71-3:75" }, { "token": "LBRACE", - "loc": "3:55-3:56" + "loc": "3:76-3:77" }, { "token": "NEWLINE", - "loc": "3:56-3:57" + "loc": "3:77-3:78" }, { "token": [ diff --git a/test/sync_test/__snapshot__/pipeline_test_test.json b/test/sync_test/__snapshot__/pipeline_test_test.json index 0f5ab190..e7ba622a 100644 --- a/test/sync_test/__snapshot__/pipeline_test_test.json +++ b/test/sync_test/__snapshot__/pipeline_test_test.json @@ -298,7 +298,8 @@ "kind": "Expr::Array::ExprList", "loc": null, "children": [] - } + }, + "is_iter": false } }, "body": { @@ -516,7 +517,8 @@ } } ] - } + }, + "is_iter": false } }, "method_name": { diff --git a/test/sync_test/__snapshot__/pipeline_test_test_lift_data.json b/test/sync_test/__snapshot__/pipeline_test_test_lift_data.json index f05cfa1e..37dab7a5 100644 --- a/test/sync_test/__snapshot__/pipeline_test_test_lift_data.json +++ b/test/sync_test/__snapshot__/pipeline_test_test_lift_data.json @@ -5805,7 +5805,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { diff --git a/test/sync_test/__snapshot__/pipeline_test_test_map.json b/test/sync_test/__snapshot__/pipeline_test_test_map.json index c87549df..7bac0f89 100644 --- a/test/sync_test/__snapshot__/pipeline_test_test_map.json +++ b/test/sync_test/__snapshot__/pipeline_test_test_map.json @@ -748,7 +748,8 @@ } } ] - } + }, + "is_iter": false } } ] @@ -817,7 +818,8 @@ } } ] - } + }, + "is_iter": false } } ] diff --git a/test/sync_test/__snapshot__/pipeline_test_tlink_to_obj.json b/test/sync_test/__snapshot__/pipeline_test_tlink_to_obj.json index e5320a09..e95453b2 100644 --- a/test/sync_test/__snapshot__/pipeline_test_tlink_to_obj.json +++ b/test/sync_test/__snapshot__/pipeline_test_tlink_to_obj.json @@ -310,6 +310,11 @@ } ] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, @@ -895,7 +900,8 @@ } } ] - } + }, + "is_iter": false } }, "ty": { diff --git a/test/sync_test/__snapshot__/pipeline_test_to_string.json b/test/sync_test/__snapshot__/pipeline_test_to_string.json index a2f0001a..2f906471 100644 --- a/test/sync_test/__snapshot__/pipeline_test_to_string.json +++ b/test/sync_test/__snapshot__/pipeline_test_to_string.json @@ -570,7 +570,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { diff --git a/test/sync_test/__snapshot__/pipeline_test_tokenize_suffix.json b/test/sync_test/__snapshot__/pipeline_test_tokenize_suffix.json index 5c1d8ad4..67a00080 100644 --- a/test/sync_test/__snapshot__/pipeline_test_tokenize_suffix.json +++ b/test/sync_test/__snapshot__/pipeline_test_tokenize_suffix.json @@ -422,71 +422,137 @@ "loc": null, "children": { "value": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", - "loc": null, - "children": { - "value": "lex_suffix" - } - } + "value": "to_result" } } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", "loc": null, - "children": [ - { - "kind": "Argument", + "children": { + "value": { + "kind": "Expr::Function", "loc": null, "children": { - "value": { - "kind": "Expr::Constant", + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "constant": { - "kind": "Constant::String", + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Apply", "loc": null, "children": { - "value": "test.txt" + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "lex_suffix" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "test.txt" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } } - } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } - ] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} + } } - } + ] }, - "kind": { - "kind": "TryOperatorKind::Question", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -540,71 +606,137 @@ "loc": null, "children": { "value": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", - "loc": null, - "children": { - "value": "lex_suffix" - } - } + "value": "to_result" } } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", "loc": null, - "children": [ - { - "kind": "Argument", + "children": { + "value": { + "kind": "Expr::Function", "loc": null, "children": { - "value": { - "kind": "Expr::Constant", + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "constant": { - "kind": "Constant::String", + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Apply", "loc": null, "children": { - "value": "test.txt.tar.gz" + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "lex_suffix" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "test.txt.tar.gz" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } } - } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } - ] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} + } } - } + ] }, - "kind": { - "kind": "TryOperatorKind::Question", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -658,71 +790,137 @@ "loc": null, "children": { "value": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", - "loc": null, - "children": { - "value": "lex_suffix" - } - } + "value": "to_result" } } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", "loc": null, - "children": [ - { - "kind": "Argument", + "children": { + "value": { + "kind": "Expr::Function", "loc": null, "children": { - "value": { - "kind": "Expr::Constant", + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "constant": { - "kind": "Constant::String", + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Apply", "loc": null, "children": { - "value": "test.txt.tar.gz.tar.gz" + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "lex_suffix" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "test.txt.tar.gz.tar.gz" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } } - } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } - ] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} + } } - } + ] }, - "kind": { - "kind": "TryOperatorKind::Question", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -776,71 +974,137 @@ "loc": null, "children": { "value": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", - "loc": null, - "children": { - "value": "lex_suffix" - } - } + "value": "to_result" } } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", "loc": null, - "children": [ - { - "kind": "Argument", + "children": { + "value": { + "kind": "Expr::Function", "loc": null, "children": { - "value": { - "kind": "Expr::Constant", + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "constant": { - "kind": "Constant::String", + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Apply", "loc": null, "children": { - "value": "test.txt.tar.gz.tar.gz.tar.gz" + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "lex_suffix" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "test.txt.tar.gz.tar.gz.tar.gz" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } } - } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } - ] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} + } } - } + ] }, - "kind": { - "kind": "TryOperatorKind::Question", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -894,71 +1158,137 @@ "loc": null, "children": { "value": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", - "loc": null, - "children": { - "value": "lex_suffix" - } - } + "value": "to_result" } } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", "loc": null, - "children": [ - { - "kind": "Argument", + "children": { + "value": { + "kind": "Expr::Function", "loc": null, "children": { - "value": { - "kind": "Expr::Constant", + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "constant": { - "kind": "Constant::String", + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Apply", "loc": null, "children": { - "value": "test.txt.tar.gz.tar.gz.tar.gz.tar.gz" + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "lex_suffix" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "test.txt.tar.gz.tar.gz.tar.gz.tar.gz" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } } - } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } - ] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} + } } - } + ] }, - "kind": { - "kind": "TryOperatorKind::Question", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -1012,71 +1342,137 @@ "loc": null, "children": { "value": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", - "loc": null, - "children": { - "value": "lex_suffix" - } - } + "value": "to_result" } } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", "loc": null, - "children": [ - { - "kind": "Argument", + "children": { + "value": { + "kind": "Expr::Function", "loc": null, "children": { - "value": { - "kind": "Expr::Constant", + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "constant": { - "kind": "Constant::String", + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Apply", "loc": null, "children": { - "value": "test.txt.tar.gz.tar.gz.tar.gz.tar.gz.tar.gz" + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "lex_suffix" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "test.txt.tar.gz.tar.gz.tar.gz.tar.gz.tar.gz" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } } - } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } - ] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} + } } - } + ] }, - "kind": { - "kind": "TryOperatorKind::Question", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -1132,71 +1528,137 @@ "loc": null, "children": { "value": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", - "loc": null, - "children": { - "value": "lex_suffix" - } - } + "value": "to_result" } } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", "loc": null, - "children": [ - { - "kind": "Argument", + "children": { + "value": { + "kind": "Expr::Function", "loc": null, "children": { - "value": { - "kind": "Expr::Constant", + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "constant": { - "kind": "Constant::String", + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Apply", "loc": null, "children": { - "value": "test.txt.tar.gz.tar.gz.tar.gz.tar.gz.tar.gz" + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "lex_suffix" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "test.txt.tar.gz.tar.gz.tar.gz.tar.gz.tar.gz" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } } - } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } - ] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} + } } - } + ] }, - "kind": { - "kind": "TryOperatorKind::Question", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -1223,5 +1685,524 @@ } } } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "to_result" + } + }, + "has_error": null, + "is_async": null, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "f" + } + }, + "ty": { + "kind": "Type::Arrow", + "loc": null, + "children": { + "args": { + "kind": "Type::Arrow::ArgList", + "loc": null, + "children": [] + }, + "res": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "T" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "err": { + "kind": "ErrorType::ErrorType", + "loc": null, + "children": { + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "E" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + "is_async": null + } + } + } + } + ] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [ + { + "kind": "TypeVarBinder", + "loc": null, + "children": { + "name": "T", + "constraints": { + "kind": "TypeVarBinder::TypeVarConstraintList", + "loc": null, + "children": [] + } + } + }, + { + "kind": "TypeVarBinder", + "loc": null, + "children": { + "name": "E", + "constraints": { + "kind": "TypeVarBinder::TypeVarConstraintList", + "loc": null, + "children": [ + { + "kind": "TypeVarConstraint", + "loc": null, + "children": { + "trait": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Error" + } + } + } + } + ] + } + } + } + ] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [ + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "T" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "E" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + ] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::Try", + "loc": null, + "children": { + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "f" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "catch": { + "kind": "Expr::Try::CaseList", + "loc": null, + "children": [ + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "err" + } + } + } + }, + "guard": null, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Err" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::TypeName", + "loc": null, + "children": { + "value": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + }, + "is_object": false + } + } + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "err" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + ] + }, + "catch_all": false, + "try_else": { + "kind": "Expr::Try::CaseList", + "loc": null, + "children": [ + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "value" + } + } + } + }, + "guard": null, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Ok" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::TypeName", + "loc": null, + "children": { + "value": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + }, + "is_object": false + } + } + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "value" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + ] + }, + "has_try": true + } + } + } + } + } } ] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/pipeline_test_tokenize_suffix.mbt b/test/sync_test/__snapshot__/pipeline_test_tokenize_suffix.mbt index df27c0b6..96efc292 100644 --- a/test/sync_test/__snapshot__/pipeline_test_tokenize_suffix.mbt +++ b/test/sync_test/__snapshot__/pipeline_test_tokenize_suffix.mbt @@ -8,11 +8,20 @@ fn lex_suffix(str : StringView) -> StringView raise { } fn main { - debug(try? lex_suffix("test.txt")) - debug(try? lex_suffix("test.txt.tar.gz")) - debug(try? lex_suffix("test.txt.tar.gz.tar.gz")) - debug(try? lex_suffix("test.txt.tar.gz.tar.gz.tar.gz")) - debug(try? lex_suffix("test.txt.tar.gz.tar.gz.tar.gz.tar.gz")) - debug(try? lex_suffix("test.txt.tar.gz.tar.gz.tar.gz.tar.gz.tar.gz")) - debug(try? lex_suffix("test.txt.tar.gz.tar.gz.tar.gz.tar.gz.tar.gz")) + debug(to_result(() => lex_suffix("test.txt"))) + debug(to_result(() => lex_suffix("test.txt.tar.gz"))) + debug(to_result(() => lex_suffix("test.txt.tar.gz.tar.gz"))) + debug(to_result(() => lex_suffix("test.txt.tar.gz.tar.gz.tar.gz"))) + debug(to_result(() => lex_suffix("test.txt.tar.gz.tar.gz.tar.gz.tar.gz"))) + debug(to_result(() => lex_suffix("test.txt.tar.gz.tar.gz.tar.gz.tar.gz.tar.gz"))) + debug(to_result(() => lex_suffix("test.txt.tar.gz.tar.gz.tar.gz.tar.gz.tar.gz"))) +} + +fn[T, E : Error] to_result(f : () -> T raise E) -> Result[T, E] { + try f() + catch { + err => Result::Err(err) + } noraise { + value => Result::Ok(value) + } } diff --git a/test/sync_test/__snapshot__/pipeline_test_tokenize_suffix.mbt.tokens.json b/test/sync_test/__snapshot__/pipeline_test_tokenize_suffix.mbt.tokens.json index bd83163a..8a95fcf0 100644 --- a/test/sync_test/__snapshot__/pipeline_test_tokenize_suffix.mbt.tokens.json +++ b/test/sync_test/__snapshot__/pipeline_test_tokenize_suffix.mbt.tokens.json @@ -267,45 +267,68 @@ "loc": "11:8-11:9" }, { - "token": "TRY_QUESTION", - "loc": "11:9-11:13" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "11:9-11:18" + }, + { + "token": "LPAREN", + "loc": "11:18-11:19" + }, + { + "token": "LPAREN", + "loc": "11:19-11:20" + }, + { + "token": "RPAREN", + "loc": "11:20-11:21" + }, + { + "token": "FAT_ARROW", + "loc": "11:22-11:24" }, { "token": [ "LIDENT", "lex_suffix" ], - "loc": "11:14-11:24" + "loc": "11:25-11:35" }, { "token": "LPAREN", - "loc": "11:24-11:25" + "loc": "11:35-11:36" }, { "token": [ "STRING", "test.txt" ], - "loc": "11:25-11:35" + "loc": "11:36-11:46" }, { "token": "RPAREN", - "loc": "11:35-11:36" + "loc": "11:46-11:47" }, { "token": "RPAREN", - "loc": "11:36-11:37" + "loc": "11:47-11:48" + }, + { + "token": "RPAREN", + "loc": "11:48-11:49" }, { "token": [ "SEMI", false ], - "loc": "11:37-11:37" + "loc": "11:49-11:49" }, { "token": "NEWLINE", - "loc": "11:37-11:38" + "loc": "11:49-11:50" }, { "token": [ @@ -319,45 +342,68 @@ "loc": "12:8-12:9" }, { - "token": "TRY_QUESTION", - "loc": "12:9-12:13" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "12:9-12:18" + }, + { + "token": "LPAREN", + "loc": "12:18-12:19" + }, + { + "token": "LPAREN", + "loc": "12:19-12:20" + }, + { + "token": "RPAREN", + "loc": "12:20-12:21" + }, + { + "token": "FAT_ARROW", + "loc": "12:22-12:24" }, { "token": [ "LIDENT", "lex_suffix" ], - "loc": "12:14-12:24" + "loc": "12:25-12:35" }, { "token": "LPAREN", - "loc": "12:24-12:25" + "loc": "12:35-12:36" }, { "token": [ "STRING", "test.txt.tar.gz" ], - "loc": "12:25-12:42" + "loc": "12:36-12:53" + }, + { + "token": "RPAREN", + "loc": "12:53-12:54" }, { "token": "RPAREN", - "loc": "12:42-12:43" + "loc": "12:54-12:55" }, { "token": "RPAREN", - "loc": "12:43-12:44" + "loc": "12:55-12:56" }, { "token": [ "SEMI", false ], - "loc": "12:44-12:44" + "loc": "12:56-12:56" }, { "token": "NEWLINE", - "loc": "12:44-12:45" + "loc": "12:56-12:57" }, { "token": [ @@ -371,45 +417,68 @@ "loc": "13:8-13:9" }, { - "token": "TRY_QUESTION", - "loc": "13:9-13:13" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "13:9-13:18" + }, + { + "token": "LPAREN", + "loc": "13:18-13:19" + }, + { + "token": "LPAREN", + "loc": "13:19-13:20" + }, + { + "token": "RPAREN", + "loc": "13:20-13:21" + }, + { + "token": "FAT_ARROW", + "loc": "13:22-13:24" }, { "token": [ "LIDENT", "lex_suffix" ], - "loc": "13:14-13:24" + "loc": "13:25-13:35" }, { "token": "LPAREN", - "loc": "13:24-13:25" + "loc": "13:35-13:36" }, { "token": [ "STRING", "test.txt.tar.gz.tar.gz" ], - "loc": "13:25-13:49" + "loc": "13:36-13:60" + }, + { + "token": "RPAREN", + "loc": "13:60-13:61" }, { "token": "RPAREN", - "loc": "13:49-13:50" + "loc": "13:61-13:62" }, { "token": "RPAREN", - "loc": "13:50-13:51" + "loc": "13:62-13:63" }, { "token": [ "SEMI", false ], - "loc": "13:51-13:51" + "loc": "13:63-13:63" }, { "token": "NEWLINE", - "loc": "13:51-13:52" + "loc": "13:63-13:64" }, { "token": [ @@ -423,45 +492,68 @@ "loc": "14:8-14:9" }, { - "token": "TRY_QUESTION", - "loc": "14:9-14:13" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "14:9-14:18" + }, + { + "token": "LPAREN", + "loc": "14:18-14:19" + }, + { + "token": "LPAREN", + "loc": "14:19-14:20" + }, + { + "token": "RPAREN", + "loc": "14:20-14:21" + }, + { + "token": "FAT_ARROW", + "loc": "14:22-14:24" }, { "token": [ "LIDENT", "lex_suffix" ], - "loc": "14:14-14:24" + "loc": "14:25-14:35" }, { "token": "LPAREN", - "loc": "14:24-14:25" + "loc": "14:35-14:36" }, { "token": [ "STRING", "test.txt.tar.gz.tar.gz.tar.gz" ], - "loc": "14:25-14:56" + "loc": "14:36-14:67" }, { "token": "RPAREN", - "loc": "14:56-14:57" + "loc": "14:67-14:68" }, { "token": "RPAREN", - "loc": "14:57-14:58" + "loc": "14:68-14:69" + }, + { + "token": "RPAREN", + "loc": "14:69-14:70" }, { "token": [ "SEMI", false ], - "loc": "14:58-14:58" + "loc": "14:70-14:70" }, { "token": "NEWLINE", - "loc": "14:58-14:59" + "loc": "14:70-14:71" }, { "token": [ @@ -475,45 +567,68 @@ "loc": "15:8-15:9" }, { - "token": "TRY_QUESTION", - "loc": "15:9-15:13" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "15:9-15:18" + }, + { + "token": "LPAREN", + "loc": "15:18-15:19" + }, + { + "token": "LPAREN", + "loc": "15:19-15:20" + }, + { + "token": "RPAREN", + "loc": "15:20-15:21" + }, + { + "token": "FAT_ARROW", + "loc": "15:22-15:24" }, { "token": [ "LIDENT", "lex_suffix" ], - "loc": "15:14-15:24" + "loc": "15:25-15:35" }, { "token": "LPAREN", - "loc": "15:24-15:25" + "loc": "15:35-15:36" }, { "token": [ "STRING", "test.txt.tar.gz.tar.gz.tar.gz.tar.gz" ], - "loc": "15:25-15:63" + "loc": "15:36-15:74" + }, + { + "token": "RPAREN", + "loc": "15:74-15:75" }, { "token": "RPAREN", - "loc": "15:63-15:64" + "loc": "15:75-15:76" }, { "token": "RPAREN", - "loc": "15:64-15:65" + "loc": "15:76-15:77" }, { "token": [ "SEMI", false ], - "loc": "15:65-15:65" + "loc": "15:77-15:77" }, { "token": "NEWLINE", - "loc": "15:65-15:66" + "loc": "15:77-15:78" }, { "token": [ @@ -527,45 +642,68 @@ "loc": "16:8-16:9" }, { - "token": "TRY_QUESTION", - "loc": "16:9-16:13" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "16:9-16:18" + }, + { + "token": "LPAREN", + "loc": "16:18-16:19" + }, + { + "token": "LPAREN", + "loc": "16:19-16:20" + }, + { + "token": "RPAREN", + "loc": "16:20-16:21" + }, + { + "token": "FAT_ARROW", + "loc": "16:22-16:24" }, { "token": [ "LIDENT", "lex_suffix" ], - "loc": "16:14-16:24" + "loc": "16:25-16:35" }, { "token": "LPAREN", - "loc": "16:24-16:25" + "loc": "16:35-16:36" }, { "token": [ "STRING", "test.txt.tar.gz.tar.gz.tar.gz.tar.gz.tar.gz" ], - "loc": "16:25-16:70" + "loc": "16:36-16:81" + }, + { + "token": "RPAREN", + "loc": "16:81-16:82" }, { "token": "RPAREN", - "loc": "16:70-16:71" + "loc": "16:82-16:83" }, { "token": "RPAREN", - "loc": "16:71-16:72" + "loc": "16:83-16:84" }, { "token": [ "SEMI", false ], - "loc": "16:72-16:72" + "loc": "16:84-16:84" }, { "token": "NEWLINE", - "loc": "16:72-16:73" + "loc": "16:84-16:85" }, { "token": [ @@ -579,38 +717,61 @@ "loc": "17:8-17:9" }, { - "token": "TRY_QUESTION", - "loc": "17:9-17:13" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "17:9-17:18" + }, + { + "token": "LPAREN", + "loc": "17:18-17:19" + }, + { + "token": "LPAREN", + "loc": "17:19-17:20" + }, + { + "token": "RPAREN", + "loc": "17:20-17:21" + }, + { + "token": "FAT_ARROW", + "loc": "17:22-17:24" }, { "token": [ "LIDENT", "lex_suffix" ], - "loc": "17:14-17:24" + "loc": "17:25-17:35" }, { "token": "LPAREN", - "loc": "17:24-17:25" + "loc": "17:35-17:36" }, { "token": [ "STRING", "test.txt.tar.gz.tar.gz.tar.gz.tar.gz.tar.gz" ], - "loc": "17:25-17:70" + "loc": "17:36-17:81" }, { "token": "RPAREN", - "loc": "17:70-17:71" + "loc": "17:81-17:82" }, { "token": "RPAREN", - "loc": "17:71-17:72" + "loc": "17:82-17:83" + }, + { + "token": "RPAREN", + "loc": "17:83-17:84" }, { "token": "NEWLINE", - "loc": "17:72-17:73" + "loc": "17:84-17:85" }, { "token": "RBRACE", @@ -627,8 +788,324 @@ "token": "NEWLINE", "loc": "18:2-18:3" }, + { + "token": "NEWLINE", + "loc": "19:1-19:2" + }, + { + "token": "FN", + "loc": "20:1-20:3" + }, + { + "token": "LBRACKET", + "loc": "20:3-20:4" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "20:4-20:5" + }, + { + "token": "COMMA", + "loc": "20:5-20:6" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "20:7-20:8" + }, + { + "token": "COLON", + "loc": "20:9-20:10" + }, + { + "token": [ + "UIDENT", + "Error" + ], + "loc": "20:11-20:16" + }, + { + "token": "RBRACKET", + "loc": "20:16-20:17" + }, + { + "token": [ + "LIDENT", + "to_result" + ], + "loc": "20:18-20:27" + }, + { + "token": "LPAREN", + "loc": "20:27-20:28" + }, + { + "token": [ + "LIDENT", + "f" + ], + "loc": "20:28-20:29" + }, + { + "token": "COLON", + "loc": "20:30-20:31" + }, + { + "token": "LPAREN", + "loc": "20:32-20:33" + }, + { + "token": "RPAREN", + "loc": "20:33-20:34" + }, + { + "token": "THIN_ARROW", + "loc": "20:35-20:37" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "20:38-20:39" + }, + { + "token": "RAISE", + "loc": "20:40-20:45" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "20:46-20:47" + }, + { + "token": "RPAREN", + "loc": "20:47-20:48" + }, + { + "token": "THIN_ARROW", + "loc": "20:49-20:51" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "20:52-20:58" + }, + { + "token": "LBRACKET", + "loc": "20:58-20:59" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "20:59-20:60" + }, + { + "token": "COMMA", + "loc": "20:60-20:61" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "20:62-20:63" + }, + { + "token": "RBRACKET", + "loc": "20:63-20:64" + }, + { + "token": "LBRACE", + "loc": "20:65-20:66" + }, + { + "token": "NEWLINE", + "loc": "20:66-20:67" + }, + { + "token": "TRY", + "loc": "21:3-21:6" + }, + { + "token": [ + "LIDENT", + "f" + ], + "loc": "21:7-21:8" + }, + { + "token": "LPAREN", + "loc": "21:8-21:9" + }, + { + "token": "RPAREN", + "loc": "21:9-21:10" + }, + { + "token": "NEWLINE", + "loc": "21:10-21:11" + }, + { + "token": "CATCH", + "loc": "22:3-22:8" + }, + { + "token": "LBRACE", + "loc": "22:9-22:10" + }, + { + "token": "NEWLINE", + "loc": "22:10-22:11" + }, + { + "token": [ + "LIDENT", + "err" + ], + "loc": "23:5-23:8" + }, + { + "token": "FAT_ARROW", + "loc": "23:9-23:11" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "23:12-23:18" + }, + { + "token": "COLONCOLON", + "loc": "23:18-23:20" + }, + { + "token": [ + "UIDENT", + "Err" + ], + "loc": "23:20-23:23" + }, + { + "token": "LPAREN", + "loc": "23:23-23:24" + }, + { + "token": [ + "LIDENT", + "err" + ], + "loc": "23:24-23:27" + }, + { + "token": "RPAREN", + "loc": "23:27-23:28" + }, + { + "token": "NEWLINE", + "loc": "23:28-23:29" + }, + { + "token": "RBRACE", + "loc": "24:3-24:4" + }, + { + "token": "NORAISE", + "loc": "24:5-24:12" + }, + { + "token": "LBRACE", + "loc": "24:13-24:14" + }, + { + "token": "NEWLINE", + "loc": "24:14-24:15" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "25:5-25:10" + }, + { + "token": "FAT_ARROW", + "loc": "25:11-25:13" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "25:14-25:20" + }, + { + "token": "COLONCOLON", + "loc": "25:20-25:22" + }, + { + "token": [ + "UIDENT", + "Ok" + ], + "loc": "25:22-25:24" + }, + { + "token": "LPAREN", + "loc": "25:24-25:25" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "25:25-25:30" + }, + { + "token": "RPAREN", + "loc": "25:30-25:31" + }, + { + "token": "NEWLINE", + "loc": "25:31-25:32" + }, + { + "token": "RBRACE", + "loc": "26:3-26:4" + }, + { + "token": "NEWLINE", + "loc": "26:4-26:5" + }, + { + "token": "RBRACE", + "loc": "27:1-27:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "27:2-27:2" + }, + { + "token": "NEWLINE", + "loc": "27:2-27:3" + }, { "token": "EOF", - "loc": "19:1-19:1" + "loc": "28:1-28:1" } ] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/pipeline_test_trait.json b/test/sync_test/__snapshot__/pipeline_test_trait.json index 575a690f..91d274a0 100644 --- a/test/sync_test/__snapshot__/pipeline_test_trait.json +++ b/test/sync_test/__snapshot__/pipeline_test_trait.json @@ -350,6 +350,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, @@ -900,6 +905,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, @@ -1502,6 +1512,11 @@ } ] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, diff --git a/test/sync_test/__snapshot__/pipeline_test_trait_alias.json b/test/sync_test/__snapshot__/pipeline_test_trait_alias.json index 3c302d2c..23ec1611 100644 --- a/test/sync_test/__snapshot__/pipeline_test_trait_alias.json +++ b/test/sync_test/__snapshot__/pipeline_test_trait_alias.json @@ -176,6 +176,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, @@ -341,6 +346,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, @@ -1079,6 +1089,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, diff --git a/test/sync_test/__snapshot__/pipeline_test_trait_labelled.json b/test/sync_test/__snapshot__/pipeline_test_trait_labelled.json index 10401829..6db6b696 100644 --- a/test/sync_test/__snapshot__/pipeline_test_trait_labelled.json +++ b/test/sync_test/__snapshot__/pipeline_test_trait_labelled.json @@ -608,6 +608,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, @@ -1965,6 +1970,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, diff --git a/test/sync_test/__snapshot__/pipeline_test_trait_method_builtin_type.json b/test/sync_test/__snapshot__/pipeline_test_trait_method_builtin_type.json index a64e3c82..8b1bb48e 100644 --- a/test/sync_test/__snapshot__/pipeline_test_trait_method_builtin_type.json +++ b/test/sync_test/__snapshot__/pipeline_test_trait_method_builtin_type.json @@ -162,7 +162,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { diff --git a/test/sync_test/__snapshot__/pipeline_test_trait_method_no_self.json b/test/sync_test/__snapshot__/pipeline_test_trait_method_no_self.json index 19731cc0..261663bd 100644 --- a/test/sync_test/__snapshot__/pipeline_test_trait_method_no_self.json +++ b/test/sync_test/__snapshot__/pipeline_test_trait_method_no_self.json @@ -348,6 +348,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, @@ -503,6 +508,11 @@ } ] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, @@ -742,7 +752,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -871,11 +882,13 @@ } } ] - } + }, + "is_iter": false } } ] - } + }, + "is_iter": false } }, "kind": { diff --git a/test/sync_test/__snapshot__/pipeline_test_trait_obj.json b/test/sync_test/__snapshot__/pipeline_test_trait_obj.json index 46bad2ea..f8842523 100644 --- a/test/sync_test/__snapshot__/pipeline_test_trait_obj.json +++ b/test/sync_test/__snapshot__/pipeline_test_trait_obj.json @@ -483,6 +483,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, @@ -747,6 +752,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, @@ -2480,7 +2490,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { diff --git a/test/sync_test/__snapshot__/pipeline_test_trait_obj3.json b/test/sync_test/__snapshot__/pipeline_test_trait_obj3.json index 7be20ae5..43f343aa 100644 --- a/test/sync_test/__snapshot__/pipeline_test_trait_obj3.json +++ b/test/sync_test/__snapshot__/pipeline_test_trait_obj3.json @@ -217,6 +217,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, diff --git a/test/sync_test/__snapshot__/pipeline_test_trait_obj_bound.json b/test/sync_test/__snapshot__/pipeline_test_trait_obj_bound.json index f11da8f0..4df5b3ba 100644 --- a/test/sync_test/__snapshot__/pipeline_test_trait_obj_bound.json +++ b/test/sync_test/__snapshot__/pipeline_test_trait_obj_bound.json @@ -508,6 +508,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, diff --git a/test/sync_test/__snapshot__/pipeline_test_trait_obj_simple.json b/test/sync_test/__snapshot__/pipeline_test_trait_obj_simple.json index 542b1b3c..4a597517 100644 --- a/test/sync_test/__snapshot__/pipeline_test_trait_obj_simple.json +++ b/test/sync_test/__snapshot__/pipeline_test_trait_obj_simple.json @@ -492,6 +492,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, diff --git a/test/sync_test/__snapshot__/pipeline_test_trait_poly_method.json b/test/sync_test/__snapshot__/pipeline_test_trait_poly_method.json new file mode 100644 index 00000000..fe9a7793 --- /dev/null +++ b/test/sync_test/__snapshot__/pipeline_test_trait_poly_method.json @@ -0,0 +1,4507 @@ +[ + { + "kind": "Impl::TopTrait", + "loc": null, + "children": { + "value": { + "kind": "TraitDecl", + "loc": null, + "children": { + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "I" + } + }, + "supers": { + "kind": "TraitDecl::SuperList", + "loc": null, + "children": [] + }, + "methods": { + "kind": "TraitDecl::MethodList", + "loc": null, + "children": [ + { + "kind": "TraitMethodDecl", + "loc": null, + "children": { + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "no_bound" + } + }, + "has_error": null, + "is_async": null, + "quantifiers": { + "kind": "TraitMethodDecl::QuantifierList", + "loc": null, + "children": [ + { + "kind": "TypeVarBinder", + "loc": null, + "children": { + "name": "X", + "constraints": { + "kind": "TypeVarBinder::TypeVarConstraintList", + "loc": null, + "children": [] + } + } + } + ] + }, + "params": { + "kind": "TraitMethodDecl::ParamList", + "loc": null, + "children": [ + { + "kind": "Parameter::DiscardPositional", + "loc": null, + "children": { + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Self" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + { + "kind": "Parameter::DiscardPositional", + "loc": null, + "children": { + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "X" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + } + ] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Unit" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "has_default": null, + "attrs": { + "kind": "TraitMethodDecl::AttrList", + "loc": null, + "children": [ + { + "kind": "Attribute", + "loc": null, + "children": { + "raw": "#as_free_fn" + } + } + ] + } + } + }, + { + "kind": "TraitMethodDecl", + "loc": null, + "children": { + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "has_bound" + } + }, + "has_error": null, + "is_async": null, + "quantifiers": { + "kind": "TraitMethodDecl::QuantifierList", + "loc": null, + "children": [ + { + "kind": "TypeVarBinder", + "loc": null, + "children": { + "name": "X", + "constraints": { + "kind": "TypeVarBinder::TypeVarConstraintList", + "loc": null, + "children": [ + { + "kind": "TypeVarConstraint", + "loc": null, + "children": { + "trait": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Show" + } + } + } + } + ] + } + } + } + ] + }, + "params": { + "kind": "TraitMethodDecl::ParamList", + "loc": null, + "children": [ + { + "kind": "Parameter::DiscardPositional", + "loc": null, + "children": { + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Self" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + { + "kind": "Parameter::DiscardPositional", + "loc": null, + "children": { + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "X" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + } + ] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Unit" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "has_default": null, + "attrs": { + "kind": "TraitMethodDecl::AttrList", + "loc": null, + "children": [ + { + "kind": "Attribute", + "loc": null, + "children": { + "raw": "#as_free_fn" + } + } + ] + } + } + } + ] + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "is_declare": false, + "attrs": { + "kind": "TraitDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + } + } + }, + { + "kind": "Impl::TopTypeDef", + "loc": null, + "children": { + "value": { + "kind": "TypeDecl", + "loc": null, + "children": { + "tycon": "T1", + "params": { + "kind": "TypeDecl::ParamList", + "loc": null, + "children": [] + }, + "components": { + "kind": "TypeDesc::TupleStruct", + "loc": null, + "children": { + "value": { + "kind": "TypeDesc::TupleStruct::TypeList", + "loc": null, + "children": [ + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Int" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + ] + } + } + }, + "attrs": { + "kind": "TypeDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "", + "type_vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "is_declare": false, + "deriving": { + "kind": "TypeDecl::DerivingList", + "loc": null, + "children": [] + } + } + } + } + }, + { + "kind": "Impl::TopImpl", + "loc": null, + "children": { + "self_ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "T1" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "trait": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "I" + } + }, + "is_object": false + } + }, + "method_name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "no_bound" + } + }, + "has_error": null, + "quantifiers": { + "kind": "Impl::TopImpl::QuantifierList", + "loc": null, + "children": [] + }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, + "params": { + "kind": "Impl::TopImpl::ParamList", + "loc": null, + "children": [ + { + "kind": "Parameter::DiscardPositional", + "loc": null, + "children": { + "ty": null + } + }, + { + "kind": "Parameter::DiscardPositional", + "loc": null, + "children": { + "ty": null + } + } + ] + }, + "ret_ty": null, + "err_ty": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "no bound" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "Impl::TopImpl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + { + "kind": "Impl::TopImpl", + "loc": null, + "children": { + "self_ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "T1" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "trait": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "I" + } + }, + "is_object": false + } + }, + "method_name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "has_bound" + } + }, + "has_error": null, + "quantifiers": { + "kind": "Impl::TopImpl::QuantifierList", + "loc": null, + "children": [] + }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, + "params": { + "kind": "Impl::TopImpl::ParamList", + "loc": null, + "children": [ + { + "kind": "Parameter::DiscardPositional", + "loc": null, + "children": { + "ty": null + } + }, + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "x" + } + }, + "ty": null + } + } + ] + }, + "ret_ty": null, + "err_ty": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "x" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "Impl::TopImpl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "init" + } + }, + "has_error": null, + "is_async": null, + "decl_params": null, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [] + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::Let", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "t1" + } + } + } + }, + "expr": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "T1" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::NoExtraInfo", + "loc": null, + "children": {} + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "42" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "body": { + "kind": "Expr::Sequence", + "loc": null, + "children": { + "exprs": { + "kind": "Expr::Sequence::ExprList", + "loc": null, + "children": [ + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Method", + "loc": null, + "children": { + "type_name": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "I" + } + }, + "is_object": false + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "no_bound" + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "t1" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "t1" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "no_bound" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "t1" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "t1" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Method", + "loc": null, + "children": { + "type_name": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "I" + } + }, + "is_object": false + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "has_bound" + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "t1" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "42" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + ] + }, + "last_expr": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "has_bound" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "t1" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "42" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + } + } + } + } + } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "poly" + } + }, + "has_error": null, + "is_async": null, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "x" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "X" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + } + ] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [ + { + "kind": "TypeVarBinder", + "loc": null, + "children": { + "name": "X", + "constraints": { + "kind": "TypeVarBinder::TypeVarConstraintList", + "loc": null, + "children": [ + { + "kind": "TypeVarConstraint", + "loc": null, + "children": { + "trait": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "I" + } + } + } + } + ] + } + } + } + ] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Unit" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::Sequence", + "loc": null, + "children": { + "exprs": { + "kind": "Expr::Sequence::ExprList", + "loc": null, + "children": [ + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "==== inside polymorphic function ====" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "x" + } + } + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "no_bound" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "42" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "x" + } + } + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "no_bound" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "x" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Method", + "loc": null, + "children": { + "type_name": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "I" + } + }, + "is_object": false + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "no_bound" + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "x" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "x" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "x" + } + } + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "has_bound" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "42" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + ] + }, + "last_expr": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Method", + "loc": null, + "children": { + "type_name": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "I" + } + }, + "is_object": false + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "has_bound" + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "x" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "42" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + } + } + } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "init" + } + }, + "has_error": null, + "is_async": null, + "decl_params": null, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [] + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "poly" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "T1" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::NoExtraInfo", + "loc": null, + "children": {} + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "42" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + } + }, + { + "kind": "Impl::TopTypeDef", + "loc": null, + "children": { + "value": { + "kind": "TypeDecl", + "loc": null, + "children": { + "tycon": "P", + "params": { + "kind": "TypeDecl::ParamList", + "loc": null, + "children": [ + { + "kind": "TypeDeclBinder", + "loc": null, + "children": { + "name": "X" + } + } + ] + }, + "components": { + "kind": "TypeDesc::TupleStruct", + "loc": null, + "children": { + "value": { + "kind": "TypeDesc::TupleStruct::TypeList", + "loc": null, + "children": [ + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "X" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + ] + } + } + }, + "attrs": { + "kind": "TypeDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "", + "type_vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "is_declare": false, + "deriving": { + "kind": "TypeDecl::DerivingList", + "loc": null, + "children": [] + } + } + } + } + }, + { + "kind": "Impl::TopImpl", + "loc": null, + "children": { + "self_ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "P" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [ + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "X" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + ] + } + } + }, + "trait": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "I" + } + }, + "is_object": false + } + }, + "method_name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "no_bound" + } + }, + "has_error": null, + "quantifiers": { + "kind": "Impl::TopImpl::QuantifierList", + "loc": null, + "children": [ + { + "kind": "TypeVarBinder", + "loc": null, + "children": { + "name": "X", + "constraints": { + "kind": "TypeVarBinder::TypeVarConstraintList", + "loc": null, + "children": [ + { + "kind": "TypeVarConstraint", + "loc": null, + "children": { + "trait": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "I" + } + } + } + } + ] + } + } + } + ] + }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, + "params": { + "kind": "Impl::TopImpl::ParamList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "self" + } + }, + "ty": null + } + }, + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "x" + } + }, + "ty": null + } + } + ] + }, + "ret_ty": null, + "err_ty": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Field", + "loc": null, + "children": { + "record": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "self" + } + } + } + } + } + }, + "accessor": { + "kind": "Accessor::Index", + "loc": null, + "children": { + "tuple_index": 0 + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "no_bound" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "x" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "Impl::TopImpl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + { + "kind": "Impl::TopImpl", + "loc": null, + "children": { + "self_ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "P" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [ + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "X" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + ] + } + } + }, + "trait": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "I" + } + }, + "is_object": false + } + }, + "method_name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "has_bound" + } + }, + "has_error": null, + "quantifiers": { + "kind": "Impl::TopImpl::QuantifierList", + "loc": null, + "children": [ + { + "kind": "TypeVarBinder", + "loc": null, + "children": { + "name": "X", + "constraints": { + "kind": "TypeVarBinder::TypeVarConstraintList", + "loc": null, + "children": [ + { + "kind": "TypeVarConstraint", + "loc": null, + "children": { + "trait": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "I" + } + } + } + } + ] + } + } + } + ] + }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, + "params": { + "kind": "Impl::TopImpl::ParamList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "self" + } + }, + "ty": null + } + }, + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "x" + } + }, + "ty": null + } + } + ] + }, + "ret_ty": null, + "err_ty": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Field", + "loc": null, + "children": { + "record": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "self" + } + } + } + } + } + }, + "accessor": { + "kind": "Accessor::Index", + "loc": null, + "children": { + "tuple_index": 0 + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "has_bound" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "x" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "Impl::TopImpl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "init" + } + }, + "has_error": null, + "is_async": null, + "decl_params": null, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [] + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::Let", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "t1" + } + } + } + }, + "expr": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "T1" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::NoExtraInfo", + "loc": null, + "children": {} + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "42" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "body": { + "kind": "Expr::Let", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "pt1" + } + } + } + }, + "expr": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "P" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::NoExtraInfo", + "loc": null, + "children": {} + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "t1" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "body": { + "kind": "Expr::Sequence", + "loc": null, + "children": { + "exprs": { + "kind": "Expr::Sequence::ExprList", + "loc": null, + "children": [ + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Method", + "loc": null, + "children": { + "type_name": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "I" + } + }, + "is_object": false + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "no_bound" + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "pt1" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "pt1" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "no_bound" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "pt1" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "t1" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Method", + "loc": null, + "children": { + "type_name": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "I" + } + }, + "is_object": false + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "has_bound" + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "pt1" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "42" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "has_bound" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "pt1" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "42" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + ] + }, + "last_expr": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "poly" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "pt1" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + } + } + } + } + } + } + } + }, + { + "kind": "Impl::TopTrait", + "loc": null, + "children": { + "value": { + "kind": "TraitDecl", + "loc": null, + "children": { + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "PolyWithDefault" + } + }, + "supers": { + "kind": "TraitDecl::SuperList", + "loc": null, + "children": [] + }, + "methods": { + "kind": "TraitDecl::MethodList", + "loc": null, + "children": [ + { + "kind": "TraitMethodDecl", + "loc": null, + "children": { + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "with_default" + } + }, + "has_error": null, + "is_async": null, + "quantifiers": { + "kind": "TraitMethodDecl::QuantifierList", + "loc": null, + "children": [ + { + "kind": "TypeVarBinder", + "loc": null, + "children": { + "name": "X", + "constraints": { + "kind": "TypeVarBinder::TypeVarConstraintList", + "loc": null, + "children": [ + { + "kind": "TypeVarConstraint", + "loc": null, + "children": { + "trait": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Show" + } + } + } + } + ] + } + } + } + ] + }, + "params": { + "kind": "TraitMethodDecl::ParamList", + "loc": null, + "children": [ + { + "kind": "Parameter::DiscardPositional", + "loc": null, + "children": { + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Self" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + { + "kind": "Parameter::DiscardPositional", + "loc": null, + "children": { + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "X" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + } + ] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Unit" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "has_default": { + "kind": "TraitMethodDecl::HasDefault", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "TraitMethodDecl::AttrList", + "loc": null, + "children": [] + } + } + } + ] + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "is_declare": false, + "attrs": { + "kind": "TraitDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + } + } + }, + { + "kind": "Impl::TopImpl", + "loc": null, + "children": { + "self_ty": null, + "trait": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "PolyWithDefault" + } + }, + "is_object": false + } + }, + "method_name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "with_default" + } + }, + "has_error": null, + "quantifiers": { + "kind": "Impl::TopImpl::QuantifierList", + "loc": null, + "children": [] + }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, + "params": { + "kind": "Impl::TopImpl::ParamList", + "loc": null, + "children": [ + { + "kind": "Parameter::DiscardPositional", + "loc": null, + "children": { + "ty": null + } + }, + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "x" + } + }, + "ty": null + } + } + ] + }, + "ret_ty": null, + "err_ty": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Interp", + "loc": null, + "children": { + "elems": { + "kind": "Expr::Interp::ElemList", + "loc": null, + "children": [ + { + "kind": "InterpElem::Literal", + "loc": null, + "children": { + "repr": "default impl: " + } + }, + { + "kind": "InterpElem::Source", + "loc": null, + "children": { + "source": "x" + } + } + ] + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "Impl::TopImpl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + { + "kind": "Impl::TopImplRelation", + "loc": null, + "children": { + "self_ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "T1" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "trait": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "PolyWithDefault" + } + }, + "is_object": false + } + }, + "quantifiers": { + "kind": "Impl::TopImplRelation::QuantifierList", + "loc": null, + "children": [] + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "is_declare": false, + "attrs": { + "kind": "Impl::TopImplRelation::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + { + "kind": "Impl::TopImplRelation", + "loc": null, + "children": { + "self_ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "P" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [ + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "X" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + ] + } + } + }, + "trait": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "PolyWithDefault" + } + }, + "is_object": false + } + }, + "quantifiers": { + "kind": "Impl::TopImplRelation::QuantifierList", + "loc": null, + "children": [ + { + "kind": "TypeVarBinder", + "loc": null, + "children": { + "name": "X", + "constraints": { + "kind": "TypeVarBinder::TypeVarConstraintList", + "loc": null, + "children": [] + } + } + } + ] + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "is_declare": false, + "attrs": { + "kind": "Impl::TopImplRelation::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "init" + } + }, + "has_error": null, + "is_async": null, + "decl_params": null, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [] + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::Let", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "t" + } + } + } + }, + "expr": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "T1" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::NoExtraInfo", + "loc": null, + "children": {} + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "42" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "body": { + "kind": "Expr::Let", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "pt" + } + } + } + }, + "expr": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "P" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::NoExtraInfo", + "loc": null, + "children": {} + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "t" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "body": { + "kind": "Expr::Sequence", + "loc": null, + "children": { + "exprs": { + "kind": "Expr::Sequence::ExprList", + "loc": null, + "children": [ + { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "t" + } + } + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "with_default" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "42" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Method", + "loc": null, + "children": { + "type_name": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "PolyWithDefault" + } + }, + "is_object": false + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "with_default" + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "t" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "fourty-two" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "pt" + } + } + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "with_default" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "42" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + ] + }, + "last_expr": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Method", + "loc": null, + "children": { + "type_name": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "PolyWithDefault" + } + }, + "is_object": false + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "with_default" + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "pt" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "fourty-two" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + } + } + } + } + } + } + } + } +] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/pipeline_test_trait_poly_method.mbt b/test/sync_test/__snapshot__/pipeline_test_trait_poly_method.mbt new file mode 100644 index 00000000..a344e59a --- /dev/null +++ b/test/sync_test/__snapshot__/pipeline_test_trait_poly_method.mbt @@ -0,0 +1,94 @@ +///| +trait I { + #as_free_fn + fn[X] no_bound(Self, X) -> Unit + #as_free_fn + fn[X : Show] has_bound(Self, X) -> Unit +} + +///| +struct T1(Int) + +///| +impl I for T1 with fn no_bound(_, _) { + println("no bound") +} + +///| +impl I for T1 with fn has_bound(_, x) { + println(x) // ok +} + +///| +fn init { + let t1 = T1(42) + I::no_bound(t1, t1) + no_bound(t1, t1) + I::has_bound(t1, 42) + has_bound(t1, 42) +} + +///| +fn[X : I] poly(x : X) -> Unit { + println("==== inside polymorphic function ====") + x.no_bound(42) + x.no_bound(x) + I::no_bound(x, x) + x.has_bound(42) + I::has_bound(x, "42") +} + +///| +fn init { + poly(T1(42)) +} + +///| +struct P[X](X) + +///| +impl[X : I] I for P[X] with fn no_bound(self, x) { + self.0.no_bound(x) +} + +///| +impl[X : I] I for P[X] with fn has_bound(self, x) { + self.0.has_bound(x) +} + +///| +fn init { + let t1 = T1(42) + let pt1 = P(t1) + I::no_bound(pt1, pt1) + no_bound(pt1, t1) + I::has_bound(pt1, 42) + has_bound(pt1, "42") + poly(pt1) +} + +///| +trait PolyWithDefault { + fn[X : Show] with_default(Self, X) -> Unit = _ +} + +///| +impl PolyWithDefault with fn with_default(_, x) { + println("default impl: \{x}") +} + +///| +impl PolyWithDefault for T1 + +///| +impl[X] PolyWithDefault for P[X] + +///| +fn init { + let t = T1(42) + let pt = P(t) + t.with_default(42) + PolyWithDefault::with_default(t, "fourty-two") + pt.with_default(42) + PolyWithDefault::with_default(pt, "fourty-two") +} diff --git a/test/sync_test/__snapshot__/pipeline_test_trait_poly_method.mbt.tokens.json b/test/sync_test/__snapshot__/pipeline_test_trait_poly_method.mbt.tokens.json new file mode 100644 index 00000000..e85666b0 --- /dev/null +++ b/test/sync_test/__snapshot__/pipeline_test_trait_poly_method.mbt.tokens.json @@ -0,0 +1,2949 @@ +[ + { + "token": [ + "COMMENT", + { + "content": "///|", + "kind": [ + "Ownline", + { + "leading_blank_line": false, + "trailing_blank_line": false + } + ], + "consumed_by_docstring": false + } + ], + "loc": "1:1-1:5" + }, + { + "token": "NEWLINE", + "loc": "1:5-1:6" + }, + { + "token": "TRAIT", + "loc": "2:1-2:6" + }, + { + "token": [ + "UIDENT", + "I" + ], + "loc": "2:7-2:8" + }, + { + "token": "LBRACE", + "loc": "2:9-2:10" + }, + { + "token": "NEWLINE", + "loc": "2:10-2:11" + }, + { + "token": [ + "ATTRIBUTE", + { + "id": "as_free_fn", + "dot_id": "", + "raw_payload": "" + } + ], + "loc": "3:3-3:14" + }, + { + "token": "NEWLINE", + "loc": "3:14-3:15" + }, + { + "token": "FN", + "loc": "4:3-4:5" + }, + { + "token": "LBRACKET", + "loc": "4:5-4:6" + }, + { + "token": [ + "UIDENT", + "X" + ], + "loc": "4:6-4:7" + }, + { + "token": "RBRACKET", + "loc": "4:7-4:8" + }, + { + "token": [ + "LIDENT", + "no_bound" + ], + "loc": "4:9-4:17" + }, + { + "token": "LPAREN", + "loc": "4:17-4:18" + }, + { + "token": [ + "UIDENT", + "Self" + ], + "loc": "4:18-4:22" + }, + { + "token": "COMMA", + "loc": "4:22-4:23" + }, + { + "token": [ + "UIDENT", + "X" + ], + "loc": "4:24-4:25" + }, + { + "token": "RPAREN", + "loc": "4:25-4:26" + }, + { + "token": "THIN_ARROW", + "loc": "4:27-4:29" + }, + { + "token": [ + "UIDENT", + "Unit" + ], + "loc": "4:30-4:34" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "4:34-4:34" + }, + { + "token": "NEWLINE", + "loc": "4:34-4:35" + }, + { + "token": [ + "ATTRIBUTE", + { + "id": "as_free_fn", + "dot_id": "", + "raw_payload": "" + } + ], + "loc": "5:3-5:14" + }, + { + "token": "NEWLINE", + "loc": "5:14-5:15" + }, + { + "token": "FN", + "loc": "6:3-6:5" + }, + { + "token": "LBRACKET", + "loc": "6:5-6:6" + }, + { + "token": [ + "UIDENT", + "X" + ], + "loc": "6:6-6:7" + }, + { + "token": "COLON", + "loc": "6:8-6:9" + }, + { + "token": [ + "UIDENT", + "Show" + ], + "loc": "6:10-6:14" + }, + { + "token": "RBRACKET", + "loc": "6:14-6:15" + }, + { + "token": [ + "LIDENT", + "has_bound" + ], + "loc": "6:16-6:25" + }, + { + "token": "LPAREN", + "loc": "6:25-6:26" + }, + { + "token": [ + "UIDENT", + "Self" + ], + "loc": "6:26-6:30" + }, + { + "token": "COMMA", + "loc": "6:30-6:31" + }, + { + "token": [ + "UIDENT", + "X" + ], + "loc": "6:32-6:33" + }, + { + "token": "RPAREN", + "loc": "6:33-6:34" + }, + { + "token": "THIN_ARROW", + "loc": "6:35-6:37" + }, + { + "token": [ + "UIDENT", + "Unit" + ], + "loc": "6:38-6:42" + }, + { + "token": "NEWLINE", + "loc": "6:42-6:43" + }, + { + "token": "RBRACE", + "loc": "7:1-7:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "7:2-7:2" + }, + { + "token": "NEWLINE", + "loc": "7:2-7:3" + }, + { + "token": "NEWLINE", + "loc": "8:1-8:2" + }, + { + "token": [ + "COMMENT", + { + "content": "///|", + "kind": [ + "Ownline", + { + "leading_blank_line": true, + "trailing_blank_line": false + } + ], + "consumed_by_docstring": false + } + ], + "loc": "9:1-9:5" + }, + { + "token": "NEWLINE", + "loc": "9:5-9:6" + }, + { + "token": "STRUCT", + "loc": "10:1-10:7" + }, + { + "token": [ + "UIDENT", + "T1" + ], + "loc": "10:8-10:10" + }, + { + "token": "LPAREN", + "loc": "10:10-10:11" + }, + { + "token": [ + "UIDENT", + "Int" + ], + "loc": "10:11-10:14" + }, + { + "token": "RPAREN", + "loc": "10:14-10:15" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "10:15-10:15" + }, + { + "token": "NEWLINE", + "loc": "10:15-10:16" + }, + { + "token": "NEWLINE", + "loc": "11:1-11:2" + }, + { + "token": [ + "COMMENT", + { + "content": "///|", + "kind": [ + "Ownline", + { + "leading_blank_line": true, + "trailing_blank_line": false + } + ], + "consumed_by_docstring": false + } + ], + "loc": "12:1-12:5" + }, + { + "token": "NEWLINE", + "loc": "12:5-12:6" + }, + { + "token": "IMPL", + "loc": "13:1-13:5" + }, + { + "token": [ + "UIDENT", + "I" + ], + "loc": "13:6-13:7" + }, + { + "token": "FOR", + "loc": "13:8-13:11" + }, + { + "token": [ + "UIDENT", + "T1" + ], + "loc": "13:12-13:14" + }, + { + "token": "WITH", + "loc": "13:15-13:19" + }, + { + "token": "FN", + "loc": "13:20-13:22" + }, + { + "token": [ + "LIDENT", + "no_bound" + ], + "loc": "13:23-13:31" + }, + { + "token": "LPAREN", + "loc": "13:31-13:32" + }, + { + "token": "UNDERSCORE", + "loc": "13:32-13:33" + }, + { + "token": "COMMA", + "loc": "13:33-13:34" + }, + { + "token": "UNDERSCORE", + "loc": "13:35-13:36" + }, + { + "token": "RPAREN", + "loc": "13:36-13:37" + }, + { + "token": "LBRACE", + "loc": "13:38-13:39" + }, + { + "token": "NEWLINE", + "loc": "13:39-13:40" + }, + { + "token": [ + "LIDENT", + "println" + ], + "loc": "14:3-14:10" + }, + { + "token": "LPAREN", + "loc": "14:10-14:11" + }, + { + "token": [ + "STRING", + "no bound" + ], + "loc": "14:11-14:21" + }, + { + "token": "RPAREN", + "loc": "14:21-14:22" + }, + { + "token": "NEWLINE", + "loc": "14:22-14:23" + }, + { + "token": "RBRACE", + "loc": "15:1-15:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "15:2-15:2" + }, + { + "token": "NEWLINE", + "loc": "15:2-15:3" + }, + { + "token": "NEWLINE", + "loc": "16:1-16:2" + }, + { + "token": [ + "COMMENT", + { + "content": "///|", + "kind": [ + "Ownline", + { + "leading_blank_line": true, + "trailing_blank_line": false + } + ], + "consumed_by_docstring": false + } + ], + "loc": "17:1-17:5" + }, + { + "token": "NEWLINE", + "loc": "17:5-17:6" + }, + { + "token": "IMPL", + "loc": "18:1-18:5" + }, + { + "token": [ + "UIDENT", + "I" + ], + "loc": "18:6-18:7" + }, + { + "token": "FOR", + "loc": "18:8-18:11" + }, + { + "token": [ + "UIDENT", + "T1" + ], + "loc": "18:12-18:14" + }, + { + "token": "WITH", + "loc": "18:15-18:19" + }, + { + "token": "FN", + "loc": "18:20-18:22" + }, + { + "token": [ + "LIDENT", + "has_bound" + ], + "loc": "18:23-18:32" + }, + { + "token": "LPAREN", + "loc": "18:32-18:33" + }, + { + "token": "UNDERSCORE", + "loc": "18:33-18:34" + }, + { + "token": "COMMA", + "loc": "18:34-18:35" + }, + { + "token": [ + "LIDENT", + "x" + ], + "loc": "18:36-18:37" + }, + { + "token": "RPAREN", + "loc": "18:37-18:38" + }, + { + "token": "LBRACE", + "loc": "18:39-18:40" + }, + { + "token": "NEWLINE", + "loc": "18:40-18:41" + }, + { + "token": [ + "LIDENT", + "println" + ], + "loc": "19:3-19:10" + }, + { + "token": "LPAREN", + "loc": "19:10-19:11" + }, + { + "token": [ + "LIDENT", + "x" + ], + "loc": "19:11-19:12" + }, + { + "token": "RPAREN", + "loc": "19:12-19:13" + }, + { + "token": [ + "COMMENT", + { + "content": "// ok", + "kind": "InlineTrailing", + "consumed_by_docstring": false + } + ], + "loc": "19:14-19:19" + }, + { + "token": "NEWLINE", + "loc": "19:19-19:20" + }, + { + "token": "RBRACE", + "loc": "20:1-20:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "20:2-20:2" + }, + { + "token": "NEWLINE", + "loc": "20:2-20:3" + }, + { + "token": "NEWLINE", + "loc": "21:1-21:2" + }, + { + "token": [ + "COMMENT", + { + "content": "///|", + "kind": [ + "Ownline", + { + "leading_blank_line": true, + "trailing_blank_line": false + } + ], + "consumed_by_docstring": false + } + ], + "loc": "22:1-22:5" + }, + { + "token": "NEWLINE", + "loc": "22:5-22:6" + }, + { + "token": "FN", + "loc": "23:1-23:3" + }, + { + "token": [ + "LIDENT", + "init" + ], + "loc": "23:4-23:8" + }, + { + "token": "LBRACE", + "loc": "23:9-23:10" + }, + { + "token": "NEWLINE", + "loc": "23:10-23:11" + }, + { + "token": "LET", + "loc": "24:3-24:6" + }, + { + "token": [ + "LIDENT", + "t1" + ], + "loc": "24:7-24:9" + }, + { + "token": "EQUAL", + "loc": "24:10-24:11" + }, + { + "token": [ + "UIDENT", + "T1" + ], + "loc": "24:12-24:14" + }, + { + "token": "LPAREN", + "loc": "24:14-24:15" + }, + { + "token": [ + "INT", + "42" + ], + "loc": "24:15-24:17" + }, + { + "token": "RPAREN", + "loc": "24:17-24:18" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "24:18-24:18" + }, + { + "token": "NEWLINE", + "loc": "24:18-24:19" + }, + { + "token": [ + "UIDENT", + "I" + ], + "loc": "25:3-25:4" + }, + { + "token": "COLONCOLON", + "loc": "25:4-25:6" + }, + { + "token": [ + "LIDENT", + "no_bound" + ], + "loc": "25:6-25:14" + }, + { + "token": "LPAREN", + "loc": "25:14-25:15" + }, + { + "token": [ + "LIDENT", + "t1" + ], + "loc": "25:15-25:17" + }, + { + "token": "COMMA", + "loc": "25:17-25:18" + }, + { + "token": [ + "LIDENT", + "t1" + ], + "loc": "25:19-25:21" + }, + { + "token": "RPAREN", + "loc": "25:21-25:22" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "25:22-25:22" + }, + { + "token": "NEWLINE", + "loc": "25:22-25:23" + }, + { + "token": [ + "LIDENT", + "no_bound" + ], + "loc": "26:3-26:11" + }, + { + "token": "LPAREN", + "loc": "26:11-26:12" + }, + { + "token": [ + "LIDENT", + "t1" + ], + "loc": "26:12-26:14" + }, + { + "token": "COMMA", + "loc": "26:14-26:15" + }, + { + "token": [ + "LIDENT", + "t1" + ], + "loc": "26:16-26:18" + }, + { + "token": "RPAREN", + "loc": "26:18-26:19" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "26:19-26:19" + }, + { + "token": "NEWLINE", + "loc": "26:19-26:20" + }, + { + "token": [ + "UIDENT", + "I" + ], + "loc": "27:3-27:4" + }, + { + "token": "COLONCOLON", + "loc": "27:4-27:6" + }, + { + "token": [ + "LIDENT", + "has_bound" + ], + "loc": "27:6-27:15" + }, + { + "token": "LPAREN", + "loc": "27:15-27:16" + }, + { + "token": [ + "LIDENT", + "t1" + ], + "loc": "27:16-27:18" + }, + { + "token": "COMMA", + "loc": "27:18-27:19" + }, + { + "token": [ + "INT", + "42" + ], + "loc": "27:20-27:22" + }, + { + "token": "RPAREN", + "loc": "27:22-27:23" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "27:23-27:23" + }, + { + "token": "NEWLINE", + "loc": "27:23-27:24" + }, + { + "token": [ + "LIDENT", + "has_bound" + ], + "loc": "28:3-28:12" + }, + { + "token": "LPAREN", + "loc": "28:12-28:13" + }, + { + "token": [ + "LIDENT", + "t1" + ], + "loc": "28:13-28:15" + }, + { + "token": "COMMA", + "loc": "28:15-28:16" + }, + { + "token": [ + "INT", + "42" + ], + "loc": "28:17-28:19" + }, + { + "token": "RPAREN", + "loc": "28:19-28:20" + }, + { + "token": "NEWLINE", + "loc": "28:20-28:21" + }, + { + "token": "RBRACE", + "loc": "29:1-29:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "29:2-29:2" + }, + { + "token": "NEWLINE", + "loc": "29:2-29:3" + }, + { + "token": "NEWLINE", + "loc": "30:1-30:2" + }, + { + "token": [ + "COMMENT", + { + "content": "///|", + "kind": [ + "Ownline", + { + "leading_blank_line": true, + "trailing_blank_line": false + } + ], + "consumed_by_docstring": false + } + ], + "loc": "31:1-31:5" + }, + { + "token": "NEWLINE", + "loc": "31:5-31:6" + }, + { + "token": "FN", + "loc": "32:1-32:3" + }, + { + "token": "LBRACKET", + "loc": "32:3-32:4" + }, + { + "token": [ + "UIDENT", + "X" + ], + "loc": "32:4-32:5" + }, + { + "token": "COLON", + "loc": "32:6-32:7" + }, + { + "token": [ + "UIDENT", + "I" + ], + "loc": "32:8-32:9" + }, + { + "token": "RBRACKET", + "loc": "32:9-32:10" + }, + { + "token": [ + "LIDENT", + "poly" + ], + "loc": "32:11-32:15" + }, + { + "token": "LPAREN", + "loc": "32:15-32:16" + }, + { + "token": [ + "LIDENT", + "x" + ], + "loc": "32:16-32:17" + }, + { + "token": "COLON", + "loc": "32:18-32:19" + }, + { + "token": [ + "UIDENT", + "X" + ], + "loc": "32:20-32:21" + }, + { + "token": "RPAREN", + "loc": "32:21-32:22" + }, + { + "token": "THIN_ARROW", + "loc": "32:23-32:25" + }, + { + "token": [ + "UIDENT", + "Unit" + ], + "loc": "32:26-32:30" + }, + { + "token": "LBRACE", + "loc": "32:31-32:32" + }, + { + "token": "NEWLINE", + "loc": "32:32-32:33" + }, + { + "token": [ + "LIDENT", + "println" + ], + "loc": "33:3-33:10" + }, + { + "token": "LPAREN", + "loc": "33:10-33:11" + }, + { + "token": [ + "STRING", + "==== inside polymorphic function ====" + ], + "loc": "33:11-33:50" + }, + { + "token": "RPAREN", + "loc": "33:50-33:51" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "33:51-33:51" + }, + { + "token": "NEWLINE", + "loc": "33:51-33:52" + }, + { + "token": [ + "LIDENT", + "x" + ], + "loc": "34:3-34:4" + }, + { + "token": [ + "DOT_LIDENT", + "no_bound" + ], + "loc": "34:5-34:13" + }, + { + "token": "LPAREN", + "loc": "34:13-34:14" + }, + { + "token": [ + "INT", + "42" + ], + "loc": "34:14-34:16" + }, + { + "token": "RPAREN", + "loc": "34:16-34:17" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "34:17-34:17" + }, + { + "token": "NEWLINE", + "loc": "34:17-34:18" + }, + { + "token": [ + "LIDENT", + "x" + ], + "loc": "35:3-35:4" + }, + { + "token": [ + "DOT_LIDENT", + "no_bound" + ], + "loc": "35:5-35:13" + }, + { + "token": "LPAREN", + "loc": "35:13-35:14" + }, + { + "token": [ + "LIDENT", + "x" + ], + "loc": "35:14-35:15" + }, + { + "token": "RPAREN", + "loc": "35:15-35:16" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "35:16-35:16" + }, + { + "token": "NEWLINE", + "loc": "35:16-35:17" + }, + { + "token": [ + "UIDENT", + "I" + ], + "loc": "36:3-36:4" + }, + { + "token": "COLONCOLON", + "loc": "36:4-36:6" + }, + { + "token": [ + "LIDENT", + "no_bound" + ], + "loc": "36:6-36:14" + }, + { + "token": "LPAREN", + "loc": "36:14-36:15" + }, + { + "token": [ + "LIDENT", + "x" + ], + "loc": "36:15-36:16" + }, + { + "token": "COMMA", + "loc": "36:16-36:17" + }, + { + "token": [ + "LIDENT", + "x" + ], + "loc": "36:18-36:19" + }, + { + "token": "RPAREN", + "loc": "36:19-36:20" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "36:20-36:20" + }, + { + "token": "NEWLINE", + "loc": "36:20-36:21" + }, + { + "token": [ + "LIDENT", + "x" + ], + "loc": "37:3-37:4" + }, + { + "token": [ + "DOT_LIDENT", + "has_bound" + ], + "loc": "37:5-37:14" + }, + { + "token": "LPAREN", + "loc": "37:14-37:15" + }, + { + "token": [ + "INT", + "42" + ], + "loc": "37:15-37:17" + }, + { + "token": "RPAREN", + "loc": "37:17-37:18" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "37:18-37:18" + }, + { + "token": "NEWLINE", + "loc": "37:18-37:19" + }, + { + "token": [ + "UIDENT", + "I" + ], + "loc": "38:3-38:4" + }, + { + "token": "COLONCOLON", + "loc": "38:4-38:6" + }, + { + "token": [ + "LIDENT", + "has_bound" + ], + "loc": "38:6-38:15" + }, + { + "token": "LPAREN", + "loc": "38:15-38:16" + }, + { + "token": [ + "LIDENT", + "x" + ], + "loc": "38:16-38:17" + }, + { + "token": "COMMA", + "loc": "38:17-38:18" + }, + { + "token": [ + "STRING", + "42" + ], + "loc": "38:19-38:23" + }, + { + "token": "RPAREN", + "loc": "38:23-38:24" + }, + { + "token": "NEWLINE", + "loc": "38:24-38:25" + }, + { + "token": "RBRACE", + "loc": "39:1-39:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "39:2-39:2" + }, + { + "token": "NEWLINE", + "loc": "39:2-39:3" + }, + { + "token": "NEWLINE", + "loc": "40:1-40:2" + }, + { + "token": [ + "COMMENT", + { + "content": "///|", + "kind": [ + "Ownline", + { + "leading_blank_line": true, + "trailing_blank_line": false + } + ], + "consumed_by_docstring": false + } + ], + "loc": "41:1-41:5" + }, + { + "token": "NEWLINE", + "loc": "41:5-41:6" + }, + { + "token": "FN", + "loc": "42:1-42:3" + }, + { + "token": [ + "LIDENT", + "init" + ], + "loc": "42:4-42:8" + }, + { + "token": "LBRACE", + "loc": "42:9-42:10" + }, + { + "token": "NEWLINE", + "loc": "42:10-42:11" + }, + { + "token": [ + "LIDENT", + "poly" + ], + "loc": "43:3-43:7" + }, + { + "token": "LPAREN", + "loc": "43:7-43:8" + }, + { + "token": [ + "UIDENT", + "T1" + ], + "loc": "43:8-43:10" + }, + { + "token": "LPAREN", + "loc": "43:10-43:11" + }, + { + "token": [ + "INT", + "42" + ], + "loc": "43:11-43:13" + }, + { + "token": "RPAREN", + "loc": "43:13-43:14" + }, + { + "token": "RPAREN", + "loc": "43:14-43:15" + }, + { + "token": "NEWLINE", + "loc": "43:15-43:16" + }, + { + "token": "RBRACE", + "loc": "44:1-44:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "44:2-44:2" + }, + { + "token": "NEWLINE", + "loc": "44:2-44:3" + }, + { + "token": "NEWLINE", + "loc": "45:1-45:2" + }, + { + "token": [ + "COMMENT", + { + "content": "///|", + "kind": [ + "Ownline", + { + "leading_blank_line": true, + "trailing_blank_line": false + } + ], + "consumed_by_docstring": false + } + ], + "loc": "46:1-46:5" + }, + { + "token": "NEWLINE", + "loc": "46:5-46:6" + }, + { + "token": "STRUCT", + "loc": "47:1-47:7" + }, + { + "token": [ + "UIDENT", + "P" + ], + "loc": "47:8-47:9" + }, + { + "token": "LBRACKET", + "loc": "47:9-47:10" + }, + { + "token": [ + "UIDENT", + "X" + ], + "loc": "47:10-47:11" + }, + { + "token": "RBRACKET", + "loc": "47:11-47:12" + }, + { + "token": "LPAREN", + "loc": "47:12-47:13" + }, + { + "token": [ + "UIDENT", + "X" + ], + "loc": "47:13-47:14" + }, + { + "token": "RPAREN", + "loc": "47:14-47:15" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "47:15-47:15" + }, + { + "token": "NEWLINE", + "loc": "47:15-47:16" + }, + { + "token": "NEWLINE", + "loc": "48:1-48:2" + }, + { + "token": [ + "COMMENT", + { + "content": "///|", + "kind": [ + "Ownline", + { + "leading_blank_line": true, + "trailing_blank_line": false + } + ], + "consumed_by_docstring": false + } + ], + "loc": "49:1-49:5" + }, + { + "token": "NEWLINE", + "loc": "49:5-49:6" + }, + { + "token": "IMPL", + "loc": "50:1-50:5" + }, + { + "token": "LBRACKET", + "loc": "50:5-50:6" + }, + { + "token": [ + "UIDENT", + "X" + ], + "loc": "50:6-50:7" + }, + { + "token": "COLON", + "loc": "50:8-50:9" + }, + { + "token": [ + "UIDENT", + "I" + ], + "loc": "50:10-50:11" + }, + { + "token": "RBRACKET", + "loc": "50:11-50:12" + }, + { + "token": [ + "UIDENT", + "I" + ], + "loc": "50:13-50:14" + }, + { + "token": "FOR", + "loc": "50:15-50:18" + }, + { + "token": [ + "UIDENT", + "P" + ], + "loc": "50:19-50:20" + }, + { + "token": "LBRACKET", + "loc": "50:20-50:21" + }, + { + "token": [ + "UIDENT", + "X" + ], + "loc": "50:21-50:22" + }, + { + "token": "RBRACKET", + "loc": "50:22-50:23" + }, + { + "token": "WITH", + "loc": "50:24-50:28" + }, + { + "token": "FN", + "loc": "50:29-50:31" + }, + { + "token": [ + "LIDENT", + "no_bound" + ], + "loc": "50:32-50:40" + }, + { + "token": "LPAREN", + "loc": "50:40-50:41" + }, + { + "token": [ + "LIDENT", + "self" + ], + "loc": "50:41-50:45" + }, + { + "token": "COMMA", + "loc": "50:45-50:46" + }, + { + "token": [ + "LIDENT", + "x" + ], + "loc": "50:47-50:48" + }, + { + "token": "RPAREN", + "loc": "50:48-50:49" + }, + { + "token": "LBRACE", + "loc": "50:50-50:51" + }, + { + "token": "NEWLINE", + "loc": "50:51-50:52" + }, + { + "token": [ + "LIDENT", + "self" + ], + "loc": "51:3-51:7" + }, + { + "token": [ + "DOT_INT", + 0 + ], + "loc": "51:8-51:9" + }, + { + "token": [ + "DOT_LIDENT", + "no_bound" + ], + "loc": "51:10-51:18" + }, + { + "token": "LPAREN", + "loc": "51:18-51:19" + }, + { + "token": [ + "LIDENT", + "x" + ], + "loc": "51:19-51:20" + }, + { + "token": "RPAREN", + "loc": "51:20-51:21" + }, + { + "token": "NEWLINE", + "loc": "51:21-51:22" + }, + { + "token": "RBRACE", + "loc": "52:1-52:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "52:2-52:2" + }, + { + "token": "NEWLINE", + "loc": "52:2-52:3" + }, + { + "token": "NEWLINE", + "loc": "53:1-53:2" + }, + { + "token": [ + "COMMENT", + { + "content": "///|", + "kind": [ + "Ownline", + { + "leading_blank_line": true, + "trailing_blank_line": false + } + ], + "consumed_by_docstring": false + } + ], + "loc": "54:1-54:5" + }, + { + "token": "NEWLINE", + "loc": "54:5-54:6" + }, + { + "token": "IMPL", + "loc": "55:1-55:5" + }, + { + "token": "LBRACKET", + "loc": "55:5-55:6" + }, + { + "token": [ + "UIDENT", + "X" + ], + "loc": "55:6-55:7" + }, + { + "token": "COLON", + "loc": "55:8-55:9" + }, + { + "token": [ + "UIDENT", + "I" + ], + "loc": "55:10-55:11" + }, + { + "token": "RBRACKET", + "loc": "55:11-55:12" + }, + { + "token": [ + "UIDENT", + "I" + ], + "loc": "55:13-55:14" + }, + { + "token": "FOR", + "loc": "55:15-55:18" + }, + { + "token": [ + "UIDENT", + "P" + ], + "loc": "55:19-55:20" + }, + { + "token": "LBRACKET", + "loc": "55:20-55:21" + }, + { + "token": [ + "UIDENT", + "X" + ], + "loc": "55:21-55:22" + }, + { + "token": "RBRACKET", + "loc": "55:22-55:23" + }, + { + "token": "WITH", + "loc": "55:24-55:28" + }, + { + "token": "FN", + "loc": "55:29-55:31" + }, + { + "token": [ + "LIDENT", + "has_bound" + ], + "loc": "55:32-55:41" + }, + { + "token": "LPAREN", + "loc": "55:41-55:42" + }, + { + "token": [ + "LIDENT", + "self" + ], + "loc": "55:42-55:46" + }, + { + "token": "COMMA", + "loc": "55:46-55:47" + }, + { + "token": [ + "LIDENT", + "x" + ], + "loc": "55:48-55:49" + }, + { + "token": "RPAREN", + "loc": "55:49-55:50" + }, + { + "token": "LBRACE", + "loc": "55:51-55:52" + }, + { + "token": "NEWLINE", + "loc": "55:52-55:53" + }, + { + "token": [ + "LIDENT", + "self" + ], + "loc": "56:3-56:7" + }, + { + "token": [ + "DOT_INT", + 0 + ], + "loc": "56:8-56:9" + }, + { + "token": [ + "DOT_LIDENT", + "has_bound" + ], + "loc": "56:10-56:19" + }, + { + "token": "LPAREN", + "loc": "56:19-56:20" + }, + { + "token": [ + "LIDENT", + "x" + ], + "loc": "56:20-56:21" + }, + { + "token": "RPAREN", + "loc": "56:21-56:22" + }, + { + "token": "NEWLINE", + "loc": "56:22-56:23" + }, + { + "token": "RBRACE", + "loc": "57:1-57:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "57:2-57:2" + }, + { + "token": "NEWLINE", + "loc": "57:2-57:3" + }, + { + "token": "NEWLINE", + "loc": "58:1-58:2" + }, + { + "token": [ + "COMMENT", + { + "content": "///|", + "kind": [ + "Ownline", + { + "leading_blank_line": true, + "trailing_blank_line": false + } + ], + "consumed_by_docstring": false + } + ], + "loc": "59:1-59:5" + }, + { + "token": "NEWLINE", + "loc": "59:5-59:6" + }, + { + "token": "FN", + "loc": "60:1-60:3" + }, + { + "token": [ + "LIDENT", + "init" + ], + "loc": "60:4-60:8" + }, + { + "token": "LBRACE", + "loc": "60:9-60:10" + }, + { + "token": "NEWLINE", + "loc": "60:10-60:11" + }, + { + "token": "LET", + "loc": "61:3-61:6" + }, + { + "token": [ + "LIDENT", + "t1" + ], + "loc": "61:7-61:9" + }, + { + "token": "EQUAL", + "loc": "61:10-61:11" + }, + { + "token": [ + "UIDENT", + "T1" + ], + "loc": "61:12-61:14" + }, + { + "token": "LPAREN", + "loc": "61:14-61:15" + }, + { + "token": [ + "INT", + "42" + ], + "loc": "61:15-61:17" + }, + { + "token": "RPAREN", + "loc": "61:17-61:18" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "61:18-61:18" + }, + { + "token": "NEWLINE", + "loc": "61:18-61:19" + }, + { + "token": "LET", + "loc": "62:3-62:6" + }, + { + "token": [ + "LIDENT", + "pt1" + ], + "loc": "62:7-62:10" + }, + { + "token": "EQUAL", + "loc": "62:11-62:12" + }, + { + "token": [ + "UIDENT", + "P" + ], + "loc": "62:13-62:14" + }, + { + "token": "LPAREN", + "loc": "62:14-62:15" + }, + { + "token": [ + "LIDENT", + "t1" + ], + "loc": "62:15-62:17" + }, + { + "token": "RPAREN", + "loc": "62:17-62:18" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "62:18-62:18" + }, + { + "token": "NEWLINE", + "loc": "62:18-62:19" + }, + { + "token": [ + "UIDENT", + "I" + ], + "loc": "63:3-63:4" + }, + { + "token": "COLONCOLON", + "loc": "63:4-63:6" + }, + { + "token": [ + "LIDENT", + "no_bound" + ], + "loc": "63:6-63:14" + }, + { + "token": "LPAREN", + "loc": "63:14-63:15" + }, + { + "token": [ + "LIDENT", + "pt1" + ], + "loc": "63:15-63:18" + }, + { + "token": "COMMA", + "loc": "63:18-63:19" + }, + { + "token": [ + "LIDENT", + "pt1" + ], + "loc": "63:20-63:23" + }, + { + "token": "RPAREN", + "loc": "63:23-63:24" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "63:24-63:24" + }, + { + "token": "NEWLINE", + "loc": "63:24-63:25" + }, + { + "token": [ + "LIDENT", + "no_bound" + ], + "loc": "64:3-64:11" + }, + { + "token": "LPAREN", + "loc": "64:11-64:12" + }, + { + "token": [ + "LIDENT", + "pt1" + ], + "loc": "64:12-64:15" + }, + { + "token": "COMMA", + "loc": "64:15-64:16" + }, + { + "token": [ + "LIDENT", + "t1" + ], + "loc": "64:17-64:19" + }, + { + "token": "RPAREN", + "loc": "64:19-64:20" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "64:20-64:20" + }, + { + "token": "NEWLINE", + "loc": "64:20-64:21" + }, + { + "token": [ + "UIDENT", + "I" + ], + "loc": "65:3-65:4" + }, + { + "token": "COLONCOLON", + "loc": "65:4-65:6" + }, + { + "token": [ + "LIDENT", + "has_bound" + ], + "loc": "65:6-65:15" + }, + { + "token": "LPAREN", + "loc": "65:15-65:16" + }, + { + "token": [ + "LIDENT", + "pt1" + ], + "loc": "65:16-65:19" + }, + { + "token": "COMMA", + "loc": "65:19-65:20" + }, + { + "token": [ + "INT", + "42" + ], + "loc": "65:21-65:23" + }, + { + "token": "RPAREN", + "loc": "65:23-65:24" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "65:24-65:24" + }, + { + "token": "NEWLINE", + "loc": "65:24-65:25" + }, + { + "token": [ + "LIDENT", + "has_bound" + ], + "loc": "66:3-66:12" + }, + { + "token": "LPAREN", + "loc": "66:12-66:13" + }, + { + "token": [ + "LIDENT", + "pt1" + ], + "loc": "66:13-66:16" + }, + { + "token": "COMMA", + "loc": "66:16-66:17" + }, + { + "token": [ + "STRING", + "42" + ], + "loc": "66:18-66:22" + }, + { + "token": "RPAREN", + "loc": "66:22-66:23" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "66:23-66:23" + }, + { + "token": "NEWLINE", + "loc": "66:23-66:24" + }, + { + "token": [ + "LIDENT", + "poly" + ], + "loc": "67:3-67:7" + }, + { + "token": "LPAREN", + "loc": "67:7-67:8" + }, + { + "token": [ + "LIDENT", + "pt1" + ], + "loc": "67:8-67:11" + }, + { + "token": "RPAREN", + "loc": "67:11-67:12" + }, + { + "token": "NEWLINE", + "loc": "67:12-67:13" + }, + { + "token": "RBRACE", + "loc": "68:1-68:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "68:2-68:2" + }, + { + "token": "NEWLINE", + "loc": "68:2-68:3" + }, + { + "token": "NEWLINE", + "loc": "69:1-69:2" + }, + { + "token": [ + "COMMENT", + { + "content": "///|", + "kind": [ + "Ownline", + { + "leading_blank_line": true, + "trailing_blank_line": false + } + ], + "consumed_by_docstring": false + } + ], + "loc": "70:1-70:5" + }, + { + "token": "NEWLINE", + "loc": "70:5-70:6" + }, + { + "token": "TRAIT", + "loc": "71:1-71:6" + }, + { + "token": [ + "UIDENT", + "PolyWithDefault" + ], + "loc": "71:7-71:22" + }, + { + "token": "LBRACE", + "loc": "71:23-71:24" + }, + { + "token": "NEWLINE", + "loc": "71:24-71:25" + }, + { + "token": "FN", + "loc": "72:3-72:5" + }, + { + "token": "LBRACKET", + "loc": "72:5-72:6" + }, + { + "token": [ + "UIDENT", + "X" + ], + "loc": "72:6-72:7" + }, + { + "token": "COLON", + "loc": "72:8-72:9" + }, + { + "token": [ + "UIDENT", + "Show" + ], + "loc": "72:10-72:14" + }, + { + "token": "RBRACKET", + "loc": "72:14-72:15" + }, + { + "token": [ + "LIDENT", + "with_default" + ], + "loc": "72:16-72:28" + }, + { + "token": "LPAREN", + "loc": "72:28-72:29" + }, + { + "token": [ + "UIDENT", + "Self" + ], + "loc": "72:29-72:33" + }, + { + "token": "COMMA", + "loc": "72:33-72:34" + }, + { + "token": [ + "UIDENT", + "X" + ], + "loc": "72:35-72:36" + }, + { + "token": "RPAREN", + "loc": "72:36-72:37" + }, + { + "token": "THIN_ARROW", + "loc": "72:38-72:40" + }, + { + "token": [ + "UIDENT", + "Unit" + ], + "loc": "72:41-72:45" + }, + { + "token": "EQUAL", + "loc": "72:46-72:47" + }, + { + "token": "UNDERSCORE", + "loc": "72:48-72:49" + }, + { + "token": "NEWLINE", + "loc": "72:49-72:50" + }, + { + "token": "RBRACE", + "loc": "73:1-73:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "73:2-73:2" + }, + { + "token": "NEWLINE", + "loc": "73:2-73:3" + }, + { + "token": "NEWLINE", + "loc": "74:1-74:2" + }, + { + "token": [ + "COMMENT", + { + "content": "///|", + "kind": [ + "Ownline", + { + "leading_blank_line": true, + "trailing_blank_line": false + } + ], + "consumed_by_docstring": false + } + ], + "loc": "75:1-75:5" + }, + { + "token": "NEWLINE", + "loc": "75:5-75:6" + }, + { + "token": "IMPL", + "loc": "76:1-76:5" + }, + { + "token": [ + "UIDENT", + "PolyWithDefault" + ], + "loc": "76:6-76:21" + }, + { + "token": "WITH", + "loc": "76:22-76:26" + }, + { + "token": "FN", + "loc": "76:27-76:29" + }, + { + "token": [ + "LIDENT", + "with_default" + ], + "loc": "76:30-76:42" + }, + { + "token": "LPAREN", + "loc": "76:42-76:43" + }, + { + "token": "UNDERSCORE", + "loc": "76:43-76:44" + }, + { + "token": "COMMA", + "loc": "76:44-76:45" + }, + { + "token": [ + "LIDENT", + "x" + ], + "loc": "76:46-76:47" + }, + { + "token": "RPAREN", + "loc": "76:47-76:48" + }, + { + "token": "LBRACE", + "loc": "76:49-76:50" + }, + { + "token": "NEWLINE", + "loc": "76:50-76:51" + }, + { + "token": [ + "LIDENT", + "println" + ], + "loc": "77:3-77:10" + }, + { + "token": "LPAREN", + "loc": "77:10-77:11" + }, + { + "token": [ + "INTERP", + "\"default impl: \\{x}\"" + ], + "loc": "77:11-77:31" + }, + { + "token": "RPAREN", + "loc": "77:31-77:32" + }, + { + "token": "NEWLINE", + "loc": "77:32-77:33" + }, + { + "token": "RBRACE", + "loc": "78:1-78:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "78:2-78:2" + }, + { + "token": "NEWLINE", + "loc": "78:2-78:3" + }, + { + "token": "NEWLINE", + "loc": "79:1-79:2" + }, + { + "token": [ + "COMMENT", + { + "content": "///|", + "kind": [ + "Ownline", + { + "leading_blank_line": true, + "trailing_blank_line": false + } + ], + "consumed_by_docstring": false + } + ], + "loc": "80:1-80:5" + }, + { + "token": "NEWLINE", + "loc": "80:5-80:6" + }, + { + "token": "IMPL", + "loc": "81:1-81:5" + }, + { + "token": [ + "UIDENT", + "PolyWithDefault" + ], + "loc": "81:6-81:21" + }, + { + "token": "FOR", + "loc": "81:22-81:25" + }, + { + "token": [ + "UIDENT", + "T1" + ], + "loc": "81:26-81:28" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "81:28-81:28" + }, + { + "token": "NEWLINE", + "loc": "81:28-81:29" + }, + { + "token": "NEWLINE", + "loc": "82:1-82:2" + }, + { + "token": [ + "COMMENT", + { + "content": "///|", + "kind": [ + "Ownline", + { + "leading_blank_line": true, + "trailing_blank_line": false + } + ], + "consumed_by_docstring": false + } + ], + "loc": "83:1-83:5" + }, + { + "token": "NEWLINE", + "loc": "83:5-83:6" + }, + { + "token": "IMPL", + "loc": "84:1-84:5" + }, + { + "token": "LBRACKET", + "loc": "84:5-84:6" + }, + { + "token": [ + "UIDENT", + "X" + ], + "loc": "84:6-84:7" + }, + { + "token": "RBRACKET", + "loc": "84:7-84:8" + }, + { + "token": [ + "UIDENT", + "PolyWithDefault" + ], + "loc": "84:9-84:24" + }, + { + "token": "FOR", + "loc": "84:25-84:28" + }, + { + "token": [ + "UIDENT", + "P" + ], + "loc": "84:29-84:30" + }, + { + "token": "LBRACKET", + "loc": "84:30-84:31" + }, + { + "token": [ + "UIDENT", + "X" + ], + "loc": "84:31-84:32" + }, + { + "token": "RBRACKET", + "loc": "84:32-84:33" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "84:33-84:33" + }, + { + "token": "NEWLINE", + "loc": "84:33-84:34" + }, + { + "token": "NEWLINE", + "loc": "85:1-85:2" + }, + { + "token": [ + "COMMENT", + { + "content": "///|", + "kind": [ + "Ownline", + { + "leading_blank_line": true, + "trailing_blank_line": false + } + ], + "consumed_by_docstring": false + } + ], + "loc": "86:1-86:5" + }, + { + "token": "NEWLINE", + "loc": "86:5-86:6" + }, + { + "token": "FN", + "loc": "87:1-87:3" + }, + { + "token": [ + "LIDENT", + "init" + ], + "loc": "87:4-87:8" + }, + { + "token": "LBRACE", + "loc": "87:9-87:10" + }, + { + "token": "NEWLINE", + "loc": "87:10-87:11" + }, + { + "token": "LET", + "loc": "88:3-88:6" + }, + { + "token": [ + "LIDENT", + "t" + ], + "loc": "88:7-88:8" + }, + { + "token": "EQUAL", + "loc": "88:9-88:10" + }, + { + "token": [ + "UIDENT", + "T1" + ], + "loc": "88:11-88:13" + }, + { + "token": "LPAREN", + "loc": "88:13-88:14" + }, + { + "token": [ + "INT", + "42" + ], + "loc": "88:14-88:16" + }, + { + "token": "RPAREN", + "loc": "88:16-88:17" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "88:17-88:17" + }, + { + "token": "NEWLINE", + "loc": "88:17-88:18" + }, + { + "token": "LET", + "loc": "89:3-89:6" + }, + { + "token": [ + "LIDENT", + "pt" + ], + "loc": "89:7-89:9" + }, + { + "token": "EQUAL", + "loc": "89:10-89:11" + }, + { + "token": [ + "UIDENT", + "P" + ], + "loc": "89:12-89:13" + }, + { + "token": "LPAREN", + "loc": "89:13-89:14" + }, + { + "token": [ + "LIDENT", + "t" + ], + "loc": "89:14-89:15" + }, + { + "token": "RPAREN", + "loc": "89:15-89:16" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "89:16-89:16" + }, + { + "token": "NEWLINE", + "loc": "89:16-89:17" + }, + { + "token": [ + "LIDENT", + "t" + ], + "loc": "90:3-90:4" + }, + { + "token": [ + "DOT_LIDENT", + "with_default" + ], + "loc": "90:5-90:17" + }, + { + "token": "LPAREN", + "loc": "90:17-90:18" + }, + { + "token": [ + "INT", + "42" + ], + "loc": "90:18-90:20" + }, + { + "token": "RPAREN", + "loc": "90:20-90:21" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "90:21-90:21" + }, + { + "token": "NEWLINE", + "loc": "90:21-90:22" + }, + { + "token": [ + "UIDENT", + "PolyWithDefault" + ], + "loc": "91:3-91:18" + }, + { + "token": "COLONCOLON", + "loc": "91:18-91:20" + }, + { + "token": [ + "LIDENT", + "with_default" + ], + "loc": "91:20-91:32" + }, + { + "token": "LPAREN", + "loc": "91:32-91:33" + }, + { + "token": [ + "LIDENT", + "t" + ], + "loc": "91:33-91:34" + }, + { + "token": "COMMA", + "loc": "91:34-91:35" + }, + { + "token": [ + "STRING", + "fourty-two" + ], + "loc": "91:36-91:48" + }, + { + "token": "RPAREN", + "loc": "91:48-91:49" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "91:49-91:49" + }, + { + "token": "NEWLINE", + "loc": "91:49-91:50" + }, + { + "token": [ + "LIDENT", + "pt" + ], + "loc": "92:3-92:5" + }, + { + "token": [ + "DOT_LIDENT", + "with_default" + ], + "loc": "92:6-92:18" + }, + { + "token": "LPAREN", + "loc": "92:18-92:19" + }, + { + "token": [ + "INT", + "42" + ], + "loc": "92:19-92:21" + }, + { + "token": "RPAREN", + "loc": "92:21-92:22" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "92:22-92:22" + }, + { + "token": "NEWLINE", + "loc": "92:22-92:23" + }, + { + "token": [ + "UIDENT", + "PolyWithDefault" + ], + "loc": "93:3-93:18" + }, + { + "token": "COLONCOLON", + "loc": "93:18-93:20" + }, + { + "token": [ + "LIDENT", + "with_default" + ], + "loc": "93:20-93:32" + }, + { + "token": "LPAREN", + "loc": "93:32-93:33" + }, + { + "token": [ + "LIDENT", + "pt" + ], + "loc": "93:33-93:35" + }, + { + "token": "COMMA", + "loc": "93:35-93:36" + }, + { + "token": [ + "STRING", + "fourty-two" + ], + "loc": "93:37-93:49" + }, + { + "token": "RPAREN", + "loc": "93:49-93:50" + }, + { + "token": "NEWLINE", + "loc": "93:50-93:51" + }, + { + "token": "RBRACE", + "loc": "94:1-94:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "94:2-94:2" + }, + { + "token": "NEWLINE", + "loc": "94:2-94:3" + }, + { + "token": "EOF", + "loc": "95:1-95:1" + } +] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/pipeline_test_trait_upcast.json b/test/sync_test/__snapshot__/pipeline_test_trait_upcast.json index bdc86107..2a2cfae2 100644 --- a/test/sync_test/__snapshot__/pipeline_test_trait_upcast.json +++ b/test/sync_test/__snapshot__/pipeline_test_trait_upcast.json @@ -255,6 +255,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, @@ -491,6 +496,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, @@ -5482,7 +5492,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -5649,7 +5660,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { diff --git a/test/sync_test/__snapshot__/pipeline_test_tree_mutual_recursion.json b/test/sync_test/__snapshot__/pipeline_test_tree_mutual_recursion.json index 0aa1b73e..835eb064 100644 --- a/test/sync_test/__snapshot__/pipeline_test_tree_mutual_recursion.json +++ b/test/sync_test/__snapshot__/pipeline_test_tree_mutual_recursion.json @@ -2003,7 +2003,8 @@ "kind": "Expr::Array::ExprList", "loc": null, "children": [] - } + }, + "is_iter": false } }, "body": { @@ -6018,7 +6019,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -6222,7 +6224,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { diff --git a/test/sync_test/__snapshot__/pipeline_test_try_catch.json b/test/sync_test/__snapshot__/pipeline_test_try_catch.json index 60f19618..42a3306a 100644 --- a/test/sync_test/__snapshot__/pipeline_test_try_catch.json +++ b/test/sync_test/__snapshot__/pipeline_test_try_catch.json @@ -3370,6 +3370,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, diff --git a/test/sync_test/__snapshot__/pipeline_test_try_catch2.json b/test/sync_test/__snapshot__/pipeline_test_try_catch2.json index 25cb31b4..4fe768ab 100644 --- a/test/sync_test/__snapshot__/pipeline_test_try_catch2.json +++ b/test/sync_test/__snapshot__/pipeline_test_try_catch2.json @@ -997,7 +997,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -1157,7 +1158,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -1319,7 +1321,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -2427,7 +2430,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -2586,7 +2590,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -2747,7 +2752,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { diff --git a/test/sync_test/__snapshot__/pipeline_test_try_question.mbt b/test/sync_test/__snapshot__/pipeline_test_try_question.mbt index d27c0466..82b16dfd 100644 --- a/test/sync_test/__snapshot__/pipeline_test_try_question.mbt +++ b/test/sync_test/__snapshot__/pipeline_test_try_question.mbt @@ -1,3 +1,4 @@ +//!build: -w -20 suberror MyErr derive(Debug) fn f(coin : Bool) -> Int raise MyErr { diff --git a/test/sync_test/__snapshot__/pipeline_test_try_question.mbt.tokens.json b/test/sync_test/__snapshot__/pipeline_test_try_question.mbt.tokens.json index 18190d96..abbd2296 100644 --- a/test/sync_test/__snapshot__/pipeline_test_try_question.mbt.tokens.json +++ b/test/sync_test/__snapshot__/pipeline_test_try_question.mbt.tokens.json @@ -1,667 +1,688 @@ [ + { + "token": [ + "COMMENT", + { + "content": "//!build: -w -20", + "kind": [ + "Ownline", + { + "leading_blank_line": false, + "trailing_blank_line": false + } + ], + "consumed_by_docstring": false + } + ], + "loc": "1:1-1:17" + }, + { + "token": "NEWLINE", + "loc": "1:17-1:18" + }, { "token": "SUBERROR", - "loc": "1:1-1:9" + "loc": "2:1-2:9" }, { "token": [ "UIDENT", "MyErr" ], - "loc": "1:10-1:15" + "loc": "2:10-2:15" }, { "token": "DERIVE", - "loc": "1:16-1:22" + "loc": "2:16-2:22" }, { "token": "LPAREN", - "loc": "1:22-1:23" + "loc": "2:22-2:23" }, { "token": [ "UIDENT", "Debug" ], - "loc": "1:23-1:28" + "loc": "2:23-2:28" }, { "token": "RPAREN", - "loc": "1:28-1:29" + "loc": "2:28-2:29" }, { "token": [ "SEMI", false ], - "loc": "1:29-1:29" + "loc": "2:29-2:29" }, { "token": "NEWLINE", - "loc": "1:29-1:30" + "loc": "2:29-2:30" }, { "token": "NEWLINE", - "loc": "2:1-2:2" + "loc": "3:1-3:2" }, { "token": "FN", - "loc": "3:1-3:3" + "loc": "4:1-4:3" }, { "token": [ "LIDENT", "f" ], - "loc": "3:4-3:5" + "loc": "4:4-4:5" }, { "token": "LPAREN", - "loc": "3:5-3:6" + "loc": "4:5-4:6" }, { "token": [ "LIDENT", "coin" ], - "loc": "3:6-3:10" + "loc": "4:6-4:10" }, { "token": "COLON", - "loc": "3:11-3:12" + "loc": "4:11-4:12" }, { "token": [ "UIDENT", "Bool" ], - "loc": "3:13-3:17" + "loc": "4:13-4:17" }, { "token": "RPAREN", - "loc": "3:17-3:18" + "loc": "4:17-4:18" }, { "token": "THIN_ARROW", - "loc": "3:19-3:21" + "loc": "4:19-4:21" }, { "token": [ "UIDENT", "Int" ], - "loc": "3:22-3:25" + "loc": "4:22-4:25" }, { "token": "RAISE", - "loc": "3:26-3:31" + "loc": "4:26-4:31" }, { "token": [ "UIDENT", "MyErr" ], - "loc": "3:32-3:37" + "loc": "4:32-4:37" }, { "token": "LBRACE", - "loc": "3:38-3:39" + "loc": "4:38-4:39" }, { "token": "NEWLINE", - "loc": "3:39-3:40" + "loc": "4:39-4:40" }, { "token": "IF", - "loc": "4:3-4:5" + "loc": "5:3-5:5" }, { "token": [ "LIDENT", "coin" ], - "loc": "4:6-4:10" + "loc": "5:6-5:10" }, { "token": "LBRACE", - "loc": "4:11-4:12" + "loc": "5:11-5:12" }, { "token": "NEWLINE", - "loc": "4:12-4:13" + "loc": "5:12-5:13" }, { "token": [ "INT", "42" ], - "loc": "5:5-5:7" + "loc": "6:5-6:7" }, { "token": "NEWLINE", - "loc": "5:7-5:8" + "loc": "6:7-6:8" }, { "token": "RBRACE", - "loc": "6:3-6:4" + "loc": "7:3-7:4" }, { "token": "ELSE", - "loc": "6:5-6:9" + "loc": "7:5-7:9" }, { "token": "LBRACE", - "loc": "6:10-6:11" + "loc": "7:10-7:11" }, { "token": "NEWLINE", - "loc": "6:11-6:12" + "loc": "7:11-7:12" }, { "token": "RAISE", - "loc": "7:5-7:10" + "loc": "8:5-8:10" }, { "token": [ "UIDENT", "MyErr" ], - "loc": "7:11-7:16" + "loc": "8:11-8:16" }, { "token": "NEWLINE", - "loc": "7:16-7:17" + "loc": "8:16-8:17" }, { "token": "RBRACE", - "loc": "8:3-8:4" + "loc": "9:3-9:4" }, { "token": "NEWLINE", - "loc": "8:4-8:5" + "loc": "9:4-9:5" }, { "token": "RBRACE", - "loc": "9:1-9:2" + "loc": "10:1-10:2" }, { "token": [ "SEMI", false ], - "loc": "9:2-9:2" + "loc": "10:2-10:2" }, { "token": "NEWLINE", - "loc": "9:2-9:3" + "loc": "10:2-10:3" }, { "token": "NEWLINE", - "loc": "10:1-10:2" + "loc": "11:1-11:2" }, { "token": "FN", - "loc": "11:1-11:3" + "loc": "12:1-12:3" }, { "token": [ "LIDENT", "main" ], - "loc": "11:4-11:8" + "loc": "12:4-12:8" }, { "token": "LBRACE", - "loc": "11:9-11:10" + "loc": "12:9-12:10" }, { "token": "NEWLINE", - "loc": "11:10-11:11" + "loc": "12:10-12:11" }, { "token": [ "LIDENT", "debug" ], - "loc": "12:3-12:8" + "loc": "13:3-13:8" }, { "token": "LPAREN", - "loc": "12:8-12:9" + "loc": "13:8-13:9" }, { "token": "TRY_QUESTION", - "loc": "12:9-12:13" + "loc": "13:9-13:13" }, { "token": [ "LIDENT", "f" ], - "loc": "12:14-12:15" + "loc": "13:14-13:15" }, { "token": "LPAREN", - "loc": "12:15-12:16" + "loc": "13:15-13:16" }, { "token": "TRUE", - "loc": "12:16-12:20" + "loc": "13:16-13:20" }, { "token": "RPAREN", - "loc": "12:20-12:21" + "loc": "13:20-13:21" }, { "token": "RPAREN", - "loc": "12:21-12:22" + "loc": "13:21-13:22" }, { "token": [ "SEMI", false ], - "loc": "12:22-12:22" + "loc": "13:22-13:22" }, { "token": "NEWLINE", - "loc": "12:22-12:23" + "loc": "13:22-13:23" }, { "token": [ "LIDENT", "debug" ], - "loc": "13:3-13:8" + "loc": "14:3-14:8" }, { "token": "LPAREN", - "loc": "13:8-13:9" + "loc": "14:8-14:9" }, { "token": "TRY_QUESTION", - "loc": "13:9-13:13" + "loc": "14:9-14:13" }, { "token": [ "LIDENT", "f" ], - "loc": "13:14-13:15" + "loc": "14:14-14:15" }, { "token": "LPAREN", - "loc": "13:15-13:16" + "loc": "14:15-14:16" }, { "token": "FALSE", - "loc": "13:16-13:21" + "loc": "14:16-14:21" }, { "token": "RPAREN", - "loc": "13:21-13:22" + "loc": "14:21-14:22" }, { "token": "RPAREN", - "loc": "13:22-13:23" + "loc": "14:22-14:23" }, { "token": [ "SEMI", false ], - "loc": "13:23-13:23" + "loc": "14:23-14:23" }, { "token": "NEWLINE", - "loc": "13:23-13:24" + "loc": "14:23-14:24" }, { "token": [ "LIDENT", "debug" ], - "loc": "14:3-14:8" + "loc": "15:3-15:8" }, { "token": "LPAREN", - "loc": "14:8-14:9" + "loc": "15:8-15:9" }, { "token": "TRY_QUESTION", - "loc": "14:9-14:13" + "loc": "15:9-15:13" }, { "token": [ "LIDENT", "f" ], - "loc": "14:14-14:15" + "loc": "15:14-15:15" }, { "token": "LPAREN", - "loc": "14:15-14:16" + "loc": "15:15-15:16" }, { "token": [ "LIDENT", "f" ], - "loc": "14:16-14:17" + "loc": "15:16-15:17" }, { "token": "LPAREN", - "loc": "14:17-14:18" + "loc": "15:17-15:18" }, { "token": "TRUE", - "loc": "14:18-14:22" + "loc": "15:18-15:22" }, { "token": "RPAREN", - "loc": "14:22-14:23" + "loc": "15:22-15:23" }, { "token": [ "INFIX1", "<" ], - "loc": "14:24-14:25" + "loc": "15:24-15:25" }, { "token": [ "INT", "0" ], - "loc": "14:26-14:27" + "loc": "15:26-15:27" }, { "token": "RPAREN", - "loc": "14:27-14:28" + "loc": "15:27-15:28" }, { "token": "RPAREN", - "loc": "14:28-14:29" + "loc": "15:28-15:29" }, { "token": [ "SEMI", false ], - "loc": "14:29-14:29" + "loc": "15:29-15:29" }, { "token": "NEWLINE", - "loc": "14:29-14:30" + "loc": "15:29-15:30" }, { "token": "FN", - "loc": "15:3-15:5" + "loc": "16:3-16:5" }, { "token": [ "LIDENT", "outside" ], - "loc": "15:6-15:13" + "loc": "16:6-16:13" }, { "token": "LPAREN", - "loc": "15:13-15:14" + "loc": "16:13-16:14" }, { "token": [ "LIDENT", "coin" ], - "loc": "15:14-15:18" + "loc": "16:14-16:18" }, { "token": "RPAREN", - "loc": "15:18-15:19" + "loc": "16:18-16:19" }, { "token": "THIN_ARROW", - "loc": "15:20-15:22" + "loc": "16:20-16:22" }, { "token": "UNDERSCORE", - "loc": "15:23-15:24" + "loc": "16:23-16:24" }, { "token": "RAISE", - "loc": "15:25-15:30" + "loc": "16:25-16:30" }, { "token": [ "UIDENT", "MyErr" ], - "loc": "15:31-15:36" + "loc": "16:31-16:36" }, { "token": "LBRACE", - "loc": "15:37-15:38" + "loc": "16:37-16:38" }, { "token": "NEWLINE", - "loc": "15:38-15:39" + "loc": "16:38-16:39" }, { "token": "LET", - "loc": "16:5-16:8" + "loc": "17:5-17:8" }, { "token": [ "LIDENT", "x" ], - "loc": "16:9-16:10" + "loc": "17:9-17:10" }, { "token": "EQUAL", - "loc": "16:11-16:12" + "loc": "17:11-17:12" }, { "token": [ "LIDENT", "f" ], - "loc": "16:13-16:14" + "loc": "17:13-17:14" }, { "token": "LPAREN", - "loc": "16:14-16:15" + "loc": "17:14-17:15" }, { "token": [ "LIDENT", "coin" ], - "loc": "16:15-16:19" + "loc": "17:15-17:19" }, { "token": "RPAREN", - "loc": "16:19-16:20" + "loc": "17:19-17:20" }, { "token": [ "SEMI", false ], - "loc": "16:20-16:20" + "loc": "17:20-17:20" }, { "token": "NEWLINE", - "loc": "16:20-16:21" + "loc": "17:20-17:21" }, { "token": "TRY_QUESTION", - "loc": "17:5-17:9" + "loc": "18:5-18:9" }, { "token": [ "LIDENT", "f" ], - "loc": "17:10-17:11" + "loc": "18:10-18:11" }, { "token": "LPAREN", - "loc": "17:11-17:12" + "loc": "18:11-18:12" }, { "token": [ "LIDENT", "x" ], - "loc": "17:12-17:13" + "loc": "18:12-18:13" }, { "token": [ "INFIX1", "<" ], - "loc": "17:14-17:15" + "loc": "18:14-18:15" }, { "token": [ "INT", "0" ], - "loc": "17:16-17:17" + "loc": "18:16-18:17" }, { "token": "RPAREN", - "loc": "17:17-17:18" + "loc": "18:17-18:18" }, { "token": "NEWLINE", - "loc": "17:18-17:19" + "loc": "18:18-18:19" }, { "token": "RBRACE", - "loc": "18:3-18:4" + "loc": "19:3-19:4" }, { "token": [ "SEMI", false ], - "loc": "18:4-18:4" + "loc": "19:4-19:4" }, { "token": "NEWLINE", - "loc": "18:4-18:5" + "loc": "19:4-19:5" }, { "token": [ "LIDENT", "debug" ], - "loc": "19:3-19:8" + "loc": "20:3-20:8" }, { "token": "LPAREN", - "loc": "19:8-19:9" + "loc": "20:8-20:9" }, { "token": "TRY_QUESTION", - "loc": "19:9-19:13" + "loc": "20:9-20:13" }, { "token": [ "LIDENT", "outside" ], - "loc": "19:14-19:21" + "loc": "20:14-20:21" }, { "token": "LPAREN", - "loc": "19:21-19:22" + "loc": "20:21-20:22" }, { "token": "TRUE", - "loc": "19:22-19:26" + "loc": "20:22-20:26" }, { "token": "RPAREN", - "loc": "19:26-19:27" + "loc": "20:26-20:27" }, { "token": "RPAREN", - "loc": "19:27-19:28" + "loc": "20:27-20:28" }, { "token": [ "SEMI", false ], - "loc": "19:28-19:28" + "loc": "20:28-20:28" }, { "token": "NEWLINE", - "loc": "19:28-19:29" + "loc": "20:28-20:29" }, { "token": [ "LIDENT", "debug" ], - "loc": "20:3-20:8" + "loc": "21:3-21:8" }, { "token": "LPAREN", - "loc": "20:8-20:9" + "loc": "21:8-21:9" }, { "token": "TRY_QUESTION", - "loc": "20:9-20:13" + "loc": "21:9-21:13" }, { "token": [ "LIDENT", "outside" ], - "loc": "20:14-20:21" + "loc": "21:14-21:21" }, { "token": "LPAREN", - "loc": "20:21-20:22" + "loc": "21:21-21:22" }, { "token": "FALSE", - "loc": "20:22-20:27" + "loc": "21:22-21:27" }, { "token": "RPAREN", - "loc": "20:27-20:28" + "loc": "21:27-21:28" }, { "token": "RPAREN", - "loc": "20:28-20:29" + "loc": "21:28-21:29" }, { "token": "NEWLINE", - "loc": "20:29-20:30" + "loc": "21:29-21:30" }, { "token": "RBRACE", - "loc": "21:1-21:2" + "loc": "22:1-22:2" }, { "token": [ "SEMI", false ], - "loc": "21:2-21:2" + "loc": "22:2-22:2" }, { "token": "NEWLINE", - "loc": "21:2-21:3" + "loc": "22:2-22:3" }, { "token": "EOF", - "loc": "22:1-22:1" + "loc": "23:1-23:1" } ] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/pipeline_test_try_result_type.json b/test/sync_test/__snapshot__/pipeline_test_try_result_type.json index 6b856820..e4c0a7b6 100644 --- a/test/sync_test/__snapshot__/pipeline_test_try_result_type.json +++ b/test/sync_test/__snapshot__/pipeline_test_try_result_type.json @@ -622,71 +622,137 @@ "loc": null, "children": { "value": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", - "loc": null, - "children": { - "value": "g" - } - } + "value": "to_result" } } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", "loc": null, - "children": [ - { - "kind": "Argument", + "children": { + "value": { + "kind": "Expr::Function", "loc": null, "children": { - "value": { - "kind": "Expr::Constant", + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "constant": { - "kind": "Constant::Bool", + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Apply", "loc": null, "children": { - "value": true + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "g" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Bool", + "loc": null, + "children": { + "value": true + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } } - } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } - ] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} + } } - } + ] }, - "kind": { - "kind": "TryOperatorKind::Question", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -742,71 +808,137 @@ "loc": null, "children": { "value": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", - "loc": null, - "children": { - "value": "g" - } - } + "value": "to_result" } } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", "loc": null, - "children": [ - { - "kind": "Argument", + "children": { + "value": { + "kind": "Expr::Function", "loc": null, "children": { - "value": { - "kind": "Expr::Constant", + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "constant": { - "kind": "Constant::Bool", + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Apply", "loc": null, "children": { - "value": false + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "g" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Bool", + "loc": null, + "children": { + "value": false + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } } - } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } - ] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} + } } - } + ] }, - "kind": { - "kind": "TryOperatorKind::Question", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -833,5 +965,524 @@ } } } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "to_result" + } + }, + "has_error": null, + "is_async": null, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "f" + } + }, + "ty": { + "kind": "Type::Arrow", + "loc": null, + "children": { + "args": { + "kind": "Type::Arrow::ArgList", + "loc": null, + "children": [] + }, + "res": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "T" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "err": { + "kind": "ErrorType::ErrorType", + "loc": null, + "children": { + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "E" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + "is_async": null + } + } + } + } + ] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [ + { + "kind": "TypeVarBinder", + "loc": null, + "children": { + "name": "T", + "constraints": { + "kind": "TypeVarBinder::TypeVarConstraintList", + "loc": null, + "children": [] + } + } + }, + { + "kind": "TypeVarBinder", + "loc": null, + "children": { + "name": "E", + "constraints": { + "kind": "TypeVarBinder::TypeVarConstraintList", + "loc": null, + "children": [ + { + "kind": "TypeVarConstraint", + "loc": null, + "children": { + "trait": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Error" + } + } + } + } + ] + } + } + } + ] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [ + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "T" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "E" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + ] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::Try", + "loc": null, + "children": { + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "f" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "catch": { + "kind": "Expr::Try::CaseList", + "loc": null, + "children": [ + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "err" + } + } + } + }, + "guard": null, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Err" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::TypeName", + "loc": null, + "children": { + "value": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + }, + "is_object": false + } + } + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "err" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + ] + }, + "catch_all": false, + "try_else": { + "kind": "Expr::Try::CaseList", + "loc": null, + "children": [ + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "value" + } + } + } + }, + "guard": null, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Ok" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::TypeName", + "loc": null, + "children": { + "value": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + }, + "is_object": false + } + } + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "value" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + ] + }, + "has_try": true + } + } + } + } + } } ] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/pipeline_test_try_result_type.mbt b/test/sync_test/__snapshot__/pipeline_test_try_result_type.mbt index 5a1db38c..36173324 100644 --- a/test/sync_test/__snapshot__/pipeline_test_try_result_type.mbt +++ b/test/sync_test/__snapshot__/pipeline_test_try_result_type.mbt @@ -17,6 +17,15 @@ fn g(c : Bool) -> Unit raise { } fn init { - debug(try? g(true)) - debug(try? g(false)) + debug(to_result(() => g(true))) + debug(to_result(() => g(false))) +} + +fn[T, E : Error] to_result(f : () -> T raise E) -> Result[T, E] { + try f() + catch { + err => Result::Err(err) + } noraise { + value => Result::Ok(value) + } } diff --git a/test/sync_test/__snapshot__/pipeline_test_try_result_type.mbt.tokens.json b/test/sync_test/__snapshot__/pipeline_test_try_result_type.mbt.tokens.json index 516063f8..9a393593 100644 --- a/test/sync_test/__snapshot__/pipeline_test_try_result_type.mbt.tokens.json +++ b/test/sync_test/__snapshot__/pipeline_test_try_result_type.mbt.tokens.json @@ -400,42 +400,65 @@ "loc": "20:8-20:9" }, { - "token": "TRY_QUESTION", - "loc": "20:9-20:13" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "20:9-20:18" + }, + { + "token": "LPAREN", + "loc": "20:18-20:19" + }, + { + "token": "LPAREN", + "loc": "20:19-20:20" + }, + { + "token": "RPAREN", + "loc": "20:20-20:21" + }, + { + "token": "FAT_ARROW", + "loc": "20:22-20:24" }, { "token": [ "LIDENT", "g" ], - "loc": "20:14-20:15" + "loc": "20:25-20:26" }, { "token": "LPAREN", - "loc": "20:15-20:16" + "loc": "20:26-20:27" }, { "token": "TRUE", - "loc": "20:16-20:20" + "loc": "20:27-20:31" }, { "token": "RPAREN", - "loc": "20:20-20:21" + "loc": "20:31-20:32" }, { "token": "RPAREN", - "loc": "20:21-20:22" + "loc": "20:32-20:33" + }, + { + "token": "RPAREN", + "loc": "20:33-20:34" }, { "token": [ "SEMI", false ], - "loc": "20:22-20:22" + "loc": "20:34-20:34" }, { "token": "NEWLINE", - "loc": "20:22-20:23" + "loc": "20:34-20:35" }, { "token": [ @@ -449,35 +472,58 @@ "loc": "21:8-21:9" }, { - "token": "TRY_QUESTION", - "loc": "21:9-21:13" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "21:9-21:18" + }, + { + "token": "LPAREN", + "loc": "21:18-21:19" + }, + { + "token": "LPAREN", + "loc": "21:19-21:20" + }, + { + "token": "RPAREN", + "loc": "21:20-21:21" + }, + { + "token": "FAT_ARROW", + "loc": "21:22-21:24" }, { "token": [ "LIDENT", "g" ], - "loc": "21:14-21:15" + "loc": "21:25-21:26" }, { "token": "LPAREN", - "loc": "21:15-21:16" + "loc": "21:26-21:27" }, { "token": "FALSE", - "loc": "21:16-21:21" + "loc": "21:27-21:32" }, { "token": "RPAREN", - "loc": "21:21-21:22" + "loc": "21:32-21:33" }, { "token": "RPAREN", - "loc": "21:22-21:23" + "loc": "21:33-21:34" + }, + { + "token": "RPAREN", + "loc": "21:34-21:35" }, { "token": "NEWLINE", - "loc": "21:23-21:24" + "loc": "21:35-21:36" }, { "token": "RBRACE", @@ -494,8 +540,324 @@ "token": "NEWLINE", "loc": "22:2-22:3" }, + { + "token": "NEWLINE", + "loc": "23:1-23:2" + }, + { + "token": "FN", + "loc": "24:1-24:3" + }, + { + "token": "LBRACKET", + "loc": "24:3-24:4" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "24:4-24:5" + }, + { + "token": "COMMA", + "loc": "24:5-24:6" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "24:7-24:8" + }, + { + "token": "COLON", + "loc": "24:9-24:10" + }, + { + "token": [ + "UIDENT", + "Error" + ], + "loc": "24:11-24:16" + }, + { + "token": "RBRACKET", + "loc": "24:16-24:17" + }, + { + "token": [ + "LIDENT", + "to_result" + ], + "loc": "24:18-24:27" + }, + { + "token": "LPAREN", + "loc": "24:27-24:28" + }, + { + "token": [ + "LIDENT", + "f" + ], + "loc": "24:28-24:29" + }, + { + "token": "COLON", + "loc": "24:30-24:31" + }, + { + "token": "LPAREN", + "loc": "24:32-24:33" + }, + { + "token": "RPAREN", + "loc": "24:33-24:34" + }, + { + "token": "THIN_ARROW", + "loc": "24:35-24:37" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "24:38-24:39" + }, + { + "token": "RAISE", + "loc": "24:40-24:45" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "24:46-24:47" + }, + { + "token": "RPAREN", + "loc": "24:47-24:48" + }, + { + "token": "THIN_ARROW", + "loc": "24:49-24:51" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "24:52-24:58" + }, + { + "token": "LBRACKET", + "loc": "24:58-24:59" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "24:59-24:60" + }, + { + "token": "COMMA", + "loc": "24:60-24:61" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "24:62-24:63" + }, + { + "token": "RBRACKET", + "loc": "24:63-24:64" + }, + { + "token": "LBRACE", + "loc": "24:65-24:66" + }, + { + "token": "NEWLINE", + "loc": "24:66-24:67" + }, + { + "token": "TRY", + "loc": "25:3-25:6" + }, + { + "token": [ + "LIDENT", + "f" + ], + "loc": "25:7-25:8" + }, + { + "token": "LPAREN", + "loc": "25:8-25:9" + }, + { + "token": "RPAREN", + "loc": "25:9-25:10" + }, + { + "token": "NEWLINE", + "loc": "25:10-25:11" + }, + { + "token": "CATCH", + "loc": "26:3-26:8" + }, + { + "token": "LBRACE", + "loc": "26:9-26:10" + }, + { + "token": "NEWLINE", + "loc": "26:10-26:11" + }, + { + "token": [ + "LIDENT", + "err" + ], + "loc": "27:5-27:8" + }, + { + "token": "FAT_ARROW", + "loc": "27:9-27:11" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "27:12-27:18" + }, + { + "token": "COLONCOLON", + "loc": "27:18-27:20" + }, + { + "token": [ + "UIDENT", + "Err" + ], + "loc": "27:20-27:23" + }, + { + "token": "LPAREN", + "loc": "27:23-27:24" + }, + { + "token": [ + "LIDENT", + "err" + ], + "loc": "27:24-27:27" + }, + { + "token": "RPAREN", + "loc": "27:27-27:28" + }, + { + "token": "NEWLINE", + "loc": "27:28-27:29" + }, + { + "token": "RBRACE", + "loc": "28:3-28:4" + }, + { + "token": "NORAISE", + "loc": "28:5-28:12" + }, + { + "token": "LBRACE", + "loc": "28:13-28:14" + }, + { + "token": "NEWLINE", + "loc": "28:14-28:15" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "29:5-29:10" + }, + { + "token": "FAT_ARROW", + "loc": "29:11-29:13" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "29:14-29:20" + }, + { + "token": "COLONCOLON", + "loc": "29:20-29:22" + }, + { + "token": [ + "UIDENT", + "Ok" + ], + "loc": "29:22-29:24" + }, + { + "token": "LPAREN", + "loc": "29:24-29:25" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "29:25-29:30" + }, + { + "token": "RPAREN", + "loc": "29:30-29:31" + }, + { + "token": "NEWLINE", + "loc": "29:31-29:32" + }, + { + "token": "RBRACE", + "loc": "30:3-30:4" + }, + { + "token": "NEWLINE", + "loc": "30:4-30:5" + }, + { + "token": "RBRACE", + "loc": "31:1-31:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "31:2-31:2" + }, + { + "token": "NEWLINE", + "loc": "31:2-31:3" + }, { "token": "EOF", - "loc": "23:1-23:1" + "loc": "32:1-32:1" } ] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/pipeline_test_tuple_let_destruct.mbt b/test/sync_test/__snapshot__/pipeline_test_tuple_let_destruct.mbt index c3a5bbff..1385cbd4 100644 --- a/test/sync_test/__snapshot__/pipeline_test_tuple_let_destruct.mbt +++ b/test/sync_test/__snapshot__/pipeline_test_tuple_let_destruct.mbt @@ -95,8 +95,8 @@ fn optimize_raise(cond : Bool) -> Int raise { ///| fn init { - debug(try? optimize_raise(true)) - debug(try? optimize_raise(false)) + debug(to_result(() => optimize_raise(true))) + debug(to_result(() => optimize_raise(false))) } ///| @@ -231,3 +231,12 @@ fn inner_loop(xss : Array[Array[Int]]) -> Unit { fn init { inner_loop([[ 2, 3 ], [ 5, 4 ], [ 1, 9 ]]) } + +fn[T, E : Error] to_result(f : () -> T raise E) -> Result[T, E] { + try f() + catch { + err => Result::Err(err) + } noraise { + value => Result::Ok(value) + } +} diff --git a/test/sync_test/__snapshot__/pipeline_test_tuple_let_destruct.mbt.tokens.json b/test/sync_test/__snapshot__/pipeline_test_tuple_let_destruct.mbt.tokens.json index 9833d1f7..f9c5e3f3 100644 --- a/test/sync_test/__snapshot__/pipeline_test_tuple_let_destruct.mbt.tokens.json +++ b/test/sync_test/__snapshot__/pipeline_test_tuple_let_destruct.mbt.tokens.json @@ -3361,42 +3361,65 @@ "loc": "98:8-98:9" }, { - "token": "TRY_QUESTION", - "loc": "98:9-98:13" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "98:9-98:18" + }, + { + "token": "LPAREN", + "loc": "98:18-98:19" + }, + { + "token": "LPAREN", + "loc": "98:19-98:20" + }, + { + "token": "RPAREN", + "loc": "98:20-98:21" + }, + { + "token": "FAT_ARROW", + "loc": "98:22-98:24" }, { "token": [ "LIDENT", "optimize_raise" ], - "loc": "98:14-98:28" + "loc": "98:25-98:39" }, { "token": "LPAREN", - "loc": "98:28-98:29" + "loc": "98:39-98:40" }, { "token": "TRUE", - "loc": "98:29-98:33" + "loc": "98:40-98:44" + }, + { + "token": "RPAREN", + "loc": "98:44-98:45" }, { "token": "RPAREN", - "loc": "98:33-98:34" + "loc": "98:45-98:46" }, { "token": "RPAREN", - "loc": "98:34-98:35" + "loc": "98:46-98:47" }, { "token": [ "SEMI", false ], - "loc": "98:35-98:35" + "loc": "98:47-98:47" }, { "token": "NEWLINE", - "loc": "98:35-98:36" + "loc": "98:47-98:48" }, { "token": [ @@ -3410,35 +3433,58 @@ "loc": "99:8-99:9" }, { - "token": "TRY_QUESTION", - "loc": "99:9-99:13" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "99:9-99:18" + }, + { + "token": "LPAREN", + "loc": "99:18-99:19" + }, + { + "token": "LPAREN", + "loc": "99:19-99:20" + }, + { + "token": "RPAREN", + "loc": "99:20-99:21" + }, + { + "token": "FAT_ARROW", + "loc": "99:22-99:24" }, { "token": [ "LIDENT", "optimize_raise" ], - "loc": "99:14-99:28" + "loc": "99:25-99:39" }, { "token": "LPAREN", - "loc": "99:28-99:29" + "loc": "99:39-99:40" }, { "token": "FALSE", - "loc": "99:29-99:34" + "loc": "99:40-99:45" + }, + { + "token": "RPAREN", + "loc": "99:45-99:46" }, { "token": "RPAREN", - "loc": "99:34-99:35" + "loc": "99:46-99:47" }, { "token": "RPAREN", - "loc": "99:35-99:36" + "loc": "99:47-99:48" }, { "token": "NEWLINE", - "loc": "99:36-99:37" + "loc": "99:48-99:49" }, { "token": "RBRACE", @@ -8113,8 +8159,324 @@ "token": "NEWLINE", "loc": "233:2-233:3" }, + { + "token": "NEWLINE", + "loc": "234:1-234:2" + }, + { + "token": "FN", + "loc": "235:1-235:3" + }, + { + "token": "LBRACKET", + "loc": "235:3-235:4" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "235:4-235:5" + }, + { + "token": "COMMA", + "loc": "235:5-235:6" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "235:7-235:8" + }, + { + "token": "COLON", + "loc": "235:9-235:10" + }, + { + "token": [ + "UIDENT", + "Error" + ], + "loc": "235:11-235:16" + }, + { + "token": "RBRACKET", + "loc": "235:16-235:17" + }, + { + "token": [ + "LIDENT", + "to_result" + ], + "loc": "235:18-235:27" + }, + { + "token": "LPAREN", + "loc": "235:27-235:28" + }, + { + "token": [ + "LIDENT", + "f" + ], + "loc": "235:28-235:29" + }, + { + "token": "COLON", + "loc": "235:30-235:31" + }, + { + "token": "LPAREN", + "loc": "235:32-235:33" + }, + { + "token": "RPAREN", + "loc": "235:33-235:34" + }, + { + "token": "THIN_ARROW", + "loc": "235:35-235:37" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "235:38-235:39" + }, + { + "token": "RAISE", + "loc": "235:40-235:45" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "235:46-235:47" + }, + { + "token": "RPAREN", + "loc": "235:47-235:48" + }, + { + "token": "THIN_ARROW", + "loc": "235:49-235:51" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "235:52-235:58" + }, + { + "token": "LBRACKET", + "loc": "235:58-235:59" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "235:59-235:60" + }, + { + "token": "COMMA", + "loc": "235:60-235:61" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "235:62-235:63" + }, + { + "token": "RBRACKET", + "loc": "235:63-235:64" + }, + { + "token": "LBRACE", + "loc": "235:65-235:66" + }, + { + "token": "NEWLINE", + "loc": "235:66-235:67" + }, + { + "token": "TRY", + "loc": "236:3-236:6" + }, + { + "token": [ + "LIDENT", + "f" + ], + "loc": "236:7-236:8" + }, + { + "token": "LPAREN", + "loc": "236:8-236:9" + }, + { + "token": "RPAREN", + "loc": "236:9-236:10" + }, + { + "token": "NEWLINE", + "loc": "236:10-236:11" + }, + { + "token": "CATCH", + "loc": "237:3-237:8" + }, + { + "token": "LBRACE", + "loc": "237:9-237:10" + }, + { + "token": "NEWLINE", + "loc": "237:10-237:11" + }, + { + "token": [ + "LIDENT", + "err" + ], + "loc": "238:5-238:8" + }, + { + "token": "FAT_ARROW", + "loc": "238:9-238:11" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "238:12-238:18" + }, + { + "token": "COLONCOLON", + "loc": "238:18-238:20" + }, + { + "token": [ + "UIDENT", + "Err" + ], + "loc": "238:20-238:23" + }, + { + "token": "LPAREN", + "loc": "238:23-238:24" + }, + { + "token": [ + "LIDENT", + "err" + ], + "loc": "238:24-238:27" + }, + { + "token": "RPAREN", + "loc": "238:27-238:28" + }, + { + "token": "NEWLINE", + "loc": "238:28-238:29" + }, + { + "token": "RBRACE", + "loc": "239:3-239:4" + }, + { + "token": "NORAISE", + "loc": "239:5-239:12" + }, + { + "token": "LBRACE", + "loc": "239:13-239:14" + }, + { + "token": "NEWLINE", + "loc": "239:14-239:15" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "240:5-240:10" + }, + { + "token": "FAT_ARROW", + "loc": "240:11-240:13" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "240:14-240:20" + }, + { + "token": "COLONCOLON", + "loc": "240:20-240:22" + }, + { + "token": [ + "UIDENT", + "Ok" + ], + "loc": "240:22-240:24" + }, + { + "token": "LPAREN", + "loc": "240:24-240:25" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "240:25-240:30" + }, + { + "token": "RPAREN", + "loc": "240:30-240:31" + }, + { + "token": "NEWLINE", + "loc": "240:31-240:32" + }, + { + "token": "RBRACE", + "loc": "241:3-241:4" + }, + { + "token": "NEWLINE", + "loc": "241:4-241:5" + }, + { + "token": "RBRACE", + "loc": "242:1-242:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "242:2-242:2" + }, + { + "token": "NEWLINE", + "loc": "242:2-242:3" + }, { "token": "EOF", - "loc": "234:1-234:1" + "loc": "243:1-243:1" } ] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/pipeline_test_tuple_struct4.json b/test/sync_test/__snapshot__/pipeline_test_tuple_struct4.json index 51a5e165..51800e87 100644 --- a/test/sync_test/__snapshot__/pipeline_test_tuple_struct4.json +++ b/test/sync_test/__snapshot__/pipeline_test_tuple_struct4.json @@ -125,6 +125,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, diff --git a/test/sync_test/__snapshot__/pipeline_test_tuple_struct5.json b/test/sync_test/__snapshot__/pipeline_test_tuple_struct5.json index 89f23bc7..446eaffc 100644 --- a/test/sync_test/__snapshot__/pipeline_test_tuple_struct5.json +++ b/test/sync_test/__snapshot__/pipeline_test_tuple_struct5.json @@ -2147,7 +2147,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -2270,7 +2271,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { diff --git a/test/sync_test/__snapshot__/pipeline_test_tuple_struct_array.json b/test/sync_test/__snapshot__/pipeline_test_tuple_struct_array.json index 8408bf8b..be7e609b 100644 --- a/test/sync_test/__snapshot__/pipeline_test_tuple_struct_array.json +++ b/test/sync_test/__snapshot__/pipeline_test_tuple_struct_array.json @@ -243,7 +243,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { @@ -968,7 +969,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { @@ -1396,7 +1398,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { diff --git a/test/sync_test/__snapshot__/pipeline_test_tuple_struct_in_arr.json b/test/sync_test/__snapshot__/pipeline_test_tuple_struct_in_arr.json index 07b6f7f6..86536536 100644 --- a/test/sync_test/__snapshot__/pipeline_test_tuple_struct_in_arr.json +++ b/test/sync_test/__snapshot__/pipeline_test_tuple_struct_in_arr.json @@ -265,7 +265,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { diff --git a/test/sync_test/__snapshot__/pipeline_test_tuple_struct_interface.json b/test/sync_test/__snapshot__/pipeline_test_tuple_struct_interface.json index 8b1de052..6579426b 100644 --- a/test/sync_test/__snapshot__/pipeline_test_tuple_struct_interface.json +++ b/test/sync_test/__snapshot__/pipeline_test_tuple_struct_interface.json @@ -784,6 +784,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, diff --git a/test/sync_test/__snapshot__/pipeline_test_tuple_struct_pipe2.json b/test/sync_test/__snapshot__/pipeline_test_tuple_struct_pipe2.json new file mode 100644 index 00000000..64dd6b72 --- /dev/null +++ b/test/sync_test/__snapshot__/pipeline_test_tuple_struct_pipe2.json @@ -0,0 +1,349 @@ +[ + { + "kind": "Impl::TopTypeDef", + "loc": null, + "children": { + "value": { + "kind": "TypeDecl", + "loc": null, + "children": { + "tycon": "Tuple2", + "params": { + "kind": "TypeDecl::ParamList", + "loc": null, + "children": [] + }, + "components": { + "kind": "TypeDesc::TupleStruct", + "loc": null, + "children": { + "value": { + "kind": "TypeDesc::TupleStruct::TypeList", + "loc": null, + "children": [ + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Int" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Int" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + ] + } + } + }, + "attrs": { + "kind": "TypeDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "", + "type_vis": { + "kind": "Visibility::Priv", + "loc": null, + "children": {} + }, + "is_declare": false, + "deriving": { + "kind": "TypeDecl::DerivingList", + "loc": null, + "children": [ + { + "kind": "DerivingDirective", + "loc": null, + "children": { + "type_name": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Debug" + } + }, + "is_object": false + } + }, + "args": { + "kind": "DerivingDirective::ArgList", + "loc": null, + "children": [] + } + } + } + ] + } + } + } + } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "main" + } + }, + "has_error": null, + "is_async": null, + "decl_params": null, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [] + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::Let", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "x" + } + } + } + }, + "expr": { + "kind": "Expr::Pipe", + "loc": null, + "children": { + "lhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "1" + } + } + } + }, + "rhs": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Tuple2" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::NoExtraInfo", + "loc": null, + "children": {} + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "1" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + }, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "debug" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "x" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + } + } + } + } +] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/pipeline_test_tuple_struct_pipe2.mbt b/test/sync_test/__snapshot__/pipeline_test_tuple_struct_pipe2.mbt new file mode 100644 index 00000000..f5cb921e --- /dev/null +++ b/test/sync_test/__snapshot__/pipeline_test_tuple_struct_pipe2.mbt @@ -0,0 +1,11 @@ +priv struct Tuple2(Int, Int,) derive(Debug) +// Int can be replaced by any type + +fn main { + // error! + let x = 1 |> Tuple2(1) + debug(x) + // no error. + // let _ = Tuple2(1) <| 1 + // let _ = Tuple2(1, 1) +} diff --git a/test/sync_test/__snapshot__/pipeline_test_tuple_struct_pipe2.mbt.tokens.json b/test/sync_test/__snapshot__/pipeline_test_tuple_struct_pipe2.mbt.tokens.json new file mode 100644 index 00000000..de0c07f4 --- /dev/null +++ b/test/sync_test/__snapshot__/pipeline_test_tuple_struct_pipe2.mbt.tokens.json @@ -0,0 +1,309 @@ +[ + { + "token": "PRIV", + "loc": "1:1-1:5" + }, + { + "token": "STRUCT", + "loc": "1:6-1:12" + }, + { + "token": [ + "UIDENT", + "Tuple2" + ], + "loc": "1:13-1:19" + }, + { + "token": "LPAREN", + "loc": "1:19-1:20" + }, + { + "token": [ + "UIDENT", + "Int" + ], + "loc": "1:20-1:23" + }, + { + "token": "COMMA", + "loc": "1:23-1:24" + }, + { + "token": [ + "UIDENT", + "Int" + ], + "loc": "1:25-1:28" + }, + { + "token": "COMMA", + "loc": "1:28-1:29" + }, + { + "token": "RPAREN", + "loc": "1:29-1:30" + }, + { + "token": "DERIVE", + "loc": "1:31-1:37" + }, + { + "token": "LPAREN", + "loc": "1:37-1:38" + }, + { + "token": [ + "UIDENT", + "Debug" + ], + "loc": "1:38-1:43" + }, + { + "token": "RPAREN", + "loc": "1:43-1:44" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "1:44-1:44" + }, + { + "token": "NEWLINE", + "loc": "1:44-1:45" + }, + { + "token": [ + "COMMENT", + { + "content": "// Int can be replaced by any type", + "kind": [ + "Ownline", + { + "leading_blank_line": false, + "trailing_blank_line": true + } + ], + "consumed_by_docstring": false + } + ], + "loc": "2:1-2:35" + }, + { + "token": "NEWLINE", + "loc": "2:35-2:36" + }, + { + "token": "NEWLINE", + "loc": "3:1-3:2" + }, + { + "token": "FN", + "loc": "4:1-4:3" + }, + { + "token": [ + "LIDENT", + "main" + ], + "loc": "4:4-4:8" + }, + { + "token": "LBRACE", + "loc": "4:9-4:10" + }, + { + "token": "NEWLINE", + "loc": "4:10-4:11" + }, + { + "token": [ + "COMMENT", + { + "content": "// error!", + "kind": [ + "Ownline", + { + "leading_blank_line": false, + "trailing_blank_line": false + } + ], + "consumed_by_docstring": false + } + ], + "loc": "5:3-5:12" + }, + { + "token": "NEWLINE", + "loc": "5:12-5:13" + }, + { + "token": "LET", + "loc": "6:3-6:6" + }, + { + "token": [ + "LIDENT", + "x" + ], + "loc": "6:7-6:8" + }, + { + "token": "EQUAL", + "loc": "6:9-6:10" + }, + { + "token": [ + "INT", + "1" + ], + "loc": "6:11-6:12" + }, + { + "token": "PIPE", + "loc": "6:13-6:15" + }, + { + "token": [ + "UIDENT", + "Tuple2" + ], + "loc": "6:16-6:22" + }, + { + "token": "LPAREN", + "loc": "6:22-6:23" + }, + { + "token": [ + "INT", + "1" + ], + "loc": "6:23-6:24" + }, + { + "token": "RPAREN", + "loc": "6:24-6:25" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "6:25-6:25" + }, + { + "token": "NEWLINE", + "loc": "6:25-6:26" + }, + { + "token": [ + "LIDENT", + "debug" + ], + "loc": "7:3-7:8" + }, + { + "token": "LPAREN", + "loc": "7:8-7:9" + }, + { + "token": [ + "LIDENT", + "x" + ], + "loc": "7:9-7:10" + }, + { + "token": "RPAREN", + "loc": "7:10-7:11" + }, + { + "token": "NEWLINE", + "loc": "7:11-7:12" + }, + { + "token": [ + "COMMENT", + { + "content": "// no error.", + "kind": [ + "Ownline", + { + "leading_blank_line": false, + "trailing_blank_line": false + } + ], + "consumed_by_docstring": false + } + ], + "loc": "8:3-8:15" + }, + { + "token": "NEWLINE", + "loc": "8:15-8:16" + }, + { + "token": [ + "COMMENT", + { + "content": "// let _ = Tuple2(1) <| 1", + "kind": [ + "Ownline", + { + "leading_blank_line": false, + "trailing_blank_line": false + } + ], + "consumed_by_docstring": false + } + ], + "loc": "9:3-9:28" + }, + { + "token": "NEWLINE", + "loc": "9:28-9:29" + }, + { + "token": [ + "COMMENT", + { + "content": "// let _ = Tuple2(1, 1)", + "kind": [ + "Ownline", + { + "leading_blank_line": false, + "trailing_blank_line": false + } + ], + "consumed_by_docstring": false + } + ], + "loc": "10:3-10:26" + }, + { + "token": "NEWLINE", + "loc": "10:26-10:27" + }, + { + "token": "RBRACE", + "loc": "11:1-11:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "11:2-11:2" + }, + { + "token": "NEWLINE", + "loc": "11:2-11:3" + }, + { + "token": "EOF", + "loc": "12:1-12:1" + } +] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/pipeline_test_typing_coverage.json b/test/sync_test/__snapshot__/pipeline_test_typing_coverage.json index c1257e66..d1f24534 100644 --- a/test/sync_test/__snapshot__/pipeline_test_typing_coverage.json +++ b/test/sync_test/__snapshot__/pipeline_test_typing_coverage.json @@ -1051,7 +1051,8 @@ } } ] - } + }, + "is_iter": false } } } @@ -1369,7 +1370,8 @@ } } ] - } + }, + "is_iter": false } } } diff --git a/test/sync_test/__snapshot__/pipeline_test_typing_coverage_aliases.json b/test/sync_test/__snapshot__/pipeline_test_typing_coverage_aliases.json index c85fea04..47d23104 100644 --- a/test/sync_test/__snapshot__/pipeline_test_typing_coverage_aliases.json +++ b/test/sync_test/__snapshot__/pipeline_test_typing_coverage_aliases.json @@ -304,6 +304,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, @@ -504,6 +509,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, @@ -808,6 +818,11 @@ } ] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, diff --git a/test/sync_test/__snapshot__/pipeline_test_typing_coverage_errors.json b/test/sync_test/__snapshot__/pipeline_test_typing_coverage_errors.json index 5f978545..3714cf30 100644 --- a/test/sync_test/__snapshot__/pipeline_test_typing_coverage_errors.json +++ b/test/sync_test/__snapshot__/pipeline_test_typing_coverage_errors.json @@ -2829,71 +2829,137 @@ } }, "expr": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", - "loc": null, - "children": { - "value": "parse_two" - } - } + "value": "to_result" } } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", "loc": null, - "children": [ - { - "kind": "Argument", + "children": { + "value": { + "kind": "Expr::Function", "loc": null, "children": { - "value": { - "kind": "Expr::Constant", + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "constant": { - "kind": "Constant::String", + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Apply", "loc": null, "children": { - "value": "42" + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "parse_two" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "42" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } } - } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } - ] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} + } } - } + ] }, - "kind": { - "kind": "TryOperatorKind::Question", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -2996,71 +3062,137 @@ } }, "expr": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", - "loc": null, - "children": { - "value": "parse_two" - } - } + "value": "to_result" } } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", "loc": null, - "children": [ - { - "kind": "Argument", + "children": { + "value": { + "kind": "Expr::Function", "loc": null, "children": { - "value": { - "kind": "Expr::Constant", + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "constant": { - "kind": "Constant::String", + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Apply", "loc": null, "children": { - "value": "x3" + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "parse_two" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "x3" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } } - } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } - ] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} + } } - } + ] }, - "kind": { - "kind": "TryOperatorKind::Question", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -3341,95 +3473,161 @@ } }, "expr": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", - "loc": null, - "children": { - "value": "safe_div" - } - } + "value": "to_result" } } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", "loc": null, - "children": [ - { - "kind": "Argument", + "children": { + "value": { + "kind": "Expr::Function", "loc": null, "children": { - "value": { - "kind": "Expr::Constant", + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "constant": { - "kind": "Constant::Int", + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Apply", "loc": null, "children": { - "value": "10" + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "safe_div" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "10" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "2" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } } - } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} } } }, - { - "kind": "Argument", + "kind": { + "kind": "ArgumentKind::Positional", "loc": null, - "children": { - "value": { - "kind": "Expr::Constant", - "loc": null, - "children": { - "constant": { - "kind": "Constant::Int", - "loc": null, - "children": { - "value": "2" - } - } - } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} - } - } + "children": {} } - ] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} + } } - } + ] }, - "kind": { - "kind": "TryOperatorKind::Question", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -3524,95 +3722,161 @@ } }, "expr": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", - "loc": null, - "children": { - "value": "safe_div" - } - } + "value": "to_result" } } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", "loc": null, - "children": [ - { - "kind": "Argument", + "children": { + "value": { + "kind": "Expr::Function", "loc": null, "children": { - "value": { - "kind": "Expr::Constant", + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "constant": { - "kind": "Constant::Int", + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Apply", "loc": null, "children": { - "value": "1" + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "safe_div" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "1" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "0" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } } - } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} } } }, - { - "kind": "Argument", + "kind": { + "kind": "ArgumentKind::Positional", "loc": null, - "children": { - "value": { - "kind": "Expr::Constant", - "loc": null, - "children": { - "constant": { - "kind": "Constant::Int", - "loc": null, - "children": { - "value": "0" - } - } - } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} - } - } + "children": {} } - ] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} + } } - } + ] }, - "kind": { - "kind": "TryOperatorKind::Question", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -3756,6 +4020,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, @@ -4276,5 +4545,524 @@ }, "doc": "" } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "to_result" + } + }, + "has_error": null, + "is_async": null, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "f" + } + }, + "ty": { + "kind": "Type::Arrow", + "loc": null, + "children": { + "args": { + "kind": "Type::Arrow::ArgList", + "loc": null, + "children": [] + }, + "res": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "T" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "err": { + "kind": "ErrorType::ErrorType", + "loc": null, + "children": { + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "E" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + "is_async": null + } + } + } + } + ] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [ + { + "kind": "TypeVarBinder", + "loc": null, + "children": { + "name": "T", + "constraints": { + "kind": "TypeVarBinder::TypeVarConstraintList", + "loc": null, + "children": [] + } + } + }, + { + "kind": "TypeVarBinder", + "loc": null, + "children": { + "name": "E", + "constraints": { + "kind": "TypeVarBinder::TypeVarConstraintList", + "loc": null, + "children": [ + { + "kind": "TypeVarConstraint", + "loc": null, + "children": { + "trait": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Error" + } + } + } + } + ] + } + } + } + ] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [ + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "T" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "E" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + ] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::Try", + "loc": null, + "children": { + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "f" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "catch": { + "kind": "Expr::Try::CaseList", + "loc": null, + "children": [ + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "err" + } + } + } + }, + "guard": null, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Err" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::TypeName", + "loc": null, + "children": { + "value": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + }, + "is_object": false + } + } + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "err" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + ] + }, + "catch_all": false, + "try_else": { + "kind": "Expr::Try::CaseList", + "loc": null, + "children": [ + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "value" + } + } + } + }, + "guard": null, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Ok" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::TypeName", + "loc": null, + "children": { + "value": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + }, + "is_object": false + } + } + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "value" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + ] + }, + "has_try": true + } + } + } + } + } } ] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/pipeline_test_typing_coverage_errors.mbt b/test/sync_test/__snapshot__/pipeline_test_typing_coverage_errors.mbt index f32a5afd..46c8e880 100644 --- a/test/sync_test/__snapshot__/pipeline_test_typing_coverage_errors.mbt +++ b/test/sync_test/__snapshot__/pipeline_test_typing_coverage_errors.mbt @@ -46,12 +46,12 @@ fn parse_or_default(s : String, default : Int) -> Int { } fn init { - let r1 : Result[Int, ParseError] = try? parse_two("42") - let r2 : Result[Int, ParseError] = try? parse_two("x3") + let r1 : Result[Int, ParseError] = to_result(() => parse_two("42")) + let r2 : Result[Int, ParseError] = to_result(() => parse_two("x3")) let _ = parse_or_default("7", -1) let _ = parse_or_default("", -1) - let _ : Result[Int, Error] = try? safe_div(10, 2) - let _ : Result[Int, Error] = try? safe_div(1, 0) + let _ : Result[Int, Error] = to_result(() => safe_div(10, 2)) + let _ : Result[Int, Error] = to_result(() => safe_div(1, 0)) let _ = r1 let _ = r2 () @@ -67,3 +67,12 @@ impl Show for ParseError with output(self, logger) { } } } + +fn[T, E : Error] to_result(f : () -> T raise E) -> Result[T, E] { + try f() + catch { + err => Result::Err(err) + } noraise { + value => Result::Ok(value) + } +} diff --git a/test/sync_test/__snapshot__/pipeline_test_typing_coverage_errors.mbt.tokens.json b/test/sync_test/__snapshot__/pipeline_test_typing_coverage_errors.mbt.tokens.json index 89c83462..073adc74 100644 --- a/test/sync_test/__snapshot__/pipeline_test_typing_coverage_errors.mbt.tokens.json +++ b/test/sync_test/__snapshot__/pipeline_test_typing_coverage_errors.mbt.tokens.json @@ -1573,41 +1573,64 @@ "loc": "49:36-49:37" }, { - "token": "TRY_QUESTION", - "loc": "49:38-49:42" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "49:38-49:47" + }, + { + "token": "LPAREN", + "loc": "49:47-49:48" + }, + { + "token": "LPAREN", + "loc": "49:48-49:49" + }, + { + "token": "RPAREN", + "loc": "49:49-49:50" + }, + { + "token": "FAT_ARROW", + "loc": "49:51-49:53" }, { "token": [ "LIDENT", "parse_two" ], - "loc": "49:43-49:52" + "loc": "49:54-49:63" }, { "token": "LPAREN", - "loc": "49:52-49:53" + "loc": "49:63-49:64" }, { "token": [ "STRING", "42" ], - "loc": "49:53-49:57" + "loc": "49:64-49:68" }, { "token": "RPAREN", - "loc": "49:57-49:58" + "loc": "49:68-49:69" + }, + { + "token": "RPAREN", + "loc": "49:69-49:70" }, { "token": [ "SEMI", false ], - "loc": "49:58-49:58" + "loc": "49:70-49:70" }, { "token": "NEWLINE", - "loc": "49:58-49:59" + "loc": "49:70-49:71" }, { "token": "LET", @@ -1662,41 +1685,64 @@ "loc": "50:36-50:37" }, { - "token": "TRY_QUESTION", - "loc": "50:38-50:42" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "50:38-50:47" + }, + { + "token": "LPAREN", + "loc": "50:47-50:48" + }, + { + "token": "LPAREN", + "loc": "50:48-50:49" + }, + { + "token": "RPAREN", + "loc": "50:49-50:50" + }, + { + "token": "FAT_ARROW", + "loc": "50:51-50:53" }, { "token": [ "LIDENT", "parse_two" ], - "loc": "50:43-50:52" + "loc": "50:54-50:63" }, { "token": "LPAREN", - "loc": "50:52-50:53" + "loc": "50:63-50:64" }, { "token": [ "STRING", "x3" ], - "loc": "50:53-50:57" + "loc": "50:64-50:68" }, { "token": "RPAREN", - "loc": "50:57-50:58" + "loc": "50:68-50:69" + }, + { + "token": "RPAREN", + "loc": "50:69-50:70" }, { "token": [ "SEMI", false ], - "loc": "50:58-50:58" + "loc": "50:70-50:70" }, { "token": "NEWLINE", - "loc": "50:58-50:59" + "loc": "50:70-50:71" }, { "token": "LET", @@ -1868,52 +1914,75 @@ "loc": "53:30-53:31" }, { - "token": "TRY_QUESTION", - "loc": "53:32-53:36" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "53:32-53:41" + }, + { + "token": "LPAREN", + "loc": "53:41-53:42" + }, + { + "token": "LPAREN", + "loc": "53:42-53:43" + }, + { + "token": "RPAREN", + "loc": "53:43-53:44" + }, + { + "token": "FAT_ARROW", + "loc": "53:45-53:47" }, { "token": [ "LIDENT", "safe_div" ], - "loc": "53:37-53:45" + "loc": "53:48-53:56" }, { "token": "LPAREN", - "loc": "53:45-53:46" + "loc": "53:56-53:57" }, { "token": [ "INT", "10" ], - "loc": "53:46-53:48" + "loc": "53:57-53:59" }, { "token": "COMMA", - "loc": "53:48-53:49" + "loc": "53:59-53:60" }, { "token": [ "INT", "2" ], - "loc": "53:50-53:51" + "loc": "53:61-53:62" + }, + { + "token": "RPAREN", + "loc": "53:62-53:63" }, { "token": "RPAREN", - "loc": "53:51-53:52" + "loc": "53:63-53:64" }, { "token": [ "SEMI", false ], - "loc": "53:52-53:52" + "loc": "53:64-53:64" }, { "token": "NEWLINE", - "loc": "53:52-53:53" + "loc": "53:64-53:65" }, { "token": "LET", @@ -1965,52 +2034,75 @@ "loc": "54:30-54:31" }, { - "token": "TRY_QUESTION", - "loc": "54:32-54:36" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "54:32-54:41" + }, + { + "token": "LPAREN", + "loc": "54:41-54:42" + }, + { + "token": "LPAREN", + "loc": "54:42-54:43" + }, + { + "token": "RPAREN", + "loc": "54:43-54:44" + }, + { + "token": "FAT_ARROW", + "loc": "54:45-54:47" }, { "token": [ "LIDENT", "safe_div" ], - "loc": "54:37-54:45" + "loc": "54:48-54:56" }, { "token": "LPAREN", - "loc": "54:45-54:46" + "loc": "54:56-54:57" }, { "token": [ "INT", "1" ], - "loc": "54:46-54:47" + "loc": "54:57-54:58" }, { "token": "COMMA", - "loc": "54:47-54:48" + "loc": "54:58-54:59" }, { "token": [ "INT", "0" ], - "loc": "54:49-54:50" + "loc": "54:60-54:61" }, { "token": "RPAREN", - "loc": "54:50-54:51" + "loc": "54:61-54:62" + }, + { + "token": "RPAREN", + "loc": "54:62-54:63" }, { "token": [ "SEMI", false ], - "loc": "54:51-54:51" + "loc": "54:63-54:63" }, { "token": "NEWLINE", - "loc": "54:51-54:52" + "loc": "54:63-54:64" }, { "token": "LET", @@ -2433,8 +2525,324 @@ "token": "NEWLINE", "loc": "69:2-69:3" }, + { + "token": "NEWLINE", + "loc": "70:1-70:2" + }, + { + "token": "FN", + "loc": "71:1-71:3" + }, + { + "token": "LBRACKET", + "loc": "71:3-71:4" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "71:4-71:5" + }, + { + "token": "COMMA", + "loc": "71:5-71:6" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "71:7-71:8" + }, + { + "token": "COLON", + "loc": "71:9-71:10" + }, + { + "token": [ + "UIDENT", + "Error" + ], + "loc": "71:11-71:16" + }, + { + "token": "RBRACKET", + "loc": "71:16-71:17" + }, + { + "token": [ + "LIDENT", + "to_result" + ], + "loc": "71:18-71:27" + }, + { + "token": "LPAREN", + "loc": "71:27-71:28" + }, + { + "token": [ + "LIDENT", + "f" + ], + "loc": "71:28-71:29" + }, + { + "token": "COLON", + "loc": "71:30-71:31" + }, + { + "token": "LPAREN", + "loc": "71:32-71:33" + }, + { + "token": "RPAREN", + "loc": "71:33-71:34" + }, + { + "token": "THIN_ARROW", + "loc": "71:35-71:37" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "71:38-71:39" + }, + { + "token": "RAISE", + "loc": "71:40-71:45" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "71:46-71:47" + }, + { + "token": "RPAREN", + "loc": "71:47-71:48" + }, + { + "token": "THIN_ARROW", + "loc": "71:49-71:51" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "71:52-71:58" + }, + { + "token": "LBRACKET", + "loc": "71:58-71:59" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "71:59-71:60" + }, + { + "token": "COMMA", + "loc": "71:60-71:61" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "71:62-71:63" + }, + { + "token": "RBRACKET", + "loc": "71:63-71:64" + }, + { + "token": "LBRACE", + "loc": "71:65-71:66" + }, + { + "token": "NEWLINE", + "loc": "71:66-71:67" + }, + { + "token": "TRY", + "loc": "72:3-72:6" + }, + { + "token": [ + "LIDENT", + "f" + ], + "loc": "72:7-72:8" + }, + { + "token": "LPAREN", + "loc": "72:8-72:9" + }, + { + "token": "RPAREN", + "loc": "72:9-72:10" + }, + { + "token": "NEWLINE", + "loc": "72:10-72:11" + }, + { + "token": "CATCH", + "loc": "73:3-73:8" + }, + { + "token": "LBRACE", + "loc": "73:9-73:10" + }, + { + "token": "NEWLINE", + "loc": "73:10-73:11" + }, + { + "token": [ + "LIDENT", + "err" + ], + "loc": "74:5-74:8" + }, + { + "token": "FAT_ARROW", + "loc": "74:9-74:11" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "74:12-74:18" + }, + { + "token": "COLONCOLON", + "loc": "74:18-74:20" + }, + { + "token": [ + "UIDENT", + "Err" + ], + "loc": "74:20-74:23" + }, + { + "token": "LPAREN", + "loc": "74:23-74:24" + }, + { + "token": [ + "LIDENT", + "err" + ], + "loc": "74:24-74:27" + }, + { + "token": "RPAREN", + "loc": "74:27-74:28" + }, + { + "token": "NEWLINE", + "loc": "74:28-74:29" + }, + { + "token": "RBRACE", + "loc": "75:3-75:4" + }, + { + "token": "NORAISE", + "loc": "75:5-75:12" + }, + { + "token": "LBRACE", + "loc": "75:13-75:14" + }, + { + "token": "NEWLINE", + "loc": "75:14-75:15" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "76:5-76:10" + }, + { + "token": "FAT_ARROW", + "loc": "76:11-76:13" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "76:14-76:20" + }, + { + "token": "COLONCOLON", + "loc": "76:20-76:22" + }, + { + "token": [ + "UIDENT", + "Ok" + ], + "loc": "76:22-76:24" + }, + { + "token": "LPAREN", + "loc": "76:24-76:25" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "76:25-76:30" + }, + { + "token": "RPAREN", + "loc": "76:30-76:31" + }, + { + "token": "NEWLINE", + "loc": "76:31-76:32" + }, + { + "token": "RBRACE", + "loc": "77:3-77:4" + }, + { + "token": "NEWLINE", + "loc": "77:4-77:5" + }, + { + "token": "RBRACE", + "loc": "78:1-78:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "78:2-78:2" + }, + { + "token": "NEWLINE", + "loc": "78:2-78:3" + }, { "token": "EOF", - "loc": "70:1-70:1" + "loc": "79:1-79:1" } ] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/pipeline_test_typing_coverage_generic_methods.json b/test/sync_test/__snapshot__/pipeline_test_typing_coverage_generic_methods.json index 959939bc..cb6c5e74 100644 --- a/test/sync_test/__snapshot__/pipeline_test_typing_coverage_generic_methods.json +++ b/test/sync_test/__snapshot__/pipeline_test_typing_coverage_generic_methods.json @@ -762,6 +762,11 @@ } ] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, diff --git a/test/sync_test/__snapshot__/pipeline_test_typing_coverage_lexmatch.json b/test/sync_test/__snapshot__/pipeline_test_typing_coverage_lexmatch.json index 8fc28d94..af9dae15 100644 --- a/test/sync_test/__snapshot__/pipeline_test_typing_coverage_lexmatch.json +++ b/test/sync_test/__snapshot__/pipeline_test_typing_coverage_lexmatch.json @@ -333,7 +333,8 @@ } } ] - } + }, + "is_iter": false } } } @@ -495,7 +496,8 @@ } } ] - } + }, + "is_iter": false } } } @@ -639,7 +641,8 @@ "kind": "Expr::Array::ExprList", "loc": null, "children": [] - } + }, + "is_iter": false } } } @@ -668,7 +671,8 @@ "kind": "Expr::Array::ExprList", "loc": null, "children": [] - } + }, + "is_iter": false } } } diff --git a/test/sync_test/__snapshot__/pipeline_test_typing_coverage_traits.json b/test/sync_test/__snapshot__/pipeline_test_typing_coverage_traits.json index 60ed4155..11b2cb5b 100644 --- a/test/sync_test/__snapshot__/pipeline_test_typing_coverage_traits.json +++ b/test/sync_test/__snapshot__/pipeline_test_typing_coverage_traits.json @@ -296,6 +296,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, @@ -496,6 +501,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, @@ -644,6 +654,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, @@ -857,6 +872,11 @@ } ] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, diff --git a/test/sync_test/__snapshot__/pipeline_test_unbox_arrayview.json b/test/sync_test/__snapshot__/pipeline_test_unbox_arrayview.json index fa64a15a..0c483d90 100644 --- a/test/sync_test/__snapshot__/pipeline_test_unbox_arrayview.json +++ b/test/sync_test/__snapshot__/pipeline_test_unbox_arrayview.json @@ -1071,7 +1071,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { diff --git a/test/sync_test/__snapshot__/pipeline_test_unsafe_bytes_get.json b/test/sync_test/__snapshot__/pipeline_test_unsafe_bytes_get.json index 978559c6..ffa3525f 100644 --- a/test/sync_test/__snapshot__/pipeline_test_unsafe_bytes_get.json +++ b/test/sync_test/__snapshot__/pipeline_test_unsafe_bytes_get.json @@ -185,7 +185,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { diff --git a/test/sync_test/__snapshot__/pipeline_test_unsafe_bytes_set.json b/test/sync_test/__snapshot__/pipeline_test_unsafe_bytes_set.json index 865c9efe..603ed27e 100644 --- a/test/sync_test/__snapshot__/pipeline_test_unsafe_bytes_set.json +++ b/test/sync_test/__snapshot__/pipeline_test_unsafe_bytes_set.json @@ -625,7 +625,8 @@ } } ] - } + }, + "is_iter": false } }, "ty": { diff --git a/test/sync_test/__snapshot__/pipeline_test_use_core.json b/test/sync_test/__snapshot__/pipeline_test_use_core.json index 84c2f971..f8d410ba 100644 --- a/test/sync_test/__snapshot__/pipeline_test_use_core.json +++ b/test/sync_test/__snapshot__/pipeline_test_use_core.json @@ -116,7 +116,8 @@ } } ] - } + }, + "is_iter": false } }, "ty": { @@ -297,11 +298,13 @@ } } ] - } + }, + "is_iter": false } } ] - } + }, + "is_iter": false } }, "ty": { @@ -404,11 +407,13 @@ } } ] - } + }, + "is_iter": false } } ] - } + }, + "is_iter": false } } } @@ -526,11 +531,13 @@ } } ] - } + }, + "is_iter": false } } ] - } + }, + "is_iter": false } }, "ty": { @@ -633,11 +640,13 @@ } } ] - } + }, + "is_iter": false } } ] - } + }, + "is_iter": false } } } diff --git a/test/sync_test/__snapshot__/pipeline_test_utf_conversion.json b/test/sync_test/__snapshot__/pipeline_test_utf_conversion.json index 56437b0b..e1db89e5 100644 --- a/test/sync_test/__snapshot__/pipeline_test_utf_conversion.json +++ b/test/sync_test/__snapshot__/pipeline_test_utf_conversion.json @@ -30405,7 +30405,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { @@ -31754,7 +31755,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { @@ -33662,7 +33664,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { @@ -34696,7 +34699,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { @@ -36427,7 +36431,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { @@ -37349,7 +37354,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { @@ -37819,7 +37825,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { diff --git a/test/sync_test/__snapshot__/pipeline_test_v128.json b/test/sync_test/__snapshot__/pipeline_test_v128.json new file mode 100644 index 00000000..ada46598 --- /dev/null +++ b/test/sync_test/__snapshot__/pipeline_test_v128.json @@ -0,0 +1,54360 @@ +[ + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "v128_make" + } + }, + "has_error": null, + "is_async": null, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "lo" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "UInt64" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "hi" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "UInt64" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + } + ] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "V128" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclStubs", + "loc": null, + "children": { + "value": { + "kind": "FuncStubs::Embedded", + "loc": null, + "children": { + "language": null, + "code": { + "kind": "EmbeddedCode::CodeString", + "loc": null, + "children": { + "value": "%v128.make" + } + } + } + } + } + } + } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "v128_lo" + } + }, + "has_error": null, + "is_async": null, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "v" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "V128" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + } + ] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "UInt64" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclStubs", + "loc": null, + "children": { + "value": { + "kind": "FuncStubs::Embedded", + "loc": null, + "children": { + "language": null, + "code": { + "kind": "EmbeddedCode::CodeString", + "loc": null, + "children": { + "value": "%v128.lo" + } + } + } + } + } + } + } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "v128_hi" + } + }, + "has_error": null, + "is_async": null, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "v" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "V128" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + } + ] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "UInt64" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclStubs", + "loc": null, + "children": { + "value": { + "kind": "FuncStubs::Embedded", + "loc": null, + "children": { + "language": null, + "code": { + "kind": "EmbeddedCode::CodeString", + "loc": null, + "children": { + "value": "%v128.hi" + } + } + } + } + } + } + } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "v128_const" + } + }, + "has_error": null, + "is_async": null, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "l0" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Int" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "l1" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Int" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "l2" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Int" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "l3" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Int" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "l4" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Int" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "l5" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Int" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "l6" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Int" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "l7" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Int" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "l8" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Int" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "l9" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Int" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "l10" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Int" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "l11" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Int" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "l12" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Int" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "l13" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Int" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "l14" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Int" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "l15" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Int" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + } + ] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "V128" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [ + { + "kind": "Attribute", + "loc": null, + "children": { + "raw": "#intrinsic(\"%v128.v128_const_i8x16\")" + } + } + ] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::LetFn", + "loc": null, + "children": { + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "byte" + } + }, + "func": { + "kind": "Func::Lambda", + "loc": null, + "children": { + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "v" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Int" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "shift" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Int" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + } + ] + }, + "body": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "<<" + } + } + } + }, + "lhs": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v" + } + } + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "to_uint64" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "land" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0xff" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "rhs": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "shift" + } + } + } + } + } + } + } + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "UInt64" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Lambda", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null + } + }, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_make" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "byte" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "l0" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "0" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "lor" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "byte" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "l1" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "8" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "lor" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "byte" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "l2" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "16" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "lor" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "byte" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "l3" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "24" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "lor" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "byte" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "l4" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "32" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "lor" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "byte" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "l5" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "40" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "lor" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "byte" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "l6" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "48" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "lor" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "byte" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "l7" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "56" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "byte" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "l8" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "0" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "lor" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "byte" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "l9" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "8" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "lor" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "byte" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "l10" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "16" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "lor" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "byte" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "l11" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "24" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "lor" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "byte" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "l12" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "32" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "lor" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "byte" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "l13" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "40" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "lor" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "byte" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "l14" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "48" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "lor" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "byte" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "l15" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "56" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + } + } + } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "v128_not" + } + }, + "has_error": null, + "is_async": null, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "value" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "V128" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + } + ] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "V128" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [ + { + "kind": "Attribute", + "loc": null, + "children": { + "raw": "#intrinsic(\"%v128.v128_not\")" + } + } + ] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_make" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_lo" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "value" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "lxor" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0xffffffffffffffff" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_hi" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "value" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "lxor" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0xffffffffffffffff" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "v128_and" + } + }, + "has_error": null, + "is_async": null, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "value" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "V128" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "other" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "V128" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + } + ] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "V128" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [ + { + "kind": "Attribute", + "loc": null, + "children": { + "raw": "#intrinsic(\"%v128.v128_and\")" + } + } + ] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_make" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_lo" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "value" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "land" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_lo" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "other" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_hi" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "value" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "land" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_hi" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "other" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "v128_andnot" + } + }, + "has_error": null, + "is_async": null, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "value" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "V128" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "other" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "V128" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + } + ] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "V128" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [ + { + "kind": "Attribute", + "loc": null, + "children": { + "raw": "#intrinsic(\"%v128.v128_andnot\")" + } + } + ] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_make" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_lo" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "value" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "land" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_lo" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "other" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "lxor" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0xffffffffffffffff" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_hi" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "value" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "land" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_hi" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "other" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "lxor" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0xffffffffffffffff" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "v128_or" + } + }, + "has_error": null, + "is_async": null, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "value" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "V128" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "other" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "V128" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + } + ] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "V128" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [ + { + "kind": "Attribute", + "loc": null, + "children": { + "raw": "#intrinsic(\"%v128.v128_or\")" + } + } + ] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_make" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_lo" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "value" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "lor" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_lo" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "other" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_hi" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "value" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "lor" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_hi" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "other" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "v128_xor" + } + }, + "has_error": null, + "is_async": null, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "value" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "V128" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "other" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "V128" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + } + ] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "V128" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [ + { + "kind": "Attribute", + "loc": null, + "children": { + "raw": "#intrinsic(\"%v128.v128_xor\")" + } + } + ] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_make" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_lo" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "value" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "lxor" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_lo" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "other" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_hi" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "value" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "lxor" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_hi" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "other" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "v128_bitselect" + } + }, + "has_error": null, + "is_async": null, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "value" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "V128" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "other" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "V128" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "mask" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "V128" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + } + ] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "V128" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [ + { + "kind": "Attribute", + "loc": null, + "children": { + "raw": "#intrinsic(\"%v128.v128_bitselect\")" + } + } + ] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_make" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_lo" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "value" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "land" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_lo" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "mask" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "lor" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_lo" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "other" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "land" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_lo" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "mask" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "lxor" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0xffffffffffffffff" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_hi" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "value" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "land" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_hi" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "mask" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "lor" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_hi" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "other" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "land" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_hi" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "mask" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "lxor" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0xffffffffffffffff" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "swar_add" + } + }, + "has_error": null, + "is_async": null, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "a" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "UInt64" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "b" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "UInt64" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "top_bits" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "UInt64" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + } + ] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "UInt64" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::Let", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "low" + } + } + } + }, + "expr": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "top_bits" + } + } + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "lxor" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0xffffffffffffffff" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "body": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Group", + "loc": null, + "children": { + "expr": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "+" + } + } + } + }, + "lhs": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "a" + } + } + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "land" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "low" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "rhs": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "b" + } + } + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "land" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "low" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + }, + "group": { + "kind": "Group::Paren", + "loc": null, + "children": {} + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "lxor" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "a" + } + } + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "lxor" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "b" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "land" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "top_bits" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + } + } + } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "swar_sub" + } + }, + "has_error": null, + "is_async": null, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "a" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "UInt64" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "b" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "UInt64" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "top_bits" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "UInt64" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "lane_ones" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "UInt64" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + } + ] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "UInt64" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "swar_add" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "a" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "swar_add" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "b" + } + } + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "lxor" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0xffffffffffffffff" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "lane_ones" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "top_bits" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "top_bits" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "i8x16_add" + } + }, + "has_error": null, + "is_async": null, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "value" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "V128" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "other" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "V128" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + } + ] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "V128" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [ + { + "kind": "Attribute", + "loc": null, + "children": { + "raw": "#intrinsic(\"%v128.i8x16_add\")" + } + } + ] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_make" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "swar_add" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_lo" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "value" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_lo" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "other" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x8080808080808080" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "swar_add" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_hi" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "value" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_hi" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "other" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x8080808080808080" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "i8x16_sub" + } + }, + "has_error": null, + "is_async": null, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "value" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "V128" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "other" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "V128" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + } + ] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "V128" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [ + { + "kind": "Attribute", + "loc": null, + "children": { + "raw": "#intrinsic(\"%v128.i8x16_sub\")" + } + } + ] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_make" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "swar_sub" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_lo" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "value" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_lo" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "other" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x8080808080808080" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x0101010101010101" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "swar_sub" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_hi" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "value" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_hi" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "other" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x8080808080808080" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x0101010101010101" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "i16x8_add" + } + }, + "has_error": null, + "is_async": null, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "value" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "V128" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "other" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "V128" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + } + ] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "V128" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [ + { + "kind": "Attribute", + "loc": null, + "children": { + "raw": "#intrinsic(\"%v128.i16x8_add\")" + } + } + ] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_make" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "swar_add" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_lo" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "value" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_lo" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "other" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x8000800080008000" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "swar_add" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_hi" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "value" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_hi" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "other" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x8000800080008000" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "i16x8_sub" + } + }, + "has_error": null, + "is_async": null, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "value" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "V128" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "other" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "V128" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + } + ] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "V128" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [ + { + "kind": "Attribute", + "loc": null, + "children": { + "raw": "#intrinsic(\"%v128.i16x8_sub\")" + } + } + ] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_make" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "swar_sub" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_lo" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "value" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_lo" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "other" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x8000800080008000" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x0001000100010001" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "swar_sub" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_hi" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "value" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_hi" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "other" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x8000800080008000" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x0001000100010001" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "i32x4_add" + } + }, + "has_error": null, + "is_async": null, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "value" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "V128" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "other" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "V128" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + } + ] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "V128" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [ + { + "kind": "Attribute", + "loc": null, + "children": { + "raw": "#intrinsic(\"%v128.i32x4_add\")" + } + } + ] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_make" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "swar_add" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_lo" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "value" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_lo" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "other" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x8000000080000000" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "swar_add" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_hi" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "value" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_hi" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "other" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x8000000080000000" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "i32x4_sub" + } + }, + "has_error": null, + "is_async": null, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "value" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "V128" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "other" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "V128" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + } + ] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "V128" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [ + { + "kind": "Attribute", + "loc": null, + "children": { + "raw": "#intrinsic(\"%v128.i32x4_sub\")" + } + } + ] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_make" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "swar_sub" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_lo" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "value" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_lo" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "other" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x8000000080000000" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x0000000100000001" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "swar_sub" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_hi" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "value" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_hi" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "other" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x8000000080000000" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x0000000100000001" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "i32x4_extract_lane" + } + }, + "has_error": null, + "is_async": null, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "value" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "V128" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "lane" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Int" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + } + ] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Int" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [ + { + "kind": "Attribute", + "loc": null, + "children": { + "raw": "#intrinsic(\"%v128.i32x4_extract_lane\")" + } + } + ] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::Let", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "word" + } + } + } + }, + "expr": { + "kind": "Expr::If", + "loc": null, + "children": { + "cond": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "<" + } + } + } + }, + "lhs": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "lane" + } + } + } + } + } + }, + "rhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "2" + } + } + } + } + } + }, + "ifso": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_lo" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "value" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "ifnot": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_hi" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "value" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + }, + "body": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Group", + "loc": null, + "children": { + "expr": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": ">>" + } + } + } + }, + "lhs": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "word" + } + } + } + } + } + }, + "rhs": { + "kind": "Expr::Group", + "loc": null, + "children": { + "expr": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "*" + } + } + } + }, + "lhs": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "%" + } + } + } + }, + "lhs": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "lane" + } + } + } + } + } + }, + "rhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "2" + } + } + } + } + } + }, + "rhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "32" + } + } + } + } + } + }, + "group": { + "kind": "Group::Paren", + "loc": null, + "children": {} + } + } + } + } + }, + "group": { + "kind": "Group::Paren", + "loc": null, + "children": {} + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "land" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0xffffffff" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "reinterpret_as_int64" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "to_int" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + } + } + } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "i32x4_replace_lane" + } + }, + "has_error": null, + "is_async": null, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "value" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "V128" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "replacement" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Int" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "lane" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Int" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + } + ] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "V128" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [ + { + "kind": "Attribute", + "loc": null, + "children": { + "raw": "#intrinsic(\"%v128.i32x4_replace_lane\")" + } + } + ] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::Let", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "shift" + } + } + } + }, + "expr": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "*" + } + } + } + }, + "lhs": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "%" + } + } + } + }, + "lhs": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "lane" + } + } + } + } + } + }, + "rhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "2" + } + } + } + } + } + }, + "rhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "32" + } + } + } + } + } + }, + "body": { + "kind": "Expr::Let", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "cleared" + } + } + } + }, + "expr": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Group", + "loc": null, + "children": { + "expr": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "<<" + } + } + } + }, + "lhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0xffffffff" + } + } + } + }, + "rhs": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "shift" + } + } + } + } + } + } + } + }, + "group": { + "kind": "Group::Paren", + "loc": null, + "children": {} + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "lxor" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0xffffffffffffffff" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "body": { + "kind": "Expr::Let", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "repl" + } + } + } + }, + "expr": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "<<" + } + } + } + }, + "lhs": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "replacement" + } + } + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "to_uint64" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "land" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0xffffffff" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "rhs": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "shift" + } + } + } + } + } + } + } + }, + "body": { + "kind": "Expr::If", + "loc": null, + "children": { + "cond": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "<" + } + } + } + }, + "lhs": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "lane" + } + } + } + } + } + }, + "rhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "2" + } + } + } + } + } + }, + "ifso": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_make" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_lo" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "value" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "land" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "cleared" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "lor" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "repl" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_hi" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "value" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "ifnot": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_make" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_lo" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "value" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_hi" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "value" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "land" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "cleared" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "lor" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "repl" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + } + } + } + } + } + } + } + } + } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "i64x2_add" + } + }, + "has_error": null, + "is_async": null, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "value" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "V128" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "other" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "V128" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + } + ] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "V128" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [ + { + "kind": "Attribute", + "loc": null, + "children": { + "raw": "#intrinsic(\"%v128.i64x2_add\")" + } + } + ] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_make" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "+" + } + } + } + }, + "lhs": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_lo" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "value" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "rhs": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_lo" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "other" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "+" + } + } + } + }, + "lhs": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_hi" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "value" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "rhs": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_hi" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "other" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "i64x2_sub" + } + }, + "has_error": null, + "is_async": null, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "value" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "V128" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "other" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "V128" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + } + ] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "V128" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [ + { + "kind": "Attribute", + "loc": null, + "children": { + "raw": "#intrinsic(\"%v128.i64x2_sub\")" + } + } + ] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_make" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "-" + } + } + } + }, + "lhs": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_lo" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "value" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "rhs": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_lo" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "other" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "-" + } + } + } + }, + "lhs": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_hi" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "value" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "rhs": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_hi" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "other" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "i8x16_shuffle" + } + }, + "has_error": null, + "is_async": null, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "value" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "V128" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "other" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "V128" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "l0" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Int" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "l1" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Int" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "l2" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Int" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "l3" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Int" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "l4" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Int" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "l5" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Int" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "l6" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Int" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "l7" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Int" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "l8" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Int" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "l9" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Int" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "l10" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Int" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "l11" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Int" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "l12" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Int" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "l13" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Int" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "l14" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Int" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "l15" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Int" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + } + ] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "V128" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [ + { + "kind": "Attribute", + "loc": null, + "children": { + "raw": "#intrinsic(\"%v128.i8x16_shuffle\")" + } + } + ] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::LetFn", + "loc": null, + "children": { + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "u8_lane" + } + }, + "func": { + "kind": "Func::Lambda", + "loc": null, + "children": { + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "v" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "V128" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "lane" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Int" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + } + ] + }, + "body": { + "kind": "Expr::Let", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "word" + } + } + } + }, + "expr": { + "kind": "Expr::If", + "loc": null, + "children": { + "cond": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "<" + } + } + } + }, + "lhs": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "lane" + } + } + } + } + } + }, + "rhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "8" + } + } + } + } + } + }, + "ifso": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_lo" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "ifnot": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_hi" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + }, + "body": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Group", + "loc": null, + "children": { + "expr": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": ">>" + } + } + } + }, + "lhs": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "word" + } + } + } + } + } + }, + "rhs": { + "kind": "Expr::Group", + "loc": null, + "children": { + "expr": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "*" + } + } + } + }, + "lhs": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "%" + } + } + } + }, + "lhs": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "lane" + } + } + } + } + } + }, + "rhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "8" + } + } + } + } + } + }, + "rhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "8" + } + } + } + } + } + }, + "group": { + "kind": "Group::Paren", + "loc": null, + "children": {} + } + } + } + } + }, + "group": { + "kind": "Group::Paren", + "loc": null, + "children": {} + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "land" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0xff" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "UInt64" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Lambda", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null + } + }, + "body": { + "kind": "Expr::LetFn", + "loc": null, + "children": { + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "pick" + } + }, + "func": { + "kind": "Func::Lambda", + "loc": null, + "children": { + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "idx" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Int" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + } + ] + }, + "body": { + "kind": "Expr::If", + "loc": null, + "children": { + "cond": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "<" + } + } + } + }, + "lhs": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "idx" + } + } + } + } + } + }, + "rhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "16" + } + } + } + } + } + }, + "ifso": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "u8_lane" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "value" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "idx" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "ifnot": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "u8_lane" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "other" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "-" + } + } + } + }, + "lhs": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "idx" + } + } + } + } + } + }, + "rhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "16" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "UInt64" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Lambda", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null + } + }, + "body": { + "kind": "Expr::Let", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Constraint", + "loc": null, + "children": { + "pat": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "lanes" + } + } + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "FixedArray" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [ + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Int" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + ] + } + } + } + } + }, + "expr": { + "kind": "Expr::Array", + "loc": null, + "children": { + "exprs": { + "kind": "Expr::Array::ExprList", + "loc": null, + "children": [ + { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "l0" + } + } + } + } + } + }, + { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "l1" + } + } + } + } + } + }, + { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "l2" + } + } + } + } + } + }, + { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "l3" + } + } + } + } + } + }, + { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "l4" + } + } + } + } + } + }, + { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "l5" + } + } + } + } + } + }, + { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "l6" + } + } + } + } + } + }, + { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "l7" + } + } + } + } + } + }, + { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "l8" + } + } + } + } + } + }, + { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "l9" + } + } + } + } + } + }, + { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "l10" + } + } + } + } + } + }, + { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "l11" + } + } + } + } + } + }, + { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "l12" + } + } + } + } + } + }, + { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "l13" + } + } + } + } + } + }, + { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "l14" + } + } + } + } + } + }, + { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "l15" + } + } + } + } + } + } + ] + }, + "is_iter": false + } + }, + "body": { + "kind": "Expr::LetMut", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "lo" + } + }, + "ty": null, + "expr": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0" + } + } + } + }, + "body": { + "kind": "Expr::LetMut", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "hi" + } + }, + "ty": null, + "expr": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0" + } + } + } + }, + "body": { + "kind": "Expr::Sequence", + "loc": null, + "children": { + "exprs": { + "kind": "Expr::Sequence::ExprList", + "loc": null, + "children": [ + { + "kind": "Expr::ForEach", + "loc": null, + "children": { + "binders": { + "kind": "Expr::ForEach::BinderList", + "loc": null, + "children": [ + { + "kind": "Binder", + "loc": null, + "children": { + "name": "i" + } + } + ] + }, + "expr": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "..<" + } + } + } + }, + "lhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "0" + } + } + } + }, + "rhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "8" + } + } + } + } + } + }, + "init": { + "kind": "Expr::ForEach::Init", + "loc": null, + "children": [] + }, + "continue_block": { + "kind": "Expr::ForEach::ContinueBlock", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Sequence", + "loc": null, + "children": { + "exprs": { + "kind": "Expr::Sequence::ExprList", + "loc": null, + "children": [ + { + "kind": "Expr::Assign", + "loc": null, + "children": { + "var": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "lo" + } + } + } + }, + "expr": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "lo" + } + } + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "lor" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "<<" + } + } + } + }, + "lhs": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "pick" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::ArrayGet", + "loc": null, + "children": { + "array": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "lanes" + } + } + } + } + } + }, + "index": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "i" + } + } + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "rhs": { + "kind": "Expr::Group", + "loc": null, + "children": { + "expr": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "*" + } + } + } + }, + "lhs": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "i" + } + } + } + } + } + }, + "rhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "8" + } + } + } + } + } + }, + "group": { + "kind": "Group::Paren", + "loc": null, + "children": {} + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "augmented_by": null + } + } + ] + }, + "last_expr": { + "kind": "Expr::Assign", + "loc": null, + "children": { + "var": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "hi" + } + } + } + }, + "expr": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "hi" + } + } + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "lor" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "<<" + } + } + } + }, + "lhs": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "pick" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::ArrayGet", + "loc": null, + "children": { + "array": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "lanes" + } + } + } + } + } + }, + "index": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "+" + } + } + } + }, + "lhs": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "i" + } + } + } + } + } + }, + "rhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "8" + } + } + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "rhs": { + "kind": "Expr::Group", + "loc": null, + "children": { + "expr": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "*" + } + } + } + }, + "lhs": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "i" + } + } + } + } + } + }, + "rhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "8" + } + } + } + } + } + }, + "group": { + "kind": "Group::Paren", + "loc": null, + "children": {} + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "augmented_by": null + } + } + } + }, + "else_block": null, + "where_clause": null, + "label": null + } + } + ] + }, + "last_expr": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_make" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "lo" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "hi" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + }, + { + "kind": "Impl::TopTypeDef", + "loc": null, + "children": { + "value": { + "kind": "TypeDecl", + "loc": null, + "children": { + "tycon": "V128Error", + "params": { + "kind": "TypeDecl::ParamList", + "loc": null, + "children": [] + }, + "components": { + "kind": "TypeDesc::Error", + "loc": null, + "children": { + "value": { + "kind": "ExceptionDecl::NoPayload", + "loc": null, + "children": {} + } + } + }, + "attrs": { + "kind": "TypeDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "", + "type_vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "is_declare": false, + "deriving": { + "kind": "TypeDecl::DerivingList", + "loc": null, + "children": [] + } + } + } + } + }, + { + "kind": "Impl::TopTypeDef", + "loc": null, + "children": { + "value": { + "kind": "TypeDecl", + "loc": null, + "children": { + "tycon": "V128Box", + "params": { + "kind": "TypeDecl::ParamList", + "loc": null, + "children": [] + }, + "components": { + "kind": "TypeDesc::Record", + "loc": null, + "children": { + "value": { + "kind": "TypeDesc::Record::FieldList", + "loc": null, + "children": [ + { + "kind": "FieldDecl", + "loc": null, + "children": { + "name": { + "kind": "FieldName", + "loc": null, + "children": { + "label": "v" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "V128" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "mut": false, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FieldDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + { + "kind": "FieldDecl", + "loc": null, + "children": { + "name": { + "kind": "FieldName", + "loc": null, + "children": { + "label": "tag" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Int" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "mut": false, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FieldDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + } + ] + } + } + }, + "attrs": { + "kind": "TypeDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "", + "type_vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "is_declare": false, + "deriving": { + "kind": "TypeDecl::DerivingList", + "loc": null, + "children": [] + } + } + } + } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "check" + } + }, + "has_error": null, + "is_async": null, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "name" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "String" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "v" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "V128" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "lo" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "UInt64" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "hi" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "UInt64" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + } + ] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Unit" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::If", + "loc": null, + "children": { + "cond": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "&&" + } + } + } + }, + "lhs": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "==" + } + } + } + }, + "lhs": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_lo" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "rhs": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "lo" + } + } + } + } + } + } + } + }, + "rhs": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "==" + } + } + } + }, + "lhs": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_hi" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "rhs": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "hi" + } + } + } + } + } + } + } + } + } + }, + "ifso": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Interp", + "loc": null, + "children": { + "elems": { + "kind": "Expr::Interp::ElemList", + "loc": null, + "children": [ + { + "kind": "InterpElem::Source", + "loc": null, + "children": { + "source": "name" + } + }, + { + "kind": "InterpElem::Literal", + "loc": null, + "children": { + "repr": ": ok" + } + } + ] + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "ifnot": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Interp", + "loc": null, + "children": { + "elems": { + "kind": "Expr::Interp::ElemList", + "loc": null, + "children": [ + { + "kind": "InterpElem::Source", + "loc": null, + "children": { + "source": "name" + } + }, + { + "kind": "InterpElem::Literal", + "loc": null, + "children": { + "repr": ": fail" + } + } + ] + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + } + } + } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "check_bool" + } + }, + "has_error": null, + "is_async": null, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "name" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "String" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "b" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Bool" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + } + ] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Unit" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::If", + "loc": null, + "children": { + "cond": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "b" + } + } + } + } + } + }, + "ifso": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Interp", + "loc": null, + "children": { + "elems": { + "kind": "Expr::Interp::ElemList", + "loc": null, + "children": [ + { + "kind": "InterpElem::Source", + "loc": null, + "children": { + "source": "name" + } + }, + { + "kind": "InterpElem::Literal", + "loc": null, + "children": { + "repr": ": ok" + } + } + ] + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "ifnot": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Interp", + "loc": null, + "children": { + "elems": { + "kind": "Expr::Interp::ElemList", + "loc": null, + "children": [ + { + "kind": "InterpElem::Source", + "loc": null, + "children": { + "source": "name" + } + }, + { + "kind": "InterpElem::Literal", + "loc": null, + "children": { + "repr": ": fail" + } + } + ] + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + } + } + } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "make_by_index" + } + }, + "has_error": null, + "is_async": null, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "i" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Int" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + } + ] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "V128" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::Match", + "loc": null, + "children": { + "expr": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "i" + } + } + } + } + } + }, + "cases": { + "kind": "Expr::Match::CaseList", + "loc": null, + "children": [ + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "0" + } + } + } + }, + "guard": null, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_make" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x0000000000000000" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x0000000000000001" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + }, + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "1" + } + } + } + }, + "guard": null, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_make" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x1111111111111111" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x1111111111111112" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + }, + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "2" + } + } + } + }, + "guard": null, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_make" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x2222222222222222" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x2222222222222223" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + }, + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "3" + } + } + } + }, + "guard": null, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_make" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x3333333333333333" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x3333333333333334" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + }, + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "4" + } + } + } + }, + "guard": null, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_make" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x4444444444444444" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x4444444444444445" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + }, + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Any", + "loc": null, + "children": {} + }, + "guard": null, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_make" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0xffffffffffffffff" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0xeeeeeeeeeeeeeeee" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + ] + } + } + } + } + } + } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "choose" + } + }, + "has_error": null, + "is_async": null, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "flag" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Bool" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "a" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "V128" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "b" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "V128" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + } + ] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "V128" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::If", + "loc": null, + "children": { + "cond": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "flag" + } + } + } + } + } + }, + "ifso": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "a" + } + } + } + } + } + }, + "ifnot": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "b" + } + } + } + } + } + } + } + } + } + } + } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "pass_through" + } + }, + "has_error": null, + "is_async": null, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "v" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "V128" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + } + ] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "V128" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_make" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_lo" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_hi" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "maybe_v128" + } + }, + "has_error": null, + "is_async": null, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "ok" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Bool" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + } + ] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "V128" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "error_type": { + "kind": "ErrorType::ErrorType", + "loc": null, + "children": { + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "V128Error" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::If", + "loc": null, + "children": { + "cond": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "ok" + } + } + } + } + } + }, + "ifso": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "make_by_index" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "4" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "ifnot": { + "kind": "Expr::Raise", + "loc": null, + "children": { + "err_value": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "V128Error" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::NoExtraInfo", + "loc": null, + "children": {} + } + } + } + } + } + } + } + } + } + } + } + } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "check_v128_result" + } + }, + "has_error": null, + "is_async": null, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "name" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "String" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "r" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [ + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "V128" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "V128Error" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + ] + } + } + } + } + }, + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "lo" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "UInt64" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "hi" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "UInt64" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + } + ] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Unit" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::Match", + "loc": null, + "children": { + "expr": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "r" + } + } + } + } + } + }, + "cases": { + "kind": "Expr::Match::CaseList", + "loc": null, + "children": [ + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Ok" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::NoExtraInfo", + "loc": null, + "children": {} + } + } + }, + "args": { + "kind": "Pattern::Constr::ArgList", + "loc": null, + "children": [ + { + "kind": "ConstrPatArg", + "loc": null, + "children": { + "pat": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "v" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "is_open": false + } + }, + "guard": null, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "check" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "name" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "lo" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "hi" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + }, + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Err" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::NoExtraInfo", + "loc": null, + "children": {} + } + } + }, + "args": { + "kind": "Pattern::Constr::ArgList", + "loc": null, + "children": [ + { + "kind": "ConstrPatArg", + "loc": null, + "children": { + "pat": { + "kind": "Pattern::Any", + "loc": null, + "children": {} + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "is_open": false + } + }, + "guard": null, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Interp", + "loc": null, + "children": { + "elems": { + "kind": "Expr::Interp::ElemList", + "loc": null, + "children": [ + { + "kind": "InterpElem::Source", + "loc": null, + "children": { + "source": "name" + } + }, + { + "kind": "InterpElem::Literal", + "loc": null, + "children": { + "repr": ": fail" + } + } + ] + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + ] + } + } + } + } + } + } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "check_v128_error" + } + }, + "has_error": null, + "is_async": null, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "name" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "String" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "r" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [ + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "V128" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "V128Error" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + ] + } + } + } + } + } + ] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Unit" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::Match", + "loc": null, + "children": { + "expr": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "r" + } + } + } + } + } + }, + "cases": { + "kind": "Expr::Match::CaseList", + "loc": null, + "children": [ + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Ok" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::NoExtraInfo", + "loc": null, + "children": {} + } + } + }, + "args": { + "kind": "Pattern::Constr::ArgList", + "loc": null, + "children": [ + { + "kind": "ConstrPatArg", + "loc": null, + "children": { + "pat": { + "kind": "Pattern::Any", + "loc": null, + "children": {} + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "is_open": false + } + }, + "guard": null, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Interp", + "loc": null, + "children": { + "elems": { + "kind": "Expr::Interp::ElemList", + "loc": null, + "children": [ + { + "kind": "InterpElem::Source", + "loc": null, + "children": { + "source": "name" + } + }, + { + "kind": "InterpElem::Literal", + "loc": null, + "children": { + "repr": ": fail" + } + } + ] + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + }, + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Err" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::NoExtraInfo", + "loc": null, + "children": {} + } + } + }, + "args": { + "kind": "Pattern::Constr::ArgList", + "loc": null, + "children": [ + { + "kind": "ConstrPatArg", + "loc": null, + "children": { + "pat": { + "kind": "Pattern::Any", + "loc": null, + "children": {} + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "is_open": false + } + }, + "guard": null, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Interp", + "loc": null, + "children": { + "elems": { + "kind": "Expr::Interp::ElemList", + "loc": null, + "children": [ + { + "kind": "InterpElem::Source", + "loc": null, + "children": { + "source": "name" + } + }, + { + "kind": "InterpElem::Literal", + "loc": null, + "children": { + "repr": ": ok" + } + } + ] + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + ] + } + } + } + } + } + } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "make_box" + } + }, + "has_error": null, + "is_async": null, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "i" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Int" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + } + ] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "V128Box" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::Record", + "loc": null, + "children": { + "type_name": null, + "fields": { + "kind": "Expr::Record::FieldList", + "loc": null, + "children": [ + { + "kind": "FieldDef", + "loc": null, + "children": { + "label": { + "kind": "Label", + "loc": null, + "children": { + "name": "v" + } + }, + "expr": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "make_by_index" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "i" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "is_pun": false + } + }, + { + "kind": "FieldDef", + "loc": null, + "children": { + "label": { + "kind": "Label", + "loc": null, + "children": { + "name": "tag" + } + }, + "expr": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "i" + } + } + } + } + } + }, + "is_pun": false + } + } + ] + }, + "trailing": { + "kind": "Trailing::None", + "loc": null, + "children": {} + } + } + } + } + } + } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "init" + } + }, + "has_error": null, + "is_async": null, + "decl_params": null, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [] + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::Let", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "a" + } + } + } + }, + "expr": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_make" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x0123456789abcdef" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0xfedcba9876543210" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "body": { + "kind": "Expr::Let", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "b" + } + } + } + }, + "expr": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_make" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x1111111122222222" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x3333333344444444" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "body": { + "kind": "Expr::Let", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "c" + } + } + } + }, + "expr": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_make" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0xffffffffffffffff" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x8000000000000000" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "body": { + "kind": "Expr::Sequence", + "loc": null, + "children": { + "exprs": { + "kind": "Expr::Sequence::ExprList", + "loc": null, + "children": [ + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "check" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "zero bits" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_make" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "check" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "small bits" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_make" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "1" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "2" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "1" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "2" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "check" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "lane order" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "a" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x0123456789abcdef" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0xfedcba9876543210" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "check" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "all ones and sign bit" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "c" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0xffffffffffffffff" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x8000000000000000" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "check" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "v128 const intrinsic" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_const" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "0" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "1" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "2" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "3" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "4" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "5" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "6" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "7" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "8" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "9" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "10" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "11" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "12" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "13" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "14" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "15" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x0706050403020100" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x0f0e0d0c0b0a0908" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "check" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "v128 not intrinsic" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_not" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_make" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x0123456789abcdef" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0xfedcba9876543210" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0xfedcba9876543210" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x0123456789abcdef" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "check" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "v128 and intrinsic" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_and" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_make" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x0f0f0f0f0f0f0f0f" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0xffff0000ffff0000" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_make" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x3333333333333333" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x00ff00ff00ff00ff" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x0303030303030303" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x00ff000000ff0000" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "check" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "v128 andnot intrinsic" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_andnot" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_make" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0xffff0000ffff0000" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x0f0f0f0f0f0f0f0f" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_make" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x00ff00ff00ff00ff" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x3333333333333333" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0xff000000ff000000" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x0c0c0c0c0c0c0c0c" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "check" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "v128 or intrinsic" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_or" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_make" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x0f0f0f0f00000000" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x00000000f0f0f0f0" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_make" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x00000000f0f0f0f0" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x0f0f0f0f00000000" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x0f0f0f0ff0f0f0f0" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x0f0f0f0ff0f0f0f0" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "check" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "v128 xor intrinsic" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_xor" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_make" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0xffff0000ffff0000" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0xaaaaaaaa55555555" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_make" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x00ff00ff00ff00ff" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0xffff0000ffff0000" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0xff0000ffff0000ff" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x5555aaaaaaaa5555" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "check" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "v128 bitselect intrinsic" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_bitselect" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_make" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0xffff0000ffff0000" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0xaaaaaaaa55555555" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_make" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x0000ffff0000ffff" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x55555555aaaaaaaa" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_make" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0xff00ff00ff00ff00" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0xffff0000ffff0000" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0xff0000ffff0000ff" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0xaaaa55555555aaaa" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "check" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "i8x16 add intrinsic" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "i8x16_add" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_make" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x0102030405060708" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x1112131415161718" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_make" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x0101010101010101" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x0101010101010101" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x0203040506070809" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x1213141516171819" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "check" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "i8x16 sub intrinsic" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "i8x16_sub" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_make" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x1011121314151617" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x2021222324252627" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_make" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x0101010101010101" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x0101010101010101" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x0f10111213141516" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x1f20212223242526" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "check" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "i16x8 add intrinsic" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "i16x8_add" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_make" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x0001000200030004" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x0005000600070008" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_make" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x0001000100010001" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x0001000100010001" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x0002000300040005" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x0006000700080009" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "check" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "i16x8 sub intrinsic" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "i16x8_sub" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_make" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x0010001100120013" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x0020002100220023" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_make" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x0001000100010001" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x0001000100010001" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x000f001000110012" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x001f002000210022" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "check" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "i32x4 add intrinsic" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "i32x4_add" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_make" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x0000000100000002" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x0000000300000004" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_make" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x0000000100000001" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x0000000100000001" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x0000000200000003" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x0000000400000005" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "check" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "i32x4 sub intrinsic" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "i32x4_sub" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_make" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x0000001000000011" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x0000002000000021" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_make" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x0000000100000001" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x0000000100000001" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x0000000f00000010" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x0000001f00000020" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "check_bool" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "i32x4 extract lane intrinsic" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "==" + } + } + } + }, + "lhs": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "i32x4_extract_lane" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_make" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x0000000100000002" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x0000000300000004" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "3" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "rhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "3" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "check" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "i32x4 replace lane intrinsic" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "i32x4_replace_lane" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_make" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x0000000100000002" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x0000000300000004" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "9" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "0" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x0000000100000009" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x0000000300000004" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "check" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "i64x2 add intrinsic" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "i64x2_add" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_make" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x0000000000000001" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x0000000000000002" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_make" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "3" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "4" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "4" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "6" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "check" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "i64x2 sub intrinsic" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "i64x2_sub" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_make" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x0000000000000010" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x0000000000000020" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_make" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "1" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "2" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x000000000000000f" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x000000000000001e" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "check" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "i8x16 shuffle intrinsic" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "i8x16_shuffle" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "a" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "b" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "0" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "1" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "2" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "3" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "4" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "5" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "6" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "7" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "8" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "9" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "10" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "11" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "12" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "13" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "14" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "15" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x0123456789abcdef" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0xfedcba9876543210" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "check" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "i8x16 shuffle across both vectors" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "i8x16_shuffle" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "a" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "b" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "0" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "16" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "1" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "17" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "2" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "18" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "3" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "19" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "4" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "20" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "5" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "21" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "6" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "22" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "7" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "23" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x228922ab22cd22ef" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x1101112311451167" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "check" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "rebuild from bits" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "pass_through" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "a" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x0123456789abcdef" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0xfedcba9876543210" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "check" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "if true" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "choose" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Bool", + "loc": null, + "children": { + "value": true + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "a" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "b" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x0123456789abcdef" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0xfedcba9876543210" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "check" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "if false" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "choose" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Bool", + "loc": null, + "children": { + "value": false + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "a" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "b" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x1111111122222222" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x3333333344444444" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "check_bool" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "physical equal same bits" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "physical_equal" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "a" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "pass_through" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "a" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "check_bool" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "physical equal different bits" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "==" + } + } + } + }, + "lhs": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "physical_equal" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "a" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "b" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "rhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Bool", + "loc": null, + "children": { + "value": false + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + ] + }, + "last_expr": { + "kind": "Expr::Let", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Constraint", + "loc": null, + "children": { + "pat": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "xs" + } + } + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Array" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [ + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "V128" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + ] + } + } + } + } + }, + "expr": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Method", + "loc": null, + "children": { + "type_name": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Array" + } + }, + "is_object": false + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "make" + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "5" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "a" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "body": { + "kind": "Expr::Sequence", + "loc": null, + "children": { + "exprs": { + "kind": "Expr::Sequence::ExprList", + "loc": null, + "children": [ + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "check_bool" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "array length" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "==" + } + } + } + }, + "lhs": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "xs" + } + } + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "length" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "rhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "5" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "check" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "array make first" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "xs" + } + } + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "unsafe_get" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "0" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x0123456789abcdef" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0xfedcba9876543210" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "check" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "array make middle" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "xs" + } + } + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "unsafe_get" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "2" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x0123456789abcdef" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0xfedcba9876543210" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "check" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "array make last" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "xs" + } + } + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "unsafe_get" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "4" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x0123456789abcdef" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0xfedcba9876543210" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "xs" + } + } + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "unsafe_set" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "1" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "b" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "xs" + } + } + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "unsafe_set" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "3" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "c" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "check" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "array set first preserved" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "xs" + } + } + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "unsafe_get" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "0" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x0123456789abcdef" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0xfedcba9876543210" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "check" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "array set index 1" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "xs" + } + } + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "unsafe_get" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "1" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x1111111122222222" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x3333333344444444" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "check" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "array set neighbor preserved" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "xs" + } + } + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "unsafe_get" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "2" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x0123456789abcdef" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0xfedcba9876543210" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "check" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "array set index 3" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "xs" + } + } + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "unsafe_get" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "3" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0xffffffffffffffff" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x8000000000000000" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "check" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "array set last preserved" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "xs" + } + } + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "unsafe_get" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "4" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x0123456789abcdef" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0xfedcba9876543210" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + ] + }, + "last_expr": { + "kind": "Expr::Let", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "xs_copy" + } + } + } + }, + "expr": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "xs" + } + } + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "copy" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "body": { + "kind": "Expr::Sequence", + "loc": null, + "children": { + "exprs": { + "kind": "Expr::Sequence::ExprList", + "loc": null, + "children": [ + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "check_bool" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "array copy length" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "==" + } + } + } + }, + "lhs": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "xs_copy" + } + } + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "length" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "rhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "5" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "check" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "array copy index 1" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "xs_copy" + } + } + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "unsafe_get" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "1" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x1111111122222222" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x3333333344444444" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "check" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "array copy index 3" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "xs_copy" + } + } + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "unsafe_get" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "3" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0xffffffffffffffff" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x8000000000000000" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + ] + }, + "last_expr": { + "kind": "Expr::Let", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Constraint", + "loc": null, + "children": { + "pat": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "empty_xs" + } + } + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Array" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [ + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "V128" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + ] + } + } + } + } + }, + "expr": { + "kind": "Expr::Array", + "loc": null, + "children": { + "exprs": { + "kind": "Expr::Array::ExprList", + "loc": null, + "children": [] + }, + "is_iter": false + } + }, + "body": { + "kind": "Expr::Sequence", + "loc": null, + "children": { + "exprs": { + "kind": "Expr::Sequence::ExprList", + "loc": null, + "children": [ + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "check_bool" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "empty array literal length" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "==" + } + } + } + }, + "lhs": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "empty_xs" + } + } + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "length" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "rhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "0" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + ] + }, + "last_expr": { + "kind": "Expr::Let", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Constraint", + "loc": null, + "children": { + "pat": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "zero_xs" + } + } + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Array" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [ + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "V128" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + ] + } + } + } + } + }, + "expr": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Method", + "loc": null, + "children": { + "type_name": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Array" + } + }, + "is_object": false + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "make" + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "0" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "a" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "body": { + "kind": "Expr::Sequence", + "loc": null, + "children": { + "exprs": { + "kind": "Expr::Sequence::ExprList", + "loc": null, + "children": [ + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "check_bool" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "array make zero length" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "==" + } + } + } + }, + "lhs": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "zero_xs" + } + } + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "length" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "rhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "0" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + ] + }, + "last_expr": { + "kind": "Expr::Let", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Constraint", + "loc": null, + "children": { + "pat": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "ys" + } + } + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Array" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [ + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "V128" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + ] + } + } + } + } + }, + "expr": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Method", + "loc": null, + "children": { + "type_name": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Array" + } + }, + "is_object": false + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "makei" + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "6" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "make_by_index" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "body": { + "kind": "Expr::Sequence", + "loc": null, + "children": { + "exprs": { + "kind": "Expr::Sequence::ExprList", + "loc": null, + "children": [ + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "check_bool" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "array makei length" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "==" + } + } + } + }, + "lhs": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "ys" + } + } + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "length" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "rhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "6" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "check" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "array makei index 0" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "ys" + } + } + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "unsafe_get" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "0" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x0000000000000000" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x0000000000000001" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "check" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "array makei index 3" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "ys" + } + } + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "unsafe_get" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "3" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x3333333333333333" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x3333333333333334" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "check" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "array makei index 5" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "ys" + } + } + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "unsafe_get" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "5" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0xffffffffffffffff" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0xeeeeeeeeeeeeeeee" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + ] + }, + "last_expr": { + "kind": "Expr::Let", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Constraint", + "loc": null, + "children": { + "pat": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "zs" + } + } + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "FixedArray" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [ + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "V128" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + ] + } + } + } + } + }, + "expr": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Method", + "loc": null, + "children": { + "type_name": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "FixedArray" + } + }, + "is_object": false + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "makei" + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "4" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "make_by_index" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "body": { + "kind": "Expr::Sequence", + "loc": null, + "children": { + "exprs": { + "kind": "Expr::Sequence::ExprList", + "loc": null, + "children": [ + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "check_bool" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "fixedarray length" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "==" + } + } + } + }, + "lhs": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "zs" + } + } + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "length" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "rhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "4" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "check" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "fixedarray index 0" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "zs" + } + } + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "unsafe_get" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "0" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x0000000000000000" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x0000000000000001" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "check" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "fixedarray index 2" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "zs" + } + } + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "unsafe_get" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "2" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x2222222222222222" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x2222222222222223" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "check" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "fixedarray index 3" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "zs" + } + } + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "unsafe_get" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "3" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x3333333333333333" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x3333333333333334" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + ] + }, + "last_expr": { + "kind": "Expr::Let", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "zs_copy" + } + } + } + }, + "expr": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "zs" + } + } + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "copy" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "body": { + "kind": "Expr::Sequence", + "loc": null, + "children": { + "exprs": { + "kind": "Expr::Sequence::ExprList", + "loc": null, + "children": [ + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "check_bool" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "fixedarray copy length" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "==" + } + } + } + }, + "lhs": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "zs_copy" + } + } + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "length" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "rhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "4" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "check" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "fixedarray copy index 2" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "zs_copy" + } + } + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "unsafe_get" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "2" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x2222222222222222" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x2222222222222223" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + ] + }, + "last_expr": { + "kind": "Expr::Let", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Constraint", + "loc": null, + "children": { + "pat": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "empty_zs" + } + } + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "FixedArray" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [ + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "V128" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + ] + } + } + } + } + }, + "expr": { + "kind": "Expr::Array", + "loc": null, + "children": { + "exprs": { + "kind": "Expr::Array::ExprList", + "loc": null, + "children": [] + }, + "is_iter": false + } + }, + "body": { + "kind": "Expr::Sequence", + "loc": null, + "children": { + "exprs": { + "kind": "Expr::Sequence::ExprList", + "loc": null, + "children": [ + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "check_bool" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "empty fixedarray literal length" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "==" + } + } + } + }, + "lhs": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "empty_zs" + } + } + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "length" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "rhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "0" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + ] + }, + "last_expr": { + "kind": "Expr::Let", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Constraint", + "loc": null, + "children": { + "pat": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "zero_zs" + } + } + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "FixedArray" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [ + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "V128" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + ] + } + } + } + } + }, + "expr": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Method", + "loc": null, + "children": { + "type_name": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "FixedArray" + } + }, + "is_object": false + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "make" + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "0" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "a" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "body": { + "kind": "Expr::Sequence", + "loc": null, + "children": { + "exprs": { + "kind": "Expr::Sequence::ExprList", + "loc": null, + "children": [ + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "check_bool" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "fixedarray make zero length" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "==" + } + } + } + }, + "lhs": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "zero_zs" + } + } + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "length" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "rhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "0" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + ] + }, + "last_expr": { + "kind": "Expr::Let", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Constraint", + "loc": null, + "children": { + "pat": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "ok_result" + } + } + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [ + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "V128" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "V128Error" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + ] + } + } + } + } + }, + "expr": { + "kind": "Expr::TryOperator", + "loc": null, + "children": { + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "maybe_v128" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Bool", + "loc": null, + "children": { + "value": true + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "TryOperatorKind::Question", + "loc": null, + "children": {} + } + } + }, + "body": { + "kind": "Expr::Let", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Constraint", + "loc": null, + "children": { + "pat": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "err_result" + } + } + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [ + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "V128" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "V128Error" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + ] + } + } + } + } + }, + "expr": { + "kind": "Expr::TryOperator", + "loc": null, + "children": { + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "maybe_v128" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Bool", + "loc": null, + "children": { + "value": false + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "TryOperatorKind::Question", + "loc": null, + "children": {} + } + } + }, + "body": { + "kind": "Expr::Sequence", + "loc": null, + "children": { + "exprs": { + "kind": "Expr::Sequence::ExprList", + "loc": null, + "children": [ + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "check_v128_result" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "result v128 ok" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "ok_result" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x4444444444444444" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x4444444444444445" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "check_v128_error" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "result v128 err" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "err_result" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + ] + }, + "last_expr": { + "kind": "Expr::Let", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Constraint", + "loc": null, + "children": { + "pat": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "boxes" + } + } + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "FixedArray" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [ + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "V128Box" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + ] + } + } + } + } + }, + "expr": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Method", + "loc": null, + "children": { + "type_name": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "FixedArray" + } + }, + "is_object": false + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "makei" + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "4" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "make_box" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "body": { + "kind": "Expr::Let", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "box2" + } + } + } + }, + "expr": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "boxes" + } + } + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "unsafe_get" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "2" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "body": { + "kind": "Expr::Let", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "box3" + } + } + } + }, + "expr": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "boxes" + } + } + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "unsafe_get" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "3" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "body": { + "kind": "Expr::Sequence", + "loc": null, + "children": { + "exprs": { + "kind": "Expr::Sequence::ExprList", + "loc": null, + "children": [ + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "check_bool" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "struct v128 field length" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "==" + } + } + } + }, + "lhs": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "boxes" + } + } + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "length" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "rhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "4" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "check_bool" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "struct v128 field tag" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "==" + } + } + } + }, + "lhs": { + "kind": "Expr::Field", + "loc": null, + "children": { + "record": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "box3" + } + } + } + } + } + }, + "accessor": { + "kind": "Accessor::Label", + "loc": null, + "children": { + "value": { + "kind": "Label", + "loc": null, + "children": { + "name": "tag" + } + } + } + } + } + }, + "rhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "3" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "check" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "struct v128 field index 2" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Field", + "loc": null, + "children": { + "record": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "box2" + } + } + } + } + } + }, + "accessor": { + "kind": "Accessor::Label", + "loc": null, + "children": { + "value": { + "kind": "Label", + "loc": null, + "children": { + "name": "v" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x2222222222222222" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x2222222222222223" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "check" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "struct v128 field index 3" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Field", + "loc": null, + "children": { + "record": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "box3" + } + } + } + } + } + }, + "accessor": { + "kind": "Accessor::Label", + "loc": null, + "children": { + "value": { + "kind": "Label", + "loc": null, + "children": { + "name": "v" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x3333333333333333" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x3333333333333334" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + ] + }, + "last_expr": { + "kind": "Expr::Let", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Constraint", + "loc": null, + "children": { + "pat": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "mem" + } + } + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "FixedArray" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [ + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Byte" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + ] + } + } + } + } + }, + "expr": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Method", + "loc": null, + "children": { + "type_name": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "FixedArray" + } + }, + "is_object": false + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "make" + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "32" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "0" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "body": { + "kind": "Expr::Sequence", + "loc": null, + "children": { + "exprs": { + "kind": "Expr::Sequence::ExprList", + "loc": null, + "children": [ + { + "kind": "Expr::ForEach", + "loc": null, + "children": { + "binders": { + "kind": "Expr::ForEach::BinderList", + "loc": null, + "children": [ + { + "kind": "Binder", + "loc": null, + "children": { + "name": "i" + } + } + ] + }, + "expr": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "..<" + } + } + } + }, + "lhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "0" + } + } + } + }, + "rhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "32" + } + } + } + } + } + }, + "init": { + "kind": "Expr::ForEach::Init", + "loc": null, + "children": [] + }, + "continue_block": { + "kind": "Expr::ForEach::ContinueBlock", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::ArraySet", + "loc": null, + "children": { + "array": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "mem" + } + } + } + } + } + }, + "index": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "i" + } + } + } + } + } + }, + "value": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "i" + } + } + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "to_byte" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + }, + "else_block": null, + "where_clause": null, + "label": null + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "check" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "v128 load intrinsic" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_load" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "mem" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "0" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x0706050403020100" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x0f0e0d0c0b0a0908" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "check" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "v128 load unaligned" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_load" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "mem" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "1" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x0807060504030201" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x100f0e0d0c0b0a09" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_store" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "mem" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "4" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_make" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0xa1a2a3a4a5a6a7a8" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0xb1b2b3b4b5b6b7b8" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "check" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "v128 store intrinsic" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_load" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "mem" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "4" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0xa1a2a3a4a5a6a7a8" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0xb1b2b3b4b5b6b7b8" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "check_bool" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "v128 store preserves prefix" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "==" + } + } + } + }, + "lhs": { + "kind": "Expr::ArrayGet", + "loc": null, + "children": { + "array": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "mem" + } + } + } + } + } + }, + "index": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "3" + } + } + } + } + } + }, + "rhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "3" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "check_bool" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "v128 store preserves suffix" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "==" + } + } + } + }, + "lhs": { + "kind": "Expr::ArrayGet", + "loc": null, + "children": { + "array": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "mem" + } + } + } + } + } + }, + "index": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "20" + } + } + } + } + } + }, + "rhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "20" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "check" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "v128 load8 splat intrinsic" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_load8_splat" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "mem" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "21" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x1515151515151515" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x1515151515151515" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "check" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "v128 load32 zero intrinsic" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_load32_zero" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "mem" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "20" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x0000000017161514" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + ] + }, + "last_expr": { + "kind": "Expr::Let", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "lane_target" + } + } + } + }, + "expr": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_make" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x1111111111111111" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x2222222222222222" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "body": { + "kind": "Expr::Sequence", + "loc": null, + "children": { + "exprs": { + "kind": "Expr::Sequence::ExprList", + "loc": null, + "children": [ + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "check" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "v128 load16 lane intrinsic" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_load16_lane" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "mem" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "2" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "lane_target" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "5" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x1111111111111111" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x2222222203022222" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "check" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "v128 load16 lane fallback" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_load16_lane" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "mem" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "2" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "lane_target" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "pick_lane" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "==" + } + } + } + }, + "lhs": { + "kind": "Expr::ArrayGet", + "loc": null, + "children": { + "array": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "mem" + } + } + } + } + } + }, + "index": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "0" + } + } + } + } + } + }, + "rhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "0" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x1111111111111111" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x2222222203022222" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + ] + }, + "last_expr": { + "kind": "Expr::Let", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Constraint", + "loc": null, + "children": { + "pat": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "out" + } + } + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "FixedArray" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [ + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Byte" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + ] + } + } + } + } + }, + "expr": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Method", + "loc": null, + "children": { + "type_name": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "FixedArray" + } + }, + "is_object": false + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "make" + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "8" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "0" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "body": { + "kind": "Expr::Sequence", + "loc": null, + "children": { + "exprs": { + "kind": "Expr::Sequence::ExprList", + "loc": null, + "children": [ + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_store64_lane" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "out" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "0" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_make" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0xdeadbeefcafebabe" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x0102030405060708" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "1" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "check_bool" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "v128 store64 lane intrinsic" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "==" + } + } + } + }, + "lhs": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "load_u64_le" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "out" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "0" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "rhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x0102030405060708" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + ] + }, + "last_expr": { + "kind": "Expr::Let", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Constraint", + "loc": null, + "children": { + "pat": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "scratch" + } + } + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "FixedArray" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [ + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Byte" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + ] + } + } + } + } + }, + "expr": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Method", + "loc": null, + "children": { + "type_name": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "FixedArray" + } + }, + "is_object": false + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "make" + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "16" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Byte", + "loc": null, + "children": { + "value": "\\x07" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "body": { + "kind": "Expr::Sequence", + "loc": null, + "children": { + "exprs": { + "kind": "Expr::Sequence::ExprList", + "loc": null, + "children": [ + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "check" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "v128 load last use" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_load" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "scratch" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "0" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x0707070707070707" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x0707070707070707" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + ] + }, + "last_expr": { + "kind": "Expr::Let", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Constraint", + "loc": null, + "children": { + "pat": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "sink" + } + } + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "FixedArray" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [ + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Byte" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + ] + } + } + } + } + }, + "expr": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Method", + "loc": null, + "children": { + "type_name": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "FixedArray" + } + }, + "is_object": false + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "make" + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "16" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "0" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "body": { + "kind": "Expr::Sequence", + "loc": null, + "children": { + "exprs": { + "kind": "Expr::Sequence::ExprList", + "loc": null, + "children": [ + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_store" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "sink" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "0" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_make" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x4242424242424242" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x4343434343434343" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "println" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "v128 store last use: ok" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "check" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "v128 const i16x8 intrinsic" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "i16x8_const" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "1" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "2" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "3" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "4" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "5" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "6" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "7" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "-1" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x0004000300020001" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0xffff000700060005" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "check" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "v128 const i32x4 intrinsic" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "i32x4_const" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "0x11223344" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "-1" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "0" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "0x7fffffff" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0xffffffff11223344" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x7fffffff00000000" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "check" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "v128 const i64x2 intrinsic" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "i64x2_const" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x0102030405060708" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0xf0e0d0c0b0a09080" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x0102030405060708" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0xf0e0d0c0b0a09080" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "check" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "v128 const f32x4 intrinsic" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "f32x4_const" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Double", + "loc": null, + "children": { + "value": "1.5" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Double", + "loc": null, + "children": { + "value": "-2.0" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Double", + "loc": null, + "children": { + "value": "0.0" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Double", + "loc": null, + "children": { + "value": "3.25" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0xc00000003fc00000" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x4050000000000000" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + ] + }, + "last_expr": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "check" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "v128 const f64x2 intrinsic" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "f64x2_const" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Double", + "loc": null, + "children": { + "value": "1.5" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Double", + "loc": null, + "children": { + "value": "-0.0" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x3ff8000000000000" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0x8000000000000000" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "load_u64_le" + } + }, + "has_error": null, + "is_async": null, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "bytes" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "FixedArray" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [ + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Byte" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + ] + } + } + } + } + }, + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "offset" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Int" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + } + ] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "UInt64" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::LetMut", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "result" + } + }, + "ty": null, + "expr": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0" + } + } + } + }, + "body": { + "kind": "Expr::Sequence", + "loc": null, + "children": { + "exprs": { + "kind": "Expr::Sequence::ExprList", + "loc": null, + "children": [ + { + "kind": "Expr::ForEach", + "loc": null, + "children": { + "binders": { + "kind": "Expr::ForEach::BinderList", + "loc": null, + "children": [ + { + "kind": "Binder", + "loc": null, + "children": { + "name": "i" + } + } + ] + }, + "expr": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "..=" + } + } + } + }, + "lhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "0" + } + } + } + }, + "rhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "7" + } + } + } + } + } + }, + "init": { + "kind": "Expr::ForEach::Init", + "loc": null, + "children": [] + }, + "continue_block": { + "kind": "Expr::ForEach::ContinueBlock", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Assign", + "loc": null, + "children": { + "var": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "result" + } + } + } + }, + "expr": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "result" + } + } + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "lor" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "<<" + } + } + } + }, + "lhs": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::ArrayGet", + "loc": null, + "children": { + "array": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "bytes" + } + } + } + } + } + }, + "index": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "+" + } + } + } + }, + "lhs": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "offset" + } + } + } + } + } + }, + "rhs": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "i" + } + } + } + } + } + } + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "to_uint64" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "rhs": { + "kind": "Expr::Group", + "loc": null, + "children": { + "expr": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "*" + } + } + } + }, + "lhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "8" + } + } + } + }, + "rhs": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "i" + } + } + } + } + } + } + } + }, + "group": { + "kind": "Group::Paren", + "loc": null, + "children": {} + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "augmented_by": null + } + }, + "else_block": null, + "where_clause": null, + "label": null + } + } + ] + }, + "last_expr": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "result" + } + } + } + } + } + } + } + } + } + } + } + } + } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "store_u64_le" + } + }, + "has_error": null, + "is_async": null, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "bytes" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "FixedArray" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [ + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Byte" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + ] + } + } + } + } + }, + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "offset" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Int" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "value" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "UInt64" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + } + ] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Unit" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::ForEach", + "loc": null, + "children": { + "binders": { + "kind": "Expr::ForEach::BinderList", + "loc": null, + "children": [ + { + "kind": "Binder", + "loc": null, + "children": { + "name": "i" + } + } + ] + }, + "expr": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "..=" + } + } + } + }, + "lhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "0" + } + } + } + }, + "rhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "7" + } + } + } + } + } + }, + "init": { + "kind": "Expr::ForEach::Init", + "loc": null, + "children": [] + }, + "continue_block": { + "kind": "Expr::ForEach::ContinueBlock", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::ArraySet", + "loc": null, + "children": { + "array": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "bytes" + } + } + } + } + } + }, + "index": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "+" + } + } + } + }, + "lhs": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "offset" + } + } + } + } + } + }, + "rhs": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "i" + } + } + } + } + } + } + } + }, + "value": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Group", + "loc": null, + "children": { + "expr": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": ">>" + } + } + } + }, + "lhs": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "value" + } + } + } + } + } + }, + "rhs": { + "kind": "Expr::Group", + "loc": null, + "children": { + "expr": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "*" + } + } + } + }, + "lhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "8" + } + } + } + }, + "rhs": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "i" + } + } + } + } + } + } + } + }, + "group": { + "kind": "Group::Paren", + "loc": null, + "children": {} + } + } + } + } + }, + "group": { + "kind": "Group::Paren", + "loc": null, + "children": {} + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "to_byte" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + }, + "else_block": null, + "where_clause": null, + "label": null + } + } + } + } + } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "pick_lane" + } + }, + "has_error": null, + "is_async": null, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "b" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Bool" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + } + ] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Int" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::If", + "loc": null, + "children": { + "cond": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "b" + } + } + } + } + } + }, + "ifso": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "5" + } + } + } + }, + "ifnot": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "0" + } + } + } + } + } + } + } + } + } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "f32_to_i32_reinterpret" + } + }, + "has_error": null, + "is_async": null, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "a" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Float" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + } + ] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Int" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclStubs", + "loc": null, + "children": { + "value": { + "kind": "FuncStubs::Embedded", + "loc": null, + "children": { + "language": null, + "code": { + "kind": "EmbeddedCode::CodeString", + "loc": null, + "children": { + "value": "%f32.to_i32_reinterpret" + } + } + } + } + } + } + } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "u64_of_low_32" + } + }, + "has_error": null, + "is_async": null, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "v" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Int" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + } + ] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "UInt64" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v" + } + } + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "to_uint64" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "land" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0xffffffff" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "i16x8_const" + } + }, + "has_error": null, + "is_async": null, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "l0" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Int" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "l1" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Int" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "l2" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Int" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "l3" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Int" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "l4" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Int" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "l5" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Int" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "l6" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Int" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "l7" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Int" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + } + ] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "V128" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [ + { + "kind": "Attribute", + "loc": null, + "children": { + "raw": "#intrinsic(\"%v128.v128_const_i16x8\")" + } + } + ] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::LetFn", + "loc": null, + "children": { + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "word" + } + }, + "func": { + "kind": "Func::Lambda", + "loc": null, + "children": { + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "a" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Int" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "b" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Int" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "c" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Int" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "d" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Int" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + } + ] + }, + "body": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "u64_of_low_32" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "&" + } + } + } + }, + "lhs": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "a" + } + } + } + } + } + }, + "rhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "0xffff" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "lor" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "<<" + } + } + } + }, + "lhs": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "u64_of_low_32" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "&" + } + } + } + }, + "lhs": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "b" + } + } + } + } + } + }, + "rhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "0xffff" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "rhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "16" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "lor" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "<<" + } + } + } + }, + "lhs": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "u64_of_low_32" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "&" + } + } + } + }, + "lhs": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "c" + } + } + } + } + } + }, + "rhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "0xffff" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "rhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "32" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "lor" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "<<" + } + } + } + }, + "lhs": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "u64_of_low_32" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "&" + } + } + } + }, + "lhs": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "d" + } + } + } + } + } + }, + "rhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "0xffff" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "rhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "48" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "UInt64" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Lambda", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null + } + }, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_make" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "word" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "l0" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "l1" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "l2" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "l3" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "word" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "l4" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "l5" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "l6" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "l7" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + } + } + } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "i32x4_const" + } + }, + "has_error": null, + "is_async": null, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "l0" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Int" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "l1" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Int" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "l2" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Int" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "l3" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Int" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + } + ] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "V128" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [ + { + "kind": "Attribute", + "loc": null, + "children": { + "raw": "#intrinsic(\"%v128.v128_const_i32x4\")" + } + } + ] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_make" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "u64_of_low_32" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "l0" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "lor" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "<<" + } + } + } + }, + "lhs": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "u64_of_low_32" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "l1" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "rhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "32" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "u64_of_low_32" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "l2" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "lor" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "<<" + } + } + } + }, + "lhs": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "u64_of_low_32" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "l3" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "rhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "32" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "i64x2_const" + } + }, + "has_error": null, + "is_async": null, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "l0" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "UInt64" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "l1" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "UInt64" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + } + ] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "V128" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [ + { + "kind": "Attribute", + "loc": null, + "children": { + "raw": "#intrinsic(\"%v128.v128_const_i64x2\")" + } + } + ] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_make" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "l0" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "l1" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "f32x4_const" + } + }, + "has_error": null, + "is_async": null, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "l0" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Float" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "l1" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Float" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "l2" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Float" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "l3" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Float" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + } + ] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "V128" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [ + { + "kind": "Attribute", + "loc": null, + "children": { + "raw": "#intrinsic(\"%v128.v128_const_f32x4\")" + } + } + ] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::LetFn", + "loc": null, + "children": { + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "bits" + } + }, + "func": { + "kind": "Func::Lambda", + "loc": null, + "children": { + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "x" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Float" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + } + ] + }, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "u64_of_low_32" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "f32_to_i32_reinterpret" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "x" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "UInt64" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Lambda", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null + } + }, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_make" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "bits" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "l0" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "lor" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "<<" + } + } + } + }, + "lhs": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "bits" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "l1" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "rhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "32" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "bits" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "l2" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "lor" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "<<" + } + } + } + }, + "lhs": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "bits" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "l3" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "rhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "32" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + } + } + } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "f64x2_const" + } + }, + "has_error": null, + "is_async": null, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "l0" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Double" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "l1" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Double" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + } + ] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "V128" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [ + { + "kind": "Attribute", + "loc": null, + "children": { + "raw": "#intrinsic(\"%v128.v128_const_f64x2\")" + } + } + ] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_make" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "l0" + } + } + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "reinterpret_as_int64" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "reinterpret_as_uint64" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "l1" + } + } + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "reinterpret_as_int64" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "reinterpret_as_uint64" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "v128_load" + } + }, + "has_error": null, + "is_async": null, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "bytes" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "FixedArray" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [ + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Byte" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + ] + } + } + } + } + }, + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "offset" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Int" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + } + ] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "V128" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [ + { + "kind": "Attribute", + "loc": null, + "children": { + "raw": "#intrinsic(\"%v128.v128_load\")" + } + }, + { + "kind": "Attribute", + "loc": null, + "children": { + "raw": "#borrow(bytes)" + } + } + ] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_make" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "load_u64_le" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "bytes" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "offset" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "load_u64_le" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "bytes" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "+" + } + } + } + }, + "lhs": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "offset" + } + } + } + } + } + }, + "rhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "8" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "v128_store" + } + }, + "has_error": null, + "is_async": null, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "bytes" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "FixedArray" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [ + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Byte" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + ] + } + } + } + } + }, + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "offset" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Int" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "value" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "V128" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + } + ] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Unit" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [ + { + "kind": "Attribute", + "loc": null, + "children": { + "raw": "#intrinsic(\"%v128.v128_store\")" + } + }, + { + "kind": "Attribute", + "loc": null, + "children": { + "raw": "#borrow(bytes)" + } + } + ] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::Sequence", + "loc": null, + "children": { + "exprs": { + "kind": "Expr::Sequence::ExprList", + "loc": null, + "children": [ + { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "store_u64_le" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "bytes" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "offset" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_lo" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "value" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + ] + }, + "last_expr": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "store_u64_le" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "bytes" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "+" + } + } + } + }, + "lhs": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "offset" + } + } + } + } + } + }, + "rhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "8" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_hi" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "value" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + } + } + } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "v128_load8_splat" + } + }, + "has_error": null, + "is_async": null, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "bytes" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "FixedArray" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [ + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Byte" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + ] + } + } + } + } + }, + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "offset" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Int" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + } + ] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "V128" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [ + { + "kind": "Attribute", + "loc": null, + "children": { + "raw": "#intrinsic(\"%v128.v128_load8_splat\")" + } + }, + { + "kind": "Attribute", + "loc": null, + "children": { + "raw": "#borrow(bytes)" + } + } + ] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::Let", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "b" + } + } + } + }, + "expr": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::ArrayGet", + "loc": null, + "children": { + "array": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "bytes" + } + } + } + } + } + }, + "index": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "offset" + } + } + } + } + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "to_uint64" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "body": { + "kind": "Expr::LetMut", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "word" + } + }, + "ty": null, + "expr": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0" + } + } + } + }, + "body": { + "kind": "Expr::Sequence", + "loc": null, + "children": { + "exprs": { + "kind": "Expr::Sequence::ExprList", + "loc": null, + "children": [ + { + "kind": "Expr::ForEach", + "loc": null, + "children": { + "binders": { + "kind": "Expr::ForEach::BinderList", + "loc": null, + "children": [ + { + "kind": "Binder", + "loc": null, + "children": { + "name": "i" + } + } + ] + }, + "expr": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "..=" + } + } + } + }, + "lhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "0" + } + } + } + }, + "rhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "7" + } + } + } + } + } + }, + "init": { + "kind": "Expr::ForEach::Init", + "loc": null, + "children": [] + }, + "continue_block": { + "kind": "Expr::ForEach::ContinueBlock", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Assign", + "loc": null, + "children": { + "var": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "word" + } + } + } + }, + "expr": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "word" + } + } + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "lor" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "<<" + } + } + } + }, + "lhs": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "b" + } + } + } + } + } + }, + "rhs": { + "kind": "Expr::Group", + "loc": null, + "children": { + "expr": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "*" + } + } + } + }, + "lhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "8" + } + } + } + }, + "rhs": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "i" + } + } + } + } + } + } + } + }, + "group": { + "kind": "Group::Paren", + "loc": null, + "children": {} + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "augmented_by": null + } + }, + "else_block": null, + "where_clause": null, + "label": null + } + } + ] + }, + "last_expr": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_make" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "word" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "word" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + } + } + } + } + } + } + } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "v128_load32_zero" + } + }, + "has_error": null, + "is_async": null, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "bytes" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "FixedArray" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [ + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Byte" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + ] + } + } + } + } + }, + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "offset" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Int" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + } + ] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "V128" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [ + { + "kind": "Attribute", + "loc": null, + "children": { + "raw": "#intrinsic(\"%v128.v128_load32_zero\")" + } + }, + { + "kind": "Attribute", + "loc": null, + "children": { + "raw": "#borrow(bytes)" + } + } + ] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::LetMut", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "word" + } + }, + "ty": null, + "expr": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0" + } + } + } + }, + "body": { + "kind": "Expr::Sequence", + "loc": null, + "children": { + "exprs": { + "kind": "Expr::Sequence::ExprList", + "loc": null, + "children": [ + { + "kind": "Expr::ForEach", + "loc": null, + "children": { + "binders": { + "kind": "Expr::ForEach::BinderList", + "loc": null, + "children": [ + { + "kind": "Binder", + "loc": null, + "children": { + "name": "i" + } + } + ] + }, + "expr": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "..=" + } + } + } + }, + "lhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "0" + } + } + } + }, + "rhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "3" + } + } + } + } + } + }, + "init": { + "kind": "Expr::ForEach::Init", + "loc": null, + "children": [] + }, + "continue_block": { + "kind": "Expr::ForEach::ContinueBlock", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Assign", + "loc": null, + "children": { + "var": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "word" + } + } + } + }, + "expr": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "word" + } + } + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "lor" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "<<" + } + } + } + }, + "lhs": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::ArrayGet", + "loc": null, + "children": { + "array": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "bytes" + } + } + } + } + } + }, + "index": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "+" + } + } + } + }, + "lhs": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "offset" + } + } + } + } + } + }, + "rhs": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "i" + } + } + } + } + } + } + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "to_uint64" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "rhs": { + "kind": "Expr::Group", + "loc": null, + "children": { + "expr": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "*" + } + } + } + }, + "lhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "8" + } + } + } + }, + "rhs": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "i" + } + } + } + } + } + } + } + }, + "group": { + "kind": "Group::Paren", + "loc": null, + "children": {} + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "augmented_by": null + } + }, + "else_block": null, + "where_clause": null, + "label": null + } + } + ] + }, + "last_expr": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_make" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "word" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + } + } + } + } + } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "v128_load16_lane" + } + }, + "has_error": null, + "is_async": null, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "bytes" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "FixedArray" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [ + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Byte" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + ] + } + } + } + } + }, + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "offset" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Int" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "value" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "V128" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "lane" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Int" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + } + ] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "V128" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [ + { + "kind": "Attribute", + "loc": null, + "children": { + "raw": "#intrinsic(\"%v128.v128_load16_lane\")" + } + }, + { + "kind": "Attribute", + "loc": null, + "children": { + "raw": "#borrow(bytes)" + } + } + ] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::Let", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "loaded" + } + } + } + }, + "expr": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::ArrayGet", + "loc": null, + "children": { + "array": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "bytes" + } + } + } + } + } + }, + "index": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "offset" + } + } + } + } + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "to_uint64" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "lor" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "<<" + } + } + } + }, + "lhs": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::ArrayGet", + "loc": null, + "children": { + "array": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "bytes" + } + } + } + } + } + }, + "index": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "+" + } + } + } + }, + "lhs": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "offset" + } + } + } + } + } + }, + "rhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "1" + } + } + } + } + } + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "to_uint64" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "rhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "8" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "body": { + "kind": "Expr::Let", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "shift" + } + } + } + }, + "expr": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "*" + } + } + } + }, + "lhs": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "%" + } + } + } + }, + "lhs": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "lane" + } + } + } + } + } + }, + "rhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "4" + } + } + } + } + } + }, + "rhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "16" + } + } + } + } + } + }, + "body": { + "kind": "Expr::Let", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "cleared" + } + } + } + }, + "expr": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Group", + "loc": null, + "children": { + "expr": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "<<" + } + } + } + }, + "lhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0xffff" + } + } + } + }, + "rhs": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "shift" + } + } + } + } + } + } + } + }, + "group": { + "kind": "Group::Paren", + "loc": null, + "children": {} + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "lxor" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::UInt64", + "loc": null, + "children": { + "value": "0xffffffffffffffff" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "body": { + "kind": "Expr::If", + "loc": null, + "children": { + "cond": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "<" + } + } + } + }, + "lhs": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "lane" + } + } + } + } + } + }, + "rhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "4" + } + } + } + } + } + }, + "ifso": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_make" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_lo" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "value" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "land" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "cleared" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "lor" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "<<" + } + } + } + }, + "lhs": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "loaded" + } + } + } + } + } + }, + "rhs": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "shift" + } + } + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_hi" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "value" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "ifnot": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_make" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_lo" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "value" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::DotApply", + "loc": null, + "children": { + "self": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_hi" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "value" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "land" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "cleared" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "method_name": { + "kind": "Label", + "loc": null, + "children": { + "name": "lor" + } + }, + "args": { + "kind": "Expr::DotApply::ArgList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "<<" + } + } + } + }, + "lhs": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "loaded" + } + } + } + } + } + }, + "rhs": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "shift" + } + } + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "return_self": false, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + } + } + } + } + } + } + } + } + } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "v128_store64_lane" + } + }, + "has_error": null, + "is_async": null, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "bytes" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "FixedArray" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [ + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Byte" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + ] + } + } + } + } + }, + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "offset" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Int" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "value" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "V128" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "lane" + } + }, + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Int" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + } + ] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Unit" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [ + { + "kind": "Attribute", + "loc": null, + "children": { + "raw": "#intrinsic(\"%v128.v128_store64_lane\")" + } + }, + { + "kind": "Attribute", + "loc": null, + "children": { + "raw": "#borrow(bytes)" + } + } + ] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::If", + "loc": null, + "children": { + "cond": { + "kind": "Expr::Infix", + "loc": null, + "children": { + "op": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "==" + } + } + } + }, + "lhs": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "lane" + } + } + } + } + } + }, + "rhs": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "0" + } + } + } + } + } + }, + "ifso": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "store_u64_le" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "bytes" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "offset" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_lo" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "value" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "ifnot": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "store_u64_le" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "bytes" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "offset" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "v128_hi" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "value" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + } + } + } + } +] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/pipeline_test_v128.mbt b/test/sync_test/__snapshot__/pipeline_test_v128.mbt new file mode 100644 index 00000000..412bfc09 --- /dev/null +++ b/test/sync_test/__snapshot__/pipeline_test_v128.mbt @@ -0,0 +1,761 @@ +// The default implementations in this file are executed for real: the +// machine/LLVM backends never specialize intrinsic calls, and the C +// backend falls back to them for instructions without a fast path on the +// target ISA. They must therefore implement the wasm semantics. Whether +// specialization fires is checked by the IR snapshots (e.g. *.exp.wat); +// wrong immediates are caught by assertions whose input vectors make +// every lane distinguishable. + +fn v128_make(lo : UInt64, hi : UInt64) -> V128 = "%v128.make" + +fn v128_lo(v : V128) -> UInt64 = "%v128.lo" + +fn v128_hi(v : V128) -> UInt64 = "%v128.hi" + +#intrinsic("%v128.v128_const_i8x16") +fn v128_const( + l0 : Int, + l1 : Int, + l2 : Int, + l3 : Int, + l4 : Int, + l5 : Int, + l6 : Int, + l7 : Int, + l8 : Int, + l9 : Int, + l10 : Int, + l11 : Int, + l12 : Int, + l13 : Int, + l14 : Int, + l15 : Int +) -> V128 { + fn byte(v : Int, shift : Int) -> UInt64 { + v.to_uint64().land(0xffUL) << shift + } + + v128_make( + byte(l0, 0) + .lor(byte(l1, 8)) + .lor(byte(l2, 16)) + .lor(byte(l3, 24)) + .lor(byte(l4, 32)) + .lor(byte(l5, 40)) + .lor(byte(l6, 48)) + .lor(byte(l7, 56)), + byte(l8, 0) + .lor(byte(l9, 8)) + .lor(byte(l10, 16)) + .lor(byte(l11, 24)) + .lor(byte(l12, 32)) + .lor(byte(l13, 40)) + .lor(byte(l14, 48)) + .lor(byte(l15, 56)), + ) +} + +#intrinsic("%v128.v128_not") +fn v128_not(value : V128) -> V128 { + v128_make( + v128_lo(value).lxor(0xffffffffffffffffUL), + v128_hi(value).lxor(0xffffffffffffffffUL), + ) +} + +#intrinsic("%v128.v128_and") +fn v128_and(value : V128, other : V128) -> V128 { + v128_make(v128_lo(value).land(v128_lo(other)), v128_hi(value).land(v128_hi(other))) +} + +#intrinsic("%v128.v128_andnot") +fn v128_andnot(value : V128, other : V128) -> V128 { + v128_make( + v128_lo(value).land(v128_lo(other).lxor(0xffffffffffffffffUL)), + v128_hi(value).land(v128_hi(other).lxor(0xffffffffffffffffUL)), + ) +} + +#intrinsic("%v128.v128_or") +fn v128_or(value : V128, other : V128) -> V128 { + v128_make(v128_lo(value).lor(v128_lo(other)), v128_hi(value).lor(v128_hi(other))) +} + +#intrinsic("%v128.v128_xor") +fn v128_xor(value : V128, other : V128) -> V128 { + v128_make(v128_lo(value).lxor(v128_lo(other)), v128_hi(value).lxor(v128_hi(other))) +} + +#intrinsic("%v128.v128_bitselect") +fn v128_bitselect(value : V128, other : V128, mask : V128) -> V128 { + v128_make( + v128_lo(value).land(v128_lo(mask)).lor(v128_lo(other).land(v128_lo(mask).lxor(0xffffffffffffffffUL))), + v128_hi(value).land(v128_hi(mask)).lor(v128_hi(other).land(v128_hi(mask).lxor(0xffffffffffffffffUL))), + ) +} + +// exact lane-wise wrap-around add: the lanes' top bits are summed +// separately, so carries cannot cross lane boundaries +fn swar_add(a : UInt64, b : UInt64, top_bits : UInt64) -> UInt64 { + let low = top_bits.lxor(0xffffffffffffffffUL) + (a.land(low) + b.land(low)).lxor(a.lxor(b).land(top_bits)) +} + +// lane-wise sub as a + (-b), with per-lane negation ~b + 1 +fn swar_sub(a : UInt64, b : UInt64, top_bits : UInt64, lane_ones : UInt64) -> UInt64 { + swar_add(a, swar_add(b.lxor(0xffffffffffffffffUL), lane_ones, top_bits), top_bits) +} + +#intrinsic("%v128.i8x16_add") +fn i8x16_add(value : V128, other : V128) -> V128 { + v128_make( + swar_add(v128_lo(value), v128_lo(other), 0x8080808080808080UL), + swar_add(v128_hi(value), v128_hi(other), 0x8080808080808080UL), + ) +} + +#intrinsic("%v128.i8x16_sub") +fn i8x16_sub(value : V128, other : V128) -> V128 { + v128_make( + swar_sub(v128_lo(value), v128_lo(other), 0x8080808080808080UL, 0x0101010101010101UL), + swar_sub(v128_hi(value), v128_hi(other), 0x8080808080808080UL, 0x0101010101010101UL), + ) +} + +#intrinsic("%v128.i16x8_add") +fn i16x8_add(value : V128, other : V128) -> V128 { + v128_make( + swar_add(v128_lo(value), v128_lo(other), 0x8000800080008000UL), + swar_add(v128_hi(value), v128_hi(other), 0x8000800080008000UL), + ) +} + +#intrinsic("%v128.i16x8_sub") +fn i16x8_sub(value : V128, other : V128) -> V128 { + v128_make( + swar_sub(v128_lo(value), v128_lo(other), 0x8000800080008000UL, 0x0001000100010001UL), + swar_sub(v128_hi(value), v128_hi(other), 0x8000800080008000UL, 0x0001000100010001UL), + ) +} + +#intrinsic("%v128.i32x4_add") +fn i32x4_add(value : V128, other : V128) -> V128 { + v128_make( + swar_add(v128_lo(value), v128_lo(other), 0x8000000080000000UL), + swar_add(v128_hi(value), v128_hi(other), 0x8000000080000000UL), + ) +} + +#intrinsic("%v128.i32x4_sub") +fn i32x4_sub(value : V128, other : V128) -> V128 { + v128_make( + swar_sub(v128_lo(value), v128_lo(other), 0x8000000080000000UL, 0x0000000100000001UL), + swar_sub(v128_hi(value), v128_hi(other), 0x8000000080000000UL, 0x0000000100000001UL), + ) +} + +#intrinsic("%v128.i32x4_extract_lane") +fn i32x4_extract_lane(value : V128, lane : Int) -> Int { + let word = if lane < 2 { v128_lo(value) } else { v128_hi(value) } + (word >> (lane % 2 * 32)).land(0xffffffffUL).reinterpret_as_int64().to_int() +} + +#intrinsic("%v128.i32x4_replace_lane") +fn i32x4_replace_lane(value : V128, replacement : Int, lane : Int) -> V128 { + let shift = lane % 2 * 32 + let cleared = (0xffffffffUL << shift).lxor(0xffffffffffffffffUL) + let repl = replacement.to_uint64().land(0xffffffffUL) << shift + if lane < 2 { + v128_make(v128_lo(value).land(cleared).lor(repl), v128_hi(value)) + } else { + v128_make(v128_lo(value), v128_hi(value).land(cleared).lor(repl)) + } +} + +#intrinsic("%v128.i64x2_add") +fn i64x2_add(value : V128, other : V128) -> V128 { + v128_make(v128_lo(value) + v128_lo(other), v128_hi(value) + v128_hi(other)) +} + +#intrinsic("%v128.i64x2_sub") +fn i64x2_sub(value : V128, other : V128) -> V128 { + v128_make(v128_lo(value) - v128_lo(other), v128_hi(value) - v128_hi(other)) +} + +#intrinsic("%v128.i8x16_shuffle") +fn i8x16_shuffle( + value : V128, + other : V128, + l0 : Int, + l1 : Int, + l2 : Int, + l3 : Int, + l4 : Int, + l5 : Int, + l6 : Int, + l7 : Int, + l8 : Int, + l9 : Int, + l10 : Int, + l11 : Int, + l12 : Int, + l13 : Int, + l14 : Int, + l15 : Int +) -> V128 { + fn u8_lane(v : V128, lane : Int) -> UInt64 { + let word = if lane < 8 { v128_lo(v) } else { v128_hi(v) } + (word >> (lane % 8 * 8)).land(0xffUL) + } + + fn pick(idx : Int) -> UInt64 { + if idx < 16 { + u8_lane(value, idx) + } else { + u8_lane(other, idx - 16) + } + } + + let lanes : FixedArray[Int] = [ + l0, l1, l2, l3, l4, l5, l6, l7, l8, l9, l10, l11, l12, l13, l14, l15, + ] + let mut lo = 0UL + let mut hi = 0UL + for i in 0..<8 { + lo = lo.lor(pick(lanes[i]) << (i * 8)) + hi = hi.lor(pick(lanes[i + 8]) << (i * 8)) + } + v128_make(lo, hi) +} + +suberror V128Error + + +struct V128Box { + v : V128 + tag : Int +} + +fn check(name : String, v : V128, lo : UInt64, hi : UInt64) -> Unit { + if v128_lo(v) == lo && v128_hi(v) == hi { + println("\{name}: ok") + } else { + println("\{name}: fail") + } +} + +fn check_bool(name : String, b : Bool) -> Unit { + if b { + println("\{name}: ok") + } else { + println("\{name}: fail") + } +} + +fn make_by_index(i : Int) -> V128 { + match i { + 0 => v128_make(0x0000000000000000UL, 0x0000000000000001UL) + 1 => v128_make(0x1111111111111111UL, 0x1111111111111112UL) + 2 => v128_make(0x2222222222222222UL, 0x2222222222222223UL) + 3 => v128_make(0x3333333333333333UL, 0x3333333333333334UL) + 4 => v128_make(0x4444444444444444UL, 0x4444444444444445UL) + _ => v128_make(0xffffffffffffffffUL, 0xeeeeeeeeeeeeeeeeUL) + } +} + +fn choose(flag : Bool, a : V128, b : V128) -> V128 { + if flag { a } else { b } +} + +fn pass_through(v : V128) -> V128 { + v128_make(v128_lo(v), v128_hi(v)) +} + +fn maybe_v128(ok : Bool) -> V128 raise V128Error { + if ok { + make_by_index(4) + } else { + raise V128Error + } +} + +fn check_v128_result(name : String, r : Result[V128, V128Error], lo : UInt64, hi : UInt64) -> Unit { + match r { + Ok(v) => check(name, v, lo, hi) + Err(_) => println("\{name}: fail") + } +} + +fn check_v128_error(name : String, r : Result[V128, V128Error]) -> Unit { + match r { + Ok(_) => println("\{name}: fail") + Err(_) => println("\{name}: ok") + } +} + +fn make_box(i : Int) -> V128Box { + { v: make_by_index(i), tag: i } +} + +fn init { + let a = v128_make(0x0123456789abcdefUL, 0xfedcba9876543210UL) + let b = v128_make(0x1111111122222222UL, 0x3333333344444444UL) + let c = v128_make(0xffffffffffffffffUL, 0x8000000000000000UL) + check("zero bits", v128_make(0UL, 0UL), 0UL, 0UL) + check("small bits", v128_make(1UL, 2UL), 1UL, 2UL) + check("lane order", a, 0x0123456789abcdefUL, 0xfedcba9876543210UL) + check("all ones and sign bit", c, 0xffffffffffffffffUL, 0x8000000000000000UL) + check( + "v128 const intrinsic", + v128_const(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15), + 0x0706050403020100UL, + 0x0f0e0d0c0b0a0908UL, + ) + check( + "v128 not intrinsic", + v128_not(v128_make(0x0123456789abcdefUL, 0xfedcba9876543210UL)), + 0xfedcba9876543210UL, + 0x0123456789abcdefUL, + ) + check( + "v128 and intrinsic", + v128_and( + v128_make(0x0f0f0f0f0f0f0f0fUL, 0xffff0000ffff0000UL), + v128_make(0x3333333333333333UL, 0x00ff00ff00ff00ffUL), + ), + 0x0303030303030303UL, + 0x00ff000000ff0000UL, + ) + check( + "v128 andnot intrinsic", + v128_andnot( + v128_make(0xffff0000ffff0000UL, 0x0f0f0f0f0f0f0f0fUL), + v128_make(0x00ff00ff00ff00ffUL, 0x3333333333333333UL), + ), + 0xff000000ff000000UL, + 0x0c0c0c0c0c0c0c0cUL, + ) + check( + "v128 or intrinsic", + v128_or( + v128_make(0x0f0f0f0f00000000UL, 0x00000000f0f0f0f0UL), + v128_make(0x00000000f0f0f0f0UL, 0x0f0f0f0f00000000UL), + ), + 0x0f0f0f0ff0f0f0f0UL, + 0x0f0f0f0ff0f0f0f0UL, + ) + check( + "v128 xor intrinsic", + v128_xor( + v128_make(0xffff0000ffff0000UL, 0xaaaaaaaa55555555UL), + v128_make(0x00ff00ff00ff00ffUL, 0xffff0000ffff0000UL), + ), + 0xff0000ffff0000ffUL, + 0x5555aaaaaaaa5555UL, + ) + check( + "v128 bitselect intrinsic", + v128_bitselect( + v128_make(0xffff0000ffff0000UL, 0xaaaaaaaa55555555UL), + v128_make(0x0000ffff0000ffffUL, 0x55555555aaaaaaaaUL), + v128_make(0xff00ff00ff00ff00UL, 0xffff0000ffff0000UL), + ), + 0xff0000ffff0000ffUL, + 0xaaaa55555555aaaaUL, + ) + check( + "i8x16 add intrinsic", + i8x16_add( + v128_make(0x0102030405060708UL, 0x1112131415161718UL), + v128_make(0x0101010101010101UL, 0x0101010101010101UL), + ), + 0x0203040506070809UL, + 0x1213141516171819UL, + ) + check( + "i8x16 sub intrinsic", + i8x16_sub( + v128_make(0x1011121314151617UL, 0x2021222324252627UL), + v128_make(0x0101010101010101UL, 0x0101010101010101UL), + ), + 0x0f10111213141516UL, + 0x1f20212223242526UL, + ) + check( + "i16x8 add intrinsic", + i16x8_add( + v128_make(0x0001000200030004UL, 0x0005000600070008UL), + v128_make(0x0001000100010001UL, 0x0001000100010001UL), + ), + 0x0002000300040005UL, + 0x0006000700080009UL, + ) + check( + "i16x8 sub intrinsic", + i16x8_sub( + v128_make(0x0010001100120013UL, 0x0020002100220023UL), + v128_make(0x0001000100010001UL, 0x0001000100010001UL), + ), + 0x000f001000110012UL, + 0x001f002000210022UL, + ) + check( + "i32x4 add intrinsic", + i32x4_add( + v128_make(0x0000000100000002UL, 0x0000000300000004UL), + v128_make(0x0000000100000001UL, 0x0000000100000001UL), + ), + 0x0000000200000003UL, + 0x0000000400000005UL, + ) + check( + "i32x4 sub intrinsic", + i32x4_sub( + v128_make(0x0000001000000011UL, 0x0000002000000021UL), + v128_make(0x0000000100000001UL, 0x0000000100000001UL), + ), + 0x0000000f00000010UL, + 0x0000001f00000020UL, + ) + check_bool( + "i32x4 extract lane intrinsic", + i32x4_extract_lane(v128_make(0x0000000100000002UL, 0x0000000300000004UL), 3) == 3, + ) + check( + "i32x4 replace lane intrinsic", + i32x4_replace_lane(v128_make(0x0000000100000002UL, 0x0000000300000004UL), 9, 0), + 0x0000000100000009UL, + 0x0000000300000004UL, + ) + check( + "i64x2 add intrinsic", + i64x2_add(v128_make(0x0000000000000001UL, 0x0000000000000002UL), v128_make(3UL, 4UL)), + 4UL, + 6UL, + ) + check( + "i64x2 sub intrinsic", + i64x2_sub(v128_make(0x0000000000000010UL, 0x0000000000000020UL), v128_make(1UL, 2UL)), + 0x000000000000000fUL, + 0x000000000000001eUL, + ) + check( + "i8x16 shuffle intrinsic", + i8x16_shuffle(a, b, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15), + 0x0123456789abcdefUL, + 0xfedcba9876543210UL, + ) + check( + "i8x16 shuffle across both vectors", + i8x16_shuffle(a, b, 0, 16, 1, 17, 2, 18, 3, 19, 4, 20, 5, 21, 6, 22, 7, 23), + 0x228922ab22cd22efUL, + 0x1101112311451167UL, + ) + check("rebuild from bits", pass_through(a), 0x0123456789abcdefUL, 0xfedcba9876543210UL) + check("if true", choose(true, a, b), 0x0123456789abcdefUL, 0xfedcba9876543210UL) + check("if false", choose(false, a, b), 0x1111111122222222UL, 0x3333333344444444UL) + check_bool("physical equal same bits", physical_equal(a, pass_through(a))) + check_bool("physical equal different bits", physical_equal(a, b) == false) + + let xs : Array[V128] = Array::make(5, a) + check_bool("array length", xs.length() == 5) + check("array make first", xs.unsafe_get(0), 0x0123456789abcdefUL, 0xfedcba9876543210UL) + check("array make middle", xs.unsafe_get(2), 0x0123456789abcdefUL, 0xfedcba9876543210UL) + check("array make last", xs.unsafe_get(4), 0x0123456789abcdefUL, 0xfedcba9876543210UL) + xs.unsafe_set(1, b) + xs.unsafe_set(3, c) + check("array set first preserved", xs.unsafe_get(0), 0x0123456789abcdefUL, 0xfedcba9876543210UL) + check("array set index 1", xs.unsafe_get(1), 0x1111111122222222UL, 0x3333333344444444UL) + check("array set neighbor preserved", xs.unsafe_get(2), 0x0123456789abcdefUL, 0xfedcba9876543210UL) + check("array set index 3", xs.unsafe_get(3), 0xffffffffffffffffUL, 0x8000000000000000UL) + check("array set last preserved", xs.unsafe_get(4), 0x0123456789abcdefUL, 0xfedcba9876543210UL) + let xs_copy = xs.copy() + check_bool("array copy length", xs_copy.length() == 5) + check("array copy index 1", xs_copy.unsafe_get(1), 0x1111111122222222UL, 0x3333333344444444UL) + check("array copy index 3", xs_copy.unsafe_get(3), 0xffffffffffffffffUL, 0x8000000000000000UL) + + let empty_xs : Array[V128] = [] + check_bool("empty array literal length", empty_xs.length() == 0) + let zero_xs : Array[V128] = Array::make(0, a) + check_bool("array make zero length", zero_xs.length() == 0) + + let ys : Array[V128] = Array::makei(6, make_by_index) + check_bool("array makei length", ys.length() == 6) + check("array makei index 0", ys.unsafe_get(0), 0x0000000000000000UL, 0x0000000000000001UL) + check("array makei index 3", ys.unsafe_get(3), 0x3333333333333333UL, 0x3333333333333334UL) + check("array makei index 5", ys.unsafe_get(5), 0xffffffffffffffffUL, 0xeeeeeeeeeeeeeeeeUL) + + let zs : FixedArray[V128] = FixedArray::makei(4, make_by_index) + check_bool("fixedarray length", zs.length() == 4) + check("fixedarray index 0", zs.unsafe_get(0), 0x0000000000000000UL, 0x0000000000000001UL) + check("fixedarray index 2", zs.unsafe_get(2), 0x2222222222222222UL, 0x2222222222222223UL) + check("fixedarray index 3", zs.unsafe_get(3), 0x3333333333333333UL, 0x3333333333333334UL) + let zs_copy = zs.copy() + check_bool("fixedarray copy length", zs_copy.length() == 4) + check("fixedarray copy index 2", zs_copy.unsafe_get(2), 0x2222222222222222UL, 0x2222222222222223UL) + + let empty_zs : FixedArray[V128] = [] + check_bool("empty fixedarray literal length", empty_zs.length() == 0) + let zero_zs : FixedArray[V128] = FixedArray::make(0, a) + check_bool("fixedarray make zero length", zero_zs.length() == 0) + + let ok_result : Result[V128, V128Error] = try? maybe_v128(true) + let err_result : Result[V128, V128Error] = try? maybe_v128(false) + check_v128_result( + "result v128 ok", + ok_result, + 0x4444444444444444UL, + 0x4444444444444445UL, + ) + check_v128_error("result v128 err", err_result) + + let boxes : FixedArray[V128Box] = FixedArray::makei(4, make_box) + let box2 = boxes.unsafe_get(2) + let box3 = boxes.unsafe_get(3) + check_bool("struct v128 field length", boxes.length() == 4) + check_bool("struct v128 field tag", box3.tag == 3) + check("struct v128 field index 2", box2.v, 0x2222222222222222UL, 0x2222222222222223UL) + check("struct v128 field index 3", box3.v, 0x3333333333333333UL, 0x3333333333333334UL) + + let mem : FixedArray[Byte] = FixedArray::make(32, 0) + for i in 0..<32 { + mem[i] = i.to_byte() + } + check( + "v128 load intrinsic", + v128_load(mem, 0), + 0x0706050403020100UL, + 0x0f0e0d0c0b0a0908UL, + ) + check( + "v128 load unaligned", + v128_load(mem, 1), + 0x0807060504030201UL, + 0x100f0e0d0c0b0a09UL, + ) + v128_store(mem, 4, v128_make(0xa1a2a3a4a5a6a7a8UL, 0xb1b2b3b4b5b6b7b8UL)) + check( + "v128 store intrinsic", + v128_load(mem, 4), + 0xa1a2a3a4a5a6a7a8UL, + 0xb1b2b3b4b5b6b7b8UL, + ) + check_bool("v128 store preserves prefix", mem[3] == 3) + check_bool("v128 store preserves suffix", mem[20] == 20) + check( + "v128 load8 splat intrinsic", + v128_load8_splat(mem, 21), + 0x1515151515151515UL, + 0x1515151515151515UL, + ) + check( + "v128 load32 zero intrinsic", + v128_load32_zero(mem, 20), + 0x0000000017161514UL, + 0UL, + ) + let lane_target = v128_make(0x1111111111111111UL, 0x2222222222222222UL) + check( + "v128 load16 lane intrinsic", + v128_load16_lane(mem, 2, lane_target, 5), + 0x1111111111111111UL, + 0x2222222203022222UL, + ) + check( + "v128 load16 lane fallback", + v128_load16_lane(mem, 2, lane_target, pick_lane(mem[0] == 0)), + 0x1111111111111111UL, + 0x2222222203022222UL, + ) + let out : FixedArray[Byte] = FixedArray::make(8, 0) + v128_store64_lane(out, 0, v128_make(0xdeadbeefcafebabeUL, 0x0102030405060708UL), 1) + check_bool("v128 store64 lane intrinsic", load_u64_le(out, 0) == 0x0102030405060708UL) + // buffers whose last use is the specialized load/store: exercises the + // ref-count drop inserted at the intrinsic call site + let scratch : FixedArray[Byte] = FixedArray::make(16, b'\x07') + check( + "v128 load last use", + v128_load(scratch, 0), + 0x0707070707070707UL, + 0x0707070707070707UL, + ) + let sink : FixedArray[Byte] = FixedArray::make(16, 0) + v128_store(sink, 0, v128_make(0x4242424242424242UL, 0x4343434343434343UL)) + println("v128 store last use: ok") + check( + "v128 const i16x8 intrinsic", + i16x8_const(1, 2, 3, 4, 5, 6, 7, -1), + 0x0004000300020001UL, + 0xffff000700060005UL, + ) + check( + "v128 const i32x4 intrinsic", + i32x4_const(0x11223344, -1, 0, 0x7fffffff), + 0xffffffff11223344UL, + 0x7fffffff00000000UL, + ) + check( + "v128 const i64x2 intrinsic", + i64x2_const(0x0102030405060708UL, 0xf0e0d0c0b0a09080UL), + 0x0102030405060708UL, + 0xf0e0d0c0b0a09080UL, + ) + check( + "v128 const f32x4 intrinsic", + f32x4_const(1.5, -2.0, 0.0, 3.25), + 0xc00000003fc00000UL, + 0x4050000000000000UL, + ) + check( + "v128 const f64x2 intrinsic", + f64x2_const(1.5, -0.0), + 0x3ff8000000000000UL, + 0x8000000000000000UL, + ) +} + +fn load_u64_le(bytes : FixedArray[Byte], offset : Int) -> UInt64 { + let mut result = 0UL + for i in 0..=7 { + result = result.lor(bytes[offset + i].to_uint64() << (8 * i)) + } + result +} + +fn store_u64_le(bytes : FixedArray[Byte], offset : Int, value : UInt64) -> Unit { + for i in 0..=7 { + bytes[offset + i] = (value >> (8 * i)).to_byte() + } +} + +fn pick_lane(b : Bool) -> Int { + if b { + 5 + } else { + 0 + } +} + +fn f32_to_i32_reinterpret(a : Float) -> Int = "%f32.to_i32_reinterpret" + +fn u64_of_low_32(v : Int) -> UInt64 { + v.to_uint64().land(0xffffffffUL) +} + +#intrinsic("%v128.v128_const_i16x8") +fn i16x8_const( + l0 : Int, + l1 : Int, + l2 : Int, + l3 : Int, + l4 : Int, + l5 : Int, + l6 : Int, + l7 : Int +) -> V128 { + fn word(a : Int, b : Int, c : Int, d : Int) -> UInt64 { + u64_of_low_32(a & 0xffff) + .lor(u64_of_low_32(b & 0xffff) << 16) + .lor(u64_of_low_32(c & 0xffff) << 32) + .lor(u64_of_low_32(d & 0xffff) << 48) + } + + v128_make(word(l0, l1, l2, l3), word(l4, l5, l6, l7)) +} + +#intrinsic("%v128.v128_const_i32x4") +fn i32x4_const(l0 : Int, l1 : Int, l2 : Int, l3 : Int) -> V128 { + v128_make( + u64_of_low_32(l0).lor(u64_of_low_32(l1) << 32), + u64_of_low_32(l2).lor(u64_of_low_32(l3) << 32), + ) +} + +#intrinsic("%v128.v128_const_i64x2") +fn i64x2_const(l0 : UInt64, l1 : UInt64) -> V128 { + v128_make(l0, l1) +} + +#intrinsic("%v128.v128_const_f32x4") +fn f32x4_const(l0 : Float, l1 : Float, l2 : Float, l3 : Float) -> V128 { + fn bits(x : Float) -> UInt64 { + u64_of_low_32(f32_to_i32_reinterpret(x)) + } + + v128_make(bits(l0).lor(bits(l1) << 32), bits(l2).lor(bits(l3) << 32)) +} + +#intrinsic("%v128.v128_const_f64x2") +fn f64x2_const(l0 : Double, l1 : Double) -> V128 { + v128_make( + l0.reinterpret_as_int64().reinterpret_as_uint64(), + l1.reinterpret_as_int64().reinterpret_as_uint64(), + ) +} + +#intrinsic("%v128.v128_load") +#borrow(bytes) +fn v128_load(bytes : FixedArray[Byte], offset : Int) -> V128 { + v128_make(load_u64_le(bytes, offset), load_u64_le(bytes, offset + 8)) +} + +#intrinsic("%v128.v128_store") +#borrow(bytes) +fn v128_store(bytes : FixedArray[Byte], offset : Int, value : V128) -> Unit { + store_u64_le(bytes, offset, v128_lo(value)) + store_u64_le(bytes, offset + 8, v128_hi(value)) +} + +#intrinsic("%v128.v128_load8_splat") +#borrow(bytes) +fn v128_load8_splat(bytes : FixedArray[Byte], offset : Int) -> V128 { + let b = bytes[offset].to_uint64() + let mut word = 0UL + for i in 0..=7 { + word = word.lor(b << (8 * i)) + } + v128_make(word, word) +} + +#intrinsic("%v128.v128_load32_zero") +#borrow(bytes) +fn v128_load32_zero(bytes : FixedArray[Byte], offset : Int) -> V128 { + let mut word = 0UL + for i in 0..=3 { + word = word.lor(bytes[offset + i].to_uint64() << (8 * i)) + } + v128_make(word, 0UL) +} + +#intrinsic("%v128.v128_load16_lane") +#borrow(bytes) +fn v128_load16_lane( + bytes : FixedArray[Byte], + offset : Int, + value : V128, + lane : Int +) -> V128 { + let loaded = bytes[offset].to_uint64().lor(bytes[offset + 1].to_uint64() << 8) + let shift = lane % 4 * 16 + let cleared = (0xffffUL << shift).lxor(0xffffffffffffffffUL) + if lane < 4 { + v128_make(v128_lo(value).land(cleared).lor(loaded << shift), v128_hi(value)) + } else { + v128_make(v128_lo(value), v128_hi(value).land(cleared).lor(loaded << shift)) + } +} + +#intrinsic("%v128.v128_store64_lane") +#borrow(bytes) +fn v128_store64_lane( + bytes : FixedArray[Byte], + offset : Int, + value : V128, + lane : Int +) -> Unit { + if lane == 0 { + store_u64_le(bytes, offset, v128_lo(value)) + } else { + store_u64_le(bytes, offset, v128_hi(value)) + } +} diff --git a/test/sync_test/__snapshot__/pipeline_test_v128.mbt.tokens.json b/test/sync_test/__snapshot__/pipeline_test_v128.mbt.tokens.json new file mode 100644 index 00000000..76fa02b4 --- /dev/null +++ b/test/sync_test/__snapshot__/pipeline_test_v128.mbt.tokens.json @@ -0,0 +1,28232 @@ +[ + { + "token": [ + "COMMENT", + { + "content": "// The default implementations in this file are executed for real: the", + "kind": [ + "Ownline", + { + "leading_blank_line": false, + "trailing_blank_line": false + } + ], + "consumed_by_docstring": false + } + ], + "loc": "1:1-1:71" + }, + { + "token": "NEWLINE", + "loc": "1:71-1:72" + }, + { + "token": [ + "COMMENT", + { + "content": "// machine/LLVM backends never specialize intrinsic calls, and the C", + "kind": [ + "Ownline", + { + "leading_blank_line": false, + "trailing_blank_line": false + } + ], + "consumed_by_docstring": false + } + ], + "loc": "2:1-2:69" + }, + { + "token": "NEWLINE", + "loc": "2:69-2:70" + }, + { + "token": [ + "COMMENT", + { + "content": "// backend falls back to them for instructions without a fast path on the", + "kind": [ + "Ownline", + { + "leading_blank_line": false, + "trailing_blank_line": false + } + ], + "consumed_by_docstring": false + } + ], + "loc": "3:1-3:74" + }, + { + "token": "NEWLINE", + "loc": "3:74-3:75" + }, + { + "token": [ + "COMMENT", + { + "content": "// target ISA. They must therefore implement the wasm semantics. Whether", + "kind": [ + "Ownline", + { + "leading_blank_line": false, + "trailing_blank_line": false + } + ], + "consumed_by_docstring": false + } + ], + "loc": "4:1-4:73" + }, + { + "token": "NEWLINE", + "loc": "4:73-4:74" + }, + { + "token": [ + "COMMENT", + { + "content": "// specialization fires is checked by the IR snapshots (e.g. *.exp.wat);", + "kind": [ + "Ownline", + { + "leading_blank_line": false, + "trailing_blank_line": false + } + ], + "consumed_by_docstring": false + } + ], + "loc": "5:1-5:73" + }, + { + "token": "NEWLINE", + "loc": "5:73-5:74" + }, + { + "token": [ + "COMMENT", + { + "content": "// wrong immediates are caught by assertions whose input vectors make", + "kind": [ + "Ownline", + { + "leading_blank_line": false, + "trailing_blank_line": false + } + ], + "consumed_by_docstring": false + } + ], + "loc": "6:1-6:70" + }, + { + "token": "NEWLINE", + "loc": "6:70-6:71" + }, + { + "token": [ + "COMMENT", + { + "content": "// every lane distinguishable.", + "kind": [ + "Ownline", + { + "leading_blank_line": false, + "trailing_blank_line": true + } + ], + "consumed_by_docstring": false + } + ], + "loc": "7:1-7:31" + }, + { + "token": "NEWLINE", + "loc": "7:31-7:32" + }, + { + "token": "NEWLINE", + "loc": "8:1-8:2" + }, + { + "token": "FN", + "loc": "9:1-9:3" + }, + { + "token": [ + "LIDENT", + "v128_make" + ], + "loc": "9:4-9:13" + }, + { + "token": "LPAREN", + "loc": "9:13-9:14" + }, + { + "token": [ + "LIDENT", + "lo" + ], + "loc": "9:14-9:16" + }, + { + "token": "COLON", + "loc": "9:17-9:18" + }, + { + "token": [ + "UIDENT", + "UInt64" + ], + "loc": "9:19-9:25" + }, + { + "token": "COMMA", + "loc": "9:25-9:26" + }, + { + "token": [ + "LIDENT", + "hi" + ], + "loc": "9:27-9:29" + }, + { + "token": "COLON", + "loc": "9:30-9:31" + }, + { + "token": [ + "UIDENT", + "UInt64" + ], + "loc": "9:32-9:38" + }, + { + "token": "RPAREN", + "loc": "9:38-9:39" + }, + { + "token": "THIN_ARROW", + "loc": "9:40-9:42" + }, + { + "token": [ + "UIDENT", + "V128" + ], + "loc": "9:43-9:47" + }, + { + "token": "EQUAL", + "loc": "9:48-9:49" + }, + { + "token": [ + "STRING", + "%v128.make" + ], + "loc": "9:50-9:62" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "9:62-9:62" + }, + { + "token": "NEWLINE", + "loc": "9:62-9:63" + }, + { + "token": "NEWLINE", + "loc": "10:1-10:2" + }, + { + "token": "FN", + "loc": "11:1-11:3" + }, + { + "token": [ + "LIDENT", + "v128_lo" + ], + "loc": "11:4-11:11" + }, + { + "token": "LPAREN", + "loc": "11:11-11:12" + }, + { + "token": [ + "LIDENT", + "v" + ], + "loc": "11:12-11:13" + }, + { + "token": "COLON", + "loc": "11:14-11:15" + }, + { + "token": [ + "UIDENT", + "V128" + ], + "loc": "11:16-11:20" + }, + { + "token": "RPAREN", + "loc": "11:20-11:21" + }, + { + "token": "THIN_ARROW", + "loc": "11:22-11:24" + }, + { + "token": [ + "UIDENT", + "UInt64" + ], + "loc": "11:25-11:31" + }, + { + "token": "EQUAL", + "loc": "11:32-11:33" + }, + { + "token": [ + "STRING", + "%v128.lo" + ], + "loc": "11:34-11:44" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "11:44-11:44" + }, + { + "token": "NEWLINE", + "loc": "11:44-11:45" + }, + { + "token": "NEWLINE", + "loc": "12:1-12:2" + }, + { + "token": "FN", + "loc": "13:1-13:3" + }, + { + "token": [ + "LIDENT", + "v128_hi" + ], + "loc": "13:4-13:11" + }, + { + "token": "LPAREN", + "loc": "13:11-13:12" + }, + { + "token": [ + "LIDENT", + "v" + ], + "loc": "13:12-13:13" + }, + { + "token": "COLON", + "loc": "13:14-13:15" + }, + { + "token": [ + "UIDENT", + "V128" + ], + "loc": "13:16-13:20" + }, + { + "token": "RPAREN", + "loc": "13:20-13:21" + }, + { + "token": "THIN_ARROW", + "loc": "13:22-13:24" + }, + { + "token": [ + "UIDENT", + "UInt64" + ], + "loc": "13:25-13:31" + }, + { + "token": "EQUAL", + "loc": "13:32-13:33" + }, + { + "token": [ + "STRING", + "%v128.hi" + ], + "loc": "13:34-13:44" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "13:44-13:44" + }, + { + "token": "NEWLINE", + "loc": "13:44-13:45" + }, + { + "token": "NEWLINE", + "loc": "14:1-14:2" + }, + { + "token": [ + "ATTRIBUTE", + { + "id": "intrinsic", + "dot_id": "", + "raw_payload": "(\"%v128.v128_const_i8x16\")" + } + ], + "loc": "15:1-15:37" + }, + { + "token": "NEWLINE", + "loc": "15:37-15:38" + }, + { + "token": "FN", + "loc": "16:1-16:3" + }, + { + "token": [ + "LIDENT", + "v128_const" + ], + "loc": "16:4-16:14" + }, + { + "token": "LPAREN", + "loc": "16:14-16:15" + }, + { + "token": "NEWLINE", + "loc": "16:15-16:16" + }, + { + "token": [ + "LIDENT", + "l0" + ], + "loc": "17:3-17:5" + }, + { + "token": "COLON", + "loc": "17:6-17:7" + }, + { + "token": [ + "UIDENT", + "Int" + ], + "loc": "17:8-17:11" + }, + { + "token": "COMMA", + "loc": "17:11-17:12" + }, + { + "token": "NEWLINE", + "loc": "17:12-17:13" + }, + { + "token": [ + "LIDENT", + "l1" + ], + "loc": "18:3-18:5" + }, + { + "token": "COLON", + "loc": "18:6-18:7" + }, + { + "token": [ + "UIDENT", + "Int" + ], + "loc": "18:8-18:11" + }, + { + "token": "COMMA", + "loc": "18:11-18:12" + }, + { + "token": "NEWLINE", + "loc": "18:12-18:13" + }, + { + "token": [ + "LIDENT", + "l2" + ], + "loc": "19:3-19:5" + }, + { + "token": "COLON", + "loc": "19:6-19:7" + }, + { + "token": [ + "UIDENT", + "Int" + ], + "loc": "19:8-19:11" + }, + { + "token": "COMMA", + "loc": "19:11-19:12" + }, + { + "token": "NEWLINE", + "loc": "19:12-19:13" + }, + { + "token": [ + "LIDENT", + "l3" + ], + "loc": "20:3-20:5" + }, + { + "token": "COLON", + "loc": "20:6-20:7" + }, + { + "token": [ + "UIDENT", + "Int" + ], + "loc": "20:8-20:11" + }, + { + "token": "COMMA", + "loc": "20:11-20:12" + }, + { + "token": "NEWLINE", + "loc": "20:12-20:13" + }, + { + "token": [ + "LIDENT", + "l4" + ], + "loc": "21:3-21:5" + }, + { + "token": "COLON", + "loc": "21:6-21:7" + }, + { + "token": [ + "UIDENT", + "Int" + ], + "loc": "21:8-21:11" + }, + { + "token": "COMMA", + "loc": "21:11-21:12" + }, + { + "token": "NEWLINE", + "loc": "21:12-21:13" + }, + { + "token": [ + "LIDENT", + "l5" + ], + "loc": "22:3-22:5" + }, + { + "token": "COLON", + "loc": "22:6-22:7" + }, + { + "token": [ + "UIDENT", + "Int" + ], + "loc": "22:8-22:11" + }, + { + "token": "COMMA", + "loc": "22:11-22:12" + }, + { + "token": "NEWLINE", + "loc": "22:12-22:13" + }, + { + "token": [ + "LIDENT", + "l6" + ], + "loc": "23:3-23:5" + }, + { + "token": "COLON", + "loc": "23:6-23:7" + }, + { + "token": [ + "UIDENT", + "Int" + ], + "loc": "23:8-23:11" + }, + { + "token": "COMMA", + "loc": "23:11-23:12" + }, + { + "token": "NEWLINE", + "loc": "23:12-23:13" + }, + { + "token": [ + "LIDENT", + "l7" + ], + "loc": "24:3-24:5" + }, + { + "token": "COLON", + "loc": "24:6-24:7" + }, + { + "token": [ + "UIDENT", + "Int" + ], + "loc": "24:8-24:11" + }, + { + "token": "COMMA", + "loc": "24:11-24:12" + }, + { + "token": "NEWLINE", + "loc": "24:12-24:13" + }, + { + "token": [ + "LIDENT", + "l8" + ], + "loc": "25:3-25:5" + }, + { + "token": "COLON", + "loc": "25:6-25:7" + }, + { + "token": [ + "UIDENT", + "Int" + ], + "loc": "25:8-25:11" + }, + { + "token": "COMMA", + "loc": "25:11-25:12" + }, + { + "token": "NEWLINE", + "loc": "25:12-25:13" + }, + { + "token": [ + "LIDENT", + "l9" + ], + "loc": "26:3-26:5" + }, + { + "token": "COLON", + "loc": "26:6-26:7" + }, + { + "token": [ + "UIDENT", + "Int" + ], + "loc": "26:8-26:11" + }, + { + "token": "COMMA", + "loc": "26:11-26:12" + }, + { + "token": "NEWLINE", + "loc": "26:12-26:13" + }, + { + "token": [ + "LIDENT", + "l10" + ], + "loc": "27:3-27:6" + }, + { + "token": "COLON", + "loc": "27:7-27:8" + }, + { + "token": [ + "UIDENT", + "Int" + ], + "loc": "27:9-27:12" + }, + { + "token": "COMMA", + "loc": "27:12-27:13" + }, + { + "token": "NEWLINE", + "loc": "27:13-27:14" + }, + { + "token": [ + "LIDENT", + "l11" + ], + "loc": "28:3-28:6" + }, + { + "token": "COLON", + "loc": "28:7-28:8" + }, + { + "token": [ + "UIDENT", + "Int" + ], + "loc": "28:9-28:12" + }, + { + "token": "COMMA", + "loc": "28:12-28:13" + }, + { + "token": "NEWLINE", + "loc": "28:13-28:14" + }, + { + "token": [ + "LIDENT", + "l12" + ], + "loc": "29:3-29:6" + }, + { + "token": "COLON", + "loc": "29:7-29:8" + }, + { + "token": [ + "UIDENT", + "Int" + ], + "loc": "29:9-29:12" + }, + { + "token": "COMMA", + "loc": "29:12-29:13" + }, + { + "token": "NEWLINE", + "loc": "29:13-29:14" + }, + { + "token": [ + "LIDENT", + "l13" + ], + "loc": "30:3-30:6" + }, + { + "token": "COLON", + "loc": "30:7-30:8" + }, + { + "token": [ + "UIDENT", + "Int" + ], + "loc": "30:9-30:12" + }, + { + "token": "COMMA", + "loc": "30:12-30:13" + }, + { + "token": "NEWLINE", + "loc": "30:13-30:14" + }, + { + "token": [ + "LIDENT", + "l14" + ], + "loc": "31:3-31:6" + }, + { + "token": "COLON", + "loc": "31:7-31:8" + }, + { + "token": [ + "UIDENT", + "Int" + ], + "loc": "31:9-31:12" + }, + { + "token": "COMMA", + "loc": "31:12-31:13" + }, + { + "token": "NEWLINE", + "loc": "31:13-31:14" + }, + { + "token": [ + "LIDENT", + "l15" + ], + "loc": "32:3-32:6" + }, + { + "token": "COLON", + "loc": "32:7-32:8" + }, + { + "token": [ + "UIDENT", + "Int" + ], + "loc": "32:9-32:12" + }, + { + "token": "NEWLINE", + "loc": "32:12-32:13" + }, + { + "token": "RPAREN", + "loc": "33:1-33:2" + }, + { + "token": "THIN_ARROW", + "loc": "33:3-33:5" + }, + { + "token": [ + "UIDENT", + "V128" + ], + "loc": "33:6-33:10" + }, + { + "token": "LBRACE", + "loc": "33:11-33:12" + }, + { + "token": "NEWLINE", + "loc": "33:12-33:13" + }, + { + "token": "FN", + "loc": "34:3-34:5" + }, + { + "token": [ + "LIDENT", + "byte" + ], + "loc": "34:6-34:10" + }, + { + "token": "LPAREN", + "loc": "34:10-34:11" + }, + { + "token": [ + "LIDENT", + "v" + ], + "loc": "34:11-34:12" + }, + { + "token": "COLON", + "loc": "34:13-34:14" + }, + { + "token": [ + "UIDENT", + "Int" + ], + "loc": "34:15-34:18" + }, + { + "token": "COMMA", + "loc": "34:18-34:19" + }, + { + "token": [ + "LIDENT", + "shift" + ], + "loc": "34:20-34:25" + }, + { + "token": "COLON", + "loc": "34:26-34:27" + }, + { + "token": [ + "UIDENT", + "Int" + ], + "loc": "34:28-34:31" + }, + { + "token": "RPAREN", + "loc": "34:31-34:32" + }, + { + "token": "THIN_ARROW", + "loc": "34:33-34:35" + }, + { + "token": [ + "UIDENT", + "UInt64" + ], + "loc": "34:36-34:42" + }, + { + "token": "LBRACE", + "loc": "34:43-34:44" + }, + { + "token": "NEWLINE", + "loc": "34:44-34:45" + }, + { + "token": [ + "LIDENT", + "v" + ], + "loc": "35:5-35:6" + }, + { + "token": [ + "DOT_LIDENT", + "to_uint64" + ], + "loc": "35:7-35:16" + }, + { + "token": "LPAREN", + "loc": "35:16-35:17" + }, + { + "token": "RPAREN", + "loc": "35:17-35:18" + }, + { + "token": [ + "DOT_LIDENT", + "land" + ], + "loc": "35:19-35:23" + }, + { + "token": "LPAREN", + "loc": "35:23-35:24" + }, + { + "token": [ + "INT", + "0xffUL" + ], + "loc": "35:24-35:30" + }, + { + "token": "RPAREN", + "loc": "35:30-35:31" + }, + { + "token": [ + "INFIX2", + "<<" + ], + "loc": "35:32-35:34" + }, + { + "token": [ + "LIDENT", + "shift" + ], + "loc": "35:35-35:40" + }, + { + "token": "NEWLINE", + "loc": "35:40-35:41" + }, + { + "token": "RBRACE", + "loc": "36:3-36:4" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "36:4-36:4" + }, + { + "token": "NEWLINE", + "loc": "36:4-36:5" + }, + { + "token": "NEWLINE", + "loc": "37:1-37:2" + }, + { + "token": [ + "LIDENT", + "v128_make" + ], + "loc": "38:3-38:12" + }, + { + "token": "LPAREN", + "loc": "38:12-38:13" + }, + { + "token": "NEWLINE", + "loc": "38:13-38:14" + }, + { + "token": [ + "LIDENT", + "byte" + ], + "loc": "39:5-39:9" + }, + { + "token": "LPAREN", + "loc": "39:9-39:10" + }, + { + "token": [ + "LIDENT", + "l0" + ], + "loc": "39:10-39:12" + }, + { + "token": "COMMA", + "loc": "39:12-39:13" + }, + { + "token": [ + "INT", + "0" + ], + "loc": "39:14-39:15" + }, + { + "token": "RPAREN", + "loc": "39:15-39:16" + }, + { + "token": "NEWLINE", + "loc": "39:16-39:17" + }, + { + "token": [ + "DOT_LIDENT", + "lor" + ], + "loc": "40:6-40:9" + }, + { + "token": "LPAREN", + "loc": "40:9-40:10" + }, + { + "token": [ + "LIDENT", + "byte" + ], + "loc": "40:10-40:14" + }, + { + "token": "LPAREN", + "loc": "40:14-40:15" + }, + { + "token": [ + "LIDENT", + "l1" + ], + "loc": "40:15-40:17" + }, + { + "token": "COMMA", + "loc": "40:17-40:18" + }, + { + "token": [ + "INT", + "8" + ], + "loc": "40:19-40:20" + }, + { + "token": "RPAREN", + "loc": "40:20-40:21" + }, + { + "token": "RPAREN", + "loc": "40:21-40:22" + }, + { + "token": "NEWLINE", + "loc": "40:22-40:23" + }, + { + "token": [ + "DOT_LIDENT", + "lor" + ], + "loc": "41:6-41:9" + }, + { + "token": "LPAREN", + "loc": "41:9-41:10" + }, + { + "token": [ + "LIDENT", + "byte" + ], + "loc": "41:10-41:14" + }, + { + "token": "LPAREN", + "loc": "41:14-41:15" + }, + { + "token": [ + "LIDENT", + "l2" + ], + "loc": "41:15-41:17" + }, + { + "token": "COMMA", + "loc": "41:17-41:18" + }, + { + "token": [ + "INT", + "16" + ], + "loc": "41:19-41:21" + }, + { + "token": "RPAREN", + "loc": "41:21-41:22" + }, + { + "token": "RPAREN", + "loc": "41:22-41:23" + }, + { + "token": "NEWLINE", + "loc": "41:23-41:24" + }, + { + "token": [ + "DOT_LIDENT", + "lor" + ], + "loc": "42:6-42:9" + }, + { + "token": "LPAREN", + "loc": "42:9-42:10" + }, + { + "token": [ + "LIDENT", + "byte" + ], + "loc": "42:10-42:14" + }, + { + "token": "LPAREN", + "loc": "42:14-42:15" + }, + { + "token": [ + "LIDENT", + "l3" + ], + "loc": "42:15-42:17" + }, + { + "token": "COMMA", + "loc": "42:17-42:18" + }, + { + "token": [ + "INT", + "24" + ], + "loc": "42:19-42:21" + }, + { + "token": "RPAREN", + "loc": "42:21-42:22" + }, + { + "token": "RPAREN", + "loc": "42:22-42:23" + }, + { + "token": "NEWLINE", + "loc": "42:23-42:24" + }, + { + "token": [ + "DOT_LIDENT", + "lor" + ], + "loc": "43:6-43:9" + }, + { + "token": "LPAREN", + "loc": "43:9-43:10" + }, + { + "token": [ + "LIDENT", + "byte" + ], + "loc": "43:10-43:14" + }, + { + "token": "LPAREN", + "loc": "43:14-43:15" + }, + { + "token": [ + "LIDENT", + "l4" + ], + "loc": "43:15-43:17" + }, + { + "token": "COMMA", + "loc": "43:17-43:18" + }, + { + "token": [ + "INT", + "32" + ], + "loc": "43:19-43:21" + }, + { + "token": "RPAREN", + "loc": "43:21-43:22" + }, + { + "token": "RPAREN", + "loc": "43:22-43:23" + }, + { + "token": "NEWLINE", + "loc": "43:23-43:24" + }, + { + "token": [ + "DOT_LIDENT", + "lor" + ], + "loc": "44:6-44:9" + }, + { + "token": "LPAREN", + "loc": "44:9-44:10" + }, + { + "token": [ + "LIDENT", + "byte" + ], + "loc": "44:10-44:14" + }, + { + "token": "LPAREN", + "loc": "44:14-44:15" + }, + { + "token": [ + "LIDENT", + "l5" + ], + "loc": "44:15-44:17" + }, + { + "token": "COMMA", + "loc": "44:17-44:18" + }, + { + "token": [ + "INT", + "40" + ], + "loc": "44:19-44:21" + }, + { + "token": "RPAREN", + "loc": "44:21-44:22" + }, + { + "token": "RPAREN", + "loc": "44:22-44:23" + }, + { + "token": "NEWLINE", + "loc": "44:23-44:24" + }, + { + "token": [ + "DOT_LIDENT", + "lor" + ], + "loc": "45:6-45:9" + }, + { + "token": "LPAREN", + "loc": "45:9-45:10" + }, + { + "token": [ + "LIDENT", + "byte" + ], + "loc": "45:10-45:14" + }, + { + "token": "LPAREN", + "loc": "45:14-45:15" + }, + { + "token": [ + "LIDENT", + "l6" + ], + "loc": "45:15-45:17" + }, + { + "token": "COMMA", + "loc": "45:17-45:18" + }, + { + "token": [ + "INT", + "48" + ], + "loc": "45:19-45:21" + }, + { + "token": "RPAREN", + "loc": "45:21-45:22" + }, + { + "token": "RPAREN", + "loc": "45:22-45:23" + }, + { + "token": "NEWLINE", + "loc": "45:23-45:24" + }, + { + "token": [ + "DOT_LIDENT", + "lor" + ], + "loc": "46:6-46:9" + }, + { + "token": "LPAREN", + "loc": "46:9-46:10" + }, + { + "token": [ + "LIDENT", + "byte" + ], + "loc": "46:10-46:14" + }, + { + "token": "LPAREN", + "loc": "46:14-46:15" + }, + { + "token": [ + "LIDENT", + "l7" + ], + "loc": "46:15-46:17" + }, + { + "token": "COMMA", + "loc": "46:17-46:18" + }, + { + "token": [ + "INT", + "56" + ], + "loc": "46:19-46:21" + }, + { + "token": "RPAREN", + "loc": "46:21-46:22" + }, + { + "token": "RPAREN", + "loc": "46:22-46:23" + }, + { + "token": "COMMA", + "loc": "46:23-46:24" + }, + { + "token": "NEWLINE", + "loc": "46:24-46:25" + }, + { + "token": [ + "LIDENT", + "byte" + ], + "loc": "47:5-47:9" + }, + { + "token": "LPAREN", + "loc": "47:9-47:10" + }, + { + "token": [ + "LIDENT", + "l8" + ], + "loc": "47:10-47:12" + }, + { + "token": "COMMA", + "loc": "47:12-47:13" + }, + { + "token": [ + "INT", + "0" + ], + "loc": "47:14-47:15" + }, + { + "token": "RPAREN", + "loc": "47:15-47:16" + }, + { + "token": "NEWLINE", + "loc": "47:16-47:17" + }, + { + "token": [ + "DOT_LIDENT", + "lor" + ], + "loc": "48:6-48:9" + }, + { + "token": "LPAREN", + "loc": "48:9-48:10" + }, + { + "token": [ + "LIDENT", + "byte" + ], + "loc": "48:10-48:14" + }, + { + "token": "LPAREN", + "loc": "48:14-48:15" + }, + { + "token": [ + "LIDENT", + "l9" + ], + "loc": "48:15-48:17" + }, + { + "token": "COMMA", + "loc": "48:17-48:18" + }, + { + "token": [ + "INT", + "8" + ], + "loc": "48:19-48:20" + }, + { + "token": "RPAREN", + "loc": "48:20-48:21" + }, + { + "token": "RPAREN", + "loc": "48:21-48:22" + }, + { + "token": "NEWLINE", + "loc": "48:22-48:23" + }, + { + "token": [ + "DOT_LIDENT", + "lor" + ], + "loc": "49:6-49:9" + }, + { + "token": "LPAREN", + "loc": "49:9-49:10" + }, + { + "token": [ + "LIDENT", + "byte" + ], + "loc": "49:10-49:14" + }, + { + "token": "LPAREN", + "loc": "49:14-49:15" + }, + { + "token": [ + "LIDENT", + "l10" + ], + "loc": "49:15-49:18" + }, + { + "token": "COMMA", + "loc": "49:18-49:19" + }, + { + "token": [ + "INT", + "16" + ], + "loc": "49:20-49:22" + }, + { + "token": "RPAREN", + "loc": "49:22-49:23" + }, + { + "token": "RPAREN", + "loc": "49:23-49:24" + }, + { + "token": "NEWLINE", + "loc": "49:24-49:25" + }, + { + "token": [ + "DOT_LIDENT", + "lor" + ], + "loc": "50:6-50:9" + }, + { + "token": "LPAREN", + "loc": "50:9-50:10" + }, + { + "token": [ + "LIDENT", + "byte" + ], + "loc": "50:10-50:14" + }, + { + "token": "LPAREN", + "loc": "50:14-50:15" + }, + { + "token": [ + "LIDENT", + "l11" + ], + "loc": "50:15-50:18" + }, + { + "token": "COMMA", + "loc": "50:18-50:19" + }, + { + "token": [ + "INT", + "24" + ], + "loc": "50:20-50:22" + }, + { + "token": "RPAREN", + "loc": "50:22-50:23" + }, + { + "token": "RPAREN", + "loc": "50:23-50:24" + }, + { + "token": "NEWLINE", + "loc": "50:24-50:25" + }, + { + "token": [ + "DOT_LIDENT", + "lor" + ], + "loc": "51:6-51:9" + }, + { + "token": "LPAREN", + "loc": "51:9-51:10" + }, + { + "token": [ + "LIDENT", + "byte" + ], + "loc": "51:10-51:14" + }, + { + "token": "LPAREN", + "loc": "51:14-51:15" + }, + { + "token": [ + "LIDENT", + "l12" + ], + "loc": "51:15-51:18" + }, + { + "token": "COMMA", + "loc": "51:18-51:19" + }, + { + "token": [ + "INT", + "32" + ], + "loc": "51:20-51:22" + }, + { + "token": "RPAREN", + "loc": "51:22-51:23" + }, + { + "token": "RPAREN", + "loc": "51:23-51:24" + }, + { + "token": "NEWLINE", + "loc": "51:24-51:25" + }, + { + "token": [ + "DOT_LIDENT", + "lor" + ], + "loc": "52:6-52:9" + }, + { + "token": "LPAREN", + "loc": "52:9-52:10" + }, + { + "token": [ + "LIDENT", + "byte" + ], + "loc": "52:10-52:14" + }, + { + "token": "LPAREN", + "loc": "52:14-52:15" + }, + { + "token": [ + "LIDENT", + "l13" + ], + "loc": "52:15-52:18" + }, + { + "token": "COMMA", + "loc": "52:18-52:19" + }, + { + "token": [ + "INT", + "40" + ], + "loc": "52:20-52:22" + }, + { + "token": "RPAREN", + "loc": "52:22-52:23" + }, + { + "token": "RPAREN", + "loc": "52:23-52:24" + }, + { + "token": "NEWLINE", + "loc": "52:24-52:25" + }, + { + "token": [ + "DOT_LIDENT", + "lor" + ], + "loc": "53:6-53:9" + }, + { + "token": "LPAREN", + "loc": "53:9-53:10" + }, + { + "token": [ + "LIDENT", + "byte" + ], + "loc": "53:10-53:14" + }, + { + "token": "LPAREN", + "loc": "53:14-53:15" + }, + { + "token": [ + "LIDENT", + "l14" + ], + "loc": "53:15-53:18" + }, + { + "token": "COMMA", + "loc": "53:18-53:19" + }, + { + "token": [ + "INT", + "48" + ], + "loc": "53:20-53:22" + }, + { + "token": "RPAREN", + "loc": "53:22-53:23" + }, + { + "token": "RPAREN", + "loc": "53:23-53:24" + }, + { + "token": "NEWLINE", + "loc": "53:24-53:25" + }, + { + "token": [ + "DOT_LIDENT", + "lor" + ], + "loc": "54:6-54:9" + }, + { + "token": "LPAREN", + "loc": "54:9-54:10" + }, + { + "token": [ + "LIDENT", + "byte" + ], + "loc": "54:10-54:14" + }, + { + "token": "LPAREN", + "loc": "54:14-54:15" + }, + { + "token": [ + "LIDENT", + "l15" + ], + "loc": "54:15-54:18" + }, + { + "token": "COMMA", + "loc": "54:18-54:19" + }, + { + "token": [ + "INT", + "56" + ], + "loc": "54:20-54:22" + }, + { + "token": "RPAREN", + "loc": "54:22-54:23" + }, + { + "token": "RPAREN", + "loc": "54:23-54:24" + }, + { + "token": "COMMA", + "loc": "54:24-54:25" + }, + { + "token": "NEWLINE", + "loc": "54:25-54:26" + }, + { + "token": "RPAREN", + "loc": "55:3-55:4" + }, + { + "token": "NEWLINE", + "loc": "55:4-55:5" + }, + { + "token": "RBRACE", + "loc": "56:1-56:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "56:2-56:2" + }, + { + "token": "NEWLINE", + "loc": "56:2-56:3" + }, + { + "token": "NEWLINE", + "loc": "57:1-57:2" + }, + { + "token": [ + "ATTRIBUTE", + { + "id": "intrinsic", + "dot_id": "", + "raw_payload": "(\"%v128.v128_not\")" + } + ], + "loc": "58:1-58:29" + }, + { + "token": "NEWLINE", + "loc": "58:29-58:30" + }, + { + "token": "FN", + "loc": "59:1-59:3" + }, + { + "token": [ + "LIDENT", + "v128_not" + ], + "loc": "59:4-59:12" + }, + { + "token": "LPAREN", + "loc": "59:12-59:13" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "59:13-59:18" + }, + { + "token": "COLON", + "loc": "59:19-59:20" + }, + { + "token": [ + "UIDENT", + "V128" + ], + "loc": "59:21-59:25" + }, + { + "token": "RPAREN", + "loc": "59:25-59:26" + }, + { + "token": "THIN_ARROW", + "loc": "59:27-59:29" + }, + { + "token": [ + "UIDENT", + "V128" + ], + "loc": "59:30-59:34" + }, + { + "token": "LBRACE", + "loc": "59:35-59:36" + }, + { + "token": "NEWLINE", + "loc": "59:36-59:37" + }, + { + "token": [ + "LIDENT", + "v128_make" + ], + "loc": "60:3-60:12" + }, + { + "token": "LPAREN", + "loc": "60:12-60:13" + }, + { + "token": "NEWLINE", + "loc": "60:13-60:14" + }, + { + "token": [ + "LIDENT", + "v128_lo" + ], + "loc": "61:5-61:12" + }, + { + "token": "LPAREN", + "loc": "61:12-61:13" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "61:13-61:18" + }, + { + "token": "RPAREN", + "loc": "61:18-61:19" + }, + { + "token": [ + "DOT_LIDENT", + "lxor" + ], + "loc": "61:20-61:24" + }, + { + "token": "LPAREN", + "loc": "61:24-61:25" + }, + { + "token": [ + "INT", + "0xffffffffffffffffUL" + ], + "loc": "61:25-61:45" + }, + { + "token": "RPAREN", + "loc": "61:45-61:46" + }, + { + "token": "COMMA", + "loc": "61:46-61:47" + }, + { + "token": "NEWLINE", + "loc": "61:47-61:48" + }, + { + "token": [ + "LIDENT", + "v128_hi" + ], + "loc": "62:5-62:12" + }, + { + "token": "LPAREN", + "loc": "62:12-62:13" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "62:13-62:18" + }, + { + "token": "RPAREN", + "loc": "62:18-62:19" + }, + { + "token": [ + "DOT_LIDENT", + "lxor" + ], + "loc": "62:20-62:24" + }, + { + "token": "LPAREN", + "loc": "62:24-62:25" + }, + { + "token": [ + "INT", + "0xffffffffffffffffUL" + ], + "loc": "62:25-62:45" + }, + { + "token": "RPAREN", + "loc": "62:45-62:46" + }, + { + "token": "COMMA", + "loc": "62:46-62:47" + }, + { + "token": "NEWLINE", + "loc": "62:47-62:48" + }, + { + "token": "RPAREN", + "loc": "63:3-63:4" + }, + { + "token": "NEWLINE", + "loc": "63:4-63:5" + }, + { + "token": "RBRACE", + "loc": "64:1-64:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "64:2-64:2" + }, + { + "token": "NEWLINE", + "loc": "64:2-64:3" + }, + { + "token": "NEWLINE", + "loc": "65:1-65:2" + }, + { + "token": [ + "ATTRIBUTE", + { + "id": "intrinsic", + "dot_id": "", + "raw_payload": "(\"%v128.v128_and\")" + } + ], + "loc": "66:1-66:29" + }, + { + "token": "NEWLINE", + "loc": "66:29-66:30" + }, + { + "token": "FN", + "loc": "67:1-67:3" + }, + { + "token": [ + "LIDENT", + "v128_and" + ], + "loc": "67:4-67:12" + }, + { + "token": "LPAREN", + "loc": "67:12-67:13" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "67:13-67:18" + }, + { + "token": "COLON", + "loc": "67:19-67:20" + }, + { + "token": [ + "UIDENT", + "V128" + ], + "loc": "67:21-67:25" + }, + { + "token": "COMMA", + "loc": "67:25-67:26" + }, + { + "token": [ + "LIDENT", + "other" + ], + "loc": "67:27-67:32" + }, + { + "token": "COLON", + "loc": "67:33-67:34" + }, + { + "token": [ + "UIDENT", + "V128" + ], + "loc": "67:35-67:39" + }, + { + "token": "RPAREN", + "loc": "67:39-67:40" + }, + { + "token": "THIN_ARROW", + "loc": "67:41-67:43" + }, + { + "token": [ + "UIDENT", + "V128" + ], + "loc": "67:44-67:48" + }, + { + "token": "LBRACE", + "loc": "67:49-67:50" + }, + { + "token": "NEWLINE", + "loc": "67:50-67:51" + }, + { + "token": [ + "LIDENT", + "v128_make" + ], + "loc": "68:3-68:12" + }, + { + "token": "LPAREN", + "loc": "68:12-68:13" + }, + { + "token": [ + "LIDENT", + "v128_lo" + ], + "loc": "68:13-68:20" + }, + { + "token": "LPAREN", + "loc": "68:20-68:21" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "68:21-68:26" + }, + { + "token": "RPAREN", + "loc": "68:26-68:27" + }, + { + "token": [ + "DOT_LIDENT", + "land" + ], + "loc": "68:28-68:32" + }, + { + "token": "LPAREN", + "loc": "68:32-68:33" + }, + { + "token": [ + "LIDENT", + "v128_lo" + ], + "loc": "68:33-68:40" + }, + { + "token": "LPAREN", + "loc": "68:40-68:41" + }, + { + "token": [ + "LIDENT", + "other" + ], + "loc": "68:41-68:46" + }, + { + "token": "RPAREN", + "loc": "68:46-68:47" + }, + { + "token": "RPAREN", + "loc": "68:47-68:48" + }, + { + "token": "COMMA", + "loc": "68:48-68:49" + }, + { + "token": [ + "LIDENT", + "v128_hi" + ], + "loc": "68:50-68:57" + }, + { + "token": "LPAREN", + "loc": "68:57-68:58" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "68:58-68:63" + }, + { + "token": "RPAREN", + "loc": "68:63-68:64" + }, + { + "token": [ + "DOT_LIDENT", + "land" + ], + "loc": "68:65-68:69" + }, + { + "token": "LPAREN", + "loc": "68:69-68:70" + }, + { + "token": [ + "LIDENT", + "v128_hi" + ], + "loc": "68:70-68:77" + }, + { + "token": "LPAREN", + "loc": "68:77-68:78" + }, + { + "token": [ + "LIDENT", + "other" + ], + "loc": "68:78-68:83" + }, + { + "token": "RPAREN", + "loc": "68:83-68:84" + }, + { + "token": "RPAREN", + "loc": "68:84-68:85" + }, + { + "token": "RPAREN", + "loc": "68:85-68:86" + }, + { + "token": "NEWLINE", + "loc": "68:86-68:87" + }, + { + "token": "RBRACE", + "loc": "69:1-69:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "69:2-69:2" + }, + { + "token": "NEWLINE", + "loc": "69:2-69:3" + }, + { + "token": "NEWLINE", + "loc": "70:1-70:2" + }, + { + "token": [ + "ATTRIBUTE", + { + "id": "intrinsic", + "dot_id": "", + "raw_payload": "(\"%v128.v128_andnot\")" + } + ], + "loc": "71:1-71:32" + }, + { + "token": "NEWLINE", + "loc": "71:32-71:33" + }, + { + "token": "FN", + "loc": "72:1-72:3" + }, + { + "token": [ + "LIDENT", + "v128_andnot" + ], + "loc": "72:4-72:15" + }, + { + "token": "LPAREN", + "loc": "72:15-72:16" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "72:16-72:21" + }, + { + "token": "COLON", + "loc": "72:22-72:23" + }, + { + "token": [ + "UIDENT", + "V128" + ], + "loc": "72:24-72:28" + }, + { + "token": "COMMA", + "loc": "72:28-72:29" + }, + { + "token": [ + "LIDENT", + "other" + ], + "loc": "72:30-72:35" + }, + { + "token": "COLON", + "loc": "72:36-72:37" + }, + { + "token": [ + "UIDENT", + "V128" + ], + "loc": "72:38-72:42" + }, + { + "token": "RPAREN", + "loc": "72:42-72:43" + }, + { + "token": "THIN_ARROW", + "loc": "72:44-72:46" + }, + { + "token": [ + "UIDENT", + "V128" + ], + "loc": "72:47-72:51" + }, + { + "token": "LBRACE", + "loc": "72:52-72:53" + }, + { + "token": "NEWLINE", + "loc": "72:53-72:54" + }, + { + "token": [ + "LIDENT", + "v128_make" + ], + "loc": "73:3-73:12" + }, + { + "token": "LPAREN", + "loc": "73:12-73:13" + }, + { + "token": "NEWLINE", + "loc": "73:13-73:14" + }, + { + "token": [ + "LIDENT", + "v128_lo" + ], + "loc": "74:5-74:12" + }, + { + "token": "LPAREN", + "loc": "74:12-74:13" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "74:13-74:18" + }, + { + "token": "RPAREN", + "loc": "74:18-74:19" + }, + { + "token": [ + "DOT_LIDENT", + "land" + ], + "loc": "74:20-74:24" + }, + { + "token": "LPAREN", + "loc": "74:24-74:25" + }, + { + "token": [ + "LIDENT", + "v128_lo" + ], + "loc": "74:25-74:32" + }, + { + "token": "LPAREN", + "loc": "74:32-74:33" + }, + { + "token": [ + "LIDENT", + "other" + ], + "loc": "74:33-74:38" + }, + { + "token": "RPAREN", + "loc": "74:38-74:39" + }, + { + "token": [ + "DOT_LIDENT", + "lxor" + ], + "loc": "74:40-74:44" + }, + { + "token": "LPAREN", + "loc": "74:44-74:45" + }, + { + "token": [ + "INT", + "0xffffffffffffffffUL" + ], + "loc": "74:45-74:65" + }, + { + "token": "RPAREN", + "loc": "74:65-74:66" + }, + { + "token": "RPAREN", + "loc": "74:66-74:67" + }, + { + "token": "COMMA", + "loc": "74:67-74:68" + }, + { + "token": "NEWLINE", + "loc": "74:68-74:69" + }, + { + "token": [ + "LIDENT", + "v128_hi" + ], + "loc": "75:5-75:12" + }, + { + "token": "LPAREN", + "loc": "75:12-75:13" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "75:13-75:18" + }, + { + "token": "RPAREN", + "loc": "75:18-75:19" + }, + { + "token": [ + "DOT_LIDENT", + "land" + ], + "loc": "75:20-75:24" + }, + { + "token": "LPAREN", + "loc": "75:24-75:25" + }, + { + "token": [ + "LIDENT", + "v128_hi" + ], + "loc": "75:25-75:32" + }, + { + "token": "LPAREN", + "loc": "75:32-75:33" + }, + { + "token": [ + "LIDENT", + "other" + ], + "loc": "75:33-75:38" + }, + { + "token": "RPAREN", + "loc": "75:38-75:39" + }, + { + "token": [ + "DOT_LIDENT", + "lxor" + ], + "loc": "75:40-75:44" + }, + { + "token": "LPAREN", + "loc": "75:44-75:45" + }, + { + "token": [ + "INT", + "0xffffffffffffffffUL" + ], + "loc": "75:45-75:65" + }, + { + "token": "RPAREN", + "loc": "75:65-75:66" + }, + { + "token": "RPAREN", + "loc": "75:66-75:67" + }, + { + "token": "COMMA", + "loc": "75:67-75:68" + }, + { + "token": "NEWLINE", + "loc": "75:68-75:69" + }, + { + "token": "RPAREN", + "loc": "76:3-76:4" + }, + { + "token": "NEWLINE", + "loc": "76:4-76:5" + }, + { + "token": "RBRACE", + "loc": "77:1-77:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "77:2-77:2" + }, + { + "token": "NEWLINE", + "loc": "77:2-77:3" + }, + { + "token": "NEWLINE", + "loc": "78:1-78:2" + }, + { + "token": [ + "ATTRIBUTE", + { + "id": "intrinsic", + "dot_id": "", + "raw_payload": "(\"%v128.v128_or\")" + } + ], + "loc": "79:1-79:28" + }, + { + "token": "NEWLINE", + "loc": "79:28-79:29" + }, + { + "token": "FN", + "loc": "80:1-80:3" + }, + { + "token": [ + "LIDENT", + "v128_or" + ], + "loc": "80:4-80:11" + }, + { + "token": "LPAREN", + "loc": "80:11-80:12" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "80:12-80:17" + }, + { + "token": "COLON", + "loc": "80:18-80:19" + }, + { + "token": [ + "UIDENT", + "V128" + ], + "loc": "80:20-80:24" + }, + { + "token": "COMMA", + "loc": "80:24-80:25" + }, + { + "token": [ + "LIDENT", + "other" + ], + "loc": "80:26-80:31" + }, + { + "token": "COLON", + "loc": "80:32-80:33" + }, + { + "token": [ + "UIDENT", + "V128" + ], + "loc": "80:34-80:38" + }, + { + "token": "RPAREN", + "loc": "80:38-80:39" + }, + { + "token": "THIN_ARROW", + "loc": "80:40-80:42" + }, + { + "token": [ + "UIDENT", + "V128" + ], + "loc": "80:43-80:47" + }, + { + "token": "LBRACE", + "loc": "80:48-80:49" + }, + { + "token": "NEWLINE", + "loc": "80:49-80:50" + }, + { + "token": [ + "LIDENT", + "v128_make" + ], + "loc": "81:3-81:12" + }, + { + "token": "LPAREN", + "loc": "81:12-81:13" + }, + { + "token": [ + "LIDENT", + "v128_lo" + ], + "loc": "81:13-81:20" + }, + { + "token": "LPAREN", + "loc": "81:20-81:21" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "81:21-81:26" + }, + { + "token": "RPAREN", + "loc": "81:26-81:27" + }, + { + "token": [ + "DOT_LIDENT", + "lor" + ], + "loc": "81:28-81:31" + }, + { + "token": "LPAREN", + "loc": "81:31-81:32" + }, + { + "token": [ + "LIDENT", + "v128_lo" + ], + "loc": "81:32-81:39" + }, + { + "token": "LPAREN", + "loc": "81:39-81:40" + }, + { + "token": [ + "LIDENT", + "other" + ], + "loc": "81:40-81:45" + }, + { + "token": "RPAREN", + "loc": "81:45-81:46" + }, + { + "token": "RPAREN", + "loc": "81:46-81:47" + }, + { + "token": "COMMA", + "loc": "81:47-81:48" + }, + { + "token": [ + "LIDENT", + "v128_hi" + ], + "loc": "81:49-81:56" + }, + { + "token": "LPAREN", + "loc": "81:56-81:57" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "81:57-81:62" + }, + { + "token": "RPAREN", + "loc": "81:62-81:63" + }, + { + "token": [ + "DOT_LIDENT", + "lor" + ], + "loc": "81:64-81:67" + }, + { + "token": "LPAREN", + "loc": "81:67-81:68" + }, + { + "token": [ + "LIDENT", + "v128_hi" + ], + "loc": "81:68-81:75" + }, + { + "token": "LPAREN", + "loc": "81:75-81:76" + }, + { + "token": [ + "LIDENT", + "other" + ], + "loc": "81:76-81:81" + }, + { + "token": "RPAREN", + "loc": "81:81-81:82" + }, + { + "token": "RPAREN", + "loc": "81:82-81:83" + }, + { + "token": "RPAREN", + "loc": "81:83-81:84" + }, + { + "token": "NEWLINE", + "loc": "81:84-81:85" + }, + { + "token": "RBRACE", + "loc": "82:1-82:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "82:2-82:2" + }, + { + "token": "NEWLINE", + "loc": "82:2-82:3" + }, + { + "token": "NEWLINE", + "loc": "83:1-83:2" + }, + { + "token": [ + "ATTRIBUTE", + { + "id": "intrinsic", + "dot_id": "", + "raw_payload": "(\"%v128.v128_xor\")" + } + ], + "loc": "84:1-84:29" + }, + { + "token": "NEWLINE", + "loc": "84:29-84:30" + }, + { + "token": "FN", + "loc": "85:1-85:3" + }, + { + "token": [ + "LIDENT", + "v128_xor" + ], + "loc": "85:4-85:12" + }, + { + "token": "LPAREN", + "loc": "85:12-85:13" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "85:13-85:18" + }, + { + "token": "COLON", + "loc": "85:19-85:20" + }, + { + "token": [ + "UIDENT", + "V128" + ], + "loc": "85:21-85:25" + }, + { + "token": "COMMA", + "loc": "85:25-85:26" + }, + { + "token": [ + "LIDENT", + "other" + ], + "loc": "85:27-85:32" + }, + { + "token": "COLON", + "loc": "85:33-85:34" + }, + { + "token": [ + "UIDENT", + "V128" + ], + "loc": "85:35-85:39" + }, + { + "token": "RPAREN", + "loc": "85:39-85:40" + }, + { + "token": "THIN_ARROW", + "loc": "85:41-85:43" + }, + { + "token": [ + "UIDENT", + "V128" + ], + "loc": "85:44-85:48" + }, + { + "token": "LBRACE", + "loc": "85:49-85:50" + }, + { + "token": "NEWLINE", + "loc": "85:50-85:51" + }, + { + "token": [ + "LIDENT", + "v128_make" + ], + "loc": "86:3-86:12" + }, + { + "token": "LPAREN", + "loc": "86:12-86:13" + }, + { + "token": [ + "LIDENT", + "v128_lo" + ], + "loc": "86:13-86:20" + }, + { + "token": "LPAREN", + "loc": "86:20-86:21" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "86:21-86:26" + }, + { + "token": "RPAREN", + "loc": "86:26-86:27" + }, + { + "token": [ + "DOT_LIDENT", + "lxor" + ], + "loc": "86:28-86:32" + }, + { + "token": "LPAREN", + "loc": "86:32-86:33" + }, + { + "token": [ + "LIDENT", + "v128_lo" + ], + "loc": "86:33-86:40" + }, + { + "token": "LPAREN", + "loc": "86:40-86:41" + }, + { + "token": [ + "LIDENT", + "other" + ], + "loc": "86:41-86:46" + }, + { + "token": "RPAREN", + "loc": "86:46-86:47" + }, + { + "token": "RPAREN", + "loc": "86:47-86:48" + }, + { + "token": "COMMA", + "loc": "86:48-86:49" + }, + { + "token": [ + "LIDENT", + "v128_hi" + ], + "loc": "86:50-86:57" + }, + { + "token": "LPAREN", + "loc": "86:57-86:58" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "86:58-86:63" + }, + { + "token": "RPAREN", + "loc": "86:63-86:64" + }, + { + "token": [ + "DOT_LIDENT", + "lxor" + ], + "loc": "86:65-86:69" + }, + { + "token": "LPAREN", + "loc": "86:69-86:70" + }, + { + "token": [ + "LIDENT", + "v128_hi" + ], + "loc": "86:70-86:77" + }, + { + "token": "LPAREN", + "loc": "86:77-86:78" + }, + { + "token": [ + "LIDENT", + "other" + ], + "loc": "86:78-86:83" + }, + { + "token": "RPAREN", + "loc": "86:83-86:84" + }, + { + "token": "RPAREN", + "loc": "86:84-86:85" + }, + { + "token": "RPAREN", + "loc": "86:85-86:86" + }, + { + "token": "NEWLINE", + "loc": "86:86-86:87" + }, + { + "token": "RBRACE", + "loc": "87:1-87:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "87:2-87:2" + }, + { + "token": "NEWLINE", + "loc": "87:2-87:3" + }, + { + "token": "NEWLINE", + "loc": "88:1-88:2" + }, + { + "token": [ + "ATTRIBUTE", + { + "id": "intrinsic", + "dot_id": "", + "raw_payload": "(\"%v128.v128_bitselect\")" + } + ], + "loc": "89:1-89:35" + }, + { + "token": "NEWLINE", + "loc": "89:35-89:36" + }, + { + "token": "FN", + "loc": "90:1-90:3" + }, + { + "token": [ + "LIDENT", + "v128_bitselect" + ], + "loc": "90:4-90:18" + }, + { + "token": "LPAREN", + "loc": "90:18-90:19" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "90:19-90:24" + }, + { + "token": "COLON", + "loc": "90:25-90:26" + }, + { + "token": [ + "UIDENT", + "V128" + ], + "loc": "90:27-90:31" + }, + { + "token": "COMMA", + "loc": "90:31-90:32" + }, + { + "token": [ + "LIDENT", + "other" + ], + "loc": "90:33-90:38" + }, + { + "token": "COLON", + "loc": "90:39-90:40" + }, + { + "token": [ + "UIDENT", + "V128" + ], + "loc": "90:41-90:45" + }, + { + "token": "COMMA", + "loc": "90:45-90:46" + }, + { + "token": [ + "LIDENT", + "mask" + ], + "loc": "90:47-90:51" + }, + { + "token": "COLON", + "loc": "90:52-90:53" + }, + { + "token": [ + "UIDENT", + "V128" + ], + "loc": "90:54-90:58" + }, + { + "token": "RPAREN", + "loc": "90:58-90:59" + }, + { + "token": "THIN_ARROW", + "loc": "90:60-90:62" + }, + { + "token": [ + "UIDENT", + "V128" + ], + "loc": "90:63-90:67" + }, + { + "token": "LBRACE", + "loc": "90:68-90:69" + }, + { + "token": "NEWLINE", + "loc": "90:69-90:70" + }, + { + "token": [ + "LIDENT", + "v128_make" + ], + "loc": "91:3-91:12" + }, + { + "token": "LPAREN", + "loc": "91:12-91:13" + }, + { + "token": "NEWLINE", + "loc": "91:13-91:14" + }, + { + "token": [ + "LIDENT", + "v128_lo" + ], + "loc": "92:5-92:12" + }, + { + "token": "LPAREN", + "loc": "92:12-92:13" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "92:13-92:18" + }, + { + "token": "RPAREN", + "loc": "92:18-92:19" + }, + { + "token": [ + "DOT_LIDENT", + "land" + ], + "loc": "92:20-92:24" + }, + { + "token": "LPAREN", + "loc": "92:24-92:25" + }, + { + "token": [ + "LIDENT", + "v128_lo" + ], + "loc": "92:25-92:32" + }, + { + "token": "LPAREN", + "loc": "92:32-92:33" + }, + { + "token": [ + "LIDENT", + "mask" + ], + "loc": "92:33-92:37" + }, + { + "token": "RPAREN", + "loc": "92:37-92:38" + }, + { + "token": "RPAREN", + "loc": "92:38-92:39" + }, + { + "token": [ + "DOT_LIDENT", + "lor" + ], + "loc": "92:40-92:43" + }, + { + "token": "LPAREN", + "loc": "92:43-92:44" + }, + { + "token": [ + "LIDENT", + "v128_lo" + ], + "loc": "92:44-92:51" + }, + { + "token": "LPAREN", + "loc": "92:51-92:52" + }, + { + "token": [ + "LIDENT", + "other" + ], + "loc": "92:52-92:57" + }, + { + "token": "RPAREN", + "loc": "92:57-92:58" + }, + { + "token": [ + "DOT_LIDENT", + "land" + ], + "loc": "92:59-92:63" + }, + { + "token": "LPAREN", + "loc": "92:63-92:64" + }, + { + "token": [ + "LIDENT", + "v128_lo" + ], + "loc": "92:64-92:71" + }, + { + "token": "LPAREN", + "loc": "92:71-92:72" + }, + { + "token": [ + "LIDENT", + "mask" + ], + "loc": "92:72-92:76" + }, + { + "token": "RPAREN", + "loc": "92:76-92:77" + }, + { + "token": [ + "DOT_LIDENT", + "lxor" + ], + "loc": "92:78-92:82" + }, + { + "token": "LPAREN", + "loc": "92:82-92:83" + }, + { + "token": [ + "INT", + "0xffffffffffffffffUL" + ], + "loc": "92:83-92:103" + }, + { + "token": "RPAREN", + "loc": "92:103-92:104" + }, + { + "token": "RPAREN", + "loc": "92:104-92:105" + }, + { + "token": "RPAREN", + "loc": "92:105-92:106" + }, + { + "token": "COMMA", + "loc": "92:106-92:107" + }, + { + "token": "NEWLINE", + "loc": "92:107-92:108" + }, + { + "token": [ + "LIDENT", + "v128_hi" + ], + "loc": "93:5-93:12" + }, + { + "token": "LPAREN", + "loc": "93:12-93:13" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "93:13-93:18" + }, + { + "token": "RPAREN", + "loc": "93:18-93:19" + }, + { + "token": [ + "DOT_LIDENT", + "land" + ], + "loc": "93:20-93:24" + }, + { + "token": "LPAREN", + "loc": "93:24-93:25" + }, + { + "token": [ + "LIDENT", + "v128_hi" + ], + "loc": "93:25-93:32" + }, + { + "token": "LPAREN", + "loc": "93:32-93:33" + }, + { + "token": [ + "LIDENT", + "mask" + ], + "loc": "93:33-93:37" + }, + { + "token": "RPAREN", + "loc": "93:37-93:38" + }, + { + "token": "RPAREN", + "loc": "93:38-93:39" + }, + { + "token": [ + "DOT_LIDENT", + "lor" + ], + "loc": "93:40-93:43" + }, + { + "token": "LPAREN", + "loc": "93:43-93:44" + }, + { + "token": [ + "LIDENT", + "v128_hi" + ], + "loc": "93:44-93:51" + }, + { + "token": "LPAREN", + "loc": "93:51-93:52" + }, + { + "token": [ + "LIDENT", + "other" + ], + "loc": "93:52-93:57" + }, + { + "token": "RPAREN", + "loc": "93:57-93:58" + }, + { + "token": [ + "DOT_LIDENT", + "land" + ], + "loc": "93:59-93:63" + }, + { + "token": "LPAREN", + "loc": "93:63-93:64" + }, + { + "token": [ + "LIDENT", + "v128_hi" + ], + "loc": "93:64-93:71" + }, + { + "token": "LPAREN", + "loc": "93:71-93:72" + }, + { + "token": [ + "LIDENT", + "mask" + ], + "loc": "93:72-93:76" + }, + { + "token": "RPAREN", + "loc": "93:76-93:77" + }, + { + "token": [ + "DOT_LIDENT", + "lxor" + ], + "loc": "93:78-93:82" + }, + { + "token": "LPAREN", + "loc": "93:82-93:83" + }, + { + "token": [ + "INT", + "0xffffffffffffffffUL" + ], + "loc": "93:83-93:103" + }, + { + "token": "RPAREN", + "loc": "93:103-93:104" + }, + { + "token": "RPAREN", + "loc": "93:104-93:105" + }, + { + "token": "RPAREN", + "loc": "93:105-93:106" + }, + { + "token": "COMMA", + "loc": "93:106-93:107" + }, + { + "token": "NEWLINE", + "loc": "93:107-93:108" + }, + { + "token": "RPAREN", + "loc": "94:3-94:4" + }, + { + "token": "NEWLINE", + "loc": "94:4-94:5" + }, + { + "token": "RBRACE", + "loc": "95:1-95:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "95:2-95:2" + }, + { + "token": "NEWLINE", + "loc": "95:2-95:3" + }, + { + "token": "NEWLINE", + "loc": "96:1-96:2" + }, + { + "token": [ + "COMMENT", + { + "content": "// exact lane-wise wrap-around add: the lanes' top bits are summed", + "kind": [ + "Ownline", + { + "leading_blank_line": true, + "trailing_blank_line": false + } + ], + "consumed_by_docstring": false + } + ], + "loc": "97:1-97:67" + }, + { + "token": "NEWLINE", + "loc": "97:67-97:68" + }, + { + "token": [ + "COMMENT", + { + "content": "// separately, so carries cannot cross lane boundaries", + "kind": [ + "Ownline", + { + "leading_blank_line": false, + "trailing_blank_line": false + } + ], + "consumed_by_docstring": false + } + ], + "loc": "98:1-98:55" + }, + { + "token": "NEWLINE", + "loc": "98:55-98:56" + }, + { + "token": "FN", + "loc": "99:1-99:3" + }, + { + "token": [ + "LIDENT", + "swar_add" + ], + "loc": "99:4-99:12" + }, + { + "token": "LPAREN", + "loc": "99:12-99:13" + }, + { + "token": [ + "LIDENT", + "a" + ], + "loc": "99:13-99:14" + }, + { + "token": "COLON", + "loc": "99:15-99:16" + }, + { + "token": [ + "UIDENT", + "UInt64" + ], + "loc": "99:17-99:23" + }, + { + "token": "COMMA", + "loc": "99:23-99:24" + }, + { + "token": [ + "LIDENT", + "b" + ], + "loc": "99:25-99:26" + }, + { + "token": "COLON", + "loc": "99:27-99:28" + }, + { + "token": [ + "UIDENT", + "UInt64" + ], + "loc": "99:29-99:35" + }, + { + "token": "COMMA", + "loc": "99:35-99:36" + }, + { + "token": [ + "LIDENT", + "top_bits" + ], + "loc": "99:37-99:45" + }, + { + "token": "COLON", + "loc": "99:46-99:47" + }, + { + "token": [ + "UIDENT", + "UInt64" + ], + "loc": "99:48-99:54" + }, + { + "token": "RPAREN", + "loc": "99:54-99:55" + }, + { + "token": "THIN_ARROW", + "loc": "99:56-99:58" + }, + { + "token": [ + "UIDENT", + "UInt64" + ], + "loc": "99:59-99:65" + }, + { + "token": "LBRACE", + "loc": "99:66-99:67" + }, + { + "token": "NEWLINE", + "loc": "99:67-99:68" + }, + { + "token": "LET", + "loc": "100:3-100:6" + }, + { + "token": [ + "LIDENT", + "low" + ], + "loc": "100:7-100:10" + }, + { + "token": "EQUAL", + "loc": "100:11-100:12" + }, + { + "token": [ + "LIDENT", + "top_bits" + ], + "loc": "100:13-100:21" + }, + { + "token": [ + "DOT_LIDENT", + "lxor" + ], + "loc": "100:22-100:26" + }, + { + "token": "LPAREN", + "loc": "100:26-100:27" + }, + { + "token": [ + "INT", + "0xffffffffffffffffUL" + ], + "loc": "100:27-100:47" + }, + { + "token": "RPAREN", + "loc": "100:47-100:48" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "100:48-100:48" + }, + { + "token": "NEWLINE", + "loc": "100:48-100:49" + }, + { + "token": "LPAREN", + "loc": "101:3-101:4" + }, + { + "token": [ + "LIDENT", + "a" + ], + "loc": "101:4-101:5" + }, + { + "token": [ + "DOT_LIDENT", + "land" + ], + "loc": "101:6-101:10" + }, + { + "token": "LPAREN", + "loc": "101:10-101:11" + }, + { + "token": [ + "LIDENT", + "low" + ], + "loc": "101:11-101:14" + }, + { + "token": "RPAREN", + "loc": "101:14-101:15" + }, + { + "token": "PLUS", + "loc": "101:16-101:17" + }, + { + "token": [ + "LIDENT", + "b" + ], + "loc": "101:18-101:19" + }, + { + "token": [ + "DOT_LIDENT", + "land" + ], + "loc": "101:20-101:24" + }, + { + "token": "LPAREN", + "loc": "101:24-101:25" + }, + { + "token": [ + "LIDENT", + "low" + ], + "loc": "101:25-101:28" + }, + { + "token": "RPAREN", + "loc": "101:28-101:29" + }, + { + "token": "RPAREN", + "loc": "101:29-101:30" + }, + { + "token": [ + "DOT_LIDENT", + "lxor" + ], + "loc": "101:31-101:35" + }, + { + "token": "LPAREN", + "loc": "101:35-101:36" + }, + { + "token": [ + "LIDENT", + "a" + ], + "loc": "101:36-101:37" + }, + { + "token": [ + "DOT_LIDENT", + "lxor" + ], + "loc": "101:38-101:42" + }, + { + "token": "LPAREN", + "loc": "101:42-101:43" + }, + { + "token": [ + "LIDENT", + "b" + ], + "loc": "101:43-101:44" + }, + { + "token": "RPAREN", + "loc": "101:44-101:45" + }, + { + "token": [ + "DOT_LIDENT", + "land" + ], + "loc": "101:46-101:50" + }, + { + "token": "LPAREN", + "loc": "101:50-101:51" + }, + { + "token": [ + "LIDENT", + "top_bits" + ], + "loc": "101:51-101:59" + }, + { + "token": "RPAREN", + "loc": "101:59-101:60" + }, + { + "token": "RPAREN", + "loc": "101:60-101:61" + }, + { + "token": "NEWLINE", + "loc": "101:61-101:62" + }, + { + "token": "RBRACE", + "loc": "102:1-102:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "102:2-102:2" + }, + { + "token": "NEWLINE", + "loc": "102:2-102:3" + }, + { + "token": "NEWLINE", + "loc": "103:1-103:2" + }, + { + "token": [ + "COMMENT", + { + "content": "// lane-wise sub as a + (-b), with per-lane negation ~b + 1", + "kind": [ + "Ownline", + { + "leading_blank_line": true, + "trailing_blank_line": false + } + ], + "consumed_by_docstring": false + } + ], + "loc": "104:1-104:60" + }, + { + "token": "NEWLINE", + "loc": "104:60-104:61" + }, + { + "token": "FN", + "loc": "105:1-105:3" + }, + { + "token": [ + "LIDENT", + "swar_sub" + ], + "loc": "105:4-105:12" + }, + { + "token": "LPAREN", + "loc": "105:12-105:13" + }, + { + "token": [ + "LIDENT", + "a" + ], + "loc": "105:13-105:14" + }, + { + "token": "COLON", + "loc": "105:15-105:16" + }, + { + "token": [ + "UIDENT", + "UInt64" + ], + "loc": "105:17-105:23" + }, + { + "token": "COMMA", + "loc": "105:23-105:24" + }, + { + "token": [ + "LIDENT", + "b" + ], + "loc": "105:25-105:26" + }, + { + "token": "COLON", + "loc": "105:27-105:28" + }, + { + "token": [ + "UIDENT", + "UInt64" + ], + "loc": "105:29-105:35" + }, + { + "token": "COMMA", + "loc": "105:35-105:36" + }, + { + "token": [ + "LIDENT", + "top_bits" + ], + "loc": "105:37-105:45" + }, + { + "token": "COLON", + "loc": "105:46-105:47" + }, + { + "token": [ + "UIDENT", + "UInt64" + ], + "loc": "105:48-105:54" + }, + { + "token": "COMMA", + "loc": "105:54-105:55" + }, + { + "token": [ + "LIDENT", + "lane_ones" + ], + "loc": "105:56-105:65" + }, + { + "token": "COLON", + "loc": "105:66-105:67" + }, + { + "token": [ + "UIDENT", + "UInt64" + ], + "loc": "105:68-105:74" + }, + { + "token": "RPAREN", + "loc": "105:74-105:75" + }, + { + "token": "THIN_ARROW", + "loc": "105:76-105:78" + }, + { + "token": [ + "UIDENT", + "UInt64" + ], + "loc": "105:79-105:85" + }, + { + "token": "LBRACE", + "loc": "105:86-105:87" + }, + { + "token": "NEWLINE", + "loc": "105:87-105:88" + }, + { + "token": [ + "LIDENT", + "swar_add" + ], + "loc": "106:3-106:11" + }, + { + "token": "LPAREN", + "loc": "106:11-106:12" + }, + { + "token": [ + "LIDENT", + "a" + ], + "loc": "106:12-106:13" + }, + { + "token": "COMMA", + "loc": "106:13-106:14" + }, + { + "token": [ + "LIDENT", + "swar_add" + ], + "loc": "106:15-106:23" + }, + { + "token": "LPAREN", + "loc": "106:23-106:24" + }, + { + "token": [ + "LIDENT", + "b" + ], + "loc": "106:24-106:25" + }, + { + "token": [ + "DOT_LIDENT", + "lxor" + ], + "loc": "106:26-106:30" + }, + { + "token": "LPAREN", + "loc": "106:30-106:31" + }, + { + "token": [ + "INT", + "0xffffffffffffffffUL" + ], + "loc": "106:31-106:51" + }, + { + "token": "RPAREN", + "loc": "106:51-106:52" + }, + { + "token": "COMMA", + "loc": "106:52-106:53" + }, + { + "token": [ + "LIDENT", + "lane_ones" + ], + "loc": "106:54-106:63" + }, + { + "token": "COMMA", + "loc": "106:63-106:64" + }, + { + "token": [ + "LIDENT", + "top_bits" + ], + "loc": "106:65-106:73" + }, + { + "token": "RPAREN", + "loc": "106:73-106:74" + }, + { + "token": "COMMA", + "loc": "106:74-106:75" + }, + { + "token": [ + "LIDENT", + "top_bits" + ], + "loc": "106:76-106:84" + }, + { + "token": "RPAREN", + "loc": "106:84-106:85" + }, + { + "token": "NEWLINE", + "loc": "106:85-106:86" + }, + { + "token": "RBRACE", + "loc": "107:1-107:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "107:2-107:2" + }, + { + "token": "NEWLINE", + "loc": "107:2-107:3" + }, + { + "token": "NEWLINE", + "loc": "108:1-108:2" + }, + { + "token": [ + "ATTRIBUTE", + { + "id": "intrinsic", + "dot_id": "", + "raw_payload": "(\"%v128.i8x16_add\")" + } + ], + "loc": "109:1-109:30" + }, + { + "token": "NEWLINE", + "loc": "109:30-109:31" + }, + { + "token": "FN", + "loc": "110:1-110:3" + }, + { + "token": [ + "LIDENT", + "i8x16_add" + ], + "loc": "110:4-110:13" + }, + { + "token": "LPAREN", + "loc": "110:13-110:14" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "110:14-110:19" + }, + { + "token": "COLON", + "loc": "110:20-110:21" + }, + { + "token": [ + "UIDENT", + "V128" + ], + "loc": "110:22-110:26" + }, + { + "token": "COMMA", + "loc": "110:26-110:27" + }, + { + "token": [ + "LIDENT", + "other" + ], + "loc": "110:28-110:33" + }, + { + "token": "COLON", + "loc": "110:34-110:35" + }, + { + "token": [ + "UIDENT", + "V128" + ], + "loc": "110:36-110:40" + }, + { + "token": "RPAREN", + "loc": "110:40-110:41" + }, + { + "token": "THIN_ARROW", + "loc": "110:42-110:44" + }, + { + "token": [ + "UIDENT", + "V128" + ], + "loc": "110:45-110:49" + }, + { + "token": "LBRACE", + "loc": "110:50-110:51" + }, + { + "token": "NEWLINE", + "loc": "110:51-110:52" + }, + { + "token": [ + "LIDENT", + "v128_make" + ], + "loc": "111:3-111:12" + }, + { + "token": "LPAREN", + "loc": "111:12-111:13" + }, + { + "token": "NEWLINE", + "loc": "111:13-111:14" + }, + { + "token": [ + "LIDENT", + "swar_add" + ], + "loc": "112:5-112:13" + }, + { + "token": "LPAREN", + "loc": "112:13-112:14" + }, + { + "token": [ + "LIDENT", + "v128_lo" + ], + "loc": "112:14-112:21" + }, + { + "token": "LPAREN", + "loc": "112:21-112:22" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "112:22-112:27" + }, + { + "token": "RPAREN", + "loc": "112:27-112:28" + }, + { + "token": "COMMA", + "loc": "112:28-112:29" + }, + { + "token": [ + "LIDENT", + "v128_lo" + ], + "loc": "112:30-112:37" + }, + { + "token": "LPAREN", + "loc": "112:37-112:38" + }, + { + "token": [ + "LIDENT", + "other" + ], + "loc": "112:38-112:43" + }, + { + "token": "RPAREN", + "loc": "112:43-112:44" + }, + { + "token": "COMMA", + "loc": "112:44-112:45" + }, + { + "token": [ + "INT", + "0x8080808080808080UL" + ], + "loc": "112:46-112:66" + }, + { + "token": "RPAREN", + "loc": "112:66-112:67" + }, + { + "token": "COMMA", + "loc": "112:67-112:68" + }, + { + "token": "NEWLINE", + "loc": "112:68-112:69" + }, + { + "token": [ + "LIDENT", + "swar_add" + ], + "loc": "113:5-113:13" + }, + { + "token": "LPAREN", + "loc": "113:13-113:14" + }, + { + "token": [ + "LIDENT", + "v128_hi" + ], + "loc": "113:14-113:21" + }, + { + "token": "LPAREN", + "loc": "113:21-113:22" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "113:22-113:27" + }, + { + "token": "RPAREN", + "loc": "113:27-113:28" + }, + { + "token": "COMMA", + "loc": "113:28-113:29" + }, + { + "token": [ + "LIDENT", + "v128_hi" + ], + "loc": "113:30-113:37" + }, + { + "token": "LPAREN", + "loc": "113:37-113:38" + }, + { + "token": [ + "LIDENT", + "other" + ], + "loc": "113:38-113:43" + }, + { + "token": "RPAREN", + "loc": "113:43-113:44" + }, + { + "token": "COMMA", + "loc": "113:44-113:45" + }, + { + "token": [ + "INT", + "0x8080808080808080UL" + ], + "loc": "113:46-113:66" + }, + { + "token": "RPAREN", + "loc": "113:66-113:67" + }, + { + "token": "COMMA", + "loc": "113:67-113:68" + }, + { + "token": "NEWLINE", + "loc": "113:68-113:69" + }, + { + "token": "RPAREN", + "loc": "114:3-114:4" + }, + { + "token": "NEWLINE", + "loc": "114:4-114:5" + }, + { + "token": "RBRACE", + "loc": "115:1-115:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "115:2-115:2" + }, + { + "token": "NEWLINE", + "loc": "115:2-115:3" + }, + { + "token": "NEWLINE", + "loc": "116:1-116:2" + }, + { + "token": [ + "ATTRIBUTE", + { + "id": "intrinsic", + "dot_id": "", + "raw_payload": "(\"%v128.i8x16_sub\")" + } + ], + "loc": "117:1-117:30" + }, + { + "token": "NEWLINE", + "loc": "117:30-117:31" + }, + { + "token": "FN", + "loc": "118:1-118:3" + }, + { + "token": [ + "LIDENT", + "i8x16_sub" + ], + "loc": "118:4-118:13" + }, + { + "token": "LPAREN", + "loc": "118:13-118:14" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "118:14-118:19" + }, + { + "token": "COLON", + "loc": "118:20-118:21" + }, + { + "token": [ + "UIDENT", + "V128" + ], + "loc": "118:22-118:26" + }, + { + "token": "COMMA", + "loc": "118:26-118:27" + }, + { + "token": [ + "LIDENT", + "other" + ], + "loc": "118:28-118:33" + }, + { + "token": "COLON", + "loc": "118:34-118:35" + }, + { + "token": [ + "UIDENT", + "V128" + ], + "loc": "118:36-118:40" + }, + { + "token": "RPAREN", + "loc": "118:40-118:41" + }, + { + "token": "THIN_ARROW", + "loc": "118:42-118:44" + }, + { + "token": [ + "UIDENT", + "V128" + ], + "loc": "118:45-118:49" + }, + { + "token": "LBRACE", + "loc": "118:50-118:51" + }, + { + "token": "NEWLINE", + "loc": "118:51-118:52" + }, + { + "token": [ + "LIDENT", + "v128_make" + ], + "loc": "119:3-119:12" + }, + { + "token": "LPAREN", + "loc": "119:12-119:13" + }, + { + "token": "NEWLINE", + "loc": "119:13-119:14" + }, + { + "token": [ + "LIDENT", + "swar_sub" + ], + "loc": "120:5-120:13" + }, + { + "token": "LPAREN", + "loc": "120:13-120:14" + }, + { + "token": [ + "LIDENT", + "v128_lo" + ], + "loc": "120:14-120:21" + }, + { + "token": "LPAREN", + "loc": "120:21-120:22" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "120:22-120:27" + }, + { + "token": "RPAREN", + "loc": "120:27-120:28" + }, + { + "token": "COMMA", + "loc": "120:28-120:29" + }, + { + "token": [ + "LIDENT", + "v128_lo" + ], + "loc": "120:30-120:37" + }, + { + "token": "LPAREN", + "loc": "120:37-120:38" + }, + { + "token": [ + "LIDENT", + "other" + ], + "loc": "120:38-120:43" + }, + { + "token": "RPAREN", + "loc": "120:43-120:44" + }, + { + "token": "COMMA", + "loc": "120:44-120:45" + }, + { + "token": [ + "INT", + "0x8080808080808080UL" + ], + "loc": "120:46-120:66" + }, + { + "token": "COMMA", + "loc": "120:66-120:67" + }, + { + "token": [ + "INT", + "0x0101010101010101UL" + ], + "loc": "120:68-120:88" + }, + { + "token": "RPAREN", + "loc": "120:88-120:89" + }, + { + "token": "COMMA", + "loc": "120:89-120:90" + }, + { + "token": "NEWLINE", + "loc": "120:90-120:91" + }, + { + "token": [ + "LIDENT", + "swar_sub" + ], + "loc": "121:5-121:13" + }, + { + "token": "LPAREN", + "loc": "121:13-121:14" + }, + { + "token": [ + "LIDENT", + "v128_hi" + ], + "loc": "121:14-121:21" + }, + { + "token": "LPAREN", + "loc": "121:21-121:22" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "121:22-121:27" + }, + { + "token": "RPAREN", + "loc": "121:27-121:28" + }, + { + "token": "COMMA", + "loc": "121:28-121:29" + }, + { + "token": [ + "LIDENT", + "v128_hi" + ], + "loc": "121:30-121:37" + }, + { + "token": "LPAREN", + "loc": "121:37-121:38" + }, + { + "token": [ + "LIDENT", + "other" + ], + "loc": "121:38-121:43" + }, + { + "token": "RPAREN", + "loc": "121:43-121:44" + }, + { + "token": "COMMA", + "loc": "121:44-121:45" + }, + { + "token": [ + "INT", + "0x8080808080808080UL" + ], + "loc": "121:46-121:66" + }, + { + "token": "COMMA", + "loc": "121:66-121:67" + }, + { + "token": [ + "INT", + "0x0101010101010101UL" + ], + "loc": "121:68-121:88" + }, + { + "token": "RPAREN", + "loc": "121:88-121:89" + }, + { + "token": "COMMA", + "loc": "121:89-121:90" + }, + { + "token": "NEWLINE", + "loc": "121:90-121:91" + }, + { + "token": "RPAREN", + "loc": "122:3-122:4" + }, + { + "token": "NEWLINE", + "loc": "122:4-122:5" + }, + { + "token": "RBRACE", + "loc": "123:1-123:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "123:2-123:2" + }, + { + "token": "NEWLINE", + "loc": "123:2-123:3" + }, + { + "token": "NEWLINE", + "loc": "124:1-124:2" + }, + { + "token": [ + "ATTRIBUTE", + { + "id": "intrinsic", + "dot_id": "", + "raw_payload": "(\"%v128.i16x8_add\")" + } + ], + "loc": "125:1-125:30" + }, + { + "token": "NEWLINE", + "loc": "125:30-125:31" + }, + { + "token": "FN", + "loc": "126:1-126:3" + }, + { + "token": [ + "LIDENT", + "i16x8_add" + ], + "loc": "126:4-126:13" + }, + { + "token": "LPAREN", + "loc": "126:13-126:14" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "126:14-126:19" + }, + { + "token": "COLON", + "loc": "126:20-126:21" + }, + { + "token": [ + "UIDENT", + "V128" + ], + "loc": "126:22-126:26" + }, + { + "token": "COMMA", + "loc": "126:26-126:27" + }, + { + "token": [ + "LIDENT", + "other" + ], + "loc": "126:28-126:33" + }, + { + "token": "COLON", + "loc": "126:34-126:35" + }, + { + "token": [ + "UIDENT", + "V128" + ], + "loc": "126:36-126:40" + }, + { + "token": "RPAREN", + "loc": "126:40-126:41" + }, + { + "token": "THIN_ARROW", + "loc": "126:42-126:44" + }, + { + "token": [ + "UIDENT", + "V128" + ], + "loc": "126:45-126:49" + }, + { + "token": "LBRACE", + "loc": "126:50-126:51" + }, + { + "token": "NEWLINE", + "loc": "126:51-126:52" + }, + { + "token": [ + "LIDENT", + "v128_make" + ], + "loc": "127:3-127:12" + }, + { + "token": "LPAREN", + "loc": "127:12-127:13" + }, + { + "token": "NEWLINE", + "loc": "127:13-127:14" + }, + { + "token": [ + "LIDENT", + "swar_add" + ], + "loc": "128:5-128:13" + }, + { + "token": "LPAREN", + "loc": "128:13-128:14" + }, + { + "token": [ + "LIDENT", + "v128_lo" + ], + "loc": "128:14-128:21" + }, + { + "token": "LPAREN", + "loc": "128:21-128:22" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "128:22-128:27" + }, + { + "token": "RPAREN", + "loc": "128:27-128:28" + }, + { + "token": "COMMA", + "loc": "128:28-128:29" + }, + { + "token": [ + "LIDENT", + "v128_lo" + ], + "loc": "128:30-128:37" + }, + { + "token": "LPAREN", + "loc": "128:37-128:38" + }, + { + "token": [ + "LIDENT", + "other" + ], + "loc": "128:38-128:43" + }, + { + "token": "RPAREN", + "loc": "128:43-128:44" + }, + { + "token": "COMMA", + "loc": "128:44-128:45" + }, + { + "token": [ + "INT", + "0x8000800080008000UL" + ], + "loc": "128:46-128:66" + }, + { + "token": "RPAREN", + "loc": "128:66-128:67" + }, + { + "token": "COMMA", + "loc": "128:67-128:68" + }, + { + "token": "NEWLINE", + "loc": "128:68-128:69" + }, + { + "token": [ + "LIDENT", + "swar_add" + ], + "loc": "129:5-129:13" + }, + { + "token": "LPAREN", + "loc": "129:13-129:14" + }, + { + "token": [ + "LIDENT", + "v128_hi" + ], + "loc": "129:14-129:21" + }, + { + "token": "LPAREN", + "loc": "129:21-129:22" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "129:22-129:27" + }, + { + "token": "RPAREN", + "loc": "129:27-129:28" + }, + { + "token": "COMMA", + "loc": "129:28-129:29" + }, + { + "token": [ + "LIDENT", + "v128_hi" + ], + "loc": "129:30-129:37" + }, + { + "token": "LPAREN", + "loc": "129:37-129:38" + }, + { + "token": [ + "LIDENT", + "other" + ], + "loc": "129:38-129:43" + }, + { + "token": "RPAREN", + "loc": "129:43-129:44" + }, + { + "token": "COMMA", + "loc": "129:44-129:45" + }, + { + "token": [ + "INT", + "0x8000800080008000UL" + ], + "loc": "129:46-129:66" + }, + { + "token": "RPAREN", + "loc": "129:66-129:67" + }, + { + "token": "COMMA", + "loc": "129:67-129:68" + }, + { + "token": "NEWLINE", + "loc": "129:68-129:69" + }, + { + "token": "RPAREN", + "loc": "130:3-130:4" + }, + { + "token": "NEWLINE", + "loc": "130:4-130:5" + }, + { + "token": "RBRACE", + "loc": "131:1-131:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "131:2-131:2" + }, + { + "token": "NEWLINE", + "loc": "131:2-131:3" + }, + { + "token": "NEWLINE", + "loc": "132:1-132:2" + }, + { + "token": [ + "ATTRIBUTE", + { + "id": "intrinsic", + "dot_id": "", + "raw_payload": "(\"%v128.i16x8_sub\")" + } + ], + "loc": "133:1-133:30" + }, + { + "token": "NEWLINE", + "loc": "133:30-133:31" + }, + { + "token": "FN", + "loc": "134:1-134:3" + }, + { + "token": [ + "LIDENT", + "i16x8_sub" + ], + "loc": "134:4-134:13" + }, + { + "token": "LPAREN", + "loc": "134:13-134:14" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "134:14-134:19" + }, + { + "token": "COLON", + "loc": "134:20-134:21" + }, + { + "token": [ + "UIDENT", + "V128" + ], + "loc": "134:22-134:26" + }, + { + "token": "COMMA", + "loc": "134:26-134:27" + }, + { + "token": [ + "LIDENT", + "other" + ], + "loc": "134:28-134:33" + }, + { + "token": "COLON", + "loc": "134:34-134:35" + }, + { + "token": [ + "UIDENT", + "V128" + ], + "loc": "134:36-134:40" + }, + { + "token": "RPAREN", + "loc": "134:40-134:41" + }, + { + "token": "THIN_ARROW", + "loc": "134:42-134:44" + }, + { + "token": [ + "UIDENT", + "V128" + ], + "loc": "134:45-134:49" + }, + { + "token": "LBRACE", + "loc": "134:50-134:51" + }, + { + "token": "NEWLINE", + "loc": "134:51-134:52" + }, + { + "token": [ + "LIDENT", + "v128_make" + ], + "loc": "135:3-135:12" + }, + { + "token": "LPAREN", + "loc": "135:12-135:13" + }, + { + "token": "NEWLINE", + "loc": "135:13-135:14" + }, + { + "token": [ + "LIDENT", + "swar_sub" + ], + "loc": "136:5-136:13" + }, + { + "token": "LPAREN", + "loc": "136:13-136:14" + }, + { + "token": [ + "LIDENT", + "v128_lo" + ], + "loc": "136:14-136:21" + }, + { + "token": "LPAREN", + "loc": "136:21-136:22" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "136:22-136:27" + }, + { + "token": "RPAREN", + "loc": "136:27-136:28" + }, + { + "token": "COMMA", + "loc": "136:28-136:29" + }, + { + "token": [ + "LIDENT", + "v128_lo" + ], + "loc": "136:30-136:37" + }, + { + "token": "LPAREN", + "loc": "136:37-136:38" + }, + { + "token": [ + "LIDENT", + "other" + ], + "loc": "136:38-136:43" + }, + { + "token": "RPAREN", + "loc": "136:43-136:44" + }, + { + "token": "COMMA", + "loc": "136:44-136:45" + }, + { + "token": [ + "INT", + "0x8000800080008000UL" + ], + "loc": "136:46-136:66" + }, + { + "token": "COMMA", + "loc": "136:66-136:67" + }, + { + "token": [ + "INT", + "0x0001000100010001UL" + ], + "loc": "136:68-136:88" + }, + { + "token": "RPAREN", + "loc": "136:88-136:89" + }, + { + "token": "COMMA", + "loc": "136:89-136:90" + }, + { + "token": "NEWLINE", + "loc": "136:90-136:91" + }, + { + "token": [ + "LIDENT", + "swar_sub" + ], + "loc": "137:5-137:13" + }, + { + "token": "LPAREN", + "loc": "137:13-137:14" + }, + { + "token": [ + "LIDENT", + "v128_hi" + ], + "loc": "137:14-137:21" + }, + { + "token": "LPAREN", + "loc": "137:21-137:22" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "137:22-137:27" + }, + { + "token": "RPAREN", + "loc": "137:27-137:28" + }, + { + "token": "COMMA", + "loc": "137:28-137:29" + }, + { + "token": [ + "LIDENT", + "v128_hi" + ], + "loc": "137:30-137:37" + }, + { + "token": "LPAREN", + "loc": "137:37-137:38" + }, + { + "token": [ + "LIDENT", + "other" + ], + "loc": "137:38-137:43" + }, + { + "token": "RPAREN", + "loc": "137:43-137:44" + }, + { + "token": "COMMA", + "loc": "137:44-137:45" + }, + { + "token": [ + "INT", + "0x8000800080008000UL" + ], + "loc": "137:46-137:66" + }, + { + "token": "COMMA", + "loc": "137:66-137:67" + }, + { + "token": [ + "INT", + "0x0001000100010001UL" + ], + "loc": "137:68-137:88" + }, + { + "token": "RPAREN", + "loc": "137:88-137:89" + }, + { + "token": "COMMA", + "loc": "137:89-137:90" + }, + { + "token": "NEWLINE", + "loc": "137:90-137:91" + }, + { + "token": "RPAREN", + "loc": "138:3-138:4" + }, + { + "token": "NEWLINE", + "loc": "138:4-138:5" + }, + { + "token": "RBRACE", + "loc": "139:1-139:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "139:2-139:2" + }, + { + "token": "NEWLINE", + "loc": "139:2-139:3" + }, + { + "token": "NEWLINE", + "loc": "140:1-140:2" + }, + { + "token": [ + "ATTRIBUTE", + { + "id": "intrinsic", + "dot_id": "", + "raw_payload": "(\"%v128.i32x4_add\")" + } + ], + "loc": "141:1-141:30" + }, + { + "token": "NEWLINE", + "loc": "141:30-141:31" + }, + { + "token": "FN", + "loc": "142:1-142:3" + }, + { + "token": [ + "LIDENT", + "i32x4_add" + ], + "loc": "142:4-142:13" + }, + { + "token": "LPAREN", + "loc": "142:13-142:14" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "142:14-142:19" + }, + { + "token": "COLON", + "loc": "142:20-142:21" + }, + { + "token": [ + "UIDENT", + "V128" + ], + "loc": "142:22-142:26" + }, + { + "token": "COMMA", + "loc": "142:26-142:27" + }, + { + "token": [ + "LIDENT", + "other" + ], + "loc": "142:28-142:33" + }, + { + "token": "COLON", + "loc": "142:34-142:35" + }, + { + "token": [ + "UIDENT", + "V128" + ], + "loc": "142:36-142:40" + }, + { + "token": "RPAREN", + "loc": "142:40-142:41" + }, + { + "token": "THIN_ARROW", + "loc": "142:42-142:44" + }, + { + "token": [ + "UIDENT", + "V128" + ], + "loc": "142:45-142:49" + }, + { + "token": "LBRACE", + "loc": "142:50-142:51" + }, + { + "token": "NEWLINE", + "loc": "142:51-142:52" + }, + { + "token": [ + "LIDENT", + "v128_make" + ], + "loc": "143:3-143:12" + }, + { + "token": "LPAREN", + "loc": "143:12-143:13" + }, + { + "token": "NEWLINE", + "loc": "143:13-143:14" + }, + { + "token": [ + "LIDENT", + "swar_add" + ], + "loc": "144:5-144:13" + }, + { + "token": "LPAREN", + "loc": "144:13-144:14" + }, + { + "token": [ + "LIDENT", + "v128_lo" + ], + "loc": "144:14-144:21" + }, + { + "token": "LPAREN", + "loc": "144:21-144:22" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "144:22-144:27" + }, + { + "token": "RPAREN", + "loc": "144:27-144:28" + }, + { + "token": "COMMA", + "loc": "144:28-144:29" + }, + { + "token": [ + "LIDENT", + "v128_lo" + ], + "loc": "144:30-144:37" + }, + { + "token": "LPAREN", + "loc": "144:37-144:38" + }, + { + "token": [ + "LIDENT", + "other" + ], + "loc": "144:38-144:43" + }, + { + "token": "RPAREN", + "loc": "144:43-144:44" + }, + { + "token": "COMMA", + "loc": "144:44-144:45" + }, + { + "token": [ + "INT", + "0x8000000080000000UL" + ], + "loc": "144:46-144:66" + }, + { + "token": "RPAREN", + "loc": "144:66-144:67" + }, + { + "token": "COMMA", + "loc": "144:67-144:68" + }, + { + "token": "NEWLINE", + "loc": "144:68-144:69" + }, + { + "token": [ + "LIDENT", + "swar_add" + ], + "loc": "145:5-145:13" + }, + { + "token": "LPAREN", + "loc": "145:13-145:14" + }, + { + "token": [ + "LIDENT", + "v128_hi" + ], + "loc": "145:14-145:21" + }, + { + "token": "LPAREN", + "loc": "145:21-145:22" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "145:22-145:27" + }, + { + "token": "RPAREN", + "loc": "145:27-145:28" + }, + { + "token": "COMMA", + "loc": "145:28-145:29" + }, + { + "token": [ + "LIDENT", + "v128_hi" + ], + "loc": "145:30-145:37" + }, + { + "token": "LPAREN", + "loc": "145:37-145:38" + }, + { + "token": [ + "LIDENT", + "other" + ], + "loc": "145:38-145:43" + }, + { + "token": "RPAREN", + "loc": "145:43-145:44" + }, + { + "token": "COMMA", + "loc": "145:44-145:45" + }, + { + "token": [ + "INT", + "0x8000000080000000UL" + ], + "loc": "145:46-145:66" + }, + { + "token": "RPAREN", + "loc": "145:66-145:67" + }, + { + "token": "COMMA", + "loc": "145:67-145:68" + }, + { + "token": "NEWLINE", + "loc": "145:68-145:69" + }, + { + "token": "RPAREN", + "loc": "146:3-146:4" + }, + { + "token": "NEWLINE", + "loc": "146:4-146:5" + }, + { + "token": "RBRACE", + "loc": "147:1-147:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "147:2-147:2" + }, + { + "token": "NEWLINE", + "loc": "147:2-147:3" + }, + { + "token": "NEWLINE", + "loc": "148:1-148:2" + }, + { + "token": [ + "ATTRIBUTE", + { + "id": "intrinsic", + "dot_id": "", + "raw_payload": "(\"%v128.i32x4_sub\")" + } + ], + "loc": "149:1-149:30" + }, + { + "token": "NEWLINE", + "loc": "149:30-149:31" + }, + { + "token": "FN", + "loc": "150:1-150:3" + }, + { + "token": [ + "LIDENT", + "i32x4_sub" + ], + "loc": "150:4-150:13" + }, + { + "token": "LPAREN", + "loc": "150:13-150:14" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "150:14-150:19" + }, + { + "token": "COLON", + "loc": "150:20-150:21" + }, + { + "token": [ + "UIDENT", + "V128" + ], + "loc": "150:22-150:26" + }, + { + "token": "COMMA", + "loc": "150:26-150:27" + }, + { + "token": [ + "LIDENT", + "other" + ], + "loc": "150:28-150:33" + }, + { + "token": "COLON", + "loc": "150:34-150:35" + }, + { + "token": [ + "UIDENT", + "V128" + ], + "loc": "150:36-150:40" + }, + { + "token": "RPAREN", + "loc": "150:40-150:41" + }, + { + "token": "THIN_ARROW", + "loc": "150:42-150:44" + }, + { + "token": [ + "UIDENT", + "V128" + ], + "loc": "150:45-150:49" + }, + { + "token": "LBRACE", + "loc": "150:50-150:51" + }, + { + "token": "NEWLINE", + "loc": "150:51-150:52" + }, + { + "token": [ + "LIDENT", + "v128_make" + ], + "loc": "151:3-151:12" + }, + { + "token": "LPAREN", + "loc": "151:12-151:13" + }, + { + "token": "NEWLINE", + "loc": "151:13-151:14" + }, + { + "token": [ + "LIDENT", + "swar_sub" + ], + "loc": "152:5-152:13" + }, + { + "token": "LPAREN", + "loc": "152:13-152:14" + }, + { + "token": [ + "LIDENT", + "v128_lo" + ], + "loc": "152:14-152:21" + }, + { + "token": "LPAREN", + "loc": "152:21-152:22" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "152:22-152:27" + }, + { + "token": "RPAREN", + "loc": "152:27-152:28" + }, + { + "token": "COMMA", + "loc": "152:28-152:29" + }, + { + "token": [ + "LIDENT", + "v128_lo" + ], + "loc": "152:30-152:37" + }, + { + "token": "LPAREN", + "loc": "152:37-152:38" + }, + { + "token": [ + "LIDENT", + "other" + ], + "loc": "152:38-152:43" + }, + { + "token": "RPAREN", + "loc": "152:43-152:44" + }, + { + "token": "COMMA", + "loc": "152:44-152:45" + }, + { + "token": [ + "INT", + "0x8000000080000000UL" + ], + "loc": "152:46-152:66" + }, + { + "token": "COMMA", + "loc": "152:66-152:67" + }, + { + "token": [ + "INT", + "0x0000000100000001UL" + ], + "loc": "152:68-152:88" + }, + { + "token": "RPAREN", + "loc": "152:88-152:89" + }, + { + "token": "COMMA", + "loc": "152:89-152:90" + }, + { + "token": "NEWLINE", + "loc": "152:90-152:91" + }, + { + "token": [ + "LIDENT", + "swar_sub" + ], + "loc": "153:5-153:13" + }, + { + "token": "LPAREN", + "loc": "153:13-153:14" + }, + { + "token": [ + "LIDENT", + "v128_hi" + ], + "loc": "153:14-153:21" + }, + { + "token": "LPAREN", + "loc": "153:21-153:22" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "153:22-153:27" + }, + { + "token": "RPAREN", + "loc": "153:27-153:28" + }, + { + "token": "COMMA", + "loc": "153:28-153:29" + }, + { + "token": [ + "LIDENT", + "v128_hi" + ], + "loc": "153:30-153:37" + }, + { + "token": "LPAREN", + "loc": "153:37-153:38" + }, + { + "token": [ + "LIDENT", + "other" + ], + "loc": "153:38-153:43" + }, + { + "token": "RPAREN", + "loc": "153:43-153:44" + }, + { + "token": "COMMA", + "loc": "153:44-153:45" + }, + { + "token": [ + "INT", + "0x8000000080000000UL" + ], + "loc": "153:46-153:66" + }, + { + "token": "COMMA", + "loc": "153:66-153:67" + }, + { + "token": [ + "INT", + "0x0000000100000001UL" + ], + "loc": "153:68-153:88" + }, + { + "token": "RPAREN", + "loc": "153:88-153:89" + }, + { + "token": "COMMA", + "loc": "153:89-153:90" + }, + { + "token": "NEWLINE", + "loc": "153:90-153:91" + }, + { + "token": "RPAREN", + "loc": "154:3-154:4" + }, + { + "token": "NEWLINE", + "loc": "154:4-154:5" + }, + { + "token": "RBRACE", + "loc": "155:1-155:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "155:2-155:2" + }, + { + "token": "NEWLINE", + "loc": "155:2-155:3" + }, + { + "token": "NEWLINE", + "loc": "156:1-156:2" + }, + { + "token": [ + "ATTRIBUTE", + { + "id": "intrinsic", + "dot_id": "", + "raw_payload": "(\"%v128.i32x4_extract_lane\")" + } + ], + "loc": "157:1-157:39" + }, + { + "token": "NEWLINE", + "loc": "157:39-157:40" + }, + { + "token": "FN", + "loc": "158:1-158:3" + }, + { + "token": [ + "LIDENT", + "i32x4_extract_lane" + ], + "loc": "158:4-158:22" + }, + { + "token": "LPAREN", + "loc": "158:22-158:23" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "158:23-158:28" + }, + { + "token": "COLON", + "loc": "158:29-158:30" + }, + { + "token": [ + "UIDENT", + "V128" + ], + "loc": "158:31-158:35" + }, + { + "token": "COMMA", + "loc": "158:35-158:36" + }, + { + "token": [ + "LIDENT", + "lane" + ], + "loc": "158:37-158:41" + }, + { + "token": "COLON", + "loc": "158:42-158:43" + }, + { + "token": [ + "UIDENT", + "Int" + ], + "loc": "158:44-158:47" + }, + { + "token": "RPAREN", + "loc": "158:47-158:48" + }, + { + "token": "THIN_ARROW", + "loc": "158:49-158:51" + }, + { + "token": [ + "UIDENT", + "Int" + ], + "loc": "158:52-158:55" + }, + { + "token": "LBRACE", + "loc": "158:56-158:57" + }, + { + "token": "NEWLINE", + "loc": "158:57-158:58" + }, + { + "token": "LET", + "loc": "159:3-159:6" + }, + { + "token": [ + "LIDENT", + "word" + ], + "loc": "159:7-159:11" + }, + { + "token": "EQUAL", + "loc": "159:12-159:13" + }, + { + "token": "IF", + "loc": "159:14-159:16" + }, + { + "token": [ + "LIDENT", + "lane" + ], + "loc": "159:17-159:21" + }, + { + "token": [ + "INFIX1", + "<" + ], + "loc": "159:22-159:23" + }, + { + "token": [ + "INT", + "2" + ], + "loc": "159:24-159:25" + }, + { + "token": "LBRACE", + "loc": "159:26-159:27" + }, + { + "token": [ + "LIDENT", + "v128_lo" + ], + "loc": "159:28-159:35" + }, + { + "token": "LPAREN", + "loc": "159:35-159:36" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "159:36-159:41" + }, + { + "token": "RPAREN", + "loc": "159:41-159:42" + }, + { + "token": "RBRACE", + "loc": "159:43-159:44" + }, + { + "token": "ELSE", + "loc": "159:45-159:49" + }, + { + "token": "LBRACE", + "loc": "159:50-159:51" + }, + { + "token": [ + "LIDENT", + "v128_hi" + ], + "loc": "159:52-159:59" + }, + { + "token": "LPAREN", + "loc": "159:59-159:60" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "159:60-159:65" + }, + { + "token": "RPAREN", + "loc": "159:65-159:66" + }, + { + "token": "RBRACE", + "loc": "159:67-159:68" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "159:68-159:68" + }, + { + "token": "NEWLINE", + "loc": "159:68-159:69" + }, + { + "token": "LPAREN", + "loc": "160:3-160:4" + }, + { + "token": [ + "LIDENT", + "word" + ], + "loc": "160:4-160:8" + }, + { + "token": [ + "INFIX2", + ">>" + ], + "loc": "160:9-160:11" + }, + { + "token": "LPAREN", + "loc": "160:12-160:13" + }, + { + "token": [ + "LIDENT", + "lane" + ], + "loc": "160:13-160:17" + }, + { + "token": [ + "INFIX3", + "%" + ], + "loc": "160:18-160:19" + }, + { + "token": [ + "INT", + "2" + ], + "loc": "160:20-160:21" + }, + { + "token": [ + "INFIX3", + "*" + ], + "loc": "160:22-160:23" + }, + { + "token": [ + "INT", + "32" + ], + "loc": "160:24-160:26" + }, + { + "token": "RPAREN", + "loc": "160:26-160:27" + }, + { + "token": "RPAREN", + "loc": "160:27-160:28" + }, + { + "token": [ + "DOT_LIDENT", + "land" + ], + "loc": "160:29-160:33" + }, + { + "token": "LPAREN", + "loc": "160:33-160:34" + }, + { + "token": [ + "INT", + "0xffffffffUL" + ], + "loc": "160:34-160:46" + }, + { + "token": "RPAREN", + "loc": "160:46-160:47" + }, + { + "token": [ + "DOT_LIDENT", + "reinterpret_as_int64" + ], + "loc": "160:48-160:68" + }, + { + "token": "LPAREN", + "loc": "160:68-160:69" + }, + { + "token": "RPAREN", + "loc": "160:69-160:70" + }, + { + "token": [ + "DOT_LIDENT", + "to_int" + ], + "loc": "160:71-160:77" + }, + { + "token": "LPAREN", + "loc": "160:77-160:78" + }, + { + "token": "RPAREN", + "loc": "160:78-160:79" + }, + { + "token": "NEWLINE", + "loc": "160:79-160:80" + }, + { + "token": "RBRACE", + "loc": "161:1-161:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "161:2-161:2" + }, + { + "token": "NEWLINE", + "loc": "161:2-161:3" + }, + { + "token": "NEWLINE", + "loc": "162:1-162:2" + }, + { + "token": [ + "ATTRIBUTE", + { + "id": "intrinsic", + "dot_id": "", + "raw_payload": "(\"%v128.i32x4_replace_lane\")" + } + ], + "loc": "163:1-163:39" + }, + { + "token": "NEWLINE", + "loc": "163:39-163:40" + }, + { + "token": "FN", + "loc": "164:1-164:3" + }, + { + "token": [ + "LIDENT", + "i32x4_replace_lane" + ], + "loc": "164:4-164:22" + }, + { + "token": "LPAREN", + "loc": "164:22-164:23" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "164:23-164:28" + }, + { + "token": "COLON", + "loc": "164:29-164:30" + }, + { + "token": [ + "UIDENT", + "V128" + ], + "loc": "164:31-164:35" + }, + { + "token": "COMMA", + "loc": "164:35-164:36" + }, + { + "token": [ + "LIDENT", + "replacement" + ], + "loc": "164:37-164:48" + }, + { + "token": "COLON", + "loc": "164:49-164:50" + }, + { + "token": [ + "UIDENT", + "Int" + ], + "loc": "164:51-164:54" + }, + { + "token": "COMMA", + "loc": "164:54-164:55" + }, + { + "token": [ + "LIDENT", + "lane" + ], + "loc": "164:56-164:60" + }, + { + "token": "COLON", + "loc": "164:61-164:62" + }, + { + "token": [ + "UIDENT", + "Int" + ], + "loc": "164:63-164:66" + }, + { + "token": "RPAREN", + "loc": "164:66-164:67" + }, + { + "token": "THIN_ARROW", + "loc": "164:68-164:70" + }, + { + "token": [ + "UIDENT", + "V128" + ], + "loc": "164:71-164:75" + }, + { + "token": "LBRACE", + "loc": "164:76-164:77" + }, + { + "token": "NEWLINE", + "loc": "164:77-164:78" + }, + { + "token": "LET", + "loc": "165:3-165:6" + }, + { + "token": [ + "LIDENT", + "shift" + ], + "loc": "165:7-165:12" + }, + { + "token": "EQUAL", + "loc": "165:13-165:14" + }, + { + "token": [ + "LIDENT", + "lane" + ], + "loc": "165:15-165:19" + }, + { + "token": [ + "INFIX3", + "%" + ], + "loc": "165:20-165:21" + }, + { + "token": [ + "INT", + "2" + ], + "loc": "165:22-165:23" + }, + { + "token": [ + "INFIX3", + "*" + ], + "loc": "165:24-165:25" + }, + { + "token": [ + "INT", + "32" + ], + "loc": "165:26-165:28" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "165:28-165:28" + }, + { + "token": "NEWLINE", + "loc": "165:28-165:29" + }, + { + "token": "LET", + "loc": "166:3-166:6" + }, + { + "token": [ + "LIDENT", + "cleared" + ], + "loc": "166:7-166:14" + }, + { + "token": "EQUAL", + "loc": "166:15-166:16" + }, + { + "token": "LPAREN", + "loc": "166:17-166:18" + }, + { + "token": [ + "INT", + "0xffffffffUL" + ], + "loc": "166:18-166:30" + }, + { + "token": [ + "INFIX2", + "<<" + ], + "loc": "166:31-166:33" + }, + { + "token": [ + "LIDENT", + "shift" + ], + "loc": "166:34-166:39" + }, + { + "token": "RPAREN", + "loc": "166:39-166:40" + }, + { + "token": [ + "DOT_LIDENT", + "lxor" + ], + "loc": "166:41-166:45" + }, + { + "token": "LPAREN", + "loc": "166:45-166:46" + }, + { + "token": [ + "INT", + "0xffffffffffffffffUL" + ], + "loc": "166:46-166:66" + }, + { + "token": "RPAREN", + "loc": "166:66-166:67" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "166:67-166:67" + }, + { + "token": "NEWLINE", + "loc": "166:67-166:68" + }, + { + "token": "LET", + "loc": "167:3-167:6" + }, + { + "token": [ + "LIDENT", + "repl" + ], + "loc": "167:7-167:11" + }, + { + "token": "EQUAL", + "loc": "167:12-167:13" + }, + { + "token": [ + "LIDENT", + "replacement" + ], + "loc": "167:14-167:25" + }, + { + "token": [ + "DOT_LIDENT", + "to_uint64" + ], + "loc": "167:26-167:35" + }, + { + "token": "LPAREN", + "loc": "167:35-167:36" + }, + { + "token": "RPAREN", + "loc": "167:36-167:37" + }, + { + "token": [ + "DOT_LIDENT", + "land" + ], + "loc": "167:38-167:42" + }, + { + "token": "LPAREN", + "loc": "167:42-167:43" + }, + { + "token": [ + "INT", + "0xffffffffUL" + ], + "loc": "167:43-167:55" + }, + { + "token": "RPAREN", + "loc": "167:55-167:56" + }, + { + "token": [ + "INFIX2", + "<<" + ], + "loc": "167:57-167:59" + }, + { + "token": [ + "LIDENT", + "shift" + ], + "loc": "167:60-167:65" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "167:65-167:65" + }, + { + "token": "NEWLINE", + "loc": "167:65-167:66" + }, + { + "token": "IF", + "loc": "168:3-168:5" + }, + { + "token": [ + "LIDENT", + "lane" + ], + "loc": "168:6-168:10" + }, + { + "token": [ + "INFIX1", + "<" + ], + "loc": "168:11-168:12" + }, + { + "token": [ + "INT", + "2" + ], + "loc": "168:13-168:14" + }, + { + "token": "LBRACE", + "loc": "168:15-168:16" + }, + { + "token": "NEWLINE", + "loc": "168:16-168:17" + }, + { + "token": [ + "LIDENT", + "v128_make" + ], + "loc": "169:5-169:14" + }, + { + "token": "LPAREN", + "loc": "169:14-169:15" + }, + { + "token": [ + "LIDENT", + "v128_lo" + ], + "loc": "169:15-169:22" + }, + { + "token": "LPAREN", + "loc": "169:22-169:23" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "169:23-169:28" + }, + { + "token": "RPAREN", + "loc": "169:28-169:29" + }, + { + "token": [ + "DOT_LIDENT", + "land" + ], + "loc": "169:30-169:34" + }, + { + "token": "LPAREN", + "loc": "169:34-169:35" + }, + { + "token": [ + "LIDENT", + "cleared" + ], + "loc": "169:35-169:42" + }, + { + "token": "RPAREN", + "loc": "169:42-169:43" + }, + { + "token": [ + "DOT_LIDENT", + "lor" + ], + "loc": "169:44-169:47" + }, + { + "token": "LPAREN", + "loc": "169:47-169:48" + }, + { + "token": [ + "LIDENT", + "repl" + ], + "loc": "169:48-169:52" + }, + { + "token": "RPAREN", + "loc": "169:52-169:53" + }, + { + "token": "COMMA", + "loc": "169:53-169:54" + }, + { + "token": [ + "LIDENT", + "v128_hi" + ], + "loc": "169:55-169:62" + }, + { + "token": "LPAREN", + "loc": "169:62-169:63" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "169:63-169:68" + }, + { + "token": "RPAREN", + "loc": "169:68-169:69" + }, + { + "token": "RPAREN", + "loc": "169:69-169:70" + }, + { + "token": "NEWLINE", + "loc": "169:70-169:71" + }, + { + "token": "RBRACE", + "loc": "170:3-170:4" + }, + { + "token": "ELSE", + "loc": "170:5-170:9" + }, + { + "token": "LBRACE", + "loc": "170:10-170:11" + }, + { + "token": "NEWLINE", + "loc": "170:11-170:12" + }, + { + "token": [ + "LIDENT", + "v128_make" + ], + "loc": "171:5-171:14" + }, + { + "token": "LPAREN", + "loc": "171:14-171:15" + }, + { + "token": [ + "LIDENT", + "v128_lo" + ], + "loc": "171:15-171:22" + }, + { + "token": "LPAREN", + "loc": "171:22-171:23" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "171:23-171:28" + }, + { + "token": "RPAREN", + "loc": "171:28-171:29" + }, + { + "token": "COMMA", + "loc": "171:29-171:30" + }, + { + "token": [ + "LIDENT", + "v128_hi" + ], + "loc": "171:31-171:38" + }, + { + "token": "LPAREN", + "loc": "171:38-171:39" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "171:39-171:44" + }, + { + "token": "RPAREN", + "loc": "171:44-171:45" + }, + { + "token": [ + "DOT_LIDENT", + "land" + ], + "loc": "171:46-171:50" + }, + { + "token": "LPAREN", + "loc": "171:50-171:51" + }, + { + "token": [ + "LIDENT", + "cleared" + ], + "loc": "171:51-171:58" + }, + { + "token": "RPAREN", + "loc": "171:58-171:59" + }, + { + "token": [ + "DOT_LIDENT", + "lor" + ], + "loc": "171:60-171:63" + }, + { + "token": "LPAREN", + "loc": "171:63-171:64" + }, + { + "token": [ + "LIDENT", + "repl" + ], + "loc": "171:64-171:68" + }, + { + "token": "RPAREN", + "loc": "171:68-171:69" + }, + { + "token": "RPAREN", + "loc": "171:69-171:70" + }, + { + "token": "NEWLINE", + "loc": "171:70-171:71" + }, + { + "token": "RBRACE", + "loc": "172:3-172:4" + }, + { + "token": "NEWLINE", + "loc": "172:4-172:5" + }, + { + "token": "RBRACE", + "loc": "173:1-173:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "173:2-173:2" + }, + { + "token": "NEWLINE", + "loc": "173:2-173:3" + }, + { + "token": "NEWLINE", + "loc": "174:1-174:2" + }, + { + "token": [ + "ATTRIBUTE", + { + "id": "intrinsic", + "dot_id": "", + "raw_payload": "(\"%v128.i64x2_add\")" + } + ], + "loc": "175:1-175:30" + }, + { + "token": "NEWLINE", + "loc": "175:30-175:31" + }, + { + "token": "FN", + "loc": "176:1-176:3" + }, + { + "token": [ + "LIDENT", + "i64x2_add" + ], + "loc": "176:4-176:13" + }, + { + "token": "LPAREN", + "loc": "176:13-176:14" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "176:14-176:19" + }, + { + "token": "COLON", + "loc": "176:20-176:21" + }, + { + "token": [ + "UIDENT", + "V128" + ], + "loc": "176:22-176:26" + }, + { + "token": "COMMA", + "loc": "176:26-176:27" + }, + { + "token": [ + "LIDENT", + "other" + ], + "loc": "176:28-176:33" + }, + { + "token": "COLON", + "loc": "176:34-176:35" + }, + { + "token": [ + "UIDENT", + "V128" + ], + "loc": "176:36-176:40" + }, + { + "token": "RPAREN", + "loc": "176:40-176:41" + }, + { + "token": "THIN_ARROW", + "loc": "176:42-176:44" + }, + { + "token": [ + "UIDENT", + "V128" + ], + "loc": "176:45-176:49" + }, + { + "token": "LBRACE", + "loc": "176:50-176:51" + }, + { + "token": "NEWLINE", + "loc": "176:51-176:52" + }, + { + "token": [ + "LIDENT", + "v128_make" + ], + "loc": "177:3-177:12" + }, + { + "token": "LPAREN", + "loc": "177:12-177:13" + }, + { + "token": [ + "LIDENT", + "v128_lo" + ], + "loc": "177:13-177:20" + }, + { + "token": "LPAREN", + "loc": "177:20-177:21" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "177:21-177:26" + }, + { + "token": "RPAREN", + "loc": "177:26-177:27" + }, + { + "token": "PLUS", + "loc": "177:28-177:29" + }, + { + "token": [ + "LIDENT", + "v128_lo" + ], + "loc": "177:30-177:37" + }, + { + "token": "LPAREN", + "loc": "177:37-177:38" + }, + { + "token": [ + "LIDENT", + "other" + ], + "loc": "177:38-177:43" + }, + { + "token": "RPAREN", + "loc": "177:43-177:44" + }, + { + "token": "COMMA", + "loc": "177:44-177:45" + }, + { + "token": [ + "LIDENT", + "v128_hi" + ], + "loc": "177:46-177:53" + }, + { + "token": "LPAREN", + "loc": "177:53-177:54" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "177:54-177:59" + }, + { + "token": "RPAREN", + "loc": "177:59-177:60" + }, + { + "token": "PLUS", + "loc": "177:61-177:62" + }, + { + "token": [ + "LIDENT", + "v128_hi" + ], + "loc": "177:63-177:70" + }, + { + "token": "LPAREN", + "loc": "177:70-177:71" + }, + { + "token": [ + "LIDENT", + "other" + ], + "loc": "177:71-177:76" + }, + { + "token": "RPAREN", + "loc": "177:76-177:77" + }, + { + "token": "RPAREN", + "loc": "177:77-177:78" + }, + { + "token": "NEWLINE", + "loc": "177:78-177:79" + }, + { + "token": "RBRACE", + "loc": "178:1-178:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "178:2-178:2" + }, + { + "token": "NEWLINE", + "loc": "178:2-178:3" + }, + { + "token": "NEWLINE", + "loc": "179:1-179:2" + }, + { + "token": [ + "ATTRIBUTE", + { + "id": "intrinsic", + "dot_id": "", + "raw_payload": "(\"%v128.i64x2_sub\")" + } + ], + "loc": "180:1-180:30" + }, + { + "token": "NEWLINE", + "loc": "180:30-180:31" + }, + { + "token": "FN", + "loc": "181:1-181:3" + }, + { + "token": [ + "LIDENT", + "i64x2_sub" + ], + "loc": "181:4-181:13" + }, + { + "token": "LPAREN", + "loc": "181:13-181:14" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "181:14-181:19" + }, + { + "token": "COLON", + "loc": "181:20-181:21" + }, + { + "token": [ + "UIDENT", + "V128" + ], + "loc": "181:22-181:26" + }, + { + "token": "COMMA", + "loc": "181:26-181:27" + }, + { + "token": [ + "LIDENT", + "other" + ], + "loc": "181:28-181:33" + }, + { + "token": "COLON", + "loc": "181:34-181:35" + }, + { + "token": [ + "UIDENT", + "V128" + ], + "loc": "181:36-181:40" + }, + { + "token": "RPAREN", + "loc": "181:40-181:41" + }, + { + "token": "THIN_ARROW", + "loc": "181:42-181:44" + }, + { + "token": [ + "UIDENT", + "V128" + ], + "loc": "181:45-181:49" + }, + { + "token": "LBRACE", + "loc": "181:50-181:51" + }, + { + "token": "NEWLINE", + "loc": "181:51-181:52" + }, + { + "token": [ + "LIDENT", + "v128_make" + ], + "loc": "182:3-182:12" + }, + { + "token": "LPAREN", + "loc": "182:12-182:13" + }, + { + "token": [ + "LIDENT", + "v128_lo" + ], + "loc": "182:13-182:20" + }, + { + "token": "LPAREN", + "loc": "182:20-182:21" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "182:21-182:26" + }, + { + "token": "RPAREN", + "loc": "182:26-182:27" + }, + { + "token": "MINUS", + "loc": "182:28-182:29" + }, + { + "token": [ + "LIDENT", + "v128_lo" + ], + "loc": "182:30-182:37" + }, + { + "token": "LPAREN", + "loc": "182:37-182:38" + }, + { + "token": [ + "LIDENT", + "other" + ], + "loc": "182:38-182:43" + }, + { + "token": "RPAREN", + "loc": "182:43-182:44" + }, + { + "token": "COMMA", + "loc": "182:44-182:45" + }, + { + "token": [ + "LIDENT", + "v128_hi" + ], + "loc": "182:46-182:53" + }, + { + "token": "LPAREN", + "loc": "182:53-182:54" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "182:54-182:59" + }, + { + "token": "RPAREN", + "loc": "182:59-182:60" + }, + { + "token": "MINUS", + "loc": "182:61-182:62" + }, + { + "token": [ + "LIDENT", + "v128_hi" + ], + "loc": "182:63-182:70" + }, + { + "token": "LPAREN", + "loc": "182:70-182:71" + }, + { + "token": [ + "LIDENT", + "other" + ], + "loc": "182:71-182:76" + }, + { + "token": "RPAREN", + "loc": "182:76-182:77" + }, + { + "token": "RPAREN", + "loc": "182:77-182:78" + }, + { + "token": "NEWLINE", + "loc": "182:78-182:79" + }, + { + "token": "RBRACE", + "loc": "183:1-183:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "183:2-183:2" + }, + { + "token": "NEWLINE", + "loc": "183:2-183:3" + }, + { + "token": "NEWLINE", + "loc": "184:1-184:2" + }, + { + "token": [ + "ATTRIBUTE", + { + "id": "intrinsic", + "dot_id": "", + "raw_payload": "(\"%v128.i8x16_shuffle\")" + } + ], + "loc": "185:1-185:34" + }, + { + "token": "NEWLINE", + "loc": "185:34-185:35" + }, + { + "token": "FN", + "loc": "186:1-186:3" + }, + { + "token": [ + "LIDENT", + "i8x16_shuffle" + ], + "loc": "186:4-186:17" + }, + { + "token": "LPAREN", + "loc": "186:17-186:18" + }, + { + "token": "NEWLINE", + "loc": "186:18-186:19" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "187:3-187:8" + }, + { + "token": "COLON", + "loc": "187:9-187:10" + }, + { + "token": [ + "UIDENT", + "V128" + ], + "loc": "187:11-187:15" + }, + { + "token": "COMMA", + "loc": "187:15-187:16" + }, + { + "token": "NEWLINE", + "loc": "187:16-187:17" + }, + { + "token": [ + "LIDENT", + "other" + ], + "loc": "188:3-188:8" + }, + { + "token": "COLON", + "loc": "188:9-188:10" + }, + { + "token": [ + "UIDENT", + "V128" + ], + "loc": "188:11-188:15" + }, + { + "token": "COMMA", + "loc": "188:15-188:16" + }, + { + "token": "NEWLINE", + "loc": "188:16-188:17" + }, + { + "token": [ + "LIDENT", + "l0" + ], + "loc": "189:3-189:5" + }, + { + "token": "COLON", + "loc": "189:6-189:7" + }, + { + "token": [ + "UIDENT", + "Int" + ], + "loc": "189:8-189:11" + }, + { + "token": "COMMA", + "loc": "189:11-189:12" + }, + { + "token": "NEWLINE", + "loc": "189:12-189:13" + }, + { + "token": [ + "LIDENT", + "l1" + ], + "loc": "190:3-190:5" + }, + { + "token": "COLON", + "loc": "190:6-190:7" + }, + { + "token": [ + "UIDENT", + "Int" + ], + "loc": "190:8-190:11" + }, + { + "token": "COMMA", + "loc": "190:11-190:12" + }, + { + "token": "NEWLINE", + "loc": "190:12-190:13" + }, + { + "token": [ + "LIDENT", + "l2" + ], + "loc": "191:3-191:5" + }, + { + "token": "COLON", + "loc": "191:6-191:7" + }, + { + "token": [ + "UIDENT", + "Int" + ], + "loc": "191:8-191:11" + }, + { + "token": "COMMA", + "loc": "191:11-191:12" + }, + { + "token": "NEWLINE", + "loc": "191:12-191:13" + }, + { + "token": [ + "LIDENT", + "l3" + ], + "loc": "192:3-192:5" + }, + { + "token": "COLON", + "loc": "192:6-192:7" + }, + { + "token": [ + "UIDENT", + "Int" + ], + "loc": "192:8-192:11" + }, + { + "token": "COMMA", + "loc": "192:11-192:12" + }, + { + "token": "NEWLINE", + "loc": "192:12-192:13" + }, + { + "token": [ + "LIDENT", + "l4" + ], + "loc": "193:3-193:5" + }, + { + "token": "COLON", + "loc": "193:6-193:7" + }, + { + "token": [ + "UIDENT", + "Int" + ], + "loc": "193:8-193:11" + }, + { + "token": "COMMA", + "loc": "193:11-193:12" + }, + { + "token": "NEWLINE", + "loc": "193:12-193:13" + }, + { + "token": [ + "LIDENT", + "l5" + ], + "loc": "194:3-194:5" + }, + { + "token": "COLON", + "loc": "194:6-194:7" + }, + { + "token": [ + "UIDENT", + "Int" + ], + "loc": "194:8-194:11" + }, + { + "token": "COMMA", + "loc": "194:11-194:12" + }, + { + "token": "NEWLINE", + "loc": "194:12-194:13" + }, + { + "token": [ + "LIDENT", + "l6" + ], + "loc": "195:3-195:5" + }, + { + "token": "COLON", + "loc": "195:6-195:7" + }, + { + "token": [ + "UIDENT", + "Int" + ], + "loc": "195:8-195:11" + }, + { + "token": "COMMA", + "loc": "195:11-195:12" + }, + { + "token": "NEWLINE", + "loc": "195:12-195:13" + }, + { + "token": [ + "LIDENT", + "l7" + ], + "loc": "196:3-196:5" + }, + { + "token": "COLON", + "loc": "196:6-196:7" + }, + { + "token": [ + "UIDENT", + "Int" + ], + "loc": "196:8-196:11" + }, + { + "token": "COMMA", + "loc": "196:11-196:12" + }, + { + "token": "NEWLINE", + "loc": "196:12-196:13" + }, + { + "token": [ + "LIDENT", + "l8" + ], + "loc": "197:3-197:5" + }, + { + "token": "COLON", + "loc": "197:6-197:7" + }, + { + "token": [ + "UIDENT", + "Int" + ], + "loc": "197:8-197:11" + }, + { + "token": "COMMA", + "loc": "197:11-197:12" + }, + { + "token": "NEWLINE", + "loc": "197:12-197:13" + }, + { + "token": [ + "LIDENT", + "l9" + ], + "loc": "198:3-198:5" + }, + { + "token": "COLON", + "loc": "198:6-198:7" + }, + { + "token": [ + "UIDENT", + "Int" + ], + "loc": "198:8-198:11" + }, + { + "token": "COMMA", + "loc": "198:11-198:12" + }, + { + "token": "NEWLINE", + "loc": "198:12-198:13" + }, + { + "token": [ + "LIDENT", + "l10" + ], + "loc": "199:3-199:6" + }, + { + "token": "COLON", + "loc": "199:7-199:8" + }, + { + "token": [ + "UIDENT", + "Int" + ], + "loc": "199:9-199:12" + }, + { + "token": "COMMA", + "loc": "199:12-199:13" + }, + { + "token": "NEWLINE", + "loc": "199:13-199:14" + }, + { + "token": [ + "LIDENT", + "l11" + ], + "loc": "200:3-200:6" + }, + { + "token": "COLON", + "loc": "200:7-200:8" + }, + { + "token": [ + "UIDENT", + "Int" + ], + "loc": "200:9-200:12" + }, + { + "token": "COMMA", + "loc": "200:12-200:13" + }, + { + "token": "NEWLINE", + "loc": "200:13-200:14" + }, + { + "token": [ + "LIDENT", + "l12" + ], + "loc": "201:3-201:6" + }, + { + "token": "COLON", + "loc": "201:7-201:8" + }, + { + "token": [ + "UIDENT", + "Int" + ], + "loc": "201:9-201:12" + }, + { + "token": "COMMA", + "loc": "201:12-201:13" + }, + { + "token": "NEWLINE", + "loc": "201:13-201:14" + }, + { + "token": [ + "LIDENT", + "l13" + ], + "loc": "202:3-202:6" + }, + { + "token": "COLON", + "loc": "202:7-202:8" + }, + { + "token": [ + "UIDENT", + "Int" + ], + "loc": "202:9-202:12" + }, + { + "token": "COMMA", + "loc": "202:12-202:13" + }, + { + "token": "NEWLINE", + "loc": "202:13-202:14" + }, + { + "token": [ + "LIDENT", + "l14" + ], + "loc": "203:3-203:6" + }, + { + "token": "COLON", + "loc": "203:7-203:8" + }, + { + "token": [ + "UIDENT", + "Int" + ], + "loc": "203:9-203:12" + }, + { + "token": "COMMA", + "loc": "203:12-203:13" + }, + { + "token": "NEWLINE", + "loc": "203:13-203:14" + }, + { + "token": [ + "LIDENT", + "l15" + ], + "loc": "204:3-204:6" + }, + { + "token": "COLON", + "loc": "204:7-204:8" + }, + { + "token": [ + "UIDENT", + "Int" + ], + "loc": "204:9-204:12" + }, + { + "token": "NEWLINE", + "loc": "204:12-204:13" + }, + { + "token": "RPAREN", + "loc": "205:1-205:2" + }, + { + "token": "THIN_ARROW", + "loc": "205:3-205:5" + }, + { + "token": [ + "UIDENT", + "V128" + ], + "loc": "205:6-205:10" + }, + { + "token": "LBRACE", + "loc": "205:11-205:12" + }, + { + "token": "NEWLINE", + "loc": "205:12-205:13" + }, + { + "token": "FN", + "loc": "206:3-206:5" + }, + { + "token": [ + "LIDENT", + "u8_lane" + ], + "loc": "206:6-206:13" + }, + { + "token": "LPAREN", + "loc": "206:13-206:14" + }, + { + "token": [ + "LIDENT", + "v" + ], + "loc": "206:14-206:15" + }, + { + "token": "COLON", + "loc": "206:16-206:17" + }, + { + "token": [ + "UIDENT", + "V128" + ], + "loc": "206:18-206:22" + }, + { + "token": "COMMA", + "loc": "206:22-206:23" + }, + { + "token": [ + "LIDENT", + "lane" + ], + "loc": "206:24-206:28" + }, + { + "token": "COLON", + "loc": "206:29-206:30" + }, + { + "token": [ + "UIDENT", + "Int" + ], + "loc": "206:31-206:34" + }, + { + "token": "RPAREN", + "loc": "206:34-206:35" + }, + { + "token": "THIN_ARROW", + "loc": "206:36-206:38" + }, + { + "token": [ + "UIDENT", + "UInt64" + ], + "loc": "206:39-206:45" + }, + { + "token": "LBRACE", + "loc": "206:46-206:47" + }, + { + "token": "NEWLINE", + "loc": "206:47-206:48" + }, + { + "token": "LET", + "loc": "207:5-207:8" + }, + { + "token": [ + "LIDENT", + "word" + ], + "loc": "207:9-207:13" + }, + { + "token": "EQUAL", + "loc": "207:14-207:15" + }, + { + "token": "IF", + "loc": "207:16-207:18" + }, + { + "token": [ + "LIDENT", + "lane" + ], + "loc": "207:19-207:23" + }, + { + "token": [ + "INFIX1", + "<" + ], + "loc": "207:24-207:25" + }, + { + "token": [ + "INT", + "8" + ], + "loc": "207:26-207:27" + }, + { + "token": "LBRACE", + "loc": "207:28-207:29" + }, + { + "token": [ + "LIDENT", + "v128_lo" + ], + "loc": "207:30-207:37" + }, + { + "token": "LPAREN", + "loc": "207:37-207:38" + }, + { + "token": [ + "LIDENT", + "v" + ], + "loc": "207:38-207:39" + }, + { + "token": "RPAREN", + "loc": "207:39-207:40" + }, + { + "token": "RBRACE", + "loc": "207:41-207:42" + }, + { + "token": "ELSE", + "loc": "207:43-207:47" + }, + { + "token": "LBRACE", + "loc": "207:48-207:49" + }, + { + "token": [ + "LIDENT", + "v128_hi" + ], + "loc": "207:50-207:57" + }, + { + "token": "LPAREN", + "loc": "207:57-207:58" + }, + { + "token": [ + "LIDENT", + "v" + ], + "loc": "207:58-207:59" + }, + { + "token": "RPAREN", + "loc": "207:59-207:60" + }, + { + "token": "RBRACE", + "loc": "207:61-207:62" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "207:62-207:62" + }, + { + "token": "NEWLINE", + "loc": "207:62-207:63" + }, + { + "token": "LPAREN", + "loc": "208:5-208:6" + }, + { + "token": [ + "LIDENT", + "word" + ], + "loc": "208:6-208:10" + }, + { + "token": [ + "INFIX2", + ">>" + ], + "loc": "208:11-208:13" + }, + { + "token": "LPAREN", + "loc": "208:14-208:15" + }, + { + "token": [ + "LIDENT", + "lane" + ], + "loc": "208:15-208:19" + }, + { + "token": [ + "INFIX3", + "%" + ], + "loc": "208:20-208:21" + }, + { + "token": [ + "INT", + "8" + ], + "loc": "208:22-208:23" + }, + { + "token": [ + "INFIX3", + "*" + ], + "loc": "208:24-208:25" + }, + { + "token": [ + "INT", + "8" + ], + "loc": "208:26-208:27" + }, + { + "token": "RPAREN", + "loc": "208:27-208:28" + }, + { + "token": "RPAREN", + "loc": "208:28-208:29" + }, + { + "token": [ + "DOT_LIDENT", + "land" + ], + "loc": "208:30-208:34" + }, + { + "token": "LPAREN", + "loc": "208:34-208:35" + }, + { + "token": [ + "INT", + "0xffUL" + ], + "loc": "208:35-208:41" + }, + { + "token": "RPAREN", + "loc": "208:41-208:42" + }, + { + "token": "NEWLINE", + "loc": "208:42-208:43" + }, + { + "token": "RBRACE", + "loc": "209:3-209:4" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "209:4-209:4" + }, + { + "token": "NEWLINE", + "loc": "209:4-209:5" + }, + { + "token": "NEWLINE", + "loc": "210:1-210:2" + }, + { + "token": "FN", + "loc": "211:3-211:5" + }, + { + "token": [ + "LIDENT", + "pick" + ], + "loc": "211:6-211:10" + }, + { + "token": "LPAREN", + "loc": "211:10-211:11" + }, + { + "token": [ + "LIDENT", + "idx" + ], + "loc": "211:11-211:14" + }, + { + "token": "COLON", + "loc": "211:15-211:16" + }, + { + "token": [ + "UIDENT", + "Int" + ], + "loc": "211:17-211:20" + }, + { + "token": "RPAREN", + "loc": "211:20-211:21" + }, + { + "token": "THIN_ARROW", + "loc": "211:22-211:24" + }, + { + "token": [ + "UIDENT", + "UInt64" + ], + "loc": "211:25-211:31" + }, + { + "token": "LBRACE", + "loc": "211:32-211:33" + }, + { + "token": "NEWLINE", + "loc": "211:33-211:34" + }, + { + "token": "IF", + "loc": "212:5-212:7" + }, + { + "token": [ + "LIDENT", + "idx" + ], + "loc": "212:8-212:11" + }, + { + "token": [ + "INFIX1", + "<" + ], + "loc": "212:12-212:13" + }, + { + "token": [ + "INT", + "16" + ], + "loc": "212:14-212:16" + }, + { + "token": "LBRACE", + "loc": "212:17-212:18" + }, + { + "token": "NEWLINE", + "loc": "212:18-212:19" + }, + { + "token": [ + "LIDENT", + "u8_lane" + ], + "loc": "213:7-213:14" + }, + { + "token": "LPAREN", + "loc": "213:14-213:15" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "213:15-213:20" + }, + { + "token": "COMMA", + "loc": "213:20-213:21" + }, + { + "token": [ + "LIDENT", + "idx" + ], + "loc": "213:22-213:25" + }, + { + "token": "RPAREN", + "loc": "213:25-213:26" + }, + { + "token": "NEWLINE", + "loc": "213:26-213:27" + }, + { + "token": "RBRACE", + "loc": "214:5-214:6" + }, + { + "token": "ELSE", + "loc": "214:7-214:11" + }, + { + "token": "LBRACE", + "loc": "214:12-214:13" + }, + { + "token": "NEWLINE", + "loc": "214:13-214:14" + }, + { + "token": [ + "LIDENT", + "u8_lane" + ], + "loc": "215:7-215:14" + }, + { + "token": "LPAREN", + "loc": "215:14-215:15" + }, + { + "token": [ + "LIDENT", + "other" + ], + "loc": "215:15-215:20" + }, + { + "token": "COMMA", + "loc": "215:20-215:21" + }, + { + "token": [ + "LIDENT", + "idx" + ], + "loc": "215:22-215:25" + }, + { + "token": "MINUS", + "loc": "215:26-215:27" + }, + { + "token": [ + "INT", + "16" + ], + "loc": "215:28-215:30" + }, + { + "token": "RPAREN", + "loc": "215:30-215:31" + }, + { + "token": "NEWLINE", + "loc": "215:31-215:32" + }, + { + "token": "RBRACE", + "loc": "216:5-216:6" + }, + { + "token": "NEWLINE", + "loc": "216:6-216:7" + }, + { + "token": "RBRACE", + "loc": "217:3-217:4" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "217:4-217:4" + }, + { + "token": "NEWLINE", + "loc": "217:4-217:5" + }, + { + "token": "NEWLINE", + "loc": "218:1-218:2" + }, + { + "token": "LET", + "loc": "219:3-219:6" + }, + { + "token": [ + "LIDENT", + "lanes" + ], + "loc": "219:7-219:12" + }, + { + "token": "COLON", + "loc": "219:13-219:14" + }, + { + "token": [ + "UIDENT", + "FixedArray" + ], + "loc": "219:15-219:25" + }, + { + "token": "LBRACKET", + "loc": "219:25-219:26" + }, + { + "token": [ + "UIDENT", + "Int" + ], + "loc": "219:26-219:29" + }, + { + "token": "RBRACKET", + "loc": "219:29-219:30" + }, + { + "token": "EQUAL", + "loc": "219:31-219:32" + }, + { + "token": "LBRACKET", + "loc": "219:33-219:34" + }, + { + "token": "NEWLINE", + "loc": "219:34-219:35" + }, + { + "token": [ + "LIDENT", + "l0" + ], + "loc": "220:5-220:7" + }, + { + "token": "COMMA", + "loc": "220:7-220:8" + }, + { + "token": [ + "LIDENT", + "l1" + ], + "loc": "220:9-220:11" + }, + { + "token": "COMMA", + "loc": "220:11-220:12" + }, + { + "token": [ + "LIDENT", + "l2" + ], + "loc": "220:13-220:15" + }, + { + "token": "COMMA", + "loc": "220:15-220:16" + }, + { + "token": [ + "LIDENT", + "l3" + ], + "loc": "220:17-220:19" + }, + { + "token": "COMMA", + "loc": "220:19-220:20" + }, + { + "token": [ + "LIDENT", + "l4" + ], + "loc": "220:21-220:23" + }, + { + "token": "COMMA", + "loc": "220:23-220:24" + }, + { + "token": [ + "LIDENT", + "l5" + ], + "loc": "220:25-220:27" + }, + { + "token": "COMMA", + "loc": "220:27-220:28" + }, + { + "token": [ + "LIDENT", + "l6" + ], + "loc": "220:29-220:31" + }, + { + "token": "COMMA", + "loc": "220:31-220:32" + }, + { + "token": [ + "LIDENT", + "l7" + ], + "loc": "220:33-220:35" + }, + { + "token": "COMMA", + "loc": "220:35-220:36" + }, + { + "token": [ + "LIDENT", + "l8" + ], + "loc": "220:37-220:39" + }, + { + "token": "COMMA", + "loc": "220:39-220:40" + }, + { + "token": [ + "LIDENT", + "l9" + ], + "loc": "220:41-220:43" + }, + { + "token": "COMMA", + "loc": "220:43-220:44" + }, + { + "token": [ + "LIDENT", + "l10" + ], + "loc": "220:45-220:48" + }, + { + "token": "COMMA", + "loc": "220:48-220:49" + }, + { + "token": [ + "LIDENT", + "l11" + ], + "loc": "220:50-220:53" + }, + { + "token": "COMMA", + "loc": "220:53-220:54" + }, + { + "token": [ + "LIDENT", + "l12" + ], + "loc": "220:55-220:58" + }, + { + "token": "COMMA", + "loc": "220:58-220:59" + }, + { + "token": [ + "LIDENT", + "l13" + ], + "loc": "220:60-220:63" + }, + { + "token": "COMMA", + "loc": "220:63-220:64" + }, + { + "token": [ + "LIDENT", + "l14" + ], + "loc": "220:65-220:68" + }, + { + "token": "COMMA", + "loc": "220:68-220:69" + }, + { + "token": [ + "LIDENT", + "l15" + ], + "loc": "220:70-220:73" + }, + { + "token": "COMMA", + "loc": "220:73-220:74" + }, + { + "token": "NEWLINE", + "loc": "220:74-220:75" + }, + { + "token": "RBRACKET", + "loc": "221:3-221:4" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "221:4-221:4" + }, + { + "token": "NEWLINE", + "loc": "221:4-221:5" + }, + { + "token": "LET", + "loc": "222:3-222:6" + }, + { + "token": "MUTABLE", + "loc": "222:7-222:10" + }, + { + "token": [ + "LIDENT", + "lo" + ], + "loc": "222:11-222:13" + }, + { + "token": "EQUAL", + "loc": "222:14-222:15" + }, + { + "token": [ + "INT", + "0UL" + ], + "loc": "222:16-222:19" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "222:19-222:19" + }, + { + "token": "NEWLINE", + "loc": "222:19-222:20" + }, + { + "token": "LET", + "loc": "223:3-223:6" + }, + { + "token": "MUTABLE", + "loc": "223:7-223:10" + }, + { + "token": [ + "LIDENT", + "hi" + ], + "loc": "223:11-223:13" + }, + { + "token": "EQUAL", + "loc": "223:14-223:15" + }, + { + "token": [ + "INT", + "0UL" + ], + "loc": "223:16-223:19" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "223:19-223:19" + }, + { + "token": "NEWLINE", + "loc": "223:19-223:20" + }, + { + "token": "FOR", + "loc": "224:3-224:6" + }, + { + "token": [ + "LIDENT", + "i" + ], + "loc": "224:7-224:8" + }, + { + "token": "IN", + "loc": "224:9-224:11" + }, + { + "token": [ + "INT", + "0" + ], + "loc": "224:12-224:13" + }, + { + "token": "RANGE_EXCLUSIVE", + "loc": "224:13-224:16" + }, + { + "token": [ + "INT", + "8" + ], + "loc": "224:16-224:17" + }, + { + "token": "LBRACE", + "loc": "224:18-224:19" + }, + { + "token": "NEWLINE", + "loc": "224:19-224:20" + }, + { + "token": [ + "LIDENT", + "lo" + ], + "loc": "225:5-225:7" + }, + { + "token": "EQUAL", + "loc": "225:8-225:9" + }, + { + "token": [ + "LIDENT", + "lo" + ], + "loc": "225:10-225:12" + }, + { + "token": [ + "DOT_LIDENT", + "lor" + ], + "loc": "225:13-225:16" + }, + { + "token": "LPAREN", + "loc": "225:16-225:17" + }, + { + "token": [ + "LIDENT", + "pick" + ], + "loc": "225:17-225:21" + }, + { + "token": "LPAREN", + "loc": "225:21-225:22" + }, + { + "token": [ + "LIDENT", + "lanes" + ], + "loc": "225:22-225:27" + }, + { + "token": "LBRACKET", + "loc": "225:27-225:28" + }, + { + "token": [ + "LIDENT", + "i" + ], + "loc": "225:28-225:29" + }, + { + "token": "RBRACKET", + "loc": "225:29-225:30" + }, + { + "token": "RPAREN", + "loc": "225:30-225:31" + }, + { + "token": [ + "INFIX2", + "<<" + ], + "loc": "225:32-225:34" + }, + { + "token": "LPAREN", + "loc": "225:35-225:36" + }, + { + "token": [ + "LIDENT", + "i" + ], + "loc": "225:36-225:37" + }, + { + "token": [ + "INFIX3", + "*" + ], + "loc": "225:38-225:39" + }, + { + "token": [ + "INT", + "8" + ], + "loc": "225:40-225:41" + }, + { + "token": "RPAREN", + "loc": "225:41-225:42" + }, + { + "token": "RPAREN", + "loc": "225:42-225:43" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "225:43-225:43" + }, + { + "token": "NEWLINE", + "loc": "225:43-225:44" + }, + { + "token": [ + "LIDENT", + "hi" + ], + "loc": "226:5-226:7" + }, + { + "token": "EQUAL", + "loc": "226:8-226:9" + }, + { + "token": [ + "LIDENT", + "hi" + ], + "loc": "226:10-226:12" + }, + { + "token": [ + "DOT_LIDENT", + "lor" + ], + "loc": "226:13-226:16" + }, + { + "token": "LPAREN", + "loc": "226:16-226:17" + }, + { + "token": [ + "LIDENT", + "pick" + ], + "loc": "226:17-226:21" + }, + { + "token": "LPAREN", + "loc": "226:21-226:22" + }, + { + "token": [ + "LIDENT", + "lanes" + ], + "loc": "226:22-226:27" + }, + { + "token": "LBRACKET", + "loc": "226:27-226:28" + }, + { + "token": [ + "LIDENT", + "i" + ], + "loc": "226:28-226:29" + }, + { + "token": "PLUS", + "loc": "226:30-226:31" + }, + { + "token": [ + "INT", + "8" + ], + "loc": "226:32-226:33" + }, + { + "token": "RBRACKET", + "loc": "226:33-226:34" + }, + { + "token": "RPAREN", + "loc": "226:34-226:35" + }, + { + "token": [ + "INFIX2", + "<<" + ], + "loc": "226:36-226:38" + }, + { + "token": "LPAREN", + "loc": "226:39-226:40" + }, + { + "token": [ + "LIDENT", + "i" + ], + "loc": "226:40-226:41" + }, + { + "token": [ + "INFIX3", + "*" + ], + "loc": "226:42-226:43" + }, + { + "token": [ + "INT", + "8" + ], + "loc": "226:44-226:45" + }, + { + "token": "RPAREN", + "loc": "226:45-226:46" + }, + { + "token": "RPAREN", + "loc": "226:46-226:47" + }, + { + "token": "NEWLINE", + "loc": "226:47-226:48" + }, + { + "token": "RBRACE", + "loc": "227:3-227:4" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "227:4-227:4" + }, + { + "token": "NEWLINE", + "loc": "227:4-227:5" + }, + { + "token": [ + "LIDENT", + "v128_make" + ], + "loc": "228:3-228:12" + }, + { + "token": "LPAREN", + "loc": "228:12-228:13" + }, + { + "token": [ + "LIDENT", + "lo" + ], + "loc": "228:13-228:15" + }, + { + "token": "COMMA", + "loc": "228:15-228:16" + }, + { + "token": [ + "LIDENT", + "hi" + ], + "loc": "228:17-228:19" + }, + { + "token": "RPAREN", + "loc": "228:19-228:20" + }, + { + "token": "NEWLINE", + "loc": "228:20-228:21" + }, + { + "token": "RBRACE", + "loc": "229:1-229:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "229:2-229:2" + }, + { + "token": "NEWLINE", + "loc": "229:2-229:3" + }, + { + "token": "NEWLINE", + "loc": "230:1-230:2" + }, + { + "token": "SUBERROR", + "loc": "231:1-231:9" + }, + { + "token": [ + "UIDENT", + "V128Error" + ], + "loc": "231:10-231:19" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "231:19-231:19" + }, + { + "token": "NEWLINE", + "loc": "231:19-231:20" + }, + { + "token": "NEWLINE", + "loc": "232:1-232:2" + }, + { + "token": "NEWLINE", + "loc": "233:1-233:2" + }, + { + "token": "STRUCT", + "loc": "234:1-234:7" + }, + { + "token": [ + "UIDENT", + "V128Box" + ], + "loc": "234:8-234:15" + }, + { + "token": "LBRACE", + "loc": "234:16-234:17" + }, + { + "token": "NEWLINE", + "loc": "234:17-234:18" + }, + { + "token": [ + "LIDENT", + "v" + ], + "loc": "235:3-235:4" + }, + { + "token": "COLON", + "loc": "235:5-235:6" + }, + { + "token": [ + "UIDENT", + "V128" + ], + "loc": "235:7-235:11" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "235:11-235:11" + }, + { + "token": "NEWLINE", + "loc": "235:11-235:12" + }, + { + "token": [ + "LIDENT", + "tag" + ], + "loc": "236:3-236:6" + }, + { + "token": "COLON", + "loc": "236:7-236:8" + }, + { + "token": [ + "UIDENT", + "Int" + ], + "loc": "236:9-236:12" + }, + { + "token": "NEWLINE", + "loc": "236:12-236:13" + }, + { + "token": "RBRACE", + "loc": "237:1-237:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "237:2-237:2" + }, + { + "token": "NEWLINE", + "loc": "237:2-237:3" + }, + { + "token": "NEWLINE", + "loc": "238:1-238:2" + }, + { + "token": "FN", + "loc": "239:1-239:3" + }, + { + "token": [ + "LIDENT", + "check" + ], + "loc": "239:4-239:9" + }, + { + "token": "LPAREN", + "loc": "239:9-239:10" + }, + { + "token": [ + "LIDENT", + "name" + ], + "loc": "239:10-239:14" + }, + { + "token": "COLON", + "loc": "239:15-239:16" + }, + { + "token": [ + "UIDENT", + "String" + ], + "loc": "239:17-239:23" + }, + { + "token": "COMMA", + "loc": "239:23-239:24" + }, + { + "token": [ + "LIDENT", + "v" + ], + "loc": "239:25-239:26" + }, + { + "token": "COLON", + "loc": "239:27-239:28" + }, + { + "token": [ + "UIDENT", + "V128" + ], + "loc": "239:29-239:33" + }, + { + "token": "COMMA", + "loc": "239:33-239:34" + }, + { + "token": [ + "LIDENT", + "lo" + ], + "loc": "239:35-239:37" + }, + { + "token": "COLON", + "loc": "239:38-239:39" + }, + { + "token": [ + "UIDENT", + "UInt64" + ], + "loc": "239:40-239:46" + }, + { + "token": "COMMA", + "loc": "239:46-239:47" + }, + { + "token": [ + "LIDENT", + "hi" + ], + "loc": "239:48-239:50" + }, + { + "token": "COLON", + "loc": "239:51-239:52" + }, + { + "token": [ + "UIDENT", + "UInt64" + ], + "loc": "239:53-239:59" + }, + { + "token": "RPAREN", + "loc": "239:59-239:60" + }, + { + "token": "THIN_ARROW", + "loc": "239:61-239:63" + }, + { + "token": [ + "UIDENT", + "Unit" + ], + "loc": "239:64-239:68" + }, + { + "token": "LBRACE", + "loc": "239:69-239:70" + }, + { + "token": "NEWLINE", + "loc": "239:70-239:71" + }, + { + "token": "IF", + "loc": "240:3-240:5" + }, + { + "token": [ + "LIDENT", + "v128_lo" + ], + "loc": "240:6-240:13" + }, + { + "token": "LPAREN", + "loc": "240:13-240:14" + }, + { + "token": [ + "LIDENT", + "v" + ], + "loc": "240:14-240:15" + }, + { + "token": "RPAREN", + "loc": "240:15-240:16" + }, + { + "token": [ + "INFIX1", + "==" + ], + "loc": "240:17-240:19" + }, + { + "token": [ + "LIDENT", + "lo" + ], + "loc": "240:20-240:22" + }, + { + "token": "AMPERAMPER", + "loc": "240:23-240:25" + }, + { + "token": [ + "LIDENT", + "v128_hi" + ], + "loc": "240:26-240:33" + }, + { + "token": "LPAREN", + "loc": "240:33-240:34" + }, + { + "token": [ + "LIDENT", + "v" + ], + "loc": "240:34-240:35" + }, + { + "token": "RPAREN", + "loc": "240:35-240:36" + }, + { + "token": [ + "INFIX1", + "==" + ], + "loc": "240:37-240:39" + }, + { + "token": [ + "LIDENT", + "hi" + ], + "loc": "240:40-240:42" + }, + { + "token": "LBRACE", + "loc": "240:43-240:44" + }, + { + "token": "NEWLINE", + "loc": "240:44-240:45" + }, + { + "token": [ + "LIDENT", + "println" + ], + "loc": "241:5-241:12" + }, + { + "token": "LPAREN", + "loc": "241:12-241:13" + }, + { + "token": [ + "INTERP", + "\"\\{name}: ok\"" + ], + "loc": "241:13-241:26" + }, + { + "token": "RPAREN", + "loc": "241:26-241:27" + }, + { + "token": "NEWLINE", + "loc": "241:27-241:28" + }, + { + "token": "RBRACE", + "loc": "242:3-242:4" + }, + { + "token": "ELSE", + "loc": "242:5-242:9" + }, + { + "token": "LBRACE", + "loc": "242:10-242:11" + }, + { + "token": "NEWLINE", + "loc": "242:11-242:12" + }, + { + "token": [ + "LIDENT", + "println" + ], + "loc": "243:5-243:12" + }, + { + "token": "LPAREN", + "loc": "243:12-243:13" + }, + { + "token": [ + "INTERP", + "\"\\{name}: fail\"" + ], + "loc": "243:13-243:28" + }, + { + "token": "RPAREN", + "loc": "243:28-243:29" + }, + { + "token": "NEWLINE", + "loc": "243:29-243:30" + }, + { + "token": "RBRACE", + "loc": "244:3-244:4" + }, + { + "token": "NEWLINE", + "loc": "244:4-244:5" + }, + { + "token": "RBRACE", + "loc": "245:1-245:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "245:2-245:2" + }, + { + "token": "NEWLINE", + "loc": "245:2-245:3" + }, + { + "token": "NEWLINE", + "loc": "246:1-246:2" + }, + { + "token": "FN", + "loc": "247:1-247:3" + }, + { + "token": [ + "LIDENT", + "check_bool" + ], + "loc": "247:4-247:14" + }, + { + "token": "LPAREN", + "loc": "247:14-247:15" + }, + { + "token": [ + "LIDENT", + "name" + ], + "loc": "247:15-247:19" + }, + { + "token": "COLON", + "loc": "247:20-247:21" + }, + { + "token": [ + "UIDENT", + "String" + ], + "loc": "247:22-247:28" + }, + { + "token": "COMMA", + "loc": "247:28-247:29" + }, + { + "token": [ + "LIDENT", + "b" + ], + "loc": "247:30-247:31" + }, + { + "token": "COLON", + "loc": "247:32-247:33" + }, + { + "token": [ + "UIDENT", + "Bool" + ], + "loc": "247:34-247:38" + }, + { + "token": "RPAREN", + "loc": "247:38-247:39" + }, + { + "token": "THIN_ARROW", + "loc": "247:40-247:42" + }, + { + "token": [ + "UIDENT", + "Unit" + ], + "loc": "247:43-247:47" + }, + { + "token": "LBRACE", + "loc": "247:48-247:49" + }, + { + "token": "NEWLINE", + "loc": "247:49-247:50" + }, + { + "token": "IF", + "loc": "248:3-248:5" + }, + { + "token": [ + "LIDENT", + "b" + ], + "loc": "248:6-248:7" + }, + { + "token": "LBRACE", + "loc": "248:8-248:9" + }, + { + "token": "NEWLINE", + "loc": "248:9-248:10" + }, + { + "token": [ + "LIDENT", + "println" + ], + "loc": "249:5-249:12" + }, + { + "token": "LPAREN", + "loc": "249:12-249:13" + }, + { + "token": [ + "INTERP", + "\"\\{name}: ok\"" + ], + "loc": "249:13-249:26" + }, + { + "token": "RPAREN", + "loc": "249:26-249:27" + }, + { + "token": "NEWLINE", + "loc": "249:27-249:28" + }, + { + "token": "RBRACE", + "loc": "250:3-250:4" + }, + { + "token": "ELSE", + "loc": "250:5-250:9" + }, + { + "token": "LBRACE", + "loc": "250:10-250:11" + }, + { + "token": "NEWLINE", + "loc": "250:11-250:12" + }, + { + "token": [ + "LIDENT", + "println" + ], + "loc": "251:5-251:12" + }, + { + "token": "LPAREN", + "loc": "251:12-251:13" + }, + { + "token": [ + "INTERP", + "\"\\{name}: fail\"" + ], + "loc": "251:13-251:28" + }, + { + "token": "RPAREN", + "loc": "251:28-251:29" + }, + { + "token": "NEWLINE", + "loc": "251:29-251:30" + }, + { + "token": "RBRACE", + "loc": "252:3-252:4" + }, + { + "token": "NEWLINE", + "loc": "252:4-252:5" + }, + { + "token": "RBRACE", + "loc": "253:1-253:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "253:2-253:2" + }, + { + "token": "NEWLINE", + "loc": "253:2-253:3" + }, + { + "token": "NEWLINE", + "loc": "254:1-254:2" + }, + { + "token": "FN", + "loc": "255:1-255:3" + }, + { + "token": [ + "LIDENT", + "make_by_index" + ], + "loc": "255:4-255:17" + }, + { + "token": "LPAREN", + "loc": "255:17-255:18" + }, + { + "token": [ + "LIDENT", + "i" + ], + "loc": "255:18-255:19" + }, + { + "token": "COLON", + "loc": "255:20-255:21" + }, + { + "token": [ + "UIDENT", + "Int" + ], + "loc": "255:22-255:25" + }, + { + "token": "RPAREN", + "loc": "255:25-255:26" + }, + { + "token": "THIN_ARROW", + "loc": "255:27-255:29" + }, + { + "token": [ + "UIDENT", + "V128" + ], + "loc": "255:30-255:34" + }, + { + "token": "LBRACE", + "loc": "255:35-255:36" + }, + { + "token": "NEWLINE", + "loc": "255:36-255:37" + }, + { + "token": "MATCH", + "loc": "256:3-256:8" + }, + { + "token": [ + "LIDENT", + "i" + ], + "loc": "256:9-256:10" + }, + { + "token": "LBRACE", + "loc": "256:11-256:12" + }, + { + "token": "NEWLINE", + "loc": "256:12-256:13" + }, + { + "token": [ + "INT", + "0" + ], + "loc": "257:5-257:6" + }, + { + "token": "FAT_ARROW", + "loc": "257:7-257:9" + }, + { + "token": [ + "LIDENT", + "v128_make" + ], + "loc": "257:10-257:19" + }, + { + "token": "LPAREN", + "loc": "257:19-257:20" + }, + { + "token": [ + "INT", + "0x0000000000000000UL" + ], + "loc": "257:20-257:40" + }, + { + "token": "COMMA", + "loc": "257:40-257:41" + }, + { + "token": [ + "INT", + "0x0000000000000001UL" + ], + "loc": "257:42-257:62" + }, + { + "token": "RPAREN", + "loc": "257:62-257:63" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "257:63-257:63" + }, + { + "token": "NEWLINE", + "loc": "257:63-257:64" + }, + { + "token": [ + "INT", + "1" + ], + "loc": "258:5-258:6" + }, + { + "token": "FAT_ARROW", + "loc": "258:7-258:9" + }, + { + "token": [ + "LIDENT", + "v128_make" + ], + "loc": "258:10-258:19" + }, + { + "token": "LPAREN", + "loc": "258:19-258:20" + }, + { + "token": [ + "INT", + "0x1111111111111111UL" + ], + "loc": "258:20-258:40" + }, + { + "token": "COMMA", + "loc": "258:40-258:41" + }, + { + "token": [ + "INT", + "0x1111111111111112UL" + ], + "loc": "258:42-258:62" + }, + { + "token": "RPAREN", + "loc": "258:62-258:63" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "258:63-258:63" + }, + { + "token": "NEWLINE", + "loc": "258:63-258:64" + }, + { + "token": [ + "INT", + "2" + ], + "loc": "259:5-259:6" + }, + { + "token": "FAT_ARROW", + "loc": "259:7-259:9" + }, + { + "token": [ + "LIDENT", + "v128_make" + ], + "loc": "259:10-259:19" + }, + { + "token": "LPAREN", + "loc": "259:19-259:20" + }, + { + "token": [ + "INT", + "0x2222222222222222UL" + ], + "loc": "259:20-259:40" + }, + { + "token": "COMMA", + "loc": "259:40-259:41" + }, + { + "token": [ + "INT", + "0x2222222222222223UL" + ], + "loc": "259:42-259:62" + }, + { + "token": "RPAREN", + "loc": "259:62-259:63" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "259:63-259:63" + }, + { + "token": "NEWLINE", + "loc": "259:63-259:64" + }, + { + "token": [ + "INT", + "3" + ], + "loc": "260:5-260:6" + }, + { + "token": "FAT_ARROW", + "loc": "260:7-260:9" + }, + { + "token": [ + "LIDENT", + "v128_make" + ], + "loc": "260:10-260:19" + }, + { + "token": "LPAREN", + "loc": "260:19-260:20" + }, + { + "token": [ + "INT", + "0x3333333333333333UL" + ], + "loc": "260:20-260:40" + }, + { + "token": "COMMA", + "loc": "260:40-260:41" + }, + { + "token": [ + "INT", + "0x3333333333333334UL" + ], + "loc": "260:42-260:62" + }, + { + "token": "RPAREN", + "loc": "260:62-260:63" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "260:63-260:63" + }, + { + "token": "NEWLINE", + "loc": "260:63-260:64" + }, + { + "token": [ + "INT", + "4" + ], + "loc": "261:5-261:6" + }, + { + "token": "FAT_ARROW", + "loc": "261:7-261:9" + }, + { + "token": [ + "LIDENT", + "v128_make" + ], + "loc": "261:10-261:19" + }, + { + "token": "LPAREN", + "loc": "261:19-261:20" + }, + { + "token": [ + "INT", + "0x4444444444444444UL" + ], + "loc": "261:20-261:40" + }, + { + "token": "COMMA", + "loc": "261:40-261:41" + }, + { + "token": [ + "INT", + "0x4444444444444445UL" + ], + "loc": "261:42-261:62" + }, + { + "token": "RPAREN", + "loc": "261:62-261:63" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "261:63-261:63" + }, + { + "token": "NEWLINE", + "loc": "261:63-261:64" + }, + { + "token": "UNDERSCORE", + "loc": "262:5-262:6" + }, + { + "token": "FAT_ARROW", + "loc": "262:7-262:9" + }, + { + "token": [ + "LIDENT", + "v128_make" + ], + "loc": "262:10-262:19" + }, + { + "token": "LPAREN", + "loc": "262:19-262:20" + }, + { + "token": [ + "INT", + "0xffffffffffffffffUL" + ], + "loc": "262:20-262:40" + }, + { + "token": "COMMA", + "loc": "262:40-262:41" + }, + { + "token": [ + "INT", + "0xeeeeeeeeeeeeeeeeUL" + ], + "loc": "262:42-262:62" + }, + { + "token": "RPAREN", + "loc": "262:62-262:63" + }, + { + "token": "NEWLINE", + "loc": "262:63-262:64" + }, + { + "token": "RBRACE", + "loc": "263:3-263:4" + }, + { + "token": "NEWLINE", + "loc": "263:4-263:5" + }, + { + "token": "RBRACE", + "loc": "264:1-264:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "264:2-264:2" + }, + { + "token": "NEWLINE", + "loc": "264:2-264:3" + }, + { + "token": "NEWLINE", + "loc": "265:1-265:2" + }, + { + "token": "FN", + "loc": "266:1-266:3" + }, + { + "token": [ + "LIDENT", + "choose" + ], + "loc": "266:4-266:10" + }, + { + "token": "LPAREN", + "loc": "266:10-266:11" + }, + { + "token": [ + "LIDENT", + "flag" + ], + "loc": "266:11-266:15" + }, + { + "token": "COLON", + "loc": "266:16-266:17" + }, + { + "token": [ + "UIDENT", + "Bool" + ], + "loc": "266:18-266:22" + }, + { + "token": "COMMA", + "loc": "266:22-266:23" + }, + { + "token": [ + "LIDENT", + "a" + ], + "loc": "266:24-266:25" + }, + { + "token": "COLON", + "loc": "266:26-266:27" + }, + { + "token": [ + "UIDENT", + "V128" + ], + "loc": "266:28-266:32" + }, + { + "token": "COMMA", + "loc": "266:32-266:33" + }, + { + "token": [ + "LIDENT", + "b" + ], + "loc": "266:34-266:35" + }, + { + "token": "COLON", + "loc": "266:36-266:37" + }, + { + "token": [ + "UIDENT", + "V128" + ], + "loc": "266:38-266:42" + }, + { + "token": "RPAREN", + "loc": "266:42-266:43" + }, + { + "token": "THIN_ARROW", + "loc": "266:44-266:46" + }, + { + "token": [ + "UIDENT", + "V128" + ], + "loc": "266:47-266:51" + }, + { + "token": "LBRACE", + "loc": "266:52-266:53" + }, + { + "token": "NEWLINE", + "loc": "266:53-266:54" + }, + { + "token": "IF", + "loc": "267:3-267:5" + }, + { + "token": [ + "LIDENT", + "flag" + ], + "loc": "267:6-267:10" + }, + { + "token": "LBRACE", + "loc": "267:11-267:12" + }, + { + "token": [ + "LIDENT", + "a" + ], + "loc": "267:13-267:14" + }, + { + "token": "RBRACE", + "loc": "267:15-267:16" + }, + { + "token": "ELSE", + "loc": "267:17-267:21" + }, + { + "token": "LBRACE", + "loc": "267:22-267:23" + }, + { + "token": [ + "LIDENT", + "b" + ], + "loc": "267:24-267:25" + }, + { + "token": "RBRACE", + "loc": "267:26-267:27" + }, + { + "token": "NEWLINE", + "loc": "267:27-267:28" + }, + { + "token": "RBRACE", + "loc": "268:1-268:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "268:2-268:2" + }, + { + "token": "NEWLINE", + "loc": "268:2-268:3" + }, + { + "token": "NEWLINE", + "loc": "269:1-269:2" + }, + { + "token": "FN", + "loc": "270:1-270:3" + }, + { + "token": [ + "LIDENT", + "pass_through" + ], + "loc": "270:4-270:16" + }, + { + "token": "LPAREN", + "loc": "270:16-270:17" + }, + { + "token": [ + "LIDENT", + "v" + ], + "loc": "270:17-270:18" + }, + { + "token": "COLON", + "loc": "270:19-270:20" + }, + { + "token": [ + "UIDENT", + "V128" + ], + "loc": "270:21-270:25" + }, + { + "token": "RPAREN", + "loc": "270:25-270:26" + }, + { + "token": "THIN_ARROW", + "loc": "270:27-270:29" + }, + { + "token": [ + "UIDENT", + "V128" + ], + "loc": "270:30-270:34" + }, + { + "token": "LBRACE", + "loc": "270:35-270:36" + }, + { + "token": "NEWLINE", + "loc": "270:36-270:37" + }, + { + "token": [ + "LIDENT", + "v128_make" + ], + "loc": "271:3-271:12" + }, + { + "token": "LPAREN", + "loc": "271:12-271:13" + }, + { + "token": [ + "LIDENT", + "v128_lo" + ], + "loc": "271:13-271:20" + }, + { + "token": "LPAREN", + "loc": "271:20-271:21" + }, + { + "token": [ + "LIDENT", + "v" + ], + "loc": "271:21-271:22" + }, + { + "token": "RPAREN", + "loc": "271:22-271:23" + }, + { + "token": "COMMA", + "loc": "271:23-271:24" + }, + { + "token": [ + "LIDENT", + "v128_hi" + ], + "loc": "271:25-271:32" + }, + { + "token": "LPAREN", + "loc": "271:32-271:33" + }, + { + "token": [ + "LIDENT", + "v" + ], + "loc": "271:33-271:34" + }, + { + "token": "RPAREN", + "loc": "271:34-271:35" + }, + { + "token": "RPAREN", + "loc": "271:35-271:36" + }, + { + "token": "NEWLINE", + "loc": "271:36-271:37" + }, + { + "token": "RBRACE", + "loc": "272:1-272:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "272:2-272:2" + }, + { + "token": "NEWLINE", + "loc": "272:2-272:3" + }, + { + "token": "NEWLINE", + "loc": "273:1-273:2" + }, + { + "token": "FN", + "loc": "274:1-274:3" + }, + { + "token": [ + "LIDENT", + "maybe_v128" + ], + "loc": "274:4-274:14" + }, + { + "token": "LPAREN", + "loc": "274:14-274:15" + }, + { + "token": [ + "LIDENT", + "ok" + ], + "loc": "274:15-274:17" + }, + { + "token": "COLON", + "loc": "274:18-274:19" + }, + { + "token": [ + "UIDENT", + "Bool" + ], + "loc": "274:20-274:24" + }, + { + "token": "RPAREN", + "loc": "274:24-274:25" + }, + { + "token": "THIN_ARROW", + "loc": "274:26-274:28" + }, + { + "token": [ + "UIDENT", + "V128" + ], + "loc": "274:29-274:33" + }, + { + "token": "RAISE", + "loc": "274:34-274:39" + }, + { + "token": [ + "UIDENT", + "V128Error" + ], + "loc": "274:40-274:49" + }, + { + "token": "LBRACE", + "loc": "274:50-274:51" + }, + { + "token": "NEWLINE", + "loc": "274:51-274:52" + }, + { + "token": "IF", + "loc": "275:3-275:5" + }, + { + "token": [ + "LIDENT", + "ok" + ], + "loc": "275:6-275:8" + }, + { + "token": "LBRACE", + "loc": "275:9-275:10" + }, + { + "token": "NEWLINE", + "loc": "275:10-275:11" + }, + { + "token": [ + "LIDENT", + "make_by_index" + ], + "loc": "276:5-276:18" + }, + { + "token": "LPAREN", + "loc": "276:18-276:19" + }, + { + "token": [ + "INT", + "4" + ], + "loc": "276:19-276:20" + }, + { + "token": "RPAREN", + "loc": "276:20-276:21" + }, + { + "token": "NEWLINE", + "loc": "276:21-276:22" + }, + { + "token": "RBRACE", + "loc": "277:3-277:4" + }, + { + "token": "ELSE", + "loc": "277:5-277:9" + }, + { + "token": "LBRACE", + "loc": "277:10-277:11" + }, + { + "token": "NEWLINE", + "loc": "277:11-277:12" + }, + { + "token": "RAISE", + "loc": "278:5-278:10" + }, + { + "token": [ + "UIDENT", + "V128Error" + ], + "loc": "278:11-278:20" + }, + { + "token": "NEWLINE", + "loc": "278:20-278:21" + }, + { + "token": "RBRACE", + "loc": "279:3-279:4" + }, + { + "token": "NEWLINE", + "loc": "279:4-279:5" + }, + { + "token": "RBRACE", + "loc": "280:1-280:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "280:2-280:2" + }, + { + "token": "NEWLINE", + "loc": "280:2-280:3" + }, + { + "token": "NEWLINE", + "loc": "281:1-281:2" + }, + { + "token": "FN", + "loc": "282:1-282:3" + }, + { + "token": [ + "LIDENT", + "check_v128_result" + ], + "loc": "282:4-282:21" + }, + { + "token": "LPAREN", + "loc": "282:21-282:22" + }, + { + "token": [ + "LIDENT", + "name" + ], + "loc": "282:22-282:26" + }, + { + "token": "COLON", + "loc": "282:27-282:28" + }, + { + "token": [ + "UIDENT", + "String" + ], + "loc": "282:29-282:35" + }, + { + "token": "COMMA", + "loc": "282:35-282:36" + }, + { + "token": [ + "LIDENT", + "r" + ], + "loc": "282:37-282:38" + }, + { + "token": "COLON", + "loc": "282:39-282:40" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "282:41-282:47" + }, + { + "token": "LBRACKET", + "loc": "282:47-282:48" + }, + { + "token": [ + "UIDENT", + "V128" + ], + "loc": "282:48-282:52" + }, + { + "token": "COMMA", + "loc": "282:52-282:53" + }, + { + "token": [ + "UIDENT", + "V128Error" + ], + "loc": "282:54-282:63" + }, + { + "token": "RBRACKET", + "loc": "282:63-282:64" + }, + { + "token": "COMMA", + "loc": "282:64-282:65" + }, + { + "token": [ + "LIDENT", + "lo" + ], + "loc": "282:66-282:68" + }, + { + "token": "COLON", + "loc": "282:69-282:70" + }, + { + "token": [ + "UIDENT", + "UInt64" + ], + "loc": "282:71-282:77" + }, + { + "token": "COMMA", + "loc": "282:77-282:78" + }, + { + "token": [ + "LIDENT", + "hi" + ], + "loc": "282:79-282:81" + }, + { + "token": "COLON", + "loc": "282:82-282:83" + }, + { + "token": [ + "UIDENT", + "UInt64" + ], + "loc": "282:84-282:90" + }, + { + "token": "RPAREN", + "loc": "282:90-282:91" + }, + { + "token": "THIN_ARROW", + "loc": "282:92-282:94" + }, + { + "token": [ + "UIDENT", + "Unit" + ], + "loc": "282:95-282:99" + }, + { + "token": "LBRACE", + "loc": "282:100-282:101" + }, + { + "token": "NEWLINE", + "loc": "282:101-282:102" + }, + { + "token": "MATCH", + "loc": "283:3-283:8" + }, + { + "token": [ + "LIDENT", + "r" + ], + "loc": "283:9-283:10" + }, + { + "token": "LBRACE", + "loc": "283:11-283:12" + }, + { + "token": "NEWLINE", + "loc": "283:12-283:13" + }, + { + "token": [ + "UIDENT", + "Ok" + ], + "loc": "284:5-284:7" + }, + { + "token": "LPAREN", + "loc": "284:7-284:8" + }, + { + "token": [ + "LIDENT", + "v" + ], + "loc": "284:8-284:9" + }, + { + "token": "RPAREN", + "loc": "284:9-284:10" + }, + { + "token": "FAT_ARROW", + "loc": "284:11-284:13" + }, + { + "token": [ + "LIDENT", + "check" + ], + "loc": "284:14-284:19" + }, + { + "token": "LPAREN", + "loc": "284:19-284:20" + }, + { + "token": [ + "LIDENT", + "name" + ], + "loc": "284:20-284:24" + }, + { + "token": "COMMA", + "loc": "284:24-284:25" + }, + { + "token": [ + "LIDENT", + "v" + ], + "loc": "284:26-284:27" + }, + { + "token": "COMMA", + "loc": "284:27-284:28" + }, + { + "token": [ + "LIDENT", + "lo" + ], + "loc": "284:29-284:31" + }, + { + "token": "COMMA", + "loc": "284:31-284:32" + }, + { + "token": [ + "LIDENT", + "hi" + ], + "loc": "284:33-284:35" + }, + { + "token": "RPAREN", + "loc": "284:35-284:36" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "284:36-284:36" + }, + { + "token": "NEWLINE", + "loc": "284:36-284:37" + }, + { + "token": [ + "UIDENT", + "Err" + ], + "loc": "285:5-285:8" + }, + { + "token": "LPAREN", + "loc": "285:8-285:9" + }, + { + "token": "UNDERSCORE", + "loc": "285:9-285:10" + }, + { + "token": "RPAREN", + "loc": "285:10-285:11" + }, + { + "token": "FAT_ARROW", + "loc": "285:12-285:14" + }, + { + "token": [ + "LIDENT", + "println" + ], + "loc": "285:15-285:22" + }, + { + "token": "LPAREN", + "loc": "285:22-285:23" + }, + { + "token": [ + "INTERP", + "\"\\{name}: fail\"" + ], + "loc": "285:23-285:38" + }, + { + "token": "RPAREN", + "loc": "285:38-285:39" + }, + { + "token": "NEWLINE", + "loc": "285:39-285:40" + }, + { + "token": "RBRACE", + "loc": "286:3-286:4" + }, + { + "token": "NEWLINE", + "loc": "286:4-286:5" + }, + { + "token": "RBRACE", + "loc": "287:1-287:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "287:2-287:2" + }, + { + "token": "NEWLINE", + "loc": "287:2-287:3" + }, + { + "token": "NEWLINE", + "loc": "288:1-288:2" + }, + { + "token": "FN", + "loc": "289:1-289:3" + }, + { + "token": [ + "LIDENT", + "check_v128_error" + ], + "loc": "289:4-289:20" + }, + { + "token": "LPAREN", + "loc": "289:20-289:21" + }, + { + "token": [ + "LIDENT", + "name" + ], + "loc": "289:21-289:25" + }, + { + "token": "COLON", + "loc": "289:26-289:27" + }, + { + "token": [ + "UIDENT", + "String" + ], + "loc": "289:28-289:34" + }, + { + "token": "COMMA", + "loc": "289:34-289:35" + }, + { + "token": [ + "LIDENT", + "r" + ], + "loc": "289:36-289:37" + }, + { + "token": "COLON", + "loc": "289:38-289:39" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "289:40-289:46" + }, + { + "token": "LBRACKET", + "loc": "289:46-289:47" + }, + { + "token": [ + "UIDENT", + "V128" + ], + "loc": "289:47-289:51" + }, + { + "token": "COMMA", + "loc": "289:51-289:52" + }, + { + "token": [ + "UIDENT", + "V128Error" + ], + "loc": "289:53-289:62" + }, + { + "token": "RBRACKET", + "loc": "289:62-289:63" + }, + { + "token": "RPAREN", + "loc": "289:63-289:64" + }, + { + "token": "THIN_ARROW", + "loc": "289:65-289:67" + }, + { + "token": [ + "UIDENT", + "Unit" + ], + "loc": "289:68-289:72" + }, + { + "token": "LBRACE", + "loc": "289:73-289:74" + }, + { + "token": "NEWLINE", + "loc": "289:74-289:75" + }, + { + "token": "MATCH", + "loc": "290:3-290:8" + }, + { + "token": [ + "LIDENT", + "r" + ], + "loc": "290:9-290:10" + }, + { + "token": "LBRACE", + "loc": "290:11-290:12" + }, + { + "token": "NEWLINE", + "loc": "290:12-290:13" + }, + { + "token": [ + "UIDENT", + "Ok" + ], + "loc": "291:5-291:7" + }, + { + "token": "LPAREN", + "loc": "291:7-291:8" + }, + { + "token": "UNDERSCORE", + "loc": "291:8-291:9" + }, + { + "token": "RPAREN", + "loc": "291:9-291:10" + }, + { + "token": "FAT_ARROW", + "loc": "291:11-291:13" + }, + { + "token": [ + "LIDENT", + "println" + ], + "loc": "291:14-291:21" + }, + { + "token": "LPAREN", + "loc": "291:21-291:22" + }, + { + "token": [ + "INTERP", + "\"\\{name}: fail\"" + ], + "loc": "291:22-291:37" + }, + { + "token": "RPAREN", + "loc": "291:37-291:38" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "291:38-291:38" + }, + { + "token": "NEWLINE", + "loc": "291:38-291:39" + }, + { + "token": [ + "UIDENT", + "Err" + ], + "loc": "292:5-292:8" + }, + { + "token": "LPAREN", + "loc": "292:8-292:9" + }, + { + "token": "UNDERSCORE", + "loc": "292:9-292:10" + }, + { + "token": "RPAREN", + "loc": "292:10-292:11" + }, + { + "token": "FAT_ARROW", + "loc": "292:12-292:14" + }, + { + "token": [ + "LIDENT", + "println" + ], + "loc": "292:15-292:22" + }, + { + "token": "LPAREN", + "loc": "292:22-292:23" + }, + { + "token": [ + "INTERP", + "\"\\{name}: ok\"" + ], + "loc": "292:23-292:36" + }, + { + "token": "RPAREN", + "loc": "292:36-292:37" + }, + { + "token": "NEWLINE", + "loc": "292:37-292:38" + }, + { + "token": "RBRACE", + "loc": "293:3-293:4" + }, + { + "token": "NEWLINE", + "loc": "293:4-293:5" + }, + { + "token": "RBRACE", + "loc": "294:1-294:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "294:2-294:2" + }, + { + "token": "NEWLINE", + "loc": "294:2-294:3" + }, + { + "token": "NEWLINE", + "loc": "295:1-295:2" + }, + { + "token": "FN", + "loc": "296:1-296:3" + }, + { + "token": [ + "LIDENT", + "make_box" + ], + "loc": "296:4-296:12" + }, + { + "token": "LPAREN", + "loc": "296:12-296:13" + }, + { + "token": [ + "LIDENT", + "i" + ], + "loc": "296:13-296:14" + }, + { + "token": "COLON", + "loc": "296:15-296:16" + }, + { + "token": [ + "UIDENT", + "Int" + ], + "loc": "296:17-296:20" + }, + { + "token": "RPAREN", + "loc": "296:20-296:21" + }, + { + "token": "THIN_ARROW", + "loc": "296:22-296:24" + }, + { + "token": [ + "UIDENT", + "V128Box" + ], + "loc": "296:25-296:32" + }, + { + "token": "LBRACE", + "loc": "296:33-296:34" + }, + { + "token": "NEWLINE", + "loc": "296:34-296:35" + }, + { + "token": "LBRACE", + "loc": "297:3-297:4" + }, + { + "token": [ + "LIDENT", + "v" + ], + "loc": "297:5-297:6" + }, + { + "token": "COLON", + "loc": "297:6-297:7" + }, + { + "token": [ + "LIDENT", + "make_by_index" + ], + "loc": "297:8-297:21" + }, + { + "token": "LPAREN", + "loc": "297:21-297:22" + }, + { + "token": [ + "LIDENT", + "i" + ], + "loc": "297:22-297:23" + }, + { + "token": "RPAREN", + "loc": "297:23-297:24" + }, + { + "token": "COMMA", + "loc": "297:24-297:25" + }, + { + "token": [ + "LIDENT", + "tag" + ], + "loc": "297:26-297:29" + }, + { + "token": "COLON", + "loc": "297:29-297:30" + }, + { + "token": [ + "LIDENT", + "i" + ], + "loc": "297:31-297:32" + }, + { + "token": "RBRACE", + "loc": "297:33-297:34" + }, + { + "token": "NEWLINE", + "loc": "297:34-297:35" + }, + { + "token": "RBRACE", + "loc": "298:1-298:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "298:2-298:2" + }, + { + "token": "NEWLINE", + "loc": "298:2-298:3" + }, + { + "token": "NEWLINE", + "loc": "299:1-299:2" + }, + { + "token": "FN", + "loc": "300:1-300:3" + }, + { + "token": [ + "LIDENT", + "init" + ], + "loc": "300:4-300:8" + }, + { + "token": "LBRACE", + "loc": "300:9-300:10" + }, + { + "token": "NEWLINE", + "loc": "300:10-300:11" + }, + { + "token": "LET", + "loc": "301:3-301:6" + }, + { + "token": [ + "LIDENT", + "a" + ], + "loc": "301:7-301:8" + }, + { + "token": "EQUAL", + "loc": "301:9-301:10" + }, + { + "token": [ + "LIDENT", + "v128_make" + ], + "loc": "301:11-301:20" + }, + { + "token": "LPAREN", + "loc": "301:20-301:21" + }, + { + "token": [ + "INT", + "0x0123456789abcdefUL" + ], + "loc": "301:21-301:41" + }, + { + "token": "COMMA", + "loc": "301:41-301:42" + }, + { + "token": [ + "INT", + "0xfedcba9876543210UL" + ], + "loc": "301:43-301:63" + }, + { + "token": "RPAREN", + "loc": "301:63-301:64" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "301:64-301:64" + }, + { + "token": "NEWLINE", + "loc": "301:64-301:65" + }, + { + "token": "LET", + "loc": "302:3-302:6" + }, + { + "token": [ + "LIDENT", + "b" + ], + "loc": "302:7-302:8" + }, + { + "token": "EQUAL", + "loc": "302:9-302:10" + }, + { + "token": [ + "LIDENT", + "v128_make" + ], + "loc": "302:11-302:20" + }, + { + "token": "LPAREN", + "loc": "302:20-302:21" + }, + { + "token": [ + "INT", + "0x1111111122222222UL" + ], + "loc": "302:21-302:41" + }, + { + "token": "COMMA", + "loc": "302:41-302:42" + }, + { + "token": [ + "INT", + "0x3333333344444444UL" + ], + "loc": "302:43-302:63" + }, + { + "token": "RPAREN", + "loc": "302:63-302:64" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "302:64-302:64" + }, + { + "token": "NEWLINE", + "loc": "302:64-302:65" + }, + { + "token": "LET", + "loc": "303:3-303:6" + }, + { + "token": [ + "LIDENT", + "c" + ], + "loc": "303:7-303:8" + }, + { + "token": "EQUAL", + "loc": "303:9-303:10" + }, + { + "token": [ + "LIDENT", + "v128_make" + ], + "loc": "303:11-303:20" + }, + { + "token": "LPAREN", + "loc": "303:20-303:21" + }, + { + "token": [ + "INT", + "0xffffffffffffffffUL" + ], + "loc": "303:21-303:41" + }, + { + "token": "COMMA", + "loc": "303:41-303:42" + }, + { + "token": [ + "INT", + "0x8000000000000000UL" + ], + "loc": "303:43-303:63" + }, + { + "token": "RPAREN", + "loc": "303:63-303:64" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "303:64-303:64" + }, + { + "token": "NEWLINE", + "loc": "303:64-303:65" + }, + { + "token": [ + "LIDENT", + "check" + ], + "loc": "304:3-304:8" + }, + { + "token": "LPAREN", + "loc": "304:8-304:9" + }, + { + "token": [ + "STRING", + "zero bits" + ], + "loc": "304:9-304:20" + }, + { + "token": "COMMA", + "loc": "304:20-304:21" + }, + { + "token": [ + "LIDENT", + "v128_make" + ], + "loc": "304:22-304:31" + }, + { + "token": "LPAREN", + "loc": "304:31-304:32" + }, + { + "token": [ + "INT", + "0UL" + ], + "loc": "304:32-304:35" + }, + { + "token": "COMMA", + "loc": "304:35-304:36" + }, + { + "token": [ + "INT", + "0UL" + ], + "loc": "304:37-304:40" + }, + { + "token": "RPAREN", + "loc": "304:40-304:41" + }, + { + "token": "COMMA", + "loc": "304:41-304:42" + }, + { + "token": [ + "INT", + "0UL" + ], + "loc": "304:43-304:46" + }, + { + "token": "COMMA", + "loc": "304:46-304:47" + }, + { + "token": [ + "INT", + "0UL" + ], + "loc": "304:48-304:51" + }, + { + "token": "RPAREN", + "loc": "304:51-304:52" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "304:52-304:52" + }, + { + "token": "NEWLINE", + "loc": "304:52-304:53" + }, + { + "token": [ + "LIDENT", + "check" + ], + "loc": "305:3-305:8" + }, + { + "token": "LPAREN", + "loc": "305:8-305:9" + }, + { + "token": [ + "STRING", + "small bits" + ], + "loc": "305:9-305:21" + }, + { + "token": "COMMA", + "loc": "305:21-305:22" + }, + { + "token": [ + "LIDENT", + "v128_make" + ], + "loc": "305:23-305:32" + }, + { + "token": "LPAREN", + "loc": "305:32-305:33" + }, + { + "token": [ + "INT", + "1UL" + ], + "loc": "305:33-305:36" + }, + { + "token": "COMMA", + "loc": "305:36-305:37" + }, + { + "token": [ + "INT", + "2UL" + ], + "loc": "305:38-305:41" + }, + { + "token": "RPAREN", + "loc": "305:41-305:42" + }, + { + "token": "COMMA", + "loc": "305:42-305:43" + }, + { + "token": [ + "INT", + "1UL" + ], + "loc": "305:44-305:47" + }, + { + "token": "COMMA", + "loc": "305:47-305:48" + }, + { + "token": [ + "INT", + "2UL" + ], + "loc": "305:49-305:52" + }, + { + "token": "RPAREN", + "loc": "305:52-305:53" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "305:53-305:53" + }, + { + "token": "NEWLINE", + "loc": "305:53-305:54" + }, + { + "token": [ + "LIDENT", + "check" + ], + "loc": "306:3-306:8" + }, + { + "token": "LPAREN", + "loc": "306:8-306:9" + }, + { + "token": [ + "STRING", + "lane order" + ], + "loc": "306:9-306:21" + }, + { + "token": "COMMA", + "loc": "306:21-306:22" + }, + { + "token": [ + "LIDENT", + "a" + ], + "loc": "306:23-306:24" + }, + { + "token": "COMMA", + "loc": "306:24-306:25" + }, + { + "token": [ + "INT", + "0x0123456789abcdefUL" + ], + "loc": "306:26-306:46" + }, + { + "token": "COMMA", + "loc": "306:46-306:47" + }, + { + "token": [ + "INT", + "0xfedcba9876543210UL" + ], + "loc": "306:48-306:68" + }, + { + "token": "RPAREN", + "loc": "306:68-306:69" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "306:69-306:69" + }, + { + "token": "NEWLINE", + "loc": "306:69-306:70" + }, + { + "token": [ + "LIDENT", + "check" + ], + "loc": "307:3-307:8" + }, + { + "token": "LPAREN", + "loc": "307:8-307:9" + }, + { + "token": [ + "STRING", + "all ones and sign bit" + ], + "loc": "307:9-307:32" + }, + { + "token": "COMMA", + "loc": "307:32-307:33" + }, + { + "token": [ + "LIDENT", + "c" + ], + "loc": "307:34-307:35" + }, + { + "token": "COMMA", + "loc": "307:35-307:36" + }, + { + "token": [ + "INT", + "0xffffffffffffffffUL" + ], + "loc": "307:37-307:57" + }, + { + "token": "COMMA", + "loc": "307:57-307:58" + }, + { + "token": [ + "INT", + "0x8000000000000000UL" + ], + "loc": "307:59-307:79" + }, + { + "token": "RPAREN", + "loc": "307:79-307:80" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "307:80-307:80" + }, + { + "token": "NEWLINE", + "loc": "307:80-307:81" + }, + { + "token": [ + "LIDENT", + "check" + ], + "loc": "308:3-308:8" + }, + { + "token": "LPAREN", + "loc": "308:8-308:9" + }, + { + "token": "NEWLINE", + "loc": "308:9-308:10" + }, + { + "token": [ + "STRING", + "v128 const intrinsic" + ], + "loc": "309:5-309:27" + }, + { + "token": "COMMA", + "loc": "309:27-309:28" + }, + { + "token": "NEWLINE", + "loc": "309:28-309:29" + }, + { + "token": [ + "LIDENT", + "v128_const" + ], + "loc": "310:5-310:15" + }, + { + "token": "LPAREN", + "loc": "310:15-310:16" + }, + { + "token": [ + "INT", + "0" + ], + "loc": "310:16-310:17" + }, + { + "token": "COMMA", + "loc": "310:17-310:18" + }, + { + "token": [ + "INT", + "1" + ], + "loc": "310:19-310:20" + }, + { + "token": "COMMA", + "loc": "310:20-310:21" + }, + { + "token": [ + "INT", + "2" + ], + "loc": "310:22-310:23" + }, + { + "token": "COMMA", + "loc": "310:23-310:24" + }, + { + "token": [ + "INT", + "3" + ], + "loc": "310:25-310:26" + }, + { + "token": "COMMA", + "loc": "310:26-310:27" + }, + { + "token": [ + "INT", + "4" + ], + "loc": "310:28-310:29" + }, + { + "token": "COMMA", + "loc": "310:29-310:30" + }, + { + "token": [ + "INT", + "5" + ], + "loc": "310:31-310:32" + }, + { + "token": "COMMA", + "loc": "310:32-310:33" + }, + { + "token": [ + "INT", + "6" + ], + "loc": "310:34-310:35" + }, + { + "token": "COMMA", + "loc": "310:35-310:36" + }, + { + "token": [ + "INT", + "7" + ], + "loc": "310:37-310:38" + }, + { + "token": "COMMA", + "loc": "310:38-310:39" + }, + { + "token": [ + "INT", + "8" + ], + "loc": "310:40-310:41" + }, + { + "token": "COMMA", + "loc": "310:41-310:42" + }, + { + "token": [ + "INT", + "9" + ], + "loc": "310:43-310:44" + }, + { + "token": "COMMA", + "loc": "310:44-310:45" + }, + { + "token": [ + "INT", + "10" + ], + "loc": "310:46-310:48" + }, + { + "token": "COMMA", + "loc": "310:48-310:49" + }, + { + "token": [ + "INT", + "11" + ], + "loc": "310:50-310:52" + }, + { + "token": "COMMA", + "loc": "310:52-310:53" + }, + { + "token": [ + "INT", + "12" + ], + "loc": "310:54-310:56" + }, + { + "token": "COMMA", + "loc": "310:56-310:57" + }, + { + "token": [ + "INT", + "13" + ], + "loc": "310:58-310:60" + }, + { + "token": "COMMA", + "loc": "310:60-310:61" + }, + { + "token": [ + "INT", + "14" + ], + "loc": "310:62-310:64" + }, + { + "token": "COMMA", + "loc": "310:64-310:65" + }, + { + "token": [ + "INT", + "15" + ], + "loc": "310:66-310:68" + }, + { + "token": "RPAREN", + "loc": "310:68-310:69" + }, + { + "token": "COMMA", + "loc": "310:69-310:70" + }, + { + "token": "NEWLINE", + "loc": "310:70-310:71" + }, + { + "token": [ + "INT", + "0x0706050403020100UL" + ], + "loc": "311:5-311:25" + }, + { + "token": "COMMA", + "loc": "311:25-311:26" + }, + { + "token": "NEWLINE", + "loc": "311:26-311:27" + }, + { + "token": [ + "INT", + "0x0f0e0d0c0b0a0908UL" + ], + "loc": "312:5-312:25" + }, + { + "token": "COMMA", + "loc": "312:25-312:26" + }, + { + "token": "NEWLINE", + "loc": "312:26-312:27" + }, + { + "token": "RPAREN", + "loc": "313:3-313:4" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "313:4-313:4" + }, + { + "token": "NEWLINE", + "loc": "313:4-313:5" + }, + { + "token": [ + "LIDENT", + "check" + ], + "loc": "314:3-314:8" + }, + { + "token": "LPAREN", + "loc": "314:8-314:9" + }, + { + "token": "NEWLINE", + "loc": "314:9-314:10" + }, + { + "token": [ + "STRING", + "v128 not intrinsic" + ], + "loc": "315:5-315:25" + }, + { + "token": "COMMA", + "loc": "315:25-315:26" + }, + { + "token": "NEWLINE", + "loc": "315:26-315:27" + }, + { + "token": [ + "LIDENT", + "v128_not" + ], + "loc": "316:5-316:13" + }, + { + "token": "LPAREN", + "loc": "316:13-316:14" + }, + { + "token": [ + "LIDENT", + "v128_make" + ], + "loc": "316:14-316:23" + }, + { + "token": "LPAREN", + "loc": "316:23-316:24" + }, + { + "token": [ + "INT", + "0x0123456789abcdefUL" + ], + "loc": "316:24-316:44" + }, + { + "token": "COMMA", + "loc": "316:44-316:45" + }, + { + "token": [ + "INT", + "0xfedcba9876543210UL" + ], + "loc": "316:46-316:66" + }, + { + "token": "RPAREN", + "loc": "316:66-316:67" + }, + { + "token": "RPAREN", + "loc": "316:67-316:68" + }, + { + "token": "COMMA", + "loc": "316:68-316:69" + }, + { + "token": "NEWLINE", + "loc": "316:69-316:70" + }, + { + "token": [ + "INT", + "0xfedcba9876543210UL" + ], + "loc": "317:5-317:25" + }, + { + "token": "COMMA", + "loc": "317:25-317:26" + }, + { + "token": "NEWLINE", + "loc": "317:26-317:27" + }, + { + "token": [ + "INT", + "0x0123456789abcdefUL" + ], + "loc": "318:5-318:25" + }, + { + "token": "COMMA", + "loc": "318:25-318:26" + }, + { + "token": "NEWLINE", + "loc": "318:26-318:27" + }, + { + "token": "RPAREN", + "loc": "319:3-319:4" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "319:4-319:4" + }, + { + "token": "NEWLINE", + "loc": "319:4-319:5" + }, + { + "token": [ + "LIDENT", + "check" + ], + "loc": "320:3-320:8" + }, + { + "token": "LPAREN", + "loc": "320:8-320:9" + }, + { + "token": "NEWLINE", + "loc": "320:9-320:10" + }, + { + "token": [ + "STRING", + "v128 and intrinsic" + ], + "loc": "321:5-321:25" + }, + { + "token": "COMMA", + "loc": "321:25-321:26" + }, + { + "token": "NEWLINE", + "loc": "321:26-321:27" + }, + { + "token": [ + "LIDENT", + "v128_and" + ], + "loc": "322:5-322:13" + }, + { + "token": "LPAREN", + "loc": "322:13-322:14" + }, + { + "token": "NEWLINE", + "loc": "322:14-322:15" + }, + { + "token": [ + "LIDENT", + "v128_make" + ], + "loc": "323:7-323:16" + }, + { + "token": "LPAREN", + "loc": "323:16-323:17" + }, + { + "token": [ + "INT", + "0x0f0f0f0f0f0f0f0fUL" + ], + "loc": "323:17-323:37" + }, + { + "token": "COMMA", + "loc": "323:37-323:38" + }, + { + "token": [ + "INT", + "0xffff0000ffff0000UL" + ], + "loc": "323:39-323:59" + }, + { + "token": "RPAREN", + "loc": "323:59-323:60" + }, + { + "token": "COMMA", + "loc": "323:60-323:61" + }, + { + "token": "NEWLINE", + "loc": "323:61-323:62" + }, + { + "token": [ + "LIDENT", + "v128_make" + ], + "loc": "324:7-324:16" + }, + { + "token": "LPAREN", + "loc": "324:16-324:17" + }, + { + "token": [ + "INT", + "0x3333333333333333UL" + ], + "loc": "324:17-324:37" + }, + { + "token": "COMMA", + "loc": "324:37-324:38" + }, + { + "token": [ + "INT", + "0x00ff00ff00ff00ffUL" + ], + "loc": "324:39-324:59" + }, + { + "token": "RPAREN", + "loc": "324:59-324:60" + }, + { + "token": "COMMA", + "loc": "324:60-324:61" + }, + { + "token": "NEWLINE", + "loc": "324:61-324:62" + }, + { + "token": "RPAREN", + "loc": "325:5-325:6" + }, + { + "token": "COMMA", + "loc": "325:6-325:7" + }, + { + "token": "NEWLINE", + "loc": "325:7-325:8" + }, + { + "token": [ + "INT", + "0x0303030303030303UL" + ], + "loc": "326:5-326:25" + }, + { + "token": "COMMA", + "loc": "326:25-326:26" + }, + { + "token": "NEWLINE", + "loc": "326:26-326:27" + }, + { + "token": [ + "INT", + "0x00ff000000ff0000UL" + ], + "loc": "327:5-327:25" + }, + { + "token": "COMMA", + "loc": "327:25-327:26" + }, + { + "token": "NEWLINE", + "loc": "327:26-327:27" + }, + { + "token": "RPAREN", + "loc": "328:3-328:4" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "328:4-328:4" + }, + { + "token": "NEWLINE", + "loc": "328:4-328:5" + }, + { + "token": [ + "LIDENT", + "check" + ], + "loc": "329:3-329:8" + }, + { + "token": "LPAREN", + "loc": "329:8-329:9" + }, + { + "token": "NEWLINE", + "loc": "329:9-329:10" + }, + { + "token": [ + "STRING", + "v128 andnot intrinsic" + ], + "loc": "330:5-330:28" + }, + { + "token": "COMMA", + "loc": "330:28-330:29" + }, + { + "token": "NEWLINE", + "loc": "330:29-330:30" + }, + { + "token": [ + "LIDENT", + "v128_andnot" + ], + "loc": "331:5-331:16" + }, + { + "token": "LPAREN", + "loc": "331:16-331:17" + }, + { + "token": "NEWLINE", + "loc": "331:17-331:18" + }, + { + "token": [ + "LIDENT", + "v128_make" + ], + "loc": "332:7-332:16" + }, + { + "token": "LPAREN", + "loc": "332:16-332:17" + }, + { + "token": [ + "INT", + "0xffff0000ffff0000UL" + ], + "loc": "332:17-332:37" + }, + { + "token": "COMMA", + "loc": "332:37-332:38" + }, + { + "token": [ + "INT", + "0x0f0f0f0f0f0f0f0fUL" + ], + "loc": "332:39-332:59" + }, + { + "token": "RPAREN", + "loc": "332:59-332:60" + }, + { + "token": "COMMA", + "loc": "332:60-332:61" + }, + { + "token": "NEWLINE", + "loc": "332:61-332:62" + }, + { + "token": [ + "LIDENT", + "v128_make" + ], + "loc": "333:7-333:16" + }, + { + "token": "LPAREN", + "loc": "333:16-333:17" + }, + { + "token": [ + "INT", + "0x00ff00ff00ff00ffUL" + ], + "loc": "333:17-333:37" + }, + { + "token": "COMMA", + "loc": "333:37-333:38" + }, + { + "token": [ + "INT", + "0x3333333333333333UL" + ], + "loc": "333:39-333:59" + }, + { + "token": "RPAREN", + "loc": "333:59-333:60" + }, + { + "token": "COMMA", + "loc": "333:60-333:61" + }, + { + "token": "NEWLINE", + "loc": "333:61-333:62" + }, + { + "token": "RPAREN", + "loc": "334:5-334:6" + }, + { + "token": "COMMA", + "loc": "334:6-334:7" + }, + { + "token": "NEWLINE", + "loc": "334:7-334:8" + }, + { + "token": [ + "INT", + "0xff000000ff000000UL" + ], + "loc": "335:5-335:25" + }, + { + "token": "COMMA", + "loc": "335:25-335:26" + }, + { + "token": "NEWLINE", + "loc": "335:26-335:27" + }, + { + "token": [ + "INT", + "0x0c0c0c0c0c0c0c0cUL" + ], + "loc": "336:5-336:25" + }, + { + "token": "COMMA", + "loc": "336:25-336:26" + }, + { + "token": "NEWLINE", + "loc": "336:26-336:27" + }, + { + "token": "RPAREN", + "loc": "337:3-337:4" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "337:4-337:4" + }, + { + "token": "NEWLINE", + "loc": "337:4-337:5" + }, + { + "token": [ + "LIDENT", + "check" + ], + "loc": "338:3-338:8" + }, + { + "token": "LPAREN", + "loc": "338:8-338:9" + }, + { + "token": "NEWLINE", + "loc": "338:9-338:10" + }, + { + "token": [ + "STRING", + "v128 or intrinsic" + ], + "loc": "339:5-339:24" + }, + { + "token": "COMMA", + "loc": "339:24-339:25" + }, + { + "token": "NEWLINE", + "loc": "339:25-339:26" + }, + { + "token": [ + "LIDENT", + "v128_or" + ], + "loc": "340:5-340:12" + }, + { + "token": "LPAREN", + "loc": "340:12-340:13" + }, + { + "token": "NEWLINE", + "loc": "340:13-340:14" + }, + { + "token": [ + "LIDENT", + "v128_make" + ], + "loc": "341:7-341:16" + }, + { + "token": "LPAREN", + "loc": "341:16-341:17" + }, + { + "token": [ + "INT", + "0x0f0f0f0f00000000UL" + ], + "loc": "341:17-341:37" + }, + { + "token": "COMMA", + "loc": "341:37-341:38" + }, + { + "token": [ + "INT", + "0x00000000f0f0f0f0UL" + ], + "loc": "341:39-341:59" + }, + { + "token": "RPAREN", + "loc": "341:59-341:60" + }, + { + "token": "COMMA", + "loc": "341:60-341:61" + }, + { + "token": "NEWLINE", + "loc": "341:61-341:62" + }, + { + "token": [ + "LIDENT", + "v128_make" + ], + "loc": "342:7-342:16" + }, + { + "token": "LPAREN", + "loc": "342:16-342:17" + }, + { + "token": [ + "INT", + "0x00000000f0f0f0f0UL" + ], + "loc": "342:17-342:37" + }, + { + "token": "COMMA", + "loc": "342:37-342:38" + }, + { + "token": [ + "INT", + "0x0f0f0f0f00000000UL" + ], + "loc": "342:39-342:59" + }, + { + "token": "RPAREN", + "loc": "342:59-342:60" + }, + { + "token": "COMMA", + "loc": "342:60-342:61" + }, + { + "token": "NEWLINE", + "loc": "342:61-342:62" + }, + { + "token": "RPAREN", + "loc": "343:5-343:6" + }, + { + "token": "COMMA", + "loc": "343:6-343:7" + }, + { + "token": "NEWLINE", + "loc": "343:7-343:8" + }, + { + "token": [ + "INT", + "0x0f0f0f0ff0f0f0f0UL" + ], + "loc": "344:5-344:25" + }, + { + "token": "COMMA", + "loc": "344:25-344:26" + }, + { + "token": "NEWLINE", + "loc": "344:26-344:27" + }, + { + "token": [ + "INT", + "0x0f0f0f0ff0f0f0f0UL" + ], + "loc": "345:5-345:25" + }, + { + "token": "COMMA", + "loc": "345:25-345:26" + }, + { + "token": "NEWLINE", + "loc": "345:26-345:27" + }, + { + "token": "RPAREN", + "loc": "346:3-346:4" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "346:4-346:4" + }, + { + "token": "NEWLINE", + "loc": "346:4-346:5" + }, + { + "token": [ + "LIDENT", + "check" + ], + "loc": "347:3-347:8" + }, + { + "token": "LPAREN", + "loc": "347:8-347:9" + }, + { + "token": "NEWLINE", + "loc": "347:9-347:10" + }, + { + "token": [ + "STRING", + "v128 xor intrinsic" + ], + "loc": "348:5-348:25" + }, + { + "token": "COMMA", + "loc": "348:25-348:26" + }, + { + "token": "NEWLINE", + "loc": "348:26-348:27" + }, + { + "token": [ + "LIDENT", + "v128_xor" + ], + "loc": "349:5-349:13" + }, + { + "token": "LPAREN", + "loc": "349:13-349:14" + }, + { + "token": "NEWLINE", + "loc": "349:14-349:15" + }, + { + "token": [ + "LIDENT", + "v128_make" + ], + "loc": "350:7-350:16" + }, + { + "token": "LPAREN", + "loc": "350:16-350:17" + }, + { + "token": [ + "INT", + "0xffff0000ffff0000UL" + ], + "loc": "350:17-350:37" + }, + { + "token": "COMMA", + "loc": "350:37-350:38" + }, + { + "token": [ + "INT", + "0xaaaaaaaa55555555UL" + ], + "loc": "350:39-350:59" + }, + { + "token": "RPAREN", + "loc": "350:59-350:60" + }, + { + "token": "COMMA", + "loc": "350:60-350:61" + }, + { + "token": "NEWLINE", + "loc": "350:61-350:62" + }, + { + "token": [ + "LIDENT", + "v128_make" + ], + "loc": "351:7-351:16" + }, + { + "token": "LPAREN", + "loc": "351:16-351:17" + }, + { + "token": [ + "INT", + "0x00ff00ff00ff00ffUL" + ], + "loc": "351:17-351:37" + }, + { + "token": "COMMA", + "loc": "351:37-351:38" + }, + { + "token": [ + "INT", + "0xffff0000ffff0000UL" + ], + "loc": "351:39-351:59" + }, + { + "token": "RPAREN", + "loc": "351:59-351:60" + }, + { + "token": "COMMA", + "loc": "351:60-351:61" + }, + { + "token": "NEWLINE", + "loc": "351:61-351:62" + }, + { + "token": "RPAREN", + "loc": "352:5-352:6" + }, + { + "token": "COMMA", + "loc": "352:6-352:7" + }, + { + "token": "NEWLINE", + "loc": "352:7-352:8" + }, + { + "token": [ + "INT", + "0xff0000ffff0000ffUL" + ], + "loc": "353:5-353:25" + }, + { + "token": "COMMA", + "loc": "353:25-353:26" + }, + { + "token": "NEWLINE", + "loc": "353:26-353:27" + }, + { + "token": [ + "INT", + "0x5555aaaaaaaa5555UL" + ], + "loc": "354:5-354:25" + }, + { + "token": "COMMA", + "loc": "354:25-354:26" + }, + { + "token": "NEWLINE", + "loc": "354:26-354:27" + }, + { + "token": "RPAREN", + "loc": "355:3-355:4" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "355:4-355:4" + }, + { + "token": "NEWLINE", + "loc": "355:4-355:5" + }, + { + "token": [ + "LIDENT", + "check" + ], + "loc": "356:3-356:8" + }, + { + "token": "LPAREN", + "loc": "356:8-356:9" + }, + { + "token": "NEWLINE", + "loc": "356:9-356:10" + }, + { + "token": [ + "STRING", + "v128 bitselect intrinsic" + ], + "loc": "357:5-357:31" + }, + { + "token": "COMMA", + "loc": "357:31-357:32" + }, + { + "token": "NEWLINE", + "loc": "357:32-357:33" + }, + { + "token": [ + "LIDENT", + "v128_bitselect" + ], + "loc": "358:5-358:19" + }, + { + "token": "LPAREN", + "loc": "358:19-358:20" + }, + { + "token": "NEWLINE", + "loc": "358:20-358:21" + }, + { + "token": [ + "LIDENT", + "v128_make" + ], + "loc": "359:7-359:16" + }, + { + "token": "LPAREN", + "loc": "359:16-359:17" + }, + { + "token": [ + "INT", + "0xffff0000ffff0000UL" + ], + "loc": "359:17-359:37" + }, + { + "token": "COMMA", + "loc": "359:37-359:38" + }, + { + "token": [ + "INT", + "0xaaaaaaaa55555555UL" + ], + "loc": "359:39-359:59" + }, + { + "token": "RPAREN", + "loc": "359:59-359:60" + }, + { + "token": "COMMA", + "loc": "359:60-359:61" + }, + { + "token": "NEWLINE", + "loc": "359:61-359:62" + }, + { + "token": [ + "LIDENT", + "v128_make" + ], + "loc": "360:7-360:16" + }, + { + "token": "LPAREN", + "loc": "360:16-360:17" + }, + { + "token": [ + "INT", + "0x0000ffff0000ffffUL" + ], + "loc": "360:17-360:37" + }, + { + "token": "COMMA", + "loc": "360:37-360:38" + }, + { + "token": [ + "INT", + "0x55555555aaaaaaaaUL" + ], + "loc": "360:39-360:59" + }, + { + "token": "RPAREN", + "loc": "360:59-360:60" + }, + { + "token": "COMMA", + "loc": "360:60-360:61" + }, + { + "token": "NEWLINE", + "loc": "360:61-360:62" + }, + { + "token": [ + "LIDENT", + "v128_make" + ], + "loc": "361:7-361:16" + }, + { + "token": "LPAREN", + "loc": "361:16-361:17" + }, + { + "token": [ + "INT", + "0xff00ff00ff00ff00UL" + ], + "loc": "361:17-361:37" + }, + { + "token": "COMMA", + "loc": "361:37-361:38" + }, + { + "token": [ + "INT", + "0xffff0000ffff0000UL" + ], + "loc": "361:39-361:59" + }, + { + "token": "RPAREN", + "loc": "361:59-361:60" + }, + { + "token": "COMMA", + "loc": "361:60-361:61" + }, + { + "token": "NEWLINE", + "loc": "361:61-361:62" + }, + { + "token": "RPAREN", + "loc": "362:5-362:6" + }, + { + "token": "COMMA", + "loc": "362:6-362:7" + }, + { + "token": "NEWLINE", + "loc": "362:7-362:8" + }, + { + "token": [ + "INT", + "0xff0000ffff0000ffUL" + ], + "loc": "363:5-363:25" + }, + { + "token": "COMMA", + "loc": "363:25-363:26" + }, + { + "token": "NEWLINE", + "loc": "363:26-363:27" + }, + { + "token": [ + "INT", + "0xaaaa55555555aaaaUL" + ], + "loc": "364:5-364:25" + }, + { + "token": "COMMA", + "loc": "364:25-364:26" + }, + { + "token": "NEWLINE", + "loc": "364:26-364:27" + }, + { + "token": "RPAREN", + "loc": "365:3-365:4" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "365:4-365:4" + }, + { + "token": "NEWLINE", + "loc": "365:4-365:5" + }, + { + "token": [ + "LIDENT", + "check" + ], + "loc": "366:3-366:8" + }, + { + "token": "LPAREN", + "loc": "366:8-366:9" + }, + { + "token": "NEWLINE", + "loc": "366:9-366:10" + }, + { + "token": [ + "STRING", + "i8x16 add intrinsic" + ], + "loc": "367:5-367:26" + }, + { + "token": "COMMA", + "loc": "367:26-367:27" + }, + { + "token": "NEWLINE", + "loc": "367:27-367:28" + }, + { + "token": [ + "LIDENT", + "i8x16_add" + ], + "loc": "368:5-368:14" + }, + { + "token": "LPAREN", + "loc": "368:14-368:15" + }, + { + "token": "NEWLINE", + "loc": "368:15-368:16" + }, + { + "token": [ + "LIDENT", + "v128_make" + ], + "loc": "369:7-369:16" + }, + { + "token": "LPAREN", + "loc": "369:16-369:17" + }, + { + "token": [ + "INT", + "0x0102030405060708UL" + ], + "loc": "369:17-369:37" + }, + { + "token": "COMMA", + "loc": "369:37-369:38" + }, + { + "token": [ + "INT", + "0x1112131415161718UL" + ], + "loc": "369:39-369:59" + }, + { + "token": "RPAREN", + "loc": "369:59-369:60" + }, + { + "token": "COMMA", + "loc": "369:60-369:61" + }, + { + "token": "NEWLINE", + "loc": "369:61-369:62" + }, + { + "token": [ + "LIDENT", + "v128_make" + ], + "loc": "370:7-370:16" + }, + { + "token": "LPAREN", + "loc": "370:16-370:17" + }, + { + "token": [ + "INT", + "0x0101010101010101UL" + ], + "loc": "370:17-370:37" + }, + { + "token": "COMMA", + "loc": "370:37-370:38" + }, + { + "token": [ + "INT", + "0x0101010101010101UL" + ], + "loc": "370:39-370:59" + }, + { + "token": "RPAREN", + "loc": "370:59-370:60" + }, + { + "token": "COMMA", + "loc": "370:60-370:61" + }, + { + "token": "NEWLINE", + "loc": "370:61-370:62" + }, + { + "token": "RPAREN", + "loc": "371:5-371:6" + }, + { + "token": "COMMA", + "loc": "371:6-371:7" + }, + { + "token": "NEWLINE", + "loc": "371:7-371:8" + }, + { + "token": [ + "INT", + "0x0203040506070809UL" + ], + "loc": "372:5-372:25" + }, + { + "token": "COMMA", + "loc": "372:25-372:26" + }, + { + "token": "NEWLINE", + "loc": "372:26-372:27" + }, + { + "token": [ + "INT", + "0x1213141516171819UL" + ], + "loc": "373:5-373:25" + }, + { + "token": "COMMA", + "loc": "373:25-373:26" + }, + { + "token": "NEWLINE", + "loc": "373:26-373:27" + }, + { + "token": "RPAREN", + "loc": "374:3-374:4" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "374:4-374:4" + }, + { + "token": "NEWLINE", + "loc": "374:4-374:5" + }, + { + "token": [ + "LIDENT", + "check" + ], + "loc": "375:3-375:8" + }, + { + "token": "LPAREN", + "loc": "375:8-375:9" + }, + { + "token": "NEWLINE", + "loc": "375:9-375:10" + }, + { + "token": [ + "STRING", + "i8x16 sub intrinsic" + ], + "loc": "376:5-376:26" + }, + { + "token": "COMMA", + "loc": "376:26-376:27" + }, + { + "token": "NEWLINE", + "loc": "376:27-376:28" + }, + { + "token": [ + "LIDENT", + "i8x16_sub" + ], + "loc": "377:5-377:14" + }, + { + "token": "LPAREN", + "loc": "377:14-377:15" + }, + { + "token": "NEWLINE", + "loc": "377:15-377:16" + }, + { + "token": [ + "LIDENT", + "v128_make" + ], + "loc": "378:7-378:16" + }, + { + "token": "LPAREN", + "loc": "378:16-378:17" + }, + { + "token": [ + "INT", + "0x1011121314151617UL" + ], + "loc": "378:17-378:37" + }, + { + "token": "COMMA", + "loc": "378:37-378:38" + }, + { + "token": [ + "INT", + "0x2021222324252627UL" + ], + "loc": "378:39-378:59" + }, + { + "token": "RPAREN", + "loc": "378:59-378:60" + }, + { + "token": "COMMA", + "loc": "378:60-378:61" + }, + { + "token": "NEWLINE", + "loc": "378:61-378:62" + }, + { + "token": [ + "LIDENT", + "v128_make" + ], + "loc": "379:7-379:16" + }, + { + "token": "LPAREN", + "loc": "379:16-379:17" + }, + { + "token": [ + "INT", + "0x0101010101010101UL" + ], + "loc": "379:17-379:37" + }, + { + "token": "COMMA", + "loc": "379:37-379:38" + }, + { + "token": [ + "INT", + "0x0101010101010101UL" + ], + "loc": "379:39-379:59" + }, + { + "token": "RPAREN", + "loc": "379:59-379:60" + }, + { + "token": "COMMA", + "loc": "379:60-379:61" + }, + { + "token": "NEWLINE", + "loc": "379:61-379:62" + }, + { + "token": "RPAREN", + "loc": "380:5-380:6" + }, + { + "token": "COMMA", + "loc": "380:6-380:7" + }, + { + "token": "NEWLINE", + "loc": "380:7-380:8" + }, + { + "token": [ + "INT", + "0x0f10111213141516UL" + ], + "loc": "381:5-381:25" + }, + { + "token": "COMMA", + "loc": "381:25-381:26" + }, + { + "token": "NEWLINE", + "loc": "381:26-381:27" + }, + { + "token": [ + "INT", + "0x1f20212223242526UL" + ], + "loc": "382:5-382:25" + }, + { + "token": "COMMA", + "loc": "382:25-382:26" + }, + { + "token": "NEWLINE", + "loc": "382:26-382:27" + }, + { + "token": "RPAREN", + "loc": "383:3-383:4" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "383:4-383:4" + }, + { + "token": "NEWLINE", + "loc": "383:4-383:5" + }, + { + "token": [ + "LIDENT", + "check" + ], + "loc": "384:3-384:8" + }, + { + "token": "LPAREN", + "loc": "384:8-384:9" + }, + { + "token": "NEWLINE", + "loc": "384:9-384:10" + }, + { + "token": [ + "STRING", + "i16x8 add intrinsic" + ], + "loc": "385:5-385:26" + }, + { + "token": "COMMA", + "loc": "385:26-385:27" + }, + { + "token": "NEWLINE", + "loc": "385:27-385:28" + }, + { + "token": [ + "LIDENT", + "i16x8_add" + ], + "loc": "386:5-386:14" + }, + { + "token": "LPAREN", + "loc": "386:14-386:15" + }, + { + "token": "NEWLINE", + "loc": "386:15-386:16" + }, + { + "token": [ + "LIDENT", + "v128_make" + ], + "loc": "387:7-387:16" + }, + { + "token": "LPAREN", + "loc": "387:16-387:17" + }, + { + "token": [ + "INT", + "0x0001000200030004UL" + ], + "loc": "387:17-387:37" + }, + { + "token": "COMMA", + "loc": "387:37-387:38" + }, + { + "token": [ + "INT", + "0x0005000600070008UL" + ], + "loc": "387:39-387:59" + }, + { + "token": "RPAREN", + "loc": "387:59-387:60" + }, + { + "token": "COMMA", + "loc": "387:60-387:61" + }, + { + "token": "NEWLINE", + "loc": "387:61-387:62" + }, + { + "token": [ + "LIDENT", + "v128_make" + ], + "loc": "388:7-388:16" + }, + { + "token": "LPAREN", + "loc": "388:16-388:17" + }, + { + "token": [ + "INT", + "0x0001000100010001UL" + ], + "loc": "388:17-388:37" + }, + { + "token": "COMMA", + "loc": "388:37-388:38" + }, + { + "token": [ + "INT", + "0x0001000100010001UL" + ], + "loc": "388:39-388:59" + }, + { + "token": "RPAREN", + "loc": "388:59-388:60" + }, + { + "token": "COMMA", + "loc": "388:60-388:61" + }, + { + "token": "NEWLINE", + "loc": "388:61-388:62" + }, + { + "token": "RPAREN", + "loc": "389:5-389:6" + }, + { + "token": "COMMA", + "loc": "389:6-389:7" + }, + { + "token": "NEWLINE", + "loc": "389:7-389:8" + }, + { + "token": [ + "INT", + "0x0002000300040005UL" + ], + "loc": "390:5-390:25" + }, + { + "token": "COMMA", + "loc": "390:25-390:26" + }, + { + "token": "NEWLINE", + "loc": "390:26-390:27" + }, + { + "token": [ + "INT", + "0x0006000700080009UL" + ], + "loc": "391:5-391:25" + }, + { + "token": "COMMA", + "loc": "391:25-391:26" + }, + { + "token": "NEWLINE", + "loc": "391:26-391:27" + }, + { + "token": "RPAREN", + "loc": "392:3-392:4" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "392:4-392:4" + }, + { + "token": "NEWLINE", + "loc": "392:4-392:5" + }, + { + "token": [ + "LIDENT", + "check" + ], + "loc": "393:3-393:8" + }, + { + "token": "LPAREN", + "loc": "393:8-393:9" + }, + { + "token": "NEWLINE", + "loc": "393:9-393:10" + }, + { + "token": [ + "STRING", + "i16x8 sub intrinsic" + ], + "loc": "394:5-394:26" + }, + { + "token": "COMMA", + "loc": "394:26-394:27" + }, + { + "token": "NEWLINE", + "loc": "394:27-394:28" + }, + { + "token": [ + "LIDENT", + "i16x8_sub" + ], + "loc": "395:5-395:14" + }, + { + "token": "LPAREN", + "loc": "395:14-395:15" + }, + { + "token": "NEWLINE", + "loc": "395:15-395:16" + }, + { + "token": [ + "LIDENT", + "v128_make" + ], + "loc": "396:7-396:16" + }, + { + "token": "LPAREN", + "loc": "396:16-396:17" + }, + { + "token": [ + "INT", + "0x0010001100120013UL" + ], + "loc": "396:17-396:37" + }, + { + "token": "COMMA", + "loc": "396:37-396:38" + }, + { + "token": [ + "INT", + "0x0020002100220023UL" + ], + "loc": "396:39-396:59" + }, + { + "token": "RPAREN", + "loc": "396:59-396:60" + }, + { + "token": "COMMA", + "loc": "396:60-396:61" + }, + { + "token": "NEWLINE", + "loc": "396:61-396:62" + }, + { + "token": [ + "LIDENT", + "v128_make" + ], + "loc": "397:7-397:16" + }, + { + "token": "LPAREN", + "loc": "397:16-397:17" + }, + { + "token": [ + "INT", + "0x0001000100010001UL" + ], + "loc": "397:17-397:37" + }, + { + "token": "COMMA", + "loc": "397:37-397:38" + }, + { + "token": [ + "INT", + "0x0001000100010001UL" + ], + "loc": "397:39-397:59" + }, + { + "token": "RPAREN", + "loc": "397:59-397:60" + }, + { + "token": "COMMA", + "loc": "397:60-397:61" + }, + { + "token": "NEWLINE", + "loc": "397:61-397:62" + }, + { + "token": "RPAREN", + "loc": "398:5-398:6" + }, + { + "token": "COMMA", + "loc": "398:6-398:7" + }, + { + "token": "NEWLINE", + "loc": "398:7-398:8" + }, + { + "token": [ + "INT", + "0x000f001000110012UL" + ], + "loc": "399:5-399:25" + }, + { + "token": "COMMA", + "loc": "399:25-399:26" + }, + { + "token": "NEWLINE", + "loc": "399:26-399:27" + }, + { + "token": [ + "INT", + "0x001f002000210022UL" + ], + "loc": "400:5-400:25" + }, + { + "token": "COMMA", + "loc": "400:25-400:26" + }, + { + "token": "NEWLINE", + "loc": "400:26-400:27" + }, + { + "token": "RPAREN", + "loc": "401:3-401:4" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "401:4-401:4" + }, + { + "token": "NEWLINE", + "loc": "401:4-401:5" + }, + { + "token": [ + "LIDENT", + "check" + ], + "loc": "402:3-402:8" + }, + { + "token": "LPAREN", + "loc": "402:8-402:9" + }, + { + "token": "NEWLINE", + "loc": "402:9-402:10" + }, + { + "token": [ + "STRING", + "i32x4 add intrinsic" + ], + "loc": "403:5-403:26" + }, + { + "token": "COMMA", + "loc": "403:26-403:27" + }, + { + "token": "NEWLINE", + "loc": "403:27-403:28" + }, + { + "token": [ + "LIDENT", + "i32x4_add" + ], + "loc": "404:5-404:14" + }, + { + "token": "LPAREN", + "loc": "404:14-404:15" + }, + { + "token": "NEWLINE", + "loc": "404:15-404:16" + }, + { + "token": [ + "LIDENT", + "v128_make" + ], + "loc": "405:7-405:16" + }, + { + "token": "LPAREN", + "loc": "405:16-405:17" + }, + { + "token": [ + "INT", + "0x0000000100000002UL" + ], + "loc": "405:17-405:37" + }, + { + "token": "COMMA", + "loc": "405:37-405:38" + }, + { + "token": [ + "INT", + "0x0000000300000004UL" + ], + "loc": "405:39-405:59" + }, + { + "token": "RPAREN", + "loc": "405:59-405:60" + }, + { + "token": "COMMA", + "loc": "405:60-405:61" + }, + { + "token": "NEWLINE", + "loc": "405:61-405:62" + }, + { + "token": [ + "LIDENT", + "v128_make" + ], + "loc": "406:7-406:16" + }, + { + "token": "LPAREN", + "loc": "406:16-406:17" + }, + { + "token": [ + "INT", + "0x0000000100000001UL" + ], + "loc": "406:17-406:37" + }, + { + "token": "COMMA", + "loc": "406:37-406:38" + }, + { + "token": [ + "INT", + "0x0000000100000001UL" + ], + "loc": "406:39-406:59" + }, + { + "token": "RPAREN", + "loc": "406:59-406:60" + }, + { + "token": "COMMA", + "loc": "406:60-406:61" + }, + { + "token": "NEWLINE", + "loc": "406:61-406:62" + }, + { + "token": "RPAREN", + "loc": "407:5-407:6" + }, + { + "token": "COMMA", + "loc": "407:6-407:7" + }, + { + "token": "NEWLINE", + "loc": "407:7-407:8" + }, + { + "token": [ + "INT", + "0x0000000200000003UL" + ], + "loc": "408:5-408:25" + }, + { + "token": "COMMA", + "loc": "408:25-408:26" + }, + { + "token": "NEWLINE", + "loc": "408:26-408:27" + }, + { + "token": [ + "INT", + "0x0000000400000005UL" + ], + "loc": "409:5-409:25" + }, + { + "token": "COMMA", + "loc": "409:25-409:26" + }, + { + "token": "NEWLINE", + "loc": "409:26-409:27" + }, + { + "token": "RPAREN", + "loc": "410:3-410:4" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "410:4-410:4" + }, + { + "token": "NEWLINE", + "loc": "410:4-410:5" + }, + { + "token": [ + "LIDENT", + "check" + ], + "loc": "411:3-411:8" + }, + { + "token": "LPAREN", + "loc": "411:8-411:9" + }, + { + "token": "NEWLINE", + "loc": "411:9-411:10" + }, + { + "token": [ + "STRING", + "i32x4 sub intrinsic" + ], + "loc": "412:5-412:26" + }, + { + "token": "COMMA", + "loc": "412:26-412:27" + }, + { + "token": "NEWLINE", + "loc": "412:27-412:28" + }, + { + "token": [ + "LIDENT", + "i32x4_sub" + ], + "loc": "413:5-413:14" + }, + { + "token": "LPAREN", + "loc": "413:14-413:15" + }, + { + "token": "NEWLINE", + "loc": "413:15-413:16" + }, + { + "token": [ + "LIDENT", + "v128_make" + ], + "loc": "414:7-414:16" + }, + { + "token": "LPAREN", + "loc": "414:16-414:17" + }, + { + "token": [ + "INT", + "0x0000001000000011UL" + ], + "loc": "414:17-414:37" + }, + { + "token": "COMMA", + "loc": "414:37-414:38" + }, + { + "token": [ + "INT", + "0x0000002000000021UL" + ], + "loc": "414:39-414:59" + }, + { + "token": "RPAREN", + "loc": "414:59-414:60" + }, + { + "token": "COMMA", + "loc": "414:60-414:61" + }, + { + "token": "NEWLINE", + "loc": "414:61-414:62" + }, + { + "token": [ + "LIDENT", + "v128_make" + ], + "loc": "415:7-415:16" + }, + { + "token": "LPAREN", + "loc": "415:16-415:17" + }, + { + "token": [ + "INT", + "0x0000000100000001UL" + ], + "loc": "415:17-415:37" + }, + { + "token": "COMMA", + "loc": "415:37-415:38" + }, + { + "token": [ + "INT", + "0x0000000100000001UL" + ], + "loc": "415:39-415:59" + }, + { + "token": "RPAREN", + "loc": "415:59-415:60" + }, + { + "token": "COMMA", + "loc": "415:60-415:61" + }, + { + "token": "NEWLINE", + "loc": "415:61-415:62" + }, + { + "token": "RPAREN", + "loc": "416:5-416:6" + }, + { + "token": "COMMA", + "loc": "416:6-416:7" + }, + { + "token": "NEWLINE", + "loc": "416:7-416:8" + }, + { + "token": [ + "INT", + "0x0000000f00000010UL" + ], + "loc": "417:5-417:25" + }, + { + "token": "COMMA", + "loc": "417:25-417:26" + }, + { + "token": "NEWLINE", + "loc": "417:26-417:27" + }, + { + "token": [ + "INT", + "0x0000001f00000020UL" + ], + "loc": "418:5-418:25" + }, + { + "token": "COMMA", + "loc": "418:25-418:26" + }, + { + "token": "NEWLINE", + "loc": "418:26-418:27" + }, + { + "token": "RPAREN", + "loc": "419:3-419:4" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "419:4-419:4" + }, + { + "token": "NEWLINE", + "loc": "419:4-419:5" + }, + { + "token": [ + "LIDENT", + "check_bool" + ], + "loc": "420:3-420:13" + }, + { + "token": "LPAREN", + "loc": "420:13-420:14" + }, + { + "token": "NEWLINE", + "loc": "420:14-420:15" + }, + { + "token": [ + "STRING", + "i32x4 extract lane intrinsic" + ], + "loc": "421:5-421:35" + }, + { + "token": "COMMA", + "loc": "421:35-421:36" + }, + { + "token": "NEWLINE", + "loc": "421:36-421:37" + }, + { + "token": [ + "LIDENT", + "i32x4_extract_lane" + ], + "loc": "422:5-422:23" + }, + { + "token": "LPAREN", + "loc": "422:23-422:24" + }, + { + "token": [ + "LIDENT", + "v128_make" + ], + "loc": "422:24-422:33" + }, + { + "token": "LPAREN", + "loc": "422:33-422:34" + }, + { + "token": [ + "INT", + "0x0000000100000002UL" + ], + "loc": "422:34-422:54" + }, + { + "token": "COMMA", + "loc": "422:54-422:55" + }, + { + "token": [ + "INT", + "0x0000000300000004UL" + ], + "loc": "422:56-422:76" + }, + { + "token": "RPAREN", + "loc": "422:76-422:77" + }, + { + "token": "COMMA", + "loc": "422:77-422:78" + }, + { + "token": [ + "INT", + "3" + ], + "loc": "422:79-422:80" + }, + { + "token": "RPAREN", + "loc": "422:80-422:81" + }, + { + "token": [ + "INFIX1", + "==" + ], + "loc": "422:82-422:84" + }, + { + "token": [ + "INT", + "3" + ], + "loc": "422:85-422:86" + }, + { + "token": "COMMA", + "loc": "422:86-422:87" + }, + { + "token": "NEWLINE", + "loc": "422:87-422:88" + }, + { + "token": "RPAREN", + "loc": "423:3-423:4" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "423:4-423:4" + }, + { + "token": "NEWLINE", + "loc": "423:4-423:5" + }, + { + "token": [ + "LIDENT", + "check" + ], + "loc": "424:3-424:8" + }, + { + "token": "LPAREN", + "loc": "424:8-424:9" + }, + { + "token": "NEWLINE", + "loc": "424:9-424:10" + }, + { + "token": [ + "STRING", + "i32x4 replace lane intrinsic" + ], + "loc": "425:5-425:35" + }, + { + "token": "COMMA", + "loc": "425:35-425:36" + }, + { + "token": "NEWLINE", + "loc": "425:36-425:37" + }, + { + "token": [ + "LIDENT", + "i32x4_replace_lane" + ], + "loc": "426:5-426:23" + }, + { + "token": "LPAREN", + "loc": "426:23-426:24" + }, + { + "token": [ + "LIDENT", + "v128_make" + ], + "loc": "426:24-426:33" + }, + { + "token": "LPAREN", + "loc": "426:33-426:34" + }, + { + "token": [ + "INT", + "0x0000000100000002UL" + ], + "loc": "426:34-426:54" + }, + { + "token": "COMMA", + "loc": "426:54-426:55" + }, + { + "token": [ + "INT", + "0x0000000300000004UL" + ], + "loc": "426:56-426:76" + }, + { + "token": "RPAREN", + "loc": "426:76-426:77" + }, + { + "token": "COMMA", + "loc": "426:77-426:78" + }, + { + "token": [ + "INT", + "9" + ], + "loc": "426:79-426:80" + }, + { + "token": "COMMA", + "loc": "426:80-426:81" + }, + { + "token": [ + "INT", + "0" + ], + "loc": "426:82-426:83" + }, + { + "token": "RPAREN", + "loc": "426:83-426:84" + }, + { + "token": "COMMA", + "loc": "426:84-426:85" + }, + { + "token": "NEWLINE", + "loc": "426:85-426:86" + }, + { + "token": [ + "INT", + "0x0000000100000009UL" + ], + "loc": "427:5-427:25" + }, + { + "token": "COMMA", + "loc": "427:25-427:26" + }, + { + "token": "NEWLINE", + "loc": "427:26-427:27" + }, + { + "token": [ + "INT", + "0x0000000300000004UL" + ], + "loc": "428:5-428:25" + }, + { + "token": "COMMA", + "loc": "428:25-428:26" + }, + { + "token": "NEWLINE", + "loc": "428:26-428:27" + }, + { + "token": "RPAREN", + "loc": "429:3-429:4" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "429:4-429:4" + }, + { + "token": "NEWLINE", + "loc": "429:4-429:5" + }, + { + "token": [ + "LIDENT", + "check" + ], + "loc": "430:3-430:8" + }, + { + "token": "LPAREN", + "loc": "430:8-430:9" + }, + { + "token": "NEWLINE", + "loc": "430:9-430:10" + }, + { + "token": [ + "STRING", + "i64x2 add intrinsic" + ], + "loc": "431:5-431:26" + }, + { + "token": "COMMA", + "loc": "431:26-431:27" + }, + { + "token": "NEWLINE", + "loc": "431:27-431:28" + }, + { + "token": [ + "LIDENT", + "i64x2_add" + ], + "loc": "432:5-432:14" + }, + { + "token": "LPAREN", + "loc": "432:14-432:15" + }, + { + "token": [ + "LIDENT", + "v128_make" + ], + "loc": "432:15-432:24" + }, + { + "token": "LPAREN", + "loc": "432:24-432:25" + }, + { + "token": [ + "INT", + "0x0000000000000001UL" + ], + "loc": "432:25-432:45" + }, + { + "token": "COMMA", + "loc": "432:45-432:46" + }, + { + "token": [ + "INT", + "0x0000000000000002UL" + ], + "loc": "432:47-432:67" + }, + { + "token": "RPAREN", + "loc": "432:67-432:68" + }, + { + "token": "COMMA", + "loc": "432:68-432:69" + }, + { + "token": [ + "LIDENT", + "v128_make" + ], + "loc": "432:70-432:79" + }, + { + "token": "LPAREN", + "loc": "432:79-432:80" + }, + { + "token": [ + "INT", + "3UL" + ], + "loc": "432:80-432:83" + }, + { + "token": "COMMA", + "loc": "432:83-432:84" + }, + { + "token": [ + "INT", + "4UL" + ], + "loc": "432:85-432:88" + }, + { + "token": "RPAREN", + "loc": "432:88-432:89" + }, + { + "token": "RPAREN", + "loc": "432:89-432:90" + }, + { + "token": "COMMA", + "loc": "432:90-432:91" + }, + { + "token": "NEWLINE", + "loc": "432:91-432:92" + }, + { + "token": [ + "INT", + "4UL" + ], + "loc": "433:5-433:8" + }, + { + "token": "COMMA", + "loc": "433:8-433:9" + }, + { + "token": "NEWLINE", + "loc": "433:9-433:10" + }, + { + "token": [ + "INT", + "6UL" + ], + "loc": "434:5-434:8" + }, + { + "token": "COMMA", + "loc": "434:8-434:9" + }, + { + "token": "NEWLINE", + "loc": "434:9-434:10" + }, + { + "token": "RPAREN", + "loc": "435:3-435:4" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "435:4-435:4" + }, + { + "token": "NEWLINE", + "loc": "435:4-435:5" + }, + { + "token": [ + "LIDENT", + "check" + ], + "loc": "436:3-436:8" + }, + { + "token": "LPAREN", + "loc": "436:8-436:9" + }, + { + "token": "NEWLINE", + "loc": "436:9-436:10" + }, + { + "token": [ + "STRING", + "i64x2 sub intrinsic" + ], + "loc": "437:5-437:26" + }, + { + "token": "COMMA", + "loc": "437:26-437:27" + }, + { + "token": "NEWLINE", + "loc": "437:27-437:28" + }, + { + "token": [ + "LIDENT", + "i64x2_sub" + ], + "loc": "438:5-438:14" + }, + { + "token": "LPAREN", + "loc": "438:14-438:15" + }, + { + "token": [ + "LIDENT", + "v128_make" + ], + "loc": "438:15-438:24" + }, + { + "token": "LPAREN", + "loc": "438:24-438:25" + }, + { + "token": [ + "INT", + "0x0000000000000010UL" + ], + "loc": "438:25-438:45" + }, + { + "token": "COMMA", + "loc": "438:45-438:46" + }, + { + "token": [ + "INT", + "0x0000000000000020UL" + ], + "loc": "438:47-438:67" + }, + { + "token": "RPAREN", + "loc": "438:67-438:68" + }, + { + "token": "COMMA", + "loc": "438:68-438:69" + }, + { + "token": [ + "LIDENT", + "v128_make" + ], + "loc": "438:70-438:79" + }, + { + "token": "LPAREN", + "loc": "438:79-438:80" + }, + { + "token": [ + "INT", + "1UL" + ], + "loc": "438:80-438:83" + }, + { + "token": "COMMA", + "loc": "438:83-438:84" + }, + { + "token": [ + "INT", + "2UL" + ], + "loc": "438:85-438:88" + }, + { + "token": "RPAREN", + "loc": "438:88-438:89" + }, + { + "token": "RPAREN", + "loc": "438:89-438:90" + }, + { + "token": "COMMA", + "loc": "438:90-438:91" + }, + { + "token": "NEWLINE", + "loc": "438:91-438:92" + }, + { + "token": [ + "INT", + "0x000000000000000fUL" + ], + "loc": "439:5-439:25" + }, + { + "token": "COMMA", + "loc": "439:25-439:26" + }, + { + "token": "NEWLINE", + "loc": "439:26-439:27" + }, + { + "token": [ + "INT", + "0x000000000000001eUL" + ], + "loc": "440:5-440:25" + }, + { + "token": "COMMA", + "loc": "440:25-440:26" + }, + { + "token": "NEWLINE", + "loc": "440:26-440:27" + }, + { + "token": "RPAREN", + "loc": "441:3-441:4" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "441:4-441:4" + }, + { + "token": "NEWLINE", + "loc": "441:4-441:5" + }, + { + "token": [ + "LIDENT", + "check" + ], + "loc": "442:3-442:8" + }, + { + "token": "LPAREN", + "loc": "442:8-442:9" + }, + { + "token": "NEWLINE", + "loc": "442:9-442:10" + }, + { + "token": [ + "STRING", + "i8x16 shuffle intrinsic" + ], + "loc": "443:5-443:30" + }, + { + "token": "COMMA", + "loc": "443:30-443:31" + }, + { + "token": "NEWLINE", + "loc": "443:31-443:32" + }, + { + "token": [ + "LIDENT", + "i8x16_shuffle" + ], + "loc": "444:5-444:18" + }, + { + "token": "LPAREN", + "loc": "444:18-444:19" + }, + { + "token": [ + "LIDENT", + "a" + ], + "loc": "444:19-444:20" + }, + { + "token": "COMMA", + "loc": "444:20-444:21" + }, + { + "token": [ + "LIDENT", + "b" + ], + "loc": "444:22-444:23" + }, + { + "token": "COMMA", + "loc": "444:23-444:24" + }, + { + "token": [ + "INT", + "0" + ], + "loc": "444:25-444:26" + }, + { + "token": "COMMA", + "loc": "444:26-444:27" + }, + { + "token": [ + "INT", + "1" + ], + "loc": "444:28-444:29" + }, + { + "token": "COMMA", + "loc": "444:29-444:30" + }, + { + "token": [ + "INT", + "2" + ], + "loc": "444:31-444:32" + }, + { + "token": "COMMA", + "loc": "444:32-444:33" + }, + { + "token": [ + "INT", + "3" + ], + "loc": "444:34-444:35" + }, + { + "token": "COMMA", + "loc": "444:35-444:36" + }, + { + "token": [ + "INT", + "4" + ], + "loc": "444:37-444:38" + }, + { + "token": "COMMA", + "loc": "444:38-444:39" + }, + { + "token": [ + "INT", + "5" + ], + "loc": "444:40-444:41" + }, + { + "token": "COMMA", + "loc": "444:41-444:42" + }, + { + "token": [ + "INT", + "6" + ], + "loc": "444:43-444:44" + }, + { + "token": "COMMA", + "loc": "444:44-444:45" + }, + { + "token": [ + "INT", + "7" + ], + "loc": "444:46-444:47" + }, + { + "token": "COMMA", + "loc": "444:47-444:48" + }, + { + "token": [ + "INT", + "8" + ], + "loc": "444:49-444:50" + }, + { + "token": "COMMA", + "loc": "444:50-444:51" + }, + { + "token": [ + "INT", + "9" + ], + "loc": "444:52-444:53" + }, + { + "token": "COMMA", + "loc": "444:53-444:54" + }, + { + "token": [ + "INT", + "10" + ], + "loc": "444:55-444:57" + }, + { + "token": "COMMA", + "loc": "444:57-444:58" + }, + { + "token": [ + "INT", + "11" + ], + "loc": "444:59-444:61" + }, + { + "token": "COMMA", + "loc": "444:61-444:62" + }, + { + "token": [ + "INT", + "12" + ], + "loc": "444:63-444:65" + }, + { + "token": "COMMA", + "loc": "444:65-444:66" + }, + { + "token": [ + "INT", + "13" + ], + "loc": "444:67-444:69" + }, + { + "token": "COMMA", + "loc": "444:69-444:70" + }, + { + "token": [ + "INT", + "14" + ], + "loc": "444:71-444:73" + }, + { + "token": "COMMA", + "loc": "444:73-444:74" + }, + { + "token": [ + "INT", + "15" + ], + "loc": "444:75-444:77" + }, + { + "token": "RPAREN", + "loc": "444:77-444:78" + }, + { + "token": "COMMA", + "loc": "444:78-444:79" + }, + { + "token": "NEWLINE", + "loc": "444:79-444:80" + }, + { + "token": [ + "INT", + "0x0123456789abcdefUL" + ], + "loc": "445:5-445:25" + }, + { + "token": "COMMA", + "loc": "445:25-445:26" + }, + { + "token": "NEWLINE", + "loc": "445:26-445:27" + }, + { + "token": [ + "INT", + "0xfedcba9876543210UL" + ], + "loc": "446:5-446:25" + }, + { + "token": "COMMA", + "loc": "446:25-446:26" + }, + { + "token": "NEWLINE", + "loc": "446:26-446:27" + }, + { + "token": "RPAREN", + "loc": "447:3-447:4" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "447:4-447:4" + }, + { + "token": "NEWLINE", + "loc": "447:4-447:5" + }, + { + "token": [ + "LIDENT", + "check" + ], + "loc": "448:3-448:8" + }, + { + "token": "LPAREN", + "loc": "448:8-448:9" + }, + { + "token": "NEWLINE", + "loc": "448:9-448:10" + }, + { + "token": [ + "STRING", + "i8x16 shuffle across both vectors" + ], + "loc": "449:5-449:40" + }, + { + "token": "COMMA", + "loc": "449:40-449:41" + }, + { + "token": "NEWLINE", + "loc": "449:41-449:42" + }, + { + "token": [ + "LIDENT", + "i8x16_shuffle" + ], + "loc": "450:5-450:18" + }, + { + "token": "LPAREN", + "loc": "450:18-450:19" + }, + { + "token": [ + "LIDENT", + "a" + ], + "loc": "450:19-450:20" + }, + { + "token": "COMMA", + "loc": "450:20-450:21" + }, + { + "token": [ + "LIDENT", + "b" + ], + "loc": "450:22-450:23" + }, + { + "token": "COMMA", + "loc": "450:23-450:24" + }, + { + "token": [ + "INT", + "0" + ], + "loc": "450:25-450:26" + }, + { + "token": "COMMA", + "loc": "450:26-450:27" + }, + { + "token": [ + "INT", + "16" + ], + "loc": "450:28-450:30" + }, + { + "token": "COMMA", + "loc": "450:30-450:31" + }, + { + "token": [ + "INT", + "1" + ], + "loc": "450:32-450:33" + }, + { + "token": "COMMA", + "loc": "450:33-450:34" + }, + { + "token": [ + "INT", + "17" + ], + "loc": "450:35-450:37" + }, + { + "token": "COMMA", + "loc": "450:37-450:38" + }, + { + "token": [ + "INT", + "2" + ], + "loc": "450:39-450:40" + }, + { + "token": "COMMA", + "loc": "450:40-450:41" + }, + { + "token": [ + "INT", + "18" + ], + "loc": "450:42-450:44" + }, + { + "token": "COMMA", + "loc": "450:44-450:45" + }, + { + "token": [ + "INT", + "3" + ], + "loc": "450:46-450:47" + }, + { + "token": "COMMA", + "loc": "450:47-450:48" + }, + { + "token": [ + "INT", + "19" + ], + "loc": "450:49-450:51" + }, + { + "token": "COMMA", + "loc": "450:51-450:52" + }, + { + "token": [ + "INT", + "4" + ], + "loc": "450:53-450:54" + }, + { + "token": "COMMA", + "loc": "450:54-450:55" + }, + { + "token": [ + "INT", + "20" + ], + "loc": "450:56-450:58" + }, + { + "token": "COMMA", + "loc": "450:58-450:59" + }, + { + "token": [ + "INT", + "5" + ], + "loc": "450:60-450:61" + }, + { + "token": "COMMA", + "loc": "450:61-450:62" + }, + { + "token": [ + "INT", + "21" + ], + "loc": "450:63-450:65" + }, + { + "token": "COMMA", + "loc": "450:65-450:66" + }, + { + "token": [ + "INT", + "6" + ], + "loc": "450:67-450:68" + }, + { + "token": "COMMA", + "loc": "450:68-450:69" + }, + { + "token": [ + "INT", + "22" + ], + "loc": "450:70-450:72" + }, + { + "token": "COMMA", + "loc": "450:72-450:73" + }, + { + "token": [ + "INT", + "7" + ], + "loc": "450:74-450:75" + }, + { + "token": "COMMA", + "loc": "450:75-450:76" + }, + { + "token": [ + "INT", + "23" + ], + "loc": "450:77-450:79" + }, + { + "token": "RPAREN", + "loc": "450:79-450:80" + }, + { + "token": "COMMA", + "loc": "450:80-450:81" + }, + { + "token": "NEWLINE", + "loc": "450:81-450:82" + }, + { + "token": [ + "INT", + "0x228922ab22cd22efUL" + ], + "loc": "451:5-451:25" + }, + { + "token": "COMMA", + "loc": "451:25-451:26" + }, + { + "token": "NEWLINE", + "loc": "451:26-451:27" + }, + { + "token": [ + "INT", + "0x1101112311451167UL" + ], + "loc": "452:5-452:25" + }, + { + "token": "COMMA", + "loc": "452:25-452:26" + }, + { + "token": "NEWLINE", + "loc": "452:26-452:27" + }, + { + "token": "RPAREN", + "loc": "453:3-453:4" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "453:4-453:4" + }, + { + "token": "NEWLINE", + "loc": "453:4-453:5" + }, + { + "token": [ + "LIDENT", + "check" + ], + "loc": "454:3-454:8" + }, + { + "token": "LPAREN", + "loc": "454:8-454:9" + }, + { + "token": [ + "STRING", + "rebuild from bits" + ], + "loc": "454:9-454:28" + }, + { + "token": "COMMA", + "loc": "454:28-454:29" + }, + { + "token": [ + "LIDENT", + "pass_through" + ], + "loc": "454:30-454:42" + }, + { + "token": "LPAREN", + "loc": "454:42-454:43" + }, + { + "token": [ + "LIDENT", + "a" + ], + "loc": "454:43-454:44" + }, + { + "token": "RPAREN", + "loc": "454:44-454:45" + }, + { + "token": "COMMA", + "loc": "454:45-454:46" + }, + { + "token": [ + "INT", + "0x0123456789abcdefUL" + ], + "loc": "454:47-454:67" + }, + { + "token": "COMMA", + "loc": "454:67-454:68" + }, + { + "token": [ + "INT", + "0xfedcba9876543210UL" + ], + "loc": "454:69-454:89" + }, + { + "token": "RPAREN", + "loc": "454:89-454:90" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "454:90-454:90" + }, + { + "token": "NEWLINE", + "loc": "454:90-454:91" + }, + { + "token": [ + "LIDENT", + "check" + ], + "loc": "455:3-455:8" + }, + { + "token": "LPAREN", + "loc": "455:8-455:9" + }, + { + "token": [ + "STRING", + "if true" + ], + "loc": "455:9-455:18" + }, + { + "token": "COMMA", + "loc": "455:18-455:19" + }, + { + "token": [ + "LIDENT", + "choose" + ], + "loc": "455:20-455:26" + }, + { + "token": "LPAREN", + "loc": "455:26-455:27" + }, + { + "token": "TRUE", + "loc": "455:27-455:31" + }, + { + "token": "COMMA", + "loc": "455:31-455:32" + }, + { + "token": [ + "LIDENT", + "a" + ], + "loc": "455:33-455:34" + }, + { + "token": "COMMA", + "loc": "455:34-455:35" + }, + { + "token": [ + "LIDENT", + "b" + ], + "loc": "455:36-455:37" + }, + { + "token": "RPAREN", + "loc": "455:37-455:38" + }, + { + "token": "COMMA", + "loc": "455:38-455:39" + }, + { + "token": [ + "INT", + "0x0123456789abcdefUL" + ], + "loc": "455:40-455:60" + }, + { + "token": "COMMA", + "loc": "455:60-455:61" + }, + { + "token": [ + "INT", + "0xfedcba9876543210UL" + ], + "loc": "455:62-455:82" + }, + { + "token": "RPAREN", + "loc": "455:82-455:83" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "455:83-455:83" + }, + { + "token": "NEWLINE", + "loc": "455:83-455:84" + }, + { + "token": [ + "LIDENT", + "check" + ], + "loc": "456:3-456:8" + }, + { + "token": "LPAREN", + "loc": "456:8-456:9" + }, + { + "token": [ + "STRING", + "if false" + ], + "loc": "456:9-456:19" + }, + { + "token": "COMMA", + "loc": "456:19-456:20" + }, + { + "token": [ + "LIDENT", + "choose" + ], + "loc": "456:21-456:27" + }, + { + "token": "LPAREN", + "loc": "456:27-456:28" + }, + { + "token": "FALSE", + "loc": "456:28-456:33" + }, + { + "token": "COMMA", + "loc": "456:33-456:34" + }, + { + "token": [ + "LIDENT", + "a" + ], + "loc": "456:35-456:36" + }, + { + "token": "COMMA", + "loc": "456:36-456:37" + }, + { + "token": [ + "LIDENT", + "b" + ], + "loc": "456:38-456:39" + }, + { + "token": "RPAREN", + "loc": "456:39-456:40" + }, + { + "token": "COMMA", + "loc": "456:40-456:41" + }, + { + "token": [ + "INT", + "0x1111111122222222UL" + ], + "loc": "456:42-456:62" + }, + { + "token": "COMMA", + "loc": "456:62-456:63" + }, + { + "token": [ + "INT", + "0x3333333344444444UL" + ], + "loc": "456:64-456:84" + }, + { + "token": "RPAREN", + "loc": "456:84-456:85" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "456:85-456:85" + }, + { + "token": "NEWLINE", + "loc": "456:85-456:86" + }, + { + "token": [ + "LIDENT", + "check_bool" + ], + "loc": "457:3-457:13" + }, + { + "token": "LPAREN", + "loc": "457:13-457:14" + }, + { + "token": [ + "STRING", + "physical equal same bits" + ], + "loc": "457:14-457:40" + }, + { + "token": "COMMA", + "loc": "457:40-457:41" + }, + { + "token": [ + "LIDENT", + "physical_equal" + ], + "loc": "457:42-457:56" + }, + { + "token": "LPAREN", + "loc": "457:56-457:57" + }, + { + "token": [ + "LIDENT", + "a" + ], + "loc": "457:57-457:58" + }, + { + "token": "COMMA", + "loc": "457:58-457:59" + }, + { + "token": [ + "LIDENT", + "pass_through" + ], + "loc": "457:60-457:72" + }, + { + "token": "LPAREN", + "loc": "457:72-457:73" + }, + { + "token": [ + "LIDENT", + "a" + ], + "loc": "457:73-457:74" + }, + { + "token": "RPAREN", + "loc": "457:74-457:75" + }, + { + "token": "RPAREN", + "loc": "457:75-457:76" + }, + { + "token": "RPAREN", + "loc": "457:76-457:77" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "457:77-457:77" + }, + { + "token": "NEWLINE", + "loc": "457:77-457:78" + }, + { + "token": [ + "LIDENT", + "check_bool" + ], + "loc": "458:3-458:13" + }, + { + "token": "LPAREN", + "loc": "458:13-458:14" + }, + { + "token": [ + "STRING", + "physical equal different bits" + ], + "loc": "458:14-458:45" + }, + { + "token": "COMMA", + "loc": "458:45-458:46" + }, + { + "token": [ + "LIDENT", + "physical_equal" + ], + "loc": "458:47-458:61" + }, + { + "token": "LPAREN", + "loc": "458:61-458:62" + }, + { + "token": [ + "LIDENT", + "a" + ], + "loc": "458:62-458:63" + }, + { + "token": "COMMA", + "loc": "458:63-458:64" + }, + { + "token": [ + "LIDENT", + "b" + ], + "loc": "458:65-458:66" + }, + { + "token": "RPAREN", + "loc": "458:66-458:67" + }, + { + "token": [ + "INFIX1", + "==" + ], + "loc": "458:68-458:70" + }, + { + "token": "FALSE", + "loc": "458:71-458:76" + }, + { + "token": "RPAREN", + "loc": "458:76-458:77" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "458:77-458:77" + }, + { + "token": "NEWLINE", + "loc": "458:77-458:78" + }, + { + "token": "NEWLINE", + "loc": "459:1-459:2" + }, + { + "token": "LET", + "loc": "460:3-460:6" + }, + { + "token": [ + "LIDENT", + "xs" + ], + "loc": "460:7-460:9" + }, + { + "token": "COLON", + "loc": "460:10-460:11" + }, + { + "token": [ + "UIDENT", + "Array" + ], + "loc": "460:12-460:17" + }, + { + "token": "LBRACKET", + "loc": "460:17-460:18" + }, + { + "token": [ + "UIDENT", + "V128" + ], + "loc": "460:18-460:22" + }, + { + "token": "RBRACKET", + "loc": "460:22-460:23" + }, + { + "token": "EQUAL", + "loc": "460:24-460:25" + }, + { + "token": [ + "UIDENT", + "Array" + ], + "loc": "460:26-460:31" + }, + { + "token": "COLONCOLON", + "loc": "460:31-460:33" + }, + { + "token": [ + "LIDENT", + "make" + ], + "loc": "460:33-460:37" + }, + { + "token": "LPAREN", + "loc": "460:37-460:38" + }, + { + "token": [ + "INT", + "5" + ], + "loc": "460:38-460:39" + }, + { + "token": "COMMA", + "loc": "460:39-460:40" + }, + { + "token": [ + "LIDENT", + "a" + ], + "loc": "460:41-460:42" + }, + { + "token": "RPAREN", + "loc": "460:42-460:43" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "460:43-460:43" + }, + { + "token": "NEWLINE", + "loc": "460:43-460:44" + }, + { + "token": [ + "LIDENT", + "check_bool" + ], + "loc": "461:3-461:13" + }, + { + "token": "LPAREN", + "loc": "461:13-461:14" + }, + { + "token": [ + "STRING", + "array length" + ], + "loc": "461:14-461:28" + }, + { + "token": "COMMA", + "loc": "461:28-461:29" + }, + { + "token": [ + "LIDENT", + "xs" + ], + "loc": "461:30-461:32" + }, + { + "token": [ + "DOT_LIDENT", + "length" + ], + "loc": "461:33-461:39" + }, + { + "token": "LPAREN", + "loc": "461:39-461:40" + }, + { + "token": "RPAREN", + "loc": "461:40-461:41" + }, + { + "token": [ + "INFIX1", + "==" + ], + "loc": "461:42-461:44" + }, + { + "token": [ + "INT", + "5" + ], + "loc": "461:45-461:46" + }, + { + "token": "RPAREN", + "loc": "461:46-461:47" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "461:47-461:47" + }, + { + "token": "NEWLINE", + "loc": "461:47-461:48" + }, + { + "token": [ + "LIDENT", + "check" + ], + "loc": "462:3-462:8" + }, + { + "token": "LPAREN", + "loc": "462:8-462:9" + }, + { + "token": [ + "STRING", + "array make first" + ], + "loc": "462:9-462:27" + }, + { + "token": "COMMA", + "loc": "462:27-462:28" + }, + { + "token": [ + "LIDENT", + "xs" + ], + "loc": "462:29-462:31" + }, + { + "token": [ + "DOT_LIDENT", + "unsafe_get" + ], + "loc": "462:32-462:42" + }, + { + "token": "LPAREN", + "loc": "462:42-462:43" + }, + { + "token": [ + "INT", + "0" + ], + "loc": "462:43-462:44" + }, + { + "token": "RPAREN", + "loc": "462:44-462:45" + }, + { + "token": "COMMA", + "loc": "462:45-462:46" + }, + { + "token": [ + "INT", + "0x0123456789abcdefUL" + ], + "loc": "462:47-462:67" + }, + { + "token": "COMMA", + "loc": "462:67-462:68" + }, + { + "token": [ + "INT", + "0xfedcba9876543210UL" + ], + "loc": "462:69-462:89" + }, + { + "token": "RPAREN", + "loc": "462:89-462:90" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "462:90-462:90" + }, + { + "token": "NEWLINE", + "loc": "462:90-462:91" + }, + { + "token": [ + "LIDENT", + "check" + ], + "loc": "463:3-463:8" + }, + { + "token": "LPAREN", + "loc": "463:8-463:9" + }, + { + "token": [ + "STRING", + "array make middle" + ], + "loc": "463:9-463:28" + }, + { + "token": "COMMA", + "loc": "463:28-463:29" + }, + { + "token": [ + "LIDENT", + "xs" + ], + "loc": "463:30-463:32" + }, + { + "token": [ + "DOT_LIDENT", + "unsafe_get" + ], + "loc": "463:33-463:43" + }, + { + "token": "LPAREN", + "loc": "463:43-463:44" + }, + { + "token": [ + "INT", + "2" + ], + "loc": "463:44-463:45" + }, + { + "token": "RPAREN", + "loc": "463:45-463:46" + }, + { + "token": "COMMA", + "loc": "463:46-463:47" + }, + { + "token": [ + "INT", + "0x0123456789abcdefUL" + ], + "loc": "463:48-463:68" + }, + { + "token": "COMMA", + "loc": "463:68-463:69" + }, + { + "token": [ + "INT", + "0xfedcba9876543210UL" + ], + "loc": "463:70-463:90" + }, + { + "token": "RPAREN", + "loc": "463:90-463:91" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "463:91-463:91" + }, + { + "token": "NEWLINE", + "loc": "463:91-463:92" + }, + { + "token": [ + "LIDENT", + "check" + ], + "loc": "464:3-464:8" + }, + { + "token": "LPAREN", + "loc": "464:8-464:9" + }, + { + "token": [ + "STRING", + "array make last" + ], + "loc": "464:9-464:26" + }, + { + "token": "COMMA", + "loc": "464:26-464:27" + }, + { + "token": [ + "LIDENT", + "xs" + ], + "loc": "464:28-464:30" + }, + { + "token": [ + "DOT_LIDENT", + "unsafe_get" + ], + "loc": "464:31-464:41" + }, + { + "token": "LPAREN", + "loc": "464:41-464:42" + }, + { + "token": [ + "INT", + "4" + ], + "loc": "464:42-464:43" + }, + { + "token": "RPAREN", + "loc": "464:43-464:44" + }, + { + "token": "COMMA", + "loc": "464:44-464:45" + }, + { + "token": [ + "INT", + "0x0123456789abcdefUL" + ], + "loc": "464:46-464:66" + }, + { + "token": "COMMA", + "loc": "464:66-464:67" + }, + { + "token": [ + "INT", + "0xfedcba9876543210UL" + ], + "loc": "464:68-464:88" + }, + { + "token": "RPAREN", + "loc": "464:88-464:89" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "464:89-464:89" + }, + { + "token": "NEWLINE", + "loc": "464:89-464:90" + }, + { + "token": [ + "LIDENT", + "xs" + ], + "loc": "465:3-465:5" + }, + { + "token": [ + "DOT_LIDENT", + "unsafe_set" + ], + "loc": "465:6-465:16" + }, + { + "token": "LPAREN", + "loc": "465:16-465:17" + }, + { + "token": [ + "INT", + "1" + ], + "loc": "465:17-465:18" + }, + { + "token": "COMMA", + "loc": "465:18-465:19" + }, + { + "token": [ + "LIDENT", + "b" + ], + "loc": "465:20-465:21" + }, + { + "token": "RPAREN", + "loc": "465:21-465:22" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "465:22-465:22" + }, + { + "token": "NEWLINE", + "loc": "465:22-465:23" + }, + { + "token": [ + "LIDENT", + "xs" + ], + "loc": "466:3-466:5" + }, + { + "token": [ + "DOT_LIDENT", + "unsafe_set" + ], + "loc": "466:6-466:16" + }, + { + "token": "LPAREN", + "loc": "466:16-466:17" + }, + { + "token": [ + "INT", + "3" + ], + "loc": "466:17-466:18" + }, + { + "token": "COMMA", + "loc": "466:18-466:19" + }, + { + "token": [ + "LIDENT", + "c" + ], + "loc": "466:20-466:21" + }, + { + "token": "RPAREN", + "loc": "466:21-466:22" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "466:22-466:22" + }, + { + "token": "NEWLINE", + "loc": "466:22-466:23" + }, + { + "token": [ + "LIDENT", + "check" + ], + "loc": "467:3-467:8" + }, + { + "token": "LPAREN", + "loc": "467:8-467:9" + }, + { + "token": [ + "STRING", + "array set first preserved" + ], + "loc": "467:9-467:36" + }, + { + "token": "COMMA", + "loc": "467:36-467:37" + }, + { + "token": [ + "LIDENT", + "xs" + ], + "loc": "467:38-467:40" + }, + { + "token": [ + "DOT_LIDENT", + "unsafe_get" + ], + "loc": "467:41-467:51" + }, + { + "token": "LPAREN", + "loc": "467:51-467:52" + }, + { + "token": [ + "INT", + "0" + ], + "loc": "467:52-467:53" + }, + { + "token": "RPAREN", + "loc": "467:53-467:54" + }, + { + "token": "COMMA", + "loc": "467:54-467:55" + }, + { + "token": [ + "INT", + "0x0123456789abcdefUL" + ], + "loc": "467:56-467:76" + }, + { + "token": "COMMA", + "loc": "467:76-467:77" + }, + { + "token": [ + "INT", + "0xfedcba9876543210UL" + ], + "loc": "467:78-467:98" + }, + { + "token": "RPAREN", + "loc": "467:98-467:99" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "467:99-467:99" + }, + { + "token": "NEWLINE", + "loc": "467:99-467:100" + }, + { + "token": [ + "LIDENT", + "check" + ], + "loc": "468:3-468:8" + }, + { + "token": "LPAREN", + "loc": "468:8-468:9" + }, + { + "token": [ + "STRING", + "array set index 1" + ], + "loc": "468:9-468:28" + }, + { + "token": "COMMA", + "loc": "468:28-468:29" + }, + { + "token": [ + "LIDENT", + "xs" + ], + "loc": "468:30-468:32" + }, + { + "token": [ + "DOT_LIDENT", + "unsafe_get" + ], + "loc": "468:33-468:43" + }, + { + "token": "LPAREN", + "loc": "468:43-468:44" + }, + { + "token": [ + "INT", + "1" + ], + "loc": "468:44-468:45" + }, + { + "token": "RPAREN", + "loc": "468:45-468:46" + }, + { + "token": "COMMA", + "loc": "468:46-468:47" + }, + { + "token": [ + "INT", + "0x1111111122222222UL" + ], + "loc": "468:48-468:68" + }, + { + "token": "COMMA", + "loc": "468:68-468:69" + }, + { + "token": [ + "INT", + "0x3333333344444444UL" + ], + "loc": "468:70-468:90" + }, + { + "token": "RPAREN", + "loc": "468:90-468:91" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "468:91-468:91" + }, + { + "token": "NEWLINE", + "loc": "468:91-468:92" + }, + { + "token": [ + "LIDENT", + "check" + ], + "loc": "469:3-469:8" + }, + { + "token": "LPAREN", + "loc": "469:8-469:9" + }, + { + "token": [ + "STRING", + "array set neighbor preserved" + ], + "loc": "469:9-469:39" + }, + { + "token": "COMMA", + "loc": "469:39-469:40" + }, + { + "token": [ + "LIDENT", + "xs" + ], + "loc": "469:41-469:43" + }, + { + "token": [ + "DOT_LIDENT", + "unsafe_get" + ], + "loc": "469:44-469:54" + }, + { + "token": "LPAREN", + "loc": "469:54-469:55" + }, + { + "token": [ + "INT", + "2" + ], + "loc": "469:55-469:56" + }, + { + "token": "RPAREN", + "loc": "469:56-469:57" + }, + { + "token": "COMMA", + "loc": "469:57-469:58" + }, + { + "token": [ + "INT", + "0x0123456789abcdefUL" + ], + "loc": "469:59-469:79" + }, + { + "token": "COMMA", + "loc": "469:79-469:80" + }, + { + "token": [ + "INT", + "0xfedcba9876543210UL" + ], + "loc": "469:81-469:101" + }, + { + "token": "RPAREN", + "loc": "469:101-469:102" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "469:102-469:102" + }, + { + "token": "NEWLINE", + "loc": "469:102-469:103" + }, + { + "token": [ + "LIDENT", + "check" + ], + "loc": "470:3-470:8" + }, + { + "token": "LPAREN", + "loc": "470:8-470:9" + }, + { + "token": [ + "STRING", + "array set index 3" + ], + "loc": "470:9-470:28" + }, + { + "token": "COMMA", + "loc": "470:28-470:29" + }, + { + "token": [ + "LIDENT", + "xs" + ], + "loc": "470:30-470:32" + }, + { + "token": [ + "DOT_LIDENT", + "unsafe_get" + ], + "loc": "470:33-470:43" + }, + { + "token": "LPAREN", + "loc": "470:43-470:44" + }, + { + "token": [ + "INT", + "3" + ], + "loc": "470:44-470:45" + }, + { + "token": "RPAREN", + "loc": "470:45-470:46" + }, + { + "token": "COMMA", + "loc": "470:46-470:47" + }, + { + "token": [ + "INT", + "0xffffffffffffffffUL" + ], + "loc": "470:48-470:68" + }, + { + "token": "COMMA", + "loc": "470:68-470:69" + }, + { + "token": [ + "INT", + "0x8000000000000000UL" + ], + "loc": "470:70-470:90" + }, + { + "token": "RPAREN", + "loc": "470:90-470:91" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "470:91-470:91" + }, + { + "token": "NEWLINE", + "loc": "470:91-470:92" + }, + { + "token": [ + "LIDENT", + "check" + ], + "loc": "471:3-471:8" + }, + { + "token": "LPAREN", + "loc": "471:8-471:9" + }, + { + "token": [ + "STRING", + "array set last preserved" + ], + "loc": "471:9-471:35" + }, + { + "token": "COMMA", + "loc": "471:35-471:36" + }, + { + "token": [ + "LIDENT", + "xs" + ], + "loc": "471:37-471:39" + }, + { + "token": [ + "DOT_LIDENT", + "unsafe_get" + ], + "loc": "471:40-471:50" + }, + { + "token": "LPAREN", + "loc": "471:50-471:51" + }, + { + "token": [ + "INT", + "4" + ], + "loc": "471:51-471:52" + }, + { + "token": "RPAREN", + "loc": "471:52-471:53" + }, + { + "token": "COMMA", + "loc": "471:53-471:54" + }, + { + "token": [ + "INT", + "0x0123456789abcdefUL" + ], + "loc": "471:55-471:75" + }, + { + "token": "COMMA", + "loc": "471:75-471:76" + }, + { + "token": [ + "INT", + "0xfedcba9876543210UL" + ], + "loc": "471:77-471:97" + }, + { + "token": "RPAREN", + "loc": "471:97-471:98" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "471:98-471:98" + }, + { + "token": "NEWLINE", + "loc": "471:98-471:99" + }, + { + "token": "LET", + "loc": "472:3-472:6" + }, + { + "token": [ + "LIDENT", + "xs_copy" + ], + "loc": "472:7-472:14" + }, + { + "token": "EQUAL", + "loc": "472:15-472:16" + }, + { + "token": [ + "LIDENT", + "xs" + ], + "loc": "472:17-472:19" + }, + { + "token": [ + "DOT_LIDENT", + "copy" + ], + "loc": "472:20-472:24" + }, + { + "token": "LPAREN", + "loc": "472:24-472:25" + }, + { + "token": "RPAREN", + "loc": "472:25-472:26" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "472:26-472:26" + }, + { + "token": "NEWLINE", + "loc": "472:26-472:27" + }, + { + "token": [ + "LIDENT", + "check_bool" + ], + "loc": "473:3-473:13" + }, + { + "token": "LPAREN", + "loc": "473:13-473:14" + }, + { + "token": [ + "STRING", + "array copy length" + ], + "loc": "473:14-473:33" + }, + { + "token": "COMMA", + "loc": "473:33-473:34" + }, + { + "token": [ + "LIDENT", + "xs_copy" + ], + "loc": "473:35-473:42" + }, + { + "token": [ + "DOT_LIDENT", + "length" + ], + "loc": "473:43-473:49" + }, + { + "token": "LPAREN", + "loc": "473:49-473:50" + }, + { + "token": "RPAREN", + "loc": "473:50-473:51" + }, + { + "token": [ + "INFIX1", + "==" + ], + "loc": "473:52-473:54" + }, + { + "token": [ + "INT", + "5" + ], + "loc": "473:55-473:56" + }, + { + "token": "RPAREN", + "loc": "473:56-473:57" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "473:57-473:57" + }, + { + "token": "NEWLINE", + "loc": "473:57-473:58" + }, + { + "token": [ + "LIDENT", + "check" + ], + "loc": "474:3-474:8" + }, + { + "token": "LPAREN", + "loc": "474:8-474:9" + }, + { + "token": [ + "STRING", + "array copy index 1" + ], + "loc": "474:9-474:29" + }, + { + "token": "COMMA", + "loc": "474:29-474:30" + }, + { + "token": [ + "LIDENT", + "xs_copy" + ], + "loc": "474:31-474:38" + }, + { + "token": [ + "DOT_LIDENT", + "unsafe_get" + ], + "loc": "474:39-474:49" + }, + { + "token": "LPAREN", + "loc": "474:49-474:50" + }, + { + "token": [ + "INT", + "1" + ], + "loc": "474:50-474:51" + }, + { + "token": "RPAREN", + "loc": "474:51-474:52" + }, + { + "token": "COMMA", + "loc": "474:52-474:53" + }, + { + "token": [ + "INT", + "0x1111111122222222UL" + ], + "loc": "474:54-474:74" + }, + { + "token": "COMMA", + "loc": "474:74-474:75" + }, + { + "token": [ + "INT", + "0x3333333344444444UL" + ], + "loc": "474:76-474:96" + }, + { + "token": "RPAREN", + "loc": "474:96-474:97" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "474:97-474:97" + }, + { + "token": "NEWLINE", + "loc": "474:97-474:98" + }, + { + "token": [ + "LIDENT", + "check" + ], + "loc": "475:3-475:8" + }, + { + "token": "LPAREN", + "loc": "475:8-475:9" + }, + { + "token": [ + "STRING", + "array copy index 3" + ], + "loc": "475:9-475:29" + }, + { + "token": "COMMA", + "loc": "475:29-475:30" + }, + { + "token": [ + "LIDENT", + "xs_copy" + ], + "loc": "475:31-475:38" + }, + { + "token": [ + "DOT_LIDENT", + "unsafe_get" + ], + "loc": "475:39-475:49" + }, + { + "token": "LPAREN", + "loc": "475:49-475:50" + }, + { + "token": [ + "INT", + "3" + ], + "loc": "475:50-475:51" + }, + { + "token": "RPAREN", + "loc": "475:51-475:52" + }, + { + "token": "COMMA", + "loc": "475:52-475:53" + }, + { + "token": [ + "INT", + "0xffffffffffffffffUL" + ], + "loc": "475:54-475:74" + }, + { + "token": "COMMA", + "loc": "475:74-475:75" + }, + { + "token": [ + "INT", + "0x8000000000000000UL" + ], + "loc": "475:76-475:96" + }, + { + "token": "RPAREN", + "loc": "475:96-475:97" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "475:97-475:97" + }, + { + "token": "NEWLINE", + "loc": "475:97-475:98" + }, + { + "token": "NEWLINE", + "loc": "476:1-476:2" + }, + { + "token": "LET", + "loc": "477:3-477:6" + }, + { + "token": [ + "LIDENT", + "empty_xs" + ], + "loc": "477:7-477:15" + }, + { + "token": "COLON", + "loc": "477:16-477:17" + }, + { + "token": [ + "UIDENT", + "Array" + ], + "loc": "477:18-477:23" + }, + { + "token": "LBRACKET", + "loc": "477:23-477:24" + }, + { + "token": [ + "UIDENT", + "V128" + ], + "loc": "477:24-477:28" + }, + { + "token": "RBRACKET", + "loc": "477:28-477:29" + }, + { + "token": "EQUAL", + "loc": "477:30-477:31" + }, + { + "token": "LBRACKET", + "loc": "477:32-477:33" + }, + { + "token": "RBRACKET", + "loc": "477:33-477:34" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "477:34-477:34" + }, + { + "token": "NEWLINE", + "loc": "477:34-477:35" + }, + { + "token": [ + "LIDENT", + "check_bool" + ], + "loc": "478:3-478:13" + }, + { + "token": "LPAREN", + "loc": "478:13-478:14" + }, + { + "token": [ + "STRING", + "empty array literal length" + ], + "loc": "478:14-478:42" + }, + { + "token": "COMMA", + "loc": "478:42-478:43" + }, + { + "token": [ + "LIDENT", + "empty_xs" + ], + "loc": "478:44-478:52" + }, + { + "token": [ + "DOT_LIDENT", + "length" + ], + "loc": "478:53-478:59" + }, + { + "token": "LPAREN", + "loc": "478:59-478:60" + }, + { + "token": "RPAREN", + "loc": "478:60-478:61" + }, + { + "token": [ + "INFIX1", + "==" + ], + "loc": "478:62-478:64" + }, + { + "token": [ + "INT", + "0" + ], + "loc": "478:65-478:66" + }, + { + "token": "RPAREN", + "loc": "478:66-478:67" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "478:67-478:67" + }, + { + "token": "NEWLINE", + "loc": "478:67-478:68" + }, + { + "token": "LET", + "loc": "479:3-479:6" + }, + { + "token": [ + "LIDENT", + "zero_xs" + ], + "loc": "479:7-479:14" + }, + { + "token": "COLON", + "loc": "479:15-479:16" + }, + { + "token": [ + "UIDENT", + "Array" + ], + "loc": "479:17-479:22" + }, + { + "token": "LBRACKET", + "loc": "479:22-479:23" + }, + { + "token": [ + "UIDENT", + "V128" + ], + "loc": "479:23-479:27" + }, + { + "token": "RBRACKET", + "loc": "479:27-479:28" + }, + { + "token": "EQUAL", + "loc": "479:29-479:30" + }, + { + "token": [ + "UIDENT", + "Array" + ], + "loc": "479:31-479:36" + }, + { + "token": "COLONCOLON", + "loc": "479:36-479:38" + }, + { + "token": [ + "LIDENT", + "make" + ], + "loc": "479:38-479:42" + }, + { + "token": "LPAREN", + "loc": "479:42-479:43" + }, + { + "token": [ + "INT", + "0" + ], + "loc": "479:43-479:44" + }, + { + "token": "COMMA", + "loc": "479:44-479:45" + }, + { + "token": [ + "LIDENT", + "a" + ], + "loc": "479:46-479:47" + }, + { + "token": "RPAREN", + "loc": "479:47-479:48" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "479:48-479:48" + }, + { + "token": "NEWLINE", + "loc": "479:48-479:49" + }, + { + "token": [ + "LIDENT", + "check_bool" + ], + "loc": "480:3-480:13" + }, + { + "token": "LPAREN", + "loc": "480:13-480:14" + }, + { + "token": [ + "STRING", + "array make zero length" + ], + "loc": "480:14-480:38" + }, + { + "token": "COMMA", + "loc": "480:38-480:39" + }, + { + "token": [ + "LIDENT", + "zero_xs" + ], + "loc": "480:40-480:47" + }, + { + "token": [ + "DOT_LIDENT", + "length" + ], + "loc": "480:48-480:54" + }, + { + "token": "LPAREN", + "loc": "480:54-480:55" + }, + { + "token": "RPAREN", + "loc": "480:55-480:56" + }, + { + "token": [ + "INFIX1", + "==" + ], + "loc": "480:57-480:59" + }, + { + "token": [ + "INT", + "0" + ], + "loc": "480:60-480:61" + }, + { + "token": "RPAREN", + "loc": "480:61-480:62" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "480:62-480:62" + }, + { + "token": "NEWLINE", + "loc": "480:62-480:63" + }, + { + "token": "NEWLINE", + "loc": "481:1-481:2" + }, + { + "token": "LET", + "loc": "482:3-482:6" + }, + { + "token": [ + "LIDENT", + "ys" + ], + "loc": "482:7-482:9" + }, + { + "token": "COLON", + "loc": "482:10-482:11" + }, + { + "token": [ + "UIDENT", + "Array" + ], + "loc": "482:12-482:17" + }, + { + "token": "LBRACKET", + "loc": "482:17-482:18" + }, + { + "token": [ + "UIDENT", + "V128" + ], + "loc": "482:18-482:22" + }, + { + "token": "RBRACKET", + "loc": "482:22-482:23" + }, + { + "token": "EQUAL", + "loc": "482:24-482:25" + }, + { + "token": [ + "UIDENT", + "Array" + ], + "loc": "482:26-482:31" + }, + { + "token": "COLONCOLON", + "loc": "482:31-482:33" + }, + { + "token": [ + "LIDENT", + "makei" + ], + "loc": "482:33-482:38" + }, + { + "token": "LPAREN", + "loc": "482:38-482:39" + }, + { + "token": [ + "INT", + "6" + ], + "loc": "482:39-482:40" + }, + { + "token": "COMMA", + "loc": "482:40-482:41" + }, + { + "token": [ + "LIDENT", + "make_by_index" + ], + "loc": "482:42-482:55" + }, + { + "token": "RPAREN", + "loc": "482:55-482:56" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "482:56-482:56" + }, + { + "token": "NEWLINE", + "loc": "482:56-482:57" + }, + { + "token": [ + "LIDENT", + "check_bool" + ], + "loc": "483:3-483:13" + }, + { + "token": "LPAREN", + "loc": "483:13-483:14" + }, + { + "token": [ + "STRING", + "array makei length" + ], + "loc": "483:14-483:34" + }, + { + "token": "COMMA", + "loc": "483:34-483:35" + }, + { + "token": [ + "LIDENT", + "ys" + ], + "loc": "483:36-483:38" + }, + { + "token": [ + "DOT_LIDENT", + "length" + ], + "loc": "483:39-483:45" + }, + { + "token": "LPAREN", + "loc": "483:45-483:46" + }, + { + "token": "RPAREN", + "loc": "483:46-483:47" + }, + { + "token": [ + "INFIX1", + "==" + ], + "loc": "483:48-483:50" + }, + { + "token": [ + "INT", + "6" + ], + "loc": "483:51-483:52" + }, + { + "token": "RPAREN", + "loc": "483:52-483:53" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "483:53-483:53" + }, + { + "token": "NEWLINE", + "loc": "483:53-483:54" + }, + { + "token": [ + "LIDENT", + "check" + ], + "loc": "484:3-484:8" + }, + { + "token": "LPAREN", + "loc": "484:8-484:9" + }, + { + "token": [ + "STRING", + "array makei index 0" + ], + "loc": "484:9-484:30" + }, + { + "token": "COMMA", + "loc": "484:30-484:31" + }, + { + "token": [ + "LIDENT", + "ys" + ], + "loc": "484:32-484:34" + }, + { + "token": [ + "DOT_LIDENT", + "unsafe_get" + ], + "loc": "484:35-484:45" + }, + { + "token": "LPAREN", + "loc": "484:45-484:46" + }, + { + "token": [ + "INT", + "0" + ], + "loc": "484:46-484:47" + }, + { + "token": "RPAREN", + "loc": "484:47-484:48" + }, + { + "token": "COMMA", + "loc": "484:48-484:49" + }, + { + "token": [ + "INT", + "0x0000000000000000UL" + ], + "loc": "484:50-484:70" + }, + { + "token": "COMMA", + "loc": "484:70-484:71" + }, + { + "token": [ + "INT", + "0x0000000000000001UL" + ], + "loc": "484:72-484:92" + }, + { + "token": "RPAREN", + "loc": "484:92-484:93" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "484:93-484:93" + }, + { + "token": "NEWLINE", + "loc": "484:93-484:94" + }, + { + "token": [ + "LIDENT", + "check" + ], + "loc": "485:3-485:8" + }, + { + "token": "LPAREN", + "loc": "485:8-485:9" + }, + { + "token": [ + "STRING", + "array makei index 3" + ], + "loc": "485:9-485:30" + }, + { + "token": "COMMA", + "loc": "485:30-485:31" + }, + { + "token": [ + "LIDENT", + "ys" + ], + "loc": "485:32-485:34" + }, + { + "token": [ + "DOT_LIDENT", + "unsafe_get" + ], + "loc": "485:35-485:45" + }, + { + "token": "LPAREN", + "loc": "485:45-485:46" + }, + { + "token": [ + "INT", + "3" + ], + "loc": "485:46-485:47" + }, + { + "token": "RPAREN", + "loc": "485:47-485:48" + }, + { + "token": "COMMA", + "loc": "485:48-485:49" + }, + { + "token": [ + "INT", + "0x3333333333333333UL" + ], + "loc": "485:50-485:70" + }, + { + "token": "COMMA", + "loc": "485:70-485:71" + }, + { + "token": [ + "INT", + "0x3333333333333334UL" + ], + "loc": "485:72-485:92" + }, + { + "token": "RPAREN", + "loc": "485:92-485:93" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "485:93-485:93" + }, + { + "token": "NEWLINE", + "loc": "485:93-485:94" + }, + { + "token": [ + "LIDENT", + "check" + ], + "loc": "486:3-486:8" + }, + { + "token": "LPAREN", + "loc": "486:8-486:9" + }, + { + "token": [ + "STRING", + "array makei index 5" + ], + "loc": "486:9-486:30" + }, + { + "token": "COMMA", + "loc": "486:30-486:31" + }, + { + "token": [ + "LIDENT", + "ys" + ], + "loc": "486:32-486:34" + }, + { + "token": [ + "DOT_LIDENT", + "unsafe_get" + ], + "loc": "486:35-486:45" + }, + { + "token": "LPAREN", + "loc": "486:45-486:46" + }, + { + "token": [ + "INT", + "5" + ], + "loc": "486:46-486:47" + }, + { + "token": "RPAREN", + "loc": "486:47-486:48" + }, + { + "token": "COMMA", + "loc": "486:48-486:49" + }, + { + "token": [ + "INT", + "0xffffffffffffffffUL" + ], + "loc": "486:50-486:70" + }, + { + "token": "COMMA", + "loc": "486:70-486:71" + }, + { + "token": [ + "INT", + "0xeeeeeeeeeeeeeeeeUL" + ], + "loc": "486:72-486:92" + }, + { + "token": "RPAREN", + "loc": "486:92-486:93" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "486:93-486:93" + }, + { + "token": "NEWLINE", + "loc": "486:93-486:94" + }, + { + "token": "NEWLINE", + "loc": "487:1-487:2" + }, + { + "token": "LET", + "loc": "488:3-488:6" + }, + { + "token": [ + "LIDENT", + "zs" + ], + "loc": "488:7-488:9" + }, + { + "token": "COLON", + "loc": "488:10-488:11" + }, + { + "token": [ + "UIDENT", + "FixedArray" + ], + "loc": "488:12-488:22" + }, + { + "token": "LBRACKET", + "loc": "488:22-488:23" + }, + { + "token": [ + "UIDENT", + "V128" + ], + "loc": "488:23-488:27" + }, + { + "token": "RBRACKET", + "loc": "488:27-488:28" + }, + { + "token": "EQUAL", + "loc": "488:29-488:30" + }, + { + "token": [ + "UIDENT", + "FixedArray" + ], + "loc": "488:31-488:41" + }, + { + "token": "COLONCOLON", + "loc": "488:41-488:43" + }, + { + "token": [ + "LIDENT", + "makei" + ], + "loc": "488:43-488:48" + }, + { + "token": "LPAREN", + "loc": "488:48-488:49" + }, + { + "token": [ + "INT", + "4" + ], + "loc": "488:49-488:50" + }, + { + "token": "COMMA", + "loc": "488:50-488:51" + }, + { + "token": [ + "LIDENT", + "make_by_index" + ], + "loc": "488:52-488:65" + }, + { + "token": "RPAREN", + "loc": "488:65-488:66" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "488:66-488:66" + }, + { + "token": "NEWLINE", + "loc": "488:66-488:67" + }, + { + "token": [ + "LIDENT", + "check_bool" + ], + "loc": "489:3-489:13" + }, + { + "token": "LPAREN", + "loc": "489:13-489:14" + }, + { + "token": [ + "STRING", + "fixedarray length" + ], + "loc": "489:14-489:33" + }, + { + "token": "COMMA", + "loc": "489:33-489:34" + }, + { + "token": [ + "LIDENT", + "zs" + ], + "loc": "489:35-489:37" + }, + { + "token": [ + "DOT_LIDENT", + "length" + ], + "loc": "489:38-489:44" + }, + { + "token": "LPAREN", + "loc": "489:44-489:45" + }, + { + "token": "RPAREN", + "loc": "489:45-489:46" + }, + { + "token": [ + "INFIX1", + "==" + ], + "loc": "489:47-489:49" + }, + { + "token": [ + "INT", + "4" + ], + "loc": "489:50-489:51" + }, + { + "token": "RPAREN", + "loc": "489:51-489:52" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "489:52-489:52" + }, + { + "token": "NEWLINE", + "loc": "489:52-489:53" + }, + { + "token": [ + "LIDENT", + "check" + ], + "loc": "490:3-490:8" + }, + { + "token": "LPAREN", + "loc": "490:8-490:9" + }, + { + "token": [ + "STRING", + "fixedarray index 0" + ], + "loc": "490:9-490:29" + }, + { + "token": "COMMA", + "loc": "490:29-490:30" + }, + { + "token": [ + "LIDENT", + "zs" + ], + "loc": "490:31-490:33" + }, + { + "token": [ + "DOT_LIDENT", + "unsafe_get" + ], + "loc": "490:34-490:44" + }, + { + "token": "LPAREN", + "loc": "490:44-490:45" + }, + { + "token": [ + "INT", + "0" + ], + "loc": "490:45-490:46" + }, + { + "token": "RPAREN", + "loc": "490:46-490:47" + }, + { + "token": "COMMA", + "loc": "490:47-490:48" + }, + { + "token": [ + "INT", + "0x0000000000000000UL" + ], + "loc": "490:49-490:69" + }, + { + "token": "COMMA", + "loc": "490:69-490:70" + }, + { + "token": [ + "INT", + "0x0000000000000001UL" + ], + "loc": "490:71-490:91" + }, + { + "token": "RPAREN", + "loc": "490:91-490:92" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "490:92-490:92" + }, + { + "token": "NEWLINE", + "loc": "490:92-490:93" + }, + { + "token": [ + "LIDENT", + "check" + ], + "loc": "491:3-491:8" + }, + { + "token": "LPAREN", + "loc": "491:8-491:9" + }, + { + "token": [ + "STRING", + "fixedarray index 2" + ], + "loc": "491:9-491:29" + }, + { + "token": "COMMA", + "loc": "491:29-491:30" + }, + { + "token": [ + "LIDENT", + "zs" + ], + "loc": "491:31-491:33" + }, + { + "token": [ + "DOT_LIDENT", + "unsafe_get" + ], + "loc": "491:34-491:44" + }, + { + "token": "LPAREN", + "loc": "491:44-491:45" + }, + { + "token": [ + "INT", + "2" + ], + "loc": "491:45-491:46" + }, + { + "token": "RPAREN", + "loc": "491:46-491:47" + }, + { + "token": "COMMA", + "loc": "491:47-491:48" + }, + { + "token": [ + "INT", + "0x2222222222222222UL" + ], + "loc": "491:49-491:69" + }, + { + "token": "COMMA", + "loc": "491:69-491:70" + }, + { + "token": [ + "INT", + "0x2222222222222223UL" + ], + "loc": "491:71-491:91" + }, + { + "token": "RPAREN", + "loc": "491:91-491:92" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "491:92-491:92" + }, + { + "token": "NEWLINE", + "loc": "491:92-491:93" + }, + { + "token": [ + "LIDENT", + "check" + ], + "loc": "492:3-492:8" + }, + { + "token": "LPAREN", + "loc": "492:8-492:9" + }, + { + "token": [ + "STRING", + "fixedarray index 3" + ], + "loc": "492:9-492:29" + }, + { + "token": "COMMA", + "loc": "492:29-492:30" + }, + { + "token": [ + "LIDENT", + "zs" + ], + "loc": "492:31-492:33" + }, + { + "token": [ + "DOT_LIDENT", + "unsafe_get" + ], + "loc": "492:34-492:44" + }, + { + "token": "LPAREN", + "loc": "492:44-492:45" + }, + { + "token": [ + "INT", + "3" + ], + "loc": "492:45-492:46" + }, + { + "token": "RPAREN", + "loc": "492:46-492:47" + }, + { + "token": "COMMA", + "loc": "492:47-492:48" + }, + { + "token": [ + "INT", + "0x3333333333333333UL" + ], + "loc": "492:49-492:69" + }, + { + "token": "COMMA", + "loc": "492:69-492:70" + }, + { + "token": [ + "INT", + "0x3333333333333334UL" + ], + "loc": "492:71-492:91" + }, + { + "token": "RPAREN", + "loc": "492:91-492:92" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "492:92-492:92" + }, + { + "token": "NEWLINE", + "loc": "492:92-492:93" + }, + { + "token": "LET", + "loc": "493:3-493:6" + }, + { + "token": [ + "LIDENT", + "zs_copy" + ], + "loc": "493:7-493:14" + }, + { + "token": "EQUAL", + "loc": "493:15-493:16" + }, + { + "token": [ + "LIDENT", + "zs" + ], + "loc": "493:17-493:19" + }, + { + "token": [ + "DOT_LIDENT", + "copy" + ], + "loc": "493:20-493:24" + }, + { + "token": "LPAREN", + "loc": "493:24-493:25" + }, + { + "token": "RPAREN", + "loc": "493:25-493:26" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "493:26-493:26" + }, + { + "token": "NEWLINE", + "loc": "493:26-493:27" + }, + { + "token": [ + "LIDENT", + "check_bool" + ], + "loc": "494:3-494:13" + }, + { + "token": "LPAREN", + "loc": "494:13-494:14" + }, + { + "token": [ + "STRING", + "fixedarray copy length" + ], + "loc": "494:14-494:38" + }, + { + "token": "COMMA", + "loc": "494:38-494:39" + }, + { + "token": [ + "LIDENT", + "zs_copy" + ], + "loc": "494:40-494:47" + }, + { + "token": [ + "DOT_LIDENT", + "length" + ], + "loc": "494:48-494:54" + }, + { + "token": "LPAREN", + "loc": "494:54-494:55" + }, + { + "token": "RPAREN", + "loc": "494:55-494:56" + }, + { + "token": [ + "INFIX1", + "==" + ], + "loc": "494:57-494:59" + }, + { + "token": [ + "INT", + "4" + ], + "loc": "494:60-494:61" + }, + { + "token": "RPAREN", + "loc": "494:61-494:62" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "494:62-494:62" + }, + { + "token": "NEWLINE", + "loc": "494:62-494:63" + }, + { + "token": [ + "LIDENT", + "check" + ], + "loc": "495:3-495:8" + }, + { + "token": "LPAREN", + "loc": "495:8-495:9" + }, + { + "token": [ + "STRING", + "fixedarray copy index 2" + ], + "loc": "495:9-495:34" + }, + { + "token": "COMMA", + "loc": "495:34-495:35" + }, + { + "token": [ + "LIDENT", + "zs_copy" + ], + "loc": "495:36-495:43" + }, + { + "token": [ + "DOT_LIDENT", + "unsafe_get" + ], + "loc": "495:44-495:54" + }, + { + "token": "LPAREN", + "loc": "495:54-495:55" + }, + { + "token": [ + "INT", + "2" + ], + "loc": "495:55-495:56" + }, + { + "token": "RPAREN", + "loc": "495:56-495:57" + }, + { + "token": "COMMA", + "loc": "495:57-495:58" + }, + { + "token": [ + "INT", + "0x2222222222222222UL" + ], + "loc": "495:59-495:79" + }, + { + "token": "COMMA", + "loc": "495:79-495:80" + }, + { + "token": [ + "INT", + "0x2222222222222223UL" + ], + "loc": "495:81-495:101" + }, + { + "token": "RPAREN", + "loc": "495:101-495:102" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "495:102-495:102" + }, + { + "token": "NEWLINE", + "loc": "495:102-495:103" + }, + { + "token": "NEWLINE", + "loc": "496:1-496:2" + }, + { + "token": "LET", + "loc": "497:3-497:6" + }, + { + "token": [ + "LIDENT", + "empty_zs" + ], + "loc": "497:7-497:15" + }, + { + "token": "COLON", + "loc": "497:16-497:17" + }, + { + "token": [ + "UIDENT", + "FixedArray" + ], + "loc": "497:18-497:28" + }, + { + "token": "LBRACKET", + "loc": "497:28-497:29" + }, + { + "token": [ + "UIDENT", + "V128" + ], + "loc": "497:29-497:33" + }, + { + "token": "RBRACKET", + "loc": "497:33-497:34" + }, + { + "token": "EQUAL", + "loc": "497:35-497:36" + }, + { + "token": "LBRACKET", + "loc": "497:37-497:38" + }, + { + "token": "RBRACKET", + "loc": "497:38-497:39" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "497:39-497:39" + }, + { + "token": "NEWLINE", + "loc": "497:39-497:40" + }, + { + "token": [ + "LIDENT", + "check_bool" + ], + "loc": "498:3-498:13" + }, + { + "token": "LPAREN", + "loc": "498:13-498:14" + }, + { + "token": [ + "STRING", + "empty fixedarray literal length" + ], + "loc": "498:14-498:47" + }, + { + "token": "COMMA", + "loc": "498:47-498:48" + }, + { + "token": [ + "LIDENT", + "empty_zs" + ], + "loc": "498:49-498:57" + }, + { + "token": [ + "DOT_LIDENT", + "length" + ], + "loc": "498:58-498:64" + }, + { + "token": "LPAREN", + "loc": "498:64-498:65" + }, + { + "token": "RPAREN", + "loc": "498:65-498:66" + }, + { + "token": [ + "INFIX1", + "==" + ], + "loc": "498:67-498:69" + }, + { + "token": [ + "INT", + "0" + ], + "loc": "498:70-498:71" + }, + { + "token": "RPAREN", + "loc": "498:71-498:72" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "498:72-498:72" + }, + { + "token": "NEWLINE", + "loc": "498:72-498:73" + }, + { + "token": "LET", + "loc": "499:3-499:6" + }, + { + "token": [ + "LIDENT", + "zero_zs" + ], + "loc": "499:7-499:14" + }, + { + "token": "COLON", + "loc": "499:15-499:16" + }, + { + "token": [ + "UIDENT", + "FixedArray" + ], + "loc": "499:17-499:27" + }, + { + "token": "LBRACKET", + "loc": "499:27-499:28" + }, + { + "token": [ + "UIDENT", + "V128" + ], + "loc": "499:28-499:32" + }, + { + "token": "RBRACKET", + "loc": "499:32-499:33" + }, + { + "token": "EQUAL", + "loc": "499:34-499:35" + }, + { + "token": [ + "UIDENT", + "FixedArray" + ], + "loc": "499:36-499:46" + }, + { + "token": "COLONCOLON", + "loc": "499:46-499:48" + }, + { + "token": [ + "LIDENT", + "make" + ], + "loc": "499:48-499:52" + }, + { + "token": "LPAREN", + "loc": "499:52-499:53" + }, + { + "token": [ + "INT", + "0" + ], + "loc": "499:53-499:54" + }, + { + "token": "COMMA", + "loc": "499:54-499:55" + }, + { + "token": [ + "LIDENT", + "a" + ], + "loc": "499:56-499:57" + }, + { + "token": "RPAREN", + "loc": "499:57-499:58" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "499:58-499:58" + }, + { + "token": "NEWLINE", + "loc": "499:58-499:59" + }, + { + "token": [ + "LIDENT", + "check_bool" + ], + "loc": "500:3-500:13" + }, + { + "token": "LPAREN", + "loc": "500:13-500:14" + }, + { + "token": [ + "STRING", + "fixedarray make zero length" + ], + "loc": "500:14-500:43" + }, + { + "token": "COMMA", + "loc": "500:43-500:44" + }, + { + "token": [ + "LIDENT", + "zero_zs" + ], + "loc": "500:45-500:52" + }, + { + "token": [ + "DOT_LIDENT", + "length" + ], + "loc": "500:53-500:59" + }, + { + "token": "LPAREN", + "loc": "500:59-500:60" + }, + { + "token": "RPAREN", + "loc": "500:60-500:61" + }, + { + "token": [ + "INFIX1", + "==" + ], + "loc": "500:62-500:64" + }, + { + "token": [ + "INT", + "0" + ], + "loc": "500:65-500:66" + }, + { + "token": "RPAREN", + "loc": "500:66-500:67" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "500:67-500:67" + }, + { + "token": "NEWLINE", + "loc": "500:67-500:68" + }, + { + "token": "NEWLINE", + "loc": "501:1-501:2" + }, + { + "token": "LET", + "loc": "502:3-502:6" + }, + { + "token": [ + "LIDENT", + "ok_result" + ], + "loc": "502:7-502:16" + }, + { + "token": "COLON", + "loc": "502:17-502:18" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "502:19-502:25" + }, + { + "token": "LBRACKET", + "loc": "502:25-502:26" + }, + { + "token": [ + "UIDENT", + "V128" + ], + "loc": "502:26-502:30" + }, + { + "token": "COMMA", + "loc": "502:30-502:31" + }, + { + "token": [ + "UIDENT", + "V128Error" + ], + "loc": "502:32-502:41" + }, + { + "token": "RBRACKET", + "loc": "502:41-502:42" + }, + { + "token": "EQUAL", + "loc": "502:43-502:44" + }, + { + "token": "TRY_QUESTION", + "loc": "502:45-502:49" + }, + { + "token": [ + "LIDENT", + "maybe_v128" + ], + "loc": "502:50-502:60" + }, + { + "token": "LPAREN", + "loc": "502:60-502:61" + }, + { + "token": "TRUE", + "loc": "502:61-502:65" + }, + { + "token": "RPAREN", + "loc": "502:65-502:66" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "502:66-502:66" + }, + { + "token": "NEWLINE", + "loc": "502:66-502:67" + }, + { + "token": "LET", + "loc": "503:3-503:6" + }, + { + "token": [ + "LIDENT", + "err_result" + ], + "loc": "503:7-503:17" + }, + { + "token": "COLON", + "loc": "503:18-503:19" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "503:20-503:26" + }, + { + "token": "LBRACKET", + "loc": "503:26-503:27" + }, + { + "token": [ + "UIDENT", + "V128" + ], + "loc": "503:27-503:31" + }, + { + "token": "COMMA", + "loc": "503:31-503:32" + }, + { + "token": [ + "UIDENT", + "V128Error" + ], + "loc": "503:33-503:42" + }, + { + "token": "RBRACKET", + "loc": "503:42-503:43" + }, + { + "token": "EQUAL", + "loc": "503:44-503:45" + }, + { + "token": "TRY_QUESTION", + "loc": "503:46-503:50" + }, + { + "token": [ + "LIDENT", + "maybe_v128" + ], + "loc": "503:51-503:61" + }, + { + "token": "LPAREN", + "loc": "503:61-503:62" + }, + { + "token": "FALSE", + "loc": "503:62-503:67" + }, + { + "token": "RPAREN", + "loc": "503:67-503:68" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "503:68-503:68" + }, + { + "token": "NEWLINE", + "loc": "503:68-503:69" + }, + { + "token": [ + "LIDENT", + "check_v128_result" + ], + "loc": "504:3-504:20" + }, + { + "token": "LPAREN", + "loc": "504:20-504:21" + }, + { + "token": "NEWLINE", + "loc": "504:21-504:22" + }, + { + "token": [ + "STRING", + "result v128 ok" + ], + "loc": "505:5-505:21" + }, + { + "token": "COMMA", + "loc": "505:21-505:22" + }, + { + "token": "NEWLINE", + "loc": "505:22-505:23" + }, + { + "token": [ + "LIDENT", + "ok_result" + ], + "loc": "506:5-506:14" + }, + { + "token": "COMMA", + "loc": "506:14-506:15" + }, + { + "token": "NEWLINE", + "loc": "506:15-506:16" + }, + { + "token": [ + "INT", + "0x4444444444444444UL" + ], + "loc": "507:5-507:25" + }, + { + "token": "COMMA", + "loc": "507:25-507:26" + }, + { + "token": "NEWLINE", + "loc": "507:26-507:27" + }, + { + "token": [ + "INT", + "0x4444444444444445UL" + ], + "loc": "508:5-508:25" + }, + { + "token": "COMMA", + "loc": "508:25-508:26" + }, + { + "token": "NEWLINE", + "loc": "508:26-508:27" + }, + { + "token": "RPAREN", + "loc": "509:3-509:4" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "509:4-509:4" + }, + { + "token": "NEWLINE", + "loc": "509:4-509:5" + }, + { + "token": [ + "LIDENT", + "check_v128_error" + ], + "loc": "510:3-510:19" + }, + { + "token": "LPAREN", + "loc": "510:19-510:20" + }, + { + "token": [ + "STRING", + "result v128 err" + ], + "loc": "510:20-510:37" + }, + { + "token": "COMMA", + "loc": "510:37-510:38" + }, + { + "token": [ + "LIDENT", + "err_result" + ], + "loc": "510:39-510:49" + }, + { + "token": "RPAREN", + "loc": "510:49-510:50" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "510:50-510:50" + }, + { + "token": "NEWLINE", + "loc": "510:50-510:51" + }, + { + "token": "NEWLINE", + "loc": "511:1-511:2" + }, + { + "token": "LET", + "loc": "512:3-512:6" + }, + { + "token": [ + "LIDENT", + "boxes" + ], + "loc": "512:7-512:12" + }, + { + "token": "COLON", + "loc": "512:13-512:14" + }, + { + "token": [ + "UIDENT", + "FixedArray" + ], + "loc": "512:15-512:25" + }, + { + "token": "LBRACKET", + "loc": "512:25-512:26" + }, + { + "token": [ + "UIDENT", + "V128Box" + ], + "loc": "512:26-512:33" + }, + { + "token": "RBRACKET", + "loc": "512:33-512:34" + }, + { + "token": "EQUAL", + "loc": "512:35-512:36" + }, + { + "token": [ + "UIDENT", + "FixedArray" + ], + "loc": "512:37-512:47" + }, + { + "token": "COLONCOLON", + "loc": "512:47-512:49" + }, + { + "token": [ + "LIDENT", + "makei" + ], + "loc": "512:49-512:54" + }, + { + "token": "LPAREN", + "loc": "512:54-512:55" + }, + { + "token": [ + "INT", + "4" + ], + "loc": "512:55-512:56" + }, + { + "token": "COMMA", + "loc": "512:56-512:57" + }, + { + "token": [ + "LIDENT", + "make_box" + ], + "loc": "512:58-512:66" + }, + { + "token": "RPAREN", + "loc": "512:66-512:67" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "512:67-512:67" + }, + { + "token": "NEWLINE", + "loc": "512:67-512:68" + }, + { + "token": "LET", + "loc": "513:3-513:6" + }, + { + "token": [ + "LIDENT", + "box2" + ], + "loc": "513:7-513:11" + }, + { + "token": "EQUAL", + "loc": "513:12-513:13" + }, + { + "token": [ + "LIDENT", + "boxes" + ], + "loc": "513:14-513:19" + }, + { + "token": [ + "DOT_LIDENT", + "unsafe_get" + ], + "loc": "513:20-513:30" + }, + { + "token": "LPAREN", + "loc": "513:30-513:31" + }, + { + "token": [ + "INT", + "2" + ], + "loc": "513:31-513:32" + }, + { + "token": "RPAREN", + "loc": "513:32-513:33" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "513:33-513:33" + }, + { + "token": "NEWLINE", + "loc": "513:33-513:34" + }, + { + "token": "LET", + "loc": "514:3-514:6" + }, + { + "token": [ + "LIDENT", + "box3" + ], + "loc": "514:7-514:11" + }, + { + "token": "EQUAL", + "loc": "514:12-514:13" + }, + { + "token": [ + "LIDENT", + "boxes" + ], + "loc": "514:14-514:19" + }, + { + "token": [ + "DOT_LIDENT", + "unsafe_get" + ], + "loc": "514:20-514:30" + }, + { + "token": "LPAREN", + "loc": "514:30-514:31" + }, + { + "token": [ + "INT", + "3" + ], + "loc": "514:31-514:32" + }, + { + "token": "RPAREN", + "loc": "514:32-514:33" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "514:33-514:33" + }, + { + "token": "NEWLINE", + "loc": "514:33-514:34" + }, + { + "token": [ + "LIDENT", + "check_bool" + ], + "loc": "515:3-515:13" + }, + { + "token": "LPAREN", + "loc": "515:13-515:14" + }, + { + "token": [ + "STRING", + "struct v128 field length" + ], + "loc": "515:14-515:40" + }, + { + "token": "COMMA", + "loc": "515:40-515:41" + }, + { + "token": [ + "LIDENT", + "boxes" + ], + "loc": "515:42-515:47" + }, + { + "token": [ + "DOT_LIDENT", + "length" + ], + "loc": "515:48-515:54" + }, + { + "token": "LPAREN", + "loc": "515:54-515:55" + }, + { + "token": "RPAREN", + "loc": "515:55-515:56" + }, + { + "token": [ + "INFIX1", + "==" + ], + "loc": "515:57-515:59" + }, + { + "token": [ + "INT", + "4" + ], + "loc": "515:60-515:61" + }, + { + "token": "RPAREN", + "loc": "515:61-515:62" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "515:62-515:62" + }, + { + "token": "NEWLINE", + "loc": "515:62-515:63" + }, + { + "token": [ + "LIDENT", + "check_bool" + ], + "loc": "516:3-516:13" + }, + { + "token": "LPAREN", + "loc": "516:13-516:14" + }, + { + "token": [ + "STRING", + "struct v128 field tag" + ], + "loc": "516:14-516:37" + }, + { + "token": "COMMA", + "loc": "516:37-516:38" + }, + { + "token": [ + "LIDENT", + "box3" + ], + "loc": "516:39-516:43" + }, + { + "token": [ + "DOT_LIDENT", + "tag" + ], + "loc": "516:44-516:47" + }, + { + "token": [ + "INFIX1", + "==" + ], + "loc": "516:48-516:50" + }, + { + "token": [ + "INT", + "3" + ], + "loc": "516:51-516:52" + }, + { + "token": "RPAREN", + "loc": "516:52-516:53" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "516:53-516:53" + }, + { + "token": "NEWLINE", + "loc": "516:53-516:54" + }, + { + "token": [ + "LIDENT", + "check" + ], + "loc": "517:3-517:8" + }, + { + "token": "LPAREN", + "loc": "517:8-517:9" + }, + { + "token": [ + "STRING", + "struct v128 field index 2" + ], + "loc": "517:9-517:36" + }, + { + "token": "COMMA", + "loc": "517:36-517:37" + }, + { + "token": [ + "LIDENT", + "box2" + ], + "loc": "517:38-517:42" + }, + { + "token": [ + "DOT_LIDENT", + "v" + ], + "loc": "517:43-517:44" + }, + { + "token": "COMMA", + "loc": "517:44-517:45" + }, + { + "token": [ + "INT", + "0x2222222222222222UL" + ], + "loc": "517:46-517:66" + }, + { + "token": "COMMA", + "loc": "517:66-517:67" + }, + { + "token": [ + "INT", + "0x2222222222222223UL" + ], + "loc": "517:68-517:88" + }, + { + "token": "RPAREN", + "loc": "517:88-517:89" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "517:89-517:89" + }, + { + "token": "NEWLINE", + "loc": "517:89-517:90" + }, + { + "token": [ + "LIDENT", + "check" + ], + "loc": "518:3-518:8" + }, + { + "token": "LPAREN", + "loc": "518:8-518:9" + }, + { + "token": [ + "STRING", + "struct v128 field index 3" + ], + "loc": "518:9-518:36" + }, + { + "token": "COMMA", + "loc": "518:36-518:37" + }, + { + "token": [ + "LIDENT", + "box3" + ], + "loc": "518:38-518:42" + }, + { + "token": [ + "DOT_LIDENT", + "v" + ], + "loc": "518:43-518:44" + }, + { + "token": "COMMA", + "loc": "518:44-518:45" + }, + { + "token": [ + "INT", + "0x3333333333333333UL" + ], + "loc": "518:46-518:66" + }, + { + "token": "COMMA", + "loc": "518:66-518:67" + }, + { + "token": [ + "INT", + "0x3333333333333334UL" + ], + "loc": "518:68-518:88" + }, + { + "token": "RPAREN", + "loc": "518:88-518:89" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "518:89-518:89" + }, + { + "token": "NEWLINE", + "loc": "518:89-518:90" + }, + { + "token": "NEWLINE", + "loc": "519:1-519:2" + }, + { + "token": "LET", + "loc": "520:3-520:6" + }, + { + "token": [ + "LIDENT", + "mem" + ], + "loc": "520:7-520:10" + }, + { + "token": "COLON", + "loc": "520:11-520:12" + }, + { + "token": [ + "UIDENT", + "FixedArray" + ], + "loc": "520:13-520:23" + }, + { + "token": "LBRACKET", + "loc": "520:23-520:24" + }, + { + "token": [ + "UIDENT", + "Byte" + ], + "loc": "520:24-520:28" + }, + { + "token": "RBRACKET", + "loc": "520:28-520:29" + }, + { + "token": "EQUAL", + "loc": "520:30-520:31" + }, + { + "token": [ + "UIDENT", + "FixedArray" + ], + "loc": "520:32-520:42" + }, + { + "token": "COLONCOLON", + "loc": "520:42-520:44" + }, + { + "token": [ + "LIDENT", + "make" + ], + "loc": "520:44-520:48" + }, + { + "token": "LPAREN", + "loc": "520:48-520:49" + }, + { + "token": [ + "INT", + "32" + ], + "loc": "520:49-520:51" + }, + { + "token": "COMMA", + "loc": "520:51-520:52" + }, + { + "token": [ + "INT", + "0" + ], + "loc": "520:53-520:54" + }, + { + "token": "RPAREN", + "loc": "520:54-520:55" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "520:55-520:55" + }, + { + "token": "NEWLINE", + "loc": "520:55-520:56" + }, + { + "token": "FOR", + "loc": "521:3-521:6" + }, + { + "token": [ + "LIDENT", + "i" + ], + "loc": "521:7-521:8" + }, + { + "token": "IN", + "loc": "521:9-521:11" + }, + { + "token": [ + "INT", + "0" + ], + "loc": "521:12-521:13" + }, + { + "token": "RANGE_EXCLUSIVE", + "loc": "521:13-521:16" + }, + { + "token": [ + "INT", + "32" + ], + "loc": "521:16-521:18" + }, + { + "token": "LBRACE", + "loc": "521:19-521:20" + }, + { + "token": "NEWLINE", + "loc": "521:20-521:21" + }, + { + "token": [ + "LIDENT", + "mem" + ], + "loc": "522:5-522:8" + }, + { + "token": "LBRACKET", + "loc": "522:8-522:9" + }, + { + "token": [ + "LIDENT", + "i" + ], + "loc": "522:9-522:10" + }, + { + "token": "RBRACKET", + "loc": "522:10-522:11" + }, + { + "token": "EQUAL", + "loc": "522:12-522:13" + }, + { + "token": [ + "LIDENT", + "i" + ], + "loc": "522:14-522:15" + }, + { + "token": [ + "DOT_LIDENT", + "to_byte" + ], + "loc": "522:16-522:23" + }, + { + "token": "LPAREN", + "loc": "522:23-522:24" + }, + { + "token": "RPAREN", + "loc": "522:24-522:25" + }, + { + "token": "NEWLINE", + "loc": "522:25-522:26" + }, + { + "token": "RBRACE", + "loc": "523:3-523:4" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "523:4-523:4" + }, + { + "token": "NEWLINE", + "loc": "523:4-523:5" + }, + { + "token": [ + "LIDENT", + "check" + ], + "loc": "524:3-524:8" + }, + { + "token": "LPAREN", + "loc": "524:8-524:9" + }, + { + "token": "NEWLINE", + "loc": "524:9-524:10" + }, + { + "token": [ + "STRING", + "v128 load intrinsic" + ], + "loc": "525:5-525:26" + }, + { + "token": "COMMA", + "loc": "525:26-525:27" + }, + { + "token": "NEWLINE", + "loc": "525:27-525:28" + }, + { + "token": [ + "LIDENT", + "v128_load" + ], + "loc": "526:5-526:14" + }, + { + "token": "LPAREN", + "loc": "526:14-526:15" + }, + { + "token": [ + "LIDENT", + "mem" + ], + "loc": "526:15-526:18" + }, + { + "token": "COMMA", + "loc": "526:18-526:19" + }, + { + "token": [ + "INT", + "0" + ], + "loc": "526:20-526:21" + }, + { + "token": "RPAREN", + "loc": "526:21-526:22" + }, + { + "token": "COMMA", + "loc": "526:22-526:23" + }, + { + "token": "NEWLINE", + "loc": "526:23-526:24" + }, + { + "token": [ + "INT", + "0x0706050403020100UL" + ], + "loc": "527:5-527:25" + }, + { + "token": "COMMA", + "loc": "527:25-527:26" + }, + { + "token": "NEWLINE", + "loc": "527:26-527:27" + }, + { + "token": [ + "INT", + "0x0f0e0d0c0b0a0908UL" + ], + "loc": "528:5-528:25" + }, + { + "token": "COMMA", + "loc": "528:25-528:26" + }, + { + "token": "NEWLINE", + "loc": "528:26-528:27" + }, + { + "token": "RPAREN", + "loc": "529:3-529:4" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "529:4-529:4" + }, + { + "token": "NEWLINE", + "loc": "529:4-529:5" + }, + { + "token": [ + "LIDENT", + "check" + ], + "loc": "530:3-530:8" + }, + { + "token": "LPAREN", + "loc": "530:8-530:9" + }, + { + "token": "NEWLINE", + "loc": "530:9-530:10" + }, + { + "token": [ + "STRING", + "v128 load unaligned" + ], + "loc": "531:5-531:26" + }, + { + "token": "COMMA", + "loc": "531:26-531:27" + }, + { + "token": "NEWLINE", + "loc": "531:27-531:28" + }, + { + "token": [ + "LIDENT", + "v128_load" + ], + "loc": "532:5-532:14" + }, + { + "token": "LPAREN", + "loc": "532:14-532:15" + }, + { + "token": [ + "LIDENT", + "mem" + ], + "loc": "532:15-532:18" + }, + { + "token": "COMMA", + "loc": "532:18-532:19" + }, + { + "token": [ + "INT", + "1" + ], + "loc": "532:20-532:21" + }, + { + "token": "RPAREN", + "loc": "532:21-532:22" + }, + { + "token": "COMMA", + "loc": "532:22-532:23" + }, + { + "token": "NEWLINE", + "loc": "532:23-532:24" + }, + { + "token": [ + "INT", + "0x0807060504030201UL" + ], + "loc": "533:5-533:25" + }, + { + "token": "COMMA", + "loc": "533:25-533:26" + }, + { + "token": "NEWLINE", + "loc": "533:26-533:27" + }, + { + "token": [ + "INT", + "0x100f0e0d0c0b0a09UL" + ], + "loc": "534:5-534:25" + }, + { + "token": "COMMA", + "loc": "534:25-534:26" + }, + { + "token": "NEWLINE", + "loc": "534:26-534:27" + }, + { + "token": "RPAREN", + "loc": "535:3-535:4" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "535:4-535:4" + }, + { + "token": "NEWLINE", + "loc": "535:4-535:5" + }, + { + "token": [ + "LIDENT", + "v128_store" + ], + "loc": "536:3-536:13" + }, + { + "token": "LPAREN", + "loc": "536:13-536:14" + }, + { + "token": [ + "LIDENT", + "mem" + ], + "loc": "536:14-536:17" + }, + { + "token": "COMMA", + "loc": "536:17-536:18" + }, + { + "token": [ + "INT", + "4" + ], + "loc": "536:19-536:20" + }, + { + "token": "COMMA", + "loc": "536:20-536:21" + }, + { + "token": [ + "LIDENT", + "v128_make" + ], + "loc": "536:22-536:31" + }, + { + "token": "LPAREN", + "loc": "536:31-536:32" + }, + { + "token": [ + "INT", + "0xa1a2a3a4a5a6a7a8UL" + ], + "loc": "536:32-536:52" + }, + { + "token": "COMMA", + "loc": "536:52-536:53" + }, + { + "token": [ + "INT", + "0xb1b2b3b4b5b6b7b8UL" + ], + "loc": "536:54-536:74" + }, + { + "token": "RPAREN", + "loc": "536:74-536:75" + }, + { + "token": "RPAREN", + "loc": "536:75-536:76" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "536:76-536:76" + }, + { + "token": "NEWLINE", + "loc": "536:76-536:77" + }, + { + "token": [ + "LIDENT", + "check" + ], + "loc": "537:3-537:8" + }, + { + "token": "LPAREN", + "loc": "537:8-537:9" + }, + { + "token": "NEWLINE", + "loc": "537:9-537:10" + }, + { + "token": [ + "STRING", + "v128 store intrinsic" + ], + "loc": "538:5-538:27" + }, + { + "token": "COMMA", + "loc": "538:27-538:28" + }, + { + "token": "NEWLINE", + "loc": "538:28-538:29" + }, + { + "token": [ + "LIDENT", + "v128_load" + ], + "loc": "539:5-539:14" + }, + { + "token": "LPAREN", + "loc": "539:14-539:15" + }, + { + "token": [ + "LIDENT", + "mem" + ], + "loc": "539:15-539:18" + }, + { + "token": "COMMA", + "loc": "539:18-539:19" + }, + { + "token": [ + "INT", + "4" + ], + "loc": "539:20-539:21" + }, + { + "token": "RPAREN", + "loc": "539:21-539:22" + }, + { + "token": "COMMA", + "loc": "539:22-539:23" + }, + { + "token": "NEWLINE", + "loc": "539:23-539:24" + }, + { + "token": [ + "INT", + "0xa1a2a3a4a5a6a7a8UL" + ], + "loc": "540:5-540:25" + }, + { + "token": "COMMA", + "loc": "540:25-540:26" + }, + { + "token": "NEWLINE", + "loc": "540:26-540:27" + }, + { + "token": [ + "INT", + "0xb1b2b3b4b5b6b7b8UL" + ], + "loc": "541:5-541:25" + }, + { + "token": "COMMA", + "loc": "541:25-541:26" + }, + { + "token": "NEWLINE", + "loc": "541:26-541:27" + }, + { + "token": "RPAREN", + "loc": "542:3-542:4" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "542:4-542:4" + }, + { + "token": "NEWLINE", + "loc": "542:4-542:5" + }, + { + "token": [ + "LIDENT", + "check_bool" + ], + "loc": "543:3-543:13" + }, + { + "token": "LPAREN", + "loc": "543:13-543:14" + }, + { + "token": [ + "STRING", + "v128 store preserves prefix" + ], + "loc": "543:14-543:43" + }, + { + "token": "COMMA", + "loc": "543:43-543:44" + }, + { + "token": [ + "LIDENT", + "mem" + ], + "loc": "543:45-543:48" + }, + { + "token": "LBRACKET", + "loc": "543:48-543:49" + }, + { + "token": [ + "INT", + "3" + ], + "loc": "543:49-543:50" + }, + { + "token": "RBRACKET", + "loc": "543:50-543:51" + }, + { + "token": [ + "INFIX1", + "==" + ], + "loc": "543:52-543:54" + }, + { + "token": [ + "INT", + "3" + ], + "loc": "543:55-543:56" + }, + { + "token": "RPAREN", + "loc": "543:56-543:57" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "543:57-543:57" + }, + { + "token": "NEWLINE", + "loc": "543:57-543:58" + }, + { + "token": [ + "LIDENT", + "check_bool" + ], + "loc": "544:3-544:13" + }, + { + "token": "LPAREN", + "loc": "544:13-544:14" + }, + { + "token": [ + "STRING", + "v128 store preserves suffix" + ], + "loc": "544:14-544:43" + }, + { + "token": "COMMA", + "loc": "544:43-544:44" + }, + { + "token": [ + "LIDENT", + "mem" + ], + "loc": "544:45-544:48" + }, + { + "token": "LBRACKET", + "loc": "544:48-544:49" + }, + { + "token": [ + "INT", + "20" + ], + "loc": "544:49-544:51" + }, + { + "token": "RBRACKET", + "loc": "544:51-544:52" + }, + { + "token": [ + "INFIX1", + "==" + ], + "loc": "544:53-544:55" + }, + { + "token": [ + "INT", + "20" + ], + "loc": "544:56-544:58" + }, + { + "token": "RPAREN", + "loc": "544:58-544:59" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "544:59-544:59" + }, + { + "token": "NEWLINE", + "loc": "544:59-544:60" + }, + { + "token": [ + "LIDENT", + "check" + ], + "loc": "545:3-545:8" + }, + { + "token": "LPAREN", + "loc": "545:8-545:9" + }, + { + "token": "NEWLINE", + "loc": "545:9-545:10" + }, + { + "token": [ + "STRING", + "v128 load8 splat intrinsic" + ], + "loc": "546:5-546:33" + }, + { + "token": "COMMA", + "loc": "546:33-546:34" + }, + { + "token": "NEWLINE", + "loc": "546:34-546:35" + }, + { + "token": [ + "LIDENT", + "v128_load8_splat" + ], + "loc": "547:5-547:21" + }, + { + "token": "LPAREN", + "loc": "547:21-547:22" + }, + { + "token": [ + "LIDENT", + "mem" + ], + "loc": "547:22-547:25" + }, + { + "token": "COMMA", + "loc": "547:25-547:26" + }, + { + "token": [ + "INT", + "21" + ], + "loc": "547:27-547:29" + }, + { + "token": "RPAREN", + "loc": "547:29-547:30" + }, + { + "token": "COMMA", + "loc": "547:30-547:31" + }, + { + "token": "NEWLINE", + "loc": "547:31-547:32" + }, + { + "token": [ + "INT", + "0x1515151515151515UL" + ], + "loc": "548:5-548:25" + }, + { + "token": "COMMA", + "loc": "548:25-548:26" + }, + { + "token": "NEWLINE", + "loc": "548:26-548:27" + }, + { + "token": [ + "INT", + "0x1515151515151515UL" + ], + "loc": "549:5-549:25" + }, + { + "token": "COMMA", + "loc": "549:25-549:26" + }, + { + "token": "NEWLINE", + "loc": "549:26-549:27" + }, + { + "token": "RPAREN", + "loc": "550:3-550:4" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "550:4-550:4" + }, + { + "token": "NEWLINE", + "loc": "550:4-550:5" + }, + { + "token": [ + "LIDENT", + "check" + ], + "loc": "551:3-551:8" + }, + { + "token": "LPAREN", + "loc": "551:8-551:9" + }, + { + "token": "NEWLINE", + "loc": "551:9-551:10" + }, + { + "token": [ + "STRING", + "v128 load32 zero intrinsic" + ], + "loc": "552:5-552:33" + }, + { + "token": "COMMA", + "loc": "552:33-552:34" + }, + { + "token": "NEWLINE", + "loc": "552:34-552:35" + }, + { + "token": [ + "LIDENT", + "v128_load32_zero" + ], + "loc": "553:5-553:21" + }, + { + "token": "LPAREN", + "loc": "553:21-553:22" + }, + { + "token": [ + "LIDENT", + "mem" + ], + "loc": "553:22-553:25" + }, + { + "token": "COMMA", + "loc": "553:25-553:26" + }, + { + "token": [ + "INT", + "20" + ], + "loc": "553:27-553:29" + }, + { + "token": "RPAREN", + "loc": "553:29-553:30" + }, + { + "token": "COMMA", + "loc": "553:30-553:31" + }, + { + "token": "NEWLINE", + "loc": "553:31-553:32" + }, + { + "token": [ + "INT", + "0x0000000017161514UL" + ], + "loc": "554:5-554:25" + }, + { + "token": "COMMA", + "loc": "554:25-554:26" + }, + { + "token": "NEWLINE", + "loc": "554:26-554:27" + }, + { + "token": [ + "INT", + "0UL" + ], + "loc": "555:5-555:8" + }, + { + "token": "COMMA", + "loc": "555:8-555:9" + }, + { + "token": "NEWLINE", + "loc": "555:9-555:10" + }, + { + "token": "RPAREN", + "loc": "556:3-556:4" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "556:4-556:4" + }, + { + "token": "NEWLINE", + "loc": "556:4-556:5" + }, + { + "token": "LET", + "loc": "557:3-557:6" + }, + { + "token": [ + "LIDENT", + "lane_target" + ], + "loc": "557:7-557:18" + }, + { + "token": "EQUAL", + "loc": "557:19-557:20" + }, + { + "token": [ + "LIDENT", + "v128_make" + ], + "loc": "557:21-557:30" + }, + { + "token": "LPAREN", + "loc": "557:30-557:31" + }, + { + "token": [ + "INT", + "0x1111111111111111UL" + ], + "loc": "557:31-557:51" + }, + { + "token": "COMMA", + "loc": "557:51-557:52" + }, + { + "token": [ + "INT", + "0x2222222222222222UL" + ], + "loc": "557:53-557:73" + }, + { + "token": "RPAREN", + "loc": "557:73-557:74" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "557:74-557:74" + }, + { + "token": "NEWLINE", + "loc": "557:74-557:75" + }, + { + "token": [ + "LIDENT", + "check" + ], + "loc": "558:3-558:8" + }, + { + "token": "LPAREN", + "loc": "558:8-558:9" + }, + { + "token": "NEWLINE", + "loc": "558:9-558:10" + }, + { + "token": [ + "STRING", + "v128 load16 lane intrinsic" + ], + "loc": "559:5-559:33" + }, + { + "token": "COMMA", + "loc": "559:33-559:34" + }, + { + "token": "NEWLINE", + "loc": "559:34-559:35" + }, + { + "token": [ + "LIDENT", + "v128_load16_lane" + ], + "loc": "560:5-560:21" + }, + { + "token": "LPAREN", + "loc": "560:21-560:22" + }, + { + "token": [ + "LIDENT", + "mem" + ], + "loc": "560:22-560:25" + }, + { + "token": "COMMA", + "loc": "560:25-560:26" + }, + { + "token": [ + "INT", + "2" + ], + "loc": "560:27-560:28" + }, + { + "token": "COMMA", + "loc": "560:28-560:29" + }, + { + "token": [ + "LIDENT", + "lane_target" + ], + "loc": "560:30-560:41" + }, + { + "token": "COMMA", + "loc": "560:41-560:42" + }, + { + "token": [ + "INT", + "5" + ], + "loc": "560:43-560:44" + }, + { + "token": "RPAREN", + "loc": "560:44-560:45" + }, + { + "token": "COMMA", + "loc": "560:45-560:46" + }, + { + "token": "NEWLINE", + "loc": "560:46-560:47" + }, + { + "token": [ + "INT", + "0x1111111111111111UL" + ], + "loc": "561:5-561:25" + }, + { + "token": "COMMA", + "loc": "561:25-561:26" + }, + { + "token": "NEWLINE", + "loc": "561:26-561:27" + }, + { + "token": [ + "INT", + "0x2222222203022222UL" + ], + "loc": "562:5-562:25" + }, + { + "token": "COMMA", + "loc": "562:25-562:26" + }, + { + "token": "NEWLINE", + "loc": "562:26-562:27" + }, + { + "token": "RPAREN", + "loc": "563:3-563:4" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "563:4-563:4" + }, + { + "token": "NEWLINE", + "loc": "563:4-563:5" + }, + { + "token": [ + "LIDENT", + "check" + ], + "loc": "564:3-564:8" + }, + { + "token": "LPAREN", + "loc": "564:8-564:9" + }, + { + "token": "NEWLINE", + "loc": "564:9-564:10" + }, + { + "token": [ + "STRING", + "v128 load16 lane fallback" + ], + "loc": "565:5-565:32" + }, + { + "token": "COMMA", + "loc": "565:32-565:33" + }, + { + "token": "NEWLINE", + "loc": "565:33-565:34" + }, + { + "token": [ + "LIDENT", + "v128_load16_lane" + ], + "loc": "566:5-566:21" + }, + { + "token": "LPAREN", + "loc": "566:21-566:22" + }, + { + "token": [ + "LIDENT", + "mem" + ], + "loc": "566:22-566:25" + }, + { + "token": "COMMA", + "loc": "566:25-566:26" + }, + { + "token": [ + "INT", + "2" + ], + "loc": "566:27-566:28" + }, + { + "token": "COMMA", + "loc": "566:28-566:29" + }, + { + "token": [ + "LIDENT", + "lane_target" + ], + "loc": "566:30-566:41" + }, + { + "token": "COMMA", + "loc": "566:41-566:42" + }, + { + "token": [ + "LIDENT", + "pick_lane" + ], + "loc": "566:43-566:52" + }, + { + "token": "LPAREN", + "loc": "566:52-566:53" + }, + { + "token": [ + "LIDENT", + "mem" + ], + "loc": "566:53-566:56" + }, + { + "token": "LBRACKET", + "loc": "566:56-566:57" + }, + { + "token": [ + "INT", + "0" + ], + "loc": "566:57-566:58" + }, + { + "token": "RBRACKET", + "loc": "566:58-566:59" + }, + { + "token": [ + "INFIX1", + "==" + ], + "loc": "566:60-566:62" + }, + { + "token": [ + "INT", + "0" + ], + "loc": "566:63-566:64" + }, + { + "token": "RPAREN", + "loc": "566:64-566:65" + }, + { + "token": "RPAREN", + "loc": "566:65-566:66" + }, + { + "token": "COMMA", + "loc": "566:66-566:67" + }, + { + "token": "NEWLINE", + "loc": "566:67-566:68" + }, + { + "token": [ + "INT", + "0x1111111111111111UL" + ], + "loc": "567:5-567:25" + }, + { + "token": "COMMA", + "loc": "567:25-567:26" + }, + { + "token": "NEWLINE", + "loc": "567:26-567:27" + }, + { + "token": [ + "INT", + "0x2222222203022222UL" + ], + "loc": "568:5-568:25" + }, + { + "token": "COMMA", + "loc": "568:25-568:26" + }, + { + "token": "NEWLINE", + "loc": "568:26-568:27" + }, + { + "token": "RPAREN", + "loc": "569:3-569:4" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "569:4-569:4" + }, + { + "token": "NEWLINE", + "loc": "569:4-569:5" + }, + { + "token": "LET", + "loc": "570:3-570:6" + }, + { + "token": [ + "LIDENT", + "out" + ], + "loc": "570:7-570:10" + }, + { + "token": "COLON", + "loc": "570:11-570:12" + }, + { + "token": [ + "UIDENT", + "FixedArray" + ], + "loc": "570:13-570:23" + }, + { + "token": "LBRACKET", + "loc": "570:23-570:24" + }, + { + "token": [ + "UIDENT", + "Byte" + ], + "loc": "570:24-570:28" + }, + { + "token": "RBRACKET", + "loc": "570:28-570:29" + }, + { + "token": "EQUAL", + "loc": "570:30-570:31" + }, + { + "token": [ + "UIDENT", + "FixedArray" + ], + "loc": "570:32-570:42" + }, + { + "token": "COLONCOLON", + "loc": "570:42-570:44" + }, + { + "token": [ + "LIDENT", + "make" + ], + "loc": "570:44-570:48" + }, + { + "token": "LPAREN", + "loc": "570:48-570:49" + }, + { + "token": [ + "INT", + "8" + ], + "loc": "570:49-570:50" + }, + { + "token": "COMMA", + "loc": "570:50-570:51" + }, + { + "token": [ + "INT", + "0" + ], + "loc": "570:52-570:53" + }, + { + "token": "RPAREN", + "loc": "570:53-570:54" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "570:54-570:54" + }, + { + "token": "NEWLINE", + "loc": "570:54-570:55" + }, + { + "token": [ + "LIDENT", + "v128_store64_lane" + ], + "loc": "571:3-571:20" + }, + { + "token": "LPAREN", + "loc": "571:20-571:21" + }, + { + "token": [ + "LIDENT", + "out" + ], + "loc": "571:21-571:24" + }, + { + "token": "COMMA", + "loc": "571:24-571:25" + }, + { + "token": [ + "INT", + "0" + ], + "loc": "571:26-571:27" + }, + { + "token": "COMMA", + "loc": "571:27-571:28" + }, + { + "token": [ + "LIDENT", + "v128_make" + ], + "loc": "571:29-571:38" + }, + { + "token": "LPAREN", + "loc": "571:38-571:39" + }, + { + "token": [ + "INT", + "0xdeadbeefcafebabeUL" + ], + "loc": "571:39-571:59" + }, + { + "token": "COMMA", + "loc": "571:59-571:60" + }, + { + "token": [ + "INT", + "0x0102030405060708UL" + ], + "loc": "571:61-571:81" + }, + { + "token": "RPAREN", + "loc": "571:81-571:82" + }, + { + "token": "COMMA", + "loc": "571:82-571:83" + }, + { + "token": [ + "INT", + "1" + ], + "loc": "571:84-571:85" + }, + { + "token": "RPAREN", + "loc": "571:85-571:86" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "571:86-571:86" + }, + { + "token": "NEWLINE", + "loc": "571:86-571:87" + }, + { + "token": [ + "LIDENT", + "check_bool" + ], + "loc": "572:3-572:13" + }, + { + "token": "LPAREN", + "loc": "572:13-572:14" + }, + { + "token": [ + "STRING", + "v128 store64 lane intrinsic" + ], + "loc": "572:14-572:43" + }, + { + "token": "COMMA", + "loc": "572:43-572:44" + }, + { + "token": [ + "LIDENT", + "load_u64_le" + ], + "loc": "572:45-572:56" + }, + { + "token": "LPAREN", + "loc": "572:56-572:57" + }, + { + "token": [ + "LIDENT", + "out" + ], + "loc": "572:57-572:60" + }, + { + "token": "COMMA", + "loc": "572:60-572:61" + }, + { + "token": [ + "INT", + "0" + ], + "loc": "572:62-572:63" + }, + { + "token": "RPAREN", + "loc": "572:63-572:64" + }, + { + "token": [ + "INFIX1", + "==" + ], + "loc": "572:65-572:67" + }, + { + "token": [ + "INT", + "0x0102030405060708UL" + ], + "loc": "572:68-572:88" + }, + { + "token": "RPAREN", + "loc": "572:88-572:89" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "572:89-572:89" + }, + { + "token": "NEWLINE", + "loc": "572:89-572:90" + }, + { + "token": [ + "COMMENT", + { + "content": "// buffers whose last use is the specialized load/store: exercises the", + "kind": [ + "Ownline", + { + "leading_blank_line": false, + "trailing_blank_line": false + } + ], + "consumed_by_docstring": false + } + ], + "loc": "573:3-573:73" + }, + { + "token": "NEWLINE", + "loc": "573:73-573:74" + }, + { + "token": [ + "COMMENT", + { + "content": "// ref-count drop inserted at the intrinsic call site", + "kind": [ + "Ownline", + { + "leading_blank_line": false, + "trailing_blank_line": false + } + ], + "consumed_by_docstring": false + } + ], + "loc": "574:3-574:56" + }, + { + "token": "NEWLINE", + "loc": "574:56-574:57" + }, + { + "token": "LET", + "loc": "575:3-575:6" + }, + { + "token": [ + "LIDENT", + "scratch" + ], + "loc": "575:7-575:14" + }, + { + "token": "COLON", + "loc": "575:15-575:16" + }, + { + "token": [ + "UIDENT", + "FixedArray" + ], + "loc": "575:17-575:27" + }, + { + "token": "LBRACKET", + "loc": "575:27-575:28" + }, + { + "token": [ + "UIDENT", + "Byte" + ], + "loc": "575:28-575:32" + }, + { + "token": "RBRACKET", + "loc": "575:32-575:33" + }, + { + "token": "EQUAL", + "loc": "575:34-575:35" + }, + { + "token": [ + "UIDENT", + "FixedArray" + ], + "loc": "575:36-575:46" + }, + { + "token": "COLONCOLON", + "loc": "575:46-575:48" + }, + { + "token": [ + "LIDENT", + "make" + ], + "loc": "575:48-575:52" + }, + { + "token": "LPAREN", + "loc": "575:52-575:53" + }, + { + "token": [ + "INT", + "16" + ], + "loc": "575:53-575:55" + }, + { + "token": "COMMA", + "loc": "575:55-575:56" + }, + { + "token": [ + "BYTE", + "\\x07" + ], + "loc": "575:57-575:64" + }, + { + "token": "RPAREN", + "loc": "575:64-575:65" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "575:65-575:65" + }, + { + "token": "NEWLINE", + "loc": "575:65-575:66" + }, + { + "token": [ + "LIDENT", + "check" + ], + "loc": "576:3-576:8" + }, + { + "token": "LPAREN", + "loc": "576:8-576:9" + }, + { + "token": "NEWLINE", + "loc": "576:9-576:10" + }, + { + "token": [ + "STRING", + "v128 load last use" + ], + "loc": "577:5-577:25" + }, + { + "token": "COMMA", + "loc": "577:25-577:26" + }, + { + "token": "NEWLINE", + "loc": "577:26-577:27" + }, + { + "token": [ + "LIDENT", + "v128_load" + ], + "loc": "578:5-578:14" + }, + { + "token": "LPAREN", + "loc": "578:14-578:15" + }, + { + "token": [ + "LIDENT", + "scratch" + ], + "loc": "578:15-578:22" + }, + { + "token": "COMMA", + "loc": "578:22-578:23" + }, + { + "token": [ + "INT", + "0" + ], + "loc": "578:24-578:25" + }, + { + "token": "RPAREN", + "loc": "578:25-578:26" + }, + { + "token": "COMMA", + "loc": "578:26-578:27" + }, + { + "token": "NEWLINE", + "loc": "578:27-578:28" + }, + { + "token": [ + "INT", + "0x0707070707070707UL" + ], + "loc": "579:5-579:25" + }, + { + "token": "COMMA", + "loc": "579:25-579:26" + }, + { + "token": "NEWLINE", + "loc": "579:26-579:27" + }, + { + "token": [ + "INT", + "0x0707070707070707UL" + ], + "loc": "580:5-580:25" + }, + { + "token": "COMMA", + "loc": "580:25-580:26" + }, + { + "token": "NEWLINE", + "loc": "580:26-580:27" + }, + { + "token": "RPAREN", + "loc": "581:3-581:4" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "581:4-581:4" + }, + { + "token": "NEWLINE", + "loc": "581:4-581:5" + }, + { + "token": "LET", + "loc": "582:3-582:6" + }, + { + "token": [ + "LIDENT", + "sink" + ], + "loc": "582:7-582:11" + }, + { + "token": "COLON", + "loc": "582:12-582:13" + }, + { + "token": [ + "UIDENT", + "FixedArray" + ], + "loc": "582:14-582:24" + }, + { + "token": "LBRACKET", + "loc": "582:24-582:25" + }, + { + "token": [ + "UIDENT", + "Byte" + ], + "loc": "582:25-582:29" + }, + { + "token": "RBRACKET", + "loc": "582:29-582:30" + }, + { + "token": "EQUAL", + "loc": "582:31-582:32" + }, + { + "token": [ + "UIDENT", + "FixedArray" + ], + "loc": "582:33-582:43" + }, + { + "token": "COLONCOLON", + "loc": "582:43-582:45" + }, + { + "token": [ + "LIDENT", + "make" + ], + "loc": "582:45-582:49" + }, + { + "token": "LPAREN", + "loc": "582:49-582:50" + }, + { + "token": [ + "INT", + "16" + ], + "loc": "582:50-582:52" + }, + { + "token": "COMMA", + "loc": "582:52-582:53" + }, + { + "token": [ + "INT", + "0" + ], + "loc": "582:54-582:55" + }, + { + "token": "RPAREN", + "loc": "582:55-582:56" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "582:56-582:56" + }, + { + "token": "NEWLINE", + "loc": "582:56-582:57" + }, + { + "token": [ + "LIDENT", + "v128_store" + ], + "loc": "583:3-583:13" + }, + { + "token": "LPAREN", + "loc": "583:13-583:14" + }, + { + "token": [ + "LIDENT", + "sink" + ], + "loc": "583:14-583:18" + }, + { + "token": "COMMA", + "loc": "583:18-583:19" + }, + { + "token": [ + "INT", + "0" + ], + "loc": "583:20-583:21" + }, + { + "token": "COMMA", + "loc": "583:21-583:22" + }, + { + "token": [ + "LIDENT", + "v128_make" + ], + "loc": "583:23-583:32" + }, + { + "token": "LPAREN", + "loc": "583:32-583:33" + }, + { + "token": [ + "INT", + "0x4242424242424242UL" + ], + "loc": "583:33-583:53" + }, + { + "token": "COMMA", + "loc": "583:53-583:54" + }, + { + "token": [ + "INT", + "0x4343434343434343UL" + ], + "loc": "583:55-583:75" + }, + { + "token": "RPAREN", + "loc": "583:75-583:76" + }, + { + "token": "RPAREN", + "loc": "583:76-583:77" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "583:77-583:77" + }, + { + "token": "NEWLINE", + "loc": "583:77-583:78" + }, + { + "token": [ + "LIDENT", + "println" + ], + "loc": "584:3-584:10" + }, + { + "token": "LPAREN", + "loc": "584:10-584:11" + }, + { + "token": [ + "STRING", + "v128 store last use: ok" + ], + "loc": "584:11-584:36" + }, + { + "token": "RPAREN", + "loc": "584:36-584:37" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "584:37-584:37" + }, + { + "token": "NEWLINE", + "loc": "584:37-584:38" + }, + { + "token": [ + "LIDENT", + "check" + ], + "loc": "585:3-585:8" + }, + { + "token": "LPAREN", + "loc": "585:8-585:9" + }, + { + "token": "NEWLINE", + "loc": "585:9-585:10" + }, + { + "token": [ + "STRING", + "v128 const i16x8 intrinsic" + ], + "loc": "586:5-586:33" + }, + { + "token": "COMMA", + "loc": "586:33-586:34" + }, + { + "token": "NEWLINE", + "loc": "586:34-586:35" + }, + { + "token": [ + "LIDENT", + "i16x8_const" + ], + "loc": "587:5-587:16" + }, + { + "token": "LPAREN", + "loc": "587:16-587:17" + }, + { + "token": [ + "INT", + "1" + ], + "loc": "587:17-587:18" + }, + { + "token": "COMMA", + "loc": "587:18-587:19" + }, + { + "token": [ + "INT", + "2" + ], + "loc": "587:20-587:21" + }, + { + "token": "COMMA", + "loc": "587:21-587:22" + }, + { + "token": [ + "INT", + "3" + ], + "loc": "587:23-587:24" + }, + { + "token": "COMMA", + "loc": "587:24-587:25" + }, + { + "token": [ + "INT", + "4" + ], + "loc": "587:26-587:27" + }, + { + "token": "COMMA", + "loc": "587:27-587:28" + }, + { + "token": [ + "INT", + "5" + ], + "loc": "587:29-587:30" + }, + { + "token": "COMMA", + "loc": "587:30-587:31" + }, + { + "token": [ + "INT", + "6" + ], + "loc": "587:32-587:33" + }, + { + "token": "COMMA", + "loc": "587:33-587:34" + }, + { + "token": [ + "INT", + "7" + ], + "loc": "587:35-587:36" + }, + { + "token": "COMMA", + "loc": "587:36-587:37" + }, + { + "token": "MINUS", + "loc": "587:38-587:39" + }, + { + "token": [ + "INT", + "1" + ], + "loc": "587:39-587:40" + }, + { + "token": "RPAREN", + "loc": "587:40-587:41" + }, + { + "token": "COMMA", + "loc": "587:41-587:42" + }, + { + "token": "NEWLINE", + "loc": "587:42-587:43" + }, + { + "token": [ + "INT", + "0x0004000300020001UL" + ], + "loc": "588:5-588:25" + }, + { + "token": "COMMA", + "loc": "588:25-588:26" + }, + { + "token": "NEWLINE", + "loc": "588:26-588:27" + }, + { + "token": [ + "INT", + "0xffff000700060005UL" + ], + "loc": "589:5-589:25" + }, + { + "token": "COMMA", + "loc": "589:25-589:26" + }, + { + "token": "NEWLINE", + "loc": "589:26-589:27" + }, + { + "token": "RPAREN", + "loc": "590:3-590:4" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "590:4-590:4" + }, + { + "token": "NEWLINE", + "loc": "590:4-590:5" + }, + { + "token": [ + "LIDENT", + "check" + ], + "loc": "591:3-591:8" + }, + { + "token": "LPAREN", + "loc": "591:8-591:9" + }, + { + "token": "NEWLINE", + "loc": "591:9-591:10" + }, + { + "token": [ + "STRING", + "v128 const i32x4 intrinsic" + ], + "loc": "592:5-592:33" + }, + { + "token": "COMMA", + "loc": "592:33-592:34" + }, + { + "token": "NEWLINE", + "loc": "592:34-592:35" + }, + { + "token": [ + "LIDENT", + "i32x4_const" + ], + "loc": "593:5-593:16" + }, + { + "token": "LPAREN", + "loc": "593:16-593:17" + }, + { + "token": [ + "INT", + "0x11223344" + ], + "loc": "593:17-593:27" + }, + { + "token": "COMMA", + "loc": "593:27-593:28" + }, + { + "token": "MINUS", + "loc": "593:29-593:30" + }, + { + "token": [ + "INT", + "1" + ], + "loc": "593:30-593:31" + }, + { + "token": "COMMA", + "loc": "593:31-593:32" + }, + { + "token": [ + "INT", + "0" + ], + "loc": "593:33-593:34" + }, + { + "token": "COMMA", + "loc": "593:34-593:35" + }, + { + "token": [ + "INT", + "0x7fffffff" + ], + "loc": "593:36-593:46" + }, + { + "token": "RPAREN", + "loc": "593:46-593:47" + }, + { + "token": "COMMA", + "loc": "593:47-593:48" + }, + { + "token": "NEWLINE", + "loc": "593:48-593:49" + }, + { + "token": [ + "INT", + "0xffffffff11223344UL" + ], + "loc": "594:5-594:25" + }, + { + "token": "COMMA", + "loc": "594:25-594:26" + }, + { + "token": "NEWLINE", + "loc": "594:26-594:27" + }, + { + "token": [ + "INT", + "0x7fffffff00000000UL" + ], + "loc": "595:5-595:25" + }, + { + "token": "COMMA", + "loc": "595:25-595:26" + }, + { + "token": "NEWLINE", + "loc": "595:26-595:27" + }, + { + "token": "RPAREN", + "loc": "596:3-596:4" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "596:4-596:4" + }, + { + "token": "NEWLINE", + "loc": "596:4-596:5" + }, + { + "token": [ + "LIDENT", + "check" + ], + "loc": "597:3-597:8" + }, + { + "token": "LPAREN", + "loc": "597:8-597:9" + }, + { + "token": "NEWLINE", + "loc": "597:9-597:10" + }, + { + "token": [ + "STRING", + "v128 const i64x2 intrinsic" + ], + "loc": "598:5-598:33" + }, + { + "token": "COMMA", + "loc": "598:33-598:34" + }, + { + "token": "NEWLINE", + "loc": "598:34-598:35" + }, + { + "token": [ + "LIDENT", + "i64x2_const" + ], + "loc": "599:5-599:16" + }, + { + "token": "LPAREN", + "loc": "599:16-599:17" + }, + { + "token": [ + "INT", + "0x0102030405060708UL" + ], + "loc": "599:17-599:37" + }, + { + "token": "COMMA", + "loc": "599:37-599:38" + }, + { + "token": [ + "INT", + "0xf0e0d0c0b0a09080UL" + ], + "loc": "599:39-599:59" + }, + { + "token": "RPAREN", + "loc": "599:59-599:60" + }, + { + "token": "COMMA", + "loc": "599:60-599:61" + }, + { + "token": "NEWLINE", + "loc": "599:61-599:62" + }, + { + "token": [ + "INT", + "0x0102030405060708UL" + ], + "loc": "600:5-600:25" + }, + { + "token": "COMMA", + "loc": "600:25-600:26" + }, + { + "token": "NEWLINE", + "loc": "600:26-600:27" + }, + { + "token": [ + "INT", + "0xf0e0d0c0b0a09080UL" + ], + "loc": "601:5-601:25" + }, + { + "token": "COMMA", + "loc": "601:25-601:26" + }, + { + "token": "NEWLINE", + "loc": "601:26-601:27" + }, + { + "token": "RPAREN", + "loc": "602:3-602:4" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "602:4-602:4" + }, + { + "token": "NEWLINE", + "loc": "602:4-602:5" + }, + { + "token": [ + "LIDENT", + "check" + ], + "loc": "603:3-603:8" + }, + { + "token": "LPAREN", + "loc": "603:8-603:9" + }, + { + "token": "NEWLINE", + "loc": "603:9-603:10" + }, + { + "token": [ + "STRING", + "v128 const f32x4 intrinsic" + ], + "loc": "604:5-604:33" + }, + { + "token": "COMMA", + "loc": "604:33-604:34" + }, + { + "token": "NEWLINE", + "loc": "604:34-604:35" + }, + { + "token": [ + "LIDENT", + "f32x4_const" + ], + "loc": "605:5-605:16" + }, + { + "token": "LPAREN", + "loc": "605:16-605:17" + }, + { + "token": [ + "DOUBLE", + "1.5" + ], + "loc": "605:17-605:20" + }, + { + "token": "COMMA", + "loc": "605:20-605:21" + }, + { + "token": "MINUS", + "loc": "605:22-605:23" + }, + { + "token": [ + "DOUBLE", + "2.0" + ], + "loc": "605:23-605:26" + }, + { + "token": "COMMA", + "loc": "605:26-605:27" + }, + { + "token": [ + "DOUBLE", + "0.0" + ], + "loc": "605:28-605:31" + }, + { + "token": "COMMA", + "loc": "605:31-605:32" + }, + { + "token": [ + "DOUBLE", + "3.25" + ], + "loc": "605:33-605:37" + }, + { + "token": "RPAREN", + "loc": "605:37-605:38" + }, + { + "token": "COMMA", + "loc": "605:38-605:39" + }, + { + "token": "NEWLINE", + "loc": "605:39-605:40" + }, + { + "token": [ + "INT", + "0xc00000003fc00000UL" + ], + "loc": "606:5-606:25" + }, + { + "token": "COMMA", + "loc": "606:25-606:26" + }, + { + "token": "NEWLINE", + "loc": "606:26-606:27" + }, + { + "token": [ + "INT", + "0x4050000000000000UL" + ], + "loc": "607:5-607:25" + }, + { + "token": "COMMA", + "loc": "607:25-607:26" + }, + { + "token": "NEWLINE", + "loc": "607:26-607:27" + }, + { + "token": "RPAREN", + "loc": "608:3-608:4" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "608:4-608:4" + }, + { + "token": "NEWLINE", + "loc": "608:4-608:5" + }, + { + "token": [ + "LIDENT", + "check" + ], + "loc": "609:3-609:8" + }, + { + "token": "LPAREN", + "loc": "609:8-609:9" + }, + { + "token": "NEWLINE", + "loc": "609:9-609:10" + }, + { + "token": [ + "STRING", + "v128 const f64x2 intrinsic" + ], + "loc": "610:5-610:33" + }, + { + "token": "COMMA", + "loc": "610:33-610:34" + }, + { + "token": "NEWLINE", + "loc": "610:34-610:35" + }, + { + "token": [ + "LIDENT", + "f64x2_const" + ], + "loc": "611:5-611:16" + }, + { + "token": "LPAREN", + "loc": "611:16-611:17" + }, + { + "token": [ + "DOUBLE", + "1.5" + ], + "loc": "611:17-611:20" + }, + { + "token": "COMMA", + "loc": "611:20-611:21" + }, + { + "token": "MINUS", + "loc": "611:22-611:23" + }, + { + "token": [ + "DOUBLE", + "0.0" + ], + "loc": "611:23-611:26" + }, + { + "token": "RPAREN", + "loc": "611:26-611:27" + }, + { + "token": "COMMA", + "loc": "611:27-611:28" + }, + { + "token": "NEWLINE", + "loc": "611:28-611:29" + }, + { + "token": [ + "INT", + "0x3ff8000000000000UL" + ], + "loc": "612:5-612:25" + }, + { + "token": "COMMA", + "loc": "612:25-612:26" + }, + { + "token": "NEWLINE", + "loc": "612:26-612:27" + }, + { + "token": [ + "INT", + "0x8000000000000000UL" + ], + "loc": "613:5-613:25" + }, + { + "token": "COMMA", + "loc": "613:25-613:26" + }, + { + "token": "NEWLINE", + "loc": "613:26-613:27" + }, + { + "token": "RPAREN", + "loc": "614:3-614:4" + }, + { + "token": "NEWLINE", + "loc": "614:4-614:5" + }, + { + "token": "RBRACE", + "loc": "615:1-615:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "615:2-615:2" + }, + { + "token": "NEWLINE", + "loc": "615:2-615:3" + }, + { + "token": "NEWLINE", + "loc": "616:1-616:2" + }, + { + "token": "FN", + "loc": "617:1-617:3" + }, + { + "token": [ + "LIDENT", + "load_u64_le" + ], + "loc": "617:4-617:15" + }, + { + "token": "LPAREN", + "loc": "617:15-617:16" + }, + { + "token": [ + "LIDENT", + "bytes" + ], + "loc": "617:16-617:21" + }, + { + "token": "COLON", + "loc": "617:22-617:23" + }, + { + "token": [ + "UIDENT", + "FixedArray" + ], + "loc": "617:24-617:34" + }, + { + "token": "LBRACKET", + "loc": "617:34-617:35" + }, + { + "token": [ + "UIDENT", + "Byte" + ], + "loc": "617:35-617:39" + }, + { + "token": "RBRACKET", + "loc": "617:39-617:40" + }, + { + "token": "COMMA", + "loc": "617:40-617:41" + }, + { + "token": [ + "LIDENT", + "offset" + ], + "loc": "617:42-617:48" + }, + { + "token": "COLON", + "loc": "617:49-617:50" + }, + { + "token": [ + "UIDENT", + "Int" + ], + "loc": "617:51-617:54" + }, + { + "token": "RPAREN", + "loc": "617:54-617:55" + }, + { + "token": "THIN_ARROW", + "loc": "617:56-617:58" + }, + { + "token": [ + "UIDENT", + "UInt64" + ], + "loc": "617:59-617:65" + }, + { + "token": "LBRACE", + "loc": "617:66-617:67" + }, + { + "token": "NEWLINE", + "loc": "617:67-617:68" + }, + { + "token": "LET", + "loc": "618:3-618:6" + }, + { + "token": "MUTABLE", + "loc": "618:7-618:10" + }, + { + "token": [ + "LIDENT", + "result" + ], + "loc": "618:11-618:17" + }, + { + "token": "EQUAL", + "loc": "618:18-618:19" + }, + { + "token": [ + "INT", + "0UL" + ], + "loc": "618:20-618:23" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "618:23-618:23" + }, + { + "token": "NEWLINE", + "loc": "618:23-618:24" + }, + { + "token": "FOR", + "loc": "619:3-619:6" + }, + { + "token": [ + "LIDENT", + "i" + ], + "loc": "619:7-619:8" + }, + { + "token": "IN", + "loc": "619:9-619:11" + }, + { + "token": [ + "INT", + "0" + ], + "loc": "619:12-619:13" + }, + { + "token": "RANGE_INCLUSIVE", + "loc": "619:13-619:16" + }, + { + "token": [ + "INT", + "7" + ], + "loc": "619:16-619:17" + }, + { + "token": "LBRACE", + "loc": "619:18-619:19" + }, + { + "token": "NEWLINE", + "loc": "619:19-619:20" + }, + { + "token": [ + "LIDENT", + "result" + ], + "loc": "620:5-620:11" + }, + { + "token": "EQUAL", + "loc": "620:12-620:13" + }, + { + "token": [ + "LIDENT", + "result" + ], + "loc": "620:14-620:20" + }, + { + "token": [ + "DOT_LIDENT", + "lor" + ], + "loc": "620:21-620:24" + }, + { + "token": "LPAREN", + "loc": "620:24-620:25" + }, + { + "token": [ + "LIDENT", + "bytes" + ], + "loc": "620:25-620:30" + }, + { + "token": "LBRACKET", + "loc": "620:30-620:31" + }, + { + "token": [ + "LIDENT", + "offset" + ], + "loc": "620:31-620:37" + }, + { + "token": "PLUS", + "loc": "620:38-620:39" + }, + { + "token": [ + "LIDENT", + "i" + ], + "loc": "620:40-620:41" + }, + { + "token": "RBRACKET", + "loc": "620:41-620:42" + }, + { + "token": [ + "DOT_LIDENT", + "to_uint64" + ], + "loc": "620:43-620:52" + }, + { + "token": "LPAREN", + "loc": "620:52-620:53" + }, + { + "token": "RPAREN", + "loc": "620:53-620:54" + }, + { + "token": [ + "INFIX2", + "<<" + ], + "loc": "620:55-620:57" + }, + { + "token": "LPAREN", + "loc": "620:58-620:59" + }, + { + "token": [ + "INT", + "8" + ], + "loc": "620:59-620:60" + }, + { + "token": [ + "INFIX3", + "*" + ], + "loc": "620:61-620:62" + }, + { + "token": [ + "LIDENT", + "i" + ], + "loc": "620:63-620:64" + }, + { + "token": "RPAREN", + "loc": "620:64-620:65" + }, + { + "token": "RPAREN", + "loc": "620:65-620:66" + }, + { + "token": "NEWLINE", + "loc": "620:66-620:67" + }, + { + "token": "RBRACE", + "loc": "621:3-621:4" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "621:4-621:4" + }, + { + "token": "NEWLINE", + "loc": "621:4-621:5" + }, + { + "token": [ + "LIDENT", + "result" + ], + "loc": "622:3-622:9" + }, + { + "token": "NEWLINE", + "loc": "622:9-622:10" + }, + { + "token": "RBRACE", + "loc": "623:1-623:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "623:2-623:2" + }, + { + "token": "NEWLINE", + "loc": "623:2-623:3" + }, + { + "token": "NEWLINE", + "loc": "624:1-624:2" + }, + { + "token": "FN", + "loc": "625:1-625:3" + }, + { + "token": [ + "LIDENT", + "store_u64_le" + ], + "loc": "625:4-625:16" + }, + { + "token": "LPAREN", + "loc": "625:16-625:17" + }, + { + "token": [ + "LIDENT", + "bytes" + ], + "loc": "625:17-625:22" + }, + { + "token": "COLON", + "loc": "625:23-625:24" + }, + { + "token": [ + "UIDENT", + "FixedArray" + ], + "loc": "625:25-625:35" + }, + { + "token": "LBRACKET", + "loc": "625:35-625:36" + }, + { + "token": [ + "UIDENT", + "Byte" + ], + "loc": "625:36-625:40" + }, + { + "token": "RBRACKET", + "loc": "625:40-625:41" + }, + { + "token": "COMMA", + "loc": "625:41-625:42" + }, + { + "token": [ + "LIDENT", + "offset" + ], + "loc": "625:43-625:49" + }, + { + "token": "COLON", + "loc": "625:50-625:51" + }, + { + "token": [ + "UIDENT", + "Int" + ], + "loc": "625:52-625:55" + }, + { + "token": "COMMA", + "loc": "625:55-625:56" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "625:57-625:62" + }, + { + "token": "COLON", + "loc": "625:63-625:64" + }, + { + "token": [ + "UIDENT", + "UInt64" + ], + "loc": "625:65-625:71" + }, + { + "token": "RPAREN", + "loc": "625:71-625:72" + }, + { + "token": "THIN_ARROW", + "loc": "625:73-625:75" + }, + { + "token": [ + "UIDENT", + "Unit" + ], + "loc": "625:76-625:80" + }, + { + "token": "LBRACE", + "loc": "625:81-625:82" + }, + { + "token": "NEWLINE", + "loc": "625:82-625:83" + }, + { + "token": "FOR", + "loc": "626:3-626:6" + }, + { + "token": [ + "LIDENT", + "i" + ], + "loc": "626:7-626:8" + }, + { + "token": "IN", + "loc": "626:9-626:11" + }, + { + "token": [ + "INT", + "0" + ], + "loc": "626:12-626:13" + }, + { + "token": "RANGE_INCLUSIVE", + "loc": "626:13-626:16" + }, + { + "token": [ + "INT", + "7" + ], + "loc": "626:16-626:17" + }, + { + "token": "LBRACE", + "loc": "626:18-626:19" + }, + { + "token": "NEWLINE", + "loc": "626:19-626:20" + }, + { + "token": [ + "LIDENT", + "bytes" + ], + "loc": "627:5-627:10" + }, + { + "token": "LBRACKET", + "loc": "627:10-627:11" + }, + { + "token": [ + "LIDENT", + "offset" + ], + "loc": "627:11-627:17" + }, + { + "token": "PLUS", + "loc": "627:18-627:19" + }, + { + "token": [ + "LIDENT", + "i" + ], + "loc": "627:20-627:21" + }, + { + "token": "RBRACKET", + "loc": "627:21-627:22" + }, + { + "token": "EQUAL", + "loc": "627:23-627:24" + }, + { + "token": "LPAREN", + "loc": "627:25-627:26" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "627:26-627:31" + }, + { + "token": [ + "INFIX2", + ">>" + ], + "loc": "627:32-627:34" + }, + { + "token": "LPAREN", + "loc": "627:35-627:36" + }, + { + "token": [ + "INT", + "8" + ], + "loc": "627:36-627:37" + }, + { + "token": [ + "INFIX3", + "*" + ], + "loc": "627:38-627:39" + }, + { + "token": [ + "LIDENT", + "i" + ], + "loc": "627:40-627:41" + }, + { + "token": "RPAREN", + "loc": "627:41-627:42" + }, + { + "token": "RPAREN", + "loc": "627:42-627:43" + }, + { + "token": [ + "DOT_LIDENT", + "to_byte" + ], + "loc": "627:44-627:51" + }, + { + "token": "LPAREN", + "loc": "627:51-627:52" + }, + { + "token": "RPAREN", + "loc": "627:52-627:53" + }, + { + "token": "NEWLINE", + "loc": "627:53-627:54" + }, + { + "token": "RBRACE", + "loc": "628:3-628:4" + }, + { + "token": "NEWLINE", + "loc": "628:4-628:5" + }, + { + "token": "RBRACE", + "loc": "629:1-629:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "629:2-629:2" + }, + { + "token": "NEWLINE", + "loc": "629:2-629:3" + }, + { + "token": "NEWLINE", + "loc": "630:1-630:2" + }, + { + "token": "FN", + "loc": "631:1-631:3" + }, + { + "token": [ + "LIDENT", + "pick_lane" + ], + "loc": "631:4-631:13" + }, + { + "token": "LPAREN", + "loc": "631:13-631:14" + }, + { + "token": [ + "LIDENT", + "b" + ], + "loc": "631:14-631:15" + }, + { + "token": "COLON", + "loc": "631:16-631:17" + }, + { + "token": [ + "UIDENT", + "Bool" + ], + "loc": "631:18-631:22" + }, + { + "token": "RPAREN", + "loc": "631:22-631:23" + }, + { + "token": "THIN_ARROW", + "loc": "631:24-631:26" + }, + { + "token": [ + "UIDENT", + "Int" + ], + "loc": "631:27-631:30" + }, + { + "token": "LBRACE", + "loc": "631:31-631:32" + }, + { + "token": "NEWLINE", + "loc": "631:32-631:33" + }, + { + "token": "IF", + "loc": "632:3-632:5" + }, + { + "token": [ + "LIDENT", + "b" + ], + "loc": "632:6-632:7" + }, + { + "token": "LBRACE", + "loc": "632:8-632:9" + }, + { + "token": "NEWLINE", + "loc": "632:9-632:10" + }, + { + "token": [ + "INT", + "5" + ], + "loc": "633:5-633:6" + }, + { + "token": "NEWLINE", + "loc": "633:6-633:7" + }, + { + "token": "RBRACE", + "loc": "634:3-634:4" + }, + { + "token": "ELSE", + "loc": "634:5-634:9" + }, + { + "token": "LBRACE", + "loc": "634:10-634:11" + }, + { + "token": "NEWLINE", + "loc": "634:11-634:12" + }, + { + "token": [ + "INT", + "0" + ], + "loc": "635:5-635:6" + }, + { + "token": "NEWLINE", + "loc": "635:6-635:7" + }, + { + "token": "RBRACE", + "loc": "636:3-636:4" + }, + { + "token": "NEWLINE", + "loc": "636:4-636:5" + }, + { + "token": "RBRACE", + "loc": "637:1-637:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "637:2-637:2" + }, + { + "token": "NEWLINE", + "loc": "637:2-637:3" + }, + { + "token": "NEWLINE", + "loc": "638:1-638:2" + }, + { + "token": "FN", + "loc": "639:1-639:3" + }, + { + "token": [ + "LIDENT", + "f32_to_i32_reinterpret" + ], + "loc": "639:4-639:26" + }, + { + "token": "LPAREN", + "loc": "639:26-639:27" + }, + { + "token": [ + "LIDENT", + "a" + ], + "loc": "639:27-639:28" + }, + { + "token": "COLON", + "loc": "639:29-639:30" + }, + { + "token": [ + "UIDENT", + "Float" + ], + "loc": "639:31-639:36" + }, + { + "token": "RPAREN", + "loc": "639:36-639:37" + }, + { + "token": "THIN_ARROW", + "loc": "639:38-639:40" + }, + { + "token": [ + "UIDENT", + "Int" + ], + "loc": "639:41-639:44" + }, + { + "token": "EQUAL", + "loc": "639:45-639:46" + }, + { + "token": [ + "STRING", + "%f32.to_i32_reinterpret" + ], + "loc": "639:47-639:72" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "639:72-639:72" + }, + { + "token": "NEWLINE", + "loc": "639:72-639:73" + }, + { + "token": "NEWLINE", + "loc": "640:1-640:2" + }, + { + "token": "FN", + "loc": "641:1-641:3" + }, + { + "token": [ + "LIDENT", + "u64_of_low_32" + ], + "loc": "641:4-641:17" + }, + { + "token": "LPAREN", + "loc": "641:17-641:18" + }, + { + "token": [ + "LIDENT", + "v" + ], + "loc": "641:18-641:19" + }, + { + "token": "COLON", + "loc": "641:20-641:21" + }, + { + "token": [ + "UIDENT", + "Int" + ], + "loc": "641:22-641:25" + }, + { + "token": "RPAREN", + "loc": "641:25-641:26" + }, + { + "token": "THIN_ARROW", + "loc": "641:27-641:29" + }, + { + "token": [ + "UIDENT", + "UInt64" + ], + "loc": "641:30-641:36" + }, + { + "token": "LBRACE", + "loc": "641:37-641:38" + }, + { + "token": "NEWLINE", + "loc": "641:38-641:39" + }, + { + "token": [ + "LIDENT", + "v" + ], + "loc": "642:3-642:4" + }, + { + "token": [ + "DOT_LIDENT", + "to_uint64" + ], + "loc": "642:5-642:14" + }, + { + "token": "LPAREN", + "loc": "642:14-642:15" + }, + { + "token": "RPAREN", + "loc": "642:15-642:16" + }, + { + "token": [ + "DOT_LIDENT", + "land" + ], + "loc": "642:17-642:21" + }, + { + "token": "LPAREN", + "loc": "642:21-642:22" + }, + { + "token": [ + "INT", + "0xffffffffUL" + ], + "loc": "642:22-642:34" + }, + { + "token": "RPAREN", + "loc": "642:34-642:35" + }, + { + "token": "NEWLINE", + "loc": "642:35-642:36" + }, + { + "token": "RBRACE", + "loc": "643:1-643:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "643:2-643:2" + }, + { + "token": "NEWLINE", + "loc": "643:2-643:3" + }, + { + "token": "NEWLINE", + "loc": "644:1-644:2" + }, + { + "token": [ + "ATTRIBUTE", + { + "id": "intrinsic", + "dot_id": "", + "raw_payload": "(\"%v128.v128_const_i16x8\")" + } + ], + "loc": "645:1-645:37" + }, + { + "token": "NEWLINE", + "loc": "645:37-645:38" + }, + { + "token": "FN", + "loc": "646:1-646:3" + }, + { + "token": [ + "LIDENT", + "i16x8_const" + ], + "loc": "646:4-646:15" + }, + { + "token": "LPAREN", + "loc": "646:15-646:16" + }, + { + "token": "NEWLINE", + "loc": "646:16-646:17" + }, + { + "token": [ + "LIDENT", + "l0" + ], + "loc": "647:3-647:5" + }, + { + "token": "COLON", + "loc": "647:6-647:7" + }, + { + "token": [ + "UIDENT", + "Int" + ], + "loc": "647:8-647:11" + }, + { + "token": "COMMA", + "loc": "647:11-647:12" + }, + { + "token": "NEWLINE", + "loc": "647:12-647:13" + }, + { + "token": [ + "LIDENT", + "l1" + ], + "loc": "648:3-648:5" + }, + { + "token": "COLON", + "loc": "648:6-648:7" + }, + { + "token": [ + "UIDENT", + "Int" + ], + "loc": "648:8-648:11" + }, + { + "token": "COMMA", + "loc": "648:11-648:12" + }, + { + "token": "NEWLINE", + "loc": "648:12-648:13" + }, + { + "token": [ + "LIDENT", + "l2" + ], + "loc": "649:3-649:5" + }, + { + "token": "COLON", + "loc": "649:6-649:7" + }, + { + "token": [ + "UIDENT", + "Int" + ], + "loc": "649:8-649:11" + }, + { + "token": "COMMA", + "loc": "649:11-649:12" + }, + { + "token": "NEWLINE", + "loc": "649:12-649:13" + }, + { + "token": [ + "LIDENT", + "l3" + ], + "loc": "650:3-650:5" + }, + { + "token": "COLON", + "loc": "650:6-650:7" + }, + { + "token": [ + "UIDENT", + "Int" + ], + "loc": "650:8-650:11" + }, + { + "token": "COMMA", + "loc": "650:11-650:12" + }, + { + "token": "NEWLINE", + "loc": "650:12-650:13" + }, + { + "token": [ + "LIDENT", + "l4" + ], + "loc": "651:3-651:5" + }, + { + "token": "COLON", + "loc": "651:6-651:7" + }, + { + "token": [ + "UIDENT", + "Int" + ], + "loc": "651:8-651:11" + }, + { + "token": "COMMA", + "loc": "651:11-651:12" + }, + { + "token": "NEWLINE", + "loc": "651:12-651:13" + }, + { + "token": [ + "LIDENT", + "l5" + ], + "loc": "652:3-652:5" + }, + { + "token": "COLON", + "loc": "652:6-652:7" + }, + { + "token": [ + "UIDENT", + "Int" + ], + "loc": "652:8-652:11" + }, + { + "token": "COMMA", + "loc": "652:11-652:12" + }, + { + "token": "NEWLINE", + "loc": "652:12-652:13" + }, + { + "token": [ + "LIDENT", + "l6" + ], + "loc": "653:3-653:5" + }, + { + "token": "COLON", + "loc": "653:6-653:7" + }, + { + "token": [ + "UIDENT", + "Int" + ], + "loc": "653:8-653:11" + }, + { + "token": "COMMA", + "loc": "653:11-653:12" + }, + { + "token": "NEWLINE", + "loc": "653:12-653:13" + }, + { + "token": [ + "LIDENT", + "l7" + ], + "loc": "654:3-654:5" + }, + { + "token": "COLON", + "loc": "654:6-654:7" + }, + { + "token": [ + "UIDENT", + "Int" + ], + "loc": "654:8-654:11" + }, + { + "token": "NEWLINE", + "loc": "654:11-654:12" + }, + { + "token": "RPAREN", + "loc": "655:1-655:2" + }, + { + "token": "THIN_ARROW", + "loc": "655:3-655:5" + }, + { + "token": [ + "UIDENT", + "V128" + ], + "loc": "655:6-655:10" + }, + { + "token": "LBRACE", + "loc": "655:11-655:12" + }, + { + "token": "NEWLINE", + "loc": "655:12-655:13" + }, + { + "token": "FN", + "loc": "656:3-656:5" + }, + { + "token": [ + "LIDENT", + "word" + ], + "loc": "656:6-656:10" + }, + { + "token": "LPAREN", + "loc": "656:10-656:11" + }, + { + "token": [ + "LIDENT", + "a" + ], + "loc": "656:11-656:12" + }, + { + "token": "COLON", + "loc": "656:13-656:14" + }, + { + "token": [ + "UIDENT", + "Int" + ], + "loc": "656:15-656:18" + }, + { + "token": "COMMA", + "loc": "656:18-656:19" + }, + { + "token": [ + "LIDENT", + "b" + ], + "loc": "656:20-656:21" + }, + { + "token": "COLON", + "loc": "656:22-656:23" + }, + { + "token": [ + "UIDENT", + "Int" + ], + "loc": "656:24-656:27" + }, + { + "token": "COMMA", + "loc": "656:27-656:28" + }, + { + "token": [ + "LIDENT", + "c" + ], + "loc": "656:29-656:30" + }, + { + "token": "COLON", + "loc": "656:31-656:32" + }, + { + "token": [ + "UIDENT", + "Int" + ], + "loc": "656:33-656:36" + }, + { + "token": "COMMA", + "loc": "656:36-656:37" + }, + { + "token": [ + "LIDENT", + "d" + ], + "loc": "656:38-656:39" + }, + { + "token": "COLON", + "loc": "656:40-656:41" + }, + { + "token": [ + "UIDENT", + "Int" + ], + "loc": "656:42-656:45" + }, + { + "token": "RPAREN", + "loc": "656:45-656:46" + }, + { + "token": "THIN_ARROW", + "loc": "656:47-656:49" + }, + { + "token": [ + "UIDENT", + "UInt64" + ], + "loc": "656:50-656:56" + }, + { + "token": "LBRACE", + "loc": "656:57-656:58" + }, + { + "token": "NEWLINE", + "loc": "656:58-656:59" + }, + { + "token": [ + "LIDENT", + "u64_of_low_32" + ], + "loc": "657:5-657:18" + }, + { + "token": "LPAREN", + "loc": "657:18-657:19" + }, + { + "token": [ + "LIDENT", + "a" + ], + "loc": "657:19-657:20" + }, + { + "token": "AMPER", + "loc": "657:21-657:22" + }, + { + "token": [ + "INT", + "0xffff" + ], + "loc": "657:23-657:29" + }, + { + "token": "RPAREN", + "loc": "657:29-657:30" + }, + { + "token": "NEWLINE", + "loc": "657:30-657:31" + }, + { + "token": [ + "DOT_LIDENT", + "lor" + ], + "loc": "658:6-658:9" + }, + { + "token": "LPAREN", + "loc": "658:9-658:10" + }, + { + "token": [ + "LIDENT", + "u64_of_low_32" + ], + "loc": "658:10-658:23" + }, + { + "token": "LPAREN", + "loc": "658:23-658:24" + }, + { + "token": [ + "LIDENT", + "b" + ], + "loc": "658:24-658:25" + }, + { + "token": "AMPER", + "loc": "658:26-658:27" + }, + { + "token": [ + "INT", + "0xffff" + ], + "loc": "658:28-658:34" + }, + { + "token": "RPAREN", + "loc": "658:34-658:35" + }, + { + "token": [ + "INFIX2", + "<<" + ], + "loc": "658:36-658:38" + }, + { + "token": [ + "INT", + "16" + ], + "loc": "658:39-658:41" + }, + { + "token": "RPAREN", + "loc": "658:41-658:42" + }, + { + "token": "NEWLINE", + "loc": "658:42-658:43" + }, + { + "token": [ + "DOT_LIDENT", + "lor" + ], + "loc": "659:6-659:9" + }, + { + "token": "LPAREN", + "loc": "659:9-659:10" + }, + { + "token": [ + "LIDENT", + "u64_of_low_32" + ], + "loc": "659:10-659:23" + }, + { + "token": "LPAREN", + "loc": "659:23-659:24" + }, + { + "token": [ + "LIDENT", + "c" + ], + "loc": "659:24-659:25" + }, + { + "token": "AMPER", + "loc": "659:26-659:27" + }, + { + "token": [ + "INT", + "0xffff" + ], + "loc": "659:28-659:34" + }, + { + "token": "RPAREN", + "loc": "659:34-659:35" + }, + { + "token": [ + "INFIX2", + "<<" + ], + "loc": "659:36-659:38" + }, + { + "token": [ + "INT", + "32" + ], + "loc": "659:39-659:41" + }, + { + "token": "RPAREN", + "loc": "659:41-659:42" + }, + { + "token": "NEWLINE", + "loc": "659:42-659:43" + }, + { + "token": [ + "DOT_LIDENT", + "lor" + ], + "loc": "660:6-660:9" + }, + { + "token": "LPAREN", + "loc": "660:9-660:10" + }, + { + "token": [ + "LIDENT", + "u64_of_low_32" + ], + "loc": "660:10-660:23" + }, + { + "token": "LPAREN", + "loc": "660:23-660:24" + }, + { + "token": [ + "LIDENT", + "d" + ], + "loc": "660:24-660:25" + }, + { + "token": "AMPER", + "loc": "660:26-660:27" + }, + { + "token": [ + "INT", + "0xffff" + ], + "loc": "660:28-660:34" + }, + { + "token": "RPAREN", + "loc": "660:34-660:35" + }, + { + "token": [ + "INFIX2", + "<<" + ], + "loc": "660:36-660:38" + }, + { + "token": [ + "INT", + "48" + ], + "loc": "660:39-660:41" + }, + { + "token": "RPAREN", + "loc": "660:41-660:42" + }, + { + "token": "NEWLINE", + "loc": "660:42-660:43" + }, + { + "token": "RBRACE", + "loc": "661:3-661:4" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "661:4-661:4" + }, + { + "token": "NEWLINE", + "loc": "661:4-661:5" + }, + { + "token": "NEWLINE", + "loc": "662:1-662:2" + }, + { + "token": [ + "LIDENT", + "v128_make" + ], + "loc": "663:3-663:12" + }, + { + "token": "LPAREN", + "loc": "663:12-663:13" + }, + { + "token": [ + "LIDENT", + "word" + ], + "loc": "663:13-663:17" + }, + { + "token": "LPAREN", + "loc": "663:17-663:18" + }, + { + "token": [ + "LIDENT", + "l0" + ], + "loc": "663:18-663:20" + }, + { + "token": "COMMA", + "loc": "663:20-663:21" + }, + { + "token": [ + "LIDENT", + "l1" + ], + "loc": "663:22-663:24" + }, + { + "token": "COMMA", + "loc": "663:24-663:25" + }, + { + "token": [ + "LIDENT", + "l2" + ], + "loc": "663:26-663:28" + }, + { + "token": "COMMA", + "loc": "663:28-663:29" + }, + { + "token": [ + "LIDENT", + "l3" + ], + "loc": "663:30-663:32" + }, + { + "token": "RPAREN", + "loc": "663:32-663:33" + }, + { + "token": "COMMA", + "loc": "663:33-663:34" + }, + { + "token": [ + "LIDENT", + "word" + ], + "loc": "663:35-663:39" + }, + { + "token": "LPAREN", + "loc": "663:39-663:40" + }, + { + "token": [ + "LIDENT", + "l4" + ], + "loc": "663:40-663:42" + }, + { + "token": "COMMA", + "loc": "663:42-663:43" + }, + { + "token": [ + "LIDENT", + "l5" + ], + "loc": "663:44-663:46" + }, + { + "token": "COMMA", + "loc": "663:46-663:47" + }, + { + "token": [ + "LIDENT", + "l6" + ], + "loc": "663:48-663:50" + }, + { + "token": "COMMA", + "loc": "663:50-663:51" + }, + { + "token": [ + "LIDENT", + "l7" + ], + "loc": "663:52-663:54" + }, + { + "token": "RPAREN", + "loc": "663:54-663:55" + }, + { + "token": "RPAREN", + "loc": "663:55-663:56" + }, + { + "token": "NEWLINE", + "loc": "663:56-663:57" + }, + { + "token": "RBRACE", + "loc": "664:1-664:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "664:2-664:2" + }, + { + "token": "NEWLINE", + "loc": "664:2-664:3" + }, + { + "token": "NEWLINE", + "loc": "665:1-665:2" + }, + { + "token": [ + "ATTRIBUTE", + { + "id": "intrinsic", + "dot_id": "", + "raw_payload": "(\"%v128.v128_const_i32x4\")" + } + ], + "loc": "666:1-666:37" + }, + { + "token": "NEWLINE", + "loc": "666:37-666:38" + }, + { + "token": "FN", + "loc": "667:1-667:3" + }, + { + "token": [ + "LIDENT", + "i32x4_const" + ], + "loc": "667:4-667:15" + }, + { + "token": "LPAREN", + "loc": "667:15-667:16" + }, + { + "token": [ + "LIDENT", + "l0" + ], + "loc": "667:16-667:18" + }, + { + "token": "COLON", + "loc": "667:19-667:20" + }, + { + "token": [ + "UIDENT", + "Int" + ], + "loc": "667:21-667:24" + }, + { + "token": "COMMA", + "loc": "667:24-667:25" + }, + { + "token": [ + "LIDENT", + "l1" + ], + "loc": "667:26-667:28" + }, + { + "token": "COLON", + "loc": "667:29-667:30" + }, + { + "token": [ + "UIDENT", + "Int" + ], + "loc": "667:31-667:34" + }, + { + "token": "COMMA", + "loc": "667:34-667:35" + }, + { + "token": [ + "LIDENT", + "l2" + ], + "loc": "667:36-667:38" + }, + { + "token": "COLON", + "loc": "667:39-667:40" + }, + { + "token": [ + "UIDENT", + "Int" + ], + "loc": "667:41-667:44" + }, + { + "token": "COMMA", + "loc": "667:44-667:45" + }, + { + "token": [ + "LIDENT", + "l3" + ], + "loc": "667:46-667:48" + }, + { + "token": "COLON", + "loc": "667:49-667:50" + }, + { + "token": [ + "UIDENT", + "Int" + ], + "loc": "667:51-667:54" + }, + { + "token": "RPAREN", + "loc": "667:54-667:55" + }, + { + "token": "THIN_ARROW", + "loc": "667:56-667:58" + }, + { + "token": [ + "UIDENT", + "V128" + ], + "loc": "667:59-667:63" + }, + { + "token": "LBRACE", + "loc": "667:64-667:65" + }, + { + "token": "NEWLINE", + "loc": "667:65-667:66" + }, + { + "token": [ + "LIDENT", + "v128_make" + ], + "loc": "668:3-668:12" + }, + { + "token": "LPAREN", + "loc": "668:12-668:13" + }, + { + "token": "NEWLINE", + "loc": "668:13-668:14" + }, + { + "token": [ + "LIDENT", + "u64_of_low_32" + ], + "loc": "669:5-669:18" + }, + { + "token": "LPAREN", + "loc": "669:18-669:19" + }, + { + "token": [ + "LIDENT", + "l0" + ], + "loc": "669:19-669:21" + }, + { + "token": "RPAREN", + "loc": "669:21-669:22" + }, + { + "token": [ + "DOT_LIDENT", + "lor" + ], + "loc": "669:23-669:26" + }, + { + "token": "LPAREN", + "loc": "669:26-669:27" + }, + { + "token": [ + "LIDENT", + "u64_of_low_32" + ], + "loc": "669:27-669:40" + }, + { + "token": "LPAREN", + "loc": "669:40-669:41" + }, + { + "token": [ + "LIDENT", + "l1" + ], + "loc": "669:41-669:43" + }, + { + "token": "RPAREN", + "loc": "669:43-669:44" + }, + { + "token": [ + "INFIX2", + "<<" + ], + "loc": "669:45-669:47" + }, + { + "token": [ + "INT", + "32" + ], + "loc": "669:48-669:50" + }, + { + "token": "RPAREN", + "loc": "669:50-669:51" + }, + { + "token": "COMMA", + "loc": "669:51-669:52" + }, + { + "token": "NEWLINE", + "loc": "669:52-669:53" + }, + { + "token": [ + "LIDENT", + "u64_of_low_32" + ], + "loc": "670:5-670:18" + }, + { + "token": "LPAREN", + "loc": "670:18-670:19" + }, + { + "token": [ + "LIDENT", + "l2" + ], + "loc": "670:19-670:21" + }, + { + "token": "RPAREN", + "loc": "670:21-670:22" + }, + { + "token": [ + "DOT_LIDENT", + "lor" + ], + "loc": "670:23-670:26" + }, + { + "token": "LPAREN", + "loc": "670:26-670:27" + }, + { + "token": [ + "LIDENT", + "u64_of_low_32" + ], + "loc": "670:27-670:40" + }, + { + "token": "LPAREN", + "loc": "670:40-670:41" + }, + { + "token": [ + "LIDENT", + "l3" + ], + "loc": "670:41-670:43" + }, + { + "token": "RPAREN", + "loc": "670:43-670:44" + }, + { + "token": [ + "INFIX2", + "<<" + ], + "loc": "670:45-670:47" + }, + { + "token": [ + "INT", + "32" + ], + "loc": "670:48-670:50" + }, + { + "token": "RPAREN", + "loc": "670:50-670:51" + }, + { + "token": "COMMA", + "loc": "670:51-670:52" + }, + { + "token": "NEWLINE", + "loc": "670:52-670:53" + }, + { + "token": "RPAREN", + "loc": "671:3-671:4" + }, + { + "token": "NEWLINE", + "loc": "671:4-671:5" + }, + { + "token": "RBRACE", + "loc": "672:1-672:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "672:2-672:2" + }, + { + "token": "NEWLINE", + "loc": "672:2-672:3" + }, + { + "token": "NEWLINE", + "loc": "673:1-673:2" + }, + { + "token": [ + "ATTRIBUTE", + { + "id": "intrinsic", + "dot_id": "", + "raw_payload": "(\"%v128.v128_const_i64x2\")" + } + ], + "loc": "674:1-674:37" + }, + { + "token": "NEWLINE", + "loc": "674:37-674:38" + }, + { + "token": "FN", + "loc": "675:1-675:3" + }, + { + "token": [ + "LIDENT", + "i64x2_const" + ], + "loc": "675:4-675:15" + }, + { + "token": "LPAREN", + "loc": "675:15-675:16" + }, + { + "token": [ + "LIDENT", + "l0" + ], + "loc": "675:16-675:18" + }, + { + "token": "COLON", + "loc": "675:19-675:20" + }, + { + "token": [ + "UIDENT", + "UInt64" + ], + "loc": "675:21-675:27" + }, + { + "token": "COMMA", + "loc": "675:27-675:28" + }, + { + "token": [ + "LIDENT", + "l1" + ], + "loc": "675:29-675:31" + }, + { + "token": "COLON", + "loc": "675:32-675:33" + }, + { + "token": [ + "UIDENT", + "UInt64" + ], + "loc": "675:34-675:40" + }, + { + "token": "RPAREN", + "loc": "675:40-675:41" + }, + { + "token": "THIN_ARROW", + "loc": "675:42-675:44" + }, + { + "token": [ + "UIDENT", + "V128" + ], + "loc": "675:45-675:49" + }, + { + "token": "LBRACE", + "loc": "675:50-675:51" + }, + { + "token": "NEWLINE", + "loc": "675:51-675:52" + }, + { + "token": [ + "LIDENT", + "v128_make" + ], + "loc": "676:3-676:12" + }, + { + "token": "LPAREN", + "loc": "676:12-676:13" + }, + { + "token": [ + "LIDENT", + "l0" + ], + "loc": "676:13-676:15" + }, + { + "token": "COMMA", + "loc": "676:15-676:16" + }, + { + "token": [ + "LIDENT", + "l1" + ], + "loc": "676:17-676:19" + }, + { + "token": "RPAREN", + "loc": "676:19-676:20" + }, + { + "token": "NEWLINE", + "loc": "676:20-676:21" + }, + { + "token": "RBRACE", + "loc": "677:1-677:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "677:2-677:2" + }, + { + "token": "NEWLINE", + "loc": "677:2-677:3" + }, + { + "token": "NEWLINE", + "loc": "678:1-678:2" + }, + { + "token": [ + "ATTRIBUTE", + { + "id": "intrinsic", + "dot_id": "", + "raw_payload": "(\"%v128.v128_const_f32x4\")" + } + ], + "loc": "679:1-679:37" + }, + { + "token": "NEWLINE", + "loc": "679:37-679:38" + }, + { + "token": "FN", + "loc": "680:1-680:3" + }, + { + "token": [ + "LIDENT", + "f32x4_const" + ], + "loc": "680:4-680:15" + }, + { + "token": "LPAREN", + "loc": "680:15-680:16" + }, + { + "token": [ + "LIDENT", + "l0" + ], + "loc": "680:16-680:18" + }, + { + "token": "COLON", + "loc": "680:19-680:20" + }, + { + "token": [ + "UIDENT", + "Float" + ], + "loc": "680:21-680:26" + }, + { + "token": "COMMA", + "loc": "680:26-680:27" + }, + { + "token": [ + "LIDENT", + "l1" + ], + "loc": "680:28-680:30" + }, + { + "token": "COLON", + "loc": "680:31-680:32" + }, + { + "token": [ + "UIDENT", + "Float" + ], + "loc": "680:33-680:38" + }, + { + "token": "COMMA", + "loc": "680:38-680:39" + }, + { + "token": [ + "LIDENT", + "l2" + ], + "loc": "680:40-680:42" + }, + { + "token": "COLON", + "loc": "680:43-680:44" + }, + { + "token": [ + "UIDENT", + "Float" + ], + "loc": "680:45-680:50" + }, + { + "token": "COMMA", + "loc": "680:50-680:51" + }, + { + "token": [ + "LIDENT", + "l3" + ], + "loc": "680:52-680:54" + }, + { + "token": "COLON", + "loc": "680:55-680:56" + }, + { + "token": [ + "UIDENT", + "Float" + ], + "loc": "680:57-680:62" + }, + { + "token": "RPAREN", + "loc": "680:62-680:63" + }, + { + "token": "THIN_ARROW", + "loc": "680:64-680:66" + }, + { + "token": [ + "UIDENT", + "V128" + ], + "loc": "680:67-680:71" + }, + { + "token": "LBRACE", + "loc": "680:72-680:73" + }, + { + "token": "NEWLINE", + "loc": "680:73-680:74" + }, + { + "token": "FN", + "loc": "681:3-681:5" + }, + { + "token": [ + "LIDENT", + "bits" + ], + "loc": "681:6-681:10" + }, + { + "token": "LPAREN", + "loc": "681:10-681:11" + }, + { + "token": [ + "LIDENT", + "x" + ], + "loc": "681:11-681:12" + }, + { + "token": "COLON", + "loc": "681:13-681:14" + }, + { + "token": [ + "UIDENT", + "Float" + ], + "loc": "681:15-681:20" + }, + { + "token": "RPAREN", + "loc": "681:20-681:21" + }, + { + "token": "THIN_ARROW", + "loc": "681:22-681:24" + }, + { + "token": [ + "UIDENT", + "UInt64" + ], + "loc": "681:25-681:31" + }, + { + "token": "LBRACE", + "loc": "681:32-681:33" + }, + { + "token": "NEWLINE", + "loc": "681:33-681:34" + }, + { + "token": [ + "LIDENT", + "u64_of_low_32" + ], + "loc": "682:5-682:18" + }, + { + "token": "LPAREN", + "loc": "682:18-682:19" + }, + { + "token": [ + "LIDENT", + "f32_to_i32_reinterpret" + ], + "loc": "682:19-682:41" + }, + { + "token": "LPAREN", + "loc": "682:41-682:42" + }, + { + "token": [ + "LIDENT", + "x" + ], + "loc": "682:42-682:43" + }, + { + "token": "RPAREN", + "loc": "682:43-682:44" + }, + { + "token": "RPAREN", + "loc": "682:44-682:45" + }, + { + "token": "NEWLINE", + "loc": "682:45-682:46" + }, + { + "token": "RBRACE", + "loc": "683:3-683:4" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "683:4-683:4" + }, + { + "token": "NEWLINE", + "loc": "683:4-683:5" + }, + { + "token": "NEWLINE", + "loc": "684:1-684:2" + }, + { + "token": [ + "LIDENT", + "v128_make" + ], + "loc": "685:3-685:12" + }, + { + "token": "LPAREN", + "loc": "685:12-685:13" + }, + { + "token": [ + "LIDENT", + "bits" + ], + "loc": "685:13-685:17" + }, + { + "token": "LPAREN", + "loc": "685:17-685:18" + }, + { + "token": [ + "LIDENT", + "l0" + ], + "loc": "685:18-685:20" + }, + { + "token": "RPAREN", + "loc": "685:20-685:21" + }, + { + "token": [ + "DOT_LIDENT", + "lor" + ], + "loc": "685:22-685:25" + }, + { + "token": "LPAREN", + "loc": "685:25-685:26" + }, + { + "token": [ + "LIDENT", + "bits" + ], + "loc": "685:26-685:30" + }, + { + "token": "LPAREN", + "loc": "685:30-685:31" + }, + { + "token": [ + "LIDENT", + "l1" + ], + "loc": "685:31-685:33" + }, + { + "token": "RPAREN", + "loc": "685:33-685:34" + }, + { + "token": [ + "INFIX2", + "<<" + ], + "loc": "685:35-685:37" + }, + { + "token": [ + "INT", + "32" + ], + "loc": "685:38-685:40" + }, + { + "token": "RPAREN", + "loc": "685:40-685:41" + }, + { + "token": "COMMA", + "loc": "685:41-685:42" + }, + { + "token": [ + "LIDENT", + "bits" + ], + "loc": "685:43-685:47" + }, + { + "token": "LPAREN", + "loc": "685:47-685:48" + }, + { + "token": [ + "LIDENT", + "l2" + ], + "loc": "685:48-685:50" + }, + { + "token": "RPAREN", + "loc": "685:50-685:51" + }, + { + "token": [ + "DOT_LIDENT", + "lor" + ], + "loc": "685:52-685:55" + }, + { + "token": "LPAREN", + "loc": "685:55-685:56" + }, + { + "token": [ + "LIDENT", + "bits" + ], + "loc": "685:56-685:60" + }, + { + "token": "LPAREN", + "loc": "685:60-685:61" + }, + { + "token": [ + "LIDENT", + "l3" + ], + "loc": "685:61-685:63" + }, + { + "token": "RPAREN", + "loc": "685:63-685:64" + }, + { + "token": [ + "INFIX2", + "<<" + ], + "loc": "685:65-685:67" + }, + { + "token": [ + "INT", + "32" + ], + "loc": "685:68-685:70" + }, + { + "token": "RPAREN", + "loc": "685:70-685:71" + }, + { + "token": "RPAREN", + "loc": "685:71-685:72" + }, + { + "token": "NEWLINE", + "loc": "685:72-685:73" + }, + { + "token": "RBRACE", + "loc": "686:1-686:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "686:2-686:2" + }, + { + "token": "NEWLINE", + "loc": "686:2-686:3" + }, + { + "token": "NEWLINE", + "loc": "687:1-687:2" + }, + { + "token": [ + "ATTRIBUTE", + { + "id": "intrinsic", + "dot_id": "", + "raw_payload": "(\"%v128.v128_const_f64x2\")" + } + ], + "loc": "688:1-688:37" + }, + { + "token": "NEWLINE", + "loc": "688:37-688:38" + }, + { + "token": "FN", + "loc": "689:1-689:3" + }, + { + "token": [ + "LIDENT", + "f64x2_const" + ], + "loc": "689:4-689:15" + }, + { + "token": "LPAREN", + "loc": "689:15-689:16" + }, + { + "token": [ + "LIDENT", + "l0" + ], + "loc": "689:16-689:18" + }, + { + "token": "COLON", + "loc": "689:19-689:20" + }, + { + "token": [ + "UIDENT", + "Double" + ], + "loc": "689:21-689:27" + }, + { + "token": "COMMA", + "loc": "689:27-689:28" + }, + { + "token": [ + "LIDENT", + "l1" + ], + "loc": "689:29-689:31" + }, + { + "token": "COLON", + "loc": "689:32-689:33" + }, + { + "token": [ + "UIDENT", + "Double" + ], + "loc": "689:34-689:40" + }, + { + "token": "RPAREN", + "loc": "689:40-689:41" + }, + { + "token": "THIN_ARROW", + "loc": "689:42-689:44" + }, + { + "token": [ + "UIDENT", + "V128" + ], + "loc": "689:45-689:49" + }, + { + "token": "LBRACE", + "loc": "689:50-689:51" + }, + { + "token": "NEWLINE", + "loc": "689:51-689:52" + }, + { + "token": [ + "LIDENT", + "v128_make" + ], + "loc": "690:3-690:12" + }, + { + "token": "LPAREN", + "loc": "690:12-690:13" + }, + { + "token": "NEWLINE", + "loc": "690:13-690:14" + }, + { + "token": [ + "LIDENT", + "l0" + ], + "loc": "691:5-691:7" + }, + { + "token": [ + "DOT_LIDENT", + "reinterpret_as_int64" + ], + "loc": "691:8-691:28" + }, + { + "token": "LPAREN", + "loc": "691:28-691:29" + }, + { + "token": "RPAREN", + "loc": "691:29-691:30" + }, + { + "token": [ + "DOT_LIDENT", + "reinterpret_as_uint64" + ], + "loc": "691:31-691:52" + }, + { + "token": "LPAREN", + "loc": "691:52-691:53" + }, + { + "token": "RPAREN", + "loc": "691:53-691:54" + }, + { + "token": "COMMA", + "loc": "691:54-691:55" + }, + { + "token": "NEWLINE", + "loc": "691:55-691:56" + }, + { + "token": [ + "LIDENT", + "l1" + ], + "loc": "692:5-692:7" + }, + { + "token": [ + "DOT_LIDENT", + "reinterpret_as_int64" + ], + "loc": "692:8-692:28" + }, + { + "token": "LPAREN", + "loc": "692:28-692:29" + }, + { + "token": "RPAREN", + "loc": "692:29-692:30" + }, + { + "token": [ + "DOT_LIDENT", + "reinterpret_as_uint64" + ], + "loc": "692:31-692:52" + }, + { + "token": "LPAREN", + "loc": "692:52-692:53" + }, + { + "token": "RPAREN", + "loc": "692:53-692:54" + }, + { + "token": "COMMA", + "loc": "692:54-692:55" + }, + { + "token": "NEWLINE", + "loc": "692:55-692:56" + }, + { + "token": "RPAREN", + "loc": "693:3-693:4" + }, + { + "token": "NEWLINE", + "loc": "693:4-693:5" + }, + { + "token": "RBRACE", + "loc": "694:1-694:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "694:2-694:2" + }, + { + "token": "NEWLINE", + "loc": "694:2-694:3" + }, + { + "token": "NEWLINE", + "loc": "695:1-695:2" + }, + { + "token": [ + "ATTRIBUTE", + { + "id": "intrinsic", + "dot_id": "", + "raw_payload": "(\"%v128.v128_load\")" + } + ], + "loc": "696:1-696:30" + }, + { + "token": "NEWLINE", + "loc": "696:30-696:31" + }, + { + "token": [ + "ATTRIBUTE", + { + "id": "borrow", + "dot_id": "", + "raw_payload": "(bytes)" + } + ], + "loc": "697:1-697:15" + }, + { + "token": "NEWLINE", + "loc": "697:15-697:16" + }, + { + "token": "FN", + "loc": "698:1-698:3" + }, + { + "token": [ + "LIDENT", + "v128_load" + ], + "loc": "698:4-698:13" + }, + { + "token": "LPAREN", + "loc": "698:13-698:14" + }, + { + "token": [ + "LIDENT", + "bytes" + ], + "loc": "698:14-698:19" + }, + { + "token": "COLON", + "loc": "698:20-698:21" + }, + { + "token": [ + "UIDENT", + "FixedArray" + ], + "loc": "698:22-698:32" + }, + { + "token": "LBRACKET", + "loc": "698:32-698:33" + }, + { + "token": [ + "UIDENT", + "Byte" + ], + "loc": "698:33-698:37" + }, + { + "token": "RBRACKET", + "loc": "698:37-698:38" + }, + { + "token": "COMMA", + "loc": "698:38-698:39" + }, + { + "token": [ + "LIDENT", + "offset" + ], + "loc": "698:40-698:46" + }, + { + "token": "COLON", + "loc": "698:47-698:48" + }, + { + "token": [ + "UIDENT", + "Int" + ], + "loc": "698:49-698:52" + }, + { + "token": "RPAREN", + "loc": "698:52-698:53" + }, + { + "token": "THIN_ARROW", + "loc": "698:54-698:56" + }, + { + "token": [ + "UIDENT", + "V128" + ], + "loc": "698:57-698:61" + }, + { + "token": "LBRACE", + "loc": "698:62-698:63" + }, + { + "token": "NEWLINE", + "loc": "698:63-698:64" + }, + { + "token": [ + "LIDENT", + "v128_make" + ], + "loc": "699:3-699:12" + }, + { + "token": "LPAREN", + "loc": "699:12-699:13" + }, + { + "token": [ + "LIDENT", + "load_u64_le" + ], + "loc": "699:13-699:24" + }, + { + "token": "LPAREN", + "loc": "699:24-699:25" + }, + { + "token": [ + "LIDENT", + "bytes" + ], + "loc": "699:25-699:30" + }, + { + "token": "COMMA", + "loc": "699:30-699:31" + }, + { + "token": [ + "LIDENT", + "offset" + ], + "loc": "699:32-699:38" + }, + { + "token": "RPAREN", + "loc": "699:38-699:39" + }, + { + "token": "COMMA", + "loc": "699:39-699:40" + }, + { + "token": [ + "LIDENT", + "load_u64_le" + ], + "loc": "699:41-699:52" + }, + { + "token": "LPAREN", + "loc": "699:52-699:53" + }, + { + "token": [ + "LIDENT", + "bytes" + ], + "loc": "699:53-699:58" + }, + { + "token": "COMMA", + "loc": "699:58-699:59" + }, + { + "token": [ + "LIDENT", + "offset" + ], + "loc": "699:60-699:66" + }, + { + "token": "PLUS", + "loc": "699:67-699:68" + }, + { + "token": [ + "INT", + "8" + ], + "loc": "699:69-699:70" + }, + { + "token": "RPAREN", + "loc": "699:70-699:71" + }, + { + "token": "RPAREN", + "loc": "699:71-699:72" + }, + { + "token": "NEWLINE", + "loc": "699:72-699:73" + }, + { + "token": "RBRACE", + "loc": "700:1-700:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "700:2-700:2" + }, + { + "token": "NEWLINE", + "loc": "700:2-700:3" + }, + { + "token": "NEWLINE", + "loc": "701:1-701:2" + }, + { + "token": [ + "ATTRIBUTE", + { + "id": "intrinsic", + "dot_id": "", + "raw_payload": "(\"%v128.v128_store\")" + } + ], + "loc": "702:1-702:31" + }, + { + "token": "NEWLINE", + "loc": "702:31-702:32" + }, + { + "token": [ + "ATTRIBUTE", + { + "id": "borrow", + "dot_id": "", + "raw_payload": "(bytes)" + } + ], + "loc": "703:1-703:15" + }, + { + "token": "NEWLINE", + "loc": "703:15-703:16" + }, + { + "token": "FN", + "loc": "704:1-704:3" + }, + { + "token": [ + "LIDENT", + "v128_store" + ], + "loc": "704:4-704:14" + }, + { + "token": "LPAREN", + "loc": "704:14-704:15" + }, + { + "token": [ + "LIDENT", + "bytes" + ], + "loc": "704:15-704:20" + }, + { + "token": "COLON", + "loc": "704:21-704:22" + }, + { + "token": [ + "UIDENT", + "FixedArray" + ], + "loc": "704:23-704:33" + }, + { + "token": "LBRACKET", + "loc": "704:33-704:34" + }, + { + "token": [ + "UIDENT", + "Byte" + ], + "loc": "704:34-704:38" + }, + { + "token": "RBRACKET", + "loc": "704:38-704:39" + }, + { + "token": "COMMA", + "loc": "704:39-704:40" + }, + { + "token": [ + "LIDENT", + "offset" + ], + "loc": "704:41-704:47" + }, + { + "token": "COLON", + "loc": "704:48-704:49" + }, + { + "token": [ + "UIDENT", + "Int" + ], + "loc": "704:50-704:53" + }, + { + "token": "COMMA", + "loc": "704:53-704:54" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "704:55-704:60" + }, + { + "token": "COLON", + "loc": "704:61-704:62" + }, + { + "token": [ + "UIDENT", + "V128" + ], + "loc": "704:63-704:67" + }, + { + "token": "RPAREN", + "loc": "704:67-704:68" + }, + { + "token": "THIN_ARROW", + "loc": "704:69-704:71" + }, + { + "token": [ + "UIDENT", + "Unit" + ], + "loc": "704:72-704:76" + }, + { + "token": "LBRACE", + "loc": "704:77-704:78" + }, + { + "token": "NEWLINE", + "loc": "704:78-704:79" + }, + { + "token": [ + "LIDENT", + "store_u64_le" + ], + "loc": "705:3-705:15" + }, + { + "token": "LPAREN", + "loc": "705:15-705:16" + }, + { + "token": [ + "LIDENT", + "bytes" + ], + "loc": "705:16-705:21" + }, + { + "token": "COMMA", + "loc": "705:21-705:22" + }, + { + "token": [ + "LIDENT", + "offset" + ], + "loc": "705:23-705:29" + }, + { + "token": "COMMA", + "loc": "705:29-705:30" + }, + { + "token": [ + "LIDENT", + "v128_lo" + ], + "loc": "705:31-705:38" + }, + { + "token": "LPAREN", + "loc": "705:38-705:39" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "705:39-705:44" + }, + { + "token": "RPAREN", + "loc": "705:44-705:45" + }, + { + "token": "RPAREN", + "loc": "705:45-705:46" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "705:46-705:46" + }, + { + "token": "NEWLINE", + "loc": "705:46-705:47" + }, + { + "token": [ + "LIDENT", + "store_u64_le" + ], + "loc": "706:3-706:15" + }, + { + "token": "LPAREN", + "loc": "706:15-706:16" + }, + { + "token": [ + "LIDENT", + "bytes" + ], + "loc": "706:16-706:21" + }, + { + "token": "COMMA", + "loc": "706:21-706:22" + }, + { + "token": [ + "LIDENT", + "offset" + ], + "loc": "706:23-706:29" + }, + { + "token": "PLUS", + "loc": "706:30-706:31" + }, + { + "token": [ + "INT", + "8" + ], + "loc": "706:32-706:33" + }, + { + "token": "COMMA", + "loc": "706:33-706:34" + }, + { + "token": [ + "LIDENT", + "v128_hi" + ], + "loc": "706:35-706:42" + }, + { + "token": "LPAREN", + "loc": "706:42-706:43" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "706:43-706:48" + }, + { + "token": "RPAREN", + "loc": "706:48-706:49" + }, + { + "token": "RPAREN", + "loc": "706:49-706:50" + }, + { + "token": "NEWLINE", + "loc": "706:50-706:51" + }, + { + "token": "RBRACE", + "loc": "707:1-707:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "707:2-707:2" + }, + { + "token": "NEWLINE", + "loc": "707:2-707:3" + }, + { + "token": "NEWLINE", + "loc": "708:1-708:2" + }, + { + "token": [ + "ATTRIBUTE", + { + "id": "intrinsic", + "dot_id": "", + "raw_payload": "(\"%v128.v128_load8_splat\")" + } + ], + "loc": "709:1-709:37" + }, + { + "token": "NEWLINE", + "loc": "709:37-709:38" + }, + { + "token": [ + "ATTRIBUTE", + { + "id": "borrow", + "dot_id": "", + "raw_payload": "(bytes)" + } + ], + "loc": "710:1-710:15" + }, + { + "token": "NEWLINE", + "loc": "710:15-710:16" + }, + { + "token": "FN", + "loc": "711:1-711:3" + }, + { + "token": [ + "LIDENT", + "v128_load8_splat" + ], + "loc": "711:4-711:20" + }, + { + "token": "LPAREN", + "loc": "711:20-711:21" + }, + { + "token": [ + "LIDENT", + "bytes" + ], + "loc": "711:21-711:26" + }, + { + "token": "COLON", + "loc": "711:27-711:28" + }, + { + "token": [ + "UIDENT", + "FixedArray" + ], + "loc": "711:29-711:39" + }, + { + "token": "LBRACKET", + "loc": "711:39-711:40" + }, + { + "token": [ + "UIDENT", + "Byte" + ], + "loc": "711:40-711:44" + }, + { + "token": "RBRACKET", + "loc": "711:44-711:45" + }, + { + "token": "COMMA", + "loc": "711:45-711:46" + }, + { + "token": [ + "LIDENT", + "offset" + ], + "loc": "711:47-711:53" + }, + { + "token": "COLON", + "loc": "711:54-711:55" + }, + { + "token": [ + "UIDENT", + "Int" + ], + "loc": "711:56-711:59" + }, + { + "token": "RPAREN", + "loc": "711:59-711:60" + }, + { + "token": "THIN_ARROW", + "loc": "711:61-711:63" + }, + { + "token": [ + "UIDENT", + "V128" + ], + "loc": "711:64-711:68" + }, + { + "token": "LBRACE", + "loc": "711:69-711:70" + }, + { + "token": "NEWLINE", + "loc": "711:70-711:71" + }, + { + "token": "LET", + "loc": "712:3-712:6" + }, + { + "token": [ + "LIDENT", + "b" + ], + "loc": "712:7-712:8" + }, + { + "token": "EQUAL", + "loc": "712:9-712:10" + }, + { + "token": [ + "LIDENT", + "bytes" + ], + "loc": "712:11-712:16" + }, + { + "token": "LBRACKET", + "loc": "712:16-712:17" + }, + { + "token": [ + "LIDENT", + "offset" + ], + "loc": "712:17-712:23" + }, + { + "token": "RBRACKET", + "loc": "712:23-712:24" + }, + { + "token": [ + "DOT_LIDENT", + "to_uint64" + ], + "loc": "712:25-712:34" + }, + { + "token": "LPAREN", + "loc": "712:34-712:35" + }, + { + "token": "RPAREN", + "loc": "712:35-712:36" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "712:36-712:36" + }, + { + "token": "NEWLINE", + "loc": "712:36-712:37" + }, + { + "token": "LET", + "loc": "713:3-713:6" + }, + { + "token": "MUTABLE", + "loc": "713:7-713:10" + }, + { + "token": [ + "LIDENT", + "word" + ], + "loc": "713:11-713:15" + }, + { + "token": "EQUAL", + "loc": "713:16-713:17" + }, + { + "token": [ + "INT", + "0UL" + ], + "loc": "713:18-713:21" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "713:21-713:21" + }, + { + "token": "NEWLINE", + "loc": "713:21-713:22" + }, + { + "token": "FOR", + "loc": "714:3-714:6" + }, + { + "token": [ + "LIDENT", + "i" + ], + "loc": "714:7-714:8" + }, + { + "token": "IN", + "loc": "714:9-714:11" + }, + { + "token": [ + "INT", + "0" + ], + "loc": "714:12-714:13" + }, + { + "token": "RANGE_INCLUSIVE", + "loc": "714:13-714:16" + }, + { + "token": [ + "INT", + "7" + ], + "loc": "714:16-714:17" + }, + { + "token": "LBRACE", + "loc": "714:18-714:19" + }, + { + "token": "NEWLINE", + "loc": "714:19-714:20" + }, + { + "token": [ + "LIDENT", + "word" + ], + "loc": "715:5-715:9" + }, + { + "token": "EQUAL", + "loc": "715:10-715:11" + }, + { + "token": [ + "LIDENT", + "word" + ], + "loc": "715:12-715:16" + }, + { + "token": [ + "DOT_LIDENT", + "lor" + ], + "loc": "715:17-715:20" + }, + { + "token": "LPAREN", + "loc": "715:20-715:21" + }, + { + "token": [ + "LIDENT", + "b" + ], + "loc": "715:21-715:22" + }, + { + "token": [ + "INFIX2", + "<<" + ], + "loc": "715:23-715:25" + }, + { + "token": "LPAREN", + "loc": "715:26-715:27" + }, + { + "token": [ + "INT", + "8" + ], + "loc": "715:27-715:28" + }, + { + "token": [ + "INFIX3", + "*" + ], + "loc": "715:29-715:30" + }, + { + "token": [ + "LIDENT", + "i" + ], + "loc": "715:31-715:32" + }, + { + "token": "RPAREN", + "loc": "715:32-715:33" + }, + { + "token": "RPAREN", + "loc": "715:33-715:34" + }, + { + "token": "NEWLINE", + "loc": "715:34-715:35" + }, + { + "token": "RBRACE", + "loc": "716:3-716:4" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "716:4-716:4" + }, + { + "token": "NEWLINE", + "loc": "716:4-716:5" + }, + { + "token": [ + "LIDENT", + "v128_make" + ], + "loc": "717:3-717:12" + }, + { + "token": "LPAREN", + "loc": "717:12-717:13" + }, + { + "token": [ + "LIDENT", + "word" + ], + "loc": "717:13-717:17" + }, + { + "token": "COMMA", + "loc": "717:17-717:18" + }, + { + "token": [ + "LIDENT", + "word" + ], + "loc": "717:19-717:23" + }, + { + "token": "RPAREN", + "loc": "717:23-717:24" + }, + { + "token": "NEWLINE", + "loc": "717:24-717:25" + }, + { + "token": "RBRACE", + "loc": "718:1-718:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "718:2-718:2" + }, + { + "token": "NEWLINE", + "loc": "718:2-718:3" + }, + { + "token": "NEWLINE", + "loc": "719:1-719:2" + }, + { + "token": [ + "ATTRIBUTE", + { + "id": "intrinsic", + "dot_id": "", + "raw_payload": "(\"%v128.v128_load32_zero\")" + } + ], + "loc": "720:1-720:37" + }, + { + "token": "NEWLINE", + "loc": "720:37-720:38" + }, + { + "token": [ + "ATTRIBUTE", + { + "id": "borrow", + "dot_id": "", + "raw_payload": "(bytes)" + } + ], + "loc": "721:1-721:15" + }, + { + "token": "NEWLINE", + "loc": "721:15-721:16" + }, + { + "token": "FN", + "loc": "722:1-722:3" + }, + { + "token": [ + "LIDENT", + "v128_load32_zero" + ], + "loc": "722:4-722:20" + }, + { + "token": "LPAREN", + "loc": "722:20-722:21" + }, + { + "token": [ + "LIDENT", + "bytes" + ], + "loc": "722:21-722:26" + }, + { + "token": "COLON", + "loc": "722:27-722:28" + }, + { + "token": [ + "UIDENT", + "FixedArray" + ], + "loc": "722:29-722:39" + }, + { + "token": "LBRACKET", + "loc": "722:39-722:40" + }, + { + "token": [ + "UIDENT", + "Byte" + ], + "loc": "722:40-722:44" + }, + { + "token": "RBRACKET", + "loc": "722:44-722:45" + }, + { + "token": "COMMA", + "loc": "722:45-722:46" + }, + { + "token": [ + "LIDENT", + "offset" + ], + "loc": "722:47-722:53" + }, + { + "token": "COLON", + "loc": "722:54-722:55" + }, + { + "token": [ + "UIDENT", + "Int" + ], + "loc": "722:56-722:59" + }, + { + "token": "RPAREN", + "loc": "722:59-722:60" + }, + { + "token": "THIN_ARROW", + "loc": "722:61-722:63" + }, + { + "token": [ + "UIDENT", + "V128" + ], + "loc": "722:64-722:68" + }, + { + "token": "LBRACE", + "loc": "722:69-722:70" + }, + { + "token": "NEWLINE", + "loc": "722:70-722:71" + }, + { + "token": "LET", + "loc": "723:3-723:6" + }, + { + "token": "MUTABLE", + "loc": "723:7-723:10" + }, + { + "token": [ + "LIDENT", + "word" + ], + "loc": "723:11-723:15" + }, + { + "token": "EQUAL", + "loc": "723:16-723:17" + }, + { + "token": [ + "INT", + "0UL" + ], + "loc": "723:18-723:21" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "723:21-723:21" + }, + { + "token": "NEWLINE", + "loc": "723:21-723:22" + }, + { + "token": "FOR", + "loc": "724:3-724:6" + }, + { + "token": [ + "LIDENT", + "i" + ], + "loc": "724:7-724:8" + }, + { + "token": "IN", + "loc": "724:9-724:11" + }, + { + "token": [ + "INT", + "0" + ], + "loc": "724:12-724:13" + }, + { + "token": "RANGE_INCLUSIVE", + "loc": "724:13-724:16" + }, + { + "token": [ + "INT", + "3" + ], + "loc": "724:16-724:17" + }, + { + "token": "LBRACE", + "loc": "724:18-724:19" + }, + { + "token": "NEWLINE", + "loc": "724:19-724:20" + }, + { + "token": [ + "LIDENT", + "word" + ], + "loc": "725:5-725:9" + }, + { + "token": "EQUAL", + "loc": "725:10-725:11" + }, + { + "token": [ + "LIDENT", + "word" + ], + "loc": "725:12-725:16" + }, + { + "token": [ + "DOT_LIDENT", + "lor" + ], + "loc": "725:17-725:20" + }, + { + "token": "LPAREN", + "loc": "725:20-725:21" + }, + { + "token": [ + "LIDENT", + "bytes" + ], + "loc": "725:21-725:26" + }, + { + "token": "LBRACKET", + "loc": "725:26-725:27" + }, + { + "token": [ + "LIDENT", + "offset" + ], + "loc": "725:27-725:33" + }, + { + "token": "PLUS", + "loc": "725:34-725:35" + }, + { + "token": [ + "LIDENT", + "i" + ], + "loc": "725:36-725:37" + }, + { + "token": "RBRACKET", + "loc": "725:37-725:38" + }, + { + "token": [ + "DOT_LIDENT", + "to_uint64" + ], + "loc": "725:39-725:48" + }, + { + "token": "LPAREN", + "loc": "725:48-725:49" + }, + { + "token": "RPAREN", + "loc": "725:49-725:50" + }, + { + "token": [ + "INFIX2", + "<<" + ], + "loc": "725:51-725:53" + }, + { + "token": "LPAREN", + "loc": "725:54-725:55" + }, + { + "token": [ + "INT", + "8" + ], + "loc": "725:55-725:56" + }, + { + "token": [ + "INFIX3", + "*" + ], + "loc": "725:57-725:58" + }, + { + "token": [ + "LIDENT", + "i" + ], + "loc": "725:59-725:60" + }, + { + "token": "RPAREN", + "loc": "725:60-725:61" + }, + { + "token": "RPAREN", + "loc": "725:61-725:62" + }, + { + "token": "NEWLINE", + "loc": "725:62-725:63" + }, + { + "token": "RBRACE", + "loc": "726:3-726:4" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "726:4-726:4" + }, + { + "token": "NEWLINE", + "loc": "726:4-726:5" + }, + { + "token": [ + "LIDENT", + "v128_make" + ], + "loc": "727:3-727:12" + }, + { + "token": "LPAREN", + "loc": "727:12-727:13" + }, + { + "token": [ + "LIDENT", + "word" + ], + "loc": "727:13-727:17" + }, + { + "token": "COMMA", + "loc": "727:17-727:18" + }, + { + "token": [ + "INT", + "0UL" + ], + "loc": "727:19-727:22" + }, + { + "token": "RPAREN", + "loc": "727:22-727:23" + }, + { + "token": "NEWLINE", + "loc": "727:23-727:24" + }, + { + "token": "RBRACE", + "loc": "728:1-728:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "728:2-728:2" + }, + { + "token": "NEWLINE", + "loc": "728:2-728:3" + }, + { + "token": "NEWLINE", + "loc": "729:1-729:2" + }, + { + "token": [ + "ATTRIBUTE", + { + "id": "intrinsic", + "dot_id": "", + "raw_payload": "(\"%v128.v128_load16_lane\")" + } + ], + "loc": "730:1-730:37" + }, + { + "token": "NEWLINE", + "loc": "730:37-730:38" + }, + { + "token": [ + "ATTRIBUTE", + { + "id": "borrow", + "dot_id": "", + "raw_payload": "(bytes)" + } + ], + "loc": "731:1-731:15" + }, + { + "token": "NEWLINE", + "loc": "731:15-731:16" + }, + { + "token": "FN", + "loc": "732:1-732:3" + }, + { + "token": [ + "LIDENT", + "v128_load16_lane" + ], + "loc": "732:4-732:20" + }, + { + "token": "LPAREN", + "loc": "732:20-732:21" + }, + { + "token": "NEWLINE", + "loc": "732:21-732:22" + }, + { + "token": [ + "LIDENT", + "bytes" + ], + "loc": "733:3-733:8" + }, + { + "token": "COLON", + "loc": "733:9-733:10" + }, + { + "token": [ + "UIDENT", + "FixedArray" + ], + "loc": "733:11-733:21" + }, + { + "token": "LBRACKET", + "loc": "733:21-733:22" + }, + { + "token": [ + "UIDENT", + "Byte" + ], + "loc": "733:22-733:26" + }, + { + "token": "RBRACKET", + "loc": "733:26-733:27" + }, + { + "token": "COMMA", + "loc": "733:27-733:28" + }, + { + "token": "NEWLINE", + "loc": "733:28-733:29" + }, + { + "token": [ + "LIDENT", + "offset" + ], + "loc": "734:3-734:9" + }, + { + "token": "COLON", + "loc": "734:10-734:11" + }, + { + "token": [ + "UIDENT", + "Int" + ], + "loc": "734:12-734:15" + }, + { + "token": "COMMA", + "loc": "734:15-734:16" + }, + { + "token": "NEWLINE", + "loc": "734:16-734:17" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "735:3-735:8" + }, + { + "token": "COLON", + "loc": "735:9-735:10" + }, + { + "token": [ + "UIDENT", + "V128" + ], + "loc": "735:11-735:15" + }, + { + "token": "COMMA", + "loc": "735:15-735:16" + }, + { + "token": "NEWLINE", + "loc": "735:16-735:17" + }, + { + "token": [ + "LIDENT", + "lane" + ], + "loc": "736:3-736:7" + }, + { + "token": "COLON", + "loc": "736:8-736:9" + }, + { + "token": [ + "UIDENT", + "Int" + ], + "loc": "736:10-736:13" + }, + { + "token": "NEWLINE", + "loc": "736:13-736:14" + }, + { + "token": "RPAREN", + "loc": "737:1-737:2" + }, + { + "token": "THIN_ARROW", + "loc": "737:3-737:5" + }, + { + "token": [ + "UIDENT", + "V128" + ], + "loc": "737:6-737:10" + }, + { + "token": "LBRACE", + "loc": "737:11-737:12" + }, + { + "token": "NEWLINE", + "loc": "737:12-737:13" + }, + { + "token": "LET", + "loc": "738:3-738:6" + }, + { + "token": [ + "LIDENT", + "loaded" + ], + "loc": "738:7-738:13" + }, + { + "token": "EQUAL", + "loc": "738:14-738:15" + }, + { + "token": [ + "LIDENT", + "bytes" + ], + "loc": "738:16-738:21" + }, + { + "token": "LBRACKET", + "loc": "738:21-738:22" + }, + { + "token": [ + "LIDENT", + "offset" + ], + "loc": "738:22-738:28" + }, + { + "token": "RBRACKET", + "loc": "738:28-738:29" + }, + { + "token": [ + "DOT_LIDENT", + "to_uint64" + ], + "loc": "738:30-738:39" + }, + { + "token": "LPAREN", + "loc": "738:39-738:40" + }, + { + "token": "RPAREN", + "loc": "738:40-738:41" + }, + { + "token": [ + "DOT_LIDENT", + "lor" + ], + "loc": "738:42-738:45" + }, + { + "token": "LPAREN", + "loc": "738:45-738:46" + }, + { + "token": [ + "LIDENT", + "bytes" + ], + "loc": "738:46-738:51" + }, + { + "token": "LBRACKET", + "loc": "738:51-738:52" + }, + { + "token": [ + "LIDENT", + "offset" + ], + "loc": "738:52-738:58" + }, + { + "token": "PLUS", + "loc": "738:59-738:60" + }, + { + "token": [ + "INT", + "1" + ], + "loc": "738:61-738:62" + }, + { + "token": "RBRACKET", + "loc": "738:62-738:63" + }, + { + "token": [ + "DOT_LIDENT", + "to_uint64" + ], + "loc": "738:64-738:73" + }, + { + "token": "LPAREN", + "loc": "738:73-738:74" + }, + { + "token": "RPAREN", + "loc": "738:74-738:75" + }, + { + "token": [ + "INFIX2", + "<<" + ], + "loc": "738:76-738:78" + }, + { + "token": [ + "INT", + "8" + ], + "loc": "738:79-738:80" + }, + { + "token": "RPAREN", + "loc": "738:80-738:81" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "738:81-738:81" + }, + { + "token": "NEWLINE", + "loc": "738:81-738:82" + }, + { + "token": "LET", + "loc": "739:3-739:6" + }, + { + "token": [ + "LIDENT", + "shift" + ], + "loc": "739:7-739:12" + }, + { + "token": "EQUAL", + "loc": "739:13-739:14" + }, + { + "token": [ + "LIDENT", + "lane" + ], + "loc": "739:15-739:19" + }, + { + "token": [ + "INFIX3", + "%" + ], + "loc": "739:20-739:21" + }, + { + "token": [ + "INT", + "4" + ], + "loc": "739:22-739:23" + }, + { + "token": [ + "INFIX3", + "*" + ], + "loc": "739:24-739:25" + }, + { + "token": [ + "INT", + "16" + ], + "loc": "739:26-739:28" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "739:28-739:28" + }, + { + "token": "NEWLINE", + "loc": "739:28-739:29" + }, + { + "token": "LET", + "loc": "740:3-740:6" + }, + { + "token": [ + "LIDENT", + "cleared" + ], + "loc": "740:7-740:14" + }, + { + "token": "EQUAL", + "loc": "740:15-740:16" + }, + { + "token": "LPAREN", + "loc": "740:17-740:18" + }, + { + "token": [ + "INT", + "0xffffUL" + ], + "loc": "740:18-740:26" + }, + { + "token": [ + "INFIX2", + "<<" + ], + "loc": "740:27-740:29" + }, + { + "token": [ + "LIDENT", + "shift" + ], + "loc": "740:30-740:35" + }, + { + "token": "RPAREN", + "loc": "740:35-740:36" + }, + { + "token": [ + "DOT_LIDENT", + "lxor" + ], + "loc": "740:37-740:41" + }, + { + "token": "LPAREN", + "loc": "740:41-740:42" + }, + { + "token": [ + "INT", + "0xffffffffffffffffUL" + ], + "loc": "740:42-740:62" + }, + { + "token": "RPAREN", + "loc": "740:62-740:63" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "740:63-740:63" + }, + { + "token": "NEWLINE", + "loc": "740:63-740:64" + }, + { + "token": "IF", + "loc": "741:3-741:5" + }, + { + "token": [ + "LIDENT", + "lane" + ], + "loc": "741:6-741:10" + }, + { + "token": [ + "INFIX1", + "<" + ], + "loc": "741:11-741:12" + }, + { + "token": [ + "INT", + "4" + ], + "loc": "741:13-741:14" + }, + { + "token": "LBRACE", + "loc": "741:15-741:16" + }, + { + "token": "NEWLINE", + "loc": "741:16-741:17" + }, + { + "token": [ + "LIDENT", + "v128_make" + ], + "loc": "742:5-742:14" + }, + { + "token": "LPAREN", + "loc": "742:14-742:15" + }, + { + "token": [ + "LIDENT", + "v128_lo" + ], + "loc": "742:15-742:22" + }, + { + "token": "LPAREN", + "loc": "742:22-742:23" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "742:23-742:28" + }, + { + "token": "RPAREN", + "loc": "742:28-742:29" + }, + { + "token": [ + "DOT_LIDENT", + "land" + ], + "loc": "742:30-742:34" + }, + { + "token": "LPAREN", + "loc": "742:34-742:35" + }, + { + "token": [ + "LIDENT", + "cleared" + ], + "loc": "742:35-742:42" + }, + { + "token": "RPAREN", + "loc": "742:42-742:43" + }, + { + "token": [ + "DOT_LIDENT", + "lor" + ], + "loc": "742:44-742:47" + }, + { + "token": "LPAREN", + "loc": "742:47-742:48" + }, + { + "token": [ + "LIDENT", + "loaded" + ], + "loc": "742:48-742:54" + }, + { + "token": [ + "INFIX2", + "<<" + ], + "loc": "742:55-742:57" + }, + { + "token": [ + "LIDENT", + "shift" + ], + "loc": "742:58-742:63" + }, + { + "token": "RPAREN", + "loc": "742:63-742:64" + }, + { + "token": "COMMA", + "loc": "742:64-742:65" + }, + { + "token": [ + "LIDENT", + "v128_hi" + ], + "loc": "742:66-742:73" + }, + { + "token": "LPAREN", + "loc": "742:73-742:74" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "742:74-742:79" + }, + { + "token": "RPAREN", + "loc": "742:79-742:80" + }, + { + "token": "RPAREN", + "loc": "742:80-742:81" + }, + { + "token": "NEWLINE", + "loc": "742:81-742:82" + }, + { + "token": "RBRACE", + "loc": "743:3-743:4" + }, + { + "token": "ELSE", + "loc": "743:5-743:9" + }, + { + "token": "LBRACE", + "loc": "743:10-743:11" + }, + { + "token": "NEWLINE", + "loc": "743:11-743:12" + }, + { + "token": [ + "LIDENT", + "v128_make" + ], + "loc": "744:5-744:14" + }, + { + "token": "LPAREN", + "loc": "744:14-744:15" + }, + { + "token": [ + "LIDENT", + "v128_lo" + ], + "loc": "744:15-744:22" + }, + { + "token": "LPAREN", + "loc": "744:22-744:23" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "744:23-744:28" + }, + { + "token": "RPAREN", + "loc": "744:28-744:29" + }, + { + "token": "COMMA", + "loc": "744:29-744:30" + }, + { + "token": [ + "LIDENT", + "v128_hi" + ], + "loc": "744:31-744:38" + }, + { + "token": "LPAREN", + "loc": "744:38-744:39" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "744:39-744:44" + }, + { + "token": "RPAREN", + "loc": "744:44-744:45" + }, + { + "token": [ + "DOT_LIDENT", + "land" + ], + "loc": "744:46-744:50" + }, + { + "token": "LPAREN", + "loc": "744:50-744:51" + }, + { + "token": [ + "LIDENT", + "cleared" + ], + "loc": "744:51-744:58" + }, + { + "token": "RPAREN", + "loc": "744:58-744:59" + }, + { + "token": [ + "DOT_LIDENT", + "lor" + ], + "loc": "744:60-744:63" + }, + { + "token": "LPAREN", + "loc": "744:63-744:64" + }, + { + "token": [ + "LIDENT", + "loaded" + ], + "loc": "744:64-744:70" + }, + { + "token": [ + "INFIX2", + "<<" + ], + "loc": "744:71-744:73" + }, + { + "token": [ + "LIDENT", + "shift" + ], + "loc": "744:74-744:79" + }, + { + "token": "RPAREN", + "loc": "744:79-744:80" + }, + { + "token": "RPAREN", + "loc": "744:80-744:81" + }, + { + "token": "NEWLINE", + "loc": "744:81-744:82" + }, + { + "token": "RBRACE", + "loc": "745:3-745:4" + }, + { + "token": "NEWLINE", + "loc": "745:4-745:5" + }, + { + "token": "RBRACE", + "loc": "746:1-746:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "746:2-746:2" + }, + { + "token": "NEWLINE", + "loc": "746:2-746:3" + }, + { + "token": "NEWLINE", + "loc": "747:1-747:2" + }, + { + "token": [ + "ATTRIBUTE", + { + "id": "intrinsic", + "dot_id": "", + "raw_payload": "(\"%v128.v128_store64_lane\")" + } + ], + "loc": "748:1-748:38" + }, + { + "token": "NEWLINE", + "loc": "748:38-748:39" + }, + { + "token": [ + "ATTRIBUTE", + { + "id": "borrow", + "dot_id": "", + "raw_payload": "(bytes)" + } + ], + "loc": "749:1-749:15" + }, + { + "token": "NEWLINE", + "loc": "749:15-749:16" + }, + { + "token": "FN", + "loc": "750:1-750:3" + }, + { + "token": [ + "LIDENT", + "v128_store64_lane" + ], + "loc": "750:4-750:21" + }, + { + "token": "LPAREN", + "loc": "750:21-750:22" + }, + { + "token": "NEWLINE", + "loc": "750:22-750:23" + }, + { + "token": [ + "LIDENT", + "bytes" + ], + "loc": "751:3-751:8" + }, + { + "token": "COLON", + "loc": "751:9-751:10" + }, + { + "token": [ + "UIDENT", + "FixedArray" + ], + "loc": "751:11-751:21" + }, + { + "token": "LBRACKET", + "loc": "751:21-751:22" + }, + { + "token": [ + "UIDENT", + "Byte" + ], + "loc": "751:22-751:26" + }, + { + "token": "RBRACKET", + "loc": "751:26-751:27" + }, + { + "token": "COMMA", + "loc": "751:27-751:28" + }, + { + "token": "NEWLINE", + "loc": "751:28-751:29" + }, + { + "token": [ + "LIDENT", + "offset" + ], + "loc": "752:3-752:9" + }, + { + "token": "COLON", + "loc": "752:10-752:11" + }, + { + "token": [ + "UIDENT", + "Int" + ], + "loc": "752:12-752:15" + }, + { + "token": "COMMA", + "loc": "752:15-752:16" + }, + { + "token": "NEWLINE", + "loc": "752:16-752:17" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "753:3-753:8" + }, + { + "token": "COLON", + "loc": "753:9-753:10" + }, + { + "token": [ + "UIDENT", + "V128" + ], + "loc": "753:11-753:15" + }, + { + "token": "COMMA", + "loc": "753:15-753:16" + }, + { + "token": "NEWLINE", + "loc": "753:16-753:17" + }, + { + "token": [ + "LIDENT", + "lane" + ], + "loc": "754:3-754:7" + }, + { + "token": "COLON", + "loc": "754:8-754:9" + }, + { + "token": [ + "UIDENT", + "Int" + ], + "loc": "754:10-754:13" + }, + { + "token": "NEWLINE", + "loc": "754:13-754:14" + }, + { + "token": "RPAREN", + "loc": "755:1-755:2" + }, + { + "token": "THIN_ARROW", + "loc": "755:3-755:5" + }, + { + "token": [ + "UIDENT", + "Unit" + ], + "loc": "755:6-755:10" + }, + { + "token": "LBRACE", + "loc": "755:11-755:12" + }, + { + "token": "NEWLINE", + "loc": "755:12-755:13" + }, + { + "token": "IF", + "loc": "756:3-756:5" + }, + { + "token": [ + "LIDENT", + "lane" + ], + "loc": "756:6-756:10" + }, + { + "token": [ + "INFIX1", + "==" + ], + "loc": "756:11-756:13" + }, + { + "token": [ + "INT", + "0" + ], + "loc": "756:14-756:15" + }, + { + "token": "LBRACE", + "loc": "756:16-756:17" + }, + { + "token": "NEWLINE", + "loc": "756:17-756:18" + }, + { + "token": [ + "LIDENT", + "store_u64_le" + ], + "loc": "757:5-757:17" + }, + { + "token": "LPAREN", + "loc": "757:17-757:18" + }, + { + "token": [ + "LIDENT", + "bytes" + ], + "loc": "757:18-757:23" + }, + { + "token": "COMMA", + "loc": "757:23-757:24" + }, + { + "token": [ + "LIDENT", + "offset" + ], + "loc": "757:25-757:31" + }, + { + "token": "COMMA", + "loc": "757:31-757:32" + }, + { + "token": [ + "LIDENT", + "v128_lo" + ], + "loc": "757:33-757:40" + }, + { + "token": "LPAREN", + "loc": "757:40-757:41" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "757:41-757:46" + }, + { + "token": "RPAREN", + "loc": "757:46-757:47" + }, + { + "token": "RPAREN", + "loc": "757:47-757:48" + }, + { + "token": "NEWLINE", + "loc": "757:48-757:49" + }, + { + "token": "RBRACE", + "loc": "758:3-758:4" + }, + { + "token": "ELSE", + "loc": "758:5-758:9" + }, + { + "token": "LBRACE", + "loc": "758:10-758:11" + }, + { + "token": "NEWLINE", + "loc": "758:11-758:12" + }, + { + "token": [ + "LIDENT", + "store_u64_le" + ], + "loc": "759:5-759:17" + }, + { + "token": "LPAREN", + "loc": "759:17-759:18" + }, + { + "token": [ + "LIDENT", + "bytes" + ], + "loc": "759:18-759:23" + }, + { + "token": "COMMA", + "loc": "759:23-759:24" + }, + { + "token": [ + "LIDENT", + "offset" + ], + "loc": "759:25-759:31" + }, + { + "token": "COMMA", + "loc": "759:31-759:32" + }, + { + "token": [ + "LIDENT", + "v128_hi" + ], + "loc": "759:33-759:40" + }, + { + "token": "LPAREN", + "loc": "759:40-759:41" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "759:41-759:46" + }, + { + "token": "RPAREN", + "loc": "759:46-759:47" + }, + { + "token": "RPAREN", + "loc": "759:47-759:48" + }, + { + "token": "NEWLINE", + "loc": "759:48-759:49" + }, + { + "token": "RBRACE", + "loc": "760:3-760:4" + }, + { + "token": "NEWLINE", + "loc": "760:4-760:5" + }, + { + "token": "RBRACE", + "loc": "761:1-761:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "761:2-761:2" + }, + { + "token": "NEWLINE", + "loc": "761:2-761:3" + }, + { + "token": "EOF", + "loc": "762:1-762:1" + } +] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/pipeline_test_valstruct_error.json b/test/sync_test/__snapshot__/pipeline_test_valstruct_error.json index 6aa0203b..2526914e 100644 --- a/test/sync_test/__snapshot__/pipeline_test_valstruct_error.json +++ b/test/sync_test/__snapshot__/pipeline_test_valstruct_error.json @@ -1564,119 +1564,185 @@ "loc": null, "children": { "value": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", - "loc": null, - "children": { - "value": "f" - } - } + "value": "to_result" } } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", "loc": null, - "children": [ - { - "kind": "Argument", + "children": { + "value": { + "kind": "Expr::Function", "loc": null, "children": { - "value": { - "kind": "Expr::Constant", + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "constant": { - "kind": "Constant::Int", + "parameters": { + "kind": "Func::Lambda::ParameterList", "loc": null, - "children": { - "value": "1" - } - } - } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} - } - } - }, - { - "kind": "Argument", - "loc": null, - "children": { - "value": { - "kind": "Expr::Constant", - "loc": null, - "children": { - "constant": { - "kind": "Constant::Int", + "children": [] + }, + "body": { + "kind": "Expr::Apply", "loc": null, "children": { - "value": "2" + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "f" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "1" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "2" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Double", + "loc": null, + "children": { + "value": "3.14" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } } - } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} } } }, - { - "kind": "Argument", + "kind": { + "kind": "ArgumentKind::Positional", "loc": null, - "children": { - "value": { - "kind": "Expr::Constant", - "loc": null, - "children": { - "constant": { - "kind": "Constant::Double", - "loc": null, - "children": { - "value": "3.14" - } - } - } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} - } - } + "children": {} } - ] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} + } } - } + ] }, - "kind": { - "kind": "TryOperatorKind::Question", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -1730,119 +1796,185 @@ "loc": null, "children": { "value": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", - "loc": null, - "children": { - "value": "f" - } - } + "value": "to_result" } } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", "loc": null, - "children": [ - { - "kind": "Argument", + "children": { + "value": { + "kind": "Expr::Function", "loc": null, "children": { - "value": { - "kind": "Expr::Constant", + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "constant": { - "kind": "Constant::Int", + "parameters": { + "kind": "Func::Lambda::ParameterList", "loc": null, - "children": { - "value": "-1" - } - } - } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} - } - } - }, - { - "kind": "Argument", - "loc": null, - "children": { - "value": { - "kind": "Expr::Constant", - "loc": null, - "children": { - "constant": { - "kind": "Constant::Int", + "children": [] + }, + "body": { + "kind": "Expr::Apply", "loc": null, "children": { - "value": "2" + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "f" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "-1" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "2" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Double", + "loc": null, + "children": { + "value": "3.14" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } } - } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} } } }, - { - "kind": "Argument", + "kind": { + "kind": "ArgumentKind::Positional", "loc": null, - "children": { - "value": { - "kind": "Expr::Constant", - "loc": null, - "children": { - "constant": { - "kind": "Constant::Double", - "loc": null, - "children": { - "value": "3.14" - } - } - } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} - } - } + "children": {} } - ] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} + } } - } + ] }, - "kind": { - "kind": "TryOperatorKind::Question", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -1898,119 +2030,185 @@ "loc": null, "children": { "value": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", - "loc": null, - "children": { - "value": "f" - } - } + "value": "to_result" } } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", "loc": null, - "children": [ - { - "kind": "Argument", + "children": { + "value": { + "kind": "Expr::Function", "loc": null, "children": { - "value": { - "kind": "Expr::Constant", + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "constant": { - "kind": "Constant::Int", + "parameters": { + "kind": "Func::Lambda::ParameterList", "loc": null, - "children": { - "value": "0" - } - } - } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} - } - } - }, - { - "kind": "Argument", - "loc": null, - "children": { - "value": { - "kind": "Expr::Constant", - "loc": null, - "children": { - "constant": { - "kind": "Constant::Int", + "children": [] + }, + "body": { + "kind": "Expr::Apply", "loc": null, "children": { - "value": "2" + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "f" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "0" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "2" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Double", + "loc": null, + "children": { + "value": "3.14" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } } - } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} } } }, - { - "kind": "Argument", + "kind": { + "kind": "ArgumentKind::Positional", "loc": null, - "children": { - "value": { - "kind": "Expr::Constant", - "loc": null, - "children": { - "constant": { - "kind": "Constant::Double", - "loc": null, - "children": { - "value": "3.14" - } - } - } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} - } - } + "children": {} } - ] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} + } } - } + ] }, - "kind": { - "kind": "TryOperatorKind::Question", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -2037,5 +2235,524 @@ } } } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "to_result" + } + }, + "has_error": null, + "is_async": null, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "f" + } + }, + "ty": { + "kind": "Type::Arrow", + "loc": null, + "children": { + "args": { + "kind": "Type::Arrow::ArgList", + "loc": null, + "children": [] + }, + "res": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "T" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "err": { + "kind": "ErrorType::ErrorType", + "loc": null, + "children": { + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "E" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + "is_async": null + } + } + } + } + ] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [ + { + "kind": "TypeVarBinder", + "loc": null, + "children": { + "name": "T", + "constraints": { + "kind": "TypeVarBinder::TypeVarConstraintList", + "loc": null, + "children": [] + } + } + }, + { + "kind": "TypeVarBinder", + "loc": null, + "children": { + "name": "E", + "constraints": { + "kind": "TypeVarBinder::TypeVarConstraintList", + "loc": null, + "children": [ + { + "kind": "TypeVarConstraint", + "loc": null, + "children": { + "trait": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Error" + } + } + } + } + ] + } + } + } + ] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [ + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "T" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "E" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + ] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::Try", + "loc": null, + "children": { + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "f" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "catch": { + "kind": "Expr::Try::CaseList", + "loc": null, + "children": [ + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "err" + } + } + } + }, + "guard": null, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Err" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::TypeName", + "loc": null, + "children": { + "value": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + }, + "is_object": false + } + } + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "err" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + ] + }, + "catch_all": false, + "try_else": { + "kind": "Expr::Try::CaseList", + "loc": null, + "children": [ + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "value" + } + } + } + }, + "guard": null, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Ok" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::TypeName", + "loc": null, + "children": { + "value": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + }, + "is_object": false + } + } + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "value" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + ] + }, + "has_try": true + } + } + } + } + } } ] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/pipeline_test_valstruct_error.mbt b/test/sync_test/__snapshot__/pipeline_test_valstruct_error.mbt index 022e7f49..c6a0f2e0 100644 --- a/test/sync_test/__snapshot__/pipeline_test_valstruct_error.mbt +++ b/test/sync_test/__snapshot__/pipeline_test_valstruct_error.mbt @@ -30,7 +30,16 @@ fn f(a : Int, b : Int64, c : Double) -> F raise X { ///| fn main { - debug(try? f(1, 2, 3.14)) - debug(try? f(-1, 2, 3.14)) - debug(try? f(0, 2, 3.14)) + debug(to_result(() => f(1, 2, 3.14))) + debug(to_result(() => f(-1, 2, 3.14))) + debug(to_result(() => f(0, 2, 3.14))) +} + +fn[T, E : Error] to_result(f : () -> T raise E) -> Result[T, E] { + try f() + catch { + err => Result::Err(err) + } noraise { + value => Result::Ok(value) + } } diff --git a/test/sync_test/__snapshot__/pipeline_test_valstruct_error.mbt.tokens.json b/test/sync_test/__snapshot__/pipeline_test_valstruct_error.mbt.tokens.json index f792292f..d5b362a5 100644 --- a/test/sync_test/__snapshot__/pipeline_test_valstruct_error.mbt.tokens.json +++ b/test/sync_test/__snapshot__/pipeline_test_valstruct_error.mbt.tokens.json @@ -944,67 +944,90 @@ "loc": "33:8-33:9" }, { - "token": "TRY_QUESTION", - "loc": "33:9-33:13" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "33:9-33:18" + }, + { + "token": "LPAREN", + "loc": "33:18-33:19" + }, + { + "token": "LPAREN", + "loc": "33:19-33:20" + }, + { + "token": "RPAREN", + "loc": "33:20-33:21" + }, + { + "token": "FAT_ARROW", + "loc": "33:22-33:24" }, { "token": [ "LIDENT", "f" ], - "loc": "33:14-33:15" + "loc": "33:25-33:26" }, { "token": "LPAREN", - "loc": "33:15-33:16" + "loc": "33:26-33:27" }, { "token": [ "INT", "1" ], - "loc": "33:16-33:17" + "loc": "33:27-33:28" }, { "token": "COMMA", - "loc": "33:17-33:18" + "loc": "33:28-33:29" }, { "token": [ "INT", "2" ], - "loc": "33:19-33:20" + "loc": "33:30-33:31" }, { "token": "COMMA", - "loc": "33:20-33:21" + "loc": "33:31-33:32" }, { "token": [ "DOUBLE", "3.14" ], - "loc": "33:22-33:26" + "loc": "33:33-33:37" }, { "token": "RPAREN", - "loc": "33:26-33:27" + "loc": "33:37-33:38" }, { "token": "RPAREN", - "loc": "33:27-33:28" + "loc": "33:38-33:39" + }, + { + "token": "RPAREN", + "loc": "33:39-33:40" }, { "token": [ "SEMI", false ], - "loc": "33:28-33:28" + "loc": "33:40-33:40" }, { "token": "NEWLINE", - "loc": "33:28-33:29" + "loc": "33:40-33:41" }, { "token": [ @@ -1018,71 +1041,94 @@ "loc": "34:8-34:9" }, { - "token": "TRY_QUESTION", - "loc": "34:9-34:13" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "34:9-34:18" + }, + { + "token": "LPAREN", + "loc": "34:18-34:19" + }, + { + "token": "LPAREN", + "loc": "34:19-34:20" + }, + { + "token": "RPAREN", + "loc": "34:20-34:21" + }, + { + "token": "FAT_ARROW", + "loc": "34:22-34:24" }, { "token": [ "LIDENT", "f" ], - "loc": "34:14-34:15" + "loc": "34:25-34:26" }, { "token": "LPAREN", - "loc": "34:15-34:16" + "loc": "34:26-34:27" }, { "token": "MINUS", - "loc": "34:16-34:17" + "loc": "34:27-34:28" }, { "token": [ "INT", "1" ], - "loc": "34:17-34:18" + "loc": "34:28-34:29" }, { "token": "COMMA", - "loc": "34:18-34:19" + "loc": "34:29-34:30" }, { "token": [ "INT", "2" ], - "loc": "34:20-34:21" + "loc": "34:31-34:32" }, { "token": "COMMA", - "loc": "34:21-34:22" + "loc": "34:32-34:33" }, { "token": [ "DOUBLE", "3.14" ], - "loc": "34:23-34:27" + "loc": "34:34-34:38" }, { "token": "RPAREN", - "loc": "34:27-34:28" + "loc": "34:38-34:39" }, { "token": "RPAREN", - "loc": "34:28-34:29" + "loc": "34:39-34:40" + }, + { + "token": "RPAREN", + "loc": "34:40-34:41" }, { "token": [ "SEMI", false ], - "loc": "34:29-34:29" + "loc": "34:41-34:41" }, { "token": "NEWLINE", - "loc": "34:29-34:30" + "loc": "34:41-34:42" }, { "token": [ @@ -1096,60 +1142,83 @@ "loc": "35:8-35:9" }, { - "token": "TRY_QUESTION", - "loc": "35:9-35:13" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "35:9-35:18" + }, + { + "token": "LPAREN", + "loc": "35:18-35:19" + }, + { + "token": "LPAREN", + "loc": "35:19-35:20" + }, + { + "token": "RPAREN", + "loc": "35:20-35:21" + }, + { + "token": "FAT_ARROW", + "loc": "35:22-35:24" }, { "token": [ "LIDENT", "f" ], - "loc": "35:14-35:15" + "loc": "35:25-35:26" }, { "token": "LPAREN", - "loc": "35:15-35:16" + "loc": "35:26-35:27" }, { "token": [ "INT", "0" ], - "loc": "35:16-35:17" + "loc": "35:27-35:28" }, { "token": "COMMA", - "loc": "35:17-35:18" + "loc": "35:28-35:29" }, { "token": [ "INT", "2" ], - "loc": "35:19-35:20" + "loc": "35:30-35:31" }, { "token": "COMMA", - "loc": "35:20-35:21" + "loc": "35:31-35:32" }, { "token": [ "DOUBLE", "3.14" ], - "loc": "35:22-35:26" + "loc": "35:33-35:37" }, { "token": "RPAREN", - "loc": "35:26-35:27" + "loc": "35:37-35:38" }, { "token": "RPAREN", - "loc": "35:27-35:28" + "loc": "35:38-35:39" + }, + { + "token": "RPAREN", + "loc": "35:39-35:40" }, { "token": "NEWLINE", - "loc": "35:28-35:29" + "loc": "35:40-35:41" }, { "token": "RBRACE", @@ -1166,8 +1235,324 @@ "token": "NEWLINE", "loc": "36:2-36:3" }, + { + "token": "NEWLINE", + "loc": "37:1-37:2" + }, + { + "token": "FN", + "loc": "38:1-38:3" + }, + { + "token": "LBRACKET", + "loc": "38:3-38:4" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "38:4-38:5" + }, + { + "token": "COMMA", + "loc": "38:5-38:6" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "38:7-38:8" + }, + { + "token": "COLON", + "loc": "38:9-38:10" + }, + { + "token": [ + "UIDENT", + "Error" + ], + "loc": "38:11-38:16" + }, + { + "token": "RBRACKET", + "loc": "38:16-38:17" + }, + { + "token": [ + "LIDENT", + "to_result" + ], + "loc": "38:18-38:27" + }, + { + "token": "LPAREN", + "loc": "38:27-38:28" + }, + { + "token": [ + "LIDENT", + "f" + ], + "loc": "38:28-38:29" + }, + { + "token": "COLON", + "loc": "38:30-38:31" + }, + { + "token": "LPAREN", + "loc": "38:32-38:33" + }, + { + "token": "RPAREN", + "loc": "38:33-38:34" + }, + { + "token": "THIN_ARROW", + "loc": "38:35-38:37" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "38:38-38:39" + }, + { + "token": "RAISE", + "loc": "38:40-38:45" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "38:46-38:47" + }, + { + "token": "RPAREN", + "loc": "38:47-38:48" + }, + { + "token": "THIN_ARROW", + "loc": "38:49-38:51" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "38:52-38:58" + }, + { + "token": "LBRACKET", + "loc": "38:58-38:59" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "38:59-38:60" + }, + { + "token": "COMMA", + "loc": "38:60-38:61" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "38:62-38:63" + }, + { + "token": "RBRACKET", + "loc": "38:63-38:64" + }, + { + "token": "LBRACE", + "loc": "38:65-38:66" + }, + { + "token": "NEWLINE", + "loc": "38:66-38:67" + }, + { + "token": "TRY", + "loc": "39:3-39:6" + }, + { + "token": [ + "LIDENT", + "f" + ], + "loc": "39:7-39:8" + }, + { + "token": "LPAREN", + "loc": "39:8-39:9" + }, + { + "token": "RPAREN", + "loc": "39:9-39:10" + }, + { + "token": "NEWLINE", + "loc": "39:10-39:11" + }, + { + "token": "CATCH", + "loc": "40:3-40:8" + }, + { + "token": "LBRACE", + "loc": "40:9-40:10" + }, + { + "token": "NEWLINE", + "loc": "40:10-40:11" + }, + { + "token": [ + "LIDENT", + "err" + ], + "loc": "41:5-41:8" + }, + { + "token": "FAT_ARROW", + "loc": "41:9-41:11" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "41:12-41:18" + }, + { + "token": "COLONCOLON", + "loc": "41:18-41:20" + }, + { + "token": [ + "UIDENT", + "Err" + ], + "loc": "41:20-41:23" + }, + { + "token": "LPAREN", + "loc": "41:23-41:24" + }, + { + "token": [ + "LIDENT", + "err" + ], + "loc": "41:24-41:27" + }, + { + "token": "RPAREN", + "loc": "41:27-41:28" + }, + { + "token": "NEWLINE", + "loc": "41:28-41:29" + }, + { + "token": "RBRACE", + "loc": "42:3-42:4" + }, + { + "token": "NORAISE", + "loc": "42:5-42:12" + }, + { + "token": "LBRACE", + "loc": "42:13-42:14" + }, + { + "token": "NEWLINE", + "loc": "42:14-42:15" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "43:5-43:10" + }, + { + "token": "FAT_ARROW", + "loc": "43:11-43:13" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "43:14-43:20" + }, + { + "token": "COLONCOLON", + "loc": "43:20-43:22" + }, + { + "token": [ + "UIDENT", + "Ok" + ], + "loc": "43:22-43:24" + }, + { + "token": "LPAREN", + "loc": "43:24-43:25" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "43:25-43:30" + }, + { + "token": "RPAREN", + "loc": "43:30-43:31" + }, + { + "token": "NEWLINE", + "loc": "43:31-43:32" + }, + { + "token": "RBRACE", + "loc": "44:3-44:4" + }, + { + "token": "NEWLINE", + "loc": "44:4-44:5" + }, + { + "token": "RBRACE", + "loc": "45:1-45:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "45:2-45:2" + }, + { + "token": "NEWLINE", + "loc": "45:2-45:3" + }, { "token": "EOF", - "loc": "37:1-37:1" + "loc": "46:1-46:1" } ] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/pipeline_test_valstruct_in_array.json b/test/sync_test/__snapshot__/pipeline_test_valstruct_in_array.json index 634ef055..d7efd997 100644 --- a/test/sync_test/__snapshot__/pipeline_test_valstruct_in_array.json +++ b/test/sync_test/__snapshot__/pipeline_test_valstruct_in_array.json @@ -909,7 +909,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -1466,7 +1467,8 @@ "kind": "Expr::Array::ExprList", "loc": null, "children": [] - } + }, + "is_iter": false } }, "body": { diff --git a/test/sync_test/__snapshot__/pipeline_test_valtype_generic.json b/test/sync_test/__snapshot__/pipeline_test_valtype_generic.json index b221d342..9bf2c290 100644 --- a/test/sync_test/__snapshot__/pipeline_test_valtype_generic.json +++ b/test/sync_test/__snapshot__/pipeline_test_valtype_generic.json @@ -1024,7 +1024,8 @@ } } ] - } + }, + "is_iter": false } }, "is_pun": false @@ -1295,7 +1296,8 @@ "kind": "Expr::Array::ExprList", "loc": null, "children": [] - } + }, + "is_iter": false } }, "body": { diff --git a/test/sync_test/__snapshot__/pipeline_test_valtype_indirect_rec.json b/test/sync_test/__snapshot__/pipeline_test_valtype_indirect_rec.json index 2313ce11..2c5bebc4 100644 --- a/test/sync_test/__snapshot__/pipeline_test_valtype_indirect_rec.json +++ b/test/sync_test/__snapshot__/pipeline_test_valtype_indirect_rec.json @@ -1216,7 +1216,8 @@ "kind": "Expr::Array::ExprList", "loc": null, "children": [] - } + }, + "is_iter": false } }, "is_pun": false @@ -1689,7 +1690,8 @@ "kind": "Expr::Array::ExprList", "loc": null, "children": [] - } + }, + "is_iter": false } }, "is_pun": false @@ -1939,7 +1941,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { diff --git a/test/sync_test/__snapshot__/pipeline_test_valtype_ref_enum.json b/test/sync_test/__snapshot__/pipeline_test_valtype_ref_enum.json index 0dc8d8d6..2773d33d 100644 --- a/test/sync_test/__snapshot__/pipeline_test_valtype_ref_enum.json +++ b/test/sync_test/__snapshot__/pipeline_test_valtype_ref_enum.json @@ -1390,7 +1390,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { diff --git a/test/sync_test/__snapshot__/pipeline_test_valtype_ref_error.json b/test/sync_test/__snapshot__/pipeline_test_valtype_ref_error.json index 94b24f7a..d92adfd7 100644 --- a/test/sync_test/__snapshot__/pipeline_test_valtype_ref_error.json +++ b/test/sync_test/__snapshot__/pipeline_test_valtype_ref_error.json @@ -1180,71 +1180,137 @@ "loc": null, "children": { "value": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", - "loc": null, - "children": { - "value": "make_s" - } - } + "value": "to_result" } } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", "loc": null, - "children": [ - { - "kind": "Argument", + "children": { + "value": { + "kind": "Expr::Function", "loc": null, "children": { - "value": { - "kind": "Expr::Constant", + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "constant": { - "kind": "Constant::Int", + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Apply", "loc": null, "children": { - "value": "-1" + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "make_s" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "-1" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } } - } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } - ] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} + } } - } + ] }, - "kind": { - "kind": "TryOperatorKind::Question", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -1300,71 +1366,137 @@ "loc": null, "children": { "value": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", - "loc": null, - "children": { - "value": "make_s" - } - } + "value": "to_result" } } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", "loc": null, - "children": [ - { - "kind": "Argument", + "children": { + "value": { + "kind": "Expr::Function", "loc": null, "children": { - "value": { - "kind": "Expr::Constant", + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "constant": { - "kind": "Constant::Int", + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Apply", "loc": null, "children": { - "value": "5" + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "make_s" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "5" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } } - } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } - ] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} + } } - } + ] }, - "kind": { - "kind": "TryOperatorKind::Question", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -1391,5 +1523,524 @@ } } } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "to_result" + } + }, + "has_error": null, + "is_async": null, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "f" + } + }, + "ty": { + "kind": "Type::Arrow", + "loc": null, + "children": { + "args": { + "kind": "Type::Arrow::ArgList", + "loc": null, + "children": [] + }, + "res": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "T" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "err": { + "kind": "ErrorType::ErrorType", + "loc": null, + "children": { + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "E" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + "is_async": null + } + } + } + } + ] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [ + { + "kind": "TypeVarBinder", + "loc": null, + "children": { + "name": "T", + "constraints": { + "kind": "TypeVarBinder::TypeVarConstraintList", + "loc": null, + "children": [] + } + } + }, + { + "kind": "TypeVarBinder", + "loc": null, + "children": { + "name": "E", + "constraints": { + "kind": "TypeVarBinder::TypeVarConstraintList", + "loc": null, + "children": [ + { + "kind": "TypeVarConstraint", + "loc": null, + "children": { + "trait": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Error" + } + } + } + } + ] + } + } + } + ] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [ + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "T" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "E" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + ] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::Try", + "loc": null, + "children": { + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "f" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "catch": { + "kind": "Expr::Try::CaseList", + "loc": null, + "children": [ + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "err" + } + } + } + }, + "guard": null, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Err" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::TypeName", + "loc": null, + "children": { + "value": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + }, + "is_object": false + } + } + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "err" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + ] + }, + "catch_all": false, + "try_else": { + "kind": "Expr::Try::CaseList", + "loc": null, + "children": [ + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "value" + } + } + } + }, + "guard": null, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Ok" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::TypeName", + "loc": null, + "children": { + "value": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + }, + "is_object": false + } + } + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "value" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + ] + }, + "has_try": true + } + } + } + } + } } ] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/pipeline_test_valtype_ref_error.mbt b/test/sync_test/__snapshot__/pipeline_test_valtype_ref_error.mbt index ce2f8b0e..948fe25d 100644 --- a/test/sync_test/__snapshot__/pipeline_test_valtype_ref_error.mbt +++ b/test/sync_test/__snapshot__/pipeline_test_valtype_ref_error.mbt @@ -28,6 +28,15 @@ fn make_s(i : Int) -> S raise E { ///| fn main { - debug(try? make_s(-1)) - debug(try? make_s(5)) + debug(to_result(() => make_s(-1))) + debug(to_result(() => make_s(5))) +} + +fn[T, E : Error] to_result(f : () -> T raise E) -> Result[T, E] { + try f() + catch { + err => Result::Err(err) + } noraise { + value => Result::Ok(value) + } } diff --git a/test/sync_test/__snapshot__/pipeline_test_valtype_ref_error.mbt.tokens.json b/test/sync_test/__snapshot__/pipeline_test_valtype_ref_error.mbt.tokens.json index 2a9c2a1a..e4d3f027 100644 --- a/test/sync_test/__snapshot__/pipeline_test_valtype_ref_error.mbt.tokens.json +++ b/test/sync_test/__snapshot__/pipeline_test_valtype_ref_error.mbt.tokens.json @@ -776,49 +776,72 @@ "loc": "31:8-31:9" }, { - "token": "TRY_QUESTION", - "loc": "31:9-31:13" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "31:9-31:18" + }, + { + "token": "LPAREN", + "loc": "31:18-31:19" + }, + { + "token": "LPAREN", + "loc": "31:19-31:20" + }, + { + "token": "RPAREN", + "loc": "31:20-31:21" + }, + { + "token": "FAT_ARROW", + "loc": "31:22-31:24" }, { "token": [ "LIDENT", "make_s" ], - "loc": "31:14-31:20" + "loc": "31:25-31:31" }, { "token": "LPAREN", - "loc": "31:20-31:21" + "loc": "31:31-31:32" }, { "token": "MINUS", - "loc": "31:21-31:22" + "loc": "31:32-31:33" }, { "token": [ "INT", "1" ], - "loc": "31:22-31:23" + "loc": "31:33-31:34" }, { "token": "RPAREN", - "loc": "31:23-31:24" + "loc": "31:34-31:35" }, { "token": "RPAREN", - "loc": "31:24-31:25" + "loc": "31:35-31:36" + }, + { + "token": "RPAREN", + "loc": "31:36-31:37" }, { "token": [ "SEMI", false ], - "loc": "31:25-31:25" + "loc": "31:37-31:37" }, { "token": "NEWLINE", - "loc": "31:25-31:26" + "loc": "31:37-31:38" }, { "token": [ @@ -832,38 +855,61 @@ "loc": "32:8-32:9" }, { - "token": "TRY_QUESTION", - "loc": "32:9-32:13" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "32:9-32:18" + }, + { + "token": "LPAREN", + "loc": "32:18-32:19" + }, + { + "token": "LPAREN", + "loc": "32:19-32:20" + }, + { + "token": "RPAREN", + "loc": "32:20-32:21" + }, + { + "token": "FAT_ARROW", + "loc": "32:22-32:24" }, { "token": [ "LIDENT", "make_s" ], - "loc": "32:14-32:20" + "loc": "32:25-32:31" }, { "token": "LPAREN", - "loc": "32:20-32:21" + "loc": "32:31-32:32" }, { "token": [ "INT", "5" ], - "loc": "32:21-32:22" + "loc": "32:32-32:33" }, { "token": "RPAREN", - "loc": "32:22-32:23" + "loc": "32:33-32:34" }, { "token": "RPAREN", - "loc": "32:23-32:24" + "loc": "32:34-32:35" + }, + { + "token": "RPAREN", + "loc": "32:35-32:36" }, { "token": "NEWLINE", - "loc": "32:24-32:25" + "loc": "32:36-32:37" }, { "token": "RBRACE", @@ -880,8 +926,324 @@ "token": "NEWLINE", "loc": "33:2-33:3" }, + { + "token": "NEWLINE", + "loc": "34:1-34:2" + }, + { + "token": "FN", + "loc": "35:1-35:3" + }, + { + "token": "LBRACKET", + "loc": "35:3-35:4" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "35:4-35:5" + }, + { + "token": "COMMA", + "loc": "35:5-35:6" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "35:7-35:8" + }, + { + "token": "COLON", + "loc": "35:9-35:10" + }, + { + "token": [ + "UIDENT", + "Error" + ], + "loc": "35:11-35:16" + }, + { + "token": "RBRACKET", + "loc": "35:16-35:17" + }, + { + "token": [ + "LIDENT", + "to_result" + ], + "loc": "35:18-35:27" + }, + { + "token": "LPAREN", + "loc": "35:27-35:28" + }, + { + "token": [ + "LIDENT", + "f" + ], + "loc": "35:28-35:29" + }, + { + "token": "COLON", + "loc": "35:30-35:31" + }, + { + "token": "LPAREN", + "loc": "35:32-35:33" + }, + { + "token": "RPAREN", + "loc": "35:33-35:34" + }, + { + "token": "THIN_ARROW", + "loc": "35:35-35:37" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "35:38-35:39" + }, + { + "token": "RAISE", + "loc": "35:40-35:45" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "35:46-35:47" + }, + { + "token": "RPAREN", + "loc": "35:47-35:48" + }, + { + "token": "THIN_ARROW", + "loc": "35:49-35:51" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "35:52-35:58" + }, + { + "token": "LBRACKET", + "loc": "35:58-35:59" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "35:59-35:60" + }, + { + "token": "COMMA", + "loc": "35:60-35:61" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "35:62-35:63" + }, + { + "token": "RBRACKET", + "loc": "35:63-35:64" + }, + { + "token": "LBRACE", + "loc": "35:65-35:66" + }, + { + "token": "NEWLINE", + "loc": "35:66-35:67" + }, + { + "token": "TRY", + "loc": "36:3-36:6" + }, + { + "token": [ + "LIDENT", + "f" + ], + "loc": "36:7-36:8" + }, + { + "token": "LPAREN", + "loc": "36:8-36:9" + }, + { + "token": "RPAREN", + "loc": "36:9-36:10" + }, + { + "token": "NEWLINE", + "loc": "36:10-36:11" + }, + { + "token": "CATCH", + "loc": "37:3-37:8" + }, + { + "token": "LBRACE", + "loc": "37:9-37:10" + }, + { + "token": "NEWLINE", + "loc": "37:10-37:11" + }, + { + "token": [ + "LIDENT", + "err" + ], + "loc": "38:5-38:8" + }, + { + "token": "FAT_ARROW", + "loc": "38:9-38:11" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "38:12-38:18" + }, + { + "token": "COLONCOLON", + "loc": "38:18-38:20" + }, + { + "token": [ + "UIDENT", + "Err" + ], + "loc": "38:20-38:23" + }, + { + "token": "LPAREN", + "loc": "38:23-38:24" + }, + { + "token": [ + "LIDENT", + "err" + ], + "loc": "38:24-38:27" + }, + { + "token": "RPAREN", + "loc": "38:27-38:28" + }, + { + "token": "NEWLINE", + "loc": "38:28-38:29" + }, + { + "token": "RBRACE", + "loc": "39:3-39:4" + }, + { + "token": "NORAISE", + "loc": "39:5-39:12" + }, + { + "token": "LBRACE", + "loc": "39:13-39:14" + }, + { + "token": "NEWLINE", + "loc": "39:14-39:15" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "40:5-40:10" + }, + { + "token": "FAT_ARROW", + "loc": "40:11-40:13" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "40:14-40:20" + }, + { + "token": "COLONCOLON", + "loc": "40:20-40:22" + }, + { + "token": [ + "UIDENT", + "Ok" + ], + "loc": "40:22-40:24" + }, + { + "token": "LPAREN", + "loc": "40:24-40:25" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "40:25-40:30" + }, + { + "token": "RPAREN", + "loc": "40:30-40:31" + }, + { + "token": "NEWLINE", + "loc": "40:31-40:32" + }, + { + "token": "RBRACE", + "loc": "41:3-41:4" + }, + { + "token": "NEWLINE", + "loc": "41:4-41:5" + }, + { + "token": "RBRACE", + "loc": "42:1-42:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "42:2-42:2" + }, + { + "token": "NEWLINE", + "loc": "42:2-42:3" + }, { "token": "EOF", - "loc": "34:1-34:1" + "loc": "43:1-43:1" } ] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/pipeline_test_valtype_self_ref1.json b/test/sync_test/__snapshot__/pipeline_test_valtype_self_ref1.json index 8049a0eb..f56a1598 100644 --- a/test/sync_test/__snapshot__/pipeline_test_valtype_self_ref1.json +++ b/test/sync_test/__snapshot__/pipeline_test_valtype_self_ref1.json @@ -1124,7 +1124,8 @@ "kind": "Expr::Array::ExprList", "loc": null, "children": [] - } + }, + "is_iter": false } }, "is_pun": false @@ -1473,7 +1474,8 @@ } } ] - } + }, + "is_iter": false } }, "is_pun": false diff --git a/test/sync_test/__snapshot__/pipeline_test_valtype_single_elem.json b/test/sync_test/__snapshot__/pipeline_test_valtype_single_elem.json index d7c2aabc..4dc685d7 100644 --- a/test/sync_test/__snapshot__/pipeline_test_valtype_single_elem.json +++ b/test/sync_test/__snapshot__/pipeline_test_valtype_single_elem.json @@ -1386,71 +1386,137 @@ "loc": null, "children": { "value": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", - "loc": null, - "children": { - "value": "o" - } - } + "value": "to_result" } } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", "loc": null, - "children": [ - { - "kind": "Argument", + "children": { + "value": { + "kind": "Expr::Function", "loc": null, "children": { - "value": { - "kind": "Expr::Constant", + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "constant": { - "kind": "Constant::Int", + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Apply", "loc": null, "children": { - "value": "42" + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "o" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "42" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } } - } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } - ] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} + } } - } + ] }, - "kind": { - "kind": "TryOperatorKind::Question", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -1506,71 +1572,137 @@ "loc": null, "children": { "value": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", - "loc": null, - "children": { - "value": "o" - } - } + "value": "to_result" } } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", "loc": null, - "children": [ - { - "kind": "Argument", + "children": { + "value": { + "kind": "Expr::Function", "loc": null, "children": { - "value": { - "kind": "Expr::Constant", + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "constant": { - "kind": "Constant::Int", + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Apply", "loc": null, "children": { - "value": "-1" + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "o" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "-1" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } } - } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } - ] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} + } } - } + ] }, - "kind": { - "kind": "TryOperatorKind::Question", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -1599,5 +1731,524 @@ } } } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "to_result" + } + }, + "has_error": null, + "is_async": null, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "f" + } + }, + "ty": { + "kind": "Type::Arrow", + "loc": null, + "children": { + "args": { + "kind": "Type::Arrow::ArgList", + "loc": null, + "children": [] + }, + "res": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "T" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "err": { + "kind": "ErrorType::ErrorType", + "loc": null, + "children": { + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "E" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + "is_async": null + } + } + } + } + ] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [ + { + "kind": "TypeVarBinder", + "loc": null, + "children": { + "name": "T", + "constraints": { + "kind": "TypeVarBinder::TypeVarConstraintList", + "loc": null, + "children": [] + } + } + }, + { + "kind": "TypeVarBinder", + "loc": null, + "children": { + "name": "E", + "constraints": { + "kind": "TypeVarBinder::TypeVarConstraintList", + "loc": null, + "children": [ + { + "kind": "TypeVarConstraint", + "loc": null, + "children": { + "trait": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Error" + } + } + } + } + ] + } + } + } + ] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [ + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "T" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "E" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + ] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::Try", + "loc": null, + "children": { + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "f" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "catch": { + "kind": "Expr::Try::CaseList", + "loc": null, + "children": [ + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "err" + } + } + } + }, + "guard": null, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Err" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::TypeName", + "loc": null, + "children": { + "value": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + }, + "is_object": false + } + } + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "err" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + ] + }, + "catch_all": false, + "try_else": { + "kind": "Expr::Try::CaseList", + "loc": null, + "children": [ + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "value" + } + } + } + }, + "guard": null, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Ok" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::TypeName", + "loc": null, + "children": { + "value": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + }, + "is_object": false + } + } + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "value" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + ] + }, + "has_try": true + } + } + } + } + } } ] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/pipeline_test_valtype_single_elem.mbt b/test/sync_test/__snapshot__/pipeline_test_valtype_single_elem.mbt index dd0f4b5b..123478d6 100644 --- a/test/sync_test/__snapshot__/pipeline_test_valtype_single_elem.mbt +++ b/test/sync_test/__snapshot__/pipeline_test_valtype_single_elem.mbt @@ -33,6 +33,15 @@ fn main { let r = R::{ p: 1 } println(r |> m) debug(n(r)) - debug(try? o(42)) - debug(try? o(-1)) + debug(to_result(() => o(42))) + debug(to_result(() => o(-1))) +} + +fn[T, E : Error] to_result(f : () -> T raise E) -> Result[T, E] { + try f() + catch { + err => Result::Err(err) + } noraise { + value => Result::Ok(value) + } } diff --git a/test/sync_test/__snapshot__/pipeline_test_valtype_single_elem.mbt.tokens.json b/test/sync_test/__snapshot__/pipeline_test_valtype_single_elem.mbt.tokens.json index 97a479af..b2097c81 100644 --- a/test/sync_test/__snapshot__/pipeline_test_valtype_single_elem.mbt.tokens.json +++ b/test/sync_test/__snapshot__/pipeline_test_valtype_single_elem.mbt.tokens.json @@ -926,45 +926,68 @@ "loc": "36:8-36:9" }, { - "token": "TRY_QUESTION", - "loc": "36:9-36:13" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "36:9-36:18" + }, + { + "token": "LPAREN", + "loc": "36:18-36:19" + }, + { + "token": "LPAREN", + "loc": "36:19-36:20" + }, + { + "token": "RPAREN", + "loc": "36:20-36:21" + }, + { + "token": "FAT_ARROW", + "loc": "36:22-36:24" }, { "token": [ "LIDENT", "o" ], - "loc": "36:14-36:15" + "loc": "36:25-36:26" }, { "token": "LPAREN", - "loc": "36:15-36:16" + "loc": "36:26-36:27" }, { "token": [ "INT", "42" ], - "loc": "36:16-36:18" + "loc": "36:27-36:29" }, { "token": "RPAREN", - "loc": "36:18-36:19" + "loc": "36:29-36:30" }, { "token": "RPAREN", - "loc": "36:19-36:20" + "loc": "36:30-36:31" + }, + { + "token": "RPAREN", + "loc": "36:31-36:32" }, { "token": [ "SEMI", false ], - "loc": "36:20-36:20" + "loc": "36:32-36:32" }, { "token": "NEWLINE", - "loc": "36:20-36:21" + "loc": "36:32-36:33" }, { "token": [ @@ -978,42 +1001,65 @@ "loc": "37:8-37:9" }, { - "token": "TRY_QUESTION", - "loc": "37:9-37:13" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "37:9-37:18" + }, + { + "token": "LPAREN", + "loc": "37:18-37:19" + }, + { + "token": "LPAREN", + "loc": "37:19-37:20" + }, + { + "token": "RPAREN", + "loc": "37:20-37:21" + }, + { + "token": "FAT_ARROW", + "loc": "37:22-37:24" }, { "token": [ "LIDENT", "o" ], - "loc": "37:14-37:15" + "loc": "37:25-37:26" }, { "token": "LPAREN", - "loc": "37:15-37:16" + "loc": "37:26-37:27" }, { "token": "MINUS", - "loc": "37:16-37:17" + "loc": "37:27-37:28" }, { "token": [ "INT", "1" ], - "loc": "37:17-37:18" + "loc": "37:28-37:29" }, { "token": "RPAREN", - "loc": "37:18-37:19" + "loc": "37:29-37:30" }, { "token": "RPAREN", - "loc": "37:19-37:20" + "loc": "37:30-37:31" + }, + { + "token": "RPAREN", + "loc": "37:31-37:32" }, { "token": "NEWLINE", - "loc": "37:20-37:21" + "loc": "37:32-37:33" }, { "token": "RBRACE", @@ -1030,8 +1076,324 @@ "token": "NEWLINE", "loc": "38:2-38:3" }, + { + "token": "NEWLINE", + "loc": "39:1-39:2" + }, + { + "token": "FN", + "loc": "40:1-40:3" + }, + { + "token": "LBRACKET", + "loc": "40:3-40:4" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "40:4-40:5" + }, + { + "token": "COMMA", + "loc": "40:5-40:6" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "40:7-40:8" + }, + { + "token": "COLON", + "loc": "40:9-40:10" + }, + { + "token": [ + "UIDENT", + "Error" + ], + "loc": "40:11-40:16" + }, + { + "token": "RBRACKET", + "loc": "40:16-40:17" + }, + { + "token": [ + "LIDENT", + "to_result" + ], + "loc": "40:18-40:27" + }, + { + "token": "LPAREN", + "loc": "40:27-40:28" + }, + { + "token": [ + "LIDENT", + "f" + ], + "loc": "40:28-40:29" + }, + { + "token": "COLON", + "loc": "40:30-40:31" + }, + { + "token": "LPAREN", + "loc": "40:32-40:33" + }, + { + "token": "RPAREN", + "loc": "40:33-40:34" + }, + { + "token": "THIN_ARROW", + "loc": "40:35-40:37" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "40:38-40:39" + }, + { + "token": "RAISE", + "loc": "40:40-40:45" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "40:46-40:47" + }, + { + "token": "RPAREN", + "loc": "40:47-40:48" + }, + { + "token": "THIN_ARROW", + "loc": "40:49-40:51" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "40:52-40:58" + }, + { + "token": "LBRACKET", + "loc": "40:58-40:59" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "40:59-40:60" + }, + { + "token": "COMMA", + "loc": "40:60-40:61" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "40:62-40:63" + }, + { + "token": "RBRACKET", + "loc": "40:63-40:64" + }, + { + "token": "LBRACE", + "loc": "40:65-40:66" + }, + { + "token": "NEWLINE", + "loc": "40:66-40:67" + }, + { + "token": "TRY", + "loc": "41:3-41:6" + }, + { + "token": [ + "LIDENT", + "f" + ], + "loc": "41:7-41:8" + }, + { + "token": "LPAREN", + "loc": "41:8-41:9" + }, + { + "token": "RPAREN", + "loc": "41:9-41:10" + }, + { + "token": "NEWLINE", + "loc": "41:10-41:11" + }, + { + "token": "CATCH", + "loc": "42:3-42:8" + }, + { + "token": "LBRACE", + "loc": "42:9-42:10" + }, + { + "token": "NEWLINE", + "loc": "42:10-42:11" + }, + { + "token": [ + "LIDENT", + "err" + ], + "loc": "43:5-43:8" + }, + { + "token": "FAT_ARROW", + "loc": "43:9-43:11" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "43:12-43:18" + }, + { + "token": "COLONCOLON", + "loc": "43:18-43:20" + }, + { + "token": [ + "UIDENT", + "Err" + ], + "loc": "43:20-43:23" + }, + { + "token": "LPAREN", + "loc": "43:23-43:24" + }, + { + "token": [ + "LIDENT", + "err" + ], + "loc": "43:24-43:27" + }, + { + "token": "RPAREN", + "loc": "43:27-43:28" + }, + { + "token": "NEWLINE", + "loc": "43:28-43:29" + }, + { + "token": "RBRACE", + "loc": "44:3-44:4" + }, + { + "token": "NORAISE", + "loc": "44:5-44:12" + }, + { + "token": "LBRACE", + "loc": "44:13-44:14" + }, + { + "token": "NEWLINE", + "loc": "44:14-44:15" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "45:5-45:10" + }, + { + "token": "FAT_ARROW", + "loc": "45:11-45:13" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "45:14-45:20" + }, + { + "token": "COLONCOLON", + "loc": "45:20-45:22" + }, + { + "token": [ + "UIDENT", + "Ok" + ], + "loc": "45:22-45:24" + }, + { + "token": "LPAREN", + "loc": "45:24-45:25" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "45:25-45:30" + }, + { + "token": "RPAREN", + "loc": "45:30-45:31" + }, + { + "token": "NEWLINE", + "loc": "45:31-45:32" + }, + { + "token": "RBRACE", + "loc": "46:3-46:4" + }, + { + "token": "NEWLINE", + "loc": "46:4-46:5" + }, + { + "token": "RBRACE", + "loc": "47:1-47:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "47:2-47:2" + }, + { + "token": "NEWLINE", + "loc": "47:2-47:3" + }, { "token": "EOF", - "loc": "39:1-39:1" + "loc": "48:1-48:1" } ] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/pipeline_test_valtype_string_option_plus_uint64.json b/test/sync_test/__snapshot__/pipeline_test_valtype_string_option_plus_uint64.json index 0e407c1b..27f35c3c 100644 --- a/test/sync_test/__snapshot__/pipeline_test_valtype_string_option_plus_uint64.json +++ b/test/sync_test/__snapshot__/pipeline_test_valtype_string_option_plus_uint64.json @@ -276,7 +276,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { diff --git a/test/sync_test/__snapshot__/pipeline_test_valtype_tuple_struct.json b/test/sync_test/__snapshot__/pipeline_test_valtype_tuple_struct.json index d28d746a..888176c7 100644 --- a/test/sync_test/__snapshot__/pipeline_test_valtype_tuple_struct.json +++ b/test/sync_test/__snapshot__/pipeline_test_valtype_tuple_struct.json @@ -524,7 +524,8 @@ "kind": "Expr::Array::ExprList", "loc": null, "children": [] - } + }, + "is_iter": false } }, "body": { @@ -1097,7 +1098,8 @@ "kind": "Expr::Array::ExprList", "loc": null, "children": [] - } + }, + "is_iter": false } }, "body": { @@ -1729,7 +1731,8 @@ "kind": "Expr::Array::ExprList", "loc": null, "children": [] - } + }, + "is_iter": false } }, "body": { diff --git a/test/sync_test/__snapshot__/pipeline_test_value_enum_align.json b/test/sync_test/__snapshot__/pipeline_test_value_enum_align.json index fb76e92f..1dfb7dac 100644 --- a/test/sync_test/__snapshot__/pipeline_test_value_enum_align.json +++ b/test/sync_test/__snapshot__/pipeline_test_value_enum_align.json @@ -1171,6 +1171,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, diff --git a/test/sync_test/__snapshot__/pipeline_test_value_enum_array.json b/test/sync_test/__snapshot__/pipeline_test_value_enum_array.json index c2ef1d00..948c01e3 100644 --- a/test/sync_test/__snapshot__/pipeline_test_value_enum_array.json +++ b/test/sync_test/__snapshot__/pipeline_test_value_enum_array.json @@ -2152,7 +2152,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -2249,7 +2250,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -2346,7 +2348,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -2462,7 +2465,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -2508,7 +2512,8 @@ "kind": "Expr::Array::ExprList", "loc": null, "children": [] - } + }, + "is_iter": false } }, "body": { diff --git a/test/sync_test/__snapshot__/pipeline_test_value_enum_basic.json b/test/sync_test/__snapshot__/pipeline_test_value_enum_basic.json index fbeb977d..f0f4f03b 100644 --- a/test/sync_test/__snapshot__/pipeline_test_value_enum_basic.json +++ b/test/sync_test/__snapshot__/pipeline_test_value_enum_basic.json @@ -953,7 +953,8 @@ "kind": "Expr::Array::ExprList", "loc": null, "children": [] - } + }, + "is_iter": false } }, "body": { diff --git a/test/sync_test/__snapshot__/pipeline_test_value_enum_capture.json b/test/sync_test/__snapshot__/pipeline_test_value_enum_capture.json index 3114d5ce..364f5870 100644 --- a/test/sync_test/__snapshot__/pipeline_test_value_enum_capture.json +++ b/test/sync_test/__snapshot__/pipeline_test_value_enum_capture.json @@ -1447,6 +1447,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, diff --git a/test/sync_test/__snapshot__/pipeline_test_value_enum_error.json b/test/sync_test/__snapshot__/pipeline_test_value_enum_error.json index c8563b8d..1758ef48 100644 --- a/test/sync_test/__snapshot__/pipeline_test_value_enum_error.json +++ b/test/sync_test/__snapshot__/pipeline_test_value_enum_error.json @@ -1118,71 +1118,137 @@ "loc": null, "children": { "value": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", - "loc": null, - "children": { - "value": "f" - } - } + "value": "to_result" } } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", "loc": null, - "children": [ - { - "kind": "Argument", + "children": { + "value": { + "kind": "Expr::Function", "loc": null, "children": { - "value": { - "kind": "Expr::Constant", + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "constant": { - "kind": "Constant::Int", + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Apply", "loc": null, "children": { - "value": "5" + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "f" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "5" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } } - } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } - ] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} + } } - } + ] }, - "kind": { - "kind": "TryOperatorKind::Question", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -1236,71 +1302,137 @@ "loc": null, "children": { "value": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", - "loc": null, - "children": { - "value": "f" - } - } + "value": "to_result" } } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", "loc": null, - "children": [ - { - "kind": "Argument", + "children": { + "value": { + "kind": "Expr::Function", "loc": null, "children": { - "value": { - "kind": "Expr::Constant", + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "constant": { - "kind": "Constant::Int", + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Apply", "loc": null, "children": { - "value": "15" + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "f" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "15" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } } - } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } - ] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} + } } - } + ] }, - "kind": { - "kind": "TryOperatorKind::Question", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -1354,71 +1486,137 @@ "loc": null, "children": { "value": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", - "loc": null, - "children": { - "value": "f" - } - } + "value": "to_result" } } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", "loc": null, - "children": [ - { - "kind": "Argument", + "children": { + "value": { + "kind": "Expr::Function", "loc": null, "children": { - "value": { - "kind": "Expr::Constant", + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "constant": { - "kind": "Constant::Int", + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Apply", "loc": null, "children": { - "value": "25" + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "f" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "25" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } } - } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } - ] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} + } } - } + ] }, - "kind": { - "kind": "TryOperatorKind::Question", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -1474,71 +1672,137 @@ "loc": null, "children": { "value": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", - "loc": null, - "children": { - "value": "f" - } - } + "value": "to_result" } } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", "loc": null, - "children": [ - { - "kind": "Argument", + "children": { + "value": { + "kind": "Expr::Function", "loc": null, "children": { - "value": { - "kind": "Expr::Constant", + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "constant": { - "kind": "Constant::Int", + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Apply", "loc": null, "children": { - "value": "35" + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "f" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::Int", + "loc": null, + "children": { + "value": "35" + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } } - } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} } } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} } - ] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} + } } - } + ] }, - "kind": { - "kind": "TryOperatorKind::Question", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -1565,5 +1829,524 @@ } } } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "to_result" + } + }, + "has_error": null, + "is_async": null, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "f" + } + }, + "ty": { + "kind": "Type::Arrow", + "loc": null, + "children": { + "args": { + "kind": "Type::Arrow::ArgList", + "loc": null, + "children": [] + }, + "res": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "T" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "err": { + "kind": "ErrorType::ErrorType", + "loc": null, + "children": { + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "E" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + "is_async": null + } + } + } + } + ] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [ + { + "kind": "TypeVarBinder", + "loc": null, + "children": { + "name": "T", + "constraints": { + "kind": "TypeVarBinder::TypeVarConstraintList", + "loc": null, + "children": [] + } + } + }, + { + "kind": "TypeVarBinder", + "loc": null, + "children": { + "name": "E", + "constraints": { + "kind": "TypeVarBinder::TypeVarConstraintList", + "loc": null, + "children": [ + { + "kind": "TypeVarConstraint", + "loc": null, + "children": { + "trait": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Error" + } + } + } + } + ] + } + } + } + ] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [ + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "T" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "E" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + ] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::Try", + "loc": null, + "children": { + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "f" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "catch": { + "kind": "Expr::Try::CaseList", + "loc": null, + "children": [ + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "err" + } + } + } + }, + "guard": null, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Err" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::TypeName", + "loc": null, + "children": { + "value": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + }, + "is_object": false + } + } + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "err" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + ] + }, + "catch_all": false, + "try_else": { + "kind": "Expr::Try::CaseList", + "loc": null, + "children": [ + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "value" + } + } + } + }, + "guard": null, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Ok" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::TypeName", + "loc": null, + "children": { + "value": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + }, + "is_object": false + } + } + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "value" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + ] + }, + "has_try": true + } + } + } + } + } } ] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/pipeline_test_value_enum_error.mbt b/test/sync_test/__snapshot__/pipeline_test_value_enum_error.mbt index ddf219d4..cf421dea 100644 --- a/test/sync_test/__snapshot__/pipeline_test_value_enum_error.mbt +++ b/test/sync_test/__snapshot__/pipeline_test_value_enum_error.mbt @@ -26,8 +26,17 @@ fn f(i : Int) -> E raise X { ///| fn main { - debug(try? f(5)) - debug(try? f(15)) - debug(try? f(25)) - debug(try? f(35)) + debug(to_result(() => f(5))) + debug(to_result(() => f(15))) + debug(to_result(() => f(25))) + debug(to_result(() => f(35))) +} + +fn[T, E : Error] to_result(f : () -> T raise E) -> Result[T, E] { + try f() + catch { + err => Result::Err(err) + } noraise { + value => Result::Ok(value) + } } diff --git a/test/sync_test/__snapshot__/pipeline_test_value_enum_error.mbt.tokens.json b/test/sync_test/__snapshot__/pipeline_test_value_enum_error.mbt.tokens.json index 6e9f8c54..a1317381 100644 --- a/test/sync_test/__snapshot__/pipeline_test_value_enum_error.mbt.tokens.json +++ b/test/sync_test/__snapshot__/pipeline_test_value_enum_error.mbt.tokens.json @@ -716,45 +716,68 @@ "loc": "29:8-29:9" }, { - "token": "TRY_QUESTION", - "loc": "29:9-29:13" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "29:9-29:18" + }, + { + "token": "LPAREN", + "loc": "29:18-29:19" + }, + { + "token": "LPAREN", + "loc": "29:19-29:20" + }, + { + "token": "RPAREN", + "loc": "29:20-29:21" + }, + { + "token": "FAT_ARROW", + "loc": "29:22-29:24" }, { "token": [ "LIDENT", "f" ], - "loc": "29:14-29:15" + "loc": "29:25-29:26" }, { "token": "LPAREN", - "loc": "29:15-29:16" + "loc": "29:26-29:27" }, { "token": [ "INT", "5" ], - "loc": "29:16-29:17" + "loc": "29:27-29:28" }, { "token": "RPAREN", - "loc": "29:17-29:18" + "loc": "29:28-29:29" }, { "token": "RPAREN", - "loc": "29:18-29:19" + "loc": "29:29-29:30" + }, + { + "token": "RPAREN", + "loc": "29:30-29:31" }, { "token": [ "SEMI", false ], - "loc": "29:19-29:19" + "loc": "29:31-29:31" }, { "token": "NEWLINE", - "loc": "29:19-29:20" + "loc": "29:31-29:32" }, { "token": [ @@ -768,45 +791,68 @@ "loc": "30:8-30:9" }, { - "token": "TRY_QUESTION", - "loc": "30:9-30:13" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "30:9-30:18" + }, + { + "token": "LPAREN", + "loc": "30:18-30:19" + }, + { + "token": "LPAREN", + "loc": "30:19-30:20" + }, + { + "token": "RPAREN", + "loc": "30:20-30:21" + }, + { + "token": "FAT_ARROW", + "loc": "30:22-30:24" }, { "token": [ "LIDENT", "f" ], - "loc": "30:14-30:15" + "loc": "30:25-30:26" }, { "token": "LPAREN", - "loc": "30:15-30:16" + "loc": "30:26-30:27" }, { "token": [ "INT", "15" ], - "loc": "30:16-30:18" + "loc": "30:27-30:29" }, { "token": "RPAREN", - "loc": "30:18-30:19" + "loc": "30:29-30:30" }, { "token": "RPAREN", - "loc": "30:19-30:20" + "loc": "30:30-30:31" + }, + { + "token": "RPAREN", + "loc": "30:31-30:32" }, { "token": [ "SEMI", false ], - "loc": "30:20-30:20" + "loc": "30:32-30:32" }, { "token": "NEWLINE", - "loc": "30:20-30:21" + "loc": "30:32-30:33" }, { "token": [ @@ -820,45 +866,68 @@ "loc": "31:8-31:9" }, { - "token": "TRY_QUESTION", - "loc": "31:9-31:13" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "31:9-31:18" + }, + { + "token": "LPAREN", + "loc": "31:18-31:19" + }, + { + "token": "LPAREN", + "loc": "31:19-31:20" + }, + { + "token": "RPAREN", + "loc": "31:20-31:21" + }, + { + "token": "FAT_ARROW", + "loc": "31:22-31:24" }, { "token": [ "LIDENT", "f" ], - "loc": "31:14-31:15" + "loc": "31:25-31:26" }, { "token": "LPAREN", - "loc": "31:15-31:16" + "loc": "31:26-31:27" }, { "token": [ "INT", "25" ], - "loc": "31:16-31:18" + "loc": "31:27-31:29" }, { "token": "RPAREN", - "loc": "31:18-31:19" + "loc": "31:29-31:30" }, { "token": "RPAREN", - "loc": "31:19-31:20" + "loc": "31:30-31:31" + }, + { + "token": "RPAREN", + "loc": "31:31-31:32" }, { "token": [ "SEMI", false ], - "loc": "31:20-31:20" + "loc": "31:32-31:32" }, { "token": "NEWLINE", - "loc": "31:20-31:21" + "loc": "31:32-31:33" }, { "token": [ @@ -872,38 +941,61 @@ "loc": "32:8-32:9" }, { - "token": "TRY_QUESTION", - "loc": "32:9-32:13" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "32:9-32:18" + }, + { + "token": "LPAREN", + "loc": "32:18-32:19" + }, + { + "token": "LPAREN", + "loc": "32:19-32:20" + }, + { + "token": "RPAREN", + "loc": "32:20-32:21" + }, + { + "token": "FAT_ARROW", + "loc": "32:22-32:24" }, { "token": [ "LIDENT", "f" ], - "loc": "32:14-32:15" + "loc": "32:25-32:26" }, { "token": "LPAREN", - "loc": "32:15-32:16" + "loc": "32:26-32:27" }, { "token": [ "INT", "35" ], - "loc": "32:16-32:18" + "loc": "32:27-32:29" }, { "token": "RPAREN", - "loc": "32:18-32:19" + "loc": "32:29-32:30" }, { "token": "RPAREN", - "loc": "32:19-32:20" + "loc": "32:30-32:31" + }, + { + "token": "RPAREN", + "loc": "32:31-32:32" }, { "token": "NEWLINE", - "loc": "32:20-32:21" + "loc": "32:32-32:33" }, { "token": "RBRACE", @@ -920,8 +1012,324 @@ "token": "NEWLINE", "loc": "33:2-33:3" }, + { + "token": "NEWLINE", + "loc": "34:1-34:2" + }, + { + "token": "FN", + "loc": "35:1-35:3" + }, + { + "token": "LBRACKET", + "loc": "35:3-35:4" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "35:4-35:5" + }, + { + "token": "COMMA", + "loc": "35:5-35:6" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "35:7-35:8" + }, + { + "token": "COLON", + "loc": "35:9-35:10" + }, + { + "token": [ + "UIDENT", + "Error" + ], + "loc": "35:11-35:16" + }, + { + "token": "RBRACKET", + "loc": "35:16-35:17" + }, + { + "token": [ + "LIDENT", + "to_result" + ], + "loc": "35:18-35:27" + }, + { + "token": "LPAREN", + "loc": "35:27-35:28" + }, + { + "token": [ + "LIDENT", + "f" + ], + "loc": "35:28-35:29" + }, + { + "token": "COLON", + "loc": "35:30-35:31" + }, + { + "token": "LPAREN", + "loc": "35:32-35:33" + }, + { + "token": "RPAREN", + "loc": "35:33-35:34" + }, + { + "token": "THIN_ARROW", + "loc": "35:35-35:37" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "35:38-35:39" + }, + { + "token": "RAISE", + "loc": "35:40-35:45" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "35:46-35:47" + }, + { + "token": "RPAREN", + "loc": "35:47-35:48" + }, + { + "token": "THIN_ARROW", + "loc": "35:49-35:51" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "35:52-35:58" + }, + { + "token": "LBRACKET", + "loc": "35:58-35:59" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "35:59-35:60" + }, + { + "token": "COMMA", + "loc": "35:60-35:61" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "35:62-35:63" + }, + { + "token": "RBRACKET", + "loc": "35:63-35:64" + }, + { + "token": "LBRACE", + "loc": "35:65-35:66" + }, + { + "token": "NEWLINE", + "loc": "35:66-35:67" + }, + { + "token": "TRY", + "loc": "36:3-36:6" + }, + { + "token": [ + "LIDENT", + "f" + ], + "loc": "36:7-36:8" + }, + { + "token": "LPAREN", + "loc": "36:8-36:9" + }, + { + "token": "RPAREN", + "loc": "36:9-36:10" + }, + { + "token": "NEWLINE", + "loc": "36:10-36:11" + }, + { + "token": "CATCH", + "loc": "37:3-37:8" + }, + { + "token": "LBRACE", + "loc": "37:9-37:10" + }, + { + "token": "NEWLINE", + "loc": "37:10-37:11" + }, + { + "token": [ + "LIDENT", + "err" + ], + "loc": "38:5-38:8" + }, + { + "token": "FAT_ARROW", + "loc": "38:9-38:11" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "38:12-38:18" + }, + { + "token": "COLONCOLON", + "loc": "38:18-38:20" + }, + { + "token": [ + "UIDENT", + "Err" + ], + "loc": "38:20-38:23" + }, + { + "token": "LPAREN", + "loc": "38:23-38:24" + }, + { + "token": [ + "LIDENT", + "err" + ], + "loc": "38:24-38:27" + }, + { + "token": "RPAREN", + "loc": "38:27-38:28" + }, + { + "token": "NEWLINE", + "loc": "38:28-38:29" + }, + { + "token": "RBRACE", + "loc": "39:3-39:4" + }, + { + "token": "NORAISE", + "loc": "39:5-39:12" + }, + { + "token": "LBRACE", + "loc": "39:13-39:14" + }, + { + "token": "NEWLINE", + "loc": "39:14-39:15" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "40:5-40:10" + }, + { + "token": "FAT_ARROW", + "loc": "40:11-40:13" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "40:14-40:20" + }, + { + "token": "COLONCOLON", + "loc": "40:20-40:22" + }, + { + "token": [ + "UIDENT", + "Ok" + ], + "loc": "40:22-40:24" + }, + { + "token": "LPAREN", + "loc": "40:24-40:25" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "40:25-40:30" + }, + { + "token": "RPAREN", + "loc": "40:30-40:31" + }, + { + "token": "NEWLINE", + "loc": "40:31-40:32" + }, + { + "token": "RBRACE", + "loc": "41:3-41:4" + }, + { + "token": "NEWLINE", + "loc": "41:4-41:5" + }, + { + "token": "RBRACE", + "loc": "42:1-42:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "42:2-42:2" + }, + { + "token": "NEWLINE", + "loc": "42:2-42:3" + }, { "token": "EOF", - "loc": "34:1-34:1" + "loc": "43:1-43:1" } ] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/pipeline_test_value_enum_object.json b/test/sync_test/__snapshot__/pipeline_test_value_enum_object.json index 9a0a73c7..7838af7e 100644 --- a/test/sync_test/__snapshot__/pipeline_test_value_enum_object.json +++ b/test/sync_test/__snapshot__/pipeline_test_value_enum_object.json @@ -1044,6 +1044,11 @@ "loc": null, "children": [] }, + "method_quantifiers": { + "kind": "Impl::TopImpl::MethodQuantifierList", + "loc": null, + "children": [] + }, "params": { "kind": "Impl::TopImpl::ParamList", "loc": null, diff --git a/test/sync_test/__snapshot__/pipeline_test_vec_literal.json b/test/sync_test/__snapshot__/pipeline_test_vec_literal.json index 102e1105..7f211dc4 100644 --- a/test/sync_test/__snapshot__/pipeline_test_vec_literal.json +++ b/test/sync_test/__snapshot__/pipeline_test_vec_literal.json @@ -379,7 +379,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -514,7 +515,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -636,7 +638,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { @@ -885,11 +888,13 @@ } } ] - } + }, + "is_iter": false } } ] - } + }, + "is_iter": false } }, "body": { diff --git a/test/sync_test/__snapshot__/pipeline_test_vec_match.json b/test/sync_test/__snapshot__/pipeline_test_vec_match.json index b3fe4e73..633972e3 100644 --- a/test/sync_test/__snapshot__/pipeline_test_vec_match.json +++ b/test/sync_test/__snapshot__/pipeline_test_vec_match.json @@ -2427,7 +2427,8 @@ "kind": "Expr::Array::ExprList", "loc": null, "children": [] - } + }, + "is_iter": false } }, "kind": { @@ -2546,7 +2547,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -2665,7 +2667,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -2797,7 +2800,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -2929,7 +2933,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -3061,7 +3066,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -3193,7 +3199,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -3338,7 +3345,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -3503,7 +3511,8 @@ "kind": "Expr::Array::ExprList", "loc": null, "children": [] - } + }, + "is_iter": false } }, "kind": { @@ -3622,7 +3631,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -3754,7 +3764,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -3899,7 +3910,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -4088,7 +4100,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { diff --git a/test/sync_test/__snapshot__/pipeline_test_vec_match2.json b/test/sync_test/__snapshot__/pipeline_test_vec_match2.json index b046cdb2..23909864 100644 --- a/test/sync_test/__snapshot__/pipeline_test_vec_match2.json +++ b/test/sync_test/__snapshot__/pipeline_test_vec_match2.json @@ -1840,11 +1840,13 @@ } } ] - } + }, + "is_iter": false } } ] - } + }, + "is_iter": false } }, "body": { @@ -2020,11 +2022,13 @@ } } ] - } + }, + "is_iter": false } } ] - } + }, + "is_iter": false } }, "body": { @@ -2200,7 +2204,8 @@ } } ] - } + }, + "is_iter": false } }, { @@ -2251,11 +2256,13 @@ } } ] - } + }, + "is_iter": false } } ] - } + }, + "is_iter": false } }, "body": { @@ -2391,7 +2398,8 @@ "kind": "Expr::Array::ExprList", "loc": null, "children": [] - } + }, + "is_iter": false } }, { @@ -2442,7 +2450,8 @@ } } ] - } + }, + "is_iter": false } }, { @@ -2493,7 +2502,8 @@ } } ] - } + }, + "is_iter": false } }, { @@ -2518,11 +2528,13 @@ } } ] - } + }, + "is_iter": false } } ] - } + }, + "is_iter": false } }, "body": { @@ -2650,7 +2662,8 @@ "kind": "Expr::Array::ExprList", "loc": null, "children": [] - } + }, + "is_iter": false } }, "body": { diff --git a/test/sync_test/__snapshot__/pipeline_test_vec_string.json b/test/sync_test/__snapshot__/pipeline_test_vec_string.json index 21edcd1d..f128250c 100644 --- a/test/sync_test/__snapshot__/pipeline_test_vec_string.json +++ b/test/sync_test/__snapshot__/pipeline_test_vec_string.json @@ -104,7 +104,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { @@ -564,7 +565,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -657,7 +659,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -677,7 +680,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { @@ -800,7 +804,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { @@ -948,7 +953,8 @@ } } ] - } + }, + "is_iter": false } }, "kind": { diff --git a/test/sync_test/__snapshot__/pipeline_test_very_big_array_global.json b/test/sync_test/__snapshot__/pipeline_test_very_big_array_global.json index ec2075a9..fdf9bf0f 100644 --- a/test/sync_test/__snapshot__/pipeline_test_very_big_array_global.json +++ b/test/sync_test/__snapshot__/pipeline_test_very_big_array_global.json @@ -81,7 +81,8 @@ } } ] - } + }, + "is_iter": false } }, "vis": { @@ -1347319,7 +1347320,8 @@ } } ] - } + }, + "is_iter": false } }, "vis": { @@ -1347419,7 +1347421,8 @@ } } ] - } + }, + "is_iter": false } }, "vis": { diff --git a/test/sync_test/__snapshot__/pipeline_test_view_intrinsics.json b/test/sync_test/__snapshot__/pipeline_test_view_intrinsics.json index 3311ce50..6c386e41 100644 --- a/test/sync_test/__snapshot__/pipeline_test_view_intrinsics.json +++ b/test/sync_test/__snapshot__/pipeline_test_view_intrinsics.json @@ -4899,7 +4899,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { @@ -7394,7 +7395,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { diff --git a/test/sync_test/__snapshot__/pipeline_test_view_of_view.json b/test/sync_test/__snapshot__/pipeline_test_view_of_view.json index 4374b2ec..20a42781 100644 --- a/test/sync_test/__snapshot__/pipeline_test_view_of_view.json +++ b/test/sync_test/__snapshot__/pipeline_test_view_of_view.json @@ -1156,7 +1156,8 @@ } } ] - } + }, + "is_iter": false } }, { @@ -1207,11 +1208,13 @@ } } ] - } + }, + "is_iter": false } } ] - } + }, + "is_iter": false } }, "body": { diff --git a/test/sync_test/__snapshot__/pipeline_test_wasm_gc_array_layout_bool_then_arrayview.json b/test/sync_test/__snapshot__/pipeline_test_wasm_gc_array_layout_bool_then_arrayview.json index ecadf93b..6aeb1781 100644 --- a/test/sync_test/__snapshot__/pipeline_test_wasm_gc_array_layout_bool_then_arrayview.json +++ b/test/sync_test/__snapshot__/pipeline_test_wasm_gc_array_layout_bool_then_arrayview.json @@ -619,7 +619,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { @@ -850,7 +851,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { diff --git a/test/sync_test/__snapshot__/pipeline_test_wasm_gc_array_layout_bool_then_char.json b/test/sync_test/__snapshot__/pipeline_test_wasm_gc_array_layout_bool_then_char.json index 89319fde..f7213b18 100644 --- a/test/sync_test/__snapshot__/pipeline_test_wasm_gc_array_layout_bool_then_char.json +++ b/test/sync_test/__snapshot__/pipeline_test_wasm_gc_array_layout_bool_then_char.json @@ -146,7 +146,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { @@ -338,7 +339,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { diff --git a/test/sync_test/__snapshot__/pipeline_test_wasm_gc_array_layout_int_then_bool.json b/test/sync_test/__snapshot__/pipeline_test_wasm_gc_array_layout_int_then_bool.json index 74c4bbcc..a6ac6aae 100644 --- a/test/sync_test/__snapshot__/pipeline_test_wasm_gc_array_layout_int_then_bool.json +++ b/test/sync_test/__snapshot__/pipeline_test_wasm_gc_array_layout_int_then_bool.json @@ -146,7 +146,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { @@ -338,7 +339,8 @@ } } ] - } + }, + "is_iter": false } }, "body": { diff --git a/test/sync_test/__snapshot__/pipeline_test_wrap_ok_negate.json b/test/sync_test/__snapshot__/pipeline_test_wrap_ok_negate.json index c93cf792..2df79d77 100644 --- a/test/sync_test/__snapshot__/pipeline_test_wrap_ok_negate.json +++ b/test/sync_test/__snapshot__/pipeline_test_wrap_ok_negate.json @@ -675,73 +675,58 @@ } }, "expr": { - "kind": "Expr::TryOperator", + "kind": "Expr::Apply", "loc": null, "children": { - "body": { - "kind": "Expr::Apply", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "id": { + "kind": "Var", "loc": null, "children": { - "id": { - "kind": "Var", + "name": { + "kind": "LongIdent::Ident", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", - "loc": null, - "children": { - "value": "h" - } - } + "value": "to_result" } } } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", "loc": null, - "children": [ - { - "kind": "Argument", + "children": { + "value": { + "kind": "Expr::Function", "loc": null, "children": { - "value": { - "kind": "Expr::Function", + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "func": { - "kind": "Func::Lambda", + "parameters": { + "kind": "Func::Lambda::ParameterList", + "loc": null, + "children": [] + }, + "body": { + "kind": "Expr::Apply", "loc": null, "children": { - "parameters": { - "kind": "Func::Lambda::ParameterList", - "loc": null, - "children": [ - { - "kind": "Parameter::Positional", - "loc": null, - "children": { - "binder": { - "kind": "Binder", - "loc": null, - "children": { - "name": "x" - } - }, - "ty": null - } - } - ] - }, - "body": { - "kind": "Expr::Unary", + "func": { + "kind": "Expr::Ident", "loc": null, "children": { - "op": { + "id": { "kind": "Var", "loc": null, "children": { @@ -749,47 +734,54 @@ "kind": "LongIdent::Ident", "loc": null, "children": { - "value": "!" + "value": "h" } } } - }, - "expr": { - "kind": "Expr::Apply", + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", "loc": null, "children": { - "func": { - "kind": "Expr::Ident", + "value": { + "kind": "Expr::Function", "loc": null, "children": { - "id": { - "kind": "Var", + "func": { + "kind": "Func::Lambda", "loc": null, "children": { - "name": { - "kind": "LongIdent::Ident", + "parameters": { + "kind": "Func::Lambda::ParameterList", "loc": null, - "children": { - "value": "is_file" - } - } - } - } - } - }, - "args": { - "kind": "Expr::Apply::ArgumentList", - "loc": null, - "children": [ - { - "kind": "Argument", - "loc": null, - "children": { - "value": { - "kind": "Expr::Ident", + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "x" + } + }, + "ty": null + } + } + ] + }, + "body": { + "kind": "Expr::Unary", "loc": null, "children": { - "id": { + "op": { "kind": "Var", "loc": null, "children": { @@ -797,90 +789,164 @@ "kind": "LongIdent::Ident", "loc": null, "children": { - "value": "x" + "value": "!" + } + } + } + }, + "expr": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "is_file" + } + } + } + } } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "x" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} } } } } }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, "kind": { - "kind": "ArgumentKind::Positional", + "kind": "FnKind::Arrow", "loc": null, "children": {} - } + }, + "has_error": null, + "is_async": null + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + }, + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Constant", + "loc": null, + "children": { + "constant": { + "kind": "Constant::String", + "loc": null, + "children": { + "value": "cmp" } } - ] + } }, - "attr": { - "kind": "ApplyAttr::NoAttr", + "kind": { + "kind": "ArgumentKind::Positional", "loc": null, "children": {} } } } - } - }, - "return_type": null, - "error_type": { - "kind": "ErrorType::NoErrorType", - "loc": null, - "children": {} + ] }, - "kind": { - "kind": "FnKind::Arrow", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} - }, - "has_error": null, - "is_async": null + } } - } + }, + "return_type": null, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "kind": { + "kind": "FnKind::Arrow", + "loc": null, + "children": {} + }, + "has_error": null, + "is_async": null } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} } } }, - { - "kind": "Argument", + "kind": { + "kind": "ArgumentKind::Positional", "loc": null, - "children": { - "value": { - "kind": "Expr::Constant", - "loc": null, - "children": { - "constant": { - "kind": "Constant::String", - "loc": null, - "children": { - "value": "cmp" - } - } - } - }, - "kind": { - "kind": "ArgumentKind::Positional", - "loc": null, - "children": {} - } - } + "children": {} } - ] - }, - "attr": { - "kind": "ApplyAttr::NoAttr", - "loc": null, - "children": {} + } } - } + ] }, - "kind": { - "kind": "TryOperatorKind::Question", + "attr": { + "kind": "ApplyAttr::NoAttr", "loc": null, "children": {} } @@ -957,5 +1023,524 @@ } } } + }, + { + "kind": "Impl::TopFuncDef", + "loc": null, + "children": { + "fun_decl": { + "kind": "FunDecl", + "loc": null, + "children": { + "type_name": null, + "name": { + "kind": "Binder", + "loc": null, + "children": { + "name": "to_result" + } + }, + "has_error": null, + "is_async": null, + "decl_params": { + "kind": "FunDecl::ParameterList", + "loc": null, + "children": [ + { + "kind": "Parameter::Positional", + "loc": null, + "children": { + "binder": { + "kind": "Binder", + "loc": null, + "children": { + "name": "f" + } + }, + "ty": { + "kind": "Type::Arrow", + "loc": null, + "children": { + "args": { + "kind": "Type::Arrow::ArgList", + "loc": null, + "children": [] + }, + "res": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "T" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + "err": { + "kind": "ErrorType::ErrorType", + "loc": null, + "children": { + "ty": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "E" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + } + }, + "is_async": null + } + } + } + } + ] + }, + "quantifiers": { + "kind": "FunDecl::QuantifierList", + "loc": null, + "children": [ + { + "kind": "TypeVarBinder", + "loc": null, + "children": { + "name": "T", + "constraints": { + "kind": "TypeVarBinder::TypeVarConstraintList", + "loc": null, + "children": [] + } + } + }, + { + "kind": "TypeVarBinder", + "loc": null, + "children": { + "name": "E", + "constraints": { + "kind": "TypeVarBinder::TypeVarConstraintList", + "loc": null, + "children": [ + { + "kind": "TypeVarConstraint", + "loc": null, + "children": { + "trait": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Error" + } + } + } + } + ] + } + } + } + ] + }, + "return_type": { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [ + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "T" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + }, + { + "kind": "Type::Name", + "loc": null, + "children": { + "constr_id": { + "kind": "ConstrId", + "loc": null, + "children": { + "id": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "E" + } + } + } + }, + "tys": { + "kind": "Type::Name::TypeList", + "loc": null, + "children": [] + } + } + } + ] + } + } + }, + "error_type": { + "kind": "ErrorType::NoErrorType", + "loc": null, + "children": {} + }, + "vis": { + "kind": "Visibility::Default", + "loc": null, + "children": {} + }, + "attrs": { + "kind": "FunDecl::AttrList", + "loc": null, + "children": [] + }, + "doc": "" + } + }, + "where_clause": null, + "decl_body": { + "kind": "DeclBody::DeclBody", + "loc": null, + "children": { + "local_types": { + "kind": "DeclBody::DeclBody::LocalTypeList", + "loc": null, + "children": [] + }, + "expr": { + "kind": "Expr::Try", + "loc": null, + "children": { + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "f" + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + }, + "catch": { + "kind": "Expr::Try::CaseList", + "loc": null, + "children": [ + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "err" + } + } + } + }, + "guard": null, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Err" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::TypeName", + "loc": null, + "children": { + "value": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + }, + "is_object": false + } + } + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "err" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + ] + }, + "catch_all": false, + "try_else": { + "kind": "Expr::Try::CaseList", + "loc": null, + "children": [ + { + "kind": "Case", + "loc": null, + "children": { + "pattern": { + "kind": "Pattern::Var", + "loc": null, + "children": { + "value": { + "kind": "Binder", + "loc": null, + "children": { + "name": "value" + } + } + } + }, + "guard": null, + "body": { + "kind": "Expr::Apply", + "loc": null, + "children": { + "func": { + "kind": "Expr::Constr", + "loc": null, + "children": { + "constr": { + "kind": "Constructor", + "loc": null, + "children": { + "name": { + "kind": "ConstrName", + "loc": null, + "children": { + "name": "Ok" + } + }, + "extra_info": { + "kind": "ConstructorExtraInfo::TypeName", + "loc": null, + "children": { + "value": { + "kind": "TypeName", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "Result" + } + }, + "is_object": false + } + } + } + } + } + } + } + }, + "args": { + "kind": "Expr::Apply::ArgumentList", + "loc": null, + "children": [ + { + "kind": "Argument", + "loc": null, + "children": { + "value": { + "kind": "Expr::Ident", + "loc": null, + "children": { + "id": { + "kind": "Var", + "loc": null, + "children": { + "name": { + "kind": "LongIdent::Ident", + "loc": null, + "children": { + "value": "value" + } + } + } + } + } + }, + "kind": { + "kind": "ArgumentKind::Positional", + "loc": null, + "children": {} + } + } + } + ] + }, + "attr": { + "kind": "ApplyAttr::NoAttr", + "loc": null, + "children": {} + } + } + } + } + } + ] + }, + "has_try": true + } + } + } + } + } } ] \ No newline at end of file diff --git a/test/sync_test/__snapshot__/pipeline_test_wrap_ok_negate.mbt b/test/sync_test/__snapshot__/pipeline_test_wrap_ok_negate.mbt index 5f075c2e..e9f9d608 100644 --- a/test/sync_test/__snapshot__/pipeline_test_wrap_ok_negate.mbt +++ b/test/sync_test/__snapshot__/pipeline_test_wrap_ok_negate.mbt @@ -14,6 +14,15 @@ fn h(f : (String) -> Bool raise?, x : String) -> Bool raise? { ///| fn main { - let x = try? h(x => !is_file(x), "cmp") + let x = to_result(() => h(x => !is_file(x), "cmp")) debug(x) } + +fn[T, E : Error] to_result(f : () -> T raise E) -> Result[T, E] { + try f() + catch { + err => Result::Err(err) + } noraise { + value => Result::Ok(value) + } +} diff --git a/test/sync_test/__snapshot__/pipeline_test_wrap_ok_negate.mbt.tokens.json b/test/sync_test/__snapshot__/pipeline_test_wrap_ok_negate.mbt.tokens.json index 07c5e12e..3609a4fa 100644 --- a/test/sync_test/__snapshot__/pipeline_test_wrap_ok_negate.mbt.tokens.json +++ b/test/sync_test/__snapshot__/pipeline_test_wrap_ok_negate.mbt.tokens.json @@ -436,82 +436,105 @@ "loc": "17:9-17:10" }, { - "token": "TRY_QUESTION", - "loc": "17:11-17:15" + "token": [ + "LIDENT", + "to_result" + ], + "loc": "17:11-17:20" + }, + { + "token": "LPAREN", + "loc": "17:20-17:21" + }, + { + "token": "LPAREN", + "loc": "17:21-17:22" + }, + { + "token": "RPAREN", + "loc": "17:22-17:23" + }, + { + "token": "FAT_ARROW", + "loc": "17:24-17:26" }, { "token": [ "LIDENT", "h" ], - "loc": "17:16-17:17" + "loc": "17:27-17:28" }, { "token": "LPAREN", - "loc": "17:17-17:18" + "loc": "17:28-17:29" }, { "token": [ "LIDENT", "x" ], - "loc": "17:18-17:19" + "loc": "17:29-17:30" }, { "token": "FAT_ARROW", - "loc": "17:20-17:22" + "loc": "17:31-17:33" }, { "token": "EXCLAMATION", - "loc": "17:23-17:24" + "loc": "17:34-17:35" }, { "token": [ "LIDENT", "is_file" ], - "loc": "17:24-17:31" + "loc": "17:35-17:42" }, { "token": "LPAREN", - "loc": "17:31-17:32" + "loc": "17:42-17:43" }, { "token": [ "LIDENT", "x" ], - "loc": "17:32-17:33" + "loc": "17:43-17:44" }, { "token": "RPAREN", - "loc": "17:33-17:34" + "loc": "17:44-17:45" }, { "token": "COMMA", - "loc": "17:34-17:35" + "loc": "17:45-17:46" }, { "token": [ "STRING", "cmp" ], - "loc": "17:36-17:41" + "loc": "17:47-17:52" + }, + { + "token": "RPAREN", + "loc": "17:52-17:53" }, { "token": "RPAREN", - "loc": "17:41-17:42" + "loc": "17:53-17:54" }, { "token": [ "SEMI", false ], - "loc": "17:42-17:42" + "loc": "17:54-17:54" }, { "token": "NEWLINE", - "loc": "17:42-17:43" + "loc": "17:54-17:55" }, { "token": [ @@ -554,8 +577,324 @@ "token": "NEWLINE", "loc": "19:2-19:3" }, + { + "token": "NEWLINE", + "loc": "20:1-20:2" + }, + { + "token": "FN", + "loc": "21:1-21:3" + }, + { + "token": "LBRACKET", + "loc": "21:3-21:4" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "21:4-21:5" + }, + { + "token": "COMMA", + "loc": "21:5-21:6" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "21:7-21:8" + }, + { + "token": "COLON", + "loc": "21:9-21:10" + }, + { + "token": [ + "UIDENT", + "Error" + ], + "loc": "21:11-21:16" + }, + { + "token": "RBRACKET", + "loc": "21:16-21:17" + }, + { + "token": [ + "LIDENT", + "to_result" + ], + "loc": "21:18-21:27" + }, + { + "token": "LPAREN", + "loc": "21:27-21:28" + }, + { + "token": [ + "LIDENT", + "f" + ], + "loc": "21:28-21:29" + }, + { + "token": "COLON", + "loc": "21:30-21:31" + }, + { + "token": "LPAREN", + "loc": "21:32-21:33" + }, + { + "token": "RPAREN", + "loc": "21:33-21:34" + }, + { + "token": "THIN_ARROW", + "loc": "21:35-21:37" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "21:38-21:39" + }, + { + "token": "RAISE", + "loc": "21:40-21:45" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "21:46-21:47" + }, + { + "token": "RPAREN", + "loc": "21:47-21:48" + }, + { + "token": "THIN_ARROW", + "loc": "21:49-21:51" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "21:52-21:58" + }, + { + "token": "LBRACKET", + "loc": "21:58-21:59" + }, + { + "token": [ + "UIDENT", + "T" + ], + "loc": "21:59-21:60" + }, + { + "token": "COMMA", + "loc": "21:60-21:61" + }, + { + "token": [ + "UIDENT", + "E" + ], + "loc": "21:62-21:63" + }, + { + "token": "RBRACKET", + "loc": "21:63-21:64" + }, + { + "token": "LBRACE", + "loc": "21:65-21:66" + }, + { + "token": "NEWLINE", + "loc": "21:66-21:67" + }, + { + "token": "TRY", + "loc": "22:3-22:6" + }, + { + "token": [ + "LIDENT", + "f" + ], + "loc": "22:7-22:8" + }, + { + "token": "LPAREN", + "loc": "22:8-22:9" + }, + { + "token": "RPAREN", + "loc": "22:9-22:10" + }, + { + "token": "NEWLINE", + "loc": "22:10-22:11" + }, + { + "token": "CATCH", + "loc": "23:3-23:8" + }, + { + "token": "LBRACE", + "loc": "23:9-23:10" + }, + { + "token": "NEWLINE", + "loc": "23:10-23:11" + }, + { + "token": [ + "LIDENT", + "err" + ], + "loc": "24:5-24:8" + }, + { + "token": "FAT_ARROW", + "loc": "24:9-24:11" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "24:12-24:18" + }, + { + "token": "COLONCOLON", + "loc": "24:18-24:20" + }, + { + "token": [ + "UIDENT", + "Err" + ], + "loc": "24:20-24:23" + }, + { + "token": "LPAREN", + "loc": "24:23-24:24" + }, + { + "token": [ + "LIDENT", + "err" + ], + "loc": "24:24-24:27" + }, + { + "token": "RPAREN", + "loc": "24:27-24:28" + }, + { + "token": "NEWLINE", + "loc": "24:28-24:29" + }, + { + "token": "RBRACE", + "loc": "25:3-25:4" + }, + { + "token": "NORAISE", + "loc": "25:5-25:12" + }, + { + "token": "LBRACE", + "loc": "25:13-25:14" + }, + { + "token": "NEWLINE", + "loc": "25:14-25:15" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "26:5-26:10" + }, + { + "token": "FAT_ARROW", + "loc": "26:11-26:13" + }, + { + "token": [ + "UIDENT", + "Result" + ], + "loc": "26:14-26:20" + }, + { + "token": "COLONCOLON", + "loc": "26:20-26:22" + }, + { + "token": [ + "UIDENT", + "Ok" + ], + "loc": "26:22-26:24" + }, + { + "token": "LPAREN", + "loc": "26:24-26:25" + }, + { + "token": [ + "LIDENT", + "value" + ], + "loc": "26:25-26:30" + }, + { + "token": "RPAREN", + "loc": "26:30-26:31" + }, + { + "token": "NEWLINE", + "loc": "26:31-26:32" + }, + { + "token": "RBRACE", + "loc": "27:3-27:4" + }, + { + "token": "NEWLINE", + "loc": "27:4-27:5" + }, + { + "token": "RBRACE", + "loc": "28:1-28:2" + }, + { + "token": [ + "SEMI", + false + ], + "loc": "28:2-28:2" + }, + { + "token": "NEWLINE", + "loc": "28:2-28:3" + }, { "token": "EOF", - "loc": "20:1-20:1" + "loc": "29:1-29:1" } ] \ No newline at end of file diff --git a/test/sync_test/lexer_test.mbt b/test/sync_test/lexer_test.mbt index 471e900e..07319f11 100644 --- a/test/sync_test/lexer_test.mbt +++ b/test/sync_test/lexer_test.mbt @@ -145,6 +145,11 @@ test "lexing pipeline_test_guard1" (t : @test.Test) { lexer_test(t) } +///| +test "lexing parse_test_bytes_interp_template_writing" (t : @test.Test) { + lexer_test(t) +} + ///| test "lexing pipeline_test_uint64_pattern_match" (t : @test.Test) { lexer_test(t) @@ -265,6 +270,11 @@ test "lexing pipeline_test_tuple_struct" (t : @test.Test) { lexer_test(t) } +///| +test "lexing pipeline_test_const_fold_integers" (t : @test.Test) { + lexer_test(t) +} + ///| test "lexing pipeline_test_rec_type" (t : @test.Test) { lexer_test(t) @@ -315,6 +325,11 @@ test "lexing pipeline_test_label_loop_foreach2" (t : @test.Test) { lexer_test(t) } +///| +test "lexing parse_test_extern_fn_quantifier" (t : @test.Test) { + lexer_test(t) +} + ///| test "lexing parse_test_fnalias_invalid_start_token" (t : @test.Test) { lexer_test(t) @@ -445,6 +460,11 @@ test "lexing pipeline_test_int32_bitwise" (t : @test.Test) { lexer_test(t) } +///| +test "lexing pipeline_test_string_interp_lambda" (t : @test.Test) { + lexer_test(t) +} + ///| test "lexing pipeline_test_json_pattern" (t : @test.Test) { lexer_test(t) @@ -730,6 +750,11 @@ test "lexing pipeline_test_value_enum_global" (t : @test.Test) { lexer_test(t) } +///| +test "lexing pipeline_test_locals_contify" (t : @test.Test) { + lexer_test(t) +} + ///| test "lexing parse_test_no_trailing_newline_type" (t : @test.Test) { lexer_test(t) @@ -1024,6 +1049,11 @@ test "lexing pipeline_test_option5" (t : @test.Test) { lexer_test(t) } +///| +test "lexing parse_test_brace_group_loc" (t : @test.Test) { + lexer_test(t) +} + ///| test "lexing pipeline_test_int64_unsigned_op" (t : @test.Test) { lexer_test(t) @@ -1169,6 +1199,11 @@ test "lexing pipeline_test_local_type2" (t : @test.Test) { lexer_test(t) } +///| +test "lexing pipeline_test_if_with_no_else_in_spread" (t : @test.Test) { + lexer_test(t) +} + ///| test "lexing pipeline_test_label" (t : @test.Test) { lexer_test(t) @@ -1736,6 +1771,11 @@ test "lexing pipeline_test_multiline_string_interp" (t : @test.Test) { lexer_test(t) } +///| +test "lexing parse_test_iter_literal" (t : @test.Test) { + lexer_test(t) +} + ///| test "lexing parse_test_unicode_test" (t : @test.Test) { lexer_test(t) @@ -1926,6 +1966,11 @@ test "lexing pipeline_test_shadow_builtin_pkg" (t : @test.Test) { lexer_test(t) } +///| +test "lexing pipeline_test_inline_nested_error_ctx" (t : @test.Test) { + lexer_test(t) +} + ///| test "lexing pipeline_test_nested_assign" (t : @test.Test) { lexer_test(t) @@ -2081,6 +2126,11 @@ test "lexing pipeline_test_err_bound_check" (t : @test.Test) { lexer_test(t) } +///| +test "lexing pipeline_test_v128" (t : @test.Test) { + lexer_test(t) +} + ///| test "lexing pipeline_test_contify_handle_error" (t : @test.Test) { lexer_test(t) @@ -2491,6 +2541,11 @@ test "lexing parse_test_parse_float32_literal" (t : @test.Test) { lexer_test(t) } +///| +test "lexing pipeline_test_tuple_struct_pipe2" (t : @test.Test) { + lexer_test(t) +} + ///| test "lexing pipeline_test_hello" (t : @test.Test) { lexer_test(t) @@ -2923,6 +2978,11 @@ test "lexing pipeline_test_assoc_array" (t : @test.Test) { lexer_test(t) } +///| +test "lexing parse_test_lexscan" (t : @test.Test) { + lexer_test(t) +} + ///| test "lexing pipeline_test_letrec_well_known2" (t : @test.Test) { lexer_test(t) @@ -3068,6 +3128,11 @@ test "lexing parse_test_fnalias_pkg_invalid_target" (t : @test.Test) { lexer_test(t) } +///| +test "lexing pipeline_test_layout_table_pressure" (t : @test.Test) { + lexer_test(t) +} + ///| test "lexing pipeline_test_valtype_self_ref2" (t : @test.Test) { lexer_test(t) @@ -3143,6 +3208,11 @@ test "lexing pipeline_test_valtype_self_ref1" (t : @test.Test) { lexer_test(t) } +///| +test "lexing pipeline_test_trait_poly_method" (t : @test.Test) { + lexer_test(t) +} + ///| test "lexing pipeline_test_bytes_utils_wasm" (t : @test.Test) { lexer_test(t) @@ -3653,6 +3723,11 @@ test "lexing pipeline_test_leak_check_with_main" (t : @test.Test) { lexer_test(t) } +///| +test "lexing parse_test_conditional_template_writing_invalid" (t : @test.Test) { + lexer_test(t) +} + ///| test "lexing pipeline_test_specialize_compare" (t : @test.Test) { lexer_test(t) @@ -3748,6 +3823,11 @@ test "lexing parse_test_brace_grouped_ident" (t : @test.Test) { lexer_test(t) } +///| +test "lexing pipeline_test_pattern_guard_binding" (t : @test.Test) { + lexer_test(t) +} + ///| test "lexing pipeline_test_contify_local_error_raising" (t : @test.Test) { lexer_test(t) @@ -4003,6 +4083,11 @@ test "lexing pipeline_test_arrayview_loop" (t : @test.Test) { lexer_test(t) } +///| +test "lexing pipeline_test_lexscan_async" (t : @test.Test) { + lexer_test(t) +} + ///| test "lexing parse_test_array2" (t : @test.Test) { lexer_test(t) @@ -4178,6 +4263,16 @@ test "lexing pipeline_test_global" (t : @test.Test) { lexer_test(t) } +///| +test "lexing parse_test_extend_soft_keyword" (t : @test.Test) { + lexer_test(t) +} + +///| +test "lexing pipeline_test_conditional_template_writing" (t : @test.Test) { + lexer_test(t) +} + ///| test "lexing pipeline_test_iter_fuse" (t : @test.Test) { lexer_test(t) @@ -4313,6 +4408,11 @@ test "lexing pipeline_test_is_lexmatch" (t : @test.Test) { lexer_test(t) } +///| +test "lexing pipeline_test_iter_string" (t : @test.Test) { + lexer_test(t) +} + ///| test "lexing pipeline_test_err_string" (t : @test.Test) { lexer_test(t) @@ -4578,6 +4678,11 @@ test "lexing parse_test_invalid_type" (t : @test.Test) { lexer_test(t) } +///| +test "lexing pipeline_test_lexscan" (t : @test.Test) { + lexer_test(t) +} + ///| test "lexing pipeline_test_match_string2" (t : @test.Test) { lexer_test(t) @@ -4628,6 +4733,11 @@ test "lexing parse_test_while" (t : @test.Test) { lexer_test(t) } +///| +test "lexing pipeline_test_ignore_aggregate_param" (t : @test.Test) { + lexer_test(t) +} + ///| test "lexing pipeline_test_labelled_constr" (t : @test.Test) { lexer_test(t) @@ -4668,6 +4778,11 @@ test "lexing pipeline_test_option_func2" (t : @test.Test) { lexer_test(t) } +///| +test "lexing pipeline_test_bytes_interp_template_writing" (t : @test.Test) { + lexer_test(t) +} + ///| test "lexing parse_test_old_syntax_error_type_variants" (t : @test.Test) { lexer_test(t) @@ -4948,6 +5063,11 @@ test "lexing parse_test_trait_method_async_and_errors" (t : @test.Test) { lexer_test(t) } +///| +test "lexing parse_test_bytes_interp_standalone" (t : @test.Test) { + lexer_test(t) +} + ///| test "lexing pipeline_test_while_is" (t : @test.Test) { lexer_test(t) @@ -5658,6 +5778,11 @@ test "lexing pipeline_test_007" (t : @test.Test) { lexer_test(t) } +///| +test "lexing pipeline_test_bytes_make_nonzero" (t : @test.Test) { + lexer_test(t) +} + ///| test "lexing pipeline_test_string_repr" (t : @test.Test) { lexer_test(t) @@ -5693,6 +5818,11 @@ test "lexing parse_test_fn_missing_params_expr" (t : @test.Test) { lexer_test(t) } +///| +test "lexing parse_test_conditional_template_writing_ambiguous" (t : @test.Test) { + lexer_test(t) +} + ///| test "lexing pipeline_test_alias_bug" (t : @test.Test) { lexer_test(t) @@ -5708,6 +5838,13 @@ test "lexing pipeline_test_inline_raise" (t : @test.Test) { lexer_test(t) } +///| +test "lexing pipeline_test_constr_propagate_no_payload_mut_enum" ( + t : @test.Test, +) { + lexer_test(t) +} + ///| test "lexing parse_test_return" (t : @test.Test) { lexer_test(t) diff --git a/test/sync_test/parser_test.mbt b/test/sync_test/parser_test.mbt index 3be02dda..bd601f69 100644 --- a/test/sync_test/parser_test.mbt +++ b/test/sync_test/parser_test.mbt @@ -155,6 +155,11 @@ test "pipeline_test_array_copy2" (t : @test.Test) { t.run() } +///| +test "parse_test_bytes_interp_template_writing" (t : @test.Test) { + t.run() +} + ///| test "parse_test_hello" (t : @test.Test) { t.run() @@ -175,6 +180,11 @@ test "pipeline_test_constr_propagate_mut" (t : @test.Test) { t.run() } +///| +test "pipeline_test_locals_contify" (t : @test.Test) { + t.run() +} + ///| test "pipeline_test_add_string" (t : @test.Test) { t.run() @@ -260,6 +270,11 @@ test "pipeline_test_inline_raise" (t : @test.Test) { t.run() } +///| +test "pipeline_test_const_fold_integers" (t : @test.Test) { + t.run() +} + ///| test "pipeline_test_return_test" (t : @test.Test) { t.run() @@ -600,6 +615,11 @@ test "pipeline_test_typing_coverage_generic_methods" (t : @test.Test) { t.run() } +///| +test "pipeline_test_iter_string" (t : @test.Test) { + t.run() +} + ///| test "pipeline_test_view_intrinsics" (t : @test.Test) { t.run() @@ -665,6 +685,16 @@ test "pipeline_test_tree_mutual_recursion" (t : @test.Test) { t.run() } +///| +test "pipeline_test_trait_poly_method" (t : @test.Test) { + t.run() +} + +///| +test "pipeline_test_ignore_aggregate_param" (t : @test.Test) { + t.run() +} + ///| test "parse_test_trait_obj_fn_apply" (t : @test.Test) { t.run() @@ -980,6 +1010,11 @@ test "pipeline_test_derive_to_json" (t : @test.Test) { t.run() } +///| +test "pipeline_test_bytes_make_nonzero" (t : @test.Test) { + t.run() +} + ///| test "pipeline_test_compare_trait" (t : @test.Test) { t.run() @@ -1670,6 +1705,11 @@ test "pipeline_test_rename_mono" (t : @test.Test) { t.run() } +///| +test "pipeline_test_layout_table_pressure" (t : @test.Test) { + t.run() +} + ///| test "parse_test_local_attrs" (t : @test.Test) { t.run() @@ -1885,6 +1925,16 @@ test "pipeline_test_match_stringview2" (t : @test.Test) { t.run() } +///| +test "parse_test_conditional_template_writing_ambiguous" (t : @test.Test) { + t.run() +} + +///| +test "parse_test_brace_group_loc" (t : @test.Test) { + t.run() +} + ///| test "pipeline_test_augmented3" (t : @test.Test) { t.run() @@ -2000,6 +2050,11 @@ test "pipeline_test_tuple_struct_match" (t : @test.Test) { t.run() } +///| +test "pipeline_test_inline_nested_error_ctx" (t : @test.Test) { + t.run() +} + ///| test "parse_test_trait" (t : @test.Test) { t.run() @@ -2235,6 +2290,11 @@ test "pipeline_test_value_enum_array" (t : @test.Test) { t.run() } +///| +test "pipeline_test_lexscan_async" (t : @test.Test) { + t.run() +} + ///| test "pipeline_test_large_data_section2" (t : @test.Test) { t.run() @@ -2635,6 +2695,11 @@ test "pipeline_test_array2" (t : @test.Test) { t.run() } +///| +test "pipeline_test_string_interp_lambda" (t : @test.Test) { + t.run() +} + ///| test "pipeline_test_array_bool" (t : @test.Test) { t.run() @@ -2675,6 +2740,11 @@ test "pipeline_test_augmented" (t : @test.Test) { t.run() } +///| +test "parse_test_iter_literal" (t : @test.Test) { + t.run() +} + ///| test "pipeline_test_async_nested_fn" (t : @test.Test) { t.run() @@ -3025,6 +3095,11 @@ test "pipeline_test_001" (t : @test.Test) { t.run() } +///| +test "pipeline_test_pattern_guard_binding" (t : @test.Test) { + t.run() +} + ///| test "pipeline_test_num_literal2" (t : @test.Test) { t.run() @@ -3095,6 +3170,11 @@ test "pipeline_test_match_bytesview2" (t : @test.Test) { t.run() } +///| +test "pipeline_test_v128" (t : @test.Test) { + t.run() +} + ///| test "pipeline_test_newtype_rec" (t : @test.Test) { t.run() @@ -3115,6 +3195,11 @@ test "pipeline_test_foreach_nested_loop" (t : @test.Test) { t.run() } +///| +test "pipeline_test_if_with_no_else_in_spread" (t : @test.Test) { + t.run() +} + ///| test "pipeline_test_static_data" (t : @test.Test) { t.run() @@ -3250,6 +3335,11 @@ test "pipeline_test_int_of_error_test1" (t : @test.Test) { t.run() } +///| +test "pipeline_test_conditional_template_writing" (t : @test.Test) { + t.run() +} + ///| test "pipeline_test_error_tail" (t : @test.Test) { t.run() @@ -3995,6 +4085,11 @@ test "pipeline_test_optional_arg3" (t : @test.Test) { t.run() } +///| +test "pipeline_test_constr_propagate_no_payload_mut_enum" (t : @test.Test) { + t.run() +} + ///| test "pipeline_test_const_bytes" (t : @test.Test) { t.run() @@ -4045,11 +4140,21 @@ test "pipeline_test_try_exclamation" (t : @test.Test) { t.run() } +///| +test "parse_test_lexscan" (t : @test.Test) { + t.run() +} + ///| test "parse_test_get_slice" (t : @test.Test) { t.run() } +///| +test "parse_test_extend_soft_keyword" (t : @test.Test) { + t.run() +} + ///| test "pipeline_test_tlink_to_obj" (t : @test.Test) { t.run() @@ -4285,6 +4390,11 @@ test "pipeline_test_int16_compare" (t : @test.Test) { t.run() } +///| +test "pipeline_test_tuple_struct_pipe2" (t : @test.Test) { + t.run() +} + ///| test "parse_test_struct_spread" (t : @test.Test) { t.run() @@ -4335,11 +4445,21 @@ test "pipeline_test_labeled_arg2" (t : @test.Test) { t.run() } +///| +test "pipeline_test_lexscan" (t : @test.Test) { + t.run() +} + ///| test "pipeline_test_stringview_literal" (t : @test.Test) { t.run() } +///| +test "pipeline_test_bytes_interp_template_writing" (t : @test.Test) { + t.run() +} + ///| test "pipeline_test_lexmatch_rest_bug" (t : @test.Test) { t.run() @@ -4605,6 +4725,11 @@ test "pipeline_test_newtype" (t : @test.Test) { t.run() } +///| +test "parse_test_bytes_interp_standalone" (t : @test.Test) { + t.run() +} + ///| test "pipeline_test_optional_arg4" (t : @test.Test) { t.run() diff --git a/yacc_parser/imports.mbt b/yacc_parser/imports.mbt index 263c1222..98f90946 100644 --- a/yacc_parser/imports.mbt +++ b/yacc_parser/imports.mbt @@ -67,6 +67,8 @@ using @syntax { type LexPattern, type RegexPattern, type LexTopPattern, + type LexScanCase, + type LexScanCasePattern, type UsingKind, type LexCase, type WhereClause, @@ -84,6 +86,7 @@ using @syntax { make_arrow_fn, make_constant_expr, make_interp_expr, + make_bytes_interp_expr, make_uplus, make_uminus, make_unot, diff --git a/yacc_parser/parser.mbt b/yacc_parser/parser.mbt index 7c2f77bb..b755e02e 100644 --- a/yacc_parser/parser.mbt +++ b/yacc_parser/parser.mbt @@ -104,6 +104,10 @@ priv suberror YYObj_List_ConstrParam_ { YYObj_List_ConstrParam_(List[ConstrParam]) } +priv suberror YYObj_List_LexScanCase_ { + YYObj_List_LexScanCase_(List[LexScanCase]) +} + priv suberror YYObj_List_MapExprElem_ { YYObj_List_MapExprElem_(List[MapExprElem]) } @@ -344,6 +348,10 @@ priv suberror YYObj_Constructor { YYObj_Constructor(Constructor) } +priv suberror YYObj_LexScanCase { + YYObj_LexScanCase(LexScanCase) +} + priv suberror YYObj_MapExprElem { YYObj_MapExprElem(MapExprElem) } @@ -404,6 +412,10 @@ priv suberror YYObj_TypeVarConstraint { YYObj_TypeVarConstraint(TypeVarConstraint) } +priv suberror YYObj_LexScanCasePattern { + YYObj_LexScanCasePattern(LexScanCasePattern) +} + priv suberror YYObj_MultilineStringElem { YYObj_MultilineStringElem(MultilineStringElem) } @@ -591,6 +603,7 @@ priv enum YYSymbol { T_MULTILINE_STRING T_MULTILINE_INTERP T_INTERP + T_BYTES_INTERP T_REGEX_LITERAL T_REGEX_INTERP T_ATTRIBUTE @@ -645,8 +658,10 @@ priv enum YYSymbol { T_COLON T_SEMI T_LBRACKET + T_LBRACKET_BAR T_PLUS T_RBRACKET + T_BAR_RBRACKET T_UNDERSCORE T_BAR T_LBRACE @@ -660,6 +675,7 @@ priv enum YYSymbol { T_PIPE T_PIPE_LEFT T_LT_PLUS + T_LT_QUESTION T_ELSE T_FN T_IF @@ -705,6 +721,8 @@ priv enum YYSymbol { T_TRY_EXCLAMATION T_LEXMATCH T_LEXMATCH_QUESTION + T_LEXSCAN + T_EXTEND T_PACKAGE NT_parameter NT_parameters @@ -723,6 +741,7 @@ priv enum YYSymbol { NT_val_header NT_structure NT_structure_item + NT_impl_optional_fn NT_pub_attr NT_type_header NT_suberror_header @@ -746,6 +765,7 @@ priv enum YYSymbol { NT_statement NT_guard_statement NT_template_rhs + NT_template_object_elem NT_expr_statement_no_break_continue_return NT_expr_statement NT_loop_label_colon @@ -759,6 +779,10 @@ priv enum YYSymbol { NT_match_expr NT_lexmatch_expr NT_lexmatch_header + NT_lexscan_expr + NT_lexscan_header + NT_lexscan_case + NT_lexscan_case_pattern NT_lex_case NT_lex_pattern NT_lex_top_pattern @@ -856,18 +880,17 @@ priv enum YYSymbol { NT_option_preceded_COLON_separated_nonempty_list_PLUS_tvar_constraint___ NT_list_semis_trait_method_decl_ NT_option_loced_string_ - NT_option_FN_ NT_list_commas_using_binder_ NT_non_empty_list_attribute_ NT_batch_type_alias_target_DOT_UIDENT_ NT_batch_type_alias_target_UIDENT_ NT_non_empty_list_commas_batch_type_alias_target_UIDENT__ - NT_func_alias_type_name_LIDENT_UIDENT_ - NT_func_alias_target_LIDENT_ + NT_func_alias_type_name_lident_string_UIDENT_ + NT_func_alias_target_lident_string_ NT_func_alias_target_DOT_LIDENT_ NT_func_alias_type_name_DOT_LIDENT_DOT_UIDENT_ - NT_option_func_alias_type_name_LIDENT_UIDENT__ - NT_non_empty_list_commas_func_alias_target_LIDENT__ + NT_option_func_alias_type_name_lident_string_UIDENT__ + NT_non_empty_list_commas_func_alias_target_lident_string__ NT_list_commas_argument_ NT_list_commas_deriving_directive_ NT_list_commas_trait_method_param_ @@ -875,12 +898,14 @@ priv enum YYSymbol { NT_none_empty_list_semis_rev_with_trailing_info_statement_ NT_list_and_func_ NT_non_empty_list_multiline_string_ + NT_list_commas_template_object_elem_ NT_option_expr_ NT_list_commas_no_trailing_expr_ NT_option_preceded_IF_infix_expr__ NT_list_semis_single_pattern_case_ NT_non_empty_list_semis_single_pattern_case_ NT_list_semis_lex_case_ + NT_list_semis_lexscan_case_ NT_separated_nonempty_list_COMMA_lex_top_pattern_ NT_option_SEMI_ NT_list_commas_no_trailing_separated_pair_binder_EQUAL_expr__ @@ -919,13 +944,15 @@ priv enum YYSymbol { NT_non_empty_list_commas_using_binder_ NT_non_empty_list_commas_rev_batch_type_alias_target_UIDENT__ NT_option_preceded_AS_binder__ - NT_non_empty_list_commas_rev_func_alias_target_LIDENT__ + NT_non_empty_list_commas_rev_func_alias_target_lident_string__ NT_non_empty_list_commas_argument_ NT_non_empty_list_commas_deriving_directive_ NT_non_empty_list_commas_trait_method_param_ NT_non_empty_list_semi_rev_aux_statement_ + NT_non_empty_list_commas_template_object_elem_ NT_non_empty_list_commas_no_trailing_expr_ NT_non_empty_list_semis_lex_case_ + NT_non_empty_list_semis_lexscan_case_ NT_non_empty_list_commas_no_trailing_separated_pair_binder_EQUAL_expr__ NT_non_empty_list_commas_no_trailing_separated_pair_binder_EQUAL_infix_expr__ NT_non_empty_list_commas_labeled_expr_ @@ -945,6 +972,7 @@ priv enum YYSymbol { NT_non_empty_list_commas_rev_argument_ NT_non_empty_list_commas_rev_deriving_directive_ NT_non_empty_list_commas_rev_trait_method_param_ + NT_non_empty_list_commas_rev_template_object_elem_ NT_non_empty_list_commas_rev_expr_ NT_non_empty_list_commas_rev_separated_pair_binder_EQUAL_expr__ NT_non_empty_list_commas_rev_separated_pair_binder_EQUAL_infix_expr__ @@ -964,38 +992,38 @@ fn init { } // file:///./parser.mbty -// 428| list_semis(structure_item) EOF { $1 } +// 439| list_semis(structure_item) EOF { $1 } fn yy_action_0(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj_List_Impl_(_dollar1) YYObj_List_Impl_({(); _dollar1 }) } // file:///./parser.mbty -// 251| non_empty_list_semis(X) { $1 } +// 257| non_empty_list_semis(X) { $1 } fn yy_action_1(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj_List_Impl_(_dollar1) YYObj_List_Impl_({(); _dollar1 }) } // file:///./parser.mbty -// 341| attributes visibility is_async fun_header_generic option(parameters) func_return_type { -// 342| let ((type_name, f), quants) = $4 -// 343| let (return_type, error_type) = $6 -// 344| FunDecl::{ -// 345| type_name, -// 346| name: f, -// 347| is_async : $3, -// 348| quantifiers: quants, -// 349| decl_params: $5, -// 350| params_loc: mk_loc($loc($5)), -// 351| return_type, -// 352| error_type, -// 353| vis: $2, -// 354| doc: DocString::empty(), -// 355| attrs: $1, -// 356| loc : mk_loc($loc) -// 357| } -// 358| } +// 352| attributes visibility is_async fun_header_generic option(parameters) func_return_type { +// 353| let ((type_name, f), quants) = $4 +// 354| let (return_type, error_type) = $6 +// 355| FunDecl::{ +// 356| type_name, +// 357| name: f, +// 358| is_async : $3, +// 359| quantifiers: quants, +// 360| decl_params: $5, +// 361| params_loc: mk_loc($loc($5)), +// 362| return_type, +// 363| error_type, +// 364| vis: $2, +// 365| doc: DocString::empty(), +// 366| attrs: $1, +// 367| loc : mk_loc($loc) +// 368| } +// 369| } fn yy_action_2(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _sub_action_0_result = yy_action_3(_last_pos, _args[0:0]) let _sub_action_1_result = yy_action_4(_last_pos, _args[0:0]) @@ -1031,17 +1059,17 @@ fn yy_action_2(_last_pos : Position, _args : ArrayView[(YYObj, Position, Positio } // file:///./parser.mbty -// 690| attributes is_async "test" option(loced_string) option(parameters) block_expr { -// 691| TopTest( -// 692| expr = $6, -// 693| name = $4, -// 694| params = $5, -// 695| is_async = $2, -// 696| loc = mk_loc($sloc), -// 697| attrs = $1, -// 698| doc = DocString::empty() -// 699| ) -// 700| } +// 701| attributes is_async "test" option(loced_string) option(parameters) block_expr { +// 702| TopTest( +// 703| expr = $6, +// 704| name = $4, +// 705| params = $5, +// 706| is_async = $2, +// 707| loc = mk_loc($sloc), +// 708| attrs = $1, +// 709| doc = DocString::empty() +// 710| ) +// 711| } fn yy_action_6(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _sub_action_0_result = yy_action_3(_last_pos, _args[0:0]) let _sub_action_1_result = yy_action_5(_last_pos, _args[0:1]) @@ -1066,24 +1094,24 @@ fn yy_action_6(_last_pos : Position, _args : ArrayView[(YYObj, Position, Positio } // file:///./parser.mbty -// 341| attributes visibility is_async fun_header_generic option(parameters) func_return_type { -// 342| let ((type_name, f), quants) = $4 -// 343| let (return_type, error_type) = $6 -// 344| FunDecl::{ -// 345| type_name, -// 346| name: f, -// 347| is_async : $3, -// 348| quantifiers: quants, -// 349| decl_params: $5, -// 350| params_loc: mk_loc($loc($5)), -// 351| return_type, -// 352| error_type, -// 353| vis: $2, -// 354| doc: DocString::empty(), -// 355| attrs: $1, -// 356| loc : mk_loc($loc) -// 357| } -// 358| } +// 352| attributes visibility is_async fun_header_generic option(parameters) func_return_type { +// 353| let ((type_name, f), quants) = $4 +// 354| let (return_type, error_type) = $6 +// 355| FunDecl::{ +// 356| type_name, +// 357| name: f, +// 358| is_async : $3, +// 359| quantifiers: quants, +// 360| decl_params: $5, +// 361| params_loc: mk_loc($loc($5)), +// 362| return_type, +// 363| error_type, +// 364| vis: $2, +// 365| doc: DocString::empty(), +// 366| attrs: $1, +// 367| loc : mk_loc($loc) +// 368| } +// 369| } fn yy_action_7(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _sub_action_0_result = yy_action_3(_last_pos, _args[0:0]) let _sub_action_1_result = yy_action_4(_last_pos, _args[0:0]) @@ -1119,24 +1147,24 @@ fn yy_action_7(_last_pos : Position, _args : ArrayView[(YYObj, Position, Positio } // file:///./parser.mbty -// 341| attributes visibility is_async fun_header_generic option(parameters) func_return_type { -// 342| let ((type_name, f), quants) = $4 -// 343| let (return_type, error_type) = $6 -// 344| FunDecl::{ -// 345| type_name, -// 346| name: f, -// 347| is_async : $3, -// 348| quantifiers: quants, -// 349| decl_params: $5, -// 350| params_loc: mk_loc($loc($5)), -// 351| return_type, -// 352| error_type, -// 353| vis: $2, -// 354| doc: DocString::empty(), -// 355| attrs: $1, -// 356| loc : mk_loc($loc) -// 357| } -// 358| } +// 352| attributes visibility is_async fun_header_generic option(parameters) func_return_type { +// 353| let ((type_name, f), quants) = $4 +// 354| let (return_type, error_type) = $6 +// 355| FunDecl::{ +// 356| type_name, +// 357| name: f, +// 358| is_async : $3, +// 359| quantifiers: quants, +// 360| decl_params: $5, +// 361| params_loc: mk_loc($loc($5)), +// 362| return_type, +// 363| error_type, +// 364| vis: $2, +// 365| doc: DocString::empty(), +// 366| attrs: $1, +// 367| loc : mk_loc($loc) +// 368| } +// 369| } fn yy_action_9(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _sub_action_0_result = yy_action_3(_last_pos, _args[0:0]) let _sub_action_1_result = yy_action_10(_last_pos, _args[0:1]) @@ -1172,24 +1200,24 @@ fn yy_action_9(_last_pos : Position, _args : ArrayView[(YYObj, Position, Positio } // file:///./parser.mbty -// 341| attributes visibility is_async fun_header_generic option(parameters) func_return_type { -// 342| let ((type_name, f), quants) = $4 -// 343| let (return_type, error_type) = $6 -// 344| FunDecl::{ -// 345| type_name, -// 346| name: f, -// 347| is_async : $3, -// 348| quantifiers: quants, -// 349| decl_params: $5, -// 350| params_loc: mk_loc($loc($5)), -// 351| return_type, -// 352| error_type, -// 353| vis: $2, -// 354| doc: DocString::empty(), -// 355| attrs: $1, -// 356| loc : mk_loc($loc) -// 357| } -// 358| } +// 352| attributes visibility is_async fun_header_generic option(parameters) func_return_type { +// 353| let ((type_name, f), quants) = $4 +// 354| let (return_type, error_type) = $6 +// 355| FunDecl::{ +// 356| type_name, +// 357| name: f, +// 358| is_async : $3, +// 359| quantifiers: quants, +// 360| decl_params: $5, +// 361| params_loc: mk_loc($loc($5)), +// 362| return_type, +// 363| error_type, +// 364| vis: $2, +// 365| doc: DocString::empty(), +// 366| attrs: $1, +// 367| loc : mk_loc($loc) +// 368| } +// 369| } fn yy_action_11(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _sub_action_0_result = yy_action_3(_last_pos, _args[0:0]) let _sub_action_1_result = yy_action_10(_last_pos, _args[0:1]) @@ -1225,25 +1253,25 @@ fn yy_action_11(_last_pos : Position, _args : ArrayView[(YYObj, Position, Positi } // file:///./parser.mbty -// 386| attributes visibility "extern" STRING "fn" optional_type_parameters fun_binder option(parameters) func_return_type { -// 387| let (type_name, f) = $7 -// 388| let (return_type, error_type) = $9 -// 389| let fn_decl = FunDecl::{ -// 390| type_name, -// 391| name: f, -// 392| is_async : None, -// 393| quantifiers: $6, -// 394| decl_params: $8, -// 395| params_loc: mk_loc($loc($8)), -// 396| return_type, -// 397| error_type, -// 398| vis: $2, -// 399| doc: DocString::empty(), -// 400| attrs: $1, -// 401| loc : mk_loc($loc) -// 402| } -// 403| ($4, fn_decl) -// 404| } +// 397| attributes visibility "extern" STRING "fn" optional_type_parameters fun_binder option(parameters) func_return_type { +// 398| let (type_name, f) = $7 +// 399| let (return_type, error_type) = $9 +// 400| let fn_decl = FunDecl::{ +// 401| type_name, +// 402| name: f, +// 403| is_async : None, +// 404| quantifiers: $6, +// 405| decl_params: $8, +// 406| params_loc: mk_loc($loc($8)), +// 407| return_type, +// 408| error_type, +// 409| vis: $2, +// 410| doc: DocString::empty(), +// 411| attrs: $1, +// 412| loc : mk_loc($loc) +// 413| } +// 414| ($4, fn_decl) +// 415| } fn yy_action_12(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _sub_action_0_result = yy_action_3(_last_pos, _args[0:0]) let _sub_action_1_result = yy_action_10(_last_pos, _args[0:1]) @@ -1280,7 +1308,7 @@ fn yy_action_12(_last_pos : Position, _args : ArrayView[(YYObj, Position, Positi } // file:///./parser.mbty -// 423| attributes is_declare visibility "let" binder opt_annot { ($1, false, $2, $3, $5, $6) } +// 434| attributes is_declare visibility "let" binder opt_annot { ($1, false, $2, $3, $5, $6) } fn yy_action_13(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _sub_action_0_result = yy_action_3(_last_pos, _args[0:0]) let _sub_action_1_result = yy_action_14(_last_pos, _args[0:0]) @@ -1296,7 +1324,7 @@ fn yy_action_13(_last_pos : Position, _args : ArrayView[(YYObj, Position, Positi } // file:///./parser.mbty -// 423| attributes is_declare visibility "let" binder opt_annot { ($1, false, $2, $3, $5, $6) } +// 434| attributes is_declare visibility "let" binder opt_annot { ($1, false, $2, $3, $5, $6) } fn yy_action_17(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _sub_action_0_result = yy_action_3(_last_pos, _args[0:0]) let _sub_action_1_result = yy_action_14(_last_pos, _args[0:0]) @@ -1312,8 +1340,40 @@ fn yy_action_17(_last_pos : Position, _args : ArrayView[(YYObj, Position, Positi } // file:///./parser.mbty -// 424| attributes is_declare visibility "const" UIDENT opt_annot { ($1, true, $2, $3, Binder::{ name : $5, loc : mk_loc($loc($5)) }, $6) } +// 434| attributes is_declare visibility "let" binder opt_annot { ($1, false, $2, $3, $5, $6) } fn yy_action_19(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_3(_last_pos, _args[0:0]) + let _sub_action_1_result = yy_action_14(_last_pos, _args[0:0]) + let _sub_action_2_result = yy_action_10(_last_pos, _args[0:1]) + let _sub_action_3_result = yy_action_20(_args[1].2, _args[2:3]) + let _sub_action_4_result = yy_action_16(_args[2].2, _args[3:5]) + guard _sub_action_0_result is YYObj_List_Attribute_(_dollar1) + guard _sub_action_1_result is YYObj_Bool(_dollar2) + guard _sub_action_2_result is YYObj_Visibility(_dollar3) + guard _sub_action_3_result is YYObj_Binder(_dollar5) + guard _sub_action_4_result is YYObj_Type_(_dollar6) + YYObj__List_Attribute___Bool__Bool__Visibility__Binder__Type__({(); (_dollar1, false, _dollar2, _dollar3, _dollar5, _dollar6) }) +} + +// file:///./parser.mbty +// 434| attributes is_declare visibility "let" binder opt_annot { ($1, false, $2, $3, $5, $6) } +fn yy_action_21(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_3(_last_pos, _args[0:0]) + let _sub_action_1_result = yy_action_14(_last_pos, _args[0:0]) + let _sub_action_2_result = yy_action_10(_last_pos, _args[0:1]) + let _sub_action_3_result = yy_action_20(_args[1].2, _args[2:3]) + let _sub_action_4_result = yy_action_18(_args[2].2, _args[3:3]) + guard _sub_action_0_result is YYObj_List_Attribute_(_dollar1) + guard _sub_action_1_result is YYObj_Bool(_dollar2) + guard _sub_action_2_result is YYObj_Visibility(_dollar3) + guard _sub_action_3_result is YYObj_Binder(_dollar5) + guard _sub_action_4_result is YYObj_Type_(_dollar6) + YYObj__List_Attribute___Bool__Bool__Visibility__Binder__Type__({(); (_dollar1, false, _dollar2, _dollar3, _dollar5, _dollar6) }) +} + +// file:///./parser.mbty +// 435| attributes is_declare visibility "const" UIDENT opt_annot { ($1, true, $2, $3, Binder::{ name : $5, loc : mk_loc($loc($5)) }, $6) } +fn yy_action_22(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _sub_action_0_result = yy_action_3(_last_pos, _args[0:0]) let _sub_action_1_result = yy_action_14(_last_pos, _args[0:0]) let _sub_action_2_result = yy_action_10(_last_pos, _args[0:1]) @@ -1329,8 +1389,8 @@ fn yy_action_19(_last_pos : Position, _args : ArrayView[(YYObj, Position, Positi } // file:///./parser.mbty -// 424| attributes is_declare visibility "const" UIDENT opt_annot { ($1, true, $2, $3, Binder::{ name : $5, loc : mk_loc($loc($5)) }, $6) } -fn yy_action_20(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 435| attributes is_declare visibility "const" UIDENT opt_annot { ($1, true, $2, $3, Binder::{ name : $5, loc : mk_loc($loc($5)) }, $6) } +fn yy_action_23(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _sub_action_0_result = yy_action_3(_last_pos, _args[0:0]) let _sub_action_1_result = yy_action_14(_last_pos, _args[0:0]) let _sub_action_2_result = yy_action_10(_last_pos, _args[0:1]) @@ -1346,24 +1406,24 @@ fn yy_action_20(_last_pos : Position, _args : ArrayView[(YYObj, Position, Positi } // file:///./parser.mbty -// 538| attributes is_declare visibility "extenum" UIDENT optional_type_parameters_no_constraints "{" list_semis(enum_constructor) "}" deriving_directive_list { -// 539| let tycon_loc = mk_loc($loc($5)) -// 540| TopTypeDef( -// 541| TypeDecl::{ -// 542| tycon : $5, -// 543| tycon_loc, -// 544| params : $6, -// 545| components : ExtensibleEnum($8), -// 546| type_vis : $3, -// 547| doc : DocString::empty(), -// 548| deriving : $10, -// 549| loc : mk_loc($sloc), -// 550| attrs : $1, -// 551| is_declare : $2 -// 552| } -// 553| ) -// 554| } -fn yy_action_21(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 549| attributes is_declare visibility "extenum" UIDENT optional_type_parameters_no_constraints "{" list_semis(enum_constructor) "}" deriving_directive_list { +// 550| let tycon_loc = mk_loc($loc($5)) +// 551| TopTypeDef( +// 552| TypeDecl::{ +// 553| tycon : $5, +// 554| tycon_loc, +// 555| params : $6, +// 556| components : ExtensibleEnum($8), +// 557| type_vis : $3, +// 558| doc : DocString::empty(), +// 559| deriving : $10, +// 560| loc : mk_loc($sloc), +// 561| attrs : $1, +// 562| is_declare : $2 +// 563| } +// 564| ) +// 565| } +fn yy_action_24(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _sub_action_0_result = yy_action_3(_last_pos, _args[0:0]) let _sub_action_1_result = yy_action_14(_last_pos, _args[0:0]) let _sub_action_2_result = yy_action_10(_last_pos, _args[0:1]) @@ -1398,24 +1458,24 @@ fn yy_action_21(_last_pos : Position, _args : ArrayView[(YYObj, Position, Positi } // file:///./parser.mbty -// 555| attributes is_declare visibility "extenum" extenum_extension_target "+=" "{" list_semis(enum_constructor) "}" deriving_directive_list { -// 556| let (tycon, tycon_loc, params, target) = $5 -// 557| TopTypeDef( -// 558| TypeDecl::{ -// 559| tycon, -// 560| tycon_loc, -// 561| params, -// 562| components : ExtendEnum(target~, constructors = $8), -// 563| type_vis : $3, -// 564| doc : DocString::empty(), -// 565| deriving : $10, -// 566| loc : mk_loc($sloc), -// 567| attrs : $1, -// 568| is_declare : $2 -// 569| } -// 570| ) -// 571| } -fn yy_action_22(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 566| attributes is_declare visibility "extenum" extenum_extension_target "+=" "{" list_semis(enum_constructor) "}" deriving_directive_list { +// 567| let (tycon, tycon_loc, params, target) = $5 +// 568| TopTypeDef( +// 569| TypeDecl::{ +// 570| tycon, +// 571| tycon_loc, +// 572| params, +// 573| components : ExtendEnum(target~, constructors = $8), +// 574| type_vis : $3, +// 575| doc : DocString::empty(), +// 576| deriving : $10, +// 577| loc : mk_loc($sloc), +// 578| attrs : $1, +// 579| is_declare : $2 +// 580| } +// 581| ) +// 582| } +fn yy_action_25(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _sub_action_0_result = yy_action_3(_last_pos, _args[0:0]) let _sub_action_1_result = yy_action_14(_last_pos, _args[0:0]) let _sub_action_2_result = yy_action_10(_last_pos, _args[0:1]) @@ -1447,26 +1507,26 @@ fn yy_action_22(_last_pos : Position, _args : ArrayView[(YYObj, Position, Positi } // file:///./parser.mbty -// 654| attributes is_declare visibility "trait" UIDENT option(preceded(COLON, separated_nonempty_list(PLUS, tvar_constraint))) "{" list_semis(trait_method_decl) "}" { -// 655| let name = Binder::{ name: $5, loc: mk_loc($loc($4)) } -// 656| let supers = match $6 { -// 657| None => @list.empty() -// 658| Some(supers) => supers -// 659| } -// 660| TopTrait( -// 661| TraitDecl::{ -// 662| name, -// 663| supers, -// 664| methods: $8, -// 665| vis: $3, -// 666| loc: mk_loc($sloc), -// 667| attrs: $1, -// 668| doc : DocString::empty(), -// 669| is_declare : $2 -// 670| } -// 671| ) -// 672| } -fn yy_action_23(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 665| attributes is_declare visibility "trait" UIDENT option(preceded(COLON, separated_nonempty_list(PLUS, tvar_constraint))) "{" list_semis(trait_method_decl) "}" { +// 666| let name = Binder::{ name: $5, loc: mk_loc($loc($4)) } +// 667| let supers = match $6 { +// 668| None => @list.empty() +// 669| Some(supers) => supers +// 670| } +// 671| TopTrait( +// 672| TraitDecl::{ +// 673| name, +// 674| supers, +// 675| methods: $8, +// 676| vis: $3, +// 677| loc: mk_loc($sloc), +// 678| attrs: $1, +// 679| doc : DocString::empty(), +// 680| is_declare : $2 +// 681| } +// 682| ) +// 683| } +fn yy_action_26(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _sub_action_0_result = yy_action_3(_last_pos, _args[0:0]) let _sub_action_1_result = yy_action_14(_last_pos, _args[0:0]) let _sub_action_2_result = yy_action_10(_last_pos, _args[0:1]) @@ -1502,24 +1562,25 @@ fn yy_action_23(_last_pos : Position, _args : ArrayView[(YYObj, Position, Positi } // file:///./parser.mbty -// 701| attributes visibility "impl" optional_type_parameters type_name "for" type_ "with" option("fn") binder parameters func_return_type impl_body { -// 702| let (ret_ty, err_ty) = $12 -// 703| TopImpl( -// 704| self_ty = Some($7), -// 705| trait_ = $5, -// 706| method_name = $10, -// 707| quantifiers = $4, -// 708| params = $11, -// 709| ret_ty~, -// 710| err_ty~, -// 711| body = $13, -// 712| vis = $2, -// 713| loc = mk_loc($sloc), -// 714| attrs = $1, -// 715| doc = DocString::empty() -// 716| ) -// 717| } -fn yy_action_24(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 712| attributes visibility "impl" optional_type_parameters type_name "for" type_ "with" impl_optional_fn binder parameters func_return_type impl_body { +// 713| let (ret_ty, err_ty) = $12 +// 714| TopImpl( +// 715| self_ty = Some($7), +// 716| trait_ = $5, +// 717| method_name = $10, +// 718| quantifiers = $4, +// 719| method_quantifiers = $9, +// 720| params = $11, +// 721| ret_ty~, +// 722| err_ty~, +// 723| body = $13, +// 724| vis = $2, +// 725| loc = mk_loc($sloc), +// 726| attrs = $1, +// 727| doc = DocString::empty() +// 728| ) +// 729| } +fn yy_action_27(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _sub_action_0_result = yy_action_3(_last_pos, _args[0:0]) let _sub_action_1_result = yy_action_10(_last_pos, _args[0:1]) let _sub_action_2_result = yy_action_15(_args[7].2, _args[8:9]) @@ -1528,6 +1589,7 @@ fn yy_action_24(_last_pos : Position, _args : ArrayView[(YYObj, Position, Positi guard _args[3].0 is YYObj_TypeName(_dollar5) guard _sub_action_2_result is YYObj_Binder(_dollar10) guard _args[2].0 is YYObj_List_TypeVarBinder_(_dollar4) + guard _args[7].0 is YYObj_List_TypeVarBinder_(_dollar9) guard _args[9].0 is YYObj_List_Parameter_(_dollar11) guard _args[11].0 is YYObj_DeclBody(_dollar13) guard _sub_action_1_result is YYObj_Visibility(_dollar2) @@ -1541,6 +1603,7 @@ fn yy_action_24(_last_pos : Position, _args : ArrayView[(YYObj, Position, Positi trait_ = _dollar5, method_name = _dollar10, quantifiers = _dollar4, + method_quantifiers = _dollar9, params = _dollar11, ret_ty~, err_ty~, @@ -1554,19 +1617,74 @@ fn yy_action_24(_last_pos : Position, _args : ArrayView[(YYObj, Position, Positi } // file:///./parser.mbty -// 735| attributes is_declare visibility "impl" optional_type_parameters type_name "for" type_ { -// 736| TopImplRelation( -// 737| self_ty = $8, -// 738| trait_ = $6, -// 739| quantifiers = $5, -// 740| vis = $3, -// 741| attrs = $1, -// 742| loc = mk_loc($sloc), -// 743| doc = DocString::empty(), -// 744| is_declare = $2 -// 745| ) -// 746| } -fn yy_action_25(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 712| attributes visibility "impl" optional_type_parameters type_name "for" type_ "with" impl_optional_fn binder parameters func_return_type impl_body { +// 713| let (ret_ty, err_ty) = $12 +// 714| TopImpl( +// 715| self_ty = Some($7), +// 716| trait_ = $5, +// 717| method_name = $10, +// 718| quantifiers = $4, +// 719| method_quantifiers = $9, +// 720| params = $11, +// 721| ret_ty~, +// 722| err_ty~, +// 723| body = $13, +// 724| vis = $2, +// 725| loc = mk_loc($sloc), +// 726| attrs = $1, +// 727| doc = DocString::empty() +// 728| ) +// 729| } +fn yy_action_28(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_3(_last_pos, _args[0:0]) + let _sub_action_1_result = yy_action_10(_last_pos, _args[0:1]) + let _sub_action_2_result = yy_action_20(_args[7].2, _args[8:9]) + guard _args[10].0 is YYObj__Type___ErrorType_(_dollar12) + guard _args[5].0 is YYObj_Type(_dollar7) + guard _args[3].0 is YYObj_TypeName(_dollar5) + guard _sub_action_2_result is YYObj_Binder(_dollar10) + guard _args[2].0 is YYObj_List_TypeVarBinder_(_dollar4) + guard _args[7].0 is YYObj_List_TypeVarBinder_(_dollar9) + guard _args[9].0 is YYObj_List_Parameter_(_dollar11) + guard _args[11].0 is YYObj_DeclBody(_dollar13) + guard _sub_action_1_result is YYObj_Visibility(_dollar2) + let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) + let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } + guard _sub_action_0_result is YYObj_List_Attribute_(_dollar1) + YYObj_Impl({(); + let (ret_ty, err_ty) = _dollar12 + TopImpl( + self_ty = Some(_dollar7), + trait_ = _dollar5, + method_name = _dollar10, + quantifiers = _dollar4, + method_quantifiers = _dollar9, + params = _dollar11, + ret_ty~, + err_ty~, + body = _dollar13, + vis = _dollar2, + loc = mk_loc((_symbol_start_pos, _end_pos)), + attrs = _dollar1, + doc = DocString::empty() + ) + }) +} + +// file:///./parser.mbty +// 748| attributes is_declare visibility "impl" optional_type_parameters type_name "for" type_ { +// 749| TopImplRelation( +// 750| self_ty = $8, +// 751| trait_ = $6, +// 752| quantifiers = $5, +// 753| vis = $3, +// 754| attrs = $1, +// 755| loc = mk_loc($sloc), +// 756| doc = DocString::empty(), +// 757| is_declare = $2 +// 758| ) +// 759| } +fn yy_action_29(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _sub_action_0_result = yy_action_3(_last_pos, _args[0:0]) let _sub_action_1_result = yy_action_14(_last_pos, _args[0:0]) let _sub_action_2_result = yy_action_10(_last_pos, _args[0:1]) @@ -1593,24 +1711,25 @@ fn yy_action_25(_last_pos : Position, _args : ArrayView[(YYObj, Position, Positi } // file:///./parser.mbty -// 718| attributes visibility "impl" optional_type_parameters type_name "with" option("fn") binder parameters func_return_type impl_body { -// 719| let (ret_ty, err_ty) = $10 -// 720| TopImpl( -// 721| self_ty = None, -// 722| trait_ = $5, -// 723| method_name = $8, -// 724| quantifiers = $4, -// 725| params = $9, -// 726| ret_ty~, -// 727| err_ty~, -// 728| body = $11, -// 729| vis = $2, -// 730| loc = mk_loc($sloc), -// 731| attrs = $1, -// 732| doc = DocString::empty() -// 733| ) -// 734| } -fn yy_action_26(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 730| attributes visibility "impl" optional_type_parameters type_name "with" impl_optional_fn binder parameters func_return_type impl_body { +// 731| let (ret_ty, err_ty) = $10 +// 732| TopImpl( +// 733| self_ty = None, +// 734| trait_ = $5, +// 735| method_name = $8, +// 736| quantifiers = $4, +// 737| method_quantifiers = $7, +// 738| params = $9, +// 739| ret_ty~, +// 740| err_ty~, +// 741| body = $11, +// 742| vis = $2, +// 743| loc = mk_loc($sloc), +// 744| attrs = $1, +// 745| doc = DocString::empty() +// 746| ) +// 747| } +fn yy_action_30(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _sub_action_0_result = yy_action_3(_last_pos, _args[0:0]) let _sub_action_1_result = yy_action_10(_last_pos, _args[0:1]) let _sub_action_2_result = yy_action_15(_args[5].2, _args[6:7]) @@ -1618,6 +1737,7 @@ fn yy_action_26(_last_pos : Position, _args : ArrayView[(YYObj, Position, Positi guard _args[3].0 is YYObj_TypeName(_dollar5) guard _sub_action_2_result is YYObj_Binder(_dollar8) guard _args[2].0 is YYObj_List_TypeVarBinder_(_dollar4) + guard _args[5].0 is YYObj_List_TypeVarBinder_(_dollar7) guard _args[7].0 is YYObj_List_Parameter_(_dollar9) guard _args[9].0 is YYObj_DeclBody(_dollar11) guard _sub_action_1_result is YYObj_Visibility(_dollar2) @@ -1631,6 +1751,7 @@ fn yy_action_26(_last_pos : Position, _args : ArrayView[(YYObj, Position, Positi trait_ = _dollar5, method_name = _dollar8, quantifiers = _dollar4, + method_quantifiers = _dollar7, params = _dollar9, ret_ty~, err_ty~, @@ -1644,24 +1765,78 @@ fn yy_action_26(_last_pos : Position, _args : ArrayView[(YYObj, Position, Positi } // file:///./parser.mbty -// 747| attributes visibility "enumview" optional_type_parameters UIDENT "{" list_semis(enum_constructor) "}" "for" type_ "with" binder parameters block_expr { -// 748| TopView( -// 749| quantifiers = $4, -// 750| source_ty = $10, -// 751| view_type_name = $5, -// 752| view_type_loc = mk_loc($loc($5)), -// 753| view_func_name = $12, -// 754| parameters = $13, -// 755| params_loc = mk_loc($loc($13)), -// 756| view_constrs = $7, -// 757| body = $14, -// 758| vis = $2, -// 759| loc = mk_loc($sloc), -// 760| attrs = $1, -// 761| doc = DocString::empty() -// 762| ) -// 763| } -fn yy_action_27(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 730| attributes visibility "impl" optional_type_parameters type_name "with" impl_optional_fn binder parameters func_return_type impl_body { +// 731| let (ret_ty, err_ty) = $10 +// 732| TopImpl( +// 733| self_ty = None, +// 734| trait_ = $5, +// 735| method_name = $8, +// 736| quantifiers = $4, +// 737| method_quantifiers = $7, +// 738| params = $9, +// 739| ret_ty~, +// 740| err_ty~, +// 741| body = $11, +// 742| vis = $2, +// 743| loc = mk_loc($sloc), +// 744| attrs = $1, +// 745| doc = DocString::empty() +// 746| ) +// 747| } +fn yy_action_31(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_3(_last_pos, _args[0:0]) + let _sub_action_1_result = yy_action_10(_last_pos, _args[0:1]) + let _sub_action_2_result = yy_action_20(_args[5].2, _args[6:7]) + guard _args[8].0 is YYObj__Type___ErrorType_(_dollar10) + guard _args[3].0 is YYObj_TypeName(_dollar5) + guard _sub_action_2_result is YYObj_Binder(_dollar8) + guard _args[2].0 is YYObj_List_TypeVarBinder_(_dollar4) + guard _args[5].0 is YYObj_List_TypeVarBinder_(_dollar7) + guard _args[7].0 is YYObj_List_Parameter_(_dollar9) + guard _args[9].0 is YYObj_DeclBody(_dollar11) + guard _sub_action_1_result is YYObj_Visibility(_dollar2) + let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) + let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } + guard _sub_action_0_result is YYObj_List_Attribute_(_dollar1) + YYObj_Impl({(); + let (ret_ty, err_ty) = _dollar10 + TopImpl( + self_ty = None, + trait_ = _dollar5, + method_name = _dollar8, + quantifiers = _dollar4, + method_quantifiers = _dollar7, + params = _dollar9, + ret_ty~, + err_ty~, + body = _dollar11, + vis = _dollar2, + loc = mk_loc((_symbol_start_pos, _end_pos)), + attrs = _dollar1, + doc = DocString::empty() + ) + }) +} + +// file:///./parser.mbty +// 760| attributes visibility "enumview" optional_type_parameters UIDENT "{" list_semis(enum_constructor) "}" "for" type_ "with" binder parameters block_expr { +// 761| TopView( +// 762| quantifiers = $4, +// 763| source_ty = $10, +// 764| view_type_name = $5, +// 765| view_type_loc = mk_loc($loc($5)), +// 766| view_func_name = $12, +// 767| parameters = $13, +// 768| params_loc = mk_loc($loc($13)), +// 769| view_constrs = $7, +// 770| body = $14, +// 771| vis = $2, +// 772| loc = mk_loc($sloc), +// 773| attrs = $1, +// 774| doc = DocString::empty() +// 775| ) +// 776| } +fn yy_action_32(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _sub_action_0_result = yy_action_3(_last_pos, _args[0:0]) let _sub_action_1_result = yy_action_10(_last_pos, _args[0:1]) let _sub_action_2_result = yy_action_15(_args[9].2, _args[10:11]) @@ -1700,20 +1875,76 @@ fn yy_action_27(_last_pos : Position, _args : ArrayView[(YYObj, Position, Positi } // file:///./parser.mbty -// 764| attributes visibility "using" PACKAGE_NAME "{" list_commas(using_binder) "}" { -// 765| TopUsing( -// 766| pkg = { -// 767| name : $4, -// 768| loc : mk_loc($loc($4)) -// 769| }, -// 770| names = $6, +// 760| attributes visibility "enumview" optional_type_parameters UIDENT "{" list_semis(enum_constructor) "}" "for" type_ "with" binder parameters block_expr { +// 761| TopView( +// 762| quantifiers = $4, +// 763| source_ty = $10, +// 764| view_type_name = $5, +// 765| view_type_loc = mk_loc($loc($5)), +// 766| view_func_name = $12, +// 767| parameters = $13, +// 768| params_loc = mk_loc($loc($13)), +// 769| view_constrs = $7, +// 770| body = $14, // 771| vis = $2, -// 772| attrs = $1, -// 773| loc = mk_loc($loc), +// 772| loc = mk_loc($sloc), +// 773| attrs = $1, // 774| doc = DocString::empty() // 775| ) // 776| } -fn yy_action_28(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +fn yy_action_33(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_3(_last_pos, _args[0:0]) + let _sub_action_1_result = yy_action_10(_last_pos, _args[0:1]) + let _sub_action_2_result = yy_action_20(_args[9].2, _args[10:11]) + guard _args[2].0 is YYObj_List_TypeVarBinder_(_dollar4) + guard _args[8].0 is YYObj_Type(_dollar10) + guard _args[3].0 is YYObj_String(_dollar5) + let _start_pos_of_item4 = _args[3].1 + let _end_pos_of_item4 = _args[3].2 + guard _sub_action_2_result is YYObj_Binder(_dollar12) + guard _args[11].0 is YYObj_List_Parameter_(_dollar13) + let _start_pos_of_item12 = _args[11].1 + let _end_pos_of_item12 = _args[11].2 + guard _args[5].0 is YYObj_List_ConstrDecl_(_dollar7) + guard _args[12].0 is YYObj_Expr(_dollar14) + guard _sub_action_1_result is YYObj_Visibility(_dollar2) + let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) + let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } + guard _sub_action_0_result is YYObj_List_Attribute_(_dollar1) + YYObj_Impl({(); + TopView( + quantifiers = _dollar4, + source_ty = _dollar10, + view_type_name = _dollar5, + view_type_loc = mk_loc((_start_pos_of_item4, _end_pos_of_item4)), + view_func_name = _dollar12, + parameters = _dollar13, + params_loc = mk_loc((_start_pos_of_item12, _end_pos_of_item12)), + view_constrs = _dollar7, + body = _dollar14, + vis = _dollar2, + loc = mk_loc((_symbol_start_pos, _end_pos)), + attrs = _dollar1, + doc = DocString::empty() + ) + }) +} + +// file:///./parser.mbty +// 777| attributes visibility "using" PACKAGE_NAME "{" list_commas(using_binder) "}" { +// 778| TopUsing( +// 779| pkg = { +// 780| name : $4, +// 781| loc : mk_loc($loc($4)) +// 782| }, +// 783| names = $6, +// 784| vis = $2, +// 785| attrs = $1, +// 786| loc = mk_loc($loc), +// 787| doc = DocString::empty() +// 788| ) +// 789| } +fn yy_action_34(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _sub_action_0_result = yy_action_3(_last_pos, _args[0:0]) let _sub_action_1_result = yy_action_10(_last_pos, _args[0:1]) guard _args[2].0 is YYObj_String(_dollar4) @@ -1740,10 +1971,10 @@ fn yy_action_28(_last_pos : Position, _args : ArrayView[(YYObj, Position, Positi } // file:///./parser.mbty -// 805| attributes is_declare visibility "type" UIDENT optional_type_parameters_no_constraints { -// 806| ($1, $3, $2, $5, mk_loc($loc($5)), $6) -// 807| } -fn yy_action_29(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 823| attributes is_declare visibility "type" UIDENT optional_type_parameters_no_constraints { +// 824| ($1, $3, $2, $5, mk_loc($loc($5)), $6) +// 825| } +fn yy_action_35(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _sub_action_0_result = yy_action_3(_last_pos, _args[0:0]) let _sub_action_1_result = yy_action_14(_last_pos, _args[0:0]) let _sub_action_2_result = yy_action_10(_last_pos, _args[0:1]) @@ -1760,8 +1991,8 @@ fn yy_action_29(_last_pos : Position, _args : ArrayView[(YYObj, Position, Positi } // file:///./parser.mbty -// 811| attributes is_declare visibility "suberror" UIDENT { ($1, $3, $2, $5, mk_loc($loc($5))) } -fn yy_action_30(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 829| attributes is_declare visibility "suberror" UIDENT { ($1, $3, $2, $5, mk_loc($loc($5))) } +fn yy_action_36(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _sub_action_0_result = yy_action_3(_last_pos, _args[0:0]) let _sub_action_1_result = yy_action_14(_last_pos, _args[0:0]) let _sub_action_2_result = yy_action_10(_last_pos, _args[0:1]) @@ -1775,10 +2006,10 @@ fn yy_action_30(_last_pos : Position, _args : ArrayView[(YYObj, Position, Positi } // file:///./parser.mbty -// 815| attributes visibility "struct" UIDENT optional_type_parameters_no_constraints { -// 816| ($1, $2, $4, mk_loc($loc($4)), $5) -// 817| } -fn yy_action_31(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 833| attributes visibility "struct" UIDENT optional_type_parameters_no_constraints { +// 834| ($1, $2, $4, mk_loc($loc($4)), $5) +// 835| } +fn yy_action_37(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _sub_action_0_result = yy_action_3(_last_pos, _args[0:0]) let _sub_action_1_result = yy_action_10(_last_pos, _args[0:1]) guard _sub_action_0_result is YYObj_List_Attribute_(_dollar1) @@ -1793,10 +2024,10 @@ fn yy_action_31(_last_pos : Position, _args : ArrayView[(YYObj, Position, Positi } // file:///./parser.mbty -// 821| attributes visibility "enum" UIDENT optional_type_parameters_no_constraints { -// 822| ($1, $2, $4, mk_loc($loc($4)), $5) -// 823| } -fn yy_action_32(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 839| attributes visibility "enum" UIDENT optional_type_parameters_no_constraints { +// 840| ($1, $2, $4, mk_loc($loc($4)), $5) +// 841| } +fn yy_action_38(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _sub_action_0_result = yy_action_3(_last_pos, _args[0:0]) let _sub_action_1_result = yy_action_10(_last_pos, _args[0:1]) guard _sub_action_0_result is YYObj_List_Attribute_(_dollar1) @@ -1811,27 +2042,27 @@ fn yy_action_32(_last_pos : Position, _args : ArrayView[(YYObj, Position, Positi } // file:///./parser.mbty -// 341| attributes visibility is_async fun_header_generic option(parameters) func_return_type { -// 342| let ((type_name, f), quants) = $4 -// 343| let (return_type, error_type) = $6 -// 344| FunDecl::{ -// 345| type_name, -// 346| name: f, -// 347| is_async : $3, -// 348| quantifiers: quants, -// 349| decl_params: $5, -// 350| params_loc: mk_loc($loc($5)), -// 351| return_type, -// 352| error_type, -// 353| vis: $2, -// 354| doc: DocString::empty(), -// 355| attrs: $1, -// 356| loc : mk_loc($loc) -// 357| } -// 358| } -fn yy_action_33(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 352| attributes visibility is_async fun_header_generic option(parameters) func_return_type { +// 353| let ((type_name, f), quants) = $4 +// 354| let (return_type, error_type) = $6 +// 355| FunDecl::{ +// 356| type_name, +// 357| name: f, +// 358| is_async : $3, +// 359| quantifiers: quants, +// 360| decl_params: $5, +// 361| params_loc: mk_loc($loc($5)), +// 362| return_type, +// 363| error_type, +// 364| vis: $2, +// 365| doc: DocString::empty(), +// 366| attrs: $1, +// 367| loc : mk_loc($loc) +// 368| } +// 369| } +fn yy_action_39(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _sub_action_0_result = yy_action_3(_last_pos, _args[0:0]) - let _sub_action_1_result = yy_action_34(_last_pos, _args[0:2]) + let _sub_action_1_result = yy_action_40(_last_pos, _args[0:2]) let _sub_action_2_result = yy_action_5(_args[1].2, _args[2:3]) guard _args[3].0 is YYObj___TypeName___Binder___List_TypeVarBinder__(_dollar4) guard _args[5].0 is YYObj__Type___ErrorType_(_dollar6) @@ -1864,27 +2095,27 @@ fn yy_action_33(_last_pos : Position, _args : ArrayView[(YYObj, Position, Positi } // file:///./parser.mbty -// 341| attributes visibility is_async fun_header_generic option(parameters) func_return_type { -// 342| let ((type_name, f), quants) = $4 -// 343| let (return_type, error_type) = $6 -// 344| FunDecl::{ -// 345| type_name, -// 346| name: f, -// 347| is_async : $3, -// 348| quantifiers: quants, -// 349| decl_params: $5, -// 350| params_loc: mk_loc($loc($5)), -// 351| return_type, -// 352| error_type, -// 353| vis: $2, -// 354| doc: DocString::empty(), -// 355| attrs: $1, -// 356| loc : mk_loc($loc) -// 357| } -// 358| } -fn yy_action_35(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 352| attributes visibility is_async fun_header_generic option(parameters) func_return_type { +// 353| let ((type_name, f), quants) = $4 +// 354| let (return_type, error_type) = $6 +// 355| FunDecl::{ +// 356| type_name, +// 357| name: f, +// 358| is_async : $3, +// 359| quantifiers: quants, +// 360| decl_params: $5, +// 361| params_loc: mk_loc($loc($5)), +// 362| return_type, +// 363| error_type, +// 364| vis: $2, +// 365| doc: DocString::empty(), +// 366| attrs: $1, +// 367| loc : mk_loc($loc) +// 368| } +// 369| } +fn yy_action_41(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _sub_action_0_result = yy_action_3(_last_pos, _args[0:0]) - let _sub_action_1_result = yy_action_34(_last_pos, _args[0:2]) + let _sub_action_1_result = yy_action_40(_last_pos, _args[0:2]) let _sub_action_2_result = yy_action_8(_args[1].2, _args[2:2]) guard _args[2].0 is YYObj___TypeName___Binder___List_TypeVarBinder__(_dollar4) guard _args[4].0 is YYObj__Type___ErrorType_(_dollar6) @@ -1917,28 +2148,28 @@ fn yy_action_35(_last_pos : Position, _args : ArrayView[(YYObj, Position, Positi } // file:///./parser.mbty -// 386| attributes visibility "extern" STRING "fn" optional_type_parameters fun_binder option(parameters) func_return_type { -// 387| let (type_name, f) = $7 -// 388| let (return_type, error_type) = $9 -// 389| let fn_decl = FunDecl::{ -// 390| type_name, -// 391| name: f, -// 392| is_async : None, -// 393| quantifiers: $6, -// 394| decl_params: $8, -// 395| params_loc: mk_loc($loc($8)), -// 396| return_type, -// 397| error_type, -// 398| vis: $2, -// 399| doc: DocString::empty(), -// 400| attrs: $1, -// 401| loc : mk_loc($loc) -// 402| } -// 403| ($4, fn_decl) -// 404| } -fn yy_action_36(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 397| attributes visibility "extern" STRING "fn" optional_type_parameters fun_binder option(parameters) func_return_type { +// 398| let (type_name, f) = $7 +// 399| let (return_type, error_type) = $9 +// 400| let fn_decl = FunDecl::{ +// 401| type_name, +// 402| name: f, +// 403| is_async : None, +// 404| quantifiers: $6, +// 405| decl_params: $8, +// 406| params_loc: mk_loc($loc($8)), +// 407| return_type, +// 408| error_type, +// 409| vis: $2, +// 410| doc: DocString::empty(), +// 411| attrs: $1, +// 412| loc : mk_loc($loc) +// 413| } +// 414| ($4, fn_decl) +// 415| } +fn yy_action_42(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _sub_action_0_result = yy_action_3(_last_pos, _args[0:0]) - let _sub_action_1_result = yy_action_34(_last_pos, _args[0:2]) + let _sub_action_1_result = yy_action_40(_last_pos, _args[0:2]) guard _args[6].0 is YYObj__TypeName___Binder_(_dollar7) guard _args[8].0 is YYObj__Type___ErrorType_(_dollar9) guard _args[5].0 is YYObj_List_TypeVarBinder_(_dollar6) @@ -1972,11 +2203,11 @@ fn yy_action_36(_last_pos : Position, _args : ArrayView[(YYObj, Position, Positi } // file:///./parser.mbty -// 423| attributes is_declare visibility "let" binder opt_annot { ($1, false, $2, $3, $5, $6) } -fn yy_action_37(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 434| attributes is_declare visibility "let" binder opt_annot { ($1, false, $2, $3, $5, $6) } +fn yy_action_43(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _sub_action_0_result = yy_action_3(_last_pos, _args[0:0]) let _sub_action_1_result = yy_action_14(_last_pos, _args[0:0]) - let _sub_action_2_result = yy_action_34(_last_pos, _args[0:2]) + let _sub_action_2_result = yy_action_40(_last_pos, _args[0:2]) let _sub_action_3_result = yy_action_15(_args[2].2, _args[3:4]) let _sub_action_4_result = yy_action_16(_args[3].2, _args[4:6]) guard _sub_action_0_result is YYObj_List_Attribute_(_dollar1) @@ -1988,11 +2219,11 @@ fn yy_action_37(_last_pos : Position, _args : ArrayView[(YYObj, Position, Positi } // file:///./parser.mbty -// 423| attributes is_declare visibility "let" binder opt_annot { ($1, false, $2, $3, $5, $6) } -fn yy_action_38(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 434| attributes is_declare visibility "let" binder opt_annot { ($1, false, $2, $3, $5, $6) } +fn yy_action_44(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _sub_action_0_result = yy_action_3(_last_pos, _args[0:0]) let _sub_action_1_result = yy_action_14(_last_pos, _args[0:0]) - let _sub_action_2_result = yy_action_34(_last_pos, _args[0:2]) + let _sub_action_2_result = yy_action_40(_last_pos, _args[0:2]) let _sub_action_3_result = yy_action_15(_args[2].2, _args[3:4]) let _sub_action_4_result = yy_action_18(_args[3].2, _args[4:4]) guard _sub_action_0_result is YYObj_List_Attribute_(_dollar1) @@ -2004,11 +2235,43 @@ fn yy_action_38(_last_pos : Position, _args : ArrayView[(YYObj, Position, Positi } // file:///./parser.mbty -// 424| attributes is_declare visibility "const" UIDENT opt_annot { ($1, true, $2, $3, Binder::{ name : $5, loc : mk_loc($loc($5)) }, $6) } -fn yy_action_39(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 434| attributes is_declare visibility "let" binder opt_annot { ($1, false, $2, $3, $5, $6) } +fn yy_action_45(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_3(_last_pos, _args[0:0]) + let _sub_action_1_result = yy_action_14(_last_pos, _args[0:0]) + let _sub_action_2_result = yy_action_40(_last_pos, _args[0:2]) + let _sub_action_3_result = yy_action_20(_args[2].2, _args[3:4]) + let _sub_action_4_result = yy_action_16(_args[3].2, _args[4:6]) + guard _sub_action_0_result is YYObj_List_Attribute_(_dollar1) + guard _sub_action_1_result is YYObj_Bool(_dollar2) + guard _sub_action_2_result is YYObj_Visibility(_dollar3) + guard _sub_action_3_result is YYObj_Binder(_dollar5) + guard _sub_action_4_result is YYObj_Type_(_dollar6) + YYObj__List_Attribute___Bool__Bool__Visibility__Binder__Type__({(); (_dollar1, false, _dollar2, _dollar3, _dollar5, _dollar6) }) +} + +// file:///./parser.mbty +// 434| attributes is_declare visibility "let" binder opt_annot { ($1, false, $2, $3, $5, $6) } +fn yy_action_46(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_3(_last_pos, _args[0:0]) + let _sub_action_1_result = yy_action_14(_last_pos, _args[0:0]) + let _sub_action_2_result = yy_action_40(_last_pos, _args[0:2]) + let _sub_action_3_result = yy_action_20(_args[2].2, _args[3:4]) + let _sub_action_4_result = yy_action_18(_args[3].2, _args[4:4]) + guard _sub_action_0_result is YYObj_List_Attribute_(_dollar1) + guard _sub_action_1_result is YYObj_Bool(_dollar2) + guard _sub_action_2_result is YYObj_Visibility(_dollar3) + guard _sub_action_3_result is YYObj_Binder(_dollar5) + guard _sub_action_4_result is YYObj_Type_(_dollar6) + YYObj__List_Attribute___Bool__Bool__Visibility__Binder__Type__({(); (_dollar1, false, _dollar2, _dollar3, _dollar5, _dollar6) }) +} + +// file:///./parser.mbty +// 435| attributes is_declare visibility "const" UIDENT opt_annot { ($1, true, $2, $3, Binder::{ name : $5, loc : mk_loc($loc($5)) }, $6) } +fn yy_action_47(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _sub_action_0_result = yy_action_3(_last_pos, _args[0:0]) let _sub_action_1_result = yy_action_14(_last_pos, _args[0:0]) - let _sub_action_2_result = yy_action_34(_last_pos, _args[0:2]) + let _sub_action_2_result = yy_action_40(_last_pos, _args[0:2]) let _sub_action_3_result = yy_action_16(_args[3].2, _args[4:6]) guard _sub_action_0_result is YYObj_List_Attribute_(_dollar1) guard _sub_action_1_result is YYObj_Bool(_dollar2) @@ -2021,11 +2284,11 @@ fn yy_action_39(_last_pos : Position, _args : ArrayView[(YYObj, Position, Positi } // file:///./parser.mbty -// 424| attributes is_declare visibility "const" UIDENT opt_annot { ($1, true, $2, $3, Binder::{ name : $5, loc : mk_loc($loc($5)) }, $6) } -fn yy_action_40(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 435| attributes is_declare visibility "const" UIDENT opt_annot { ($1, true, $2, $3, Binder::{ name : $5, loc : mk_loc($loc($5)) }, $6) } +fn yy_action_48(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _sub_action_0_result = yy_action_3(_last_pos, _args[0:0]) let _sub_action_1_result = yy_action_14(_last_pos, _args[0:0]) - let _sub_action_2_result = yy_action_34(_last_pos, _args[0:2]) + let _sub_action_2_result = yy_action_40(_last_pos, _args[0:2]) let _sub_action_3_result = yy_action_18(_args[3].2, _args[4:4]) guard _sub_action_0_result is YYObj_List_Attribute_(_dollar1) guard _sub_action_1_result is YYObj_Bool(_dollar2) @@ -2038,27 +2301,27 @@ fn yy_action_40(_last_pos : Position, _args : ArrayView[(YYObj, Position, Positi } // file:///./parser.mbty -// 538| attributes is_declare visibility "extenum" UIDENT optional_type_parameters_no_constraints "{" list_semis(enum_constructor) "}" deriving_directive_list { -// 539| let tycon_loc = mk_loc($loc($5)) -// 540| TopTypeDef( -// 541| TypeDecl::{ -// 542| tycon : $5, -// 543| tycon_loc, -// 544| params : $6, -// 545| components : ExtensibleEnum($8), -// 546| type_vis : $3, -// 547| doc : DocString::empty(), -// 548| deriving : $10, -// 549| loc : mk_loc($sloc), -// 550| attrs : $1, -// 551| is_declare : $2 -// 552| } -// 553| ) -// 554| } -fn yy_action_41(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 549| attributes is_declare visibility "extenum" UIDENT optional_type_parameters_no_constraints "{" list_semis(enum_constructor) "}" deriving_directive_list { +// 550| let tycon_loc = mk_loc($loc($5)) +// 551| TopTypeDef( +// 552| TypeDecl::{ +// 553| tycon : $5, +// 554| tycon_loc, +// 555| params : $6, +// 556| components : ExtensibleEnum($8), +// 557| type_vis : $3, +// 558| doc : DocString::empty(), +// 559| deriving : $10, +// 560| loc : mk_loc($sloc), +// 561| attrs : $1, +// 562| is_declare : $2 +// 563| } +// 564| ) +// 565| } +fn yy_action_49(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _sub_action_0_result = yy_action_3(_last_pos, _args[0:0]) let _sub_action_1_result = yy_action_14(_last_pos, _args[0:0]) - let _sub_action_2_result = yy_action_34(_last_pos, _args[0:2]) + let _sub_action_2_result = yy_action_40(_last_pos, _args[0:2]) let _start_pos_of_item4 = _args[3].1 let _end_pos_of_item4 = _args[3].2 guard _args[3].0 is YYObj_String(_dollar5) @@ -2090,27 +2353,27 @@ fn yy_action_41(_last_pos : Position, _args : ArrayView[(YYObj, Position, Positi } // file:///./parser.mbty -// 555| attributes is_declare visibility "extenum" extenum_extension_target "+=" "{" list_semis(enum_constructor) "}" deriving_directive_list { -// 556| let (tycon, tycon_loc, params, target) = $5 -// 557| TopTypeDef( -// 558| TypeDecl::{ -// 559| tycon, -// 560| tycon_loc, -// 561| params, -// 562| components : ExtendEnum(target~, constructors = $8), -// 563| type_vis : $3, -// 564| doc : DocString::empty(), -// 565| deriving : $10, -// 566| loc : mk_loc($sloc), -// 567| attrs : $1, -// 568| is_declare : $2 -// 569| } -// 570| ) -// 571| } -fn yy_action_42(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 566| attributes is_declare visibility "extenum" extenum_extension_target "+=" "{" list_semis(enum_constructor) "}" deriving_directive_list { +// 567| let (tycon, tycon_loc, params, target) = $5 +// 568| TopTypeDef( +// 569| TypeDecl::{ +// 570| tycon, +// 571| tycon_loc, +// 572| params, +// 573| components : ExtendEnum(target~, constructors = $8), +// 574| type_vis : $3, +// 575| doc : DocString::empty(), +// 576| deriving : $10, +// 577| loc : mk_loc($sloc), +// 578| attrs : $1, +// 579| is_declare : $2 +// 580| } +// 581| ) +// 582| } +fn yy_action_50(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _sub_action_0_result = yy_action_3(_last_pos, _args[0:0]) let _sub_action_1_result = yy_action_14(_last_pos, _args[0:0]) - let _sub_action_2_result = yy_action_34(_last_pos, _args[0:2]) + let _sub_action_2_result = yy_action_40(_last_pos, _args[0:2]) guard _args[3].0 is YYObj__String__Location__List_TypeDeclBinder___TypeName_(_dollar5) guard _args[6].0 is YYObj_List_ConstrDecl_(_dollar8) guard _sub_action_2_result is YYObj_Visibility(_dollar3) @@ -2139,29 +2402,29 @@ fn yy_action_42(_last_pos : Position, _args : ArrayView[(YYObj, Position, Positi } // file:///./parser.mbty -// 654| attributes is_declare visibility "trait" UIDENT option(preceded(COLON, separated_nonempty_list(PLUS, tvar_constraint))) "{" list_semis(trait_method_decl) "}" { -// 655| let name = Binder::{ name: $5, loc: mk_loc($loc($4)) } -// 656| let supers = match $6 { -// 657| None => @list.empty() -// 658| Some(supers) => supers -// 659| } -// 660| TopTrait( -// 661| TraitDecl::{ -// 662| name, -// 663| supers, -// 664| methods: $8, -// 665| vis: $3, -// 666| loc: mk_loc($sloc), -// 667| attrs: $1, -// 668| doc : DocString::empty(), -// 669| is_declare : $2 -// 670| } -// 671| ) -// 672| } -fn yy_action_43(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 665| attributes is_declare visibility "trait" UIDENT option(preceded(COLON, separated_nonempty_list(PLUS, tvar_constraint))) "{" list_semis(trait_method_decl) "}" { +// 666| let name = Binder::{ name: $5, loc: mk_loc($loc($4)) } +// 667| let supers = match $6 { +// 668| None => @list.empty() +// 669| Some(supers) => supers +// 670| } +// 671| TopTrait( +// 672| TraitDecl::{ +// 673| name, +// 674| supers, +// 675| methods: $8, +// 676| vis: $3, +// 677| loc: mk_loc($sloc), +// 678| attrs: $1, +// 679| doc : DocString::empty(), +// 680| is_declare : $2 +// 681| } +// 682| ) +// 683| } +fn yy_action_51(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _sub_action_0_result = yy_action_3(_last_pos, _args[0:0]) let _sub_action_1_result = yy_action_14(_last_pos, _args[0:0]) - let _sub_action_2_result = yy_action_34(_last_pos, _args[0:2]) + let _sub_action_2_result = yy_action_40(_last_pos, _args[0:2]) guard _args[3].0 is YYObj_String(_dollar5) let _start_pos_of_item3 = _args[2].1 let _end_pos_of_item3 = _args[2].2 @@ -2194,32 +2457,34 @@ fn yy_action_43(_last_pos : Position, _args : ArrayView[(YYObj, Position, Positi } // file:///./parser.mbty -// 701| attributes visibility "impl" optional_type_parameters type_name "for" type_ "with" option("fn") binder parameters func_return_type impl_body { -// 702| let (ret_ty, err_ty) = $12 -// 703| TopImpl( -// 704| self_ty = Some($7), -// 705| trait_ = $5, -// 706| method_name = $10, -// 707| quantifiers = $4, -// 708| params = $11, -// 709| ret_ty~, -// 710| err_ty~, -// 711| body = $13, -// 712| vis = $2, -// 713| loc = mk_loc($sloc), -// 714| attrs = $1, -// 715| doc = DocString::empty() -// 716| ) -// 717| } -fn yy_action_44(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 712| attributes visibility "impl" optional_type_parameters type_name "for" type_ "with" impl_optional_fn binder parameters func_return_type impl_body { +// 713| let (ret_ty, err_ty) = $12 +// 714| TopImpl( +// 715| self_ty = Some($7), +// 716| trait_ = $5, +// 717| method_name = $10, +// 718| quantifiers = $4, +// 719| method_quantifiers = $9, +// 720| params = $11, +// 721| ret_ty~, +// 722| err_ty~, +// 723| body = $13, +// 724| vis = $2, +// 725| loc = mk_loc($sloc), +// 726| attrs = $1, +// 727| doc = DocString::empty() +// 728| ) +// 729| } +fn yy_action_52(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _sub_action_0_result = yy_action_3(_last_pos, _args[0:0]) - let _sub_action_1_result = yy_action_34(_last_pos, _args[0:2]) + let _sub_action_1_result = yy_action_40(_last_pos, _args[0:2]) let _sub_action_2_result = yy_action_15(_args[8].2, _args[9:10]) guard _args[11].0 is YYObj__Type___ErrorType_(_dollar12) guard _args[6].0 is YYObj_Type(_dollar7) guard _args[4].0 is YYObj_TypeName(_dollar5) guard _sub_action_2_result is YYObj_Binder(_dollar10) guard _args[3].0 is YYObj_List_TypeVarBinder_(_dollar4) + guard _args[8].0 is YYObj_List_TypeVarBinder_(_dollar9) guard _args[10].0 is YYObj_List_Parameter_(_dollar11) guard _args[12].0 is YYObj_DeclBody(_dollar13) guard _sub_action_1_result is YYObj_Visibility(_dollar2) @@ -2233,6 +2498,7 @@ fn yy_action_44(_last_pos : Position, _args : ArrayView[(YYObj, Position, Positi trait_ = _dollar5, method_name = _dollar10, quantifiers = _dollar4, + method_quantifiers = _dollar9, params = _dollar11, ret_ty~, err_ty~, @@ -2246,22 +2512,77 @@ fn yy_action_44(_last_pos : Position, _args : ArrayView[(YYObj, Position, Positi } // file:///./parser.mbty -// 735| attributes is_declare visibility "impl" optional_type_parameters type_name "for" type_ { -// 736| TopImplRelation( -// 737| self_ty = $8, -// 738| trait_ = $6, -// 739| quantifiers = $5, -// 740| vis = $3, -// 741| attrs = $1, -// 742| loc = mk_loc($sloc), -// 743| doc = DocString::empty(), -// 744| is_declare = $2 -// 745| ) -// 746| } -fn yy_action_45(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 712| attributes visibility "impl" optional_type_parameters type_name "for" type_ "with" impl_optional_fn binder parameters func_return_type impl_body { +// 713| let (ret_ty, err_ty) = $12 +// 714| TopImpl( +// 715| self_ty = Some($7), +// 716| trait_ = $5, +// 717| method_name = $10, +// 718| quantifiers = $4, +// 719| method_quantifiers = $9, +// 720| params = $11, +// 721| ret_ty~, +// 722| err_ty~, +// 723| body = $13, +// 724| vis = $2, +// 725| loc = mk_loc($sloc), +// 726| attrs = $1, +// 727| doc = DocString::empty() +// 728| ) +// 729| } +fn yy_action_53(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_3(_last_pos, _args[0:0]) + let _sub_action_1_result = yy_action_40(_last_pos, _args[0:2]) + let _sub_action_2_result = yy_action_20(_args[8].2, _args[9:10]) + guard _args[11].0 is YYObj__Type___ErrorType_(_dollar12) + guard _args[6].0 is YYObj_Type(_dollar7) + guard _args[4].0 is YYObj_TypeName(_dollar5) + guard _sub_action_2_result is YYObj_Binder(_dollar10) + guard _args[3].0 is YYObj_List_TypeVarBinder_(_dollar4) + guard _args[8].0 is YYObj_List_TypeVarBinder_(_dollar9) + guard _args[10].0 is YYObj_List_Parameter_(_dollar11) + guard _args[12].0 is YYObj_DeclBody(_dollar13) + guard _sub_action_1_result is YYObj_Visibility(_dollar2) + let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) + let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } + guard _sub_action_0_result is YYObj_List_Attribute_(_dollar1) + YYObj_Impl({(); + let (ret_ty, err_ty) = _dollar12 + TopImpl( + self_ty = Some(_dollar7), + trait_ = _dollar5, + method_name = _dollar10, + quantifiers = _dollar4, + method_quantifiers = _dollar9, + params = _dollar11, + ret_ty~, + err_ty~, + body = _dollar13, + vis = _dollar2, + loc = mk_loc((_symbol_start_pos, _end_pos)), + attrs = _dollar1, + doc = DocString::empty() + ) + }) +} + +// file:///./parser.mbty +// 748| attributes is_declare visibility "impl" optional_type_parameters type_name "for" type_ { +// 749| TopImplRelation( +// 750| self_ty = $8, +// 751| trait_ = $6, +// 752| quantifiers = $5, +// 753| vis = $3, +// 754| attrs = $1, +// 755| loc = mk_loc($sloc), +// 756| doc = DocString::empty(), +// 757| is_declare = $2 +// 758| ) +// 759| } +fn yy_action_54(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _sub_action_0_result = yy_action_3(_last_pos, _args[0:0]) let _sub_action_1_result = yy_action_14(_last_pos, _args[0:0]) - let _sub_action_2_result = yy_action_34(_last_pos, _args[0:2]) + let _sub_action_2_result = yy_action_40(_last_pos, _args[0:2]) guard _args[6].0 is YYObj_Type(_dollar8) guard _args[4].0 is YYObj_TypeName(_dollar6) guard _args[3].0 is YYObj_List_TypeVarBinder_(_dollar5) @@ -2285,31 +2606,33 @@ fn yy_action_45(_last_pos : Position, _args : ArrayView[(YYObj, Position, Positi } // file:///./parser.mbty -// 718| attributes visibility "impl" optional_type_parameters type_name "with" option("fn") binder parameters func_return_type impl_body { -// 719| let (ret_ty, err_ty) = $10 -// 720| TopImpl( -// 721| self_ty = None, -// 722| trait_ = $5, -// 723| method_name = $8, -// 724| quantifiers = $4, -// 725| params = $9, -// 726| ret_ty~, -// 727| err_ty~, -// 728| body = $11, -// 729| vis = $2, -// 730| loc = mk_loc($sloc), -// 731| attrs = $1, -// 732| doc = DocString::empty() -// 733| ) -// 734| } -fn yy_action_46(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 730| attributes visibility "impl" optional_type_parameters type_name "with" impl_optional_fn binder parameters func_return_type impl_body { +// 731| let (ret_ty, err_ty) = $10 +// 732| TopImpl( +// 733| self_ty = None, +// 734| trait_ = $5, +// 735| method_name = $8, +// 736| quantifiers = $4, +// 737| method_quantifiers = $7, +// 738| params = $9, +// 739| ret_ty~, +// 740| err_ty~, +// 741| body = $11, +// 742| vis = $2, +// 743| loc = mk_loc($sloc), +// 744| attrs = $1, +// 745| doc = DocString::empty() +// 746| ) +// 747| } +fn yy_action_55(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _sub_action_0_result = yy_action_3(_last_pos, _args[0:0]) - let _sub_action_1_result = yy_action_34(_last_pos, _args[0:2]) + let _sub_action_1_result = yy_action_40(_last_pos, _args[0:2]) let _sub_action_2_result = yy_action_15(_args[6].2, _args[7:8]) guard _args[9].0 is YYObj__Type___ErrorType_(_dollar10) guard _args[4].0 is YYObj_TypeName(_dollar5) guard _sub_action_2_result is YYObj_Binder(_dollar8) guard _args[3].0 is YYObj_List_TypeVarBinder_(_dollar4) + guard _args[6].0 is YYObj_List_TypeVarBinder_(_dollar7) guard _args[8].0 is YYObj_List_Parameter_(_dollar9) guard _args[10].0 is YYObj_DeclBody(_dollar11) guard _sub_action_1_result is YYObj_Visibility(_dollar2) @@ -2323,6 +2646,7 @@ fn yy_action_46(_last_pos : Position, _args : ArrayView[(YYObj, Position, Positi trait_ = _dollar5, method_name = _dollar8, quantifiers = _dollar4, + method_quantifiers = _dollar7, params = _dollar9, ret_ty~, err_ty~, @@ -2336,26 +2660,80 @@ fn yy_action_46(_last_pos : Position, _args : ArrayView[(YYObj, Position, Positi } // file:///./parser.mbty -// 747| attributes visibility "enumview" optional_type_parameters UIDENT "{" list_semis(enum_constructor) "}" "for" type_ "with" binder parameters block_expr { -// 748| TopView( -// 749| quantifiers = $4, -// 750| source_ty = $10, -// 751| view_type_name = $5, -// 752| view_type_loc = mk_loc($loc($5)), -// 753| view_func_name = $12, -// 754| parameters = $13, -// 755| params_loc = mk_loc($loc($13)), -// 756| view_constrs = $7, -// 757| body = $14, -// 758| vis = $2, -// 759| loc = mk_loc($sloc), -// 760| attrs = $1, -// 761| doc = DocString::empty() -// 762| ) -// 763| } -fn yy_action_47(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 730| attributes visibility "impl" optional_type_parameters type_name "with" impl_optional_fn binder parameters func_return_type impl_body { +// 731| let (ret_ty, err_ty) = $10 +// 732| TopImpl( +// 733| self_ty = None, +// 734| trait_ = $5, +// 735| method_name = $8, +// 736| quantifiers = $4, +// 737| method_quantifiers = $7, +// 738| params = $9, +// 739| ret_ty~, +// 740| err_ty~, +// 741| body = $11, +// 742| vis = $2, +// 743| loc = mk_loc($sloc), +// 744| attrs = $1, +// 745| doc = DocString::empty() +// 746| ) +// 747| } +fn yy_action_56(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_3(_last_pos, _args[0:0]) + let _sub_action_1_result = yy_action_40(_last_pos, _args[0:2]) + let _sub_action_2_result = yy_action_20(_args[6].2, _args[7:8]) + guard _args[9].0 is YYObj__Type___ErrorType_(_dollar10) + guard _args[4].0 is YYObj_TypeName(_dollar5) + guard _sub_action_2_result is YYObj_Binder(_dollar8) + guard _args[3].0 is YYObj_List_TypeVarBinder_(_dollar4) + guard _args[6].0 is YYObj_List_TypeVarBinder_(_dollar7) + guard _args[8].0 is YYObj_List_Parameter_(_dollar9) + guard _args[10].0 is YYObj_DeclBody(_dollar11) + guard _sub_action_1_result is YYObj_Visibility(_dollar2) + let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) + let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } + guard _sub_action_0_result is YYObj_List_Attribute_(_dollar1) + YYObj_Impl({(); + let (ret_ty, err_ty) = _dollar10 + TopImpl( + self_ty = None, + trait_ = _dollar5, + method_name = _dollar8, + quantifiers = _dollar4, + method_quantifiers = _dollar7, + params = _dollar9, + ret_ty~, + err_ty~, + body = _dollar11, + vis = _dollar2, + loc = mk_loc((_symbol_start_pos, _end_pos)), + attrs = _dollar1, + doc = DocString::empty() + ) + }) +} + +// file:///./parser.mbty +// 760| attributes visibility "enumview" optional_type_parameters UIDENT "{" list_semis(enum_constructor) "}" "for" type_ "with" binder parameters block_expr { +// 761| TopView( +// 762| quantifiers = $4, +// 763| source_ty = $10, +// 764| view_type_name = $5, +// 765| view_type_loc = mk_loc($loc($5)), +// 766| view_func_name = $12, +// 767| parameters = $13, +// 768| params_loc = mk_loc($loc($13)), +// 769| view_constrs = $7, +// 770| body = $14, +// 771| vis = $2, +// 772| loc = mk_loc($sloc), +// 773| attrs = $1, +// 774| doc = DocString::empty() +// 775| ) +// 776| } +fn yy_action_57(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _sub_action_0_result = yy_action_3(_last_pos, _args[0:0]) - let _sub_action_1_result = yy_action_34(_last_pos, _args[0:2]) + let _sub_action_1_result = yy_action_40(_last_pos, _args[0:2]) let _sub_action_2_result = yy_action_15(_args[10].2, _args[11:12]) guard _args[3].0 is YYObj_List_TypeVarBinder_(_dollar4) guard _args[9].0 is YYObj_Type(_dollar10) @@ -2392,22 +2770,78 @@ fn yy_action_47(_last_pos : Position, _args : ArrayView[(YYObj, Position, Positi } // file:///./parser.mbty -// 764| attributes visibility "using" PACKAGE_NAME "{" list_commas(using_binder) "}" { -// 765| TopUsing( -// 766| pkg = { -// 767| name : $4, -// 768| loc : mk_loc($loc($4)) -// 769| }, -// 770| names = $6, +// 760| attributes visibility "enumview" optional_type_parameters UIDENT "{" list_semis(enum_constructor) "}" "for" type_ "with" binder parameters block_expr { +// 761| TopView( +// 762| quantifiers = $4, +// 763| source_ty = $10, +// 764| view_type_name = $5, +// 765| view_type_loc = mk_loc($loc($5)), +// 766| view_func_name = $12, +// 767| parameters = $13, +// 768| params_loc = mk_loc($loc($13)), +// 769| view_constrs = $7, +// 770| body = $14, // 771| vis = $2, -// 772| attrs = $1, -// 773| loc = mk_loc($loc), +// 772| loc = mk_loc($sloc), +// 773| attrs = $1, // 774| doc = DocString::empty() // 775| ) // 776| } -fn yy_action_48(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +fn yy_action_58(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_3(_last_pos, _args[0:0]) + let _sub_action_1_result = yy_action_40(_last_pos, _args[0:2]) + let _sub_action_2_result = yy_action_20(_args[10].2, _args[11:12]) + guard _args[3].0 is YYObj_List_TypeVarBinder_(_dollar4) + guard _args[9].0 is YYObj_Type(_dollar10) + guard _args[4].0 is YYObj_String(_dollar5) + let _start_pos_of_item4 = _args[4].1 + let _end_pos_of_item4 = _args[4].2 + guard _sub_action_2_result is YYObj_Binder(_dollar12) + guard _args[12].0 is YYObj_List_Parameter_(_dollar13) + let _start_pos_of_item12 = _args[12].1 + let _end_pos_of_item12 = _args[12].2 + guard _args[6].0 is YYObj_List_ConstrDecl_(_dollar7) + guard _args[13].0 is YYObj_Expr(_dollar14) + guard _sub_action_1_result is YYObj_Visibility(_dollar2) + let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) + let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } + guard _sub_action_0_result is YYObj_List_Attribute_(_dollar1) + YYObj_Impl({(); + TopView( + quantifiers = _dollar4, + source_ty = _dollar10, + view_type_name = _dollar5, + view_type_loc = mk_loc((_start_pos_of_item4, _end_pos_of_item4)), + view_func_name = _dollar12, + parameters = _dollar13, + params_loc = mk_loc((_start_pos_of_item12, _end_pos_of_item12)), + view_constrs = _dollar7, + body = _dollar14, + vis = _dollar2, + loc = mk_loc((_symbol_start_pos, _end_pos)), + attrs = _dollar1, + doc = DocString::empty() + ) + }) +} + +// file:///./parser.mbty +// 777| attributes visibility "using" PACKAGE_NAME "{" list_commas(using_binder) "}" { +// 778| TopUsing( +// 779| pkg = { +// 780| name : $4, +// 781| loc : mk_loc($loc($4)) +// 782| }, +// 783| names = $6, +// 784| vis = $2, +// 785| attrs = $1, +// 786| loc = mk_loc($loc), +// 787| doc = DocString::empty() +// 788| ) +// 789| } +fn yy_action_59(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _sub_action_0_result = yy_action_3(_last_pos, _args[0:0]) - let _sub_action_1_result = yy_action_34(_last_pos, _args[0:2]) + let _sub_action_1_result = yy_action_40(_last_pos, _args[0:2]) guard _args[3].0 is YYObj_String(_dollar4) let _start_pos_of_item3 = _args[3].1 let _end_pos_of_item3 = _args[3].2 @@ -2432,13 +2866,13 @@ fn yy_action_48(_last_pos : Position, _args : ArrayView[(YYObj, Position, Positi } // file:///./parser.mbty -// 805| attributes is_declare visibility "type" UIDENT optional_type_parameters_no_constraints { -// 806| ($1, $3, $2, $5, mk_loc($loc($5)), $6) -// 807| } -fn yy_action_49(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 823| attributes is_declare visibility "type" UIDENT optional_type_parameters_no_constraints { +// 824| ($1, $3, $2, $5, mk_loc($loc($5)), $6) +// 825| } +fn yy_action_60(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _sub_action_0_result = yy_action_3(_last_pos, _args[0:0]) let _sub_action_1_result = yy_action_14(_last_pos, _args[0:0]) - let _sub_action_2_result = yy_action_34(_last_pos, _args[0:2]) + let _sub_action_2_result = yy_action_40(_last_pos, _args[0:2]) guard _sub_action_0_result is YYObj_List_Attribute_(_dollar1) guard _sub_action_2_result is YYObj_Visibility(_dollar3) guard _sub_action_1_result is YYObj_Bool(_dollar2) @@ -2452,11 +2886,11 @@ fn yy_action_49(_last_pos : Position, _args : ArrayView[(YYObj, Position, Positi } // file:///./parser.mbty -// 811| attributes is_declare visibility "suberror" UIDENT { ($1, $3, $2, $5, mk_loc($loc($5))) } -fn yy_action_50(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 829| attributes is_declare visibility "suberror" UIDENT { ($1, $3, $2, $5, mk_loc($loc($5))) } +fn yy_action_61(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _sub_action_0_result = yy_action_3(_last_pos, _args[0:0]) let _sub_action_1_result = yy_action_14(_last_pos, _args[0:0]) - let _sub_action_2_result = yy_action_34(_last_pos, _args[0:2]) + let _sub_action_2_result = yy_action_40(_last_pos, _args[0:2]) guard _sub_action_0_result is YYObj_List_Attribute_(_dollar1) guard _sub_action_2_result is YYObj_Visibility(_dollar3) guard _sub_action_1_result is YYObj_Bool(_dollar2) @@ -2467,12 +2901,12 @@ fn yy_action_50(_last_pos : Position, _args : ArrayView[(YYObj, Position, Positi } // file:///./parser.mbty -// 815| attributes visibility "struct" UIDENT optional_type_parameters_no_constraints { -// 816| ($1, $2, $4, mk_loc($loc($4)), $5) -// 817| } -fn yy_action_51(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 833| attributes visibility "struct" UIDENT optional_type_parameters_no_constraints { +// 834| ($1, $2, $4, mk_loc($loc($4)), $5) +// 835| } +fn yy_action_62(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _sub_action_0_result = yy_action_3(_last_pos, _args[0:0]) - let _sub_action_1_result = yy_action_34(_last_pos, _args[0:2]) + let _sub_action_1_result = yy_action_40(_last_pos, _args[0:2]) guard _sub_action_0_result is YYObj_List_Attribute_(_dollar1) guard _sub_action_1_result is YYObj_Visibility(_dollar2) guard _args[3].0 is YYObj_String(_dollar4) @@ -2485,12 +2919,12 @@ fn yy_action_51(_last_pos : Position, _args : ArrayView[(YYObj, Position, Positi } // file:///./parser.mbty -// 821| attributes visibility "enum" UIDENT optional_type_parameters_no_constraints { -// 822| ($1, $2, $4, mk_loc($loc($4)), $5) -// 823| } -fn yy_action_52(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 839| attributes visibility "enum" UIDENT optional_type_parameters_no_constraints { +// 840| ($1, $2, $4, mk_loc($loc($4)), $5) +// 841| } +fn yy_action_63(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _sub_action_0_result = yy_action_3(_last_pos, _args[0:0]) - let _sub_action_1_result = yy_action_34(_last_pos, _args[0:2]) + let _sub_action_1_result = yy_action_40(_last_pos, _args[0:2]) guard _sub_action_0_result is YYObj_List_Attribute_(_dollar1) guard _sub_action_1_result is YYObj_Visibility(_dollar2) guard _args[3].0 is YYObj_String(_dollar4) @@ -2503,26 +2937,26 @@ fn yy_action_52(_last_pos : Position, _args : ArrayView[(YYObj, Position, Positi } // file:///./parser.mbty -// 341| attributes visibility is_async fun_header_generic option(parameters) func_return_type { -// 342| let ((type_name, f), quants) = $4 -// 343| let (return_type, error_type) = $6 -// 344| FunDecl::{ -// 345| type_name, -// 346| name: f, -// 347| is_async : $3, -// 348| quantifiers: quants, -// 349| decl_params: $5, -// 350| params_loc: mk_loc($loc($5)), -// 351| return_type, -// 352| error_type, -// 353| vis: $2, -// 354| doc: DocString::empty(), -// 355| attrs: $1, -// 356| loc : mk_loc($loc) -// 357| } -// 358| } -fn yy_action_53(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_54(_last_pos, _args[0:1]) +// 352| attributes visibility is_async fun_header_generic option(parameters) func_return_type { +// 353| let ((type_name, f), quants) = $4 +// 354| let (return_type, error_type) = $6 +// 355| FunDecl::{ +// 356| type_name, +// 357| name: f, +// 358| is_async : $3, +// 359| quantifiers: quants, +// 360| decl_params: $5, +// 361| params_loc: mk_loc($loc($5)), +// 362| return_type, +// 363| error_type, +// 364| vis: $2, +// 365| doc: DocString::empty(), +// 366| attrs: $1, +// 367| loc : mk_loc($loc) +// 368| } +// 369| } +fn yy_action_64(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_65(_last_pos, _args[0:1]) let _sub_action_1_result = yy_action_4(_args[0].2, _args[1:1]) let _sub_action_2_result = yy_action_5(_args[0].2, _args[1:2]) guard _args[2].0 is YYObj___TypeName___Binder___List_TypeVarBinder__(_dollar4) @@ -2556,19 +2990,19 @@ fn yy_action_53(_last_pos : Position, _args : ArrayView[(YYObj, Position, Positi } // file:///./parser.mbty -// 690| attributes is_async "test" option(loced_string) option(parameters) block_expr { -// 691| TopTest( -// 692| expr = $6, -// 693| name = $4, -// 694| params = $5, -// 695| is_async = $2, -// 696| loc = mk_loc($sloc), -// 697| attrs = $1, -// 698| doc = DocString::empty() -// 699| ) -// 700| } -fn yy_action_55(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_54(_last_pos, _args[0:1]) +// 701| attributes is_async "test" option(loced_string) option(parameters) block_expr { +// 702| TopTest( +// 703| expr = $6, +// 704| name = $4, +// 705| params = $5, +// 706| is_async = $2, +// 707| loc = mk_loc($sloc), +// 708| attrs = $1, +// 709| doc = DocString::empty() +// 710| ) +// 711| } +fn yy_action_66(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_65(_last_pos, _args[0:1]) let _sub_action_1_result = yy_action_5(_args[0].2, _args[1:2]) guard _args[5].0 is YYObj_Expr(_dollar6) guard _args[3].0 is YYObj_Option__StringLiteral__Location__(_dollar4) @@ -2591,26 +3025,26 @@ fn yy_action_55(_last_pos : Position, _args : ArrayView[(YYObj, Position, Positi } // file:///./parser.mbty -// 341| attributes visibility is_async fun_header_generic option(parameters) func_return_type { -// 342| let ((type_name, f), quants) = $4 -// 343| let (return_type, error_type) = $6 -// 344| FunDecl::{ -// 345| type_name, -// 346| name: f, -// 347| is_async : $3, -// 348| quantifiers: quants, -// 349| decl_params: $5, -// 350| params_loc: mk_loc($loc($5)), -// 351| return_type, -// 352| error_type, -// 353| vis: $2, -// 354| doc: DocString::empty(), -// 355| attrs: $1, -// 356| loc : mk_loc($loc) -// 357| } -// 358| } -fn yy_action_56(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_54(_last_pos, _args[0:1]) +// 352| attributes visibility is_async fun_header_generic option(parameters) func_return_type { +// 353| let ((type_name, f), quants) = $4 +// 354| let (return_type, error_type) = $6 +// 355| FunDecl::{ +// 356| type_name, +// 357| name: f, +// 358| is_async : $3, +// 359| quantifiers: quants, +// 360| decl_params: $5, +// 361| params_loc: mk_loc($loc($5)), +// 362| return_type, +// 363| error_type, +// 364| vis: $2, +// 365| doc: DocString::empty(), +// 366| attrs: $1, +// 367| loc : mk_loc($loc) +// 368| } +// 369| } +fn yy_action_67(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_65(_last_pos, _args[0:1]) let _sub_action_1_result = yy_action_4(_args[0].2, _args[1:1]) let _sub_action_2_result = yy_action_8(_args[0].2, _args[1:1]) guard _args[1].0 is YYObj___TypeName___Binder___List_TypeVarBinder__(_dollar4) @@ -2644,26 +3078,26 @@ fn yy_action_56(_last_pos : Position, _args : ArrayView[(YYObj, Position, Positi } // file:///./parser.mbty -// 341| attributes visibility is_async fun_header_generic option(parameters) func_return_type { -// 342| let ((type_name, f), quants) = $4 -// 343| let (return_type, error_type) = $6 -// 344| FunDecl::{ -// 345| type_name, -// 346| name: f, -// 347| is_async : $3, -// 348| quantifiers: quants, -// 349| decl_params: $5, -// 350| params_loc: mk_loc($loc($5)), -// 351| return_type, -// 352| error_type, -// 353| vis: $2, -// 354| doc: DocString::empty(), -// 355| attrs: $1, -// 356| loc : mk_loc($loc) -// 357| } -// 358| } -fn yy_action_57(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_54(_last_pos, _args[0:1]) +// 352| attributes visibility is_async fun_header_generic option(parameters) func_return_type { +// 353| let ((type_name, f), quants) = $4 +// 354| let (return_type, error_type) = $6 +// 355| FunDecl::{ +// 356| type_name, +// 357| name: f, +// 358| is_async : $3, +// 359| quantifiers: quants, +// 360| decl_params: $5, +// 361| params_loc: mk_loc($loc($5)), +// 362| return_type, +// 363| error_type, +// 364| vis: $2, +// 365| doc: DocString::empty(), +// 366| attrs: $1, +// 367| loc : mk_loc($loc) +// 368| } +// 369| } +fn yy_action_68(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_65(_last_pos, _args[0:1]) let _sub_action_1_result = yy_action_10(_args[0].2, _args[1:2]) let _sub_action_2_result = yy_action_5(_args[1].2, _args[2:3]) guard _args[3].0 is YYObj___TypeName___Binder___List_TypeVarBinder__(_dollar4) @@ -2697,26 +3131,26 @@ fn yy_action_57(_last_pos : Position, _args : ArrayView[(YYObj, Position, Positi } // file:///./parser.mbty -// 341| attributes visibility is_async fun_header_generic option(parameters) func_return_type { -// 342| let ((type_name, f), quants) = $4 -// 343| let (return_type, error_type) = $6 -// 344| FunDecl::{ -// 345| type_name, -// 346| name: f, -// 347| is_async : $3, -// 348| quantifiers: quants, -// 349| decl_params: $5, -// 350| params_loc: mk_loc($loc($5)), -// 351| return_type, -// 352| error_type, -// 353| vis: $2, -// 354| doc: DocString::empty(), -// 355| attrs: $1, -// 356| loc : mk_loc($loc) -// 357| } -// 358| } -fn yy_action_58(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_54(_last_pos, _args[0:1]) +// 352| attributes visibility is_async fun_header_generic option(parameters) func_return_type { +// 353| let ((type_name, f), quants) = $4 +// 354| let (return_type, error_type) = $6 +// 355| FunDecl::{ +// 356| type_name, +// 357| name: f, +// 358| is_async : $3, +// 359| quantifiers: quants, +// 360| decl_params: $5, +// 361| params_loc: mk_loc($loc($5)), +// 362| return_type, +// 363| error_type, +// 364| vis: $2, +// 365| doc: DocString::empty(), +// 366| attrs: $1, +// 367| loc : mk_loc($loc) +// 368| } +// 369| } +fn yy_action_69(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_65(_last_pos, _args[0:1]) let _sub_action_1_result = yy_action_10(_args[0].2, _args[1:2]) let _sub_action_2_result = yy_action_8(_args[1].2, _args[2:2]) guard _args[2].0 is YYObj___TypeName___Binder___List_TypeVarBinder__(_dollar4) @@ -2750,27 +3184,27 @@ fn yy_action_58(_last_pos : Position, _args : ArrayView[(YYObj, Position, Positi } // file:///./parser.mbty -// 386| attributes visibility "extern" STRING "fn" optional_type_parameters fun_binder option(parameters) func_return_type { -// 387| let (type_name, f) = $7 -// 388| let (return_type, error_type) = $9 -// 389| let fn_decl = FunDecl::{ -// 390| type_name, -// 391| name: f, -// 392| is_async : None, -// 393| quantifiers: $6, -// 394| decl_params: $8, -// 395| params_loc: mk_loc($loc($8)), -// 396| return_type, -// 397| error_type, -// 398| vis: $2, -// 399| doc: DocString::empty(), -// 400| attrs: $1, -// 401| loc : mk_loc($loc) -// 402| } -// 403| ($4, fn_decl) -// 404| } -fn yy_action_59(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_54(_last_pos, _args[0:1]) +// 397| attributes visibility "extern" STRING "fn" optional_type_parameters fun_binder option(parameters) func_return_type { +// 398| let (type_name, f) = $7 +// 399| let (return_type, error_type) = $9 +// 400| let fn_decl = FunDecl::{ +// 401| type_name, +// 402| name: f, +// 403| is_async : None, +// 404| quantifiers: $6, +// 405| decl_params: $8, +// 406| params_loc: mk_loc($loc($8)), +// 407| return_type, +// 408| error_type, +// 409| vis: $2, +// 410| doc: DocString::empty(), +// 411| attrs: $1, +// 412| loc : mk_loc($loc) +// 413| } +// 414| ($4, fn_decl) +// 415| } +fn yy_action_70(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_65(_last_pos, _args[0:1]) let _sub_action_1_result = yy_action_10(_args[0].2, _args[1:2]) guard _args[6].0 is YYObj__TypeName___Binder_(_dollar7) guard _args[8].0 is YYObj__Type___ErrorType_(_dollar9) @@ -2805,9 +3239,9 @@ fn yy_action_59(_last_pos : Position, _args : ArrayView[(YYObj, Position, Positi } // file:///./parser.mbty -// 423| attributes is_declare visibility "let" binder opt_annot { ($1, false, $2, $3, $5, $6) } -fn yy_action_60(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_54(_last_pos, _args[0:1]) +// 434| attributes is_declare visibility "let" binder opt_annot { ($1, false, $2, $3, $5, $6) } +fn yy_action_71(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_65(_last_pos, _args[0:1]) let _sub_action_1_result = yy_action_14(_args[0].2, _args[1:1]) let _sub_action_2_result = yy_action_10(_args[0].2, _args[1:2]) let _sub_action_3_result = yy_action_15(_args[2].2, _args[3:4]) @@ -2821,9 +3255,9 @@ fn yy_action_60(_last_pos : Position, _args : ArrayView[(YYObj, Position, Positi } // file:///./parser.mbty -// 423| attributes is_declare visibility "let" binder opt_annot { ($1, false, $2, $3, $5, $6) } -fn yy_action_61(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_54(_last_pos, _args[0:1]) +// 434| attributes is_declare visibility "let" binder opt_annot { ($1, false, $2, $3, $5, $6) } +fn yy_action_72(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_65(_last_pos, _args[0:1]) let _sub_action_1_result = yy_action_14(_args[0].2, _args[1:1]) let _sub_action_2_result = yy_action_10(_args[0].2, _args[1:2]) let _sub_action_3_result = yy_action_15(_args[2].2, _args[3:4]) @@ -2837,9 +3271,41 @@ fn yy_action_61(_last_pos : Position, _args : ArrayView[(YYObj, Position, Positi } // file:///./parser.mbty -// 424| attributes is_declare visibility "const" UIDENT opt_annot { ($1, true, $2, $3, Binder::{ name : $5, loc : mk_loc($loc($5)) }, $6) } -fn yy_action_62(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_54(_last_pos, _args[0:1]) +// 434| attributes is_declare visibility "let" binder opt_annot { ($1, false, $2, $3, $5, $6) } +fn yy_action_73(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_65(_last_pos, _args[0:1]) + let _sub_action_1_result = yy_action_14(_args[0].2, _args[1:1]) + let _sub_action_2_result = yy_action_10(_args[0].2, _args[1:2]) + let _sub_action_3_result = yy_action_20(_args[2].2, _args[3:4]) + let _sub_action_4_result = yy_action_16(_args[3].2, _args[4:6]) + guard _sub_action_0_result is YYObj_List_Attribute_(_dollar1) + guard _sub_action_1_result is YYObj_Bool(_dollar2) + guard _sub_action_2_result is YYObj_Visibility(_dollar3) + guard _sub_action_3_result is YYObj_Binder(_dollar5) + guard _sub_action_4_result is YYObj_Type_(_dollar6) + YYObj__List_Attribute___Bool__Bool__Visibility__Binder__Type__({(); (_dollar1, false, _dollar2, _dollar3, _dollar5, _dollar6) }) +} + +// file:///./parser.mbty +// 434| attributes is_declare visibility "let" binder opt_annot { ($1, false, $2, $3, $5, $6) } +fn yy_action_74(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_65(_last_pos, _args[0:1]) + let _sub_action_1_result = yy_action_14(_args[0].2, _args[1:1]) + let _sub_action_2_result = yy_action_10(_args[0].2, _args[1:2]) + let _sub_action_3_result = yy_action_20(_args[2].2, _args[3:4]) + let _sub_action_4_result = yy_action_18(_args[3].2, _args[4:4]) + guard _sub_action_0_result is YYObj_List_Attribute_(_dollar1) + guard _sub_action_1_result is YYObj_Bool(_dollar2) + guard _sub_action_2_result is YYObj_Visibility(_dollar3) + guard _sub_action_3_result is YYObj_Binder(_dollar5) + guard _sub_action_4_result is YYObj_Type_(_dollar6) + YYObj__List_Attribute___Bool__Bool__Visibility__Binder__Type__({(); (_dollar1, false, _dollar2, _dollar3, _dollar5, _dollar6) }) +} + +// file:///./parser.mbty +// 435| attributes is_declare visibility "const" UIDENT opt_annot { ($1, true, $2, $3, Binder::{ name : $5, loc : mk_loc($loc($5)) }, $6) } +fn yy_action_75(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_65(_last_pos, _args[0:1]) let _sub_action_1_result = yy_action_14(_args[0].2, _args[1:1]) let _sub_action_2_result = yy_action_10(_args[0].2, _args[1:2]) let _sub_action_3_result = yy_action_16(_args[3].2, _args[4:6]) @@ -2854,9 +3320,9 @@ fn yy_action_62(_last_pos : Position, _args : ArrayView[(YYObj, Position, Positi } // file:///./parser.mbty -// 424| attributes is_declare visibility "const" UIDENT opt_annot { ($1, true, $2, $3, Binder::{ name : $5, loc : mk_loc($loc($5)) }, $6) } -fn yy_action_63(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_54(_last_pos, _args[0:1]) +// 435| attributes is_declare visibility "const" UIDENT opt_annot { ($1, true, $2, $3, Binder::{ name : $5, loc : mk_loc($loc($5)) }, $6) } +fn yy_action_76(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_65(_last_pos, _args[0:1]) let _sub_action_1_result = yy_action_14(_args[0].2, _args[1:1]) let _sub_action_2_result = yy_action_10(_args[0].2, _args[1:2]) let _sub_action_3_result = yy_action_18(_args[3].2, _args[4:4]) @@ -2871,25 +3337,25 @@ fn yy_action_63(_last_pos : Position, _args : ArrayView[(YYObj, Position, Positi } // file:///./parser.mbty -// 538| attributes is_declare visibility "extenum" UIDENT optional_type_parameters_no_constraints "{" list_semis(enum_constructor) "}" deriving_directive_list { -// 539| let tycon_loc = mk_loc($loc($5)) -// 540| TopTypeDef( -// 541| TypeDecl::{ -// 542| tycon : $5, -// 543| tycon_loc, -// 544| params : $6, -// 545| components : ExtensibleEnum($8), -// 546| type_vis : $3, -// 547| doc : DocString::empty(), -// 548| deriving : $10, -// 549| loc : mk_loc($sloc), -// 550| attrs : $1, -// 551| is_declare : $2 -// 552| } -// 553| ) -// 554| } -fn yy_action_64(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_54(_last_pos, _args[0:1]) +// 549| attributes is_declare visibility "extenum" UIDENT optional_type_parameters_no_constraints "{" list_semis(enum_constructor) "}" deriving_directive_list { +// 550| let tycon_loc = mk_loc($loc($5)) +// 551| TopTypeDef( +// 552| TypeDecl::{ +// 553| tycon : $5, +// 554| tycon_loc, +// 555| params : $6, +// 556| components : ExtensibleEnum($8), +// 557| type_vis : $3, +// 558| doc : DocString::empty(), +// 559| deriving : $10, +// 560| loc : mk_loc($sloc), +// 561| attrs : $1, +// 562| is_declare : $2 +// 563| } +// 564| ) +// 565| } +fn yy_action_77(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_65(_last_pos, _args[0:1]) let _sub_action_1_result = yy_action_14(_args[0].2, _args[1:1]) let _sub_action_2_result = yy_action_10(_args[0].2, _args[1:2]) let _start_pos_of_item4 = _args[3].1 @@ -2923,25 +3389,25 @@ fn yy_action_64(_last_pos : Position, _args : ArrayView[(YYObj, Position, Positi } // file:///./parser.mbty -// 555| attributes is_declare visibility "extenum" extenum_extension_target "+=" "{" list_semis(enum_constructor) "}" deriving_directive_list { -// 556| let (tycon, tycon_loc, params, target) = $5 -// 557| TopTypeDef( -// 558| TypeDecl::{ -// 559| tycon, -// 560| tycon_loc, -// 561| params, -// 562| components : ExtendEnum(target~, constructors = $8), -// 563| type_vis : $3, -// 564| doc : DocString::empty(), -// 565| deriving : $10, -// 566| loc : mk_loc($sloc), -// 567| attrs : $1, -// 568| is_declare : $2 -// 569| } -// 570| ) -// 571| } -fn yy_action_65(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_54(_last_pos, _args[0:1]) +// 566| attributes is_declare visibility "extenum" extenum_extension_target "+=" "{" list_semis(enum_constructor) "}" deriving_directive_list { +// 567| let (tycon, tycon_loc, params, target) = $5 +// 568| TopTypeDef( +// 569| TypeDecl::{ +// 570| tycon, +// 571| tycon_loc, +// 572| params, +// 573| components : ExtendEnum(target~, constructors = $8), +// 574| type_vis : $3, +// 575| doc : DocString::empty(), +// 576| deriving : $10, +// 577| loc : mk_loc($sloc), +// 578| attrs : $1, +// 579| is_declare : $2 +// 580| } +// 581| ) +// 582| } +fn yy_action_78(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_65(_last_pos, _args[0:1]) let _sub_action_1_result = yy_action_14(_args[0].2, _args[1:1]) let _sub_action_2_result = yy_action_10(_args[0].2, _args[1:2]) guard _args[3].0 is YYObj__String__Location__List_TypeDeclBinder___TypeName_(_dollar5) @@ -2972,27 +3438,27 @@ fn yy_action_65(_last_pos : Position, _args : ArrayView[(YYObj, Position, Positi } // file:///./parser.mbty -// 654| attributes is_declare visibility "trait" UIDENT option(preceded(COLON, separated_nonempty_list(PLUS, tvar_constraint))) "{" list_semis(trait_method_decl) "}" { -// 655| let name = Binder::{ name: $5, loc: mk_loc($loc($4)) } -// 656| let supers = match $6 { -// 657| None => @list.empty() -// 658| Some(supers) => supers -// 659| } -// 660| TopTrait( -// 661| TraitDecl::{ -// 662| name, -// 663| supers, -// 664| methods: $8, -// 665| vis: $3, -// 666| loc: mk_loc($sloc), -// 667| attrs: $1, -// 668| doc : DocString::empty(), -// 669| is_declare : $2 -// 670| } -// 671| ) -// 672| } -fn yy_action_66(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_54(_last_pos, _args[0:1]) +// 665| attributes is_declare visibility "trait" UIDENT option(preceded(COLON, separated_nonempty_list(PLUS, tvar_constraint))) "{" list_semis(trait_method_decl) "}" { +// 666| let name = Binder::{ name: $5, loc: mk_loc($loc($4)) } +// 667| let supers = match $6 { +// 668| None => @list.empty() +// 669| Some(supers) => supers +// 670| } +// 671| TopTrait( +// 672| TraitDecl::{ +// 673| name, +// 674| supers, +// 675| methods: $8, +// 676| vis: $3, +// 677| loc: mk_loc($sloc), +// 678| attrs: $1, +// 679| doc : DocString::empty(), +// 680| is_declare : $2 +// 681| } +// 682| ) +// 683| } +fn yy_action_79(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_65(_last_pos, _args[0:1]) let _sub_action_1_result = yy_action_14(_args[0].2, _args[1:1]) let _sub_action_2_result = yy_action_10(_args[0].2, _args[1:2]) guard _args[3].0 is YYObj_String(_dollar5) @@ -3027,25 +3493,26 @@ fn yy_action_66(_last_pos : Position, _args : ArrayView[(YYObj, Position, Positi } // file:///./parser.mbty -// 701| attributes visibility "impl" optional_type_parameters type_name "for" type_ "with" option("fn") binder parameters func_return_type impl_body { -// 702| let (ret_ty, err_ty) = $12 -// 703| TopImpl( -// 704| self_ty = Some($7), -// 705| trait_ = $5, -// 706| method_name = $10, -// 707| quantifiers = $4, -// 708| params = $11, -// 709| ret_ty~, -// 710| err_ty~, -// 711| body = $13, -// 712| vis = $2, -// 713| loc = mk_loc($sloc), -// 714| attrs = $1, -// 715| doc = DocString::empty() -// 716| ) -// 717| } -fn yy_action_67(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_54(_last_pos, _args[0:1]) +// 712| attributes visibility "impl" optional_type_parameters type_name "for" type_ "with" impl_optional_fn binder parameters func_return_type impl_body { +// 713| let (ret_ty, err_ty) = $12 +// 714| TopImpl( +// 715| self_ty = Some($7), +// 716| trait_ = $5, +// 717| method_name = $10, +// 718| quantifiers = $4, +// 719| method_quantifiers = $9, +// 720| params = $11, +// 721| ret_ty~, +// 722| err_ty~, +// 723| body = $13, +// 724| vis = $2, +// 725| loc = mk_loc($sloc), +// 726| attrs = $1, +// 727| doc = DocString::empty() +// 728| ) +// 729| } +fn yy_action_80(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_65(_last_pos, _args[0:1]) let _sub_action_1_result = yy_action_10(_args[0].2, _args[1:2]) let _sub_action_2_result = yy_action_15(_args[8].2, _args[9:10]) guard _args[11].0 is YYObj__Type___ErrorType_(_dollar12) @@ -3053,6 +3520,7 @@ fn yy_action_67(_last_pos : Position, _args : ArrayView[(YYObj, Position, Positi guard _args[4].0 is YYObj_TypeName(_dollar5) guard _sub_action_2_result is YYObj_Binder(_dollar10) guard _args[3].0 is YYObj_List_TypeVarBinder_(_dollar4) + guard _args[8].0 is YYObj_List_TypeVarBinder_(_dollar9) guard _args[10].0 is YYObj_List_Parameter_(_dollar11) guard _args[12].0 is YYObj_DeclBody(_dollar13) guard _sub_action_1_result is YYObj_Visibility(_dollar2) @@ -3066,6 +3534,7 @@ fn yy_action_67(_last_pos : Position, _args : ArrayView[(YYObj, Position, Positi trait_ = _dollar5, method_name = _dollar10, quantifiers = _dollar4, + method_quantifiers = _dollar9, params = _dollar11, ret_ty~, err_ty~, @@ -3079,20 +3548,75 @@ fn yy_action_67(_last_pos : Position, _args : ArrayView[(YYObj, Position, Positi } // file:///./parser.mbty -// 735| attributes is_declare visibility "impl" optional_type_parameters type_name "for" type_ { -// 736| TopImplRelation( -// 737| self_ty = $8, -// 738| trait_ = $6, -// 739| quantifiers = $5, -// 740| vis = $3, -// 741| attrs = $1, -// 742| loc = mk_loc($sloc), -// 743| doc = DocString::empty(), -// 744| is_declare = $2 -// 745| ) -// 746| } -fn yy_action_68(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_54(_last_pos, _args[0:1]) +// 712| attributes visibility "impl" optional_type_parameters type_name "for" type_ "with" impl_optional_fn binder parameters func_return_type impl_body { +// 713| let (ret_ty, err_ty) = $12 +// 714| TopImpl( +// 715| self_ty = Some($7), +// 716| trait_ = $5, +// 717| method_name = $10, +// 718| quantifiers = $4, +// 719| method_quantifiers = $9, +// 720| params = $11, +// 721| ret_ty~, +// 722| err_ty~, +// 723| body = $13, +// 724| vis = $2, +// 725| loc = mk_loc($sloc), +// 726| attrs = $1, +// 727| doc = DocString::empty() +// 728| ) +// 729| } +fn yy_action_81(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_65(_last_pos, _args[0:1]) + let _sub_action_1_result = yy_action_10(_args[0].2, _args[1:2]) + let _sub_action_2_result = yy_action_20(_args[8].2, _args[9:10]) + guard _args[11].0 is YYObj__Type___ErrorType_(_dollar12) + guard _args[6].0 is YYObj_Type(_dollar7) + guard _args[4].0 is YYObj_TypeName(_dollar5) + guard _sub_action_2_result is YYObj_Binder(_dollar10) + guard _args[3].0 is YYObj_List_TypeVarBinder_(_dollar4) + guard _args[8].0 is YYObj_List_TypeVarBinder_(_dollar9) + guard _args[10].0 is YYObj_List_Parameter_(_dollar11) + guard _args[12].0 is YYObj_DeclBody(_dollar13) + guard _sub_action_1_result is YYObj_Visibility(_dollar2) + let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) + let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } + guard _sub_action_0_result is YYObj_List_Attribute_(_dollar1) + YYObj_Impl({(); + let (ret_ty, err_ty) = _dollar12 + TopImpl( + self_ty = Some(_dollar7), + trait_ = _dollar5, + method_name = _dollar10, + quantifiers = _dollar4, + method_quantifiers = _dollar9, + params = _dollar11, + ret_ty~, + err_ty~, + body = _dollar13, + vis = _dollar2, + loc = mk_loc((_symbol_start_pos, _end_pos)), + attrs = _dollar1, + doc = DocString::empty() + ) + }) +} + +// file:///./parser.mbty +// 748| attributes is_declare visibility "impl" optional_type_parameters type_name "for" type_ { +// 749| TopImplRelation( +// 750| self_ty = $8, +// 751| trait_ = $6, +// 752| quantifiers = $5, +// 753| vis = $3, +// 754| attrs = $1, +// 755| loc = mk_loc($sloc), +// 756| doc = DocString::empty(), +// 757| is_declare = $2 +// 758| ) +// 759| } +fn yy_action_82(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_65(_last_pos, _args[0:1]) let _sub_action_1_result = yy_action_14(_args[0].2, _args[1:1]) let _sub_action_2_result = yy_action_10(_args[0].2, _args[1:2]) guard _args[6].0 is YYObj_Type(_dollar8) @@ -3118,31 +3642,33 @@ fn yy_action_68(_last_pos : Position, _args : ArrayView[(YYObj, Position, Positi } // file:///./parser.mbty -// 718| attributes visibility "impl" optional_type_parameters type_name "with" option("fn") binder parameters func_return_type impl_body { -// 719| let (ret_ty, err_ty) = $10 -// 720| TopImpl( -// 721| self_ty = None, -// 722| trait_ = $5, -// 723| method_name = $8, -// 724| quantifiers = $4, -// 725| params = $9, -// 726| ret_ty~, -// 727| err_ty~, -// 728| body = $11, -// 729| vis = $2, -// 730| loc = mk_loc($sloc), -// 731| attrs = $1, -// 732| doc = DocString::empty() -// 733| ) -// 734| } -fn yy_action_69(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_54(_last_pos, _args[0:1]) +// 730| attributes visibility "impl" optional_type_parameters type_name "with" impl_optional_fn binder parameters func_return_type impl_body { +// 731| let (ret_ty, err_ty) = $10 +// 732| TopImpl( +// 733| self_ty = None, +// 734| trait_ = $5, +// 735| method_name = $8, +// 736| quantifiers = $4, +// 737| method_quantifiers = $7, +// 738| params = $9, +// 739| ret_ty~, +// 740| err_ty~, +// 741| body = $11, +// 742| vis = $2, +// 743| loc = mk_loc($sloc), +// 744| attrs = $1, +// 745| doc = DocString::empty() +// 746| ) +// 747| } +fn yy_action_83(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_65(_last_pos, _args[0:1]) let _sub_action_1_result = yy_action_10(_args[0].2, _args[1:2]) let _sub_action_2_result = yy_action_15(_args[6].2, _args[7:8]) guard _args[9].0 is YYObj__Type___ErrorType_(_dollar10) guard _args[4].0 is YYObj_TypeName(_dollar5) guard _sub_action_2_result is YYObj_Binder(_dollar8) guard _args[3].0 is YYObj_List_TypeVarBinder_(_dollar4) + guard _args[6].0 is YYObj_List_TypeVarBinder_(_dollar7) guard _args[8].0 is YYObj_List_Parameter_(_dollar9) guard _args[10].0 is YYObj_DeclBody(_dollar11) guard _sub_action_1_result is YYObj_Visibility(_dollar2) @@ -3156,6 +3682,7 @@ fn yy_action_69(_last_pos : Position, _args : ArrayView[(YYObj, Position, Positi trait_ = _dollar5, method_name = _dollar8, quantifiers = _dollar4, + method_quantifiers = _dollar7, params = _dollar9, ret_ty~, err_ty~, @@ -3169,25 +3696,79 @@ fn yy_action_69(_last_pos : Position, _args : ArrayView[(YYObj, Position, Positi } // file:///./parser.mbty -// 747| attributes visibility "enumview" optional_type_parameters UIDENT "{" list_semis(enum_constructor) "}" "for" type_ "with" binder parameters block_expr { -// 748| TopView( -// 749| quantifiers = $4, -// 750| source_ty = $10, -// 751| view_type_name = $5, -// 752| view_type_loc = mk_loc($loc($5)), -// 753| view_func_name = $12, -// 754| parameters = $13, -// 755| params_loc = mk_loc($loc($13)), -// 756| view_constrs = $7, -// 757| body = $14, -// 758| vis = $2, -// 759| loc = mk_loc($sloc), -// 760| attrs = $1, -// 761| doc = DocString::empty() -// 762| ) -// 763| } -fn yy_action_70(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_54(_last_pos, _args[0:1]) +// 730| attributes visibility "impl" optional_type_parameters type_name "with" impl_optional_fn binder parameters func_return_type impl_body { +// 731| let (ret_ty, err_ty) = $10 +// 732| TopImpl( +// 733| self_ty = None, +// 734| trait_ = $5, +// 735| method_name = $8, +// 736| quantifiers = $4, +// 737| method_quantifiers = $7, +// 738| params = $9, +// 739| ret_ty~, +// 740| err_ty~, +// 741| body = $11, +// 742| vis = $2, +// 743| loc = mk_loc($sloc), +// 744| attrs = $1, +// 745| doc = DocString::empty() +// 746| ) +// 747| } +fn yy_action_84(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_65(_last_pos, _args[0:1]) + let _sub_action_1_result = yy_action_10(_args[0].2, _args[1:2]) + let _sub_action_2_result = yy_action_20(_args[6].2, _args[7:8]) + guard _args[9].0 is YYObj__Type___ErrorType_(_dollar10) + guard _args[4].0 is YYObj_TypeName(_dollar5) + guard _sub_action_2_result is YYObj_Binder(_dollar8) + guard _args[3].0 is YYObj_List_TypeVarBinder_(_dollar4) + guard _args[6].0 is YYObj_List_TypeVarBinder_(_dollar7) + guard _args[8].0 is YYObj_List_Parameter_(_dollar9) + guard _args[10].0 is YYObj_DeclBody(_dollar11) + guard _sub_action_1_result is YYObj_Visibility(_dollar2) + let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) + let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } + guard _sub_action_0_result is YYObj_List_Attribute_(_dollar1) + YYObj_Impl({(); + let (ret_ty, err_ty) = _dollar10 + TopImpl( + self_ty = None, + trait_ = _dollar5, + method_name = _dollar8, + quantifiers = _dollar4, + method_quantifiers = _dollar7, + params = _dollar9, + ret_ty~, + err_ty~, + body = _dollar11, + vis = _dollar2, + loc = mk_loc((_symbol_start_pos, _end_pos)), + attrs = _dollar1, + doc = DocString::empty() + ) + }) +} + +// file:///./parser.mbty +// 760| attributes visibility "enumview" optional_type_parameters UIDENT "{" list_semis(enum_constructor) "}" "for" type_ "with" binder parameters block_expr { +// 761| TopView( +// 762| quantifiers = $4, +// 763| source_ty = $10, +// 764| view_type_name = $5, +// 765| view_type_loc = mk_loc($loc($5)), +// 766| view_func_name = $12, +// 767| parameters = $13, +// 768| params_loc = mk_loc($loc($13)), +// 769| view_constrs = $7, +// 770| body = $14, +// 771| vis = $2, +// 772| loc = mk_loc($sloc), +// 773| attrs = $1, +// 774| doc = DocString::empty() +// 775| ) +// 776| } +fn yy_action_85(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_65(_last_pos, _args[0:1]) let _sub_action_1_result = yy_action_10(_args[0].2, _args[1:2]) let _sub_action_2_result = yy_action_15(_args[10].2, _args[11:12]) guard _args[3].0 is YYObj_List_TypeVarBinder_(_dollar4) @@ -3225,21 +3806,77 @@ fn yy_action_70(_last_pos : Position, _args : ArrayView[(YYObj, Position, Positi } // file:///./parser.mbty -// 764| attributes visibility "using" PACKAGE_NAME "{" list_commas(using_binder) "}" { -// 765| TopUsing( -// 766| pkg = { -// 767| name : $4, -// 768| loc : mk_loc($loc($4)) -// 769| }, -// 770| names = $6, +// 760| attributes visibility "enumview" optional_type_parameters UIDENT "{" list_semis(enum_constructor) "}" "for" type_ "with" binder parameters block_expr { +// 761| TopView( +// 762| quantifiers = $4, +// 763| source_ty = $10, +// 764| view_type_name = $5, +// 765| view_type_loc = mk_loc($loc($5)), +// 766| view_func_name = $12, +// 767| parameters = $13, +// 768| params_loc = mk_loc($loc($13)), +// 769| view_constrs = $7, +// 770| body = $14, // 771| vis = $2, -// 772| attrs = $1, -// 773| loc = mk_loc($loc), +// 772| loc = mk_loc($sloc), +// 773| attrs = $1, // 774| doc = DocString::empty() // 775| ) // 776| } -fn yy_action_71(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_54(_last_pos, _args[0:1]) +fn yy_action_86(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_65(_last_pos, _args[0:1]) + let _sub_action_1_result = yy_action_10(_args[0].2, _args[1:2]) + let _sub_action_2_result = yy_action_20(_args[10].2, _args[11:12]) + guard _args[3].0 is YYObj_List_TypeVarBinder_(_dollar4) + guard _args[9].0 is YYObj_Type(_dollar10) + guard _args[4].0 is YYObj_String(_dollar5) + let _start_pos_of_item4 = _args[4].1 + let _end_pos_of_item4 = _args[4].2 + guard _sub_action_2_result is YYObj_Binder(_dollar12) + guard _args[12].0 is YYObj_List_Parameter_(_dollar13) + let _start_pos_of_item12 = _args[12].1 + let _end_pos_of_item12 = _args[12].2 + guard _args[6].0 is YYObj_List_ConstrDecl_(_dollar7) + guard _args[13].0 is YYObj_Expr(_dollar14) + guard _sub_action_1_result is YYObj_Visibility(_dollar2) + let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) + let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } + guard _sub_action_0_result is YYObj_List_Attribute_(_dollar1) + YYObj_Impl({(); + TopView( + quantifiers = _dollar4, + source_ty = _dollar10, + view_type_name = _dollar5, + view_type_loc = mk_loc((_start_pos_of_item4, _end_pos_of_item4)), + view_func_name = _dollar12, + parameters = _dollar13, + params_loc = mk_loc((_start_pos_of_item12, _end_pos_of_item12)), + view_constrs = _dollar7, + body = _dollar14, + vis = _dollar2, + loc = mk_loc((_symbol_start_pos, _end_pos)), + attrs = _dollar1, + doc = DocString::empty() + ) + }) +} + +// file:///./parser.mbty +// 777| attributes visibility "using" PACKAGE_NAME "{" list_commas(using_binder) "}" { +// 778| TopUsing( +// 779| pkg = { +// 780| name : $4, +// 781| loc : mk_loc($loc($4)) +// 782| }, +// 783| names = $6, +// 784| vis = $2, +// 785| attrs = $1, +// 786| loc = mk_loc($loc), +// 787| doc = DocString::empty() +// 788| ) +// 789| } +fn yy_action_87(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_65(_last_pos, _args[0:1]) let _sub_action_1_result = yy_action_10(_args[0].2, _args[1:2]) guard _args[3].0 is YYObj_String(_dollar4) let _start_pos_of_item3 = _args[3].1 @@ -3265,11 +3902,11 @@ fn yy_action_71(_last_pos : Position, _args : ArrayView[(YYObj, Position, Positi } // file:///./parser.mbty -// 805| attributes is_declare visibility "type" UIDENT optional_type_parameters_no_constraints { -// 806| ($1, $3, $2, $5, mk_loc($loc($5)), $6) -// 807| } -fn yy_action_72(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_54(_last_pos, _args[0:1]) +// 823| attributes is_declare visibility "type" UIDENT optional_type_parameters_no_constraints { +// 824| ($1, $3, $2, $5, mk_loc($loc($5)), $6) +// 825| } +fn yy_action_88(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_65(_last_pos, _args[0:1]) let _sub_action_1_result = yy_action_14(_args[0].2, _args[1:1]) let _sub_action_2_result = yy_action_10(_args[0].2, _args[1:2]) guard _sub_action_0_result is YYObj_List_Attribute_(_dollar1) @@ -3285,9 +3922,9 @@ fn yy_action_72(_last_pos : Position, _args : ArrayView[(YYObj, Position, Positi } // file:///./parser.mbty -// 811| attributes is_declare visibility "suberror" UIDENT { ($1, $3, $2, $5, mk_loc($loc($5))) } -fn yy_action_73(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_54(_last_pos, _args[0:1]) +// 829| attributes is_declare visibility "suberror" UIDENT { ($1, $3, $2, $5, mk_loc($loc($5))) } +fn yy_action_89(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_65(_last_pos, _args[0:1]) let _sub_action_1_result = yy_action_14(_args[0].2, _args[1:1]) let _sub_action_2_result = yy_action_10(_args[0].2, _args[1:2]) guard _sub_action_0_result is YYObj_List_Attribute_(_dollar1) @@ -3300,11 +3937,11 @@ fn yy_action_73(_last_pos : Position, _args : ArrayView[(YYObj, Position, Positi } // file:///./parser.mbty -// 815| attributes visibility "struct" UIDENT optional_type_parameters_no_constraints { -// 816| ($1, $2, $4, mk_loc($loc($4)), $5) -// 817| } -fn yy_action_74(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_54(_last_pos, _args[0:1]) +// 833| attributes visibility "struct" UIDENT optional_type_parameters_no_constraints { +// 834| ($1, $2, $4, mk_loc($loc($4)), $5) +// 835| } +fn yy_action_90(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_65(_last_pos, _args[0:1]) let _sub_action_1_result = yy_action_10(_args[0].2, _args[1:2]) guard _sub_action_0_result is YYObj_List_Attribute_(_dollar1) guard _sub_action_1_result is YYObj_Visibility(_dollar2) @@ -3318,11 +3955,11 @@ fn yy_action_74(_last_pos : Position, _args : ArrayView[(YYObj, Position, Positi } // file:///./parser.mbty -// 821| attributes visibility "enum" UIDENT optional_type_parameters_no_constraints { -// 822| ($1, $2, $4, mk_loc($loc($4)), $5) -// 823| } -fn yy_action_75(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_54(_last_pos, _args[0:1]) +// 839| attributes visibility "enum" UIDENT optional_type_parameters_no_constraints { +// 840| ($1, $2, $4, mk_loc($loc($4)), $5) +// 841| } +fn yy_action_91(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_65(_last_pos, _args[0:1]) let _sub_action_1_result = yy_action_10(_args[0].2, _args[1:2]) guard _sub_action_0_result is YYObj_List_Attribute_(_dollar1) guard _sub_action_1_result is YYObj_Visibility(_dollar2) @@ -3336,27 +3973,27 @@ fn yy_action_75(_last_pos : Position, _args : ArrayView[(YYObj, Position, Positi } // file:///./parser.mbty -// 341| attributes visibility is_async fun_header_generic option(parameters) func_return_type { -// 342| let ((type_name, f), quants) = $4 -// 343| let (return_type, error_type) = $6 -// 344| FunDecl::{ -// 345| type_name, -// 346| name: f, -// 347| is_async : $3, -// 348| quantifiers: quants, -// 349| decl_params: $5, -// 350| params_loc: mk_loc($loc($5)), -// 351| return_type, -// 352| error_type, -// 353| vis: $2, -// 354| doc: DocString::empty(), -// 355| attrs: $1, -// 356| loc : mk_loc($loc) -// 357| } -// 358| } -fn yy_action_76(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_54(_last_pos, _args[0:1]) - let _sub_action_1_result = yy_action_34(_args[0].2, _args[1:3]) +// 352| attributes visibility is_async fun_header_generic option(parameters) func_return_type { +// 353| let ((type_name, f), quants) = $4 +// 354| let (return_type, error_type) = $6 +// 355| FunDecl::{ +// 356| type_name, +// 357| name: f, +// 358| is_async : $3, +// 359| quantifiers: quants, +// 360| decl_params: $5, +// 361| params_loc: mk_loc($loc($5)), +// 362| return_type, +// 363| error_type, +// 364| vis: $2, +// 365| doc: DocString::empty(), +// 366| attrs: $1, +// 367| loc : mk_loc($loc) +// 368| } +// 369| } +fn yy_action_92(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_65(_last_pos, _args[0:1]) + let _sub_action_1_result = yy_action_40(_args[0].2, _args[1:3]) let _sub_action_2_result = yy_action_5(_args[2].2, _args[3:4]) guard _args[4].0 is YYObj___TypeName___Binder___List_TypeVarBinder__(_dollar4) guard _args[6].0 is YYObj__Type___ErrorType_(_dollar6) @@ -3389,27 +4026,27 @@ fn yy_action_76(_last_pos : Position, _args : ArrayView[(YYObj, Position, Positi } // file:///./parser.mbty -// 341| attributes visibility is_async fun_header_generic option(parameters) func_return_type { -// 342| let ((type_name, f), quants) = $4 -// 343| let (return_type, error_type) = $6 -// 344| FunDecl::{ -// 345| type_name, -// 346| name: f, -// 347| is_async : $3, -// 348| quantifiers: quants, -// 349| decl_params: $5, -// 350| params_loc: mk_loc($loc($5)), -// 351| return_type, -// 352| error_type, -// 353| vis: $2, -// 354| doc: DocString::empty(), -// 355| attrs: $1, -// 356| loc : mk_loc($loc) -// 357| } -// 358| } -fn yy_action_77(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_54(_last_pos, _args[0:1]) - let _sub_action_1_result = yy_action_34(_args[0].2, _args[1:3]) +// 352| attributes visibility is_async fun_header_generic option(parameters) func_return_type { +// 353| let ((type_name, f), quants) = $4 +// 354| let (return_type, error_type) = $6 +// 355| FunDecl::{ +// 356| type_name, +// 357| name: f, +// 358| is_async : $3, +// 359| quantifiers: quants, +// 360| decl_params: $5, +// 361| params_loc: mk_loc($loc($5)), +// 362| return_type, +// 363| error_type, +// 364| vis: $2, +// 365| doc: DocString::empty(), +// 366| attrs: $1, +// 367| loc : mk_loc($loc) +// 368| } +// 369| } +fn yy_action_93(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_65(_last_pos, _args[0:1]) + let _sub_action_1_result = yy_action_40(_args[0].2, _args[1:3]) let _sub_action_2_result = yy_action_8(_args[2].2, _args[3:3]) guard _args[3].0 is YYObj___TypeName___Binder___List_TypeVarBinder__(_dollar4) guard _args[5].0 is YYObj__Type___ErrorType_(_dollar6) @@ -3442,28 +4079,28 @@ fn yy_action_77(_last_pos : Position, _args : ArrayView[(YYObj, Position, Positi } // file:///./parser.mbty -// 386| attributes visibility "extern" STRING "fn" optional_type_parameters fun_binder option(parameters) func_return_type { -// 387| let (type_name, f) = $7 -// 388| let (return_type, error_type) = $9 -// 389| let fn_decl = FunDecl::{ -// 390| type_name, -// 391| name: f, -// 392| is_async : None, -// 393| quantifiers: $6, -// 394| decl_params: $8, -// 395| params_loc: mk_loc($loc($8)), -// 396| return_type, -// 397| error_type, -// 398| vis: $2, -// 399| doc: DocString::empty(), -// 400| attrs: $1, -// 401| loc : mk_loc($loc) -// 402| } -// 403| ($4, fn_decl) -// 404| } -fn yy_action_78(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_54(_last_pos, _args[0:1]) - let _sub_action_1_result = yy_action_34(_args[0].2, _args[1:3]) +// 397| attributes visibility "extern" STRING "fn" optional_type_parameters fun_binder option(parameters) func_return_type { +// 398| let (type_name, f) = $7 +// 399| let (return_type, error_type) = $9 +// 400| let fn_decl = FunDecl::{ +// 401| type_name, +// 402| name: f, +// 403| is_async : None, +// 404| quantifiers: $6, +// 405| decl_params: $8, +// 406| params_loc: mk_loc($loc($8)), +// 407| return_type, +// 408| error_type, +// 409| vis: $2, +// 410| doc: DocString::empty(), +// 411| attrs: $1, +// 412| loc : mk_loc($loc) +// 413| } +// 414| ($4, fn_decl) +// 415| } +fn yy_action_94(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_65(_last_pos, _args[0:1]) + let _sub_action_1_result = yy_action_40(_args[0].2, _args[1:3]) guard _args[7].0 is YYObj__TypeName___Binder_(_dollar7) guard _args[9].0 is YYObj__Type___ErrorType_(_dollar9) guard _args[6].0 is YYObj_List_TypeVarBinder_(_dollar6) @@ -3497,11 +4134,11 @@ fn yy_action_78(_last_pos : Position, _args : ArrayView[(YYObj, Position, Positi } // file:///./parser.mbty -// 423| attributes is_declare visibility "let" binder opt_annot { ($1, false, $2, $3, $5, $6) } -fn yy_action_79(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_54(_last_pos, _args[0:1]) +// 434| attributes is_declare visibility "let" binder opt_annot { ($1, false, $2, $3, $5, $6) } +fn yy_action_95(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_65(_last_pos, _args[0:1]) let _sub_action_1_result = yy_action_14(_args[0].2, _args[1:1]) - let _sub_action_2_result = yy_action_34(_args[0].2, _args[1:3]) + let _sub_action_2_result = yy_action_40(_args[0].2, _args[1:3]) let _sub_action_3_result = yy_action_15(_args[3].2, _args[4:5]) let _sub_action_4_result = yy_action_16(_args[4].2, _args[5:7]) guard _sub_action_0_result is YYObj_List_Attribute_(_dollar1) @@ -3513,11 +4150,11 @@ fn yy_action_79(_last_pos : Position, _args : ArrayView[(YYObj, Position, Positi } // file:///./parser.mbty -// 423| attributes is_declare visibility "let" binder opt_annot { ($1, false, $2, $3, $5, $6) } -fn yy_action_80(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_54(_last_pos, _args[0:1]) +// 434| attributes is_declare visibility "let" binder opt_annot { ($1, false, $2, $3, $5, $6) } +fn yy_action_96(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_65(_last_pos, _args[0:1]) let _sub_action_1_result = yy_action_14(_args[0].2, _args[1:1]) - let _sub_action_2_result = yy_action_34(_args[0].2, _args[1:3]) + let _sub_action_2_result = yy_action_40(_args[0].2, _args[1:3]) let _sub_action_3_result = yy_action_15(_args[3].2, _args[4:5]) let _sub_action_4_result = yy_action_18(_args[4].2, _args[5:5]) guard _sub_action_0_result is YYObj_List_Attribute_(_dollar1) @@ -3529,11 +4166,43 @@ fn yy_action_80(_last_pos : Position, _args : ArrayView[(YYObj, Position, Positi } // file:///./parser.mbty -// 424| attributes is_declare visibility "const" UIDENT opt_annot { ($1, true, $2, $3, Binder::{ name : $5, loc : mk_loc($loc($5)) }, $6) } -fn yy_action_81(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_54(_last_pos, _args[0:1]) +// 434| attributes is_declare visibility "let" binder opt_annot { ($1, false, $2, $3, $5, $6) } +fn yy_action_97(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_65(_last_pos, _args[0:1]) + let _sub_action_1_result = yy_action_14(_args[0].2, _args[1:1]) + let _sub_action_2_result = yy_action_40(_args[0].2, _args[1:3]) + let _sub_action_3_result = yy_action_20(_args[3].2, _args[4:5]) + let _sub_action_4_result = yy_action_16(_args[4].2, _args[5:7]) + guard _sub_action_0_result is YYObj_List_Attribute_(_dollar1) + guard _sub_action_1_result is YYObj_Bool(_dollar2) + guard _sub_action_2_result is YYObj_Visibility(_dollar3) + guard _sub_action_3_result is YYObj_Binder(_dollar5) + guard _sub_action_4_result is YYObj_Type_(_dollar6) + YYObj__List_Attribute___Bool__Bool__Visibility__Binder__Type__({(); (_dollar1, false, _dollar2, _dollar3, _dollar5, _dollar6) }) +} + +// file:///./parser.mbty +// 434| attributes is_declare visibility "let" binder opt_annot { ($1, false, $2, $3, $5, $6) } +fn yy_action_98(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_65(_last_pos, _args[0:1]) + let _sub_action_1_result = yy_action_14(_args[0].2, _args[1:1]) + let _sub_action_2_result = yy_action_40(_args[0].2, _args[1:3]) + let _sub_action_3_result = yy_action_20(_args[3].2, _args[4:5]) + let _sub_action_4_result = yy_action_18(_args[4].2, _args[5:5]) + guard _sub_action_0_result is YYObj_List_Attribute_(_dollar1) + guard _sub_action_1_result is YYObj_Bool(_dollar2) + guard _sub_action_2_result is YYObj_Visibility(_dollar3) + guard _sub_action_3_result is YYObj_Binder(_dollar5) + guard _sub_action_4_result is YYObj_Type_(_dollar6) + YYObj__List_Attribute___Bool__Bool__Visibility__Binder__Type__({(); (_dollar1, false, _dollar2, _dollar3, _dollar5, _dollar6) }) +} + +// file:///./parser.mbty +// 435| attributes is_declare visibility "const" UIDENT opt_annot { ($1, true, $2, $3, Binder::{ name : $5, loc : mk_loc($loc($5)) }, $6) } +fn yy_action_99(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_65(_last_pos, _args[0:1]) let _sub_action_1_result = yy_action_14(_args[0].2, _args[1:1]) - let _sub_action_2_result = yy_action_34(_args[0].2, _args[1:3]) + let _sub_action_2_result = yy_action_40(_args[0].2, _args[1:3]) let _sub_action_3_result = yy_action_16(_args[4].2, _args[5:7]) guard _sub_action_0_result is YYObj_List_Attribute_(_dollar1) guard _sub_action_1_result is YYObj_Bool(_dollar2) @@ -3546,11 +4215,11 @@ fn yy_action_81(_last_pos : Position, _args : ArrayView[(YYObj, Position, Positi } // file:///./parser.mbty -// 424| attributes is_declare visibility "const" UIDENT opt_annot { ($1, true, $2, $3, Binder::{ name : $5, loc : mk_loc($loc($5)) }, $6) } -fn yy_action_82(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_54(_last_pos, _args[0:1]) +// 435| attributes is_declare visibility "const" UIDENT opt_annot { ($1, true, $2, $3, Binder::{ name : $5, loc : mk_loc($loc($5)) }, $6) } +fn yy_action_100(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_65(_last_pos, _args[0:1]) let _sub_action_1_result = yy_action_14(_args[0].2, _args[1:1]) - let _sub_action_2_result = yy_action_34(_args[0].2, _args[1:3]) + let _sub_action_2_result = yy_action_40(_args[0].2, _args[1:3]) let _sub_action_3_result = yy_action_18(_args[4].2, _args[5:5]) guard _sub_action_0_result is YYObj_List_Attribute_(_dollar1) guard _sub_action_1_result is YYObj_Bool(_dollar2) @@ -3563,27 +4232,27 @@ fn yy_action_82(_last_pos : Position, _args : ArrayView[(YYObj, Position, Positi } // file:///./parser.mbty -// 538| attributes is_declare visibility "extenum" UIDENT optional_type_parameters_no_constraints "{" list_semis(enum_constructor) "}" deriving_directive_list { -// 539| let tycon_loc = mk_loc($loc($5)) -// 540| TopTypeDef( -// 541| TypeDecl::{ -// 542| tycon : $5, -// 543| tycon_loc, -// 544| params : $6, -// 545| components : ExtensibleEnum($8), -// 546| type_vis : $3, -// 547| doc : DocString::empty(), -// 548| deriving : $10, -// 549| loc : mk_loc($sloc), -// 550| attrs : $1, -// 551| is_declare : $2 -// 552| } -// 553| ) -// 554| } -fn yy_action_83(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_54(_last_pos, _args[0:1]) +// 549| attributes is_declare visibility "extenum" UIDENT optional_type_parameters_no_constraints "{" list_semis(enum_constructor) "}" deriving_directive_list { +// 550| let tycon_loc = mk_loc($loc($5)) +// 551| TopTypeDef( +// 552| TypeDecl::{ +// 553| tycon : $5, +// 554| tycon_loc, +// 555| params : $6, +// 556| components : ExtensibleEnum($8), +// 557| type_vis : $3, +// 558| doc : DocString::empty(), +// 559| deriving : $10, +// 560| loc : mk_loc($sloc), +// 561| attrs : $1, +// 562| is_declare : $2 +// 563| } +// 564| ) +// 565| } +fn yy_action_101(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_65(_last_pos, _args[0:1]) let _sub_action_1_result = yy_action_14(_args[0].2, _args[1:1]) - let _sub_action_2_result = yy_action_34(_args[0].2, _args[1:3]) + let _sub_action_2_result = yy_action_40(_args[0].2, _args[1:3]) let _start_pos_of_item4 = _args[4].1 let _end_pos_of_item4 = _args[4].2 guard _args[4].0 is YYObj_String(_dollar5) @@ -3615,27 +4284,27 @@ fn yy_action_83(_last_pos : Position, _args : ArrayView[(YYObj, Position, Positi } // file:///./parser.mbty -// 555| attributes is_declare visibility "extenum" extenum_extension_target "+=" "{" list_semis(enum_constructor) "}" deriving_directive_list { -// 556| let (tycon, tycon_loc, params, target) = $5 -// 557| TopTypeDef( -// 558| TypeDecl::{ -// 559| tycon, -// 560| tycon_loc, -// 561| params, -// 562| components : ExtendEnum(target~, constructors = $8), -// 563| type_vis : $3, -// 564| doc : DocString::empty(), -// 565| deriving : $10, -// 566| loc : mk_loc($sloc), -// 567| attrs : $1, -// 568| is_declare : $2 -// 569| } -// 570| ) -// 571| } -fn yy_action_84(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_54(_last_pos, _args[0:1]) +// 566| attributes is_declare visibility "extenum" extenum_extension_target "+=" "{" list_semis(enum_constructor) "}" deriving_directive_list { +// 567| let (tycon, tycon_loc, params, target) = $5 +// 568| TopTypeDef( +// 569| TypeDecl::{ +// 570| tycon, +// 571| tycon_loc, +// 572| params, +// 573| components : ExtendEnum(target~, constructors = $8), +// 574| type_vis : $3, +// 575| doc : DocString::empty(), +// 576| deriving : $10, +// 577| loc : mk_loc($sloc), +// 578| attrs : $1, +// 579| is_declare : $2 +// 580| } +// 581| ) +// 582| } +fn yy_action_102(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_65(_last_pos, _args[0:1]) let _sub_action_1_result = yy_action_14(_args[0].2, _args[1:1]) - let _sub_action_2_result = yy_action_34(_args[0].2, _args[1:3]) + let _sub_action_2_result = yy_action_40(_args[0].2, _args[1:3]) guard _args[4].0 is YYObj__String__Location__List_TypeDeclBinder___TypeName_(_dollar5) guard _args[7].0 is YYObj_List_ConstrDecl_(_dollar8) guard _sub_action_2_result is YYObj_Visibility(_dollar3) @@ -3664,29 +4333,29 @@ fn yy_action_84(_last_pos : Position, _args : ArrayView[(YYObj, Position, Positi } // file:///./parser.mbty -// 654| attributes is_declare visibility "trait" UIDENT option(preceded(COLON, separated_nonempty_list(PLUS, tvar_constraint))) "{" list_semis(trait_method_decl) "}" { -// 655| let name = Binder::{ name: $5, loc: mk_loc($loc($4)) } -// 656| let supers = match $6 { -// 657| None => @list.empty() -// 658| Some(supers) => supers -// 659| } -// 660| TopTrait( -// 661| TraitDecl::{ -// 662| name, -// 663| supers, -// 664| methods: $8, -// 665| vis: $3, -// 666| loc: mk_loc($sloc), -// 667| attrs: $1, -// 668| doc : DocString::empty(), -// 669| is_declare : $2 -// 670| } -// 671| ) -// 672| } -fn yy_action_85(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_54(_last_pos, _args[0:1]) +// 665| attributes is_declare visibility "trait" UIDENT option(preceded(COLON, separated_nonempty_list(PLUS, tvar_constraint))) "{" list_semis(trait_method_decl) "}" { +// 666| let name = Binder::{ name: $5, loc: mk_loc($loc($4)) } +// 667| let supers = match $6 { +// 668| None => @list.empty() +// 669| Some(supers) => supers +// 670| } +// 671| TopTrait( +// 672| TraitDecl::{ +// 673| name, +// 674| supers, +// 675| methods: $8, +// 676| vis: $3, +// 677| loc: mk_loc($sloc), +// 678| attrs: $1, +// 679| doc : DocString::empty(), +// 680| is_declare : $2 +// 681| } +// 682| ) +// 683| } +fn yy_action_103(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_65(_last_pos, _args[0:1]) let _sub_action_1_result = yy_action_14(_args[0].2, _args[1:1]) - let _sub_action_2_result = yy_action_34(_args[0].2, _args[1:3]) + let _sub_action_2_result = yy_action_40(_args[0].2, _args[1:3]) guard _args[4].0 is YYObj_String(_dollar5) let _start_pos_of_item3 = _args[3].1 let _end_pos_of_item3 = _args[3].2 @@ -3719,32 +4388,34 @@ fn yy_action_85(_last_pos : Position, _args : ArrayView[(YYObj, Position, Positi } // file:///./parser.mbty -// 701| attributes visibility "impl" optional_type_parameters type_name "for" type_ "with" option("fn") binder parameters func_return_type impl_body { -// 702| let (ret_ty, err_ty) = $12 -// 703| TopImpl( -// 704| self_ty = Some($7), -// 705| trait_ = $5, -// 706| method_name = $10, -// 707| quantifiers = $4, -// 708| params = $11, -// 709| ret_ty~, -// 710| err_ty~, -// 711| body = $13, -// 712| vis = $2, -// 713| loc = mk_loc($sloc), -// 714| attrs = $1, -// 715| doc = DocString::empty() -// 716| ) -// 717| } -fn yy_action_86(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_54(_last_pos, _args[0:1]) - let _sub_action_1_result = yy_action_34(_args[0].2, _args[1:3]) +// 712| attributes visibility "impl" optional_type_parameters type_name "for" type_ "with" impl_optional_fn binder parameters func_return_type impl_body { +// 713| let (ret_ty, err_ty) = $12 +// 714| TopImpl( +// 715| self_ty = Some($7), +// 716| trait_ = $5, +// 717| method_name = $10, +// 718| quantifiers = $4, +// 719| method_quantifiers = $9, +// 720| params = $11, +// 721| ret_ty~, +// 722| err_ty~, +// 723| body = $13, +// 724| vis = $2, +// 725| loc = mk_loc($sloc), +// 726| attrs = $1, +// 727| doc = DocString::empty() +// 728| ) +// 729| } +fn yy_action_104(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_65(_last_pos, _args[0:1]) + let _sub_action_1_result = yy_action_40(_args[0].2, _args[1:3]) let _sub_action_2_result = yy_action_15(_args[9].2, _args[10:11]) guard _args[12].0 is YYObj__Type___ErrorType_(_dollar12) guard _args[7].0 is YYObj_Type(_dollar7) guard _args[5].0 is YYObj_TypeName(_dollar5) guard _sub_action_2_result is YYObj_Binder(_dollar10) guard _args[4].0 is YYObj_List_TypeVarBinder_(_dollar4) + guard _args[9].0 is YYObj_List_TypeVarBinder_(_dollar9) guard _args[11].0 is YYObj_List_Parameter_(_dollar11) guard _args[13].0 is YYObj_DeclBody(_dollar13) guard _sub_action_1_result is YYObj_Visibility(_dollar2) @@ -3758,6 +4429,7 @@ fn yy_action_86(_last_pos : Position, _args : ArrayView[(YYObj, Position, Positi trait_ = _dollar5, method_name = _dollar10, quantifiers = _dollar4, + method_quantifiers = _dollar9, params = _dollar11, ret_ty~, err_ty~, @@ -3771,22 +4443,77 @@ fn yy_action_86(_last_pos : Position, _args : ArrayView[(YYObj, Position, Positi } // file:///./parser.mbty -// 735| attributes is_declare visibility "impl" optional_type_parameters type_name "for" type_ { -// 736| TopImplRelation( -// 737| self_ty = $8, -// 738| trait_ = $6, -// 739| quantifiers = $5, -// 740| vis = $3, -// 741| attrs = $1, -// 742| loc = mk_loc($sloc), -// 743| doc = DocString::empty(), -// 744| is_declare = $2 -// 745| ) -// 746| } -fn yy_action_87(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_54(_last_pos, _args[0:1]) +// 712| attributes visibility "impl" optional_type_parameters type_name "for" type_ "with" impl_optional_fn binder parameters func_return_type impl_body { +// 713| let (ret_ty, err_ty) = $12 +// 714| TopImpl( +// 715| self_ty = Some($7), +// 716| trait_ = $5, +// 717| method_name = $10, +// 718| quantifiers = $4, +// 719| method_quantifiers = $9, +// 720| params = $11, +// 721| ret_ty~, +// 722| err_ty~, +// 723| body = $13, +// 724| vis = $2, +// 725| loc = mk_loc($sloc), +// 726| attrs = $1, +// 727| doc = DocString::empty() +// 728| ) +// 729| } +fn yy_action_105(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_65(_last_pos, _args[0:1]) + let _sub_action_1_result = yy_action_40(_args[0].2, _args[1:3]) + let _sub_action_2_result = yy_action_20(_args[9].2, _args[10:11]) + guard _args[12].0 is YYObj__Type___ErrorType_(_dollar12) + guard _args[7].0 is YYObj_Type(_dollar7) + guard _args[5].0 is YYObj_TypeName(_dollar5) + guard _sub_action_2_result is YYObj_Binder(_dollar10) + guard _args[4].0 is YYObj_List_TypeVarBinder_(_dollar4) + guard _args[9].0 is YYObj_List_TypeVarBinder_(_dollar9) + guard _args[11].0 is YYObj_List_Parameter_(_dollar11) + guard _args[13].0 is YYObj_DeclBody(_dollar13) + guard _sub_action_1_result is YYObj_Visibility(_dollar2) + let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) + let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } + guard _sub_action_0_result is YYObj_List_Attribute_(_dollar1) + YYObj_Impl({(); + let (ret_ty, err_ty) = _dollar12 + TopImpl( + self_ty = Some(_dollar7), + trait_ = _dollar5, + method_name = _dollar10, + quantifiers = _dollar4, + method_quantifiers = _dollar9, + params = _dollar11, + ret_ty~, + err_ty~, + body = _dollar13, + vis = _dollar2, + loc = mk_loc((_symbol_start_pos, _end_pos)), + attrs = _dollar1, + doc = DocString::empty() + ) + }) +} + +// file:///./parser.mbty +// 748| attributes is_declare visibility "impl" optional_type_parameters type_name "for" type_ { +// 749| TopImplRelation( +// 750| self_ty = $8, +// 751| trait_ = $6, +// 752| quantifiers = $5, +// 753| vis = $3, +// 754| attrs = $1, +// 755| loc = mk_loc($sloc), +// 756| doc = DocString::empty(), +// 757| is_declare = $2 +// 758| ) +// 759| } +fn yy_action_106(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_65(_last_pos, _args[0:1]) let _sub_action_1_result = yy_action_14(_args[0].2, _args[1:1]) - let _sub_action_2_result = yy_action_34(_args[0].2, _args[1:3]) + let _sub_action_2_result = yy_action_40(_args[0].2, _args[1:3]) guard _args[7].0 is YYObj_Type(_dollar8) guard _args[5].0 is YYObj_TypeName(_dollar6) guard _args[4].0 is YYObj_List_TypeVarBinder_(_dollar5) @@ -3810,31 +4537,33 @@ fn yy_action_87(_last_pos : Position, _args : ArrayView[(YYObj, Position, Positi } // file:///./parser.mbty -// 718| attributes visibility "impl" optional_type_parameters type_name "with" option("fn") binder parameters func_return_type impl_body { -// 719| let (ret_ty, err_ty) = $10 -// 720| TopImpl( -// 721| self_ty = None, -// 722| trait_ = $5, -// 723| method_name = $8, -// 724| quantifiers = $4, -// 725| params = $9, -// 726| ret_ty~, -// 727| err_ty~, -// 728| body = $11, -// 729| vis = $2, -// 730| loc = mk_loc($sloc), -// 731| attrs = $1, -// 732| doc = DocString::empty() -// 733| ) -// 734| } -fn yy_action_88(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_54(_last_pos, _args[0:1]) - let _sub_action_1_result = yy_action_34(_args[0].2, _args[1:3]) +// 730| attributes visibility "impl" optional_type_parameters type_name "with" impl_optional_fn binder parameters func_return_type impl_body { +// 731| let (ret_ty, err_ty) = $10 +// 732| TopImpl( +// 733| self_ty = None, +// 734| trait_ = $5, +// 735| method_name = $8, +// 736| quantifiers = $4, +// 737| method_quantifiers = $7, +// 738| params = $9, +// 739| ret_ty~, +// 740| err_ty~, +// 741| body = $11, +// 742| vis = $2, +// 743| loc = mk_loc($sloc), +// 744| attrs = $1, +// 745| doc = DocString::empty() +// 746| ) +// 747| } +fn yy_action_107(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_65(_last_pos, _args[0:1]) + let _sub_action_1_result = yy_action_40(_args[0].2, _args[1:3]) let _sub_action_2_result = yy_action_15(_args[7].2, _args[8:9]) guard _args[10].0 is YYObj__Type___ErrorType_(_dollar10) guard _args[5].0 is YYObj_TypeName(_dollar5) guard _sub_action_2_result is YYObj_Binder(_dollar8) guard _args[4].0 is YYObj_List_TypeVarBinder_(_dollar4) + guard _args[7].0 is YYObj_List_TypeVarBinder_(_dollar7) guard _args[9].0 is YYObj_List_Parameter_(_dollar9) guard _args[11].0 is YYObj_DeclBody(_dollar11) guard _sub_action_1_result is YYObj_Visibility(_dollar2) @@ -3848,6 +4577,7 @@ fn yy_action_88(_last_pos : Position, _args : ArrayView[(YYObj, Position, Positi trait_ = _dollar5, method_name = _dollar8, quantifiers = _dollar4, + method_quantifiers = _dollar7, params = _dollar9, ret_ty~, err_ty~, @@ -3861,26 +4591,80 @@ fn yy_action_88(_last_pos : Position, _args : ArrayView[(YYObj, Position, Positi } // file:///./parser.mbty -// 747| attributes visibility "enumview" optional_type_parameters UIDENT "{" list_semis(enum_constructor) "}" "for" type_ "with" binder parameters block_expr { -// 748| TopView( -// 749| quantifiers = $4, -// 750| source_ty = $10, -// 751| view_type_name = $5, -// 752| view_type_loc = mk_loc($loc($5)), -// 753| view_func_name = $12, -// 754| parameters = $13, -// 755| params_loc = mk_loc($loc($13)), -// 756| view_constrs = $7, -// 757| body = $14, -// 758| vis = $2, -// 759| loc = mk_loc($sloc), -// 760| attrs = $1, -// 761| doc = DocString::empty() -// 762| ) -// 763| } -fn yy_action_89(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_54(_last_pos, _args[0:1]) - let _sub_action_1_result = yy_action_34(_args[0].2, _args[1:3]) +// 730| attributes visibility "impl" optional_type_parameters type_name "with" impl_optional_fn binder parameters func_return_type impl_body { +// 731| let (ret_ty, err_ty) = $10 +// 732| TopImpl( +// 733| self_ty = None, +// 734| trait_ = $5, +// 735| method_name = $8, +// 736| quantifiers = $4, +// 737| method_quantifiers = $7, +// 738| params = $9, +// 739| ret_ty~, +// 740| err_ty~, +// 741| body = $11, +// 742| vis = $2, +// 743| loc = mk_loc($sloc), +// 744| attrs = $1, +// 745| doc = DocString::empty() +// 746| ) +// 747| } +fn yy_action_108(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_65(_last_pos, _args[0:1]) + let _sub_action_1_result = yy_action_40(_args[0].2, _args[1:3]) + let _sub_action_2_result = yy_action_20(_args[7].2, _args[8:9]) + guard _args[10].0 is YYObj__Type___ErrorType_(_dollar10) + guard _args[5].0 is YYObj_TypeName(_dollar5) + guard _sub_action_2_result is YYObj_Binder(_dollar8) + guard _args[4].0 is YYObj_List_TypeVarBinder_(_dollar4) + guard _args[7].0 is YYObj_List_TypeVarBinder_(_dollar7) + guard _args[9].0 is YYObj_List_Parameter_(_dollar9) + guard _args[11].0 is YYObj_DeclBody(_dollar11) + guard _sub_action_1_result is YYObj_Visibility(_dollar2) + let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) + let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } + guard _sub_action_0_result is YYObj_List_Attribute_(_dollar1) + YYObj_Impl({(); + let (ret_ty, err_ty) = _dollar10 + TopImpl( + self_ty = None, + trait_ = _dollar5, + method_name = _dollar8, + quantifiers = _dollar4, + method_quantifiers = _dollar7, + params = _dollar9, + ret_ty~, + err_ty~, + body = _dollar11, + vis = _dollar2, + loc = mk_loc((_symbol_start_pos, _end_pos)), + attrs = _dollar1, + doc = DocString::empty() + ) + }) +} + +// file:///./parser.mbty +// 760| attributes visibility "enumview" optional_type_parameters UIDENT "{" list_semis(enum_constructor) "}" "for" type_ "with" binder parameters block_expr { +// 761| TopView( +// 762| quantifiers = $4, +// 763| source_ty = $10, +// 764| view_type_name = $5, +// 765| view_type_loc = mk_loc($loc($5)), +// 766| view_func_name = $12, +// 767| parameters = $13, +// 768| params_loc = mk_loc($loc($13)), +// 769| view_constrs = $7, +// 770| body = $14, +// 771| vis = $2, +// 772| loc = mk_loc($sloc), +// 773| attrs = $1, +// 774| doc = DocString::empty() +// 775| ) +// 776| } +fn yy_action_109(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_65(_last_pos, _args[0:1]) + let _sub_action_1_result = yy_action_40(_args[0].2, _args[1:3]) let _sub_action_2_result = yy_action_15(_args[11].2, _args[12:13]) guard _args[4].0 is YYObj_List_TypeVarBinder_(_dollar4) guard _args[10].0 is YYObj_Type(_dollar10) @@ -3917,22 +4701,78 @@ fn yy_action_89(_last_pos : Position, _args : ArrayView[(YYObj, Position, Positi } // file:///./parser.mbty -// 764| attributes visibility "using" PACKAGE_NAME "{" list_commas(using_binder) "}" { -// 765| TopUsing( -// 766| pkg = { -// 767| name : $4, -// 768| loc : mk_loc($loc($4)) -// 769| }, -// 770| names = $6, +// 760| attributes visibility "enumview" optional_type_parameters UIDENT "{" list_semis(enum_constructor) "}" "for" type_ "with" binder parameters block_expr { +// 761| TopView( +// 762| quantifiers = $4, +// 763| source_ty = $10, +// 764| view_type_name = $5, +// 765| view_type_loc = mk_loc($loc($5)), +// 766| view_func_name = $12, +// 767| parameters = $13, +// 768| params_loc = mk_loc($loc($13)), +// 769| view_constrs = $7, +// 770| body = $14, // 771| vis = $2, -// 772| attrs = $1, -// 773| loc = mk_loc($loc), +// 772| loc = mk_loc($sloc), +// 773| attrs = $1, // 774| doc = DocString::empty() // 775| ) // 776| } -fn yy_action_90(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_54(_last_pos, _args[0:1]) - let _sub_action_1_result = yy_action_34(_args[0].2, _args[1:3]) +fn yy_action_110(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_65(_last_pos, _args[0:1]) + let _sub_action_1_result = yy_action_40(_args[0].2, _args[1:3]) + let _sub_action_2_result = yy_action_20(_args[11].2, _args[12:13]) + guard _args[4].0 is YYObj_List_TypeVarBinder_(_dollar4) + guard _args[10].0 is YYObj_Type(_dollar10) + guard _args[5].0 is YYObj_String(_dollar5) + let _start_pos_of_item4 = _args[5].1 + let _end_pos_of_item4 = _args[5].2 + guard _sub_action_2_result is YYObj_Binder(_dollar12) + guard _args[13].0 is YYObj_List_Parameter_(_dollar13) + let _start_pos_of_item12 = _args[13].1 + let _end_pos_of_item12 = _args[13].2 + guard _args[7].0 is YYObj_List_ConstrDecl_(_dollar7) + guard _args[14].0 is YYObj_Expr(_dollar14) + guard _sub_action_1_result is YYObj_Visibility(_dollar2) + let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) + let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } + guard _sub_action_0_result is YYObj_List_Attribute_(_dollar1) + YYObj_Impl({(); + TopView( + quantifiers = _dollar4, + source_ty = _dollar10, + view_type_name = _dollar5, + view_type_loc = mk_loc((_start_pos_of_item4, _end_pos_of_item4)), + view_func_name = _dollar12, + parameters = _dollar13, + params_loc = mk_loc((_start_pos_of_item12, _end_pos_of_item12)), + view_constrs = _dollar7, + body = _dollar14, + vis = _dollar2, + loc = mk_loc((_symbol_start_pos, _end_pos)), + attrs = _dollar1, + doc = DocString::empty() + ) + }) +} + +// file:///./parser.mbty +// 777| attributes visibility "using" PACKAGE_NAME "{" list_commas(using_binder) "}" { +// 778| TopUsing( +// 779| pkg = { +// 780| name : $4, +// 781| loc : mk_loc($loc($4)) +// 782| }, +// 783| names = $6, +// 784| vis = $2, +// 785| attrs = $1, +// 786| loc = mk_loc($loc), +// 787| doc = DocString::empty() +// 788| ) +// 789| } +fn yy_action_111(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_65(_last_pos, _args[0:1]) + let _sub_action_1_result = yy_action_40(_args[0].2, _args[1:3]) guard _args[4].0 is YYObj_String(_dollar4) let _start_pos_of_item3 = _args[4].1 let _end_pos_of_item3 = _args[4].2 @@ -3957,13 +4797,13 @@ fn yy_action_90(_last_pos : Position, _args : ArrayView[(YYObj, Position, Positi } // file:///./parser.mbty -// 805| attributes is_declare visibility "type" UIDENT optional_type_parameters_no_constraints { -// 806| ($1, $3, $2, $5, mk_loc($loc($5)), $6) -// 807| } -fn yy_action_91(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_54(_last_pos, _args[0:1]) +// 823| attributes is_declare visibility "type" UIDENT optional_type_parameters_no_constraints { +// 824| ($1, $3, $2, $5, mk_loc($loc($5)), $6) +// 825| } +fn yy_action_112(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_65(_last_pos, _args[0:1]) let _sub_action_1_result = yy_action_14(_args[0].2, _args[1:1]) - let _sub_action_2_result = yy_action_34(_args[0].2, _args[1:3]) + let _sub_action_2_result = yy_action_40(_args[0].2, _args[1:3]) guard _sub_action_0_result is YYObj_List_Attribute_(_dollar1) guard _sub_action_2_result is YYObj_Visibility(_dollar3) guard _sub_action_1_result is YYObj_Bool(_dollar2) @@ -3977,11 +4817,11 @@ fn yy_action_91(_last_pos : Position, _args : ArrayView[(YYObj, Position, Positi } // file:///./parser.mbty -// 811| attributes is_declare visibility "suberror" UIDENT { ($1, $3, $2, $5, mk_loc($loc($5))) } -fn yy_action_92(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_54(_last_pos, _args[0:1]) +// 829| attributes is_declare visibility "suberror" UIDENT { ($1, $3, $2, $5, mk_loc($loc($5))) } +fn yy_action_113(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_65(_last_pos, _args[0:1]) let _sub_action_1_result = yy_action_14(_args[0].2, _args[1:1]) - let _sub_action_2_result = yy_action_34(_args[0].2, _args[1:3]) + let _sub_action_2_result = yy_action_40(_args[0].2, _args[1:3]) guard _sub_action_0_result is YYObj_List_Attribute_(_dollar1) guard _sub_action_2_result is YYObj_Visibility(_dollar3) guard _sub_action_1_result is YYObj_Bool(_dollar2) @@ -3992,12 +4832,12 @@ fn yy_action_92(_last_pos : Position, _args : ArrayView[(YYObj, Position, Positi } // file:///./parser.mbty -// 815| attributes visibility "struct" UIDENT optional_type_parameters_no_constraints { -// 816| ($1, $2, $4, mk_loc($loc($4)), $5) -// 817| } -fn yy_action_93(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_54(_last_pos, _args[0:1]) - let _sub_action_1_result = yy_action_34(_args[0].2, _args[1:3]) +// 833| attributes visibility "struct" UIDENT optional_type_parameters_no_constraints { +// 834| ($1, $2, $4, mk_loc($loc($4)), $5) +// 835| } +fn yy_action_114(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_65(_last_pos, _args[0:1]) + let _sub_action_1_result = yy_action_40(_args[0].2, _args[1:3]) guard _sub_action_0_result is YYObj_List_Attribute_(_dollar1) guard _sub_action_1_result is YYObj_Visibility(_dollar2) guard _args[4].0 is YYObj_String(_dollar4) @@ -4010,12 +4850,12 @@ fn yy_action_93(_last_pos : Position, _args : ArrayView[(YYObj, Position, Positi } // file:///./parser.mbty -// 821| attributes visibility "enum" UIDENT optional_type_parameters_no_constraints { -// 822| ($1, $2, $4, mk_loc($loc($4)), $5) -// 823| } -fn yy_action_94(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_54(_last_pos, _args[0:1]) - let _sub_action_1_result = yy_action_34(_args[0].2, _args[1:3]) +// 839| attributes visibility "enum" UIDENT optional_type_parameters_no_constraints { +// 840| ($1, $2, $4, mk_loc($loc($4)), $5) +// 841| } +fn yy_action_115(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_65(_last_pos, _args[0:1]) + let _sub_action_1_result = yy_action_40(_args[0].2, _args[1:3]) guard _sub_action_0_result is YYObj_List_Attribute_(_dollar1) guard _sub_action_1_result is YYObj_Visibility(_dollar2) guard _args[4].0 is YYObj_String(_dollar4) @@ -4028,26 +4868,26 @@ fn yy_action_94(_last_pos : Position, _args : ArrayView[(YYObj, Position, Positi } // file:///./parser.mbty -// 362| attributes "declare" visibility is_async fun_header_generic option(parameters) func_return_type { -// 363| let ((type_name, f), quants) = $5 -// 364| let (return_type, error_type) = $7 -// 365| FunDecl::{ -// 366| type_name, -// 367| name: f, -// 368| is_async : $4, -// 369| quantifiers: quants, -// 370| decl_params: $6, -// 371| params_loc: mk_loc($loc($6)), -// 372| return_type, -// 373| error_type, -// 374| vis: $3, -// 375| doc: DocString::empty(), -// 376| attrs: $1, -// 377| loc : mk_loc($loc) -// 378| } -// 379| } -fn yy_action_95(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_54(_last_pos, _args[0:1]) +// 373| attributes "declare" visibility is_async fun_header_generic option(parameters) func_return_type { +// 374| let ((type_name, f), quants) = $5 +// 375| let (return_type, error_type) = $7 +// 376| FunDecl::{ +// 377| type_name, +// 378| name: f, +// 379| is_async : $4, +// 380| quantifiers: quants, +// 381| decl_params: $6, +// 382| params_loc: mk_loc($loc($6)), +// 383| return_type, +// 384| error_type, +// 385| vis: $3, +// 386| doc: DocString::empty(), +// 387| attrs: $1, +// 388| loc : mk_loc($loc) +// 389| } +// 390| } +fn yy_action_116(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_65(_last_pos, _args[0:1]) let _sub_action_1_result = yy_action_4(_args[1].2, _args[2:2]) let _sub_action_2_result = yy_action_5(_args[1].2, _args[2:3]) guard _args[3].0 is YYObj___TypeName___Binder___List_TypeVarBinder__(_dollar5) @@ -4081,26 +4921,26 @@ fn yy_action_95(_last_pos : Position, _args : ArrayView[(YYObj, Position, Positi } // file:///./parser.mbty -// 362| attributes "declare" visibility is_async fun_header_generic option(parameters) func_return_type { -// 363| let ((type_name, f), quants) = $5 -// 364| let (return_type, error_type) = $7 -// 365| FunDecl::{ -// 366| type_name, -// 367| name: f, -// 368| is_async : $4, -// 369| quantifiers: quants, -// 370| decl_params: $6, -// 371| params_loc: mk_loc($loc($6)), -// 372| return_type, -// 373| error_type, -// 374| vis: $3, -// 375| doc: DocString::empty(), -// 376| attrs: $1, -// 377| loc : mk_loc($loc) -// 378| } -// 379| } -fn yy_action_96(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_54(_last_pos, _args[0:1]) +// 373| attributes "declare" visibility is_async fun_header_generic option(parameters) func_return_type { +// 374| let ((type_name, f), quants) = $5 +// 375| let (return_type, error_type) = $7 +// 376| FunDecl::{ +// 377| type_name, +// 378| name: f, +// 379| is_async : $4, +// 380| quantifiers: quants, +// 381| decl_params: $6, +// 382| params_loc: mk_loc($loc($6)), +// 383| return_type, +// 384| error_type, +// 385| vis: $3, +// 386| doc: DocString::empty(), +// 387| attrs: $1, +// 388| loc : mk_loc($loc) +// 389| } +// 390| } +fn yy_action_117(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_65(_last_pos, _args[0:1]) let _sub_action_1_result = yy_action_4(_args[1].2, _args[2:2]) let _sub_action_2_result = yy_action_8(_args[1].2, _args[2:2]) guard _args[2].0 is YYObj___TypeName___Binder___List_TypeVarBinder__(_dollar5) @@ -4134,26 +4974,26 @@ fn yy_action_96(_last_pos : Position, _args : ArrayView[(YYObj, Position, Positi } // file:///./parser.mbty -// 362| attributes "declare" visibility is_async fun_header_generic option(parameters) func_return_type { -// 363| let ((type_name, f), quants) = $5 -// 364| let (return_type, error_type) = $7 -// 365| FunDecl::{ -// 366| type_name, -// 367| name: f, -// 368| is_async : $4, -// 369| quantifiers: quants, -// 370| decl_params: $6, -// 371| params_loc: mk_loc($loc($6)), -// 372| return_type, -// 373| error_type, -// 374| vis: $3, -// 375| doc: DocString::empty(), -// 376| attrs: $1, -// 377| loc : mk_loc($loc) -// 378| } -// 379| } -fn yy_action_97(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_54(_last_pos, _args[0:1]) +// 373| attributes "declare" visibility is_async fun_header_generic option(parameters) func_return_type { +// 374| let ((type_name, f), quants) = $5 +// 375| let (return_type, error_type) = $7 +// 376| FunDecl::{ +// 377| type_name, +// 378| name: f, +// 379| is_async : $4, +// 380| quantifiers: quants, +// 381| decl_params: $6, +// 382| params_loc: mk_loc($loc($6)), +// 383| return_type, +// 384| error_type, +// 385| vis: $3, +// 386| doc: DocString::empty(), +// 387| attrs: $1, +// 388| loc : mk_loc($loc) +// 389| } +// 390| } +fn yy_action_118(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_65(_last_pos, _args[0:1]) let _sub_action_1_result = yy_action_10(_args[1].2, _args[2:3]) let _sub_action_2_result = yy_action_5(_args[2].2, _args[3:4]) guard _args[4].0 is YYObj___TypeName___Binder___List_TypeVarBinder__(_dollar5) @@ -4187,26 +5027,26 @@ fn yy_action_97(_last_pos : Position, _args : ArrayView[(YYObj, Position, Positi } // file:///./parser.mbty -// 362| attributes "declare" visibility is_async fun_header_generic option(parameters) func_return_type { -// 363| let ((type_name, f), quants) = $5 -// 364| let (return_type, error_type) = $7 -// 365| FunDecl::{ -// 366| type_name, -// 367| name: f, -// 368| is_async : $4, -// 369| quantifiers: quants, -// 370| decl_params: $6, -// 371| params_loc: mk_loc($loc($6)), -// 372| return_type, -// 373| error_type, -// 374| vis: $3, -// 375| doc: DocString::empty(), -// 376| attrs: $1, -// 377| loc : mk_loc($loc) -// 378| } -// 379| } -fn yy_action_98(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_54(_last_pos, _args[0:1]) +// 373| attributes "declare" visibility is_async fun_header_generic option(parameters) func_return_type { +// 374| let ((type_name, f), quants) = $5 +// 375| let (return_type, error_type) = $7 +// 376| FunDecl::{ +// 377| type_name, +// 378| name: f, +// 379| is_async : $4, +// 380| quantifiers: quants, +// 381| decl_params: $6, +// 382| params_loc: mk_loc($loc($6)), +// 383| return_type, +// 384| error_type, +// 385| vis: $3, +// 386| doc: DocString::empty(), +// 387| attrs: $1, +// 388| loc : mk_loc($loc) +// 389| } +// 390| } +fn yy_action_119(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_65(_last_pos, _args[0:1]) let _sub_action_1_result = yy_action_10(_args[1].2, _args[2:3]) let _sub_action_2_result = yy_action_8(_args[2].2, _args[3:3]) guard _args[3].0 is YYObj___TypeName___Binder___List_TypeVarBinder__(_dollar5) @@ -4240,10 +5080,10 @@ fn yy_action_98(_last_pos : Position, _args : ArrayView[(YYObj, Position, Positi } // file:///./parser.mbty -// 423| attributes is_declare visibility "let" binder opt_annot { ($1, false, $2, $3, $5, $6) } -fn yy_action_99(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_54(_last_pos, _args[0:1]) - let _sub_action_1_result = yy_action_100(_args[0].2, _args[1:2]) +// 434| attributes is_declare visibility "let" binder opt_annot { ($1, false, $2, $3, $5, $6) } +fn yy_action_120(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_65(_last_pos, _args[0:1]) + let _sub_action_1_result = yy_action_121(_args[0].2, _args[1:2]) let _sub_action_2_result = yy_action_10(_args[1].2, _args[2:3]) let _sub_action_3_result = yy_action_15(_args[3].2, _args[4:5]) let _sub_action_4_result = yy_action_16(_args[4].2, _args[5:7]) @@ -4256,10 +5096,10 @@ fn yy_action_99(_last_pos : Position, _args : ArrayView[(YYObj, Position, Positi } // file:///./parser.mbty -// 423| attributes is_declare visibility "let" binder opt_annot { ($1, false, $2, $3, $5, $6) } -fn yy_action_101(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_54(_last_pos, _args[0:1]) - let _sub_action_1_result = yy_action_100(_args[0].2, _args[1:2]) +// 434| attributes is_declare visibility "let" binder opt_annot { ($1, false, $2, $3, $5, $6) } +fn yy_action_122(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_65(_last_pos, _args[0:1]) + let _sub_action_1_result = yy_action_121(_args[0].2, _args[1:2]) let _sub_action_2_result = yy_action_10(_args[1].2, _args[2:3]) let _sub_action_3_result = yy_action_15(_args[3].2, _args[4:5]) let _sub_action_4_result = yy_action_18(_args[4].2, _args[5:5]) @@ -4272,10 +5112,42 @@ fn yy_action_101(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 424| attributes is_declare visibility "const" UIDENT opt_annot { ($1, true, $2, $3, Binder::{ name : $5, loc : mk_loc($loc($5)) }, $6) } -fn yy_action_102(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_54(_last_pos, _args[0:1]) - let _sub_action_1_result = yy_action_100(_args[0].2, _args[1:2]) +// 434| attributes is_declare visibility "let" binder opt_annot { ($1, false, $2, $3, $5, $6) } +fn yy_action_123(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_65(_last_pos, _args[0:1]) + let _sub_action_1_result = yy_action_121(_args[0].2, _args[1:2]) + let _sub_action_2_result = yy_action_10(_args[1].2, _args[2:3]) + let _sub_action_3_result = yy_action_20(_args[3].2, _args[4:5]) + let _sub_action_4_result = yy_action_16(_args[4].2, _args[5:7]) + guard _sub_action_0_result is YYObj_List_Attribute_(_dollar1) + guard _sub_action_1_result is YYObj_Bool(_dollar2) + guard _sub_action_2_result is YYObj_Visibility(_dollar3) + guard _sub_action_3_result is YYObj_Binder(_dollar5) + guard _sub_action_4_result is YYObj_Type_(_dollar6) + YYObj__List_Attribute___Bool__Bool__Visibility__Binder__Type__({(); (_dollar1, false, _dollar2, _dollar3, _dollar5, _dollar6) }) +} + +// file:///./parser.mbty +// 434| attributes is_declare visibility "let" binder opt_annot { ($1, false, $2, $3, $5, $6) } +fn yy_action_124(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_65(_last_pos, _args[0:1]) + let _sub_action_1_result = yy_action_121(_args[0].2, _args[1:2]) + let _sub_action_2_result = yy_action_10(_args[1].2, _args[2:3]) + let _sub_action_3_result = yy_action_20(_args[3].2, _args[4:5]) + let _sub_action_4_result = yy_action_18(_args[4].2, _args[5:5]) + guard _sub_action_0_result is YYObj_List_Attribute_(_dollar1) + guard _sub_action_1_result is YYObj_Bool(_dollar2) + guard _sub_action_2_result is YYObj_Visibility(_dollar3) + guard _sub_action_3_result is YYObj_Binder(_dollar5) + guard _sub_action_4_result is YYObj_Type_(_dollar6) + YYObj__List_Attribute___Bool__Bool__Visibility__Binder__Type__({(); (_dollar1, false, _dollar2, _dollar3, _dollar5, _dollar6) }) +} + +// file:///./parser.mbty +// 435| attributes is_declare visibility "const" UIDENT opt_annot { ($1, true, $2, $3, Binder::{ name : $5, loc : mk_loc($loc($5)) }, $6) } +fn yy_action_125(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_65(_last_pos, _args[0:1]) + let _sub_action_1_result = yy_action_121(_args[0].2, _args[1:2]) let _sub_action_2_result = yy_action_10(_args[1].2, _args[2:3]) let _sub_action_3_result = yy_action_16(_args[4].2, _args[5:7]) guard _sub_action_0_result is YYObj_List_Attribute_(_dollar1) @@ -4289,10 +5161,10 @@ fn yy_action_102(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 424| attributes is_declare visibility "const" UIDENT opt_annot { ($1, true, $2, $3, Binder::{ name : $5, loc : mk_loc($loc($5)) }, $6) } -fn yy_action_103(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_54(_last_pos, _args[0:1]) - let _sub_action_1_result = yy_action_100(_args[0].2, _args[1:2]) +// 435| attributes is_declare visibility "const" UIDENT opt_annot { ($1, true, $2, $3, Binder::{ name : $5, loc : mk_loc($loc($5)) }, $6) } +fn yy_action_126(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_65(_last_pos, _args[0:1]) + let _sub_action_1_result = yy_action_121(_args[0].2, _args[1:2]) let _sub_action_2_result = yy_action_10(_args[1].2, _args[2:3]) let _sub_action_3_result = yy_action_18(_args[4].2, _args[5:5]) guard _sub_action_0_result is YYObj_List_Attribute_(_dollar1) @@ -4306,26 +5178,26 @@ fn yy_action_103(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 538| attributes is_declare visibility "extenum" UIDENT optional_type_parameters_no_constraints "{" list_semis(enum_constructor) "}" deriving_directive_list { -// 539| let tycon_loc = mk_loc($loc($5)) -// 540| TopTypeDef( -// 541| TypeDecl::{ -// 542| tycon : $5, -// 543| tycon_loc, -// 544| params : $6, -// 545| components : ExtensibleEnum($8), -// 546| type_vis : $3, -// 547| doc : DocString::empty(), -// 548| deriving : $10, -// 549| loc : mk_loc($sloc), -// 550| attrs : $1, -// 551| is_declare : $2 -// 552| } -// 553| ) -// 554| } -fn yy_action_104(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_54(_last_pos, _args[0:1]) - let _sub_action_1_result = yy_action_100(_args[0].2, _args[1:2]) +// 549| attributes is_declare visibility "extenum" UIDENT optional_type_parameters_no_constraints "{" list_semis(enum_constructor) "}" deriving_directive_list { +// 550| let tycon_loc = mk_loc($loc($5)) +// 551| TopTypeDef( +// 552| TypeDecl::{ +// 553| tycon : $5, +// 554| tycon_loc, +// 555| params : $6, +// 556| components : ExtensibleEnum($8), +// 557| type_vis : $3, +// 558| doc : DocString::empty(), +// 559| deriving : $10, +// 560| loc : mk_loc($sloc), +// 561| attrs : $1, +// 562| is_declare : $2 +// 563| } +// 564| ) +// 565| } +fn yy_action_127(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_65(_last_pos, _args[0:1]) + let _sub_action_1_result = yy_action_121(_args[0].2, _args[1:2]) let _sub_action_2_result = yy_action_10(_args[1].2, _args[2:3]) let _start_pos_of_item4 = _args[4].1 let _end_pos_of_item4 = _args[4].2 @@ -4358,26 +5230,26 @@ fn yy_action_104(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 555| attributes is_declare visibility "extenum" extenum_extension_target "+=" "{" list_semis(enum_constructor) "}" deriving_directive_list { -// 556| let (tycon, tycon_loc, params, target) = $5 -// 557| TopTypeDef( -// 558| TypeDecl::{ -// 559| tycon, -// 560| tycon_loc, -// 561| params, -// 562| components : ExtendEnum(target~, constructors = $8), -// 563| type_vis : $3, -// 564| doc : DocString::empty(), -// 565| deriving : $10, -// 566| loc : mk_loc($sloc), -// 567| attrs : $1, -// 568| is_declare : $2 -// 569| } -// 570| ) -// 571| } -fn yy_action_105(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_54(_last_pos, _args[0:1]) - let _sub_action_1_result = yy_action_100(_args[0].2, _args[1:2]) +// 566| attributes is_declare visibility "extenum" extenum_extension_target "+=" "{" list_semis(enum_constructor) "}" deriving_directive_list { +// 567| let (tycon, tycon_loc, params, target) = $5 +// 568| TopTypeDef( +// 569| TypeDecl::{ +// 570| tycon, +// 571| tycon_loc, +// 572| params, +// 573| components : ExtendEnum(target~, constructors = $8), +// 574| type_vis : $3, +// 575| doc : DocString::empty(), +// 576| deriving : $10, +// 577| loc : mk_loc($sloc), +// 578| attrs : $1, +// 579| is_declare : $2 +// 580| } +// 581| ) +// 582| } +fn yy_action_128(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_65(_last_pos, _args[0:1]) + let _sub_action_1_result = yy_action_121(_args[0].2, _args[1:2]) let _sub_action_2_result = yy_action_10(_args[1].2, _args[2:3]) guard _args[4].0 is YYObj__String__Location__List_TypeDeclBinder___TypeName_(_dollar5) guard _args[7].0 is YYObj_List_ConstrDecl_(_dollar8) @@ -4407,28 +5279,28 @@ fn yy_action_105(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 654| attributes is_declare visibility "trait" UIDENT option(preceded(COLON, separated_nonempty_list(PLUS, tvar_constraint))) "{" list_semis(trait_method_decl) "}" { -// 655| let name = Binder::{ name: $5, loc: mk_loc($loc($4)) } -// 656| let supers = match $6 { -// 657| None => @list.empty() -// 658| Some(supers) => supers -// 659| } -// 660| TopTrait( -// 661| TraitDecl::{ -// 662| name, -// 663| supers, -// 664| methods: $8, -// 665| vis: $3, -// 666| loc: mk_loc($sloc), -// 667| attrs: $1, -// 668| doc : DocString::empty(), -// 669| is_declare : $2 -// 670| } -// 671| ) -// 672| } -fn yy_action_106(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_54(_last_pos, _args[0:1]) - let _sub_action_1_result = yy_action_100(_args[0].2, _args[1:2]) +// 665| attributes is_declare visibility "trait" UIDENT option(preceded(COLON, separated_nonempty_list(PLUS, tvar_constraint))) "{" list_semis(trait_method_decl) "}" { +// 666| let name = Binder::{ name: $5, loc: mk_loc($loc($4)) } +// 667| let supers = match $6 { +// 668| None => @list.empty() +// 669| Some(supers) => supers +// 670| } +// 671| TopTrait( +// 672| TraitDecl::{ +// 673| name, +// 674| supers, +// 675| methods: $8, +// 676| vis: $3, +// 677| loc: mk_loc($sloc), +// 678| attrs: $1, +// 679| doc : DocString::empty(), +// 680| is_declare : $2 +// 681| } +// 682| ) +// 683| } +fn yy_action_129(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_65(_last_pos, _args[0:1]) + let _sub_action_1_result = yy_action_121(_args[0].2, _args[1:2]) let _sub_action_2_result = yy_action_10(_args[1].2, _args[2:3]) guard _args[4].0 is YYObj_String(_dollar5) let _start_pos_of_item3 = _args[3].1 @@ -4462,21 +5334,21 @@ fn yy_action_106(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 735| attributes is_declare visibility "impl" optional_type_parameters type_name "for" type_ { -// 736| TopImplRelation( -// 737| self_ty = $8, -// 738| trait_ = $6, -// 739| quantifiers = $5, -// 740| vis = $3, -// 741| attrs = $1, -// 742| loc = mk_loc($sloc), -// 743| doc = DocString::empty(), -// 744| is_declare = $2 -// 745| ) -// 746| } -fn yy_action_107(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_54(_last_pos, _args[0:1]) - let _sub_action_1_result = yy_action_100(_args[0].2, _args[1:2]) +// 748| attributes is_declare visibility "impl" optional_type_parameters type_name "for" type_ { +// 749| TopImplRelation( +// 750| self_ty = $8, +// 751| trait_ = $6, +// 752| quantifiers = $5, +// 753| vis = $3, +// 754| attrs = $1, +// 755| loc = mk_loc($sloc), +// 756| doc = DocString::empty(), +// 757| is_declare = $2 +// 758| ) +// 759| } +fn yy_action_130(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_65(_last_pos, _args[0:1]) + let _sub_action_1_result = yy_action_121(_args[0].2, _args[1:2]) let _sub_action_2_result = yy_action_10(_args[1].2, _args[2:3]) guard _args[7].0 is YYObj_Type(_dollar8) guard _args[5].0 is YYObj_TypeName(_dollar6) @@ -4501,12 +5373,12 @@ fn yy_action_107(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 805| attributes is_declare visibility "type" UIDENT optional_type_parameters_no_constraints { -// 806| ($1, $3, $2, $5, mk_loc($loc($5)), $6) -// 807| } -fn yy_action_108(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_54(_last_pos, _args[0:1]) - let _sub_action_1_result = yy_action_100(_args[0].2, _args[1:2]) +// 823| attributes is_declare visibility "type" UIDENT optional_type_parameters_no_constraints { +// 824| ($1, $3, $2, $5, mk_loc($loc($5)), $6) +// 825| } +fn yy_action_131(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_65(_last_pos, _args[0:1]) + let _sub_action_1_result = yy_action_121(_args[0].2, _args[1:2]) let _sub_action_2_result = yy_action_10(_args[1].2, _args[2:3]) guard _sub_action_0_result is YYObj_List_Attribute_(_dollar1) guard _sub_action_2_result is YYObj_Visibility(_dollar3) @@ -4521,10 +5393,10 @@ fn yy_action_108(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 811| attributes is_declare visibility "suberror" UIDENT { ($1, $3, $2, $5, mk_loc($loc($5))) } -fn yy_action_109(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_54(_last_pos, _args[0:1]) - let _sub_action_1_result = yy_action_100(_args[0].2, _args[1:2]) +// 829| attributes is_declare visibility "suberror" UIDENT { ($1, $3, $2, $5, mk_loc($loc($5))) } +fn yy_action_132(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_65(_last_pos, _args[0:1]) + let _sub_action_1_result = yy_action_121(_args[0].2, _args[1:2]) let _sub_action_2_result = yy_action_10(_args[1].2, _args[2:3]) guard _sub_action_0_result is YYObj_List_Attribute_(_dollar1) guard _sub_action_2_result is YYObj_Visibility(_dollar3) @@ -4536,27 +5408,27 @@ fn yy_action_109(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 362| attributes "declare" visibility is_async fun_header_generic option(parameters) func_return_type { -// 363| let ((type_name, f), quants) = $5 -// 364| let (return_type, error_type) = $7 -// 365| FunDecl::{ -// 366| type_name, -// 367| name: f, -// 368| is_async : $4, -// 369| quantifiers: quants, -// 370| decl_params: $6, -// 371| params_loc: mk_loc($loc($6)), -// 372| return_type, -// 373| error_type, -// 374| vis: $3, -// 375| doc: DocString::empty(), -// 376| attrs: $1, -// 377| loc : mk_loc($loc) -// 378| } -// 379| } -fn yy_action_110(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_54(_last_pos, _args[0:1]) - let _sub_action_1_result = yy_action_34(_args[1].2, _args[2:4]) +// 373| attributes "declare" visibility is_async fun_header_generic option(parameters) func_return_type { +// 374| let ((type_name, f), quants) = $5 +// 375| let (return_type, error_type) = $7 +// 376| FunDecl::{ +// 377| type_name, +// 378| name: f, +// 379| is_async : $4, +// 380| quantifiers: quants, +// 381| decl_params: $6, +// 382| params_loc: mk_loc($loc($6)), +// 383| return_type, +// 384| error_type, +// 385| vis: $3, +// 386| doc: DocString::empty(), +// 387| attrs: $1, +// 388| loc : mk_loc($loc) +// 389| } +// 390| } +fn yy_action_133(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_65(_last_pos, _args[0:1]) + let _sub_action_1_result = yy_action_40(_args[1].2, _args[2:4]) let _sub_action_2_result = yy_action_5(_args[3].2, _args[4:5]) guard _args[5].0 is YYObj___TypeName___Binder___List_TypeVarBinder__(_dollar5) guard _args[7].0 is YYObj__Type___ErrorType_(_dollar7) @@ -4589,27 +5461,27 @@ fn yy_action_110(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 362| attributes "declare" visibility is_async fun_header_generic option(parameters) func_return_type { -// 363| let ((type_name, f), quants) = $5 -// 364| let (return_type, error_type) = $7 -// 365| FunDecl::{ -// 366| type_name, -// 367| name: f, -// 368| is_async : $4, -// 369| quantifiers: quants, -// 370| decl_params: $6, -// 371| params_loc: mk_loc($loc($6)), -// 372| return_type, -// 373| error_type, -// 374| vis: $3, -// 375| doc: DocString::empty(), -// 376| attrs: $1, -// 377| loc : mk_loc($loc) -// 378| } -// 379| } -fn yy_action_111(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_54(_last_pos, _args[0:1]) - let _sub_action_1_result = yy_action_34(_args[1].2, _args[2:4]) +// 373| attributes "declare" visibility is_async fun_header_generic option(parameters) func_return_type { +// 374| let ((type_name, f), quants) = $5 +// 375| let (return_type, error_type) = $7 +// 376| FunDecl::{ +// 377| type_name, +// 378| name: f, +// 379| is_async : $4, +// 380| quantifiers: quants, +// 381| decl_params: $6, +// 382| params_loc: mk_loc($loc($6)), +// 383| return_type, +// 384| error_type, +// 385| vis: $3, +// 386| doc: DocString::empty(), +// 387| attrs: $1, +// 388| loc : mk_loc($loc) +// 389| } +// 390| } +fn yy_action_134(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_65(_last_pos, _args[0:1]) + let _sub_action_1_result = yy_action_40(_args[1].2, _args[2:4]) let _sub_action_2_result = yy_action_8(_args[3].2, _args[4:4]) guard _args[4].0 is YYObj___TypeName___Binder___List_TypeVarBinder__(_dollar5) guard _args[6].0 is YYObj__Type___ErrorType_(_dollar7) @@ -4642,11 +5514,11 @@ fn yy_action_111(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 423| attributes is_declare visibility "let" binder opt_annot { ($1, false, $2, $3, $5, $6) } -fn yy_action_112(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_54(_last_pos, _args[0:1]) - let _sub_action_1_result = yy_action_100(_args[0].2, _args[1:2]) - let _sub_action_2_result = yy_action_34(_args[1].2, _args[2:4]) +// 434| attributes is_declare visibility "let" binder opt_annot { ($1, false, $2, $3, $5, $6) } +fn yy_action_135(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_65(_last_pos, _args[0:1]) + let _sub_action_1_result = yy_action_121(_args[0].2, _args[1:2]) + let _sub_action_2_result = yy_action_40(_args[1].2, _args[2:4]) let _sub_action_3_result = yy_action_15(_args[4].2, _args[5:6]) let _sub_action_4_result = yy_action_16(_args[5].2, _args[6:8]) guard _sub_action_0_result is YYObj_List_Attribute_(_dollar1) @@ -4658,11 +5530,11 @@ fn yy_action_112(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 423| attributes is_declare visibility "let" binder opt_annot { ($1, false, $2, $3, $5, $6) } -fn yy_action_113(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_54(_last_pos, _args[0:1]) - let _sub_action_1_result = yy_action_100(_args[0].2, _args[1:2]) - let _sub_action_2_result = yy_action_34(_args[1].2, _args[2:4]) +// 434| attributes is_declare visibility "let" binder opt_annot { ($1, false, $2, $3, $5, $6) } +fn yy_action_136(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_65(_last_pos, _args[0:1]) + let _sub_action_1_result = yy_action_121(_args[0].2, _args[1:2]) + let _sub_action_2_result = yy_action_40(_args[1].2, _args[2:4]) let _sub_action_3_result = yy_action_15(_args[4].2, _args[5:6]) let _sub_action_4_result = yy_action_18(_args[5].2, _args[6:6]) guard _sub_action_0_result is YYObj_List_Attribute_(_dollar1) @@ -4674,61 +5546,93 @@ fn yy_action_113(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 424| attributes is_declare visibility "const" UIDENT opt_annot { ($1, true, $2, $3, Binder::{ name : $5, loc : mk_loc($loc($5)) }, $6) } -fn yy_action_114(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_54(_last_pos, _args[0:1]) - let _sub_action_1_result = yy_action_100(_args[0].2, _args[1:2]) - let _sub_action_2_result = yy_action_34(_args[1].2, _args[2:4]) - let _sub_action_3_result = yy_action_16(_args[5].2, _args[6:8]) +// 434| attributes is_declare visibility "let" binder opt_annot { ($1, false, $2, $3, $5, $6) } +fn yy_action_137(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_65(_last_pos, _args[0:1]) + let _sub_action_1_result = yy_action_121(_args[0].2, _args[1:2]) + let _sub_action_2_result = yy_action_40(_args[1].2, _args[2:4]) + let _sub_action_3_result = yy_action_20(_args[4].2, _args[5:6]) + let _sub_action_4_result = yy_action_16(_args[5].2, _args[6:8]) guard _sub_action_0_result is YYObj_List_Attribute_(_dollar1) guard _sub_action_1_result is YYObj_Bool(_dollar2) guard _sub_action_2_result is YYObj_Visibility(_dollar3) - guard _args[5].0 is YYObj_String(_dollar5) - let _start_pos_of_item4 = _args[5].1 - let _end_pos_of_item4 = _args[5].2 - guard _sub_action_3_result is YYObj_Type_(_dollar6) - YYObj__List_Attribute___Bool__Bool__Visibility__Binder__Type__({(); (_dollar1, true, _dollar2, _dollar3, Binder::{ name : _dollar5, loc : mk_loc((_start_pos_of_item4, _end_pos_of_item4)) }, _dollar6) }) + guard _sub_action_3_result is YYObj_Binder(_dollar5) + guard _sub_action_4_result is YYObj_Type_(_dollar6) + YYObj__List_Attribute___Bool__Bool__Visibility__Binder__Type__({(); (_dollar1, false, _dollar2, _dollar3, _dollar5, _dollar6) }) } // file:///./parser.mbty -// 424| attributes is_declare visibility "const" UIDENT opt_annot { ($1, true, $2, $3, Binder::{ name : $5, loc : mk_loc($loc($5)) }, $6) } -fn yy_action_115(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_54(_last_pos, _args[0:1]) - let _sub_action_1_result = yy_action_100(_args[0].2, _args[1:2]) - let _sub_action_2_result = yy_action_34(_args[1].2, _args[2:4]) - let _sub_action_3_result = yy_action_18(_args[5].2, _args[6:6]) +// 434| attributes is_declare visibility "let" binder opt_annot { ($1, false, $2, $3, $5, $6) } +fn yy_action_138(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_65(_last_pos, _args[0:1]) + let _sub_action_1_result = yy_action_121(_args[0].2, _args[1:2]) + let _sub_action_2_result = yy_action_40(_args[1].2, _args[2:4]) + let _sub_action_3_result = yy_action_20(_args[4].2, _args[5:6]) + let _sub_action_4_result = yy_action_18(_args[5].2, _args[6:6]) guard _sub_action_0_result is YYObj_List_Attribute_(_dollar1) guard _sub_action_1_result is YYObj_Bool(_dollar2) guard _sub_action_2_result is YYObj_Visibility(_dollar3) - guard _args[5].0 is YYObj_String(_dollar5) - let _start_pos_of_item4 = _args[5].1 - let _end_pos_of_item4 = _args[5].2 - guard _sub_action_3_result is YYObj_Type_(_dollar6) - YYObj__List_Attribute___Bool__Bool__Visibility__Binder__Type__({(); (_dollar1, true, _dollar2, _dollar3, Binder::{ name : _dollar5, loc : mk_loc((_start_pos_of_item4, _end_pos_of_item4)) }, _dollar6) }) + guard _sub_action_3_result is YYObj_Binder(_dollar5) + guard _sub_action_4_result is YYObj_Type_(_dollar6) + YYObj__List_Attribute___Bool__Bool__Visibility__Binder__Type__({(); (_dollar1, false, _dollar2, _dollar3, _dollar5, _dollar6) }) } // file:///./parser.mbty -// 538| attributes is_declare visibility "extenum" UIDENT optional_type_parameters_no_constraints "{" list_semis(enum_constructor) "}" deriving_directive_list { -// 539| let tycon_loc = mk_loc($loc($5)) -// 540| TopTypeDef( -// 541| TypeDecl::{ -// 542| tycon : $5, -// 543| tycon_loc, -// 544| params : $6, -// 545| components : ExtensibleEnum($8), -// 546| type_vis : $3, -// 547| doc : DocString::empty(), -// 548| deriving : $10, -// 549| loc : mk_loc($sloc), -// 550| attrs : $1, -// 551| is_declare : $2 -// 552| } -// 553| ) -// 554| } -fn yy_action_116(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_54(_last_pos, _args[0:1]) - let _sub_action_1_result = yy_action_100(_args[0].2, _args[1:2]) - let _sub_action_2_result = yy_action_34(_args[1].2, _args[2:4]) +// 435| attributes is_declare visibility "const" UIDENT opt_annot { ($1, true, $2, $3, Binder::{ name : $5, loc : mk_loc($loc($5)) }, $6) } +fn yy_action_139(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_65(_last_pos, _args[0:1]) + let _sub_action_1_result = yy_action_121(_args[0].2, _args[1:2]) + let _sub_action_2_result = yy_action_40(_args[1].2, _args[2:4]) + let _sub_action_3_result = yy_action_16(_args[5].2, _args[6:8]) + guard _sub_action_0_result is YYObj_List_Attribute_(_dollar1) + guard _sub_action_1_result is YYObj_Bool(_dollar2) + guard _sub_action_2_result is YYObj_Visibility(_dollar3) + guard _args[5].0 is YYObj_String(_dollar5) + let _start_pos_of_item4 = _args[5].1 + let _end_pos_of_item4 = _args[5].2 + guard _sub_action_3_result is YYObj_Type_(_dollar6) + YYObj__List_Attribute___Bool__Bool__Visibility__Binder__Type__({(); (_dollar1, true, _dollar2, _dollar3, Binder::{ name : _dollar5, loc : mk_loc((_start_pos_of_item4, _end_pos_of_item4)) }, _dollar6) }) +} + +// file:///./parser.mbty +// 435| attributes is_declare visibility "const" UIDENT opt_annot { ($1, true, $2, $3, Binder::{ name : $5, loc : mk_loc($loc($5)) }, $6) } +fn yy_action_140(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_65(_last_pos, _args[0:1]) + let _sub_action_1_result = yy_action_121(_args[0].2, _args[1:2]) + let _sub_action_2_result = yy_action_40(_args[1].2, _args[2:4]) + let _sub_action_3_result = yy_action_18(_args[5].2, _args[6:6]) + guard _sub_action_0_result is YYObj_List_Attribute_(_dollar1) + guard _sub_action_1_result is YYObj_Bool(_dollar2) + guard _sub_action_2_result is YYObj_Visibility(_dollar3) + guard _args[5].0 is YYObj_String(_dollar5) + let _start_pos_of_item4 = _args[5].1 + let _end_pos_of_item4 = _args[5].2 + guard _sub_action_3_result is YYObj_Type_(_dollar6) + YYObj__List_Attribute___Bool__Bool__Visibility__Binder__Type__({(); (_dollar1, true, _dollar2, _dollar3, Binder::{ name : _dollar5, loc : mk_loc((_start_pos_of_item4, _end_pos_of_item4)) }, _dollar6) }) +} + +// file:///./parser.mbty +// 549| attributes is_declare visibility "extenum" UIDENT optional_type_parameters_no_constraints "{" list_semis(enum_constructor) "}" deriving_directive_list { +// 550| let tycon_loc = mk_loc($loc($5)) +// 551| TopTypeDef( +// 552| TypeDecl::{ +// 553| tycon : $5, +// 554| tycon_loc, +// 555| params : $6, +// 556| components : ExtensibleEnum($8), +// 557| type_vis : $3, +// 558| doc : DocString::empty(), +// 559| deriving : $10, +// 560| loc : mk_loc($sloc), +// 561| attrs : $1, +// 562| is_declare : $2 +// 563| } +// 564| ) +// 565| } +fn yy_action_141(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_65(_last_pos, _args[0:1]) + let _sub_action_1_result = yy_action_121(_args[0].2, _args[1:2]) + let _sub_action_2_result = yy_action_40(_args[1].2, _args[2:4]) let _start_pos_of_item4 = _args[5].1 let _end_pos_of_item4 = _args[5].2 guard _args[5].0 is YYObj_String(_dollar5) @@ -4760,27 +5664,27 @@ fn yy_action_116(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 555| attributes is_declare visibility "extenum" extenum_extension_target "+=" "{" list_semis(enum_constructor) "}" deriving_directive_list { -// 556| let (tycon, tycon_loc, params, target) = $5 -// 557| TopTypeDef( -// 558| TypeDecl::{ -// 559| tycon, -// 560| tycon_loc, -// 561| params, -// 562| components : ExtendEnum(target~, constructors = $8), -// 563| type_vis : $3, -// 564| doc : DocString::empty(), -// 565| deriving : $10, -// 566| loc : mk_loc($sloc), -// 567| attrs : $1, -// 568| is_declare : $2 -// 569| } -// 570| ) -// 571| } -fn yy_action_117(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_54(_last_pos, _args[0:1]) - let _sub_action_1_result = yy_action_100(_args[0].2, _args[1:2]) - let _sub_action_2_result = yy_action_34(_args[1].2, _args[2:4]) +// 566| attributes is_declare visibility "extenum" extenum_extension_target "+=" "{" list_semis(enum_constructor) "}" deriving_directive_list { +// 567| let (tycon, tycon_loc, params, target) = $5 +// 568| TopTypeDef( +// 569| TypeDecl::{ +// 570| tycon, +// 571| tycon_loc, +// 572| params, +// 573| components : ExtendEnum(target~, constructors = $8), +// 574| type_vis : $3, +// 575| doc : DocString::empty(), +// 576| deriving : $10, +// 577| loc : mk_loc($sloc), +// 578| attrs : $1, +// 579| is_declare : $2 +// 580| } +// 581| ) +// 582| } +fn yy_action_142(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_65(_last_pos, _args[0:1]) + let _sub_action_1_result = yy_action_121(_args[0].2, _args[1:2]) + let _sub_action_2_result = yy_action_40(_args[1].2, _args[2:4]) guard _args[5].0 is YYObj__String__Location__List_TypeDeclBinder___TypeName_(_dollar5) guard _args[8].0 is YYObj_List_ConstrDecl_(_dollar8) guard _sub_action_2_result is YYObj_Visibility(_dollar3) @@ -4809,29 +5713,29 @@ fn yy_action_117(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 654| attributes is_declare visibility "trait" UIDENT option(preceded(COLON, separated_nonempty_list(PLUS, tvar_constraint))) "{" list_semis(trait_method_decl) "}" { -// 655| let name = Binder::{ name: $5, loc: mk_loc($loc($4)) } -// 656| let supers = match $6 { -// 657| None => @list.empty() -// 658| Some(supers) => supers -// 659| } -// 660| TopTrait( -// 661| TraitDecl::{ -// 662| name, -// 663| supers, -// 664| methods: $8, -// 665| vis: $3, -// 666| loc: mk_loc($sloc), -// 667| attrs: $1, -// 668| doc : DocString::empty(), -// 669| is_declare : $2 -// 670| } -// 671| ) -// 672| } -fn yy_action_118(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_54(_last_pos, _args[0:1]) - let _sub_action_1_result = yy_action_100(_args[0].2, _args[1:2]) - let _sub_action_2_result = yy_action_34(_args[1].2, _args[2:4]) +// 665| attributes is_declare visibility "trait" UIDENT option(preceded(COLON, separated_nonempty_list(PLUS, tvar_constraint))) "{" list_semis(trait_method_decl) "}" { +// 666| let name = Binder::{ name: $5, loc: mk_loc($loc($4)) } +// 667| let supers = match $6 { +// 668| None => @list.empty() +// 669| Some(supers) => supers +// 670| } +// 671| TopTrait( +// 672| TraitDecl::{ +// 673| name, +// 674| supers, +// 675| methods: $8, +// 676| vis: $3, +// 677| loc: mk_loc($sloc), +// 678| attrs: $1, +// 679| doc : DocString::empty(), +// 680| is_declare : $2 +// 681| } +// 682| ) +// 683| } +fn yy_action_143(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_65(_last_pos, _args[0:1]) + let _sub_action_1_result = yy_action_121(_args[0].2, _args[1:2]) + let _sub_action_2_result = yy_action_40(_args[1].2, _args[2:4]) guard _args[5].0 is YYObj_String(_dollar5) let _start_pos_of_item3 = _args[4].1 let _end_pos_of_item3 = _args[4].2 @@ -4864,22 +5768,22 @@ fn yy_action_118(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 735| attributes is_declare visibility "impl" optional_type_parameters type_name "for" type_ { -// 736| TopImplRelation( -// 737| self_ty = $8, -// 738| trait_ = $6, -// 739| quantifiers = $5, -// 740| vis = $3, -// 741| attrs = $1, -// 742| loc = mk_loc($sloc), -// 743| doc = DocString::empty(), -// 744| is_declare = $2 -// 745| ) -// 746| } -fn yy_action_119(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_54(_last_pos, _args[0:1]) - let _sub_action_1_result = yy_action_100(_args[0].2, _args[1:2]) - let _sub_action_2_result = yy_action_34(_args[1].2, _args[2:4]) +// 748| attributes is_declare visibility "impl" optional_type_parameters type_name "for" type_ { +// 749| TopImplRelation( +// 750| self_ty = $8, +// 751| trait_ = $6, +// 752| quantifiers = $5, +// 753| vis = $3, +// 754| attrs = $1, +// 755| loc = mk_loc($sloc), +// 756| doc = DocString::empty(), +// 757| is_declare = $2 +// 758| ) +// 759| } +fn yy_action_144(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_65(_last_pos, _args[0:1]) + let _sub_action_1_result = yy_action_121(_args[0].2, _args[1:2]) + let _sub_action_2_result = yy_action_40(_args[1].2, _args[2:4]) guard _args[8].0 is YYObj_Type(_dollar8) guard _args[6].0 is YYObj_TypeName(_dollar6) guard _args[5].0 is YYObj_List_TypeVarBinder_(_dollar5) @@ -4903,13 +5807,13 @@ fn yy_action_119(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 805| attributes is_declare visibility "type" UIDENT optional_type_parameters_no_constraints { -// 806| ($1, $3, $2, $5, mk_loc($loc($5)), $6) -// 807| } -fn yy_action_120(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_54(_last_pos, _args[0:1]) - let _sub_action_1_result = yy_action_100(_args[0].2, _args[1:2]) - let _sub_action_2_result = yy_action_34(_args[1].2, _args[2:4]) +// 823| attributes is_declare visibility "type" UIDENT optional_type_parameters_no_constraints { +// 824| ($1, $3, $2, $5, mk_loc($loc($5)), $6) +// 825| } +fn yy_action_145(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_65(_last_pos, _args[0:1]) + let _sub_action_1_result = yy_action_121(_args[0].2, _args[1:2]) + let _sub_action_2_result = yy_action_40(_args[1].2, _args[2:4]) guard _sub_action_0_result is YYObj_List_Attribute_(_dollar1) guard _sub_action_2_result is YYObj_Visibility(_dollar3) guard _sub_action_1_result is YYObj_Bool(_dollar2) @@ -4923,11 +5827,11 @@ fn yy_action_120(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 811| attributes is_declare visibility "suberror" UIDENT { ($1, $3, $2, $5, mk_loc($loc($5))) } -fn yy_action_121(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_54(_last_pos, _args[0:1]) - let _sub_action_1_result = yy_action_100(_args[0].2, _args[1:2]) - let _sub_action_2_result = yy_action_34(_args[1].2, _args[2:4]) +// 829| attributes is_declare visibility "suberror" UIDENT { ($1, $3, $2, $5, mk_loc($loc($5))) } +fn yy_action_146(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_65(_last_pos, _args[0:1]) + let _sub_action_1_result = yy_action_121(_args[0].2, _args[1:2]) + let _sub_action_2_result = yy_action_40(_args[1].2, _args[2:4]) guard _sub_action_0_result is YYObj_List_Attribute_(_dollar1) guard _sub_action_2_result is YYObj_Visibility(_dollar3) guard _sub_action_1_result is YYObj_Bool(_dollar2) @@ -4938,10 +5842,10 @@ fn yy_action_121(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 423| attributes is_declare visibility "let" binder opt_annot { ($1, false, $2, $3, $5, $6) } -fn yy_action_122(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_54(_last_pos, _args[0:1]) - let _sub_action_1_result = yy_action_100(_args[0].2, _args[1:2]) +// 434| attributes is_declare visibility "let" binder opt_annot { ($1, false, $2, $3, $5, $6) } +fn yy_action_147(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_65(_last_pos, _args[0:1]) + let _sub_action_1_result = yy_action_121(_args[0].2, _args[1:2]) let _sub_action_2_result = yy_action_4(_args[1].2, _args[2:2]) let _sub_action_3_result = yy_action_15(_args[2].2, _args[3:4]) let _sub_action_4_result = yy_action_16(_args[3].2, _args[4:6]) @@ -4954,10 +5858,10 @@ fn yy_action_122(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 423| attributes is_declare visibility "let" binder opt_annot { ($1, false, $2, $3, $5, $6) } -fn yy_action_123(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_54(_last_pos, _args[0:1]) - let _sub_action_1_result = yy_action_100(_args[0].2, _args[1:2]) +// 434| attributes is_declare visibility "let" binder opt_annot { ($1, false, $2, $3, $5, $6) } +fn yy_action_148(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_65(_last_pos, _args[0:1]) + let _sub_action_1_result = yy_action_121(_args[0].2, _args[1:2]) let _sub_action_2_result = yy_action_4(_args[1].2, _args[2:2]) let _sub_action_3_result = yy_action_15(_args[2].2, _args[3:4]) let _sub_action_4_result = yy_action_18(_args[3].2, _args[4:4]) @@ -4970,10 +5874,42 @@ fn yy_action_123(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 424| attributes is_declare visibility "const" UIDENT opt_annot { ($1, true, $2, $3, Binder::{ name : $5, loc : mk_loc($loc($5)) }, $6) } -fn yy_action_124(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_54(_last_pos, _args[0:1]) - let _sub_action_1_result = yy_action_100(_args[0].2, _args[1:2]) +// 434| attributes is_declare visibility "let" binder opt_annot { ($1, false, $2, $3, $5, $6) } +fn yy_action_149(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_65(_last_pos, _args[0:1]) + let _sub_action_1_result = yy_action_121(_args[0].2, _args[1:2]) + let _sub_action_2_result = yy_action_4(_args[1].2, _args[2:2]) + let _sub_action_3_result = yy_action_20(_args[2].2, _args[3:4]) + let _sub_action_4_result = yy_action_16(_args[3].2, _args[4:6]) + guard _sub_action_0_result is YYObj_List_Attribute_(_dollar1) + guard _sub_action_1_result is YYObj_Bool(_dollar2) + guard _sub_action_2_result is YYObj_Visibility(_dollar3) + guard _sub_action_3_result is YYObj_Binder(_dollar5) + guard _sub_action_4_result is YYObj_Type_(_dollar6) + YYObj__List_Attribute___Bool__Bool__Visibility__Binder__Type__({(); (_dollar1, false, _dollar2, _dollar3, _dollar5, _dollar6) }) +} + +// file:///./parser.mbty +// 434| attributes is_declare visibility "let" binder opt_annot { ($1, false, $2, $3, $5, $6) } +fn yy_action_150(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_65(_last_pos, _args[0:1]) + let _sub_action_1_result = yy_action_121(_args[0].2, _args[1:2]) + let _sub_action_2_result = yy_action_4(_args[1].2, _args[2:2]) + let _sub_action_3_result = yy_action_20(_args[2].2, _args[3:4]) + let _sub_action_4_result = yy_action_18(_args[3].2, _args[4:4]) + guard _sub_action_0_result is YYObj_List_Attribute_(_dollar1) + guard _sub_action_1_result is YYObj_Bool(_dollar2) + guard _sub_action_2_result is YYObj_Visibility(_dollar3) + guard _sub_action_3_result is YYObj_Binder(_dollar5) + guard _sub_action_4_result is YYObj_Type_(_dollar6) + YYObj__List_Attribute___Bool__Bool__Visibility__Binder__Type__({(); (_dollar1, false, _dollar2, _dollar3, _dollar5, _dollar6) }) +} + +// file:///./parser.mbty +// 435| attributes is_declare visibility "const" UIDENT opt_annot { ($1, true, $2, $3, Binder::{ name : $5, loc : mk_loc($loc($5)) }, $6) } +fn yy_action_151(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_65(_last_pos, _args[0:1]) + let _sub_action_1_result = yy_action_121(_args[0].2, _args[1:2]) let _sub_action_2_result = yy_action_4(_args[1].2, _args[2:2]) let _sub_action_3_result = yy_action_16(_args[3].2, _args[4:6]) guard _sub_action_0_result is YYObj_List_Attribute_(_dollar1) @@ -4987,10 +5923,10 @@ fn yy_action_124(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 424| attributes is_declare visibility "const" UIDENT opt_annot { ($1, true, $2, $3, Binder::{ name : $5, loc : mk_loc($loc($5)) }, $6) } -fn yy_action_125(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_54(_last_pos, _args[0:1]) - let _sub_action_1_result = yy_action_100(_args[0].2, _args[1:2]) +// 435| attributes is_declare visibility "const" UIDENT opt_annot { ($1, true, $2, $3, Binder::{ name : $5, loc : mk_loc($loc($5)) }, $6) } +fn yy_action_152(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_65(_last_pos, _args[0:1]) + let _sub_action_1_result = yy_action_121(_args[0].2, _args[1:2]) let _sub_action_2_result = yy_action_4(_args[1].2, _args[2:2]) let _sub_action_3_result = yy_action_18(_args[3].2, _args[4:4]) guard _sub_action_0_result is YYObj_List_Attribute_(_dollar1) @@ -5004,26 +5940,26 @@ fn yy_action_125(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 538| attributes is_declare visibility "extenum" UIDENT optional_type_parameters_no_constraints "{" list_semis(enum_constructor) "}" deriving_directive_list { -// 539| let tycon_loc = mk_loc($loc($5)) -// 540| TopTypeDef( -// 541| TypeDecl::{ -// 542| tycon : $5, -// 543| tycon_loc, -// 544| params : $6, -// 545| components : ExtensibleEnum($8), -// 546| type_vis : $3, -// 547| doc : DocString::empty(), -// 548| deriving : $10, -// 549| loc : mk_loc($sloc), -// 550| attrs : $1, -// 551| is_declare : $2 -// 552| } -// 553| ) -// 554| } -fn yy_action_126(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_54(_last_pos, _args[0:1]) - let _sub_action_1_result = yy_action_100(_args[0].2, _args[1:2]) +// 549| attributes is_declare visibility "extenum" UIDENT optional_type_parameters_no_constraints "{" list_semis(enum_constructor) "}" deriving_directive_list { +// 550| let tycon_loc = mk_loc($loc($5)) +// 551| TopTypeDef( +// 552| TypeDecl::{ +// 553| tycon : $5, +// 554| tycon_loc, +// 555| params : $6, +// 556| components : ExtensibleEnum($8), +// 557| type_vis : $3, +// 558| doc : DocString::empty(), +// 559| deriving : $10, +// 560| loc : mk_loc($sloc), +// 561| attrs : $1, +// 562| is_declare : $2 +// 563| } +// 564| ) +// 565| } +fn yy_action_153(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_65(_last_pos, _args[0:1]) + let _sub_action_1_result = yy_action_121(_args[0].2, _args[1:2]) let _sub_action_2_result = yy_action_4(_args[1].2, _args[2:2]) let _start_pos_of_item4 = _args[3].1 let _end_pos_of_item4 = _args[3].2 @@ -5056,26 +5992,26 @@ fn yy_action_126(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 555| attributes is_declare visibility "extenum" extenum_extension_target "+=" "{" list_semis(enum_constructor) "}" deriving_directive_list { -// 556| let (tycon, tycon_loc, params, target) = $5 -// 557| TopTypeDef( -// 558| TypeDecl::{ -// 559| tycon, -// 560| tycon_loc, -// 561| params, -// 562| components : ExtendEnum(target~, constructors = $8), -// 563| type_vis : $3, -// 564| doc : DocString::empty(), -// 565| deriving : $10, -// 566| loc : mk_loc($sloc), -// 567| attrs : $1, -// 568| is_declare : $2 -// 569| } -// 570| ) -// 571| } -fn yy_action_127(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_54(_last_pos, _args[0:1]) - let _sub_action_1_result = yy_action_100(_args[0].2, _args[1:2]) +// 566| attributes is_declare visibility "extenum" extenum_extension_target "+=" "{" list_semis(enum_constructor) "}" deriving_directive_list { +// 567| let (tycon, tycon_loc, params, target) = $5 +// 568| TopTypeDef( +// 569| TypeDecl::{ +// 570| tycon, +// 571| tycon_loc, +// 572| params, +// 573| components : ExtendEnum(target~, constructors = $8), +// 574| type_vis : $3, +// 575| doc : DocString::empty(), +// 576| deriving : $10, +// 577| loc : mk_loc($sloc), +// 578| attrs : $1, +// 579| is_declare : $2 +// 580| } +// 581| ) +// 582| } +fn yy_action_154(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_65(_last_pos, _args[0:1]) + let _sub_action_1_result = yy_action_121(_args[0].2, _args[1:2]) let _sub_action_2_result = yy_action_4(_args[1].2, _args[2:2]) guard _args[3].0 is YYObj__String__Location__List_TypeDeclBinder___TypeName_(_dollar5) guard _args[6].0 is YYObj_List_ConstrDecl_(_dollar8) @@ -5105,28 +6041,28 @@ fn yy_action_127(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 654| attributes is_declare visibility "trait" UIDENT option(preceded(COLON, separated_nonempty_list(PLUS, tvar_constraint))) "{" list_semis(trait_method_decl) "}" { -// 655| let name = Binder::{ name: $5, loc: mk_loc($loc($4)) } -// 656| let supers = match $6 { -// 657| None => @list.empty() -// 658| Some(supers) => supers -// 659| } -// 660| TopTrait( -// 661| TraitDecl::{ -// 662| name, -// 663| supers, -// 664| methods: $8, -// 665| vis: $3, -// 666| loc: mk_loc($sloc), -// 667| attrs: $1, -// 668| doc : DocString::empty(), -// 669| is_declare : $2 -// 670| } -// 671| ) -// 672| } -fn yy_action_128(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_54(_last_pos, _args[0:1]) - let _sub_action_1_result = yy_action_100(_args[0].2, _args[1:2]) +// 665| attributes is_declare visibility "trait" UIDENT option(preceded(COLON, separated_nonempty_list(PLUS, tvar_constraint))) "{" list_semis(trait_method_decl) "}" { +// 666| let name = Binder::{ name: $5, loc: mk_loc($loc($4)) } +// 667| let supers = match $6 { +// 668| None => @list.empty() +// 669| Some(supers) => supers +// 670| } +// 671| TopTrait( +// 672| TraitDecl::{ +// 673| name, +// 674| supers, +// 675| methods: $8, +// 676| vis: $3, +// 677| loc: mk_loc($sloc), +// 678| attrs: $1, +// 679| doc : DocString::empty(), +// 680| is_declare : $2 +// 681| } +// 682| ) +// 683| } +fn yy_action_155(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_65(_last_pos, _args[0:1]) + let _sub_action_1_result = yy_action_121(_args[0].2, _args[1:2]) let _sub_action_2_result = yy_action_4(_args[1].2, _args[2:2]) guard _args[3].0 is YYObj_String(_dollar5) let _start_pos_of_item3 = _args[2].1 @@ -5160,21 +6096,21 @@ fn yy_action_128(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 735| attributes is_declare visibility "impl" optional_type_parameters type_name "for" type_ { -// 736| TopImplRelation( -// 737| self_ty = $8, -// 738| trait_ = $6, -// 739| quantifiers = $5, -// 740| vis = $3, -// 741| attrs = $1, -// 742| loc = mk_loc($sloc), -// 743| doc = DocString::empty(), -// 744| is_declare = $2 -// 745| ) -// 746| } -fn yy_action_129(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_54(_last_pos, _args[0:1]) - let _sub_action_1_result = yy_action_100(_args[0].2, _args[1:2]) +// 748| attributes is_declare visibility "impl" optional_type_parameters type_name "for" type_ { +// 749| TopImplRelation( +// 750| self_ty = $8, +// 751| trait_ = $6, +// 752| quantifiers = $5, +// 753| vis = $3, +// 754| attrs = $1, +// 755| loc = mk_loc($sloc), +// 756| doc = DocString::empty(), +// 757| is_declare = $2 +// 758| ) +// 759| } +fn yy_action_156(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_65(_last_pos, _args[0:1]) + let _sub_action_1_result = yy_action_121(_args[0].2, _args[1:2]) let _sub_action_2_result = yy_action_4(_args[1].2, _args[2:2]) guard _args[6].0 is YYObj_Type(_dollar8) guard _args[4].0 is YYObj_TypeName(_dollar6) @@ -5199,12 +6135,12 @@ fn yy_action_129(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 805| attributes is_declare visibility "type" UIDENT optional_type_parameters_no_constraints { -// 806| ($1, $3, $2, $5, mk_loc($loc($5)), $6) -// 807| } -fn yy_action_130(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_54(_last_pos, _args[0:1]) - let _sub_action_1_result = yy_action_100(_args[0].2, _args[1:2]) +// 823| attributes is_declare visibility "type" UIDENT optional_type_parameters_no_constraints { +// 824| ($1, $3, $2, $5, mk_loc($loc($5)), $6) +// 825| } +fn yy_action_157(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_65(_last_pos, _args[0:1]) + let _sub_action_1_result = yy_action_121(_args[0].2, _args[1:2]) let _sub_action_2_result = yy_action_4(_args[1].2, _args[2:2]) guard _sub_action_0_result is YYObj_List_Attribute_(_dollar1) guard _sub_action_2_result is YYObj_Visibility(_dollar3) @@ -5219,10 +6155,10 @@ fn yy_action_130(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 811| attributes is_declare visibility "suberror" UIDENT { ($1, $3, $2, $5, mk_loc($loc($5))) } -fn yy_action_131(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_54(_last_pos, _args[0:1]) - let _sub_action_1_result = yy_action_100(_args[0].2, _args[1:2]) +// 829| attributes is_declare visibility "suberror" UIDENT { ($1, $3, $2, $5, mk_loc($loc($5))) } +fn yy_action_158(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_65(_last_pos, _args[0:1]) + let _sub_action_1_result = yy_action_121(_args[0].2, _args[1:2]) let _sub_action_2_result = yy_action_4(_args[1].2, _args[2:2]) guard _sub_action_0_result is YYObj_List_Attribute_(_dollar1) guard _sub_action_2_result is YYObj_Visibility(_dollar3) @@ -5234,27 +6170,27 @@ fn yy_action_131(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 386| attributes visibility "extern" STRING "fn" optional_type_parameters fun_binder option(parameters) func_return_type { -// 387| let (type_name, f) = $7 -// 388| let (return_type, error_type) = $9 -// 389| let fn_decl = FunDecl::{ -// 390| type_name, -// 391| name: f, -// 392| is_async : None, -// 393| quantifiers: $6, -// 394| decl_params: $8, -// 395| params_loc: mk_loc($loc($8)), -// 396| return_type, -// 397| error_type, -// 398| vis: $2, -// 399| doc: DocString::empty(), -// 400| attrs: $1, -// 401| loc : mk_loc($loc) -// 402| } -// 403| ($4, fn_decl) -// 404| } -fn yy_action_132(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_54(_last_pos, _args[0:1]) +// 397| attributes visibility "extern" STRING "fn" optional_type_parameters fun_binder option(parameters) func_return_type { +// 398| let (type_name, f) = $7 +// 399| let (return_type, error_type) = $9 +// 400| let fn_decl = FunDecl::{ +// 401| type_name, +// 402| name: f, +// 403| is_async : None, +// 404| quantifiers: $6, +// 405| decl_params: $8, +// 406| params_loc: mk_loc($loc($8)), +// 407| return_type, +// 408| error_type, +// 409| vis: $2, +// 410| doc: DocString::empty(), +// 411| attrs: $1, +// 412| loc : mk_loc($loc) +// 413| } +// 414| ($4, fn_decl) +// 415| } +fn yy_action_159(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_65(_last_pos, _args[0:1]) let _sub_action_1_result = yy_action_4(_args[0].2, _args[1:1]) guard _args[5].0 is YYObj__TypeName___Binder_(_dollar7) guard _args[7].0 is YYObj__Type___ErrorType_(_dollar9) @@ -5289,9 +6225,9 @@ fn yy_action_132(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 423| attributes is_declare visibility "let" binder opt_annot { ($1, false, $2, $3, $5, $6) } -fn yy_action_133(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_54(_last_pos, _args[0:1]) +// 434| attributes is_declare visibility "let" binder opt_annot { ($1, false, $2, $3, $5, $6) } +fn yy_action_160(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_65(_last_pos, _args[0:1]) let _sub_action_1_result = yy_action_14(_args[0].2, _args[1:1]) let _sub_action_2_result = yy_action_4(_args[0].2, _args[1:1]) let _sub_action_3_result = yy_action_15(_args[1].2, _args[2:3]) @@ -5305,9 +6241,9 @@ fn yy_action_133(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 423| attributes is_declare visibility "let" binder opt_annot { ($1, false, $2, $3, $5, $6) } -fn yy_action_134(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_54(_last_pos, _args[0:1]) +// 434| attributes is_declare visibility "let" binder opt_annot { ($1, false, $2, $3, $5, $6) } +fn yy_action_161(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_65(_last_pos, _args[0:1]) let _sub_action_1_result = yy_action_14(_args[0].2, _args[1:1]) let _sub_action_2_result = yy_action_4(_args[0].2, _args[1:1]) let _sub_action_3_result = yy_action_15(_args[1].2, _args[2:3]) @@ -5321,9 +6257,41 @@ fn yy_action_134(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 424| attributes is_declare visibility "const" UIDENT opt_annot { ($1, true, $2, $3, Binder::{ name : $5, loc : mk_loc($loc($5)) }, $6) } -fn yy_action_135(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_54(_last_pos, _args[0:1]) +// 434| attributes is_declare visibility "let" binder opt_annot { ($1, false, $2, $3, $5, $6) } +fn yy_action_162(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_65(_last_pos, _args[0:1]) + let _sub_action_1_result = yy_action_14(_args[0].2, _args[1:1]) + let _sub_action_2_result = yy_action_4(_args[0].2, _args[1:1]) + let _sub_action_3_result = yy_action_20(_args[1].2, _args[2:3]) + let _sub_action_4_result = yy_action_16(_args[2].2, _args[3:5]) + guard _sub_action_0_result is YYObj_List_Attribute_(_dollar1) + guard _sub_action_1_result is YYObj_Bool(_dollar2) + guard _sub_action_2_result is YYObj_Visibility(_dollar3) + guard _sub_action_3_result is YYObj_Binder(_dollar5) + guard _sub_action_4_result is YYObj_Type_(_dollar6) + YYObj__List_Attribute___Bool__Bool__Visibility__Binder__Type__({(); (_dollar1, false, _dollar2, _dollar3, _dollar5, _dollar6) }) +} + +// file:///./parser.mbty +// 434| attributes is_declare visibility "let" binder opt_annot { ($1, false, $2, $3, $5, $6) } +fn yy_action_163(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_65(_last_pos, _args[0:1]) + let _sub_action_1_result = yy_action_14(_args[0].2, _args[1:1]) + let _sub_action_2_result = yy_action_4(_args[0].2, _args[1:1]) + let _sub_action_3_result = yy_action_20(_args[1].2, _args[2:3]) + let _sub_action_4_result = yy_action_18(_args[2].2, _args[3:3]) + guard _sub_action_0_result is YYObj_List_Attribute_(_dollar1) + guard _sub_action_1_result is YYObj_Bool(_dollar2) + guard _sub_action_2_result is YYObj_Visibility(_dollar3) + guard _sub_action_3_result is YYObj_Binder(_dollar5) + guard _sub_action_4_result is YYObj_Type_(_dollar6) + YYObj__List_Attribute___Bool__Bool__Visibility__Binder__Type__({(); (_dollar1, false, _dollar2, _dollar3, _dollar5, _dollar6) }) +} + +// file:///./parser.mbty +// 435| attributes is_declare visibility "const" UIDENT opt_annot { ($1, true, $2, $3, Binder::{ name : $5, loc : mk_loc($loc($5)) }, $6) } +fn yy_action_164(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_65(_last_pos, _args[0:1]) let _sub_action_1_result = yy_action_14(_args[0].2, _args[1:1]) let _sub_action_2_result = yy_action_4(_args[0].2, _args[1:1]) let _sub_action_3_result = yy_action_16(_args[2].2, _args[3:5]) @@ -5338,9 +6306,9 @@ fn yy_action_135(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 424| attributes is_declare visibility "const" UIDENT opt_annot { ($1, true, $2, $3, Binder::{ name : $5, loc : mk_loc($loc($5)) }, $6) } -fn yy_action_136(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_54(_last_pos, _args[0:1]) +// 435| attributes is_declare visibility "const" UIDENT opt_annot { ($1, true, $2, $3, Binder::{ name : $5, loc : mk_loc($loc($5)) }, $6) } +fn yy_action_165(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_65(_last_pos, _args[0:1]) let _sub_action_1_result = yy_action_14(_args[0].2, _args[1:1]) let _sub_action_2_result = yy_action_4(_args[0].2, _args[1:1]) let _sub_action_3_result = yy_action_18(_args[2].2, _args[3:3]) @@ -5355,25 +6323,25 @@ fn yy_action_136(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 538| attributes is_declare visibility "extenum" UIDENT optional_type_parameters_no_constraints "{" list_semis(enum_constructor) "}" deriving_directive_list { -// 539| let tycon_loc = mk_loc($loc($5)) -// 540| TopTypeDef( -// 541| TypeDecl::{ -// 542| tycon : $5, -// 543| tycon_loc, -// 544| params : $6, -// 545| components : ExtensibleEnum($8), -// 546| type_vis : $3, -// 547| doc : DocString::empty(), -// 548| deriving : $10, -// 549| loc : mk_loc($sloc), -// 550| attrs : $1, -// 551| is_declare : $2 -// 552| } -// 553| ) -// 554| } -fn yy_action_137(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_54(_last_pos, _args[0:1]) +// 549| attributes is_declare visibility "extenum" UIDENT optional_type_parameters_no_constraints "{" list_semis(enum_constructor) "}" deriving_directive_list { +// 550| let tycon_loc = mk_loc($loc($5)) +// 551| TopTypeDef( +// 552| TypeDecl::{ +// 553| tycon : $5, +// 554| tycon_loc, +// 555| params : $6, +// 556| components : ExtensibleEnum($8), +// 557| type_vis : $3, +// 558| doc : DocString::empty(), +// 559| deriving : $10, +// 560| loc : mk_loc($sloc), +// 561| attrs : $1, +// 562| is_declare : $2 +// 563| } +// 564| ) +// 565| } +fn yy_action_166(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_65(_last_pos, _args[0:1]) let _sub_action_1_result = yy_action_14(_args[0].2, _args[1:1]) let _sub_action_2_result = yy_action_4(_args[0].2, _args[1:1]) let _start_pos_of_item4 = _args[2].1 @@ -5407,25 +6375,25 @@ fn yy_action_137(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 555| attributes is_declare visibility "extenum" extenum_extension_target "+=" "{" list_semis(enum_constructor) "}" deriving_directive_list { -// 556| let (tycon, tycon_loc, params, target) = $5 -// 557| TopTypeDef( -// 558| TypeDecl::{ -// 559| tycon, -// 560| tycon_loc, -// 561| params, -// 562| components : ExtendEnum(target~, constructors = $8), -// 563| type_vis : $3, -// 564| doc : DocString::empty(), -// 565| deriving : $10, -// 566| loc : mk_loc($sloc), -// 567| attrs : $1, -// 568| is_declare : $2 -// 569| } -// 570| ) -// 571| } -fn yy_action_138(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_54(_last_pos, _args[0:1]) +// 566| attributes is_declare visibility "extenum" extenum_extension_target "+=" "{" list_semis(enum_constructor) "}" deriving_directive_list { +// 567| let (tycon, tycon_loc, params, target) = $5 +// 568| TopTypeDef( +// 569| TypeDecl::{ +// 570| tycon, +// 571| tycon_loc, +// 572| params, +// 573| components : ExtendEnum(target~, constructors = $8), +// 574| type_vis : $3, +// 575| doc : DocString::empty(), +// 576| deriving : $10, +// 577| loc : mk_loc($sloc), +// 578| attrs : $1, +// 579| is_declare : $2 +// 580| } +// 581| ) +// 582| } +fn yy_action_167(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_65(_last_pos, _args[0:1]) let _sub_action_1_result = yy_action_14(_args[0].2, _args[1:1]) let _sub_action_2_result = yy_action_4(_args[0].2, _args[1:1]) guard _args[2].0 is YYObj__String__Location__List_TypeDeclBinder___TypeName_(_dollar5) @@ -5456,27 +6424,27 @@ fn yy_action_138(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 654| attributes is_declare visibility "trait" UIDENT option(preceded(COLON, separated_nonempty_list(PLUS, tvar_constraint))) "{" list_semis(trait_method_decl) "}" { -// 655| let name = Binder::{ name: $5, loc: mk_loc($loc($4)) } -// 656| let supers = match $6 { -// 657| None => @list.empty() -// 658| Some(supers) => supers -// 659| } -// 660| TopTrait( -// 661| TraitDecl::{ -// 662| name, -// 663| supers, -// 664| methods: $8, -// 665| vis: $3, -// 666| loc: mk_loc($sloc), -// 667| attrs: $1, -// 668| doc : DocString::empty(), -// 669| is_declare : $2 -// 670| } -// 671| ) -// 672| } -fn yy_action_139(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_54(_last_pos, _args[0:1]) +// 665| attributes is_declare visibility "trait" UIDENT option(preceded(COLON, separated_nonempty_list(PLUS, tvar_constraint))) "{" list_semis(trait_method_decl) "}" { +// 666| let name = Binder::{ name: $5, loc: mk_loc($loc($4)) } +// 667| let supers = match $6 { +// 668| None => @list.empty() +// 669| Some(supers) => supers +// 670| } +// 671| TopTrait( +// 672| TraitDecl::{ +// 673| name, +// 674| supers, +// 675| methods: $8, +// 676| vis: $3, +// 677| loc: mk_loc($sloc), +// 678| attrs: $1, +// 679| doc : DocString::empty(), +// 680| is_declare : $2 +// 681| } +// 682| ) +// 683| } +fn yy_action_168(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_65(_last_pos, _args[0:1]) let _sub_action_1_result = yy_action_14(_args[0].2, _args[1:1]) let _sub_action_2_result = yy_action_4(_args[0].2, _args[1:1]) guard _args[2].0 is YYObj_String(_dollar5) @@ -5511,19 +6479,19 @@ fn yy_action_139(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 690| attributes is_async "test" option(loced_string) option(parameters) block_expr { -// 691| TopTest( -// 692| expr = $6, -// 693| name = $4, -// 694| params = $5, -// 695| is_async = $2, -// 696| loc = mk_loc($sloc), -// 697| attrs = $1, -// 698| doc = DocString::empty() -// 699| ) -// 700| } -fn yy_action_140(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_54(_last_pos, _args[0:1]) +// 701| attributes is_async "test" option(loced_string) option(parameters) block_expr { +// 702| TopTest( +// 703| expr = $6, +// 704| name = $4, +// 705| params = $5, +// 706| is_async = $2, +// 707| loc = mk_loc($sloc), +// 708| attrs = $1, +// 709| doc = DocString::empty() +// 710| ) +// 711| } +fn yy_action_169(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_65(_last_pos, _args[0:1]) let _sub_action_1_result = yy_action_8(_args[0].2, _args[1:1]) guard _args[4].0 is YYObj_Expr(_dollar6) guard _args[2].0 is YYObj_Option__StringLiteral__Location__(_dollar4) @@ -5546,25 +6514,26 @@ fn yy_action_140(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 701| attributes visibility "impl" optional_type_parameters type_name "for" type_ "with" option("fn") binder parameters func_return_type impl_body { -// 702| let (ret_ty, err_ty) = $12 -// 703| TopImpl( -// 704| self_ty = Some($7), -// 705| trait_ = $5, -// 706| method_name = $10, -// 707| quantifiers = $4, -// 708| params = $11, -// 709| ret_ty~, -// 710| err_ty~, -// 711| body = $13, -// 712| vis = $2, -// 713| loc = mk_loc($sloc), -// 714| attrs = $1, -// 715| doc = DocString::empty() -// 716| ) -// 717| } -fn yy_action_141(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_54(_last_pos, _args[0:1]) +// 712| attributes visibility "impl" optional_type_parameters type_name "for" type_ "with" impl_optional_fn binder parameters func_return_type impl_body { +// 713| let (ret_ty, err_ty) = $12 +// 714| TopImpl( +// 715| self_ty = Some($7), +// 716| trait_ = $5, +// 717| method_name = $10, +// 718| quantifiers = $4, +// 719| method_quantifiers = $9, +// 720| params = $11, +// 721| ret_ty~, +// 722| err_ty~, +// 723| body = $13, +// 724| vis = $2, +// 725| loc = mk_loc($sloc), +// 726| attrs = $1, +// 727| doc = DocString::empty() +// 728| ) +// 729| } +fn yy_action_170(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_65(_last_pos, _args[0:1]) let _sub_action_1_result = yy_action_4(_args[0].2, _args[1:1]) let _sub_action_2_result = yy_action_15(_args[7].2, _args[8:9]) guard _args[10].0 is YYObj__Type___ErrorType_(_dollar12) @@ -5572,6 +6541,7 @@ fn yy_action_141(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit guard _args[3].0 is YYObj_TypeName(_dollar5) guard _sub_action_2_result is YYObj_Binder(_dollar10) guard _args[2].0 is YYObj_List_TypeVarBinder_(_dollar4) + guard _args[7].0 is YYObj_List_TypeVarBinder_(_dollar9) guard _args[9].0 is YYObj_List_Parameter_(_dollar11) guard _args[11].0 is YYObj_DeclBody(_dollar13) guard _sub_action_1_result is YYObj_Visibility(_dollar2) @@ -5585,6 +6555,7 @@ fn yy_action_141(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit trait_ = _dollar5, method_name = _dollar10, quantifiers = _dollar4, + method_quantifiers = _dollar9, params = _dollar11, ret_ty~, err_ty~, @@ -5598,20 +6569,75 @@ fn yy_action_141(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 735| attributes is_declare visibility "impl" optional_type_parameters type_name "for" type_ { -// 736| TopImplRelation( -// 737| self_ty = $8, -// 738| trait_ = $6, -// 739| quantifiers = $5, -// 740| vis = $3, -// 741| attrs = $1, -// 742| loc = mk_loc($sloc), -// 743| doc = DocString::empty(), -// 744| is_declare = $2 -// 745| ) -// 746| } -fn yy_action_142(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_54(_last_pos, _args[0:1]) +// 712| attributes visibility "impl" optional_type_parameters type_name "for" type_ "with" impl_optional_fn binder parameters func_return_type impl_body { +// 713| let (ret_ty, err_ty) = $12 +// 714| TopImpl( +// 715| self_ty = Some($7), +// 716| trait_ = $5, +// 717| method_name = $10, +// 718| quantifiers = $4, +// 719| method_quantifiers = $9, +// 720| params = $11, +// 721| ret_ty~, +// 722| err_ty~, +// 723| body = $13, +// 724| vis = $2, +// 725| loc = mk_loc($sloc), +// 726| attrs = $1, +// 727| doc = DocString::empty() +// 728| ) +// 729| } +fn yy_action_171(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_65(_last_pos, _args[0:1]) + let _sub_action_1_result = yy_action_4(_args[0].2, _args[1:1]) + let _sub_action_2_result = yy_action_20(_args[7].2, _args[8:9]) + guard _args[10].0 is YYObj__Type___ErrorType_(_dollar12) + guard _args[5].0 is YYObj_Type(_dollar7) + guard _args[3].0 is YYObj_TypeName(_dollar5) + guard _sub_action_2_result is YYObj_Binder(_dollar10) + guard _args[2].0 is YYObj_List_TypeVarBinder_(_dollar4) + guard _args[7].0 is YYObj_List_TypeVarBinder_(_dollar9) + guard _args[9].0 is YYObj_List_Parameter_(_dollar11) + guard _args[11].0 is YYObj_DeclBody(_dollar13) + guard _sub_action_1_result is YYObj_Visibility(_dollar2) + let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) + let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } + guard _sub_action_0_result is YYObj_List_Attribute_(_dollar1) + YYObj_Impl({(); + let (ret_ty, err_ty) = _dollar12 + TopImpl( + self_ty = Some(_dollar7), + trait_ = _dollar5, + method_name = _dollar10, + quantifiers = _dollar4, + method_quantifiers = _dollar9, + params = _dollar11, + ret_ty~, + err_ty~, + body = _dollar13, + vis = _dollar2, + loc = mk_loc((_symbol_start_pos, _end_pos)), + attrs = _dollar1, + doc = DocString::empty() + ) + }) +} + +// file:///./parser.mbty +// 748| attributes is_declare visibility "impl" optional_type_parameters type_name "for" type_ { +// 749| TopImplRelation( +// 750| self_ty = $8, +// 751| trait_ = $6, +// 752| quantifiers = $5, +// 753| vis = $3, +// 754| attrs = $1, +// 755| loc = mk_loc($sloc), +// 756| doc = DocString::empty(), +// 757| is_declare = $2 +// 758| ) +// 759| } +fn yy_action_172(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_65(_last_pos, _args[0:1]) let _sub_action_1_result = yy_action_14(_args[0].2, _args[1:1]) let _sub_action_2_result = yy_action_4(_args[0].2, _args[1:1]) guard _args[5].0 is YYObj_Type(_dollar8) @@ -5637,31 +6663,33 @@ fn yy_action_142(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 718| attributes visibility "impl" optional_type_parameters type_name "with" option("fn") binder parameters func_return_type impl_body { -// 719| let (ret_ty, err_ty) = $10 -// 720| TopImpl( -// 721| self_ty = None, -// 722| trait_ = $5, -// 723| method_name = $8, -// 724| quantifiers = $4, -// 725| params = $9, -// 726| ret_ty~, -// 727| err_ty~, -// 728| body = $11, -// 729| vis = $2, -// 730| loc = mk_loc($sloc), -// 731| attrs = $1, -// 732| doc = DocString::empty() -// 733| ) -// 734| } -fn yy_action_143(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_54(_last_pos, _args[0:1]) +// 730| attributes visibility "impl" optional_type_parameters type_name "with" impl_optional_fn binder parameters func_return_type impl_body { +// 731| let (ret_ty, err_ty) = $10 +// 732| TopImpl( +// 733| self_ty = None, +// 734| trait_ = $5, +// 735| method_name = $8, +// 736| quantifiers = $4, +// 737| method_quantifiers = $7, +// 738| params = $9, +// 739| ret_ty~, +// 740| err_ty~, +// 741| body = $11, +// 742| vis = $2, +// 743| loc = mk_loc($sloc), +// 744| attrs = $1, +// 745| doc = DocString::empty() +// 746| ) +// 747| } +fn yy_action_173(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_65(_last_pos, _args[0:1]) let _sub_action_1_result = yy_action_4(_args[0].2, _args[1:1]) let _sub_action_2_result = yy_action_15(_args[5].2, _args[6:7]) guard _args[8].0 is YYObj__Type___ErrorType_(_dollar10) guard _args[3].0 is YYObj_TypeName(_dollar5) guard _sub_action_2_result is YYObj_Binder(_dollar8) guard _args[2].0 is YYObj_List_TypeVarBinder_(_dollar4) + guard _args[5].0 is YYObj_List_TypeVarBinder_(_dollar7) guard _args[7].0 is YYObj_List_Parameter_(_dollar9) guard _args[9].0 is YYObj_DeclBody(_dollar11) guard _sub_action_1_result is YYObj_Visibility(_dollar2) @@ -5675,6 +6703,7 @@ fn yy_action_143(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit trait_ = _dollar5, method_name = _dollar8, quantifiers = _dollar4, + method_quantifiers = _dollar7, params = _dollar9, ret_ty~, err_ty~, @@ -5688,25 +6717,79 @@ fn yy_action_143(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 747| attributes visibility "enumview" optional_type_parameters UIDENT "{" list_semis(enum_constructor) "}" "for" type_ "with" binder parameters block_expr { -// 748| TopView( -// 749| quantifiers = $4, -// 750| source_ty = $10, -// 751| view_type_name = $5, -// 752| view_type_loc = mk_loc($loc($5)), -// 753| view_func_name = $12, -// 754| parameters = $13, -// 755| params_loc = mk_loc($loc($13)), -// 756| view_constrs = $7, -// 757| body = $14, -// 758| vis = $2, -// 759| loc = mk_loc($sloc), -// 760| attrs = $1, -// 761| doc = DocString::empty() -// 762| ) -// 763| } -fn yy_action_144(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_54(_last_pos, _args[0:1]) +// 730| attributes visibility "impl" optional_type_parameters type_name "with" impl_optional_fn binder parameters func_return_type impl_body { +// 731| let (ret_ty, err_ty) = $10 +// 732| TopImpl( +// 733| self_ty = None, +// 734| trait_ = $5, +// 735| method_name = $8, +// 736| quantifiers = $4, +// 737| method_quantifiers = $7, +// 738| params = $9, +// 739| ret_ty~, +// 740| err_ty~, +// 741| body = $11, +// 742| vis = $2, +// 743| loc = mk_loc($sloc), +// 744| attrs = $1, +// 745| doc = DocString::empty() +// 746| ) +// 747| } +fn yy_action_174(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_65(_last_pos, _args[0:1]) + let _sub_action_1_result = yy_action_4(_args[0].2, _args[1:1]) + let _sub_action_2_result = yy_action_20(_args[5].2, _args[6:7]) + guard _args[8].0 is YYObj__Type___ErrorType_(_dollar10) + guard _args[3].0 is YYObj_TypeName(_dollar5) + guard _sub_action_2_result is YYObj_Binder(_dollar8) + guard _args[2].0 is YYObj_List_TypeVarBinder_(_dollar4) + guard _args[5].0 is YYObj_List_TypeVarBinder_(_dollar7) + guard _args[7].0 is YYObj_List_Parameter_(_dollar9) + guard _args[9].0 is YYObj_DeclBody(_dollar11) + guard _sub_action_1_result is YYObj_Visibility(_dollar2) + let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) + let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } + guard _sub_action_0_result is YYObj_List_Attribute_(_dollar1) + YYObj_Impl({(); + let (ret_ty, err_ty) = _dollar10 + TopImpl( + self_ty = None, + trait_ = _dollar5, + method_name = _dollar8, + quantifiers = _dollar4, + method_quantifiers = _dollar7, + params = _dollar9, + ret_ty~, + err_ty~, + body = _dollar11, + vis = _dollar2, + loc = mk_loc((_symbol_start_pos, _end_pos)), + attrs = _dollar1, + doc = DocString::empty() + ) + }) +} + +// file:///./parser.mbty +// 760| attributes visibility "enumview" optional_type_parameters UIDENT "{" list_semis(enum_constructor) "}" "for" type_ "with" binder parameters block_expr { +// 761| TopView( +// 762| quantifiers = $4, +// 763| source_ty = $10, +// 764| view_type_name = $5, +// 765| view_type_loc = mk_loc($loc($5)), +// 766| view_func_name = $12, +// 767| parameters = $13, +// 768| params_loc = mk_loc($loc($13)), +// 769| view_constrs = $7, +// 770| body = $14, +// 771| vis = $2, +// 772| loc = mk_loc($sloc), +// 773| attrs = $1, +// 774| doc = DocString::empty() +// 775| ) +// 776| } +fn yy_action_175(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_65(_last_pos, _args[0:1]) let _sub_action_1_result = yy_action_4(_args[0].2, _args[1:1]) let _sub_action_2_result = yy_action_15(_args[9].2, _args[10:11]) guard _args[2].0 is YYObj_List_TypeVarBinder_(_dollar4) @@ -5744,21 +6827,77 @@ fn yy_action_144(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 764| attributes visibility "using" PACKAGE_NAME "{" list_commas(using_binder) "}" { -// 765| TopUsing( -// 766| pkg = { -// 767| name : $4, -// 768| loc : mk_loc($loc($4)) -// 769| }, -// 770| names = $6, +// 760| attributes visibility "enumview" optional_type_parameters UIDENT "{" list_semis(enum_constructor) "}" "for" type_ "with" binder parameters block_expr { +// 761| TopView( +// 762| quantifiers = $4, +// 763| source_ty = $10, +// 764| view_type_name = $5, +// 765| view_type_loc = mk_loc($loc($5)), +// 766| view_func_name = $12, +// 767| parameters = $13, +// 768| params_loc = mk_loc($loc($13)), +// 769| view_constrs = $7, +// 770| body = $14, // 771| vis = $2, -// 772| attrs = $1, -// 773| loc = mk_loc($loc), +// 772| loc = mk_loc($sloc), +// 773| attrs = $1, // 774| doc = DocString::empty() // 775| ) // 776| } -fn yy_action_145(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_54(_last_pos, _args[0:1]) +fn yy_action_176(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_65(_last_pos, _args[0:1]) + let _sub_action_1_result = yy_action_4(_args[0].2, _args[1:1]) + let _sub_action_2_result = yy_action_20(_args[9].2, _args[10:11]) + guard _args[2].0 is YYObj_List_TypeVarBinder_(_dollar4) + guard _args[8].0 is YYObj_Type(_dollar10) + guard _args[3].0 is YYObj_String(_dollar5) + let _start_pos_of_item4 = _args[3].1 + let _end_pos_of_item4 = _args[3].2 + guard _sub_action_2_result is YYObj_Binder(_dollar12) + guard _args[11].0 is YYObj_List_Parameter_(_dollar13) + let _start_pos_of_item12 = _args[11].1 + let _end_pos_of_item12 = _args[11].2 + guard _args[5].0 is YYObj_List_ConstrDecl_(_dollar7) + guard _args[12].0 is YYObj_Expr(_dollar14) + guard _sub_action_1_result is YYObj_Visibility(_dollar2) + let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) + let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } + guard _sub_action_0_result is YYObj_List_Attribute_(_dollar1) + YYObj_Impl({(); + TopView( + quantifiers = _dollar4, + source_ty = _dollar10, + view_type_name = _dollar5, + view_type_loc = mk_loc((_start_pos_of_item4, _end_pos_of_item4)), + view_func_name = _dollar12, + parameters = _dollar13, + params_loc = mk_loc((_start_pos_of_item12, _end_pos_of_item12)), + view_constrs = _dollar7, + body = _dollar14, + vis = _dollar2, + loc = mk_loc((_symbol_start_pos, _end_pos)), + attrs = _dollar1, + doc = DocString::empty() + ) + }) +} + +// file:///./parser.mbty +// 777| attributes visibility "using" PACKAGE_NAME "{" list_commas(using_binder) "}" { +// 778| TopUsing( +// 779| pkg = { +// 780| name : $4, +// 781| loc : mk_loc($loc($4)) +// 782| }, +// 783| names = $6, +// 784| vis = $2, +// 785| attrs = $1, +// 786| loc = mk_loc($loc), +// 787| doc = DocString::empty() +// 788| ) +// 789| } +fn yy_action_177(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_65(_last_pos, _args[0:1]) let _sub_action_1_result = yy_action_4(_args[0].2, _args[1:1]) guard _args[2].0 is YYObj_String(_dollar4) let _start_pos_of_item3 = _args[2].1 @@ -5784,11 +6923,11 @@ fn yy_action_145(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 805| attributes is_declare visibility "type" UIDENT optional_type_parameters_no_constraints { -// 806| ($1, $3, $2, $5, mk_loc($loc($5)), $6) -// 807| } -fn yy_action_146(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_54(_last_pos, _args[0:1]) +// 823| attributes is_declare visibility "type" UIDENT optional_type_parameters_no_constraints { +// 824| ($1, $3, $2, $5, mk_loc($loc($5)), $6) +// 825| } +fn yy_action_178(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_65(_last_pos, _args[0:1]) let _sub_action_1_result = yy_action_14(_args[0].2, _args[1:1]) let _sub_action_2_result = yy_action_4(_args[0].2, _args[1:1]) guard _sub_action_0_result is YYObj_List_Attribute_(_dollar1) @@ -5804,9 +6943,9 @@ fn yy_action_146(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 811| attributes is_declare visibility "suberror" UIDENT { ($1, $3, $2, $5, mk_loc($loc($5))) } -fn yy_action_147(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_54(_last_pos, _args[0:1]) +// 829| attributes is_declare visibility "suberror" UIDENT { ($1, $3, $2, $5, mk_loc($loc($5))) } +fn yy_action_179(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_65(_last_pos, _args[0:1]) let _sub_action_1_result = yy_action_14(_args[0].2, _args[1:1]) let _sub_action_2_result = yy_action_4(_args[0].2, _args[1:1]) guard _sub_action_0_result is YYObj_List_Attribute_(_dollar1) @@ -5819,11 +6958,11 @@ fn yy_action_147(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 815| attributes visibility "struct" UIDENT optional_type_parameters_no_constraints { -// 816| ($1, $2, $4, mk_loc($loc($4)), $5) -// 817| } -fn yy_action_148(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_54(_last_pos, _args[0:1]) +// 833| attributes visibility "struct" UIDENT optional_type_parameters_no_constraints { +// 834| ($1, $2, $4, mk_loc($loc($4)), $5) +// 835| } +fn yy_action_180(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_65(_last_pos, _args[0:1]) let _sub_action_1_result = yy_action_4(_args[0].2, _args[1:1]) guard _sub_action_0_result is YYObj_List_Attribute_(_dollar1) guard _sub_action_1_result is YYObj_Visibility(_dollar2) @@ -5837,11 +6976,11 @@ fn yy_action_148(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 821| attributes visibility "enum" UIDENT optional_type_parameters_no_constraints { -// 822| ($1, $2, $4, mk_loc($loc($4)), $5) -// 823| } -fn yy_action_149(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_54(_last_pos, _args[0:1]) +// 839| attributes visibility "enum" UIDENT optional_type_parameters_no_constraints { +// 840| ($1, $2, $4, mk_loc($loc($4)), $5) +// 841| } +fn yy_action_181(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_65(_last_pos, _args[0:1]) let _sub_action_1_result = yy_action_4(_args[0].2, _args[1:1]) guard _sub_action_0_result is YYObj_List_Attribute_(_dollar1) guard _sub_action_1_result is YYObj_Visibility(_dollar2) @@ -5855,25 +6994,25 @@ fn yy_action_149(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 362| attributes "declare" visibility is_async fun_header_generic option(parameters) func_return_type { -// 363| let ((type_name, f), quants) = $5 -// 364| let (return_type, error_type) = $7 -// 365| FunDecl::{ -// 366| type_name, -// 367| name: f, -// 368| is_async : $4, -// 369| quantifiers: quants, -// 370| decl_params: $6, -// 371| params_loc: mk_loc($loc($6)), -// 372| return_type, -// 373| error_type, -// 374| vis: $3, -// 375| doc: DocString::empty(), -// 376| attrs: $1, -// 377| loc : mk_loc($loc) -// 378| } -// 379| } -fn yy_action_150(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 373| attributes "declare" visibility is_async fun_header_generic option(parameters) func_return_type { +// 374| let ((type_name, f), quants) = $5 +// 375| let (return_type, error_type) = $7 +// 376| FunDecl::{ +// 377| type_name, +// 378| name: f, +// 379| is_async : $4, +// 380| quantifiers: quants, +// 381| decl_params: $6, +// 382| params_loc: mk_loc($loc($6)), +// 383| return_type, +// 384| error_type, +// 385| vis: $3, +// 386| doc: DocString::empty(), +// 387| attrs: $1, +// 388| loc : mk_loc($loc) +// 389| } +// 390| } +fn yy_action_182(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _sub_action_0_result = yy_action_3(_last_pos, _args[0:0]) let _sub_action_1_result = yy_action_4(_args[0].2, _args[1:1]) let _sub_action_2_result = yy_action_5(_args[0].2, _args[1:2]) @@ -5908,25 +7047,25 @@ fn yy_action_150(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 362| attributes "declare" visibility is_async fun_header_generic option(parameters) func_return_type { -// 363| let ((type_name, f), quants) = $5 -// 364| let (return_type, error_type) = $7 -// 365| FunDecl::{ -// 366| type_name, -// 367| name: f, -// 368| is_async : $4, -// 369| quantifiers: quants, -// 370| decl_params: $6, -// 371| params_loc: mk_loc($loc($6)), -// 372| return_type, -// 373| error_type, -// 374| vis: $3, -// 375| doc: DocString::empty(), -// 376| attrs: $1, -// 377| loc : mk_loc($loc) -// 378| } -// 379| } -fn yy_action_151(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 373| attributes "declare" visibility is_async fun_header_generic option(parameters) func_return_type { +// 374| let ((type_name, f), quants) = $5 +// 375| let (return_type, error_type) = $7 +// 376| FunDecl::{ +// 377| type_name, +// 378| name: f, +// 379| is_async : $4, +// 380| quantifiers: quants, +// 381| decl_params: $6, +// 382| params_loc: mk_loc($loc($6)), +// 383| return_type, +// 384| error_type, +// 385| vis: $3, +// 386| doc: DocString::empty(), +// 387| attrs: $1, +// 388| loc : mk_loc($loc) +// 389| } +// 390| } +fn yy_action_183(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _sub_action_0_result = yy_action_3(_last_pos, _args[0:0]) let _sub_action_1_result = yy_action_4(_args[0].2, _args[1:1]) let _sub_action_2_result = yy_action_8(_args[0].2, _args[1:1]) @@ -5961,25 +7100,25 @@ fn yy_action_151(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 362| attributes "declare" visibility is_async fun_header_generic option(parameters) func_return_type { -// 363| let ((type_name, f), quants) = $5 -// 364| let (return_type, error_type) = $7 -// 365| FunDecl::{ -// 366| type_name, -// 367| name: f, -// 368| is_async : $4, -// 369| quantifiers: quants, -// 370| decl_params: $6, -// 371| params_loc: mk_loc($loc($6)), -// 372| return_type, -// 373| error_type, -// 374| vis: $3, -// 375| doc: DocString::empty(), -// 376| attrs: $1, -// 377| loc : mk_loc($loc) -// 378| } -// 379| } -fn yy_action_152(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 373| attributes "declare" visibility is_async fun_header_generic option(parameters) func_return_type { +// 374| let ((type_name, f), quants) = $5 +// 375| let (return_type, error_type) = $7 +// 376| FunDecl::{ +// 377| type_name, +// 378| name: f, +// 379| is_async : $4, +// 380| quantifiers: quants, +// 381| decl_params: $6, +// 382| params_loc: mk_loc($loc($6)), +// 383| return_type, +// 384| error_type, +// 385| vis: $3, +// 386| doc: DocString::empty(), +// 387| attrs: $1, +// 388| loc : mk_loc($loc) +// 389| } +// 390| } +fn yy_action_184(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _sub_action_0_result = yy_action_3(_last_pos, _args[0:0]) let _sub_action_1_result = yy_action_10(_args[0].2, _args[1:2]) let _sub_action_2_result = yy_action_5(_args[1].2, _args[2:3]) @@ -6014,25 +7153,25 @@ fn yy_action_152(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 362| attributes "declare" visibility is_async fun_header_generic option(parameters) func_return_type { -// 363| let ((type_name, f), quants) = $5 -// 364| let (return_type, error_type) = $7 -// 365| FunDecl::{ -// 366| type_name, -// 367| name: f, -// 368| is_async : $4, -// 369| quantifiers: quants, -// 370| decl_params: $6, -// 371| params_loc: mk_loc($loc($6)), -// 372| return_type, -// 373| error_type, -// 374| vis: $3, -// 375| doc: DocString::empty(), -// 376| attrs: $1, -// 377| loc : mk_loc($loc) -// 378| } -// 379| } -fn yy_action_153(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 373| attributes "declare" visibility is_async fun_header_generic option(parameters) func_return_type { +// 374| let ((type_name, f), quants) = $5 +// 375| let (return_type, error_type) = $7 +// 376| FunDecl::{ +// 377| type_name, +// 378| name: f, +// 379| is_async : $4, +// 380| quantifiers: quants, +// 381| decl_params: $6, +// 382| params_loc: mk_loc($loc($6)), +// 383| return_type, +// 384| error_type, +// 385| vis: $3, +// 386| doc: DocString::empty(), +// 387| attrs: $1, +// 388| loc : mk_loc($loc) +// 389| } +// 390| } +fn yy_action_185(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _sub_action_0_result = yy_action_3(_last_pos, _args[0:0]) let _sub_action_1_result = yy_action_10(_args[0].2, _args[1:2]) let _sub_action_2_result = yy_action_8(_args[1].2, _args[2:2]) @@ -6067,10 +7206,10 @@ fn yy_action_153(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 423| attributes is_declare visibility "let" binder opt_annot { ($1, false, $2, $3, $5, $6) } -fn yy_action_154(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 434| attributes is_declare visibility "let" binder opt_annot { ($1, false, $2, $3, $5, $6) } +fn yy_action_186(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _sub_action_0_result = yy_action_3(_last_pos, _args[0:0]) - let _sub_action_1_result = yy_action_100(_last_pos, _args[0:1]) + let _sub_action_1_result = yy_action_121(_last_pos, _args[0:1]) let _sub_action_2_result = yy_action_10(_args[0].2, _args[1:2]) let _sub_action_3_result = yy_action_15(_args[2].2, _args[3:4]) let _sub_action_4_result = yy_action_16(_args[3].2, _args[4:6]) @@ -6083,10 +7222,10 @@ fn yy_action_154(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 423| attributes is_declare visibility "let" binder opt_annot { ($1, false, $2, $3, $5, $6) } -fn yy_action_155(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 434| attributes is_declare visibility "let" binder opt_annot { ($1, false, $2, $3, $5, $6) } +fn yy_action_187(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _sub_action_0_result = yy_action_3(_last_pos, _args[0:0]) - let _sub_action_1_result = yy_action_100(_last_pos, _args[0:1]) + let _sub_action_1_result = yy_action_121(_last_pos, _args[0:1]) let _sub_action_2_result = yy_action_10(_args[0].2, _args[1:2]) let _sub_action_3_result = yy_action_15(_args[2].2, _args[3:4]) let _sub_action_4_result = yy_action_18(_args[3].2, _args[4:4]) @@ -6099,10 +7238,42 @@ fn yy_action_155(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 424| attributes is_declare visibility "const" UIDENT opt_annot { ($1, true, $2, $3, Binder::{ name : $5, loc : mk_loc($loc($5)) }, $6) } -fn yy_action_156(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 434| attributes is_declare visibility "let" binder opt_annot { ($1, false, $2, $3, $5, $6) } +fn yy_action_188(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_3(_last_pos, _args[0:0]) + let _sub_action_1_result = yy_action_121(_last_pos, _args[0:1]) + let _sub_action_2_result = yy_action_10(_args[0].2, _args[1:2]) + let _sub_action_3_result = yy_action_20(_args[2].2, _args[3:4]) + let _sub_action_4_result = yy_action_16(_args[3].2, _args[4:6]) + guard _sub_action_0_result is YYObj_List_Attribute_(_dollar1) + guard _sub_action_1_result is YYObj_Bool(_dollar2) + guard _sub_action_2_result is YYObj_Visibility(_dollar3) + guard _sub_action_3_result is YYObj_Binder(_dollar5) + guard _sub_action_4_result is YYObj_Type_(_dollar6) + YYObj__List_Attribute___Bool__Bool__Visibility__Binder__Type__({(); (_dollar1, false, _dollar2, _dollar3, _dollar5, _dollar6) }) +} + +// file:///./parser.mbty +// 434| attributes is_declare visibility "let" binder opt_annot { ($1, false, $2, $3, $5, $6) } +fn yy_action_189(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_3(_last_pos, _args[0:0]) + let _sub_action_1_result = yy_action_121(_last_pos, _args[0:1]) + let _sub_action_2_result = yy_action_10(_args[0].2, _args[1:2]) + let _sub_action_3_result = yy_action_20(_args[2].2, _args[3:4]) + let _sub_action_4_result = yy_action_18(_args[3].2, _args[4:4]) + guard _sub_action_0_result is YYObj_List_Attribute_(_dollar1) + guard _sub_action_1_result is YYObj_Bool(_dollar2) + guard _sub_action_2_result is YYObj_Visibility(_dollar3) + guard _sub_action_3_result is YYObj_Binder(_dollar5) + guard _sub_action_4_result is YYObj_Type_(_dollar6) + YYObj__List_Attribute___Bool__Bool__Visibility__Binder__Type__({(); (_dollar1, false, _dollar2, _dollar3, _dollar5, _dollar6) }) +} + +// file:///./parser.mbty +// 435| attributes is_declare visibility "const" UIDENT opt_annot { ($1, true, $2, $3, Binder::{ name : $5, loc : mk_loc($loc($5)) }, $6) } +fn yy_action_190(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _sub_action_0_result = yy_action_3(_last_pos, _args[0:0]) - let _sub_action_1_result = yy_action_100(_last_pos, _args[0:1]) + let _sub_action_1_result = yy_action_121(_last_pos, _args[0:1]) let _sub_action_2_result = yy_action_10(_args[0].2, _args[1:2]) let _sub_action_3_result = yy_action_16(_args[3].2, _args[4:6]) guard _sub_action_0_result is YYObj_List_Attribute_(_dollar1) @@ -6116,10 +7287,10 @@ fn yy_action_156(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 424| attributes is_declare visibility "const" UIDENT opt_annot { ($1, true, $2, $3, Binder::{ name : $5, loc : mk_loc($loc($5)) }, $6) } -fn yy_action_157(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 435| attributes is_declare visibility "const" UIDENT opt_annot { ($1, true, $2, $3, Binder::{ name : $5, loc : mk_loc($loc($5)) }, $6) } +fn yy_action_191(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _sub_action_0_result = yy_action_3(_last_pos, _args[0:0]) - let _sub_action_1_result = yy_action_100(_last_pos, _args[0:1]) + let _sub_action_1_result = yy_action_121(_last_pos, _args[0:1]) let _sub_action_2_result = yy_action_10(_args[0].2, _args[1:2]) let _sub_action_3_result = yy_action_18(_args[3].2, _args[4:4]) guard _sub_action_0_result is YYObj_List_Attribute_(_dollar1) @@ -6133,26 +7304,26 @@ fn yy_action_157(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 538| attributes is_declare visibility "extenum" UIDENT optional_type_parameters_no_constraints "{" list_semis(enum_constructor) "}" deriving_directive_list { -// 539| let tycon_loc = mk_loc($loc($5)) -// 540| TopTypeDef( -// 541| TypeDecl::{ -// 542| tycon : $5, -// 543| tycon_loc, -// 544| params : $6, -// 545| components : ExtensibleEnum($8), -// 546| type_vis : $3, -// 547| doc : DocString::empty(), -// 548| deriving : $10, -// 549| loc : mk_loc($sloc), -// 550| attrs : $1, -// 551| is_declare : $2 -// 552| } -// 553| ) -// 554| } -fn yy_action_158(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 549| attributes is_declare visibility "extenum" UIDENT optional_type_parameters_no_constraints "{" list_semis(enum_constructor) "}" deriving_directive_list { +// 550| let tycon_loc = mk_loc($loc($5)) +// 551| TopTypeDef( +// 552| TypeDecl::{ +// 553| tycon : $5, +// 554| tycon_loc, +// 555| params : $6, +// 556| components : ExtensibleEnum($8), +// 557| type_vis : $3, +// 558| doc : DocString::empty(), +// 559| deriving : $10, +// 560| loc : mk_loc($sloc), +// 561| attrs : $1, +// 562| is_declare : $2 +// 563| } +// 564| ) +// 565| } +fn yy_action_192(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _sub_action_0_result = yy_action_3(_last_pos, _args[0:0]) - let _sub_action_1_result = yy_action_100(_last_pos, _args[0:1]) + let _sub_action_1_result = yy_action_121(_last_pos, _args[0:1]) let _sub_action_2_result = yy_action_10(_args[0].2, _args[1:2]) let _start_pos_of_item4 = _args[3].1 let _end_pos_of_item4 = _args[3].2 @@ -6185,26 +7356,26 @@ fn yy_action_158(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 555| attributes is_declare visibility "extenum" extenum_extension_target "+=" "{" list_semis(enum_constructor) "}" deriving_directive_list { -// 556| let (tycon, tycon_loc, params, target) = $5 -// 557| TopTypeDef( -// 558| TypeDecl::{ -// 559| tycon, -// 560| tycon_loc, -// 561| params, -// 562| components : ExtendEnum(target~, constructors = $8), -// 563| type_vis : $3, -// 564| doc : DocString::empty(), -// 565| deriving : $10, -// 566| loc : mk_loc($sloc), -// 567| attrs : $1, -// 568| is_declare : $2 -// 569| } -// 570| ) -// 571| } -fn yy_action_159(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 566| attributes is_declare visibility "extenum" extenum_extension_target "+=" "{" list_semis(enum_constructor) "}" deriving_directive_list { +// 567| let (tycon, tycon_loc, params, target) = $5 +// 568| TopTypeDef( +// 569| TypeDecl::{ +// 570| tycon, +// 571| tycon_loc, +// 572| params, +// 573| components : ExtendEnum(target~, constructors = $8), +// 574| type_vis : $3, +// 575| doc : DocString::empty(), +// 576| deriving : $10, +// 577| loc : mk_loc($sloc), +// 578| attrs : $1, +// 579| is_declare : $2 +// 580| } +// 581| ) +// 582| } +fn yy_action_193(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _sub_action_0_result = yy_action_3(_last_pos, _args[0:0]) - let _sub_action_1_result = yy_action_100(_last_pos, _args[0:1]) + let _sub_action_1_result = yy_action_121(_last_pos, _args[0:1]) let _sub_action_2_result = yy_action_10(_args[0].2, _args[1:2]) guard _args[3].0 is YYObj__String__Location__List_TypeDeclBinder___TypeName_(_dollar5) guard _args[6].0 is YYObj_List_ConstrDecl_(_dollar8) @@ -6234,28 +7405,28 @@ fn yy_action_159(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 654| attributes is_declare visibility "trait" UIDENT option(preceded(COLON, separated_nonempty_list(PLUS, tvar_constraint))) "{" list_semis(trait_method_decl) "}" { -// 655| let name = Binder::{ name: $5, loc: mk_loc($loc($4)) } -// 656| let supers = match $6 { -// 657| None => @list.empty() -// 658| Some(supers) => supers -// 659| } -// 660| TopTrait( -// 661| TraitDecl::{ -// 662| name, -// 663| supers, -// 664| methods: $8, -// 665| vis: $3, -// 666| loc: mk_loc($sloc), -// 667| attrs: $1, -// 668| doc : DocString::empty(), -// 669| is_declare : $2 -// 670| } -// 671| ) -// 672| } -fn yy_action_160(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 665| attributes is_declare visibility "trait" UIDENT option(preceded(COLON, separated_nonempty_list(PLUS, tvar_constraint))) "{" list_semis(trait_method_decl) "}" { +// 666| let name = Binder::{ name: $5, loc: mk_loc($loc($4)) } +// 667| let supers = match $6 { +// 668| None => @list.empty() +// 669| Some(supers) => supers +// 670| } +// 671| TopTrait( +// 672| TraitDecl::{ +// 673| name, +// 674| supers, +// 675| methods: $8, +// 676| vis: $3, +// 677| loc: mk_loc($sloc), +// 678| attrs: $1, +// 679| doc : DocString::empty(), +// 680| is_declare : $2 +// 681| } +// 682| ) +// 683| } +fn yy_action_194(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _sub_action_0_result = yy_action_3(_last_pos, _args[0:0]) - let _sub_action_1_result = yy_action_100(_last_pos, _args[0:1]) + let _sub_action_1_result = yy_action_121(_last_pos, _args[0:1]) let _sub_action_2_result = yy_action_10(_args[0].2, _args[1:2]) guard _args[3].0 is YYObj_String(_dollar5) let _start_pos_of_item3 = _args[2].1 @@ -6289,21 +7460,21 @@ fn yy_action_160(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 735| attributes is_declare visibility "impl" optional_type_parameters type_name "for" type_ { -// 736| TopImplRelation( -// 737| self_ty = $8, -// 738| trait_ = $6, -// 739| quantifiers = $5, -// 740| vis = $3, -// 741| attrs = $1, -// 742| loc = mk_loc($sloc), -// 743| doc = DocString::empty(), -// 744| is_declare = $2 -// 745| ) -// 746| } -fn yy_action_161(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 748| attributes is_declare visibility "impl" optional_type_parameters type_name "for" type_ { +// 749| TopImplRelation( +// 750| self_ty = $8, +// 751| trait_ = $6, +// 752| quantifiers = $5, +// 753| vis = $3, +// 754| attrs = $1, +// 755| loc = mk_loc($sloc), +// 756| doc = DocString::empty(), +// 757| is_declare = $2 +// 758| ) +// 759| } +fn yy_action_195(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _sub_action_0_result = yy_action_3(_last_pos, _args[0:0]) - let _sub_action_1_result = yy_action_100(_last_pos, _args[0:1]) + let _sub_action_1_result = yy_action_121(_last_pos, _args[0:1]) let _sub_action_2_result = yy_action_10(_args[0].2, _args[1:2]) guard _args[6].0 is YYObj_Type(_dollar8) guard _args[4].0 is YYObj_TypeName(_dollar6) @@ -6328,12 +7499,12 @@ fn yy_action_161(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 805| attributes is_declare visibility "type" UIDENT optional_type_parameters_no_constraints { -// 806| ($1, $3, $2, $5, mk_loc($loc($5)), $6) -// 807| } -fn yy_action_162(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 823| attributes is_declare visibility "type" UIDENT optional_type_parameters_no_constraints { +// 824| ($1, $3, $2, $5, mk_loc($loc($5)), $6) +// 825| } +fn yy_action_196(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _sub_action_0_result = yy_action_3(_last_pos, _args[0:0]) - let _sub_action_1_result = yy_action_100(_last_pos, _args[0:1]) + let _sub_action_1_result = yy_action_121(_last_pos, _args[0:1]) let _sub_action_2_result = yy_action_10(_args[0].2, _args[1:2]) guard _sub_action_0_result is YYObj_List_Attribute_(_dollar1) guard _sub_action_2_result is YYObj_Visibility(_dollar3) @@ -6348,10 +7519,10 @@ fn yy_action_162(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 811| attributes is_declare visibility "suberror" UIDENT { ($1, $3, $2, $5, mk_loc($loc($5))) } -fn yy_action_163(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 829| attributes is_declare visibility "suberror" UIDENT { ($1, $3, $2, $5, mk_loc($loc($5))) } +fn yy_action_197(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _sub_action_0_result = yy_action_3(_last_pos, _args[0:0]) - let _sub_action_1_result = yy_action_100(_last_pos, _args[0:1]) + let _sub_action_1_result = yy_action_121(_last_pos, _args[0:1]) let _sub_action_2_result = yy_action_10(_args[0].2, _args[1:2]) guard _sub_action_0_result is YYObj_List_Attribute_(_dollar1) guard _sub_action_2_result is YYObj_Visibility(_dollar3) @@ -6363,27 +7534,27 @@ fn yy_action_163(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 362| attributes "declare" visibility is_async fun_header_generic option(parameters) func_return_type { -// 363| let ((type_name, f), quants) = $5 -// 364| let (return_type, error_type) = $7 -// 365| FunDecl::{ -// 366| type_name, -// 367| name: f, -// 368| is_async : $4, -// 369| quantifiers: quants, -// 370| decl_params: $6, -// 371| params_loc: mk_loc($loc($6)), -// 372| return_type, -// 373| error_type, -// 374| vis: $3, -// 375| doc: DocString::empty(), -// 376| attrs: $1, -// 377| loc : mk_loc($loc) -// 378| } -// 379| } -fn yy_action_164(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 373| attributes "declare" visibility is_async fun_header_generic option(parameters) func_return_type { +// 374| let ((type_name, f), quants) = $5 +// 375| let (return_type, error_type) = $7 +// 376| FunDecl::{ +// 377| type_name, +// 378| name: f, +// 379| is_async : $4, +// 380| quantifiers: quants, +// 381| decl_params: $6, +// 382| params_loc: mk_loc($loc($6)), +// 383| return_type, +// 384| error_type, +// 385| vis: $3, +// 386| doc: DocString::empty(), +// 387| attrs: $1, +// 388| loc : mk_loc($loc) +// 389| } +// 390| } +fn yy_action_198(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _sub_action_0_result = yy_action_3(_last_pos, _args[0:0]) - let _sub_action_1_result = yy_action_34(_args[0].2, _args[1:3]) + let _sub_action_1_result = yy_action_40(_args[0].2, _args[1:3]) let _sub_action_2_result = yy_action_5(_args[2].2, _args[3:4]) guard _args[4].0 is YYObj___TypeName___Binder___List_TypeVarBinder__(_dollar5) guard _args[6].0 is YYObj__Type___ErrorType_(_dollar7) @@ -6416,27 +7587,27 @@ fn yy_action_164(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 362| attributes "declare" visibility is_async fun_header_generic option(parameters) func_return_type { -// 363| let ((type_name, f), quants) = $5 -// 364| let (return_type, error_type) = $7 -// 365| FunDecl::{ -// 366| type_name, -// 367| name: f, -// 368| is_async : $4, -// 369| quantifiers: quants, -// 370| decl_params: $6, -// 371| params_loc: mk_loc($loc($6)), -// 372| return_type, -// 373| error_type, -// 374| vis: $3, -// 375| doc: DocString::empty(), -// 376| attrs: $1, -// 377| loc : mk_loc($loc) -// 378| } -// 379| } -fn yy_action_165(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 373| attributes "declare" visibility is_async fun_header_generic option(parameters) func_return_type { +// 374| let ((type_name, f), quants) = $5 +// 375| let (return_type, error_type) = $7 +// 376| FunDecl::{ +// 377| type_name, +// 378| name: f, +// 379| is_async : $4, +// 380| quantifiers: quants, +// 381| decl_params: $6, +// 382| params_loc: mk_loc($loc($6)), +// 383| return_type, +// 384| error_type, +// 385| vis: $3, +// 386| doc: DocString::empty(), +// 387| attrs: $1, +// 388| loc : mk_loc($loc) +// 389| } +// 390| } +fn yy_action_199(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _sub_action_0_result = yy_action_3(_last_pos, _args[0:0]) - let _sub_action_1_result = yy_action_34(_args[0].2, _args[1:3]) + let _sub_action_1_result = yy_action_40(_args[0].2, _args[1:3]) let _sub_action_2_result = yy_action_8(_args[2].2, _args[3:3]) guard _args[3].0 is YYObj___TypeName___Binder___List_TypeVarBinder__(_dollar5) guard _args[5].0 is YYObj__Type___ErrorType_(_dollar7) @@ -6469,11 +7640,11 @@ fn yy_action_165(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 423| attributes is_declare visibility "let" binder opt_annot { ($1, false, $2, $3, $5, $6) } -fn yy_action_166(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 434| attributes is_declare visibility "let" binder opt_annot { ($1, false, $2, $3, $5, $6) } +fn yy_action_200(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _sub_action_0_result = yy_action_3(_last_pos, _args[0:0]) - let _sub_action_1_result = yy_action_100(_last_pos, _args[0:1]) - let _sub_action_2_result = yy_action_34(_args[0].2, _args[1:3]) + let _sub_action_1_result = yy_action_121(_last_pos, _args[0:1]) + let _sub_action_2_result = yy_action_40(_args[0].2, _args[1:3]) let _sub_action_3_result = yy_action_15(_args[3].2, _args[4:5]) let _sub_action_4_result = yy_action_16(_args[4].2, _args[5:7]) guard _sub_action_0_result is YYObj_List_Attribute_(_dollar1) @@ -6485,11 +7656,11 @@ fn yy_action_166(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 423| attributes is_declare visibility "let" binder opt_annot { ($1, false, $2, $3, $5, $6) } -fn yy_action_167(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 434| attributes is_declare visibility "let" binder opt_annot { ($1, false, $2, $3, $5, $6) } +fn yy_action_201(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _sub_action_0_result = yy_action_3(_last_pos, _args[0:0]) - let _sub_action_1_result = yy_action_100(_last_pos, _args[0:1]) - let _sub_action_2_result = yy_action_34(_args[0].2, _args[1:3]) + let _sub_action_1_result = yy_action_121(_last_pos, _args[0:1]) + let _sub_action_2_result = yy_action_40(_args[0].2, _args[1:3]) let _sub_action_3_result = yy_action_15(_args[3].2, _args[4:5]) let _sub_action_4_result = yy_action_18(_args[4].2, _args[5:5]) guard _sub_action_0_result is YYObj_List_Attribute_(_dollar1) @@ -6501,11 +7672,43 @@ fn yy_action_167(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 424| attributes is_declare visibility "const" UIDENT opt_annot { ($1, true, $2, $3, Binder::{ name : $5, loc : mk_loc($loc($5)) }, $6) } -fn yy_action_168(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 434| attributes is_declare visibility "let" binder opt_annot { ($1, false, $2, $3, $5, $6) } +fn yy_action_202(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_3(_last_pos, _args[0:0]) + let _sub_action_1_result = yy_action_121(_last_pos, _args[0:1]) + let _sub_action_2_result = yy_action_40(_args[0].2, _args[1:3]) + let _sub_action_3_result = yy_action_20(_args[3].2, _args[4:5]) + let _sub_action_4_result = yy_action_16(_args[4].2, _args[5:7]) + guard _sub_action_0_result is YYObj_List_Attribute_(_dollar1) + guard _sub_action_1_result is YYObj_Bool(_dollar2) + guard _sub_action_2_result is YYObj_Visibility(_dollar3) + guard _sub_action_3_result is YYObj_Binder(_dollar5) + guard _sub_action_4_result is YYObj_Type_(_dollar6) + YYObj__List_Attribute___Bool__Bool__Visibility__Binder__Type__({(); (_dollar1, false, _dollar2, _dollar3, _dollar5, _dollar6) }) +} + +// file:///./parser.mbty +// 434| attributes is_declare visibility "let" binder opt_annot { ($1, false, $2, $3, $5, $6) } +fn yy_action_203(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_3(_last_pos, _args[0:0]) + let _sub_action_1_result = yy_action_121(_last_pos, _args[0:1]) + let _sub_action_2_result = yy_action_40(_args[0].2, _args[1:3]) + let _sub_action_3_result = yy_action_20(_args[3].2, _args[4:5]) + let _sub_action_4_result = yy_action_18(_args[4].2, _args[5:5]) + guard _sub_action_0_result is YYObj_List_Attribute_(_dollar1) + guard _sub_action_1_result is YYObj_Bool(_dollar2) + guard _sub_action_2_result is YYObj_Visibility(_dollar3) + guard _sub_action_3_result is YYObj_Binder(_dollar5) + guard _sub_action_4_result is YYObj_Type_(_dollar6) + YYObj__List_Attribute___Bool__Bool__Visibility__Binder__Type__({(); (_dollar1, false, _dollar2, _dollar3, _dollar5, _dollar6) }) +} + +// file:///./parser.mbty +// 435| attributes is_declare visibility "const" UIDENT opt_annot { ($1, true, $2, $3, Binder::{ name : $5, loc : mk_loc($loc($5)) }, $6) } +fn yy_action_204(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _sub_action_0_result = yy_action_3(_last_pos, _args[0:0]) - let _sub_action_1_result = yy_action_100(_last_pos, _args[0:1]) - let _sub_action_2_result = yy_action_34(_args[0].2, _args[1:3]) + let _sub_action_1_result = yy_action_121(_last_pos, _args[0:1]) + let _sub_action_2_result = yy_action_40(_args[0].2, _args[1:3]) let _sub_action_3_result = yy_action_16(_args[4].2, _args[5:7]) guard _sub_action_0_result is YYObj_List_Attribute_(_dollar1) guard _sub_action_1_result is YYObj_Bool(_dollar2) @@ -6518,11 +7721,11 @@ fn yy_action_168(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 424| attributes is_declare visibility "const" UIDENT opt_annot { ($1, true, $2, $3, Binder::{ name : $5, loc : mk_loc($loc($5)) }, $6) } -fn yy_action_169(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 435| attributes is_declare visibility "const" UIDENT opt_annot { ($1, true, $2, $3, Binder::{ name : $5, loc : mk_loc($loc($5)) }, $6) } +fn yy_action_205(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _sub_action_0_result = yy_action_3(_last_pos, _args[0:0]) - let _sub_action_1_result = yy_action_100(_last_pos, _args[0:1]) - let _sub_action_2_result = yy_action_34(_args[0].2, _args[1:3]) + let _sub_action_1_result = yy_action_121(_last_pos, _args[0:1]) + let _sub_action_2_result = yy_action_40(_args[0].2, _args[1:3]) let _sub_action_3_result = yy_action_18(_args[4].2, _args[5:5]) guard _sub_action_0_result is YYObj_List_Attribute_(_dollar1) guard _sub_action_1_result is YYObj_Bool(_dollar2) @@ -6535,27 +7738,27 @@ fn yy_action_169(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 538| attributes is_declare visibility "extenum" UIDENT optional_type_parameters_no_constraints "{" list_semis(enum_constructor) "}" deriving_directive_list { -// 539| let tycon_loc = mk_loc($loc($5)) -// 540| TopTypeDef( -// 541| TypeDecl::{ -// 542| tycon : $5, -// 543| tycon_loc, -// 544| params : $6, -// 545| components : ExtensibleEnum($8), -// 546| type_vis : $3, -// 547| doc : DocString::empty(), -// 548| deriving : $10, -// 549| loc : mk_loc($sloc), -// 550| attrs : $1, -// 551| is_declare : $2 -// 552| } -// 553| ) -// 554| } -fn yy_action_170(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 549| attributes is_declare visibility "extenum" UIDENT optional_type_parameters_no_constraints "{" list_semis(enum_constructor) "}" deriving_directive_list { +// 550| let tycon_loc = mk_loc($loc($5)) +// 551| TopTypeDef( +// 552| TypeDecl::{ +// 553| tycon : $5, +// 554| tycon_loc, +// 555| params : $6, +// 556| components : ExtensibleEnum($8), +// 557| type_vis : $3, +// 558| doc : DocString::empty(), +// 559| deriving : $10, +// 560| loc : mk_loc($sloc), +// 561| attrs : $1, +// 562| is_declare : $2 +// 563| } +// 564| ) +// 565| } +fn yy_action_206(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _sub_action_0_result = yy_action_3(_last_pos, _args[0:0]) - let _sub_action_1_result = yy_action_100(_last_pos, _args[0:1]) - let _sub_action_2_result = yy_action_34(_args[0].2, _args[1:3]) + let _sub_action_1_result = yy_action_121(_last_pos, _args[0:1]) + let _sub_action_2_result = yy_action_40(_args[0].2, _args[1:3]) let _start_pos_of_item4 = _args[4].1 let _end_pos_of_item4 = _args[4].2 guard _args[4].0 is YYObj_String(_dollar5) @@ -6587,27 +7790,27 @@ fn yy_action_170(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 555| attributes is_declare visibility "extenum" extenum_extension_target "+=" "{" list_semis(enum_constructor) "}" deriving_directive_list { -// 556| let (tycon, tycon_loc, params, target) = $5 -// 557| TopTypeDef( -// 558| TypeDecl::{ -// 559| tycon, -// 560| tycon_loc, -// 561| params, -// 562| components : ExtendEnum(target~, constructors = $8), -// 563| type_vis : $3, -// 564| doc : DocString::empty(), -// 565| deriving : $10, -// 566| loc : mk_loc($sloc), -// 567| attrs : $1, -// 568| is_declare : $2 -// 569| } -// 570| ) -// 571| } -fn yy_action_171(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 566| attributes is_declare visibility "extenum" extenum_extension_target "+=" "{" list_semis(enum_constructor) "}" deriving_directive_list { +// 567| let (tycon, tycon_loc, params, target) = $5 +// 568| TopTypeDef( +// 569| TypeDecl::{ +// 570| tycon, +// 571| tycon_loc, +// 572| params, +// 573| components : ExtendEnum(target~, constructors = $8), +// 574| type_vis : $3, +// 575| doc : DocString::empty(), +// 576| deriving : $10, +// 577| loc : mk_loc($sloc), +// 578| attrs : $1, +// 579| is_declare : $2 +// 580| } +// 581| ) +// 582| } +fn yy_action_207(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _sub_action_0_result = yy_action_3(_last_pos, _args[0:0]) - let _sub_action_1_result = yy_action_100(_last_pos, _args[0:1]) - let _sub_action_2_result = yy_action_34(_args[0].2, _args[1:3]) + let _sub_action_1_result = yy_action_121(_last_pos, _args[0:1]) + let _sub_action_2_result = yy_action_40(_args[0].2, _args[1:3]) guard _args[4].0 is YYObj__String__Location__List_TypeDeclBinder___TypeName_(_dollar5) guard _args[7].0 is YYObj_List_ConstrDecl_(_dollar8) guard _sub_action_2_result is YYObj_Visibility(_dollar3) @@ -6636,29 +7839,29 @@ fn yy_action_171(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 654| attributes is_declare visibility "trait" UIDENT option(preceded(COLON, separated_nonempty_list(PLUS, tvar_constraint))) "{" list_semis(trait_method_decl) "}" { -// 655| let name = Binder::{ name: $5, loc: mk_loc($loc($4)) } -// 656| let supers = match $6 { -// 657| None => @list.empty() -// 658| Some(supers) => supers -// 659| } -// 660| TopTrait( -// 661| TraitDecl::{ -// 662| name, -// 663| supers, -// 664| methods: $8, -// 665| vis: $3, -// 666| loc: mk_loc($sloc), -// 667| attrs: $1, -// 668| doc : DocString::empty(), -// 669| is_declare : $2 -// 670| } -// 671| ) -// 672| } -fn yy_action_172(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 665| attributes is_declare visibility "trait" UIDENT option(preceded(COLON, separated_nonempty_list(PLUS, tvar_constraint))) "{" list_semis(trait_method_decl) "}" { +// 666| let name = Binder::{ name: $5, loc: mk_loc($loc($4)) } +// 667| let supers = match $6 { +// 668| None => @list.empty() +// 669| Some(supers) => supers +// 670| } +// 671| TopTrait( +// 672| TraitDecl::{ +// 673| name, +// 674| supers, +// 675| methods: $8, +// 676| vis: $3, +// 677| loc: mk_loc($sloc), +// 678| attrs: $1, +// 679| doc : DocString::empty(), +// 680| is_declare : $2 +// 681| } +// 682| ) +// 683| } +fn yy_action_208(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _sub_action_0_result = yy_action_3(_last_pos, _args[0:0]) - let _sub_action_1_result = yy_action_100(_last_pos, _args[0:1]) - let _sub_action_2_result = yy_action_34(_args[0].2, _args[1:3]) + let _sub_action_1_result = yy_action_121(_last_pos, _args[0:1]) + let _sub_action_2_result = yy_action_40(_args[0].2, _args[1:3]) guard _args[4].0 is YYObj_String(_dollar5) let _start_pos_of_item3 = _args[3].1 let _end_pos_of_item3 = _args[3].2 @@ -6691,22 +7894,22 @@ fn yy_action_172(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 735| attributes is_declare visibility "impl" optional_type_parameters type_name "for" type_ { -// 736| TopImplRelation( -// 737| self_ty = $8, -// 738| trait_ = $6, -// 739| quantifiers = $5, -// 740| vis = $3, -// 741| attrs = $1, -// 742| loc = mk_loc($sloc), -// 743| doc = DocString::empty(), -// 744| is_declare = $2 -// 745| ) -// 746| } -fn yy_action_173(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 748| attributes is_declare visibility "impl" optional_type_parameters type_name "for" type_ { +// 749| TopImplRelation( +// 750| self_ty = $8, +// 751| trait_ = $6, +// 752| quantifiers = $5, +// 753| vis = $3, +// 754| attrs = $1, +// 755| loc = mk_loc($sloc), +// 756| doc = DocString::empty(), +// 757| is_declare = $2 +// 758| ) +// 759| } +fn yy_action_209(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _sub_action_0_result = yy_action_3(_last_pos, _args[0:0]) - let _sub_action_1_result = yy_action_100(_last_pos, _args[0:1]) - let _sub_action_2_result = yy_action_34(_args[0].2, _args[1:3]) + let _sub_action_1_result = yy_action_121(_last_pos, _args[0:1]) + let _sub_action_2_result = yy_action_40(_args[0].2, _args[1:3]) guard _args[7].0 is YYObj_Type(_dollar8) guard _args[5].0 is YYObj_TypeName(_dollar6) guard _args[4].0 is YYObj_List_TypeVarBinder_(_dollar5) @@ -6730,13 +7933,13 @@ fn yy_action_173(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 805| attributes is_declare visibility "type" UIDENT optional_type_parameters_no_constraints { -// 806| ($1, $3, $2, $5, mk_loc($loc($5)), $6) -// 807| } -fn yy_action_174(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 823| attributes is_declare visibility "type" UIDENT optional_type_parameters_no_constraints { +// 824| ($1, $3, $2, $5, mk_loc($loc($5)), $6) +// 825| } +fn yy_action_210(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _sub_action_0_result = yy_action_3(_last_pos, _args[0:0]) - let _sub_action_1_result = yy_action_100(_last_pos, _args[0:1]) - let _sub_action_2_result = yy_action_34(_args[0].2, _args[1:3]) + let _sub_action_1_result = yy_action_121(_last_pos, _args[0:1]) + let _sub_action_2_result = yy_action_40(_args[0].2, _args[1:3]) guard _sub_action_0_result is YYObj_List_Attribute_(_dollar1) guard _sub_action_2_result is YYObj_Visibility(_dollar3) guard _sub_action_1_result is YYObj_Bool(_dollar2) @@ -6750,11 +7953,11 @@ fn yy_action_174(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 811| attributes is_declare visibility "suberror" UIDENT { ($1, $3, $2, $5, mk_loc($loc($5))) } -fn yy_action_175(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 829| attributes is_declare visibility "suberror" UIDENT { ($1, $3, $2, $5, mk_loc($loc($5))) } +fn yy_action_211(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _sub_action_0_result = yy_action_3(_last_pos, _args[0:0]) - let _sub_action_1_result = yy_action_100(_last_pos, _args[0:1]) - let _sub_action_2_result = yy_action_34(_args[0].2, _args[1:3]) + let _sub_action_1_result = yy_action_121(_last_pos, _args[0:1]) + let _sub_action_2_result = yy_action_40(_args[0].2, _args[1:3]) guard _sub_action_0_result is YYObj_List_Attribute_(_dollar1) guard _sub_action_2_result is YYObj_Visibility(_dollar3) guard _sub_action_1_result is YYObj_Bool(_dollar2) @@ -6765,10 +7968,10 @@ fn yy_action_175(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 423| attributes is_declare visibility "let" binder opt_annot { ($1, false, $2, $3, $5, $6) } -fn yy_action_176(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 434| attributes is_declare visibility "let" binder opt_annot { ($1, false, $2, $3, $5, $6) } +fn yy_action_212(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _sub_action_0_result = yy_action_3(_last_pos, _args[0:0]) - let _sub_action_1_result = yy_action_100(_last_pos, _args[0:1]) + let _sub_action_1_result = yy_action_121(_last_pos, _args[0:1]) let _sub_action_2_result = yy_action_4(_args[0].2, _args[1:1]) let _sub_action_3_result = yy_action_15(_args[1].2, _args[2:3]) let _sub_action_4_result = yy_action_16(_args[2].2, _args[3:5]) @@ -6781,10 +7984,10 @@ fn yy_action_176(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 423| attributes is_declare visibility "let" binder opt_annot { ($1, false, $2, $3, $5, $6) } -fn yy_action_177(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 434| attributes is_declare visibility "let" binder opt_annot { ($1, false, $2, $3, $5, $6) } +fn yy_action_213(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _sub_action_0_result = yy_action_3(_last_pos, _args[0:0]) - let _sub_action_1_result = yy_action_100(_last_pos, _args[0:1]) + let _sub_action_1_result = yy_action_121(_last_pos, _args[0:1]) let _sub_action_2_result = yy_action_4(_args[0].2, _args[1:1]) let _sub_action_3_result = yy_action_15(_args[1].2, _args[2:3]) let _sub_action_4_result = yy_action_18(_args[2].2, _args[3:3]) @@ -6797,10 +8000,42 @@ fn yy_action_177(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 424| attributes is_declare visibility "const" UIDENT opt_annot { ($1, true, $2, $3, Binder::{ name : $5, loc : mk_loc($loc($5)) }, $6) } -fn yy_action_178(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 434| attributes is_declare visibility "let" binder opt_annot { ($1, false, $2, $3, $5, $6) } +fn yy_action_214(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_3(_last_pos, _args[0:0]) + let _sub_action_1_result = yy_action_121(_last_pos, _args[0:1]) + let _sub_action_2_result = yy_action_4(_args[0].2, _args[1:1]) + let _sub_action_3_result = yy_action_20(_args[1].2, _args[2:3]) + let _sub_action_4_result = yy_action_16(_args[2].2, _args[3:5]) + guard _sub_action_0_result is YYObj_List_Attribute_(_dollar1) + guard _sub_action_1_result is YYObj_Bool(_dollar2) + guard _sub_action_2_result is YYObj_Visibility(_dollar3) + guard _sub_action_3_result is YYObj_Binder(_dollar5) + guard _sub_action_4_result is YYObj_Type_(_dollar6) + YYObj__List_Attribute___Bool__Bool__Visibility__Binder__Type__({(); (_dollar1, false, _dollar2, _dollar3, _dollar5, _dollar6) }) +} + +// file:///./parser.mbty +// 434| attributes is_declare visibility "let" binder opt_annot { ($1, false, $2, $3, $5, $6) } +fn yy_action_215(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_3(_last_pos, _args[0:0]) + let _sub_action_1_result = yy_action_121(_last_pos, _args[0:1]) + let _sub_action_2_result = yy_action_4(_args[0].2, _args[1:1]) + let _sub_action_3_result = yy_action_20(_args[1].2, _args[2:3]) + let _sub_action_4_result = yy_action_18(_args[2].2, _args[3:3]) + guard _sub_action_0_result is YYObj_List_Attribute_(_dollar1) + guard _sub_action_1_result is YYObj_Bool(_dollar2) + guard _sub_action_2_result is YYObj_Visibility(_dollar3) + guard _sub_action_3_result is YYObj_Binder(_dollar5) + guard _sub_action_4_result is YYObj_Type_(_dollar6) + YYObj__List_Attribute___Bool__Bool__Visibility__Binder__Type__({(); (_dollar1, false, _dollar2, _dollar3, _dollar5, _dollar6) }) +} + +// file:///./parser.mbty +// 435| attributes is_declare visibility "const" UIDENT opt_annot { ($1, true, $2, $3, Binder::{ name : $5, loc : mk_loc($loc($5)) }, $6) } +fn yy_action_216(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _sub_action_0_result = yy_action_3(_last_pos, _args[0:0]) - let _sub_action_1_result = yy_action_100(_last_pos, _args[0:1]) + let _sub_action_1_result = yy_action_121(_last_pos, _args[0:1]) let _sub_action_2_result = yy_action_4(_args[0].2, _args[1:1]) let _sub_action_3_result = yy_action_16(_args[2].2, _args[3:5]) guard _sub_action_0_result is YYObj_List_Attribute_(_dollar1) @@ -6814,10 +8049,10 @@ fn yy_action_178(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 424| attributes is_declare visibility "const" UIDENT opt_annot { ($1, true, $2, $3, Binder::{ name : $5, loc : mk_loc($loc($5)) }, $6) } -fn yy_action_179(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 435| attributes is_declare visibility "const" UIDENT opt_annot { ($1, true, $2, $3, Binder::{ name : $5, loc : mk_loc($loc($5)) }, $6) } +fn yy_action_217(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _sub_action_0_result = yy_action_3(_last_pos, _args[0:0]) - let _sub_action_1_result = yy_action_100(_last_pos, _args[0:1]) + let _sub_action_1_result = yy_action_121(_last_pos, _args[0:1]) let _sub_action_2_result = yy_action_4(_args[0].2, _args[1:1]) let _sub_action_3_result = yy_action_18(_args[2].2, _args[3:3]) guard _sub_action_0_result is YYObj_List_Attribute_(_dollar1) @@ -6831,26 +8066,26 @@ fn yy_action_179(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 538| attributes is_declare visibility "extenum" UIDENT optional_type_parameters_no_constraints "{" list_semis(enum_constructor) "}" deriving_directive_list { -// 539| let tycon_loc = mk_loc($loc($5)) -// 540| TopTypeDef( -// 541| TypeDecl::{ -// 542| tycon : $5, -// 543| tycon_loc, -// 544| params : $6, -// 545| components : ExtensibleEnum($8), -// 546| type_vis : $3, -// 547| doc : DocString::empty(), -// 548| deriving : $10, -// 549| loc : mk_loc($sloc), -// 550| attrs : $1, -// 551| is_declare : $2 -// 552| } -// 553| ) -// 554| } -fn yy_action_180(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 549| attributes is_declare visibility "extenum" UIDENT optional_type_parameters_no_constraints "{" list_semis(enum_constructor) "}" deriving_directive_list { +// 550| let tycon_loc = mk_loc($loc($5)) +// 551| TopTypeDef( +// 552| TypeDecl::{ +// 553| tycon : $5, +// 554| tycon_loc, +// 555| params : $6, +// 556| components : ExtensibleEnum($8), +// 557| type_vis : $3, +// 558| doc : DocString::empty(), +// 559| deriving : $10, +// 560| loc : mk_loc($sloc), +// 561| attrs : $1, +// 562| is_declare : $2 +// 563| } +// 564| ) +// 565| } +fn yy_action_218(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _sub_action_0_result = yy_action_3(_last_pos, _args[0:0]) - let _sub_action_1_result = yy_action_100(_last_pos, _args[0:1]) + let _sub_action_1_result = yy_action_121(_last_pos, _args[0:1]) let _sub_action_2_result = yy_action_4(_args[0].2, _args[1:1]) let _start_pos_of_item4 = _args[2].1 let _end_pos_of_item4 = _args[2].2 @@ -6883,26 +8118,26 @@ fn yy_action_180(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 555| attributes is_declare visibility "extenum" extenum_extension_target "+=" "{" list_semis(enum_constructor) "}" deriving_directive_list { -// 556| let (tycon, tycon_loc, params, target) = $5 -// 557| TopTypeDef( -// 558| TypeDecl::{ -// 559| tycon, -// 560| tycon_loc, -// 561| params, -// 562| components : ExtendEnum(target~, constructors = $8), -// 563| type_vis : $3, -// 564| doc : DocString::empty(), -// 565| deriving : $10, -// 566| loc : mk_loc($sloc), -// 567| attrs : $1, -// 568| is_declare : $2 -// 569| } -// 570| ) -// 571| } -fn yy_action_181(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 566| attributes is_declare visibility "extenum" extenum_extension_target "+=" "{" list_semis(enum_constructor) "}" deriving_directive_list { +// 567| let (tycon, tycon_loc, params, target) = $5 +// 568| TopTypeDef( +// 569| TypeDecl::{ +// 570| tycon, +// 571| tycon_loc, +// 572| params, +// 573| components : ExtendEnum(target~, constructors = $8), +// 574| type_vis : $3, +// 575| doc : DocString::empty(), +// 576| deriving : $10, +// 577| loc : mk_loc($sloc), +// 578| attrs : $1, +// 579| is_declare : $2 +// 580| } +// 581| ) +// 582| } +fn yy_action_219(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _sub_action_0_result = yy_action_3(_last_pos, _args[0:0]) - let _sub_action_1_result = yy_action_100(_last_pos, _args[0:1]) + let _sub_action_1_result = yy_action_121(_last_pos, _args[0:1]) let _sub_action_2_result = yy_action_4(_args[0].2, _args[1:1]) guard _args[2].0 is YYObj__String__Location__List_TypeDeclBinder___TypeName_(_dollar5) guard _args[5].0 is YYObj_List_ConstrDecl_(_dollar8) @@ -6932,28 +8167,28 @@ fn yy_action_181(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 654| attributes is_declare visibility "trait" UIDENT option(preceded(COLON, separated_nonempty_list(PLUS, tvar_constraint))) "{" list_semis(trait_method_decl) "}" { -// 655| let name = Binder::{ name: $5, loc: mk_loc($loc($4)) } -// 656| let supers = match $6 { -// 657| None => @list.empty() -// 658| Some(supers) => supers -// 659| } -// 660| TopTrait( -// 661| TraitDecl::{ -// 662| name, -// 663| supers, -// 664| methods: $8, -// 665| vis: $3, -// 666| loc: mk_loc($sloc), -// 667| attrs: $1, -// 668| doc : DocString::empty(), -// 669| is_declare : $2 -// 670| } -// 671| ) -// 672| } -fn yy_action_182(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 665| attributes is_declare visibility "trait" UIDENT option(preceded(COLON, separated_nonempty_list(PLUS, tvar_constraint))) "{" list_semis(trait_method_decl) "}" { +// 666| let name = Binder::{ name: $5, loc: mk_loc($loc($4)) } +// 667| let supers = match $6 { +// 668| None => @list.empty() +// 669| Some(supers) => supers +// 670| } +// 671| TopTrait( +// 672| TraitDecl::{ +// 673| name, +// 674| supers, +// 675| methods: $8, +// 676| vis: $3, +// 677| loc: mk_loc($sloc), +// 678| attrs: $1, +// 679| doc : DocString::empty(), +// 680| is_declare : $2 +// 681| } +// 682| ) +// 683| } +fn yy_action_220(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _sub_action_0_result = yy_action_3(_last_pos, _args[0:0]) - let _sub_action_1_result = yy_action_100(_last_pos, _args[0:1]) + let _sub_action_1_result = yy_action_121(_last_pos, _args[0:1]) let _sub_action_2_result = yy_action_4(_args[0].2, _args[1:1]) guard _args[2].0 is YYObj_String(_dollar5) let _start_pos_of_item3 = _args[1].1 @@ -6987,21 +8222,21 @@ fn yy_action_182(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 735| attributes is_declare visibility "impl" optional_type_parameters type_name "for" type_ { -// 736| TopImplRelation( -// 737| self_ty = $8, -// 738| trait_ = $6, -// 739| quantifiers = $5, -// 740| vis = $3, -// 741| attrs = $1, -// 742| loc = mk_loc($sloc), -// 743| doc = DocString::empty(), -// 744| is_declare = $2 -// 745| ) -// 746| } -fn yy_action_183(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 748| attributes is_declare visibility "impl" optional_type_parameters type_name "for" type_ { +// 749| TopImplRelation( +// 750| self_ty = $8, +// 751| trait_ = $6, +// 752| quantifiers = $5, +// 753| vis = $3, +// 754| attrs = $1, +// 755| loc = mk_loc($sloc), +// 756| doc = DocString::empty(), +// 757| is_declare = $2 +// 758| ) +// 759| } +fn yy_action_221(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _sub_action_0_result = yy_action_3(_last_pos, _args[0:0]) - let _sub_action_1_result = yy_action_100(_last_pos, _args[0:1]) + let _sub_action_1_result = yy_action_121(_last_pos, _args[0:1]) let _sub_action_2_result = yy_action_4(_args[0].2, _args[1:1]) guard _args[5].0 is YYObj_Type(_dollar8) guard _args[3].0 is YYObj_TypeName(_dollar6) @@ -7026,12 +8261,12 @@ fn yy_action_183(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 805| attributes is_declare visibility "type" UIDENT optional_type_parameters_no_constraints { -// 806| ($1, $3, $2, $5, mk_loc($loc($5)), $6) -// 807| } -fn yy_action_184(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 823| attributes is_declare visibility "type" UIDENT optional_type_parameters_no_constraints { +// 824| ($1, $3, $2, $5, mk_loc($loc($5)), $6) +// 825| } +fn yy_action_222(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _sub_action_0_result = yy_action_3(_last_pos, _args[0:0]) - let _sub_action_1_result = yy_action_100(_last_pos, _args[0:1]) + let _sub_action_1_result = yy_action_121(_last_pos, _args[0:1]) let _sub_action_2_result = yy_action_4(_args[0].2, _args[1:1]) guard _sub_action_0_result is YYObj_List_Attribute_(_dollar1) guard _sub_action_2_result is YYObj_Visibility(_dollar3) @@ -7046,10 +8281,10 @@ fn yy_action_184(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 811| attributes is_declare visibility "suberror" UIDENT { ($1, $3, $2, $5, mk_loc($loc($5))) } -fn yy_action_185(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 829| attributes is_declare visibility "suberror" UIDENT { ($1, $3, $2, $5, mk_loc($loc($5))) } +fn yy_action_223(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _sub_action_0_result = yy_action_3(_last_pos, _args[0:0]) - let _sub_action_1_result = yy_action_100(_last_pos, _args[0:1]) + let _sub_action_1_result = yy_action_121(_last_pos, _args[0:1]) let _sub_action_2_result = yy_action_4(_args[0].2, _args[1:1]) guard _sub_action_0_result is YYObj_List_Attribute_(_dollar1) guard _sub_action_2_result is YYObj_Visibility(_dollar3) @@ -7061,39 +8296,48 @@ fn yy_action_185(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 801| "declare" { true } -fn yy_action_100(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 819| "declare" { true } +fn yy_action_121(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { YYObj_Bool({(); true }) } // file:///./parser.mbty -// 382| "fn" optional_type_parameters fun_binder { ($3, $2) } -fn yy_action_186(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 393| "fn" optional_type_parameters fun_binder { ($3, $2) } +fn yy_action_224(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[2].0 is YYObj__TypeName___Binder_(_dollar3) guard _args[1].0 is YYObj_List_TypeVarBinder_(_dollar2) YYObj___TypeName___Binder___List_TypeVarBinder__({(); (_dollar3, _dollar2) }) } // file:///./parser.mbty -// 328| LIDENT { $1 } -fn yy_action_187(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[0].0 is YYObj_String(_dollar1) +// 339| lident_string { $1 } +fn yy_action_225(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_226(_last_pos, _args[0:1]) + guard _sub_action_0_result is YYObj_String(_dollar1) YYObj_String({(); _dollar1 }) } // file:///./parser.mbty -// 329| UIDENT { $1 } -fn yy_action_188(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 339| lident_string { $1 } +fn yy_action_227(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_228(_last_pos, _args[0:1]) + guard _sub_action_0_result is YYObj_String(_dollar1) + YYObj_String({(); _dollar1 }) +} + +// file:///./parser.mbty +// 340| UIDENT { $1 } +fn yy_action_229(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj_String(_dollar1) YYObj_String({(); _dollar1 }) } // file:///./parser.mbty -// 333| type_name "::" luident { -// 334| let binder = Binder::{ name: $3, loc: mk_loc($loc($3)) } -// 335| (Some($1), binder) -// 336| } -fn yy_action_189(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 344| type_name "::" luident { +// 345| let binder = Binder::{ name: $3, loc: mk_loc($loc($3)) } +// 346| (Some($1), binder) +// 347| } +fn yy_action_230(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[2].0 is YYObj_String(_dollar3) let _start_pos_of_item2 = _args[2].1 let _end_pos_of_item2 = _args[2].2 @@ -7105,34 +8349,42 @@ fn yy_action_189(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 337| binder { (None, $1) } -fn yy_action_190(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 348| binder { (None, $1) } +fn yy_action_231(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _sub_action_0_result = yy_action_15(_last_pos, _args[0:1]) guard _sub_action_0_result is YYObj_Binder(_dollar1) YYObj__TypeName___Binder_({(); (None, _dollar1) }) } // file:///./parser.mbty -// 386| attributes visibility "extern" STRING "fn" optional_type_parameters fun_binder option(parameters) func_return_type { -// 387| let (type_name, f) = $7 -// 388| let (return_type, error_type) = $9 -// 389| let fn_decl = FunDecl::{ -// 390| type_name, -// 391| name: f, -// 392| is_async : None, -// 393| quantifiers: $6, -// 394| decl_params: $8, -// 395| params_loc: mk_loc($loc($8)), -// 396| return_type, -// 397| error_type, -// 398| vis: $2, -// 399| doc: DocString::empty(), -// 400| attrs: $1, -// 401| loc : mk_loc($loc) -// 402| } -// 403| ($4, fn_decl) -// 404| } -fn yy_action_191(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 348| binder { (None, $1) } +fn yy_action_232(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_20(_last_pos, _args[0:1]) + guard _sub_action_0_result is YYObj_Binder(_dollar1) + YYObj__TypeName___Binder_({(); (None, _dollar1) }) +} + +// file:///./parser.mbty +// 397| attributes visibility "extern" STRING "fn" optional_type_parameters fun_binder option(parameters) func_return_type { +// 398| let (type_name, f) = $7 +// 399| let (return_type, error_type) = $9 +// 400| let fn_decl = FunDecl::{ +// 401| type_name, +// 402| name: f, +// 403| is_async : None, +// 404| quantifiers: $6, +// 405| decl_params: $8, +// 406| params_loc: mk_loc($loc($8)), +// 407| return_type, +// 408| error_type, +// 409| vis: $2, +// 410| doc: DocString::empty(), +// 411| attrs: $1, +// 412| loc : mk_loc($loc) +// 413| } +// 414| ($4, fn_decl) +// 415| } +fn yy_action_233(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _sub_action_0_result = yy_action_3(_last_pos, _args[0:0]) let _sub_action_1_result = yy_action_4(_last_pos, _args[0:0]) guard _args[4].0 is YYObj__TypeName___Binder_(_dollar7) @@ -7168,8 +8420,8 @@ fn yy_action_191(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 423| attributes is_declare visibility "let" binder opt_annot { ($1, false, $2, $3, $5, $6) } -fn yy_action_192(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 434| attributes is_declare visibility "let" binder opt_annot { ($1, false, $2, $3, $5, $6) } +fn yy_action_234(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _sub_action_0_result = yy_action_3(_last_pos, _args[0:0]) let _sub_action_1_result = yy_action_14(_last_pos, _args[0:0]) let _sub_action_2_result = yy_action_4(_last_pos, _args[0:0]) @@ -7184,8 +8436,8 @@ fn yy_action_192(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 423| attributes is_declare visibility "let" binder opt_annot { ($1, false, $2, $3, $5, $6) } -fn yy_action_193(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 434| attributes is_declare visibility "let" binder opt_annot { ($1, false, $2, $3, $5, $6) } +fn yy_action_235(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _sub_action_0_result = yy_action_3(_last_pos, _args[0:0]) let _sub_action_1_result = yy_action_14(_last_pos, _args[0:0]) let _sub_action_2_result = yy_action_4(_last_pos, _args[0:0]) @@ -7200,8 +8452,40 @@ fn yy_action_193(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 424| attributes is_declare visibility "const" UIDENT opt_annot { ($1, true, $2, $3, Binder::{ name : $5, loc : mk_loc($loc($5)) }, $6) } -fn yy_action_194(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 434| attributes is_declare visibility "let" binder opt_annot { ($1, false, $2, $3, $5, $6) } +fn yy_action_236(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_3(_last_pos, _args[0:0]) + let _sub_action_1_result = yy_action_14(_last_pos, _args[0:0]) + let _sub_action_2_result = yy_action_4(_last_pos, _args[0:0]) + let _sub_action_3_result = yy_action_20(_args[0].2, _args[1:2]) + let _sub_action_4_result = yy_action_16(_args[1].2, _args[2:4]) + guard _sub_action_0_result is YYObj_List_Attribute_(_dollar1) + guard _sub_action_1_result is YYObj_Bool(_dollar2) + guard _sub_action_2_result is YYObj_Visibility(_dollar3) + guard _sub_action_3_result is YYObj_Binder(_dollar5) + guard _sub_action_4_result is YYObj_Type_(_dollar6) + YYObj__List_Attribute___Bool__Bool__Visibility__Binder__Type__({(); (_dollar1, false, _dollar2, _dollar3, _dollar5, _dollar6) }) +} + +// file:///./parser.mbty +// 434| attributes is_declare visibility "let" binder opt_annot { ($1, false, $2, $3, $5, $6) } +fn yy_action_237(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_3(_last_pos, _args[0:0]) + let _sub_action_1_result = yy_action_14(_last_pos, _args[0:0]) + let _sub_action_2_result = yy_action_4(_last_pos, _args[0:0]) + let _sub_action_3_result = yy_action_20(_args[0].2, _args[1:2]) + let _sub_action_4_result = yy_action_18(_args[1].2, _args[2:2]) + guard _sub_action_0_result is YYObj_List_Attribute_(_dollar1) + guard _sub_action_1_result is YYObj_Bool(_dollar2) + guard _sub_action_2_result is YYObj_Visibility(_dollar3) + guard _sub_action_3_result is YYObj_Binder(_dollar5) + guard _sub_action_4_result is YYObj_Type_(_dollar6) + YYObj__List_Attribute___Bool__Bool__Visibility__Binder__Type__({(); (_dollar1, false, _dollar2, _dollar3, _dollar5, _dollar6) }) +} + +// file:///./parser.mbty +// 435| attributes is_declare visibility "const" UIDENT opt_annot { ($1, true, $2, $3, Binder::{ name : $5, loc : mk_loc($loc($5)) }, $6) } +fn yy_action_238(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _sub_action_0_result = yy_action_3(_last_pos, _args[0:0]) let _sub_action_1_result = yy_action_14(_last_pos, _args[0:0]) let _sub_action_2_result = yy_action_4(_last_pos, _args[0:0]) @@ -7217,8 +8501,8 @@ fn yy_action_194(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 424| attributes is_declare visibility "const" UIDENT opt_annot { ($1, true, $2, $3, Binder::{ name : $5, loc : mk_loc($loc($5)) }, $6) } -fn yy_action_195(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 435| attributes is_declare visibility "const" UIDENT opt_annot { ($1, true, $2, $3, Binder::{ name : $5, loc : mk_loc($loc($5)) }, $6) } +fn yy_action_239(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _sub_action_0_result = yy_action_3(_last_pos, _args[0:0]) let _sub_action_1_result = yy_action_14(_last_pos, _args[0:0]) let _sub_action_2_result = yy_action_4(_last_pos, _args[0:0]) @@ -7234,24 +8518,24 @@ fn yy_action_195(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 432| type_header deriving_directive_list { -// 433| let (attrs, type_vis, is_declare, tycon, tycon_loc, params) = $1 -// 434| TopTypeDef( -// 435| TypeDecl::{ -// 436| tycon, -// 437| tycon_loc, -// 438| params, -// 439| components: Abstract, -// 440| type_vis, -// 441| doc : DocString::empty(), -// 442| deriving: $2, -// 443| loc : mk_loc($sloc), -// 444| attrs, -// 445| is_declare -// 446| } -// 447| ) -// 448| } -fn yy_action_196(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 443| type_header deriving_directive_list { +// 444| let (attrs, type_vis, is_declare, tycon, tycon_loc, params) = $1 +// 445| TopTypeDef( +// 446| TypeDecl::{ +// 447| tycon, +// 448| tycon_loc, +// 449| params, +// 450| components: Abstract, +// 451| type_vis, +// 452| doc : DocString::empty(), +// 453| deriving: $2, +// 454| loc : mk_loc($sloc), +// 455| attrs, +// 456| is_declare +// 457| } +// 458| ) +// 459| } +fn yy_action_240(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj__List_Attribute___Visibility__Bool__String__Location__List_TypeDeclBinder__(_dollar1) guard _args[1].0 is YYObj_List_DerivingDirective_(_dollar2) let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) @@ -7276,24 +8560,24 @@ fn yy_action_196(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 673| type_header "=" type_ deriving_directive_list { -// 674| let (attrs, type_vis, is_declare, tycon, tycon_loc, params) = $1 -// 675| TopTypeDef( -// 676| TypeDecl::{ -// 677| tycon, -// 678| tycon_loc, -// 679| params, -// 680| components: Alias($3), -// 681| type_vis, -// 682| doc : DocString::empty(), -// 683| deriving: $4, -// 684| loc : mk_loc($sloc), -// 685| attrs, -// 686| is_declare -// 687| } -// 688| ) -// 689| } -fn yy_action_197(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 684| type_header "=" type_ deriving_directive_list { +// 685| let (attrs, type_vis, is_declare, tycon, tycon_loc, params) = $1 +// 686| TopTypeDef( +// 687| TypeDecl::{ +// 688| tycon, +// 689| tycon_loc, +// 690| params, +// 691| components: Alias($3), +// 692| type_vis, +// 693| doc : DocString::empty(), +// 694| deriving: $4, +// 695| loc : mk_loc($sloc), +// 696| attrs, +// 697| is_declare +// 698| } +// 699| ) +// 700| } +fn yy_action_241(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj__List_Attribute___Visibility__Bool__String__Location__List_TypeDeclBinder__(_dollar1) guard _args[2].0 is YYObj_Type(_dollar3) guard _args[3].0 is YYObj_List_DerivingDirective_(_dollar4) @@ -7319,26 +8603,26 @@ fn yy_action_197(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 449| suberror_header deriving_directive_list { -// 450| let (attrs, type_vis, is_declare, tycon, tycon_loc) = $1 -// 451| let exception_decl : ExceptionDecl = NoPayload -// 452| TopTypeDef( -// 453| TypeDecl::{ -// 454| tycon, -// 455| tycon_loc, -// 456| params: @list.empty(), -// 457| components: Error(exception_decl), -// 458| type_vis, -// 459| doc : DocString::empty(), -// 460| deriving: $2, -// 461| loc : mk_loc($sloc), -// 462| attrs, -// 463| is_declare -// 464| } -// 465| ) -// 466| -// 467| } -fn yy_action_198(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 460| suberror_header deriving_directive_list { +// 461| let (attrs, type_vis, is_declare, tycon, tycon_loc) = $1 +// 462| let exception_decl : ExceptionDecl = NoPayload +// 463| TopTypeDef( +// 464| TypeDecl::{ +// 465| tycon, +// 466| tycon_loc, +// 467| params: @list.empty(), +// 468| components: Error(exception_decl), +// 469| type_vis, +// 470| doc : DocString::empty(), +// 471| deriving: $2, +// 472| loc : mk_loc($sloc), +// 473| attrs, +// 474| is_declare +// 475| } +// 476| ) +// 477| +// 478| } +fn yy_action_242(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj__List_Attribute___Visibility__Bool__String__Location_(_dollar1) guard _args[1].0 is YYObj_List_DerivingDirective_(_dollar2) let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) @@ -7365,25 +8649,25 @@ fn yy_action_198(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 468| suberror_header "{" list_semis(enum_constructor) "}" deriving_directive_list { -// 469| let (attrs, type_vis, is_declare, tycon, tycon_loc) = $1 -// 470| let exception_decl : ExceptionDecl = EnumPayload($3) -// 471| TopTypeDef( -// 472| TypeDecl::{ -// 473| tycon, -// 474| tycon_loc, -// 475| params: @list.empty(), -// 476| components: Error(exception_decl), -// 477| type_vis, -// 478| doc : DocString::empty(), -// 479| deriving: $5, -// 480| loc : mk_loc($sloc), -// 481| attrs, -// 482| is_declare -// 483| } -// 484| ) -// 485| } -fn yy_action_199(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 479| suberror_header "{" list_semis(enum_constructor) "}" deriving_directive_list { +// 480| let (attrs, type_vis, is_declare, tycon, tycon_loc) = $1 +// 481| let exception_decl : ExceptionDecl = EnumPayload($3) +// 482| TopTypeDef( +// 483| TypeDecl::{ +// 484| tycon, +// 485| tycon_loc, +// 486| params: @list.empty(), +// 487| components: Error(exception_decl), +// 488| type_vis, +// 489| doc : DocString::empty(), +// 490| deriving: $5, +// 491| loc : mk_loc($sloc), +// 492| attrs, +// 493| is_declare +// 494| } +// 495| ) +// 496| } +fn yy_action_243(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj__List_Attribute___Visibility__Bool__String__Location_(_dollar1) guard _args[2].0 is YYObj_List_ConstrDecl_(_dollar3) guard _args[4].0 is YYObj_List_DerivingDirective_(_dollar5) @@ -7410,25 +8694,25 @@ fn yy_action_199(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 486| struct_header "{" record_decl_body "}" deriving_directive_list { -// 487| let (attrs, type_vis, tycon, tycon_loc, params) = $1 -// 488| let (fields, constr_decl) = $3 -// 489| TopTypeDef( -// 490| TypeDecl::{ -// 491| tycon, -// 492| tycon_loc, -// 493| params, -// 494| components: Record(fields~, constr_decl~), -// 495| type_vis, -// 496| doc : DocString::empty(), -// 497| deriving: $5, -// 498| loc : mk_loc($sloc), -// 499| attrs, -// 500| is_declare : false -// 501| } -// 502| ) -// 503| } -fn yy_action_200(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 497| struct_header "{" record_decl_body "}" deriving_directive_list { +// 498| let (attrs, type_vis, tycon, tycon_loc, params) = $1 +// 499| let (fields, constr_decl) = $3 +// 500| TopTypeDef( +// 501| TypeDecl::{ +// 502| tycon, +// 503| tycon_loc, +// 504| params, +// 505| components: Record(fields~, constr_decl~), +// 506| type_vis, +// 507| doc : DocString::empty(), +// 508| deriving: $5, +// 509| loc : mk_loc($sloc), +// 510| attrs, +// 511| is_declare : false +// 512| } +// 513| ) +// 514| } +fn yy_action_244(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj__List_Attribute___Visibility__String__Location__List_TypeDeclBinder__(_dollar1) guard _args[2].0 is YYObj__List_FieldDecl___FunDecl__(_dollar3) guard _args[4].0 is YYObj_List_DerivingDirective_(_dollar5) @@ -7455,10 +8739,10 @@ fn yy_action_200(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 2270| record_constr_decl option(SEMI) { -// 2271| (@list.empty(), Some($1)) -// 2272| } -fn yy_action_201(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 2380| record_constr_decl option(SEMI) { +// 2381| (@list.empty(), Some($1)) +// 2382| } +fn yy_action_245(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj_FunDecl(_dollar1) YYObj__List_FieldDecl___FunDecl__({(); (@list.empty(), Some(_dollar1)) @@ -7466,21 +8750,22 @@ fn yy_action_201(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 2237| attributes visibility option("mut") LIDENT ":" type_ { -// 2238| FieldDecl::{ -// 2239| name: FieldName::{ label: $4, loc: mk_loc($loc($4)) }, -// 2240| ty: $6, -// 2241| mut_: $3 is Some(_), -// 2242| vis: $2, -// 2243| loc: mk_loc($sloc), -// 2244| attrs: $1, -// 2245| doc: DocString::empty() -// 2246| } -// 2247| } -fn yy_action_202(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 2347| attributes visibility option("mut") lident_string ":" type_ { +// 2348| FieldDecl::{ +// 2349| name: FieldName::{ label: $4, loc: mk_loc($loc($4)) }, +// 2350| ty: $6, +// 2351| mut_: $3 is Some(_), +// 2352| vis: $2, +// 2353| loc: mk_loc($sloc), +// 2354| attrs: $1, +// 2355| doc: DocString::empty() +// 2356| } +// 2357| } +fn yy_action_246(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _sub_action_0_result = yy_action_3(_last_pos, _args[0:0]) let _sub_action_1_result = yy_action_4(_last_pos, _args[0:0]) - guard _args[1].0 is YYObj_String(_dollar4) + let _sub_action_2_result = yy_action_226(_args[0].2, _args[1:2]) + guard _sub_action_2_result is YYObj_String(_dollar4) let _start_pos_of_item3 = _args[1].1 let _end_pos_of_item3 = _args[1].2 guard _args[3].0 is YYObj_Type(_dollar6) @@ -7489,7 +8774,7 @@ fn yy_action_202(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } guard _sub_action_0_result is YYObj_List_Attribute_(_dollar1) - YYObj_FieldDecl({(); + YYObj_FieldDecl({(); FieldDecl::{ name: FieldName::{ label: _dollar4, loc: mk_loc((_start_pos_of_item3, _end_pos_of_item3)) }, ty: _dollar6, @@ -7503,30 +8788,31 @@ fn yy_action_202(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 2237| attributes visibility option("mut") LIDENT ":" type_ { -// 2238| FieldDecl::{ -// 2239| name: FieldName::{ label: $4, loc: mk_loc($loc($4)) }, -// 2240| ty: $6, -// 2241| mut_: $3 is Some(_), -// 2242| vis: $2, -// 2243| loc: mk_loc($sloc), -// 2244| attrs: $1, -// 2245| doc: DocString::empty() -// 2246| } -// 2247| } -fn yy_action_203(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 2347| attributes visibility option("mut") lident_string ":" type_ { +// 2348| FieldDecl::{ +// 2349| name: FieldName::{ label: $4, loc: mk_loc($loc($4)) }, +// 2350| ty: $6, +// 2351| mut_: $3 is Some(_), +// 2352| vis: $2, +// 2353| loc: mk_loc($sloc), +// 2354| attrs: $1, +// 2355| doc: DocString::empty() +// 2356| } +// 2357| } +fn yy_action_247(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _sub_action_0_result = yy_action_3(_last_pos, _args[0:0]) - let _sub_action_1_result = yy_action_10(_last_pos, _args[0:1]) - guard _args[2].0 is YYObj_String(_dollar4) - let _start_pos_of_item3 = _args[2].1 - let _end_pos_of_item3 = _args[2].2 - guard _args[4].0 is YYObj_Type(_dollar6) - guard _args[1].0 is YYObj_Option_Unit_(_dollar3) + let _sub_action_1_result = yy_action_4(_last_pos, _args[0:0]) + let _sub_action_2_result = yy_action_228(_args[0].2, _args[1:2]) + guard _sub_action_2_result is YYObj_String(_dollar4) + let _start_pos_of_item3 = _args[1].1 + let _end_pos_of_item3 = _args[1].2 + guard _args[3].0 is YYObj_Type(_dollar6) + guard _args[0].0 is YYObj_Option_Unit_(_dollar3) guard _sub_action_1_result is YYObj_Visibility(_dollar2) let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } guard _sub_action_0_result is YYObj_List_Attribute_(_dollar1) - YYObj_FieldDecl({(); + YYObj_FieldDecl({(); FieldDecl::{ name: FieldName::{ label: _dollar4, loc: mk_loc((_start_pos_of_item3, _end_pos_of_item3)) }, ty: _dollar6, @@ -7540,30 +8826,31 @@ fn yy_action_203(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 2237| attributes visibility option("mut") LIDENT ":" type_ { -// 2238| FieldDecl::{ -// 2239| name: FieldName::{ label: $4, loc: mk_loc($loc($4)) }, -// 2240| ty: $6, -// 2241| mut_: $3 is Some(_), -// 2242| vis: $2, -// 2243| loc: mk_loc($sloc), -// 2244| attrs: $1, -// 2245| doc: DocString::empty() -// 2246| } -// 2247| } -fn yy_action_204(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 2347| attributes visibility option("mut") lident_string ":" type_ { +// 2348| FieldDecl::{ +// 2349| name: FieldName::{ label: $4, loc: mk_loc($loc($4)) }, +// 2350| ty: $6, +// 2351| mut_: $3 is Some(_), +// 2352| vis: $2, +// 2353| loc: mk_loc($sloc), +// 2354| attrs: $1, +// 2355| doc: DocString::empty() +// 2356| } +// 2357| } +fn yy_action_248(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _sub_action_0_result = yy_action_3(_last_pos, _args[0:0]) - let _sub_action_1_result = yy_action_34(_last_pos, _args[0:2]) - guard _args[3].0 is YYObj_String(_dollar4) - let _start_pos_of_item3 = _args[3].1 - let _end_pos_of_item3 = _args[3].2 - guard _args[5].0 is YYObj_Type(_dollar6) - guard _args[2].0 is YYObj_Option_Unit_(_dollar3) + let _sub_action_1_result = yy_action_10(_last_pos, _args[0:1]) + let _sub_action_2_result = yy_action_226(_args[1].2, _args[2:3]) + guard _sub_action_2_result is YYObj_String(_dollar4) + let _start_pos_of_item3 = _args[2].1 + let _end_pos_of_item3 = _args[2].2 + guard _args[4].0 is YYObj_Type(_dollar6) + guard _args[1].0 is YYObj_Option_Unit_(_dollar3) guard _sub_action_1_result is YYObj_Visibility(_dollar2) let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } guard _sub_action_0_result is YYObj_List_Attribute_(_dollar1) - YYObj_FieldDecl({(); + YYObj_FieldDecl({(); FieldDecl::{ name: FieldName::{ label: _dollar4, loc: mk_loc((_start_pos_of_item3, _end_pos_of_item3)) }, ty: _dollar6, @@ -7577,21 +8864,22 @@ fn yy_action_204(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 2237| attributes visibility option("mut") LIDENT ":" type_ { -// 2238| FieldDecl::{ -// 2239| name: FieldName::{ label: $4, loc: mk_loc($loc($4)) }, -// 2240| ty: $6, -// 2241| mut_: $3 is Some(_), -// 2242| vis: $2, -// 2243| loc: mk_loc($sloc), -// 2244| attrs: $1, -// 2245| doc: DocString::empty() -// 2246| } -// 2247| } -fn yy_action_205(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_54(_last_pos, _args[0:1]) - let _sub_action_1_result = yy_action_4(_args[0].2, _args[1:1]) - guard _args[2].0 is YYObj_String(_dollar4) +// 2347| attributes visibility option("mut") lident_string ":" type_ { +// 2348| FieldDecl::{ +// 2349| name: FieldName::{ label: $4, loc: mk_loc($loc($4)) }, +// 2350| ty: $6, +// 2351| mut_: $3 is Some(_), +// 2352| vis: $2, +// 2353| loc: mk_loc($sloc), +// 2354| attrs: $1, +// 2355| doc: DocString::empty() +// 2356| } +// 2357| } +fn yy_action_249(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_3(_last_pos, _args[0:0]) + let _sub_action_1_result = yy_action_10(_last_pos, _args[0:1]) + let _sub_action_2_result = yy_action_228(_args[1].2, _args[2:3]) + guard _sub_action_2_result is YYObj_String(_dollar4) let _start_pos_of_item3 = _args[2].1 let _end_pos_of_item3 = _args[2].2 guard _args[4].0 is YYObj_Type(_dollar6) @@ -7600,7 +8888,7 @@ fn yy_action_205(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } guard _sub_action_0_result is YYObj_List_Attribute_(_dollar1) - YYObj_FieldDecl({(); + YYObj_FieldDecl({(); FieldDecl::{ name: FieldName::{ label: _dollar4, loc: mk_loc((_start_pos_of_item3, _end_pos_of_item3)) }, ty: _dollar6, @@ -7614,21 +8902,212 @@ fn yy_action_205(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 2237| attributes visibility option("mut") LIDENT ":" type_ { -// 2238| FieldDecl::{ -// 2239| name: FieldName::{ label: $4, loc: mk_loc($loc($4)) }, -// 2240| ty: $6, -// 2241| mut_: $3 is Some(_), -// 2242| vis: $2, -// 2243| loc: mk_loc($sloc), -// 2244| attrs: $1, -// 2245| doc: DocString::empty() -// 2246| } -// 2247| } -fn yy_action_206(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_54(_last_pos, _args[0:1]) +// 2347| attributes visibility option("mut") lident_string ":" type_ { +// 2348| FieldDecl::{ +// 2349| name: FieldName::{ label: $4, loc: mk_loc($loc($4)) }, +// 2350| ty: $6, +// 2351| mut_: $3 is Some(_), +// 2352| vis: $2, +// 2353| loc: mk_loc($sloc), +// 2354| attrs: $1, +// 2355| doc: DocString::empty() +// 2356| } +// 2357| } +fn yy_action_250(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_3(_last_pos, _args[0:0]) + let _sub_action_1_result = yy_action_40(_last_pos, _args[0:2]) + let _sub_action_2_result = yy_action_226(_args[2].2, _args[3:4]) + guard _sub_action_2_result is YYObj_String(_dollar4) + let _start_pos_of_item3 = _args[3].1 + let _end_pos_of_item3 = _args[3].2 + guard _args[5].0 is YYObj_Type(_dollar6) + guard _args[2].0 is YYObj_Option_Unit_(_dollar3) + guard _sub_action_1_result is YYObj_Visibility(_dollar2) + let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) + let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } + guard _sub_action_0_result is YYObj_List_Attribute_(_dollar1) + YYObj_FieldDecl({(); + FieldDecl::{ + name: FieldName::{ label: _dollar4, loc: mk_loc((_start_pos_of_item3, _end_pos_of_item3)) }, + ty: _dollar6, + mut_: _dollar3 is Some(_), + vis: _dollar2, + loc: mk_loc((_symbol_start_pos, _end_pos)), + attrs: _dollar1, + doc: DocString::empty() + } + }) +} + +// file:///./parser.mbty +// 2347| attributes visibility option("mut") lident_string ":" type_ { +// 2348| FieldDecl::{ +// 2349| name: FieldName::{ label: $4, loc: mk_loc($loc($4)) }, +// 2350| ty: $6, +// 2351| mut_: $3 is Some(_), +// 2352| vis: $2, +// 2353| loc: mk_loc($sloc), +// 2354| attrs: $1, +// 2355| doc: DocString::empty() +// 2356| } +// 2357| } +fn yy_action_251(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_3(_last_pos, _args[0:0]) + let _sub_action_1_result = yy_action_40(_last_pos, _args[0:2]) + let _sub_action_2_result = yy_action_228(_args[2].2, _args[3:4]) + guard _sub_action_2_result is YYObj_String(_dollar4) + let _start_pos_of_item3 = _args[3].1 + let _end_pos_of_item3 = _args[3].2 + guard _args[5].0 is YYObj_Type(_dollar6) + guard _args[2].0 is YYObj_Option_Unit_(_dollar3) + guard _sub_action_1_result is YYObj_Visibility(_dollar2) + let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) + let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } + guard _sub_action_0_result is YYObj_List_Attribute_(_dollar1) + YYObj_FieldDecl({(); + FieldDecl::{ + name: FieldName::{ label: _dollar4, loc: mk_loc((_start_pos_of_item3, _end_pos_of_item3)) }, + ty: _dollar6, + mut_: _dollar3 is Some(_), + vis: _dollar2, + loc: mk_loc((_symbol_start_pos, _end_pos)), + attrs: _dollar1, + doc: DocString::empty() + } + }) +} + +// file:///./parser.mbty +// 2347| attributes visibility option("mut") lident_string ":" type_ { +// 2348| FieldDecl::{ +// 2349| name: FieldName::{ label: $4, loc: mk_loc($loc($4)) }, +// 2350| ty: $6, +// 2351| mut_: $3 is Some(_), +// 2352| vis: $2, +// 2353| loc: mk_loc($sloc), +// 2354| attrs: $1, +// 2355| doc: DocString::empty() +// 2356| } +// 2357| } +fn yy_action_252(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_65(_last_pos, _args[0:1]) + let _sub_action_1_result = yy_action_4(_args[0].2, _args[1:1]) + let _sub_action_2_result = yy_action_226(_args[1].2, _args[2:3]) + guard _sub_action_2_result is YYObj_String(_dollar4) + let _start_pos_of_item3 = _args[2].1 + let _end_pos_of_item3 = _args[2].2 + guard _args[4].0 is YYObj_Type(_dollar6) + guard _args[1].0 is YYObj_Option_Unit_(_dollar3) + guard _sub_action_1_result is YYObj_Visibility(_dollar2) + let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) + let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } + guard _sub_action_0_result is YYObj_List_Attribute_(_dollar1) + YYObj_FieldDecl({(); + FieldDecl::{ + name: FieldName::{ label: _dollar4, loc: mk_loc((_start_pos_of_item3, _end_pos_of_item3)) }, + ty: _dollar6, + mut_: _dollar3 is Some(_), + vis: _dollar2, + loc: mk_loc((_symbol_start_pos, _end_pos)), + attrs: _dollar1, + doc: DocString::empty() + } + }) +} + +// file:///./parser.mbty +// 2347| attributes visibility option("mut") lident_string ":" type_ { +// 2348| FieldDecl::{ +// 2349| name: FieldName::{ label: $4, loc: mk_loc($loc($4)) }, +// 2350| ty: $6, +// 2351| mut_: $3 is Some(_), +// 2352| vis: $2, +// 2353| loc: mk_loc($sloc), +// 2354| attrs: $1, +// 2355| doc: DocString::empty() +// 2356| } +// 2357| } +fn yy_action_253(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_65(_last_pos, _args[0:1]) + let _sub_action_1_result = yy_action_4(_args[0].2, _args[1:1]) + let _sub_action_2_result = yy_action_228(_args[1].2, _args[2:3]) + guard _sub_action_2_result is YYObj_String(_dollar4) + let _start_pos_of_item3 = _args[2].1 + let _end_pos_of_item3 = _args[2].2 + guard _args[4].0 is YYObj_Type(_dollar6) + guard _args[1].0 is YYObj_Option_Unit_(_dollar3) + guard _sub_action_1_result is YYObj_Visibility(_dollar2) + let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) + let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } + guard _sub_action_0_result is YYObj_List_Attribute_(_dollar1) + YYObj_FieldDecl({(); + FieldDecl::{ + name: FieldName::{ label: _dollar4, loc: mk_loc((_start_pos_of_item3, _end_pos_of_item3)) }, + ty: _dollar6, + mut_: _dollar3 is Some(_), + vis: _dollar2, + loc: mk_loc((_symbol_start_pos, _end_pos)), + attrs: _dollar1, + doc: DocString::empty() + } + }) +} + +// file:///./parser.mbty +// 2347| attributes visibility option("mut") lident_string ":" type_ { +// 2348| FieldDecl::{ +// 2349| name: FieldName::{ label: $4, loc: mk_loc($loc($4)) }, +// 2350| ty: $6, +// 2351| mut_: $3 is Some(_), +// 2352| vis: $2, +// 2353| loc: mk_loc($sloc), +// 2354| attrs: $1, +// 2355| doc: DocString::empty() +// 2356| } +// 2357| } +fn yy_action_254(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_65(_last_pos, _args[0:1]) let _sub_action_1_result = yy_action_10(_args[0].2, _args[1:2]) - guard _args[3].0 is YYObj_String(_dollar4) + let _sub_action_2_result = yy_action_226(_args[2].2, _args[3:4]) + guard _sub_action_2_result is YYObj_String(_dollar4) + let _start_pos_of_item3 = _args[3].1 + let _end_pos_of_item3 = _args[3].2 + guard _args[5].0 is YYObj_Type(_dollar6) + guard _args[2].0 is YYObj_Option_Unit_(_dollar3) + guard _sub_action_1_result is YYObj_Visibility(_dollar2) + let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) + let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } + guard _sub_action_0_result is YYObj_List_Attribute_(_dollar1) + YYObj_FieldDecl({(); + FieldDecl::{ + name: FieldName::{ label: _dollar4, loc: mk_loc((_start_pos_of_item3, _end_pos_of_item3)) }, + ty: _dollar6, + mut_: _dollar3 is Some(_), + vis: _dollar2, + loc: mk_loc((_symbol_start_pos, _end_pos)), + attrs: _dollar1, + doc: DocString::empty() + } + }) +} + +// file:///./parser.mbty +// 2347| attributes visibility option("mut") lident_string ":" type_ { +// 2348| FieldDecl::{ +// 2349| name: FieldName::{ label: $4, loc: mk_loc($loc($4)) }, +// 2350| ty: $6, +// 2351| mut_: $3 is Some(_), +// 2352| vis: $2, +// 2353| loc: mk_loc($sloc), +// 2354| attrs: $1, +// 2355| doc: DocString::empty() +// 2356| } +// 2357| } +fn yy_action_255(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_65(_last_pos, _args[0:1]) + let _sub_action_1_result = yy_action_10(_args[0].2, _args[1:2]) + let _sub_action_2_result = yy_action_228(_args[2].2, _args[3:4]) + guard _sub_action_2_result is YYObj_String(_dollar4) let _start_pos_of_item3 = _args[3].1 let _end_pos_of_item3 = _args[3].2 guard _args[5].0 is YYObj_Type(_dollar6) @@ -7637,7 +9116,7 @@ fn yy_action_206(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } guard _sub_action_0_result is YYObj_List_Attribute_(_dollar1) - YYObj_FieldDecl({(); + YYObj_FieldDecl({(); FieldDecl::{ name: FieldName::{ label: _dollar4, loc: mk_loc((_start_pos_of_item3, _end_pos_of_item3)) }, ty: _dollar6, @@ -7651,7 +9130,7 @@ fn yy_action_206(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 790| "priv" { Priv(loc = mk_loc($sloc)) } +// 808| "priv" { Priv(loc = mk_loc($sloc)) } fn yy_action_10(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } @@ -7659,34 +9138,44 @@ fn yy_action_10(_last_pos : Position, _args : ArrayView[(YYObj, Position, Positi } // file:///./parser.mbty -// 796| "(" "readonly" ")" { Some("readonly") } -fn yy_action_207(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 814| "(" "readonly" ")" { Some("readonly") } +fn yy_action_256(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { YYObj_String_({(); Some("readonly") }) } // file:///./parser.mbty -// 797| "(" LIDENT ")" { Some($2) } -fn yy_action_208(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[1].0 is YYObj_String(_dollar2) +// 815| "(" lident_string ")" { Some($2) } +fn yy_action_257(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_226(_args[0].2, _args[1:2]) + guard _sub_action_0_result is YYObj_String(_dollar2) YYObj_String_({(); Some(_dollar2) }) } // file:///./parser.mbty -// 2237| attributes visibility option("mut") LIDENT ":" type_ { -// 2238| FieldDecl::{ -// 2239| name: FieldName::{ label: $4, loc: mk_loc($loc($4)) }, -// 2240| ty: $6, -// 2241| mut_: $3 is Some(_), -// 2242| vis: $2, -// 2243| loc: mk_loc($sloc), -// 2244| attrs: $1, -// 2245| doc: DocString::empty() -// 2246| } -// 2247| } -fn yy_action_209(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_54(_last_pos, _args[0:1]) - let _sub_action_1_result = yy_action_34(_args[0].2, _args[1:3]) - guard _args[4].0 is YYObj_String(_dollar4) +// 815| "(" lident_string ")" { Some($2) } +fn yy_action_258(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_228(_args[0].2, _args[1:2]) + guard _sub_action_0_result is YYObj_String(_dollar2) + YYObj_String_({(); Some(_dollar2) }) +} + +// file:///./parser.mbty +// 2347| attributes visibility option("mut") lident_string ":" type_ { +// 2348| FieldDecl::{ +// 2349| name: FieldName::{ label: $4, loc: mk_loc($loc($4)) }, +// 2350| ty: $6, +// 2351| mut_: $3 is Some(_), +// 2352| vis: $2, +// 2353| loc: mk_loc($sloc), +// 2354| attrs: $1, +// 2355| doc: DocString::empty() +// 2356| } +// 2357| } +fn yy_action_259(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_65(_last_pos, _args[0:1]) + let _sub_action_1_result = yy_action_40(_args[0].2, _args[1:3]) + let _sub_action_2_result = yy_action_226(_args[3].2, _args[4:5]) + guard _sub_action_2_result is YYObj_String(_dollar4) let _start_pos_of_item3 = _args[4].1 let _end_pos_of_item3 = _args[4].2 guard _args[6].0 is YYObj_Type(_dollar6) @@ -7695,7 +9184,7 @@ fn yy_action_209(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } guard _sub_action_0_result is YYObj_List_Attribute_(_dollar1) - YYObj_FieldDecl({(); + YYObj_FieldDecl({(); FieldDecl::{ name: FieldName::{ label: _dollar4, loc: mk_loc((_start_pos_of_item3, _end_pos_of_item3)) }, ty: _dollar6, @@ -7709,8 +9198,46 @@ fn yy_action_209(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 791| "pub" pub_attr { Pub(loc = mk_loc($sloc), attr = $2) } -fn yy_action_34(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 2347| attributes visibility option("mut") lident_string ":" type_ { +// 2348| FieldDecl::{ +// 2349| name: FieldName::{ label: $4, loc: mk_loc($loc($4)) }, +// 2350| ty: $6, +// 2351| mut_: $3 is Some(_), +// 2352| vis: $2, +// 2353| loc: mk_loc($sloc), +// 2354| attrs: $1, +// 2355| doc: DocString::empty() +// 2356| } +// 2357| } +fn yy_action_260(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_65(_last_pos, _args[0:1]) + let _sub_action_1_result = yy_action_40(_args[0].2, _args[1:3]) + let _sub_action_2_result = yy_action_228(_args[3].2, _args[4:5]) + guard _sub_action_2_result is YYObj_String(_dollar4) + let _start_pos_of_item3 = _args[4].1 + let _end_pos_of_item3 = _args[4].2 + guard _args[6].0 is YYObj_Type(_dollar6) + guard _args[3].0 is YYObj_Option_Unit_(_dollar3) + guard _sub_action_1_result is YYObj_Visibility(_dollar2) + let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) + let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } + guard _sub_action_0_result is YYObj_List_Attribute_(_dollar1) + YYObj_FieldDecl({(); + FieldDecl::{ + name: FieldName::{ label: _dollar4, loc: mk_loc((_start_pos_of_item3, _end_pos_of_item3)) }, + ty: _dollar6, + mut_: _dollar3 is Some(_), + vis: _dollar2, + loc: mk_loc((_symbol_start_pos, _end_pos)), + attrs: _dollar1, + doc: DocString::empty() + } + }) +} + +// file:///./parser.mbty +// 809| "pub" pub_attr { Pub(loc = mk_loc($sloc), attr = $2) } +fn yy_action_40(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } guard _args[1].0 is YYObj_String_(_dollar2) @@ -7718,31 +9245,31 @@ fn yy_action_34(_last_pos : Position, _args : ArrayView[(YYObj, Position, Positi } // file:///./parser.mbty -// 795| { None } -fn yy_action_210(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 813| { None } +fn yy_action_261(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { YYObj_String_({(); None }) } // file:///./parser.mbty -// 2251| attributes is_async "fn" optional_type_parameters binder "(" list_commas(trait_method_param) ")" func_return_type { -// 2252| let (return_type, error_type) = $9 -// 2253| FunDecl::{ -// 2254| type_name : None, -// 2255| name : $5, -// 2256| is_async : $2, -// 2257| quantifiers: $4, -// 2258| decl_params: Some($7), -// 2259| params_loc: mk_loc($loc($7)), -// 2260| return_type, -// 2261| error_type, -// 2262| vis: Default, -// 2263| doc: DocString::empty(), -// 2264| attrs: $1, -// 2265| loc : mk_loc($loc) -// 2266| } -// 2267| } -fn yy_action_211(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_54(_last_pos, _args[0:1]) +// 2361| attributes is_async "fn" optional_type_parameters binder "(" list_commas(trait_method_param) ")" func_return_type { +// 2362| let (return_type, error_type) = $9 +// 2363| FunDecl::{ +// 2364| type_name : None, +// 2365| name : $5, +// 2366| is_async : $2, +// 2367| quantifiers: $4, +// 2368| decl_params: Some($7), +// 2369| params_loc: mk_loc($loc($7)), +// 2370| return_type, +// 2371| error_type, +// 2372| vis: Default, +// 2373| doc: DocString::empty(), +// 2374| attrs: $1, +// 2375| loc : mk_loc($loc) +// 2376| } +// 2377| } +fn yy_action_262(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_65(_last_pos, _args[0:1]) let _sub_action_1_result = yy_action_5(_args[0].2, _args[1:2]) let _sub_action_2_result = yy_action_15(_args[3].2, _args[4:5]) guard _args[8].0 is YYObj__Type___ErrorType_(_dollar9) @@ -7775,25 +9302,76 @@ fn yy_action_211(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 2251| attributes is_async "fn" optional_type_parameters binder "(" list_commas(trait_method_param) ")" func_return_type { -// 2252| let (return_type, error_type) = $9 -// 2253| FunDecl::{ -// 2254| type_name : None, -// 2255| name : $5, -// 2256| is_async : $2, -// 2257| quantifiers: $4, -// 2258| decl_params: Some($7), -// 2259| params_loc: mk_loc($loc($7)), -// 2260| return_type, -// 2261| error_type, -// 2262| vis: Default, -// 2263| doc: DocString::empty(), -// 2264| attrs: $1, -// 2265| loc : mk_loc($loc) -// 2266| } -// 2267| } -fn yy_action_212(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_54(_last_pos, _args[0:1]) +// 2361| attributes is_async "fn" optional_type_parameters binder "(" list_commas(trait_method_param) ")" func_return_type { +// 2362| let (return_type, error_type) = $9 +// 2363| FunDecl::{ +// 2364| type_name : None, +// 2365| name : $5, +// 2366| is_async : $2, +// 2367| quantifiers: $4, +// 2368| decl_params: Some($7), +// 2369| params_loc: mk_loc($loc($7)), +// 2370| return_type, +// 2371| error_type, +// 2372| vis: Default, +// 2373| doc: DocString::empty(), +// 2374| attrs: $1, +// 2375| loc : mk_loc($loc) +// 2376| } +// 2377| } +fn yy_action_263(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_65(_last_pos, _args[0:1]) + let _sub_action_1_result = yy_action_5(_args[0].2, _args[1:2]) + let _sub_action_2_result = yy_action_20(_args[3].2, _args[4:5]) + guard _args[8].0 is YYObj__Type___ErrorType_(_dollar9) + guard _sub_action_2_result is YYObj_Binder(_dollar5) + guard _sub_action_1_result is YYObj_Location_(_dollar2) + guard _args[3].0 is YYObj_List_TypeVarBinder_(_dollar4) + guard _args[6].0 is YYObj_List_Parameter_(_dollar7) + let _start_pos_of_item6 = _args[6].1 + let _end_pos_of_item6 = _args[6].2 + guard _sub_action_0_result is YYObj_List_Attribute_(_dollar1) + let _start_pos = if _args.length() == 0 { _last_pos } else { _args[0].1 } + let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } + YYObj_FunDecl({(); + let (return_type, error_type) = _dollar9 + FunDecl::{ + type_name : None, + name : _dollar5, + is_async : _dollar2, + quantifiers: _dollar4, + decl_params: Some(_dollar7), + params_loc: mk_loc((_start_pos_of_item6, _end_pos_of_item6)), + return_type, + error_type, + vis: Default, + doc: DocString::empty(), + attrs: _dollar1, + loc : mk_loc((_start_pos, _end_pos)) + } + }) +} + +// file:///./parser.mbty +// 2361| attributes is_async "fn" optional_type_parameters binder "(" list_commas(trait_method_param) ")" func_return_type { +// 2362| let (return_type, error_type) = $9 +// 2363| FunDecl::{ +// 2364| type_name : None, +// 2365| name : $5, +// 2366| is_async : $2, +// 2367| quantifiers: $4, +// 2368| decl_params: Some($7), +// 2369| params_loc: mk_loc($loc($7)), +// 2370| return_type, +// 2371| error_type, +// 2372| vis: Default, +// 2373| doc: DocString::empty(), +// 2374| attrs: $1, +// 2375| loc : mk_loc($loc) +// 2376| } +// 2377| } +fn yy_action_264(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_65(_last_pos, _args[0:1]) let _sub_action_1_result = yy_action_8(_args[0].2, _args[1:1]) let _sub_action_2_result = yy_action_15(_args[2].2, _args[3:4]) guard _args[7].0 is YYObj__Type___ErrorType_(_dollar9) @@ -7826,27 +9404,27 @@ fn yy_action_212(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 2251| attributes is_async "fn" optional_type_parameters binder "(" list_commas(trait_method_param) ")" func_return_type { -// 2252| let (return_type, error_type) = $9 -// 2253| FunDecl::{ -// 2254| type_name : None, -// 2255| name : $5, -// 2256| is_async : $2, -// 2257| quantifiers: $4, -// 2258| decl_params: Some($7), -// 2259| params_loc: mk_loc($loc($7)), -// 2260| return_type, -// 2261| error_type, -// 2262| vis: Default, -// 2263| doc: DocString::empty(), -// 2264| attrs: $1, -// 2265| loc : mk_loc($loc) -// 2266| } -// 2267| } -fn yy_action_213(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_3(_last_pos, _args[0:0]) - let _sub_action_1_result = yy_action_5(_last_pos, _args[0:1]) - let _sub_action_2_result = yy_action_15(_args[2].2, _args[3:4]) +// 2361| attributes is_async "fn" optional_type_parameters binder "(" list_commas(trait_method_param) ")" func_return_type { +// 2362| let (return_type, error_type) = $9 +// 2363| FunDecl::{ +// 2364| type_name : None, +// 2365| name : $5, +// 2366| is_async : $2, +// 2367| quantifiers: $4, +// 2368| decl_params: Some($7), +// 2369| params_loc: mk_loc($loc($7)), +// 2370| return_type, +// 2371| error_type, +// 2372| vis: Default, +// 2373| doc: DocString::empty(), +// 2374| attrs: $1, +// 2375| loc : mk_loc($loc) +// 2376| } +// 2377| } +fn yy_action_265(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_65(_last_pos, _args[0:1]) + let _sub_action_1_result = yy_action_8(_args[0].2, _args[1:1]) + let _sub_action_2_result = yy_action_20(_args[2].2, _args[3:4]) guard _args[7].0 is YYObj__Type___ErrorType_(_dollar9) guard _sub_action_2_result is YYObj_Binder(_dollar5) guard _sub_action_1_result is YYObj_Location_(_dollar2) @@ -7877,34 +9455,34 @@ fn yy_action_213(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 2251| attributes is_async "fn" optional_type_parameters binder "(" list_commas(trait_method_param) ")" func_return_type { -// 2252| let (return_type, error_type) = $9 -// 2253| FunDecl::{ -// 2254| type_name : None, -// 2255| name : $5, -// 2256| is_async : $2, -// 2257| quantifiers: $4, -// 2258| decl_params: Some($7), -// 2259| params_loc: mk_loc($loc($7)), -// 2260| return_type, -// 2261| error_type, -// 2262| vis: Default, -// 2263| doc: DocString::empty(), -// 2264| attrs: $1, -// 2265| loc : mk_loc($loc) -// 2266| } -// 2267| } -fn yy_action_214(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 2361| attributes is_async "fn" optional_type_parameters binder "(" list_commas(trait_method_param) ")" func_return_type { +// 2362| let (return_type, error_type) = $9 +// 2363| FunDecl::{ +// 2364| type_name : None, +// 2365| name : $5, +// 2366| is_async : $2, +// 2367| quantifiers: $4, +// 2368| decl_params: Some($7), +// 2369| params_loc: mk_loc($loc($7)), +// 2370| return_type, +// 2371| error_type, +// 2372| vis: Default, +// 2373| doc: DocString::empty(), +// 2374| attrs: $1, +// 2375| loc : mk_loc($loc) +// 2376| } +// 2377| } +fn yy_action_266(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _sub_action_0_result = yy_action_3(_last_pos, _args[0:0]) - let _sub_action_1_result = yy_action_8(_last_pos, _args[0:0]) - let _sub_action_2_result = yy_action_15(_args[1].2, _args[2:3]) - guard _args[6].0 is YYObj__Type___ErrorType_(_dollar9) + let _sub_action_1_result = yy_action_5(_last_pos, _args[0:1]) + let _sub_action_2_result = yy_action_15(_args[2].2, _args[3:4]) + guard _args[7].0 is YYObj__Type___ErrorType_(_dollar9) guard _sub_action_2_result is YYObj_Binder(_dollar5) guard _sub_action_1_result is YYObj_Location_(_dollar2) - guard _args[1].0 is YYObj_List_TypeVarBinder_(_dollar4) - guard _args[4].0 is YYObj_List_Parameter_(_dollar7) - let _start_pos_of_item6 = _args[4].1 - let _end_pos_of_item6 = _args[4].2 + guard _args[2].0 is YYObj_List_TypeVarBinder_(_dollar4) + guard _args[5].0 is YYObj_List_Parameter_(_dollar7) + let _start_pos_of_item6 = _args[5].1 + let _end_pos_of_item6 = _args[5].2 guard _sub_action_0_result is YYObj_List_Attribute_(_dollar1) let _start_pos = if _args.length() == 0 { _last_pos } else { _args[0].1 } let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } @@ -7928,30 +9506,183 @@ fn yy_action_214(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 2276| non_empty_list_semi_rev_aux(record_decl_field) SEMI record_constr_decl option(SEMI) { -// 2277| ($1.rev(), Some($3)) -// 2278| } -fn yy_action_215(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[0].0 is YYObj_List_FieldDecl_(_dollar1) - guard _args[2].0 is YYObj_FunDecl(_dollar3) - YYObj__List_FieldDecl___FunDecl__({(); - (_dollar1.rev(), Some(_dollar3)) +// 2361| attributes is_async "fn" optional_type_parameters binder "(" list_commas(trait_method_param) ")" func_return_type { +// 2362| let (return_type, error_type) = $9 +// 2363| FunDecl::{ +// 2364| type_name : None, +// 2365| name : $5, +// 2366| is_async : $2, +// 2367| quantifiers: $4, +// 2368| decl_params: Some($7), +// 2369| params_loc: mk_loc($loc($7)), +// 2370| return_type, +// 2371| error_type, +// 2372| vis: Default, +// 2373| doc: DocString::empty(), +// 2374| attrs: $1, +// 2375| loc : mk_loc($loc) +// 2376| } +// 2377| } +fn yy_action_267(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_3(_last_pos, _args[0:0]) + let _sub_action_1_result = yy_action_5(_last_pos, _args[0:1]) + let _sub_action_2_result = yy_action_20(_args[2].2, _args[3:4]) + guard _args[7].0 is YYObj__Type___ErrorType_(_dollar9) + guard _sub_action_2_result is YYObj_Binder(_dollar5) + guard _sub_action_1_result is YYObj_Location_(_dollar2) + guard _args[2].0 is YYObj_List_TypeVarBinder_(_dollar4) + guard _args[5].0 is YYObj_List_Parameter_(_dollar7) + let _start_pos_of_item6 = _args[5].1 + let _end_pos_of_item6 = _args[5].2 + guard _sub_action_0_result is YYObj_List_Attribute_(_dollar1) + let _start_pos = if _args.length() == 0 { _last_pos } else { _args[0].1 } + let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } + YYObj_FunDecl({(); + let (return_type, error_type) = _dollar9 + FunDecl::{ + type_name : None, + name : _dollar5, + is_async : _dollar2, + quantifiers: _dollar4, + decl_params: Some(_dollar7), + params_loc: mk_loc((_start_pos_of_item6, _end_pos_of_item6)), + return_type, + error_type, + vis: Default, + doc: DocString::empty(), + attrs: _dollar1, + loc : mk_loc((_start_pos, _end_pos)) + } }) } // file:///./parser.mbty -// 228| non_empty_list_semi_rev_aux(X) SEMI X { $1.add($3) } -fn yy_action_216(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[0].0 is YYObj_List_FieldDecl_(_dollar1) - guard _args[2].0 is YYObj_FieldDecl(_dollar3) - YYObj_List_FieldDecl_({(); _dollar1.add(_dollar3) }) -} - -// file:///./parser.mbty -// 2279| non_empty_list_semi_rev_aux(record_decl_field) option(SEMI) { -// 2280| ($1.rev(), None) -// 2281| } -fn yy_action_217(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 2361| attributes is_async "fn" optional_type_parameters binder "(" list_commas(trait_method_param) ")" func_return_type { +// 2362| let (return_type, error_type) = $9 +// 2363| FunDecl::{ +// 2364| type_name : None, +// 2365| name : $5, +// 2366| is_async : $2, +// 2367| quantifiers: $4, +// 2368| decl_params: Some($7), +// 2369| params_loc: mk_loc($loc($7)), +// 2370| return_type, +// 2371| error_type, +// 2372| vis: Default, +// 2373| doc: DocString::empty(), +// 2374| attrs: $1, +// 2375| loc : mk_loc($loc) +// 2376| } +// 2377| } +fn yy_action_268(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_3(_last_pos, _args[0:0]) + let _sub_action_1_result = yy_action_8(_last_pos, _args[0:0]) + let _sub_action_2_result = yy_action_15(_args[1].2, _args[2:3]) + guard _args[6].0 is YYObj__Type___ErrorType_(_dollar9) + guard _sub_action_2_result is YYObj_Binder(_dollar5) + guard _sub_action_1_result is YYObj_Location_(_dollar2) + guard _args[1].0 is YYObj_List_TypeVarBinder_(_dollar4) + guard _args[4].0 is YYObj_List_Parameter_(_dollar7) + let _start_pos_of_item6 = _args[4].1 + let _end_pos_of_item6 = _args[4].2 + guard _sub_action_0_result is YYObj_List_Attribute_(_dollar1) + let _start_pos = if _args.length() == 0 { _last_pos } else { _args[0].1 } + let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } + YYObj_FunDecl({(); + let (return_type, error_type) = _dollar9 + FunDecl::{ + type_name : None, + name : _dollar5, + is_async : _dollar2, + quantifiers: _dollar4, + decl_params: Some(_dollar7), + params_loc: mk_loc((_start_pos_of_item6, _end_pos_of_item6)), + return_type, + error_type, + vis: Default, + doc: DocString::empty(), + attrs: _dollar1, + loc : mk_loc((_start_pos, _end_pos)) + } + }) +} + +// file:///./parser.mbty +// 2361| attributes is_async "fn" optional_type_parameters binder "(" list_commas(trait_method_param) ")" func_return_type { +// 2362| let (return_type, error_type) = $9 +// 2363| FunDecl::{ +// 2364| type_name : None, +// 2365| name : $5, +// 2366| is_async : $2, +// 2367| quantifiers: $4, +// 2368| decl_params: Some($7), +// 2369| params_loc: mk_loc($loc($7)), +// 2370| return_type, +// 2371| error_type, +// 2372| vis: Default, +// 2373| doc: DocString::empty(), +// 2374| attrs: $1, +// 2375| loc : mk_loc($loc) +// 2376| } +// 2377| } +fn yy_action_269(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_3(_last_pos, _args[0:0]) + let _sub_action_1_result = yy_action_8(_last_pos, _args[0:0]) + let _sub_action_2_result = yy_action_20(_args[1].2, _args[2:3]) + guard _args[6].0 is YYObj__Type___ErrorType_(_dollar9) + guard _sub_action_2_result is YYObj_Binder(_dollar5) + guard _sub_action_1_result is YYObj_Location_(_dollar2) + guard _args[1].0 is YYObj_List_TypeVarBinder_(_dollar4) + guard _args[4].0 is YYObj_List_Parameter_(_dollar7) + let _start_pos_of_item6 = _args[4].1 + let _end_pos_of_item6 = _args[4].2 + guard _sub_action_0_result is YYObj_List_Attribute_(_dollar1) + let _start_pos = if _args.length() == 0 { _last_pos } else { _args[0].1 } + let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } + YYObj_FunDecl({(); + let (return_type, error_type) = _dollar9 + FunDecl::{ + type_name : None, + name : _dollar5, + is_async : _dollar2, + quantifiers: _dollar4, + decl_params: Some(_dollar7), + params_loc: mk_loc((_start_pos_of_item6, _end_pos_of_item6)), + return_type, + error_type, + vis: Default, + doc: DocString::empty(), + attrs: _dollar1, + loc : mk_loc((_start_pos, _end_pos)) + } + }) +} + +// file:///./parser.mbty +// 2386| non_empty_list_semi_rev_aux(record_decl_field) SEMI record_constr_decl option(SEMI) { +// 2387| ($1.rev(), Some($3)) +// 2388| } +fn yy_action_270(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj_List_FieldDecl_(_dollar1) + guard _args[2].0 is YYObj_FunDecl(_dollar3) + YYObj__List_FieldDecl___FunDecl__({(); + (_dollar1.rev(), Some(_dollar3)) + }) +} + +// file:///./parser.mbty +// 234| non_empty_list_semi_rev_aux(X) SEMI X { $1.add($3) } +fn yy_action_271(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj_List_FieldDecl_(_dollar1) + guard _args[2].0 is YYObj_FieldDecl(_dollar3) + YYObj_List_FieldDecl_({(); _dollar1.add(_dollar3) }) +} + +// file:///./parser.mbty +// 2389| non_empty_list_semi_rev_aux(record_decl_field) option(SEMI) { +// 2390| ($1.rev(), None) +// 2391| } +fn yy_action_272(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj_List_FieldDecl_(_dollar1) YYObj__List_FieldDecl___FunDecl__({(); (_dollar1.rev(), None) @@ -7959,41 +9690,41 @@ fn yy_action_217(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 227| X { @list.singleton($1) } -fn yy_action_218(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 233| X { @list.singleton($1) } +fn yy_action_273(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj_FieldDecl(_dollar1) YYObj_List_FieldDecl_({(); @list.singleton(_dollar1) }) } // file:///./parser.mbty -// 2273| { -// 2274| (@list.empty(), None) -// 2275| } -fn yy_action_219(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 2383| { +// 2384| (@list.empty(), None) +// 2385| } +fn yy_action_274(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { YYObj__List_FieldDecl___FunDecl__({(); (@list.empty(), None) }) } // file:///./parser.mbty -// 504| struct_header "(" non_empty_list_commas(type_) ")" deriving_directive_list { -// 505| let (attrs, type_vis, tycon, tycon_loc, params) = $1 -// 506| TopTypeDef( -// 507| TypeDecl::{ -// 508| tycon, -// 509| tycon_loc, -// 510| params, -// 511| components: TupleStruct($3), -// 512| type_vis, -// 513| doc : DocString::empty(), -// 514| deriving: $5, -// 515| loc : mk_loc($sloc), -// 516| attrs, -// 517| is_declare : false -// 518| } -// 519| ) -// 520| } -fn yy_action_220(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 515| struct_header "(" non_empty_list_commas(type_) ")" deriving_directive_list { +// 516| let (attrs, type_vis, tycon, tycon_loc, params) = $1 +// 517| TopTypeDef( +// 518| TypeDecl::{ +// 519| tycon, +// 520| tycon_loc, +// 521| params, +// 522| components: TupleStruct($3), +// 523| type_vis, +// 524| doc : DocString::empty(), +// 525| deriving: $5, +// 526| loc : mk_loc($sloc), +// 527| attrs, +// 528| is_declare : false +// 529| } +// 530| ) +// 531| } +fn yy_action_275(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj__List_Attribute___Visibility__String__Location__List_TypeDeclBinder__(_dollar1) guard _args[2].0 is YYObj_List_Type_(_dollar3) guard _args[4].0 is YYObj_List_DerivingDirective_(_dollar5) @@ -8019,24 +9750,24 @@ fn yy_action_220(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 521| enum_header "{" list_semis(enum_constructor) "}" deriving_directive_list { -// 522| let (attrs, type_vis, tycon, tycon_loc, params) = $1 -// 523| TopTypeDef( -// 524| TypeDecl::{ -// 525| tycon, -// 526| tycon_loc, -// 527| params, -// 528| components: Variant($3), -// 529| type_vis, -// 530| doc : DocString::empty(), -// 531| deriving: $5, -// 532| loc : mk_loc($sloc), -// 533| attrs, -// 534| is_declare : false -// 535| } -// 536| ) -// 537| } -fn yy_action_221(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 532| enum_header "{" list_semis(enum_constructor) "}" deriving_directive_list { +// 533| let (attrs, type_vis, tycon, tycon_loc, params) = $1 +// 534| TopTypeDef( +// 535| TypeDecl::{ +// 536| tycon, +// 537| tycon_loc, +// 538| params, +// 539| components: Variant($3), +// 540| type_vis, +// 541| doc : DocString::empty(), +// 542| deriving: $5, +// 543| loc : mk_loc($sloc), +// 544| attrs, +// 545| is_declare : false +// 546| } +// 547| ) +// 548| } +fn yy_action_276(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj__List_Attribute___Visibility__String__Location__List_TypeDeclBinder__(_dollar1) guard _args[2].0 is YYObj_List_ConstrDecl_(_dollar3) guard _args[4].0 is YYObj_List_DerivingDirective_(_dollar5) @@ -8062,24 +9793,24 @@ fn yy_action_221(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 538| attributes is_declare visibility "extenum" UIDENT optional_type_parameters_no_constraints "{" list_semis(enum_constructor) "}" deriving_directive_list { -// 539| let tycon_loc = mk_loc($loc($5)) -// 540| TopTypeDef( -// 541| TypeDecl::{ -// 542| tycon : $5, -// 543| tycon_loc, -// 544| params : $6, -// 545| components : ExtensibleEnum($8), -// 546| type_vis : $3, -// 547| doc : DocString::empty(), -// 548| deriving : $10, -// 549| loc : mk_loc($sloc), -// 550| attrs : $1, -// 551| is_declare : $2 -// 552| } -// 553| ) -// 554| } -fn yy_action_222(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 549| attributes is_declare visibility "extenum" UIDENT optional_type_parameters_no_constraints "{" list_semis(enum_constructor) "}" deriving_directive_list { +// 550| let tycon_loc = mk_loc($loc($5)) +// 551| TopTypeDef( +// 552| TypeDecl::{ +// 553| tycon : $5, +// 554| tycon_loc, +// 555| params : $6, +// 556| components : ExtensibleEnum($8), +// 557| type_vis : $3, +// 558| doc : DocString::empty(), +// 559| deriving : $10, +// 560| loc : mk_loc($sloc), +// 561| attrs : $1, +// 562| is_declare : $2 +// 563| } +// 564| ) +// 565| } +fn yy_action_277(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _sub_action_0_result = yy_action_3(_last_pos, _args[0:0]) let _sub_action_1_result = yy_action_14(_last_pos, _args[0:0]) let _sub_action_2_result = yy_action_4(_last_pos, _args[0:0]) @@ -8114,12 +9845,12 @@ fn yy_action_222(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 827| UIDENT optional_type_parameters_no_constraints { -// 828| let loc = mk_loc($loc($1)) -// 829| let target = TypeName::{ name: Ident(name = $1), is_object: false, loc } -// 830| ($1, loc, $2, target) -// 831| } -fn yy_action_223(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 845| UIDENT optional_type_parameters_no_constraints { +// 846| let loc = mk_loc($loc($1)) +// 847| let target = TypeName::{ name: Ident(name = $1), is_object: false, loc } +// 848| ($1, loc, $2, target) +// 849| } +fn yy_action_278(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _start_pos_of_item0 = _args[0].1 let _end_pos_of_item0 = _args[0].2 guard _args[0].0 is YYObj_String(_dollar1) @@ -8132,24 +9863,24 @@ fn yy_action_223(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 555| attributes is_declare visibility "extenum" extenum_extension_target "+=" "{" list_semis(enum_constructor) "}" deriving_directive_list { -// 556| let (tycon, tycon_loc, params, target) = $5 -// 557| TopTypeDef( -// 558| TypeDecl::{ -// 559| tycon, -// 560| tycon_loc, -// 561| params, -// 562| components : ExtendEnum(target~, constructors = $8), -// 563| type_vis : $3, -// 564| doc : DocString::empty(), -// 565| deriving : $10, -// 566| loc : mk_loc($sloc), -// 567| attrs : $1, -// 568| is_declare : $2 -// 569| } -// 570| ) -// 571| } -fn yy_action_224(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 566| attributes is_declare visibility "extenum" extenum_extension_target "+=" "{" list_semis(enum_constructor) "}" deriving_directive_list { +// 567| let (tycon, tycon_loc, params, target) = $5 +// 568| TopTypeDef( +// 569| TypeDecl::{ +// 570| tycon, +// 571| tycon_loc, +// 572| params, +// 573| components : ExtendEnum(target~, constructors = $8), +// 574| type_vis : $3, +// 575| doc : DocString::empty(), +// 576| deriving : $10, +// 577| loc : mk_loc($sloc), +// 578| attrs : $1, +// 579| is_declare : $2 +// 580| } +// 581| ) +// 582| } +fn yy_action_279(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _sub_action_0_result = yy_action_3(_last_pos, _args[0:0]) let _sub_action_1_result = yy_action_14(_last_pos, _args[0:0]) let _sub_action_2_result = yy_action_4(_last_pos, _args[0:0]) @@ -8181,22 +9912,22 @@ fn yy_action_224(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 973| "derive" "(" list_commas(deriving_directive) ")" { $3 } -fn yy_action_225(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 1007| "derive" "(" list_commas(deriving_directive) ")" { $3 } +fn yy_action_280(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[2].0 is YYObj_List_DerivingDirective_(_dollar3) YYObj_List_DerivingDirective_({(); _dollar3 }) } // file:///./parser.mbty -// 207| non_empty_list_commas(X) { $1 } -fn yy_action_226(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 213| non_empty_list_commas(X) { $1 } +fn yy_action_281(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj_List_DerivingDirective_(_dollar1) YYObj_List_DerivingDirective_({(); _dollar1 }) } // file:///./parser.mbty -// 968| type_name "(" list_commas(argument) ")" { DerivingDirective::{ type_name: $1, args: $3, loc: mk_loc($sloc) } } -fn yy_action_227(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 1002| type_name "(" list_commas(argument) ")" { DerivingDirective::{ type_name: $1, args: $3, loc: mk_loc($sloc) } } +fn yy_action_282(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj_TypeName(_dollar1) guard _args[2].0 is YYObj_List_Argument_(_dollar3) let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) @@ -8205,8 +9936,8 @@ fn yy_action_227(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 967| type_name { DerivingDirective::{ type_name: $1, args: @list.empty(), loc: mk_loc($sloc) } } -fn yy_action_228(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 1001| type_name { DerivingDirective::{ type_name: $1, args: @list.empty(), loc: mk_loc($sloc) } } +fn yy_action_283(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj_TypeName(_dollar1) let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } @@ -8214,46 +9945,46 @@ fn yy_action_228(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 190| non_empty_list_commas_rev(X) "," X { $1.add($3) } -fn yy_action_229(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 196| non_empty_list_commas_rev(X) "," X { $1.add($3) } +fn yy_action_284(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj_List_DerivingDirective_(_dollar1) guard _args[2].0 is YYObj_DerivingDirective(_dollar3) YYObj_List_DerivingDirective_({(); _dollar1.add(_dollar3) }) } // file:///./parser.mbty -// 198| non_empty_list_commas_rev(X) option(",") { $1.rev() } -fn yy_action_230(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 204| non_empty_list_commas_rev(X) option(",") { $1.rev() } +fn yy_action_285(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj_List_DerivingDirective_(_dollar1) YYObj_List_DerivingDirective_({(); _dollar1.rev() }) } // file:///./parser.mbty -// 189| X { @list.singleton($1) } -fn yy_action_231(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 195| X { @list.singleton($1) } +fn yy_action_286(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj_DerivingDirective(_dollar1) YYObj_List_DerivingDirective_({(); @list.singleton(_dollar1) }) } // file:///./parser.mbty -// 206| { @list.empty() } -fn yy_action_232(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 212| { @list.empty() } +fn yy_action_287(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { YYObj_List_DerivingDirective_({(); @list.empty() }) } // file:///./parser.mbty -// 972| { @list.empty() } -fn yy_action_233(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 1006| { @list.empty() } +fn yy_action_288(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { YYObj_List_DerivingDirective_({(); @list.empty() }) } // file:///./parser.mbty -// 832| PACKAGE_NAME DOT_UIDENT optional_type_parameters_no_constraints { -// 833| let tycon_loc = mk_loc($loc($2)) -// 834| let target = TypeName::{ name: Dot(pkg = $1, id = $2), is_object: false, loc: mk_loc($sloc) } -// 835| ($2, tycon_loc, $3, target) -// 836| } -fn yy_action_234(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 850| PACKAGE_NAME DOT_UIDENT optional_type_parameters_no_constraints { +// 851| let tycon_loc = mk_loc($loc($2)) +// 852| let target = TypeName::{ name: Dot(pkg = $1, id = $2), is_object: false, loc: mk_loc($sloc) } +// 853| ($2, tycon_loc, $3, target) +// 854| } +fn yy_action_289(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _start_pos_of_item1 = _args[1].1 let _end_pos_of_item1 = _args[1].2 guard _args[0].0 is YYObj_String(_dollar1) @@ -8269,21 +10000,21 @@ fn yy_action_234(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 572| val_header "=" expr { -// 573| let (attrs, is_constant, is_declare, vis, binder, ty) = $1 -// 574| TopLetDef( -// 575| binder~, -// 576| ty~, -// 577| expr = $3, -// 578| vis~, -// 579| is_constant~, -// 580| loc = mk_loc($sloc), -// 581| attrs~, -// 582| doc = DocString::empty(), -// 583| is_declare~ -// 584| ) -// 585| } -fn yy_action_235(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 583| val_header "=" expr { +// 584| let (attrs, is_constant, is_declare, vis, binder, ty) = $1 +// 585| TopLetDef( +// 586| binder~, +// 587| ty~, +// 588| expr = $3, +// 589| vis~, +// 590| is_constant~, +// 591| loc = mk_loc($sloc), +// 592| attrs~, +// 593| doc = DocString::empty(), +// 594| is_declare~ +// 595| ) +// 596| } +fn yy_action_290(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj__List_Attribute___Bool__Bool__Visibility__Binder__Type__(_dollar1) guard _args[2].0 is YYObj_Expr(_dollar3) let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) @@ -8305,16 +10036,16 @@ fn yy_action_235(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 586| extern_fun_header "=" STRING STRING { -// 587| let (language, fun_decl) = $1 -// 588| TopFuncDef( -// 589| loc = mk_loc($sloc), -// 590| fun_decl~, -// 591| where_clause = None, -// 592| decl_body = DeclStubs(Import(module_name = $3, func_name = $4, language = Some(language))) -// 593| ) -// 594| } -fn yy_action_236(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 597| extern_fun_header "=" STRING STRING { +// 598| let (language, fun_decl) = $1 +// 599| TopFuncDef( +// 600| loc = mk_loc($sloc), +// 601| fun_decl~, +// 602| where_clause = None, +// 603| decl_body = DeclStubs(Import(module_name = $3, func_name = $4, language = Some(language))) +// 604| ) +// 605| } +fn yy_action_291(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj__StringLiteral__FunDecl_(_dollar1) let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } @@ -8332,16 +10063,16 @@ fn yy_action_236(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 620| extern_fun_header "=" STRING { -// 621| let (language, decl) = $1 -// 622| TopFuncDef( -// 623| loc = mk_loc($sloc), -// 624| fun_decl = decl, -// 625| where_clause = None, -// 626| decl_body = DeclStubs(Embedded(language = Some(language), code = CodeString($3))) -// 627| ) -// 628| } -fn yy_action_237(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 631| extern_fun_header "=" STRING { +// 632| let (language, decl) = $1 +// 633| TopFuncDef( +// 634| loc = mk_loc($sloc), +// 635| fun_decl = decl, +// 636| where_clause = None, +// 637| decl_body = DeclStubs(Embedded(language = Some(language), code = CodeString($3))) +// 638| ) +// 639| } +fn yy_action_292(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj__StringLiteral__FunDecl_(_dollar1) let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } @@ -8358,16 +10089,16 @@ fn yy_action_237(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 629| extern_fun_header "=" non_empty_list(MULTILINE_STRING) { -// 630| let (language, decl) = $1 -// 631| TopFuncDef( -// 632| loc = mk_loc($sloc), -// 633| fun_decl = decl, -// 634| where_clause = None, -// 635| decl_body = DeclStubs(Embedded(language = Some(language), code = CodeMultilineString($3))) -// 636| ) -// 637| } -fn yy_action_238(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 640| extern_fun_header "=" non_empty_list(MULTILINE_STRING) { +// 641| let (language, decl) = $1 +// 642| TopFuncDef( +// 643| loc = mk_loc($sloc), +// 644| fun_decl = decl, +// 645| where_clause = None, +// 646| decl_body = DeclStubs(Embedded(language = Some(language), code = CodeMultilineString($3))) +// 647| ) +// 648| } +fn yy_action_293(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj__StringLiteral__FunDecl_(_dollar1) let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } @@ -8384,15 +10115,15 @@ fn yy_action_238(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 596| fun_header "=" STRING STRING { -// 597| TopFuncDef( -// 598| loc = mk_loc($sloc), -// 599| fun_decl = $1, -// 600| where_clause = None, -// 601| decl_body = DeclStubs(Import(module_name = $3, func_name = $4, language = None)) -// 602| ) -// 603| } -fn yy_action_239(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 607| fun_header "=" STRING STRING { +// 608| TopFuncDef( +// 609| loc = mk_loc($sloc), +// 610| fun_decl = $1, +// 611| where_clause = None, +// 612| decl_body = DeclStubs(Import(module_name = $3, func_name = $4, language = None)) +// 613| ) +// 614| } +fn yy_action_294(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } guard _args[0].0 is YYObj_FunDecl(_dollar1) @@ -8409,15 +10140,15 @@ fn yy_action_239(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 604| fun_header "=" STRING { -// 605| TopFuncDef( -// 606| loc = mk_loc($sloc), -// 607| fun_decl = $1, -// 608| where_clause = None, -// 609| decl_body = DeclStubs(Embedded(language = None, code = CodeString($3))) -// 610| ) -// 611| } -fn yy_action_240(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 615| fun_header "=" STRING { +// 616| TopFuncDef( +// 617| loc = mk_loc($sloc), +// 618| fun_decl = $1, +// 619| where_clause = None, +// 620| decl_body = DeclStubs(Embedded(language = None, code = CodeString($3))) +// 621| ) +// 622| } +fn yy_action_295(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } guard _args[0].0 is YYObj_FunDecl(_dollar1) @@ -8433,15 +10164,15 @@ fn yy_action_240(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 612| fun_header "=" non_empty_list(MULTILINE_STRING) { -// 613| TopFuncDef( -// 614| loc = mk_loc($sloc), -// 615| fun_decl = $1, -// 616| where_clause = None, -// 617| decl_body = DeclStubs(Embedded(language = None, code = CodeMultilineString($3))) -// 618| ) -// 619| } -fn yy_action_241(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 623| fun_header "=" non_empty_list(MULTILINE_STRING) { +// 624| TopFuncDef( +// 625| loc = mk_loc($sloc), +// 626| fun_decl = $1, +// 627| where_clause = None, +// 628| decl_body = DeclStubs(Embedded(language = None, code = CodeMultilineString($3))) +// 629| ) +// 630| } +fn yy_action_296(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } guard _args[0].0 is YYObj_FunDecl(_dollar1) @@ -8457,30 +10188,30 @@ fn yy_action_241(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 185| X non_empty_list(X) { $2.add($1) } -fn yy_action_242(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 191| X non_empty_list(X) { $2.add($1) } +fn yy_action_297(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[1].0 is YYObj_List_String_(_dollar2) guard _args[0].0 is YYObj_String(_dollar1) YYObj_List_String_({(); _dollar2.add(_dollar1) }) } // file:///./parser.mbty -// 184| X { @list.singleton($1) } -fn yy_action_243(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 190| X { @list.singleton($1) } +fn yy_action_298(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj_String(_dollar1) YYObj_List_String_({(); @list.singleton(_dollar1) }) } // file:///./parser.mbty -// 638| fun_header optional_where_clause block_expr { -// 639| TopFuncDef( -// 640| loc = mk_loc($sloc), -// 641| fun_decl = $1, -// 642| where_clause = $2, -// 643| decl_body = DeclBody(expr = $3) -// 644| ) -// 645| } -fn yy_action_244(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 649| fun_header optional_where_clause block_expr { +// 650| TopFuncDef( +// 651| loc = mk_loc($sloc), +// 652| fun_decl = $1, +// 653| where_clause = $2, +// 654| decl_body = DeclBody(expr = $3) +// 655| ) +// 656| } +fn yy_action_299(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } guard _args[0].0 is YYObj_FunDecl(_dollar1) @@ -8497,15 +10228,15 @@ fn yy_action_244(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 646| declare_fun_header { -// 647| TopFuncDef( -// 648| loc = mk_loc($sloc), -// 649| fun_decl = $1, -// 650| where_clause = None, -// 651| decl_body = DeclNone -// 652| ) -// 653| } -fn yy_action_245(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 657| declare_fun_header { +// 658| TopFuncDef( +// 659| loc = mk_loc($sloc), +// 660| fun_decl = $1, +// 661| where_clause = None, +// 662| decl_body = DeclNone +// 663| ) +// 664| } +fn yy_action_300(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } guard _args[0].0 is YYObj_FunDecl(_dollar1) @@ -8520,26 +10251,26 @@ fn yy_action_245(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 654| attributes is_declare visibility "trait" UIDENT option(preceded(COLON, separated_nonempty_list(PLUS, tvar_constraint))) "{" list_semis(trait_method_decl) "}" { -// 655| let name = Binder::{ name: $5, loc: mk_loc($loc($4)) } -// 656| let supers = match $6 { -// 657| None => @list.empty() -// 658| Some(supers) => supers -// 659| } -// 660| TopTrait( -// 661| TraitDecl::{ -// 662| name, -// 663| supers, -// 664| methods: $8, -// 665| vis: $3, -// 666| loc: mk_loc($sloc), -// 667| attrs: $1, -// 668| doc : DocString::empty(), -// 669| is_declare : $2 -// 670| } -// 671| ) -// 672| } -fn yy_action_246(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 665| attributes is_declare visibility "trait" UIDENT option(preceded(COLON, separated_nonempty_list(PLUS, tvar_constraint))) "{" list_semis(trait_method_decl) "}" { +// 666| let name = Binder::{ name: $5, loc: mk_loc($loc($4)) } +// 667| let supers = match $6 { +// 668| None => @list.empty() +// 669| Some(supers) => supers +// 670| } +// 671| TopTrait( +// 672| TraitDecl::{ +// 673| name, +// 674| supers, +// 675| methods: $8, +// 676| vis: $3, +// 677| loc: mk_loc($sloc), +// 678| attrs: $1, +// 679| doc : DocString::empty(), +// 680| is_declare : $2 +// 681| } +// 682| ) +// 683| } +fn yy_action_301(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _sub_action_0_result = yy_action_3(_last_pos, _args[0:0]) let _sub_action_1_result = yy_action_14(_last_pos, _args[0:0]) let _sub_action_2_result = yy_action_4(_last_pos, _args[0:0]) @@ -8575,28 +10306,28 @@ fn yy_action_246(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 251| non_empty_list_semis(X) { $1 } -fn yy_action_247(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 257| non_empty_list_semis(X) { $1 } +fn yy_action_302(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj_List_TraitMethodDecl_(_dollar1) YYObj_List_TraitMethodDecl_({(); _dollar1 }) } // file:///./parser.mbty -// 982| attributes is_async trait_method_fn_header binder "(" list_commas(trait_method_param) ")" func_return_type option(preceded("=", wildcard)) { -// 983| let (return_type, error_type) = $8 -// 984| TraitMethodDecl::{ -// 985| name: $4, -// 986| is_async: $2, -// 987| quantifiers: $3, -// 988| params: $6, -// 989| return_type, -// 990| error_type, -// 991| has_default: $9, -// 992| attrs: $1, -// 993| loc: mk_loc($sloc) -// 994| } -// 995| } -fn yy_action_248(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 1016| attributes is_async trait_method_fn_header binder "(" list_commas(trait_method_param) ")" func_return_type option(preceded("=", wildcard)) { +// 1017| let (return_type, error_type) = $8 +// 1018| TraitMethodDecl::{ +// 1019| name: $4, +// 1020| is_async: $2, +// 1021| quantifiers: $3, +// 1022| params: $6, +// 1023| return_type, +// 1024| error_type, +// 1025| has_default: $9, +// 1026| attrs: $1, +// 1027| loc: mk_loc($sloc) +// 1028| } +// 1029| } +fn yy_action_303(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _sub_action_0_result = yy_action_3(_last_pos, _args[0:0]) let _sub_action_1_result = yy_action_5(_last_pos, _args[0:1]) let _sub_action_2_result = yy_action_15(_args[1].2, _args[2:3]) @@ -8626,21 +10357,65 @@ fn yy_action_248(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 982| attributes is_async trait_method_fn_header binder "(" list_commas(trait_method_param) ")" func_return_type option(preceded("=", wildcard)) { -// 983| let (return_type, error_type) = $8 -// 984| TraitMethodDecl::{ -// 985| name: $4, -// 986| is_async: $2, -// 987| quantifiers: $3, -// 988| params: $6, -// 989| return_type, -// 990| error_type, -// 991| has_default: $9, -// 992| attrs: $1, -// 993| loc: mk_loc($sloc) -// 994| } -// 995| } -fn yy_action_249(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 1016| attributes is_async trait_method_fn_header binder "(" list_commas(trait_method_param) ")" func_return_type option(preceded("=", wildcard)) { +// 1017| let (return_type, error_type) = $8 +// 1018| TraitMethodDecl::{ +// 1019| name: $4, +// 1020| is_async: $2, +// 1021| quantifiers: $3, +// 1022| params: $6, +// 1023| return_type, +// 1024| error_type, +// 1025| has_default: $9, +// 1026| attrs: $1, +// 1027| loc: mk_loc($sloc) +// 1028| } +// 1029| } +fn yy_action_304(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_3(_last_pos, _args[0:0]) + let _sub_action_1_result = yy_action_5(_last_pos, _args[0:1]) + let _sub_action_2_result = yy_action_20(_args[1].2, _args[2:3]) + guard _args[6].0 is YYObj__Type___ErrorType_(_dollar8) + guard _sub_action_2_result is YYObj_Binder(_dollar4) + guard _sub_action_1_result is YYObj_Location_(_dollar2) + guard _args[1].0 is YYObj_List_TypeVarBinder_(_dollar3) + guard _args[4].0 is YYObj_List_Parameter_(_dollar6) + guard _args[7].0 is YYObj_Option_Location_(_dollar9) + guard _sub_action_0_result is YYObj_List_Attribute_(_dollar1) + let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) + let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } + YYObj_TraitMethodDecl({(); + let (return_type, error_type) = _dollar8 + TraitMethodDecl::{ + name: _dollar4, + is_async: _dollar2, + quantifiers: _dollar3, + params: _dollar6, + return_type, + error_type, + has_default: _dollar9, + attrs: _dollar1, + loc: mk_loc((_symbol_start_pos, _end_pos)) + } + }) +} + +// file:///./parser.mbty +// 1016| attributes is_async trait_method_fn_header binder "(" list_commas(trait_method_param) ")" func_return_type option(preceded("=", wildcard)) { +// 1017| let (return_type, error_type) = $8 +// 1018| TraitMethodDecl::{ +// 1019| name: $4, +// 1020| is_async: $2, +// 1021| quantifiers: $3, +// 1022| params: $6, +// 1023| return_type, +// 1024| error_type, +// 1025| has_default: $9, +// 1026| attrs: $1, +// 1027| loc: mk_loc($sloc) +// 1028| } +// 1029| } +fn yy_action_305(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _sub_action_0_result = yy_action_3(_last_pos, _args[0:0]) let _sub_action_1_result = yy_action_8(_last_pos, _args[0:0]) let _sub_action_2_result = yy_action_15(_args[0].2, _args[1:2]) @@ -8670,29 +10445,73 @@ fn yy_action_249(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 978| "fn" optional_type_parameters { $2 } -fn yy_action_250(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 1016| attributes is_async trait_method_fn_header binder "(" list_commas(trait_method_param) ")" func_return_type option(preceded("=", wildcard)) { +// 1017| let (return_type, error_type) = $8 +// 1018| TraitMethodDecl::{ +// 1019| name: $4, +// 1020| is_async: $2, +// 1021| quantifiers: $3, +// 1022| params: $6, +// 1023| return_type, +// 1024| error_type, +// 1025| has_default: $9, +// 1026| attrs: $1, +// 1027| loc: mk_loc($sloc) +// 1028| } +// 1029| } +fn yy_action_306(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_3(_last_pos, _args[0:0]) + let _sub_action_1_result = yy_action_8(_last_pos, _args[0:0]) + let _sub_action_2_result = yy_action_20(_args[0].2, _args[1:2]) + guard _args[5].0 is YYObj__Type___ErrorType_(_dollar8) + guard _sub_action_2_result is YYObj_Binder(_dollar4) + guard _sub_action_1_result is YYObj_Location_(_dollar2) + guard _args[0].0 is YYObj_List_TypeVarBinder_(_dollar3) + guard _args[3].0 is YYObj_List_Parameter_(_dollar6) + guard _args[6].0 is YYObj_Option_Location_(_dollar9) + guard _sub_action_0_result is YYObj_List_Attribute_(_dollar1) + let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) + let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } + YYObj_TraitMethodDecl({(); + let (return_type, error_type) = _dollar8 + TraitMethodDecl::{ + name: _dollar4, + is_async: _dollar2, + quantifiers: _dollar3, + params: _dollar6, + return_type, + error_type, + has_default: _dollar9, + attrs: _dollar1, + loc: mk_loc((_symbol_start_pos, _end_pos)) + } + }) +} + +// file:///./parser.mbty +// 1012| "fn" optional_type_parameters { $2 } +fn yy_action_307(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[1].0 is YYObj_List_TypeVarBinder_(_dollar2) YYObj_List_TypeVarBinder_({(); _dollar2 }) } // file:///./parser.mbty -// 982| attributes is_async trait_method_fn_header binder "(" list_commas(trait_method_param) ")" func_return_type option(preceded("=", wildcard)) { -// 983| let (return_type, error_type) = $8 -// 984| TraitMethodDecl::{ -// 985| name: $4, -// 986| is_async: $2, -// 987| quantifiers: $3, -// 988| params: $6, -// 989| return_type, -// 990| error_type, -// 991| has_default: $9, -// 992| attrs: $1, -// 993| loc: mk_loc($sloc) -// 994| } -// 995| } -fn yy_action_251(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_54(_last_pos, _args[0:1]) +// 1016| attributes is_async trait_method_fn_header binder "(" list_commas(trait_method_param) ")" func_return_type option(preceded("=", wildcard)) { +// 1017| let (return_type, error_type) = $8 +// 1018| TraitMethodDecl::{ +// 1019| name: $4, +// 1020| is_async: $2, +// 1021| quantifiers: $3, +// 1022| params: $6, +// 1023| return_type, +// 1024| error_type, +// 1025| has_default: $9, +// 1026| attrs: $1, +// 1027| loc: mk_loc($sloc) +// 1028| } +// 1029| } +fn yy_action_308(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_65(_last_pos, _args[0:1]) let _sub_action_1_result = yy_action_5(_args[0].2, _args[1:2]) let _sub_action_2_result = yy_action_15(_args[2].2, _args[3:4]) guard _args[7].0 is YYObj__Type___ErrorType_(_dollar8) @@ -8721,22 +10540,66 @@ fn yy_action_251(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 982| attributes is_async trait_method_fn_header binder "(" list_commas(trait_method_param) ")" func_return_type option(preceded("=", wildcard)) { -// 983| let (return_type, error_type) = $8 -// 984| TraitMethodDecl::{ -// 985| name: $4, -// 986| is_async: $2, -// 987| quantifiers: $3, -// 988| params: $6, -// 989| return_type, -// 990| error_type, -// 991| has_default: $9, -// 992| attrs: $1, -// 993| loc: mk_loc($sloc) -// 994| } -// 995| } -fn yy_action_252(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_54(_last_pos, _args[0:1]) +// 1016| attributes is_async trait_method_fn_header binder "(" list_commas(trait_method_param) ")" func_return_type option(preceded("=", wildcard)) { +// 1017| let (return_type, error_type) = $8 +// 1018| TraitMethodDecl::{ +// 1019| name: $4, +// 1020| is_async: $2, +// 1021| quantifiers: $3, +// 1022| params: $6, +// 1023| return_type, +// 1024| error_type, +// 1025| has_default: $9, +// 1026| attrs: $1, +// 1027| loc: mk_loc($sloc) +// 1028| } +// 1029| } +fn yy_action_309(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_65(_last_pos, _args[0:1]) + let _sub_action_1_result = yy_action_5(_args[0].2, _args[1:2]) + let _sub_action_2_result = yy_action_20(_args[2].2, _args[3:4]) + guard _args[7].0 is YYObj__Type___ErrorType_(_dollar8) + guard _sub_action_2_result is YYObj_Binder(_dollar4) + guard _sub_action_1_result is YYObj_Location_(_dollar2) + guard _args[2].0 is YYObj_List_TypeVarBinder_(_dollar3) + guard _args[5].0 is YYObj_List_Parameter_(_dollar6) + guard _args[8].0 is YYObj_Option_Location_(_dollar9) + guard _sub_action_0_result is YYObj_List_Attribute_(_dollar1) + let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) + let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } + YYObj_TraitMethodDecl({(); + let (return_type, error_type) = _dollar8 + TraitMethodDecl::{ + name: _dollar4, + is_async: _dollar2, + quantifiers: _dollar3, + params: _dollar6, + return_type, + error_type, + has_default: _dollar9, + attrs: _dollar1, + loc: mk_loc((_symbol_start_pos, _end_pos)) + } + }) +} + +// file:///./parser.mbty +// 1016| attributes is_async trait_method_fn_header binder "(" list_commas(trait_method_param) ")" func_return_type option(preceded("=", wildcard)) { +// 1017| let (return_type, error_type) = $8 +// 1018| TraitMethodDecl::{ +// 1019| name: $4, +// 1020| is_async: $2, +// 1021| quantifiers: $3, +// 1022| params: $6, +// 1023| return_type, +// 1024| error_type, +// 1025| has_default: $9, +// 1026| attrs: $1, +// 1027| loc: mk_loc($sloc) +// 1028| } +// 1029| } +fn yy_action_310(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_65(_last_pos, _args[0:1]) let _sub_action_1_result = yy_action_8(_args[0].2, _args[1:1]) let _sub_action_2_result = yy_action_15(_args[1].2, _args[2:3]) guard _args[6].0 is YYObj__Type___ErrorType_(_dollar8) @@ -8765,44 +10628,88 @@ fn yy_action_252(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 999| "_" { mk_loc($sloc) } -fn yy_action_253(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 1016| attributes is_async trait_method_fn_header binder "(" list_commas(trait_method_param) ")" func_return_type option(preceded("=", wildcard)) { +// 1017| let (return_type, error_type) = $8 +// 1018| TraitMethodDecl::{ +// 1019| name: $4, +// 1020| is_async: $2, +// 1021| quantifiers: $3, +// 1022| params: $6, +// 1023| return_type, +// 1024| error_type, +// 1025| has_default: $9, +// 1026| attrs: $1, +// 1027| loc: mk_loc($sloc) +// 1028| } +// 1029| } +fn yy_action_311(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_65(_last_pos, _args[0:1]) + let _sub_action_1_result = yy_action_8(_args[0].2, _args[1:1]) + let _sub_action_2_result = yy_action_20(_args[1].2, _args[2:3]) + guard _args[6].0 is YYObj__Type___ErrorType_(_dollar8) + guard _sub_action_2_result is YYObj_Binder(_dollar4) + guard _sub_action_1_result is YYObj_Location_(_dollar2) + guard _args[1].0 is YYObj_List_TypeVarBinder_(_dollar3) + guard _args[4].0 is YYObj_List_Parameter_(_dollar6) + guard _args[7].0 is YYObj_Option_Location_(_dollar9) + guard _sub_action_0_result is YYObj_List_Attribute_(_dollar1) let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - YYObj_Location({(); mk_loc((_symbol_start_pos, _end_pos)) }) -} - -// file:///./stdlib.mbty -// 5| X { Some($1) } -fn yy_action_254(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_255(_last_pos, _args[0:2]) + YYObj_TraitMethodDecl({(); + let (return_type, error_type) = _dollar8 + TraitMethodDecl::{ + name: _dollar4, + is_async: _dollar2, + quantifiers: _dollar3, + params: _dollar6, + return_type, + error_type, + has_default: _dollar9, + attrs: _dollar1, + loc: mk_loc((_symbol_start_pos, _end_pos)) + } + }) +} + +// file:///./parser.mbty +// 1033| "_" { mk_loc($sloc) } +fn yy_action_312(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) + let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } + YYObj_Location({(); mk_loc((_symbol_start_pos, _end_pos)) }) +} + +// file:///./stdlib.mbty +// 5| X { Some($1) } +fn yy_action_313(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_314(_last_pos, _args[0:2]) guard _sub_action_0_result is YYObj_Location(_dollar1) YYObj_Option_Location_({(); Some(_dollar1) }) } // file:///./stdlib.mbty // 32| L X { $2 } -fn yy_action_255(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +fn yy_action_314(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[1].0 is YYObj_Location(_dollar2) YYObj_Location({(); _dollar2 }) } // file:///./stdlib.mbty // 4| { None } -fn yy_action_256(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +fn yy_action_315(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { YYObj_Option_Location_({(); None }) } // file:///./parser.mbty -// 207| non_empty_list_commas(X) { $1 } -fn yy_action_257(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 213| non_empty_list_commas(X) { $1 } +fn yy_action_316(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj_List_Parameter_(_dollar1) YYObj_List_Parameter_({(); _dollar1 }) } // file:///./parser.mbty -// 1003| type_ { DiscardPositional(ty = Some($1), loc = mk_loc($sloc)) } -fn yy_action_258(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 1037| type_ { DiscardPositional(ty = Some($1), loc = mk_loc($sloc)) } +fn yy_action_317(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj_Type(_dollar1) let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } @@ -8810,8 +10717,8 @@ fn yy_action_258(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 1004| binder ":" type_ { Positional(binder = $1, ty = Some($3)) } -fn yy_action_259(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 1038| binder ":" type_ { Positional(binder = $1, ty = Some($3)) } +fn yy_action_318(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _sub_action_0_result = yy_action_15(_last_pos, _args[0:1]) guard _sub_action_0_result is YYObj_Binder(_dollar1) guard _args[2].0 is YYObj_Type(_dollar3) @@ -8819,8 +10726,8 @@ fn yy_action_259(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 1005| binder "?" ":" type_ { QuestionOptional(binder = $1, ty = Some($4)) } -fn yy_action_260(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 1039| binder "?" ":" type_ { QuestionOptional(binder = $1, ty = Some($4)) } +fn yy_action_319(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _sub_action_0_result = yy_action_15(_last_pos, _args[0:1]) guard _sub_action_0_result is YYObj_Binder(_dollar1) guard _args[3].0 is YYObj_Type(_dollar4) @@ -8828,11 +10735,29 @@ fn yy_action_260(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 1006| POST_LABEL ":" type_ { -// 1007| let binder = Binder::{ name: $1, loc: mk_loc($loc($1)).trim_last_char() } -// 1008| Labelled(binder~, ty = Some($3)) -// 1009| } -fn yy_action_261(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 1038| binder ":" type_ { Positional(binder = $1, ty = Some($3)) } +fn yy_action_320(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_20(_last_pos, _args[0:1]) + guard _sub_action_0_result is YYObj_Binder(_dollar1) + guard _args[2].0 is YYObj_Type(_dollar3) + YYObj_Parameter({(); Positional(binder = _dollar1, ty = Some(_dollar3)) }) +} + +// file:///./parser.mbty +// 1039| binder "?" ":" type_ { QuestionOptional(binder = $1, ty = Some($4)) } +fn yy_action_321(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_20(_last_pos, _args[0:1]) + guard _sub_action_0_result is YYObj_Binder(_dollar1) + guard _args[3].0 is YYObj_Type(_dollar4) + YYObj_Parameter({(); QuestionOptional(binder = _dollar1, ty = Some(_dollar4)) }) +} + +// file:///./parser.mbty +// 1040| POST_LABEL ":" type_ { +// 1041| let binder = Binder::{ name: $1, loc: mk_loc($loc($1)).trim_last_char() } +// 1042| Labelled(binder~, ty = Some($3)) +// 1043| } +fn yy_action_322(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj_String(_dollar1) let _start_pos_of_item0 = _args[0].1 let _end_pos_of_item0 = _args[0].2 @@ -8844,94 +10769,94 @@ fn yy_action_261(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 190| non_empty_list_commas_rev(X) "," X { $1.add($3) } -fn yy_action_262(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 196| non_empty_list_commas_rev(X) "," X { $1.add($3) } +fn yy_action_323(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj_List_Parameter_(_dollar1) guard _args[2].0 is YYObj_Parameter(_dollar3) YYObj_List_Parameter_({(); _dollar1.add(_dollar3) }) } // file:///./parser.mbty -// 198| non_empty_list_commas_rev(X) option(",") { $1.rev() } -fn yy_action_263(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 204| non_empty_list_commas_rev(X) option(",") { $1.rev() } +fn yy_action_324(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj_List_Parameter_(_dollar1) YYObj_List_Parameter_({(); _dollar1.rev() }) } // file:///./parser.mbty -// 189| X { @list.singleton($1) } -fn yy_action_264(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 195| X { @list.singleton($1) } +fn yy_action_325(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj_Parameter(_dollar1) YYObj_List_Parameter_({(); @list.singleton(_dollar1) }) } // file:///./parser.mbty -// 206| { @list.empty() } -fn yy_action_265(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 212| { @list.empty() } +fn yy_action_326(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { YYObj_List_Parameter_({(); @list.empty() }) } // file:///./parser.mbty -// 241| X SEMI non_empty_list_semis(X) { $3.add($1) } -fn yy_action_266(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 247| X SEMI non_empty_list_semis(X) { $3.add($1) } +fn yy_action_327(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[2].0 is YYObj_List_TraitMethodDecl_(_dollar3) guard _args[0].0 is YYObj_TraitMethodDecl(_dollar1) YYObj_List_TraitMethodDecl_({(); _dollar3.add(_dollar1) }) } // file:///./parser.mbty -// 240| X option(SEMI) { @list.singleton($1) } -fn yy_action_267(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 246| X option(SEMI) { @list.singleton($1) } +fn yy_action_328(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj_TraitMethodDecl(_dollar1) YYObj_List_TraitMethodDecl_({(); @list.singleton(_dollar1) }) } // file:///./parser.mbty -// 250| { @list.empty() } -fn yy_action_268(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 256| { @list.empty() } +fn yy_action_329(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { YYObj_List_TraitMethodDecl_({(); @list.empty() }) } // file:///./parser.mbty -// 977| { @list.empty() } -fn yy_action_269(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 1011| { @list.empty() } +fn yy_action_330(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { YYObj_List_TypeVarBinder_({(); @list.empty() }) } // file:///./stdlib.mbty // 5| X { Some($1) } -fn yy_action_270(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_271(_last_pos, _args[0:2]) +fn yy_action_331(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_332(_last_pos, _args[0:2]) guard _sub_action_0_result is YYObj__list_List_TypeVarConstraint_(_dollar1) YYObj_Option__list_List_TypeVarConstraint__({(); Some(_dollar1) }) } // file:///./stdlib.mbty // 32| L X { $2 } -fn yy_action_271(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +fn yy_action_332(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[1].0 is YYObj__list_List_TypeVarConstraint_(_dollar2) YYObj__list_List_TypeVarConstraint_({(); _dollar2 }) } // file:///./stdlib.mbty // 4| { None } -fn yy_action_272(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +fn yy_action_333(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { YYObj_Option__list_List_TypeVarConstraint__({(); None }) } // file:///./parser.mbty -// 690| attributes is_async "test" option(loced_string) option(parameters) block_expr { -// 691| TopTest( -// 692| expr = $6, -// 693| name = $4, -// 694| params = $5, -// 695| is_async = $2, -// 696| loc = mk_loc($sloc), -// 697| attrs = $1, -// 698| doc = DocString::empty() -// 699| ) -// 700| } -fn yy_action_273(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 701| attributes is_async "test" option(loced_string) option(parameters) block_expr { +// 702| TopTest( +// 703| expr = $6, +// 704| name = $4, +// 705| params = $5, +// 706| is_async = $2, +// 707| loc = mk_loc($sloc), +// 708| attrs = $1, +// 709| doc = DocString::empty() +// 710| ) +// 711| } +fn yy_action_334(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _sub_action_0_result = yy_action_3(_last_pos, _args[0:0]) let _sub_action_1_result = yy_action_8(_last_pos, _args[0:0]) guard _args[3].0 is YYObj_Expr(_dollar6) @@ -8956,28 +10881,28 @@ fn yy_action_273(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit // file:///./stdlib.mbty // 5| X { Some($1) } -fn yy_action_274(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +fn yy_action_335(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj_List_Parameter_(_dollar1) YYObj_Option_List_Parameter__({(); Some(_dollar1) }) } // file:///./stdlib.mbty // 4| { None } -fn yy_action_275(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +fn yy_action_336(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { YYObj_Option_List_Parameter__({(); None }) } // file:///./stdlib.mbty // 5| X { Some($1) } -fn yy_action_276(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_277(_last_pos, _args[0:1]) +fn yy_action_337(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_338(_last_pos, _args[0:1]) guard _sub_action_0_result is YYObj__StringLiteral__Location_(_dollar1) YYObj_Option__StringLiteral__Location__({(); Some(_dollar1) }) } // file:///./parser.mbty -// 2003| STRING { ($1, mk_loc($sloc)) } -fn yy_action_277(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 2113| STRING { ($1, mk_loc($sloc)) } +fn yy_action_338(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj_StringLiteral(_dollar1) let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } @@ -8986,29 +10911,30 @@ fn yy_action_277(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit // file:///./stdlib.mbty // 4| { None } -fn yy_action_278(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +fn yy_action_339(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { YYObj_Option__StringLiteral__Location__({(); None }) } // file:///./parser.mbty -// 701| attributes visibility "impl" optional_type_parameters type_name "for" type_ "with" option("fn") binder parameters func_return_type impl_body { -// 702| let (ret_ty, err_ty) = $12 -// 703| TopImpl( -// 704| self_ty = Some($7), -// 705| trait_ = $5, -// 706| method_name = $10, -// 707| quantifiers = $4, -// 708| params = $11, -// 709| ret_ty~, -// 710| err_ty~, -// 711| body = $13, -// 712| vis = $2, -// 713| loc = mk_loc($sloc), -// 714| attrs = $1, -// 715| doc = DocString::empty() -// 716| ) -// 717| } -fn yy_action_279(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 712| attributes visibility "impl" optional_type_parameters type_name "for" type_ "with" impl_optional_fn binder parameters func_return_type impl_body { +// 713| let (ret_ty, err_ty) = $12 +// 714| TopImpl( +// 715| self_ty = Some($7), +// 716| trait_ = $5, +// 717| method_name = $10, +// 718| quantifiers = $4, +// 719| method_quantifiers = $9, +// 720| params = $11, +// 721| ret_ty~, +// 722| err_ty~, +// 723| body = $13, +// 724| vis = $2, +// 725| loc = mk_loc($sloc), +// 726| attrs = $1, +// 727| doc = DocString::empty() +// 728| ) +// 729| } +fn yy_action_340(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _sub_action_0_result = yy_action_3(_last_pos, _args[0:0]) let _sub_action_1_result = yy_action_4(_last_pos, _args[0:0]) let _sub_action_2_result = yy_action_15(_args[6].2, _args[7:8]) @@ -9017,6 +10943,7 @@ fn yy_action_279(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit guard _args[2].0 is YYObj_TypeName(_dollar5) guard _sub_action_2_result is YYObj_Binder(_dollar10) guard _args[1].0 is YYObj_List_TypeVarBinder_(_dollar4) + guard _args[6].0 is YYObj_List_TypeVarBinder_(_dollar9) guard _args[8].0 is YYObj_List_Parameter_(_dollar11) guard _args[10].0 is YYObj_DeclBody(_dollar13) guard _sub_action_1_result is YYObj_Visibility(_dollar2) @@ -9030,6 +10957,7 @@ fn yy_action_279(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit trait_ = _dollar5, method_name = _dollar10, quantifiers = _dollar4, + method_quantifiers = _dollar9, params = _dollar11, ret_ty~, err_ty~, @@ -9043,19 +10971,74 @@ fn yy_action_279(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 735| attributes is_declare visibility "impl" optional_type_parameters type_name "for" type_ { -// 736| TopImplRelation( -// 737| self_ty = $8, -// 738| trait_ = $6, -// 739| quantifiers = $5, -// 740| vis = $3, -// 741| attrs = $1, -// 742| loc = mk_loc($sloc), -// 743| doc = DocString::empty(), -// 744| is_declare = $2 -// 745| ) -// 746| } -fn yy_action_280(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 712| attributes visibility "impl" optional_type_parameters type_name "for" type_ "with" impl_optional_fn binder parameters func_return_type impl_body { +// 713| let (ret_ty, err_ty) = $12 +// 714| TopImpl( +// 715| self_ty = Some($7), +// 716| trait_ = $5, +// 717| method_name = $10, +// 718| quantifiers = $4, +// 719| method_quantifiers = $9, +// 720| params = $11, +// 721| ret_ty~, +// 722| err_ty~, +// 723| body = $13, +// 724| vis = $2, +// 725| loc = mk_loc($sloc), +// 726| attrs = $1, +// 727| doc = DocString::empty() +// 728| ) +// 729| } +fn yy_action_341(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_3(_last_pos, _args[0:0]) + let _sub_action_1_result = yy_action_4(_last_pos, _args[0:0]) + let _sub_action_2_result = yy_action_20(_args[6].2, _args[7:8]) + guard _args[9].0 is YYObj__Type___ErrorType_(_dollar12) + guard _args[4].0 is YYObj_Type(_dollar7) + guard _args[2].0 is YYObj_TypeName(_dollar5) + guard _sub_action_2_result is YYObj_Binder(_dollar10) + guard _args[1].0 is YYObj_List_TypeVarBinder_(_dollar4) + guard _args[6].0 is YYObj_List_TypeVarBinder_(_dollar9) + guard _args[8].0 is YYObj_List_Parameter_(_dollar11) + guard _args[10].0 is YYObj_DeclBody(_dollar13) + guard _sub_action_1_result is YYObj_Visibility(_dollar2) + let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) + let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } + guard _sub_action_0_result is YYObj_List_Attribute_(_dollar1) + YYObj_Impl({(); + let (ret_ty, err_ty) = _dollar12 + TopImpl( + self_ty = Some(_dollar7), + trait_ = _dollar5, + method_name = _dollar10, + quantifiers = _dollar4, + method_quantifiers = _dollar9, + params = _dollar11, + ret_ty~, + err_ty~, + body = _dollar13, + vis = _dollar2, + loc = mk_loc((_symbol_start_pos, _end_pos)), + attrs = _dollar1, + doc = DocString::empty() + ) + }) +} + +// file:///./parser.mbty +// 748| attributes is_declare visibility "impl" optional_type_parameters type_name "for" type_ { +// 749| TopImplRelation( +// 750| self_ty = $8, +// 751| trait_ = $6, +// 752| quantifiers = $5, +// 753| vis = $3, +// 754| attrs = $1, +// 755| loc = mk_loc($sloc), +// 756| doc = DocString::empty(), +// 757| is_declare = $2 +// 758| ) +// 759| } +fn yy_action_342(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _sub_action_0_result = yy_action_3(_last_pos, _args[0:0]) let _sub_action_1_result = yy_action_14(_last_pos, _args[0:0]) let _sub_action_2_result = yy_action_4(_last_pos, _args[0:0]) @@ -9082,45 +11065,101 @@ fn yy_action_280(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 414| block_expr { DeclBody(expr = $1) } -fn yy_action_281(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 730| attributes visibility "impl" optional_type_parameters type_name "with" impl_optional_fn binder parameters func_return_type impl_body { +// 731| let (ret_ty, err_ty) = $10 +// 732| TopImpl( +// 733| self_ty = None, +// 734| trait_ = $5, +// 735| method_name = $8, +// 736| quantifiers = $4, +// 737| method_quantifiers = $7, +// 738| params = $9, +// 739| ret_ty~, +// 740| err_ty~, +// 741| body = $11, +// 742| vis = $2, +// 743| loc = mk_loc($sloc), +// 744| attrs = $1, +// 745| doc = DocString::empty() +// 746| ) +// 747| } +fn yy_action_343(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_3(_last_pos, _args[0:0]) + let _sub_action_1_result = yy_action_4(_last_pos, _args[0:0]) + let _sub_action_2_result = yy_action_15(_args[4].2, _args[5:6]) + guard _args[7].0 is YYObj__Type___ErrorType_(_dollar10) + guard _args[2].0 is YYObj_TypeName(_dollar5) + guard _sub_action_2_result is YYObj_Binder(_dollar8) + guard _args[1].0 is YYObj_List_TypeVarBinder_(_dollar4) + guard _args[4].0 is YYObj_List_TypeVarBinder_(_dollar7) + guard _args[6].0 is YYObj_List_Parameter_(_dollar9) + guard _args[8].0 is YYObj_DeclBody(_dollar11) + guard _sub_action_1_result is YYObj_Visibility(_dollar2) + let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) + let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } + guard _sub_action_0_result is YYObj_List_Attribute_(_dollar1) + YYObj_Impl({(); + let (ret_ty, err_ty) = _dollar10 + TopImpl( + self_ty = None, + trait_ = _dollar5, + method_name = _dollar8, + quantifiers = _dollar4, + method_quantifiers = _dollar7, + params = _dollar9, + ret_ty~, + err_ty~, + body = _dollar11, + vis = _dollar2, + loc = mk_loc((_symbol_start_pos, _end_pos)), + attrs = _dollar1, + doc = DocString::empty() + ) + }) +} + +// file:///./parser.mbty +// 425| block_expr { DeclBody(expr = $1) } +fn yy_action_344(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj_Expr(_dollar1) YYObj_DeclBody({(); DeclBody(expr = _dollar1) }) } // file:///./parser.mbty -// 415| "=" STRING { DeclStubs(Embedded(language = None, code = CodeString($2))) } -fn yy_action_282(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 426| "=" STRING { DeclStubs(Embedded(language = None, code = CodeString($2))) } +fn yy_action_345(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[1].0 is YYObj_StringLiteral(_dollar2) YYObj_DeclBody({(); DeclStubs(Embedded(language = None, code = CodeString(_dollar2))) }) } // file:///./parser.mbty -// 718| attributes visibility "impl" optional_type_parameters type_name "with" option("fn") binder parameters func_return_type impl_body { -// 719| let (ret_ty, err_ty) = $10 -// 720| TopImpl( -// 721| self_ty = None, -// 722| trait_ = $5, -// 723| method_name = $8, -// 724| quantifiers = $4, -// 725| params = $9, -// 726| ret_ty~, -// 727| err_ty~, -// 728| body = $11, -// 729| vis = $2, -// 730| loc = mk_loc($sloc), -// 731| attrs = $1, -// 732| doc = DocString::empty() -// 733| ) -// 734| } -fn yy_action_283(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 730| attributes visibility "impl" optional_type_parameters type_name "with" impl_optional_fn binder parameters func_return_type impl_body { +// 731| let (ret_ty, err_ty) = $10 +// 732| TopImpl( +// 733| self_ty = None, +// 734| trait_ = $5, +// 735| method_name = $8, +// 736| quantifiers = $4, +// 737| method_quantifiers = $7, +// 738| params = $9, +// 739| ret_ty~, +// 740| err_ty~, +// 741| body = $11, +// 742| vis = $2, +// 743| loc = mk_loc($sloc), +// 744| attrs = $1, +// 745| doc = DocString::empty() +// 746| ) +// 747| } +fn yy_action_346(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _sub_action_0_result = yy_action_3(_last_pos, _args[0:0]) let _sub_action_1_result = yy_action_4(_last_pos, _args[0:0]) - let _sub_action_2_result = yy_action_15(_args[4].2, _args[5:6]) + let _sub_action_2_result = yy_action_20(_args[4].2, _args[5:6]) guard _args[7].0 is YYObj__Type___ErrorType_(_dollar10) guard _args[2].0 is YYObj_TypeName(_dollar5) guard _sub_action_2_result is YYObj_Binder(_dollar8) guard _args[1].0 is YYObj_List_TypeVarBinder_(_dollar4) + guard _args[4].0 is YYObj_List_TypeVarBinder_(_dollar7) guard _args[6].0 is YYObj_List_Parameter_(_dollar9) guard _args[8].0 is YYObj_DeclBody(_dollar11) guard _sub_action_1_result is YYObj_Visibility(_dollar2) @@ -9134,6 +11173,7 @@ fn yy_action_283(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit trait_ = _dollar5, method_name = _dollar8, quantifiers = _dollar4, + method_quantifiers = _dollar7, params = _dollar9, ret_ty~, err_ty~, @@ -9146,46 +11186,46 @@ fn yy_action_283(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit }) } -// file:///./stdlib.mbty -// 5| X { Some($1) } -fn yy_action_284(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _dollar1 = () - YYObj_Option_Unit_({(); Some(_dollar1) }) +// file:///./parser.mbty +// 794| "fn" optional_type_parameters { $2 } +fn yy_action_347(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[1].0 is YYObj_List_TypeVarBinder_(_dollar2) + YYObj_List_TypeVarBinder_({(); _dollar2 }) } -// file:///./stdlib.mbty -// 4| { None } -fn yy_action_285(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - YYObj_Option_Unit_({(); None }) +// file:///./parser.mbty +// 793| { @list.empty() } +fn yy_action_348(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + YYObj_List_TypeVarBinder_({(); @list.empty() }) } // file:///./parser.mbty -// 292| delimited("[", non_empty_list_commas(id(tvar_binder)), "]") { $1 } -fn yy_action_286(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_287(_last_pos, _args[0:3]) +// 298| delimited("[", non_empty_list_commas(id(tvar_binder)), "]") { $1 } +fn yy_action_349(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_350(_last_pos, _args[0:3]) guard _sub_action_0_result is YYObj_List_TypeVarBinder_(_dollar1) YYObj_List_TypeVarBinder_({(); _dollar1 }) } // file:///./stdlib.mbty // 40| L X R { $2 } -fn yy_action_287(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +fn yy_action_350(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[1].0 is YYObj_List_TypeVarBinder_(_dollar2) YYObj_List_TypeVarBinder_({(); _dollar2 }) } // file:///./parser.mbty -// 198| non_empty_list_commas_rev(X) option(",") { $1.rev() } -fn yy_action_288(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 204| non_empty_list_commas_rev(X) option(",") { $1.rev() } +fn yy_action_351(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj_List_TypeVarBinder_(_dollar1) YYObj_List_TypeVarBinder_({(); _dollar1.rev() }) } // file:///./parser.mbty -// 1944| UIDENT COLON separated_nonempty_list(PLUS, tvar_constraint) { -// 1945| TypeVarBinder::{ name: $1, constraints: $3, name_loc: mk_loc($loc($1)) } -// 1946| } -fn yy_action_289(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 2053| UIDENT COLON separated_nonempty_list(PLUS, tvar_constraint) { +// 2054| TypeVarBinder::{ name: $1, constraints: $3, name_loc: mk_loc($loc($1)) } +// 2055| } +fn yy_action_352(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj_String(_dollar1) guard _args[2].0 is YYObj__list_List_TypeVarConstraint_(_dollar3) let _start_pos_of_item0 = _args[0].1 @@ -9196,8 +11236,8 @@ fn yy_action_289(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 1955| qual_ident_ty { TypeVarConstraint::{ trait_: $1, loc: mk_loc($sloc) } } -fn yy_action_290(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 2064| qual_ident_ty { TypeVarConstraint::{ trait_: $1, loc: mk_loc($sloc) } } +fn yy_action_353(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj_LongIdent(_dollar1) let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } @@ -9206,7 +11246,7 @@ fn yy_action_290(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit // file:///./stdlib.mbty // 60| X SEP separated_nonempty_list(SEP, X) { $3.add($1) } -fn yy_action_291(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +fn yy_action_354(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[2].0 is YYObj__list_List_TypeVarConstraint_(_dollar3) guard _args[0].0 is YYObj_TypeVarConstraint(_dollar1) YYObj__list_List_TypeVarConstraint_({(); _dollar3.add(_dollar1) }) @@ -9214,16 +11254,16 @@ fn yy_action_291(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit // file:///./stdlib.mbty // 59| X { @list.singleton($1) } -fn yy_action_292(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +fn yy_action_355(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj_TypeVarConstraint(_dollar1) YYObj__list_List_TypeVarConstraint_({(); @list.singleton(_dollar1) }) } // file:///./parser.mbty -// 1941| UIDENT { -// 1942| TypeVarBinder::{ name: $1, constraints: @list.empty(), name_loc: mk_loc($loc($1)) } -// 1943| } -fn yy_action_293(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 2050| UIDENT { +// 2051| TypeVarBinder::{ name: $1, constraints: @list.empty(), name_loc: mk_loc($loc($1)) } +// 2052| } +fn yy_action_356(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj_String(_dollar1) let _start_pos_of_item0 = _args[0].1 let _end_pos_of_item0 = _args[0].2 @@ -9233,37 +11273,37 @@ fn yy_action_293(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 190| non_empty_list_commas_rev(X) "," X { $1.add($3) } -fn yy_action_294(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_295(_args[1].2, _args[2:3]) +// 196| non_empty_list_commas_rev(X) "," X { $1.add($3) } +fn yy_action_357(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_358(_args[1].2, _args[2:3]) guard _args[0].0 is YYObj_List_TypeVarBinder_(_dollar1) guard _sub_action_0_result is YYObj_TypeVarBinder(_dollar3) YYObj_List_TypeVarBinder_({(); _dollar1.add(_dollar3) }) } // file:///./parser.mbty -// 189| X { @list.singleton($1) } -fn yy_action_296(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_295(_last_pos, _args[0:1]) +// 195| X { @list.singleton($1) } +fn yy_action_359(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_358(_last_pos, _args[0:1]) guard _sub_action_0_result is YYObj_TypeVarBinder(_dollar1) YYObj_List_TypeVarBinder_({(); @list.singleton(_dollar1) }) } // file:///./parser.mbty -// 255| X { $1 } -fn yy_action_295(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 261| X { $1 } +fn yy_action_358(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj_TypeVarBinder(_dollar1) YYObj_TypeVarBinder({(); _dollar1 }) } // file:///./parser.mbty -// 301| option(type_parameters) { -// 302| match $1 { -// 303| None => @list.empty() -// 304| Some(params) => params -// 305| } -// 306| } -fn yy_action_297(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 307| option(type_parameters) { +// 308| match $1 { +// 309| None => @list.empty() +// 310| Some(params) => params +// 311| } +// 312| } +fn yy_action_360(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj_Option_List_TypeVarBinder__(_dollar1) YYObj_List_TypeVarBinder_({(); match _dollar1 { @@ -9274,24 +11314,24 @@ fn yy_action_297(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 747| attributes visibility "enumview" optional_type_parameters UIDENT "{" list_semis(enum_constructor) "}" "for" type_ "with" binder parameters block_expr { -// 748| TopView( -// 749| quantifiers = $4, -// 750| source_ty = $10, -// 751| view_type_name = $5, -// 752| view_type_loc = mk_loc($loc($5)), -// 753| view_func_name = $12, -// 754| parameters = $13, -// 755| params_loc = mk_loc($loc($13)), -// 756| view_constrs = $7, -// 757| body = $14, -// 758| vis = $2, -// 759| loc = mk_loc($sloc), -// 760| attrs = $1, -// 761| doc = DocString::empty() -// 762| ) -// 763| } -fn yy_action_298(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 760| attributes visibility "enumview" optional_type_parameters UIDENT "{" list_semis(enum_constructor) "}" "for" type_ "with" binder parameters block_expr { +// 761| TopView( +// 762| quantifiers = $4, +// 763| source_ty = $10, +// 764| view_type_name = $5, +// 765| view_type_loc = mk_loc($loc($5)), +// 766| view_func_name = $12, +// 767| parameters = $13, +// 768| params_loc = mk_loc($loc($13)), +// 769| view_constrs = $7, +// 770| body = $14, +// 771| vis = $2, +// 772| loc = mk_loc($sloc), +// 773| attrs = $1, +// 774| doc = DocString::empty() +// 775| ) +// 776| } +fn yy_action_361(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _sub_action_0_result = yy_action_3(_last_pos, _args[0:0]) let _sub_action_1_result = yy_action_4(_last_pos, _args[0:0]) let _sub_action_2_result = yy_action_15(_args[8].2, _args[9:10]) @@ -9330,58 +11370,114 @@ fn yy_action_298(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 251| non_empty_list_semis(X) { $1 } -fn yy_action_299(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[0].0 is YYObj_List_ConstrDecl_(_dollar1) - YYObj_List_ConstrDecl_({(); _dollar1 }) -} - -// file:///./parser.mbty -// 2302| attributes UIDENT option(delimited("(", non_empty_list_commas(constructor_param), ")")) option(eq_int_tag) { -// 2303| ConstrDecl::{ -// 2304| name: ConstrName::{ name: $2, loc: mk_loc($loc($2)) }, -// 2305| args: $3, -// 2306| tag: $4, -// 2307| loc: mk_loc($sloc), -// 2308| attrs: $1, -// 2309| doc: DocString::empty() -// 2310| } -// 2311| } -fn yy_action_300(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 760| attributes visibility "enumview" optional_type_parameters UIDENT "{" list_semis(enum_constructor) "}" "for" type_ "with" binder parameters block_expr { +// 761| TopView( +// 762| quantifiers = $4, +// 763| source_ty = $10, +// 764| view_type_name = $5, +// 765| view_type_loc = mk_loc($loc($5)), +// 766| view_func_name = $12, +// 767| parameters = $13, +// 768| params_loc = mk_loc($loc($13)), +// 769| view_constrs = $7, +// 770| body = $14, +// 771| vis = $2, +// 772| loc = mk_loc($sloc), +// 773| attrs = $1, +// 774| doc = DocString::empty() +// 775| ) +// 776| } +fn yy_action_362(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _sub_action_0_result = yy_action_3(_last_pos, _args[0:0]) - guard _args[0].0 is YYObj_String(_dollar2) - let _start_pos_of_item1 = _args[0].1 - let _end_pos_of_item1 = _args[0].2 - guard _args[1].0 is YYObj_Option_List_ConstrParam__(_dollar3) - guard _args[2].0 is YYObj_Option__String__Location__(_dollar4) + let _sub_action_1_result = yy_action_4(_last_pos, _args[0:0]) + let _sub_action_2_result = yy_action_20(_args[8].2, _args[9:10]) + guard _args[1].0 is YYObj_List_TypeVarBinder_(_dollar4) + guard _args[7].0 is YYObj_Type(_dollar10) + guard _args[2].0 is YYObj_String(_dollar5) + let _start_pos_of_item4 = _args[2].1 + let _end_pos_of_item4 = _args[2].2 + guard _sub_action_2_result is YYObj_Binder(_dollar12) + guard _args[10].0 is YYObj_List_Parameter_(_dollar13) + let _start_pos_of_item12 = _args[10].1 + let _end_pos_of_item12 = _args[10].2 + guard _args[4].0 is YYObj_List_ConstrDecl_(_dollar7) + guard _args[11].0 is YYObj_Expr(_dollar14) + guard _sub_action_1_result is YYObj_Visibility(_dollar2) let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } guard _sub_action_0_result is YYObj_List_Attribute_(_dollar1) - YYObj_ConstrDecl({(); - ConstrDecl::{ - name: ConstrName::{ name: _dollar2, loc: mk_loc((_start_pos_of_item1, _end_pos_of_item1)) }, - args: _dollar3, - tag: _dollar4, - loc: mk_loc((_symbol_start_pos, _end_pos)), - attrs: _dollar1, - doc: DocString::empty() - } - }) + YYObj_Impl({(); + TopView( + quantifiers = _dollar4, + source_ty = _dollar10, + view_type_name = _dollar5, + view_type_loc = mk_loc((_start_pos_of_item4, _end_pos_of_item4)), + view_func_name = _dollar12, + parameters = _dollar13, + params_loc = mk_loc((_start_pos_of_item12, _end_pos_of_item12)), + view_constrs = _dollar7, + body = _dollar14, + vis = _dollar2, + loc = mk_loc((_symbol_start_pos, _end_pos)), + attrs = _dollar1, + doc = DocString::empty() + ) + }) } // file:///./parser.mbty -// 2302| attributes UIDENT option(delimited("(", non_empty_list_commas(constructor_param), ")")) option(eq_int_tag) { -// 2303| ConstrDecl::{ -// 2304| name: ConstrName::{ name: $2, loc: mk_loc($loc($2)) }, -// 2305| args: $3, -// 2306| tag: $4, -// 2307| loc: mk_loc($sloc), -// 2308| attrs: $1, -// 2309| doc: DocString::empty() -// 2310| } -// 2311| } -fn yy_action_301(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_54(_last_pos, _args[0:1]) +// 257| non_empty_list_semis(X) { $1 } +fn yy_action_363(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj_List_ConstrDecl_(_dollar1) + YYObj_List_ConstrDecl_({(); _dollar1 }) +} + +// file:///./parser.mbty +// 2412| attributes UIDENT option(delimited("(", non_empty_list_commas(constructor_param), ")")) option(eq_int_tag) { +// 2413| ConstrDecl::{ +// 2414| name: ConstrName::{ name: $2, loc: mk_loc($loc($2)) }, +// 2415| args: $3, +// 2416| tag: $4, +// 2417| loc: mk_loc($sloc), +// 2418| attrs: $1, +// 2419| doc: DocString::empty() +// 2420| } +// 2421| } +fn yy_action_364(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_3(_last_pos, _args[0:0]) + guard _args[0].0 is YYObj_String(_dollar2) + let _start_pos_of_item1 = _args[0].1 + let _end_pos_of_item1 = _args[0].2 + guard _args[1].0 is YYObj_Option_List_ConstrParam__(_dollar3) + guard _args[2].0 is YYObj_Option__String__Location__(_dollar4) + let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) + let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } + guard _sub_action_0_result is YYObj_List_Attribute_(_dollar1) + YYObj_ConstrDecl({(); + ConstrDecl::{ + name: ConstrName::{ name: _dollar2, loc: mk_loc((_start_pos_of_item1, _end_pos_of_item1)) }, + args: _dollar3, + tag: _dollar4, + loc: mk_loc((_symbol_start_pos, _end_pos)), + attrs: _dollar1, + doc: DocString::empty() + } + }) +} + +// file:///./parser.mbty +// 2412| attributes UIDENT option(delimited("(", non_empty_list_commas(constructor_param), ")")) option(eq_int_tag) { +// 2413| ConstrDecl::{ +// 2414| name: ConstrName::{ name: $2, loc: mk_loc($loc($2)) }, +// 2415| args: $3, +// 2416| tag: $4, +// 2417| loc: mk_loc($sloc), +// 2418| attrs: $1, +// 2419| doc: DocString::empty() +// 2420| } +// 2421| } +fn yy_action_365(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_65(_last_pos, _args[0:1]) guard _args[1].0 is YYObj_String(_dollar2) let _start_pos_of_item1 = _args[1].1 let _end_pos_of_item1 = _args[1].2 @@ -9403,23 +11499,23 @@ fn yy_action_301(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 781| non_empty_list(attribute) { $1 } -fn yy_action_54(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 799| non_empty_list(attribute) { $1 } +fn yy_action_65(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj_List_Attribute_(_dollar1) YYObj_List_Attribute_({(); _dollar1 }) } // file:///./stdlib.mbty // 5| X { Some($1) } -fn yy_action_302(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_303(_last_pos, _args[0:2]) +fn yy_action_366(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_367(_last_pos, _args[0:2]) guard _sub_action_0_result is YYObj__String__Location_(_dollar1) YYObj_Option__String__Location__({(); Some(_dollar1) }) } // file:///./parser.mbty -// 2315| "=" INT { ($2, mk_loc($loc($2))) } -fn yy_action_303(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 2425| "=" INT { ($2, mk_loc($loc($2))) } +fn yy_action_367(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[1].0 is YYObj_String(_dollar2) let _start_pos_of_item1 = _args[1].1 let _end_pos_of_item1 = _args[1].2 @@ -9428,19 +11524,19 @@ fn yy_action_303(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit // file:///./stdlib.mbty // 4| { None } -fn yy_action_304(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +fn yy_action_368(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { YYObj_Option__String__Location__({(); None }) } // file:///./parser.mbty -// 2284| option("mut") type_ { -// 2285| ConstrParam::{ -// 2286| ty: $2, -// 2287| mut_: $1 is Some(_), -// 2288| label: None -// 2289| } -// 2290| } -fn yy_action_305(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 2394| option("mut") type_ { +// 2395| ConstrParam::{ +// 2396| ty: $2, +// 2397| mut_: $1 is Some(_), +// 2398| label: None +// 2399| } +// 2400| } +fn yy_action_369(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[1].0 is YYObj_Type(_dollar2) guard _args[0].0 is YYObj_Option_Unit_(_dollar1) YYObj_ConstrParam({(); @@ -9453,15 +11549,15 @@ fn yy_action_305(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 2291| option("mut") POST_LABEL ":" type_ { -// 2292| let label = Label::{ name: $2, loc: mk_loc($loc($2)).trim_last_char() } -// 2293| ConstrParam::{ -// 2294| ty: $4, -// 2295| mut_: $1 is Some(_), -// 2296| label: Some(label) -// 2297| } -// 2298| } -fn yy_action_306(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 2401| option("mut") POST_LABEL ":" type_ { +// 2402| let label = Label::{ name: $2, loc: mk_loc($loc($2)).trim_last_char() } +// 2403| ConstrParam::{ +// 2404| ty: $4, +// 2405| mut_: $1 is Some(_), +// 2406| label: Some(label) +// 2407| } +// 2408| } +fn yy_action_370(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[1].0 is YYObj_String(_dollar2) let _start_pos_of_item1 = _args[1].1 let _end_pos_of_item1 = _args[1].2 @@ -9479,109 +11575,109 @@ fn yy_action_306(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit // file:///./stdlib.mbty // 5| X { Some($1) } -fn yy_action_307(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +fn yy_action_371(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _dollar1 = () YYObj_Option_Unit_({(); Some(_dollar1) }) } // file:///./parser.mbty -// 190| non_empty_list_commas_rev(X) "," X { $1.add($3) } -fn yy_action_308(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 196| non_empty_list_commas_rev(X) "," X { $1.add($3) } +fn yy_action_372(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj_List_ConstrParam_(_dollar1) guard _args[2].0 is YYObj_ConstrParam(_dollar3) YYObj_List_ConstrParam_({(); _dollar1.add(_dollar3) }) } // file:///./parser.mbty -// 198| non_empty_list_commas_rev(X) option(",") { $1.rev() } -fn yy_action_309(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 204| non_empty_list_commas_rev(X) option(",") { $1.rev() } +fn yy_action_373(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj_List_ConstrParam_(_dollar1) YYObj_List_ConstrParam_({(); _dollar1.rev() }) } // file:///./stdlib.mbty // 5| X { Some($1) } -fn yy_action_310(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_311(_last_pos, _args[0:3]) +fn yy_action_374(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_375(_last_pos, _args[0:3]) guard _sub_action_0_result is YYObj_List_ConstrParam_(_dollar1) YYObj_Option_List_ConstrParam__({(); Some(_dollar1) }) } // file:///./stdlib.mbty // 40| L X R { $2 } -fn yy_action_311(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +fn yy_action_375(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[1].0 is YYObj_List_ConstrParam_(_dollar2) YYObj_List_ConstrParam_({(); _dollar2 }) } // file:///./parser.mbty -// 189| X { @list.singleton($1) } -fn yy_action_312(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 195| X { @list.singleton($1) } +fn yy_action_376(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj_ConstrParam(_dollar1) YYObj_List_ConstrParam_({(); @list.singleton(_dollar1) }) } // file:///./stdlib.mbty // 4| { None } -fn yy_action_313(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +fn yy_action_377(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { YYObj_Option_Unit_({(); None }) } // file:///./stdlib.mbty // 4| { None } -fn yy_action_314(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +fn yy_action_378(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { YYObj_Option_List_ConstrParam__({(); None }) } // file:///./parser.mbty -// 241| X SEMI non_empty_list_semis(X) { $3.add($1) } -fn yy_action_315(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 247| X SEMI non_empty_list_semis(X) { $3.add($1) } +fn yy_action_379(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[2].0 is YYObj_List_ConstrDecl_(_dollar3) guard _args[0].0 is YYObj_ConstrDecl(_dollar1) YYObj_List_ConstrDecl_({(); _dollar3.add(_dollar1) }) } // file:///./parser.mbty -// 240| X option(SEMI) { @list.singleton($1) } -fn yy_action_316(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 246| X option(SEMI) { @list.singleton($1) } +fn yy_action_380(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj_ConstrDecl(_dollar1) YYObj_List_ConstrDecl_({(); @list.singleton(_dollar1) }) } // file:///./parser.mbty -// 250| { @list.empty() } -fn yy_action_317(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 256| { @list.empty() } +fn yy_action_381(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { YYObj_List_ConstrDecl_({(); @list.empty() }) } // file:///./stdlib.mbty // 5| X { Some($1) } -fn yy_action_318(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +fn yy_action_382(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj_List_TypeVarBinder_(_dollar1) YYObj_Option_List_TypeVarBinder__({(); Some(_dollar1) }) } // file:///./stdlib.mbty // 4| { None } -fn yy_action_319(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +fn yy_action_383(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { YYObj_Option_List_TypeVarBinder__({(); None }) } // file:///./parser.mbty -// 764| attributes visibility "using" PACKAGE_NAME "{" list_commas(using_binder) "}" { -// 765| TopUsing( -// 766| pkg = { -// 767| name : $4, -// 768| loc : mk_loc($loc($4)) -// 769| }, -// 770| names = $6, -// 771| vis = $2, -// 772| attrs = $1, -// 773| loc = mk_loc($loc), -// 774| doc = DocString::empty() -// 775| ) -// 776| } -fn yy_action_320(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 777| attributes visibility "using" PACKAGE_NAME "{" list_commas(using_binder) "}" { +// 778| TopUsing( +// 779| pkg = { +// 780| name : $4, +// 781| loc : mk_loc($loc($4)) +// 782| }, +// 783| names = $6, +// 784| vis = $2, +// 785| attrs = $1, +// 786| loc = mk_loc($loc), +// 787| doc = DocString::empty() +// 788| ) +// 789| } +fn yy_action_384(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _sub_action_0_result = yy_action_3(_last_pos, _args[0:0]) let _sub_action_1_result = yy_action_4(_last_pos, _args[0:0]) guard _args[1].0 is YYObj_String(_dollar4) @@ -9608,30 +11704,31 @@ fn yy_action_320(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 207| non_empty_list_commas(X) { $1 } -fn yy_action_321(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 213| non_empty_list_commas(X) { $1 } +fn yy_action_385(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj_List__AliasTarget__UsingKind__(_dollar1) YYObj_List__AliasTarget__UsingKind__({(); _dollar1 }) } // file:///./parser.mbty -// 917| LIDENT "as" LIDENT -// 918| | UIDENT "as" UIDENT { -// 919| let binder = Binder::{ -// 920| name : $3, -// 921| loc : mk_loc($loc($3)) -// 922| } -// 923| let target = Label::{ -// 924| name : $1, -// 925| loc : mk_loc($loc($1)) -// 926| } -// 927| ({ binder, target : Some(target) }, UsingKind::Value) -// 928| } -fn yy_action_322(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[2].0 is YYObj_String(_dollar3) +// 941| lident_string "as" lident_string { +// 942| let binder = Binder::{ +// 943| name : $3, +// 944| loc : mk_loc($loc($3)) +// 945| } +// 946| let target = Label::{ +// 947| name : $1, +// 948| loc : mk_loc($loc($1)) +// 949| } +// 950| ({ binder, target : Some(target) }, UsingKind::Value) +// 951| } +fn yy_action_386(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_226(_last_pos, _args[0:1]) + let _sub_action_1_result = yy_action_226(_args[1].2, _args[2:3]) + guard _sub_action_1_result is YYObj_String(_dollar3) let _start_pos_of_item2 = _args[2].1 let _end_pos_of_item2 = _args[2].2 - guard _args[0].0 is YYObj_String(_dollar1) + guard _sub_action_0_result is YYObj_String(_dollar1) let _start_pos_of_item0 = _args[0].1 let _end_pos_of_item0 = _args[0].2 YYObj__AliasTarget__UsingKind_({(); @@ -9648,40 +11745,164 @@ fn yy_action_322(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 909| LIDENT -// 910| | UIDENT { -// 911| let binder = Binder::{ -// 912| name : $1, -// 913| loc : mk_loc($loc) -// 914| } -// 915| ({ binder, target : None }, UsingKind::Value) -// 916| } -fn yy_action_323(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[0].0 is YYObj_String(_dollar1) - let _start_pos = if _args.length() == 0 { _last_pos } else { _args[0].1 } - let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } +// 941| lident_string "as" lident_string { +// 942| let binder = Binder::{ +// 943| name : $3, +// 944| loc : mk_loc($loc($3)) +// 945| } +// 946| let target = Label::{ +// 947| name : $1, +// 948| loc : mk_loc($loc($1)) +// 949| } +// 950| ({ binder, target : Some(target) }, UsingKind::Value) +// 951| } +fn yy_action_387(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_226(_last_pos, _args[0:1]) + let _sub_action_1_result = yy_action_228(_args[1].2, _args[2:3]) + guard _sub_action_1_result is YYObj_String(_dollar3) + let _start_pos_of_item2 = _args[2].1 + let _end_pos_of_item2 = _args[2].2 + guard _sub_action_0_result is YYObj_String(_dollar1) + let _start_pos_of_item0 = _args[0].1 + let _end_pos_of_item0 = _args[0].2 + YYObj__AliasTarget__UsingKind_({(); + let binder = Binder::{ + name : _dollar3, + loc : mk_loc((_start_pos_of_item2, _end_pos_of_item2)) + } + let target = Label::{ + name : _dollar1, + loc : mk_loc((_start_pos_of_item0, _end_pos_of_item0)) + } + ({ binder, target : Some(target) }, UsingKind::Value) + }) +} + +// file:///./parser.mbty +// 927| lident_string { +// 928| let binder = Binder::{ +// 929| name : $1, +// 930| loc : mk_loc($loc($1)) +// 931| } +// 932| ({ binder, target : None }, UsingKind::Value) +// 933| } +fn yy_action_388(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_226(_last_pos, _args[0:1]) + guard _sub_action_0_result is YYObj_String(_dollar1) + let _start_pos_of_item0 = _args[0].1 + let _end_pos_of_item0 = _args[0].2 YYObj__AliasTarget__UsingKind_({(); let binder = Binder::{ name : _dollar1, - loc : mk_loc((_start_pos, _end_pos)) + loc : mk_loc((_start_pos_of_item0, _end_pos_of_item0)) } ({ binder, target : None }, UsingKind::Value) }) } // file:///./parser.mbty -// 918| UIDENT "as" UIDENT { -// 919| let binder = Binder::{ -// 920| name : $3, -// 921| loc : mk_loc($loc($3)) -// 922| } -// 923| let target = Label::{ -// 924| name : $1, -// 925| loc : mk_loc($loc($1)) -// 926| } -// 927| ({ binder, target : Some(target) }, UsingKind::Value) -// 928| } -fn yy_action_324(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 941| lident_string "as" lident_string { +// 942| let binder = Binder::{ +// 943| name : $3, +// 944| loc : mk_loc($loc($3)) +// 945| } +// 946| let target = Label::{ +// 947| name : $1, +// 948| loc : mk_loc($loc($1)) +// 949| } +// 950| ({ binder, target : Some(target) }, UsingKind::Value) +// 951| } +fn yy_action_389(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_228(_last_pos, _args[0:1]) + let _sub_action_1_result = yy_action_226(_args[1].2, _args[2:3]) + guard _sub_action_1_result is YYObj_String(_dollar3) + let _start_pos_of_item2 = _args[2].1 + let _end_pos_of_item2 = _args[2].2 + guard _sub_action_0_result is YYObj_String(_dollar1) + let _start_pos_of_item0 = _args[0].1 + let _end_pos_of_item0 = _args[0].2 + YYObj__AliasTarget__UsingKind_({(); + let binder = Binder::{ + name : _dollar3, + loc : mk_loc((_start_pos_of_item2, _end_pos_of_item2)) + } + let target = Label::{ + name : _dollar1, + loc : mk_loc((_start_pos_of_item0, _end_pos_of_item0)) + } + ({ binder, target : Some(target) }, UsingKind::Value) + }) +} + +// file:///./parser.mbty +// 941| lident_string "as" lident_string { +// 942| let binder = Binder::{ +// 943| name : $3, +// 944| loc : mk_loc($loc($3)) +// 945| } +// 946| let target = Label::{ +// 947| name : $1, +// 948| loc : mk_loc($loc($1)) +// 949| } +// 950| ({ binder, target : Some(target) }, UsingKind::Value) +// 951| } +fn yy_action_390(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_228(_last_pos, _args[0:1]) + let _sub_action_1_result = yy_action_228(_args[1].2, _args[2:3]) + guard _sub_action_1_result is YYObj_String(_dollar3) + let _start_pos_of_item2 = _args[2].1 + let _end_pos_of_item2 = _args[2].2 + guard _sub_action_0_result is YYObj_String(_dollar1) + let _start_pos_of_item0 = _args[0].1 + let _end_pos_of_item0 = _args[0].2 + YYObj__AliasTarget__UsingKind_({(); + let binder = Binder::{ + name : _dollar3, + loc : mk_loc((_start_pos_of_item2, _end_pos_of_item2)) + } + let target = Label::{ + name : _dollar1, + loc : mk_loc((_start_pos_of_item0, _end_pos_of_item0)) + } + ({ binder, target : Some(target) }, UsingKind::Value) + }) +} + +// file:///./parser.mbty +// 927| lident_string { +// 928| let binder = Binder::{ +// 929| name : $1, +// 930| loc : mk_loc($loc($1)) +// 931| } +// 932| ({ binder, target : None }, UsingKind::Value) +// 933| } +fn yy_action_391(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_228(_last_pos, _args[0:1]) + guard _sub_action_0_result is YYObj_String(_dollar1) + let _start_pos_of_item0 = _args[0].1 + let _end_pos_of_item0 = _args[0].2 + YYObj__AliasTarget__UsingKind_({(); + let binder = Binder::{ + name : _dollar1, + loc : mk_loc((_start_pos_of_item0, _end_pos_of_item0)) + } + ({ binder, target : None }, UsingKind::Value) + }) +} + +// file:///./parser.mbty +// 952| UIDENT "as" UIDENT { +// 953| let binder = Binder::{ +// 954| name : $3, +// 955| loc : mk_loc($loc($3)) +// 956| } +// 957| let target = Label::{ +// 958| name : $1, +// 959| loc : mk_loc($loc($1)) +// 960| } +// 961| ({ binder, target : Some(target) }, UsingKind::Value) +// 962| } +fn yy_action_392(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[2].0 is YYObj_String(_dollar3) let _start_pos_of_item2 = _args[2].1 let _end_pos_of_item2 = _args[2].2 @@ -9702,14 +11923,14 @@ fn yy_action_324(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 910| UIDENT { -// 911| let binder = Binder::{ -// 912| name : $1, -// 913| loc : mk_loc($loc) -// 914| } -// 915| ({ binder, target : None }, UsingKind::Value) -// 916| } -fn yy_action_325(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 934| UIDENT { +// 935| let binder = Binder::{ +// 936| name : $1, +// 937| loc : mk_loc($loc) +// 938| } +// 939| ({ binder, target : None }, UsingKind::Value) +// 940| } +fn yy_action_393(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj_String(_dollar1) let _start_pos = if _args.length() == 0 { _last_pos } else { _args[0].1 } let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } @@ -9723,18 +11944,18 @@ fn yy_action_325(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 936| "type" UIDENT "as" UIDENT { -// 937| let binder = Binder::{ -// 938| name : $4, -// 939| loc : mk_loc($loc($4)) -// 940| } -// 941| let target = Label::{ -// 942| name : $2, -// 943| loc : mk_loc($loc($2)) -// 944| } -// 945| ({ binder, target : Some(target) }, UsingKind::Type) -// 946| } -fn yy_action_326(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 970| "type" UIDENT "as" UIDENT { +// 971| let binder = Binder::{ +// 972| name : $4, +// 973| loc : mk_loc($loc($4)) +// 974| } +// 975| let target = Label::{ +// 976| name : $2, +// 977| loc : mk_loc($loc($2)) +// 978| } +// 979| ({ binder, target : Some(target) }, UsingKind::Type) +// 980| } +fn yy_action_394(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[3].0 is YYObj_String(_dollar4) let _start_pos_of_item3 = _args[3].1 let _end_pos_of_item3 = _args[3].2 @@ -9755,14 +11976,14 @@ fn yy_action_326(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 929| "type" UIDENT { -// 930| let binder = Binder::{ -// 931| name : $2, -// 932| loc : mk_loc($loc($2)) -// 933| } -// 934| ({ binder, target : None }, UsingKind::Type) -// 935| } -fn yy_action_327(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 963| "type" UIDENT { +// 964| let binder = Binder::{ +// 965| name : $2, +// 966| loc : mk_loc($loc($2)) +// 967| } +// 968| ({ binder, target : None }, UsingKind::Type) +// 969| } +fn yy_action_395(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[1].0 is YYObj_String(_dollar2) let _start_pos_of_item1 = _args[1].1 let _end_pos_of_item1 = _args[1].2 @@ -9776,18 +11997,18 @@ fn yy_action_327(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 954| "trait" UIDENT "as" UIDENT { -// 955| let binder = Binder::{ -// 956| name : $4, -// 957| loc : mk_loc($loc($4)) -// 958| } -// 959| let target = Label::{ -// 960| name : $2, -// 961| loc : mk_loc($loc($2)) -// 962| } -// 963| ({ binder, target : Some(target) }, UsingKind::Trait) -// 964| } -fn yy_action_328(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 988| "trait" UIDENT "as" UIDENT { +// 989| let binder = Binder::{ +// 990| name : $4, +// 991| loc : mk_loc($loc($4)) +// 992| } +// 993| let target = Label::{ +// 994| name : $2, +// 995| loc : mk_loc($loc($2)) +// 996| } +// 997| ({ binder, target : Some(target) }, UsingKind::Trait) +// 998| } +fn yy_action_396(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[3].0 is YYObj_String(_dollar4) let _start_pos_of_item3 = _args[3].1 let _end_pos_of_item3 = _args[3].2 @@ -9808,14 +12029,14 @@ fn yy_action_328(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 947| "trait" UIDENT { -// 948| let binder = Binder::{ -// 949| name : $2, -// 950| loc : mk_loc($loc($2)) -// 951| } -// 952| ({ binder, target : None }, UsingKind::Trait) -// 953| } -fn yy_action_329(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 981| "trait" UIDENT { +// 982| let binder = Binder::{ +// 983| name : $2, +// 984| loc : mk_loc($loc($2)) +// 985| } +// 986| ({ binder, target : None }, UsingKind::Trait) +// 987| } +fn yy_action_397(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[1].0 is YYObj_String(_dollar2) let _start_pos_of_item1 = _args[1].1 let _end_pos_of_item1 = _args[1].2 @@ -9829,38 +12050,38 @@ fn yy_action_329(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 190| non_empty_list_commas_rev(X) "," X { $1.add($3) } -fn yy_action_330(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 196| non_empty_list_commas_rev(X) "," X { $1.add($3) } +fn yy_action_398(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj_List__AliasTarget__UsingKind__(_dollar1) guard _args[2].0 is YYObj__AliasTarget__UsingKind_(_dollar3) YYObj_List__AliasTarget__UsingKind__({(); _dollar1.add(_dollar3) }) } // file:///./parser.mbty -// 198| non_empty_list_commas_rev(X) option(",") { $1.rev() } -fn yy_action_331(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 204| non_empty_list_commas_rev(X) option(",") { $1.rev() } +fn yy_action_399(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj_List__AliasTarget__UsingKind__(_dollar1) YYObj_List__AliasTarget__UsingKind__({(); _dollar1.rev() }) } // file:///./parser.mbty -// 189| X { @list.singleton($1) } -fn yy_action_332(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 195| X { @list.singleton($1) } +fn yy_action_400(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj__AliasTarget__UsingKind_(_dollar1) YYObj_List__AliasTarget__UsingKind__({(); @list.singleton(_dollar1) }) } // file:///./parser.mbty -// 206| { @list.empty() } -fn yy_action_333(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 212| { @list.empty() } +fn yy_action_401(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { YYObj_List__AliasTarget__UsingKind__({(); @list.empty() }) } // file:///./parser.mbty -// 805| attributes is_declare visibility "type" UIDENT optional_type_parameters_no_constraints { -// 806| ($1, $3, $2, $5, mk_loc($loc($5)), $6) -// 807| } -fn yy_action_334(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 823| attributes is_declare visibility "type" UIDENT optional_type_parameters_no_constraints { +// 824| ($1, $3, $2, $5, mk_loc($loc($5)), $6) +// 825| } +fn yy_action_402(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _sub_action_0_result = yy_action_3(_last_pos, _args[0:0]) let _sub_action_1_result = yy_action_14(_last_pos, _args[0:0]) let _sub_action_2_result = yy_action_4(_last_pos, _args[0:0]) @@ -9877,8 +12098,8 @@ fn yy_action_334(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 811| attributes is_declare visibility "suberror" UIDENT { ($1, $3, $2, $5, mk_loc($loc($5))) } -fn yy_action_335(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 829| attributes is_declare visibility "suberror" UIDENT { ($1, $3, $2, $5, mk_loc($loc($5))) } +fn yy_action_403(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _sub_action_0_result = yy_action_3(_last_pos, _args[0:0]) let _sub_action_1_result = yy_action_14(_last_pos, _args[0:0]) let _sub_action_2_result = yy_action_4(_last_pos, _args[0:0]) @@ -9892,16 +12113,16 @@ fn yy_action_335(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 802| { false } +// 820| { false } fn yy_action_14(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { YYObj_Bool({(); false }) } // file:///./parser.mbty -// 815| attributes visibility "struct" UIDENT optional_type_parameters_no_constraints { -// 816| ($1, $2, $4, mk_loc($loc($4)), $5) -// 817| } -fn yy_action_336(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 833| attributes visibility "struct" UIDENT optional_type_parameters_no_constraints { +// 834| ($1, $2, $4, mk_loc($loc($4)), $5) +// 835| } +fn yy_action_404(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _sub_action_0_result = yy_action_3(_last_pos, _args[0:0]) let _sub_action_1_result = yy_action_4(_last_pos, _args[0:0]) guard _sub_action_0_result is YYObj_List_Attribute_(_dollar1) @@ -9916,13 +12137,13 @@ fn yy_action_336(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 310| option(delimited("[", non_empty_list_commas(id(type_decl_binder)), "]")) { -// 311| match $1 { -// 312| None => @list.empty() -// 313| Some(params) => params -// 314| } -// 315| } -fn yy_action_337(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 316| option(delimited("[", non_empty_list_commas(id(type_decl_binder)), "]")) { +// 317| match $1 { +// 318| None => @list.empty() +// 319| Some(params) => params +// 320| } +// 321| } +fn yy_action_405(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj_Option_List_TypeDeclBinder__(_dollar1) YYObj_List_TypeDeclBinder_({(); match _dollar1 { @@ -9933,10 +12154,10 @@ fn yy_action_337(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 821| attributes visibility "enum" UIDENT optional_type_parameters_no_constraints { -// 822| ($1, $2, $4, mk_loc($loc($4)), $5) -// 823| } -fn yy_action_338(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 839| attributes visibility "enum" UIDENT optional_type_parameters_no_constraints { +// 840| ($1, $2, $4, mk_loc($loc($4)), $5) +// 841| } +fn yy_action_406(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _sub_action_0_result = yy_action_3(_last_pos, _args[0:0]) let _sub_action_1_result = yy_action_4(_last_pos, _args[0:0]) guard _sub_action_0_result is YYObj_List_Attribute_(_dollar1) @@ -9951,27 +12172,27 @@ fn yy_action_338(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 789| { Default } +// 807| { Default } fn yy_action_4(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { YYObj_Visibility({(); Default }) } // file:///./parser.mbty -// 780| { @list.empty() } +// 798| { @list.empty() } fn yy_action_3(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { YYObj_List_Attribute_({(); @list.empty() }) } // file:///./parser.mbty -// 198| non_empty_list_commas_rev(X) option(",") { $1.rev() } -fn yy_action_339(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 204| non_empty_list_commas_rev(X) option(",") { $1.rev() } +fn yy_action_407(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj_List_TypeDeclBinder_(_dollar1) YYObj_List_TypeDeclBinder_({(); _dollar1.rev() }) } // file:///./parser.mbty -// 1950| UIDENT { TypeDeclBinder::{ name: Some($1), loc: mk_loc($sloc) } } -fn yy_action_340(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 2059| UIDENT { TypeDeclBinder::{ name: Some($1), loc: mk_loc($sloc) } } +fn yy_action_408(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj_String(_dollar1) let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } @@ -9979,17 +12200,17 @@ fn yy_action_340(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 1951| "_" { TypeDeclBinder::{ name: None, loc: mk_loc($sloc) } } -fn yy_action_341(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 2060| "_" { TypeDeclBinder::{ name: None, loc: mk_loc($sloc) } } +fn yy_action_409(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } YYObj_TypeDeclBinder({(); TypeDeclBinder::{ name: None, loc: mk_loc((_symbol_start_pos, _end_pos)) } }) } // file:///./parser.mbty -// 190| non_empty_list_commas_rev(X) "," X { $1.add($3) } -fn yy_action_342(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_343(_args[1].2, _args[2:3]) +// 196| non_empty_list_commas_rev(X) "," X { $1.add($3) } +fn yy_action_410(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_411(_args[1].2, _args[2:3]) guard _args[0].0 is YYObj_List_TypeDeclBinder_(_dollar1) guard _sub_action_0_result is YYObj_TypeDeclBinder(_dollar3) YYObj_List_TypeDeclBinder_({(); _dollar1.add(_dollar3) }) @@ -9997,60 +12218,60 @@ fn yy_action_342(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit // file:///./stdlib.mbty // 5| X { Some($1) } -fn yy_action_344(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_345(_last_pos, _args[0:3]) +fn yy_action_412(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_413(_last_pos, _args[0:3]) guard _sub_action_0_result is YYObj_List_TypeDeclBinder_(_dollar1) YYObj_Option_List_TypeDeclBinder__({(); Some(_dollar1) }) } // file:///./stdlib.mbty // 40| L X R { $2 } -fn yy_action_345(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +fn yy_action_413(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[1].0 is YYObj_List_TypeDeclBinder_(_dollar2) YYObj_List_TypeDeclBinder_({(); _dollar2 }) } // file:///./parser.mbty -// 189| X { @list.singleton($1) } -fn yy_action_346(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_343(_last_pos, _args[0:1]) +// 195| X { @list.singleton($1) } +fn yy_action_414(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_411(_last_pos, _args[0:1]) guard _sub_action_0_result is YYObj_TypeDeclBinder(_dollar1) YYObj_List_TypeDeclBinder_({(); @list.singleton(_dollar1) }) } // file:///./parser.mbty -// 255| X { $1 } -fn yy_action_343(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 261| X { $1 } +fn yy_action_411(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj_TypeDeclBinder(_dollar1) YYObj_TypeDeclBinder({(); _dollar1 }) } // file:///./stdlib.mbty // 4| { None } -fn yy_action_347(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +fn yy_action_415(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { YYObj_Option_List_TypeDeclBinder__({(); None }) } // file:///./parser.mbty -// 185| X non_empty_list(X) { $2.add($1) } -fn yy_action_348(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_349(_last_pos, _args[0:1]) +// 191| X non_empty_list(X) { $2.add($1) } +fn yy_action_416(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_417(_last_pos, _args[0:1]) guard _args[1].0 is YYObj_List_Attribute_(_dollar2) guard _sub_action_0_result is YYObj_Attribute(_dollar1) YYObj_List_Attribute_({(); _dollar2.add(_dollar1) }) } // file:///./parser.mbty -// 184| X { @list.singleton($1) } -fn yy_action_350(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_349(_last_pos, _args[0:1]) +// 190| X { @list.singleton($1) } +fn yy_action_418(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_417(_last_pos, _args[0:1]) guard _sub_action_0_result is YYObj_Attribute(_dollar1) YYObj_List_Attribute_({(); @list.singleton(_dollar1) }) } // file:///./parser.mbty -// 785| ATTRIBUTE { Attribute::new(loc=mk_loc($sloc), $1) } -fn yy_action_349(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 803| ATTRIBUTE { Attribute::new(loc=mk_loc($sloc), $1) } +fn yy_action_417(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } guard _args[0].0 is YYObj__String__String___String_(_dollar1) @@ -10058,53 +12279,122 @@ fn yy_action_349(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 241| X SEMI non_empty_list_semis(X) { $3.add($1) } -fn yy_action_351(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 247| X SEMI non_empty_list_semis(X) { $3.add($1) } +fn yy_action_419(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[2].0 is YYObj_List_Impl_(_dollar3) guard _args[0].0 is YYObj_Impl(_dollar1) YYObj_List_Impl_({(); _dollar3.add(_dollar1) }) } // file:///./parser.mbty -// 240| X option(SEMI) { @list.singleton($1) } -fn yy_action_352(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 246| X option(SEMI) { @list.singleton($1) } +fn yy_action_420(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj_Impl(_dollar1) YYObj_List_Impl_({(); @list.singleton(_dollar1) }) } // file:///./parser.mbty -// 250| { @list.empty() } -fn yy_action_353(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 256| { @list.empty() } +fn yy_action_421(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { YYObj_List_Impl_({(); @list.empty() }) } // file:///./parser.mbty -// 419| expr EOF { $1 } -fn yy_action_354(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 430| expr EOF { $1 } +fn yy_action_422(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj_Expr(_dollar1) YYObj_Expr({(); _dollar1 }) } // file:///./parser.mbty -// 1372| for_binders_infix SEMI option(infix_expr) SEMI for_binders_infix { -// 1373| ($1, $3, $5, mk_loc($sloc)) -// 1374| } -fn yy_action_355(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[0].0 is YYObj_List__Binder__Expr__(_dollar1) - guard _args[2].0 is YYObj_Option_Expr_(_dollar3) - guard _args[4].0 is YYObj_List__Binder__Expr__(_dollar5) +// 1995| "[|" "for" non_empty_list_commas(foreach_binder) "in" infix_expr foreach_optional_loop_vars_infix option(preceded("if", infix_expr)) "=>" expr "|]" { +// 1996| let (init, continue_block) = $6 +// 1997| ListComprehension( +// 1998| kind = Foreach(binders = $3, expr = $5, init~, continue_block~), +// 1999| guard_ = $7, +// 2000| body = $9, +// 2001| is_iter = true, +// 2002| loc = mk_loc($sloc) +// 2003| ) +// 2004| } +fn yy_action_423(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[5].0 is YYObj__List__Binder__Expr____List__Binder__Expr___(_dollar6) + guard _args[2].0 is YYObj_List_Binder__(_dollar3) + guard _args[4].0 is YYObj_Expr(_dollar5) + guard _args[6].0 is YYObj_Option_Expr_(_dollar7) + guard _args[8].0 is YYObj_Expr(_dollar9) let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - YYObj__List__Binder__Expr____Expr___List__Binder__Expr____Location_({(); + YYObj_Expr({(); + let (init, continue_block) = _dollar6 + ListComprehension( + kind = Foreach(binders = _dollar3, expr = _dollar5, init~, continue_block~), + guard_ = _dollar7, + body = _dollar9, + is_iter = true, + loc = mk_loc((_symbol_start_pos, _end_pos)) + ) + }) +} + +// file:///./parser.mbty +// 2015| "[|" "for" list_comp_for_header option(preceded("if", infix_expr)) "=>" expr "|]" { +// 2016| let (binders, condition, continue_block, for_loc) = $3 +// 2017| ListComprehension( +// 2018| kind = For(binders~, condition~, continue_block~, for_loc~), +// 2019| guard_ = $4, +// 2020| body = $6, +// 2021| is_iter = true, +// 2022| loc = mk_loc($sloc) +// 2023| ) +// 2024| } +fn yy_action_424(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[2].0 is YYObj__List__Binder__Expr____Expr___List__Binder__Expr____Location_(_dollar3) + guard _args[3].0 is YYObj_Option_Expr_(_dollar4) + guard _args[5].0 is YYObj_Expr(_dollar6) + let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) + let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } + YYObj_Expr({(); + let (binders, condition, continue_block, for_loc) = _dollar3 + ListComprehension( + kind = For(binders~, condition~, continue_block~, for_loc~), + guard_ = _dollar4, + body = _dollar6, + is_iter = true, + loc = mk_loc((_symbol_start_pos, _end_pos)) + ) + }) +} + +// file:///./parser.mbty +// 2026| "[|" list_commas(spreadable_elem) "|]" { @syntax.make_array_expr(loc = mk_loc($sloc), is_iter = true, $2) } +fn yy_action_425(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) + let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } + guard _args[1].0 is YYObj_List_SpreadableElem_(_dollar2) + YYObj_Expr({(); @syntax.make_array_expr(loc = mk_loc((_symbol_start_pos, _end_pos)), is_iter = true, _dollar2) }) +} + +// file:///./parser.mbty +// 1454| for_binders_infix SEMI option(infix_expr) SEMI for_binders_infix { +// 1455| ($1, $3, $5, mk_loc($sloc)) +// 1456| } +fn yy_action_426(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj_List__Binder__Expr__(_dollar1) + guard _args[2].0 is YYObj_Option_Expr_(_dollar3) + guard _args[4].0 is YYObj_List__Binder__Expr__(_dollar5) + let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) + let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } + YYObj__List__Binder__Expr____Expr___List__Binder__Expr____Location_({(); (_dollar1, _dollar3, _dollar5, mk_loc((_symbol_start_pos, _end_pos))) }) } // file:///./parser.mbty -// 1369| for_binders_infix SEMI option(infix_expr) { -// 1370| ($1, $3, @list.empty(), mk_loc($sloc)) -// 1371| } -fn yy_action_356(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 1451| for_binders_infix SEMI option(infix_expr) { +// 1452| ($1, $3, @list.empty(), mk_loc($sloc)) +// 1453| } +fn yy_action_427(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj_List__Binder__Expr__(_dollar1) guard _args[2].0 is YYObj_Option_Expr_(_dollar3) let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) @@ -10115,10 +12405,10 @@ fn yy_action_356(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 1366| for_binders_infix { -// 1367| ($1, None, @list.empty(), mk_loc($sloc)) -// 1368| } -fn yy_action_357(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 1448| for_binders_infix { +// 1449| ($1, None, @list.empty(), mk_loc($sloc)) +// 1450| } +fn yy_action_428(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj_List__Binder__Expr__(_dollar1) let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } @@ -10128,46 +12418,55 @@ fn yy_action_357(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 1362| list_commas_no_trailing(separated_pair(binder, "=", infix_expr)) { $1 } -fn yy_action_358(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 1444| list_commas_no_trailing(separated_pair(binder, "=", infix_expr)) { $1 } +fn yy_action_429(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj_List__Binder__Expr__(_dollar1) YYObj_List__Binder__Expr__({(); _dollar1 }) } // file:///./parser.mbty -// 1453| SEMI for_binders_infix SEMI for_binders_infix { ($2, $4) } -fn yy_action_359(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 1535| SEMI for_binders_infix SEMI for_binders_infix { ($2, $4) } +fn yy_action_430(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[1].0 is YYObj_List__Binder__Expr__(_dollar2) guard _args[3].0 is YYObj_List__Binder__Expr__(_dollar4) YYObj__List__Binder__Expr____List__Binder__Expr___({(); (_dollar2, _dollar4) }) } // file:///./parser.mbty -// 1452| SEMI for_binders_infix { ($2, @list.empty()) } -fn yy_action_360(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 1534| SEMI for_binders_infix { ($2, @list.empty()) } +fn yy_action_431(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[1].0 is YYObj_List__Binder__Expr__(_dollar2) YYObj__List__Binder__Expr____List__Binder__Expr___({(); (_dollar2, @list.empty()) }) } // file:///./parser.mbty -// 189| X { @list.singleton($1) } -fn yy_action_361(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_362(_last_pos, _args[0:3]) +// 195| X { @list.singleton($1) } +fn yy_action_432(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_433(_last_pos, _args[0:3]) guard _sub_action_0_result is YYObj__Binder__Expr_(_dollar1) YYObj_List__Binder__Expr__({(); @list.singleton(_dollar1) }) } // file:///./parser.mbty -// 1899| "[" "for" non_empty_list_commas(foreach_binder) "in" infix_expr foreach_optional_loop_vars_infix option(preceded("if", infix_expr)) "=>" expr "]" { -// 1900| let (init, continue_block) = $6 -// 1901| ListComprehension( -// 1902| kind = Foreach(binders = $3, expr = $5, init~, continue_block~), -// 1903| guard_ = $7, -// 1904| body = $9, -// 1905| loc = mk_loc($sloc) -// 1906| ) -// 1907| } -fn yy_action_363(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 195| X { @list.singleton($1) } +fn yy_action_434(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_435(_last_pos, _args[0:3]) + guard _sub_action_0_result is YYObj__Binder__Expr_(_dollar1) + YYObj_List__Binder__Expr__({(); @list.singleton(_dollar1) }) +} + +// file:///./parser.mbty +// 1985| "[" "for" non_empty_list_commas(foreach_binder) "in" infix_expr foreach_optional_loop_vars_infix option(preceded("if", infix_expr)) "=>" expr "]" { +// 1986| let (init, continue_block) = $6 +// 1987| ListComprehension( +// 1988| kind = Foreach(binders = $3, expr = $5, init~, continue_block~), +// 1989| guard_ = $7, +// 1990| body = $9, +// 1991| is_iter = false, +// 1992| loc = mk_loc($sloc) +// 1993| ) +// 1994| } +fn yy_action_436(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[5].0 is YYObj__List__Binder__Expr____List__Binder__Expr___(_dollar6) guard _args[2].0 is YYObj_List_Binder__(_dollar3) guard _args[4].0 is YYObj_Expr(_dollar5) @@ -10181,28 +12480,30 @@ fn yy_action_363(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit kind = Foreach(binders = _dollar3, expr = _dollar5, init~, continue_block~), guard_ = _dollar7, body = _dollar9, + is_iter = false, loc = mk_loc((_symbol_start_pos, _end_pos)) ) }) } // file:///./parser.mbty -// 1451| { (@list.empty(), @list.empty()) } -fn yy_action_364(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 1533| { (@list.empty(), @list.empty()) } +fn yy_action_437(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { YYObj__List__Binder__Expr____List__Binder__Expr___({(); (@list.empty(), @list.empty()) }) } // file:///./parser.mbty -// 1908| "[" "for" list_comp_for_header option(preceded("if", infix_expr)) "=>" expr "]" { -// 1909| let (binders, condition, continue_block, for_loc) = $3 -// 1910| ListComprehension( -// 1911| kind = For(binders~, condition~, continue_block~, for_loc~), -// 1912| guard_ = $4, -// 1913| body = $6, -// 1914| loc = mk_loc($sloc) -// 1915| ) -// 1916| } -fn yy_action_365(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 2005| "[" "for" list_comp_for_header option(preceded("if", infix_expr)) "=>" expr "]" { +// 2006| let (binders, condition, continue_block, for_loc) = $3 +// 2007| ListComprehension( +// 2008| kind = For(binders~, condition~, continue_block~, for_loc~), +// 2009| guard_ = $4, +// 2010| body = $6, +// 2011| is_iter = false, +// 2012| loc = mk_loc($sloc) +// 2013| ) +// 2014| } +fn yy_action_438(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[2].0 is YYObj__List__Binder__Expr____Expr___List__Binder__Expr____Location_(_dollar3) guard _args[3].0 is YYObj_Option_Expr_(_dollar4) guard _args[5].0 is YYObj_Expr(_dollar6) @@ -10214,22 +12515,23 @@ fn yy_action_365(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit kind = For(binders~, condition~, continue_block~, for_loc~), guard_ = _dollar4, body = _dollar6, + is_iter = false, loc = mk_loc((_symbol_start_pos, _end_pos)) ) }) } // file:///./parser.mbty -// 212| non_empty_list_commas_no_trailing(X) { $1 } -fn yy_action_366(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 218| non_empty_list_commas_no_trailing(X) { $1 } +fn yy_action_439(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj_List__Binder__Expr__(_dollar1) YYObj_List__Binder__Expr__({(); _dollar1 }) } // file:///./parser.mbty -// 190| non_empty_list_commas_rev(X) "," X { $1.add($3) } -fn yy_action_367(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_362(_args[1].2, _args[2:5]) +// 196| non_empty_list_commas_rev(X) "," X { $1.add($3) } +fn yy_action_440(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_433(_args[1].2, _args[2:5]) guard _args[0].0 is YYObj_List__Binder__Expr__(_dollar1) guard _sub_action_0_result is YYObj__Binder__Expr_(_dollar3) YYObj_List__Binder__Expr__({(); _dollar1.add(_dollar3) }) @@ -10237,7 +12539,7 @@ fn yy_action_367(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit // file:///./stdlib.mbty // 28| X SEP Y { ($1, $3) } -fn yy_action_362(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +fn yy_action_433(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _sub_action_0_result = yy_action_15(_last_pos, _args[0:1]) guard _sub_action_0_result is YYObj_Binder(_dollar1) guard _args[2].0 is YYObj_Expr(_dollar3) @@ -10245,49 +12547,80 @@ fn yy_action_362(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 194| non_empty_list_commas_rev(X) { $1.rev() } -fn yy_action_368(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 196| non_empty_list_commas_rev(X) "," X { $1.add($3) } +fn yy_action_441(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_435(_args[1].2, _args[2:5]) guard _args[0].0 is YYObj_List__Binder__Expr__(_dollar1) - YYObj_List__Binder__Expr__({(); _dollar1.rev() }) + guard _sub_action_0_result is YYObj__Binder__Expr_(_dollar3) + YYObj_List__Binder__Expr__({(); _dollar1.add(_dollar3) }) } -// file:///./parser.mbty -// 211| { @list.empty() } -fn yy_action_369(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - YYObj_List__Binder__Expr__({(); @list.empty() }) +// file:///./stdlib.mbty +// 28| X SEP Y { ($1, $3) } +fn yy_action_435(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_20(_last_pos, _args[0:1]) + guard _sub_action_0_result is YYObj_Binder(_dollar1) + guard _args[2].0 is YYObj_Expr(_dollar3) + YYObj__Binder__Expr_({(); (_dollar1, _dollar3) }) } // file:///./parser.mbty -// 1917| "[" list_commas(spreadable_elem) "]" { @syntax.make_array_expr(loc = mk_loc($sloc), $2) } -fn yy_action_370(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) - let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - guard _args[1].0 is YYObj_List_SpreadableElem_(_dollar2) - YYObj_Expr({(); @syntax.make_array_expr(loc = mk_loc((_symbol_start_pos, _end_pos)), _dollar2) }) +// 2429| label_pun "," list_commas_with_trailing_info(record_defn_single) { +// 2430| let (fs, trailing) = $3 +// 2431| let trailing_mark = if fs.is_empty() || trailing { TrailingMark::Comma } else { TrailingMark::None } +// 2432| (fs.add($1), trailing_mark) +// 2433| } +fn yy_action_442(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_443(_last_pos, _args[0:1]) + guard _args[2].0 is YYObj__List_FieldDef___Bool_(_dollar3) + guard _sub_action_0_result is YYObj_FieldDef(_dollar1) + YYObj__List_FieldDef___TrailingMark_({(); + let (fs, trailing) = _dollar3 + let trailing_mark = if fs.is_empty() || trailing { TrailingMark::Comma } else { TrailingMark::None } + (fs.add(_dollar1), trailing_mark) + }) } // file:///./parser.mbty -// 207| non_empty_list_commas(X) { $1 } -fn yy_action_371(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[0].0 is YYObj_List_SpreadableElem_(_dollar1) - YYObj_List_SpreadableElem_({(); _dollar1 }) +// 2434| labeled_expr option(",") { +// 2435| let trailing_mark = if $2 is Some(_) { TrailingMark::Comma } else { TrailingMark::None } +// 2436| (@list.singleton($1), trailing_mark) +// 2437| } +fn yy_action_444(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_445(_last_pos, _args[0:3]) + guard _args[3].0 is YYObj_Option_Unit_(_dollar2) + guard _sub_action_0_result is YYObj_FieldDef(_dollar1) + YYObj__List_FieldDef___TrailingMark_({(); + let trailing_mark = if _dollar2 is Some(_) { TrailingMark::Comma } else { TrailingMark::None } + (@list.singleton(_dollar1), trailing_mark) + }) } // file:///./parser.mbty -// 2053| expr { Regular($1) } -fn yy_action_372(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[0].0 is YYObj_Expr(_dollar1) - YYObj_SpreadableElem({(); Regular(_dollar1) }) +// 2438| labeled_expr "," non_empty_list_commas_with_trailing_info(record_defn_single) { +// 2439| let (fs, trailing) = $3 +// 2440| let trailing_mark = if trailing { TrailingMark::Comma } else { TrailingMark::None } +// 2441| (fs.add($1), trailing_mark) +// 2442| } +fn yy_action_446(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_445(_last_pos, _args[0:3]) + guard _args[4].0 is YYObj__List_FieldDef___Bool_(_dollar3) + guard _sub_action_0_result is YYObj_FieldDef(_dollar1) + YYObj__List_FieldDef___TrailingMark_({(); + let (fs, trailing) = _dollar3 + let trailing_mark = if trailing { TrailingMark::Comma } else { TrailingMark::None } + (fs.add(_dollar1), trailing_mark) + }) } // file:///./parser.mbty -// 2319| label_pun "," list_commas_with_trailing_info(record_defn_single) { -// 2320| let (fs, trailing) = $3 -// 2321| let trailing_mark = if fs.is_empty() || trailing { TrailingMark::Comma } else { TrailingMark::None } -// 2322| (fs.add($1), trailing_mark) -// 2323| } -fn yy_action_373(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_374(_last_pos, _args[0:1]) +// 2429| label_pun "," list_commas_with_trailing_info(record_defn_single) { +// 2430| let (fs, trailing) = $3 +// 2431| let trailing_mark = if fs.is_empty() || trailing { TrailingMark::Comma } else { TrailingMark::None } +// 2432| (fs.add($1), trailing_mark) +// 2433| } +fn yy_action_447(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_448(_last_pos, _args[0:1]) guard _args[2].0 is YYObj__List_FieldDef___Bool_(_dollar3) guard _sub_action_0_result is YYObj_FieldDef(_dollar1) YYObj__List_FieldDef___TrailingMark_({(); @@ -10298,12 +12631,12 @@ fn yy_action_373(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 2324| labeled_expr option(",") { -// 2325| let trailing_mark = if $2 is Some(_) { TrailingMark::Comma } else { TrailingMark::None } -// 2326| (@list.singleton($1), trailing_mark) -// 2327| } -fn yy_action_375(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_376(_last_pos, _args[0:3]) +// 2434| labeled_expr option(",") { +// 2435| let trailing_mark = if $2 is Some(_) { TrailingMark::Comma } else { TrailingMark::None } +// 2436| (@list.singleton($1), trailing_mark) +// 2437| } +fn yy_action_449(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_450(_last_pos, _args[0:3]) guard _args[3].0 is YYObj_Option_Unit_(_dollar2) guard _sub_action_0_result is YYObj_FieldDef(_dollar1) YYObj__List_FieldDef___TrailingMark_({(); @@ -10313,13 +12646,13 @@ fn yy_action_375(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 2328| labeled_expr "," non_empty_list_commas_with_trailing_info(record_defn_single) { -// 2329| let (fs, trailing) = $3 -// 2330| let trailing_mark = if trailing { TrailingMark::Comma } else { TrailingMark::None } -// 2331| (fs.add($1), trailing_mark) -// 2332| } -fn yy_action_377(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_376(_last_pos, _args[0:3]) +// 2438| labeled_expr "," non_empty_list_commas_with_trailing_info(record_defn_single) { +// 2439| let (fs, trailing) = $3 +// 2440| let trailing_mark = if trailing { TrailingMark::Comma } else { TrailingMark::None } +// 2441| (fs.add($1), trailing_mark) +// 2442| } +fn yy_action_451(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_450(_last_pos, _args[0:3]) guard _args[4].0 is YYObj__List_FieldDef___Bool_(_dollar3) guard _sub_action_0_result is YYObj_FieldDef(_dollar1) YYObj__List_FieldDef___TrailingMark_({(); @@ -10330,11 +12663,11 @@ fn yy_action_377(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 1822| "{" record_defn "}" { -// 1823| let (fs, trailing) = $2 -// 1824| @syntax.make_record_expr(loc = mk_loc($sloc), trailing~, None, fs) -// 1825| } -fn yy_action_378(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 1908| "{" record_defn "}" { +// 1909| let (fs, trailing) = $2 +// 1910| @syntax.make_record_expr(loc = mk_loc($sloc), trailing~, None, fs) +// 1911| } +fn yy_action_452(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[1].0 is YYObj__List_FieldDef___TrailingMark_(_dollar2) let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } @@ -10345,11 +12678,11 @@ fn yy_action_378(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 1831| ioption(terminated(type_name, COLONCOLON)) "{" ".." expr "}" { -// 1832| RecordUpdate(type_name = $1, record = $4, fields = @list.empty(), loc = mk_loc($sloc)) -// 1833| } -fn yy_action_379(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_380(_last_pos, _args[0:0]) +// 1917| ioption(terminated(type_name, COLONCOLON)) "{" ".." expr "}" { +// 1918| RecordUpdate(type_name = $1, record = $4, fields = @list.empty(), loc = mk_loc($sloc)) +// 1919| } +fn yy_action_453(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_454(_last_pos, _args[0:0]) guard _sub_action_0_result is YYObj_Option_TypeName_(_dollar1) guard _args[2].0 is YYObj_Expr(_dollar4) let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) @@ -10360,11 +12693,11 @@ fn yy_action_379(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 1834| ioption(terminated(type_name, COLONCOLON)) "{" ".." expr "," list_commas(record_defn_single) "}" { -// 1835| RecordUpdate(type_name = $1, record = $4, fields = $6, loc = mk_loc($sloc)) -// 1836| } -fn yy_action_381(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_380(_last_pos, _args[0:0]) +// 1920| ioption(terminated(type_name, COLONCOLON)) "{" ".." expr "," list_commas(record_defn_single) "}" { +// 1921| RecordUpdate(type_name = $1, record = $4, fields = $6, loc = mk_loc($sloc)) +// 1922| } +fn yy_action_455(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_454(_last_pos, _args[0:0]) guard _sub_action_0_result is YYObj_Option_TypeName_(_dollar1) guard _args[2].0 is YYObj_Expr(_dollar4) guard _args[4].0 is YYObj_List_FieldDef_(_dollar6) @@ -10377,25 +12710,25 @@ fn yy_action_381(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit // file:///./stdlib.mbty // 9| { None } -fn yy_action_380(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +fn yy_action_454(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { YYObj_Option_TypeName_({(); None }) } // file:///./parser.mbty -// 1837| "{" semi_expr_semi_opt "}" { -// 1838| let (expr, trailing) = $2 -// 1839| match expr { -// 1840| Ident(id = { name: Ident(name~), loc }, ..) => { -// 1841| let label = Label::{ name, loc } -// 1842| let field = @syntax.make_field_def(loc = mk_loc($sloc), label, expr, true) -// 1843| let trailing_mark = if trailing { TrailingMark::Semi } else { TrailingMark::None } -// 1844| @syntax.make_record_expr(loc = mk_loc($sloc), trailing = trailing_mark, None, @list.singleton(field)) -// 1845| } -// 1846| _ => Group(expr~, group = Brace, loc = mk_loc($sloc)) -// 1847| } -// 1848| } -fn yy_action_382(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_383(_args[0].2, _args[1:2]) +// 1923| "{" semi_expr_semi_opt "}" { +// 1924| let (expr, trailing) = $2 +// 1925| match expr { +// 1926| Ident(id = { name: Ident(name~), loc }, ..) => { +// 1927| let label = Label::{ name, loc } +// 1928| let field = @syntax.make_field_def(loc = mk_loc($sloc), label, expr, true) +// 1929| let trailing_mark = if trailing { TrailingMark::Semi } else { TrailingMark::None } +// 1930| @syntax.make_record_expr(loc = mk_loc($sloc), trailing = trailing_mark, None, @list.singleton(field)) +// 1931| } +// 1932| _ => Group(expr~, group = Brace, loc = mk_loc($sloc)) +// 1933| } +// 1934| } +fn yy_action_456(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_457(_args[0].2, _args[1:2]) guard _sub_action_0_result is YYObj__Expr__Bool_(_dollar2) let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } @@ -10414,11 +12747,11 @@ fn yy_action_382(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 1038| none_empty_list_semis_rev_with_trailing_info(statement) { -// 1039| let (ls, trailing) = $1 -// 1040| (Statement::compact_rev(ls, loc = mk_loc($sloc)), trailing) -// 1041| } -fn yy_action_383(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 1072| none_empty_list_semis_rev_with_trailing_info(statement) { +// 1073| let (ls, trailing) = $1 +// 1074| (Statement::compact_rev(ls, loc = mk_loc($sloc)), trailing) +// 1075| } +fn yy_action_457(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj__List_Statement___Bool_(_dollar1) let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } @@ -10429,10 +12762,10 @@ fn yy_action_383(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 1849| "{" list_commas(map_expr_elem) "}" { -// 1850| Map(elems = $2, loc = mk_loc($sloc)) -// 1851| } -fn yy_action_384(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 1935| "{" list_commas(map_expr_elem) "}" { +// 1936| Map(elems = $2, loc = mk_loc($sloc)) +// 1937| } +fn yy_action_458(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[1].0 is YYObj_List_MapExprElem_(_dollar2) let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } @@ -10442,25 +12775,25 @@ fn yy_action_384(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 236| non_empty_list_semi_rev_aux(X) option(SEMI) { ($1, $2 is Some(_)) } -fn yy_action_385(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 242| non_empty_list_semi_rev_aux(X) option(SEMI) { ($1, $2 is Some(_)) } +fn yy_action_459(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj_List_Statement_(_dollar1) guard _args[1].0 is YYObj_Option_Bool_(_dollar2) YYObj__List_Statement___Bool_({(); (_dollar1, _dollar2 is Some(_)) }) } // file:///./parser.mbty -// 207| non_empty_list_commas(X) { $1 } -fn yy_action_386(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 213| non_empty_list_commas(X) { $1 } +fn yy_action_460(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj_List_MapExprElem_(_dollar1) YYObj_List_MapExprElem_({(); _dollar1 }) } // file:///./parser.mbty -// 408| "{" list_semis_rev(statement) "}" { -// 409| Statement::compact_rev($2, loc = mk_loc($sloc)) -// 410| } -fn yy_action_387(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 419| "{" list_semis_rev(statement) "}" { +// 420| Statement::compact_rev($2, loc = mk_loc($sloc)) +// 421| } +fn yy_action_461(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[1].0 is YYObj_List_Statement_(_dollar2) let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } @@ -10470,12 +12803,12 @@ fn yy_action_387(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 1826| type_name COLONCOLON "{" list_commas_with_trailing_info(record_defn_single) "}" { -// 1827| let (fs, trailing) = $4 -// 1828| let trailing_mark = if trailing { TrailingMark::Comma } else { TrailingMark::None } -// 1829| @syntax.make_record_expr(loc = mk_loc($sloc), trailing = trailing_mark, Some($1), fs) -// 1830| } -fn yy_action_388(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 1912| type_name COLONCOLON "{" list_commas_with_trailing_info(record_defn_single) "}" { +// 1913| let (fs, trailing) = $4 +// 1914| let trailing_mark = if trailing { TrailingMark::Comma } else { TrailingMark::None } +// 1915| @syntax.make_record_expr(loc = mk_loc($sloc), trailing = trailing_mark, Some($1), fs) +// 1916| } +fn yy_action_462(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[3].0 is YYObj__List_FieldDef___Bool_(_dollar4) let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } @@ -10488,11 +12821,11 @@ fn yy_action_388(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 1831| ioption(terminated(type_name, COLONCOLON)) "{" ".." expr "}" { -// 1832| RecordUpdate(type_name = $1, record = $4, fields = @list.empty(), loc = mk_loc($sloc)) -// 1833| } -fn yy_action_389(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_390(_last_pos, _args[0:2]) +// 1917| ioption(terminated(type_name, COLONCOLON)) "{" ".." expr "}" { +// 1918| RecordUpdate(type_name = $1, record = $4, fields = @list.empty(), loc = mk_loc($sloc)) +// 1919| } +fn yy_action_463(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_464(_last_pos, _args[0:2]) guard _sub_action_0_result is YYObj_Option_TypeName_(_dollar1) guard _args[4].0 is YYObj_Expr(_dollar4) let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) @@ -10503,11 +12836,11 @@ fn yy_action_389(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 1834| ioption(terminated(type_name, COLONCOLON)) "{" ".." expr "," list_commas(record_defn_single) "}" { -// 1835| RecordUpdate(type_name = $1, record = $4, fields = $6, loc = mk_loc($sloc)) -// 1836| } -fn yy_action_391(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_390(_last_pos, _args[0:2]) +// 1920| ioption(terminated(type_name, COLONCOLON)) "{" ".." expr "," list_commas(record_defn_single) "}" { +// 1921| RecordUpdate(type_name = $1, record = $4, fields = $6, loc = mk_loc($sloc)) +// 1922| } +fn yy_action_465(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_464(_last_pos, _args[0:2]) guard _sub_action_0_result is YYObj_Option_TypeName_(_dollar1) guard _args[4].0 is YYObj_Expr(_dollar4) guard _args[6].0 is YYObj_List_FieldDef_(_dollar6) @@ -10520,71 +12853,97 @@ fn yy_action_391(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit // file:///./stdlib.mbty // 10| X { Some($1) } -fn yy_action_390(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_392(_last_pos, _args[0:2]) +fn yy_action_464(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_466(_last_pos, _args[0:2]) guard _sub_action_0_result is YYObj_TypeName(_dollar1) YYObj_Option_TypeName_({(); Some(_dollar1) }) } // file:///./stdlib.mbty // 36| X R { $1 } -fn yy_action_392(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +fn yy_action_466(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj_TypeName(_dollar1) YYObj_TypeName({(); _dollar1 }) } // file:///./parser.mbty -// 207| non_empty_list_commas(X) { $1 } -fn yy_action_393(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 213| non_empty_list_commas(X) { $1 } +fn yy_action_467(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj_List_FieldDef_(_dollar1) YYObj_List_FieldDef_({(); _dollar1 }) } // file:///./parser.mbty -// 198| non_empty_list_commas_rev(X) option(",") { $1.rev() } -fn yy_action_394(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 204| non_empty_list_commas_rev(X) option(",") { $1.rev() } +fn yy_action_468(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj_List_FieldDef_(_dollar1) YYObj_List_FieldDef_({(); _dollar1.rev() }) } // file:///./parser.mbty -// 206| { @list.empty() } -fn yy_action_395(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 212| { @list.empty() } +fn yy_action_469(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { YYObj_List_FieldDef_({(); @list.empty() }) } // file:///./parser.mbty -// 223| non_empty_list_commas_with_trailing_info(X) { $1 } -fn yy_action_396(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 229| non_empty_list_commas_with_trailing_info(X) { $1 } +fn yy_action_470(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj__List_FieldDef___Bool_(_dollar1) YYObj__List_FieldDef___Bool_({(); _dollar1 }) } // file:///./parser.mbty -// 288| delimited("(", list_commas(parameter), ")") { $1 } -fn yy_action_397(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_398(_last_pos, _args[0:3]) +// 2446| labeled_expr { $1 } +fn yy_action_471(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_445(_last_pos, _args[0:3]) + guard _sub_action_0_result is YYObj_FieldDef(_dollar1) + YYObj_FieldDef({(); _dollar1 }) +} + +// file:///./parser.mbty +// 2447| label_pun { $1 } +fn yy_action_472(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_443(_last_pos, _args[0:1]) + guard _sub_action_0_result is YYObj_FieldDef(_dollar1) + YYObj_FieldDef({(); _dollar1 }) +} + +// file:///./parser.mbty +// 2455| label { @syntax.make_field_def(loc = mk_loc($sloc), $1, @syntax.label_to_expr(loc = mk_loc($sloc), $1), true) } +fn yy_action_443(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_473(_last_pos, _args[0:1]) + let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) + let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } + guard _sub_action_0_result is YYObj_Label(_dollar1) + YYObj_FieldDef({(); @syntax.make_field_def(loc = mk_loc((_symbol_start_pos, _end_pos)), _dollar1, @syntax.label_to_expr(loc = mk_loc((_symbol_start_pos, _end_pos)), _dollar1), true) }) +} + +// file:///./parser.mbty +// 294| delimited("(", list_commas(parameter), ")") { $1 } +fn yy_action_474(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_475(_last_pos, _args[0:3]) guard _sub_action_0_result is YYObj_List_Parameter_(_dollar1) YYObj_List_Parameter_({(); _dollar1 }) } // file:///./stdlib.mbty // 40| L X R { $2 } -fn yy_action_398(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +fn yy_action_475(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[1].0 is YYObj_List_Parameter_(_dollar2) YYObj_List_Parameter_({(); _dollar2 }) } // file:///./parser.mbty -// 207| non_empty_list_commas(X) { $1 } -fn yy_action_399(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 213| non_empty_list_commas(X) { $1 } +fn yy_action_476(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj_List_Parameter_(_dollar1) YYObj_List_Parameter_({(); _dollar1 }) } // file:///./parser.mbty -// 267| "_" opt_annot { DiscardPositional(ty = $2, loc = mk_loc($loc($1))) } -fn yy_action_400(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 273| "_" opt_annot { DiscardPositional(ty = $2, loc = mk_loc($loc($1))) } +fn yy_action_477(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _sub_action_0_result = yy_action_16(_args[0].2, _args[1:3]) guard _sub_action_0_result is YYObj_Type_(_dollar2) let _start_pos_of_item0 = _args[0].1 @@ -10593,8 +12952,8 @@ fn yy_action_400(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 267| "_" opt_annot { DiscardPositional(ty = $2, loc = mk_loc($loc($1))) } -fn yy_action_401(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 273| "_" opt_annot { DiscardPositional(ty = $2, loc = mk_loc($loc($1))) } +fn yy_action_478(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _sub_action_0_result = yy_action_18(_args[0].2, _args[1:1]) guard _sub_action_0_result is YYObj_Type_(_dollar2) let _start_pos_of_item0 = _args[0].1 @@ -10603,8 +12962,8 @@ fn yy_action_401(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 268| binder opt_annot { Positional(binder = $1, ty = $2) } -fn yy_action_402(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 274| binder opt_annot { Positional(binder = $1, ty = $2) } +fn yy_action_479(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _sub_action_0_result = yy_action_15(_last_pos, _args[0:1]) let _sub_action_1_result = yy_action_16(_args[0].2, _args[1:3]) guard _sub_action_0_result is YYObj_Binder(_dollar1) @@ -10613,16 +12972,17 @@ fn yy_action_402(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 277| LIDENT "?" opt_annot "=" expr { -// 278| let binder = Binder::{ name: $1, loc: mk_loc($loc($1)) } -// 279| Optional(binder~, ty = $3, default = $5) -// 280| } -fn yy_action_403(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_18(_args[1].2, _args[2:2]) - guard _args[0].0 is YYObj_String(_dollar1) +// 283| lident_string "?" opt_annot "=" expr { +// 284| let binder = Binder::{ name: $1, loc: mk_loc($loc($1)) } +// 285| Optional(binder~, ty = $3, default = $5) +// 286| } +fn yy_action_480(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_226(_last_pos, _args[0:1]) + let _sub_action_1_result = yy_action_18(_args[1].2, _args[2:2]) + guard _sub_action_0_result is YYObj_String(_dollar1) let _start_pos_of_item0 = _args[0].1 let _end_pos_of_item0 = _args[0].2 - guard _sub_action_0_result is YYObj_Type_(_dollar3) + guard _sub_action_1_result is YYObj_Type_(_dollar3) guard _args[3].0 is YYObj_Expr(_dollar5) YYObj_Parameter({(); let binder = Binder::{ name: _dollar1, loc: mk_loc((_start_pos_of_item0, _end_pos_of_item0)) } @@ -10631,16 +12991,17 @@ fn yy_action_403(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 277| LIDENT "?" opt_annot "=" expr { -// 278| let binder = Binder::{ name: $1, loc: mk_loc($loc($1)) } -// 279| Optional(binder~, ty = $3, default = $5) -// 280| } -fn yy_action_404(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_16(_args[1].2, _args[2:4]) - guard _args[0].0 is YYObj_String(_dollar1) +// 283| lident_string "?" opt_annot "=" expr { +// 284| let binder = Binder::{ name: $1, loc: mk_loc($loc($1)) } +// 285| Optional(binder~, ty = $3, default = $5) +// 286| } +fn yy_action_481(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_226(_last_pos, _args[0:1]) + let _sub_action_1_result = yy_action_16(_args[1].2, _args[2:4]) + guard _sub_action_0_result is YYObj_String(_dollar1) let _start_pos_of_item0 = _args[0].1 let _end_pos_of_item0 = _args[0].2 - guard _sub_action_0_result is YYObj_Type_(_dollar3) + guard _sub_action_1_result is YYObj_Type_(_dollar3) guard _args[5].0 is YYObj_Expr(_dollar5) YYObj_Parameter({(); let binder = Binder::{ name: _dollar1, loc: mk_loc((_start_pos_of_item0, _end_pos_of_item0)) } @@ -10649,16 +13010,17 @@ fn yy_action_404(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 281| LIDENT "?" opt_annot { -// 282| let binder = Binder::{ name: $1, loc: mk_loc($loc($1)) } -// 283| QuestionOptional(binder~, ty = $3) -// 284| } -fn yy_action_405(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_16(_args[1].2, _args[2:4]) - guard _args[0].0 is YYObj_String(_dollar1) +// 287| lident_string "?" opt_annot { +// 288| let binder = Binder::{ name: $1, loc: mk_loc($loc($1)) } +// 289| QuestionOptional(binder~, ty = $3) +// 290| } +fn yy_action_482(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_226(_last_pos, _args[0:1]) + let _sub_action_1_result = yy_action_16(_args[1].2, _args[2:4]) + guard _sub_action_0_result is YYObj_String(_dollar1) let _start_pos_of_item0 = _args[0].1 let _end_pos_of_item0 = _args[0].2 - guard _sub_action_0_result is YYObj_Type_(_dollar3) + guard _sub_action_1_result is YYObj_Type_(_dollar3) YYObj_Parameter({(); let binder = Binder::{ name: _dollar1, loc: mk_loc((_start_pos_of_item0, _end_pos_of_item0)) } QuestionOptional(binder~, ty = _dollar3) @@ -10666,16 +13028,17 @@ fn yy_action_405(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 281| LIDENT "?" opt_annot { -// 282| let binder = Binder::{ name: $1, loc: mk_loc($loc($1)) } -// 283| QuestionOptional(binder~, ty = $3) -// 284| } -fn yy_action_406(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_18(_args[1].2, _args[2:2]) - guard _args[0].0 is YYObj_String(_dollar1) +// 287| lident_string "?" opt_annot { +// 288| let binder = Binder::{ name: $1, loc: mk_loc($loc($1)) } +// 289| QuestionOptional(binder~, ty = $3) +// 290| } +fn yy_action_483(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_226(_last_pos, _args[0:1]) + let _sub_action_1_result = yy_action_18(_args[1].2, _args[2:2]) + guard _sub_action_0_result is YYObj_String(_dollar1) let _start_pos_of_item0 = _args[0].1 let _end_pos_of_item0 = _args[0].2 - guard _sub_action_0_result is YYObj_Type_(_dollar3) + guard _sub_action_1_result is YYObj_Type_(_dollar3) YYObj_Parameter({(); let binder = Binder::{ name: _dollar1, loc: mk_loc((_start_pos_of_item0, _end_pos_of_item0)) } QuestionOptional(binder~, ty = _dollar3) @@ -10683,8 +13046,8 @@ fn yy_action_406(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 268| binder opt_annot { Positional(binder = $1, ty = $2) } -fn yy_action_407(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 274| binder opt_annot { Positional(binder = $1, ty = $2) } +fn yy_action_484(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _sub_action_0_result = yy_action_15(_last_pos, _args[0:1]) let _sub_action_1_result = yy_action_18(_args[0].2, _args[1:1]) guard _sub_action_0_result is YYObj_Binder(_dollar1) @@ -10693,29 +13056,123 @@ fn yy_action_407(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 273| POST_LABEL opt_annot "=" expr { -// 274| let binder = Binder::{ name: $1, loc: mk_loc($loc($1)).trim_last_char() } -// 275| Optional(binder~, ty = $2, default = $4) -// 276| } -fn yy_action_408(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_16(_args[0].2, _args[1:3]) - guard _args[0].0 is YYObj_String(_dollar1) +// 274| binder opt_annot { Positional(binder = $1, ty = $2) } +fn yy_action_485(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_20(_last_pos, _args[0:1]) + let _sub_action_1_result = yy_action_16(_args[0].2, _args[1:3]) + guard _sub_action_0_result is YYObj_Binder(_dollar1) + guard _sub_action_1_result is YYObj_Type_(_dollar2) + YYObj_Parameter({(); Positional(binder = _dollar1, ty = _dollar2) }) +} + +// file:///./parser.mbty +// 283| lident_string "?" opt_annot "=" expr { +// 284| let binder = Binder::{ name: $1, loc: mk_loc($loc($1)) } +// 285| Optional(binder~, ty = $3, default = $5) +// 286| } +fn yy_action_486(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_228(_last_pos, _args[0:1]) + let _sub_action_1_result = yy_action_18(_args[1].2, _args[2:2]) + guard _sub_action_0_result is YYObj_String(_dollar1) let _start_pos_of_item0 = _args[0].1 let _end_pos_of_item0 = _args[0].2 - guard _sub_action_0_result is YYObj_Type_(_dollar2) - guard _args[4].0 is YYObj_Expr(_dollar4) + guard _sub_action_1_result is YYObj_Type_(_dollar3) + guard _args[3].0 is YYObj_Expr(_dollar5) YYObj_Parameter({(); - let binder = Binder::{ name: _dollar1, loc: mk_loc((_start_pos_of_item0, _end_pos_of_item0)).trim_last_char() } - Optional(binder~, ty = _dollar2, default = _dollar4) + let binder = Binder::{ name: _dollar1, loc: mk_loc((_start_pos_of_item0, _end_pos_of_item0)) } + Optional(binder~, ty = _dollar3, default = _dollar5) }) } // file:///./parser.mbty -// 269| POST_LABEL opt_annot { -// 270| let binder = Binder::{ name: $1, loc: mk_loc($loc($1)).trim_last_char() } -// 271| Labelled(binder~, ty = $2) -// 272| } -fn yy_action_409(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 283| lident_string "?" opt_annot "=" expr { +// 284| let binder = Binder::{ name: $1, loc: mk_loc($loc($1)) } +// 285| Optional(binder~, ty = $3, default = $5) +// 286| } +fn yy_action_487(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_228(_last_pos, _args[0:1]) + let _sub_action_1_result = yy_action_16(_args[1].2, _args[2:4]) + guard _sub_action_0_result is YYObj_String(_dollar1) + let _start_pos_of_item0 = _args[0].1 + let _end_pos_of_item0 = _args[0].2 + guard _sub_action_1_result is YYObj_Type_(_dollar3) + guard _args[5].0 is YYObj_Expr(_dollar5) + YYObj_Parameter({(); + let binder = Binder::{ name: _dollar1, loc: mk_loc((_start_pos_of_item0, _end_pos_of_item0)) } + Optional(binder~, ty = _dollar3, default = _dollar5) + }) +} + +// file:///./parser.mbty +// 287| lident_string "?" opt_annot { +// 288| let binder = Binder::{ name: $1, loc: mk_loc($loc($1)) } +// 289| QuestionOptional(binder~, ty = $3) +// 290| } +fn yy_action_488(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_228(_last_pos, _args[0:1]) + let _sub_action_1_result = yy_action_16(_args[1].2, _args[2:4]) + guard _sub_action_0_result is YYObj_String(_dollar1) + let _start_pos_of_item0 = _args[0].1 + let _end_pos_of_item0 = _args[0].2 + guard _sub_action_1_result is YYObj_Type_(_dollar3) + YYObj_Parameter({(); + let binder = Binder::{ name: _dollar1, loc: mk_loc((_start_pos_of_item0, _end_pos_of_item0)) } + QuestionOptional(binder~, ty = _dollar3) + }) +} + +// file:///./parser.mbty +// 287| lident_string "?" opt_annot { +// 288| let binder = Binder::{ name: $1, loc: mk_loc($loc($1)) } +// 289| QuestionOptional(binder~, ty = $3) +// 290| } +fn yy_action_489(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_228(_last_pos, _args[0:1]) + let _sub_action_1_result = yy_action_18(_args[1].2, _args[2:2]) + guard _sub_action_0_result is YYObj_String(_dollar1) + let _start_pos_of_item0 = _args[0].1 + let _end_pos_of_item0 = _args[0].2 + guard _sub_action_1_result is YYObj_Type_(_dollar3) + YYObj_Parameter({(); + let binder = Binder::{ name: _dollar1, loc: mk_loc((_start_pos_of_item0, _end_pos_of_item0)) } + QuestionOptional(binder~, ty = _dollar3) + }) +} + +// file:///./parser.mbty +// 274| binder opt_annot { Positional(binder = $1, ty = $2) } +fn yy_action_490(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_20(_last_pos, _args[0:1]) + let _sub_action_1_result = yy_action_18(_args[0].2, _args[1:1]) + guard _sub_action_0_result is YYObj_Binder(_dollar1) + guard _sub_action_1_result is YYObj_Type_(_dollar2) + YYObj_Parameter({(); Positional(binder = _dollar1, ty = _dollar2) }) +} + +// file:///./parser.mbty +// 279| POST_LABEL opt_annot "=" expr { +// 280| let binder = Binder::{ name: $1, loc: mk_loc($loc($1)).trim_last_char() } +// 281| Optional(binder~, ty = $2, default = $4) +// 282| } +fn yy_action_491(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_16(_args[0].2, _args[1:3]) + guard _args[0].0 is YYObj_String(_dollar1) + let _start_pos_of_item0 = _args[0].1 + let _end_pos_of_item0 = _args[0].2 + guard _sub_action_0_result is YYObj_Type_(_dollar2) + guard _args[4].0 is YYObj_Expr(_dollar4) + YYObj_Parameter({(); + let binder = Binder::{ name: _dollar1, loc: mk_loc((_start_pos_of_item0, _end_pos_of_item0)).trim_last_char() } + Optional(binder~, ty = _dollar2, default = _dollar4) + }) +} + +// file:///./parser.mbty +// 275| POST_LABEL opt_annot { +// 276| let binder = Binder::{ name: $1, loc: mk_loc($loc($1)).trim_last_char() } +// 277| Labelled(binder~, ty = $2) +// 278| } +fn yy_action_492(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _sub_action_0_result = yy_action_16(_args[0].2, _args[1:3]) guard _args[0].0 is YYObj_String(_dollar1) let _start_pos_of_item0 = _args[0].1 @@ -10728,11 +13185,11 @@ fn yy_action_409(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 273| POST_LABEL opt_annot "=" expr { -// 274| let binder = Binder::{ name: $1, loc: mk_loc($loc($1)).trim_last_char() } -// 275| Optional(binder~, ty = $2, default = $4) -// 276| } -fn yy_action_410(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 279| POST_LABEL opt_annot "=" expr { +// 280| let binder = Binder::{ name: $1, loc: mk_loc($loc($1)).trim_last_char() } +// 281| Optional(binder~, ty = $2, default = $4) +// 282| } +fn yy_action_493(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _sub_action_0_result = yy_action_18(_args[0].2, _args[1:1]) guard _args[0].0 is YYObj_String(_dollar1) let _start_pos_of_item0 = _args[0].1 @@ -10746,25 +13203,26 @@ fn yy_action_410(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 1882| simple_expr ".." LIDENT "(" list_commas(argument) ")" { -// 1883| let method_name = Label::{ name: $3, loc: mk_loc($loc($3)) } -// 1884| DotApply( -// 1885| self = $1, -// 1886| method_name~, -// 1887| args = $5, -// 1888| return_self = true, -// 1889| loc = mk_loc($sloc) -// 1890| ) -// 1891| } -fn yy_action_411(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[2].0 is YYObj_String(_dollar3) +// 1968| simple_expr ".." lident_string "(" list_commas(argument) ")" { +// 1969| let method_name = Label::{ name: $3, loc: mk_loc($loc($3)) } +// 1970| DotApply( +// 1971| self = $1, +// 1972| method_name~, +// 1973| args = $5, +// 1974| return_self = true, +// 1975| loc = mk_loc($sloc) +// 1976| ) +// 1977| } +fn yy_action_494(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_226(_args[1].2, _args[2:3]) + guard _sub_action_0_result is YYObj_String(_dollar3) let _start_pos_of_item2 = _args[2].1 let _end_pos_of_item2 = _args[2].2 guard _args[0].0 is YYObj_Expr(_dollar1) guard _args[4].0 is YYObj_List_Argument_(_dollar5) let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - YYObj_Expr({(); + YYObj_Expr({(); let method_name = Label::{ name: _dollar3, loc: mk_loc((_start_pos_of_item2, _end_pos_of_item2)) } DotApply( self = _dollar1, @@ -10777,2718 +13235,2686 @@ fn yy_action_411(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 1720| "!" prefix_expr { make_unot(loc = mk_loc($sloc), $2) } -fn yy_action_412(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) - let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - guard _args[1].0 is YYObj_Expr(_dollar2) - YYObj_Expr({(); make_unot(loc = mk_loc((_symbol_start_pos, _end_pos)), _dollar2) }) -} - -// file:///./parser.mbty -// 1534| "_" "=>" expr_statement_no_break_continue_return { -// 1535| make_arrow_fn(@list.singleton((Unnamed(mk_loc($loc($1))), None)), $3, params_loc = mk_loc($loc($1)), loc = mk_loc($sloc)) -// 1536| } -fn yy_action_413(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _start_pos_of_item0 = _args[0].1 - let _end_pos_of_item0 = _args[0].2 - guard _args[2].0 is YYObj_Expr(_dollar3) - let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) - let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - YYObj_Func({(); - make_arrow_fn(@list.singleton((Unnamed(mk_loc((_start_pos_of_item0, _end_pos_of_item0))), None)), _dollar3, params_loc = mk_loc((_start_pos_of_item0, _end_pos_of_item0)), loc = mk_loc((_symbol_start_pos, _end_pos))) - }) -} - -// file:///./parser.mbty -// 1872| simple_expr DOT_LIDENT "(" list_commas(argument) ")" { -// 1873| let method_name = Label::{ name: $2, loc: mk_loc($loc($2)) } -// 1874| DotApply( -// 1875| self = $1, -// 1876| method_name~, -// 1877| args = $4, -// 1878| return_self = false, -// 1879| loc = mk_loc($sloc) -// 1880| ) -// 1881| } -fn yy_action_414(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[1].0 is YYObj_String(_dollar2) - let _start_pos_of_item1 = _args[1].1 - let _end_pos_of_item1 = _args[1].2 +// 1968| simple_expr ".." lident_string "(" list_commas(argument) ")" { +// 1969| let method_name = Label::{ name: $3, loc: mk_loc($loc($3)) } +// 1970| DotApply( +// 1971| self = $1, +// 1972| method_name~, +// 1973| args = $5, +// 1974| return_self = true, +// 1975| loc = mk_loc($sloc) +// 1976| ) +// 1977| } +fn yy_action_495(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_228(_args[1].2, _args[2:3]) + guard _sub_action_0_result is YYObj_String(_dollar3) + let _start_pos_of_item2 = _args[2].1 + let _end_pos_of_item2 = _args[2].2 guard _args[0].0 is YYObj_Expr(_dollar1) - guard _args[3].0 is YYObj_List_Argument_(_dollar4) + guard _args[4].0 is YYObj_List_Argument_(_dollar5) let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - YYObj_Expr({(); - let method_name = Label::{ name: _dollar2, loc: mk_loc((_start_pos_of_item1, _end_pos_of_item1)) } + YYObj_Expr({(); + let method_name = Label::{ name: _dollar3, loc: mk_loc((_start_pos_of_item2, _end_pos_of_item2)) } DotApply( self = _dollar1, method_name~, - args = _dollar4, - return_self = false, + args = _dollar5, + return_self = true, loc = mk_loc((_symbol_start_pos, _end_pos)) ) }) } // file:///./parser.mbty -// 1734| simple_expr accessor { Field($1, $2) } -fn yy_action_415(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_416(_args[0].2, _args[1:2]) - guard _args[0].0 is YYObj_Expr(_dollar1) - guard _sub_action_0_result is YYObj_Accessor(_dollar2) - YYObj_LeftValue({(); Field(_dollar1, _dollar2) }) +// 1806| "!" prefix_expr { make_unot(loc = mk_loc($sloc), $2) } +fn yy_action_496(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) + let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } + guard _args[1].0 is YYObj_Expr(_dollar2) + YYObj_Expr({(); make_unot(loc = mk_loc((_symbol_start_pos, _end_pos)), _dollar2) }) } // file:///./parser.mbty -// 1892| simple_expr accessor %prec prec_field { -// 1893| Field(record = $1, accessor = $2, loc = mk_loc($sloc)) -// 1894| } -fn yy_action_417(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_416(_args[0].2, _args[1:2]) +// 1687| range_expr "as" type_name { +// 1688| As(expr = $1, trait_ = $3, loc = mk_loc($sloc)) +// 1689| } +fn yy_action_497(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj_Expr(_dollar1) - guard _sub_action_0_result is YYObj_Accessor(_dollar2) + guard _args[2].0 is YYObj_TypeName(_dollar3) let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } YYObj_Expr({(); - Field(record = _dollar1, accessor = _dollar2, loc = mk_loc((_symbol_start_pos, _end_pos))) + As(expr = _dollar1, trait_ = _dollar3, loc = mk_loc((_symbol_start_pos, _end_pos))) }) } // file:///./parser.mbty -// 1926| DOT_LIDENT { -// 1927| if $1 == "_" { -// 1928| Newtype(loc = mk_loc($loc($1))) -// 1929| } else { -// 1930| Label(Label::{ name: $1, loc: mk_loc($sloc) }) -// 1931| } -// 1932| } -fn yy_action_416(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[0].0 is YYObj_String(_dollar1) - let _start_pos_of_item0 = _args[0].1 - let _end_pos_of_item0 = _args[0].2 +// 1690| range_expr "is" range_pattern { +// 1691| Is(expr = $1, pat = $3, loc = mk_loc($sloc)) +// 1692| } +fn yy_action_498(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj_Expr(_dollar1) + guard _args[2].0 is YYObj_Pattern(_dollar3) let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - YYObj_Accessor({(); - if _dollar1 == "_" { - Newtype(loc = mk_loc((_start_pos_of_item0, _end_pos_of_item0))) - } else { - Label(Label::{ name: _dollar1, loc: mk_loc((_symbol_start_pos, _end_pos)) }) - } + YYObj_Expr({(); + Is(expr = _dollar1, pat = _dollar3, loc = mk_loc((_symbol_start_pos, _end_pos))) }) } // file:///./parser.mbty -// 1734| simple_expr accessor { Field($1, $2) } -fn yy_action_418(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_419(_args[0].2, _args[1:2]) +// 1696| range_expr "lexmatch?" lex_pattern "with" label { +// 1697| IsLexMatch(expr=$1, pat=$3, pat_loc=mk_loc($loc($3)), strategy = Some($5), loc=mk_loc($sloc)) +// 1698| } +fn yy_action_499(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_473(_args[3].2, _args[4:5]) guard _args[0].0 is YYObj_Expr(_dollar1) - guard _sub_action_0_result is YYObj_Accessor(_dollar2) - YYObj_LeftValue({(); Field(_dollar1, _dollar2) }) + guard _args[2].0 is YYObj__list_List_LexTopPattern_(_dollar3) + let _start_pos_of_item2 = _args[2].1 + let _end_pos_of_item2 = _args[2].2 + guard _sub_action_0_result is YYObj_Label(_dollar5) + let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) + let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } + YYObj_Expr({(); + IsLexMatch(expr=_dollar1, pat=_dollar3, pat_loc=mk_loc((_start_pos_of_item2, _end_pos_of_item2)), strategy = Some(_dollar5), loc=mk_loc((_symbol_start_pos, _end_pos))) + }) } // file:///./parser.mbty -// 1735| simple_expr "[" expr "]" { Array($1, $3) } -fn yy_action_420(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 1696| range_expr "lexmatch?" lex_pattern "with" label { +// 1697| IsLexMatch(expr=$1, pat=$3, pat_loc=mk_loc($loc($3)), strategy = Some($5), loc=mk_loc($sloc)) +// 1698| } +fn yy_action_500(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_501(_args[3].2, _args[4:5]) guard _args[0].0 is YYObj_Expr(_dollar1) - guard _args[2].0 is YYObj_Expr(_dollar3) - YYObj_LeftValue({(); Array(_dollar1, _dollar3) }) + guard _args[2].0 is YYObj__list_List_LexTopPattern_(_dollar3) + let _start_pos_of_item2 = _args[2].1 + let _end_pos_of_item2 = _args[2].2 + guard _sub_action_0_result is YYObj_Label(_dollar5) + let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) + let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } + YYObj_Expr({(); + IsLexMatch(expr=_dollar1, pat=_dollar3, pat_loc=mk_loc((_start_pos_of_item2, _end_pos_of_item2)), strategy = Some(_dollar5), loc=mk_loc((_symbol_start_pos, _end_pos))) + }) } // file:///./parser.mbty -// 1860| simple_expr "[" expr "]" { -// 1861| ArrayGet(array = $1, index = $3, loc = mk_loc($sloc)) -// 1862| } -fn yy_action_421(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 1693| range_expr "lexmatch?" lex_pattern %prec prec_LEXMATCH_QUESTION { +// 1694| IsLexMatch(expr=$1, pat=$3, pat_loc=mk_loc($loc($3)), strategy = None, loc=mk_loc($sloc)) +// 1695| } +fn yy_action_502(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj_Expr(_dollar1) - guard _args[2].0 is YYObj_Expr(_dollar3) + guard _args[2].0 is YYObj__list_List_LexTopPattern_(_dollar3) + let _start_pos_of_item2 = _args[2].1 + let _end_pos_of_item2 = _args[2].2 let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - YYObj_Expr({(); - ArrayGet(array = _dollar1, index = _dollar3, loc = mk_loc((_symbol_start_pos, _end_pos))) + YYObj_Expr({(); + IsLexMatch(expr=_dollar1, pat=_dollar3, pat_loc=mk_loc((_start_pos_of_item2, _end_pos_of_item2)), strategy = None, loc=mk_loc((_symbol_start_pos, _end_pos))) }) } // file:///./parser.mbty -// 1863| simple_expr "[" option(expr) ":" option(expr) "]" { -// 1864| ArrayGetSlice( -// 1865| array = $1, -// 1866| start_index = $3, -// 1867| end_index = $5, -// 1868| index_loc = mk_loc(($loc($2).0, $loc($6).1)), -// 1869| loc = mk_loc($sloc) -// 1870| ) -// 1871| } -fn yy_action_422(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 1699| range_expr "=~" regex_match_rhs { +// 1700| let (pat, bindings) = $3 +// 1701| RegexMatch(expr = $1, pat~, bindings~, loc = mk_loc($sloc)) +// 1702| } +fn yy_action_503(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[2].0 is YYObj__RegexPattern__List__Label__Binder____(_dollar3) guard _args[0].0 is YYObj_Expr(_dollar1) - guard _args[2].0 is YYObj_Option_Expr_(_dollar3) - guard _args[4].0 is YYObj_Option_Expr_(_dollar5) - let _start_pos_of_item1 = _args[1].1 - let _end_pos_of_item1 = _args[1].2 - let _start_pos_of_item5 = _args[5].1 - let _end_pos_of_item5 = _args[5].2 let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - YYObj_Expr({(); - ArrayGetSlice( - array = _dollar1, - start_index = _dollar3, - end_index = _dollar5, - index_loc = mk_loc(((_start_pos_of_item1, _end_pos_of_item1).0, (_start_pos_of_item5, _end_pos_of_item5).1)), - loc = mk_loc((_symbol_start_pos, _end_pos)) - ) + YYObj_Expr({(); + let (pat, bindings) = _dollar3 + RegexMatch(expr = _dollar1, pat~, bindings~, loc = mk_loc((_symbol_start_pos, _end_pos))) }) } // file:///./parser.mbty -// 2044| LIDENT "?" { -// 2045| let loc = mk_loc($loc($1)) -// 2046| let label = Label::{ name: $1, loc } -// 2047| let arg_value = @syntax.make_ident_expr(loc~, Var::{ name: Ident(name = $1), loc }) -// 2048| Argument::{ value: arg_value, kind: LabelledOptionPun(label~, question_loc = mk_loc($loc($2))) } -// 2049| } -fn yy_action_423(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _start_pos_of_item0 = _args[0].1 - let _end_pos_of_item0 = _args[0].2 - guard _args[0].0 is YYObj_String(_dollar1) - let _start_pos_of_item1 = _args[1].1 - let _end_pos_of_item1 = _args[1].2 - YYObj_Argument({(); - let loc = mk_loc((_start_pos_of_item0, _end_pos_of_item0)) - let label = Label::{ name: _dollar1, loc } - let arg_value = @syntax.make_ident_expr(loc~, Var::{ name: Ident(name = _dollar1), loc }) - Argument::{ value: arg_value, kind: LabelledOptionPun(label~, question_loc = mk_loc((_start_pos_of_item1, _end_pos_of_item1))) } - }) +// 1713| regex_atom_pattern { ($1, @list.empty()) } +fn yy_action_504(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj_RegexPattern(_dollar1) + YYObj__RegexPattern__List__Label__Binder____({(); (_dollar1, @list.empty()) }) } // file:///./parser.mbty -// 2026| "?" { Some(mk_loc($sloc)) } -fn yy_action_424(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) - let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - YYObj_Location_({(); Some(mk_loc((_symbol_start_pos, _end_pos))) }) +// 1714| "(" regex_as_pattern "," list_commas(regex_match_binding) ")" { ($2, $4) } +fn yy_action_505(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[1].0 is YYObj_RegexPattern(_dollar2) + guard _args[3].0 is YYObj_List__Label__Binder___(_dollar4) + YYObj__RegexPattern__List__Label__Binder____({(); (_dollar2, _dollar4) }) } // file:///./parser.mbty -// 2031| label optional_question "=" expr { -// 2032| let arg_kind : ArgumentKind = match $2 { -// 2033| Some(question_loc) => LabelledOption(label = $1, question_loc~) -// 2034| None => Labelled($1) -// 2035| } -// 2036| Argument::{ value: $4, kind: arg_kind } -// 2037| } -fn yy_action_425(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_426(_last_pos, _args[0:1]) - guard _args[1].0 is YYObj_Location_(_dollar2) - guard _sub_action_0_result is YYObj_Label(_dollar1) - guard _args[3].0 is YYObj_Expr(_dollar4) - YYObj_Argument({(); - let arg_kind : ArgumentKind = match _dollar2 { - Some(question_loc) => LabelledOption(label = _dollar1, question_loc~) - None => Labelled(_dollar1) - } - Argument::{ value: _dollar4, kind: arg_kind } - }) +// 213| non_empty_list_commas(X) { $1 } +fn yy_action_506(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj_List__Label__Binder___(_dollar1) + YYObj_List__Label__Binder___({(); _dollar1 }) } // file:///./parser.mbty -// 2027| { None } -fn yy_action_427(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - YYObj_Location_({(); None }) +// 1718| lident_string "=" binder { +// 1719| let label = Label::{ name : $1, loc : mk_loc($loc($1)) } +// 1720| (label, Some($3)) +// 1721| } +fn yy_action_507(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_226(_last_pos, _args[0:1]) + let _sub_action_1_result = yy_action_15(_args[1].2, _args[2:3]) + guard _sub_action_0_result is YYObj_String(_dollar1) + let _start_pos_of_item0 = _args[0].1 + let _end_pos_of_item0 = _args[0].2 + guard _sub_action_1_result is YYObj_Binder(_dollar3) + YYObj__Label__Binder__({(); + let label = Label::{ name : _dollar1, loc : mk_loc((_start_pos_of_item0, _end_pos_of_item0)) } + (label, Some(_dollar3)) + }) } // file:///./parser.mbty -// 2039| POST_LABEL { -// 2040| let label = Label::{ name: $1, loc: mk_loc($loc($1)) } -// 2041| let arg_value = @syntax.make_ident_expr(loc = mk_loc($loc($1)), Var::{ name: Ident(name = $1), loc: mk_loc($loc($1)) }) -// 2042| Argument::{ value: arg_value, kind: LabelledPun(label) } -// 2043| } -fn yy_action_428(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[0].0 is YYObj_String(_dollar1) +// 1718| lident_string "=" binder { +// 1719| let label = Label::{ name : $1, loc : mk_loc($loc($1)) } +// 1720| (label, Some($3)) +// 1721| } +fn yy_action_508(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_226(_last_pos, _args[0:1]) + let _sub_action_1_result = yy_action_20(_args[1].2, _args[2:3]) + guard _sub_action_0_result is YYObj_String(_dollar1) let _start_pos_of_item0 = _args[0].1 let _end_pos_of_item0 = _args[0].2 - YYObj_Argument({(); - let label = Label::{ name: _dollar1, loc: mk_loc((_start_pos_of_item0, _end_pos_of_item0)) } - let arg_value = @syntax.make_ident_expr(loc = mk_loc((_start_pos_of_item0, _end_pos_of_item0)), Var::{ name: Ident(name = _dollar1), loc: mk_loc((_start_pos_of_item0, _end_pos_of_item0)) }) - Argument::{ value: arg_value, kind: LabelledPun(label) } + guard _sub_action_1_result is YYObj_Binder(_dollar3) + YYObj__Label__Binder__({(); + let label = Label::{ name : _dollar1, loc : mk_loc((_start_pos_of_item0, _end_pos_of_item0)) } + (label, Some(_dollar3)) }) } // file:///./parser.mbty -// 1488| pipe_expr catch_keyword single_pattern_cases "}" else_keyword single_pattern_cases "}" { -// 1489| let catch_loc = $2 -// 1490| let else_loc = $5 -// 1491| Try( -// 1492| body = $1, -// 1493| catch_ = $3, -// 1494| try_else = Some($6), -// 1495| has_try = false, -// 1496| try_loc = mk_loc($loc($1)), -// 1497| catch_loc~, -// 1498| else_loc~, -// 1499| loc = mk_loc($sloc) -// 1500| ) -// 1501| } -fn yy_action_429(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_430(_args[3].2, _args[4:6]) - guard _args[1].0 is YYObj_Location(_dollar2) - guard _sub_action_0_result is YYObj_Location(_dollar5) - guard _args[0].0 is YYObj_Expr(_dollar1) - guard _args[2].0 is YYObj_List_Case_(_dollar3) - guard _args[6].0 is YYObj_List_Case_(_dollar6) +// 1718| lident_string "=" binder { +// 1719| let label = Label::{ name : $1, loc : mk_loc($loc($1)) } +// 1720| (label, Some($3)) +// 1721| } +fn yy_action_509(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_228(_last_pos, _args[0:1]) + let _sub_action_1_result = yy_action_15(_args[1].2, _args[2:3]) + guard _sub_action_0_result is YYObj_String(_dollar1) let _start_pos_of_item0 = _args[0].1 let _end_pos_of_item0 = _args[0].2 - let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) - let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - YYObj_Expr({(); - let catch_loc = _dollar2 - let else_loc = _dollar5 - Try( - body = _dollar1, - catch_ = _dollar3, - try_else = Some(_dollar6), - has_try = false, - try_loc = mk_loc((_start_pos_of_item0, _end_pos_of_item0)), - catch_loc~, - else_loc~, - loc = mk_loc((_symbol_start_pos, _end_pos)) - ) + guard _sub_action_1_result is YYObj_Binder(_dollar3) + YYObj__Label__Binder__({(); + let label = Label::{ name : _dollar1, loc : mk_loc((_start_pos_of_item0, _end_pos_of_item0)) } + (label, Some(_dollar3)) }) } // file:///./parser.mbty -// 1475| pipe_expr catch_keyword single_pattern_cases "}" { -// 1476| let catch_loc = $2 -// 1477| Try( -// 1478| body = $1, -// 1479| catch_ = $3, -// 1480| try_else = None, -// 1481| has_try = false, -// 1482| try_loc = mk_loc($loc($1)), -// 1483| catch_loc~, -// 1484| else_loc = Location::{ start: Position::{ fname: "", lnum: 0, bol: 0, cnum: 0 }, end: Position::{ fname: "", lnum: 0, bol: 0, cnum: 0 } }, -// 1485| loc = mk_loc($sloc) -// 1486| ) -// 1487| } -fn yy_action_431(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[1].0 is YYObj_Location(_dollar2) - guard _args[0].0 is YYObj_Expr(_dollar1) - guard _args[2].0 is YYObj_List_Case_(_dollar3) +// 1718| lident_string "=" binder { +// 1719| let label = Label::{ name : $1, loc : mk_loc($loc($1)) } +// 1720| (label, Some($3)) +// 1721| } +fn yy_action_510(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_228(_last_pos, _args[0:1]) + let _sub_action_1_result = yy_action_20(_args[1].2, _args[2:3]) + guard _sub_action_0_result is YYObj_String(_dollar1) let _start_pos_of_item0 = _args[0].1 let _end_pos_of_item0 = _args[0].2 - let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) - let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - YYObj_Expr({(); - let catch_loc = _dollar2 - Try( - body = _dollar1, - catch_ = _dollar3, - try_else = None, - has_try = false, - try_loc = mk_loc((_start_pos_of_item0, _end_pos_of_item0)), - catch_loc~, - else_loc = Location::{ start: Position::{ fname: "", lnum: 0, bol: 0, cnum: 0 }, end: Position::{ fname: "", lnum: 0, bol: 0, cnum: 0 } }, - loc = mk_loc((_symbol_start_pos, _end_pos)) - ) + guard _sub_action_1_result is YYObj_Binder(_dollar3) + YYObj__Label__Binder__({(); + let label = Label::{ name : _dollar1, loc : mk_loc((_start_pos_of_item0, _end_pos_of_item0)) } + (label, Some(_dollar3)) }) } // file:///./parser.mbty -// 1514| binder "=>" "{" list_semis_rev(statement) "}" { -// 1515| let body = Statement::compact_rev($4, loc = mk_loc($loc($3)).merge(mk_loc($loc($5)))) -// 1516| make_arrow_fn(@list.singleton((Named($1), None)), body, params_loc = mk_loc($loc($1)), loc = mk_loc($sloc)) -// 1517| } -fn yy_action_432(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_15(_last_pos, _args[0:1]) - guard _args[3].0 is YYObj_List_Statement_(_dollar4) - let _start_pos_of_item2 = _args[2].1 - let _end_pos_of_item2 = _args[2].2 - let _start_pos_of_item4 = _args[4].1 - let _end_pos_of_item4 = _args[4].2 - guard _sub_action_0_result is YYObj_Binder(_dollar1) +// 1722| POST_LABEL { +// 1723| let label = Label::{ name : $1, loc : mk_loc($loc($1)) } +// 1724| (label, None) +// 1725| } +fn yy_action_511(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj_String(_dollar1) let _start_pos_of_item0 = _args[0].1 let _end_pos_of_item0 = _args[0].2 - let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) - let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - YYObj_Func({(); - let body = Statement::compact_rev(_dollar4, loc = mk_loc((_start_pos_of_item2, _end_pos_of_item2)).merge(mk_loc((_start_pos_of_item4, _end_pos_of_item4)))) - make_arrow_fn(@list.singleton((Named(_dollar1), None)), body, params_loc = mk_loc((_start_pos_of_item0, _end_pos_of_item0)), loc = mk_loc((_symbol_start_pos, _end_pos))) + YYObj__Label__Binder__({(); + let label = Label::{ name : _dollar1, loc : mk_loc((_start_pos_of_item0, _end_pos_of_item0)) } + (label, None) }) } // file:///./parser.mbty -// 1551| binder ioption(",") ")" { @list.singleton(Named($1)) } -fn yy_action_433(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_15(_last_pos, _args[0:1]) - let _sub_action_1_result = yy_action_434(_args[0].2, _args[1:1]) - guard _sub_action_0_result is YYObj_Binder(_dollar1) - YYObj_List_ArrowFnParam_({(); @list.singleton(Named(_dollar1)) }) +// 196| non_empty_list_commas_rev(X) "," X { $1.add($3) } +fn yy_action_512(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj_List__Label__Binder___(_dollar1) + guard _args[2].0 is YYObj__Label__Binder__(_dollar3) + YYObj_List__Label__Binder___({(); _dollar1.add(_dollar3) }) } // file:///./parser.mbty -// 1551| binder ioption(",") ")" { @list.singleton(Named($1)) } -fn yy_action_435(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_15(_last_pos, _args[0:1]) - let _sub_action_1_result = yy_action_436(_args[0].2, _args[1:2]) - guard _sub_action_0_result is YYObj_Binder(_dollar1) - YYObj_List_ArrowFnParam_({(); @list.singleton(Named(_dollar1)) }) +// 204| non_empty_list_commas_rev(X) option(",") { $1.rev() } +fn yy_action_513(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj_List__Label__Binder___(_dollar1) + YYObj_List__Label__Binder___({(); _dollar1.rev() }) } // file:///./parser.mbty -// 1553| binder "," arrow_fn_prefix_no_constraint { $3.add(Named($1)) } -fn yy_action_437(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_15(_last_pos, _args[0:1]) - guard _args[2].0 is YYObj_List_ArrowFnParam_(_dollar3) - guard _sub_action_0_result is YYObj_Binder(_dollar1) - YYObj_List_ArrowFnParam_({(); _dollar3.add(Named(_dollar1)) }) +// 195| X { @list.singleton($1) } +fn yy_action_514(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj__Label__Binder__(_dollar1) + YYObj_List__Label__Binder___({(); @list.singleton(_dollar1) }) } // file:///./parser.mbty -// 1775| binder "," non_empty_tuple_elems_with_prefix { $3.add(@syntax.binder_to_expr($1)) } -fn yy_action_438(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_15(_last_pos, _args[0:1]) - guard _args[2].0 is YYObj_List_Expr_(_dollar3) - guard _sub_action_0_result is YYObj_Binder(_dollar1) - YYObj_List_Expr_({(); _dollar3.add(@syntax.binder_to_expr(_dollar1)) }) +// 212| { @list.empty() } +fn yy_action_515(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + YYObj_List__Label__Binder___({(); @list.empty() }) } // file:///./parser.mbty -// 1799| "(" binder ":" type_ ")" { Constraint(expr = @syntax.binder_to_expr($2), ty = $4, loc = mk_loc($sloc)) } -fn yy_action_439(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_15(_args[0].2, _args[1:2]) - guard _sub_action_0_result is YYObj_Binder(_dollar2) - guard _args[3].0 is YYObj_Type(_dollar4) +// 1703| range_expr "<+" template_rhs { +// 1704| TemplateWriting(expr = $1, template = $3, is_conditional = false, loc = mk_loc($sloc)) +// 1705| } +fn yy_action_516(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj_Expr(_dollar1) + guard _args[2].0 is YYObj_Expr(_dollar3) let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - YYObj_Expr({(); Constraint(expr = @syntax.binder_to_expr(_dollar2), ty = _dollar4, loc = mk_loc((_symbol_start_pos, _end_pos))) }) + YYObj_Expr({(); + TemplateWriting(expr = _dollar1, template = _dollar3, is_conditional = false, loc = mk_loc((_symbol_start_pos, _end_pos))) + }) } // file:///./parser.mbty -// 1506| "(" arrow_fn_prefix "=>" "{" list_semis_rev(statement) "}" { -// 1507| let body = Statement::compact_rev($5, loc = mk_loc($loc($4)).merge(mk_loc($loc($6)))) -// 1508| make_arrow_fn($2, body, params_loc = mk_loc($loc($1)).merge(mk_loc($loc($2))), loc = mk_loc($sloc)) -// 1509| } -fn yy_action_440(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[4].0 is YYObj_List_Statement_(_dollar5) - let _start_pos_of_item3 = _args[3].1 - let _end_pos_of_item3 = _args[3].2 - let _start_pos_of_item5 = _args[5].1 - let _end_pos_of_item5 = _args[5].2 - guard _args[1].0 is YYObj_List__ArrowFnParam__Type___(_dollar2) - let _start_pos_of_item0 = _args[0].1 - let _end_pos_of_item0 = _args[0].2 - let _start_pos_of_item1 = _args[1].1 - let _end_pos_of_item1 = _args[1].2 +// 1155| INTERP { +// 1156| make_interp_expr(loc = mk_loc($sloc), $1) +// 1157| } +fn yy_action_517(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - YYObj_Func({(); - let body = Statement::compact_rev(_dollar5, loc = mk_loc((_start_pos_of_item3, _end_pos_of_item3)).merge(mk_loc((_start_pos_of_item5, _end_pos_of_item5)))) - make_arrow_fn(_dollar2, body, params_loc = mk_loc((_start_pos_of_item0, _end_pos_of_item0)).merge(mk_loc((_start_pos_of_item1, _end_pos_of_item1))), loc = mk_loc((_symbol_start_pos, _end_pos))) + guard _args[0].0 is YYObj_InterpLiteral(_dollar1) + YYObj_Expr({(); + make_interp_expr(loc = mk_loc((_symbol_start_pos, _end_pos)), _dollar1) }) } // file:///./parser.mbty -// 1510| "(" ")" "=>" "{" list_semis_rev(statement) "}" { -// 1511| let body = Statement::compact_rev($5, loc = mk_loc($loc($4)).merge(mk_loc($loc($6)))) -// 1512| make_arrow_fn(@list.empty(), body, params_loc = mk_loc($loc($1)).merge(mk_loc($loc($2))),loc = mk_loc($sloc)) -// 1513| } -fn yy_action_441(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[4].0 is YYObj_List_Statement_(_dollar5) - let _start_pos_of_item3 = _args[3].1 - let _end_pos_of_item3 = _args[3].2 - let _start_pos_of_item5 = _args[5].1 - let _end_pos_of_item5 = _args[5].2 - let _start_pos_of_item0 = _args[0].1 - let _end_pos_of_item0 = _args[0].2 - let _start_pos_of_item1 = _args[1].1 - let _end_pos_of_item1 = _args[1].2 +// 1158| BYTES { +// 1159| Expr::Constant(c = @syntax.Constant::Bytes($1), loc = mk_loc($sloc)) +// 1160| } +fn yy_action_518(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj_StringLiteral(_dollar1) let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - YYObj_Func({(); - let body = Statement::compact_rev(_dollar5, loc = mk_loc((_start_pos_of_item3, _end_pos_of_item3)).merge(mk_loc((_start_pos_of_item5, _end_pos_of_item5)))) - make_arrow_fn(@list.empty(), body, params_loc = mk_loc((_start_pos_of_item0, _end_pos_of_item0)).merge(mk_loc((_start_pos_of_item1, _end_pos_of_item1))),loc = mk_loc((_symbol_start_pos, _end_pos))) + YYObj_Expr({(); + Expr::Constant(c = @syntax.Constant::Bytes(_dollar1), loc = mk_loc((_symbol_start_pos, _end_pos))) }) } // file:///./parser.mbty -// 1054| "let" pattern opt_annot "=" expr { -// 1055| let pat = match $3 { -// 1056| None => $2 -// 1057| Some(ty) => Pattern::Constraint(pat = $2, ty~, loc = mk_loc($sloc)) -// 1058| } -// 1059| StmtLet(pat~, expr = $5, loc = mk_loc($sloc)) -// 1060| } -fn yy_action_442(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_18(_args[1].2, _args[2:2]) - guard _sub_action_0_result is YYObj_Type_(_dollar3) - guard _args[1].0 is YYObj_Pattern(_dollar2) +// 1161| BYTES_INTERP { +// 1162| make_bytes_interp_expr(loc = mk_loc($sloc), $1) +// 1163| } +fn yy_action_519(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - guard _args[3].0 is YYObj_Expr(_dollar5) - YYObj_Statement({(); - let pat = match _dollar3 { - None => _dollar2 - Some(ty) => Pattern::Constraint(pat = _dollar2, ty~, loc = mk_loc((_symbol_start_pos, _end_pos))) - } - StmtLet(pat~, expr = _dollar5, loc = mk_loc((_symbol_start_pos, _end_pos))) + guard _args[0].0 is YYObj_InterpLiteral(_dollar1) + YYObj_Expr({(); + make_bytes_interp_expr(loc = mk_loc((_symbol_start_pos, _end_pos)), _dollar1) }) } // file:///./parser.mbty -// 1054| "let" pattern opt_annot "=" expr { -// 1055| let pat = match $3 { -// 1056| None => $2 -// 1057| Some(ty) => Pattern::Constraint(pat = $2, ty~, loc = mk_loc($sloc)) -// 1058| } -// 1059| StmtLet(pat~, expr = $5, loc = mk_loc($sloc)) -// 1060| } -fn yy_action_443(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_16(_args[1].2, _args[2:4]) - guard _sub_action_0_result is YYObj_Type_(_dollar3) - guard _args[1].0 is YYObj_Pattern(_dollar2) +// 1164| STRING { +// 1165| Expr::Constant(c = @syntax.Constant::String($1), loc = mk_loc($sloc)) +// 1166| } +fn yy_action_520(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj_StringLiteral(_dollar1) let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - guard _args[5].0 is YYObj_Expr(_dollar5) - YYObj_Statement({(); - let pat = match _dollar3 { - None => _dollar2 - Some(ty) => Pattern::Constraint(pat = _dollar2, ty~, loc = mk_loc((_symbol_start_pos, _end_pos))) - } - StmtLet(pat~, expr = _dollar5, loc = mk_loc((_symbol_start_pos, _end_pos))) + YYObj_Expr({(); + Expr::Constant(c = @syntax.Constant::String(_dollar1), loc = mk_loc((_symbol_start_pos, _end_pos))) }) } // file:///./parser.mbty -// 1065| "let" "mut" binder opt_annot "=" expr { -// 1066| StmtLetmut(binder = $3, ty_opt = $4, expr = $6, loc = mk_loc($sloc)) -// 1067| } -fn yy_action_444(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_15(_args[1].2, _args[2:3]) - let _sub_action_1_result = yy_action_18(_args[2].2, _args[3:3]) - guard _sub_action_0_result is YYObj_Binder(_dollar3) - guard _sub_action_1_result is YYObj_Type_(_dollar4) - guard _args[4].0 is YYObj_Expr(_dollar6) +// 1167| non_empty_list(multiline_string) { +// 1168| Expr::MultilineString(elems = $1, loc = mk_loc($sloc)) +// 1169| } +fn yy_action_521(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj_List_MultilineStringElem_(_dollar1) let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - YYObj_Statement({(); - StmtLetmut(binder = _dollar3, ty_opt = _dollar4, expr = _dollar6, loc = mk_loc((_symbol_start_pos, _end_pos))) + YYObj_Expr({(); + Expr::MultilineString(elems = _dollar1, loc = mk_loc((_symbol_start_pos, _end_pos))) }) } // file:///./parser.mbty -// 1065| "let" "mut" binder opt_annot "=" expr { -// 1066| StmtLetmut(binder = $3, ty_opt = $4, expr = $6, loc = mk_loc($sloc)) -// 1067| } -fn yy_action_445(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_15(_args[1].2, _args[2:3]) - let _sub_action_1_result = yy_action_16(_args[2].2, _args[3:5]) - guard _sub_action_0_result is YYObj_Binder(_dollar3) - guard _sub_action_1_result is YYObj_Type_(_dollar4) - guard _args[6].0 is YYObj_Expr(_dollar6) +// 1170| "{" list_commas(template_object_elem) "}" { +// 1171| Map(elems = $2, loc = mk_loc($sloc)) +// 1172| } +fn yy_action_522(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[1].0 is YYObj_List_MapExprElem_(_dollar2) let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - YYObj_Statement({(); - StmtLetmut(binder = _dollar3, ty_opt = _dollar4, expr = _dollar6, loc = mk_loc((_symbol_start_pos, _end_pos))) + YYObj_Expr({(); + Map(elems = _dollar2, loc = mk_loc((_symbol_start_pos, _end_pos))) }) } // file:///./parser.mbty -// 1061| "letrec" binder opt_annot "=" letand_func list(and_func) { -// 1062| let bindings = $6.add(($2, $3, $5)) -// 1063| StmtLetand(bindings~, loc = mk_loc($sloc)) -// 1064| } -fn yy_action_446(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_15(_args[0].2, _args[1:2]) - let _sub_action_1_result = yy_action_18(_args[1].2, _args[2:2]) - guard _args[4].0 is YYObj__list_List__Binder__Type___Func__(_dollar6) - guard _sub_action_0_result is YYObj_Binder(_dollar2) - guard _sub_action_1_result is YYObj_Type_(_dollar3) - guard _args[3].0 is YYObj_Func(_dollar5) - let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) - let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - YYObj_Statement({(); - let bindings = _dollar6.add((_dollar2, _dollar3, _dollar5)) - StmtLetand(bindings~, loc = mk_loc((_symbol_start_pos, _end_pos))) - }) +// 213| non_empty_list_commas(X) { $1 } +fn yy_action_523(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj_List_MapExprElem_(_dollar1) + YYObj_List_MapExprElem_({(); _dollar1 }) } // file:///./parser.mbty -// 1061| "letrec" binder opt_annot "=" letand_func list(and_func) { -// 1062| let bindings = $6.add(($2, $3, $5)) -// 1063| StmtLetand(bindings~, loc = mk_loc($sloc)) -// 1064| } -fn yy_action_447(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_15(_args[0].2, _args[1:2]) - let _sub_action_1_result = yy_action_16(_args[1].2, _args[2:4]) - guard _args[6].0 is YYObj__list_List__Binder__Type___Func__(_dollar6) - guard _sub_action_0_result is YYObj_Binder(_dollar2) - guard _sub_action_1_result is YYObj_Type_(_dollar3) - guard _args[5].0 is YYObj_Func(_dollar5) +// 1176| STRING ":" expr { +// 1177| MapExprElem::{ +// 1178| key: @syntax.Constant::String($1), +// 1179| expr: $3, +// 1180| key_loc: mk_loc($loc($1)), +// 1181| loc: mk_loc($sloc) +// 1182| } +// 1183| } +fn yy_action_524(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj_StringLiteral(_dollar1) + guard _args[2].0 is YYObj_Expr(_dollar3) + let _start_pos_of_item0 = _args[0].1 + let _end_pos_of_item0 = _args[0].2 let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - YYObj_Statement({(); - let bindings = _dollar6.add((_dollar2, _dollar3, _dollar5)) - StmtLetand(bindings~, loc = mk_loc((_symbol_start_pos, _end_pos))) + YYObj_MapExprElem({(); + MapExprElem::{ + key: @syntax.Constant::String(_dollar1), + expr: _dollar3, + key_loc: mk_loc((_start_pos_of_item0, _end_pos_of_item0)), + loc: mk_loc((_symbol_start_pos, _end_pos)) + } }) } // file:///./parser.mbty -// 1050| "and" binder opt_annot "=" letand_func { ($2, $3, $5) } -fn yy_action_448(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_15(_args[0].2, _args[1:2]) - let _sub_action_1_result = yy_action_18(_args[1].2, _args[2:2]) - guard _sub_action_0_result is YYObj_Binder(_dollar2) - guard _sub_action_1_result is YYObj_Type_(_dollar3) - guard _args[3].0 is YYObj_Func(_dollar5) - YYObj__Binder__Type___Func_({(); (_dollar2, _dollar3, _dollar5) }) +// 1617| "_" "=>" expr_statement_no_break_continue_return { +// 1618| make_arrow_fn(@list.singleton((Unnamed(mk_loc($loc($1))), None)), $3, params_loc = mk_loc($loc($1)), loc = mk_loc($sloc)) +// 1619| } +fn yy_action_525(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _start_pos_of_item0 = _args[0].1 + let _end_pos_of_item0 = _args[0].2 + guard _args[2].0 is YYObj_Expr(_dollar3) + let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) + let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } + YYObj_Func({(); + make_arrow_fn(@list.singleton((Unnamed(mk_loc((_start_pos_of_item0, _end_pos_of_item0))), None)), _dollar3, params_loc = mk_loc((_start_pos_of_item0, _end_pos_of_item0)), loc = mk_loc((_symbol_start_pos, _end_pos))) + }) } // file:///./parser.mbty -// 1045| arrow_fn_expr { $1 } -fn yy_action_449(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[0].0 is YYObj_Func(_dollar1) - YYObj_Func({(); _dollar1 }) -} - -// file:///./parser.mbty -// 1046| anony_fn { $1 } -fn yy_action_450(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[0].0 is YYObj_Func(_dollar1) - YYObj_Func({(); _dollar1 }) -} - -// file:///./parser.mbty -// 1050| "and" binder opt_annot "=" letand_func { ($2, $3, $5) } -fn yy_action_451(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_15(_args[0].2, _args[1:2]) - let _sub_action_1_result = yy_action_16(_args[1].2, _args[2:4]) - guard _sub_action_0_result is YYObj_Binder(_dollar2) - guard _sub_action_1_result is YYObj_Type_(_dollar3) - guard _args[5].0 is YYObj_Func(_dollar5) - YYObj__Binder__Type___Func_({(); (_dollar2, _dollar3, _dollar5) }) -} - -// file:///./parser.mbty -// 263| ioption(annot) { $1 } -fn yy_action_16(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_452(_last_pos, _args[0:2]) - guard _sub_action_0_result is YYObj_Option_Type_(_dollar1) - YYObj_Type_({(); _dollar1 }) -} - -// file:///./stdlib.mbty -// 10| X { Some($1) } -fn yy_action_452(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_453(_last_pos, _args[0:2]) - guard _sub_action_0_result is YYObj_Type(_dollar1) - YYObj_Option_Type_({(); Some(_dollar1) }) -} - -// file:///./stdlib.mbty -// 45| X list(X) { $2.add($1) } -fn yy_action_454(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[1].0 is YYObj__list_List__Binder__Type___Func__(_dollar2) - guard _args[0].0 is YYObj__Binder__Type___Func_(_dollar1) - YYObj__list_List__Binder__Type___Func__({(); _dollar2.add(_dollar1) }) -} - -// file:///./stdlib.mbty -// 44| { @list.empty() } -fn yy_action_455(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - YYObj__list_List__Binder__Type___Func__({(); @list.empty() }) -} - -// file:///./parser.mbty -// 1525| "(" arrow_fn_prefix "=>" expr_statement_no_break_continue_return { -// 1526| make_arrow_fn($2, $4, params_loc = mk_loc($loc($1)).merge(mk_loc($loc($2))), loc = mk_loc($sloc)) -// 1527| } -fn yy_action_456(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[1].0 is YYObj_List__ArrowFnParam__Type___(_dollar2) - guard _args[3].0 is YYObj_Expr(_dollar4) - let _start_pos_of_item0 = _args[0].1 - let _end_pos_of_item0 = _args[0].2 +// 1958| simple_expr DOT_LIDENT "(" list_commas(argument) ")" { +// 1959| let method_name = Label::{ name: $2, loc: mk_loc($loc($2)) } +// 1960| DotApply( +// 1961| self = $1, +// 1962| method_name~, +// 1963| args = $4, +// 1964| return_self = false, +// 1965| loc = mk_loc($sloc) +// 1966| ) +// 1967| } +fn yy_action_526(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[1].0 is YYObj_String(_dollar2) let _start_pos_of_item1 = _args[1].1 let _end_pos_of_item1 = _args[1].2 + guard _args[0].0 is YYObj_Expr(_dollar1) + guard _args[3].0 is YYObj_List_Argument_(_dollar4) let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - YYObj_Func({(); - make_arrow_fn(_dollar2, _dollar4, params_loc = mk_loc((_start_pos_of_item0, _end_pos_of_item0)).merge(mk_loc((_start_pos_of_item1, _end_pos_of_item1))), loc = mk_loc((_symbol_start_pos, _end_pos))) + YYObj_Expr({(); + let method_name = Label::{ name: _dollar2, loc: mk_loc((_start_pos_of_item1, _end_pos_of_item1)) } + DotApply( + self = _dollar1, + method_name~, + args = _dollar4, + return_self = false, + loc = mk_loc((_symbol_start_pos, _end_pos)) + ) }) } // file:///./parser.mbty -// 1528| "(" ")" "=>" expr_statement_no_break_continue_return { -// 1529| make_arrow_fn(@list.empty(), $4, params_loc = mk_loc($loc($1)).merge(mk_loc($loc($2))),loc = mk_loc($sloc)) -// 1530| } -fn yy_action_457(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[3].0 is YYObj_Expr(_dollar4) - let _start_pos_of_item0 = _args[0].1 - let _end_pos_of_item0 = _args[0].2 - let _start_pos_of_item1 = _args[1].1 - let _end_pos_of_item1 = _args[1].2 - let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) - let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - YYObj_Func({(); - make_arrow_fn(@list.empty(), _dollar4, params_loc = mk_loc((_start_pos_of_item0, _end_pos_of_item0)).merge(mk_loc((_start_pos_of_item1, _end_pos_of_item1))),loc = mk_loc((_symbol_start_pos, _end_pos))) - }) +// 1820| simple_expr accessor { Field($1, $2) } +fn yy_action_527(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_528(_args[0].2, _args[1:2]) + guard _args[0].0 is YYObj_Expr(_dollar1) + guard _sub_action_0_result is YYObj_Accessor(_dollar2) + YYObj_LeftValue({(); Field(_dollar1, _dollar2) }) } // file:///./parser.mbty -// 1068| is_async "fn" binder parameters func_return_type block_expr { -// 1069| let (return_type, error_type) = $5 -// 1070| let func = Func::{ -// 1071| parameters : $4, -// 1072| params_loc : mk_loc($loc($4)), -// 1073| body : $6, -// 1074| return_type, -// 1075| error_type, -// 1076| kind : Lambda, -// 1077| is_async : $1, -// 1078| loc : mk_loc($sloc) -// 1079| } -// 1080| StmtFunc(binder = $3, func~, loc = mk_loc($sloc)) -// 1081| } -fn yy_action_458(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_5(_last_pos, _args[0:1]) - let _sub_action_1_result = yy_action_15(_args[1].2, _args[2:3]) - guard _args[4].0 is YYObj__Type___ErrorType_(_dollar5) - guard _args[3].0 is YYObj_List_Parameter_(_dollar4) - let _start_pos_of_item3 = _args[3].1 - let _end_pos_of_item3 = _args[3].2 - guard _args[5].0 is YYObj_Expr(_dollar6) - guard _sub_action_0_result is YYObj_Location_(_dollar1) +// 1978| simple_expr accessor %prec prec_field { +// 1979| Field(record = $1, accessor = $2, loc = mk_loc($sloc)) +// 1980| } +fn yy_action_529(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_528(_args[0].2, _args[1:2]) + guard _args[0].0 is YYObj_Expr(_dollar1) + guard _sub_action_0_result is YYObj_Accessor(_dollar2) let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - guard _sub_action_1_result is YYObj_Binder(_dollar3) - YYObj_Statement({(); - let (return_type, error_type) = _dollar5 - let func = Func::{ - parameters : _dollar4, - params_loc : mk_loc((_start_pos_of_item3, _end_pos_of_item3)), - body : _dollar6, - return_type, - error_type, - kind : Lambda, - is_async : _dollar1, - loc : mk_loc((_symbol_start_pos, _end_pos)) - } - StmtFunc(binder = _dollar3, func~, loc = mk_loc((_symbol_start_pos, _end_pos))) + YYObj_Expr({(); + Field(record = _dollar1, accessor = _dollar2, loc = mk_loc((_symbol_start_pos, _end_pos))) }) } // file:///./parser.mbty -// 1068| is_async "fn" binder parameters func_return_type block_expr { -// 1069| let (return_type, error_type) = $5 -// 1070| let func = Func::{ -// 1071| parameters : $4, -// 1072| params_loc : mk_loc($loc($4)), -// 1073| body : $6, -// 1074| return_type, -// 1075| error_type, -// 1076| kind : Lambda, -// 1077| is_async : $1, -// 1078| loc : mk_loc($sloc) -// 1079| } -// 1080| StmtFunc(binder = $3, func~, loc = mk_loc($sloc)) -// 1081| } -fn yy_action_459(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_8(_last_pos, _args[0:0]) - let _sub_action_1_result = yy_action_15(_args[0].2, _args[1:2]) - guard _args[3].0 is YYObj__Type___ErrorType_(_dollar5) - guard _args[2].0 is YYObj_List_Parameter_(_dollar4) - let _start_pos_of_item3 = _args[2].1 - let _end_pos_of_item3 = _args[2].2 - guard _args[4].0 is YYObj_Expr(_dollar6) - guard _sub_action_0_result is YYObj_Location_(_dollar1) +// 2035| DOT_LIDENT { +// 2036| if $1 == "_" { +// 2037| Newtype(loc = mk_loc($loc($1))) +// 2038| } else { +// 2039| Label(Label::{ name: $1, loc: mk_loc($sloc) }) +// 2040| } +// 2041| } +fn yy_action_528(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj_String(_dollar1) + let _start_pos_of_item0 = _args[0].1 + let _end_pos_of_item0 = _args[0].2 let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - guard _sub_action_1_result is YYObj_Binder(_dollar3) - YYObj_Statement({(); - let (return_type, error_type) = _dollar5 - let func = Func::{ - parameters : _dollar4, - params_loc : mk_loc((_start_pos_of_item3, _end_pos_of_item3)), - body : _dollar6, - return_type, - error_type, - kind : Lambda, - is_async : _dollar1, - loc : mk_loc((_symbol_start_pos, _end_pos)) + YYObj_Accessor({(); + if _dollar1 == "_" { + Newtype(loc = mk_loc((_start_pos_of_item0, _end_pos_of_item0))) + } else { + Label(Label::{ name: _dollar1, loc: mk_loc((_symbol_start_pos, _end_pos)) }) } - StmtFunc(binder = _dollar3, func~, loc = mk_loc((_symbol_start_pos, _end_pos))) }) } // file:///./parser.mbty -// 1082| guard_statement { $1 } -fn yy_action_460(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[0].0 is YYObj_Statement(_dollar1) - YYObj_Statement({(); _dollar1 }) +// 1820| simple_expr accessor { Field($1, $2) } +fn yy_action_530(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_531(_args[0].2, _args[1:2]) + guard _args[0].0 is YYObj_Expr(_dollar1) + guard _sub_action_0_result is YYObj_Accessor(_dollar2) + YYObj_LeftValue({(); Field(_dollar1, _dollar2) }) } // file:///./parser.mbty -// 1083| "defer" pipe_expr { StmtDefer(expr = $2, loc = mk_loc($sloc)) } -fn yy_action_461(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[1].0 is YYObj_Expr(_dollar2) - let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) - let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - YYObj_Statement({(); StmtDefer(expr = _dollar2, loc = mk_loc((_symbol_start_pos, _end_pos))) }) +// 1821| simple_expr "[" expr "]" { Array($1, $3) } +fn yy_action_532(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj_Expr(_dollar1) + guard _args[2].0 is YYObj_Expr(_dollar3) + YYObj_LeftValue({(); Array(_dollar1, _dollar3) }) } // file:///./parser.mbty -// 1084| "proof_assert" expr { -// 1085| StmtExpr(ProofAssert(expr = $2, loc = mk_loc($sloc))) -// 1086| } -fn yy_action_462(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[1].0 is YYObj_Expr(_dollar2) +// 1946| simple_expr "[" expr "]" { +// 1947| ArrayGet(array = $1, index = $3, loc = mk_loc($sloc)) +// 1948| } +fn yy_action_533(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj_Expr(_dollar1) + guard _args[2].0 is YYObj_Expr(_dollar3) let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - YYObj_Statement({(); - StmtExpr(ProofAssert(expr = _dollar2, loc = mk_loc((_symbol_start_pos, _end_pos)))) + YYObj_Expr({(); + ArrayGet(array = _dollar1, index = _dollar3, loc = mk_loc((_symbol_start_pos, _end_pos))) }) } // file:///./parser.mbty -// 1087| "proof_let" binder "=" expr { -// 1088| StmtExpr(ProofLet(binder = $2, expr = $4, loc = mk_loc($sloc))) -// 1089| } -fn yy_action_463(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_15(_args[0].2, _args[1:2]) - guard _sub_action_0_result is YYObj_Binder(_dollar2) - guard _args[3].0 is YYObj_Expr(_dollar4) +// 1949| simple_expr "[" option(expr) ":" option(expr) "]" { +// 1950| ArrayGetSlice( +// 1951| array = $1, +// 1952| start_index = $3, +// 1953| end_index = $5, +// 1954| index_loc = mk_loc(($loc($2).0, $loc($6).1)), +// 1955| loc = mk_loc($sloc) +// 1956| ) +// 1957| } +fn yy_action_534(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj_Expr(_dollar1) + guard _args[2].0 is YYObj_Option_Expr_(_dollar3) + guard _args[4].0 is YYObj_Option_Expr_(_dollar5) + let _start_pos_of_item1 = _args[1].1 + let _end_pos_of_item1 = _args[1].2 + let _start_pos_of_item5 = _args[5].1 + let _end_pos_of_item5 = _args[5].2 let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - YYObj_Statement({(); - StmtExpr(ProofLet(binder = _dollar2, expr = _dollar4, loc = mk_loc((_symbol_start_pos, _end_pos)))) + YYObj_Expr({(); + ArrayGetSlice( + array = _dollar1, + start_index = _dollar3, + end_index = _dollar5, + index_loc = mk_loc(((_start_pos_of_item1, _end_pos_of_item1).0, (_start_pos_of_item5, _end_pos_of_item5).1)), + loc = mk_loc((_symbol_start_pos, _end_pos)) + ) }) } // file:///./parser.mbty -// 1090| expr_statement { StmtExpr($1) } -fn yy_action_464(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[0].0 is YYObj_Expr(_dollar1) - YYObj_Statement({(); StmtExpr(_dollar1) }) +// 2154| lident_string "?" { +// 2155| let loc = mk_loc($loc($1)) +// 2156| let label = Label::{ name: $1, loc } +// 2157| let arg_value = @syntax.make_ident_expr(loc~, Var::{ name: Ident(name = $1), loc }) +// 2158| Argument::{ value: arg_value, kind: LabelledOptionPun(label~, question_loc = mk_loc($loc($2))) } +// 2159| } +fn yy_action_535(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_226(_last_pos, _args[0:1]) + let _start_pos_of_item0 = _args[0].1 + let _end_pos_of_item0 = _args[0].2 + guard _sub_action_0_result is YYObj_String(_dollar1) + let _start_pos_of_item1 = _args[1].1 + let _end_pos_of_item1 = _args[1].2 + YYObj_Argument({(); + let loc = mk_loc((_start_pos_of_item0, _end_pos_of_item0)) + let label = Label::{ name: _dollar1, loc } + let arg_value = @syntax.make_ident_expr(loc~, Var::{ name: Ident(name = _dollar1), loc }) + Argument::{ value: arg_value, kind: LabelledOptionPun(label~, question_loc = mk_loc((_start_pos_of_item1, _end_pos_of_item1))) } + }) } // file:///./parser.mbty -// 1095| "guard" infix_expr "else" block_expr { StmtGuard(cond = $2, otherwise = Some($4), loc = mk_loc($sloc)) } -fn yy_action_465(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[1].0 is YYObj_Expr(_dollar2) +// 2141| label optional_question "=" expr { +// 2142| let arg_kind : ArgumentKind = match $2 { +// 2143| Some(question_loc) => LabelledOption(label = $1, question_loc~) +// 2144| None => Labelled($1) +// 2145| } +// 2146| Argument::{ value: $4, kind: arg_kind } +// 2147| } +fn yy_action_536(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_473(_last_pos, _args[0:1]) + guard _args[1].0 is YYObj_Location_(_dollar2) + guard _sub_action_0_result is YYObj_Label(_dollar1) guard _args[3].0 is YYObj_Expr(_dollar4) - let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) - let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - YYObj_Statement({(); StmtGuard(cond = _dollar2, otherwise = Some(_dollar4), loc = mk_loc((_symbol_start_pos, _end_pos))) }) + YYObj_Argument({(); + let arg_kind : ArgumentKind = match _dollar2 { + Some(question_loc) => LabelledOption(label = _dollar1, question_loc~) + None => Labelled(_dollar1) + } + Argument::{ value: _dollar4, kind: arg_kind } + }) } // file:///./parser.mbty -// 1094| "guard" infix_expr { StmtGuard(cond = $2, otherwise = None, loc = mk_loc($sloc)) } -fn yy_action_466(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[1].0 is YYObj_Expr(_dollar2) - let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) - let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - YYObj_Statement({(); StmtGuard(cond = _dollar2, otherwise = None, loc = mk_loc((_symbol_start_pos, _end_pos))) }) +// 2154| lident_string "?" { +// 2155| let loc = mk_loc($loc($1)) +// 2156| let label = Label::{ name: $1, loc } +// 2157| let arg_value = @syntax.make_ident_expr(loc~, Var::{ name: Ident(name = $1), loc }) +// 2158| Argument::{ value: arg_value, kind: LabelledOptionPun(label~, question_loc = mk_loc($loc($2))) } +// 2159| } +fn yy_action_537(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_228(_last_pos, _args[0:1]) + let _start_pos_of_item0 = _args[0].1 + let _end_pos_of_item0 = _args[0].2 + guard _sub_action_0_result is YYObj_String(_dollar1) + let _start_pos_of_item1 = _args[1].1 + let _end_pos_of_item1 = _args[1].2 + YYObj_Argument({(); + let loc = mk_loc((_start_pos_of_item0, _end_pos_of_item0)) + let label = Label::{ name: _dollar1, loc } + let arg_value = @syntax.make_ident_expr(loc~, Var::{ name: Ident(name = _dollar1), loc }) + Argument::{ value: arg_value, kind: LabelledOptionPun(label~, question_loc = mk_loc((_start_pos_of_item1, _end_pos_of_item1))) } + }) } // file:///./parser.mbty -// 1271| lexmatch_header list_semis(lex_case) "}" { -// 1272| LexMatch(strategy=$1.1, expr=$1.0, match_loc=mk_loc($loc($1)), cases=$2, loc=mk_loc($sloc)) -// 1273| } -fn yy_action_467(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[0].0 is YYObj__Expr__Label__(_dollar1) - let _start_pos_of_item0 = _args[0].1 - let _end_pos_of_item0 = _args[0].2 - guard _args[1].0 is YYObj_List_LexCase_(_dollar2) +// 2136| "?" { Some(mk_loc($sloc)) } +fn yy_action_538(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - YYObj_Expr({(); - LexMatch(strategy=_dollar1.1, expr=_dollar1.0, match_loc=mk_loc((_start_pos_of_item0, _end_pos_of_item0)), cases=_dollar2, loc=mk_loc((_symbol_start_pos, _end_pos))) - }) + YYObj_Location_({(); Some(mk_loc((_symbol_start_pos, _end_pos))) }) } // file:///./parser.mbty -// 251| non_empty_list_semis(X) { $1 } -fn yy_action_468(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[0].0 is YYObj_List_LexCase_(_dollar1) - YYObj_List_LexCase_({(); _dollar1 }) +// 2141| label optional_question "=" expr { +// 2142| let arg_kind : ArgumentKind = match $2 { +// 2143| Some(question_loc) => LabelledOption(label = $1, question_loc~) +// 2144| None => Labelled($1) +// 2145| } +// 2146| Argument::{ value: $4, kind: arg_kind } +// 2147| } +fn yy_action_539(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_501(_last_pos, _args[0:1]) + guard _args[1].0 is YYObj_Location_(_dollar2) + guard _sub_action_0_result is YYObj_Label(_dollar1) + guard _args[3].0 is YYObj_Expr(_dollar4) + YYObj_Argument({(); + let arg_kind : ArgumentKind = match _dollar2 { + Some(question_loc) => LabelledOption(label = _dollar1, question_loc~) + None => Labelled(_dollar1) + } + Argument::{ value: _dollar4, kind: arg_kind } + }) } // file:///./parser.mbty -// 1284| lex_pattern "=>" expr_statement { -// 1285| LexCase::{ -// 1286| pat : $1, -// 1287| pat_loc : mk_loc($loc($1)), -// 1288| guard_ : None, -// 1289| body : $3 -// 1290| } -// 1291| } -fn yy_action_469(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[0].0 is YYObj__list_List_LexTopPattern_(_dollar1) +// 2137| { None } +fn yy_action_540(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + YYObj_Location_({(); None }) +} + +// file:///./parser.mbty +// 2149| POST_LABEL { +// 2150| let label = Label::{ name: $1, loc: mk_loc($loc($1)) } +// 2151| let arg_value = @syntax.make_ident_expr(loc = mk_loc($loc($1)), Var::{ name: Ident(name = $1), loc: mk_loc($loc($1)) }) +// 2152| Argument::{ value: arg_value, kind: LabelledPun(label) } +// 2153| } +fn yy_action_541(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj_String(_dollar1) let _start_pos_of_item0 = _args[0].1 let _end_pos_of_item0 = _args[0].2 - guard _args[2].0 is YYObj_Expr(_dollar3) - YYObj_LexCase({(); - LexCase::{ - pat : _dollar1, - pat_loc : mk_loc((_start_pos_of_item0, _end_pos_of_item0)), - guard_ : None, - body : _dollar3 - } + YYObj_Argument({(); + let label = Label::{ name: _dollar1, loc: mk_loc((_start_pos_of_item0, _end_pos_of_item0)) } + let arg_value = @syntax.make_ident_expr(loc = mk_loc((_start_pos_of_item0, _end_pos_of_item0)), Var::{ name: Ident(name = _dollar1), loc: mk_loc((_start_pos_of_item0, _end_pos_of_item0)) }) + Argument::{ value: arg_value, kind: LabelledPun(label) } }) } // file:///./parser.mbty -// 1250| match_header non_empty_list_semis(single_pattern_case) "}" { -// 1251| let expr = $1 -// 1252| Match( -// 1253| expr~, -// 1254| cases = $2, -// 1255| match_loc = mk_loc($loc($1)), -// 1256| loc = mk_loc($sloc) -// 1257| ) -// 1258| } -fn yy_action_470(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 1571| pipe_expr catch_keyword single_pattern_cases "}" else_keyword single_pattern_cases "}" { +// 1572| let catch_loc = $2 +// 1573| let else_loc = $5 +// 1574| Try( +// 1575| body = $1, +// 1576| catch_ = $3, +// 1577| try_else = Some($6), +// 1578| has_try = false, +// 1579| try_loc = mk_loc($loc($1)), +// 1580| catch_loc~, +// 1581| else_loc~, +// 1582| loc = mk_loc($sloc) +// 1583| ) +// 1584| } +fn yy_action_542(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_543(_args[3].2, _args[4:6]) + guard _args[1].0 is YYObj_Location(_dollar2) + guard _sub_action_0_result is YYObj_Location(_dollar5) guard _args[0].0 is YYObj_Expr(_dollar1) - guard _args[1].0 is YYObj_List_Case_(_dollar2) + guard _args[2].0 is YYObj_List_Case_(_dollar3) + guard _args[6].0 is YYObj_List_Case_(_dollar6) let _start_pos_of_item0 = _args[0].1 let _end_pos_of_item0 = _args[0].2 let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - YYObj_Expr({(); - let expr = _dollar1 - Match( - expr~, - cases = _dollar2, - match_loc = mk_loc((_start_pos_of_item0, _end_pos_of_item0)), + YYObj_Expr({(); + let catch_loc = _dollar2 + let else_loc = _dollar5 + Try( + body = _dollar1, + catch_ = _dollar3, + try_else = Some(_dollar6), + has_try = false, + try_loc = mk_loc((_start_pos_of_item0, _end_pos_of_item0)), + catch_loc~, + else_loc~, loc = mk_loc((_symbol_start_pos, _end_pos)) ) }) } // file:///./parser.mbty -// 1259| match_header "}" { -// 1260| let expr = $1 -// 1261| Match( -// 1262| expr~, -// 1263| cases = @list.empty(), -// 1264| match_loc = mk_loc($loc($1)), -// 1265| loc = mk_loc($sloc) -// 1266| ) -// 1267| } -fn yy_action_471(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 1558| pipe_expr catch_keyword single_pattern_cases "}" { +// 1559| let catch_loc = $2 +// 1560| Try( +// 1561| body = $1, +// 1562| catch_ = $3, +// 1563| try_else = None, +// 1564| has_try = false, +// 1565| try_loc = mk_loc($loc($1)), +// 1566| catch_loc~, +// 1567| else_loc = Location::{ start: Position::{ fname: "", lnum: 0, bol: 0, cnum: 0 }, end: Position::{ fname: "", lnum: 0, bol: 0, cnum: 0 } }, +// 1568| loc = mk_loc($sloc) +// 1569| ) +// 1570| } +fn yy_action_544(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[1].0 is YYObj_Location(_dollar2) guard _args[0].0 is YYObj_Expr(_dollar1) + guard _args[2].0 is YYObj_List_Case_(_dollar3) let _start_pos_of_item0 = _args[0].1 let _end_pos_of_item0 = _args[0].2 let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } YYObj_Expr({(); - let expr = _dollar1 - Match( - expr~, - cases = @list.empty(), - match_loc = mk_loc((_start_pos_of_item0, _end_pos_of_item0)), + let catch_loc = _dollar2 + Try( + body = _dollar1, + catch_ = _dollar3, + try_else = None, + has_try = false, + try_loc = mk_loc((_start_pos_of_item0, _end_pos_of_item0)), + catch_loc~, + else_loc = Location::{ start: Position::{ fname: "", lnum: 0, bol: 0, cnum: 0 }, end: Position::{ fname: "", lnum: 0, bol: 0, cnum: 0 } }, loc = mk_loc((_symbol_start_pos, _end_pos)) ) }) } // file:///./parser.mbty -// 240| X option(SEMI) { @list.singleton($1) } -fn yy_action_472(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[0].0 is YYObj_Case(_dollar1) - YYObj_List_Case_({(); @list.singleton(_dollar1) }) -} - -// file:///./parser.mbty -// 1141| "break" POST_LABEL option(expr) { -// 1142| let label = Label::{ name: $2, loc: mk_loc($loc($2)) } -// 1143| Break(arg = $3, label = Some(label), loc = mk_loc($sloc)) -// 1144| } -fn yy_action_473(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[1].0 is YYObj_String(_dollar2) - let _start_pos_of_item1 = _args[1].1 - let _end_pos_of_item1 = _args[1].2 - guard _args[2].0 is YYObj_Option_Expr_(_dollar3) +// 1597| binder "=>" "{" list_semis_rev(statement) "}" { +// 1598| let body = Statement::compact_rev($4, loc = mk_loc($loc($3)).merge(mk_loc($loc($5)))) +// 1599| make_arrow_fn(@list.singleton((Named($1), None)), body, params_loc = mk_loc($loc($1)), loc = mk_loc($sloc)) +// 1600| } +fn yy_action_545(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_15(_last_pos, _args[0:1]) + guard _args[3].0 is YYObj_List_Statement_(_dollar4) + let _start_pos_of_item2 = _args[2].1 + let _end_pos_of_item2 = _args[2].2 + let _start_pos_of_item4 = _args[4].1 + let _end_pos_of_item4 = _args[4].2 + guard _sub_action_0_result is YYObj_Binder(_dollar1) + let _start_pos_of_item0 = _args[0].1 + let _end_pos_of_item0 = _args[0].2 let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - YYObj_Expr({(); - let label = Label::{ name: _dollar2, loc: mk_loc((_start_pos_of_item1, _end_pos_of_item1)) } - Break(arg = _dollar3, label = Some(label), loc = mk_loc((_symbol_start_pos, _end_pos))) + YYObj_Func({(); + let body = Statement::compact_rev(_dollar4, loc = mk_loc((_start_pos_of_item2, _end_pos_of_item2)).merge(mk_loc((_start_pos_of_item4, _end_pos_of_item4)))) + make_arrow_fn(@list.singleton((Named(_dollar1), None)), body, params_loc = mk_loc((_start_pos_of_item0, _end_pos_of_item0)), loc = mk_loc((_symbol_start_pos, _end_pos))) }) } // file:///./parser.mbty -// 1145| "break" option(expr) { Break(arg = $2, label = None, loc = mk_loc($sloc)) } -fn yy_action_474(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[1].0 is YYObj_Option_Expr_(_dollar2) - let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) - let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - YYObj_Expr({(); Break(arg = _dollar2, label = None, loc = mk_loc((_symbol_start_pos, _end_pos))) }) -} - -// file:///./parser.mbty -// 1146| "continue" POST_LABEL list_commas_no_trailing(expr) { -// 1147| let label = Label::{ name: $2, loc: mk_loc($loc($2)) } -// 1148| Continue(args = $3, label = Some(label), loc = mk_loc($sloc)) -// 1149| } -fn yy_action_475(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[1].0 is YYObj_String(_dollar2) - let _start_pos_of_item1 = _args[1].1 - let _end_pos_of_item1 = _args[1].2 - guard _args[2].0 is YYObj_List_Expr_(_dollar3) +// 1597| binder "=>" "{" list_semis_rev(statement) "}" { +// 1598| let body = Statement::compact_rev($4, loc = mk_loc($loc($3)).merge(mk_loc($loc($5)))) +// 1599| make_arrow_fn(@list.singleton((Named($1), None)), body, params_loc = mk_loc($loc($1)), loc = mk_loc($sloc)) +// 1600| } +fn yy_action_546(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_20(_last_pos, _args[0:1]) + guard _args[3].0 is YYObj_List_Statement_(_dollar4) + let _start_pos_of_item2 = _args[2].1 + let _end_pos_of_item2 = _args[2].2 + let _start_pos_of_item4 = _args[4].1 + let _end_pos_of_item4 = _args[4].2 + guard _sub_action_0_result is YYObj_Binder(_dollar1) + let _start_pos_of_item0 = _args[0].1 + let _end_pos_of_item0 = _args[0].2 let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - YYObj_Expr({(); - let label = Label::{ name: _dollar2, loc: mk_loc((_start_pos_of_item1, _end_pos_of_item1)) } - Continue(args = _dollar3, label = Some(label), loc = mk_loc((_symbol_start_pos, _end_pos))) + YYObj_Func({(); + let body = Statement::compact_rev(_dollar4, loc = mk_loc((_start_pos_of_item2, _end_pos_of_item2)).merge(mk_loc((_start_pos_of_item4, _end_pos_of_item4)))) + make_arrow_fn(@list.singleton((Named(_dollar1), None)), body, params_loc = mk_loc((_start_pos_of_item0, _end_pos_of_item0)), loc = mk_loc((_symbol_start_pos, _end_pos))) }) } // file:///./parser.mbty -// 1150| "continue" list_commas_no_trailing(expr) { Continue(args = $2, label = None, loc = mk_loc($sloc)) } -fn yy_action_476(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[1].0 is YYObj_List_Expr_(_dollar2) +// 1885| "(" binder ":" type_ ")" { Constraint(expr = @syntax.binder_to_expr($2), ty = $4, loc = mk_loc($sloc)) } +fn yy_action_547(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_15(_args[0].2, _args[1:2]) + guard _sub_action_0_result is YYObj_Binder(_dollar2) + guard _args[3].0 is YYObj_Type(_dollar4) let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - YYObj_Expr({(); Continue(args = _dollar2, label = None, loc = mk_loc((_symbol_start_pos, _end_pos))) }) + YYObj_Expr({(); Constraint(expr = @syntax.binder_to_expr(_dollar2), ty = _dollar4, loc = mk_loc((_symbol_start_pos, _end_pos))) }) } // file:///./parser.mbty -// 212| non_empty_list_commas_no_trailing(X) { $1 } -fn yy_action_477(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[0].0 is YYObj_List_Expr_(_dollar1) - YYObj_List_Expr_({(); _dollar1 }) +// 1634| binder ioption(",") ")" { @list.singleton(Named($1)) } +fn yy_action_548(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_549(_args[0].2, _args[1:1]) + let _sub_action_1_result = yy_action_15(_last_pos, _args[0:1]) + guard _sub_action_1_result is YYObj_Binder(_dollar1) + YYObj_List_ArrowFnParam_({(); @list.singleton(Named(_dollar1)) }) } // file:///./parser.mbty -// 190| non_empty_list_commas_rev(X) "," X { $1.add($3) } -fn yy_action_478(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[0].0 is YYObj_List_Expr_(_dollar1) - guard _args[2].0 is YYObj_Expr(_dollar3) - YYObj_List_Expr_({(); _dollar1.add(_dollar3) }) +// 1634| binder ioption(",") ")" { @list.singleton(Named($1)) } +fn yy_action_550(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_551(_args[0].2, _args[1:2]) + let _sub_action_1_result = yy_action_15(_last_pos, _args[0:1]) + guard _sub_action_1_result is YYObj_Binder(_dollar1) + YYObj_List_ArrowFnParam_({(); @list.singleton(Named(_dollar1)) }) } // file:///./parser.mbty -// 194| non_empty_list_commas_rev(X) { $1.rev() } -fn yy_action_479(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[0].0 is YYObj_List_Expr_(_dollar1) - YYObj_List_Expr_({(); _dollar1.rev() }) +// 1636| binder "," arrow_fn_prefix_no_constraint { $3.add(Named($1)) } +fn yy_action_552(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_15(_last_pos, _args[0:1]) + guard _args[2].0 is YYObj_List_ArrowFnParam_(_dollar3) + guard _sub_action_0_result is YYObj_Binder(_dollar1) + YYObj_List_ArrowFnParam_({(); _dollar3.add(Named(_dollar1)) }) } // file:///./parser.mbty -// 189| X { @list.singleton($1) } -fn yy_action_480(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[0].0 is YYObj_Expr(_dollar1) - YYObj_List_Expr_({(); @list.singleton(_dollar1) }) +// 1861| binder "," non_empty_tuple_elems_with_prefix { $3.add(@syntax.binder_to_expr($1)) } +fn yy_action_553(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_15(_last_pos, _args[0:1]) + guard _args[2].0 is YYObj_List_Expr_(_dollar3) + guard _sub_action_0_result is YYObj_Binder(_dollar1) + YYObj_List_Expr_({(); _dollar3.add(@syntax.binder_to_expr(_dollar1)) }) } // file:///./parser.mbty -// 211| { @list.empty() } -fn yy_action_481(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - YYObj_List_Expr_({(); @list.empty() }) +// 1634| binder ioption(",") ")" { @list.singleton(Named($1)) } +fn yy_action_554(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_549(_args[0].2, _args[1:1]) + let _sub_action_1_result = yy_action_20(_last_pos, _args[0:1]) + guard _sub_action_1_result is YYObj_Binder(_dollar1) + YYObj_List_ArrowFnParam_({(); @list.singleton(Named(_dollar1)) }) } // file:///./parser.mbty -// 1151| "return" option(expr) { Return(return_value = $2, loc = mk_loc($sloc)) } -fn yy_action_482(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[1].0 is YYObj_Option_Expr_(_dollar2) - let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) - let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - YYObj_Expr({(); Return(return_value = _dollar2, loc = mk_loc((_symbol_start_pos, _end_pos))) }) +// 1634| binder ioption(",") ")" { @list.singleton(Named($1)) } +fn yy_action_555(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_551(_args[0].2, _args[1:2]) + let _sub_action_1_result = yy_action_20(_last_pos, _args[0:1]) + guard _sub_action_1_result is YYObj_Binder(_dollar1) + YYObj_List_ArrowFnParam_({(); @list.singleton(Named(_dollar1)) }) } -// file:///./stdlib.mbty -// 5| X { Some($1) } -fn yy_action_483(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[0].0 is YYObj_Expr(_dollar1) - YYObj_Option_Expr_({(); Some(_dollar1) }) +// file:///./parser.mbty +// 1636| binder "," arrow_fn_prefix_no_constraint { $3.add(Named($1)) } +fn yy_action_556(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_20(_last_pos, _args[0:1]) + guard _args[2].0 is YYObj_List_ArrowFnParam_(_dollar3) + guard _sub_action_0_result is YYObj_Binder(_dollar1) + YYObj_List_ArrowFnParam_({(); _dollar3.add(Named(_dollar1)) }) } -// file:///./stdlib.mbty -// 4| { None } -fn yy_action_484(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - YYObj_Option_Expr_({(); None }) +// file:///./parser.mbty +// 1861| binder "," non_empty_tuple_elems_with_prefix { $3.add(@syntax.binder_to_expr($1)) } +fn yy_action_557(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_20(_last_pos, _args[0:1]) + guard _args[2].0 is YYObj_List_Expr_(_dollar3) + guard _sub_action_0_result is YYObj_Binder(_dollar1) + YYObj_List_Expr_({(); _dollar3.add(@syntax.binder_to_expr(_dollar1)) }) } // file:///./parser.mbty -// 1152| expr_statement_no_break_continue_return { $1 } -fn yy_action_485(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[0].0 is YYObj_Expr(_dollar1) - YYObj_Expr({(); _dollar1 }) +// 1885| "(" binder ":" type_ ")" { Constraint(expr = @syntax.binder_to_expr($2), ty = $4, loc = mk_loc($sloc)) } +fn yy_action_558(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_20(_args[0].2, _args[1:2]) + guard _sub_action_0_result is YYObj_Binder(_dollar2) + guard _args[3].0 is YYObj_Type(_dollar4) + let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) + let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } + YYObj_Expr({(); Constraint(expr = @syntax.binder_to_expr(_dollar2), ty = _dollar4, loc = mk_loc((_symbol_start_pos, _end_pos))) }) } // file:///./parser.mbty -// 1161| loop_label_colon "while" infix_expr block_expr optional_nobreak { -// 1162| While( -// 1163| loop_cond = $3, -// 1164| loop_body = $4, -// 1165| while_else = $5, -// 1166| label = $1, -// 1167| loc = mk_loc($sloc) -// 1168| ) -// 1169| } -fn yy_action_486(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[2].0 is YYObj_Expr(_dollar3) - guard _args[3].0 is YYObj_Expr(_dollar4) - guard _args[4].0 is YYObj_Expr_(_dollar5) - guard _args[0].0 is YYObj_Label_(_dollar1) +// 1589| "(" arrow_fn_prefix "=>" "{" list_semis_rev(statement) "}" { +// 1590| let body = Statement::compact_rev($5, loc = mk_loc($loc($4)).merge(mk_loc($loc($6)))) +// 1591| make_arrow_fn($2, body, params_loc = mk_loc($loc($1)).merge(mk_loc($loc($2))), loc = mk_loc($sloc)) +// 1592| } +fn yy_action_559(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[4].0 is YYObj_List_Statement_(_dollar5) + let _start_pos_of_item3 = _args[3].1 + let _end_pos_of_item3 = _args[3].2 + let _start_pos_of_item5 = _args[5].1 + let _end_pos_of_item5 = _args[5].2 + guard _args[1].0 is YYObj_List__ArrowFnParam__Type___(_dollar2) + let _start_pos_of_item0 = _args[0].1 + let _end_pos_of_item0 = _args[0].2 + let _start_pos_of_item1 = _args[1].1 + let _end_pos_of_item1 = _args[1].2 let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - YYObj_Expr({(); - While( - loop_cond = _dollar3, - loop_body = _dollar4, - while_else = _dollar5, - label = _dollar1, - loc = mk_loc((_symbol_start_pos, _end_pos)) - ) + YYObj_Func({(); + let body = Statement::compact_rev(_dollar5, loc = mk_loc((_start_pos_of_item3, _end_pos_of_item3)).merge(mk_loc((_start_pos_of_item5, _end_pos_of_item5)))) + make_arrow_fn(_dollar2, body, params_loc = mk_loc((_start_pos_of_item0, _end_pos_of_item0)).merge(mk_loc((_start_pos_of_item1, _end_pos_of_item1))), loc = mk_loc((_symbol_start_pos, _end_pos))) }) } // file:///./parser.mbty -// 1389| loop_label_colon "for" for_binders SEMI option(infix_expr) SEMI list_commas_no_trailing(separated_pair(binder, "=", expr)) block_expr optional_nobreak optional_where_clause { -// 1390| For( -// 1391| binders = $3, -// 1392| condition = $5, -// 1393| continue_block = $7, -// 1394| body = $8, -// 1395| for_else = $9, -// 1396| label = $1, -// 1397| loc = mk_loc($sloc), -// 1398| where_clause = $10 -// 1399| ) -// 1400| } -fn yy_action_487(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[2].0 is YYObj_List__Binder__Expr__(_dollar3) - guard _args[4].0 is YYObj_Option_Expr_(_dollar5) - guard _args[6].0 is YYObj_List__Binder__Expr__(_dollar7) - guard _args[7].0 is YYObj_Expr(_dollar8) - guard _args[8].0 is YYObj_Expr_(_dollar9) - guard _args[0].0 is YYObj_Label_(_dollar1) +// 1593| "(" ")" "=>" "{" list_semis_rev(statement) "}" { +// 1594| let body = Statement::compact_rev($5, loc = mk_loc($loc($4)).merge(mk_loc($loc($6)))) +// 1595| make_arrow_fn(@list.empty(), body, params_loc = mk_loc($loc($1)).merge(mk_loc($loc($2))),loc = mk_loc($sloc)) +// 1596| } +fn yy_action_560(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[4].0 is YYObj_List_Statement_(_dollar5) + let _start_pos_of_item3 = _args[3].1 + let _end_pos_of_item3 = _args[3].2 + let _start_pos_of_item5 = _args[5].1 + let _end_pos_of_item5 = _args[5].2 + let _start_pos_of_item0 = _args[0].1 + let _end_pos_of_item0 = _args[0].2 + let _start_pos_of_item1 = _args[1].1 + let _end_pos_of_item1 = _args[1].2 let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - guard _args[9].0 is YYObj_WhereClause_(_dollar10) - YYObj_Expr({(); - For( - binders = _dollar3, - condition = _dollar5, - continue_block = _dollar7, - body = _dollar8, - for_else = _dollar9, - label = _dollar1, - loc = mk_loc((_symbol_start_pos, _end_pos)), - where_clause = _dollar10 - ) + YYObj_Func({(); + let body = Statement::compact_rev(_dollar5, loc = mk_loc((_start_pos_of_item3, _end_pos_of_item3)).merge(mk_loc((_start_pos_of_item5, _end_pos_of_item5)))) + make_arrow_fn(@list.empty(), body, params_loc = mk_loc((_start_pos_of_item0, _end_pos_of_item0)).merge(mk_loc((_start_pos_of_item1, _end_pos_of_item1))),loc = mk_loc((_symbol_start_pos, _end_pos))) }) } // file:///./parser.mbty -// 1401| loop_label_colon "for" for_binders SEMI infix_expr block_expr optional_nobreak optional_where_clause { -// 1402| For( -// 1403| binders = $3, -// 1404| condition = Some($5), -// 1405| continue_block = @list.empty(), -// 1406| body = $6, -// 1407| for_else = $7, -// 1408| label = $1, -// 1409| loc = mk_loc($sloc), -// 1410| where_clause = $8 -// 1411| ) -// 1412| } -fn yy_action_488(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[2].0 is YYObj_List__Binder__Expr__(_dollar3) - guard _args[4].0 is YYObj_Expr(_dollar5) - guard _args[5].0 is YYObj_Expr(_dollar6) - guard _args[6].0 is YYObj_Expr_(_dollar7) - guard _args[0].0 is YYObj_Label_(_dollar1) +// 1088| "let" pattern opt_annot "=" expr { +// 1089| let pat = match $3 { +// 1090| None => $2 +// 1091| Some(ty) => Pattern::Constraint(pat = $2, ty~, loc = mk_loc($sloc)) +// 1092| } +// 1093| StmtLet(pat~, expr = $5, loc = mk_loc($sloc)) +// 1094| } +fn yy_action_561(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_18(_args[1].2, _args[2:2]) + guard _sub_action_0_result is YYObj_Type_(_dollar3) + guard _args[1].0 is YYObj_Pattern(_dollar2) let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - guard _args[7].0 is YYObj_WhereClause_(_dollar8) - YYObj_Expr({(); - For( - binders = _dollar3, - condition = Some(_dollar5), - continue_block = @list.empty(), - body = _dollar6, - for_else = _dollar7, - label = _dollar1, - loc = mk_loc((_symbol_start_pos, _end_pos)), - where_clause = _dollar8 - ) + guard _args[3].0 is YYObj_Expr(_dollar5) + YYObj_Statement({(); + let pat = match _dollar3 { + None => _dollar2 + Some(ty) => Pattern::Constraint(pat = _dollar2, ty~, loc = mk_loc((_symbol_start_pos, _end_pos))) + } + StmtLet(pat~, expr = _dollar5, loc = mk_loc((_symbol_start_pos, _end_pos))) }) } -// file:///./stdlib.mbty -// 5| X { Some($1) } -fn yy_action_489(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[0].0 is YYObj_Expr(_dollar1) - YYObj_Option_Expr_({(); Some(_dollar1) }) -} - -// file:///./stdlib.mbty -// 4| { None } -fn yy_action_490(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - YYObj_Option_Expr_({(); None }) -} - // file:///./parser.mbty -// 1413| loop_label_colon "for" for_binders block_expr optional_nobreak optional_where_clause { -// 1414| For( -// 1415| binders = $3, -// 1416| condition = None, -// 1417| continue_block = @list.empty(), -// 1418| body = $4, -// 1419| for_else = $5, -// 1420| label = $1, -// 1421| loc = mk_loc($sloc), -// 1422| where_clause = $6 -// 1423| ) -// 1424| } -fn yy_action_491(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[2].0 is YYObj_List__Binder__Expr__(_dollar3) - guard _args[3].0 is YYObj_Expr(_dollar4) - guard _args[4].0 is YYObj_Expr_(_dollar5) - guard _args[0].0 is YYObj_Label_(_dollar1) +// 1088| "let" pattern opt_annot "=" expr { +// 1089| let pat = match $3 { +// 1090| None => $2 +// 1091| Some(ty) => Pattern::Constraint(pat = $2, ty~, loc = mk_loc($sloc)) +// 1092| } +// 1093| StmtLet(pat~, expr = $5, loc = mk_loc($sloc)) +// 1094| } +fn yy_action_562(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_16(_args[1].2, _args[2:4]) + guard _sub_action_0_result is YYObj_Type_(_dollar3) + guard _args[1].0 is YYObj_Pattern(_dollar2) let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - guard _args[5].0 is YYObj_WhereClause_(_dollar6) - YYObj_Expr({(); - For( - binders = _dollar3, - condition = None, - continue_block = @list.empty(), - body = _dollar4, - for_else = _dollar5, - label = _dollar1, - loc = mk_loc((_symbol_start_pos, _end_pos)), - where_clause = _dollar6 - ) + guard _args[5].0 is YYObj_Expr(_dollar5) + YYObj_Statement({(); + let pat = match _dollar3 { + None => _dollar2 + Some(ty) => Pattern::Constraint(pat = _dollar2, ty~, loc = mk_loc((_symbol_start_pos, _end_pos))) + } + StmtLet(pat~, expr = _dollar5, loc = mk_loc((_symbol_start_pos, _end_pos))) }) } // file:///./parser.mbty -// 1378| "nobreak" block_expr { Some($2) } -fn yy_action_492(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[1].0 is YYObj_Expr(_dollar2) - YYObj_Expr_({(); Some(_dollar2) }) -} - -// file:///./parser.mbty -// 1383| "where" "{" list_commas(labeled_expr) "}" { -// 1384| Some({ fields : $3, loc : mk_loc($sloc) }) -// 1385| } -fn yy_action_493(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[2].0 is YYObj_List_FieldDef_(_dollar3) +// 1099| "let" "mut" binder opt_annot "=" expr { +// 1100| StmtLetmut(binder = $3, ty_opt = $4, expr = $6, loc = mk_loc($sloc)) +// 1101| } +fn yy_action_563(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_15(_args[1].2, _args[2:3]) + let _sub_action_1_result = yy_action_18(_args[2].2, _args[3:3]) + guard _sub_action_0_result is YYObj_Binder(_dollar3) + guard _sub_action_1_result is YYObj_Type_(_dollar4) + guard _args[4].0 is YYObj_Expr(_dollar6) let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - YYObj_WhereClause_({(); - Some({ fields : _dollar3, loc : mk_loc((_symbol_start_pos, _end_pos)) }) + YYObj_Statement({(); + StmtLetmut(binder = _dollar3, ty_opt = _dollar4, expr = _dollar6, loc = mk_loc((_symbol_start_pos, _end_pos))) }) } // file:///./parser.mbty -// 207| non_empty_list_commas(X) { $1 } -fn yy_action_494(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[0].0 is YYObj_List_FieldDef_(_dollar1) - YYObj_List_FieldDef_({(); _dollar1 }) +// 1099| "let" "mut" binder opt_annot "=" expr { +// 1100| StmtLetmut(binder = $3, ty_opt = $4, expr = $6, loc = mk_loc($sloc)) +// 1101| } +fn yy_action_564(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_15(_args[1].2, _args[2:3]) + let _sub_action_1_result = yy_action_16(_args[2].2, _args[3:5]) + guard _sub_action_0_result is YYObj_Binder(_dollar3) + guard _sub_action_1_result is YYObj_Type_(_dollar4) + guard _args[6].0 is YYObj_Expr(_dollar6) + let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) + let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } + YYObj_Statement({(); + StmtLetmut(binder = _dollar3, ty_opt = _dollar4, expr = _dollar6, loc = mk_loc((_symbol_start_pos, _end_pos))) + }) } // file:///./parser.mbty -// 190| non_empty_list_commas_rev(X) "," X { $1.add($3) } -fn yy_action_495(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_376(_args[1].2, _args[2:5]) - guard _args[0].0 is YYObj_List_FieldDef_(_dollar1) - guard _sub_action_0_result is YYObj_FieldDef(_dollar3) - YYObj_List_FieldDef_({(); _dollar1.add(_dollar3) }) +// 1099| "let" "mut" binder opt_annot "=" expr { +// 1100| StmtLetmut(binder = $3, ty_opt = $4, expr = $6, loc = mk_loc($sloc)) +// 1101| } +fn yy_action_565(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_20(_args[1].2, _args[2:3]) + let _sub_action_1_result = yy_action_18(_args[2].2, _args[3:3]) + guard _sub_action_0_result is YYObj_Binder(_dollar3) + guard _sub_action_1_result is YYObj_Type_(_dollar4) + guard _args[4].0 is YYObj_Expr(_dollar6) + let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) + let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } + YYObj_Statement({(); + StmtLetmut(binder = _dollar3, ty_opt = _dollar4, expr = _dollar6, loc = mk_loc((_symbol_start_pos, _end_pos))) + }) } // file:///./parser.mbty -// 198| non_empty_list_commas_rev(X) option(",") { $1.rev() } -fn yy_action_496(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[0].0 is YYObj_List_FieldDef_(_dollar1) - YYObj_List_FieldDef_({(); _dollar1.rev() }) +// 1099| "let" "mut" binder opt_annot "=" expr { +// 1100| StmtLetmut(binder = $3, ty_opt = $4, expr = $6, loc = mk_loc($sloc)) +// 1101| } +fn yy_action_566(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_20(_args[1].2, _args[2:3]) + let _sub_action_1_result = yy_action_16(_args[2].2, _args[3:5]) + guard _sub_action_0_result is YYObj_Binder(_dollar3) + guard _sub_action_1_result is YYObj_Type_(_dollar4) + guard _args[6].0 is YYObj_Expr(_dollar6) + let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) + let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } + YYObj_Statement({(); + StmtLetmut(binder = _dollar3, ty_opt = _dollar4, expr = _dollar6, loc = mk_loc((_symbol_start_pos, _end_pos))) + }) } // file:///./parser.mbty -// 189| X { @list.singleton($1) } -fn yy_action_497(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_376(_last_pos, _args[0:3]) - guard _sub_action_0_result is YYObj_FieldDef(_dollar1) - YYObj_List_FieldDef_({(); @list.singleton(_dollar1) }) +// 1095| "letrec" binder opt_annot "=" letand_func list(and_func) { +// 1096| let bindings = $6.add(($2, $3, $5)) +// 1097| StmtLetand(bindings~, loc = mk_loc($sloc)) +// 1098| } +fn yy_action_567(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_15(_args[0].2, _args[1:2]) + let _sub_action_1_result = yy_action_18(_args[1].2, _args[2:2]) + guard _args[4].0 is YYObj__list_List__Binder__Type___Func__(_dollar6) + guard _sub_action_0_result is YYObj_Binder(_dollar2) + guard _sub_action_1_result is YYObj_Type_(_dollar3) + guard _args[3].0 is YYObj_Func(_dollar5) + let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) + let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } + YYObj_Statement({(); + let bindings = _dollar6.add((_dollar2, _dollar3, _dollar5)) + StmtLetand(bindings~, loc = mk_loc((_symbol_start_pos, _end_pos))) + }) } // file:///./parser.mbty -// 206| { @list.empty() } -fn yy_action_498(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - YYObj_List_FieldDef_({(); @list.empty() }) +// 1095| "letrec" binder opt_annot "=" letand_func list(and_func) { +// 1096| let bindings = $6.add(($2, $3, $5)) +// 1097| StmtLetand(bindings~, loc = mk_loc($sloc)) +// 1098| } +fn yy_action_568(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_15(_args[0].2, _args[1:2]) + let _sub_action_1_result = yy_action_16(_args[1].2, _args[2:4]) + guard _args[6].0 is YYObj__list_List__Binder__Type___Func__(_dollar6) + guard _sub_action_0_result is YYObj_Binder(_dollar2) + guard _sub_action_1_result is YYObj_Type_(_dollar3) + guard _args[5].0 is YYObj_Func(_dollar5) + let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) + let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } + YYObj_Statement({(); + let bindings = _dollar6.add((_dollar2, _dollar3, _dollar5)) + StmtLetand(bindings~, loc = mk_loc((_symbol_start_pos, _end_pos))) + }) } // file:///./parser.mbty -// 1428| loop_label_colon "for" non_empty_list_commas(foreach_binder) "in" expr foreach_optional_loop_vars block_expr optional_nobreak optional_where_clause { -// 1429| let (init, continue_block) = $6 -// 1430| ForEach( -// 1431| binders = $3, -// 1432| expr = $5, -// 1433| init~, -// 1434| continue_block~, -// 1435| body = $7, -// 1436| else_block = $8, -// 1437| where_clause = $9, -// 1438| label = $1, -// 1439| loc = mk_loc($sloc) -// 1440| ) -// 1441| } -fn yy_action_499(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[5].0 is YYObj__List__Binder__Expr____List__Binder__Expr___(_dollar6) - guard _args[2].0 is YYObj_List_Binder__(_dollar3) - guard _args[4].0 is YYObj_Expr(_dollar5) - guard _args[6].0 is YYObj_Expr(_dollar7) - guard _args[7].0 is YYObj_Expr_(_dollar8) - guard _args[8].0 is YYObj_WhereClause_(_dollar9) - guard _args[0].0 is YYObj_Label_(_dollar1) +// 1095| "letrec" binder opt_annot "=" letand_func list(and_func) { +// 1096| let bindings = $6.add(($2, $3, $5)) +// 1097| StmtLetand(bindings~, loc = mk_loc($sloc)) +// 1098| } +fn yy_action_569(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_20(_args[0].2, _args[1:2]) + let _sub_action_1_result = yy_action_18(_args[1].2, _args[2:2]) + guard _args[4].0 is YYObj__list_List__Binder__Type___Func__(_dollar6) + guard _sub_action_0_result is YYObj_Binder(_dollar2) + guard _sub_action_1_result is YYObj_Type_(_dollar3) + guard _args[3].0 is YYObj_Func(_dollar5) let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - YYObj_Expr({(); - let (init, continue_block) = _dollar6 - ForEach( - binders = _dollar3, - expr = _dollar5, - init~, - continue_block~, - body = _dollar7, - else_block = _dollar8, - where_clause = _dollar9, - label = _dollar1, - loc = mk_loc((_symbol_start_pos, _end_pos)) - ) + YYObj_Statement({(); + let bindings = _dollar6.add((_dollar2, _dollar3, _dollar5)) + StmtLetand(bindings~, loc = mk_loc((_symbol_start_pos, _end_pos))) }) } // file:///./parser.mbty -// 1386| { None } -fn yy_action_500(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - YYObj_WhereClause_({(); None }) +// 1095| "letrec" binder opt_annot "=" letand_func list(and_func) { +// 1096| let bindings = $6.add(($2, $3, $5)) +// 1097| StmtLetand(bindings~, loc = mk_loc($sloc)) +// 1098| } +fn yy_action_570(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_20(_args[0].2, _args[1:2]) + let _sub_action_1_result = yy_action_16(_args[1].2, _args[2:4]) + guard _args[6].0 is YYObj__list_List__Binder__Type___Func__(_dollar6) + guard _sub_action_0_result is YYObj_Binder(_dollar2) + guard _sub_action_1_result is YYObj_Type_(_dollar3) + guard _args[5].0 is YYObj_Func(_dollar5) + let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) + let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } + YYObj_Statement({(); + let bindings = _dollar6.add((_dollar2, _dollar3, _dollar5)) + StmtLetand(bindings~, loc = mk_loc((_symbol_start_pos, _end_pos))) + }) } // file:///./parser.mbty -// 1379| { None } -fn yy_action_501(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - YYObj_Expr_({(); None }) +// 1084| "and" binder opt_annot "=" letand_func { ($2, $3, $5) } +fn yy_action_571(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_15(_args[0].2, _args[1:2]) + let _sub_action_1_result = yy_action_18(_args[1].2, _args[2:2]) + guard _sub_action_0_result is YYObj_Binder(_dollar2) + guard _sub_action_1_result is YYObj_Type_(_dollar3) + guard _args[3].0 is YYObj_Func(_dollar5) + YYObj__Binder__Type___Func_({(); (_dollar2, _dollar3, _dollar5) }) } // file:///./parser.mbty -// 1358| list_commas_no_trailing(separated_pair(binder, "=", expr)) { $1 } -fn yy_action_502(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[0].0 is YYObj_List__Binder__Expr__(_dollar1) - YYObj_List__Binder__Expr__({(); _dollar1 }) +// 1084| "and" binder opt_annot "=" letand_func { ($2, $3, $5) } +fn yy_action_572(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_15(_args[0].2, _args[1:2]) + let _sub_action_1_result = yy_action_16(_args[1].2, _args[2:4]) + guard _sub_action_0_result is YYObj_Binder(_dollar2) + guard _sub_action_1_result is YYObj_Type_(_dollar3) + guard _args[5].0 is YYObj_Func(_dollar5) + YYObj__Binder__Type___Func_({(); (_dollar2, _dollar3, _dollar5) }) } // file:///./parser.mbty -// 1447| SEMI for_binders SEMI for_binders { ($2, $4) } -fn yy_action_503(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[1].0 is YYObj_List__Binder__Expr__(_dollar2) - guard _args[3].0 is YYObj_List__Binder__Expr__(_dollar4) - YYObj__List__Binder__Expr____List__Binder__Expr___({(); (_dollar2, _dollar4) }) +// 1084| "and" binder opt_annot "=" letand_func { ($2, $3, $5) } +fn yy_action_573(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_20(_args[0].2, _args[1:2]) + let _sub_action_1_result = yy_action_18(_args[1].2, _args[2:2]) + guard _sub_action_0_result is YYObj_Binder(_dollar2) + guard _sub_action_1_result is YYObj_Type_(_dollar3) + guard _args[3].0 is YYObj_Func(_dollar5) + YYObj__Binder__Type___Func_({(); (_dollar2, _dollar3, _dollar5) }) } // file:///./parser.mbty -// 1446| SEMI for_binders { ($2, @list.empty()) } -fn yy_action_504(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[1].0 is YYObj_List__Binder__Expr__(_dollar2) - YYObj__List__Binder__Expr____List__Binder__Expr___({(); (_dollar2, @list.empty()) }) +// 1079| arrow_fn_expr { $1 } +fn yy_action_574(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj_Func(_dollar1) + YYObj_Func({(); _dollar1 }) } // file:///./parser.mbty -// 1445| { (@list.empty(), @list.empty()) } -fn yy_action_505(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - YYObj__List__Binder__Expr____List__Binder__Expr___({(); (@list.empty(), @list.empty()) }) +// 1080| anony_fn { $1 } +fn yy_action_575(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj_Func(_dollar1) + YYObj_Func({(); _dollar1 }) } // file:///./parser.mbty -// 189| X { @list.singleton($1) } -fn yy_action_506(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_507(_last_pos, _args[0:3]) - guard _sub_action_0_result is YYObj__Binder__Expr_(_dollar1) - YYObj_List__Binder__Expr__({(); @list.singleton(_dollar1) }) +// 1084| "and" binder opt_annot "=" letand_func { ($2, $3, $5) } +fn yy_action_576(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_20(_args[0].2, _args[1:2]) + let _sub_action_1_result = yy_action_16(_args[1].2, _args[2:4]) + guard _sub_action_0_result is YYObj_Binder(_dollar2) + guard _sub_action_1_result is YYObj_Type_(_dollar3) + guard _args[5].0 is YYObj_Func(_dollar5) + YYObj__Binder__Type___Func_({(); (_dollar2, _dollar3, _dollar5) }) } // file:///./parser.mbty -// 212| non_empty_list_commas_no_trailing(X) { $1 } -fn yy_action_508(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[0].0 is YYObj_List__Binder__Expr__(_dollar1) - YYObj_List__Binder__Expr__({(); _dollar1 }) +// 269| ioption(annot) { $1 } +fn yy_action_16(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_577(_last_pos, _args[0:2]) + guard _sub_action_0_result is YYObj_Option_Type_(_dollar1) + YYObj_Type_({(); _dollar1 }) } -// file:///./parser.mbty -// 198| non_empty_list_commas_rev(X) option(",") { $1.rev() } -fn yy_action_509(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[0].0 is YYObj_List_Binder__(_dollar1) - YYObj_List_Binder__({(); _dollar1.rev() }) -} - -// file:///./parser.mbty -// 1457| binder { Some($1)} -fn yy_action_510(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_15(_last_pos, _args[0:1]) - guard _sub_action_0_result is YYObj_Binder(_dollar1) - YYObj_Binder_({(); Some(_dollar1)}) -} - -// file:///./parser.mbty -// 1458| "_" { None } -fn yy_action_511(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - YYObj_Binder_({(); None }) +// file:///./stdlib.mbty +// 10| X { Some($1) } +fn yy_action_577(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_578(_last_pos, _args[0:2]) + guard _sub_action_0_result is YYObj_Type(_dollar1) + YYObj_Option_Type_({(); Some(_dollar1) }) } -// file:///./parser.mbty -// 190| non_empty_list_commas_rev(X) "," X { $1.add($3) } -fn yy_action_512(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[0].0 is YYObj_List_Binder__(_dollar1) - guard _args[2].0 is YYObj_Binder_(_dollar3) - YYObj_List_Binder__({(); _dollar1.add(_dollar3) }) +// file:///./stdlib.mbty +// 45| X list(X) { $2.add($1) } +fn yy_action_579(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[1].0 is YYObj__list_List__Binder__Type___Func__(_dollar2) + guard _args[0].0 is YYObj__Binder__Type___Func_(_dollar1) + YYObj__list_List__Binder__Type___Func__({(); _dollar2.add(_dollar1) }) } -// file:///./parser.mbty -// 1013| LIDENT { Ident(name = $1) } -fn yy_action_513(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[0].0 is YYObj_String(_dollar1) - YYObj_LongIdent({(); Ident(name = _dollar1) }) +// file:///./stdlib.mbty +// 44| { @list.empty() } +fn yy_action_580(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + YYObj__list_List__Binder__Type___Func__({(); @list.empty() }) } // file:///./parser.mbty -// 1014| PACKAGE_NAME DOT_LIDENT { Dot(pkg = $1, id = $2) } -fn yy_action_514(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[0].0 is YYObj_String(_dollar1) - guard _args[1].0 is YYObj_String(_dollar2) - YYObj_LongIdent({(); Dot(pkg = _dollar1, id = _dollar2) }) +// 1608| "(" arrow_fn_prefix "=>" expr_statement_no_break_continue_return { +// 1609| make_arrow_fn($2, $4, params_loc = mk_loc($loc($1)).merge(mk_loc($loc($2))), loc = mk_loc($sloc)) +// 1610| } +fn yy_action_581(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[1].0 is YYObj_List__ArrowFnParam__Type___(_dollar2) + guard _args[3].0 is YYObj_Expr(_dollar4) + let _start_pos_of_item0 = _args[0].1 + let _end_pos_of_item0 = _args[0].2 + let _start_pos_of_item1 = _args[1].1 + let _end_pos_of_item1 = _args[1].2 + let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) + let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } + YYObj_Func({(); + make_arrow_fn(_dollar2, _dollar4, params_loc = mk_loc((_start_pos_of_item0, _end_pos_of_item0)).merge(mk_loc((_start_pos_of_item1, _end_pos_of_item1))), loc = mk_loc((_symbol_start_pos, _end_pos))) + }) } // file:///./parser.mbty -// 1133| "raise" expr { Raise(err_value = $2, loc = mk_loc($sloc)) } -fn yy_action_515(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[1].0 is YYObj_Expr(_dollar2) +// 1611| "(" ")" "=>" expr_statement_no_break_continue_return { +// 1612| make_arrow_fn(@list.empty(), $4, params_loc = mk_loc($loc($1)).merge(mk_loc($loc($2))),loc = mk_loc($sloc)) +// 1613| } +fn yy_action_582(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[3].0 is YYObj_Expr(_dollar4) + let _start_pos_of_item0 = _args[0].1 + let _end_pos_of_item0 = _args[0].2 + let _start_pos_of_item1 = _args[1].1 + let _end_pos_of_item1 = _args[1].2 let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - YYObj_Expr({(); Raise(err_value = _dollar2, loc = mk_loc((_symbol_start_pos, _end_pos))) }) + YYObj_Func({(); + make_arrow_fn(@list.empty(), _dollar4, params_loc = mk_loc((_start_pos_of_item0, _end_pos_of_item0)).merge(mk_loc((_start_pos_of_item1, _end_pos_of_item1))),loc = mk_loc((_symbol_start_pos, _end_pos))) + }) } // file:///./parser.mbty -// 1134| "..." { Hole(loc = mk_loc($sloc), kind = Todo) } -fn yy_action_516(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 1102| is_async "fn" binder parameters func_return_type block_expr { +// 1103| let (return_type, error_type) = $5 +// 1104| let func = Func::{ +// 1105| parameters : $4, +// 1106| params_loc : mk_loc($loc($4)), +// 1107| body : $6, +// 1108| return_type, +// 1109| error_type, +// 1110| kind : Lambda, +// 1111| is_async : $1, +// 1112| loc : mk_loc($sloc) +// 1113| } +// 1114| StmtFunc(binder = $3, func~, loc = mk_loc($sloc)) +// 1115| } +fn yy_action_583(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_5(_last_pos, _args[0:1]) + let _sub_action_1_result = yy_action_15(_args[1].2, _args[2:3]) + guard _args[4].0 is YYObj__Type___ErrorType_(_dollar5) + guard _args[3].0 is YYObj_List_Parameter_(_dollar4) + let _start_pos_of_item3 = _args[3].1 + let _end_pos_of_item3 = _args[3].2 + guard _args[5].0 is YYObj_Expr(_dollar6) + guard _sub_action_0_result is YYObj_Location_(_dollar1) let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - YYObj_Expr({(); Hole(loc = mk_loc((_symbol_start_pos, _end_pos)), kind = Todo) }) + guard _sub_action_1_result is YYObj_Binder(_dollar3) + YYObj_Statement({(); + let (return_type, error_type) = _dollar5 + let func = Func::{ + parameters : _dollar4, + params_loc : mk_loc((_start_pos_of_item3, _end_pos_of_item3)), + body : _dollar6, + return_type, + error_type, + kind : Lambda, + is_async : _dollar1, + loc : mk_loc((_symbol_start_pos, _end_pos)) + } + StmtFunc(binder = _dollar3, func~, loc = mk_loc((_symbol_start_pos, _end_pos))) + }) } // file:///./parser.mbty -// 1135| augmented_assignment_expr { $1 } -fn yy_action_517(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_518(_last_pos, _args[0:3]) - guard _sub_action_0_result is YYObj_Expr(_dollar1) - YYObj_Expr({(); _dollar1 }) +// 1102| is_async "fn" binder parameters func_return_type block_expr { +// 1103| let (return_type, error_type) = $5 +// 1104| let func = Func::{ +// 1105| parameters : $4, +// 1106| params_loc : mk_loc($loc($4)), +// 1107| body : $6, +// 1108| return_type, +// 1109| error_type, +// 1110| kind : Lambda, +// 1111| is_async : $1, +// 1112| loc : mk_loc($sloc) +// 1113| } +// 1114| StmtFunc(binder = $3, func~, loc = mk_loc($sloc)) +// 1115| } +fn yy_action_584(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_5(_last_pos, _args[0:1]) + let _sub_action_1_result = yy_action_20(_args[1].2, _args[2:3]) + guard _args[4].0 is YYObj__Type___ErrorType_(_dollar5) + guard _args[3].0 is YYObj_List_Parameter_(_dollar4) + let _start_pos_of_item3 = _args[3].1 + let _end_pos_of_item3 = _args[3].2 + guard _args[5].0 is YYObj_Expr(_dollar6) + guard _sub_action_0_result is YYObj_Location_(_dollar1) + let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) + let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } + guard _sub_action_1_result is YYObj_Binder(_dollar3) + YYObj_Statement({(); + let (return_type, error_type) = _dollar5 + let func = Func::{ + parameters : _dollar4, + params_loc : mk_loc((_start_pos_of_item3, _end_pos_of_item3)), + body : _dollar6, + return_type, + error_type, + kind : Lambda, + is_async : _dollar1, + loc : mk_loc((_symbol_start_pos, _end_pos)) + } + StmtFunc(binder = _dollar3, func~, loc = mk_loc((_symbol_start_pos, _end_pos))) + }) } // file:///./parser.mbty -// 1110| left_value assignop expr { -// 1111| let loc = mk_loc($sloc) -// 1112| match $1 { -// 1113| Var(var_) => Assign(var_~, expr=$3, augmented_by=Some($2), loc~) -// 1114| Field(record, accessor) => Mutate(record~, accessor~, field=$3, augmented_by=Some($2), loc~) -// 1115| Array(array, index) => ArrayAugmentedSet(op=$2, array~, index~, value=$3, loc~) -// 1116| } -// 1117| } -fn yy_action_518(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_519(_args[0].2, _args[1:2]) +// 1102| is_async "fn" binder parameters func_return_type block_expr { +// 1103| let (return_type, error_type) = $5 +// 1104| let func = Func::{ +// 1105| parameters : $4, +// 1106| params_loc : mk_loc($loc($4)), +// 1107| body : $6, +// 1108| return_type, +// 1109| error_type, +// 1110| kind : Lambda, +// 1111| is_async : $1, +// 1112| loc : mk_loc($sloc) +// 1113| } +// 1114| StmtFunc(binder = $3, func~, loc = mk_loc($sloc)) +// 1115| } +fn yy_action_585(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_8(_last_pos, _args[0:0]) + let _sub_action_1_result = yy_action_15(_args[0].2, _args[1:2]) + guard _args[3].0 is YYObj__Type___ErrorType_(_dollar5) + guard _args[2].0 is YYObj_List_Parameter_(_dollar4) + let _start_pos_of_item3 = _args[2].1 + let _end_pos_of_item3 = _args[2].2 + guard _args[4].0 is YYObj_Expr(_dollar6) + guard _sub_action_0_result is YYObj_Location_(_dollar1) let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - guard _args[0].0 is YYObj_LeftValue(_dollar1) - guard _args[2].0 is YYObj_Expr(_dollar3) - guard _sub_action_0_result is YYObj_Var(_dollar2) - YYObj_Expr({(); - let loc = mk_loc((_symbol_start_pos, _end_pos)) - match _dollar1 { - Var(var_) => Assign(var_~, expr=_dollar3, augmented_by=Some(_dollar2), loc~) - Field(record, accessor) => Mutate(record~, accessor~, field=_dollar3, augmented_by=Some(_dollar2), loc~) - Array(array, index) => ArrayAugmentedSet(op=_dollar2, array~, index~, value=_dollar3, loc~) + guard _sub_action_1_result is YYObj_Binder(_dollar3) + YYObj_Statement({(); + let (return_type, error_type) = _dollar5 + let func = Func::{ + parameters : _dollar4, + params_loc : mk_loc((_start_pos_of_item3, _end_pos_of_item3)), + body : _dollar6, + return_type, + error_type, + kind : Lambda, + is_async : _dollar1, + loc : mk_loc((_symbol_start_pos, _end_pos)) } + StmtFunc(binder = _dollar3, func~, loc = mk_loc((_symbol_start_pos, _end_pos))) }) } // file:///./parser.mbty -// 2007| "+=" { Var::{ name: Ident(name = "+"), loc: mk_loc($sloc) } } -fn yy_action_519(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 1102| is_async "fn" binder parameters func_return_type block_expr { +// 1103| let (return_type, error_type) = $5 +// 1104| let func = Func::{ +// 1105| parameters : $4, +// 1106| params_loc : mk_loc($loc($4)), +// 1107| body : $6, +// 1108| return_type, +// 1109| error_type, +// 1110| kind : Lambda, +// 1111| is_async : $1, +// 1112| loc : mk_loc($sloc) +// 1113| } +// 1114| StmtFunc(binder = $3, func~, loc = mk_loc($sloc)) +// 1115| } +fn yy_action_586(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_8(_last_pos, _args[0:0]) + let _sub_action_1_result = yy_action_20(_args[0].2, _args[1:2]) + guard _args[3].0 is YYObj__Type___ErrorType_(_dollar5) + guard _args[2].0 is YYObj_List_Parameter_(_dollar4) + let _start_pos_of_item3 = _args[2].1 + let _end_pos_of_item3 = _args[2].2 + guard _args[4].0 is YYObj_Expr(_dollar6) + guard _sub_action_0_result is YYObj_Location_(_dollar1) let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - YYObj_Var({(); Var::{ name: Ident(name = "+"), loc: mk_loc((_symbol_start_pos, _end_pos)) } }) + guard _sub_action_1_result is YYObj_Binder(_dollar3) + YYObj_Statement({(); + let (return_type, error_type) = _dollar5 + let func = Func::{ + parameters : _dollar4, + params_loc : mk_loc((_start_pos_of_item3, _end_pos_of_item3)), + body : _dollar6, + return_type, + error_type, + kind : Lambda, + is_async : _dollar1, + loc : mk_loc((_symbol_start_pos, _end_pos)) + } + StmtFunc(binder = _dollar3, func~, loc = mk_loc((_symbol_start_pos, _end_pos))) + }) } // file:///./parser.mbty -// 1135| augmented_assignment_expr { $1 } -fn yy_action_520(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_521(_last_pos, _args[0:3]) - guard _sub_action_0_result is YYObj_Expr(_dollar1) - YYObj_Expr({(); _dollar1 }) +// 1116| guard_statement { $1 } +fn yy_action_587(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj_Statement(_dollar1) + YYObj_Statement({(); _dollar1 }) } // file:///./parser.mbty -// 1110| left_value assignop expr { -// 1111| let loc = mk_loc($sloc) -// 1112| match $1 { -// 1113| Var(var_) => Assign(var_~, expr=$3, augmented_by=Some($2), loc~) -// 1114| Field(record, accessor) => Mutate(record~, accessor~, field=$3, augmented_by=Some($2), loc~) -// 1115| Array(array, index) => ArrayAugmentedSet(op=$2, array~, index~, value=$3, loc~) -// 1116| } -// 1117| } -fn yy_action_521(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_522(_args[0].2, _args[1:2]) +// 1117| "defer" pipe_expr { StmtDefer(expr = $2, loc = mk_loc($sloc)) } +fn yy_action_588(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[1].0 is YYObj_Expr(_dollar2) let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - guard _args[0].0 is YYObj_LeftValue(_dollar1) - guard _args[2].0 is YYObj_Expr(_dollar3) - guard _sub_action_0_result is YYObj_Var(_dollar2) - YYObj_Expr({(); - let loc = mk_loc((_symbol_start_pos, _end_pos)) - match _dollar1 { - Var(var_) => Assign(var_~, expr=_dollar3, augmented_by=Some(_dollar2), loc~) - Field(record, accessor) => Mutate(record~, accessor~, field=_dollar3, augmented_by=Some(_dollar2), loc~) - Array(array, index) => ArrayAugmentedSet(op=_dollar2, array~, index~, value=_dollar3, loc~) - } - }) + YYObj_Statement({(); StmtDefer(expr = _dollar2, loc = mk_loc((_symbol_start_pos, _end_pos))) }) } // file:///./parser.mbty -// 2008| AUGMENTED_ASSIGNMENT { Var::{ name: Ident(name = $1), loc: mk_loc($sloc) } } -fn yy_action_522(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[0].0 is YYObj_String(_dollar1) +// 1118| "proof_assert" expr { +// 1119| StmtExpr(ProofAssert(expr = $2, loc = mk_loc($sloc))) +// 1120| } +fn yy_action_589(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[1].0 is YYObj_Expr(_dollar2) let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - YYObj_Var({(); Var::{ name: Ident(name = _dollar1), loc: mk_loc((_symbol_start_pos, _end_pos)) } }) + YYObj_Statement({(); + StmtExpr(ProofAssert(expr = _dollar2, loc = mk_loc((_symbol_start_pos, _end_pos)))) + }) } // file:///./parser.mbty -// 1136| assignment_expr { $1 } -fn yy_action_523(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_524(_last_pos, _args[0:3]) - guard _sub_action_0_result is YYObj_Expr(_dollar1) - YYObj_Expr({(); _dollar1 }) +// 1121| "proof_let" binder "=" expr { +// 1122| StmtExpr(ProofLet(binder = $2, expr = $4, loc = mk_loc($sloc))) +// 1123| } +fn yy_action_590(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_15(_args[0].2, _args[1:2]) + guard _sub_action_0_result is YYObj_Binder(_dollar2) + guard _args[3].0 is YYObj_Expr(_dollar4) + let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) + let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } + YYObj_Statement({(); + StmtExpr(ProofLet(binder = _dollar2, expr = _dollar4, loc = mk_loc((_symbol_start_pos, _end_pos)))) + }) } // file:///./parser.mbty -// 1099| left_value "=" expr { -// 1100| let loc = mk_loc($sloc) -// 1101| match $1 { -// 1102| Var(var_) => Assign(var_~, expr=$3, augmented_by=None, loc~) -// 1103| Field(record, accessor) => Mutate(record~, accessor~, field=$3, augmented_by=None, loc~) -// 1104| Array(array, index) => ArraySet(array~, index~, value=$3, loc~) -// 1105| } -// 1106| } -fn yy_action_524(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 1121| "proof_let" binder "=" expr { +// 1122| StmtExpr(ProofLet(binder = $2, expr = $4, loc = mk_loc($sloc))) +// 1123| } +fn yy_action_591(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_20(_args[0].2, _args[1:2]) + guard _sub_action_0_result is YYObj_Binder(_dollar2) + guard _args[3].0 is YYObj_Expr(_dollar4) let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - guard _args[0].0 is YYObj_LeftValue(_dollar1) - guard _args[2].0 is YYObj_Expr(_dollar3) - YYObj_Expr({(); - let loc = mk_loc((_symbol_start_pos, _end_pos)) - match _dollar1 { - Var(var_) => Assign(var_~, expr=_dollar3, augmented_by=None, loc~) - Field(record, accessor) => Mutate(record~, accessor~, field=_dollar3, augmented_by=None, loc~) - Array(array, index) => ArraySet(array~, index~, value=_dollar3, loc~) - } + YYObj_Statement({(); + StmtExpr(ProofLet(binder = _dollar2, expr = _dollar4, loc = mk_loc((_symbol_start_pos, _end_pos)))) }) } // file:///./parser.mbty -// 1137| expr { $1 } -fn yy_action_525(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 1124| expr_statement { StmtExpr($1) } +fn yy_action_592(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj_Expr(_dollar1) - YYObj_Expr({(); _dollar1 }) + YYObj_Statement({(); StmtExpr(_dollar1) }) } // file:///./parser.mbty -// 1531| binder "=>" expr_statement_no_break_continue_return { -// 1532| make_arrow_fn(@list.singleton((Named($1), None)), $3, params_loc = mk_loc($loc($1)), loc = mk_loc($sloc)) -// 1533| } -fn yy_action_526(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_15(_last_pos, _args[0:1]) - guard _sub_action_0_result is YYObj_Binder(_dollar1) - guard _args[2].0 is YYObj_Expr(_dollar3) - let _start_pos_of_item0 = _args[0].1 - let _end_pos_of_item0 = _args[0].2 +// 1129| "guard" infix_expr "else" block_expr { StmtGuard(cond = $2, otherwise = Some($4), loc = mk_loc($sloc)) } +fn yy_action_593(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[1].0 is YYObj_Expr(_dollar2) + guard _args[3].0 is YYObj_Expr(_dollar4) let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - YYObj_Func({(); - make_arrow_fn(@list.singleton((Named(_dollar1), None)), _dollar3, params_loc = mk_loc((_start_pos_of_item0, _end_pos_of_item0)), loc = mk_loc((_symbol_start_pos, _end_pos))) - }) + YYObj_Statement({(); StmtGuard(cond = _dollar2, otherwise = Some(_dollar4), loc = mk_loc((_symbol_start_pos, _end_pos))) }) } // file:///./parser.mbty -// 1156| POST_LABEL ":" { Some(Label::{ name : $1, loc : mk_loc($sloc) }) } -fn yy_action_527(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[0].0 is YYObj_String(_dollar1) - let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) +// 1128| "guard" infix_expr { StmtGuard(cond = $2, otherwise = None, loc = mk_loc($sloc)) } +fn yy_action_594(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[1].0 is YYObj_Expr(_dollar2) + let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - YYObj_Label_({(); Some(Label::{ name : _dollar1, loc : mk_loc((_symbol_start_pos, _end_pos)) }) }) -} - -// file:///./parser.mbty -// 190| non_empty_list_commas_rev(X) "," X { $1.add($3) } -fn yy_action_528(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_507(_args[1].2, _args[2:5]) - guard _args[0].0 is YYObj_List__Binder__Expr__(_dollar1) - guard _sub_action_0_result is YYObj__Binder__Expr_(_dollar3) - YYObj_List__Binder__Expr__({(); _dollar1.add(_dollar3) }) -} - -// file:///./stdlib.mbty -// 28| X SEP Y { ($1, $3) } -fn yy_action_507(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_15(_last_pos, _args[0:1]) - guard _sub_action_0_result is YYObj_Binder(_dollar1) - guard _args[2].0 is YYObj_Expr(_dollar3) - YYObj__Binder__Expr_({(); (_dollar1, _dollar3) }) + YYObj_Statement({(); StmtGuard(cond = _dollar2, otherwise = None, loc = mk_loc((_symbol_start_pos, _end_pos))) }) } // file:///./parser.mbty -// 194| non_empty_list_commas_rev(X) { $1.rev() } -fn yy_action_529(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[0].0 is YYObj_List__Binder__Expr__(_dollar1) - YYObj_List__Binder__Expr__({(); _dollar1.rev() }) +// 1338| lexscan_header list_semis(lexscan_case) "}" { +// 1339| LexScan(expr=$1, match_loc=mk_loc($loc($1)), cases=$2, loc=mk_loc($sloc)) +// 1340| } +fn yy_action_595(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj_Expr(_dollar1) + let _start_pos_of_item0 = _args[0].1 + let _end_pos_of_item0 = _args[0].2 + guard _args[1].0 is YYObj_List_LexScanCase_(_dollar2) + let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) + let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } + YYObj_Expr({(); + LexScan(expr=_dollar1, match_loc=mk_loc((_start_pos_of_item0, _end_pos_of_item0)), cases=_dollar2, loc=mk_loc((_symbol_start_pos, _end_pos))) + }) } // file:///./parser.mbty -// 189| X { @list.singleton($1) } -fn yy_action_530(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[0].0 is YYObj_Binder_(_dollar1) - YYObj_List_Binder__({(); @list.singleton(_dollar1) }) +// 257| non_empty_list_semis(X) { $1 } +fn yy_action_596(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj_List_LexScanCase_(_dollar1) + YYObj_List_LexScanCase_({(); _dollar1 }) } // file:///./parser.mbty -// 211| { @list.empty() } -fn yy_action_531(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - YYObj_List__Binder__Expr__({(); @list.empty() }) +// 1346| lexscan_case_pattern "=>" expr_statement { +// 1347| LexScanCase::{ pat: $1, guard_: None, body: $3 } +// 1348| } +fn yy_action_597(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj_LexScanCasePattern(_dollar1) + guard _args[2].0 is YYObj_Expr(_dollar3) + YYObj_LexScanCase({(); + LexScanCase::{ pat: _dollar1, guard_: None, body: _dollar3 } + }) } // file:///./parser.mbty -// 1173| pattern option(preceded("if", infix_expr)) "=>" expr_statement { -// 1174| Case::{ pattern : $1, guard_ : $2, body : $4 } -// 1175| } -fn yy_action_532(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[0].0 is YYObj_Pattern(_dollar1) - guard _args[1].0 is YYObj_Option_Expr_(_dollar2) - guard _args[3].0 is YYObj_Expr(_dollar4) - YYObj_Case({(); - Case::{ pattern : _dollar1, guard_ : _dollar2, body : _dollar4 } +// 1325| lexmatch_header list_semis(lex_case) "}" { +// 1326| LexMatch(strategy=$1.1, expr=$1.0, match_loc=mk_loc($loc($1)), cases=$2, loc=mk_loc($sloc)) +// 1327| } +fn yy_action_598(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj__Expr__Label__(_dollar1) + let _start_pos_of_item0 = _args[0].1 + let _end_pos_of_item0 = _args[0].2 + guard _args[1].0 is YYObj_List_LexCase_(_dollar2) + let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) + let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } + YYObj_Expr({(); + LexMatch(strategy=_dollar1.1, expr=_dollar1.0, match_loc=mk_loc((_start_pos_of_item0, _end_pos_of_item0)), cases=_dollar2, loc=mk_loc((_symbol_start_pos, _end_pos))) }) } // file:///./parser.mbty -// 1190| "catch" "{" { mk_loc($sloc) } -fn yy_action_533(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) - let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - YYObj_Location({(); mk_loc((_symbol_start_pos, _end_pos)) }) +// 257| non_empty_list_semis(X) { $1 } +fn yy_action_599(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj_List_LexCase_(_dollar1) + YYObj_List_LexCase_({(); _dollar1 }) } // file:///./parser.mbty -// 1186| list_semis(single_pattern_case) { $1 } -fn yy_action_534(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[0].0 is YYObj_List_Case_(_dollar1) - YYObj_List_Case_({(); _dollar1 }) +// 1366| lex_pattern "=>" expr_statement { +// 1367| LexCase::{ +// 1368| pat : $1, +// 1369| pat_loc : mk_loc($loc($1)), +// 1370| guard_ : None, +// 1371| body : $3 +// 1372| } +// 1373| } +fn yy_action_600(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj__list_List_LexTopPattern_(_dollar1) + let _start_pos_of_item0 = _args[0].1 + let _end_pos_of_item0 = _args[0].2 + guard _args[2].0 is YYObj_Expr(_dollar3) + YYObj_LexCase({(); + LexCase::{ + pat : _dollar1, + pat_loc : mk_loc((_start_pos_of_item0, _end_pos_of_item0)), + guard_ : None, + body : _dollar3 + } + }) } // file:///./parser.mbty -// 1211| "try" pipe_expr catch_keyword single_pattern_cases "}" else_keyword single_pattern_cases "}" { -// 1212| let catch_loc = $3 -// 1213| let else_loc = $6 -// 1214| Try( -// 1215| body = $2, -// 1216| catch_ = $4, -// 1217| try_else = Some($7), -// 1218| has_try = true, -// 1219| try_loc = mk_loc($loc($1)), -// 1220| catch_loc~, -// 1221| else_loc~, -// 1222| loc = mk_loc($sloc) -// 1223| ) -// 1224| } -fn yy_action_535(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_430(_args[4].2, _args[5:7]) - guard _args[2].0 is YYObj_Location(_dollar3) - guard _sub_action_0_result is YYObj_Location(_dollar6) - guard _args[1].0 is YYObj_Expr(_dollar2) - guard _args[3].0 is YYObj_List_Case_(_dollar4) - guard _args[7].0 is YYObj_List_Case_(_dollar7) +// 1304| match_header non_empty_list_semis(single_pattern_case) "}" { +// 1305| let expr = $1 +// 1306| Match( +// 1307| expr~, +// 1308| cases = $2, +// 1309| match_loc = mk_loc($loc($1)), +// 1310| loc = mk_loc($sloc) +// 1311| ) +// 1312| } +fn yy_action_601(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj_Expr(_dollar1) + guard _args[1].0 is YYObj_List_Case_(_dollar2) let _start_pos_of_item0 = _args[0].1 let _end_pos_of_item0 = _args[0].2 let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } YYObj_Expr({(); - let catch_loc = _dollar3 - let else_loc = _dollar6 - Try( - body = _dollar2, - catch_ = _dollar4, - try_else = Some(_dollar7), - has_try = true, - try_loc = mk_loc((_start_pos_of_item0, _end_pos_of_item0)), - catch_loc~, - else_loc~, + let expr = _dollar1 + Match( + expr~, + cases = _dollar2, + match_loc = mk_loc((_start_pos_of_item0, _end_pos_of_item0)), loc = mk_loc((_symbol_start_pos, _end_pos)) ) }) } // file:///./parser.mbty -// 1194| "noraise" "{" { mk_loc($sloc) } -fn yy_action_430(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) - let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - YYObj_Location({(); mk_loc((_symbol_start_pos, _end_pos)) }) -} - -// file:///./parser.mbty -// 1198| "try" pipe_expr catch_keyword single_pattern_cases "}" { -// 1199| let catch_loc = $3 -// 1200| Try( -// 1201| body = $2, -// 1202| catch_ = $4, -// 1203| try_else = None, -// 1204| has_try = true, -// 1205| try_loc = mk_loc($loc($1)), -// 1206| catch_loc~, -// 1207| else_loc = @basic.Location::{ start: @basic.Position::{ fname: "", lnum: 0, bol: 0, cnum: 0 }, end: @basic.Position::{ fname: "", lnum: 0, bol: 0, cnum: 0 } }, -// 1208| loc = mk_loc($sloc) -// 1209| ) -// 1210| } -fn yy_action_536(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[2].0 is YYObj_Location(_dollar3) - guard _args[1].0 is YYObj_Expr(_dollar2) - guard _args[3].0 is YYObj_List_Case_(_dollar4) +// 1313| match_header "}" { +// 1314| let expr = $1 +// 1315| Match( +// 1316| expr~, +// 1317| cases = @list.empty(), +// 1318| match_loc = mk_loc($loc($1)), +// 1319| loc = mk_loc($sloc) +// 1320| ) +// 1321| } +fn yy_action_602(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj_Expr(_dollar1) let _start_pos_of_item0 = _args[0].1 let _end_pos_of_item0 = _args[0].2 let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } YYObj_Expr({(); - let catch_loc = _dollar3 - Try( - body = _dollar2, - catch_ = _dollar4, - try_else = None, - has_try = true, - try_loc = mk_loc((_start_pos_of_item0, _end_pos_of_item0)), - catch_loc~, - else_loc = @basic.Location::{ start: @basic.Position::{ fname: "", lnum: 0, bol: 0, cnum: 0 }, end: @basic.Position::{ fname: "", lnum: 0, bol: 0, cnum: 0 } }, + let expr = _dollar1 + Match( + expr~, + cases = @list.empty(), + match_loc = mk_loc((_start_pos_of_item0, _end_pos_of_item0)), loc = mk_loc((_symbol_start_pos, _end_pos)) ) }) } // file:///./parser.mbty -// 251| non_empty_list_semis(X) { $1 } -fn yy_action_537(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[0].0 is YYObj_List_Case_(_dollar1) - YYObj_List_Case_({(); _dollar1 }) -} - -// file:///./parser.mbty -// 250| { @list.empty() } -fn yy_action_538(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - YYObj_List_Case_({(); @list.empty() }) +// 246| X option(SEMI) { @list.singleton($1) } +fn yy_action_603(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj_Case(_dollar1) + YYObj_List_Case_({(); @list.singleton(_dollar1) }) } // file:///./parser.mbty -// 1225| "try?" pipe_expr { -// 1226| TryOperator(body = $2, kind = Question, try_loc = mk_loc($loc($1)), loc = mk_loc($sloc)) -// 1227| } -fn yy_action_539(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[1].0 is YYObj_Expr(_dollar2) - let _start_pos_of_item0 = _args[0].1 - let _end_pos_of_item0 = _args[0].2 +// 1195| "break" POST_LABEL option(expr) { +// 1196| let label = Label::{ name: $2, loc: mk_loc($loc($2)) } +// 1197| Break(arg = $3, label = Some(label), loc = mk_loc($sloc)) +// 1198| } +fn yy_action_604(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[1].0 is YYObj_String(_dollar2) + let _start_pos_of_item1 = _args[1].1 + let _end_pos_of_item1 = _args[1].2 + guard _args[2].0 is YYObj_Option_Expr_(_dollar3) let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } YYObj_Expr({(); - TryOperator(body = _dollar2, kind = Question, try_loc = mk_loc((_start_pos_of_item0, _end_pos_of_item0)), loc = mk_loc((_symbol_start_pos, _end_pos))) + let label = Label::{ name: _dollar2, loc: mk_loc((_start_pos_of_item1, _end_pos_of_item1)) } + Break(arg = _dollar3, label = Some(label), loc = mk_loc((_symbol_start_pos, _end_pos))) }) } // file:///./parser.mbty -// 1228| "try!" pipe_expr { -// 1229| TryOperator(body = $2, kind = Exclamation, try_loc = mk_loc($loc($1)), loc = mk_loc($sloc)) -// 1230| } -fn yy_action_540(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[1].0 is YYObj_Expr(_dollar2) - let _start_pos_of_item0 = _args[0].1 - let _end_pos_of_item0 = _args[0].2 +// 1199| "break" option(expr) { Break(arg = $2, label = None, loc = mk_loc($sloc)) } +fn yy_action_605(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[1].0 is YYObj_Option_Expr_(_dollar2) let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - YYObj_Expr({(); - TryOperator(body = _dollar2, kind = Exclamation, try_loc = mk_loc((_start_pos_of_item0, _end_pos_of_item0)), loc = mk_loc((_symbol_start_pos, _end_pos))) - }) + YYObj_Expr({(); Break(arg = _dollar2, label = None, loc = mk_loc((_symbol_start_pos, _end_pos))) }) } // file:///./parser.mbty -// 1234| "if" infix_expr block_expr "else" block_expr { -// 1235| If(cond = $2, ifso = $3, ifnot = Some($5), loc = mk_loc($sloc)) -// 1236| } -fn yy_action_541(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[1].0 is YYObj_Expr(_dollar2) - guard _args[2].0 is YYObj_Expr(_dollar3) - guard _args[4].0 is YYObj_Expr(_dollar5) +// 1200| "continue" POST_LABEL list_commas_no_trailing(expr) { +// 1201| let label = Label::{ name: $2, loc: mk_loc($loc($2)) } +// 1202| Continue(args = $3, label = Some(label), loc = mk_loc($sloc)) +// 1203| } +fn yy_action_606(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[1].0 is YYObj_String(_dollar2) + let _start_pos_of_item1 = _args[1].1 + let _end_pos_of_item1 = _args[1].2 + guard _args[2].0 is YYObj_List_Expr_(_dollar3) let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } YYObj_Expr({(); - If(cond = _dollar2, ifso = _dollar3, ifnot = Some(_dollar5), loc = mk_loc((_symbol_start_pos, _end_pos))) + let label = Label::{ name: _dollar2, loc: mk_loc((_start_pos_of_item1, _end_pos_of_item1)) } + Continue(args = _dollar3, label = Some(label), loc = mk_loc((_symbol_start_pos, _end_pos))) }) } // file:///./parser.mbty -// 1237| "if" infix_expr block_expr "else" if_expr { -// 1238| If(cond = $2, ifso = $3, ifnot = Some($5), loc = mk_loc($sloc)) -// 1239| } -fn yy_action_542(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[1].0 is YYObj_Expr(_dollar2) - guard _args[2].0 is YYObj_Expr(_dollar3) - guard _args[4].0 is YYObj_Expr(_dollar5) +// 1204| "continue" list_commas_no_trailing(expr) { Continue(args = $2, label = None, loc = mk_loc($sloc)) } +fn yy_action_607(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[1].0 is YYObj_List_Expr_(_dollar2) let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - YYObj_Expr({(); - If(cond = _dollar2, ifso = _dollar3, ifnot = Some(_dollar5), loc = mk_loc((_symbol_start_pos, _end_pos))) - }) + YYObj_Expr({(); Continue(args = _dollar2, label = None, loc = mk_loc((_symbol_start_pos, _end_pos))) }) } // file:///./parser.mbty -// 1240| "if" infix_expr block_expr { -// 1241| If(cond = $2, ifso = $3, ifnot = None, loc = mk_loc($sloc)) -// 1242| } -fn yy_action_543(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[1].0 is YYObj_Expr(_dollar2) +// 218| non_empty_list_commas_no_trailing(X) { $1 } +fn yy_action_608(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj_List_Expr_(_dollar1) + YYObj_List_Expr_({(); _dollar1 }) +} + +// file:///./parser.mbty +// 196| non_empty_list_commas_rev(X) "," X { $1.add($3) } +fn yy_action_609(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj_List_Expr_(_dollar1) guard _args[2].0 is YYObj_Expr(_dollar3) - let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) - let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - YYObj_Expr({(); - If(cond = _dollar2, ifso = _dollar3, ifnot = None, loc = mk_loc((_symbol_start_pos, _end_pos))) - }) + YYObj_List_Expr_({(); _dollar1.add(_dollar3) }) } // file:///./parser.mbty -// 1246| "match" infix_expr "{" { $2 } -fn yy_action_544(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[1].0 is YYObj_Expr(_dollar2) - YYObj_Expr({(); _dollar2 }) +// 200| non_empty_list_commas_rev(X) { $1.rev() } +fn yy_action_610(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj_List_Expr_(_dollar1) + YYObj_List_Expr_({(); _dollar1.rev() }) } -// file:///./stdlib.mbty -// 5| X { Some($1) } -fn yy_action_545(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_546(_last_pos, _args[0:2]) - guard _sub_action_0_result is YYObj_Expr(_dollar1) - YYObj_Option_Expr_({(); Some(_dollar1) }) +// file:///./parser.mbty +// 195| X { @list.singleton($1) } +fn yy_action_611(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj_Expr(_dollar1) + YYObj_List_Expr_({(); @list.singleton(_dollar1) }) +} + +// file:///./parser.mbty +// 217| { @list.empty() } +fn yy_action_612(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + YYObj_List_Expr_({(); @list.empty() }) +} + +// file:///./parser.mbty +// 1205| "return" option(expr) { Return(return_value = $2, loc = mk_loc($sloc)) } +fn yy_action_613(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[1].0 is YYObj_Option_Expr_(_dollar2) + let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) + let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } + YYObj_Expr({(); Return(return_value = _dollar2, loc = mk_loc((_symbol_start_pos, _end_pos))) }) } // file:///./stdlib.mbty -// 32| L X { $2 } -fn yy_action_546(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[1].0 is YYObj_Expr(_dollar2) - YYObj_Expr({(); _dollar2 }) +// 5| X { Some($1) } +fn yy_action_614(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj_Expr(_dollar1) + YYObj_Option_Expr_({(); Some(_dollar1) }) } // file:///./stdlib.mbty // 4| { None } -fn yy_action_547(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +fn yy_action_615(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { YYObj_Option_Expr_({(); None }) } // file:///./parser.mbty -// 1176| "..." { -// 1177| Case::{ -// 1178| pattern : Pattern::Any(loc = mk_loc($sloc)), -// 1179| guard_ : None, -// 1180| body : Hole(loc = mk_loc($sloc), kind = Todo) -// 1181| } -// 1182| } -fn yy_action_548(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) - let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - YYObj_Case({(); - Case::{ - pattern : Pattern::Any(loc = mk_loc((_symbol_start_pos, _end_pos))), - guard_ : None, - body : Hole(loc = mk_loc((_symbol_start_pos, _end_pos)), kind = Todo) - } - }) +// 1206| expr_statement_no_break_continue_return { $1 } +fn yy_action_616(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj_Expr(_dollar1) + YYObj_Expr({(); _dollar1 }) } // file:///./parser.mbty -// 241| X SEMI non_empty_list_semis(X) { $3.add($1) } -fn yy_action_549(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[2].0 is YYObj_List_Case_(_dollar3) - guard _args[0].0 is YYObj_Case(_dollar1) - YYObj_List_Case_({(); _dollar3.add(_dollar1) }) -} - -// file:///./parser.mbty -// 1292| lex_pattern "if" infix_expr "=>" expr_statement { -// 1293| LexCase::{ -// 1294| pat : $1, -// 1295| pat_loc : mk_loc($loc($1)), -// 1296| guard_ : Some($3), -// 1297| body : $5 -// 1298| } -// 1299| } -fn yy_action_550(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[0].0 is YYObj__list_List_LexTopPattern_(_dollar1) - let _start_pos_of_item0 = _args[0].1 - let _end_pos_of_item0 = _args[0].2 +// 1215| loop_label_colon "while" infix_expr block_expr optional_nobreak { +// 1216| While( +// 1217| loop_cond = $3, +// 1218| loop_body = $4, +// 1219| while_else = $5, +// 1220| label = $1, +// 1221| loc = mk_loc($sloc) +// 1222| ) +// 1223| } +fn yy_action_617(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[2].0 is YYObj_Expr(_dollar3) - guard _args[4].0 is YYObj_Expr(_dollar5) - YYObj_LexCase({(); - LexCase::{ - pat : _dollar1, - pat_loc : mk_loc((_start_pos_of_item0, _end_pos_of_item0)), - guard_ : Some(_dollar3), - body : _dollar5 - } + guard _args[3].0 is YYObj_Expr(_dollar4) + guard _args[4].0 is YYObj_Expr_(_dollar5) + guard _args[0].0 is YYObj_Label_(_dollar1) + let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) + let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } + YYObj_Expr({(); + While( + loop_cond = _dollar3, + loop_body = _dollar4, + while_else = _dollar5, + label = _dollar1, + loc = mk_loc((_symbol_start_pos, _end_pos)) + ) }) } // file:///./parser.mbty -// 1300| "..." { -// 1301| let pat = @list.singleton(LexTopPattern::Wildcard(loc = mk_loc($sloc))) -// 1302| LexCase::{ -// 1303| pat, -// 1304| pat_loc : mk_loc($sloc), -// 1305| guard_ : None, -// 1306| body : Hole(loc=mk_loc($sloc), kind=Todo) -// 1307| } -// 1308| } -fn yy_action_551(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 1471| loop_label_colon "for" for_binders SEMI option(infix_expr) SEMI list_commas_no_trailing(separated_pair(binder, "=", expr)) block_expr optional_nobreak optional_where_clause { +// 1472| For( +// 1473| binders = $3, +// 1474| condition = $5, +// 1475| continue_block = $7, +// 1476| body = $8, +// 1477| for_else = $9, +// 1478| label = $1, +// 1479| loc = mk_loc($sloc), +// 1480| where_clause = $10 +// 1481| ) +// 1482| } +fn yy_action_618(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[2].0 is YYObj_List__Binder__Expr__(_dollar3) + guard _args[4].0 is YYObj_Option_Expr_(_dollar5) + guard _args[6].0 is YYObj_List__Binder__Expr__(_dollar7) + guard _args[7].0 is YYObj_Expr(_dollar8) + guard _args[8].0 is YYObj_Expr_(_dollar9) + guard _args[0].0 is YYObj_Label_(_dollar1) let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - YYObj_LexCase({(); - let pat = @list.singleton(LexTopPattern::Wildcard(loc = mk_loc((_symbol_start_pos, _end_pos)))) - LexCase::{ - pat, - pat_loc : mk_loc((_symbol_start_pos, _end_pos)), - guard_ : None, - body : Hole(loc=mk_loc((_symbol_start_pos, _end_pos)), kind=Todo) - } + guard _args[9].0 is YYObj_WhereClause_(_dollar10) + YYObj_Expr({(); + For( + binders = _dollar3, + condition = _dollar5, + continue_block = _dollar7, + body = _dollar8, + for_else = _dollar9, + label = _dollar1, + loc = mk_loc((_symbol_start_pos, _end_pos)), + where_clause = _dollar10 + ) }) } // file:///./parser.mbty -// 241| X SEMI non_empty_list_semis(X) { $3.add($1) } -fn yy_action_552(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[2].0 is YYObj_List_LexCase_(_dollar3) - guard _args[0].0 is YYObj_LexCase(_dollar1) - YYObj_List_LexCase_({(); _dollar3.add(_dollar1) }) +// 1483| loop_label_colon "for" for_binders SEMI infix_expr block_expr optional_nobreak optional_where_clause { +// 1484| For( +// 1485| binders = $3, +// 1486| condition = Some($5), +// 1487| continue_block = @list.empty(), +// 1488| body = $6, +// 1489| for_else = $7, +// 1490| label = $1, +// 1491| loc = mk_loc($sloc), +// 1492| where_clause = $8 +// 1493| ) +// 1494| } +fn yy_action_619(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[2].0 is YYObj_List__Binder__Expr__(_dollar3) + guard _args[4].0 is YYObj_Expr(_dollar5) + guard _args[5].0 is YYObj_Expr(_dollar6) + guard _args[6].0 is YYObj_Expr_(_dollar7) + guard _args[0].0 is YYObj_Label_(_dollar1) + let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) + let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } + guard _args[7].0 is YYObj_WhereClause_(_dollar8) + YYObj_Expr({(); + For( + binders = _dollar3, + condition = Some(_dollar5), + continue_block = @list.empty(), + body = _dollar6, + for_else = _dollar7, + label = _dollar1, + loc = mk_loc((_symbol_start_pos, _end_pos)), + where_clause = _dollar8 + ) + }) } -// file:///./parser.mbty -// 240| X option(SEMI) { @list.singleton($1) } -fn yy_action_553(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[0].0 is YYObj_LexCase(_dollar1) - YYObj_List_LexCase_({(); @list.singleton(_dollar1) }) +// file:///./stdlib.mbty +// 5| X { Some($1) } +fn yy_action_620(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj_Expr(_dollar1) + YYObj_Option_Expr_({(); Some(_dollar1) }) } -// file:///./parser.mbty -// 250| { @list.empty() } -fn yy_action_554(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - YYObj_List_LexCase_({(); @list.empty() }) +// file:///./stdlib.mbty +// 4| { None } +fn yy_action_621(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + YYObj_Option_Expr_({(); None }) } // file:///./parser.mbty -// 1276| "lexmatch" infix_expr "{" { -// 1277| ($2, None) -// 1278| } -fn yy_action_555(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[1].0 is YYObj_Expr(_dollar2) - YYObj__Expr__Label__({(); - (_dollar2, None) +// 1495| loop_label_colon "for" for_binders block_expr optional_nobreak optional_where_clause { +// 1496| For( +// 1497| binders = $3, +// 1498| condition = None, +// 1499| continue_block = @list.empty(), +// 1500| body = $4, +// 1501| for_else = $5, +// 1502| label = $1, +// 1503| loc = mk_loc($sloc), +// 1504| where_clause = $6 +// 1505| ) +// 1506| } +fn yy_action_622(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[2].0 is YYObj_List__Binder__Expr__(_dollar3) + guard _args[3].0 is YYObj_Expr(_dollar4) + guard _args[4].0 is YYObj_Expr_(_dollar5) + guard _args[0].0 is YYObj_Label_(_dollar1) + let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) + let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } + guard _args[5].0 is YYObj_WhereClause_(_dollar6) + YYObj_Expr({(); + For( + binders = _dollar3, + condition = None, + continue_block = @list.empty(), + body = _dollar4, + for_else = _dollar5, + label = _dollar1, + loc = mk_loc((_symbol_start_pos, _end_pos)), + where_clause = _dollar6 + ) }) } // file:///./parser.mbty -// 1279| "lexmatch" infix_expr "with" label "{" { -// 1280| ($2, Some($4)) -// 1281| } -fn yy_action_556(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_426(_args[2].2, _args[3:4]) +// 1460| "nobreak" block_expr { Some($2) } +fn yy_action_623(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[1].0 is YYObj_Expr(_dollar2) - guard _sub_action_0_result is YYObj_Label(_dollar4) - YYObj__Expr__Label__({(); - (_dollar2, Some(_dollar4)) - }) + YYObj_Expr_({(); Some(_dollar2) }) } // file:///./parser.mbty -// 1462| for_expr { $1 } -fn yy_action_557(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[0].0 is YYObj_Expr(_dollar1) - YYObj_Expr({(); _dollar1 }) +// 1465| "where" "{" list_commas(labeled_expr) "}" { +// 1466| Some({ fields : $3, loc : mk_loc($sloc) }) +// 1467| } +fn yy_action_624(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[2].0 is YYObj_List_FieldDef_(_dollar3) + let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) + let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } + YYObj_WhereClause_({(); + Some({ fields : _dollar3, loc : mk_loc((_symbol_start_pos, _end_pos)) }) + }) } // file:///./parser.mbty -// 1463| foreach_expr { $1 } -fn yy_action_558(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[0].0 is YYObj_Expr(_dollar1) - YYObj_Expr({(); _dollar1 }) +// 213| non_empty_list_commas(X) { $1 } +fn yy_action_625(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj_List_FieldDef_(_dollar1) + YYObj_List_FieldDef_({(); _dollar1 }) } // file:///./parser.mbty -// 1464| while_expr { $1 } -fn yy_action_559(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[0].0 is YYObj_Expr(_dollar1) - YYObj_Expr({(); _dollar1 }) +// 196| non_empty_list_commas_rev(X) "," X { $1.add($3) } +fn yy_action_626(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_445(_args[1].2, _args[2:5]) + guard _args[0].0 is YYObj_List_FieldDef_(_dollar1) + guard _sub_action_0_result is YYObj_FieldDef(_dollar3) + YYObj_List_FieldDef_({(); _dollar1.add(_dollar3) }) } // file:///./parser.mbty -// 1465| try_expr { $1 } -fn yy_action_560(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[0].0 is YYObj_Expr(_dollar1) - YYObj_Expr({(); _dollar1 }) +// 196| non_empty_list_commas_rev(X) "," X { $1.add($3) } +fn yy_action_627(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_450(_args[1].2, _args[2:5]) + guard _args[0].0 is YYObj_List_FieldDef_(_dollar1) + guard _sub_action_0_result is YYObj_FieldDef(_dollar3) + YYObj_List_FieldDef_({(); _dollar1.add(_dollar3) }) } // file:///./parser.mbty -// 1466| if_expr { $1 } -fn yy_action_561(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[0].0 is YYObj_Expr(_dollar1) - YYObj_Expr({(); _dollar1 }) +// 204| non_empty_list_commas_rev(X) option(",") { $1.rev() } +fn yy_action_628(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj_List_FieldDef_(_dollar1) + YYObj_List_FieldDef_({(); _dollar1.rev() }) } // file:///./parser.mbty -// 1467| match_expr { $1 } -fn yy_action_562(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[0].0 is YYObj_Expr(_dollar1) - YYObj_Expr({(); _dollar1 }) +// 195| X { @list.singleton($1) } +fn yy_action_629(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_445(_last_pos, _args[0:3]) + guard _sub_action_0_result is YYObj_FieldDef(_dollar1) + YYObj_List_FieldDef_({(); @list.singleton(_dollar1) }) } // file:///./parser.mbty -// 1468| lexmatch_expr { $1 } -fn yy_action_563(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[0].0 is YYObj_Expr(_dollar1) - YYObj_Expr({(); _dollar1 }) +// 2451| label ":" expr { @syntax.make_field_def(loc = mk_loc($sloc), $1, $3, false) } +fn yy_action_445(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_473(_last_pos, _args[0:1]) + let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) + let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } + guard _sub_action_0_result is YYObj_Label(_dollar1) + guard _args[2].0 is YYObj_Expr(_dollar3) + YYObj_FieldDef({(); @syntax.make_field_def(loc = mk_loc((_symbol_start_pos, _end_pos)), _dollar1, _dollar3, false) }) } // file:///./parser.mbty -// 1469| simple_try_expr { $1 } -fn yy_action_564(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[0].0 is YYObj_Expr(_dollar1) - YYObj_Expr({(); _dollar1 }) +// 195| X { @list.singleton($1) } +fn yy_action_630(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_450(_last_pos, _args[0:3]) + guard _sub_action_0_result is YYObj_FieldDef(_dollar1) + YYObj_List_FieldDef_({(); @list.singleton(_dollar1) }) } // file:///./parser.mbty -// 1470| quantifier_expr { $1 } -fn yy_action_565(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[0].0 is YYObj_Expr(_dollar1) - YYObj_Expr({(); _dollar1 }) +// 212| { @list.empty() } +fn yy_action_631(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + YYObj_List_FieldDef_({(); @list.empty() }) } // file:///./parser.mbty -// 1471| arrow_fn_expr { Function(func = $1, loc = mk_loc($sloc)) } -fn yy_action_566(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[0].0 is YYObj_Func(_dollar1) +// 1510| loop_label_colon "for" non_empty_list_commas(foreach_binder) "in" expr foreach_optional_loop_vars block_expr optional_nobreak optional_where_clause { +// 1511| let (init, continue_block) = $6 +// 1512| ForEach( +// 1513| binders = $3, +// 1514| expr = $5, +// 1515| init~, +// 1516| continue_block~, +// 1517| body = $7, +// 1518| else_block = $8, +// 1519| where_clause = $9, +// 1520| label = $1, +// 1521| loc = mk_loc($sloc) +// 1522| ) +// 1523| } +fn yy_action_632(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[5].0 is YYObj__List__Binder__Expr____List__Binder__Expr___(_dollar6) + guard _args[2].0 is YYObj_List_Binder__(_dollar3) + guard _args[4].0 is YYObj_Expr(_dollar5) + guard _args[6].0 is YYObj_Expr(_dollar7) + guard _args[7].0 is YYObj_Expr_(_dollar8) + guard _args[8].0 is YYObj_WhereClause_(_dollar9) + guard _args[0].0 is YYObj_Label_(_dollar1) let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - YYObj_Expr({(); Function(func = _dollar1, loc = mk_loc((_symbol_start_pos, _end_pos))) }) + YYObj_Expr({(); + let (init, continue_block) = _dollar6 + ForEach( + binders = _dollar3, + expr = _dollar5, + init~, + continue_block~, + body = _dollar7, + else_block = _dollar8, + where_clause = _dollar9, + label = _dollar1, + loc = mk_loc((_symbol_start_pos, _end_pos)) + ) + }) } // file:///./parser.mbty -// 1518| "_" "=>" "{" list_semis_rev(statement) "}" { -// 1519| let body = Statement::compact_rev($4, loc = mk_loc($loc($3)).merge(mk_loc($loc($5)))) -// 1520| make_arrow_fn(@list.singleton((Unnamed(mk_loc($loc($1))), None)), body, params_loc = mk_loc($loc($1)), loc = mk_loc($sloc)) -// 1521| } -fn yy_action_567(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[3].0 is YYObj_List_Statement_(_dollar4) - let _start_pos_of_item2 = _args[2].1 - let _end_pos_of_item2 = _args[2].2 - let _start_pos_of_item4 = _args[4].1 - let _end_pos_of_item4 = _args[4].2 - let _start_pos_of_item0 = _args[0].1 - let _end_pos_of_item0 = _args[0].2 - let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) - let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - YYObj_Func({(); - let body = Statement::compact_rev(_dollar4, loc = mk_loc((_start_pos_of_item2, _end_pos_of_item2)).merge(mk_loc((_start_pos_of_item4, _end_pos_of_item4)))) - make_arrow_fn(@list.singleton((Unnamed(mk_loc((_start_pos_of_item0, _end_pos_of_item0))), None)), body, params_loc = mk_loc((_start_pos_of_item0, _end_pos_of_item0)), loc = mk_loc((_symbol_start_pos, _end_pos))) - }) +// 1468| { None } +fn yy_action_633(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + YYObj_WhereClause_({(); None }) } // file:///./parser.mbty -// 246| non_empty_list_semis_rev(X) { $1 } -fn yy_action_568(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[0].0 is YYObj_List_Statement_(_dollar1) - YYObj_List_Statement_({(); _dollar1 }) +// 1461| { None } +fn yy_action_634(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + YYObj_Expr_({(); None }) } // file:///./parser.mbty -// 1558| arrow_fn_with_explicit_braces { Function(func = $1, loc = mk_loc($sloc)) } -fn yy_action_569(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[0].0 is YYObj_Func(_dollar1) - let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) - let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - YYObj_Expr({(); Function(func = _dollar1, loc = mk_loc((_symbol_start_pos, _end_pos))) }) +// 1440| list_commas_no_trailing(separated_pair(binder, "=", expr)) { $1 } +fn yy_action_635(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj_List__Binder__Expr__(_dollar1) + YYObj_List__Binder__Expr__({(); _dollar1 }) } // file:///./parser.mbty -// 1559| infix_expr { $1 } -fn yy_action_570(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[0].0 is YYObj_Expr(_dollar1) - YYObj_Expr({(); _dollar1 }) +// 1529| SEMI for_binders SEMI for_binders { ($2, $4) } +fn yy_action_636(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[1].0 is YYObj_List__Binder__Expr__(_dollar2) + guard _args[3].0 is YYObj_List__Binder__Expr__(_dollar4) + YYObj__List__Binder__Expr____List__Binder__Expr___({(); (_dollar2, _dollar4) }) } // file:///./parser.mbty -// 1563| pipe_expr "<|" backward_pipeline_rhs { -// 1564| RevPipe(lhs = $1, rhs = $3, loc = mk_loc($sloc)) -// 1565| } -fn yy_action_571(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[0].0 is YYObj_Expr(_dollar1) - guard _args[2].0 is YYObj_Expr(_dollar3) - let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) - let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - YYObj_Expr({(); - RevPipe(lhs = _dollar1, rhs = _dollar3, loc = mk_loc((_symbol_start_pos, _end_pos))) - }) +// 1528| SEMI for_binders { ($2, @list.empty()) } +fn yy_action_637(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[1].0 is YYObj_List__Binder__Expr__(_dollar2) + YYObj__List__Binder__Expr____List__Binder__Expr___({(); (_dollar2, @list.empty()) }) } // file:///./parser.mbty -// 1569| pipe_expr "|>" binder "=>" block_expr { -// 1570| let params_loc = mk_loc($loc($3)) -// 1571| let fn_loc = mk_loc($loc($3)).merge(mk_loc($loc($5))) -// 1572| let func = make_arrow_fn(@list.singleton((Named($3), None)), $5, params_loc~, loc = fn_loc) -// 1573| let rhs = Expr::Function(func~, loc = fn_loc) -// 1574| Pipe(lhs = $1, rhs~, loc = mk_loc($sloc)) -// 1575| } -fn yy_action_572(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_15(_args[1].2, _args[2:3]) - let _start_pos_of_item2 = _args[2].1 - let _end_pos_of_item2 = _args[2].2 - let _start_pos_of_item4 = _args[4].1 - let _end_pos_of_item4 = _args[4].2 - guard _sub_action_0_result is YYObj_Binder(_dollar3) - guard _args[4].0 is YYObj_Expr(_dollar5) - guard _args[0].0 is YYObj_Expr(_dollar1) - let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) - let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - YYObj_Expr({(); - let params_loc = mk_loc((_start_pos_of_item2, _end_pos_of_item2)) - let fn_loc = mk_loc((_start_pos_of_item2, _end_pos_of_item2)).merge(mk_loc((_start_pos_of_item4, _end_pos_of_item4))) - let func = make_arrow_fn(@list.singleton((Named(_dollar3), None)), _dollar5, params_loc~, loc = fn_loc) - let rhs = Expr::Function(func~, loc = fn_loc) - Pipe(lhs = _dollar1, rhs~, loc = mk_loc((_symbol_start_pos, _end_pos))) - }) +// 1527| { (@list.empty(), @list.empty()) } +fn yy_action_638(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + YYObj__List__Binder__Expr____List__Binder__Expr___({(); (@list.empty(), @list.empty()) }) } // file:///./parser.mbty -// 1566| pipe_expr "|>" infix_expr { -// 1567| Pipe(lhs = $1, rhs = $3, loc = mk_loc($sloc)) -// 1568| } -fn yy_action_573(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[0].0 is YYObj_Expr(_dollar1) - guard _args[2].0 is YYObj_Expr(_dollar3) - let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) - let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - YYObj_Expr({(); - Pipe(lhs = _dollar1, rhs = _dollar3, loc = mk_loc((_symbol_start_pos, _end_pos))) - }) +// 195| X { @list.singleton($1) } +fn yy_action_639(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_640(_last_pos, _args[0:3]) + guard _sub_action_0_result is YYObj__Binder__Expr_(_dollar1) + YYObj_List__Binder__Expr__({(); @list.singleton(_dollar1) }) } // file:///./parser.mbty -// 1502| pipe_expr { $1 } -fn yy_action_574(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[0].0 is YYObj_Expr(_dollar1) - YYObj_Expr({(); _dollar1 }) +// 195| X { @list.singleton($1) } +fn yy_action_641(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_642(_last_pos, _args[0:3]) + guard _sub_action_0_result is YYObj__Binder__Expr_(_dollar1) + YYObj_List__Binder__Expr__({(); @list.singleton(_dollar1) }) } // file:///./parser.mbty -// 1552| "_" ioption(",") ")" { @list.singleton(Unnamed(mk_loc($loc($1)))) } -fn yy_action_575(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_434(_args[0].2, _args[1:1]) - let _start_pos_of_item0 = _args[0].1 - let _end_pos_of_item0 = _args[0].2 - YYObj_List_ArrowFnParam_({(); @list.singleton(Unnamed(mk_loc((_start_pos_of_item0, _end_pos_of_item0)))) }) +// 218| non_empty_list_commas_no_trailing(X) { $1 } +fn yy_action_643(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj_List__Binder__Expr__(_dollar1) + YYObj_List__Binder__Expr__({(); _dollar1 }) } // file:///./parser.mbty -// 1552| "_" ioption(",") ")" { @list.singleton(Unnamed(mk_loc($loc($1)))) } -fn yy_action_576(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_436(_args[0].2, _args[1:2]) - let _start_pos_of_item0 = _args[0].1 - let _end_pos_of_item0 = _args[0].2 - YYObj_List_ArrowFnParam_({(); @list.singleton(Unnamed(mk_loc((_start_pos_of_item0, _end_pos_of_item0)))) }) +// 204| non_empty_list_commas_rev(X) option(",") { $1.rev() } +fn yy_action_644(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj_List_Binder__(_dollar1) + YYObj_List_Binder__({(); _dollar1.rev() }) } // file:///./parser.mbty -// 1554| "_" "," arrow_fn_prefix_no_constraint { $3.add(Unnamed(mk_loc($loc($1)))) } -fn yy_action_577(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[2].0 is YYObj_List_ArrowFnParam_(_dollar3) - let _start_pos_of_item0 = _args[0].1 - let _end_pos_of_item0 = _args[0].2 - YYObj_List_ArrowFnParam_({(); _dollar3.add(Unnamed(mk_loc((_start_pos_of_item0, _end_pos_of_item0)))) }) +// 1539| binder { Some($1)} +fn yy_action_645(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_15(_last_pos, _args[0:1]) + guard _sub_action_0_result is YYObj_Binder(_dollar1) + YYObj_Binder_({(); Some(_dollar1)}) } // file:///./parser.mbty -// 1776| "_" "," non_empty_tuple_elems_with_prefix { $3.add(Expr::Hole(loc = mk_loc($loc($1)), kind = Incomplete)) } -fn yy_action_578(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[2].0 is YYObj_List_Expr_(_dollar3) - let _start_pos_of_item0 = _args[0].1 - let _end_pos_of_item0 = _args[0].2 - YYObj_List_Expr_({(); _dollar3.add(Expr::Hole(loc = mk_loc((_start_pos_of_item0, _end_pos_of_item0)), kind = Incomplete)) }) +// 1539| binder { Some($1)} +fn yy_action_646(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_20(_last_pos, _args[0:1]) + guard _sub_action_0_result is YYObj_Binder(_dollar1) + YYObj_Binder_({(); Some(_dollar1)}) } // file:///./parser.mbty -// 1800| "(" "_" ":" type_ ")" { Constraint(expr = Hole(loc = mk_loc($loc($2)), kind = Incomplete), ty = $4, loc = mk_loc($sloc)) } -fn yy_action_579(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _start_pos_of_item1 = _args[1].1 - let _end_pos_of_item1 = _args[1].2 - guard _args[3].0 is YYObj_Type(_dollar4) - let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) - let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - YYObj_Expr({(); Constraint(expr = Hole(loc = mk_loc((_start_pos_of_item1, _end_pos_of_item1)), kind = Incomplete), ty = _dollar4, loc = mk_loc((_symbol_start_pos, _end_pos))) }) +// 1540| "_" { None } +fn yy_action_647(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + YYObj_Binder_({(); None }) } // file:///./parser.mbty -// 1541| "_" ioption(",") ")" { @list.singleton((Unnamed(mk_loc($loc($1))), None)) } -fn yy_action_580(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_434(_args[0].2, _args[1:1]) - let _start_pos_of_item0 = _args[0].1 - let _end_pos_of_item0 = _args[0].2 - YYObj_List__ArrowFnParam__Type___({(); @list.singleton((Unnamed(mk_loc((_start_pos_of_item0, _end_pos_of_item0))), None)) }) +// 196| non_empty_list_commas_rev(X) "," X { $1.add($3) } +fn yy_action_648(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj_List_Binder__(_dollar1) + guard _args[2].0 is YYObj_Binder_(_dollar3) + YYObj_List_Binder__({(); _dollar1.add(_dollar3) }) } // file:///./parser.mbty -// 1540| binder ioption(",") ")" { @list.singleton((Named($1), None)) } -fn yy_action_581(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_15(_last_pos, _args[0:1]) - let _sub_action_1_result = yy_action_434(_args[0].2, _args[1:1]) - guard _sub_action_0_result is YYObj_Binder(_dollar1) - YYObj_List__ArrowFnParam__Type___({(); @list.singleton((Named(_dollar1), None)) }) +// 196| non_empty_list_commas_rev(X) "," X { $1.add($3) } +fn yy_action_649(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_640(_args[1].2, _args[2:5]) + guard _args[0].0 is YYObj_List__Binder__Expr__(_dollar1) + guard _sub_action_0_result is YYObj__Binder__Expr_(_dollar3) + YYObj_List__Binder__Expr__({(); _dollar1.add(_dollar3) }) } -// file:///./parser.mbty -// 1540| binder ioption(",") ")" { @list.singleton((Named($1), None)) } -fn yy_action_582(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// file:///./stdlib.mbty +// 28| X SEP Y { ($1, $3) } +fn yy_action_640(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _sub_action_0_result = yy_action_15(_last_pos, _args[0:1]) - let _sub_action_1_result = yy_action_436(_args[0].2, _args[1:2]) guard _sub_action_0_result is YYObj_Binder(_dollar1) - YYObj_List__ArrowFnParam__Type___({(); @list.singleton((Named(_dollar1), None)) }) + guard _args[2].0 is YYObj_Expr(_dollar3) + YYObj__Binder__Expr_({(); (_dollar1, _dollar3) }) } // file:///./parser.mbty -// 1544| binder "," arrow_fn_prefix { $3.add((Named($1), None)) } -fn yy_action_583(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_15(_last_pos, _args[0:1]) - guard _args[2].0 is YYObj_List__ArrowFnParam__Type___(_dollar3) - guard _sub_action_0_result is YYObj_Binder(_dollar1) - YYObj_List__ArrowFnParam__Type___({(); _dollar3.add((Named(_dollar1), None)) }) +// 1189| augmented_assignment_expr { $1 } +fn yy_action_650(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_651(_last_pos, _args[0:3]) + guard _sub_action_0_result is YYObj_Expr(_dollar1) + YYObj_Expr({(); _dollar1 }) } // file:///./parser.mbty -// 1542| binder ":" type_ ioption(",") ")" { @list.singleton((Named($1), Some($3))) } -fn yy_action_584(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_15(_last_pos, _args[0:1]) - let _sub_action_1_result = yy_action_434(_args[2].2, _args[3:3]) - guard _sub_action_0_result is YYObj_Binder(_dollar1) - guard _args[2].0 is YYObj_Type(_dollar3) - YYObj_List__ArrowFnParam__Type___({(); @list.singleton((Named(_dollar1), Some(_dollar3))) }) +// 1144| left_value assignop expr { +// 1145| let loc = mk_loc($sloc) +// 1146| match $1 { +// 1147| Var(var_) => Assign(var_~, expr=$3, augmented_by=Some($2), loc~) +// 1148| Field(record, accessor) => Mutate(record~, accessor~, field=$3, augmented_by=Some($2), loc~) +// 1149| Array(array, index) => ArrayAugmentedSet(op=$2, array~, index~, value=$3, loc~) +// 1150| } +// 1151| } +fn yy_action_651(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_652(_args[0].2, _args[1:2]) + let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) + let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } + guard _args[0].0 is YYObj_LeftValue(_dollar1) + guard _args[2].0 is YYObj_Expr(_dollar3) + guard _sub_action_0_result is YYObj_Var(_dollar2) + YYObj_Expr({(); + let loc = mk_loc((_symbol_start_pos, _end_pos)) + match _dollar1 { + Var(var_) => Assign(var_~, expr=_dollar3, augmented_by=Some(_dollar2), loc~) + Field(record, accessor) => Mutate(record~, accessor~, field=_dollar3, augmented_by=Some(_dollar2), loc~) + Array(array, index) => ArrayAugmentedSet(op=_dollar2, array~, index~, value=_dollar3, loc~) + } + }) } // file:///./parser.mbty -// 1542| binder ":" type_ ioption(",") ")" { @list.singleton((Named($1), Some($3))) } -fn yy_action_585(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_15(_last_pos, _args[0:1]) - let _sub_action_1_result = yy_action_436(_args[2].2, _args[3:4]) - guard _sub_action_0_result is YYObj_Binder(_dollar1) - guard _args[2].0 is YYObj_Type(_dollar3) - YYObj_List__ArrowFnParam__Type___({(); @list.singleton((Named(_dollar1), Some(_dollar3))) }) +// 2117| "+=" { Var::{ name: Ident(name = "+"), loc: mk_loc($sloc) } } +fn yy_action_652(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) + let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } + YYObj_Var({(); Var::{ name: Ident(name = "+"), loc: mk_loc((_symbol_start_pos, _end_pos)) } }) } // file:///./parser.mbty -// 1546| binder ":" type_ "," arrow_fn_prefix { $5.add((Named($1), Some($3))) } -fn yy_action_586(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_15(_last_pos, _args[0:1]) - guard _args[4].0 is YYObj_List__ArrowFnParam__Type___(_dollar5) - guard _sub_action_0_result is YYObj_Binder(_dollar1) - guard _args[2].0 is YYObj_Type(_dollar3) - YYObj_List__ArrowFnParam__Type___({(); _dollar5.add((Named(_dollar1), Some(_dollar3))) }) +// 1189| augmented_assignment_expr { $1 } +fn yy_action_653(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_654(_last_pos, _args[0:3]) + guard _sub_action_0_result is YYObj_Expr(_dollar1) + YYObj_Expr({(); _dollar1 }) } // file:///./parser.mbty -// 1541| "_" ioption(",") ")" { @list.singleton((Unnamed(mk_loc($loc($1))), None)) } -fn yy_action_587(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_436(_args[0].2, _args[1:2]) - let _start_pos_of_item0 = _args[0].1 - let _end_pos_of_item0 = _args[0].2 - YYObj_List__ArrowFnParam__Type___({(); @list.singleton((Unnamed(mk_loc((_start_pos_of_item0, _end_pos_of_item0))), None)) }) +// 1144| left_value assignop expr { +// 1145| let loc = mk_loc($sloc) +// 1146| match $1 { +// 1147| Var(var_) => Assign(var_~, expr=$3, augmented_by=Some($2), loc~) +// 1148| Field(record, accessor) => Mutate(record~, accessor~, field=$3, augmented_by=Some($2), loc~) +// 1149| Array(array, index) => ArrayAugmentedSet(op=$2, array~, index~, value=$3, loc~) +// 1150| } +// 1151| } +fn yy_action_654(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_655(_args[0].2, _args[1:2]) + let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) + let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } + guard _args[0].0 is YYObj_LeftValue(_dollar1) + guard _args[2].0 is YYObj_Expr(_dollar3) + guard _sub_action_0_result is YYObj_Var(_dollar2) + YYObj_Expr({(); + let loc = mk_loc((_symbol_start_pos, _end_pos)) + match _dollar1 { + Var(var_) => Assign(var_~, expr=_dollar3, augmented_by=Some(_dollar2), loc~) + Field(record, accessor) => Mutate(record~, accessor~, field=_dollar3, augmented_by=Some(_dollar2), loc~) + Array(array, index) => ArrayAugmentedSet(op=_dollar2, array~, index~, value=_dollar3, loc~) + } + }) } // file:///./parser.mbty -// 1545| "_" "," arrow_fn_prefix { $3.add((Unnamed(mk_loc($loc($1))), None)) } -fn yy_action_588(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[2].0 is YYObj_List__ArrowFnParam__Type___(_dollar3) - let _start_pos_of_item0 = _args[0].1 - let _end_pos_of_item0 = _args[0].2 - YYObj_List__ArrowFnParam__Type___({(); _dollar3.add((Unnamed(mk_loc((_start_pos_of_item0, _end_pos_of_item0))), None)) }) +// 2118| AUGMENTED_ASSIGNMENT { Var::{ name: Ident(name = $1), loc: mk_loc($sloc) } } +fn yy_action_655(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj_String(_dollar1) + let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) + let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } + YYObj_Var({(); Var::{ name: Ident(name = _dollar1), loc: mk_loc((_symbol_start_pos, _end_pos)) } }) } // file:///./parser.mbty -// 1543| "_" ":" type_ ioption(",") ")" { @list.singleton((Unnamed(mk_loc($loc($1))), Some($3))) } -fn yy_action_589(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_434(_args[2].2, _args[3:3]) - let _start_pos_of_item0 = _args[0].1 - let _end_pos_of_item0 = _args[0].2 - guard _args[2].0 is YYObj_Type(_dollar3) - YYObj_List__ArrowFnParam__Type___({(); @list.singleton((Unnamed(mk_loc((_start_pos_of_item0, _end_pos_of_item0))), Some(_dollar3))) }) +// 1047| lident_string { Ident(name = $1) } +fn yy_action_656(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_226(_last_pos, _args[0:1]) + guard _sub_action_0_result is YYObj_String(_dollar1) + YYObj_LongIdent({(); Ident(name = _dollar1) }) } // file:///./parser.mbty -// 1543| "_" ":" type_ ioption(",") ")" { @list.singleton((Unnamed(mk_loc($loc($1))), Some($3))) } -fn yy_action_590(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_436(_args[2].2, _args[3:4]) - let _start_pos_of_item0 = _args[0].1 - let _end_pos_of_item0 = _args[0].2 - guard _args[2].0 is YYObj_Type(_dollar3) - YYObj_List__ArrowFnParam__Type___({(); @list.singleton((Unnamed(mk_loc((_start_pos_of_item0, _end_pos_of_item0))), Some(_dollar3))) }) +// 1047| lident_string { Ident(name = $1) } +fn yy_action_657(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_228(_last_pos, _args[0:1]) + guard _sub_action_0_result is YYObj_String(_dollar1) + YYObj_LongIdent({(); Ident(name = _dollar1) }) } // file:///./parser.mbty -// 1547| "_" ":" type_ "," arrow_fn_prefix { $5.add((Unnamed(mk_loc($loc($1))), Some($3))) } -fn yy_action_591(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[4].0 is YYObj_List__ArrowFnParam__Type___(_dollar5) - let _start_pos_of_item0 = _args[0].1 - let _end_pos_of_item0 = _args[0].2 - guard _args[2].0 is YYObj_Type(_dollar3) - YYObj_List__ArrowFnParam__Type___({(); _dollar5.add((Unnamed(mk_loc((_start_pos_of_item0, _end_pos_of_item0))), Some(_dollar3))) }) +// 1048| PACKAGE_NAME DOT_LIDENT { Dot(pkg = $1, id = $2) } +fn yy_action_658(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj_String(_dollar1) + guard _args[1].0 is YYObj_String(_dollar2) + YYObj_LongIdent({(); Dot(pkg = _dollar1, id = _dollar2) }) } // file:///./parser.mbty -// 1857| simple_expr "(" list_commas(argument) ")" { -// 1858| Apply(func = $1, args = $3, loc = mk_loc($sloc)) -// 1859| } -fn yy_action_592(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[0].0 is YYObj_Expr(_dollar1) - guard _args[2].0 is YYObj_List_Argument_(_dollar3) +// 1187| "raise" expr { Raise(err_value = $2, loc = mk_loc($sloc)) } +fn yy_action_659(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[1].0 is YYObj_Expr(_dollar2) let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - YYObj_Expr({(); - Apply(func = _dollar1, args = _dollar3, loc = mk_loc((_symbol_start_pos, _end_pos))) - }) -} - -// file:///./parser.mbty -// 207| non_empty_list_commas(X) { $1 } -fn yy_action_593(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[0].0 is YYObj_List_Argument_(_dollar1) - YYObj_List_Argument_({(); _dollar1 }) + YYObj_Expr({(); Raise(err_value = _dollar2, loc = mk_loc((_symbol_start_pos, _end_pos))) }) } // file:///./parser.mbty -// 1733| var { Var($1) } -fn yy_action_594(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_595(_last_pos, _args[0:1]) - guard _sub_action_0_result is YYObj_Var(_dollar1) - YYObj_LeftValue({(); Var(_dollar1) }) +// 1188| "..." { Hole(loc = mk_loc($sloc), kind = Todo) } +fn yy_action_660(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) + let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } + YYObj_Expr({(); Hole(loc = mk_loc((_symbol_start_pos, _end_pos)), kind = Todo) }) } // file:///./parser.mbty -// 1959| qual_ident { Var::{ name: $1, loc: mk_loc($sloc) } } -fn yy_action_595(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[0].0 is YYObj_LongIdent(_dollar1) +// 1614| binder "=>" expr_statement_no_break_continue_return { +// 1615| make_arrow_fn(@list.singleton((Named($1), None)), $3, params_loc = mk_loc($loc($1)), loc = mk_loc($sloc)) +// 1616| } +fn yy_action_661(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_15(_last_pos, _args[0:1]) + guard _sub_action_0_result is YYObj_Binder(_dollar1) + guard _args[2].0 is YYObj_Expr(_dollar3) + let _start_pos_of_item0 = _args[0].1 + let _end_pos_of_item0 = _args[0].2 let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - YYObj_Var({(); Var::{ name: _dollar1, loc: mk_loc((_symbol_start_pos, _end_pos)) } }) + YYObj_Func({(); + make_arrow_fn(@list.singleton((Named(_dollar1), None)), _dollar3, params_loc = mk_loc((_start_pos_of_item0, _end_pos_of_item0)), loc = mk_loc((_symbol_start_pos, _end_pos))) + }) } // file:///./parser.mbty -// 1576| infix_expr { $1 } -fn yy_action_596(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[0].0 is YYObj_Expr(_dollar1) +// 1190| assignment_expr { $1 } +fn yy_action_662(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_663(_last_pos, _args[0:3]) + guard _sub_action_0_result is YYObj_Expr(_dollar1) YYObj_Expr({(); _dollar1 }) } // file:///./parser.mbty -// 1580| "∀" binder ":" type_ "," quantifier_body_expr { -// 1581| Quantifier(kind = Forall, binder = $2, binder_ty = $4, body = $6, loc = mk_loc($sloc)) -// 1582| } -fn yy_action_597(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_15(_args[0].2, _args[1:2]) - guard _sub_action_0_result is YYObj_Binder(_dollar2) - guard _args[3].0 is YYObj_Type(_dollar4) - guard _args[5].0 is YYObj_Expr(_dollar6) +// 1133| left_value "=" expr { +// 1134| let loc = mk_loc($sloc) +// 1135| match $1 { +// 1136| Var(var_) => Assign(var_~, expr=$3, augmented_by=None, loc~) +// 1137| Field(record, accessor) => Mutate(record~, accessor~, field=$3, augmented_by=None, loc~) +// 1138| Array(array, index) => ArraySet(array~, index~, value=$3, loc~) +// 1139| } +// 1140| } +fn yy_action_663(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - YYObj_Expr({(); - Quantifier(kind = Forall, binder = _dollar2, binder_ty = _dollar4, body = _dollar6, loc = mk_loc((_symbol_start_pos, _end_pos))) - }) -} - -// file:///./parser.mbty -// 1583| "∃" binder ":" type_ "," quantifier_body_expr { -// 1584| Quantifier(kind = Exists, binder = $2, binder_ty = $4, body = $6, loc = mk_loc($sloc)) -// 1585| } -fn yy_action_598(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_15(_args[0].2, _args[1:2]) - guard _sub_action_0_result is YYObj_Binder(_dollar2) - guard _args[3].0 is YYObj_Type(_dollar4) - guard _args[5].0 is YYObj_Expr(_dollar6) - let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) - let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - YYObj_Expr({(); - Quantifier(kind = Exists, binder = _dollar2, binder_ty = _dollar4, body = _dollar6, loc = mk_loc((_symbol_start_pos, _end_pos))) + guard _args[0].0 is YYObj_LeftValue(_dollar1) + guard _args[2].0 is YYObj_Expr(_dollar3) + YYObj_Expr({(); + let loc = mk_loc((_symbol_start_pos, _end_pos)) + match _dollar1 { + Var(var_) => Assign(var_~, expr=_dollar3, augmented_by=None, loc~) + Field(record, accessor) => Mutate(record~, accessor~, field=_dollar3, augmented_by=None, loc~) + Array(array, index) => ArraySet(array~, index~, value=_dollar3, loc~) + } }) } // file:///./parser.mbty -// 1589| quantifier_expr { $1 } -fn yy_action_599(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 1191| expr { $1 } +fn yy_action_664(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj_Expr(_dollar1) YYObj_Expr({(); _dollar1 }) } // file:///./parser.mbty -// 1594| infix_expr "→" infix_expr { -// 1595| Implies(lhs = $1, rhs = $3, loc = mk_loc($sloc)) -// 1596| } -fn yy_action_600(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[0].0 is YYObj_Expr(_dollar1) +// 1614| binder "=>" expr_statement_no_break_continue_return { +// 1615| make_arrow_fn(@list.singleton((Named($1), None)), $3, params_loc = mk_loc($loc($1)), loc = mk_loc($sloc)) +// 1616| } +fn yy_action_665(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_20(_last_pos, _args[0:1]) + guard _sub_action_0_result is YYObj_Binder(_dollar1) guard _args[2].0 is YYObj_Expr(_dollar3) + let _start_pos_of_item0 = _args[0].1 + let _end_pos_of_item0 = _args[0].2 let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - YYObj_Expr({(); - Implies(lhs = _dollar1, rhs = _dollar3, loc = mk_loc((_symbol_start_pos, _end_pos))) + YYObj_Func({(); + make_arrow_fn(@list.singleton((Named(_dollar1), None)), _dollar3, params_loc = mk_loc((_start_pos_of_item0, _end_pos_of_item0)), loc = mk_loc((_symbol_start_pos, _end_pos))) }) } // file:///./parser.mbty -// 1597| infix_expr infixop infix_expr { -// 1598| Infix(op = $2, lhs = $1, rhs = $3, loc = mk_loc($sloc)) -// 1599| } -fn yy_action_601(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_602(_args[0].2, _args[1:2]) - guard _sub_action_0_result is YYObj_Var(_dollar2) - guard _args[0].0 is YYObj_Expr(_dollar1) - guard _args[2].0 is YYObj_Expr(_dollar3) +// 1210| POST_LABEL ":" { Some(Label::{ name : $1, loc : mk_loc($sloc) }) } +fn yy_action_666(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj_String(_dollar1) let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - YYObj_Expr({(); - Infix(op = _dollar2, lhs = _dollar1, rhs = _dollar3, loc = mk_loc((_symbol_start_pos, _end_pos))) - }) + YYObj_Label_({(); Some(Label::{ name : _dollar1, loc : mk_loc((_symbol_start_pos, _end_pos)) }) }) } // file:///./parser.mbty -// 2012| INFIX4 { Var::{ name: Ident(name = $1), loc: mk_loc($sloc) } } -fn yy_action_602(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[0].0 is YYObj_String(_dollar1) - let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) - let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - YYObj_Var({(); Var::{ name: Ident(name = _dollar1), loc: mk_loc((_symbol_start_pos, _end_pos)) } }) +// 196| non_empty_list_commas_rev(X) "," X { $1.add($3) } +fn yy_action_667(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_642(_args[1].2, _args[2:5]) + guard _args[0].0 is YYObj_List__Binder__Expr__(_dollar1) + guard _sub_action_0_result is YYObj__Binder__Expr_(_dollar3) + YYObj_List__Binder__Expr__({(); _dollar1.add(_dollar3) }) } -// file:///./parser.mbty -// 1597| infix_expr infixop infix_expr { -// 1598| Infix(op = $2, lhs = $1, rhs = $3, loc = mk_loc($sloc)) -// 1599| } -fn yy_action_603(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_604(_args[0].2, _args[1:2]) - guard _sub_action_0_result is YYObj_Var(_dollar2) - guard _args[0].0 is YYObj_Expr(_dollar1) +// file:///./stdlib.mbty +// 28| X SEP Y { ($1, $3) } +fn yy_action_642(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_20(_last_pos, _args[0:1]) + guard _sub_action_0_result is YYObj_Binder(_dollar1) guard _args[2].0 is YYObj_Expr(_dollar3) - let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) - let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - YYObj_Expr({(); - Infix(op = _dollar2, lhs = _dollar1, rhs = _dollar3, loc = mk_loc((_symbol_start_pos, _end_pos))) - }) + YYObj__Binder__Expr_({(); (_dollar1, _dollar3) }) } // file:///./parser.mbty -// 2013| INFIX3 { Var::{ name: Ident(name = $1), loc: mk_loc($sloc) } } -fn yy_action_604(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[0].0 is YYObj_String(_dollar1) - let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) - let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - YYObj_Var({(); Var::{ name: Ident(name = _dollar1), loc: mk_loc((_symbol_start_pos, _end_pos)) } }) +// 200| non_empty_list_commas_rev(X) { $1.rev() } +fn yy_action_668(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj_List__Binder__Expr__(_dollar1) + YYObj_List__Binder__Expr__({(); _dollar1.rev() }) } // file:///./parser.mbty -// 1597| infix_expr infixop infix_expr { -// 1598| Infix(op = $2, lhs = $1, rhs = $3, loc = mk_loc($sloc)) -// 1599| } -fn yy_action_605(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_606(_args[0].2, _args[1:2]) - guard _sub_action_0_result is YYObj_Var(_dollar2) - guard _args[0].0 is YYObj_Expr(_dollar1) - guard _args[2].0 is YYObj_Expr(_dollar3) - let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) - let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - YYObj_Expr({(); - Infix(op = _dollar2, lhs = _dollar1, rhs = _dollar3, loc = mk_loc((_symbol_start_pos, _end_pos))) - }) +// 217| { @list.empty() } +fn yy_action_669(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + YYObj_List__Binder__Expr__({(); @list.empty() }) } // file:///./parser.mbty -// 2014| INFIX2 { Var::{ name: Ident(name = $1), loc: mk_loc($sloc) } } -fn yy_action_606(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[0].0 is YYObj_String(_dollar1) - let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) - let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - YYObj_Var({(); Var::{ name: Ident(name = _dollar1), loc: mk_loc((_symbol_start_pos, _end_pos)) } }) +// 1227| pattern option(preceded("if", infix_expr)) "=>" expr_statement { +// 1228| Case::{ pattern : $1, guard_ : $2, body : $4 } +// 1229| } +fn yy_action_670(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj_Pattern(_dollar1) + guard _args[1].0 is YYObj_Option_Expr_(_dollar2) + guard _args[3].0 is YYObj_Expr(_dollar4) + YYObj_Case({(); + Case::{ pattern : _dollar1, guard_ : _dollar2, body : _dollar4 } + }) } // file:///./parser.mbty -// 1597| infix_expr infixop infix_expr { -// 1598| Infix(op = $2, lhs = $1, rhs = $3, loc = mk_loc($sloc)) -// 1599| } -fn yy_action_607(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_608(_args[0].2, _args[1:2]) - guard _sub_action_0_result is YYObj_Var(_dollar2) - guard _args[0].0 is YYObj_Expr(_dollar1) - guard _args[2].0 is YYObj_Expr(_dollar3) +// 1244| "catch" "{" { mk_loc($sloc) } +fn yy_action_671(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - YYObj_Expr({(); - Infix(op = _dollar2, lhs = _dollar1, rhs = _dollar3, loc = mk_loc((_symbol_start_pos, _end_pos))) - }) + YYObj_Location({(); mk_loc((_symbol_start_pos, _end_pos)) }) } // file:///./parser.mbty -// 2015| INFIX1 { Var::{ name: Ident(name = $1), loc: mk_loc($sloc) } } -fn yy_action_608(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[0].0 is YYObj_String(_dollar1) - let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) - let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - YYObj_Var({(); Var::{ name: Ident(name = _dollar1), loc: mk_loc((_symbol_start_pos, _end_pos)) } }) +// 1240| list_semis(single_pattern_case) { $1 } +fn yy_action_672(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj_List_Case_(_dollar1) + YYObj_List_Case_({(); _dollar1 }) } // file:///./parser.mbty -// 1597| infix_expr infixop infix_expr { -// 1598| Infix(op = $2, lhs = $1, rhs = $3, loc = mk_loc($sloc)) -// 1599| } -fn yy_action_609(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_610(_args[0].2, _args[1:2]) - guard _sub_action_0_result is YYObj_Var(_dollar2) - guard _args[0].0 is YYObj_Expr(_dollar1) - guard _args[2].0 is YYObj_Expr(_dollar3) +// 1265| "try" pipe_expr catch_keyword single_pattern_cases "}" else_keyword single_pattern_cases "}" { +// 1266| let catch_loc = $3 +// 1267| let else_loc = $6 +// 1268| Try( +// 1269| body = $2, +// 1270| catch_ = $4, +// 1271| try_else = Some($7), +// 1272| has_try = true, +// 1273| try_loc = mk_loc($loc($1)), +// 1274| catch_loc~, +// 1275| else_loc~, +// 1276| loc = mk_loc($sloc) +// 1277| ) +// 1278| } +fn yy_action_673(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_543(_args[4].2, _args[5:7]) + guard _args[2].0 is YYObj_Location(_dollar3) + guard _sub_action_0_result is YYObj_Location(_dollar6) + guard _args[1].0 is YYObj_Expr(_dollar2) + guard _args[3].0 is YYObj_List_Case_(_dollar4) + guard _args[7].0 is YYObj_List_Case_(_dollar7) + let _start_pos_of_item0 = _args[0].1 + let _end_pos_of_item0 = _args[0].2 let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - YYObj_Expr({(); - Infix(op = _dollar2, lhs = _dollar1, rhs = _dollar3, loc = mk_loc((_symbol_start_pos, _end_pos))) + YYObj_Expr({(); + let catch_loc = _dollar3 + let else_loc = _dollar6 + Try( + body = _dollar2, + catch_ = _dollar4, + try_else = Some(_dollar7), + has_try = true, + try_loc = mk_loc((_start_pos_of_item0, _end_pos_of_item0)), + catch_loc~, + else_loc~, + loc = mk_loc((_symbol_start_pos, _end_pos)) + ) }) } // file:///./parser.mbty -// 2016| PLUS { Var::{ name: Ident(name = "+"), loc: mk_loc($sloc) } } -fn yy_action_610(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 1248| "noraise" "{" { mk_loc($sloc) } +fn yy_action_543(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - YYObj_Var({(); Var::{ name: Ident(name = "+"), loc: mk_loc((_symbol_start_pos, _end_pos)) } }) + YYObj_Location({(); mk_loc((_symbol_start_pos, _end_pos)) }) } // file:///./parser.mbty -// 1597| infix_expr infixop infix_expr { -// 1598| Infix(op = $2, lhs = $1, rhs = $3, loc = mk_loc($sloc)) -// 1599| } -fn yy_action_611(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_612(_args[0].2, _args[1:2]) - guard _sub_action_0_result is YYObj_Var(_dollar2) - guard _args[0].0 is YYObj_Expr(_dollar1) - guard _args[2].0 is YYObj_Expr(_dollar3) +// 1252| "try" pipe_expr catch_keyword single_pattern_cases "}" { +// 1253| let catch_loc = $3 +// 1254| Try( +// 1255| body = $2, +// 1256| catch_ = $4, +// 1257| try_else = None, +// 1258| has_try = true, +// 1259| try_loc = mk_loc($loc($1)), +// 1260| catch_loc~, +// 1261| else_loc = @basic.Location::{ start: @basic.Position::{ fname: "", lnum: 0, bol: 0, cnum: 0 }, end: @basic.Position::{ fname: "", lnum: 0, bol: 0, cnum: 0 } }, +// 1262| loc = mk_loc($sloc) +// 1263| ) +// 1264| } +fn yy_action_674(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[2].0 is YYObj_Location(_dollar3) + guard _args[1].0 is YYObj_Expr(_dollar2) + guard _args[3].0 is YYObj_List_Case_(_dollar4) + let _start_pos_of_item0 = _args[0].1 + let _end_pos_of_item0 = _args[0].2 let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - YYObj_Expr({(); - Infix(op = _dollar2, lhs = _dollar1, rhs = _dollar3, loc = mk_loc((_symbol_start_pos, _end_pos))) + YYObj_Expr({(); + let catch_loc = _dollar3 + Try( + body = _dollar2, + catch_ = _dollar4, + try_else = None, + has_try = true, + try_loc = mk_loc((_start_pos_of_item0, _end_pos_of_item0)), + catch_loc~, + else_loc = @basic.Location::{ start: @basic.Position::{ fname: "", lnum: 0, bol: 0, cnum: 0 }, end: @basic.Position::{ fname: "", lnum: 0, bol: 0, cnum: 0 } }, + loc = mk_loc((_symbol_start_pos, _end_pos)) + ) }) } // file:///./parser.mbty -// 2017| MINUS { Var::{ name: Ident(name = "-"), loc: mk_loc($sloc) } } -fn yy_action_612(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) - let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - YYObj_Var({(); Var::{ name: Ident(name = "-"), loc: mk_loc((_symbol_start_pos, _end_pos)) } }) +// 257| non_empty_list_semis(X) { $1 } +fn yy_action_675(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj_List_Case_(_dollar1) + YYObj_List_Case_({(); _dollar1 }) } // file:///./parser.mbty -// 1597| infix_expr infixop infix_expr { -// 1598| Infix(op = $2, lhs = $1, rhs = $3, loc = mk_loc($sloc)) -// 1599| } -fn yy_action_613(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_614(_args[0].2, _args[1:2]) - guard _sub_action_0_result is YYObj_Var(_dollar2) - guard _args[0].0 is YYObj_Expr(_dollar1) - guard _args[2].0 is YYObj_Expr(_dollar3) - let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) - let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - YYObj_Expr({(); - Infix(op = _dollar2, lhs = _dollar1, rhs = _dollar3, loc = mk_loc((_symbol_start_pos, _end_pos))) - }) +// 256| { @list.empty() } +fn yy_action_676(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + YYObj_List_Case_({(); @list.empty() }) } // file:///./parser.mbty -// 2018| AMPER { Var::{ name: Ident(name = "&"), loc: mk_loc($sloc) } } -fn yy_action_614(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 1279| "try?" pipe_expr { +// 1280| TryOperator(body = $2, kind = Question, try_loc = mk_loc($loc($1)), loc = mk_loc($sloc)) +// 1281| } +fn yy_action_677(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[1].0 is YYObj_Expr(_dollar2) + let _start_pos_of_item0 = _args[0].1 + let _end_pos_of_item0 = _args[0].2 let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - YYObj_Var({(); Var::{ name: Ident(name = "&"), loc: mk_loc((_symbol_start_pos, _end_pos)) } }) + YYObj_Expr({(); + TryOperator(body = _dollar2, kind = Question, try_loc = mk_loc((_start_pos_of_item0, _end_pos_of_item0)), loc = mk_loc((_symbol_start_pos, _end_pos))) + }) } // file:///./parser.mbty -// 1597| infix_expr infixop infix_expr { -// 1598| Infix(op = $2, lhs = $1, rhs = $3, loc = mk_loc($sloc)) -// 1599| } -fn yy_action_615(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_616(_args[0].2, _args[1:2]) - guard _sub_action_0_result is YYObj_Var(_dollar2) - guard _args[0].0 is YYObj_Expr(_dollar1) - guard _args[2].0 is YYObj_Expr(_dollar3) +// 1282| "try!" pipe_expr { +// 1283| TryOperator(body = $2, kind = Exclamation, try_loc = mk_loc($loc($1)), loc = mk_loc($sloc)) +// 1284| } +fn yy_action_678(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[1].0 is YYObj_Expr(_dollar2) + let _start_pos_of_item0 = _args[0].1 + let _end_pos_of_item0 = _args[0].2 let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } YYObj_Expr({(); - Infix(op = _dollar2, lhs = _dollar1, rhs = _dollar3, loc = mk_loc((_symbol_start_pos, _end_pos))) + TryOperator(body = _dollar2, kind = Exclamation, try_loc = mk_loc((_start_pos_of_item0, _end_pos_of_item0)), loc = mk_loc((_symbol_start_pos, _end_pos))) }) } // file:///./parser.mbty -// 2019| CARET { Var::{ name: Ident(name = "^"), loc: mk_loc($sloc) } } -fn yy_action_616(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) - let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - YYObj_Var({(); Var::{ name: Ident(name = "^"), loc: mk_loc((_symbol_start_pos, _end_pos)) } }) -} - -// file:///./parser.mbty -// 1597| infix_expr infixop infix_expr { -// 1598| Infix(op = $2, lhs = $1, rhs = $3, loc = mk_loc($sloc)) -// 1599| } -fn yy_action_617(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_618(_args[0].2, _args[1:2]) - guard _sub_action_0_result is YYObj_Var(_dollar2) - guard _args[0].0 is YYObj_Expr(_dollar1) +// 1288| "if" infix_expr block_expr "else" block_expr { +// 1289| If(cond = $2, ifso = $3, ifnot = Some($5), loc = mk_loc($sloc)) +// 1290| } +fn yy_action_679(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[1].0 is YYObj_Expr(_dollar2) guard _args[2].0 is YYObj_Expr(_dollar3) + guard _args[4].0 is YYObj_Expr(_dollar5) let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - YYObj_Expr({(); - Infix(op = _dollar2, lhs = _dollar1, rhs = _dollar3, loc = mk_loc((_symbol_start_pos, _end_pos))) + YYObj_Expr({(); + If(cond = _dollar2, ifso = _dollar3, ifnot = Some(_dollar5), loc = mk_loc((_symbol_start_pos, _end_pos))) }) } // file:///./parser.mbty -// 2020| BAR { Var::{ name: Ident(name = "|"), loc: mk_loc($sloc) } } -fn yy_action_618(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 1291| "if" infix_expr block_expr "else" if_expr { +// 1292| If(cond = $2, ifso = $3, ifnot = Some($5), loc = mk_loc($sloc)) +// 1293| } +fn yy_action_680(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[1].0 is YYObj_Expr(_dollar2) + guard _args[2].0 is YYObj_Expr(_dollar3) + guard _args[4].0 is YYObj_Expr(_dollar5) let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - YYObj_Var({(); Var::{ name: Ident(name = "|"), loc: mk_loc((_symbol_start_pos, _end_pos)) } }) + YYObj_Expr({(); + If(cond = _dollar2, ifso = _dollar3, ifnot = Some(_dollar5), loc = mk_loc((_symbol_start_pos, _end_pos))) + }) } // file:///./parser.mbty -// 1597| infix_expr infixop infix_expr { -// 1598| Infix(op = $2, lhs = $1, rhs = $3, loc = mk_loc($sloc)) -// 1599| } -fn yy_action_619(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_620(_args[0].2, _args[1:2]) - guard _sub_action_0_result is YYObj_Var(_dollar2) - guard _args[0].0 is YYObj_Expr(_dollar1) +// 1294| "if" infix_expr block_expr { +// 1295| If(cond = $2, ifso = $3, ifnot = None, loc = mk_loc($sloc)) +// 1296| } +fn yy_action_681(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[1].0 is YYObj_Expr(_dollar2) guard _args[2].0 is YYObj_Expr(_dollar3) let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - YYObj_Expr({(); - Infix(op = _dollar2, lhs = _dollar1, rhs = _dollar3, loc = mk_loc((_symbol_start_pos, _end_pos))) + YYObj_Expr({(); + If(cond = _dollar2, ifso = _dollar3, ifnot = None, loc = mk_loc((_symbol_start_pos, _end_pos))) }) } // file:///./parser.mbty -// 2021| AMPERAMPER { Var::{ name: Ident(name = "&&"), loc: mk_loc($sloc) } } -fn yy_action_620(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) - let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - YYObj_Var({(); Var::{ name: Ident(name = "&&"), loc: mk_loc((_symbol_start_pos, _end_pos)) } }) +// 1300| "match" infix_expr "{" { $2 } +fn yy_action_682(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[1].0 is YYObj_Expr(_dollar2) + YYObj_Expr({(); _dollar2 }) } -// file:///./parser.mbty -// 1597| infix_expr infixop infix_expr { -// 1598| Infix(op = $2, lhs = $1, rhs = $3, loc = mk_loc($sloc)) -// 1599| } -fn yy_action_621(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_622(_args[0].2, _args[1:2]) - guard _sub_action_0_result is YYObj_Var(_dollar2) - guard _args[0].0 is YYObj_Expr(_dollar1) - guard _args[2].0 is YYObj_Expr(_dollar3) - let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) - let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - YYObj_Expr({(); - Infix(op = _dollar2, lhs = _dollar1, rhs = _dollar3, loc = mk_loc((_symbol_start_pos, _end_pos))) - }) -} - -// file:///./parser.mbty -// 2022| BARBAR { Var::{ name: Ident(name = "||"), loc: mk_loc($sloc) } } -fn yy_action_622(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) - let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - YYObj_Var({(); Var::{ name: Ident(name = "||"), loc: mk_loc((_symbol_start_pos, _end_pos)) } }) -} - -// file:///./parser.mbty -// 1590| infix_expr { $1 } -fn yy_action_623(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[0].0 is YYObj_Expr(_dollar1) - YYObj_Expr({(); _dollar1 }) +// file:///./stdlib.mbty +// 5| X { Some($1) } +fn yy_action_683(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_684(_last_pos, _args[0:2]) + guard _sub_action_0_result is YYObj_Expr(_dollar1) + YYObj_Option_Expr_({(); Some(_dollar1) }) } -// file:///./parser.mbty -// 1600| postfix_expr { $1 } -fn yy_action_624(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[0].0 is YYObj_Expr(_dollar1) - YYObj_Expr({(); _dollar1 }) +// file:///./stdlib.mbty +// 32| L X { $2 } +fn yy_action_684(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[1].0 is YYObj_Expr(_dollar2) + YYObj_Expr({(); _dollar2 }) } -// file:///./parser.mbty -// 1604| range_expr "as" type_name { -// 1605| As(expr = $1, trait_ = $3, loc = mk_loc($sloc)) -// 1606| } -fn yy_action_625(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[0].0 is YYObj_Expr(_dollar1) - guard _args[2].0 is YYObj_TypeName(_dollar3) - let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) - let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - YYObj_Expr({(); - As(expr = _dollar1, trait_ = _dollar3, loc = mk_loc((_symbol_start_pos, _end_pos))) - }) +// file:///./stdlib.mbty +// 4| { None } +fn yy_action_685(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + YYObj_Option_Expr_({(); None }) } // file:///./parser.mbty -// 1607| range_expr "is" range_pattern { -// 1608| Is(expr = $1, pat = $3, loc = mk_loc($sloc)) -// 1609| } -fn yy_action_626(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[0].0 is YYObj_Expr(_dollar1) - guard _args[2].0 is YYObj_Pattern(_dollar3) +// 1230| "..." { +// 1231| Case::{ +// 1232| pattern : Pattern::Any(loc = mk_loc($sloc)), +// 1233| guard_ : None, +// 1234| body : Hole(loc = mk_loc($sloc), kind = Todo) +// 1235| } +// 1236| } +fn yy_action_686(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - YYObj_Expr({(); - Is(expr = _dollar1, pat = _dollar3, loc = mk_loc((_symbol_start_pos, _end_pos))) + YYObj_Case({(); + Case::{ + pattern : Pattern::Any(loc = mk_loc((_symbol_start_pos, _end_pos))), + guard_ : None, + body : Hole(loc = mk_loc((_symbol_start_pos, _end_pos)), kind = Todo) + } }) } // file:///./parser.mbty -// 2115| "{" "}" { Record(fields = @list.empty(), is_closed = true, loc = mk_loc($sloc)) } -fn yy_action_627(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 2225| "{" "}" { Record(fields = @list.empty(), is_closed = true, loc = mk_loc($sloc)) } +fn yy_action_687(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } YYObj_Pattern({(); Record(fields = @list.empty(), is_closed = true, loc = mk_loc((_symbol_start_pos, _end_pos))) }) } // file:///./parser.mbty -// 2116| "{" ".." option(",") "}" { Record(fields = @list.empty(), is_closed = false, loc = mk_loc($sloc)) } -fn yy_action_628(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 2226| "{" ".." option(",") "}" { Record(fields = @list.empty(), is_closed = false, loc = mk_loc($sloc)) } +fn yy_action_688(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } YYObj_Pattern({(); Record(fields = @list.empty(), is_closed = false, loc = mk_loc((_symbol_start_pos, _end_pos))) }) } // file:///./parser.mbty -// 2117| "{" non_empty_fields_pat "}" { -// 2118| let (fields, is_closed) = $2 -// 2119| Record(fields~, is_closed~, loc = mk_loc($sloc)) -// 2120| } -fn yy_action_629(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 2227| "{" non_empty_fields_pat "}" { +// 2228| let (fields, is_closed) = $2 +// 2229| Record(fields~, is_closed~, loc = mk_loc($sloc)) +// 2230| } +fn yy_action_689(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[1].0 is YYObj__List_FieldPat___Bool_(_dollar2) let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } @@ -13499,11 +15925,11 @@ fn yy_action_629(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 2121| "{" non_empty_map_elems_pat "}" { -// 2122| let (elems, is_closed) = $2 -// 2123| Map(elems~, is_closed~, loc = mk_loc($sloc)) -// 2124| } -fn yy_action_630(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 2231| "{" non_empty_map_elems_pat "}" { +// 2232| let (elems, is_closed) = $2 +// 2233| Map(elems~, is_closed~, loc = mk_loc($sloc)) +// 2234| } +fn yy_action_690(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[1].0 is YYObj__List_MapPatElem___Bool_(_dollar2) let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } @@ -13514,45 +15940,45 @@ fn yy_action_630(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 2349| non_empty_list_commas(fields_pat_single) { ($1, true) } -fn yy_action_631(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 2459| non_empty_list_commas(fields_pat_single) { ($1, true) } +fn yy_action_691(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj_List_FieldPat_(_dollar1) YYObj__List_FieldPat___Bool_({(); (_dollar1, true) }) } // file:///./parser.mbty -// 2350| non_empty_list_commas_with_tail(fields_pat_single) ".." option(",") { ($1, false) } -fn yy_action_632(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 2460| non_empty_list_commas_with_tail(fields_pat_single) ".." option(",") { ($1, false) } +fn yy_action_692(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj_List_FieldPat_(_dollar1) YYObj__List_FieldPat___Bool_({(); (_dollar1, false) }) } // file:///./parser.mbty -// 2367| non_empty_list_commas(map_elem_pat) { ($1, true) } -fn yy_action_633(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 2477| non_empty_list_commas(map_elem_pat) { ($1, true) } +fn yy_action_693(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj_List_MapPatElem_(_dollar1) YYObj__List_MapPatElem___Bool_({(); (_dollar1, true) }) } // file:///./parser.mbty -// 2368| non_empty_list_commas_with_tail(map_elem_pat) ".." option(",") { ($1, false) } -fn yy_action_634(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 2478| non_empty_list_commas_with_tail(map_elem_pat) ".." option(",") { ($1, false) } +fn yy_action_694(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj_List_MapPatElem_(_dollar1) YYObj__List_MapPatElem___Bool_({(); (_dollar1, false) }) } // file:///./parser.mbty -// 2354| fpat_labeled_pattern { $1 } -fn yy_action_635(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_636(_last_pos, _args[0:3]) +// 2464| fpat_labeled_pattern { $1 } +fn yy_action_695(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_696(_last_pos, _args[0:3]) guard _sub_action_0_result is YYObj_FieldPat(_dollar1) YYObj_FieldPat({(); _dollar1 }) } // file:///./parser.mbty -// 2359| label ":" pattern { @syntax.make_field_pat(loc = mk_loc($sloc), $1, $3, false) } -fn yy_action_636(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_426(_last_pos, _args[0:1]) +// 2469| label ":" pattern { @syntax.make_field_pat(loc = mk_loc($sloc), $1, $3, false) } +fn yy_action_696(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_473(_last_pos, _args[0:1]) let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } guard _sub_action_0_result is YYObj_Label(_dollar1) @@ -13561,17 +15987,17 @@ fn yy_action_636(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 2355| fpat_label_pun { $1 } -fn yy_action_637(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_638(_last_pos, _args[0:1]) +// 2465| fpat_label_pun { $1 } +fn yy_action_697(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_698(_last_pos, _args[0:1]) guard _sub_action_0_result is YYObj_FieldPat(_dollar1) YYObj_FieldPat({(); _dollar1 }) } // file:///./parser.mbty -// 2363| label { @syntax.make_field_pat(loc = mk_loc($sloc), $1, @syntax.label_to_pat(loc = mk_loc($sloc), $1), true) } -fn yy_action_638(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_426(_last_pos, _args[0:1]) +// 2473| label { @syntax.make_field_pat(loc = mk_loc($sloc), $1, @syntax.label_to_pat(loc = mk_loc($sloc), $1), true) } +fn yy_action_698(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_473(_last_pos, _args[0:1]) let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } guard _sub_action_0_result is YYObj_Label(_dollar1) @@ -13579,111 +16005,148 @@ fn yy_action_638(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 190| non_empty_list_commas_rev(X) "," X { $1.add($3) } -fn yy_action_639(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 2464| fpat_labeled_pattern { $1 } +fn yy_action_699(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_700(_last_pos, _args[0:3]) + guard _sub_action_0_result is YYObj_FieldPat(_dollar1) + YYObj_FieldPat({(); _dollar1 }) +} + +// file:///./parser.mbty +// 2469| label ":" pattern { @syntax.make_field_pat(loc = mk_loc($sloc), $1, $3, false) } +fn yy_action_700(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_501(_last_pos, _args[0:1]) + let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) + let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } + guard _sub_action_0_result is YYObj_Label(_dollar1) + guard _args[2].0 is YYObj_Pattern(_dollar3) + YYObj_FieldPat({(); @syntax.make_field_pat(loc = mk_loc((_symbol_start_pos, _end_pos)), _dollar1, _dollar3, false) }) +} + +// file:///./parser.mbty +// 2465| fpat_label_pun { $1 } +fn yy_action_701(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_702(_last_pos, _args[0:1]) + guard _sub_action_0_result is YYObj_FieldPat(_dollar1) + YYObj_FieldPat({(); _dollar1 }) +} + +// file:///./parser.mbty +// 2473| label { @syntax.make_field_pat(loc = mk_loc($sloc), $1, @syntax.label_to_pat(loc = mk_loc($sloc), $1), true) } +fn yy_action_702(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_501(_last_pos, _args[0:1]) + let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) + let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } + guard _sub_action_0_result is YYObj_Label(_dollar1) + YYObj_FieldPat({(); @syntax.make_field_pat(loc = mk_loc((_symbol_start_pos, _end_pos)), _dollar1, @syntax.label_to_pat(loc = mk_loc((_symbol_start_pos, _end_pos)), _dollar1), true) }) +} + +// file:///./parser.mbty +// 196| non_empty_list_commas_rev(X) "," X { $1.add($3) } +fn yy_action_703(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj_List_FieldPat_(_dollar1) guard _args[2].0 is YYObj_FieldPat(_dollar3) YYObj_List_FieldPat_({(); _dollar1.add(_dollar3) }) } // file:///./parser.mbty -// 202| non_empty_list_commas_rev(X) "," { $1.rev() } -fn yy_action_640(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 208| non_empty_list_commas_rev(X) "," { $1.rev() } +fn yy_action_704(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj_List_FieldPat_(_dollar1) YYObj_List_FieldPat_({(); _dollar1.rev() }) } // file:///./parser.mbty -// 198| non_empty_list_commas_rev(X) option(",") { $1.rev() } -fn yy_action_641(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 204| non_empty_list_commas_rev(X) option(",") { $1.rev() } +fn yy_action_705(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj_List_FieldPat_(_dollar1) YYObj_List_FieldPat_({(); _dollar1.rev() }) } // file:///./parser.mbty -// 1996| simple_constant { $1 } -fn yy_action_642(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 2106| simple_constant { $1 } +fn yy_action_706(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj_Constant(_dollar1) YYObj_Constant({(); _dollar1 }) } // file:///./parser.mbty -// 1997| MINUS INT { make_int("-" + $2) } -fn yy_action_643(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 2107| MINUS INT { make_int("-" + $2) } +fn yy_action_707(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[1].0 is YYObj_String(_dollar2) YYObj_Constant({(); make_int("-" + _dollar2) }) } // file:///./parser.mbty -// 1998| MINUS DOUBLE { make_double("-" + $2) } -fn yy_action_644(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 2108| MINUS DOUBLE { make_double("-" + $2) } +fn yy_action_708(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[1].0 is YYObj_String(_dollar2) YYObj_Constant({(); make_double("-" + _dollar2) }) } // file:///./parser.mbty -// 1999| MINUS FLOAT { make_float("-" + $2) } -fn yy_action_645(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 2109| MINUS FLOAT { make_float("-" + $2) } +fn yy_action_709(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[1].0 is YYObj_String(_dollar2) YYObj_Constant({(); make_float("-" + _dollar2) }) } // file:///./parser.mbty -// 190| non_empty_list_commas_rev(X) "," X { $1.add($3) } -fn yy_action_646(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_647(_args[1].2, _args[2:6]) +// 196| non_empty_list_commas_rev(X) "," X { $1.add($3) } +fn yy_action_710(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_711(_args[1].2, _args[2:6]) guard _args[0].0 is YYObj_List_MapPatElem_(_dollar1) guard _sub_action_0_result is YYObj_MapPatElem(_dollar3) YYObj_List_MapPatElem_({(); _dollar1.add(_dollar3) }) } // file:///./parser.mbty -// 202| non_empty_list_commas_rev(X) "," { $1.rev() } -fn yy_action_648(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 208| non_empty_list_commas_rev(X) "," { $1.rev() } +fn yy_action_712(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj_List_MapPatElem_(_dollar1) YYObj_List_MapPatElem_({(); _dollar1.rev() }) } // file:///./parser.mbty -// 198| non_empty_list_commas_rev(X) option(",") { $1.rev() } -fn yy_action_649(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 204| non_empty_list_commas_rev(X) option(",") { $1.rev() } +fn yy_action_713(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj_List_MapPatElem_(_dollar1) YYObj_List_MapPatElem_({(); _dollar1.rev() }) } // file:///./parser.mbty -// 189| X { @list.singleton($1) } -fn yy_action_650(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 195| X { @list.singleton($1) } +fn yy_action_714(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj_FieldPat(_dollar1) YYObj_List_FieldPat_({(); @list.singleton(_dollar1) }) } // file:///./stdlib.mbty // 5| X { Some($1) } -fn yy_action_651(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +fn yy_action_715(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _dollar1 = () YYObj_Option_Unit_({(); Some(_dollar1) }) } // file:///./parser.mbty -// 189| X { @list.singleton($1) } -fn yy_action_652(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_647(_last_pos, _args[0:4]) +// 195| X { @list.singleton($1) } +fn yy_action_716(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_711(_last_pos, _args[0:4]) guard _sub_action_0_result is YYObj_MapPatElem(_dollar1) YYObj_List_MapPatElem_({(); @list.singleton(_dollar1) }) } // file:///./parser.mbty -// 2372| map_syntax_key option("?") ":" pattern { -// 2373| MapPatElem::{ -// 2374| key: $1, -// 2375| pat: $4, -// 2376| match_absent: $2 is Some(_), -// 2377| key_loc: mk_loc($loc($1)), -// 2378| loc: mk_loc($sloc) -// 2379| } -// 2380| } -fn yy_action_647(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 2482| map_syntax_key option("?") ":" pattern { +// 2483| MapPatElem::{ +// 2484| key: $1, +// 2485| pat: $4, +// 2486| match_absent: $2 is Some(_), +// 2487| key_loc: mk_loc($loc($1)), +// 2488| loc: mk_loc($sloc) +// 2489| } +// 2490| } +fn yy_action_711(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj_Constant(_dollar1) guard _args[3].0 is YYObj_Pattern(_dollar4) guard _args[1].0 is YYObj_Option_Unit_(_dollar2) @@ -13703,8 +16166,8 @@ fn yy_action_647(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 2114| "[" array_sub_patterns "]" { Array(pats = $2, loc = mk_loc($sloc)) } -fn yy_action_653(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 2224| "[" array_sub_patterns "]" { Array(pats = $2, loc = mk_loc($sloc)) } +fn yy_action_717(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[1].0 is YYObj_ArrayPatterns(_dollar2) let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } @@ -13712,41 +16175,57 @@ fn yy_action_653(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 2142| ".." binder { Binder($2) } -fn yy_action_654(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 2252| ".." binder { Binder($2) } +fn yy_action_718(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _sub_action_0_result = yy_action_15(_args[0].2, _args[1:2]) guard _sub_action_0_result is YYObj_Binder(_dollar2) YYObj_DotDotBinder({(); Binder(_dollar2) }) } // file:///./parser.mbty -// 2143| ".." "_" { Underscore } -fn yy_action_655(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 2252| ".." binder { Binder($2) } +fn yy_action_719(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_20(_args[0].2, _args[1:2]) + guard _sub_action_0_result is YYObj_Binder(_dollar2) + YYObj_DotDotBinder({(); Binder(_dollar2) }) +} + +// file:///./parser.mbty +// 2253| ".." "_" { Underscore } +fn yy_action_720(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { YYObj_DotDotBinder({(); Underscore }) } // file:///./parser.mbty -// 2144| ".." "as" binder { BinderAs($3) } -fn yy_action_656(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 2254| ".." "as" binder { BinderAs($3) } +fn yy_action_721(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _sub_action_0_result = yy_action_15(_args[1].2, _args[2:3]) guard _sub_action_0_result is YYObj_Binder(_dollar3) YYObj_DotDotBinder({(); BinderAs(_dollar3) }) } // file:///./parser.mbty -// 2145| ".." { NoBinder } -fn yy_action_657(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 2254| ".." "as" binder { BinderAs($3) } +fn yy_action_722(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_20(_args[1].2, _args[2:3]) + guard _sub_action_0_result is YYObj_Binder(_dollar3) + YYObj_DotDotBinder({(); BinderAs(_dollar3) }) +} + +// file:///./parser.mbty +// 2255| ".." { NoBinder } +fn yy_action_723(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { YYObj_DotDotBinder({(); NoBinder }) } // file:///./parser.mbty -// 2151| array_sub_pattern "," array_sub_patterns { -// 2152| match $3 { -// 2153| Closed(ps) => Closed(ps.add($1)) -// 2154| Open(ps1, ps2, b) => Open(ps1.add($1), ps2, b) -// 2155| } -// 2156| } -fn yy_action_658(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 2261| array_sub_pattern "," array_sub_patterns { +// 2262| match $3 { +// 2263| Closed(ps) => Closed(ps.add($1)) +// 2264| Open(ps1, ps2, b) => Open(ps1.add($1), ps2, b) +// 2265| } +// 2266| } +fn yy_action_724(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[2].0 is YYObj_ArrayPatterns(_dollar3) guard _args[0].0 is YYObj_ArrayPattern(_dollar1) YYObj_ArrayPatterns({(); @@ -13758,44 +16237,44 @@ fn yy_action_658(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 2150| array_sub_pattern { Closed(@list.singleton($1)) } -fn yy_action_659(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 2260| array_sub_pattern { Closed(@list.singleton($1)) } +fn yy_action_725(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj_ArrayPattern(_dollar1) YYObj_ArrayPatterns({(); Closed(@list.singleton(_dollar1)) }) } // file:///./parser.mbty -// 2157| dotdot_binder "," non_empty_list_commas(array_sub_pattern) { Open(@list.empty(), $3, $1) } -fn yy_action_660(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 2267| dotdot_binder "," non_empty_list_commas(array_sub_pattern) { Open(@list.empty(), $3, $1) } +fn yy_action_726(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[2].0 is YYObj_List_ArrayPattern_(_dollar3) guard _args[0].0 is YYObj_DotDotBinder(_dollar1) YYObj_ArrayPatterns({(); Open(@list.empty(), _dollar3, _dollar1) }) } // file:///./parser.mbty -// 2128| pattern { Pattern($1) } -fn yy_action_661(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 2238| pattern { Pattern($1) } +fn yy_action_727(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj_Pattern(_dollar1) YYObj_ArrayPattern({(); Pattern(_dollar1) }) } // file:///./parser.mbty -// 2111| "(" pattern ")" { $2 } -fn yy_action_662(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 2221| "(" pattern ")" { $2 } +fn yy_action_728(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[1].0 is YYObj_Pattern(_dollar2) YYObj_Pattern({(); _dollar2 }) } // file:///./parser.mbty -// 189| X { @list.singleton($1) } -fn yy_action_663(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 195| X { @list.singleton($1) } +fn yy_action_729(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj_Pattern(_dollar1) YYObj_List_Pattern_({(); @list.singleton(_dollar1) }) } // file:///./parser.mbty -// 2112| "(" pattern "," non_empty_list_commas(pattern) ")" { @syntax.make_tuple_pattern(loc = mk_loc($sloc), $4.add($2)) } -fn yy_action_664(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 2222| "(" pattern "," non_empty_list_commas(pattern) ")" { @syntax.make_tuple_pattern(loc = mk_loc($sloc), $4.add($2)) } +fn yy_action_730(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } guard _args[3].0 is YYObj_List_Pattern_(_dollar4) @@ -13804,24 +16283,24 @@ fn yy_action_664(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 198| non_empty_list_commas_rev(X) option(",") { $1.rev() } -fn yy_action_665(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 204| non_empty_list_commas_rev(X) option(",") { $1.rev() } +fn yy_action_731(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj_List_Pattern_(_dollar1) YYObj_List_Pattern_({(); _dollar1.rev() }) } // file:///./parser.mbty -// 190| non_empty_list_commas_rev(X) "," X { $1.add($3) } -fn yy_action_666(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 196| non_empty_list_commas_rev(X) "," X { $1.add($3) } +fn yy_action_732(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj_List_Pattern_(_dollar1) guard _args[2].0 is YYObj_Pattern(_dollar3) YYObj_List_Pattern_({(); _dollar1.add(_dollar3) }) } // file:///./parser.mbty -// 2113| "(" pattern annot ")" { Constraint(pat = $2, ty = $3, loc = mk_loc($sloc)) } -fn yy_action_667(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_453(_args[1].2, _args[2:4]) +// 2223| "(" pattern annot ")" { Constraint(pat = $2, ty = $3, loc = mk_loc($sloc)) } +fn yy_action_733(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_578(_args[1].2, _args[2:4]) guard _args[1].0 is YYObj_Pattern(_dollar2) guard _sub_action_0_result is YYObj_Type(_dollar3) let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) @@ -13830,21 +16309,21 @@ fn yy_action_667(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 259| ":" type_ { $2 } -fn yy_action_453(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 265| ":" type_ { $2 } +fn yy_action_578(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[1].0 is YYObj_Type(_dollar2) YYObj_Type({(); _dollar2 }) } // file:///./parser.mbty -// 2099| constr option(delimited("(", constr_pat_arguments, ")")) { -// 2100| let (args, is_open) = match $2 { -// 2101| None => (None, false) -// 2102| Some((args, is_open)) => (Some(args), is_open) -// 2103| } -// 2104| @syntax.make_constr_pattern(loc = mk_loc($sloc), $1, args, is_open) -// 2105| } -fn yy_action_668(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 2209| constr option(delimited("(", constr_pat_arguments, ")")) { +// 2210| let (args, is_open) = match $2 { +// 2211| None => (None, false) +// 2212| Some((args, is_open)) => (Some(args), is_open) +// 2213| } +// 2214| @syntax.make_constr_pattern(loc = mk_loc($sloc), $1, args, is_open) +// 2215| } +fn yy_action_734(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[1].0 is YYObj_Option__List_ConstrPatArg___Bool__(_dollar2) let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } @@ -13859,21 +16338,21 @@ fn yy_action_668(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 2384| constr_pat_argument option(",") { (@list.singleton($1), false) } -fn yy_action_669(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 2494| constr_pat_argument option(",") { (@list.singleton($1), false) } +fn yy_action_735(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj_ConstrPatArg(_dollar1) YYObj__List_ConstrPatArg___Bool_({(); (@list.singleton(_dollar1), false) }) } // file:///./parser.mbty -// 2398| label "=" pattern { -// 2399| ConstrPatArg::{ -// 2400| pat: $3, -// 2401| kind: Labelled($1) -// 2402| } -// 2403| } -fn yy_action_670(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_426(_last_pos, _args[0:1]) +// 2508| label "=" pattern { +// 2509| ConstrPatArg::{ +// 2510| pat: $3, +// 2511| kind: Labelled($1) +// 2512| } +// 2513| } +fn yy_action_736(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_501(_last_pos, _args[0:1]) guard _args[2].0 is YYObj_Pattern(_dollar3) guard _sub_action_0_result is YYObj_Label(_dollar1) YYObj_ConstrPatArg({(); @@ -13885,14 +16364,14 @@ fn yy_action_670(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 2108| binder delimited("(", constr_pat_arguments_no_open, ")") { -// 2109| Pattern::SpecialConstr(binder = $1, args = $2, loc = mk_loc($sloc)) -// 2110| } -fn yy_action_671(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_15(_last_pos, _args[0:1]) - let _sub_action_1_result = yy_action_672(_args[0].2, _args[1:4]) - guard _sub_action_0_result is YYObj_Binder(_dollar1) - guard _sub_action_1_result is YYObj_List_ConstrPatArg_(_dollar2) +// 2218| binder delimited("(", constr_pat_arguments_no_open, ")") { +// 2219| Pattern::SpecialConstr(binder = $1, args = $2, loc = mk_loc($sloc)) +// 2220| } +fn yy_action_737(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_738(_args[0].2, _args[1:4]) + let _sub_action_1_result = yy_action_20(_last_pos, _args[0:1]) + guard _sub_action_1_result is YYObj_Binder(_dollar1) + guard _sub_action_0_result is YYObj_List_ConstrPatArg_(_dollar2) let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } YYObj_Pattern({(); @@ -13900,23 +16379,35 @@ fn yy_action_671(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit }) } -// file:///./stdlib.mbty -// 40| L X R { $2 } -fn yy_action_672(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[1].0 is YYObj_List_ConstrPatArg_(_dollar2) - YYObj_List_ConstrPatArg_({(); _dollar2 }) -} - // file:///./parser.mbty -// 2393| constr_pat_argument option(",") { @list.singleton($1) } -fn yy_action_673(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 2503| constr_pat_argument option(",") { @list.singleton($1) } +fn yy_action_739(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj_ConstrPatArg(_dollar1) YYObj_List_ConstrPatArg_({(); @list.singleton(_dollar1) }) } // file:///./parser.mbty -// 2069| pattern "as" binder { @syntax.make_alias_pattern(loc = mk_loc($sloc), $1, $3) } -fn yy_action_674(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 2508| label "=" pattern { +// 2509| ConstrPatArg::{ +// 2510| pat: $3, +// 2511| kind: Labelled($1) +// 2512| } +// 2513| } +fn yy_action_740(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_473(_last_pos, _args[0:1]) + guard _args[2].0 is YYObj_Pattern(_dollar3) + guard _sub_action_0_result is YYObj_Label(_dollar1) + YYObj_ConstrPatArg({(); + ConstrPatArg::{ + pat: _dollar3, + kind: Labelled(_dollar1) + } + }) +} + +// file:///./parser.mbty +// 2179| pattern "as" binder { @syntax.make_alias_pattern(loc = mk_loc($sloc), $1, $3) } +fn yy_action_741(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _sub_action_0_result = yy_action_15(_args[1].2, _args[2:3]) let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } @@ -13926,13 +16417,24 @@ fn yy_action_674(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 2413| pattern { -// 2414| ConstrPatArg::{ -// 2415| pat: $1, -// 2416| kind: Positional -// 2417| } -// 2418| } -fn yy_action_675(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 2179| pattern "as" binder { @syntax.make_alias_pattern(loc = mk_loc($sloc), $1, $3) } +fn yy_action_742(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_20(_args[1].2, _args[2:3]) + let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) + let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } + guard _args[0].0 is YYObj_Pattern(_dollar1) + guard _sub_action_0_result is YYObj_Binder(_dollar3) + YYObj_Pattern({(); @syntax.make_alias_pattern(loc = mk_loc((_symbol_start_pos, _end_pos)), _dollar1, _dollar3) }) +} + +// file:///./parser.mbty +// 2523| pattern { +// 2524| ConstrPatArg::{ +// 2525| pat: $1, +// 2526| kind: Positional +// 2527| } +// 2528| } +fn yy_action_743(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj_Pattern(_dollar1) YYObj_ConstrPatArg({(); ConstrPatArg::{ @@ -13943,15 +16445,15 @@ fn yy_action_675(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 2070| or_pattern { $1 } -fn yy_action_676(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 2180| or_pattern { $1 } +fn yy_action_744(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj_Pattern(_dollar1) YYObj_Pattern({(); _dollar1 }) } // file:///./parser.mbty -// 2074| range_pattern "|" or_pattern { Or(pat1 = $1, pat2 = $3, loc = mk_loc($sloc)) } -fn yy_action_677(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 2184| range_pattern "|" or_pattern { Or(pat1 = $1, pat2 = $3, loc = mk_loc($sloc)) } +fn yy_action_745(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj_Pattern(_dollar1) guard _args[2].0 is YYObj_Pattern(_dollar3) let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) @@ -13960,15 +16462,15 @@ fn yy_action_677(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 2075| range_pattern { $1 } -fn yy_action_678(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 2185| range_pattern { $1 } +fn yy_action_746(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj_Pattern(_dollar1) YYObj_Pattern({(); _dollar1 }) } // file:///./parser.mbty -// 2079| simple_pattern "..<" simple_pattern { Range(lhs = $1, rhs = $3, kind=Exclusive, loc = mk_loc($sloc)) } -fn yy_action_679(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 2189| simple_pattern "..<" simple_pattern { Range(lhs = $1, rhs = $3, kind=Exclusive, loc = mk_loc($sloc)) } +fn yy_action_747(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj_Pattern(_dollar1) guard _args[2].0 is YYObj_Pattern(_dollar3) let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) @@ -13977,14 +16479,14 @@ fn yy_action_679(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 1753| type_name "::" UIDENT { -// 1754| Constructor::{ -// 1755| name: ConstrName::{ name: $3, loc: mk_loc($loc($3)) }, -// 1756| extra_info: TypeName($1), -// 1757| loc: mk_loc($sloc) -// 1758| } -// 1759| } -fn yy_action_680(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 1839| type_name "::" UIDENT { +// 1840| Constructor::{ +// 1841| name: ConstrName::{ name: $3, loc: mk_loc($loc($3)) }, +// 1842| extra_info: TypeName($1), +// 1843| loc: mk_loc($sloc) +// 1844| } +// 1845| } +fn yy_action_748(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[2].0 is YYObj_String(_dollar3) let _start_pos_of_item2 = _args[2].1 let _end_pos_of_item2 = _args[2].2 @@ -14001,14 +16503,14 @@ fn yy_action_680(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 1760| type_name "::" PACKAGE_NAME DOT_UIDENT { -// 1761| Constructor::{ -// 1762| name: ConstrName::{ name: $4, loc: mk_loc($loc($4)) }, -// 1763| extra_info: TypeNameWithConstrPackage(type_name = $1, pkg = $3), -// 1764| loc: mk_loc($sloc) -// 1765| } -// 1766| } -fn yy_action_681(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 1846| type_name "::" PACKAGE_NAME DOT_UIDENT { +// 1847| Constructor::{ +// 1848| name: ConstrName::{ name: $4, loc: mk_loc($loc($4)) }, +// 1849| extra_info: TypeNameWithConstrPackage(type_name = $1, pkg = $3), +// 1850| loc: mk_loc($sloc) +// 1851| } +// 1852| } +fn yy_action_749(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[3].0 is YYObj_String(_dollar4) let _start_pos_of_item3 = _args[3].1 let _end_pos_of_item3 = _args[3].2 @@ -14026,8 +16528,8 @@ fn yy_action_681(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 2080| simple_pattern "..=" simple_pattern { Range(lhs = $1, rhs = $3, kind=Inclusive, loc = mk_loc($sloc)) } -fn yy_action_682(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 2190| simple_pattern "..=" simple_pattern { Range(lhs = $1, rhs = $3, kind=Inclusive, loc = mk_loc($sloc)) } +fn yy_action_750(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj_Pattern(_dollar1) guard _args[2].0 is YYObj_Pattern(_dollar3) let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) @@ -14036,31 +16538,31 @@ fn yy_action_682(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 2081| simple_pattern { $1 } -fn yy_action_683(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 2191| simple_pattern { $1 } +fn yy_action_751(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj_Pattern(_dollar1) YYObj_Pattern({(); _dollar1 }) } // file:///./parser.mbty -// 2085| TRUE { @syntax.make_constant_pattern(loc = mk_loc($sloc), Bool(true)) } -fn yy_action_684(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 2195| TRUE { @syntax.make_constant_pattern(loc = mk_loc($sloc), Bool(true)) } +fn yy_action_752(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } YYObj_Pattern({(); @syntax.make_constant_pattern(loc = mk_loc((_symbol_start_pos, _end_pos)), Bool(true)) }) } // file:///./parser.mbty -// 2086| FALSE { @syntax.make_constant_pattern(loc = mk_loc($sloc), Bool(false)) } -fn yy_action_685(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 2196| FALSE { @syntax.make_constant_pattern(loc = mk_loc($sloc), Bool(false)) } +fn yy_action_753(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } YYObj_Pattern({(); @syntax.make_constant_pattern(loc = mk_loc((_symbol_start_pos, _end_pos)), Bool(false)) }) } // file:///./parser.mbty -// 2087| CHAR { @syntax.make_constant_pattern(loc = mk_loc($sloc), Char($1)) } -fn yy_action_686(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 2197| CHAR { @syntax.make_constant_pattern(loc = mk_loc($sloc), Char($1)) } +fn yy_action_754(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } guard _args[0].0 is YYObj_CharLiteral(_dollar1) @@ -14068,8 +16570,8 @@ fn yy_action_686(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 2088| INT { @syntax.make_constant_pattern(loc = mk_loc($sloc), @syntax.make_int($1)) } -fn yy_action_687(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 2198| INT { @syntax.make_constant_pattern(loc = mk_loc($sloc), @syntax.make_int($1)) } +fn yy_action_755(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } guard _args[0].0 is YYObj_String(_dollar1) @@ -14077,8 +16579,8 @@ fn yy_action_687(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 2089| BYTE { @syntax.make_constant_pattern(loc = mk_loc($sloc), Byte($1)) } -fn yy_action_688(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 2199| BYTE { @syntax.make_constant_pattern(loc = mk_loc($sloc), Byte($1)) } +fn yy_action_756(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } guard _args[0].0 is YYObj_CharLiteral(_dollar1) @@ -14086,8 +16588,8 @@ fn yy_action_688(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 2090| DOUBLE { @syntax.make_constant_pattern(loc = mk_loc($sloc), @syntax.make_double($1)) } -fn yy_action_689(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 2200| DOUBLE { @syntax.make_constant_pattern(loc = mk_loc($sloc), @syntax.make_double($1)) } +fn yy_action_757(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } guard _args[0].0 is YYObj_String(_dollar1) @@ -14095,8 +16597,8 @@ fn yy_action_689(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 2091| FLOAT { @syntax.make_constant_pattern(loc = mk_loc($sloc), @syntax.make_float($1)) } -fn yy_action_690(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 2201| FLOAT { @syntax.make_constant_pattern(loc = mk_loc($sloc), @syntax.make_float($1)) } +fn yy_action_758(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } guard _args[0].0 is YYObj_String(_dollar1) @@ -14104,8 +16606,8 @@ fn yy_action_690(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 2092| "-" INT { @syntax.make_constant_pattern(loc = mk_loc($sloc), @syntax.make_int("-" + $2)) } -fn yy_action_691(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 2202| "-" INT { @syntax.make_constant_pattern(loc = mk_loc($sloc), @syntax.make_int("-" + $2)) } +fn yy_action_759(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } guard _args[1].0 is YYObj_String(_dollar2) @@ -14113,8 +16615,8 @@ fn yy_action_691(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 2093| "-" DOUBLE { @syntax.make_constant_pattern(loc = mk_loc($sloc), @syntax.make_double("-" + $2)) } -fn yy_action_692(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 2203| "-" DOUBLE { @syntax.make_constant_pattern(loc = mk_loc($sloc), @syntax.make_double("-" + $2)) } +fn yy_action_760(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } guard _args[1].0 is YYObj_String(_dollar2) @@ -14122,8 +16624,8 @@ fn yy_action_692(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 2094| "-" FLOAT { @syntax.make_constant_pattern(loc = mk_loc($sloc), @syntax.make_float("-" + $2)) } -fn yy_action_693(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 2204| "-" FLOAT { @syntax.make_constant_pattern(loc = mk_loc($sloc), @syntax.make_float("-" + $2)) } +fn yy_action_761(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } guard _args[1].0 is YYObj_String(_dollar2) @@ -14131,8 +16633,8 @@ fn yy_action_693(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 2095| STRING { @syntax.make_constant_pattern(loc = mk_loc($sloc), String($1)) } -fn yy_action_694(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 2205| STRING { @syntax.make_constant_pattern(loc = mk_loc($sloc), String($1)) } +fn yy_action_762(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } guard _args[0].0 is YYObj_StringLiteral(_dollar1) @@ -14140,8 +16642,8 @@ fn yy_action_694(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 2096| BYTES { @syntax.make_constant_pattern(loc = mk_loc($sloc), Bytes($1)) } -fn yy_action_695(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 2206| BYTES { @syntax.make_constant_pattern(loc = mk_loc($sloc), Bytes($1)) } +fn yy_action_763(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } guard _args[0].0 is YYObj_StringLiteral(_dollar1) @@ -14149,35 +16651,66 @@ fn yy_action_695(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 2097| UNDERSCORE { Any(loc = mk_loc($sloc)) } -fn yy_action_696(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 2207| UNDERSCORE { Any(loc = mk_loc($sloc)) } +fn yy_action_764(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } YYObj_Pattern({(); Any(loc = mk_loc((_symbol_start_pos, _end_pos))) }) } // file:///./parser.mbty -// 2394| constr_pat_argument "," constr_pat_arguments_no_open { $3.add($1) } -fn yy_action_697(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 2218| binder delimited("(", constr_pat_arguments_no_open, ")") { +// 2219| Pattern::SpecialConstr(binder = $1, args = $2, loc = mk_loc($sloc)) +// 2220| } +fn yy_action_765(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_738(_args[0].2, _args[1:4]) + let _sub_action_1_result = yy_action_15(_last_pos, _args[0:1]) + guard _sub_action_1_result is YYObj_Binder(_dollar1) + guard _sub_action_0_result is YYObj_List_ConstrPatArg_(_dollar2) + let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) + let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } + YYObj_Pattern({(); + Pattern::SpecialConstr(binder = _dollar1, args = _dollar2, loc = mk_loc((_symbol_start_pos, _end_pos))) + }) +} + +// file:///./stdlib.mbty +// 40| L X R { $2 } +fn yy_action_738(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[1].0 is YYObj_List_ConstrPatArg_(_dollar2) + YYObj_List_ConstrPatArg_({(); _dollar2 }) +} + +// file:///./parser.mbty +// 2208| binder { Var($1) } +fn yy_action_766(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_15(_last_pos, _args[0:1]) + guard _sub_action_0_result is YYObj_Binder(_dollar1) + YYObj_Pattern({(); Var(_dollar1) }) +} + +// file:///./parser.mbty +// 2504| constr_pat_argument "," constr_pat_arguments_no_open { $3.add($1) } +fn yy_action_767(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[2].0 is YYObj_List_ConstrPatArg_(_dollar3) guard _args[0].0 is YYObj_ConstrPatArg(_dollar1) YYObj_List_ConstrPatArg_({(); _dollar3.add(_dollar1) }) } // file:///./parser.mbty -// 2098| binder { Var($1) } -fn yy_action_698(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_15(_last_pos, _args[0:1]) +// 2208| binder { Var($1) } +fn yy_action_768(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_20(_last_pos, _args[0:1]) guard _sub_action_0_result is YYObj_Binder(_dollar1) YYObj_Pattern({(); Var(_dollar1) }) } // file:///./parser.mbty -// 2386| constr_pat_argument "," constr_pat_arguments { -// 2387| let (args, is_open) = $3 -// 2388| (args.add($1), is_open) -// 2389| } -fn yy_action_699(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 2496| constr_pat_argument "," constr_pat_arguments { +// 2497| let (args, is_open) = $3 +// 2498| (args.add($1), is_open) +// 2499| } +fn yy_action_769(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[2].0 is YYObj__List_ConstrPatArg___Bool_(_dollar3) guard _args[0].0 is YYObj_ConstrPatArg(_dollar1) YYObj__List_ConstrPatArg___Bool_({(); @@ -14187,22 +16720,22 @@ fn yy_action_699(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 2385| ".." option(",") { (@list.empty(), true) } -fn yy_action_700(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 2495| ".." option(",") { (@list.empty(), true) } +fn yy_action_770(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { YYObj__List_ConstrPatArg___Bool_({(); (@list.empty(), true) }) } // file:///./parser.mbty -// 2404| POST_LABEL { -// 2405| let loc = mk_loc($loc($1)) -// 2406| let label = Label::{ name: $1, loc } -// 2407| let pat = @syntax.label_to_pat(loc = loc.trim_last_char(), label) -// 2408| ConstrPatArg::{ -// 2409| pat, -// 2410| kind: LabelledPun(label) -// 2411| } -// 2412| } -fn yy_action_701(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 2514| POST_LABEL { +// 2515| let loc = mk_loc($loc($1)) +// 2516| let label = Label::{ name: $1, loc } +// 2517| let pat = @syntax.label_to_pat(loc = loc.trim_last_char(), label) +// 2518| ConstrPatArg::{ +// 2519| pat, +// 2520| kind: LabelledPun(label) +// 2521| } +// 2522| } +fn yy_action_771(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _start_pos_of_item0 = _args[0].1 let _end_pos_of_item0 = _args[0].2 guard _args[0].0 is YYObj_String(_dollar1) @@ -14219,28 +16752,28 @@ fn yy_action_701(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit // file:///./stdlib.mbty // 5| X { Some($1) } -fn yy_action_702(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_703(_last_pos, _args[0:3]) +fn yy_action_772(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_773(_last_pos, _args[0:3]) guard _sub_action_0_result is YYObj__List_ConstrPatArg___Bool_(_dollar1) YYObj_Option__List_ConstrPatArg___Bool__({(); Some(_dollar1) }) } // file:///./stdlib.mbty // 40| L X R { $2 } -fn yy_action_703(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +fn yy_action_773(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[1].0 is YYObj__List_ConstrPatArg___Bool_(_dollar2) YYObj__List_ConstrPatArg___Bool_({(); _dollar2 }) } // file:///./stdlib.mbty // 4| { None } -fn yy_action_704(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +fn yy_action_774(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { YYObj_Option__List_ConstrPatArg___Bool__({(); None }) } // file:///./parser.mbty -// 2129| ".." STRING { StringSpread(str = $2, loc = mk_loc($loc($2))) } -fn yy_action_705(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 2239| ".." STRING { StringSpread(str = $2, loc = mk_loc($loc($2))) } +fn yy_action_775(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[1].0 is YYObj_StringLiteral(_dollar2) let _start_pos_of_item1 = _args[1].1 let _end_pos_of_item1 = _args[1].2 @@ -14248,8 +16781,8 @@ fn yy_action_705(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 2130| ".." BYTES { BytesSpread(bytes = $2, loc = mk_loc($loc($2))) } -fn yy_action_706(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 2240| ".." BYTES { BytesSpread(bytes = $2, loc = mk_loc($loc($2))) } +fn yy_action_776(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[1].0 is YYObj_StringLiteral(_dollar2) let _start_pos_of_item1 = _args[1].1 let _end_pos_of_item1 = _args[1].2 @@ -14257,11 +16790,11 @@ fn yy_action_706(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 2131| ".." UIDENT { -// 2132| let binder = Binder::{ name: $2, loc: mk_loc($loc($2)) } -// 2133| ConstSpread(binder~, pkg = None, loc = mk_loc($sloc)) -// 2134| } -fn yy_action_707(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 2241| ".." UIDENT { +// 2242| let binder = Binder::{ name: $2, loc: mk_loc($loc($2)) } +// 2243| ConstSpread(binder~, pkg = None, loc = mk_loc($sloc)) +// 2244| } +fn yy_action_777(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[1].0 is YYObj_String(_dollar2) let _start_pos_of_item1 = _args[1].1 let _end_pos_of_item1 = _args[1].2 @@ -14274,11 +16807,11 @@ fn yy_action_707(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 2135| ".." PACKAGE_NAME DOT_UIDENT { -// 2136| let binder = Binder::{ name: $3, loc: mk_loc($loc($3)) } -// 2137| ConstSpread(binder~, pkg = Some($2), loc = mk_loc($sloc)) -// 2138| } -fn yy_action_708(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 2245| ".." PACKAGE_NAME DOT_UIDENT { +// 2246| let binder = Binder::{ name: $3, loc: mk_loc($loc($3)) } +// 2247| ConstSpread(binder~, pkg = Some($2), loc = mk_loc($sloc)) +// 2248| } +fn yy_action_778(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[2].0 is YYObj_String(_dollar3) let _start_pos_of_item2 = _args[2].1 let _end_pos_of_item2 = _args[2].2 @@ -14292,93 +16825,158 @@ fn yy_action_708(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 190| non_empty_list_commas_rev(X) "," X { $1.add($3) } -fn yy_action_709(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 196| non_empty_list_commas_rev(X) "," X { $1.add($3) } +fn yy_action_779(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj_List_ArrayPattern_(_dollar1) guard _args[2].0 is YYObj_ArrayPattern(_dollar3) YYObj_List_ArrayPattern_({(); _dollar1.add(_dollar3) }) } // file:///./parser.mbty -// 198| non_empty_list_commas_rev(X) option(",") { $1.rev() } -fn yy_action_710(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 204| non_empty_list_commas_rev(X) option(",") { $1.rev() } +fn yy_action_780(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj_List_ArrayPattern_(_dollar1) YYObj_List_ArrayPattern_({(); _dollar1.rev() }) } // file:///./parser.mbty -// 189| X { @list.singleton($1) } -fn yy_action_711(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 195| X { @list.singleton($1) } +fn yy_action_781(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj_ArrayPattern(_dollar1) YYObj_List_ArrayPattern_({(); @list.singleton(_dollar1) }) } // file:///./parser.mbty -// 2158| dotdot_binder ioption(",") { Open(@list.empty(), @list.empty(), $1) } -fn yy_action_712(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_436(_args[0].2, _args[1:2]) +// 2268| dotdot_binder ioption(",") { Open(@list.empty(), @list.empty(), $1) } +fn yy_action_782(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_551(_args[0].2, _args[1:2]) guard _args[0].0 is YYObj_DotDotBinder(_dollar1) YYObj_ArrayPatterns({(); Open(@list.empty(), @list.empty(), _dollar1) }) } // file:///./parser.mbty -// 2158| dotdot_binder ioption(",") { Open(@list.empty(), @list.empty(), $1) } -fn yy_action_713(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_434(_args[0].2, _args[1:1]) +// 2268| dotdot_binder ioption(",") { Open(@list.empty(), @list.empty(), $1) } +fn yy_action_783(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_549(_args[0].2, _args[1:1]) guard _args[0].0 is YYObj_DotDotBinder(_dollar1) YYObj_ArrayPatterns({(); Open(@list.empty(), @list.empty(), _dollar1) }) } // file:///./parser.mbty -// 2149| { Closed(@list.empty()) } -fn yy_action_714(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 2259| { Closed(@list.empty()) } +fn yy_action_784(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { YYObj_ArrayPatterns({(); Closed(@list.empty()) }) } // file:///./stdlib.mbty // 4| { None } -fn yy_action_715(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +fn yy_action_785(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { YYObj_Option_Unit_({(); None }) } // file:///./parser.mbty -// 1311| "(" separated_nonempty_list(",", lex_top_pattern) ")" { $2 } -fn yy_action_716(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 247| X SEMI non_empty_list_semis(X) { $3.add($1) } +fn yy_action_786(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[2].0 is YYObj_List_Case_(_dollar3) + guard _args[0].0 is YYObj_Case(_dollar1) + YYObj_List_Case_({(); _dollar3.add(_dollar1) }) +} + +// file:///./parser.mbty +// 1374| lex_pattern "if" infix_expr "=>" expr_statement { +// 1375| LexCase::{ +// 1376| pat : $1, +// 1377| pat_loc : mk_loc($loc($1)), +// 1378| guard_ : Some($3), +// 1379| body : $5 +// 1380| } +// 1381| } +fn yy_action_787(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj__list_List_LexTopPattern_(_dollar1) + let _start_pos_of_item0 = _args[0].1 + let _end_pos_of_item0 = _args[0].2 + guard _args[2].0 is YYObj_Expr(_dollar3) + guard _args[4].0 is YYObj_Expr(_dollar5) + YYObj_LexCase({(); + LexCase::{ + pat : _dollar1, + pat_loc : mk_loc((_start_pos_of_item0, _end_pos_of_item0)), + guard_ : Some(_dollar3), + body : _dollar5 + } + }) +} + +// file:///./parser.mbty +// 1382| "..." { +// 1383| let pat = @list.singleton(LexTopPattern::Wildcard(loc = mk_loc($sloc))) +// 1384| LexCase::{ +// 1385| pat, +// 1386| pat_loc : mk_loc($sloc), +// 1387| guard_ : None, +// 1388| body : Hole(loc=mk_loc($sloc), kind=Todo) +// 1389| } +// 1390| } +fn yy_action_788(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) + let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } + YYObj_LexCase({(); + let pat = @list.singleton(LexTopPattern::Wildcard(loc = mk_loc((_symbol_start_pos, _end_pos)))) + LexCase::{ + pat, + pat_loc : mk_loc((_symbol_start_pos, _end_pos)), + guard_ : None, + body : Hole(loc=mk_loc((_symbol_start_pos, _end_pos)), kind=Todo) + } + }) +} + +// file:///./parser.mbty +// 1393| "(" separated_nonempty_list(",", lex_top_pattern) ")" { $2 } +fn yy_action_789(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[1].0 is YYObj__list_List_LexTopPattern_(_dollar2) YYObj__list_List_LexTopPattern_({(); _dollar2 }) } // file:///./parser.mbty -// 1317| lex_as_pattern { Pattern($1) } -fn yy_action_717(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 1399| lex_as_pattern { Pattern($1) } +fn yy_action_790(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj_LexPattern(_dollar1) YYObj_LexTopPattern({(); Pattern(_dollar1) }) } // file:///./parser.mbty -// 1318| "_" { Wildcard(loc = mk_loc($sloc)) } -fn yy_action_718(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 1400| "_" { Wildcard(loc = mk_loc($sloc)) } +fn yy_action_791(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } YYObj_LexTopPattern({(); Wildcard(loc = mk_loc((_symbol_start_pos, _end_pos))) }) } // file:///./parser.mbty -// 1319| binder { Binder($1) } -fn yy_action_719(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 1401| binder { Binder($1) } +fn yy_action_792(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _sub_action_0_result = yy_action_15(_last_pos, _args[0:1]) guard _sub_action_0_result is YYObj_Binder(_dollar1) YYObj_LexTopPattern({(); Binder(_dollar1) }) } // file:///./parser.mbty -// 1322| lex_pattern_sequence { -// 1323| match $1 { -// 1324| More(pat, tail=Empty) => pat -// 1325| _ => Sequence(pats=$1, loc=mk_loc($sloc)) -// 1326| } -// 1327| } -fn yy_action_720(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 1401| binder { Binder($1) } +fn yy_action_793(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_20(_last_pos, _args[0:1]) + guard _sub_action_0_result is YYObj_Binder(_dollar1) + YYObj_LexTopPattern({(); Binder(_dollar1) }) +} + +// file:///./parser.mbty +// 1404| lex_pattern_sequence { +// 1405| match $1 { +// 1406| More(pat, tail=Empty) => pat +// 1407| _ => Sequence(pats=$1, loc=mk_loc($sloc)) +// 1408| } +// 1409| } +fn yy_action_794(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj__list_List_LexPattern_(_dollar1) let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } @@ -14391,10 +16989,10 @@ fn yy_action_720(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 1328| lex_atom_pattern "as" binder { -// 1329| Alias(pat = $1, binder = $3, loc = mk_loc($sloc)) -// 1330| } -fn yy_action_721(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 1410| lex_atom_pattern "as" binder { +// 1411| Alias(pat = $1, binder = $3, loc = mk_loc($sloc)) +// 1412| } +fn yy_action_795(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _sub_action_0_result = yy_action_15(_args[1].2, _args[2:3]) guard _args[0].0 is YYObj_LexPattern(_dollar1) guard _sub_action_0_result is YYObj_Binder(_dollar3) @@ -14406,37 +17004,52 @@ fn yy_action_721(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 1334| lex_atom_pattern option(SEMI) lex_pattern_sequence { @list.cons($1, $3) } -fn yy_action_722(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 1410| lex_atom_pattern "as" binder { +// 1411| Alias(pat = $1, binder = $3, loc = mk_loc($sloc)) +// 1412| } +fn yy_action_796(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_20(_args[1].2, _args[2:3]) + guard _args[0].0 is YYObj_LexPattern(_dollar1) + guard _sub_action_0_result is YYObj_Binder(_dollar3) + let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) + let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } + YYObj_LexPattern({(); + Alias(pat = _dollar1, binder = _dollar3, loc = mk_loc((_symbol_start_pos, _end_pos))) + }) +} + +// file:///./parser.mbty +// 1416| lex_atom_pattern option(SEMI) lex_pattern_sequence { @list.cons($1, $3) } +fn yy_action_797(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj_LexPattern(_dollar1) guard _args[2].0 is YYObj__list_List_LexPattern_(_dollar3) YYObj__list_List_LexPattern_({(); @list.cons(_dollar1, _dollar3) }) } // file:///./parser.mbty -// 1333| lex_atom_pattern { @list.singleton($1) } -fn yy_action_723(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 1415| lex_atom_pattern { @list.singleton($1) } +fn yy_action_798(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj_LexPattern(_dollar1) YYObj__list_List_LexPattern_({(); @list.singleton(_dollar1) }) } // file:///./parser.mbty -// 1337| lex_simple_atom_pattern { $1 } -fn yy_action_724(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 1419| lex_simple_atom_pattern { $1 } +fn yy_action_799(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj_LexPattern(_dollar1) YYObj_LexPattern({(); _dollar1 }) } // file:///./parser.mbty -// 1338| "(" lex_as_pattern ")" { $2 } -fn yy_action_725(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 1420| "(" lex_as_pattern ")" { $2 } +fn yy_action_800(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[1].0 is YYObj_LexPattern(_dollar2) YYObj_LexPattern({(); _dollar2 }) } // file:///./stdlib.mbty // 60| X SEP separated_nonempty_list(SEP, X) { $3.add($1) } -fn yy_action_726(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +fn yy_action_801(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[2].0 is YYObj__list_List_LexTopPattern_(_dollar3) guard _args[0].0 is YYObj_LexTopPattern(_dollar1) YYObj__list_List_LexTopPattern_({(); _dollar3.add(_dollar1) }) @@ -14444,39 +17057,47 @@ fn yy_action_726(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit // file:///./stdlib.mbty // 59| X { @list.singleton($1) } -fn yy_action_727(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +fn yy_action_802(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj_LexTopPattern(_dollar1) YYObj__list_List_LexTopPattern_({(); @list.singleton(_dollar1) }) } // file:///./parser.mbty -// 1312| "_" { @list.singleton(Wildcard(loc = mk_loc($sloc))) } -fn yy_action_728(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 1394| "_" { @list.singleton(Wildcard(loc = mk_loc($sloc))) } +fn yy_action_803(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } YYObj__list_List_LexTopPattern_({(); @list.singleton(Wildcard(loc = mk_loc((_symbol_start_pos, _end_pos)))) }) } // file:///./parser.mbty -// 1313| binder { @list.singleton(Binder($1)) } -fn yy_action_729(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 1395| binder { @list.singleton(Binder($1)) } +fn yy_action_804(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _sub_action_0_result = yy_action_15(_last_pos, _args[0:1]) guard _sub_action_0_result is YYObj_Binder(_dollar1) YYObj__list_List_LexTopPattern_({(); @list.singleton(Binder(_dollar1)) }) } // file:///./parser.mbty -// 1314| lex_simple_atom_pattern { @list.singleton(Pattern($1)) } -fn yy_action_730(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 1395| binder { @list.singleton(Binder($1)) } +fn yy_action_805(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_20(_last_pos, _args[0:1]) + guard _sub_action_0_result is YYObj_Binder(_dollar1) + YYObj__list_List_LexTopPattern_({(); @list.singleton(Binder(_dollar1)) }) +} + +// file:///./parser.mbty +// 1396| lex_simple_atom_pattern { @list.singleton(Pattern($1)) } +fn yy_action_806(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj_LexPattern(_dollar1) YYObj__list_List_LexTopPattern_({(); @list.singleton(Pattern(_dollar1)) }) } // file:///./parser.mbty -// 1341| REGEX_LITERAL { -// 1342| Regex(lit=$1, offset=3, loc=mk_loc($sloc)) -// 1343| } -fn yy_action_731(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 1423| REGEX_LITERAL { +// 1424| Regex(lit=$1, offset=3, loc=mk_loc($sloc)) +// 1425| } +fn yy_action_807(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj_String(_dollar1) let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } @@ -14486,10 +17107,10 @@ fn yy_action_731(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 1344| REGEX_INTERP { -// 1345| RegexInterp(elems=make_interps($1), loc=mk_loc($sloc)) -// 1346| } -fn yy_action_732(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 1426| REGEX_INTERP { +// 1427| RegexInterp(elems=make_interps($1), loc=mk_loc($sloc)) +// 1428| } +fn yy_action_808(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj_InterpLiteral(_dollar1) let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } @@ -14499,10 +17120,10 @@ fn yy_action_732(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 1347| STRING { -// 1348| Regex(lit = $1, offset = 1, loc = mk_loc($sloc)) -// 1349| } -fn yy_action_733(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 1429| STRING { +// 1430| Regex(lit = $1, offset = 1, loc = mk_loc($sloc)) +// 1431| } +fn yy_action_809(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj_StringLiteral(_dollar1) let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } @@ -14512,10 +17133,10 @@ fn yy_action_733(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 1350| INTERP { -// 1351| RegexInterp(elems = make_interps($1), loc = mk_loc($sloc)) -// 1352| } -fn yy_action_734(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 1432| INTERP { +// 1433| RegexInterp(elems = make_interps($1), loc = mk_loc($sloc)) +// 1434| } +fn yy_action_810(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj_InterpLiteral(_dollar1) let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } @@ -14525,11 +17146,11 @@ fn yy_action_734(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 1353| qual_uident { -// 1354| ConstantRef(lid = $1, loc = mk_loc($sloc)) -// 1355| } -fn yy_action_735(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_736(_last_pos, _args[0:1]) +// 1435| qual_uident { +// 1436| ConstantRef(lid = $1, loc = mk_loc($sloc)) +// 1437| } +fn yy_action_811(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_812(_last_pos, _args[0:1]) guard _sub_action_0_result is YYObj_LongIdent(_dollar1) let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } @@ -14539,11 +17160,11 @@ fn yy_action_735(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 1353| qual_uident { -// 1354| ConstantRef(lid = $1, loc = mk_loc($sloc)) -// 1355| } -fn yy_action_737(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_738(_last_pos, _args[0:2]) +// 1435| qual_uident { +// 1436| ConstantRef(lid = $1, loc = mk_loc($sloc)) +// 1437| } +fn yy_action_813(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_814(_last_pos, _args[0:2]) guard _sub_action_0_result is YYObj_LongIdent(_dollar1) let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } @@ -14553,142 +17174,144 @@ fn yy_action_737(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 1613| range_expr "lexmatch?" lex_pattern "with" label { -// 1614| IsLexMatch(expr=$1, pat=$3, pat_loc=mk_loc($loc($3)), strategy = Some($5), loc=mk_loc($sloc)) -// 1615| } -fn yy_action_739(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_426(_args[3].2, _args[4:5]) - guard _args[0].0 is YYObj_Expr(_dollar1) - guard _args[2].0 is YYObj__list_List_LexTopPattern_(_dollar3) - let _start_pos_of_item2 = _args[2].1 - let _end_pos_of_item2 = _args[2].2 - guard _sub_action_0_result is YYObj_Label(_dollar5) - let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) - let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - YYObj_Expr({(); - IsLexMatch(expr=_dollar1, pat=_dollar3, pat_loc=mk_loc((_start_pos_of_item2, _end_pos_of_item2)), strategy = Some(_dollar5), loc=mk_loc((_symbol_start_pos, _end_pos))) - }) +// 247| X SEMI non_empty_list_semis(X) { $3.add($1) } +fn yy_action_815(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[2].0 is YYObj_List_LexCase_(_dollar3) + guard _args[0].0 is YYObj_LexCase(_dollar1) + YYObj_List_LexCase_({(); _dollar3.add(_dollar1) }) } // file:///./parser.mbty -// 1610| range_expr "lexmatch?" lex_pattern %prec prec_LEXMATCH_QUESTION { -// 1611| IsLexMatch(expr=$1, pat=$3, pat_loc=mk_loc($loc($3)), strategy = None, loc=mk_loc($sloc)) -// 1612| } -fn yy_action_740(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[0].0 is YYObj_Expr(_dollar1) - guard _args[2].0 is YYObj__list_List_LexTopPattern_(_dollar3) - let _start_pos_of_item2 = _args[2].1 - let _end_pos_of_item2 = _args[2].2 - let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) - let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - YYObj_Expr({(); - IsLexMatch(expr=_dollar1, pat=_dollar3, pat_loc=mk_loc((_start_pos_of_item2, _end_pos_of_item2)), strategy = None, loc=mk_loc((_symbol_start_pos, _end_pos))) - }) +// 246| X option(SEMI) { @list.singleton($1) } +fn yy_action_816(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj_LexCase(_dollar1) + YYObj_List_LexCase_({(); @list.singleton(_dollar1) }) } // file:///./parser.mbty -// 1616| range_expr "=~" regex_match_rhs { -// 1617| let (pat, bindings) = $3 -// 1618| RegexMatch(expr = $1, pat~, bindings~, loc = mk_loc($sloc)) -// 1619| } -fn yy_action_741(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[2].0 is YYObj__RegexPattern__List__Label__Binder____(_dollar3) - guard _args[0].0 is YYObj_Expr(_dollar1) - let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) - let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - YYObj_Expr({(); - let (pat, bindings) = _dollar3 - RegexMatch(expr = _dollar1, pat~, bindings~, loc = mk_loc((_symbol_start_pos, _end_pos))) +// 256| { @list.empty() } +fn yy_action_817(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + YYObj_List_LexCase_({(); @list.empty() }) +} + +// file:///./parser.mbty +// 1330| "lexmatch" infix_expr "{" { +// 1331| ($2, None) +// 1332| } +fn yy_action_818(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[1].0 is YYObj_Expr(_dollar2) + YYObj__Expr__Label__({(); + (_dollar2, None) }) } // file:///./parser.mbty -// 1627| regex_atom_pattern { ($1, @list.empty()) } -fn yy_action_742(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[0].0 is YYObj_RegexPattern(_dollar1) - YYObj__RegexPattern__List__Label__Binder____({(); (_dollar1, @list.empty()) }) +// 1333| "lexmatch" infix_expr "with" label "{" { +// 1334| ($2, Some($4)) +// 1335| } +fn yy_action_819(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_473(_args[2].2, _args[3:4]) + guard _args[1].0 is YYObj_Expr(_dollar2) + guard _sub_action_0_result is YYObj_Label(_dollar4) + YYObj__Expr__Label__({(); + (_dollar2, Some(_dollar4)) + }) } // file:///./parser.mbty -// 1628| "(" regex_as_pattern "," list_commas(regex_match_binding) ")" { ($2, $4) } -fn yy_action_743(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[1].0 is YYObj_RegexPattern(_dollar2) - guard _args[3].0 is YYObj_List__Label__Binder___(_dollar4) - YYObj__RegexPattern__List__Label__Binder____({(); (_dollar2, _dollar4) }) +// 2031| lident_string { Label::{ name: $1, loc: mk_loc($sloc) } } +fn yy_action_473(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_226(_last_pos, _args[0:1]) + guard _sub_action_0_result is YYObj_String(_dollar1) + let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) + let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } + YYObj_Label({(); Label::{ name: _dollar1, loc: mk_loc((_symbol_start_pos, _end_pos)) } }) } // file:///./parser.mbty -// 207| non_empty_list_commas(X) { $1 } -fn yy_action_744(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[0].0 is YYObj_List__Label__Binder___(_dollar1) - YYObj_List__Label__Binder___({(); _dollar1 }) +// 1333| "lexmatch" infix_expr "with" label "{" { +// 1334| ($2, Some($4)) +// 1335| } +fn yy_action_820(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_501(_args[2].2, _args[3:4]) + guard _args[1].0 is YYObj_Expr(_dollar2) + guard _sub_action_0_result is YYObj_Label(_dollar4) + YYObj__Expr__Label__({(); + (_dollar2, Some(_dollar4)) + }) } // file:///./parser.mbty -// 1632| LIDENT "=" binder { -// 1633| let label = Label::{ name : $1, loc : mk_loc($loc($1)) } -// 1634| (label, Some($3)) -// 1635| } -fn yy_action_745(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_15(_args[1].2, _args[2:3]) - guard _args[0].0 is YYObj_String(_dollar1) - let _start_pos_of_item0 = _args[0].1 - let _end_pos_of_item0 = _args[0].2 - guard _sub_action_0_result is YYObj_Binder(_dollar3) - YYObj__Label__Binder__({(); - let label = Label::{ name : _dollar1, loc : mk_loc((_start_pos_of_item0, _end_pos_of_item0)) } - (label, Some(_dollar3)) +// 1349| lexscan_case_pattern "if" infix_expr "=>" expr_statement { +// 1350| LexScanCase::{ pat: $1, guard_: Some($3), body: $5 } +// 1351| } +fn yy_action_821(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj_LexScanCasePattern(_dollar1) + guard _args[2].0 is YYObj_Expr(_dollar3) + guard _args[4].0 is YYObj_Expr(_dollar5) + YYObj_LexScanCase({(); + LexScanCase::{ pat: _dollar1, guard_: Some(_dollar3), body: _dollar5 } }) } // file:///./parser.mbty -// 1636| POST_LABEL { -// 1637| let label = Label::{ name : $1, loc : mk_loc($loc($1)) } -// 1638| (label, None) -// 1639| } -fn yy_action_746(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[0].0 is YYObj_String(_dollar1) +// 1352| "..." { +// 1353| LexScanCase::{ +// 1354| pat: LexScanCasePattern::Wildcard(loc = mk_loc($loc($1))), +// 1355| guard_: None, +// 1356| body: Hole(loc = mk_loc($sloc), kind = Todo) +// 1357| } +// 1358| } +fn yy_action_822(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _start_pos_of_item0 = _args[0].1 let _end_pos_of_item0 = _args[0].2 - YYObj__Label__Binder__({(); - let label = Label::{ name : _dollar1, loc : mk_loc((_start_pos_of_item0, _end_pos_of_item0)) } - (label, None) + let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) + let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } + YYObj_LexScanCase({(); + LexScanCase::{ + pat: LexScanCasePattern::Wildcard(loc = mk_loc((_start_pos_of_item0, _end_pos_of_item0))), + guard_: None, + body: Hole(loc = mk_loc((_symbol_start_pos, _end_pos)), kind = Todo) + } }) } // file:///./parser.mbty -// 190| non_empty_list_commas_rev(X) "," X { $1.add($3) } -fn yy_action_747(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[0].0 is YYObj_List__Label__Binder___(_dollar1) - guard _args[2].0 is YYObj__Label__Binder__(_dollar3) - YYObj_List__Label__Binder___({(); _dollar1.add(_dollar3) }) +// 1361| regex_as_pattern { LexScanCasePattern::Pattern($1) } +fn yy_action_823(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj_RegexPattern(_dollar1) + YYObj_LexScanCasePattern({(); LexScanCasePattern::Pattern(_dollar1) }) } // file:///./parser.mbty -// 198| non_empty_list_commas_rev(X) option(",") { $1.rev() } -fn yy_action_748(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[0].0 is YYObj_List__Label__Binder___(_dollar1) - YYObj_List__Label__Binder___({(); _dollar1.rev() }) +// 1362| binder { LexScanCasePattern::Binder($1) } +fn yy_action_824(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_15(_last_pos, _args[0:1]) + guard _sub_action_0_result is YYObj_Binder(_dollar1) + YYObj_LexScanCasePattern({(); LexScanCasePattern::Binder(_dollar1) }) } // file:///./parser.mbty -// 189| X { @list.singleton($1) } -fn yy_action_749(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[0].0 is YYObj__Label__Binder__(_dollar1) - YYObj_List__Label__Binder___({(); @list.singleton(_dollar1) }) +// 1362| binder { LexScanCasePattern::Binder($1) } +fn yy_action_825(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_20(_last_pos, _args[0:1]) + guard _sub_action_0_result is YYObj_Binder(_dollar1) + YYObj_LexScanCasePattern({(); LexScanCasePattern::Binder(_dollar1) }) } // file:///./parser.mbty -// 206| { @list.empty() } -fn yy_action_750(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - YYObj_List__Label__Binder___({(); @list.empty() }) +// 1363| "_" { LexScanCasePattern::Wildcard(loc = mk_loc($sloc)) } +fn yy_action_826(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) + let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } + YYObj_LexScanCasePattern({(); LexScanCasePattern::Wildcard(loc = mk_loc((_symbol_start_pos, _end_pos))) }) } // file:///./parser.mbty -// 1651| regex_or_pattern "|" regex_sequence_pattern { -// 1652| RegexPattern::Alternation(pat1 = $1, pat2 = $3, loc = mk_loc($sloc)) -// 1653| } -fn yy_action_751(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 1737| regex_or_pattern "|" regex_sequence_pattern { +// 1738| RegexPattern::Alternation(pat1 = $1, pat2 = $3, loc = mk_loc($sloc)) +// 1739| } +fn yy_action_827(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj_RegexPattern(_dollar1) guard _args[2].0 is YYObj_RegexPattern(_dollar3) let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) @@ -14699,17 +17322,17 @@ fn yy_action_751(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 1643| regex_or_pattern { $1 } -fn yy_action_752(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 1729| regex_or_pattern { $1 } +fn yy_action_828(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj_RegexPattern(_dollar1) YYObj_RegexPattern({(); _dollar1 }) } // file:///./parser.mbty -// 1644| regex_atom_pattern "as" binder { -// 1645| RegexPattern::Alias(pat = $1, binder = $3, loc = mk_loc($sloc)) -// 1646| } -fn yy_action_753(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 1730| regex_atom_pattern "as" binder { +// 1731| RegexPattern::Alias(pat = $1, binder = $3, loc = mk_loc($sloc)) +// 1732| } +fn yy_action_829(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _sub_action_0_result = yy_action_15(_args[1].2, _args[2:3]) guard _args[0].0 is YYObj_RegexPattern(_dollar1) guard _sub_action_0_result is YYObj_Binder(_dollar3) @@ -14721,26 +17344,32 @@ fn yy_action_753(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 1937| LIDENT { Binder::{ name: $1, loc: mk_loc($sloc) } } -fn yy_action_15(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[0].0 is YYObj_String(_dollar1) +// 1730| regex_atom_pattern "as" binder { +// 1731| RegexPattern::Alias(pat = $1, binder = $3, loc = mk_loc($sloc)) +// 1732| } +fn yy_action_830(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_20(_args[1].2, _args[2:3]) + guard _args[0].0 is YYObj_RegexPattern(_dollar1) + guard _sub_action_0_result is YYObj_Binder(_dollar3) let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - YYObj_Binder({(); Binder::{ name: _dollar1, loc: mk_loc((_symbol_start_pos, _end_pos)) } }) + YYObj_RegexPattern({(); + RegexPattern::Alias(pat = _dollar1, binder = _dollar3, loc = mk_loc((_symbol_start_pos, _end_pos))) + }) } // file:///./parser.mbty -// 1657| regex_atom_pattern { $1 } -fn yy_action_754(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 1743| regex_atom_pattern { $1 } +fn yy_action_831(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj_RegexPattern(_dollar1) YYObj_RegexPattern({(); _dollar1 }) } // file:///./parser.mbty -// 1658| regex_sequence_pattern "+" regex_atom_pattern { -// 1659| RegexPattern::Sequence(pat1 = $1, pat2 = $3, loc = mk_loc($sloc)) -// 1660| } -fn yy_action_755(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 1744| regex_sequence_pattern "+" regex_atom_pattern { +// 1745| RegexPattern::Sequence(pat1 = $1, pat2 = $3, loc = mk_loc($sloc)) +// 1746| } +fn yy_action_832(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj_RegexPattern(_dollar1) guard _args[2].0 is YYObj_RegexPattern(_dollar3) let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) @@ -14751,24 +17380,17 @@ fn yy_action_755(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 1650| regex_sequence_pattern { $1 } -fn yy_action_756(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 1736| regex_sequence_pattern { $1 } +fn yy_action_833(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj_RegexPattern(_dollar1) YYObj_RegexPattern({(); _dollar1 }) } // file:///./parser.mbty -// 1670| "(" regex_as_pattern ")" { $2 } -fn yy_action_757(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[1].0 is YYObj_RegexPattern(_dollar2) - YYObj_RegexPattern({(); _dollar2 }) -} - -// file:///./parser.mbty -// 1664| REGEX_LITERAL { -// 1665| RegexPattern::Literal(lit = $1, loc = mk_loc($loc($1))) -// 1666| } -fn yy_action_758(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 1750| REGEX_LITERAL { +// 1751| RegexPattern::Literal(lit = $1, loc = mk_loc($loc($1))) +// 1752| } +fn yy_action_834(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj_String(_dollar1) let _start_pos_of_item0 = _args[0].1 let _end_pos_of_item0 = _args[0].2 @@ -14778,11 +17400,11 @@ fn yy_action_758(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 1667| qual_uident { -// 1668| RegexPattern::Reference(lid = $1, loc = mk_loc($sloc)) -// 1669| } -fn yy_action_759(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_736(_last_pos, _args[0:1]) +// 1753| qual_uident { +// 1754| RegexPattern::Reference(lid = $1, loc = mk_loc($sloc)) +// 1755| } +fn yy_action_835(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_812(_last_pos, _args[0:1]) guard _sub_action_0_result is YYObj_LongIdent(_dollar1) let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } @@ -14792,18 +17414,18 @@ fn yy_action_759(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 1033| UIDENT { Ident(name = $1) } -fn yy_action_736(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 1067| UIDENT { Ident(name = $1) } +fn yy_action_812(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj_String(_dollar1) YYObj_LongIdent({(); Ident(name = _dollar1) }) } // file:///./parser.mbty -// 1667| qual_uident { -// 1668| RegexPattern::Reference(lid = $1, loc = mk_loc($sloc)) -// 1669| } -fn yy_action_760(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_738(_last_pos, _args[0:2]) +// 1753| qual_uident { +// 1754| RegexPattern::Reference(lid = $1, loc = mk_loc($sloc)) +// 1755| } +fn yy_action_836(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_814(_last_pos, _args[0:2]) guard _sub_action_0_result is YYObj_LongIdent(_dollar1) let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } @@ -14813,1745 +17435,2728 @@ fn yy_action_760(_last_pos : Position, _args : ArrayView[(YYObj, Position, Posit } // file:///./parser.mbty -// 1034| PACKAGE_NAME DOT_UIDENT { Dot(pkg = $1, id = $2) } -fn yy_action_738(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 1068| PACKAGE_NAME DOT_UIDENT { Dot(pkg = $1, id = $2) } +fn yy_action_814(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj_String(_dollar1) guard _args[1].0 is YYObj_String(_dollar2) YYObj_LongIdent({(); Dot(pkg = _dollar1, id = _dollar2) }) } // file:///./parser.mbty -// 1121| INTERP { -// 1122| make_interp_expr(loc = mk_loc($sloc), $1) -// 1123| } -fn yy_action_761(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) - let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - guard _args[0].0 is YYObj_InterpLiteral(_dollar1) - YYObj_Expr({(); - make_interp_expr(loc = mk_loc((_symbol_start_pos, _end_pos)), _dollar1) - }) +// 1756| "(" regex_as_pattern ")" { $2 } +fn yy_action_837(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[1].0 is YYObj_RegexPattern(_dollar2) + YYObj_RegexPattern({(); _dollar2 }) } // file:///./parser.mbty -// 1124| STRING { -// 1125| Expr::Constant(c = @syntax.Constant::String($1), loc = mk_loc($sloc)) -// 1126| } -fn yy_action_762(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[0].0 is YYObj_StringLiteral(_dollar1) - let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) - let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - YYObj_Expr({(); - Expr::Constant(c = @syntax.Constant::String(_dollar1), loc = mk_loc((_symbol_start_pos, _end_pos))) - }) +// 247| X SEMI non_empty_list_semis(X) { $3.add($1) } +fn yy_action_838(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[2].0 is YYObj_List_LexScanCase_(_dollar3) + guard _args[0].0 is YYObj_LexScanCase(_dollar1) + YYObj_List_LexScanCase_({(); _dollar3.add(_dollar1) }) } // file:///./parser.mbty -// 1127| non_empty_list(multiline_string) { -// 1128| Expr::MultilineString(elems = $1, loc = mk_loc($sloc)) -// 1129| } -fn yy_action_763(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[0].0 is YYObj_List_MultilineStringElem_(_dollar1) - let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) - let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - YYObj_Expr({(); - Expr::MultilineString(elems = _dollar1, loc = mk_loc((_symbol_start_pos, _end_pos))) - }) +// 246| X option(SEMI) { @list.singleton($1) } +fn yy_action_839(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj_LexScanCase(_dollar1) + YYObj_List_LexScanCase_({(); @list.singleton(_dollar1) }) } // file:///./parser.mbty -// 1620| range_expr "<+" template_rhs { -// 1621| TemplateWriting(expr = $1, template = $3, loc = mk_loc($sloc)) -// 1622| } -fn yy_action_764(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 256| { @list.empty() } +fn yy_action_840(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + YYObj_List_LexScanCase_({(); @list.empty() }) +} + +// file:///./parser.mbty +// 1343| "lexscan" infix_expr "{" { $2 } +fn yy_action_841(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[1].0 is YYObj_Expr(_dollar2) + YYObj_Expr({(); _dollar2 }) +} + +// file:///./parser.mbty +// 1544| for_expr { $1 } +fn yy_action_842(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj_Expr(_dollar1) - guard _args[2].0 is YYObj_Expr(_dollar3) - let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) - let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - YYObj_Expr({(); - TemplateWriting(expr = _dollar1, template = _dollar3, loc = mk_loc((_symbol_start_pos, _end_pos))) - }) + YYObj_Expr({(); _dollar1 }) } // file:///./parser.mbty -// 1623| range_expr { $1 } -fn yy_action_765(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 1545| foreach_expr { $1 } +fn yy_action_843(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj_Expr(_dollar1) YYObj_Expr({(); _dollar1 }) } // file:///./parser.mbty -// 1674| prefix_expr "..<" prefix_expr { -// 1675| Infix( -// 1676| op = Var::{ name: Ident(name = "..<"), loc: mk_loc($loc($2)) }, -// 1677| lhs = $1, -// 1678| rhs = $3, -// 1679| loc = mk_loc($sloc) -// 1680| ) -// 1681| } -fn yy_action_766(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _start_pos_of_item1 = _args[1].1 - let _end_pos_of_item1 = _args[1].2 +// 1546| while_expr { $1 } +fn yy_action_844(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj_Expr(_dollar1) - guard _args[2].0 is YYObj_Expr(_dollar3) - let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) - let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - YYObj_Expr({(); - Infix( - op = Var::{ name: Ident(name = "..<"), loc: mk_loc((_start_pos_of_item1, _end_pos_of_item1)) }, - lhs = _dollar1, - rhs = _dollar3, - loc = mk_loc((_symbol_start_pos, _end_pos)) - ) - }) + YYObj_Expr({(); _dollar1 }) } // file:///./parser.mbty -// 1682| prefix_expr "..=" prefix_expr { -// 1683| Infix( -// 1684| op = Var::{ name: Ident(name = "..="), loc: mk_loc($loc($2)) }, -// 1685| lhs = $1, -// 1686| rhs = $3, -// 1687| loc = mk_loc($sloc) -// 1688| ) -// 1689| } -fn yy_action_767(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _start_pos_of_item1 = _args[1].1 - let _end_pos_of_item1 = _args[1].2 +// 1547| try_expr { $1 } +fn yy_action_845(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj_Expr(_dollar1) - guard _args[2].0 is YYObj_Expr(_dollar3) - let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) - let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - YYObj_Expr({(); - Infix( - op = Var::{ name: Ident(name = "..="), loc: mk_loc((_start_pos_of_item1, _end_pos_of_item1)) }, - lhs = _dollar1, - rhs = _dollar3, - loc = mk_loc((_symbol_start_pos, _end_pos)) - ) - }) + YYObj_Expr({(); _dollar1 }) } // file:///./parser.mbty -// 1690| prefix_expr "..<=" prefix_expr { -// 1691| Infix( -// 1692| op = Var::{ name: Ident(name = "..<="), loc: mk_loc($loc($2)) }, -// 1693| lhs = $1, -// 1694| rhs = $3, -// 1695| loc = mk_loc($sloc) -// 1696| ) -// 1697| } -fn yy_action_768(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _start_pos_of_item1 = _args[1].1 - let _end_pos_of_item1 = _args[1].2 +// 1548| if_expr { $1 } +fn yy_action_846(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj_Expr(_dollar1) - guard _args[2].0 is YYObj_Expr(_dollar3) - let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) - let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - YYObj_Expr({(); - Infix( - op = Var::{ name: Ident(name = "..<="), loc: mk_loc((_start_pos_of_item1, _end_pos_of_item1)) }, - lhs = _dollar1, - rhs = _dollar3, - loc = mk_loc((_symbol_start_pos, _end_pos)) - ) - }) + YYObj_Expr({(); _dollar1 }) } // file:///./parser.mbty -// 1698| prefix_expr ">=.." prefix_expr { -// 1699| Infix( -// 1700| op = Var::{ name: Ident(name = ">=.."), loc: mk_loc($loc($2)) }, -// 1701| lhs = $1, -// 1702| rhs = $3, -// 1703| loc = mk_loc($sloc) -// 1704| ) -// 1705| } -fn yy_action_769(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _start_pos_of_item1 = _args[1].1 - let _end_pos_of_item1 = _args[1].2 +// 1549| match_expr { $1 } +fn yy_action_847(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj_Expr(_dollar1) - guard _args[2].0 is YYObj_Expr(_dollar3) - let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) - let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - YYObj_Expr({(); - Infix( - op = Var::{ name: Ident(name = ">=.."), loc: mk_loc((_start_pos_of_item1, _end_pos_of_item1)) }, - lhs = _dollar1, - rhs = _dollar3, - loc = mk_loc((_symbol_start_pos, _end_pos)) - ) - }) + YYObj_Expr({(); _dollar1 }) } // file:///./parser.mbty -// 1706| prefix_expr ">.." prefix_expr { -// 1707| Infix( -// 1708| op = Var::{ name: Ident(name = ">.."), loc: mk_loc($loc($2)) }, -// 1709| lhs = $1, -// 1710| rhs = $3, -// 1711| loc = mk_loc($sloc) -// 1712| ) -// 1713| } -fn yy_action_770(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _start_pos_of_item1 = _args[1].1 - let _end_pos_of_item1 = _args[1].2 +// 1550| lexmatch_expr { $1 } +fn yy_action_848(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj_Expr(_dollar1) - guard _args[2].0 is YYObj_Expr(_dollar3) - let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) - let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - YYObj_Expr({(); - Infix( - op = Var::{ name: Ident(name = ">.."), loc: mk_loc((_start_pos_of_item1, _end_pos_of_item1)) }, - lhs = _dollar1, - rhs = _dollar3, - loc = mk_loc((_symbol_start_pos, _end_pos)) - ) - }) + YYObj_Expr({(); _dollar1 }) } // file:///./parser.mbty -// 1714| prefix_expr { $1 } -fn yy_action_771(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 1551| lexscan_expr { $1 } +fn yy_action_849(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj_Expr(_dollar1) YYObj_Expr({(); _dollar1 }) } // file:///./parser.mbty -// 1018| LIDENT %prec prec_apply_non_ident_fn { Ident(name = $1) } -fn yy_action_772(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[0].0 is YYObj_String(_dollar1) - YYObj_LongIdent({(); Ident(name = _dollar1) }) +// 1552| simple_try_expr { $1 } +fn yy_action_850(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj_Expr(_dollar1) + YYObj_Expr({(); _dollar1 }) } // file:///./parser.mbty -// 1019| PACKAGE_NAME DOT_LIDENT { Dot(pkg = $1, id = $2) } -fn yy_action_773(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[0].0 is YYObj_String(_dollar1) - guard _args[1].0 is YYObj_String(_dollar2) - YYObj_LongIdent({(); Dot(pkg = _dollar1, id = _dollar2) }) +// 1553| quantifier_expr { $1 } +fn yy_action_851(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj_Expr(_dollar1) + YYObj_Expr({(); _dollar1 }) } // file:///./parser.mbty -// 1746| PACKAGE_NAME DOT_UIDENT { -// 1747| Constructor::{ -// 1748| name: ConstrName::{ name: $2, loc: mk_loc($loc($2)) }, -// 1749| extra_info: Package($1), -// 1750| loc: mk_loc($sloc) -// 1751| } -// 1752| } -fn yy_action_774(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[1].0 is YYObj_String(_dollar2) - let _start_pos_of_item1 = _args[1].1 - let _end_pos_of_item1 = _args[1].2 - guard _args[0].0 is YYObj_String(_dollar1) +// 1554| arrow_fn_expr { Function(func = $1, loc = mk_loc($sloc)) } +fn yy_action_852(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj_Func(_dollar1) let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - YYObj_Constructor({(); - Constructor::{ - name: ConstrName::{ name: _dollar2, loc: mk_loc((_start_pos_of_item1, _end_pos_of_item1)) }, - extra_info: Package(_dollar1), - loc: mk_loc((_symbol_start_pos, _end_pos)) - } - }) + YYObj_Expr({(); Function(func = _dollar1, loc = mk_loc((_symbol_start_pos, _end_pos))) }) } // file:///./parser.mbty -// 1739| UIDENT { -// 1740| Constructor::{ -// 1741| name: ConstrName::{ name: $1, loc: mk_loc($loc($1)) }, -// 1742| extra_info: NoExtraInfo, -// 1743| loc: mk_loc($sloc) -// 1744| } -// 1745| } -fn yy_action_775(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[0].0 is YYObj_String(_dollar1) +// 1601| "_" "=>" "{" list_semis_rev(statement) "}" { +// 1602| let body = Statement::compact_rev($4, loc = mk_loc($loc($3)).merge(mk_loc($loc($5)))) +// 1603| make_arrow_fn(@list.singleton((Unnamed(mk_loc($loc($1))), None)), body, params_loc = mk_loc($loc($1)), loc = mk_loc($sloc)) +// 1604| } +fn yy_action_853(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[3].0 is YYObj_List_Statement_(_dollar4) + let _start_pos_of_item2 = _args[2].1 + let _end_pos_of_item2 = _args[2].2 + let _start_pos_of_item4 = _args[4].1 + let _end_pos_of_item4 = _args[4].2 let _start_pos_of_item0 = _args[0].1 let _end_pos_of_item0 = _args[0].2 let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - YYObj_Constructor({(); - Constructor::{ - name: ConstrName::{ name: _dollar1, loc: mk_loc((_start_pos_of_item0, _end_pos_of_item0)) }, - extra_info: NoExtraInfo, - loc: mk_loc((_symbol_start_pos, _end_pos)) - } - }) + YYObj_Func({(); + let body = Statement::compact_rev(_dollar4, loc = mk_loc((_start_pos_of_item2, _end_pos_of_item2)).merge(mk_loc((_start_pos_of_item4, _end_pos_of_item4)))) + make_arrow_fn(@list.singleton((Unnamed(mk_loc((_start_pos_of_item0, _end_pos_of_item0))), None)), body, params_loc = mk_loc((_start_pos_of_item0, _end_pos_of_item0)), loc = mk_loc((_symbol_start_pos, _end_pos))) + }) } // file:///./parser.mbty -// 1718| id(plus) prefix_expr { make_uplus(loc = mk_loc($sloc), $1, $2) } -fn yy_action_776(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_777(_last_pos, _args[0:1]) +// 252| non_empty_list_semis_rev(X) { $1 } +fn yy_action_854(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj_List_Statement_(_dollar1) + YYObj_List_Statement_({(); _dollar1 }) +} + +// file:///./parser.mbty +// 1641| arrow_fn_with_explicit_braces { Function(func = $1, loc = mk_loc($sloc)) } +fn yy_action_855(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj_Func(_dollar1) let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - guard _sub_action_0_result is YYObj_String(_dollar1) - guard _args[1].0 is YYObj_Expr(_dollar2) - YYObj_Expr({(); make_uplus(loc = mk_loc((_symbol_start_pos, _end_pos)), _dollar1, _dollar2) }) + YYObj_Expr({(); Function(func = _dollar1, loc = mk_loc((_symbol_start_pos, _end_pos))) }) } // file:///./parser.mbty -// 255| X { $1 } -fn yy_action_777(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_778(_last_pos, _args[0:1]) - guard _sub_action_0_result is YYObj_String(_dollar1) - YYObj_String({(); _dollar1 }) +// 1642| infix_expr { $1 } +fn yy_action_856(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj_Expr(_dollar1) + YYObj_Expr({(); _dollar1 }) } // file:///./parser.mbty -// 1725| PLUS { "+" } -fn yy_action_778(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - YYObj_String({(); "+" }) +// 1646| pipe_expr "<|" backward_pipeline_rhs { +// 1647| RevPipe(lhs = $1, rhs = $3, loc = mk_loc($sloc)) +// 1648| } +fn yy_action_857(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj_Expr(_dollar1) + guard _args[2].0 is YYObj_Expr(_dollar3) + let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) + let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } + YYObj_Expr({(); + RevPipe(lhs = _dollar1, rhs = _dollar3, loc = mk_loc((_symbol_start_pos, _end_pos))) + }) } // file:///./parser.mbty -// 1719| id(minus) prefix_expr { make_uminus(loc = mk_loc($sloc), $1, $2) } -fn yy_action_779(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_780(_last_pos, _args[0:1]) +// 1652| pipe_expr "|>" binder "=>" block_expr { +// 1653| let params_loc = mk_loc($loc($3)) +// 1654| let fn_loc = mk_loc($loc($3)).merge(mk_loc($loc($5))) +// 1655| let func = make_arrow_fn(@list.singleton((Named($3), None)), $5, params_loc~, loc = fn_loc) +// 1656| let rhs = Expr::Function(func~, loc = fn_loc) +// 1657| Pipe(lhs = $1, rhs~, loc = mk_loc($sloc)) +// 1658| } +fn yy_action_858(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_15(_args[1].2, _args[2:3]) + let _start_pos_of_item2 = _args[2].1 + let _end_pos_of_item2 = _args[2].2 + let _start_pos_of_item4 = _args[4].1 + let _end_pos_of_item4 = _args[4].2 + guard _sub_action_0_result is YYObj_Binder(_dollar3) + guard _args[4].0 is YYObj_Expr(_dollar5) + guard _args[0].0 is YYObj_Expr(_dollar1) let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - guard _sub_action_0_result is YYObj_String(_dollar1) - guard _args[1].0 is YYObj_Expr(_dollar2) - YYObj_Expr({(); make_uminus(loc = mk_loc((_symbol_start_pos, _end_pos)), _dollar1, _dollar2) }) + YYObj_Expr({(); + let params_loc = mk_loc((_start_pos_of_item2, _end_pos_of_item2)) + let fn_loc = mk_loc((_start_pos_of_item2, _end_pos_of_item2)).merge(mk_loc((_start_pos_of_item4, _end_pos_of_item4))) + let func = make_arrow_fn(@list.singleton((Named(_dollar3), None)), _dollar5, params_loc~, loc = fn_loc) + let rhs = Expr::Function(func~, loc = fn_loc) + Pipe(lhs = _dollar1, rhs~, loc = mk_loc((_symbol_start_pos, _end_pos))) + }) } // file:///./parser.mbty -// 255| X { $1 } -fn yy_action_780(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_781(_last_pos, _args[0:1]) - guard _sub_action_0_result is YYObj_String(_dollar1) - YYObj_String({(); _dollar1 }) +// 1652| pipe_expr "|>" binder "=>" block_expr { +// 1653| let params_loc = mk_loc($loc($3)) +// 1654| let fn_loc = mk_loc($loc($3)).merge(mk_loc($loc($5))) +// 1655| let func = make_arrow_fn(@list.singleton((Named($3), None)), $5, params_loc~, loc = fn_loc) +// 1656| let rhs = Expr::Function(func~, loc = fn_loc) +// 1657| Pipe(lhs = $1, rhs~, loc = mk_loc($sloc)) +// 1658| } +fn yy_action_859(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_20(_args[1].2, _args[2:3]) + let _start_pos_of_item2 = _args[2].1 + let _end_pos_of_item2 = _args[2].2 + let _start_pos_of_item4 = _args[4].1 + let _end_pos_of_item4 = _args[4].2 + guard _sub_action_0_result is YYObj_Binder(_dollar3) + guard _args[4].0 is YYObj_Expr(_dollar5) + guard _args[0].0 is YYObj_Expr(_dollar1) + let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) + let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } + YYObj_Expr({(); + let params_loc = mk_loc((_start_pos_of_item2, _end_pos_of_item2)) + let fn_loc = mk_loc((_start_pos_of_item2, _end_pos_of_item2)).merge(mk_loc((_start_pos_of_item4, _end_pos_of_item4))) + let func = make_arrow_fn(@list.singleton((Named(_dollar3), None)), _dollar5, params_loc~, loc = fn_loc) + let rhs = Expr::Function(func~, loc = fn_loc) + Pipe(lhs = _dollar1, rhs~, loc = mk_loc((_symbol_start_pos, _end_pos))) + }) } // file:///./parser.mbty -// 1729| MINUS { "-" } -fn yy_action_781(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - YYObj_String({(); "-" }) +// 1649| pipe_expr "|>" infix_expr { +// 1650| Pipe(lhs = $1, rhs = $3, loc = mk_loc($sloc)) +// 1651| } +fn yy_action_860(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj_Expr(_dollar1) + guard _args[2].0 is YYObj_Expr(_dollar3) + let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) + let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } + YYObj_Expr({(); + Pipe(lhs = _dollar1, rhs = _dollar3, loc = mk_loc((_symbol_start_pos, _end_pos))) + }) } // file:///./parser.mbty -// 1770| expr ioption(",") ")" { @list.singleton($1) } -fn yy_action_782(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_434(_args[0].2, _args[1:1]) +// 1585| pipe_expr { $1 } +fn yy_action_861(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[0].0 is YYObj_Expr(_dollar1) - YYObj_List_Expr_({(); @list.singleton(_dollar1) }) + YYObj_Expr({(); _dollar1 }) } -// file:///./stdlib.mbty -// 9| { None } -fn yy_action_434(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - YYObj_Option_Unit_({(); None }) +// file:///./parser.mbty +// 1635| "_" ioption(",") ")" { @list.singleton(Unnamed(mk_loc($loc($1)))) } +fn yy_action_862(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_549(_args[0].2, _args[1:1]) + let _start_pos_of_item0 = _args[0].1 + let _end_pos_of_item0 = _args[0].2 + YYObj_List_ArrowFnParam_({(); @list.singleton(Unnamed(mk_loc((_start_pos_of_item0, _end_pos_of_item0)))) }) } // file:///./parser.mbty -// 1770| expr ioption(",") ")" { @list.singleton($1) } -fn yy_action_783(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_436(_args[0].2, _args[1:2]) - guard _args[0].0 is YYObj_Expr(_dollar1) - YYObj_List_Expr_({(); @list.singleton(_dollar1) }) +// 1635| "_" ioption(",") ")" { @list.singleton(Unnamed(mk_loc($loc($1)))) } +fn yy_action_863(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_551(_args[0].2, _args[1:2]) + let _start_pos_of_item0 = _args[0].1 + let _end_pos_of_item0 = _args[0].2 + YYObj_List_ArrowFnParam_({(); @list.singleton(Unnamed(mk_loc((_start_pos_of_item0, _end_pos_of_item0)))) }) } -// file:///./stdlib.mbty -// 10| X { Some($1) } -fn yy_action_436(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _dollar1 = () - YYObj_Option_Unit_({(); Some(_dollar1) }) +// file:///./parser.mbty +// 1637| "_" "," arrow_fn_prefix_no_constraint { $3.add(Unnamed(mk_loc($loc($1)))) } +fn yy_action_864(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[2].0 is YYObj_List_ArrowFnParam_(_dollar3) + let _start_pos_of_item0 = _args[0].1 + let _end_pos_of_item0 = _args[0].2 + YYObj_List_ArrowFnParam_({(); _dollar3.add(Unnamed(mk_loc((_start_pos_of_item0, _end_pos_of_item0)))) }) } // file:///./parser.mbty -// 1771| expr "," non_empty_tuple_elems { $3.add($1) } -fn yy_action_784(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 1862| "_" "," non_empty_tuple_elems_with_prefix { $3.add(Expr::Hole(loc = mk_loc($loc($1)), kind = Incomplete)) } +fn yy_action_865(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { guard _args[2].0 is YYObj_List_Expr_(_dollar3) - guard _args[0].0 is YYObj_Expr(_dollar1) - YYObj_List_Expr_({(); _dollar3.add(_dollar1) }) + let _start_pos_of_item0 = _args[0].1 + let _end_pos_of_item0 = _args[0].2 + YYObj_List_Expr_({(); _dollar3.add(Expr::Hole(loc = mk_loc((_start_pos_of_item0, _end_pos_of_item0)), kind = Incomplete)) }) } // file:///./parser.mbty -// 1801| "(" expr ":" type_ ")" { Constraint(expr = $2, ty = $4, loc = mk_loc($sloc)) } -fn yy_action_785(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[1].0 is YYObj_Expr(_dollar2) +// 1886| "(" "_" ":" type_ ")" { Constraint(expr = Hole(loc = mk_loc($loc($2)), kind = Incomplete), ty = $4, loc = mk_loc($sloc)) } +fn yy_action_866(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _start_pos_of_item1 = _args[1].1 + let _end_pos_of_item1 = _args[1].2 guard _args[3].0 is YYObj_Type(_dollar4) let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - YYObj_Expr({(); Constraint(expr = _dollar2, ty = _dollar4, loc = mk_loc((_symbol_start_pos, _end_pos))) }) + YYObj_Expr({(); Constraint(expr = Hole(loc = mk_loc((_start_pos_of_item1, _end_pos_of_item1)), kind = Incomplete), ty = _dollar4, loc = mk_loc((_symbol_start_pos, _end_pos))) }) } // file:///./parser.mbty -// 1777| non_empty_tuple_elems { $1 } -fn yy_action_786(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[0].0 is YYObj_List_Expr_(_dollar1) - YYObj_List_Expr_({(); _dollar1 }) +// 1624| "_" ioption(",") ")" { @list.singleton((Unnamed(mk_loc($loc($1))), None)) } +fn yy_action_867(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_549(_args[0].2, _args[1:1]) + let _start_pos_of_item0 = _args[0].1 + let _end_pos_of_item0 = _args[0].2 + YYObj_List__ArrowFnParam__Type___({(); @list.singleton((Unnamed(mk_loc((_start_pos_of_item0, _end_pos_of_item0))), None)) }) } // file:///./parser.mbty -// 1781| "(" arrow_fn_prefix_no_constraint { -// 1782| let es = $2.map(@syntax.arrow_fn_param_to_expr) -// 1783| match es { -// 1784| @list.More(expr, tail=Empty) => { -// 1785| match expr { -// 1786| Constraint(..) => expr -// 1787| _ => Group(expr~, group = Paren, loc = mk_loc($sloc)) -// 1788| } -// 1789| } -// 1790| _ => @syntax.make_tuple_expr(loc = mk_loc($sloc), es) -// 1791| } -// 1792| } -fn yy_action_787(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[1].0 is YYObj_List_ArrowFnParam_(_dollar2) - let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) - let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - YYObj_Expr({(); - let es = _dollar2.map(@syntax.arrow_fn_param_to_expr) - match es { - @list.More(expr, tail=Empty) => { - match expr { - Constraint(..) => expr - _ => Group(expr~, group = Paren, loc = mk_loc((_symbol_start_pos, _end_pos))) - } - } - _ => @syntax.make_tuple_expr(loc = mk_loc((_symbol_start_pos, _end_pos)), es) - } - }) +// 1623| binder ioption(",") ")" { @list.singleton((Named($1), None)) } +fn yy_action_868(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_549(_args[0].2, _args[1:1]) + let _sub_action_1_result = yy_action_20(_last_pos, _args[0:1]) + guard _sub_action_1_result is YYObj_Binder(_dollar1) + YYObj_List__ArrowFnParam__Type___({(); @list.singleton((Named(_dollar1), None)) }) } // file:///./parser.mbty -// 1793| "(" non_empty_tuple_elems_with_prefix { -// 1794| match $2 { -// 1795| More(expr, tail=Empty) => Group(expr~, group = Paren, loc = mk_loc($sloc)) -// 1796| exprs => @syntax.make_tuple_expr(loc = mk_loc($sloc), exprs) -// 1797| } -// 1798| } -fn yy_action_788(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[1].0 is YYObj_List_Expr_(_dollar2) - let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) - let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - YYObj_Expr({(); - match _dollar2 { - More(expr, tail=Empty) => Group(expr~, group = Paren, loc = mk_loc((_symbol_start_pos, _end_pos))) - exprs => @syntax.make_tuple_expr(loc = mk_loc((_symbol_start_pos, _end_pos)), exprs) - } - }) +// 1623| binder ioption(",") ")" { @list.singleton((Named($1), None)) } +fn yy_action_869(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_551(_args[0].2, _args[1:2]) + let _sub_action_1_result = yy_action_20(_last_pos, _args[0:1]) + guard _sub_action_1_result is YYObj_Binder(_dollar1) + YYObj_List__ArrowFnParam__Type___({(); @list.singleton((Named(_dollar1), None)) }) } // file:///./parser.mbty -// 1802| "(" ")" { Unit(loc = mk_loc($sloc), faked = false) } -fn yy_action_789(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) - let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - YYObj_Expr({(); Unit(loc = mk_loc((_symbol_start_pos, _end_pos)), faked = false) }) +// 1627| binder "," arrow_fn_prefix { $3.add((Named($1), None)) } +fn yy_action_870(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_20(_last_pos, _args[0:1]) + guard _args[2].0 is YYObj_List__ArrowFnParam__Type___(_dollar3) + guard _sub_action_0_result is YYObj_Binder(_dollar1) + YYObj_List__ArrowFnParam__Type___({(); _dollar3.add((Named(_dollar1), None)) }) } // file:///./parser.mbty -// 1854| "_" %prec prec_lower_than_arrow_fn { Hole(loc = mk_loc($sloc), kind = Incomplete) } -fn yy_action_790(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) - let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - YYObj_Expr({(); Hole(loc = mk_loc((_symbol_start_pos, _end_pos)), kind = Incomplete) }) +// 1625| binder ":" type_ ioption(",") ")" { @list.singleton((Named($1), Some($3))) } +fn yy_action_871(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_549(_args[2].2, _args[3:3]) + let _sub_action_1_result = yy_action_20(_last_pos, _args[0:1]) + guard _sub_action_1_result is YYObj_Binder(_dollar1) + guard _args[2].0 is YYObj_Type(_dollar3) + YYObj_List__ArrowFnParam__Type___({(); @list.singleton((Named(_dollar1), Some(_dollar3))) }) } // file:///./parser.mbty -// 2038| expr { Argument::{ value: $1, kind: Positional } } -fn yy_action_791(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[0].0 is YYObj_Expr(_dollar1) - YYObj_Argument({(); Argument::{ value: _dollar1, kind: Positional } }) +// 1623| binder ioption(",") ")" { @list.singleton((Named($1), None)) } +fn yy_action_872(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_549(_args[0].2, _args[1:1]) + let _sub_action_1_result = yy_action_15(_last_pos, _args[0:1]) + guard _sub_action_1_result is YYObj_Binder(_dollar1) + YYObj_List__ArrowFnParam__Type___({(); @list.singleton((Named(_dollar1), None)) }) } // file:///./parser.mbty -// 190| non_empty_list_commas_rev(X) "," X { $1.add($3) } -fn yy_action_792(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[0].0 is YYObj_List_Argument_(_dollar1) - guard _args[2].0 is YYObj_Argument(_dollar3) - YYObj_List_Argument_({(); _dollar1.add(_dollar3) }) +// 1623| binder ioption(",") ")" { @list.singleton((Named($1), None)) } +fn yy_action_873(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_551(_args[0].2, _args[1:2]) + let _sub_action_1_result = yy_action_15(_last_pos, _args[0:1]) + guard _sub_action_1_result is YYObj_Binder(_dollar1) + YYObj_List__ArrowFnParam__Type___({(); @list.singleton((Named(_dollar1), None)) }) } // file:///./parser.mbty -// 198| non_empty_list_commas_rev(X) option(",") { $1.rev() } -fn yy_action_793(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[0].0 is YYObj_List_Argument_(_dollar1) - YYObj_List_Argument_({(); _dollar1.rev() }) +// 1627| binder "," arrow_fn_prefix { $3.add((Named($1), None)) } +fn yy_action_874(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_15(_last_pos, _args[0:1]) + guard _args[2].0 is YYObj_List__ArrowFnParam__Type___(_dollar3) + guard _sub_action_0_result is YYObj_Binder(_dollar1) + YYObj_List__ArrowFnParam__Type___({(); _dollar3.add((Named(_dollar1), None)) }) } // file:///./parser.mbty -// 189| X { @list.singleton($1) } -fn yy_action_794(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[0].0 is YYObj_Argument(_dollar1) - YYObj_List_Argument_({(); @list.singleton(_dollar1) }) +// 1625| binder ":" type_ ioption(",") ")" { @list.singleton((Named($1), Some($3))) } +fn yy_action_875(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_549(_args[2].2, _args[3:3]) + let _sub_action_1_result = yy_action_15(_last_pos, _args[0:1]) + guard _sub_action_1_result is YYObj_Binder(_dollar1) + guard _args[2].0 is YYObj_Type(_dollar3) + YYObj_List__ArrowFnParam__Type___({(); @list.singleton((Named(_dollar1), Some(_dollar3))) }) } // file:///./parser.mbty -// 206| { @list.empty() } -fn yy_action_795(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - YYObj_List_Argument_({(); @list.empty() }) +// 1625| binder ":" type_ ioption(",") ")" { @list.singleton((Named($1), Some($3))) } +fn yy_action_876(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_551(_args[2].2, _args[3:4]) + let _sub_action_1_result = yy_action_15(_last_pos, _args[0:1]) + guard _sub_action_1_result is YYObj_Binder(_dollar1) + guard _args[2].0 is YYObj_Type(_dollar3) + YYObj_List__ArrowFnParam__Type___({(); @list.singleton((Named(_dollar1), Some(_dollar3))) }) } // file:///./parser.mbty -// 1892| simple_expr accessor %prec prec_field { -// 1893| Field(record = $1, accessor = $2, loc = mk_loc($sloc)) -// 1894| } -fn yy_action_796(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_419(_args[0].2, _args[1:2]) - guard _args[0].0 is YYObj_Expr(_dollar1) - guard _sub_action_0_result is YYObj_Accessor(_dollar2) - let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) - let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - YYObj_Expr({(); - Field(record = _dollar1, accessor = _dollar2, loc = mk_loc((_symbol_start_pos, _end_pos))) - }) +// 1629| binder ":" type_ "," arrow_fn_prefix { $5.add((Named($1), Some($3))) } +fn yy_action_877(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_15(_last_pos, _args[0:1]) + guard _args[4].0 is YYObj_List__ArrowFnParam__Type___(_dollar5) + guard _sub_action_0_result is YYObj_Binder(_dollar1) + guard _args[2].0 is YYObj_Type(_dollar3) + YYObj_List__ArrowFnParam__Type___({(); _dollar5.add((Named(_dollar1), Some(_dollar3))) }) } // file:///./parser.mbty -// 1933| DOT_INT { Index(tuple_index = $1, loc = mk_loc($sloc)) } -fn yy_action_419(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[0].0 is YYObj_Int(_dollar1) - let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) - let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - YYObj_Accessor({(); Index(tuple_index = _dollar1, loc = mk_loc((_symbol_start_pos, _end_pos))) }) +// 1625| binder ":" type_ ioption(",") ")" { @list.singleton((Named($1), Some($3))) } +fn yy_action_878(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_551(_args[2].2, _args[3:4]) + let _sub_action_1_result = yy_action_20(_last_pos, _args[0:1]) + guard _sub_action_1_result is YYObj_Binder(_dollar1) + guard _args[2].0 is YYObj_Type(_dollar3) + YYObj_List__ArrowFnParam__Type___({(); @list.singleton((Named(_dollar1), Some(_dollar3))) }) } // file:///./parser.mbty -// 1721| simple_expr { $1 } -fn yy_action_797(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[0].0 is YYObj_Expr(_dollar1) - YYObj_Expr({(); _dollar1 }) +// 1629| binder ":" type_ "," arrow_fn_prefix { $5.add((Named($1), Some($3))) } +fn yy_action_879(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_20(_last_pos, _args[0:1]) + guard _args[4].0 is YYObj_List__ArrowFnParam__Type___(_dollar5) + guard _sub_action_0_result is YYObj_Binder(_dollar1) + guard _args[2].0 is YYObj_Type(_dollar3) + YYObj_List__ArrowFnParam__Type___({(); _dollar5.add((Named(_dollar1), Some(_dollar3))) }) } // file:///./parser.mbty -// 269| POST_LABEL opt_annot { -// 270| let binder = Binder::{ name: $1, loc: mk_loc($loc($1)).trim_last_char() } -// 271| Labelled(binder~, ty = $2) -// 272| } -fn yy_action_798(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_18(_args[0].2, _args[1:1]) - guard _args[0].0 is YYObj_String(_dollar1) +// 1624| "_" ioption(",") ")" { @list.singleton((Unnamed(mk_loc($loc($1))), None)) } +fn yy_action_880(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_551(_args[0].2, _args[1:2]) let _start_pos_of_item0 = _args[0].1 let _end_pos_of_item0 = _args[0].2 - guard _sub_action_0_result is YYObj_Type_(_dollar2) - YYObj_Parameter({(); - let binder = Binder::{ name: _dollar1, loc: mk_loc((_start_pos_of_item0, _end_pos_of_item0)).trim_last_char() } - Labelled(binder~, ty = _dollar2) - }) + YYObj_List__ArrowFnParam__Type___({(); @list.singleton((Unnamed(mk_loc((_start_pos_of_item0, _end_pos_of_item0))), None)) }) } // file:///./parser.mbty -// 263| ioption(annot) { $1 } -fn yy_action_18(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_799(_last_pos, _args[0:0]) - guard _sub_action_0_result is YYObj_Option_Type_(_dollar1) - YYObj_Type_({(); _dollar1 }) -} - -// file:///./stdlib.mbty -// 9| { None } -fn yy_action_799(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - YYObj_Option_Type_({(); None }) -} - -// file:///./parser.mbty -// 190| non_empty_list_commas_rev(X) "," X { $1.add($3) } -fn yy_action_800(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[0].0 is YYObj_List_Parameter_(_dollar1) - guard _args[2].0 is YYObj_Parameter(_dollar3) - YYObj_List_Parameter_({(); _dollar1.add(_dollar3) }) +// 1628| "_" "," arrow_fn_prefix { $3.add((Unnamed(mk_loc($loc($1))), None)) } +fn yy_action_881(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[2].0 is YYObj_List__ArrowFnParam__Type___(_dollar3) + let _start_pos_of_item0 = _args[0].1 + let _end_pos_of_item0 = _args[0].2 + YYObj_List__ArrowFnParam__Type___({(); _dollar3.add((Unnamed(mk_loc((_start_pos_of_item0, _end_pos_of_item0))), None)) }) } // file:///./parser.mbty -// 198| non_empty_list_commas_rev(X) option(",") { $1.rev() } -fn yy_action_801(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[0].0 is YYObj_List_Parameter_(_dollar1) - YYObj_List_Parameter_({(); _dollar1.rev() }) +// 1626| "_" ":" type_ ioption(",") ")" { @list.singleton((Unnamed(mk_loc($loc($1))), Some($3))) } +fn yy_action_882(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_549(_args[2].2, _args[3:3]) + let _start_pos_of_item0 = _args[0].1 + let _end_pos_of_item0 = _args[0].2 + guard _args[2].0 is YYObj_Type(_dollar3) + YYObj_List__ArrowFnParam__Type___({(); @list.singleton((Unnamed(mk_loc((_start_pos_of_item0, _end_pos_of_item0))), Some(_dollar3))) }) } // file:///./parser.mbty -// 189| X { @list.singleton($1) } -fn yy_action_802(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[0].0 is YYObj_Parameter(_dollar1) - YYObj_List_Parameter_({(); @list.singleton(_dollar1) }) +// 1626| "_" ":" type_ ioption(",") ")" { @list.singleton((Unnamed(mk_loc($loc($1))), Some($3))) } +fn yy_action_883(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_551(_args[2].2, _args[3:4]) + let _start_pos_of_item0 = _args[0].1 + let _end_pos_of_item0 = _args[0].2 + guard _args[2].0 is YYObj_Type(_dollar3) + YYObj_List__ArrowFnParam__Type___({(); @list.singleton((Unnamed(mk_loc((_start_pos_of_item0, _end_pos_of_item0))), Some(_dollar3))) }) } // file:///./parser.mbty -// 206| { @list.empty() } -fn yy_action_803(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - YYObj_List_Parameter_({(); @list.empty() }) +// 1630| "_" ":" type_ "," arrow_fn_prefix { $5.add((Unnamed(mk_loc($loc($1))), Some($3))) } +fn yy_action_884(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[4].0 is YYObj_List__ArrowFnParam__Type___(_dollar5) + let _start_pos_of_item0 = _args[0].1 + let _end_pos_of_item0 = _args[0].2 + guard _args[2].0 is YYObj_Type(_dollar3) + YYObj_List__ArrowFnParam__Type___({(); _dollar5.add((Unnamed(mk_loc((_start_pos_of_item0, _end_pos_of_item0))), Some(_dollar3))) }) } // file:///./parser.mbty -// 1806| is_async "fn" parameters func_return_type block_expr { -// 1807| let (return_type, error_type) = $4 -// 1808| Func::{ -// 1809| parameters : $3, -// 1810| params_loc : mk_loc($loc($3)), -// 1811| body : $5, -// 1812| return_type, -// 1813| error_type, -// 1814| kind : Lambda, -// 1815| is_async : $1, -// 1816| loc : mk_loc($sloc) -// 1817| } -// 1818| } -fn yy_action_804(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_5(_last_pos, _args[0:1]) - guard _args[3].0 is YYObj__Type___ErrorType_(_dollar4) - guard _args[2].0 is YYObj_List_Parameter_(_dollar3) - let _start_pos_of_item2 = _args[2].1 - let _end_pos_of_item2 = _args[2].2 - guard _args[4].0 is YYObj_Expr(_dollar5) - guard _sub_action_0_result is YYObj_Location_(_dollar1) +// 1943| simple_expr "(" list_commas(argument) ")" { +// 1944| Apply(func = $1, args = $3, loc = mk_loc($sloc)) +// 1945| } +fn yy_action_885(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj_Expr(_dollar1) + guard _args[2].0 is YYObj_List_Argument_(_dollar3) let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - YYObj_Func({(); - let (return_type, error_type) = _dollar4 - Func::{ - parameters : _dollar3, - params_loc : mk_loc((_start_pos_of_item2, _end_pos_of_item2)), - body : _dollar5, - return_type, - error_type, - kind : Lambda, - is_async : _dollar1, - loc : mk_loc((_symbol_start_pos, _end_pos)) - } + YYObj_Expr({(); + Apply(func = _dollar1, args = _dollar3, loc = mk_loc((_symbol_start_pos, _end_pos))) }) } // file:///./parser.mbty -// 2336| labeled_expr { $1 } -fn yy_action_805(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_376(_last_pos, _args[0:3]) - guard _sub_action_0_result is YYObj_FieldDef(_dollar1) - YYObj_FieldDef({(); _dollar1 }) +// 213| non_empty_list_commas(X) { $1 } +fn yy_action_886(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj_List_Argument_(_dollar1) + YYObj_List_Argument_({(); _dollar1 }) } // file:///./parser.mbty -// 2341| label ":" expr { @syntax.make_field_def(loc = mk_loc($sloc), $1, $3, false) } -fn yy_action_376(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_426(_last_pos, _args[0:1]) +// 1819| var { Var($1) } +fn yy_action_887(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_888(_last_pos, _args[0:1]) + guard _sub_action_0_result is YYObj_Var(_dollar1) + YYObj_LeftValue({(); Var(_dollar1) }) +} + +// file:///./parser.mbty +// 2068| qual_ident { Var::{ name: $1, loc: mk_loc($sloc) } } +fn yy_action_888(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj_LongIdent(_dollar1) let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - guard _sub_action_0_result is YYObj_Label(_dollar1) - guard _args[2].0 is YYObj_Expr(_dollar3) - YYObj_FieldDef({(); @syntax.make_field_def(loc = mk_loc((_symbol_start_pos, _end_pos)), _dollar1, _dollar3, false) }) + YYObj_Var({(); Var::{ name: _dollar1, loc: mk_loc((_symbol_start_pos, _end_pos)) } }) } // file:///./parser.mbty -// 2337| label_pun { $1 } -fn yy_action_806(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_374(_last_pos, _args[0:1]) - guard _sub_action_0_result is YYObj_FieldDef(_dollar1) - YYObj_FieldDef({(); _dollar1 }) +// 1659| infix_expr { $1 } +fn yy_action_889(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj_Expr(_dollar1) + YYObj_Expr({(); _dollar1 }) } // file:///./parser.mbty -// 2345| label { @syntax.make_field_def(loc = mk_loc($sloc), $1, @syntax.label_to_expr(loc = mk_loc($sloc), $1), true) } -fn yy_action_374(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_426(_last_pos, _args[0:1]) +// 1666| "∃" binder ":" type_ "," quantifier_body_expr { +// 1667| Quantifier(kind = Exists, binder = $2, binder_ty = $4, body = $6, loc = mk_loc($sloc)) +// 1668| } +fn yy_action_890(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_15(_args[0].2, _args[1:2]) + guard _sub_action_0_result is YYObj_Binder(_dollar2) + guard _args[3].0 is YYObj_Type(_dollar4) + guard _args[5].0 is YYObj_Expr(_dollar6) let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - guard _sub_action_0_result is YYObj_Label(_dollar1) - YYObj_FieldDef({(); @syntax.make_field_def(loc = mk_loc((_symbol_start_pos, _end_pos)), _dollar1, @syntax.label_to_expr(loc = mk_loc((_symbol_start_pos, _end_pos)), _dollar1), true) }) + YYObj_Expr({(); + Quantifier(kind = Exists, binder = _dollar2, binder_ty = _dollar4, body = _dollar6, loc = mk_loc((_symbol_start_pos, _end_pos))) + }) } // file:///./parser.mbty -// 1922| LIDENT { Label::{ name: $1, loc: mk_loc($sloc) } } -fn yy_action_426(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[0].0 is YYObj_String(_dollar1) +// 1663| "∀" binder ":" type_ "," quantifier_body_expr { +// 1664| Quantifier(kind = Forall, binder = $2, binder_ty = $4, body = $6, loc = mk_loc($sloc)) +// 1665| } +fn yy_action_891(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_15(_args[0].2, _args[1:2]) + guard _sub_action_0_result is YYObj_Binder(_dollar2) + guard _args[3].0 is YYObj_Type(_dollar4) + guard _args[5].0 is YYObj_Expr(_dollar6) let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - YYObj_Label({(); Label::{ name: _dollar1, loc: mk_loc((_symbol_start_pos, _end_pos)) } }) + YYObj_Expr({(); + Quantifier(kind = Forall, binder = _dollar2, binder_ty = _dollar4, body = _dollar6, loc = mk_loc((_symbol_start_pos, _end_pos))) + }) } // file:///./parser.mbty -// 190| non_empty_list_commas_rev(X) "," X { $1.add($3) } -fn yy_action_807(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[0].0 is YYObj_List_FieldDef_(_dollar1) - guard _args[2].0 is YYObj_FieldDef(_dollar3) - YYObj_List_FieldDef_({(); _dollar1.add(_dollar3) }) +// 2046| lident_string { Binder::{ name: $1, loc: mk_loc($sloc) } } +fn yy_action_15(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_226(_last_pos, _args[0:1]) + guard _sub_action_0_result is YYObj_String(_dollar1) + let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) + let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } + YYObj_Binder({(); Binder::{ name: _dollar1, loc: mk_loc((_symbol_start_pos, _end_pos)) } }) } // file:///./parser.mbty -// 216| non_empty_list_commas_rev(X) option(",") { -// 217| ($1.rev(), $2 is Some(_)) -// 218| } -fn yy_action_808(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[0].0 is YYObj_List_FieldDef_(_dollar1) - guard _args[1].0 is YYObj_Option_Unit_(_dollar2) - YYObj__List_FieldDef___Bool_({(); - (_dollar1.rev(), _dollar2 is Some(_)) +// 1663| "∀" binder ":" type_ "," quantifier_body_expr { +// 1664| Quantifier(kind = Forall, binder = $2, binder_ty = $4, body = $6, loc = mk_loc($sloc)) +// 1665| } +fn yy_action_892(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_20(_args[0].2, _args[1:2]) + guard _sub_action_0_result is YYObj_Binder(_dollar2) + guard _args[3].0 is YYObj_Type(_dollar4) + guard _args[5].0 is YYObj_Expr(_dollar6) + let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) + let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } + YYObj_Expr({(); + Quantifier(kind = Forall, binder = _dollar2, binder_ty = _dollar4, body = _dollar6, loc = mk_loc((_symbol_start_pos, _end_pos))) }) } // file:///./parser.mbty -// 189| X { @list.singleton($1) } -fn yy_action_809(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[0].0 is YYObj_FieldDef(_dollar1) - YYObj_List_FieldDef_({(); @list.singleton(_dollar1) }) +// 1666| "∃" binder ":" type_ "," quantifier_body_expr { +// 1667| Quantifier(kind = Exists, binder = $2, binder_ty = $4, body = $6, loc = mk_loc($sloc)) +// 1668| } +fn yy_action_893(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_20(_args[0].2, _args[1:2]) + guard _sub_action_0_result is YYObj_Binder(_dollar2) + guard _args[3].0 is YYObj_Type(_dollar4) + guard _args[5].0 is YYObj_Expr(_dollar6) + let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) + let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } + YYObj_Expr({(); + Quantifier(kind = Exists, binder = _dollar2, binder_ty = _dollar4, body = _dollar6, loc = mk_loc((_symbol_start_pos, _end_pos))) + }) } // file:///./parser.mbty -// 222| { (@list.empty(), false) } -fn yy_action_810(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - YYObj__List_FieldDef___Bool_({(); (@list.empty(), false) }) +// 2046| lident_string { Binder::{ name: $1, loc: mk_loc($sloc) } } +fn yy_action_20(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_228(_last_pos, _args[0:1]) + guard _sub_action_0_result is YYObj_String(_dollar1) + let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) + let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } + YYObj_Binder({(); Binder::{ name: _dollar1, loc: mk_loc((_symbol_start_pos, _end_pos)) } }) } // file:///./parser.mbty -// 1895| type_name "::" LIDENT { -// 1896| let method_name = Label::{ name: $3, loc: mk_loc($loc($3)) } -// 1897| Method(type_name = $1, method_name~, loc = mk_loc($sloc)) -// 1898| } -fn yy_action_811(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[2].0 is YYObj_String(_dollar3) - let _start_pos_of_item2 = _args[2].1 - let _end_pos_of_item2 = _args[2].2 - guard _args[0].0 is YYObj_TypeName(_dollar1) +// 1672| quantifier_expr { $1 } +fn yy_action_894(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj_Expr(_dollar1) + YYObj_Expr({(); _dollar1 }) +} + +// file:///./parser.mbty +// 1677| infix_expr "→" infix_expr { +// 1678| Implies(lhs = $1, rhs = $3, loc = mk_loc($sloc)) +// 1679| } +fn yy_action_895(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj_Expr(_dollar1) + guard _args[2].0 is YYObj_Expr(_dollar3) let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - YYObj_Expr({(); - let method_name = Label::{ name: _dollar3, loc: mk_loc((_start_pos_of_item2, _end_pos_of_item2)) } - Method(type_name = _dollar1, method_name~, loc = mk_loc((_symbol_start_pos, _end_pos))) + YYObj_Expr({(); + Implies(lhs = _dollar1, rhs = _dollar3, loc = mk_loc((_symbol_start_pos, _end_pos))) }) } // file:///./parser.mbty -// 228| non_empty_list_semi_rev_aux(X) SEMI X { $1.add($3) } -fn yy_action_812(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[0].0 is YYObj_List_Statement_(_dollar1) - guard _args[2].0 is YYObj_Statement(_dollar3) - YYObj_List_Statement_({(); _dollar1.add(_dollar3) }) -} - -// file:///./stdlib.mbty -// 5| X { Some($1) } -fn yy_action_813(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[0].0 is YYObj_Bool(_dollar1) - YYObj_Option_Bool_({(); Some(_dollar1) }) +// 1680| infix_expr infixop infix_expr { +// 1681| Infix(op = $2, lhs = $1, rhs = $3, loc = mk_loc($sloc)) +// 1682| } +fn yy_action_896(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_897(_args[0].2, _args[1:2]) + guard _sub_action_0_result is YYObj_Var(_dollar2) + guard _args[0].0 is YYObj_Expr(_dollar1) + guard _args[2].0 is YYObj_Expr(_dollar3) + let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) + let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } + YYObj_Expr({(); + Infix(op = _dollar2, lhs = _dollar1, rhs = _dollar3, loc = mk_loc((_symbol_start_pos, _end_pos))) + }) } // file:///./parser.mbty -// 232| non_empty_list_semi_rev_aux(X) option(SEMI) { $1 } -fn yy_action_814(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[0].0 is YYObj_List_Statement_(_dollar1) - YYObj_List_Statement_({(); _dollar1 }) +// 2122| INFIX4 { Var::{ name: Ident(name = $1), loc: mk_loc($sloc) } } +fn yy_action_897(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj_String(_dollar1) + let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) + let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } + YYObj_Var({(); Var::{ name: Ident(name = _dollar1), loc: mk_loc((_symbol_start_pos, _end_pos)) } }) } -// file:///./stdlib.mbty -// 4| { None } -fn yy_action_815(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - YYObj_Option_Bool_({(); None }) +// file:///./parser.mbty +// 1680| infix_expr infixop infix_expr { +// 1681| Infix(op = $2, lhs = $1, rhs = $3, loc = mk_loc($sloc)) +// 1682| } +fn yy_action_898(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_899(_args[0].2, _args[1:2]) + guard _sub_action_0_result is YYObj_Var(_dollar2) + guard _args[0].0 is YYObj_Expr(_dollar1) + guard _args[2].0 is YYObj_Expr(_dollar3) + let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) + let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } + YYObj_Expr({(); + Infix(op = _dollar2, lhs = _dollar1, rhs = _dollar3, loc = mk_loc((_symbol_start_pos, _end_pos))) + }) } // file:///./parser.mbty -// 227| X { @list.singleton($1) } -fn yy_action_816(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[0].0 is YYObj_Statement(_dollar1) - YYObj_List_Statement_({(); @list.singleton(_dollar1) }) +// 2123| INFIX3 { Var::{ name: Ident(name = $1), loc: mk_loc($sloc) } } +fn yy_action_899(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj_String(_dollar1) + let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) + let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } + YYObj_Var({(); Var::{ name: Ident(name = _dollar1), loc: mk_loc((_symbol_start_pos, _end_pos)) } }) } // file:///./parser.mbty -// 245| { @list.empty() } -fn yy_action_817(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - YYObj_List_Statement_({(); @list.empty() }) +// 1680| infix_expr infixop infix_expr { +// 1681| Infix(op = $2, lhs = $1, rhs = $3, loc = mk_loc($sloc)) +// 1682| } +fn yy_action_900(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_901(_args[0].2, _args[1:2]) + guard _sub_action_0_result is YYObj_Var(_dollar2) + guard _args[0].0 is YYObj_Expr(_dollar1) + guard _args[2].0 is YYObj_Expr(_dollar3) + let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) + let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } + YYObj_Expr({(); + Infix(op = _dollar2, lhs = _dollar1, rhs = _dollar3, loc = mk_loc((_symbol_start_pos, _end_pos))) + }) } // file:///./parser.mbty -// 1806| is_async "fn" parameters func_return_type block_expr { -// 1807| let (return_type, error_type) = $4 -// 1808| Func::{ -// 1809| parameters : $3, -// 1810| params_loc : mk_loc($loc($3)), -// 1811| body : $5, -// 1812| return_type, -// 1813| error_type, -// 1814| kind : Lambda, -// 1815| is_async : $1, -// 1816| loc : mk_loc($sloc) -// 1817| } -// 1818| } -fn yy_action_818(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_8(_last_pos, _args[0:0]) - guard _args[2].0 is YYObj__Type___ErrorType_(_dollar4) - guard _args[1].0 is YYObj_List_Parameter_(_dollar3) - let _start_pos_of_item2 = _args[1].1 - let _end_pos_of_item2 = _args[1].2 - guard _args[3].0 is YYObj_Expr(_dollar5) - guard _sub_action_0_result is YYObj_Location_(_dollar1) +// 2124| INFIX2 { Var::{ name: Ident(name = $1), loc: mk_loc($sloc) } } +fn yy_action_901(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj_String(_dollar1) let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - YYObj_Func({(); - let (return_type, error_type) = _dollar4 - Func::{ - parameters : _dollar3, - params_loc : mk_loc((_start_pos_of_item2, _end_pos_of_item2)), - body : _dollar5, - return_type, - error_type, - kind : Lambda, - is_async : _dollar1, - loc : mk_loc((_symbol_start_pos, _end_pos)) - } - }) + YYObj_Var({(); Var::{ name: Ident(name = _dollar1), loc: mk_loc((_symbol_start_pos, _end_pos)) } }) } // file:///./parser.mbty -// 2181| "->" return_type { -// 2182| match $2 { -// 2183| (ty, err) => (Some(ty), err) -// 2184| } -// 2185| } -fn yy_action_819(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[1].0 is YYObj__Type__ErrorType_(_dollar2) - YYObj__Type___ErrorType_({(); - match _dollar2 { - (ty, err) => (Some(ty), err) - } +// 1680| infix_expr infixop infix_expr { +// 1681| Infix(op = $2, lhs = $1, rhs = $3, loc = mk_loc($sloc)) +// 1682| } +fn yy_action_902(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_903(_args[0].2, _args[1:2]) + guard _sub_action_0_result is YYObj_Var(_dollar2) + guard _args[0].0 is YYObj_Expr(_dollar1) + guard _args[2].0 is YYObj_Expr(_dollar3) + let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) + let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } + YYObj_Expr({(); + Infix(op = _dollar2, lhs = _dollar1, rhs = _dollar3, loc = mk_loc((_symbol_start_pos, _end_pos))) }) } // file:///./parser.mbty -// 2218| is_async "(" type_ "," ioption(non_empty_list_commas(type_)) ")" "->" return_type { -// 2219| let (ty_res, ty_err) = $8 -// 2220| let ts = match $5 { -// 2221| None => @list.empty() -// 2222| Some(ts) => ts -// 2223| } -// 2224| Arrow(args = ts.add($3), res = ty_res, err = ty_err, is_async = $1, loc = mk_loc($sloc)) -// 2225| } -fn yy_action_820(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_5(_last_pos, _args[0:1]) - let _sub_action_1_result = yy_action_821(_args[3].2, _args[4:4]) - guard _args[6].0 is YYObj__Type__ErrorType_(_dollar8) - guard _sub_action_1_result is YYObj_Option_List_Type__(_dollar5) - guard _args[2].0 is YYObj_Type(_dollar3) - guard _sub_action_0_result is YYObj_Location_(_dollar1) +// 2125| INFIX1 { Var::{ name: Ident(name = $1), loc: mk_loc($sloc) } } +fn yy_action_903(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj_String(_dollar1) let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - YYObj_Type({(); - let (ty_res, ty_err) = _dollar8 - let ts = match _dollar5 { - None => @list.empty() - Some(ts) => ts - } - Arrow(args = ts.add(_dollar3), res = ty_res, err = ty_err, is_async = _dollar1, loc = mk_loc((_symbol_start_pos, _end_pos))) - }) + YYObj_Var({(); Var::{ name: Ident(name = _dollar1), loc: mk_loc((_symbol_start_pos, _end_pos)) } }) } // file:///./parser.mbty -// 2218| is_async "(" type_ "," ioption(non_empty_list_commas(type_)) ")" "->" return_type { -// 2219| let (ty_res, ty_err) = $8 -// 2220| let ts = match $5 { -// 2221| None => @list.empty() -// 2222| Some(ts) => ts -// 2223| } -// 2224| Arrow(args = ts.add($3), res = ty_res, err = ty_err, is_async = $1, loc = mk_loc($sloc)) -// 2225| } -fn yy_action_822(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_5(_last_pos, _args[0:1]) - let _sub_action_1_result = yy_action_823(_args[3].2, _args[4:5]) - guard _args[7].0 is YYObj__Type__ErrorType_(_dollar8) - guard _sub_action_1_result is YYObj_Option_List_Type__(_dollar5) - guard _args[2].0 is YYObj_Type(_dollar3) - guard _sub_action_0_result is YYObj_Location_(_dollar1) +// 1680| infix_expr infixop infix_expr { +// 1681| Infix(op = $2, lhs = $1, rhs = $3, loc = mk_loc($sloc)) +// 1682| } +fn yy_action_904(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_905(_args[0].2, _args[1:2]) + guard _sub_action_0_result is YYObj_Var(_dollar2) + guard _args[0].0 is YYObj_Expr(_dollar1) + guard _args[2].0 is YYObj_Expr(_dollar3) let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - YYObj_Type({(); - let (ty_res, ty_err) = _dollar8 - let ts = match _dollar5 { - None => @list.empty() - Some(ts) => ts - } - Arrow(args = ts.add(_dollar3), res = ty_res, err = ty_err, is_async = _dollar1, loc = mk_loc((_symbol_start_pos, _end_pos))) + YYObj_Expr({(); + Infix(op = _dollar2, lhs = _dollar1, rhs = _dollar3, loc = mk_loc((_symbol_start_pos, _end_pos))) }) } // file:///./parser.mbty -// 2230| is_async "(" type_ ")" "->" return_type { -// 2231| let (ty_res, ty_err) = $6 -// 2232| Arrow(args = @list.singleton($3), res = ty_res, err = ty_err, is_async = $1, loc = mk_loc($sloc)) -// 2233| } -fn yy_action_824(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_5(_last_pos, _args[0:1]) - guard _args[5].0 is YYObj__Type__ErrorType_(_dollar6) - guard _args[2].0 is YYObj_Type(_dollar3) - guard _sub_action_0_result is YYObj_Location_(_dollar1) +// 2126| PLUS { Var::{ name: Ident(name = "+"), loc: mk_loc($sloc) } } +fn yy_action_905(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - YYObj_Type({(); - let (ty_res, ty_err) = _dollar6 - Arrow(args = @list.singleton(_dollar3), res = ty_res, err = ty_err, is_async = _dollar1, loc = mk_loc((_symbol_start_pos, _end_pos))) - }) + YYObj_Var({(); Var::{ name: Ident(name = "+"), loc: mk_loc((_symbol_start_pos, _end_pos)) } }) } // file:///./parser.mbty -// 2205| qual_ident_ty_inline optional_type_arguments %prec prec_lower_than_as { -// 2206| Name( -// 2207| constr_id = ConstrId::{ id: $1, loc: mk_loc($loc($1)) }, -// 2208| tys = $2, -// 2209| loc = mk_loc($sloc) -// 2210| ) -// 2211| } -fn yy_action_825(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_826(_last_pos, _args[0:2]) - let _sub_action_1_result = yy_action_827(_args[1].2, _args[2:5]) - guard _sub_action_0_result is YYObj_LongIdent(_dollar1) - let _start_pos_of_item0 = _args[0].1 - let _end_pos_of_item0 = _args[0].2 - guard _sub_action_1_result is YYObj_List_Type_(_dollar2) +// 1680| infix_expr infixop infix_expr { +// 1681| Infix(op = $2, lhs = $1, rhs = $3, loc = mk_loc($sloc)) +// 1682| } +fn yy_action_906(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_907(_args[0].2, _args[1:2]) + guard _sub_action_0_result is YYObj_Var(_dollar2) + guard _args[0].0 is YYObj_Expr(_dollar1) + guard _args[2].0 is YYObj_Expr(_dollar3) let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - YYObj_Type({(); - Name( - constr_id = ConstrId::{ id: _dollar1, loc: mk_loc((_start_pos_of_item0, _end_pos_of_item0)) }, - tys = _dollar2, - loc = mk_loc((_symbol_start_pos, _end_pos)) - ) + YYObj_Expr({(); + Infix(op = _dollar2, lhs = _dollar1, rhs = _dollar3, loc = mk_loc((_symbol_start_pos, _end_pos))) }) } // file:///./parser.mbty -// 2205| qual_ident_ty_inline optional_type_arguments %prec prec_lower_than_as { -// 2206| Name( -// 2207| constr_id = ConstrId::{ id: $1, loc: mk_loc($loc($1)) }, -// 2208| tys = $2, -// 2209| loc = mk_loc($sloc) -// 2210| ) -// 2211| } -fn yy_action_828(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_826(_last_pos, _args[0:2]) - let _sub_action_1_result = yy_action_829(_args[1].2, _args[2:2]) - guard _sub_action_0_result is YYObj_LongIdent(_dollar1) - let _start_pos_of_item0 = _args[0].1 - let _end_pos_of_item0 = _args[0].2 - guard _sub_action_1_result is YYObj_List_Type_(_dollar2) +// 2127| MINUS { Var::{ name: Ident(name = "-"), loc: mk_loc($sloc) } } +fn yy_action_907(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - YYObj_Type({(); - Name( - constr_id = ConstrId::{ id: _dollar1, loc: mk_loc((_start_pos_of_item0, _end_pos_of_item0)) }, - tys = _dollar2, - loc = mk_loc((_symbol_start_pos, _end_pos)) - ) - }) + YYObj_Var({(); Var::{ name: Ident(name = "-"), loc: mk_loc((_symbol_start_pos, _end_pos)) } }) } // file:///./parser.mbty -// 2205| qual_ident_ty_inline optional_type_arguments %prec prec_lower_than_as { -// 2206| Name( -// 2207| constr_id = ConstrId::{ id: $1, loc: mk_loc($loc($1)) }, -// 2208| tys = $2, -// 2209| loc = mk_loc($sloc) -// 2210| ) -// 2211| } -fn yy_action_830(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_831(_last_pos, _args[0:2]) - let _sub_action_1_result = yy_action_827(_args[1].2, _args[2:5]) - guard _sub_action_0_result is YYObj_LongIdent(_dollar1) - let _start_pos_of_item0 = _args[0].1 - let _end_pos_of_item0 = _args[0].2 - guard _sub_action_1_result is YYObj_List_Type_(_dollar2) +// 1680| infix_expr infixop infix_expr { +// 1681| Infix(op = $2, lhs = $1, rhs = $3, loc = mk_loc($sloc)) +// 1682| } +fn yy_action_908(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_909(_args[0].2, _args[1:2]) + guard _sub_action_0_result is YYObj_Var(_dollar2) + guard _args[0].0 is YYObj_Expr(_dollar1) + guard _args[2].0 is YYObj_Expr(_dollar3) let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - YYObj_Type({(); - Name( - constr_id = ConstrId::{ id: _dollar1, loc: mk_loc((_start_pos_of_item0, _end_pos_of_item0)) }, - tys = _dollar2, - loc = mk_loc((_symbol_start_pos, _end_pos)) - ) + YYObj_Expr({(); + Infix(op = _dollar2, lhs = _dollar1, rhs = _dollar3, loc = mk_loc((_symbol_start_pos, _end_pos))) }) } // file:///./parser.mbty -// 198| non_empty_list_commas_rev(X) option(",") { $1.rev() } -fn yy_action_832(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[0].0 is YYObj_List_Type_(_dollar1) - YYObj_List_Type_({(); _dollar1.rev() }) +// 2128| AMPER { Var::{ name: Ident(name = "&"), loc: mk_loc($sloc) } } +fn yy_action_909(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) + let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } + YYObj_Var({(); Var::{ name: Ident(name = "&"), loc: mk_loc((_symbol_start_pos, _end_pos)) } }) } // file:///./parser.mbty -// 2218| is_async "(" type_ "," ioption(non_empty_list_commas(type_)) ")" "->" return_type { -// 2219| let (ty_res, ty_err) = $8 -// 2220| let ts = match $5 { -// 2221| None => @list.empty() -// 2222| Some(ts) => ts -// 2223| } -// 2224| Arrow(args = ts.add($3), res = ty_res, err = ty_err, is_async = $1, loc = mk_loc($sloc)) -// 2225| } -fn yy_action_833(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_8(_last_pos, _args[0:0]) - let _sub_action_1_result = yy_action_823(_args[2].2, _args[3:4]) - guard _args[6].0 is YYObj__Type__ErrorType_(_dollar8) - guard _sub_action_1_result is YYObj_Option_List_Type__(_dollar5) - guard _args[1].0 is YYObj_Type(_dollar3) - guard _sub_action_0_result is YYObj_Location_(_dollar1) +// 1680| infix_expr infixop infix_expr { +// 1681| Infix(op = $2, lhs = $1, rhs = $3, loc = mk_loc($sloc)) +// 1682| } +fn yy_action_910(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_911(_args[0].2, _args[1:2]) + guard _sub_action_0_result is YYObj_Var(_dollar2) + guard _args[0].0 is YYObj_Expr(_dollar1) + guard _args[2].0 is YYObj_Expr(_dollar3) let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - YYObj_Type({(); - let (ty_res, ty_err) = _dollar8 - let ts = match _dollar5 { - None => @list.empty() - Some(ts) => ts - } - Arrow(args = ts.add(_dollar3), res = ty_res, err = ty_err, is_async = _dollar1, loc = mk_loc((_symbol_start_pos, _end_pos))) + YYObj_Expr({(); + Infix(op = _dollar2, lhs = _dollar1, rhs = _dollar3, loc = mk_loc((_symbol_start_pos, _end_pos))) }) } -// file:///./stdlib.mbty -// 10| X { Some($1) } -fn yy_action_823(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[0].0 is YYObj_List_Type_(_dollar1) - YYObj_Option_List_Type__({(); Some(_dollar1) }) -} - // file:///./parser.mbty -// 2203| "(" type_ "," non_empty_list_commas(type_) ")" { @syntax.make_tuple_type(loc = mk_loc($sloc), $4.add($2)) } -fn yy_action_834(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 2129| CARET { Var::{ name: Ident(name = "^"), loc: mk_loc($sloc) } } +fn yy_action_911(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - guard _args[3].0 is YYObj_List_Type_(_dollar4) - guard _args[1].0 is YYObj_Type(_dollar2) - YYObj_Type({(); @syntax.make_tuple_type(loc = mk_loc((_symbol_start_pos, _end_pos)), _dollar4.add(_dollar2)) }) + YYObj_Var({(); Var::{ name: Ident(name = "^"), loc: mk_loc((_symbol_start_pos, _end_pos)) } }) } // file:///./parser.mbty -// 2218| is_async "(" type_ "," ioption(non_empty_list_commas(type_)) ")" "->" return_type { -// 2219| let (ty_res, ty_err) = $8 -// 2220| let ts = match $5 { -// 2221| None => @list.empty() -// 2222| Some(ts) => ts -// 2223| } -// 2224| Arrow(args = ts.add($3), res = ty_res, err = ty_err, is_async = $1, loc = mk_loc($sloc)) -// 2225| } -fn yy_action_835(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_8(_last_pos, _args[0:0]) - let _sub_action_1_result = yy_action_821(_args[2].2, _args[3:3]) - guard _args[5].0 is YYObj__Type__ErrorType_(_dollar8) - guard _sub_action_1_result is YYObj_Option_List_Type__(_dollar5) - guard _args[1].0 is YYObj_Type(_dollar3) - guard _sub_action_0_result is YYObj_Location_(_dollar1) +// 1680| infix_expr infixop infix_expr { +// 1681| Infix(op = $2, lhs = $1, rhs = $3, loc = mk_loc($sloc)) +// 1682| } +fn yy_action_912(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_913(_args[0].2, _args[1:2]) + guard _sub_action_0_result is YYObj_Var(_dollar2) + guard _args[0].0 is YYObj_Expr(_dollar1) + guard _args[2].0 is YYObj_Expr(_dollar3) let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - YYObj_Type({(); - let (ty_res, ty_err) = _dollar8 - let ts = match _dollar5 { - None => @list.empty() - Some(ts) => ts - } - Arrow(args = ts.add(_dollar3), res = ty_res, err = ty_err, is_async = _dollar1, loc = mk_loc((_symbol_start_pos, _end_pos))) + YYObj_Expr({(); + Infix(op = _dollar2, lhs = _dollar1, rhs = _dollar3, loc = mk_loc((_symbol_start_pos, _end_pos))) }) } -// file:///./stdlib.mbty -// 9| { None } -fn yy_action_821(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - YYObj_Option_List_Type__({(); None }) -} - // file:///./parser.mbty -// 2230| is_async "(" type_ ")" "->" return_type { -// 2231| let (ty_res, ty_err) = $6 -// 2232| Arrow(args = @list.singleton($3), res = ty_res, err = ty_err, is_async = $1, loc = mk_loc($sloc)) -// 2233| } -fn yy_action_836(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_8(_last_pos, _args[0:0]) - guard _args[4].0 is YYObj__Type__ErrorType_(_dollar6) - guard _args[1].0 is YYObj_Type(_dollar3) - guard _sub_action_0_result is YYObj_Location_(_dollar1) +// 2130| BAR { Var::{ name: Ident(name = "|"), loc: mk_loc($sloc) } } +fn yy_action_913(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - YYObj_Type({(); - let (ty_res, ty_err) = _dollar6 - Arrow(args = @list.singleton(_dollar3), res = ty_res, err = ty_err, is_async = _dollar1, loc = mk_loc((_symbol_start_pos, _end_pos))) - }) -} - -// file:///./parser.mbty -// 2204| "(" type_ ")" { $2 } -fn yy_action_837(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[1].0 is YYObj_Type(_dollar2) - YYObj_Type({(); _dollar2 }) -} - -// file:///./parser.mbty -// 2176| type_ { ($1, NoErrorType) } -fn yy_action_838(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[0].0 is YYObj_Type(_dollar1) - YYObj__Type__ErrorType_({(); (_dollar1, NoErrorType) }) + YYObj_Var({(); Var::{ name: Ident(name = "|"), loc: mk_loc((_symbol_start_pos, _end_pos)) } }) } // file:///./parser.mbty -// 2163| "raise" error_type { ErrorType(ty = $2) } -fn yy_action_839(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[1].0 is YYObj_Type(_dollar2) - YYObj_ErrorType({(); ErrorType(ty = _dollar2) }) +// 1680| infix_expr infixop infix_expr { +// 1681| Infix(op = $2, lhs = $1, rhs = $3, loc = mk_loc($sloc)) +// 1682| } +fn yy_action_914(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_915(_args[0].2, _args[1:2]) + guard _sub_action_0_result is YYObj_Var(_dollar2) + guard _args[0].0 is YYObj_Expr(_dollar1) + guard _args[2].0 is YYObj_Expr(_dollar3) + let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) + let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } + YYObj_Expr({(); + Infix(op = _dollar2, lhs = _dollar1, rhs = _dollar3, loc = mk_loc((_symbol_start_pos, _end_pos))) + }) } // file:///./parser.mbty -// 2165| "raise" "?" { -// 2166| let fake_error = Type::Name( -// 2167| constr_id = ConstrId::{ id: Ident(name = "Error"), loc: mk_loc($sloc) }, -// 2168| tys = @list.empty(), -// 2169| loc = mk_loc($sloc) -// 2170| ) -// 2171| MaybeError(ty = fake_error) -// 2172| } -fn yy_action_840(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 2131| AMPERAMPER { Var::{ name: Ident(name = "&&"), loc: mk_loc($sloc) } } +fn yy_action_915(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - YYObj_ErrorType({(); - let fake_error = Type::Name( - constr_id = ConstrId::{ id: Ident(name = "Error"), loc: mk_loc((_symbol_start_pos, _end_pos)) }, - tys = @list.empty(), - loc = mk_loc((_symbol_start_pos, _end_pos)) - ) - MaybeError(ty = fake_error) - }) + YYObj_Var({(); Var::{ name: Ident(name = "&&"), loc: mk_loc((_symbol_start_pos, _end_pos)) } }) } // file:///./parser.mbty -// 2191| qual_ident_ty { -// 2192| Name( -// 2193| constr_id = ConstrId::{ id: $1, loc: mk_loc($sloc) }, -// 2194| tys = @list.empty(), -// 2195| loc = mk_loc($sloc) -// 2196| ) -// 2197| } -fn yy_action_841(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[0].0 is YYObj_LongIdent(_dollar1) +// 1680| infix_expr infixop infix_expr { +// 1681| Infix(op = $2, lhs = $1, rhs = $3, loc = mk_loc($sloc)) +// 1682| } +fn yy_action_916(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_917(_args[0].2, _args[1:2]) + guard _sub_action_0_result is YYObj_Var(_dollar2) + guard _args[0].0 is YYObj_Expr(_dollar1) + guard _args[2].0 is YYObj_Expr(_dollar3) let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - YYObj_Type({(); - Name( - constr_id = ConstrId::{ id: _dollar1, loc: mk_loc((_symbol_start_pos, _end_pos)) }, - tys = @list.empty(), - loc = mk_loc((_symbol_start_pos, _end_pos)) - ) + YYObj_Expr({(); + Infix(op = _dollar2, lhs = _dollar1, rhs = _dollar3, loc = mk_loc((_symbol_start_pos, _end_pos))) }) } // file:///./parser.mbty -// 2198| "_" { Any(loc = mk_loc($sloc)) } -fn yy_action_842(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 2132| BARBAR { Var::{ name: Ident(name = "||"), loc: mk_loc($sloc) } } +fn yy_action_917(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - YYObj_Type({(); Any(loc = mk_loc((_symbol_start_pos, _end_pos))) }) + YYObj_Var({(); Var::{ name: Ident(name = "||"), loc: mk_loc((_symbol_start_pos, _end_pos)) } }) } // file:///./parser.mbty -// 2162| "raise" { DefaultErrorType(loc = mk_loc($sloc)) } -fn yy_action_843(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) - let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - YYObj_ErrorType({(); DefaultErrorType(loc = mk_loc((_symbol_start_pos, _end_pos))) }) +// 1673| infix_expr { $1 } +fn yy_action_918(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj_Expr(_dollar1) + YYObj_Expr({(); _dollar1 }) } // file:///./parser.mbty -// 2164| "noraise" { Noraise(loc = mk_loc($sloc)) } -fn yy_action_844(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) - let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - YYObj_ErrorType({(); Noraise(loc = mk_loc((_symbol_start_pos, _end_pos))) }) +// 1683| postfix_expr { $1 } +fn yy_action_919(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj_Expr(_dollar1) + YYObj_Expr({(); _dollar1 }) } // file:///./parser.mbty -// 2177| simple_type error_annotation { ($1, $2) } -fn yy_action_845(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[0].0 is YYObj_Type(_dollar1) - guard _args[1].0 is YYObj_ErrorType(_dollar2) - YYObj__Type__ErrorType_({(); (_dollar1, _dollar2) }) +// 196| non_empty_list_commas_rev(X) "," X { $1.add($3) } +fn yy_action_920(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj_List_MapExprElem_(_dollar1) + guard _args[2].0 is YYObj_MapExprElem(_dollar3) + YYObj_List_MapExprElem_({(); _dollar1.add(_dollar3) }) } // file:///./parser.mbty -// 2202| simple_type "?" { @syntax.make_option_type(loc = mk_loc($sloc), constr_loc = mk_loc($loc($2)), $1) } -fn yy_action_846(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) - let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - let _start_pos_of_item1 = _args[1].1 - let _end_pos_of_item1 = _args[1].2 - guard _args[0].0 is YYObj_Type(_dollar1) - YYObj_Type({(); @syntax.make_option_type(loc = mk_loc((_symbol_start_pos, _end_pos)), constr_loc = mk_loc((_start_pos_of_item1, _end_pos_of_item1)), _dollar1) }) +// 204| non_empty_list_commas_rev(X) option(",") { $1.rev() } +fn yy_action_921(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj_List_MapExprElem_(_dollar1) + YYObj_List_MapExprElem_({(); _dollar1.rev() }) } // file:///./parser.mbty -// 2217| simple_type { $1 } -fn yy_action_847(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[0].0 is YYObj_Type(_dollar1) - YYObj_Type({(); _dollar1 }) +// 195| X { @list.singleton($1) } +fn yy_action_922(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj_MapExprElem(_dollar1) + YYObj_List_MapExprElem_({(); @list.singleton(_dollar1) }) } // file:///./parser.mbty -// 2226| is_async "(" ")" "->" return_type { -// 2227| let (ty_res, ty_err) = $5 -// 2228| Arrow(args = @list.empty(), res = ty_res, err = ty_err, is_async = $1, loc = mk_loc($sloc)) -// 2229| } -fn yy_action_848(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_8(_last_pos, _args[0:0]) - guard _args[3].0 is YYObj__Type__ErrorType_(_dollar5) - guard _sub_action_0_result is YYObj_Location_(_dollar1) +// 212| { @list.empty() } +fn yy_action_923(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + YYObj_List_MapExprElem_({(); @list.empty() }) +} + +// file:///./parser.mbty +// 1706| range_expr " YYObj { + guard _args[0].0 is YYObj_Expr(_dollar1) + guard _args[2].0 is YYObj_Expr(_dollar3) let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - YYObj_Type({(); - let (ty_res, ty_err) = _dollar5 - Arrow(args = @list.empty(), res = ty_res, err = ty_err, is_async = _dollar1, loc = mk_loc((_symbol_start_pos, _end_pos))) + YYObj_Expr({(); + TemplateWriting(expr = _dollar1, template = _dollar3, is_conditional = true, loc = mk_loc((_symbol_start_pos, _end_pos))) }) } // file:///./parser.mbty -// 297| { None } -fn yy_action_8(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - YYObj_Location_({(); None }) +// 1709| range_expr { $1 } +fn yy_action_925(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj_Expr(_dollar1) + YYObj_Expr({(); _dollar1 }) } // file:///./parser.mbty -// 2205| qual_ident_ty_inline optional_type_arguments %prec prec_lower_than_as { -// 2206| Name( -// 2207| constr_id = ConstrId::{ id: $1, loc: mk_loc($loc($1)) }, -// 2208| tys = $2, -// 2209| loc = mk_loc($sloc) -// 2210| ) -// 2211| } -fn yy_action_849(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_850(_last_pos, _args[0:1]) - let _sub_action_1_result = yy_action_827(_args[0].2, _args[1:4]) - guard _sub_action_0_result is YYObj_LongIdent(_dollar1) - let _start_pos_of_item0 = _args[0].1 - let _end_pos_of_item0 = _args[0].2 - guard _sub_action_1_result is YYObj_List_Type_(_dollar2) +// 1760| prefix_expr "..<" prefix_expr { +// 1761| Infix( +// 1762| op = Var::{ name: Ident(name = "..<"), loc: mk_loc($loc($2)) }, +// 1763| lhs = $1, +// 1764| rhs = $3, +// 1765| loc = mk_loc($sloc) +// 1766| ) +// 1767| } +fn yy_action_926(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _start_pos_of_item1 = _args[1].1 + let _end_pos_of_item1 = _args[1].2 + guard _args[0].0 is YYObj_Expr(_dollar1) + guard _args[2].0 is YYObj_Expr(_dollar3) let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - YYObj_Type({(); - Name( - constr_id = ConstrId::{ id: _dollar1, loc: mk_loc((_start_pos_of_item0, _end_pos_of_item0)) }, - tys = _dollar2, + YYObj_Expr({(); + Infix( + op = Var::{ name: Ident(name = "..<"), loc: mk_loc((_start_pos_of_item1, _end_pos_of_item1)) }, + lhs = _dollar1, + rhs = _dollar3, loc = mk_loc((_symbol_start_pos, _end_pos)) ) }) } // file:///./parser.mbty -// 319| ioption(delimited("[", non_empty_list_commas(type_), "]")) { -// 320| match $1 { -// 321| None => @list.empty() -// 322| Some(params) => params -// 323| } -// 324| } -fn yy_action_827(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_851(_last_pos, _args[0:3]) - guard _sub_action_0_result is YYObj_Option_List_Type__(_dollar1) - YYObj_List_Type_({(); - match _dollar1 { - None => @list.empty() - Some(params) => params - } - }) -} - -// file:///./stdlib.mbty -// 10| X { Some($1) } -fn yy_action_851(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_852(_last_pos, _args[0:3]) - guard _sub_action_0_result is YYObj_List_Type_(_dollar1) - YYObj_Option_List_Type__({(); Some(_dollar1) }) -} - -// file:///./stdlib.mbty -// 40| L X R { $2 } -fn yy_action_852(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[1].0 is YYObj_List_Type_(_dollar2) - YYObj_List_Type_({(); _dollar2 }) -} - -// file:///./parser.mbty -// 2205| qual_ident_ty_inline optional_type_arguments %prec prec_lower_than_as { -// 2206| Name( -// 2207| constr_id = ConstrId::{ id: $1, loc: mk_loc($loc($1)) }, -// 2208| tys = $2, -// 2209| loc = mk_loc($sloc) -// 2210| ) -// 2211| } -fn yy_action_853(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_850(_last_pos, _args[0:1]) - let _sub_action_1_result = yy_action_829(_args[0].2, _args[1:1]) - guard _sub_action_0_result is YYObj_LongIdent(_dollar1) - let _start_pos_of_item0 = _args[0].1 - let _end_pos_of_item0 = _args[0].2 - guard _sub_action_1_result is YYObj_List_Type_(_dollar2) +// 1768| prefix_expr "..=" prefix_expr { +// 1769| Infix( +// 1770| op = Var::{ name: Ident(name = "..="), loc: mk_loc($loc($2)) }, +// 1771| lhs = $1, +// 1772| rhs = $3, +// 1773| loc = mk_loc($sloc) +// 1774| ) +// 1775| } +fn yy_action_927(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _start_pos_of_item1 = _args[1].1 + let _end_pos_of_item1 = _args[1].2 + guard _args[0].0 is YYObj_Expr(_dollar1) + guard _args[2].0 is YYObj_Expr(_dollar3) let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - YYObj_Type({(); - Name( - constr_id = ConstrId::{ id: _dollar1, loc: mk_loc((_start_pos_of_item0, _end_pos_of_item0)) }, - tys = _dollar2, + YYObj_Expr({(); + Infix( + op = Var::{ name: Ident(name = "..="), loc: mk_loc((_start_pos_of_item1, _end_pos_of_item1)) }, + lhs = _dollar1, + rhs = _dollar3, loc = mk_loc((_symbol_start_pos, _end_pos)) ) }) } // file:///./parser.mbty -// 190| non_empty_list_commas_rev(X) "," X { $1.add($3) } -fn yy_action_854(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[0].0 is YYObj_List_Type_(_dollar1) - guard _args[2].0 is YYObj_Type(_dollar3) - YYObj_List_Type_({(); _dollar1.add(_dollar3) }) -} - -// file:///./parser.mbty -// 189| X { @list.singleton($1) } -fn yy_action_855(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[0].0 is YYObj_Type(_dollar1) - YYObj_List_Type_({(); @list.singleton(_dollar1) }) -} - -// file:///./parser.mbty -// 2205| qual_ident_ty_inline optional_type_arguments %prec prec_lower_than_as { -// 2206| Name( -// 2207| constr_id = ConstrId::{ id: $1, loc: mk_loc($loc($1)) }, -// 2208| tys = $2, -// 2209| loc = mk_loc($sloc) -// 2210| ) -// 2211| } -fn yy_action_856(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_831(_last_pos, _args[0:2]) - let _sub_action_1_result = yy_action_829(_args[1].2, _args[2:2]) - guard _sub_action_0_result is YYObj_LongIdent(_dollar1) - let _start_pos_of_item0 = _args[0].1 - let _end_pos_of_item0 = _args[0].2 - guard _sub_action_1_result is YYObj_List_Type_(_dollar2) +// 1776| prefix_expr "..<=" prefix_expr { +// 1777| Infix( +// 1778| op = Var::{ name: Ident(name = "..<="), loc: mk_loc($loc($2)) }, +// 1779| lhs = $1, +// 1780| rhs = $3, +// 1781| loc = mk_loc($sloc) +// 1782| ) +// 1783| } +fn yy_action_928(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _start_pos_of_item1 = _args[1].1 + let _end_pos_of_item1 = _args[1].2 + guard _args[0].0 is YYObj_Expr(_dollar1) + guard _args[2].0 is YYObj_Expr(_dollar3) let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - YYObj_Type({(); - Name( - constr_id = ConstrId::{ id: _dollar1, loc: mk_loc((_start_pos_of_item0, _end_pos_of_item0)) }, - tys = _dollar2, + YYObj_Expr({(); + Infix( + op = Var::{ name: Ident(name = "..<="), loc: mk_loc((_start_pos_of_item1, _end_pos_of_item1)) }, + lhs = _dollar1, + rhs = _dollar3, loc = mk_loc((_symbol_start_pos, _end_pos)) ) }) } // file:///./parser.mbty -// 319| ioption(delimited("[", non_empty_list_commas(type_), "]")) { -// 320| match $1 { -// 321| None => @list.empty() -// 322| Some(params) => params -// 323| } -// 324| } -fn yy_action_829(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_857(_last_pos, _args[0:0]) - guard _sub_action_0_result is YYObj_Option_List_Type__(_dollar1) - YYObj_List_Type_({(); - match _dollar1 { - None => @list.empty() - Some(params) => params - } +// 1784| prefix_expr ">=.." prefix_expr { +// 1785| Infix( +// 1786| op = Var::{ name: Ident(name = ">=.."), loc: mk_loc($loc($2)) }, +// 1787| lhs = $1, +// 1788| rhs = $3, +// 1789| loc = mk_loc($sloc) +// 1790| ) +// 1791| } +fn yy_action_929(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _start_pos_of_item1 = _args[1].1 + let _end_pos_of_item1 = _args[1].2 + guard _args[0].0 is YYObj_Expr(_dollar1) + guard _args[2].0 is YYObj_Expr(_dollar3) + let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) + let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } + YYObj_Expr({(); + Infix( + op = Var::{ name: Ident(name = ">=.."), loc: mk_loc((_start_pos_of_item1, _end_pos_of_item1)) }, + lhs = _dollar1, + rhs = _dollar3, + loc = mk_loc((_symbol_start_pos, _end_pos)) + ) }) } -// file:///./stdlib.mbty -// 9| { None } -fn yy_action_857(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - YYObj_Option_List_Type__({(); None }) -} - // file:///./parser.mbty -// 2212| "&" qual_ident_ty { Object(ConstrId::{ id: $2, loc: mk_loc($loc($2)) }) } -fn yy_action_858(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[1].0 is YYObj_LongIdent(_dollar2) +// 1792| prefix_expr ">.." prefix_expr { +// 1793| Infix( +// 1794| op = Var::{ name: Ident(name = ">.."), loc: mk_loc($loc($2)) }, +// 1795| lhs = $1, +// 1796| rhs = $3, +// 1797| loc = mk_loc($sloc) +// 1798| ) +// 1799| } +fn yy_action_930(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _start_pos_of_item1 = _args[1].1 let _end_pos_of_item1 = _args[1].2 - YYObj_Type({(); Object(ConstrId::{ id: _dollar2, loc: mk_loc((_start_pos_of_item1, _end_pos_of_item1)) }) }) -} - -// file:///./parser.mbty -// 2213| "_" { Any(loc = mk_loc($sloc)) } -fn yy_action_859(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj_Expr(_dollar1) + guard _args[2].0 is YYObj_Expr(_dollar3) let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - YYObj_Type({(); Any(loc = mk_loc((_symbol_start_pos, _end_pos))) }) + YYObj_Expr({(); + Infix( + op = Var::{ name: Ident(name = ">.."), loc: mk_loc((_start_pos_of_item1, _end_pos_of_item1)) }, + lhs = _dollar1, + rhs = _dollar3, + loc = mk_loc((_symbol_start_pos, _end_pos)) + ) + }) } // file:///./parser.mbty -// 2226| is_async "(" ")" "->" return_type { -// 2227| let (ty_res, ty_err) = $5 -// 2228| Arrow(args = @list.empty(), res = ty_res, err = ty_err, is_async = $1, loc = mk_loc($sloc)) -// 2229| } -fn yy_action_860(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_5(_last_pos, _args[0:1]) - guard _args[4].0 is YYObj__Type__ErrorType_(_dollar5) - guard _sub_action_0_result is YYObj_Location_(_dollar1) - let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) - let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - YYObj_Type({(); - let (ty_res, ty_err) = _dollar5 - Arrow(args = @list.empty(), res = ty_res, err = ty_err, is_async = _dollar1, loc = mk_loc((_symbol_start_pos, _end_pos))) - }) +// 1800| prefix_expr { $1 } +fn yy_action_931(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj_Expr(_dollar1) + YYObj_Expr({(); _dollar1 }) } // file:///./parser.mbty -// 296| "async" { Some(mk_loc($loc($1))) } -fn yy_action_5(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _start_pos_of_item0 = _args[0].1 - let _end_pos_of_item0 = _args[0].2 - YYObj_Location_({(); Some(mk_loc((_start_pos_of_item0, _end_pos_of_item0))) }) +// 1052| lident_string %prec prec_apply_non_ident_fn { Ident(name = $1) } +fn yy_action_932(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_226(_last_pos, _args[0:1]) + guard _sub_action_0_result is YYObj_String(_dollar1) + YYObj_LongIdent({(); Ident(name = _dollar1) }) } // file:///./parser.mbty -// 2186| error_annotation { (None, $1) } -fn yy_action_861(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[0].0 is YYObj_ErrorType(_dollar1) - YYObj__Type___ErrorType_({(); (None, _dollar1) }) +// 1052| lident_string %prec prec_apply_non_ident_fn { Ident(name = $1) } +fn yy_action_933(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_228(_last_pos, _args[0:1]) + guard _sub_action_0_result is YYObj_String(_dollar1) + YYObj_LongIdent({(); Ident(name = _dollar1) }) } // file:///./parser.mbty -// 2187| { (None, NoErrorType) } -fn yy_action_862(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - YYObj__Type___ErrorType_({(); (None, NoErrorType) }) +// 1053| PACKAGE_NAME DOT_LIDENT { Dot(pkg = $1, id = $2) } +fn yy_action_934(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj_String(_dollar1) + guard _args[1].0 is YYObj_String(_dollar2) + YYObj_LongIdent({(); Dot(pkg = _dollar1, id = _dollar2) }) } // file:///./parser.mbty -// 2058| map_syntax_key ":" expr { -// 2059| MapExprElem::{ -// 2060| key: $1, -// 2061| expr: $3, -// 2062| key_loc: mk_loc($loc($1)), -// 2063| loc: mk_loc($sloc) -// 2064| } -// 2065| } -fn yy_action_863(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[0].0 is YYObj_Constant(_dollar1) - guard _args[2].0 is YYObj_Expr(_dollar3) - let _start_pos_of_item0 = _args[0].1 - let _end_pos_of_item0 = _args[0].2 +// 1832| PACKAGE_NAME DOT_UIDENT { +// 1833| Constructor::{ +// 1834| name: ConstrName::{ name: $2, loc: mk_loc($loc($2)) }, +// 1835| extra_info: Package($1), +// 1836| loc: mk_loc($sloc) +// 1837| } +// 1838| } +fn yy_action_935(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[1].0 is YYObj_String(_dollar2) + let _start_pos_of_item1 = _args[1].1 + let _end_pos_of_item1 = _args[1].2 + guard _args[0].0 is YYObj_String(_dollar1) let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - YYObj_MapExprElem({(); - MapExprElem::{ - key: _dollar1, - expr: _dollar3, - key_loc: mk_loc((_start_pos_of_item0, _end_pos_of_item0)), + YYObj_Constructor({(); + Constructor::{ + name: ConstrName::{ name: _dollar2, loc: mk_loc((_start_pos_of_item1, _end_pos_of_item1)) }, + extra_info: Package(_dollar1), loc: mk_loc((_symbol_start_pos, _end_pos)) } }) } // file:///./parser.mbty -// 190| non_empty_list_commas_rev(X) "," X { $1.add($3) } -fn yy_action_864(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[0].0 is YYObj_List_MapExprElem_(_dollar1) - guard _args[2].0 is YYObj_MapExprElem(_dollar3) - YYObj_List_MapExprElem_({(); _dollar1.add(_dollar3) }) +// 1825| UIDENT { +// 1826| Constructor::{ +// 1827| name: ConstrName::{ name: $1, loc: mk_loc($loc($1)) }, +// 1828| extra_info: NoExtraInfo, +// 1829| loc: mk_loc($sloc) +// 1830| } +// 1831| } +fn yy_action_936(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj_String(_dollar1) + let _start_pos_of_item0 = _args[0].1 + let _end_pos_of_item0 = _args[0].2 + let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) + let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } + YYObj_Constructor({(); + Constructor::{ + name: ConstrName::{ name: _dollar1, loc: mk_loc((_start_pos_of_item0, _end_pos_of_item0)) }, + extra_info: NoExtraInfo, + loc: mk_loc((_symbol_start_pos, _end_pos)) + } + }) } // file:///./parser.mbty -// 198| non_empty_list_commas_rev(X) option(",") { $1.rev() } -fn yy_action_865(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[0].0 is YYObj_List_MapExprElem_(_dollar1) - YYObj_List_MapExprElem_({(); _dollar1.rev() }) +// 1804| id(plus) prefix_expr { make_uplus(loc = mk_loc($sloc), $1, $2) } +fn yy_action_937(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_938(_last_pos, _args[0:1]) + let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) + let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } + guard _sub_action_0_result is YYObj_String(_dollar1) + guard _args[1].0 is YYObj_Expr(_dollar2) + YYObj_Expr({(); make_uplus(loc = mk_loc((_symbol_start_pos, _end_pos)), _dollar1, _dollar2) }) } // file:///./parser.mbty -// 189| X { @list.singleton($1) } -fn yy_action_866(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[0].0 is YYObj_MapExprElem(_dollar1) - YYObj_List_MapExprElem_({(); @list.singleton(_dollar1) }) +// 261| X { $1 } +fn yy_action_938(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_939(_last_pos, _args[0:1]) + guard _sub_action_0_result is YYObj_String(_dollar1) + YYObj_String({(); _dollar1 }) } // file:///./parser.mbty -// 206| { @list.empty() } -fn yy_action_867(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - YYObj_List_MapExprElem_({(); @list.empty() }) +// 1811| PLUS { "+" } +fn yy_action_939(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + YYObj_String({(); "+" }) } // file:///./parser.mbty -// 1852| anony_fn { Function(func = $1, loc = mk_loc($sloc)) } -fn yy_action_868(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[0].0 is YYObj_Func(_dollar1) +// 1805| id(minus) prefix_expr { make_uminus(loc = mk_loc($sloc), $1, $2) } +fn yy_action_940(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_941(_last_pos, _args[0:1]) let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - YYObj_Expr({(); Function(func = _dollar1, loc = mk_loc((_symbol_start_pos, _end_pos))) }) + guard _sub_action_0_result is YYObj_String(_dollar1) + guard _args[1].0 is YYObj_Expr(_dollar2) + YYObj_Expr({(); make_uminus(loc = mk_loc((_symbol_start_pos, _end_pos)), _dollar1, _dollar2) }) } // file:///./parser.mbty -// 1853| atomic_expr { $1 } -fn yy_action_869(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[0].0 is YYObj_Expr(_dollar1) - YYObj_Expr({(); _dollar1 }) +// 261| X { $1 } +fn yy_action_941(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_942(_last_pos, _args[0:1]) + guard _sub_action_0_result is YYObj_String(_dollar1) + YYObj_String({(); _dollar1 }) } // file:///./parser.mbty -// 1855| qual_ident_simple_expr { @syntax.make_ident_expr(loc = mk_loc($sloc), Var::{ name: $1, loc: mk_loc($sloc) }) } -fn yy_action_870(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) - let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - guard _args[0].0 is YYObj_LongIdent(_dollar1) - YYObj_Expr({(); @syntax.make_ident_expr(loc = mk_loc((_symbol_start_pos, _end_pos)), Var::{ name: _dollar1, loc: mk_loc((_symbol_start_pos, _end_pos)) }) }) +// 1815| MINUS { "-" } +fn yy_action_942(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + YYObj_String({(); "-" }) } // file:///./parser.mbty -// 1856| constr { Constr(constr = $1, loc = mk_loc($sloc)) } -fn yy_action_871(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[0].0 is YYObj_Constructor(_dollar1) - let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) - let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - YYObj_Expr({(); Constr(constr = _dollar1, loc = mk_loc((_symbol_start_pos, _end_pos))) }) +// 1856| expr ioption(",") ")" { @list.singleton($1) } +fn yy_action_943(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_549(_args[0].2, _args[1:1]) + guard _args[0].0 is YYObj_Expr(_dollar1) + YYObj_List_Expr_({(); @list.singleton(_dollar1) }) } -// file:///./parser.mbty -// 2054| ".." expr { Spread(expr = $2, loc = mk_loc($sloc)) } -fn yy_action_872(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[1].0 is YYObj_Expr(_dollar2) - let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) - let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - YYObj_SpreadableElem({(); Spread(expr = _dollar2, loc = mk_loc((_symbol_start_pos, _end_pos))) }) +// file:///./stdlib.mbty +// 9| { None } +fn yy_action_549(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + YYObj_Option_Unit_({(); None }) } // file:///./parser.mbty -// 190| non_empty_list_commas_rev(X) "," X { $1.add($3) } -fn yy_action_873(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[0].0 is YYObj_List_SpreadableElem_(_dollar1) - guard _args[2].0 is YYObj_SpreadableElem(_dollar3) - YYObj_List_SpreadableElem_({(); _dollar1.add(_dollar3) }) +// 1856| expr ioption(",") ")" { @list.singleton($1) } +fn yy_action_944(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_551(_args[0].2, _args[1:2]) + guard _args[0].0 is YYObj_Expr(_dollar1) + YYObj_List_Expr_({(); @list.singleton(_dollar1) }) } // file:///./stdlib.mbty -// 5| X { Some($1) } -fn yy_action_874(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 10| X { Some($1) } +fn yy_action_551(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { let _dollar1 = () YYObj_Option_Unit_({(); Some(_dollar1) }) } // file:///./parser.mbty -// 198| non_empty_list_commas_rev(X) option(",") { $1.rev() } -fn yy_action_875(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[0].0 is YYObj_List_SpreadableElem_(_dollar1) - YYObj_List_SpreadableElem_({(); _dollar1.rev() }) -} - -// file:///./stdlib.mbty -// 4| { None } -fn yy_action_876(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - YYObj_Option_Unit_({(); None }) +// 1857| expr "," non_empty_tuple_elems { $3.add($1) } +fn yy_action_945(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[2].0 is YYObj_List_Expr_(_dollar3) + guard _args[0].0 is YYObj_Expr(_dollar1) + YYObj_List_Expr_({(); _dollar3.add(_dollar1) }) } // file:///./parser.mbty -// 189| X { @list.singleton($1) } -fn yy_action_877(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[0].0 is YYObj_SpreadableElem(_dollar1) - YYObj_List_SpreadableElem_({(); @list.singleton(_dollar1) }) +// 1887| "(" expr ":" type_ ")" { Constraint(expr = $2, ty = $4, loc = mk_loc($sloc)) } +fn yy_action_946(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[1].0 is YYObj_Expr(_dollar2) + guard _args[3].0 is YYObj_Type(_dollar4) + let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) + let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } + YYObj_Expr({(); Constraint(expr = _dollar2, ty = _dollar4, loc = mk_loc((_symbol_start_pos, _end_pos))) }) } // file:///./parser.mbty -// 206| { @list.empty() } -fn yy_action_878(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - YYObj_List_SpreadableElem_({(); @list.empty() }) +// 1863| non_empty_tuple_elems { $1 } +fn yy_action_947(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj_List_Expr_(_dollar1) + YYObj_List_Expr_({(); _dollar1 }) } // file:///./parser.mbty -// 1918| tuple_expr { $1 } -fn yy_action_879(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[0].0 is YYObj_Expr(_dollar1) - YYObj_Expr({(); _dollar1 }) +// 1867| "(" arrow_fn_prefix_no_constraint { +// 1868| let es = $2.map(@syntax.arrow_fn_param_to_expr) +// 1869| match es { +// 1870| @list.More(expr, tail=Empty) => { +// 1871| match expr { +// 1872| Constraint(..) => expr +// 1873| _ => Group(expr~, group = Paren, loc = mk_loc($sloc)) +// 1874| } +// 1875| } +// 1876| _ => @syntax.make_tuple_expr(loc = mk_loc($sloc), es) +// 1877| } +// 1878| } +fn yy_action_948(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[1].0 is YYObj_List_ArrowFnParam_(_dollar2) + let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) + let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } + YYObj_Expr({(); + let es = _dollar2.map(@syntax.arrow_fn_param_to_expr) + match es { + @list.More(expr, tail=Empty) => { + match expr { + Constraint(..) => expr + _ => Group(expr~, group = Paren, loc = mk_loc((_symbol_start_pos, _end_pos))) + } + } + _ => @syntax.make_tuple_expr(loc = mk_loc((_symbol_start_pos, _end_pos)), es) + } + }) } // file:///./parser.mbty -// 1963| qual_ident_ty { TypeName::{ name: $1, is_object: false, loc: mk_loc($sloc) } } -fn yy_action_880(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[0].0 is YYObj_LongIdent(_dollar1) +// 1879| "(" non_empty_tuple_elems_with_prefix { +// 1880| match $2 { +// 1881| More(expr, tail=Empty) => Group(expr~, group = Paren, loc = mk_loc($sloc)) +// 1882| exprs => @syntax.make_tuple_expr(loc = mk_loc($sloc), exprs) +// 1883| } +// 1884| } +fn yy_action_949(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[1].0 is YYObj_List_Expr_(_dollar2) let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - YYObj_TypeName({(); TypeName::{ name: _dollar1, is_object: false, loc: mk_loc((_symbol_start_pos, _end_pos)) } }) + YYObj_Expr({(); + match _dollar2 { + More(expr, tail=Empty) => Group(expr~, group = Paren, loc = mk_loc((_symbol_start_pos, _end_pos))) + exprs => @syntax.make_tuple_expr(loc = mk_loc((_symbol_start_pos, _end_pos)), exprs) + } + }) } // file:///./parser.mbty -// 1029| qual_ident_ty_inline { $1 } -fn yy_action_881(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_850(_last_pos, _args[0:1]) - guard _sub_action_0_result is YYObj_LongIdent(_dollar1) - YYObj_LongIdent({(); _dollar1 }) +// 1888| "(" ")" { Unit(loc = mk_loc($sloc), faked = false) } +fn yy_action_950(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) + let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } + YYObj_Expr({(); Unit(loc = mk_loc((_symbol_start_pos, _end_pos)), faked = false) }) } // file:///./parser.mbty -// 1023| UIDENT { LongIdent::Ident(name = $1) } -fn yy_action_850(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[0].0 is YYObj_String(_dollar1) - YYObj_LongIdent({(); LongIdent::Ident(name = _dollar1) }) +// 2148| expr { Argument::{ value: $1, kind: Positional } } +fn yy_action_951(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj_Expr(_dollar1) + YYObj_Argument({(); Argument::{ value: _dollar1, kind: Positional } }) } // file:///./parser.mbty -// 1029| qual_ident_ty_inline { $1 } -fn yy_action_882(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_826(_last_pos, _args[0:2]) - guard _sub_action_0_result is YYObj_LongIdent(_dollar1) - YYObj_LongIdent({(); _dollar1 }) +// 196| non_empty_list_commas_rev(X) "," X { $1.add($3) } +fn yy_action_952(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj_List_Argument_(_dollar1) + guard _args[2].0 is YYObj_Argument(_dollar3) + YYObj_List_Argument_({(); _dollar1.add(_dollar3) }) } // file:///./parser.mbty -// 1024| PACKAGE_NAME DOT_LIDENT { LongIdent::Dot(pkg = $1, id = $2) } -fn yy_action_826(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[0].0 is YYObj_String(_dollar1) - guard _args[1].0 is YYObj_String(_dollar2) - YYObj_LongIdent({(); LongIdent::Dot(pkg = _dollar1, id = _dollar2) }) +// 204| non_empty_list_commas_rev(X) option(",") { $1.rev() } +fn yy_action_953(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj_List_Argument_(_dollar1) + YYObj_List_Argument_({(); _dollar1.rev() }) } // file:///./parser.mbty -// 1029| qual_ident_ty_inline { $1 } -fn yy_action_883(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _sub_action_0_result = yy_action_831(_last_pos, _args[0:2]) - guard _sub_action_0_result is YYObj_LongIdent(_dollar1) - YYObj_LongIdent({(); _dollar1 }) +// 195| X { @list.singleton($1) } +fn yy_action_954(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj_Argument(_dollar1) + YYObj_List_Argument_({(); @list.singleton(_dollar1) }) } // file:///./parser.mbty -// 1025| PACKAGE_NAME DOT_UIDENT { LongIdent::Dot(pkg = $1, id = $2) } -fn yy_action_831(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[0].0 is YYObj_String(_dollar1) - guard _args[1].0 is YYObj_String(_dollar2) - YYObj_LongIdent({(); LongIdent::Dot(pkg = _dollar1, id = _dollar2) }) +// 212| { @list.empty() } +fn yy_action_955(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + YYObj_List_Argument_({(); @list.empty() }) } // file:///./parser.mbty -// 1964| "&" qual_ident_ty { TypeName::{ name: $2, is_object: true, loc: mk_loc($sloc) } } -fn yy_action_884(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[1].0 is YYObj_LongIdent(_dollar2) +// 1978| simple_expr accessor %prec prec_field { +// 1979| Field(record = $1, accessor = $2, loc = mk_loc($sloc)) +// 1980| } +fn yy_action_956(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_531(_args[0].2, _args[1:2]) + guard _args[0].0 is YYObj_Expr(_dollar1) + guard _sub_action_0_result is YYObj_Accessor(_dollar2) let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - YYObj_TypeName({(); TypeName::{ name: _dollar2, is_object: true, loc: mk_loc((_symbol_start_pos, _end_pos)) } }) + YYObj_Expr({(); + Field(record = _dollar1, accessor = _dollar2, loc = mk_loc((_symbol_start_pos, _end_pos))) + }) } // file:///./parser.mbty -// 1975| simple_constant { make_constant_expr(loc = mk_loc($sloc), $1) } -fn yy_action_885(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { +// 2042| DOT_INT { Index(tuple_index = $1, loc = mk_loc($sloc)) } +fn yy_action_531(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj_Int(_dollar1) let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - guard _args[0].0 is YYObj_Constant(_dollar1) - YYObj_Expr({(); make_constant_expr(loc = mk_loc((_symbol_start_pos, _end_pos)), _dollar1) }) + YYObj_Accessor({(); Index(tuple_index = _dollar1, loc = mk_loc((_symbol_start_pos, _end_pos))) }) } // file:///./parser.mbty -// 1976| non_empty_list(multiline_string) { -// 1977| MultilineString(elems = $1, loc = mk_loc($sloc)) -// 1978| } -fn yy_action_886(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[0].0 is YYObj_List_MultilineStringElem_(_dollar1) - let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) - let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - YYObj_Expr({(); - MultilineString(elems = _dollar1, loc = mk_loc((_symbol_start_pos, _end_pos))) - }) +// 1807| simple_expr { $1 } +fn yy_action_957(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj_Expr(_dollar1) + YYObj_Expr({(); _dollar1 }) } // file:///./parser.mbty -// 1979| INTERP { make_interp_expr(loc = mk_loc($sloc), $1) } -fn yy_action_887(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) - let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } - guard _args[0].0 is YYObj_InterpLiteral(_dollar1) - YYObj_Expr({(); make_interp_expr(loc = mk_loc((_symbol_start_pos, _end_pos)), _dollar1) }) +// 275| POST_LABEL opt_annot { +// 276| let binder = Binder::{ name: $1, loc: mk_loc($loc($1)).trim_last_char() } +// 277| Labelled(binder~, ty = $2) +// 278| } +fn yy_action_958(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_18(_args[0].2, _args[1:1]) + guard _args[0].0 is YYObj_String(_dollar1) + let _start_pos_of_item0 = _args[0].1 + let _end_pos_of_item0 = _args[0].2 + guard _sub_action_0_result is YYObj_Type_(_dollar2) + YYObj_Parameter({(); + let binder = Binder::{ name: _dollar1, loc: mk_loc((_start_pos_of_item0, _end_pos_of_item0)).trim_last_char() } + Labelled(binder~, ty = _dollar2) + }) } // file:///./parser.mbty -// 1983| TRUE { Bool(true) } -fn yy_action_888(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - YYObj_Constant({(); Bool(true) }) +// 269| ioption(annot) { $1 } +fn yy_action_18(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_959(_last_pos, _args[0:0]) + guard _sub_action_0_result is YYObj_Option_Type_(_dollar1) + YYObj_Type_({(); _dollar1 }) +} + +// file:///./stdlib.mbty +// 9| { None } +fn yy_action_959(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + YYObj_Option_Type_({(); None }) } // file:///./parser.mbty -// 1984| FALSE { Bool(false) } -fn yy_action_889(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - YYObj_Constant({(); Bool(false) }) +// 196| non_empty_list_commas_rev(X) "," X { $1.add($3) } +fn yy_action_960(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj_List_Parameter_(_dollar1) + guard _args[2].0 is YYObj_Parameter(_dollar3) + YYObj_List_Parameter_({(); _dollar1.add(_dollar3) }) } // file:///./parser.mbty -// 1985| BYTE { Byte($1) } -fn yy_action_890(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[0].0 is YYObj_CharLiteral(_dollar1) - YYObj_Constant({(); Byte(_dollar1) }) +// 204| non_empty_list_commas_rev(X) option(",") { $1.rev() } +fn yy_action_961(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj_List_Parameter_(_dollar1) + YYObj_List_Parameter_({(); _dollar1.rev() }) } // file:///./parser.mbty -// 1986| BYTES { Bytes($1) } -fn yy_action_891(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[0].0 is YYObj_StringLiteral(_dollar1) - YYObj_Constant({(); Bytes(_dollar1) }) +// 195| X { @list.singleton($1) } +fn yy_action_962(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj_Parameter(_dollar1) + YYObj_List_Parameter_({(); @list.singleton(_dollar1) }) } // file:///./parser.mbty -// 1987| CHAR { Char($1) } -fn yy_action_892(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[0].0 is YYObj_CharLiteral(_dollar1) - YYObj_Constant({(); Char(_dollar1) }) +// 212| { @list.empty() } +fn yy_action_963(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + YYObj_List_Parameter_({(); @list.empty() }) } // file:///./parser.mbty -// 1988| INT { make_int($1) } -fn yy_action_893(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[0].0 is YYObj_String(_dollar1) - YYObj_Constant({(); make_int(_dollar1) }) +// 1892| is_async "fn" parameters func_return_type block_expr { +// 1893| let (return_type, error_type) = $4 +// 1894| Func::{ +// 1895| parameters : $3, +// 1896| params_loc : mk_loc($loc($3)), +// 1897| body : $5, +// 1898| return_type, +// 1899| error_type, +// 1900| kind : Lambda, +// 1901| is_async : $1, +// 1902| loc : mk_loc($sloc) +// 1903| } +// 1904| } +fn yy_action_964(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_5(_last_pos, _args[0:1]) + guard _args[3].0 is YYObj__Type___ErrorType_(_dollar4) + guard _args[2].0 is YYObj_List_Parameter_(_dollar3) + let _start_pos_of_item2 = _args[2].1 + let _end_pos_of_item2 = _args[2].2 + guard _args[4].0 is YYObj_Expr(_dollar5) + guard _sub_action_0_result is YYObj_Location_(_dollar1) + let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) + let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } + YYObj_Func({(); + let (return_type, error_type) = _dollar4 + Func::{ + parameters : _dollar3, + params_loc : mk_loc((_start_pos_of_item2, _end_pos_of_item2)), + body : _dollar5, + return_type, + error_type, + kind : Lambda, + is_async : _dollar1, + loc : mk_loc((_symbol_start_pos, _end_pos)) + } + }) } // file:///./parser.mbty -// 1989| DOUBLE { make_double($1) } -fn yy_action_894(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[0].0 is YYObj_String(_dollar1) - YYObj_Constant({(); make_double(_dollar1) }) +// 2446| labeled_expr { $1 } +fn yy_action_965(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_450(_last_pos, _args[0:3]) + guard _sub_action_0_result is YYObj_FieldDef(_dollar1) + YYObj_FieldDef({(); _dollar1 }) } // file:///./parser.mbty -// 1990| FLOAT { make_float($1) } -fn yy_action_895(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[0].0 is YYObj_String(_dollar1) - YYObj_Constant({(); make_float(_dollar1) }) +// 2451| label ":" expr { @syntax.make_field_def(loc = mk_loc($sloc), $1, $3, false) } +fn yy_action_450(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_501(_last_pos, _args[0:1]) + let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) + let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } + guard _sub_action_0_result is YYObj_Label(_dollar1) + guard _args[2].0 is YYObj_Expr(_dollar3) + YYObj_FieldDef({(); @syntax.make_field_def(loc = mk_loc((_symbol_start_pos, _end_pos)), _dollar1, _dollar3, false) }) } // file:///./parser.mbty -// 1991| STRING { String($1) } -fn yy_action_896(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[0].0 is YYObj_StringLiteral(_dollar1) - YYObj_Constant({(); String(_dollar1) }) +// 2447| label_pun { $1 } +fn yy_action_966(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_448(_last_pos, _args[0:1]) + guard _sub_action_0_result is YYObj_FieldDef(_dollar1) + YYObj_FieldDef({(); _dollar1 }) } // file:///./parser.mbty -// 1992| REGEX_LITERAL { Regex($1) } -fn yy_action_897(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[0].0 is YYObj_String(_dollar1) - YYObj_Constant({(); Regex(_dollar1) }) +// 2455| label { @syntax.make_field_def(loc = mk_loc($sloc), $1, @syntax.label_to_expr(loc = mk_loc($sloc), $1), true) } +fn yy_action_448(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_501(_last_pos, _args[0:1]) + let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) + let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } + guard _sub_action_0_result is YYObj_Label(_dollar1) + YYObj_FieldDef({(); @syntax.make_field_def(loc = mk_loc((_symbol_start_pos, _end_pos)), _dollar1, @syntax.label_to_expr(loc = mk_loc((_symbol_start_pos, _end_pos)), _dollar1), true) }) } // file:///./parser.mbty -// 1968| MULTILINE_STRING { String($1) } -fn yy_action_898(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[0].0 is YYObj_String(_dollar1) - YYObj_MultilineStringElem({(); String(_dollar1) }) +// 2031| lident_string { Label::{ name: $1, loc: mk_loc($sloc) } } +fn yy_action_501(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_228(_last_pos, _args[0:1]) + guard _sub_action_0_result is YYObj_String(_dollar1) + let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) + let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } + YYObj_Label({(); Label::{ name: _dollar1, loc: mk_loc((_symbol_start_pos, _end_pos)) } }) } // file:///./parser.mbty -// 1969| MULTILINE_INTERP { -// 1970| Interp(make_interps($1)) -// 1971| } -fn yy_action_899(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[0].0 is YYObj_InterpLiteral(_dollar1) - YYObj_MultilineStringElem({(); - Interp(make_interps(_dollar1)) - }) +// 196| non_empty_list_commas_rev(X) "," X { $1.add($3) } +fn yy_action_967(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj_List_FieldDef_(_dollar1) + guard _args[2].0 is YYObj_FieldDef(_dollar3) + YYObj_List_FieldDef_({(); _dollar1.add(_dollar3) }) } // file:///./parser.mbty -// 185| X non_empty_list(X) { $2.add($1) } -fn yy_action_900(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[1].0 is YYObj_List_MultilineStringElem_(_dollar2) - guard _args[0].0 is YYObj_MultilineStringElem(_dollar1) - YYObj_List_MultilineStringElem_({(); _dollar2.add(_dollar1) }) +// 222| non_empty_list_commas_rev(X) option(",") { +// 223| ($1.rev(), $2 is Some(_)) +// 224| } +fn yy_action_968(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj_List_FieldDef_(_dollar1) + guard _args[1].0 is YYObj_Option_Unit_(_dollar2) + YYObj__List_FieldDef___Bool_({(); + (_dollar1.rev(), _dollar2 is Some(_)) + }) } // file:///./parser.mbty -// 184| X { @list.singleton($1) } -fn yy_action_901(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - guard _args[0].0 is YYObj_MultilineStringElem(_dollar1) - YYObj_List_MultilineStringElem_({(); @list.singleton(_dollar1) }) +// 195| X { @list.singleton($1) } +fn yy_action_969(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj_FieldDef(_dollar1) + YYObj_List_FieldDef_({(); @list.singleton(_dollar1) }) } // file:///./parser.mbty -// 1157| { None} -fn yy_action_902(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { - YYObj_Label_({(); None}) +// 228| { (@list.empty(), false) } +fn yy_action_970(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + YYObj__List_FieldDef___Bool_({(); (@list.empty(), false) }) } -fn yy_input(token : Token, _start_pos : Position, _end_pos : Position) -> (YYSymbol, YYObj) { +// file:///./parser.mbty +// 1981| type_name "::" lident_string { +// 1982| let method_name = Label::{ name: $3, loc: mk_loc($loc($3)) } +// 1983| Method(type_name = $1, method_name~, loc = mk_loc($sloc)) +// 1984| } +fn yy_action_971(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_226(_args[1].2, _args[2:3]) + guard _sub_action_0_result is YYObj_String(_dollar3) + let _start_pos_of_item2 = _args[2].1 + let _end_pos_of_item2 = _args[2].2 + guard _args[0].0 is YYObj_TypeName(_dollar1) + let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) + let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } + YYObj_Expr({(); + let method_name = Label::{ name: _dollar3, loc: mk_loc((_start_pos_of_item2, _end_pos_of_item2)) } + Method(type_name = _dollar1, method_name~, loc = mk_loc((_symbol_start_pos, _end_pos))) + }) +} + +// file:///./parser.mbty +// 334| LIDENT { $1 } +fn yy_action_226(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj_String(_dollar1) + YYObj_String({(); _dollar1 }) +} + +// file:///./parser.mbty +// 1981| type_name "::" lident_string { +// 1982| let method_name = Label::{ name: $3, loc: mk_loc($loc($3)) } +// 1983| Method(type_name = $1, method_name~, loc = mk_loc($sloc)) +// 1984| } +fn yy_action_972(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_228(_args[1].2, _args[2:3]) + guard _sub_action_0_result is YYObj_String(_dollar3) + let _start_pos_of_item2 = _args[2].1 + let _end_pos_of_item2 = _args[2].2 + guard _args[0].0 is YYObj_TypeName(_dollar1) + let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) + let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } + YYObj_Expr({(); + let method_name = Label::{ name: _dollar3, loc: mk_loc((_start_pos_of_item2, _end_pos_of_item2)) } + Method(type_name = _dollar1, method_name~, loc = mk_loc((_symbol_start_pos, _end_pos))) + }) +} + +// file:///./parser.mbty +// 335| "extend" { "extend" } +fn yy_action_228(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + YYObj_String({(); "extend" }) +} + +// file:///./parser.mbty +// 234| non_empty_list_semi_rev_aux(X) SEMI X { $1.add($3) } +fn yy_action_973(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj_List_Statement_(_dollar1) + guard _args[2].0 is YYObj_Statement(_dollar3) + YYObj_List_Statement_({(); _dollar1.add(_dollar3) }) +} + +// file:///./stdlib.mbty +// 5| X { Some($1) } +fn yy_action_974(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj_Bool(_dollar1) + YYObj_Option_Bool_({(); Some(_dollar1) }) +} + +// file:///./parser.mbty +// 238| non_empty_list_semi_rev_aux(X) option(SEMI) { $1 } +fn yy_action_975(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj_List_Statement_(_dollar1) + YYObj_List_Statement_({(); _dollar1 }) +} + +// file:///./stdlib.mbty +// 4| { None } +fn yy_action_976(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + YYObj_Option_Bool_({(); None }) +} + +// file:///./parser.mbty +// 233| X { @list.singleton($1) } +fn yy_action_977(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj_Statement(_dollar1) + YYObj_List_Statement_({(); @list.singleton(_dollar1) }) +} + +// file:///./parser.mbty +// 251| { @list.empty() } +fn yy_action_978(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + YYObj_List_Statement_({(); @list.empty() }) +} + +// file:///./parser.mbty +// 1892| is_async "fn" parameters func_return_type block_expr { +// 1893| let (return_type, error_type) = $4 +// 1894| Func::{ +// 1895| parameters : $3, +// 1896| params_loc : mk_loc($loc($3)), +// 1897| body : $5, +// 1898| return_type, +// 1899| error_type, +// 1900| kind : Lambda, +// 1901| is_async : $1, +// 1902| loc : mk_loc($sloc) +// 1903| } +// 1904| } +fn yy_action_979(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_8(_last_pos, _args[0:0]) + guard _args[2].0 is YYObj__Type___ErrorType_(_dollar4) + guard _args[1].0 is YYObj_List_Parameter_(_dollar3) + let _start_pos_of_item2 = _args[1].1 + let _end_pos_of_item2 = _args[1].2 + guard _args[3].0 is YYObj_Expr(_dollar5) + guard _sub_action_0_result is YYObj_Location_(_dollar1) + let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) + let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } + YYObj_Func({(); + let (return_type, error_type) = _dollar4 + Func::{ + parameters : _dollar3, + params_loc : mk_loc((_start_pos_of_item2, _end_pos_of_item2)), + body : _dollar5, + return_type, + error_type, + kind : Lambda, + is_async : _dollar1, + loc : mk_loc((_symbol_start_pos, _end_pos)) + } + }) +} + +// file:///./parser.mbty +// 2291| "->" return_type { +// 2292| match $2 { +// 2293| (ty, err) => (Some(ty), err) +// 2294| } +// 2295| } +fn yy_action_980(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[1].0 is YYObj__Type__ErrorType_(_dollar2) + YYObj__Type___ErrorType_({(); + match _dollar2 { + (ty, err) => (Some(ty), err) + } + }) +} + +// file:///./parser.mbty +// 2328| is_async "(" type_ "," ioption(non_empty_list_commas(type_)) ")" "->" return_type { +// 2329| let (ty_res, ty_err) = $8 +// 2330| let ts = match $5 { +// 2331| None => @list.empty() +// 2332| Some(ts) => ts +// 2333| } +// 2334| Arrow(args = ts.add($3), res = ty_res, err = ty_err, is_async = $1, loc = mk_loc($sloc)) +// 2335| } +fn yy_action_981(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_5(_last_pos, _args[0:1]) + let _sub_action_1_result = yy_action_982(_args[3].2, _args[4:4]) + guard _args[6].0 is YYObj__Type__ErrorType_(_dollar8) + guard _sub_action_1_result is YYObj_Option_List_Type__(_dollar5) + guard _args[2].0 is YYObj_Type(_dollar3) + guard _sub_action_0_result is YYObj_Location_(_dollar1) + let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) + let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } + YYObj_Type({(); + let (ty_res, ty_err) = _dollar8 + let ts = match _dollar5 { + None => @list.empty() + Some(ts) => ts + } + Arrow(args = ts.add(_dollar3), res = ty_res, err = ty_err, is_async = _dollar1, loc = mk_loc((_symbol_start_pos, _end_pos))) + }) +} + +// file:///./parser.mbty +// 2328| is_async "(" type_ "," ioption(non_empty_list_commas(type_)) ")" "->" return_type { +// 2329| let (ty_res, ty_err) = $8 +// 2330| let ts = match $5 { +// 2331| None => @list.empty() +// 2332| Some(ts) => ts +// 2333| } +// 2334| Arrow(args = ts.add($3), res = ty_res, err = ty_err, is_async = $1, loc = mk_loc($sloc)) +// 2335| } +fn yy_action_983(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_5(_last_pos, _args[0:1]) + let _sub_action_1_result = yy_action_984(_args[3].2, _args[4:5]) + guard _args[7].0 is YYObj__Type__ErrorType_(_dollar8) + guard _sub_action_1_result is YYObj_Option_List_Type__(_dollar5) + guard _args[2].0 is YYObj_Type(_dollar3) + guard _sub_action_0_result is YYObj_Location_(_dollar1) + let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) + let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } + YYObj_Type({(); + let (ty_res, ty_err) = _dollar8 + let ts = match _dollar5 { + None => @list.empty() + Some(ts) => ts + } + Arrow(args = ts.add(_dollar3), res = ty_res, err = ty_err, is_async = _dollar1, loc = mk_loc((_symbol_start_pos, _end_pos))) + }) +} + +// file:///./parser.mbty +// 2340| is_async "(" type_ ")" "->" return_type { +// 2341| let (ty_res, ty_err) = $6 +// 2342| Arrow(args = @list.singleton($3), res = ty_res, err = ty_err, is_async = $1, loc = mk_loc($sloc)) +// 2343| } +fn yy_action_985(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_5(_last_pos, _args[0:1]) + guard _args[5].0 is YYObj__Type__ErrorType_(_dollar6) + guard _args[2].0 is YYObj_Type(_dollar3) + guard _sub_action_0_result is YYObj_Location_(_dollar1) + let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) + let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } + YYObj_Type({(); + let (ty_res, ty_err) = _dollar6 + Arrow(args = @list.singleton(_dollar3), res = ty_res, err = ty_err, is_async = _dollar1, loc = mk_loc((_symbol_start_pos, _end_pos))) + }) +} + +// file:///./parser.mbty +// 2315| qual_ident_ty_inline optional_type_arguments %prec prec_lower_than_as { +// 2316| Name( +// 2317| constr_id = ConstrId::{ id: $1, loc: mk_loc($loc($1)) }, +// 2318| tys = $2, +// 2319| loc = mk_loc($sloc) +// 2320| ) +// 2321| } +fn yy_action_986(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_987(_last_pos, _args[0:2]) + let _sub_action_1_result = yy_action_988(_args[1].2, _args[2:5]) + guard _sub_action_0_result is YYObj_LongIdent(_dollar1) + let _start_pos_of_item0 = _args[0].1 + let _end_pos_of_item0 = _args[0].2 + guard _sub_action_1_result is YYObj_List_Type_(_dollar2) + let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) + let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } + YYObj_Type({(); + Name( + constr_id = ConstrId::{ id: _dollar1, loc: mk_loc((_start_pos_of_item0, _end_pos_of_item0)) }, + tys = _dollar2, + loc = mk_loc((_symbol_start_pos, _end_pos)) + ) + }) +} + +// file:///./parser.mbty +// 2315| qual_ident_ty_inline optional_type_arguments %prec prec_lower_than_as { +// 2316| Name( +// 2317| constr_id = ConstrId::{ id: $1, loc: mk_loc($loc($1)) }, +// 2318| tys = $2, +// 2319| loc = mk_loc($sloc) +// 2320| ) +// 2321| } +fn yy_action_989(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_987(_last_pos, _args[0:2]) + let _sub_action_1_result = yy_action_990(_args[1].2, _args[2:2]) + guard _sub_action_0_result is YYObj_LongIdent(_dollar1) + let _start_pos_of_item0 = _args[0].1 + let _end_pos_of_item0 = _args[0].2 + guard _sub_action_1_result is YYObj_List_Type_(_dollar2) + let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) + let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } + YYObj_Type({(); + Name( + constr_id = ConstrId::{ id: _dollar1, loc: mk_loc((_start_pos_of_item0, _end_pos_of_item0)) }, + tys = _dollar2, + loc = mk_loc((_symbol_start_pos, _end_pos)) + ) + }) +} + +// file:///./parser.mbty +// 2315| qual_ident_ty_inline optional_type_arguments %prec prec_lower_than_as { +// 2316| Name( +// 2317| constr_id = ConstrId::{ id: $1, loc: mk_loc($loc($1)) }, +// 2318| tys = $2, +// 2319| loc = mk_loc($sloc) +// 2320| ) +// 2321| } +fn yy_action_991(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_992(_last_pos, _args[0:2]) + let _sub_action_1_result = yy_action_988(_args[1].2, _args[2:5]) + guard _sub_action_0_result is YYObj_LongIdent(_dollar1) + let _start_pos_of_item0 = _args[0].1 + let _end_pos_of_item0 = _args[0].2 + guard _sub_action_1_result is YYObj_List_Type_(_dollar2) + let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) + let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } + YYObj_Type({(); + Name( + constr_id = ConstrId::{ id: _dollar1, loc: mk_loc((_start_pos_of_item0, _end_pos_of_item0)) }, + tys = _dollar2, + loc = mk_loc((_symbol_start_pos, _end_pos)) + ) + }) +} + +// file:///./parser.mbty +// 204| non_empty_list_commas_rev(X) option(",") { $1.rev() } +fn yy_action_993(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj_List_Type_(_dollar1) + YYObj_List_Type_({(); _dollar1.rev() }) +} + +// file:///./parser.mbty +// 2328| is_async "(" type_ "," ioption(non_empty_list_commas(type_)) ")" "->" return_type { +// 2329| let (ty_res, ty_err) = $8 +// 2330| let ts = match $5 { +// 2331| None => @list.empty() +// 2332| Some(ts) => ts +// 2333| } +// 2334| Arrow(args = ts.add($3), res = ty_res, err = ty_err, is_async = $1, loc = mk_loc($sloc)) +// 2335| } +fn yy_action_994(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_8(_last_pos, _args[0:0]) + let _sub_action_1_result = yy_action_984(_args[2].2, _args[3:4]) + guard _args[6].0 is YYObj__Type__ErrorType_(_dollar8) + guard _sub_action_1_result is YYObj_Option_List_Type__(_dollar5) + guard _args[1].0 is YYObj_Type(_dollar3) + guard _sub_action_0_result is YYObj_Location_(_dollar1) + let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) + let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } + YYObj_Type({(); + let (ty_res, ty_err) = _dollar8 + let ts = match _dollar5 { + None => @list.empty() + Some(ts) => ts + } + Arrow(args = ts.add(_dollar3), res = ty_res, err = ty_err, is_async = _dollar1, loc = mk_loc((_symbol_start_pos, _end_pos))) + }) +} + +// file:///./stdlib.mbty +// 10| X { Some($1) } +fn yy_action_984(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj_List_Type_(_dollar1) + YYObj_Option_List_Type__({(); Some(_dollar1) }) +} + +// file:///./parser.mbty +// 2313| "(" type_ "," non_empty_list_commas(type_) ")" { @syntax.make_tuple_type(loc = mk_loc($sloc), $4.add($2)) } +fn yy_action_995(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) + let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } + guard _args[3].0 is YYObj_List_Type_(_dollar4) + guard _args[1].0 is YYObj_Type(_dollar2) + YYObj_Type({(); @syntax.make_tuple_type(loc = mk_loc((_symbol_start_pos, _end_pos)), _dollar4.add(_dollar2)) }) +} + +// file:///./parser.mbty +// 2328| is_async "(" type_ "," ioption(non_empty_list_commas(type_)) ")" "->" return_type { +// 2329| let (ty_res, ty_err) = $8 +// 2330| let ts = match $5 { +// 2331| None => @list.empty() +// 2332| Some(ts) => ts +// 2333| } +// 2334| Arrow(args = ts.add($3), res = ty_res, err = ty_err, is_async = $1, loc = mk_loc($sloc)) +// 2335| } +fn yy_action_996(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_8(_last_pos, _args[0:0]) + let _sub_action_1_result = yy_action_982(_args[2].2, _args[3:3]) + guard _args[5].0 is YYObj__Type__ErrorType_(_dollar8) + guard _sub_action_1_result is YYObj_Option_List_Type__(_dollar5) + guard _args[1].0 is YYObj_Type(_dollar3) + guard _sub_action_0_result is YYObj_Location_(_dollar1) + let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) + let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } + YYObj_Type({(); + let (ty_res, ty_err) = _dollar8 + let ts = match _dollar5 { + None => @list.empty() + Some(ts) => ts + } + Arrow(args = ts.add(_dollar3), res = ty_res, err = ty_err, is_async = _dollar1, loc = mk_loc((_symbol_start_pos, _end_pos))) + }) +} + +// file:///./stdlib.mbty +// 9| { None } +fn yy_action_982(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + YYObj_Option_List_Type__({(); None }) +} + +// file:///./parser.mbty +// 2340| is_async "(" type_ ")" "->" return_type { +// 2341| let (ty_res, ty_err) = $6 +// 2342| Arrow(args = @list.singleton($3), res = ty_res, err = ty_err, is_async = $1, loc = mk_loc($sloc)) +// 2343| } +fn yy_action_997(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_8(_last_pos, _args[0:0]) + guard _args[4].0 is YYObj__Type__ErrorType_(_dollar6) + guard _args[1].0 is YYObj_Type(_dollar3) + guard _sub_action_0_result is YYObj_Location_(_dollar1) + let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) + let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } + YYObj_Type({(); + let (ty_res, ty_err) = _dollar6 + Arrow(args = @list.singleton(_dollar3), res = ty_res, err = ty_err, is_async = _dollar1, loc = mk_loc((_symbol_start_pos, _end_pos))) + }) +} + +// file:///./parser.mbty +// 2314| "(" type_ ")" { $2 } +fn yy_action_998(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[1].0 is YYObj_Type(_dollar2) + YYObj_Type({(); _dollar2 }) +} + +// file:///./parser.mbty +// 2286| type_ { ($1, NoErrorType) } +fn yy_action_999(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj_Type(_dollar1) + YYObj__Type__ErrorType_({(); (_dollar1, NoErrorType) }) +} + +// file:///./parser.mbty +// 2273| "raise" error_type { ErrorType(ty = $2) } +fn yy_action_1000(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[1].0 is YYObj_Type(_dollar2) + YYObj_ErrorType({(); ErrorType(ty = _dollar2) }) +} + +// file:///./parser.mbty +// 2275| "raise" "?" { +// 2276| let fake_error = Type::Name( +// 2277| constr_id = ConstrId::{ id: Ident(name = "Error"), loc: mk_loc($sloc) }, +// 2278| tys = @list.empty(), +// 2279| loc = mk_loc($sloc) +// 2280| ) +// 2281| MaybeError(ty = fake_error) +// 2282| } +fn yy_action_1001(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) + let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } + YYObj_ErrorType({(); + let fake_error = Type::Name( + constr_id = ConstrId::{ id: Ident(name = "Error"), loc: mk_loc((_symbol_start_pos, _end_pos)) }, + tys = @list.empty(), + loc = mk_loc((_symbol_start_pos, _end_pos)) + ) + MaybeError(ty = fake_error) + }) +} + +// file:///./parser.mbty +// 2301| qual_ident_ty { +// 2302| Name( +// 2303| constr_id = ConstrId::{ id: $1, loc: mk_loc($sloc) }, +// 2304| tys = @list.empty(), +// 2305| loc = mk_loc($sloc) +// 2306| ) +// 2307| } +fn yy_action_1002(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj_LongIdent(_dollar1) + let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) + let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } + YYObj_Type({(); + Name( + constr_id = ConstrId::{ id: _dollar1, loc: mk_loc((_symbol_start_pos, _end_pos)) }, + tys = @list.empty(), + loc = mk_loc((_symbol_start_pos, _end_pos)) + ) + }) +} + +// file:///./parser.mbty +// 2308| "_" { Any(loc = mk_loc($sloc)) } +fn yy_action_1003(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) + let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } + YYObj_Type({(); Any(loc = mk_loc((_symbol_start_pos, _end_pos))) }) +} + +// file:///./parser.mbty +// 2272| "raise" { DefaultErrorType(loc = mk_loc($sloc)) } +fn yy_action_1004(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) + let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } + YYObj_ErrorType({(); DefaultErrorType(loc = mk_loc((_symbol_start_pos, _end_pos))) }) +} + +// file:///./parser.mbty +// 2274| "noraise" { Noraise(loc = mk_loc($sloc)) } +fn yy_action_1005(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) + let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } + YYObj_ErrorType({(); Noraise(loc = mk_loc((_symbol_start_pos, _end_pos))) }) +} + +// file:///./parser.mbty +// 2287| simple_type error_annotation { ($1, $2) } +fn yy_action_1006(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj_Type(_dollar1) + guard _args[1].0 is YYObj_ErrorType(_dollar2) + YYObj__Type__ErrorType_({(); (_dollar1, _dollar2) }) +} + +// file:///./parser.mbty +// 2312| simple_type "?" { @syntax.make_option_type(loc = mk_loc($sloc), constr_loc = mk_loc($loc($2)), $1) } +fn yy_action_1007(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) + let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } + let _start_pos_of_item1 = _args[1].1 + let _end_pos_of_item1 = _args[1].2 + guard _args[0].0 is YYObj_Type(_dollar1) + YYObj_Type({(); @syntax.make_option_type(loc = mk_loc((_symbol_start_pos, _end_pos)), constr_loc = mk_loc((_start_pos_of_item1, _end_pos_of_item1)), _dollar1) }) +} + +// file:///./parser.mbty +// 2327| simple_type { $1 } +fn yy_action_1008(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj_Type(_dollar1) + YYObj_Type({(); _dollar1 }) +} + +// file:///./parser.mbty +// 2336| is_async "(" ")" "->" return_type { +// 2337| let (ty_res, ty_err) = $5 +// 2338| Arrow(args = @list.empty(), res = ty_res, err = ty_err, is_async = $1, loc = mk_loc($sloc)) +// 2339| } +fn yy_action_1009(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_8(_last_pos, _args[0:0]) + guard _args[3].0 is YYObj__Type__ErrorType_(_dollar5) + guard _sub_action_0_result is YYObj_Location_(_dollar1) + let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) + let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } + YYObj_Type({(); + let (ty_res, ty_err) = _dollar5 + Arrow(args = @list.empty(), res = ty_res, err = ty_err, is_async = _dollar1, loc = mk_loc((_symbol_start_pos, _end_pos))) + }) +} + +// file:///./parser.mbty +// 303| { None } +fn yy_action_8(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + YYObj_Location_({(); None }) +} + +// file:///./parser.mbty +// 2315| qual_ident_ty_inline optional_type_arguments %prec prec_lower_than_as { +// 2316| Name( +// 2317| constr_id = ConstrId::{ id: $1, loc: mk_loc($loc($1)) }, +// 2318| tys = $2, +// 2319| loc = mk_loc($sloc) +// 2320| ) +// 2321| } +fn yy_action_1010(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_1011(_last_pos, _args[0:1]) + let _sub_action_1_result = yy_action_988(_args[0].2, _args[1:4]) + guard _sub_action_0_result is YYObj_LongIdent(_dollar1) + let _start_pos_of_item0 = _args[0].1 + let _end_pos_of_item0 = _args[0].2 + guard _sub_action_1_result is YYObj_List_Type_(_dollar2) + let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) + let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } + YYObj_Type({(); + Name( + constr_id = ConstrId::{ id: _dollar1, loc: mk_loc((_start_pos_of_item0, _end_pos_of_item0)) }, + tys = _dollar2, + loc = mk_loc((_symbol_start_pos, _end_pos)) + ) + }) +} + +// file:///./parser.mbty +// 325| ioption(delimited("[", non_empty_list_commas(type_), "]")) { +// 326| match $1 { +// 327| None => @list.empty() +// 328| Some(params) => params +// 329| } +// 330| } +fn yy_action_988(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_1012(_last_pos, _args[0:3]) + guard _sub_action_0_result is YYObj_Option_List_Type__(_dollar1) + YYObj_List_Type_({(); + match _dollar1 { + None => @list.empty() + Some(params) => params + } + }) +} + +// file:///./stdlib.mbty +// 10| X { Some($1) } +fn yy_action_1012(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_1013(_last_pos, _args[0:3]) + guard _sub_action_0_result is YYObj_List_Type_(_dollar1) + YYObj_Option_List_Type__({(); Some(_dollar1) }) +} + +// file:///./stdlib.mbty +// 40| L X R { $2 } +fn yy_action_1013(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[1].0 is YYObj_List_Type_(_dollar2) + YYObj_List_Type_({(); _dollar2 }) +} + +// file:///./parser.mbty +// 2315| qual_ident_ty_inline optional_type_arguments %prec prec_lower_than_as { +// 2316| Name( +// 2317| constr_id = ConstrId::{ id: $1, loc: mk_loc($loc($1)) }, +// 2318| tys = $2, +// 2319| loc = mk_loc($sloc) +// 2320| ) +// 2321| } +fn yy_action_1014(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_1011(_last_pos, _args[0:1]) + let _sub_action_1_result = yy_action_990(_args[0].2, _args[1:1]) + guard _sub_action_0_result is YYObj_LongIdent(_dollar1) + let _start_pos_of_item0 = _args[0].1 + let _end_pos_of_item0 = _args[0].2 + guard _sub_action_1_result is YYObj_List_Type_(_dollar2) + let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) + let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } + YYObj_Type({(); + Name( + constr_id = ConstrId::{ id: _dollar1, loc: mk_loc((_start_pos_of_item0, _end_pos_of_item0)) }, + tys = _dollar2, + loc = mk_loc((_symbol_start_pos, _end_pos)) + ) + }) +} + +// file:///./parser.mbty +// 196| non_empty_list_commas_rev(X) "," X { $1.add($3) } +fn yy_action_1015(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj_List_Type_(_dollar1) + guard _args[2].0 is YYObj_Type(_dollar3) + YYObj_List_Type_({(); _dollar1.add(_dollar3) }) +} + +// file:///./parser.mbty +// 195| X { @list.singleton($1) } +fn yy_action_1016(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj_Type(_dollar1) + YYObj_List_Type_({(); @list.singleton(_dollar1) }) +} + +// file:///./parser.mbty +// 2315| qual_ident_ty_inline optional_type_arguments %prec prec_lower_than_as { +// 2316| Name( +// 2317| constr_id = ConstrId::{ id: $1, loc: mk_loc($loc($1)) }, +// 2318| tys = $2, +// 2319| loc = mk_loc($sloc) +// 2320| ) +// 2321| } +fn yy_action_1017(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_992(_last_pos, _args[0:2]) + let _sub_action_1_result = yy_action_990(_args[1].2, _args[2:2]) + guard _sub_action_0_result is YYObj_LongIdent(_dollar1) + let _start_pos_of_item0 = _args[0].1 + let _end_pos_of_item0 = _args[0].2 + guard _sub_action_1_result is YYObj_List_Type_(_dollar2) + let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) + let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } + YYObj_Type({(); + Name( + constr_id = ConstrId::{ id: _dollar1, loc: mk_loc((_start_pos_of_item0, _end_pos_of_item0)) }, + tys = _dollar2, + loc = mk_loc((_symbol_start_pos, _end_pos)) + ) + }) +} + +// file:///./parser.mbty +// 325| ioption(delimited("[", non_empty_list_commas(type_), "]")) { +// 326| match $1 { +// 327| None => @list.empty() +// 328| Some(params) => params +// 329| } +// 330| } +fn yy_action_990(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_1018(_last_pos, _args[0:0]) + guard _sub_action_0_result is YYObj_Option_List_Type__(_dollar1) + YYObj_List_Type_({(); + match _dollar1 { + None => @list.empty() + Some(params) => params + } + }) +} + +// file:///./stdlib.mbty +// 9| { None } +fn yy_action_1018(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + YYObj_Option_List_Type__({(); None }) +} + +// file:///./parser.mbty +// 2322| "&" qual_ident_ty { Object(ConstrId::{ id: $2, loc: mk_loc($loc($2)) }) } +fn yy_action_1019(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[1].0 is YYObj_LongIdent(_dollar2) + let _start_pos_of_item1 = _args[1].1 + let _end_pos_of_item1 = _args[1].2 + YYObj_Type({(); Object(ConstrId::{ id: _dollar2, loc: mk_loc((_start_pos_of_item1, _end_pos_of_item1)) }) }) +} + +// file:///./parser.mbty +// 2323| "_" { Any(loc = mk_loc($sloc)) } +fn yy_action_1020(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) + let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } + YYObj_Type({(); Any(loc = mk_loc((_symbol_start_pos, _end_pos))) }) +} + +// file:///./parser.mbty +// 2336| is_async "(" ")" "->" return_type { +// 2337| let (ty_res, ty_err) = $5 +// 2338| Arrow(args = @list.empty(), res = ty_res, err = ty_err, is_async = $1, loc = mk_loc($sloc)) +// 2339| } +fn yy_action_1021(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_5(_last_pos, _args[0:1]) + guard _args[4].0 is YYObj__Type__ErrorType_(_dollar5) + guard _sub_action_0_result is YYObj_Location_(_dollar1) + let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) + let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } + YYObj_Type({(); + let (ty_res, ty_err) = _dollar5 + Arrow(args = @list.empty(), res = ty_res, err = ty_err, is_async = _dollar1, loc = mk_loc((_symbol_start_pos, _end_pos))) + }) +} + +// file:///./parser.mbty +// 302| "async" { Some(mk_loc($loc($1))) } +fn yy_action_5(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _start_pos_of_item0 = _args[0].1 + let _end_pos_of_item0 = _args[0].2 + YYObj_Location_({(); Some(mk_loc((_start_pos_of_item0, _end_pos_of_item0))) }) +} + +// file:///./parser.mbty +// 2296| error_annotation { (None, $1) } +fn yy_action_1022(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj_ErrorType(_dollar1) + YYObj__Type___ErrorType_({(); (None, _dollar1) }) +} + +// file:///./parser.mbty +// 2297| { (None, NoErrorType) } +fn yy_action_1023(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + YYObj__Type___ErrorType_({(); (None, NoErrorType) }) +} + +// file:///./parser.mbty +// 2168| map_syntax_key ":" expr { +// 2169| MapExprElem::{ +// 2170| key: $1, +// 2171| expr: $3, +// 2172| key_loc: mk_loc($loc($1)), +// 2173| loc: mk_loc($sloc) +// 2174| } +// 2175| } +fn yy_action_1024(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj_Constant(_dollar1) + guard _args[2].0 is YYObj_Expr(_dollar3) + let _start_pos_of_item0 = _args[0].1 + let _end_pos_of_item0 = _args[0].2 + let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) + let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } + YYObj_MapExprElem({(); + MapExprElem::{ + key: _dollar1, + expr: _dollar3, + key_loc: mk_loc((_start_pos_of_item0, _end_pos_of_item0)), + loc: mk_loc((_symbol_start_pos, _end_pos)) + } + }) +} + +// file:///./parser.mbty +// 196| non_empty_list_commas_rev(X) "," X { $1.add($3) } +fn yy_action_1025(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj_List_MapExprElem_(_dollar1) + guard _args[2].0 is YYObj_MapExprElem(_dollar3) + YYObj_List_MapExprElem_({(); _dollar1.add(_dollar3) }) +} + +// file:///./parser.mbty +// 204| non_empty_list_commas_rev(X) option(",") { $1.rev() } +fn yy_action_1026(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj_List_MapExprElem_(_dollar1) + YYObj_List_MapExprElem_({(); _dollar1.rev() }) +} + +// file:///./parser.mbty +// 195| X { @list.singleton($1) } +fn yy_action_1027(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj_MapExprElem(_dollar1) + YYObj_List_MapExprElem_({(); @list.singleton(_dollar1) }) +} + +// file:///./parser.mbty +// 212| { @list.empty() } +fn yy_action_1028(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + YYObj_List_MapExprElem_({(); @list.empty() }) +} + +// file:///./parser.mbty +// 1938| anony_fn { Function(func = $1, loc = mk_loc($sloc)) } +fn yy_action_1029(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj_Func(_dollar1) + let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) + let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } + YYObj_Expr({(); Function(func = _dollar1, loc = mk_loc((_symbol_start_pos, _end_pos))) }) +} + +// file:///./parser.mbty +// 1939| atomic_expr { $1 } +fn yy_action_1030(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj_Expr(_dollar1) + YYObj_Expr({(); _dollar1 }) +} + +// file:///./parser.mbty +// 1940| "_" %prec prec_lower_than_arrow_fn { Hole(loc = mk_loc($sloc), kind = Incomplete) } +fn yy_action_1031(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) + let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } + YYObj_Expr({(); Hole(loc = mk_loc((_symbol_start_pos, _end_pos)), kind = Incomplete) }) +} + +// file:///./parser.mbty +// 1941| qual_ident_simple_expr { @syntax.make_ident_expr(loc = mk_loc($sloc), Var::{ name: $1, loc: mk_loc($sloc) }) } +fn yy_action_1032(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) + let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } + guard _args[0].0 is YYObj_LongIdent(_dollar1) + YYObj_Expr({(); @syntax.make_ident_expr(loc = mk_loc((_symbol_start_pos, _end_pos)), Var::{ name: _dollar1, loc: mk_loc((_symbol_start_pos, _end_pos)) }) }) +} + +// file:///./parser.mbty +// 1942| constr { Constr(constr = $1, loc = mk_loc($sloc)) } +fn yy_action_1033(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj_Constructor(_dollar1) + let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) + let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } + YYObj_Expr({(); Constr(constr = _dollar1, loc = mk_loc((_symbol_start_pos, _end_pos))) }) +} + +// file:///./parser.mbty +// 200| non_empty_list_commas_rev(X) { $1.rev() } +fn yy_action_1034(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj_List__Binder__Expr__(_dollar1) + YYObj_List__Binder__Expr__({(); _dollar1.rev() }) +} + +// file:///./parser.mbty +// 195| X { @list.singleton($1) } +fn yy_action_1035(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj_Binder_(_dollar1) + YYObj_List_Binder__({(); @list.singleton(_dollar1) }) +} + +// file:///./parser.mbty +// 217| { @list.empty() } +fn yy_action_1036(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + YYObj_List__Binder__Expr__({(); @list.empty() }) +} + +// file:///./parser.mbty +// 2025| "[" list_commas(spreadable_elem) "]" { @syntax.make_array_expr(loc = mk_loc($sloc), is_iter = false, $2) } +fn yy_action_1037(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) + let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } + guard _args[1].0 is YYObj_List_SpreadableElem_(_dollar2) + YYObj_Expr({(); @syntax.make_array_expr(loc = mk_loc((_symbol_start_pos, _end_pos)), is_iter = false, _dollar2) }) +} + +// file:///./parser.mbty +// 2163| expr { Regular($1) } +fn yy_action_1038(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj_Expr(_dollar1) + YYObj_SpreadableElem({(); Regular(_dollar1) }) +} + +// file:///./parser.mbty +// 213| non_empty_list_commas(X) { $1 } +fn yy_action_1039(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj_List_SpreadableElem_(_dollar1) + YYObj_List_SpreadableElem_({(); _dollar1 }) +} + +// file:///./parser.mbty +// 2164| ".." expr { Spread(expr = $2, loc = mk_loc($sloc)) } +fn yy_action_1040(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[1].0 is YYObj_Expr(_dollar2) + let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) + let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } + YYObj_SpreadableElem({(); Spread(expr = _dollar2, loc = mk_loc((_symbol_start_pos, _end_pos))) }) +} + +// file:///./parser.mbty +// 196| non_empty_list_commas_rev(X) "," X { $1.add($3) } +fn yy_action_1041(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj_List_SpreadableElem_(_dollar1) + guard _args[2].0 is YYObj_SpreadableElem(_dollar3) + YYObj_List_SpreadableElem_({(); _dollar1.add(_dollar3) }) +} + +// file:///./stdlib.mbty +// 5| X { Some($1) } +fn yy_action_1042(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _dollar1 = () + YYObj_Option_Unit_({(); Some(_dollar1) }) +} + +// file:///./parser.mbty +// 204| non_empty_list_commas_rev(X) option(",") { $1.rev() } +fn yy_action_1043(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj_List_SpreadableElem_(_dollar1) + YYObj_List_SpreadableElem_({(); _dollar1.rev() }) +} + +// file:///./stdlib.mbty +// 4| { None } +fn yy_action_1044(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + YYObj_Option_Unit_({(); None }) +} + +// file:///./parser.mbty +// 195| X { @list.singleton($1) } +fn yy_action_1045(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj_SpreadableElem(_dollar1) + YYObj_List_SpreadableElem_({(); @list.singleton(_dollar1) }) +} + +// file:///./parser.mbty +// 212| { @list.empty() } +fn yy_action_1046(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + YYObj_List_SpreadableElem_({(); @list.empty() }) +} + +// file:///./parser.mbty +// 2027| tuple_expr { $1 } +fn yy_action_1047(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj_Expr(_dollar1) + YYObj_Expr({(); _dollar1 }) +} + +// file:///./parser.mbty +// 2072| qual_ident_ty { TypeName::{ name: $1, is_object: false, loc: mk_loc($sloc) } } +fn yy_action_1048(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj_LongIdent(_dollar1) + let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) + let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } + YYObj_TypeName({(); TypeName::{ name: _dollar1, is_object: false, loc: mk_loc((_symbol_start_pos, _end_pos)) } }) +} + +// file:///./parser.mbty +// 1063| qual_ident_ty_inline { $1 } +fn yy_action_1049(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_1011(_last_pos, _args[0:1]) + guard _sub_action_0_result is YYObj_LongIdent(_dollar1) + YYObj_LongIdent({(); _dollar1 }) +} + +// file:///./parser.mbty +// 1057| UIDENT { LongIdent::Ident(name = $1) } +fn yy_action_1011(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj_String(_dollar1) + YYObj_LongIdent({(); LongIdent::Ident(name = _dollar1) }) +} + +// file:///./parser.mbty +// 1063| qual_ident_ty_inline { $1 } +fn yy_action_1050(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_987(_last_pos, _args[0:2]) + guard _sub_action_0_result is YYObj_LongIdent(_dollar1) + YYObj_LongIdent({(); _dollar1 }) +} + +// file:///./parser.mbty +// 1058| PACKAGE_NAME DOT_LIDENT { LongIdent::Dot(pkg = $1, id = $2) } +fn yy_action_987(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj_String(_dollar1) + guard _args[1].0 is YYObj_String(_dollar2) + YYObj_LongIdent({(); LongIdent::Dot(pkg = _dollar1, id = _dollar2) }) +} + +// file:///./parser.mbty +// 1063| qual_ident_ty_inline { $1 } +fn yy_action_1051(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _sub_action_0_result = yy_action_992(_last_pos, _args[0:2]) + guard _sub_action_0_result is YYObj_LongIdent(_dollar1) + YYObj_LongIdent({(); _dollar1 }) +} + +// file:///./parser.mbty +// 1059| PACKAGE_NAME DOT_UIDENT { LongIdent::Dot(pkg = $1, id = $2) } +fn yy_action_992(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj_String(_dollar1) + guard _args[1].0 is YYObj_String(_dollar2) + YYObj_LongIdent({(); LongIdent::Dot(pkg = _dollar1, id = _dollar2) }) +} + +// file:///./parser.mbty +// 2073| "&" qual_ident_ty { TypeName::{ name: $2, is_object: true, loc: mk_loc($sloc) } } +fn yy_action_1052(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[1].0 is YYObj_LongIdent(_dollar2) + let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) + let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } + YYObj_TypeName({(); TypeName::{ name: _dollar2, is_object: true, loc: mk_loc((_symbol_start_pos, _end_pos)) } }) +} + +// file:///./parser.mbty +// 2084| simple_constant { make_constant_expr(loc = mk_loc($sloc), $1) } +fn yy_action_1053(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) + let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } + guard _args[0].0 is YYObj_Constant(_dollar1) + YYObj_Expr({(); make_constant_expr(loc = mk_loc((_symbol_start_pos, _end_pos)), _dollar1) }) +} + +// file:///./parser.mbty +// 2085| non_empty_list(multiline_string) { +// 2086| MultilineString(elems = $1, loc = mk_loc($sloc)) +// 2087| } +fn yy_action_1054(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj_List_MultilineStringElem_(_dollar1) + let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) + let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } + YYObj_Expr({(); + MultilineString(elems = _dollar1, loc = mk_loc((_symbol_start_pos, _end_pos))) + }) +} + +// file:///./parser.mbty +// 2088| INTERP { make_interp_expr(loc = mk_loc($sloc), $1) } +fn yy_action_1055(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) + let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } + guard _args[0].0 is YYObj_InterpLiteral(_dollar1) + YYObj_Expr({(); make_interp_expr(loc = mk_loc((_symbol_start_pos, _end_pos)), _dollar1) }) +} + +// file:///./parser.mbty +// 2089| BYTES_INTERP { make_bytes_interp_expr(loc = mk_loc($sloc), $1) } +fn yy_action_1056(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + let _symbol_start_pos = _get_symbol_start_pos(_args, _last_pos) + let _end_pos = if _args.length() == 0 { _last_pos } else { _args[_args.length() - 1].2 } + guard _args[0].0 is YYObj_InterpLiteral(_dollar1) + YYObj_Expr({(); make_bytes_interp_expr(loc = mk_loc((_symbol_start_pos, _end_pos)), _dollar1) }) +} + +// file:///./parser.mbty +// 2093| TRUE { Bool(true) } +fn yy_action_1057(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + YYObj_Constant({(); Bool(true) }) +} + +// file:///./parser.mbty +// 2094| FALSE { Bool(false) } +fn yy_action_1058(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + YYObj_Constant({(); Bool(false) }) +} + +// file:///./parser.mbty +// 2095| BYTE { Byte($1) } +fn yy_action_1059(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj_CharLiteral(_dollar1) + YYObj_Constant({(); Byte(_dollar1) }) +} + +// file:///./parser.mbty +// 2096| BYTES { Bytes($1) } +fn yy_action_1060(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj_StringLiteral(_dollar1) + YYObj_Constant({(); Bytes(_dollar1) }) +} + +// file:///./parser.mbty +// 2097| CHAR { Char($1) } +fn yy_action_1061(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj_CharLiteral(_dollar1) + YYObj_Constant({(); Char(_dollar1) }) +} + +// file:///./parser.mbty +// 2098| INT { make_int($1) } +fn yy_action_1062(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj_String(_dollar1) + YYObj_Constant({(); make_int(_dollar1) }) +} + +// file:///./parser.mbty +// 2099| DOUBLE { make_double($1) } +fn yy_action_1063(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj_String(_dollar1) + YYObj_Constant({(); make_double(_dollar1) }) +} + +// file:///./parser.mbty +// 2100| FLOAT { make_float($1) } +fn yy_action_1064(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj_String(_dollar1) + YYObj_Constant({(); make_float(_dollar1) }) +} + +// file:///./parser.mbty +// 2101| STRING { String($1) } +fn yy_action_1065(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj_StringLiteral(_dollar1) + YYObj_Constant({(); String(_dollar1) }) +} + +// file:///./parser.mbty +// 2102| REGEX_LITERAL { Regex($1) } +fn yy_action_1066(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj_String(_dollar1) + YYObj_Constant({(); Regex(_dollar1) }) +} + +// file:///./parser.mbty +// 2077| MULTILINE_STRING { String($1) } +fn yy_action_1067(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj_String(_dollar1) + YYObj_MultilineStringElem({(); String(_dollar1) }) +} + +// file:///./parser.mbty +// 2078| MULTILINE_INTERP { +// 2079| Interp(make_interps($1)) +// 2080| } +fn yy_action_1068(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj_InterpLiteral(_dollar1) + YYObj_MultilineStringElem({(); + Interp(make_interps(_dollar1)) + }) +} + +// file:///./parser.mbty +// 191| X non_empty_list(X) { $2.add($1) } +fn yy_action_1069(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[1].0 is YYObj_List_MultilineStringElem_(_dollar2) + guard _args[0].0 is YYObj_MultilineStringElem(_dollar1) + YYObj_List_MultilineStringElem_({(); _dollar2.add(_dollar1) }) +} + +// file:///./parser.mbty +// 190| X { @list.singleton($1) } +fn yy_action_1070(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + guard _args[0].0 is YYObj_MultilineStringElem(_dollar1) + YYObj_List_MultilineStringElem_({(); @list.singleton(_dollar1) }) +} + +// file:///./parser.mbty +// 1211| { None} +fn yy_action_1071(_last_pos : Position, _args : ArrayView[(YYObj, Position, Position)]) -> YYObj { + YYObj_Label_({(); None}) +} + +fn yy_input(token : Token, _start_pos : Position, _end_pos : Position) -> (YYSymbol, YYObj) { match token { CHAR(data) => (T_CHAR, YYObj_CharLiteral(data)) INT(data) => (T_INT, YYObj_String(data)) @@ -16563,6 +20168,7 @@ fn yy_input(token : Token, _start_pos : Position, _end_pos : Position) -> (YYSym MULTILINE_STRING(data) => (T_MULTILINE_STRING, YYObj_String(data)) MULTILINE_INTERP(data) => (T_MULTILINE_INTERP, YYObj_InterpLiteral(data)) INTERP(data) => (T_INTERP, YYObj_InterpLiteral(data)) + BYTES_INTERP(data) => (T_BYTES_INTERP, YYObj_InterpLiteral(data)) REGEX_LITERAL(data) => (T_REGEX_LITERAL, YYObj_String(data)) REGEX_INTERP(data) => (T_REGEX_INTERP, YYObj_InterpLiteral(data)) ATTRIBUTE(data) => (T_ATTRIBUTE, YYObj__String__String___String_(data)) @@ -16617,8 +20223,10 @@ fn yy_input(token : Token, _start_pos : Position, _end_pos : Position) -> (YYSym COLON => (T_COLON, YYObj_Void) SEMI(data) => (T_SEMI, YYObj_Bool(data)) LBRACKET => (T_LBRACKET, YYObj_Void) + LBRACKET_BAR => (T_LBRACKET_BAR, YYObj_Void) PLUS => (T_PLUS, YYObj_Void) RBRACKET => (T_RBRACKET, YYObj_Void) + BAR_RBRACKET => (T_BAR_RBRACKET, YYObj_Void) UNDERSCORE => (T_UNDERSCORE, YYObj_Void) BAR => (T_BAR, YYObj_Void) LBRACE => (T_LBRACE, YYObj_Void) @@ -16632,6 +20240,7 @@ fn yy_input(token : Token, _start_pos : Position, _end_pos : Position) -> (YYSym PIPE => (T_PIPE, YYObj_Void) PIPE_LEFT => (T_PIPE_LEFT, YYObj_Void) LT_PLUS => (T_LT_PLUS, YYObj_Void) + LT_QUESTION => (T_LT_QUESTION, YYObj_Void) ELSE => (T_ELSE, YYObj_Void) FN => (T_FN, YYObj_Void) IF => (T_IF, YYObj_Void) @@ -16677,13 +20286,5806 @@ fn yy_input(token : Token, _start_pos : Position, _end_pos : Position) -> (YYSym TRY_EXCLAMATION => (T_TRY_EXCLAMATION, YYObj_Void) LEXMATCH => (T_LEXMATCH, YYObj_Void) LEXMATCH_QUESTION => (T_LEXMATCH_QUESTION, YYObj_Void) + LEXSCAN => (T_LEXSCAN, YYObj_Void) + EXTEND => (T_EXTEND, YYObj_Void) PACKAGE => (T_PACKAGE, YYObj_Void) } } -fn yy_state_0(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_0(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + NT_expression => Shift(yy_state_1) + NT_multiline_string => Shift(yy_state_2) + T_MULTILINE_INTERP => Shift(yy_state_4) + T_MULTILINE_STRING => Shift(yy_state_5) + T_REGEX_LITERAL => Shift(yy_state_6) + T_STRING => Shift(yy_state_7) + T_FLOAT => Shift(yy_state_8) + T_DOUBLE => Shift(yy_state_9) + T_INT => Shift(yy_state_10) + T_CHAR => Shift(yy_state_11) + T_BYTES => Shift(yy_state_12) + T_BYTE => Shift(yy_state_13) + T_FALSE => Shift(yy_state_14) + T_TRUE => Shift(yy_state_15) + T_BYTES_INTERP => Shift(yy_state_16) + T_INTERP => Shift(yy_state_17) + NT_non_empty_list_multiline_string_ => Shift(yy_state_18) + NT_simple_constant => Shift(yy_state_19) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + NT_tuple_expr => Shift(yy_state_27) + T_LBRACKET_BAR => Shift(yy_state_28) + T_LBRACKET => Shift(yy_state_36) + NT_constr => Shift(yy_state_47) + NT_qual_ident_simple_expr => Shift(yy_state_48) + NT_atomic_expr => Shift(yy_state_50) + NT_anony_fn => Shift(yy_state_51) + T_LBRACE => Shift(yy_state_52) + T_FN => Shift(yy_state_61) + NT_type_name => Shift(yy_state_139) + T_ASYNC => Shift(yy_state_152) + NT_simple_expr => Shift(yy_state_165) + T_EXCLAMATION => Shift(yy_state_176) + T_MINUS => Shift(yy_state_191) + T_PLUS => Shift(yy_state_193) + T_UIDENT => Shift(yy_state_195) + T_PACKAGE_NAME => Shift(yy_state_196) + NT_prefix_expr => Shift(yy_state_201) + NT_range_expr => Shift(yy_state_212) + NT_postfix_expr => Shift(yy_state_223) + T_EXISTS => Shift(yy_state_224) + T_FORALL => Shift(yy_state_256) + NT_infix_expr => Shift(yy_state_272) + T_UNDERSCORE => Shift(yy_state_273) + T_LPAREN => Shift(yy_state_281) + NT_pipe_expr => Shift(yy_state_325) + NT_arrow_fn_expr => Shift(yy_state_344) + NT_quantifier_expr => Shift(yy_state_345) + NT_simple_try_expr => Shift(yy_state_346) + NT_lexscan_expr => Shift(yy_state_347) + NT_lexmatch_expr => Shift(yy_state_348) + NT_match_expr => Shift(yy_state_349) + NT_if_expr => Shift(yy_state_350) + NT_try_expr => Shift(yy_state_351) + NT_while_expr => Shift(yy_state_352) + NT_foreach_expr => Shift(yy_state_353) + NT_for_expr => Shift(yy_state_354) + T_LEXSCAN => Shift(yy_state_355) + NT_lexscan_header => Shift(yy_state_358) + T_LEXMATCH => Shift(yy_state_391) + NT_lexmatch_header => Shift(yy_state_399) + NT_match_header => Shift(yy_state_444) + T_MATCH => Shift(yy_state_605) + T_IF => Shift(yy_state_608) + T_TRY_EXCLAMATION => Shift(yy_state_614) + T_TRY_QUESTION => Shift(yy_state_616) + T_TRY => Shift(yy_state_618) + NT_loop_label_colon => Shift(yy_state_632) + T_POST_LABEL => Shift(yy_state_639) + T_EXTEND => Shift(yy_state_641) + T_LIDENT => Shift(yy_state_648) + NT_expr => Shift(yy_state_1160) + T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_1071) + _ => Error + } +} + +fn yy_state_1(_lookahead : YYSymbol) -> YYDecision { + Accept +} + +fn yy_state_2(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + NT_multiline_string => Shift(yy_state_2) + NT_non_empty_list_multiline_string_ => Shift(yy_state_3) + T_MULTILINE_INTERP => Shift(yy_state_4) + T_MULTILINE_STRING => Shift(yy_state_5) + T_INFIX1 | T_INFIX2 | T_INFIX3 | T_INFIX4 | T_EOF | T_WITH | T_CATCH | T_EQ_TILDE | T_LPAREN | T_RPAREN | T_COMMA | T_MINUS | T_DOT_LIDENT | T_DOT_INT | T_COLON | T_SEMI | T_LBRACKET | T_PLUS | T_RBRACKET | T_BAR_RBRACKET | T_BAR | T_LBRACE | T_RBRACE | T_AMPERAMPER | T_AMPER | T_CARET | T_BARBAR | T_AS | T_PIPE | T_PIPE_LEFT | T_LT_PLUS | T_LT_QUESTION | T_ELSE | T_IF | T_FAT_ARROW | T_DOTDOT | T_RANGE_INCLUSIVE | T_RANGE_LT_INCLUSIVE | T_RANGE_EXCLUSIVE | T_RANGE_INCLUSIVE_REV | T_RANGE_EXCLUSIVE_REV | T_IS | T_AND | T_IMPLIES | T_LEXMATCH_QUESTION => Reduce(1, NT_non_empty_list_multiline_string_, yy_action_1070) + _ => Error + } +} + +fn yy_state_3(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(2, NT_non_empty_list_multiline_string_, yy_action_1069) +} + +fn yy_state_4(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_multiline_string, yy_action_1068) +} + +fn yy_state_5(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_multiline_string, yy_action_1067) +} + +fn yy_state_6(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_simple_constant, yy_action_1066) +} + +fn yy_state_7(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_simple_constant, yy_action_1065) +} + +fn yy_state_8(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_simple_constant, yy_action_1064) +} + +fn yy_state_9(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_simple_constant, yy_action_1063) +} + +fn yy_state_10(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_simple_constant, yy_action_1062) +} + +fn yy_state_11(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_simple_constant, yy_action_1061) +} + +fn yy_state_12(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_simple_constant, yy_action_1060) +} + +fn yy_state_13(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_simple_constant, yy_action_1059) +} + +fn yy_state_14(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_simple_constant, yy_action_1058) +} + +fn yy_state_15(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_simple_constant, yy_action_1057) +} + +fn yy_state_16(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_atomic_expr, yy_action_1056) +} + +fn yy_state_17(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_atomic_expr, yy_action_1055) +} + +fn yy_state_18(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_atomic_expr, yy_action_1054) +} + +fn yy_state_19(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_atomic_expr, yy_action_1053) +} + +fn yy_state_20(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + NT_qual_ident_ty => Shift(yy_state_21) + T_PACKAGE_NAME => Shift(yy_state_22) + T_UIDENT => Shift(yy_state_25) + _ => Error + } +} + +fn yy_state_21(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(2, NT_type_name, yy_action_1052) +} + +fn yy_state_22(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_DOT_UIDENT => Shift(yy_state_23) + T_DOT_LIDENT => Shift(yy_state_24) + _ => Error + } +} + +fn yy_state_23(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(2, NT_qual_ident_ty, yy_action_1051) +} + +fn yy_state_24(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(2, NT_qual_ident_ty, yy_action_1050) +} + +fn yy_state_25(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_qual_ident_ty, yy_action_1049) +} + +fn yy_state_26(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_type_name, yy_action_1048) +} + +fn yy_state_27(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_simple_expr, yy_action_1047) +} + +fn yy_state_28(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + NT_multiline_string => Shift(yy_state_2) + T_MULTILINE_INTERP => Shift(yy_state_4) + T_MULTILINE_STRING => Shift(yy_state_5) + T_REGEX_LITERAL => Shift(yy_state_6) + T_STRING => Shift(yy_state_7) + T_FLOAT => Shift(yy_state_8) + T_DOUBLE => Shift(yy_state_9) + T_INT => Shift(yy_state_10) + T_CHAR => Shift(yy_state_11) + T_BYTES => Shift(yy_state_12) + T_BYTE => Shift(yy_state_13) + T_FALSE => Shift(yy_state_14) + T_TRUE => Shift(yy_state_15) + T_BYTES_INTERP => Shift(yy_state_16) + T_INTERP => Shift(yy_state_17) + NT_non_empty_list_multiline_string_ => Shift(yy_state_18) + NT_simple_constant => Shift(yy_state_19) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + NT_tuple_expr => Shift(yy_state_27) + T_LBRACKET_BAR => Shift(yy_state_28) + NT_spreadable_elem => Shift(yy_state_29) + NT_non_empty_list_commas_rev_spreadable_elem_ => Shift(yy_state_30) + T_DOTDOT => Shift(yy_state_34) + T_LBRACKET => Shift(yy_state_36) + NT_non_empty_list_commas_spreadable_elem_ => Shift(yy_state_37) + NT_expr => Shift(yy_state_38) + NT_constr => Shift(yy_state_47) + NT_qual_ident_simple_expr => Shift(yy_state_48) + NT_atomic_expr => Shift(yy_state_50) + NT_anony_fn => Shift(yy_state_51) + T_LBRACE => Shift(yy_state_52) + T_FN => Shift(yy_state_61) + NT_type_name => Shift(yy_state_139) + T_ASYNC => Shift(yy_state_152) + NT_simple_expr => Shift(yy_state_165) + T_EXCLAMATION => Shift(yy_state_176) + T_MINUS => Shift(yy_state_191) + T_PLUS => Shift(yy_state_193) + T_UIDENT => Shift(yy_state_195) + T_PACKAGE_NAME => Shift(yy_state_196) + NT_prefix_expr => Shift(yy_state_201) + NT_range_expr => Shift(yy_state_212) + NT_postfix_expr => Shift(yy_state_223) + T_EXISTS => Shift(yy_state_224) + T_FORALL => Shift(yy_state_256) + NT_infix_expr => Shift(yy_state_272) + T_UNDERSCORE => Shift(yy_state_273) + T_LPAREN => Shift(yy_state_281) + NT_pipe_expr => Shift(yy_state_325) + NT_arrow_fn_expr => Shift(yy_state_344) + NT_quantifier_expr => Shift(yy_state_345) + NT_simple_try_expr => Shift(yy_state_346) + NT_lexscan_expr => Shift(yy_state_347) + NT_lexmatch_expr => Shift(yy_state_348) + NT_match_expr => Shift(yy_state_349) + NT_if_expr => Shift(yy_state_350) + NT_try_expr => Shift(yy_state_351) + NT_while_expr => Shift(yy_state_352) + NT_foreach_expr => Shift(yy_state_353) + NT_for_expr => Shift(yy_state_354) + T_LEXSCAN => Shift(yy_state_355) + NT_lexscan_header => Shift(yy_state_358) + T_LEXMATCH => Shift(yy_state_391) + NT_lexmatch_header => Shift(yy_state_399) + NT_match_header => Shift(yy_state_444) + T_MATCH => Shift(yy_state_605) + T_IF => Shift(yy_state_608) + T_TRY_EXCLAMATION => Shift(yy_state_614) + T_TRY_QUESTION => Shift(yy_state_616) + T_TRY => Shift(yy_state_618) + NT_loop_label_colon => Shift(yy_state_632) + T_POST_LABEL => Shift(yy_state_639) + T_EXTEND => Shift(yy_state_641) + T_LIDENT => Shift(yy_state_648) + NT_list_commas_spreadable_elem_ => Shift(yy_state_1144) + T_FOR => Shift(yy_state_1146) + T_WHILE => Reduce(0, NT_loop_label_colon, yy_action_1071) + T_BAR_RBRACKET => Reduce(0, NT_list_commas_spreadable_elem_, yy_action_1046) + _ => Error + } +} + +fn yy_state_29(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_non_empty_list_commas_rev_spreadable_elem_, yy_action_1045) +} + +fn yy_state_30(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + NT_option_COMMA_ => Shift(yy_state_31) + T_COMMA => Shift(yy_state_32) + T_RBRACKET | T_BAR_RBRACKET => Reduce(0, NT_option_COMMA_, yy_action_1044) + _ => Error + } +} + +fn yy_state_31(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(2, NT_non_empty_list_commas_spreadable_elem_, yy_action_1043) +} + +fn yy_state_32(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + NT_multiline_string => Shift(yy_state_2) + T_MULTILINE_INTERP => Shift(yy_state_4) + T_MULTILINE_STRING => Shift(yy_state_5) + T_REGEX_LITERAL => Shift(yy_state_6) + T_STRING => Shift(yy_state_7) + T_FLOAT => Shift(yy_state_8) + T_DOUBLE => Shift(yy_state_9) + T_INT => Shift(yy_state_10) + T_CHAR => Shift(yy_state_11) + T_BYTES => Shift(yy_state_12) + T_BYTE => Shift(yy_state_13) + T_FALSE => Shift(yy_state_14) + T_TRUE => Shift(yy_state_15) + T_BYTES_INTERP => Shift(yy_state_16) + T_INTERP => Shift(yy_state_17) + NT_non_empty_list_multiline_string_ => Shift(yy_state_18) + NT_simple_constant => Shift(yy_state_19) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + NT_tuple_expr => Shift(yy_state_27) + T_LBRACKET_BAR => Shift(yy_state_28) + NT_spreadable_elem => Shift(yy_state_33) + T_DOTDOT => Shift(yy_state_34) + T_LBRACKET => Shift(yy_state_36) + NT_expr => Shift(yy_state_38) + NT_constr => Shift(yy_state_47) + NT_qual_ident_simple_expr => Shift(yy_state_48) + NT_atomic_expr => Shift(yy_state_50) + NT_anony_fn => Shift(yy_state_51) + T_LBRACE => Shift(yy_state_52) + T_FN => Shift(yy_state_61) + NT_type_name => Shift(yy_state_139) + T_ASYNC => Shift(yy_state_152) + NT_simple_expr => Shift(yy_state_165) + T_EXCLAMATION => Shift(yy_state_176) + T_MINUS => Shift(yy_state_191) + T_PLUS => Shift(yy_state_193) + T_UIDENT => Shift(yy_state_195) + T_PACKAGE_NAME => Shift(yy_state_196) + NT_prefix_expr => Shift(yy_state_201) + NT_range_expr => Shift(yy_state_212) + NT_postfix_expr => Shift(yy_state_223) + T_EXISTS => Shift(yy_state_224) + T_FORALL => Shift(yy_state_256) + NT_infix_expr => Shift(yy_state_272) + T_UNDERSCORE => Shift(yy_state_273) + T_LPAREN => Shift(yy_state_281) + NT_pipe_expr => Shift(yy_state_325) + NT_arrow_fn_expr => Shift(yy_state_344) + NT_quantifier_expr => Shift(yy_state_345) + NT_simple_try_expr => Shift(yy_state_346) + NT_lexscan_expr => Shift(yy_state_347) + NT_lexmatch_expr => Shift(yy_state_348) + NT_match_expr => Shift(yy_state_349) + NT_if_expr => Shift(yy_state_350) + NT_try_expr => Shift(yy_state_351) + NT_while_expr => Shift(yy_state_352) + NT_foreach_expr => Shift(yy_state_353) + NT_for_expr => Shift(yy_state_354) + T_LEXSCAN => Shift(yy_state_355) + NT_lexscan_header => Shift(yy_state_358) + T_LEXMATCH => Shift(yy_state_391) + NT_lexmatch_header => Shift(yy_state_399) + NT_match_header => Shift(yy_state_444) + T_MATCH => Shift(yy_state_605) + T_IF => Shift(yy_state_608) + T_TRY_EXCLAMATION => Shift(yy_state_614) + T_TRY_QUESTION => Shift(yy_state_616) + T_TRY => Shift(yy_state_618) + NT_loop_label_colon => Shift(yy_state_632) + T_POST_LABEL => Shift(yy_state_639) + T_EXTEND => Shift(yy_state_641) + T_LIDENT => Shift(yy_state_648) + T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_1071) + T_RBRACKET | T_BAR_RBRACKET => Reduce(1, NT_option_COMMA_, yy_action_1042) + _ => Error + } +} + +fn yy_state_33(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_non_empty_list_commas_rev_spreadable_elem_, yy_action_1041) +} + +fn yy_state_34(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + NT_multiline_string => Shift(yy_state_2) + T_MULTILINE_INTERP => Shift(yy_state_4) + T_MULTILINE_STRING => Shift(yy_state_5) + T_REGEX_LITERAL => Shift(yy_state_6) + T_STRING => Shift(yy_state_7) + T_FLOAT => Shift(yy_state_8) + T_DOUBLE => Shift(yy_state_9) + T_INT => Shift(yy_state_10) + T_CHAR => Shift(yy_state_11) + T_BYTES => Shift(yy_state_12) + T_BYTE => Shift(yy_state_13) + T_FALSE => Shift(yy_state_14) + T_TRUE => Shift(yy_state_15) + T_BYTES_INTERP => Shift(yy_state_16) + T_INTERP => Shift(yy_state_17) + NT_non_empty_list_multiline_string_ => Shift(yy_state_18) + NT_simple_constant => Shift(yy_state_19) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + NT_tuple_expr => Shift(yy_state_27) + T_LBRACKET_BAR => Shift(yy_state_28) + NT_expr => Shift(yy_state_35) + T_LBRACKET => Shift(yy_state_36) + NT_constr => Shift(yy_state_47) + NT_qual_ident_simple_expr => Shift(yy_state_48) + NT_atomic_expr => Shift(yy_state_50) + NT_anony_fn => Shift(yy_state_51) + T_LBRACE => Shift(yy_state_52) + T_FN => Shift(yy_state_61) + NT_type_name => Shift(yy_state_139) + T_ASYNC => Shift(yy_state_152) + NT_simple_expr => Shift(yy_state_165) + T_EXCLAMATION => Shift(yy_state_176) + T_MINUS => Shift(yy_state_191) + T_PLUS => Shift(yy_state_193) + T_UIDENT => Shift(yy_state_195) + T_PACKAGE_NAME => Shift(yy_state_196) + NT_prefix_expr => Shift(yy_state_201) + NT_range_expr => Shift(yy_state_212) + NT_postfix_expr => Shift(yy_state_223) + T_EXISTS => Shift(yy_state_224) + T_FORALL => Shift(yy_state_256) + NT_infix_expr => Shift(yy_state_272) + T_UNDERSCORE => Shift(yy_state_273) + T_LPAREN => Shift(yy_state_281) + NT_pipe_expr => Shift(yy_state_325) + NT_arrow_fn_expr => Shift(yy_state_344) + NT_quantifier_expr => Shift(yy_state_345) + NT_simple_try_expr => Shift(yy_state_346) + NT_lexscan_expr => Shift(yy_state_347) + NT_lexmatch_expr => Shift(yy_state_348) + NT_match_expr => Shift(yy_state_349) + NT_if_expr => Shift(yy_state_350) + NT_try_expr => Shift(yy_state_351) + NT_while_expr => Shift(yy_state_352) + NT_foreach_expr => Shift(yy_state_353) + NT_for_expr => Shift(yy_state_354) + T_LEXSCAN => Shift(yy_state_355) + NT_lexscan_header => Shift(yy_state_358) + T_LEXMATCH => Shift(yy_state_391) + NT_lexmatch_header => Shift(yy_state_399) + NT_match_header => Shift(yy_state_444) + T_MATCH => Shift(yy_state_605) + T_IF => Shift(yy_state_608) + T_TRY_EXCLAMATION => Shift(yy_state_614) + T_TRY_QUESTION => Shift(yy_state_616) + T_TRY => Shift(yy_state_618) + NT_loop_label_colon => Shift(yy_state_632) + T_POST_LABEL => Shift(yy_state_639) + T_EXTEND => Shift(yy_state_641) + T_LIDENT => Shift(yy_state_648) + T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_1071) + _ => Error + } +} + +fn yy_state_35(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(2, NT_spreadable_elem, yy_action_1040) +} + +fn yy_state_36(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + NT_multiline_string => Shift(yy_state_2) + T_MULTILINE_INTERP => Shift(yy_state_4) + T_MULTILINE_STRING => Shift(yy_state_5) + T_REGEX_LITERAL => Shift(yy_state_6) + T_STRING => Shift(yy_state_7) + T_FLOAT => Shift(yy_state_8) + T_DOUBLE => Shift(yy_state_9) + T_INT => Shift(yy_state_10) + T_CHAR => Shift(yy_state_11) + T_BYTES => Shift(yy_state_12) + T_BYTE => Shift(yy_state_13) + T_FALSE => Shift(yy_state_14) + T_TRUE => Shift(yy_state_15) + T_BYTES_INTERP => Shift(yy_state_16) + T_INTERP => Shift(yy_state_17) + NT_non_empty_list_multiline_string_ => Shift(yy_state_18) + NT_simple_constant => Shift(yy_state_19) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + NT_tuple_expr => Shift(yy_state_27) + T_LBRACKET_BAR => Shift(yy_state_28) + NT_spreadable_elem => Shift(yy_state_29) + NT_non_empty_list_commas_rev_spreadable_elem_ => Shift(yy_state_30) + T_DOTDOT => Shift(yy_state_34) + T_LBRACKET => Shift(yy_state_36) + NT_non_empty_list_commas_spreadable_elem_ => Shift(yy_state_37) + NT_expr => Shift(yy_state_38) + NT_list_commas_spreadable_elem_ => Shift(yy_state_39) + T_FOR => Shift(yy_state_41) + NT_constr => Shift(yy_state_47) + NT_qual_ident_simple_expr => Shift(yy_state_48) + NT_atomic_expr => Shift(yy_state_50) + NT_anony_fn => Shift(yy_state_51) + T_LBRACE => Shift(yy_state_52) + T_FN => Shift(yy_state_61) + NT_type_name => Shift(yy_state_139) + T_ASYNC => Shift(yy_state_152) + NT_simple_expr => Shift(yy_state_165) + T_EXCLAMATION => Shift(yy_state_176) + T_MINUS => Shift(yy_state_191) + T_PLUS => Shift(yy_state_193) + T_UIDENT => Shift(yy_state_195) + T_PACKAGE_NAME => Shift(yy_state_196) + NT_prefix_expr => Shift(yy_state_201) + NT_range_expr => Shift(yy_state_212) + NT_postfix_expr => Shift(yy_state_223) + T_EXISTS => Shift(yy_state_224) + T_FORALL => Shift(yy_state_256) + NT_infix_expr => Shift(yy_state_272) + T_UNDERSCORE => Shift(yy_state_273) + T_LPAREN => Shift(yy_state_281) + NT_pipe_expr => Shift(yy_state_325) + NT_arrow_fn_expr => Shift(yy_state_344) + NT_quantifier_expr => Shift(yy_state_345) + NT_simple_try_expr => Shift(yy_state_346) + NT_lexscan_expr => Shift(yy_state_347) + NT_lexmatch_expr => Shift(yy_state_348) + NT_match_expr => Shift(yy_state_349) + NT_if_expr => Shift(yy_state_350) + NT_try_expr => Shift(yy_state_351) + NT_while_expr => Shift(yy_state_352) + NT_foreach_expr => Shift(yy_state_353) + NT_for_expr => Shift(yy_state_354) + T_LEXSCAN => Shift(yy_state_355) + NT_lexscan_header => Shift(yy_state_358) + T_LEXMATCH => Shift(yy_state_391) + NT_lexmatch_header => Shift(yy_state_399) + NT_match_header => Shift(yy_state_444) + T_MATCH => Shift(yy_state_605) + T_IF => Shift(yy_state_608) + T_TRY_EXCLAMATION => Shift(yy_state_614) + T_TRY_QUESTION => Shift(yy_state_616) + T_TRY => Shift(yy_state_618) + NT_loop_label_colon => Shift(yy_state_632) + T_POST_LABEL => Shift(yy_state_639) + T_EXTEND => Shift(yy_state_641) + T_LIDENT => Shift(yy_state_648) + T_WHILE => Reduce(0, NT_loop_label_colon, yy_action_1071) + T_RBRACKET => Reduce(0, NT_list_commas_spreadable_elem_, yy_action_1046) + _ => Error + } +} + +fn yy_state_37(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_list_commas_spreadable_elem_, yy_action_1039) +} + +fn yy_state_38(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_spreadable_elem, yy_action_1038) +} + +fn yy_state_39(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_RBRACKET => Shift(yy_state_40) + _ => Error + } +} + +fn yy_state_40(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_simple_expr, yy_action_1037) +} + +fn yy_state_41(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + NT_foreach_binder => Shift(yy_state_42) + NT_non_empty_list_commas_rev_separated_pair_binder_EQUAL_infix_expr__ => Shift(yy_state_43) + NT_non_empty_list_commas_rev_foreach_binder_ => Shift(yy_state_665) + T_UNDERSCORE => Shift(yy_state_668) + NT_non_empty_list_commas_no_trailing_separated_pair_binder_EQUAL_infix_expr__ => Shift(yy_state_1111) + NT_list_comp_for_header => Shift(yy_state_1112) + NT_non_empty_list_commas_foreach_binder_ => Shift(yy_state_1117) + NT_list_commas_no_trailing_separated_pair_binder_EQUAL_infix_expr__ => Shift(yy_state_1135) + T_EXTEND => Shift(yy_state_1136) + T_LIDENT => Shift(yy_state_1137) + NT_for_binders_infix => Shift(yy_state_1138) + T_SEMI | T_IF | T_FAT_ARROW => Reduce(0, NT_list_commas_no_trailing_separated_pair_binder_EQUAL_infix_expr__, yy_action_1036) + _ => Error + } +} + +fn yy_state_42(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_non_empty_list_commas_rev_foreach_binder_, yy_action_1035) +} + +fn yy_state_43(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_COMMA => Shift(yy_state_44) + T_SEMI | T_IF | T_FAT_ARROW => Reduce(1, NT_non_empty_list_commas_no_trailing_separated_pair_binder_EQUAL_infix_expr__, yy_action_1034) + _ => Error + } +} + +fn yy_state_44(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_EXTEND => Shift(yy_state_45) + T_LIDENT => Shift(yy_state_1108) + _ => Error + } +} + +fn yy_state_45(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_EQUAL => Shift(yy_state_46) + _ => Error + } +} + +fn yy_state_46(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + NT_multiline_string => Shift(yy_state_2) + T_MULTILINE_INTERP => Shift(yy_state_4) + T_MULTILINE_STRING => Shift(yy_state_5) + T_REGEX_LITERAL => Shift(yy_state_6) + T_STRING => Shift(yy_state_7) + T_FLOAT => Shift(yy_state_8) + T_DOUBLE => Shift(yy_state_9) + T_INT => Shift(yy_state_10) + T_CHAR => Shift(yy_state_11) + T_BYTES => Shift(yy_state_12) + T_BYTE => Shift(yy_state_13) + T_FALSE => Shift(yy_state_14) + T_TRUE => Shift(yy_state_15) + T_BYTES_INTERP => Shift(yy_state_16) + T_INTERP => Shift(yy_state_17) + NT_non_empty_list_multiline_string_ => Shift(yy_state_18) + NT_simple_constant => Shift(yy_state_19) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + NT_tuple_expr => Shift(yy_state_27) + T_LBRACKET_BAR => Shift(yy_state_28) + T_LBRACKET => Shift(yy_state_36) + NT_constr => Shift(yy_state_47) + NT_qual_ident_simple_expr => Shift(yy_state_48) + T_UNDERSCORE => Shift(yy_state_49) + NT_atomic_expr => Shift(yy_state_50) + NT_anony_fn => Shift(yy_state_51) + T_LBRACE => Shift(yy_state_52) + T_FN => Shift(yy_state_61) + NT_type_name => Shift(yy_state_139) + T_ASYNC => Shift(yy_state_152) + NT_simple_expr => Shift(yy_state_165) + T_EXCLAMATION => Shift(yy_state_176) + T_LPAREN => Shift(yy_state_177) + T_MINUS => Shift(yy_state_191) + T_PLUS => Shift(yy_state_193) + T_UIDENT => Shift(yy_state_195) + T_PACKAGE_NAME => Shift(yy_state_196) + T_EXTEND => Shift(yy_state_199) + T_LIDENT => Shift(yy_state_200) + NT_prefix_expr => Shift(yy_state_201) + NT_range_expr => Shift(yy_state_212) + NT_postfix_expr => Shift(yy_state_223) + NT_infix_expr => Shift(yy_state_1107) + _ => Error + } +} + +fn yy_state_47(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_simple_expr, yy_action_1033) +} + +fn yy_state_48(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_simple_expr, yy_action_1032) +} + +fn yy_state_49(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_simple_expr, yy_action_1031) +} + +fn yy_state_50(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_simple_expr, yy_action_1030) +} + +fn yy_state_51(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_simple_expr, yy_action_1029) +} + +fn yy_state_52(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + NT_multiline_string => Shift(yy_state_2) + T_MULTILINE_INTERP => Shift(yy_state_4) + T_MULTILINE_STRING => Shift(yy_state_5) + T_REGEX_LITERAL => Shift(yy_state_6) + T_STRING => Shift(yy_state_7) + T_FLOAT => Shift(yy_state_8) + T_DOUBLE => Shift(yy_state_9) + T_INT => Shift(yy_state_10) + T_CHAR => Shift(yy_state_11) + T_BYTES => Shift(yy_state_12) + T_BYTE => Shift(yy_state_13) + T_FALSE => Shift(yy_state_14) + T_TRUE => Shift(yy_state_15) + T_BYTES_INTERP => Shift(yy_state_16) + T_INTERP => Shift(yy_state_17) + NT_non_empty_list_multiline_string_ => Shift(yy_state_18) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + NT_tuple_expr => Shift(yy_state_27) + T_LBRACKET_BAR => Shift(yy_state_28) + T_LBRACKET => Shift(yy_state_36) + NT_constr => Shift(yy_state_47) + NT_qual_ident_simple_expr => Shift(yy_state_48) + NT_atomic_expr => Shift(yy_state_50) + NT_anony_fn => Shift(yy_state_51) + T_LBRACE => Shift(yy_state_52) + NT_map_expr_elem => Shift(yy_state_53) + NT_non_empty_list_commas_rev_map_expr_elem_ => Shift(yy_state_54) + NT_map_syntax_key => Shift(yy_state_58) + NT_statement => Shift(yy_state_134) + NT_type_name => Shift(yy_state_139) + T_EXCLAMATION => Shift(yy_state_176) + T_PLUS => Shift(yy_state_193) + T_UIDENT => Shift(yy_state_195) + NT_prefix_expr => Shift(yy_state_201) + NT_range_expr => Shift(yy_state_212) + NT_postfix_expr => Shift(yy_state_223) + T_EXISTS => Shift(yy_state_224) + T_FORALL => Shift(yy_state_256) + NT_infix_expr => Shift(yy_state_272) + T_UNDERSCORE => Shift(yy_state_273) + NT_qual_ident => Shift(yy_state_275) + NT_simple_expr => Shift(yy_state_276) + T_LPAREN => Shift(yy_state_281) + NT_pipe_expr => Shift(yy_state_325) + NT_arrow_fn_expr => Shift(yy_state_344) + NT_quantifier_expr => Shift(yy_state_345) + NT_simple_try_expr => Shift(yy_state_346) + NT_lexscan_expr => Shift(yy_state_347) + NT_lexmatch_expr => Shift(yy_state_348) + NT_match_expr => Shift(yy_state_349) + NT_if_expr => Shift(yy_state_350) + NT_try_expr => Shift(yy_state_351) + NT_while_expr => Shift(yy_state_352) + NT_foreach_expr => Shift(yy_state_353) + NT_for_expr => Shift(yy_state_354) + T_LEXSCAN => Shift(yy_state_355) + NT_lexscan_header => Shift(yy_state_358) + T_LEXMATCH => Shift(yy_state_391) + NT_lexmatch_header => Shift(yy_state_399) + NT_match_header => Shift(yy_state_444) + T_MATCH => Shift(yy_state_605) + T_IF => Shift(yy_state_608) + T_TRY_EXCLAMATION => Shift(yy_state_614) + T_TRY_QUESTION => Shift(yy_state_616) + T_TRY => Shift(yy_state_618) + NT_loop_label_colon => Shift(yy_state_632) + T_POST_LABEL => Shift(yy_state_639) + NT_expr => Shift(yy_state_644) + NT_left_value => Shift(yy_state_645) + T_ELLIPSIS => Shift(yy_state_651) + T_RAISE => Shift(yy_state_652) + T_PACKAGE_NAME => Shift(yy_state_654) + NT_expr_statement_no_break_continue_return => Shift(yy_state_734) + T_RETURN => Shift(yy_state_735) + T_CONTINUE => Shift(yy_state_738) + T_BREAK => Shift(yy_state_747) + T_GUARD => Shift(yy_state_765) + NT_expr_statement => Shift(yy_state_769) + T_PROOF_LET => Shift(yy_state_770) + T_PROOF_ASSERT => Shift(yy_state_777) + T_DEFER => Shift(yy_state_779) + NT_guard_statement => Shift(yy_state_781) + T_FN => Shift(yy_state_782) + T_ASYNC => Shift(yy_state_791) + T_LETREC => Shift(yy_state_801) + T_LET => Shift(yy_state_849) + NT_non_empty_list_commas_map_expr_elem_ => Shift(yy_state_1071) + NT_non_empty_list_semi_rev_aux_statement_ => Shift(yy_state_1072) + NT_simple_constant => Shift(yy_state_1074) + NT_list_commas_map_expr_elem_ => Shift(yy_state_1075) + NT_none_empty_list_semis_rev_with_trailing_info_statement_ => Shift(yy_state_1077) + T_DOTDOT => Shift(yy_state_1079) + NT_record_defn => Shift(yy_state_1085) + T_MINUS => Shift(yy_state_1087) + T_EXTEND => Shift(yy_state_1091) + T_LIDENT => Shift(yy_state_1099) + T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_1071) + T_RBRACE => Reduce(0, NT_list_commas_map_expr_elem_, yy_action_1028) + _ => Error + } +} + +fn yy_state_53(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_non_empty_list_commas_rev_map_expr_elem_, yy_action_1027) +} + +fn yy_state_54(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + NT_option_COMMA_ => Shift(yy_state_55) + T_COMMA => Shift(yy_state_56) + T_RBRACE => Reduce(0, NT_option_COMMA_, yy_action_1044) + _ => Error + } +} + +fn yy_state_55(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(2, NT_non_empty_list_commas_map_expr_elem_, yy_action_1026) +} + +fn yy_state_56(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_REGEX_LITERAL => Shift(yy_state_6) + T_STRING => Shift(yy_state_7) + T_FLOAT => Shift(yy_state_8) + T_DOUBLE => Shift(yy_state_9) + T_INT => Shift(yy_state_10) + T_CHAR => Shift(yy_state_11) + T_BYTES => Shift(yy_state_12) + T_BYTE => Shift(yy_state_13) + T_FALSE => Shift(yy_state_14) + T_TRUE => Shift(yy_state_15) + NT_map_expr_elem => Shift(yy_state_57) + NT_map_syntax_key => Shift(yy_state_58) + T_MINUS => Shift(yy_state_568) + NT_simple_constant => Shift(yy_state_572) + T_RBRACE => Reduce(1, NT_option_COMMA_, yy_action_1042) + _ => Error + } +} + +fn yy_state_57(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_non_empty_list_commas_rev_map_expr_elem_, yy_action_1025) +} + +fn yy_state_58(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_COLON => Shift(yy_state_59) + _ => Error + } +} + +fn yy_state_59(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + NT_multiline_string => Shift(yy_state_2) + T_MULTILINE_INTERP => Shift(yy_state_4) + T_MULTILINE_STRING => Shift(yy_state_5) + T_REGEX_LITERAL => Shift(yy_state_6) + T_STRING => Shift(yy_state_7) + T_FLOAT => Shift(yy_state_8) + T_DOUBLE => Shift(yy_state_9) + T_INT => Shift(yy_state_10) + T_CHAR => Shift(yy_state_11) + T_BYTES => Shift(yy_state_12) + T_BYTE => Shift(yy_state_13) + T_FALSE => Shift(yy_state_14) + T_TRUE => Shift(yy_state_15) + T_BYTES_INTERP => Shift(yy_state_16) + T_INTERP => Shift(yy_state_17) + NT_non_empty_list_multiline_string_ => Shift(yy_state_18) + NT_simple_constant => Shift(yy_state_19) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + NT_tuple_expr => Shift(yy_state_27) + T_LBRACKET_BAR => Shift(yy_state_28) + T_LBRACKET => Shift(yy_state_36) + NT_constr => Shift(yy_state_47) + NT_qual_ident_simple_expr => Shift(yy_state_48) + NT_atomic_expr => Shift(yy_state_50) + NT_anony_fn => Shift(yy_state_51) + T_LBRACE => Shift(yy_state_52) + NT_expr => Shift(yy_state_60) + T_FN => Shift(yy_state_61) + NT_type_name => Shift(yy_state_139) + T_ASYNC => Shift(yy_state_152) + NT_simple_expr => Shift(yy_state_165) + T_EXCLAMATION => Shift(yy_state_176) + T_MINUS => Shift(yy_state_191) + T_PLUS => Shift(yy_state_193) + T_UIDENT => Shift(yy_state_195) + T_PACKAGE_NAME => Shift(yy_state_196) + NT_prefix_expr => Shift(yy_state_201) + NT_range_expr => Shift(yy_state_212) + NT_postfix_expr => Shift(yy_state_223) + T_EXISTS => Shift(yy_state_224) + T_FORALL => Shift(yy_state_256) + NT_infix_expr => Shift(yy_state_272) + T_UNDERSCORE => Shift(yy_state_273) + T_LPAREN => Shift(yy_state_281) + NT_pipe_expr => Shift(yy_state_325) + NT_arrow_fn_expr => Shift(yy_state_344) + NT_quantifier_expr => Shift(yy_state_345) + NT_simple_try_expr => Shift(yy_state_346) + NT_lexscan_expr => Shift(yy_state_347) + NT_lexmatch_expr => Shift(yy_state_348) + NT_match_expr => Shift(yy_state_349) + NT_if_expr => Shift(yy_state_350) + NT_try_expr => Shift(yy_state_351) + NT_while_expr => Shift(yy_state_352) + NT_foreach_expr => Shift(yy_state_353) + NT_for_expr => Shift(yy_state_354) + T_LEXSCAN => Shift(yy_state_355) + NT_lexscan_header => Shift(yy_state_358) + T_LEXMATCH => Shift(yy_state_391) + NT_lexmatch_header => Shift(yy_state_399) + NT_match_header => Shift(yy_state_444) + T_MATCH => Shift(yy_state_605) + T_IF => Shift(yy_state_608) + T_TRY_EXCLAMATION => Shift(yy_state_614) + T_TRY_QUESTION => Shift(yy_state_616) + T_TRY => Shift(yy_state_618) + NT_loop_label_colon => Shift(yy_state_632) + T_POST_LABEL => Shift(yy_state_639) + T_EXTEND => Shift(yy_state_641) + T_LIDENT => Shift(yy_state_648) + T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_1071) + _ => Error + } +} + +fn yy_state_60(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_map_expr_elem, yy_action_1024) +} + +fn yy_state_61(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + NT_parameters => Shift(yy_state_62) + T_LPAREN => Shift(yy_state_157) + _ => Error + } +} + +fn yy_state_62(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + NT_error_annotation => Shift(yy_state_63) + T_THIN_ARROW => Shift(yy_state_64) + T_NORAISE => Shift(yy_state_91) + T_RAISE => Shift(yy_state_92) + NT_func_return_type => Shift(yy_state_131) + T_LBRACE => Reduce(0, NT_func_return_type, yy_action_1023) + _ => Error + } +} + +fn yy_state_63(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_func_return_type, yy_action_1022) +} + +fn yy_state_64(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_ASYNC => Shift(yy_state_65) + T_UNDERSCORE => Shift(yy_state_70) + T_AMPER => Shift(yy_state_71) + T_PACKAGE_NAME => Shift(yy_state_73) + T_UIDENT => Shift(yy_state_80) + T_LPAREN => Shift(yy_state_84) + NT_simple_type => Shift(yy_state_88) + NT_type_ => Shift(yy_state_97) + NT_return_type => Shift(yy_state_130) + _ => Error + } +} + +fn yy_state_65(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_LPAREN => Shift(yy_state_66) + _ => Error + } +} + +fn yy_state_66(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_ASYNC => Shift(yy_state_65) + T_RPAREN => Shift(yy_state_67) + T_UNDERSCORE => Shift(yy_state_70) + T_AMPER => Shift(yy_state_71) + T_PACKAGE_NAME => Shift(yy_state_73) + T_UIDENT => Shift(yy_state_80) + T_LPAREN => Shift(yy_state_84) + NT_simple_type => Shift(yy_state_110) + NT_type_ => Shift(yy_state_118) + _ => Error + } +} + +fn yy_state_67(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_THIN_ARROW => Shift(yy_state_68) + _ => Error + } +} + +fn yy_state_68(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_ASYNC => Shift(yy_state_65) + NT_return_type => Shift(yy_state_69) + T_UNDERSCORE => Shift(yy_state_70) + T_AMPER => Shift(yy_state_71) + T_PACKAGE_NAME => Shift(yy_state_73) + T_UIDENT => Shift(yy_state_80) + T_LPAREN => Shift(yy_state_84) + NT_simple_type => Shift(yy_state_88) + NT_type_ => Shift(yy_state_97) + _ => Error + } +} + +fn yy_state_69(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(5, NT_type_, yy_action_1021) +} + +fn yy_state_70(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_simple_type, yy_action_1020) +} + +fn yy_state_71(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_PACKAGE_NAME => Shift(yy_state_22) + T_UIDENT => Shift(yy_state_25) + NT_qual_ident_ty => Shift(yy_state_72) + _ => Error + } +} + +fn yy_state_72(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(2, NT_simple_type, yy_action_1019) +} + +fn yy_state_73(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_DOT_UIDENT => Shift(yy_state_74) + T_DOT_LIDENT => Shift(yy_state_114) + _ => Error + } +} + +fn yy_state_74(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_LBRACKET => Shift(yy_state_75) + T_EOF | T_DERIVE | T_WITH | T_RAISE | T_EQUAL | T_RPAREN | T_COMMA | T_QUESTION | T_SEMI | T_RBRACKET | T_LBRACE | T_RBRACE | T_NORAISE | T_WHERE => Reduce(2, NT_simple_type, yy_action_1017) + _ => Error + } +} + +fn yy_state_75(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_ASYNC => Shift(yy_state_65) + T_UNDERSCORE => Shift(yy_state_70) + T_AMPER => Shift(yy_state_71) + T_PACKAGE_NAME => Shift(yy_state_73) + NT_type_ => Shift(yy_state_76) + NT_non_empty_list_commas_rev_type__ => Shift(yy_state_77) + T_UIDENT => Shift(yy_state_80) + T_LPAREN => Shift(yy_state_84) + NT_simple_type => Shift(yy_state_110) + NT_non_empty_list_commas_type__ => Shift(yy_state_112) + _ => Error + } +} + +fn yy_state_76(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_non_empty_list_commas_rev_type__, yy_action_1016) +} + +fn yy_state_77(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_COMMA => Shift(yy_state_78) + NT_option_COMMA_ => Shift(yy_state_111) + T_RPAREN | T_RBRACKET => Reduce(0, NT_option_COMMA_, yy_action_1044) + _ => Error + } +} + +fn yy_state_78(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_ASYNC => Shift(yy_state_65) + T_UNDERSCORE => Shift(yy_state_70) + T_AMPER => Shift(yy_state_71) + T_PACKAGE_NAME => Shift(yy_state_73) + NT_type_ => Shift(yy_state_79) + T_UIDENT => Shift(yy_state_80) + T_LPAREN => Shift(yy_state_84) + NT_simple_type => Shift(yy_state_110) + T_RPAREN | T_RBRACKET => Reduce(1, NT_option_COMMA_, yy_action_1042) + _ => Error + } +} + +fn yy_state_79(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_non_empty_list_commas_rev_type__, yy_action_1015) +} + +fn yy_state_80(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_LBRACKET => Shift(yy_state_81) + T_EOF | T_DERIVE | T_WITH | T_RAISE | T_EQUAL | T_RPAREN | T_COMMA | T_QUESTION | T_SEMI | T_RBRACKET | T_LBRACE | T_RBRACE | T_NORAISE | T_WHERE => Reduce(1, NT_simple_type, yy_action_1014) + _ => Error + } +} + +fn yy_state_81(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_ASYNC => Shift(yy_state_65) + T_UNDERSCORE => Shift(yy_state_70) + T_AMPER => Shift(yy_state_71) + T_PACKAGE_NAME => Shift(yy_state_73) + NT_type_ => Shift(yy_state_76) + NT_non_empty_list_commas_rev_type__ => Shift(yy_state_77) + T_UIDENT => Shift(yy_state_80) + NT_non_empty_list_commas_type__ => Shift(yy_state_82) + T_LPAREN => Shift(yy_state_84) + NT_simple_type => Shift(yy_state_110) + _ => Error + } +} + +fn yy_state_82(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_RBRACKET => Shift(yy_state_83) + _ => Error + } +} + +fn yy_state_83(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(4, NT_simple_type, yy_action_1010) +} + +fn yy_state_84(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_ASYNC => Shift(yy_state_65) + T_UNDERSCORE => Shift(yy_state_70) + T_AMPER => Shift(yy_state_71) + T_PACKAGE_NAME => Shift(yy_state_73) + T_UIDENT => Shift(yy_state_80) + T_LPAREN => Shift(yy_state_84) + T_RPAREN => Shift(yy_state_85) + NT_type_ => Shift(yy_state_98) + NT_simple_type => Shift(yy_state_110) + _ => Error + } +} + +fn yy_state_85(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_THIN_ARROW => Shift(yy_state_86) + _ => Error + } +} + +fn yy_state_86(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_ASYNC => Shift(yy_state_65) + T_UNDERSCORE => Shift(yy_state_70) + T_AMPER => Shift(yy_state_71) + T_PACKAGE_NAME => Shift(yy_state_73) + T_UIDENT => Shift(yy_state_80) + T_LPAREN => Shift(yy_state_84) + NT_return_type => Shift(yy_state_87) + NT_simple_type => Shift(yy_state_88) + NT_type_ => Shift(yy_state_97) + _ => Error + } +} + +fn yy_state_87(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(4, NT_type_, yy_action_1009) +} + +fn yy_state_88(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_QUESTION => Shift(yy_state_89) + NT_error_annotation => Shift(yy_state_90) + T_NORAISE => Shift(yy_state_91) + T_RAISE => Shift(yy_state_92) + T_EOF | T_DERIVE | T_WITH | T_EQUAL | T_RPAREN | T_COMMA | T_SEMI | T_RBRACKET | T_LBRACE | T_RBRACE | T_WHERE => Reduce(1, NT_type_, yy_action_1008) + _ => Error + } +} + +fn yy_state_89(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(2, NT_simple_type, yy_action_1007) +} + +fn yy_state_90(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(2, NT_return_type, yy_action_1006) +} + +fn yy_state_91(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_error_annotation, yy_action_1005) +} + +fn yy_state_92(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_PACKAGE_NAME => Shift(yy_state_22) + T_UIDENT => Shift(yy_state_25) + T_UNDERSCORE => Shift(yy_state_93) + NT_qual_ident_ty => Shift(yy_state_94) + T_QUESTION => Shift(yy_state_95) + NT_error_type => Shift(yy_state_96) + T_EOF | T_DERIVE | T_WITH | T_EQUAL | T_RPAREN | T_COMMA | T_SEMI | T_RBRACKET | T_LBRACE | T_RBRACE | T_WHERE => Reduce(1, NT_error_annotation, yy_action_1004) + _ => Error + } +} + +fn yy_state_93(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_error_type, yy_action_1003) +} + +fn yy_state_94(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_error_type, yy_action_1002) +} + +fn yy_state_95(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(2, NT_error_annotation, yy_action_1001) +} + +fn yy_state_96(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(2, NT_error_annotation, yy_action_1000) +} + +fn yy_state_97(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_return_type, yy_action_999) +} + +fn yy_state_98(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_RPAREN => Shift(yy_state_99) + T_COMMA => Shift(yy_state_102) + _ => Error + } +} + +fn yy_state_99(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_THIN_ARROW => Shift(yy_state_100) + T_EOF | T_DERIVE | T_WITH | T_RAISE | T_EQUAL | T_RPAREN | T_COMMA | T_QUESTION | T_SEMI | T_RBRACKET | T_LBRACE | T_RBRACE | T_NORAISE | T_WHERE => Reduce(3, NT_simple_type, yy_action_998) + _ => Error + } +} + +fn yy_state_100(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_ASYNC => Shift(yy_state_65) + T_UNDERSCORE => Shift(yy_state_70) + T_AMPER => Shift(yy_state_71) + T_PACKAGE_NAME => Shift(yy_state_73) + T_UIDENT => Shift(yy_state_80) + T_LPAREN => Shift(yy_state_84) + NT_simple_type => Shift(yy_state_88) + NT_type_ => Shift(yy_state_97) + NT_return_type => Shift(yy_state_101) + _ => Error + } +} + +fn yy_state_101(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(5, NT_type_, yy_action_997) +} + +fn yy_state_102(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_ASYNC => Shift(yy_state_65) + T_UNDERSCORE => Shift(yy_state_70) + T_AMPER => Shift(yy_state_71) + T_PACKAGE_NAME => Shift(yy_state_73) + NT_type_ => Shift(yy_state_76) + NT_non_empty_list_commas_rev_type__ => Shift(yy_state_77) + T_UIDENT => Shift(yy_state_80) + T_LPAREN => Shift(yy_state_84) + T_RPAREN => Shift(yy_state_103) + NT_non_empty_list_commas_type__ => Shift(yy_state_106) + NT_simple_type => Shift(yy_state_110) + _ => Error + } +} + +fn yy_state_103(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_THIN_ARROW => Shift(yy_state_104) + _ => Error + } +} + +fn yy_state_104(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_ASYNC => Shift(yy_state_65) + T_UNDERSCORE => Shift(yy_state_70) + T_AMPER => Shift(yy_state_71) + T_PACKAGE_NAME => Shift(yy_state_73) + T_UIDENT => Shift(yy_state_80) + T_LPAREN => Shift(yy_state_84) + NT_simple_type => Shift(yy_state_88) + NT_type_ => Shift(yy_state_97) + NT_return_type => Shift(yy_state_105) + _ => Error + } +} + +fn yy_state_105(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(6, NT_type_, yy_action_996) +} + +fn yy_state_106(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_RPAREN => Shift(yy_state_107) + _ => Error + } +} + +fn yy_state_107(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_THIN_ARROW => Shift(yy_state_108) + T_EOF | T_DERIVE | T_WITH | T_RAISE | T_EQUAL | T_RPAREN | T_COMMA | T_QUESTION | T_SEMI | T_RBRACKET | T_LBRACE | T_RBRACE | T_NORAISE | T_WHERE => Reduce(5, NT_simple_type, yy_action_995) + _ => Error + } +} + +fn yy_state_108(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_ASYNC => Shift(yy_state_65) + T_UNDERSCORE => Shift(yy_state_70) + T_AMPER => Shift(yy_state_71) + T_PACKAGE_NAME => Shift(yy_state_73) + T_UIDENT => Shift(yy_state_80) + T_LPAREN => Shift(yy_state_84) + NT_simple_type => Shift(yy_state_88) + NT_type_ => Shift(yy_state_97) + NT_return_type => Shift(yy_state_109) + _ => Error + } +} + +fn yy_state_109(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(7, NT_type_, yy_action_994) +} + +fn yy_state_110(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_QUESTION => Shift(yy_state_89) + T_EOF | T_DERIVE | T_WITH | T_EQUAL | T_RPAREN | T_COMMA | T_SEMI | T_RBRACKET | T_RBRACE => Reduce(1, NT_type_, yy_action_1008) + _ => Error + } +} + +fn yy_state_111(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(2, NT_non_empty_list_commas_type__, yy_action_993) +} + +fn yy_state_112(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_RBRACKET => Shift(yy_state_113) + _ => Error + } +} + +fn yy_state_113(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(5, NT_simple_type, yy_action_991) +} + +fn yy_state_114(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_LBRACKET => Shift(yy_state_115) + T_EOF | T_DERIVE | T_WITH | T_RAISE | T_EQUAL | T_RPAREN | T_COMMA | T_QUESTION | T_SEMI | T_RBRACKET | T_LBRACE | T_RBRACE | T_NORAISE | T_WHERE => Reduce(2, NT_simple_type, yy_action_989) + _ => Error + } +} + +fn yy_state_115(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_ASYNC => Shift(yy_state_65) + T_UNDERSCORE => Shift(yy_state_70) + T_AMPER => Shift(yy_state_71) + T_PACKAGE_NAME => Shift(yy_state_73) + NT_type_ => Shift(yy_state_76) + NT_non_empty_list_commas_rev_type__ => Shift(yy_state_77) + T_UIDENT => Shift(yy_state_80) + T_LPAREN => Shift(yy_state_84) + NT_simple_type => Shift(yy_state_110) + NT_non_empty_list_commas_type__ => Shift(yy_state_116) + _ => Error + } +} + +fn yy_state_116(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_RBRACKET => Shift(yy_state_117) + _ => Error + } +} + +fn yy_state_117(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(5, NT_simple_type, yy_action_986) +} + +fn yy_state_118(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_RPAREN => Shift(yy_state_119) + T_COMMA => Shift(yy_state_122) + _ => Error + } +} + +fn yy_state_119(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_THIN_ARROW => Shift(yy_state_120) + _ => Error + } +} + +fn yy_state_120(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_ASYNC => Shift(yy_state_65) + T_UNDERSCORE => Shift(yy_state_70) + T_AMPER => Shift(yy_state_71) + T_PACKAGE_NAME => Shift(yy_state_73) + T_UIDENT => Shift(yy_state_80) + T_LPAREN => Shift(yy_state_84) + NT_simple_type => Shift(yy_state_88) + NT_type_ => Shift(yy_state_97) + NT_return_type => Shift(yy_state_121) + _ => Error + } +} + +fn yy_state_121(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(6, NT_type_, yy_action_985) +} + +fn yy_state_122(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_ASYNC => Shift(yy_state_65) + T_UNDERSCORE => Shift(yy_state_70) + T_AMPER => Shift(yy_state_71) + T_PACKAGE_NAME => Shift(yy_state_73) + NT_type_ => Shift(yy_state_76) + NT_non_empty_list_commas_rev_type__ => Shift(yy_state_77) + T_UIDENT => Shift(yy_state_80) + T_LPAREN => Shift(yy_state_84) + NT_simple_type => Shift(yy_state_110) + NT_non_empty_list_commas_type__ => Shift(yy_state_123) + T_RPAREN => Shift(yy_state_127) + _ => Error + } +} + +fn yy_state_123(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_RPAREN => Shift(yy_state_124) + _ => Error + } +} + +fn yy_state_124(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_THIN_ARROW => Shift(yy_state_125) + _ => Error + } +} + +fn yy_state_125(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_ASYNC => Shift(yy_state_65) + T_UNDERSCORE => Shift(yy_state_70) + T_AMPER => Shift(yy_state_71) + T_PACKAGE_NAME => Shift(yy_state_73) + T_UIDENT => Shift(yy_state_80) + T_LPAREN => Shift(yy_state_84) + NT_simple_type => Shift(yy_state_88) + NT_type_ => Shift(yy_state_97) + NT_return_type => Shift(yy_state_126) + _ => Error + } +} + +fn yy_state_126(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(8, NT_type_, yy_action_983) +} + +fn yy_state_127(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_THIN_ARROW => Shift(yy_state_128) + _ => Error + } +} + +fn yy_state_128(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_ASYNC => Shift(yy_state_65) + T_UNDERSCORE => Shift(yy_state_70) + T_AMPER => Shift(yy_state_71) + T_PACKAGE_NAME => Shift(yy_state_73) + T_UIDENT => Shift(yy_state_80) + T_LPAREN => Shift(yy_state_84) + NT_simple_type => Shift(yy_state_88) + NT_type_ => Shift(yy_state_97) + NT_return_type => Shift(yy_state_129) + _ => Error + } +} + +fn yy_state_129(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(7, NT_type_, yy_action_981) +} + +fn yy_state_130(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(2, NT_func_return_type, yy_action_980) +} + +fn yy_state_131(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + NT_block_expr => Shift(yy_state_132) + T_LBRACE => Shift(yy_state_133) + _ => Error + } +} + +fn yy_state_132(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(4, NT_anony_fn, yy_action_979) +} + +fn yy_state_133(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + NT_multiline_string => Shift(yy_state_2) + T_MULTILINE_INTERP => Shift(yy_state_4) + T_MULTILINE_STRING => Shift(yy_state_5) + T_REGEX_LITERAL => Shift(yy_state_6) + T_STRING => Shift(yy_state_7) + T_FLOAT => Shift(yy_state_8) + T_DOUBLE => Shift(yy_state_9) + T_INT => Shift(yy_state_10) + T_CHAR => Shift(yy_state_11) + T_BYTES => Shift(yy_state_12) + T_BYTE => Shift(yy_state_13) + T_FALSE => Shift(yy_state_14) + T_TRUE => Shift(yy_state_15) + T_BYTES_INTERP => Shift(yy_state_16) + T_INTERP => Shift(yy_state_17) + NT_non_empty_list_multiline_string_ => Shift(yy_state_18) + NT_simple_constant => Shift(yy_state_19) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + NT_tuple_expr => Shift(yy_state_27) + T_LBRACKET_BAR => Shift(yy_state_28) + T_LBRACKET => Shift(yy_state_36) + NT_constr => Shift(yy_state_47) + NT_qual_ident_simple_expr => Shift(yy_state_48) + NT_atomic_expr => Shift(yy_state_50) + NT_anony_fn => Shift(yy_state_51) + T_LBRACE => Shift(yy_state_52) + NT_statement => Shift(yy_state_134) + NT_non_empty_list_semi_rev_aux_statement_ => Shift(yy_state_135) + NT_type_name => Shift(yy_state_139) + T_EXCLAMATION => Shift(yy_state_176) + T_MINUS => Shift(yy_state_191) + T_PLUS => Shift(yy_state_193) + T_UIDENT => Shift(yy_state_195) + NT_prefix_expr => Shift(yy_state_201) + NT_range_expr => Shift(yy_state_212) + NT_postfix_expr => Shift(yy_state_223) + T_EXISTS => Shift(yy_state_224) + T_FORALL => Shift(yy_state_256) + NT_infix_expr => Shift(yy_state_272) + T_UNDERSCORE => Shift(yy_state_273) + NT_qual_ident => Shift(yy_state_275) + NT_simple_expr => Shift(yy_state_276) + T_LPAREN => Shift(yy_state_281) + NT_pipe_expr => Shift(yy_state_325) + NT_non_empty_list_semis_rev_statement_ => Shift(yy_state_341) + NT_arrow_fn_expr => Shift(yy_state_344) + NT_quantifier_expr => Shift(yy_state_345) + NT_simple_try_expr => Shift(yy_state_346) + NT_lexscan_expr => Shift(yy_state_347) + NT_lexmatch_expr => Shift(yy_state_348) + NT_match_expr => Shift(yy_state_349) + NT_if_expr => Shift(yy_state_350) + NT_try_expr => Shift(yy_state_351) + NT_while_expr => Shift(yy_state_352) + NT_foreach_expr => Shift(yy_state_353) + NT_for_expr => Shift(yy_state_354) + T_LEXSCAN => Shift(yy_state_355) + NT_lexscan_header => Shift(yy_state_358) + T_LEXMATCH => Shift(yy_state_391) + NT_lexmatch_header => Shift(yy_state_399) + NT_match_header => Shift(yy_state_444) + T_MATCH => Shift(yy_state_605) + T_IF => Shift(yy_state_608) + T_TRY_EXCLAMATION => Shift(yy_state_614) + T_TRY_QUESTION => Shift(yy_state_616) + T_TRY => Shift(yy_state_618) + NT_loop_label_colon => Shift(yy_state_632) + T_POST_LABEL => Shift(yy_state_639) + NT_expr => Shift(yy_state_644) + NT_left_value => Shift(yy_state_645) + T_ELLIPSIS => Shift(yy_state_651) + T_RAISE => Shift(yy_state_652) + T_PACKAGE_NAME => Shift(yy_state_654) + T_EXTEND => Shift(yy_state_656) + T_LIDENT => Shift(yy_state_657) + NT_expr_statement_no_break_continue_return => Shift(yy_state_734) + T_RETURN => Shift(yy_state_735) + T_CONTINUE => Shift(yy_state_738) + T_BREAK => Shift(yy_state_747) + T_GUARD => Shift(yy_state_765) + NT_expr_statement => Shift(yy_state_769) + T_PROOF_LET => Shift(yy_state_770) + T_PROOF_ASSERT => Shift(yy_state_777) + T_DEFER => Shift(yy_state_779) + NT_guard_statement => Shift(yy_state_781) + T_FN => Shift(yy_state_782) + T_ASYNC => Shift(yy_state_791) + T_LETREC => Shift(yy_state_801) + T_LET => Shift(yy_state_849) + NT_list_semis_rev_statement_ => Shift(yy_state_1069) + T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_1071) + T_RBRACE => Reduce(0, NT_list_semis_rev_statement_, yy_action_978) + _ => Error + } +} + +fn yy_state_134(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_non_empty_list_semi_rev_aux_statement_, yy_action_977) +} + +fn yy_state_135(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + NT_option_SEMI_ => Shift(yy_state_136) + T_SEMI => Shift(yy_state_137) + T_RBRACE => Reduce(0, NT_option_SEMI_, yy_action_976) + _ => Error + } +} + +fn yy_state_136(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(2, NT_non_empty_list_semis_rev_statement_, yy_action_975) +} + +fn yy_state_137(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + NT_multiline_string => Shift(yy_state_2) + T_MULTILINE_INTERP => Shift(yy_state_4) + T_MULTILINE_STRING => Shift(yy_state_5) + T_REGEX_LITERAL => Shift(yy_state_6) + T_STRING => Shift(yy_state_7) + T_FLOAT => Shift(yy_state_8) + T_DOUBLE => Shift(yy_state_9) + T_INT => Shift(yy_state_10) + T_CHAR => Shift(yy_state_11) + T_BYTES => Shift(yy_state_12) + T_BYTE => Shift(yy_state_13) + T_FALSE => Shift(yy_state_14) + T_TRUE => Shift(yy_state_15) + T_BYTES_INTERP => Shift(yy_state_16) + T_INTERP => Shift(yy_state_17) + NT_non_empty_list_multiline_string_ => Shift(yy_state_18) + NT_simple_constant => Shift(yy_state_19) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + NT_tuple_expr => Shift(yy_state_27) + T_LBRACKET_BAR => Shift(yy_state_28) + T_LBRACKET => Shift(yy_state_36) + NT_constr => Shift(yy_state_47) + NT_qual_ident_simple_expr => Shift(yy_state_48) + NT_atomic_expr => Shift(yy_state_50) + NT_anony_fn => Shift(yy_state_51) + T_LBRACE => Shift(yy_state_52) + NT_statement => Shift(yy_state_138) + NT_type_name => Shift(yy_state_139) + T_EXCLAMATION => Shift(yy_state_176) + T_MINUS => Shift(yy_state_191) + T_PLUS => Shift(yy_state_193) + T_UIDENT => Shift(yy_state_195) + NT_prefix_expr => Shift(yy_state_201) + NT_range_expr => Shift(yy_state_212) + NT_postfix_expr => Shift(yy_state_223) + T_EXISTS => Shift(yy_state_224) + T_FORALL => Shift(yy_state_256) + NT_infix_expr => Shift(yy_state_272) + T_UNDERSCORE => Shift(yy_state_273) + NT_qual_ident => Shift(yy_state_275) + NT_simple_expr => Shift(yy_state_276) + T_LPAREN => Shift(yy_state_281) + NT_pipe_expr => Shift(yy_state_325) + NT_arrow_fn_expr => Shift(yy_state_344) + NT_quantifier_expr => Shift(yy_state_345) + NT_simple_try_expr => Shift(yy_state_346) + NT_lexscan_expr => Shift(yy_state_347) + NT_lexmatch_expr => Shift(yy_state_348) + NT_match_expr => Shift(yy_state_349) + NT_if_expr => Shift(yy_state_350) + NT_try_expr => Shift(yy_state_351) + NT_while_expr => Shift(yy_state_352) + NT_foreach_expr => Shift(yy_state_353) + NT_for_expr => Shift(yy_state_354) + T_LEXSCAN => Shift(yy_state_355) + NT_lexscan_header => Shift(yy_state_358) + T_LEXMATCH => Shift(yy_state_391) + NT_lexmatch_header => Shift(yy_state_399) + NT_match_header => Shift(yy_state_444) + T_MATCH => Shift(yy_state_605) + T_IF => Shift(yy_state_608) + T_TRY_EXCLAMATION => Shift(yy_state_614) + T_TRY_QUESTION => Shift(yy_state_616) + T_TRY => Shift(yy_state_618) + NT_loop_label_colon => Shift(yy_state_632) + T_POST_LABEL => Shift(yy_state_639) + NT_expr => Shift(yy_state_644) + NT_left_value => Shift(yy_state_645) + T_ELLIPSIS => Shift(yy_state_651) + T_RAISE => Shift(yy_state_652) + T_PACKAGE_NAME => Shift(yy_state_654) + T_EXTEND => Shift(yy_state_656) + T_LIDENT => Shift(yy_state_657) + NT_expr_statement_no_break_continue_return => Shift(yy_state_734) + T_RETURN => Shift(yy_state_735) + T_CONTINUE => Shift(yy_state_738) + T_BREAK => Shift(yy_state_747) + T_GUARD => Shift(yy_state_765) + NT_expr_statement => Shift(yy_state_769) + T_PROOF_LET => Shift(yy_state_770) + T_PROOF_ASSERT => Shift(yy_state_777) + T_DEFER => Shift(yy_state_779) + NT_guard_statement => Shift(yy_state_781) + T_FN => Shift(yy_state_782) + T_ASYNC => Shift(yy_state_791) + T_LETREC => Shift(yy_state_801) + T_LET => Shift(yy_state_849) + T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_1071) + T_RBRACE => Reduce(1, NT_option_SEMI_, yy_action_974) + _ => Error + } +} + +fn yy_state_138(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_non_empty_list_semi_rev_aux_statement_, yy_action_973) +} + +fn yy_state_139(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_COLONCOLON => Shift(yy_state_140) + _ => Error + } +} + +fn yy_state_140(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_EXTEND => Shift(yy_state_141) + T_LIDENT => Shift(yy_state_142) + T_LBRACE => Shift(yy_state_143) + T_PACKAGE_NAME => Shift(yy_state_510) + T_UIDENT => Shift(yy_state_512) + _ => Error + } +} + +fn yy_state_141(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_simple_expr, yy_action_972) +} + +fn yy_state_142(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_simple_expr, yy_action_971) +} + +fn yy_state_143(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + NT_record_defn_single => Shift(yy_state_144) + NT_non_empty_list_commas_rev_record_defn_single_ => Shift(yy_state_145) + T_EXTEND => Shift(yy_state_149) + T_LIDENT => Shift(yy_state_1054) + NT_non_empty_list_commas_with_trailing_info_record_defn_single_ => Shift(yy_state_1057) + T_DOTDOT => Shift(yy_state_1058) + NT_list_commas_with_trailing_info_record_defn_single_ => Shift(yy_state_1067) + T_RBRACE => Reduce(0, NT_list_commas_with_trailing_info_record_defn_single_, yy_action_970) + _ => Error + } +} + +fn yy_state_144(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_non_empty_list_commas_rev_record_defn_single_, yy_action_969) +} + +fn yy_state_145(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + NT_option_COMMA_ => Shift(yy_state_146) + T_COMMA => Shift(yy_state_147) + T_RBRACE => Reduce(0, NT_option_COMMA_, yy_action_1044) + _ => Error + } +} + +fn yy_state_146(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(2, NT_non_empty_list_commas_with_trailing_info_record_defn_single_, yy_action_968) +} + +fn yy_state_147(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + NT_record_defn_single => Shift(yy_state_148) + T_EXTEND => Shift(yy_state_149) + T_LIDENT => Shift(yy_state_1054) + T_RBRACE => Reduce(1, NT_option_COMMA_, yy_action_1042) + _ => Error + } +} + +fn yy_state_148(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_non_empty_list_commas_rev_record_defn_single_, yy_action_967) +} + +fn yy_state_149(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_COLON => Shift(yy_state_150) + T_COMMA | T_RBRACE => Reduce(1, NT_record_defn_single, yy_action_966) + _ => Error + } +} + +fn yy_state_150(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + NT_multiline_string => Shift(yy_state_2) + T_MULTILINE_INTERP => Shift(yy_state_4) + T_MULTILINE_STRING => Shift(yy_state_5) + T_REGEX_LITERAL => Shift(yy_state_6) + T_STRING => Shift(yy_state_7) + T_FLOAT => Shift(yy_state_8) + T_DOUBLE => Shift(yy_state_9) + T_INT => Shift(yy_state_10) + T_CHAR => Shift(yy_state_11) + T_BYTES => Shift(yy_state_12) + T_BYTE => Shift(yy_state_13) + T_FALSE => Shift(yy_state_14) + T_TRUE => Shift(yy_state_15) + T_BYTES_INTERP => Shift(yy_state_16) + T_INTERP => Shift(yy_state_17) + NT_non_empty_list_multiline_string_ => Shift(yy_state_18) + NT_simple_constant => Shift(yy_state_19) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + NT_tuple_expr => Shift(yy_state_27) + T_LBRACKET_BAR => Shift(yy_state_28) + T_LBRACKET => Shift(yy_state_36) + NT_constr => Shift(yy_state_47) + NT_qual_ident_simple_expr => Shift(yy_state_48) + NT_atomic_expr => Shift(yy_state_50) + NT_anony_fn => Shift(yy_state_51) + T_LBRACE => Shift(yy_state_52) + T_FN => Shift(yy_state_61) + NT_type_name => Shift(yy_state_139) + NT_expr => Shift(yy_state_151) + T_ASYNC => Shift(yy_state_152) + NT_simple_expr => Shift(yy_state_165) + T_EXCLAMATION => Shift(yy_state_176) + T_MINUS => Shift(yy_state_191) + T_PLUS => Shift(yy_state_193) + T_UIDENT => Shift(yy_state_195) + T_PACKAGE_NAME => Shift(yy_state_196) + NT_prefix_expr => Shift(yy_state_201) + NT_range_expr => Shift(yy_state_212) + NT_postfix_expr => Shift(yy_state_223) + T_EXISTS => Shift(yy_state_224) + T_FORALL => Shift(yy_state_256) + NT_infix_expr => Shift(yy_state_272) + T_UNDERSCORE => Shift(yy_state_273) + T_LPAREN => Shift(yy_state_281) + NT_pipe_expr => Shift(yy_state_325) + NT_arrow_fn_expr => Shift(yy_state_344) + NT_quantifier_expr => Shift(yy_state_345) + NT_simple_try_expr => Shift(yy_state_346) + NT_lexscan_expr => Shift(yy_state_347) + NT_lexmatch_expr => Shift(yy_state_348) + NT_match_expr => Shift(yy_state_349) + NT_if_expr => Shift(yy_state_350) + NT_try_expr => Shift(yy_state_351) + NT_while_expr => Shift(yy_state_352) + NT_foreach_expr => Shift(yy_state_353) + NT_for_expr => Shift(yy_state_354) + T_LEXSCAN => Shift(yy_state_355) + NT_lexscan_header => Shift(yy_state_358) + T_LEXMATCH => Shift(yy_state_391) + NT_lexmatch_header => Shift(yy_state_399) + NT_match_header => Shift(yy_state_444) + T_MATCH => Shift(yy_state_605) + T_IF => Shift(yy_state_608) + T_TRY_EXCLAMATION => Shift(yy_state_614) + T_TRY_QUESTION => Shift(yy_state_616) + T_TRY => Shift(yy_state_618) + NT_loop_label_colon => Shift(yy_state_632) + T_POST_LABEL => Shift(yy_state_639) + T_EXTEND => Shift(yy_state_641) + T_LIDENT => Shift(yy_state_648) + T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_1071) + _ => Error + } +} + +fn yy_state_151(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_record_defn_single, yy_action_965) +} + +fn yy_state_152(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_FN => Shift(yy_state_153) + _ => Error + } +} + +fn yy_state_153(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + NT_parameters => Shift(yy_state_154) + T_LPAREN => Shift(yy_state_157) + _ => Error + } +} + +fn yy_state_154(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + NT_error_annotation => Shift(yy_state_63) + T_THIN_ARROW => Shift(yy_state_64) + T_NORAISE => Shift(yy_state_91) + T_RAISE => Shift(yy_state_92) + NT_func_return_type => Shift(yy_state_155) + T_LBRACE => Reduce(0, NT_func_return_type, yy_action_1023) + _ => Error + } +} + +fn yy_state_155(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_LBRACE => Shift(yy_state_133) + NT_block_expr => Shift(yy_state_156) + _ => Error + } +} + +fn yy_state_156(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(5, NT_anony_fn, yy_action_964) +} + +fn yy_state_157(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + NT_parameter => Shift(yy_state_158) + NT_non_empty_list_commas_rev_parameter_ => Shift(yy_state_159) + T_POST_LABEL => Shift(yy_state_163) + T_EXTEND => Shift(yy_state_1028) + T_LIDENT => Shift(yy_state_1038) + T_UNDERSCORE => Shift(yy_state_1048) + NT_non_empty_list_commas_parameter_ => Shift(yy_state_1051) + NT_list_commas_parameter_ => Shift(yy_state_1052) + T_RPAREN => Reduce(0, NT_list_commas_parameter_, yy_action_963) + _ => Error + } +} + +fn yy_state_158(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_non_empty_list_commas_rev_parameter_, yy_action_962) +} + +fn yy_state_159(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + NT_option_COMMA_ => Shift(yy_state_160) + T_COMMA => Shift(yy_state_161) + T_RPAREN => Reduce(0, NT_option_COMMA_, yy_action_1044) + _ => Error + } +} + +fn yy_state_160(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(2, NT_non_empty_list_commas_parameter_, yy_action_961) +} + +fn yy_state_161(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + NT_parameter => Shift(yy_state_162) + T_POST_LABEL => Shift(yy_state_163) + T_EXTEND => Shift(yy_state_1028) + T_LIDENT => Shift(yy_state_1038) + T_UNDERSCORE => Shift(yy_state_1048) + T_RPAREN => Reduce(1, NT_option_COMMA_, yy_action_1042) + _ => Error + } +} + +fn yy_state_162(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_non_empty_list_commas_rev_parameter_, yy_action_960) +} + +fn yy_state_163(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_EQUAL => Shift(yy_state_164) + T_COLON => Shift(yy_state_1024) + T_RPAREN | T_COMMA => Reduce(1, NT_parameter, yy_action_958) + _ => Error + } +} + +fn yy_state_164(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + NT_multiline_string => Shift(yy_state_2) + T_MULTILINE_INTERP => Shift(yy_state_4) + T_MULTILINE_STRING => Shift(yy_state_5) + T_REGEX_LITERAL => Shift(yy_state_6) + T_STRING => Shift(yy_state_7) + T_FLOAT => Shift(yy_state_8) + T_DOUBLE => Shift(yy_state_9) + T_INT => Shift(yy_state_10) + T_CHAR => Shift(yy_state_11) + T_BYTES => Shift(yy_state_12) + T_BYTE => Shift(yy_state_13) + T_FALSE => Shift(yy_state_14) + T_TRUE => Shift(yy_state_15) + T_BYTES_INTERP => Shift(yy_state_16) + T_INTERP => Shift(yy_state_17) + NT_non_empty_list_multiline_string_ => Shift(yy_state_18) + NT_simple_constant => Shift(yy_state_19) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + NT_tuple_expr => Shift(yy_state_27) + T_LBRACKET_BAR => Shift(yy_state_28) + T_LBRACKET => Shift(yy_state_36) + NT_constr => Shift(yy_state_47) + NT_qual_ident_simple_expr => Shift(yy_state_48) + NT_atomic_expr => Shift(yy_state_50) + NT_anony_fn => Shift(yy_state_51) + T_LBRACE => Shift(yy_state_52) + T_FN => Shift(yy_state_61) + NT_type_name => Shift(yy_state_139) + T_ASYNC => Shift(yy_state_152) + NT_simple_expr => Shift(yy_state_165) + T_EXCLAMATION => Shift(yy_state_176) + T_MINUS => Shift(yy_state_191) + T_PLUS => Shift(yy_state_193) + T_UIDENT => Shift(yy_state_195) + T_PACKAGE_NAME => Shift(yy_state_196) + NT_prefix_expr => Shift(yy_state_201) + NT_range_expr => Shift(yy_state_212) + NT_postfix_expr => Shift(yy_state_223) + T_EXISTS => Shift(yy_state_224) + T_FORALL => Shift(yy_state_256) + NT_infix_expr => Shift(yy_state_272) + T_UNDERSCORE => Shift(yy_state_273) + T_LPAREN => Shift(yy_state_281) + NT_pipe_expr => Shift(yy_state_325) + NT_arrow_fn_expr => Shift(yy_state_344) + NT_quantifier_expr => Shift(yy_state_345) + NT_simple_try_expr => Shift(yy_state_346) + NT_lexscan_expr => Shift(yy_state_347) + NT_lexmatch_expr => Shift(yy_state_348) + NT_match_expr => Shift(yy_state_349) + NT_if_expr => Shift(yy_state_350) + NT_try_expr => Shift(yy_state_351) + NT_while_expr => Shift(yy_state_352) + NT_foreach_expr => Shift(yy_state_353) + NT_for_expr => Shift(yy_state_354) + T_LEXSCAN => Shift(yy_state_355) + NT_lexscan_header => Shift(yy_state_358) + T_LEXMATCH => Shift(yy_state_391) + NT_lexmatch_header => Shift(yy_state_399) + NT_match_header => Shift(yy_state_444) + T_MATCH => Shift(yy_state_605) + T_IF => Shift(yy_state_608) + T_TRY_EXCLAMATION => Shift(yy_state_614) + T_TRY_QUESTION => Shift(yy_state_616) + T_TRY => Shift(yy_state_618) + NT_loop_label_colon => Shift(yy_state_632) + T_POST_LABEL => Shift(yy_state_639) + T_EXTEND => Shift(yy_state_641) + T_LIDENT => Shift(yy_state_648) + NT_expr => Shift(yy_state_1023) + T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_1071) + _ => Error + } +} + +fn yy_state_165(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_DOT_INT => Shift(yy_state_166) + T_DOTDOT => Shift(yy_state_167) + T_LPAREN => Shift(yy_state_277) + T_DOT_LIDENT => Shift(yy_state_1019) + T_LBRACKET => Shift(yy_state_1020) + T_INFIX1 | T_INFIX2 | T_INFIX3 | T_INFIX4 | T_EOF | T_WITH | T_CATCH | T_EQ_TILDE | T_RPAREN | T_COMMA | T_MINUS | T_COLON | T_SEMI | T_PLUS | T_RBRACKET | T_BAR_RBRACKET | T_BAR | T_LBRACE | T_RBRACE | T_AMPERAMPER | T_AMPER | T_CARET | T_BARBAR | T_AS | T_PIPE | T_PIPE_LEFT | T_LT_PLUS | T_LT_QUESTION | T_ELSE | T_IF | T_FAT_ARROW | T_RANGE_INCLUSIVE | T_RANGE_LT_INCLUSIVE | T_RANGE_EXCLUSIVE | T_RANGE_INCLUSIVE_REV | T_RANGE_EXCLUSIVE_REV | T_IS | T_AND | T_IMPLIES | T_LEXMATCH_QUESTION => Reduce(1, NT_prefix_expr, yy_action_957) + _ => Error + } +} + +fn yy_state_166(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(2, NT_simple_expr, yy_action_956) +} + +fn yy_state_167(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_EXTEND => Shift(yy_state_168) + T_LIDENT => Shift(yy_state_1015) + _ => Error + } +} + +fn yy_state_168(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_LPAREN => Shift(yy_state_169) + _ => Error + } +} + +fn yy_state_169(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + NT_multiline_string => Shift(yy_state_2) + T_MULTILINE_INTERP => Shift(yy_state_4) + T_MULTILINE_STRING => Shift(yy_state_5) + T_REGEX_LITERAL => Shift(yy_state_6) + T_STRING => Shift(yy_state_7) + T_FLOAT => Shift(yy_state_8) + T_DOUBLE => Shift(yy_state_9) + T_INT => Shift(yy_state_10) + T_CHAR => Shift(yy_state_11) + T_BYTES => Shift(yy_state_12) + T_BYTE => Shift(yy_state_13) + T_FALSE => Shift(yy_state_14) + T_TRUE => Shift(yy_state_15) + T_BYTES_INTERP => Shift(yy_state_16) + T_INTERP => Shift(yy_state_17) + NT_non_empty_list_multiline_string_ => Shift(yy_state_18) + NT_simple_constant => Shift(yy_state_19) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + NT_tuple_expr => Shift(yy_state_27) + T_LBRACKET_BAR => Shift(yy_state_28) + T_LBRACKET => Shift(yy_state_36) + NT_constr => Shift(yy_state_47) + NT_qual_ident_simple_expr => Shift(yy_state_48) + NT_atomic_expr => Shift(yy_state_50) + NT_anony_fn => Shift(yy_state_51) + T_LBRACE => Shift(yy_state_52) + T_FN => Shift(yy_state_61) + NT_type_name => Shift(yy_state_139) + T_ASYNC => Shift(yy_state_152) + NT_simple_expr => Shift(yy_state_165) + NT_argument => Shift(yy_state_170) + NT_non_empty_list_commas_rev_argument_ => Shift(yy_state_171) + NT_expr => Shift(yy_state_175) + T_EXCLAMATION => Shift(yy_state_176) + T_MINUS => Shift(yy_state_191) + T_PLUS => Shift(yy_state_193) + T_UIDENT => Shift(yy_state_195) + T_PACKAGE_NAME => Shift(yy_state_196) + NT_prefix_expr => Shift(yy_state_201) + NT_range_expr => Shift(yy_state_212) + NT_postfix_expr => Shift(yy_state_223) + T_EXISTS => Shift(yy_state_224) + T_FORALL => Shift(yy_state_256) + NT_infix_expr => Shift(yy_state_272) + T_UNDERSCORE => Shift(yy_state_273) + NT_non_empty_list_commas_argument_ => Shift(yy_state_278) + T_LPAREN => Shift(yy_state_281) + NT_pipe_expr => Shift(yy_state_325) + NT_arrow_fn_expr => Shift(yy_state_344) + NT_quantifier_expr => Shift(yy_state_345) + NT_simple_try_expr => Shift(yy_state_346) + NT_lexscan_expr => Shift(yy_state_347) + NT_lexmatch_expr => Shift(yy_state_348) + NT_match_expr => Shift(yy_state_349) + NT_if_expr => Shift(yy_state_350) + NT_try_expr => Shift(yy_state_351) + NT_while_expr => Shift(yy_state_352) + NT_foreach_expr => Shift(yy_state_353) + NT_for_expr => Shift(yy_state_354) + T_LEXSCAN => Shift(yy_state_355) + NT_lexscan_header => Shift(yy_state_358) + T_LEXMATCH => Shift(yy_state_391) + NT_lexmatch_header => Shift(yy_state_399) + NT_match_header => Shift(yy_state_444) + T_MATCH => Shift(yy_state_605) + T_IF => Shift(yy_state_608) + T_TRY_EXCLAMATION => Shift(yy_state_614) + T_TRY_QUESTION => Shift(yy_state_616) + T_TRY => Shift(yy_state_618) + NT_loop_label_colon => Shift(yy_state_632) + T_POST_LABEL => Shift(yy_state_921) + T_EXTEND => Shift(yy_state_922) + T_LIDENT => Shift(yy_state_927) + NT_list_commas_argument_ => Shift(yy_state_1013) + T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_1071) + T_RPAREN => Reduce(0, NT_list_commas_argument_, yy_action_955) + _ => Error + } +} + +fn yy_state_170(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_non_empty_list_commas_rev_argument_, yy_action_954) +} + +fn yy_state_171(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + NT_option_COMMA_ => Shift(yy_state_172) + T_COMMA => Shift(yy_state_173) + T_RPAREN => Reduce(0, NT_option_COMMA_, yy_action_1044) + _ => Error + } +} + +fn yy_state_172(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(2, NT_non_empty_list_commas_argument_, yy_action_953) +} + +fn yy_state_173(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + NT_multiline_string => Shift(yy_state_2) + T_MULTILINE_INTERP => Shift(yy_state_4) + T_MULTILINE_STRING => Shift(yy_state_5) + T_REGEX_LITERAL => Shift(yy_state_6) + T_STRING => Shift(yy_state_7) + T_FLOAT => Shift(yy_state_8) + T_DOUBLE => Shift(yy_state_9) + T_INT => Shift(yy_state_10) + T_CHAR => Shift(yy_state_11) + T_BYTES => Shift(yy_state_12) + T_BYTE => Shift(yy_state_13) + T_FALSE => Shift(yy_state_14) + T_TRUE => Shift(yy_state_15) + T_BYTES_INTERP => Shift(yy_state_16) + T_INTERP => Shift(yy_state_17) + NT_non_empty_list_multiline_string_ => Shift(yy_state_18) + NT_simple_constant => Shift(yy_state_19) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + NT_tuple_expr => Shift(yy_state_27) + T_LBRACKET_BAR => Shift(yy_state_28) + T_LBRACKET => Shift(yy_state_36) + NT_constr => Shift(yy_state_47) + NT_qual_ident_simple_expr => Shift(yy_state_48) + NT_atomic_expr => Shift(yy_state_50) + NT_anony_fn => Shift(yy_state_51) + T_LBRACE => Shift(yy_state_52) + T_FN => Shift(yy_state_61) + NT_type_name => Shift(yy_state_139) + T_ASYNC => Shift(yy_state_152) + NT_simple_expr => Shift(yy_state_165) + NT_argument => Shift(yy_state_174) + NT_expr => Shift(yy_state_175) + T_EXCLAMATION => Shift(yy_state_176) + T_MINUS => Shift(yy_state_191) + T_PLUS => Shift(yy_state_193) + T_UIDENT => Shift(yy_state_195) + T_PACKAGE_NAME => Shift(yy_state_196) + NT_prefix_expr => Shift(yy_state_201) + NT_range_expr => Shift(yy_state_212) + NT_postfix_expr => Shift(yy_state_223) + T_EXISTS => Shift(yy_state_224) + T_FORALL => Shift(yy_state_256) + NT_infix_expr => Shift(yy_state_272) + T_UNDERSCORE => Shift(yy_state_273) + T_LPAREN => Shift(yy_state_281) + NT_pipe_expr => Shift(yy_state_325) + NT_arrow_fn_expr => Shift(yy_state_344) + NT_quantifier_expr => Shift(yy_state_345) + NT_simple_try_expr => Shift(yy_state_346) + NT_lexscan_expr => Shift(yy_state_347) + NT_lexmatch_expr => Shift(yy_state_348) + NT_match_expr => Shift(yy_state_349) + NT_if_expr => Shift(yy_state_350) + NT_try_expr => Shift(yy_state_351) + NT_while_expr => Shift(yy_state_352) + NT_foreach_expr => Shift(yy_state_353) + NT_for_expr => Shift(yy_state_354) + T_LEXSCAN => Shift(yy_state_355) + NT_lexscan_header => Shift(yy_state_358) + T_LEXMATCH => Shift(yy_state_391) + NT_lexmatch_header => Shift(yy_state_399) + NT_match_header => Shift(yy_state_444) + T_MATCH => Shift(yy_state_605) + T_IF => Shift(yy_state_608) + T_TRY_EXCLAMATION => Shift(yy_state_614) + T_TRY_QUESTION => Shift(yy_state_616) + T_TRY => Shift(yy_state_618) + NT_loop_label_colon => Shift(yy_state_632) + T_POST_LABEL => Shift(yy_state_921) + T_EXTEND => Shift(yy_state_922) + T_LIDENT => Shift(yy_state_927) + T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_1071) + T_RPAREN => Reduce(1, NT_option_COMMA_, yy_action_1042) + _ => Error + } +} + +fn yy_state_174(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_non_empty_list_commas_rev_argument_, yy_action_952) +} + +fn yy_state_175(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_argument, yy_action_951) +} + +fn yy_state_176(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + NT_multiline_string => Shift(yy_state_2) + T_MULTILINE_INTERP => Shift(yy_state_4) + T_MULTILINE_STRING => Shift(yy_state_5) + T_REGEX_LITERAL => Shift(yy_state_6) + T_STRING => Shift(yy_state_7) + T_FLOAT => Shift(yy_state_8) + T_DOUBLE => Shift(yy_state_9) + T_INT => Shift(yy_state_10) + T_CHAR => Shift(yy_state_11) + T_BYTES => Shift(yy_state_12) + T_BYTE => Shift(yy_state_13) + T_FALSE => Shift(yy_state_14) + T_TRUE => Shift(yy_state_15) + T_BYTES_INTERP => Shift(yy_state_16) + T_INTERP => Shift(yy_state_17) + NT_non_empty_list_multiline_string_ => Shift(yy_state_18) + NT_simple_constant => Shift(yy_state_19) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + NT_tuple_expr => Shift(yy_state_27) + T_LBRACKET_BAR => Shift(yy_state_28) + T_LBRACKET => Shift(yy_state_36) + NT_constr => Shift(yy_state_47) + NT_qual_ident_simple_expr => Shift(yy_state_48) + T_UNDERSCORE => Shift(yy_state_49) + NT_atomic_expr => Shift(yy_state_50) + NT_anony_fn => Shift(yy_state_51) + T_LBRACE => Shift(yy_state_52) + T_FN => Shift(yy_state_61) + NT_type_name => Shift(yy_state_139) + T_ASYNC => Shift(yy_state_152) + NT_simple_expr => Shift(yy_state_165) + T_EXCLAMATION => Shift(yy_state_176) + T_LPAREN => Shift(yy_state_177) + T_MINUS => Shift(yy_state_191) + T_PLUS => Shift(yy_state_193) + T_UIDENT => Shift(yy_state_195) + T_PACKAGE_NAME => Shift(yy_state_196) + T_EXTEND => Shift(yy_state_199) + T_LIDENT => Shift(yy_state_200) + NT_prefix_expr => Shift(yy_state_1012) + _ => Error + } +} + +fn yy_state_177(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + NT_multiline_string => Shift(yy_state_2) + T_MULTILINE_INTERP => Shift(yy_state_4) + T_MULTILINE_STRING => Shift(yy_state_5) + T_REGEX_LITERAL => Shift(yy_state_6) + T_STRING => Shift(yy_state_7) + T_FLOAT => Shift(yy_state_8) + T_DOUBLE => Shift(yy_state_9) + T_INT => Shift(yy_state_10) + T_CHAR => Shift(yy_state_11) + T_BYTES => Shift(yy_state_12) + T_BYTE => Shift(yy_state_13) + T_FALSE => Shift(yy_state_14) + T_TRUE => Shift(yy_state_15) + T_BYTES_INTERP => Shift(yy_state_16) + T_INTERP => Shift(yy_state_17) + NT_non_empty_list_multiline_string_ => Shift(yy_state_18) + NT_simple_constant => Shift(yy_state_19) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + NT_tuple_expr => Shift(yy_state_27) + T_LBRACKET_BAR => Shift(yy_state_28) + T_LBRACKET => Shift(yy_state_36) + NT_constr => Shift(yy_state_47) + NT_qual_ident_simple_expr => Shift(yy_state_48) + NT_atomic_expr => Shift(yy_state_50) + NT_anony_fn => Shift(yy_state_51) + T_LBRACE => Shift(yy_state_52) + T_FN => Shift(yy_state_61) + NT_type_name => Shift(yy_state_139) + T_ASYNC => Shift(yy_state_152) + NT_simple_expr => Shift(yy_state_165) + T_EXCLAMATION => Shift(yy_state_176) + T_RPAREN => Shift(yy_state_178) + NT_non_empty_tuple_elems_with_prefix => Shift(yy_state_179) + NT_arrow_fn_prefix_no_constraint => Shift(yy_state_180) + NT_non_empty_tuple_elems => Shift(yy_state_181) + NT_expr => Shift(yy_state_182) + T_MINUS => Shift(yy_state_191) + T_PLUS => Shift(yy_state_193) + T_UIDENT => Shift(yy_state_195) + T_PACKAGE_NAME => Shift(yy_state_196) + NT_prefix_expr => Shift(yy_state_201) + NT_range_expr => Shift(yy_state_212) + NT_postfix_expr => Shift(yy_state_223) + T_EXISTS => Shift(yy_state_224) + T_FORALL => Shift(yy_state_256) + NT_infix_expr => Shift(yy_state_272) + T_LPAREN => Shift(yy_state_281) + NT_pipe_expr => Shift(yy_state_325) + NT_arrow_fn_expr => Shift(yy_state_344) + NT_quantifier_expr => Shift(yy_state_345) + NT_simple_try_expr => Shift(yy_state_346) + NT_lexscan_expr => Shift(yy_state_347) + NT_lexmatch_expr => Shift(yy_state_348) + NT_match_expr => Shift(yy_state_349) + NT_if_expr => Shift(yy_state_350) + NT_try_expr => Shift(yy_state_351) + NT_while_expr => Shift(yy_state_352) + NT_foreach_expr => Shift(yy_state_353) + NT_for_expr => Shift(yy_state_354) + T_LEXSCAN => Shift(yy_state_355) + NT_lexscan_header => Shift(yy_state_358) + T_LEXMATCH => Shift(yy_state_391) + NT_lexmatch_header => Shift(yy_state_399) + NT_match_header => Shift(yy_state_444) + T_MATCH => Shift(yy_state_605) + T_IF => Shift(yy_state_608) + T_TRY_EXCLAMATION => Shift(yy_state_614) + T_TRY_QUESTION => Shift(yy_state_616) + T_TRY => Shift(yy_state_618) + NT_loop_label_colon => Shift(yy_state_632) + T_POST_LABEL => Shift(yy_state_639) + T_UNDERSCORE => Shift(yy_state_988) + T_EXTEND => Shift(yy_state_1004) + T_LIDENT => Shift(yy_state_1008) + T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_1071) + _ => Error + } +} + +fn yy_state_178(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(2, NT_tuple_expr, yy_action_950) +} + +fn yy_state_179(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(2, NT_tuple_expr, yy_action_949) +} + +fn yy_state_180(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(2, NT_tuple_expr, yy_action_948) +} + +fn yy_state_181(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_non_empty_tuple_elems_with_prefix, yy_action_947) +} + +fn yy_state_182(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_COLON => Shift(yy_state_183) + T_COMMA => Shift(yy_state_186) + T_RPAREN => Shift(yy_state_190) + _ => Error + } +} + +fn yy_state_183(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_ASYNC => Shift(yy_state_65) + T_UNDERSCORE => Shift(yy_state_70) + T_AMPER => Shift(yy_state_71) + T_PACKAGE_NAME => Shift(yy_state_73) + T_UIDENT => Shift(yy_state_80) + T_LPAREN => Shift(yy_state_84) + NT_simple_type => Shift(yy_state_110) + NT_type_ => Shift(yy_state_184) + _ => Error + } +} + +fn yy_state_184(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_RPAREN => Shift(yy_state_185) + _ => Error + } +} + +fn yy_state_185(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(5, NT_tuple_expr, yy_action_946) +} + +fn yy_state_186(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + NT_multiline_string => Shift(yy_state_2) + T_MULTILINE_INTERP => Shift(yy_state_4) + T_MULTILINE_STRING => Shift(yy_state_5) + T_REGEX_LITERAL => Shift(yy_state_6) + T_STRING => Shift(yy_state_7) + T_FLOAT => Shift(yy_state_8) + T_DOUBLE => Shift(yy_state_9) + T_INT => Shift(yy_state_10) + T_CHAR => Shift(yy_state_11) + T_BYTES => Shift(yy_state_12) + T_BYTE => Shift(yy_state_13) + T_FALSE => Shift(yy_state_14) + T_TRUE => Shift(yy_state_15) + T_BYTES_INTERP => Shift(yy_state_16) + T_INTERP => Shift(yy_state_17) + NT_non_empty_list_multiline_string_ => Shift(yy_state_18) + NT_simple_constant => Shift(yy_state_19) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + NT_tuple_expr => Shift(yy_state_27) + T_LBRACKET_BAR => Shift(yy_state_28) + T_LBRACKET => Shift(yy_state_36) + NT_constr => Shift(yy_state_47) + NT_qual_ident_simple_expr => Shift(yy_state_48) + NT_atomic_expr => Shift(yy_state_50) + NT_anony_fn => Shift(yy_state_51) + T_LBRACE => Shift(yy_state_52) + T_FN => Shift(yy_state_61) + NT_type_name => Shift(yy_state_139) + T_ASYNC => Shift(yy_state_152) + NT_simple_expr => Shift(yy_state_165) + T_EXCLAMATION => Shift(yy_state_176) + NT_non_empty_tuple_elems => Shift(yy_state_187) + T_RPAREN => Shift(yy_state_188) + NT_expr => Shift(yy_state_189) + T_MINUS => Shift(yy_state_191) + T_PLUS => Shift(yy_state_193) + T_UIDENT => Shift(yy_state_195) + T_PACKAGE_NAME => Shift(yy_state_196) + NT_prefix_expr => Shift(yy_state_201) + NT_range_expr => Shift(yy_state_212) + NT_postfix_expr => Shift(yy_state_223) + T_EXISTS => Shift(yy_state_224) + T_FORALL => Shift(yy_state_256) + NT_infix_expr => Shift(yy_state_272) + T_UNDERSCORE => Shift(yy_state_273) + T_LPAREN => Shift(yy_state_281) + NT_pipe_expr => Shift(yy_state_325) + NT_arrow_fn_expr => Shift(yy_state_344) + NT_quantifier_expr => Shift(yy_state_345) + NT_simple_try_expr => Shift(yy_state_346) + NT_lexscan_expr => Shift(yy_state_347) + NT_lexmatch_expr => Shift(yy_state_348) + NT_match_expr => Shift(yy_state_349) + NT_if_expr => Shift(yy_state_350) + NT_try_expr => Shift(yy_state_351) + NT_while_expr => Shift(yy_state_352) + NT_foreach_expr => Shift(yy_state_353) + NT_for_expr => Shift(yy_state_354) + T_LEXSCAN => Shift(yy_state_355) + NT_lexscan_header => Shift(yy_state_358) + T_LEXMATCH => Shift(yy_state_391) + NT_lexmatch_header => Shift(yy_state_399) + NT_match_header => Shift(yy_state_444) + T_MATCH => Shift(yy_state_605) + T_IF => Shift(yy_state_608) + T_TRY_EXCLAMATION => Shift(yy_state_614) + T_TRY_QUESTION => Shift(yy_state_616) + T_TRY => Shift(yy_state_618) + NT_loop_label_colon => Shift(yy_state_632) + T_POST_LABEL => Shift(yy_state_639) + T_EXTEND => Shift(yy_state_641) + T_LIDENT => Shift(yy_state_648) + T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_1071) + _ => Error + } +} + +fn yy_state_187(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_non_empty_tuple_elems, yy_action_945) +} + +fn yy_state_188(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_non_empty_tuple_elems, yy_action_944) +} + +fn yy_state_189(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_COMMA => Shift(yy_state_186) + T_RPAREN => Shift(yy_state_190) + _ => Error + } +} + +fn yy_state_190(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(2, NT_non_empty_tuple_elems, yy_action_943) +} + +fn yy_state_191(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + NT_multiline_string => Shift(yy_state_2) + T_MULTILINE_INTERP => Shift(yy_state_4) + T_MULTILINE_STRING => Shift(yy_state_5) + T_REGEX_LITERAL => Shift(yy_state_6) + T_STRING => Shift(yy_state_7) + T_FLOAT => Shift(yy_state_8) + T_DOUBLE => Shift(yy_state_9) + T_INT => Shift(yy_state_10) + T_CHAR => Shift(yy_state_11) + T_BYTES => Shift(yy_state_12) + T_BYTE => Shift(yy_state_13) + T_FALSE => Shift(yy_state_14) + T_TRUE => Shift(yy_state_15) + T_BYTES_INTERP => Shift(yy_state_16) + T_INTERP => Shift(yy_state_17) + NT_non_empty_list_multiline_string_ => Shift(yy_state_18) + NT_simple_constant => Shift(yy_state_19) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + NT_tuple_expr => Shift(yy_state_27) + T_LBRACKET_BAR => Shift(yy_state_28) + T_LBRACKET => Shift(yy_state_36) + NT_constr => Shift(yy_state_47) + NT_qual_ident_simple_expr => Shift(yy_state_48) + T_UNDERSCORE => Shift(yy_state_49) + NT_atomic_expr => Shift(yy_state_50) + NT_anony_fn => Shift(yy_state_51) + T_LBRACE => Shift(yy_state_52) + T_FN => Shift(yy_state_61) + NT_type_name => Shift(yy_state_139) + T_ASYNC => Shift(yy_state_152) + NT_simple_expr => Shift(yy_state_165) + T_EXCLAMATION => Shift(yy_state_176) + T_LPAREN => Shift(yy_state_177) + T_MINUS => Shift(yy_state_191) + NT_prefix_expr => Shift(yy_state_192) + T_PLUS => Shift(yy_state_193) + T_UIDENT => Shift(yy_state_195) + T_PACKAGE_NAME => Shift(yy_state_196) + T_EXTEND => Shift(yy_state_199) + T_LIDENT => Shift(yy_state_200) + _ => Error + } +} + +fn yy_state_192(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(2, NT_prefix_expr, yy_action_940) +} + +fn yy_state_193(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + NT_multiline_string => Shift(yy_state_2) + T_MULTILINE_INTERP => Shift(yy_state_4) + T_MULTILINE_STRING => Shift(yy_state_5) + T_REGEX_LITERAL => Shift(yy_state_6) + T_STRING => Shift(yy_state_7) + T_FLOAT => Shift(yy_state_8) + T_DOUBLE => Shift(yy_state_9) + T_INT => Shift(yy_state_10) + T_CHAR => Shift(yy_state_11) + T_BYTES => Shift(yy_state_12) + T_BYTE => Shift(yy_state_13) + T_FALSE => Shift(yy_state_14) + T_TRUE => Shift(yy_state_15) + T_BYTES_INTERP => Shift(yy_state_16) + T_INTERP => Shift(yy_state_17) + NT_non_empty_list_multiline_string_ => Shift(yy_state_18) + NT_simple_constant => Shift(yy_state_19) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + NT_tuple_expr => Shift(yy_state_27) + T_LBRACKET_BAR => Shift(yy_state_28) + T_LBRACKET => Shift(yy_state_36) + NT_constr => Shift(yy_state_47) + NT_qual_ident_simple_expr => Shift(yy_state_48) + T_UNDERSCORE => Shift(yy_state_49) + NT_atomic_expr => Shift(yy_state_50) + NT_anony_fn => Shift(yy_state_51) + T_LBRACE => Shift(yy_state_52) + T_FN => Shift(yy_state_61) + NT_type_name => Shift(yy_state_139) + T_ASYNC => Shift(yy_state_152) + NT_simple_expr => Shift(yy_state_165) + T_EXCLAMATION => Shift(yy_state_176) + T_LPAREN => Shift(yy_state_177) + T_MINUS => Shift(yy_state_191) + T_PLUS => Shift(yy_state_193) + NT_prefix_expr => Shift(yy_state_194) + T_UIDENT => Shift(yy_state_195) + T_PACKAGE_NAME => Shift(yy_state_196) + T_EXTEND => Shift(yy_state_199) + T_LIDENT => Shift(yy_state_200) + _ => Error + } +} + +fn yy_state_194(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(2, NT_prefix_expr, yy_action_937) +} + +fn yy_state_195(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_COLONCOLON => Reduce(1, NT_qual_ident_ty, yy_action_1049) + T_INFIX1 | T_INFIX2 | T_INFIX3 | T_INFIX4 | T_EOF | T_WITH | T_CATCH | T_EQUAL | T_EQ_TILDE | T_LPAREN | T_RPAREN | T_COMMA | T_MINUS | T_DOT_LIDENT | T_DOT_INT | T_COLON | T_SEMI | T_LBRACKET | T_PLUS | T_RBRACKET | T_BAR_RBRACKET | T_BAR | T_LBRACE | T_RBRACE | T_AMPERAMPER | T_AMPER | T_CARET | T_BARBAR | T_AS | T_PIPE | T_PIPE_LEFT | T_LT_PLUS | T_LT_QUESTION | T_ELSE | T_IF | T_FAT_ARROW | T_DOTDOT | T_RANGE_INCLUSIVE | T_RANGE_LT_INCLUSIVE | T_RANGE_EXCLUSIVE | T_RANGE_INCLUSIVE_REV | T_RANGE_EXCLUSIVE_REV | T_IS | T_AND | T_IMPLIES | T_LEXMATCH_QUESTION => Reduce(1, NT_constr, yy_action_936) + _ => Error + } +} + +fn yy_state_196(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_DOT_UIDENT => Shift(yy_state_197) + T_DOT_LIDENT => Shift(yy_state_198) + _ => Error + } +} + +fn yy_state_197(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_COLONCOLON => Reduce(2, NT_qual_ident_ty, yy_action_1051) + T_INFIX1 | T_INFIX2 | T_INFIX3 | T_INFIX4 | T_EOF | T_WITH | T_CATCH | T_EQUAL | T_EQ_TILDE | T_LPAREN | T_RPAREN | T_COMMA | T_MINUS | T_DOT_LIDENT | T_DOT_INT | T_COLON | T_SEMI | T_LBRACKET | T_PLUS | T_RBRACKET | T_BAR_RBRACKET | T_BAR | T_LBRACE | T_RBRACE | T_AMPERAMPER | T_AMPER | T_CARET | T_BARBAR | T_AS | T_PIPE | T_PIPE_LEFT | T_LT_PLUS | T_LT_QUESTION | T_ELSE | T_IF | T_FAT_ARROW | T_DOTDOT | T_RANGE_INCLUSIVE | T_RANGE_LT_INCLUSIVE | T_RANGE_EXCLUSIVE | T_RANGE_INCLUSIVE_REV | T_RANGE_EXCLUSIVE_REV | T_IS | T_AND | T_IMPLIES | T_LEXMATCH_QUESTION => Reduce(2, NT_constr, yy_action_935) + _ => Error + } +} + +fn yy_state_198(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_INFIX1 | T_INFIX2 | T_INFIX3 | T_INFIX4 | T_EOF | T_WITH | T_CATCH | T_EQ_TILDE | T_LPAREN | T_RPAREN | T_COMMA | T_MINUS | T_DOT_LIDENT | T_DOT_INT | T_COLON | T_SEMI | T_LBRACKET | T_PLUS | T_RBRACKET | T_BAR_RBRACKET | T_BAR | T_LBRACE | T_RBRACE | T_AMPERAMPER | T_AMPER | T_CARET | T_BARBAR | T_AS | T_PIPE | T_PIPE_LEFT | T_LT_PLUS | T_LT_QUESTION | T_ELSE | T_IF | T_FAT_ARROW | T_DOTDOT | T_RANGE_INCLUSIVE | T_RANGE_LT_INCLUSIVE | T_RANGE_EXCLUSIVE | T_RANGE_INCLUSIVE_REV | T_RANGE_EXCLUSIVE_REV | T_IS | T_AND | T_IMPLIES | T_LEXMATCH_QUESTION => Reduce(2, NT_qual_ident_simple_expr, yy_action_934) + T_COLONCOLON => Reduce(2, NT_qual_ident_ty, yy_action_1050) + _ => Error + } +} + +fn yy_state_199(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_qual_ident_simple_expr, yy_action_933) +} + +fn yy_state_200(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_qual_ident_simple_expr, yy_action_932) +} + +fn yy_state_201(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_RANGE_EXCLUSIVE_REV => Shift(yy_state_202) + T_RANGE_INCLUSIVE_REV => Shift(yy_state_204) + T_RANGE_LT_INCLUSIVE => Shift(yy_state_206) + T_RANGE_INCLUSIVE => Shift(yy_state_208) + T_RANGE_EXCLUSIVE => Shift(yy_state_210) + T_INFIX1 | T_INFIX2 | T_INFIX3 | T_INFIX4 | T_EOF | T_WITH | T_CATCH | T_EQ_TILDE | T_RPAREN | T_COMMA | T_MINUS | T_COLON | T_SEMI | T_PLUS | T_RBRACKET | T_BAR_RBRACKET | T_BAR | T_LBRACE | T_RBRACE | T_AMPERAMPER | T_AMPER | T_CARET | T_BARBAR | T_AS | T_PIPE | T_PIPE_LEFT | T_LT_PLUS | T_LT_QUESTION | T_ELSE | T_IF | T_FAT_ARROW | T_IS | T_AND | T_IMPLIES | T_LEXMATCH_QUESTION => Reduce(1, NT_range_expr, yy_action_931) + _ => Error + } +} + +fn yy_state_202(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + NT_multiline_string => Shift(yy_state_2) + T_MULTILINE_INTERP => Shift(yy_state_4) + T_MULTILINE_STRING => Shift(yy_state_5) + T_REGEX_LITERAL => Shift(yy_state_6) + T_STRING => Shift(yy_state_7) + T_FLOAT => Shift(yy_state_8) + T_DOUBLE => Shift(yy_state_9) + T_INT => Shift(yy_state_10) + T_CHAR => Shift(yy_state_11) + T_BYTES => Shift(yy_state_12) + T_BYTE => Shift(yy_state_13) + T_FALSE => Shift(yy_state_14) + T_TRUE => Shift(yy_state_15) + T_BYTES_INTERP => Shift(yy_state_16) + T_INTERP => Shift(yy_state_17) + NT_non_empty_list_multiline_string_ => Shift(yy_state_18) + NT_simple_constant => Shift(yy_state_19) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + NT_tuple_expr => Shift(yy_state_27) + T_LBRACKET_BAR => Shift(yy_state_28) + T_LBRACKET => Shift(yy_state_36) + NT_constr => Shift(yy_state_47) + NT_qual_ident_simple_expr => Shift(yy_state_48) + T_UNDERSCORE => Shift(yy_state_49) + NT_atomic_expr => Shift(yy_state_50) + NT_anony_fn => Shift(yy_state_51) + T_LBRACE => Shift(yy_state_52) + T_FN => Shift(yy_state_61) + NT_type_name => Shift(yy_state_139) + T_ASYNC => Shift(yy_state_152) + NT_simple_expr => Shift(yy_state_165) + T_EXCLAMATION => Shift(yy_state_176) + T_LPAREN => Shift(yy_state_177) + T_MINUS => Shift(yy_state_191) + T_PLUS => Shift(yy_state_193) + T_UIDENT => Shift(yy_state_195) + T_PACKAGE_NAME => Shift(yy_state_196) + T_EXTEND => Shift(yy_state_199) + T_LIDENT => Shift(yy_state_200) + NT_prefix_expr => Shift(yy_state_203) + _ => Error + } +} + +fn yy_state_203(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_range_expr, yy_action_930) +} + +fn yy_state_204(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + NT_multiline_string => Shift(yy_state_2) + T_MULTILINE_INTERP => Shift(yy_state_4) + T_MULTILINE_STRING => Shift(yy_state_5) + T_REGEX_LITERAL => Shift(yy_state_6) + T_STRING => Shift(yy_state_7) + T_FLOAT => Shift(yy_state_8) + T_DOUBLE => Shift(yy_state_9) + T_INT => Shift(yy_state_10) + T_CHAR => Shift(yy_state_11) + T_BYTES => Shift(yy_state_12) + T_BYTE => Shift(yy_state_13) + T_FALSE => Shift(yy_state_14) + T_TRUE => Shift(yy_state_15) + T_BYTES_INTERP => Shift(yy_state_16) + T_INTERP => Shift(yy_state_17) + NT_non_empty_list_multiline_string_ => Shift(yy_state_18) + NT_simple_constant => Shift(yy_state_19) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + NT_tuple_expr => Shift(yy_state_27) + T_LBRACKET_BAR => Shift(yy_state_28) + T_LBRACKET => Shift(yy_state_36) + NT_constr => Shift(yy_state_47) + NT_qual_ident_simple_expr => Shift(yy_state_48) + T_UNDERSCORE => Shift(yy_state_49) + NT_atomic_expr => Shift(yy_state_50) + NT_anony_fn => Shift(yy_state_51) + T_LBRACE => Shift(yy_state_52) + T_FN => Shift(yy_state_61) + NT_type_name => Shift(yy_state_139) + T_ASYNC => Shift(yy_state_152) + NT_simple_expr => Shift(yy_state_165) + T_EXCLAMATION => Shift(yy_state_176) + T_LPAREN => Shift(yy_state_177) + T_MINUS => Shift(yy_state_191) + T_PLUS => Shift(yy_state_193) + T_UIDENT => Shift(yy_state_195) + T_PACKAGE_NAME => Shift(yy_state_196) + T_EXTEND => Shift(yy_state_199) + T_LIDENT => Shift(yy_state_200) + NT_prefix_expr => Shift(yy_state_205) + _ => Error + } +} + +fn yy_state_205(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_range_expr, yy_action_929) +} + +fn yy_state_206(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + NT_multiline_string => Shift(yy_state_2) + T_MULTILINE_INTERP => Shift(yy_state_4) + T_MULTILINE_STRING => Shift(yy_state_5) + T_REGEX_LITERAL => Shift(yy_state_6) + T_STRING => Shift(yy_state_7) + T_FLOAT => Shift(yy_state_8) + T_DOUBLE => Shift(yy_state_9) + T_INT => Shift(yy_state_10) + T_CHAR => Shift(yy_state_11) + T_BYTES => Shift(yy_state_12) + T_BYTE => Shift(yy_state_13) + T_FALSE => Shift(yy_state_14) + T_TRUE => Shift(yy_state_15) + T_BYTES_INTERP => Shift(yy_state_16) + T_INTERP => Shift(yy_state_17) + NT_non_empty_list_multiline_string_ => Shift(yy_state_18) + NT_simple_constant => Shift(yy_state_19) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + NT_tuple_expr => Shift(yy_state_27) + T_LBRACKET_BAR => Shift(yy_state_28) + T_LBRACKET => Shift(yy_state_36) + NT_constr => Shift(yy_state_47) + NT_qual_ident_simple_expr => Shift(yy_state_48) + T_UNDERSCORE => Shift(yy_state_49) + NT_atomic_expr => Shift(yy_state_50) + NT_anony_fn => Shift(yy_state_51) + T_LBRACE => Shift(yy_state_52) + T_FN => Shift(yy_state_61) + NT_type_name => Shift(yy_state_139) + T_ASYNC => Shift(yy_state_152) + NT_simple_expr => Shift(yy_state_165) + T_EXCLAMATION => Shift(yy_state_176) + T_LPAREN => Shift(yy_state_177) + T_MINUS => Shift(yy_state_191) + T_PLUS => Shift(yy_state_193) + T_UIDENT => Shift(yy_state_195) + T_PACKAGE_NAME => Shift(yy_state_196) + T_EXTEND => Shift(yy_state_199) + T_LIDENT => Shift(yy_state_200) + NT_prefix_expr => Shift(yy_state_207) + _ => Error + } +} + +fn yy_state_207(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_range_expr, yy_action_928) +} + +fn yy_state_208(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + NT_multiline_string => Shift(yy_state_2) + T_MULTILINE_INTERP => Shift(yy_state_4) + T_MULTILINE_STRING => Shift(yy_state_5) + T_REGEX_LITERAL => Shift(yy_state_6) + T_STRING => Shift(yy_state_7) + T_FLOAT => Shift(yy_state_8) + T_DOUBLE => Shift(yy_state_9) + T_INT => Shift(yy_state_10) + T_CHAR => Shift(yy_state_11) + T_BYTES => Shift(yy_state_12) + T_BYTE => Shift(yy_state_13) + T_FALSE => Shift(yy_state_14) + T_TRUE => Shift(yy_state_15) + T_BYTES_INTERP => Shift(yy_state_16) + T_INTERP => Shift(yy_state_17) + NT_non_empty_list_multiline_string_ => Shift(yy_state_18) + NT_simple_constant => Shift(yy_state_19) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + NT_tuple_expr => Shift(yy_state_27) + T_LBRACKET_BAR => Shift(yy_state_28) + T_LBRACKET => Shift(yy_state_36) + NT_constr => Shift(yy_state_47) + NT_qual_ident_simple_expr => Shift(yy_state_48) + T_UNDERSCORE => Shift(yy_state_49) + NT_atomic_expr => Shift(yy_state_50) + NT_anony_fn => Shift(yy_state_51) + T_LBRACE => Shift(yy_state_52) + T_FN => Shift(yy_state_61) + NT_type_name => Shift(yy_state_139) + T_ASYNC => Shift(yy_state_152) + NT_simple_expr => Shift(yy_state_165) + T_EXCLAMATION => Shift(yy_state_176) + T_LPAREN => Shift(yy_state_177) + T_MINUS => Shift(yy_state_191) + T_PLUS => Shift(yy_state_193) + T_UIDENT => Shift(yy_state_195) + T_PACKAGE_NAME => Shift(yy_state_196) + T_EXTEND => Shift(yy_state_199) + T_LIDENT => Shift(yy_state_200) + NT_prefix_expr => Shift(yy_state_209) + _ => Error + } +} + +fn yy_state_209(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_range_expr, yy_action_927) +} + +fn yy_state_210(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + NT_multiline_string => Shift(yy_state_2) + T_MULTILINE_INTERP => Shift(yy_state_4) + T_MULTILINE_STRING => Shift(yy_state_5) + T_REGEX_LITERAL => Shift(yy_state_6) + T_STRING => Shift(yy_state_7) + T_FLOAT => Shift(yy_state_8) + T_DOUBLE => Shift(yy_state_9) + T_INT => Shift(yy_state_10) + T_CHAR => Shift(yy_state_11) + T_BYTES => Shift(yy_state_12) + T_BYTE => Shift(yy_state_13) + T_FALSE => Shift(yy_state_14) + T_TRUE => Shift(yy_state_15) + T_BYTES_INTERP => Shift(yy_state_16) + T_INTERP => Shift(yy_state_17) + NT_non_empty_list_multiline_string_ => Shift(yy_state_18) + NT_simple_constant => Shift(yy_state_19) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + NT_tuple_expr => Shift(yy_state_27) + T_LBRACKET_BAR => Shift(yy_state_28) + T_LBRACKET => Shift(yy_state_36) + NT_constr => Shift(yy_state_47) + NT_qual_ident_simple_expr => Shift(yy_state_48) + T_UNDERSCORE => Shift(yy_state_49) + NT_atomic_expr => Shift(yy_state_50) + NT_anony_fn => Shift(yy_state_51) + T_LBRACE => Shift(yy_state_52) + T_FN => Shift(yy_state_61) + NT_type_name => Shift(yy_state_139) + T_ASYNC => Shift(yy_state_152) + NT_simple_expr => Shift(yy_state_165) + T_EXCLAMATION => Shift(yy_state_176) + T_LPAREN => Shift(yy_state_177) + T_MINUS => Shift(yy_state_191) + T_PLUS => Shift(yy_state_193) + T_UIDENT => Shift(yy_state_195) + T_PACKAGE_NAME => Shift(yy_state_196) + T_EXTEND => Shift(yy_state_199) + T_LIDENT => Shift(yy_state_200) + NT_prefix_expr => Shift(yy_state_211) + _ => Error + } +} + +fn yy_state_211(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_range_expr, yy_action_926) +} + +fn yy_state_212(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_LT_QUESTION => Shift(yy_state_213) + T_LT_PLUS => Shift(yy_state_954) + T_EQ_TILDE => Shift(yy_state_956) + T_LEXMATCH_QUESTION => Shift(yy_state_979) + T_IS => Shift(yy_state_984) + T_AS => Shift(yy_state_986) + T_INFIX1 | T_INFIX2 | T_INFIX3 | T_INFIX4 | T_EOF | T_WITH | T_CATCH | T_RPAREN | T_COMMA | T_MINUS | T_COLON | T_SEMI | T_PLUS | T_RBRACKET | T_BAR_RBRACKET | T_BAR | T_LBRACE | T_RBRACE | T_AMPERAMPER | T_AMPER | T_CARET | T_BARBAR | T_PIPE | T_PIPE_LEFT | T_ELSE | T_IF | T_FAT_ARROW | T_AND | T_IMPLIES => Reduce(1, NT_postfix_expr, yy_action_925) + _ => Error + } +} + +fn yy_state_213(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + NT_multiline_string => Shift(yy_state_2) + T_MULTILINE_INTERP => Shift(yy_state_4) + T_MULTILINE_STRING => Shift(yy_state_5) + NT_template_rhs => Shift(yy_state_214) + T_LBRACE => Shift(yy_state_215) + NT_non_empty_list_multiline_string_ => Shift(yy_state_949) + T_STRING => Shift(yy_state_950) + T_BYTES_INTERP => Shift(yy_state_951) + T_BYTES => Shift(yy_state_952) + T_INTERP => Shift(yy_state_953) + _ => Error + } +} + +fn yy_state_214(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_postfix_expr, yy_action_924) +} + +fn yy_state_215(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + NT_template_object_elem => Shift(yy_state_216) + NT_non_empty_list_commas_rev_template_object_elem_ => Shift(yy_state_217) + T_STRING => Shift(yy_state_221) + NT_non_empty_list_commas_template_object_elem_ => Shift(yy_state_946) + NT_list_commas_template_object_elem_ => Shift(yy_state_947) + T_RBRACE => Reduce(0, NT_list_commas_template_object_elem_, yy_action_923) + _ => Error + } +} + +fn yy_state_216(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_non_empty_list_commas_rev_template_object_elem_, yy_action_922) +} + +fn yy_state_217(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + NT_option_COMMA_ => Shift(yy_state_218) + T_COMMA => Shift(yy_state_219) + T_RBRACE => Reduce(0, NT_option_COMMA_, yy_action_1044) + _ => Error + } +} + +fn yy_state_218(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(2, NT_non_empty_list_commas_template_object_elem_, yy_action_921) +} + +fn yy_state_219(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + NT_template_object_elem => Shift(yy_state_220) + T_STRING => Shift(yy_state_221) + T_RBRACE => Reduce(1, NT_option_COMMA_, yy_action_1042) + _ => Error + } +} + +fn yy_state_220(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_non_empty_list_commas_rev_template_object_elem_, yy_action_920) +} + +fn yy_state_221(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_COLON => Shift(yy_state_222) + _ => Error + } +} + +fn yy_state_222(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + NT_multiline_string => Shift(yy_state_2) + T_MULTILINE_INTERP => Shift(yy_state_4) + T_MULTILINE_STRING => Shift(yy_state_5) + T_REGEX_LITERAL => Shift(yy_state_6) + T_STRING => Shift(yy_state_7) + T_FLOAT => Shift(yy_state_8) + T_DOUBLE => Shift(yy_state_9) + T_INT => Shift(yy_state_10) + T_CHAR => Shift(yy_state_11) + T_BYTES => Shift(yy_state_12) + T_BYTE => Shift(yy_state_13) + T_FALSE => Shift(yy_state_14) + T_TRUE => Shift(yy_state_15) + T_BYTES_INTERP => Shift(yy_state_16) + T_INTERP => Shift(yy_state_17) + NT_non_empty_list_multiline_string_ => Shift(yy_state_18) + NT_simple_constant => Shift(yy_state_19) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + NT_tuple_expr => Shift(yy_state_27) + T_LBRACKET_BAR => Shift(yy_state_28) + T_LBRACKET => Shift(yy_state_36) + NT_constr => Shift(yy_state_47) + NT_qual_ident_simple_expr => Shift(yy_state_48) + NT_atomic_expr => Shift(yy_state_50) + NT_anony_fn => Shift(yy_state_51) + T_LBRACE => Shift(yy_state_52) + T_FN => Shift(yy_state_61) + NT_type_name => Shift(yy_state_139) + T_ASYNC => Shift(yy_state_152) + NT_simple_expr => Shift(yy_state_165) + T_EXCLAMATION => Shift(yy_state_176) + T_MINUS => Shift(yy_state_191) + T_PLUS => Shift(yy_state_193) + T_UIDENT => Shift(yy_state_195) + T_PACKAGE_NAME => Shift(yy_state_196) + NT_prefix_expr => Shift(yy_state_201) + NT_range_expr => Shift(yy_state_212) + NT_postfix_expr => Shift(yy_state_223) + T_EXISTS => Shift(yy_state_224) + T_FORALL => Shift(yy_state_256) + NT_infix_expr => Shift(yy_state_272) + T_UNDERSCORE => Shift(yy_state_273) + T_LPAREN => Shift(yy_state_281) + NT_pipe_expr => Shift(yy_state_325) + NT_arrow_fn_expr => Shift(yy_state_344) + NT_quantifier_expr => Shift(yy_state_345) + NT_simple_try_expr => Shift(yy_state_346) + NT_lexscan_expr => Shift(yy_state_347) + NT_lexmatch_expr => Shift(yy_state_348) + NT_match_expr => Shift(yy_state_349) + NT_if_expr => Shift(yy_state_350) + NT_try_expr => Shift(yy_state_351) + NT_while_expr => Shift(yy_state_352) + NT_foreach_expr => Shift(yy_state_353) + NT_for_expr => Shift(yy_state_354) + T_LEXSCAN => Shift(yy_state_355) + NT_lexscan_header => Shift(yy_state_358) + T_LEXMATCH => Shift(yy_state_391) + NT_lexmatch_header => Shift(yy_state_399) + NT_match_header => Shift(yy_state_444) + T_MATCH => Shift(yy_state_605) + T_IF => Shift(yy_state_608) + T_TRY_EXCLAMATION => Shift(yy_state_614) + T_TRY_QUESTION => Shift(yy_state_616) + T_TRY => Shift(yy_state_618) + NT_loop_label_colon => Shift(yy_state_632) + T_POST_LABEL => Shift(yy_state_639) + T_EXTEND => Shift(yy_state_641) + T_LIDENT => Shift(yy_state_648) + NT_expr => Shift(yy_state_945) + T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_1071) + _ => Error + } +} + +fn yy_state_223(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_infix_expr, yy_action_919) +} + +fn yy_state_224(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_EXTEND => Shift(yy_state_225) + T_LIDENT => Shift(yy_state_267) + _ => Error + } +} + +fn yy_state_225(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_COLON => Shift(yy_state_226) + _ => Error + } +} + +fn yy_state_226(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_ASYNC => Shift(yy_state_65) + T_UNDERSCORE => Shift(yy_state_70) + T_AMPER => Shift(yy_state_71) + T_PACKAGE_NAME => Shift(yy_state_73) + T_UIDENT => Shift(yy_state_80) + T_LPAREN => Shift(yy_state_84) + NT_simple_type => Shift(yy_state_110) + NT_type_ => Shift(yy_state_227) + _ => Error + } +} + +fn yy_state_227(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_COMMA => Shift(yy_state_228) + _ => Error + } +} + +fn yy_state_228(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + NT_multiline_string => Shift(yy_state_2) + T_MULTILINE_INTERP => Shift(yy_state_4) + T_MULTILINE_STRING => Shift(yy_state_5) + T_REGEX_LITERAL => Shift(yy_state_6) + T_STRING => Shift(yy_state_7) + T_FLOAT => Shift(yy_state_8) + T_DOUBLE => Shift(yy_state_9) + T_INT => Shift(yy_state_10) + T_CHAR => Shift(yy_state_11) + T_BYTES => Shift(yy_state_12) + T_BYTE => Shift(yy_state_13) + T_FALSE => Shift(yy_state_14) + T_TRUE => Shift(yy_state_15) + T_BYTES_INTERP => Shift(yy_state_16) + T_INTERP => Shift(yy_state_17) + NT_non_empty_list_multiline_string_ => Shift(yy_state_18) + NT_simple_constant => Shift(yy_state_19) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + NT_tuple_expr => Shift(yy_state_27) + T_LBRACKET_BAR => Shift(yy_state_28) + T_LBRACKET => Shift(yy_state_36) + NT_constr => Shift(yy_state_47) + NT_qual_ident_simple_expr => Shift(yy_state_48) + T_UNDERSCORE => Shift(yy_state_49) + NT_atomic_expr => Shift(yy_state_50) + NT_anony_fn => Shift(yy_state_51) + T_LBRACE => Shift(yy_state_52) + T_FN => Shift(yy_state_61) + NT_type_name => Shift(yy_state_139) + T_ASYNC => Shift(yy_state_152) + NT_simple_expr => Shift(yy_state_165) + T_EXCLAMATION => Shift(yy_state_176) + T_LPAREN => Shift(yy_state_177) + T_MINUS => Shift(yy_state_191) + T_PLUS => Shift(yy_state_193) + T_UIDENT => Shift(yy_state_195) + T_PACKAGE_NAME => Shift(yy_state_196) + T_EXTEND => Shift(yy_state_199) + T_LIDENT => Shift(yy_state_200) + NT_prefix_expr => Shift(yy_state_201) + NT_range_expr => Shift(yy_state_212) + NT_postfix_expr => Shift(yy_state_223) + T_EXISTS => Shift(yy_state_224) + NT_infix_expr => Shift(yy_state_229) + NT_quantifier_expr => Shift(yy_state_254) + NT_quantifier_body_expr => Shift(yy_state_255) + T_FORALL => Shift(yy_state_256) + _ => Error + } +} + +fn yy_state_229(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_BARBAR => Shift(yy_state_230) + T_AMPERAMPER => Shift(yy_state_232) + T_BAR => Shift(yy_state_234) + T_CARET => Shift(yy_state_236) + T_AMPER => Shift(yy_state_238) + T_MINUS => Shift(yy_state_240) + T_PLUS => Shift(yy_state_242) + T_INFIX1 => Shift(yy_state_244) + T_INFIX2 => Shift(yy_state_246) + T_INFIX3 => Shift(yy_state_248) + T_INFIX4 => Shift(yy_state_250) + T_IMPLIES => Shift(yy_state_252) + T_EOF | T_RPAREN | T_COMMA | T_COLON | T_SEMI | T_RBRACKET | T_BAR_RBRACKET | T_LBRACE | T_RBRACE | T_AND => Reduce(1, NT_quantifier_body_expr, yy_action_918) + _ => Error + } +} + +fn yy_state_230(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + NT_multiline_string => Shift(yy_state_2) + T_MULTILINE_INTERP => Shift(yy_state_4) + T_MULTILINE_STRING => Shift(yy_state_5) + T_REGEX_LITERAL => Shift(yy_state_6) + T_STRING => Shift(yy_state_7) + T_FLOAT => Shift(yy_state_8) + T_DOUBLE => Shift(yy_state_9) + T_INT => Shift(yy_state_10) + T_CHAR => Shift(yy_state_11) + T_BYTES => Shift(yy_state_12) + T_BYTE => Shift(yy_state_13) + T_FALSE => Shift(yy_state_14) + T_TRUE => Shift(yy_state_15) + T_BYTES_INTERP => Shift(yy_state_16) + T_INTERP => Shift(yy_state_17) + NT_non_empty_list_multiline_string_ => Shift(yy_state_18) + NT_simple_constant => Shift(yy_state_19) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + NT_tuple_expr => Shift(yy_state_27) + T_LBRACKET_BAR => Shift(yy_state_28) + T_LBRACKET => Shift(yy_state_36) + NT_constr => Shift(yy_state_47) + NT_qual_ident_simple_expr => Shift(yy_state_48) + T_UNDERSCORE => Shift(yy_state_49) + NT_atomic_expr => Shift(yy_state_50) + NT_anony_fn => Shift(yy_state_51) + T_LBRACE => Shift(yy_state_52) + T_FN => Shift(yy_state_61) + NT_type_name => Shift(yy_state_139) + T_ASYNC => Shift(yy_state_152) + NT_simple_expr => Shift(yy_state_165) + T_EXCLAMATION => Shift(yy_state_176) + T_LPAREN => Shift(yy_state_177) + T_MINUS => Shift(yy_state_191) + T_PLUS => Shift(yy_state_193) + T_UIDENT => Shift(yy_state_195) + T_PACKAGE_NAME => Shift(yy_state_196) + T_EXTEND => Shift(yy_state_199) + T_LIDENT => Shift(yy_state_200) + NT_prefix_expr => Shift(yy_state_201) + NT_range_expr => Shift(yy_state_212) + NT_postfix_expr => Shift(yy_state_223) + NT_infix_expr => Shift(yy_state_231) + _ => Error + } +} + +fn yy_state_231(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_BARBAR => Shift(yy_state_230) + T_AMPERAMPER => Shift(yy_state_232) + T_BAR => Shift(yy_state_234) + T_CARET => Shift(yy_state_236) + T_AMPER => Shift(yy_state_238) + T_MINUS => Shift(yy_state_240) + T_PLUS => Shift(yy_state_242) + T_INFIX1 => Shift(yy_state_244) + T_INFIX2 => Shift(yy_state_246) + T_INFIX3 => Shift(yy_state_248) + T_INFIX4 => Shift(yy_state_250) + T_EOF | T_WITH | T_CATCH | T_RPAREN | T_COMMA | T_COLON | T_SEMI | T_RBRACKET | T_BAR_RBRACKET | T_LBRACE | T_RBRACE | T_PIPE | T_PIPE_LEFT | T_ELSE | T_IF | T_FAT_ARROW | T_AND | T_IMPLIES => Reduce(3, NT_infix_expr, yy_action_916) + _ => Error + } +} + +fn yy_state_232(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + NT_multiline_string => Shift(yy_state_2) + T_MULTILINE_INTERP => Shift(yy_state_4) + T_MULTILINE_STRING => Shift(yy_state_5) + T_REGEX_LITERAL => Shift(yy_state_6) + T_STRING => Shift(yy_state_7) + T_FLOAT => Shift(yy_state_8) + T_DOUBLE => Shift(yy_state_9) + T_INT => Shift(yy_state_10) + T_CHAR => Shift(yy_state_11) + T_BYTES => Shift(yy_state_12) + T_BYTE => Shift(yy_state_13) + T_FALSE => Shift(yy_state_14) + T_TRUE => Shift(yy_state_15) + T_BYTES_INTERP => Shift(yy_state_16) + T_INTERP => Shift(yy_state_17) + NT_non_empty_list_multiline_string_ => Shift(yy_state_18) + NT_simple_constant => Shift(yy_state_19) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + NT_tuple_expr => Shift(yy_state_27) + T_LBRACKET_BAR => Shift(yy_state_28) + T_LBRACKET => Shift(yy_state_36) + NT_constr => Shift(yy_state_47) + NT_qual_ident_simple_expr => Shift(yy_state_48) + T_UNDERSCORE => Shift(yy_state_49) + NT_atomic_expr => Shift(yy_state_50) + NT_anony_fn => Shift(yy_state_51) + T_LBRACE => Shift(yy_state_52) + T_FN => Shift(yy_state_61) + NT_type_name => Shift(yy_state_139) + T_ASYNC => Shift(yy_state_152) + NT_simple_expr => Shift(yy_state_165) + T_EXCLAMATION => Shift(yy_state_176) + T_LPAREN => Shift(yy_state_177) + T_MINUS => Shift(yy_state_191) + T_PLUS => Shift(yy_state_193) + T_UIDENT => Shift(yy_state_195) + T_PACKAGE_NAME => Shift(yy_state_196) + T_EXTEND => Shift(yy_state_199) + T_LIDENT => Shift(yy_state_200) + NT_prefix_expr => Shift(yy_state_201) + NT_range_expr => Shift(yy_state_212) + NT_postfix_expr => Shift(yy_state_223) + NT_infix_expr => Shift(yy_state_233) + _ => Error + } +} + +fn yy_state_233(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_AMPERAMPER => Shift(yy_state_232) + T_BAR => Shift(yy_state_234) + T_CARET => Shift(yy_state_236) + T_AMPER => Shift(yy_state_238) + T_MINUS => Shift(yy_state_240) + T_PLUS => Shift(yy_state_242) + T_INFIX1 => Shift(yy_state_244) + T_INFIX2 => Shift(yy_state_246) + T_INFIX3 => Shift(yy_state_248) + T_INFIX4 => Shift(yy_state_250) + T_EOF | T_WITH | T_CATCH | T_RPAREN | T_COMMA | T_COLON | T_SEMI | T_RBRACKET | T_BAR_RBRACKET | T_LBRACE | T_RBRACE | T_BARBAR | T_PIPE | T_PIPE_LEFT | T_ELSE | T_IF | T_FAT_ARROW | T_AND | T_IMPLIES => Reduce(3, NT_infix_expr, yy_action_914) + _ => Error + } +} + +fn yy_state_234(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + NT_multiline_string => Shift(yy_state_2) + T_MULTILINE_INTERP => Shift(yy_state_4) + T_MULTILINE_STRING => Shift(yy_state_5) + T_REGEX_LITERAL => Shift(yy_state_6) + T_STRING => Shift(yy_state_7) + T_FLOAT => Shift(yy_state_8) + T_DOUBLE => Shift(yy_state_9) + T_INT => Shift(yy_state_10) + T_CHAR => Shift(yy_state_11) + T_BYTES => Shift(yy_state_12) + T_BYTE => Shift(yy_state_13) + T_FALSE => Shift(yy_state_14) + T_TRUE => Shift(yy_state_15) + T_BYTES_INTERP => Shift(yy_state_16) + T_INTERP => Shift(yy_state_17) + NT_non_empty_list_multiline_string_ => Shift(yy_state_18) + NT_simple_constant => Shift(yy_state_19) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + NT_tuple_expr => Shift(yy_state_27) + T_LBRACKET_BAR => Shift(yy_state_28) + T_LBRACKET => Shift(yy_state_36) + NT_constr => Shift(yy_state_47) + NT_qual_ident_simple_expr => Shift(yy_state_48) + T_UNDERSCORE => Shift(yy_state_49) + NT_atomic_expr => Shift(yy_state_50) + NT_anony_fn => Shift(yy_state_51) + T_LBRACE => Shift(yy_state_52) + T_FN => Shift(yy_state_61) + NT_type_name => Shift(yy_state_139) + T_ASYNC => Shift(yy_state_152) + NT_simple_expr => Shift(yy_state_165) + T_EXCLAMATION => Shift(yy_state_176) + T_LPAREN => Shift(yy_state_177) + T_MINUS => Shift(yy_state_191) + T_PLUS => Shift(yy_state_193) + T_UIDENT => Shift(yy_state_195) + T_PACKAGE_NAME => Shift(yy_state_196) + T_EXTEND => Shift(yy_state_199) + T_LIDENT => Shift(yy_state_200) + NT_prefix_expr => Shift(yy_state_201) + NT_range_expr => Shift(yy_state_212) + NT_postfix_expr => Shift(yy_state_223) + NT_infix_expr => Shift(yy_state_235) + _ => Error + } +} + +fn yy_state_235(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_CARET => Shift(yy_state_236) + T_AMPER => Shift(yy_state_238) + T_MINUS => Shift(yy_state_240) + T_PLUS => Shift(yy_state_242) + T_INFIX1 => Shift(yy_state_244) + T_INFIX2 => Shift(yy_state_246) + T_INFIX3 => Shift(yy_state_248) + T_INFIX4 => Shift(yy_state_250) + T_EOF | T_WITH | T_CATCH | T_RPAREN | T_COMMA | T_COLON | T_SEMI | T_RBRACKET | T_BAR_RBRACKET | T_BAR | T_LBRACE | T_RBRACE | T_AMPERAMPER | T_BARBAR | T_PIPE | T_PIPE_LEFT | T_ELSE | T_IF | T_FAT_ARROW | T_AND | T_IMPLIES => Reduce(3, NT_infix_expr, yy_action_912) + _ => Error + } +} + +fn yy_state_236(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + NT_multiline_string => Shift(yy_state_2) + T_MULTILINE_INTERP => Shift(yy_state_4) + T_MULTILINE_STRING => Shift(yy_state_5) + T_REGEX_LITERAL => Shift(yy_state_6) + T_STRING => Shift(yy_state_7) + T_FLOAT => Shift(yy_state_8) + T_DOUBLE => Shift(yy_state_9) + T_INT => Shift(yy_state_10) + T_CHAR => Shift(yy_state_11) + T_BYTES => Shift(yy_state_12) + T_BYTE => Shift(yy_state_13) + T_FALSE => Shift(yy_state_14) + T_TRUE => Shift(yy_state_15) + T_BYTES_INTERP => Shift(yy_state_16) + T_INTERP => Shift(yy_state_17) + NT_non_empty_list_multiline_string_ => Shift(yy_state_18) + NT_simple_constant => Shift(yy_state_19) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + NT_tuple_expr => Shift(yy_state_27) + T_LBRACKET_BAR => Shift(yy_state_28) + T_LBRACKET => Shift(yy_state_36) + NT_constr => Shift(yy_state_47) + NT_qual_ident_simple_expr => Shift(yy_state_48) + T_UNDERSCORE => Shift(yy_state_49) + NT_atomic_expr => Shift(yy_state_50) + NT_anony_fn => Shift(yy_state_51) + T_LBRACE => Shift(yy_state_52) + T_FN => Shift(yy_state_61) + NT_type_name => Shift(yy_state_139) + T_ASYNC => Shift(yy_state_152) + NT_simple_expr => Shift(yy_state_165) + T_EXCLAMATION => Shift(yy_state_176) + T_LPAREN => Shift(yy_state_177) + T_MINUS => Shift(yy_state_191) + T_PLUS => Shift(yy_state_193) + T_UIDENT => Shift(yy_state_195) + T_PACKAGE_NAME => Shift(yy_state_196) + T_EXTEND => Shift(yy_state_199) + T_LIDENT => Shift(yy_state_200) + NT_prefix_expr => Shift(yy_state_201) + NT_range_expr => Shift(yy_state_212) + NT_postfix_expr => Shift(yy_state_223) + NT_infix_expr => Shift(yy_state_237) + _ => Error + } +} + +fn yy_state_237(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_AMPER => Shift(yy_state_238) + T_MINUS => Shift(yy_state_240) + T_PLUS => Shift(yy_state_242) + T_INFIX1 => Shift(yy_state_244) + T_INFIX2 => Shift(yy_state_246) + T_INFIX3 => Shift(yy_state_248) + T_INFIX4 => Shift(yy_state_250) + T_EOF | T_WITH | T_CATCH | T_RPAREN | T_COMMA | T_COLON | T_SEMI | T_RBRACKET | T_BAR_RBRACKET | T_BAR | T_LBRACE | T_RBRACE | T_AMPERAMPER | T_CARET | T_BARBAR | T_PIPE | T_PIPE_LEFT | T_ELSE | T_IF | T_FAT_ARROW | T_AND | T_IMPLIES => Reduce(3, NT_infix_expr, yy_action_910) + _ => Error + } +} + +fn yy_state_238(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + NT_multiline_string => Shift(yy_state_2) + T_MULTILINE_INTERP => Shift(yy_state_4) + T_MULTILINE_STRING => Shift(yy_state_5) + T_REGEX_LITERAL => Shift(yy_state_6) + T_STRING => Shift(yy_state_7) + T_FLOAT => Shift(yy_state_8) + T_DOUBLE => Shift(yy_state_9) + T_INT => Shift(yy_state_10) + T_CHAR => Shift(yy_state_11) + T_BYTES => Shift(yy_state_12) + T_BYTE => Shift(yy_state_13) + T_FALSE => Shift(yy_state_14) + T_TRUE => Shift(yy_state_15) + T_BYTES_INTERP => Shift(yy_state_16) + T_INTERP => Shift(yy_state_17) + NT_non_empty_list_multiline_string_ => Shift(yy_state_18) + NT_simple_constant => Shift(yy_state_19) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + NT_tuple_expr => Shift(yy_state_27) + T_LBRACKET_BAR => Shift(yy_state_28) + T_LBRACKET => Shift(yy_state_36) + NT_constr => Shift(yy_state_47) + NT_qual_ident_simple_expr => Shift(yy_state_48) + T_UNDERSCORE => Shift(yy_state_49) + NT_atomic_expr => Shift(yy_state_50) + NT_anony_fn => Shift(yy_state_51) + T_LBRACE => Shift(yy_state_52) + T_FN => Shift(yy_state_61) + NT_type_name => Shift(yy_state_139) + T_ASYNC => Shift(yy_state_152) + NT_simple_expr => Shift(yy_state_165) + T_EXCLAMATION => Shift(yy_state_176) + T_LPAREN => Shift(yy_state_177) + T_MINUS => Shift(yy_state_191) + T_PLUS => Shift(yy_state_193) + T_UIDENT => Shift(yy_state_195) + T_PACKAGE_NAME => Shift(yy_state_196) + T_EXTEND => Shift(yy_state_199) + T_LIDENT => Shift(yy_state_200) + NT_prefix_expr => Shift(yy_state_201) + NT_range_expr => Shift(yy_state_212) + NT_postfix_expr => Shift(yy_state_223) + NT_infix_expr => Shift(yy_state_239) + _ => Error + } +} + +fn yy_state_239(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_MINUS => Shift(yy_state_240) + T_PLUS => Shift(yy_state_242) + T_INFIX1 => Shift(yy_state_244) + T_INFIX2 => Shift(yy_state_246) + T_INFIX3 => Shift(yy_state_248) + T_INFIX4 => Shift(yy_state_250) + T_EOF | T_WITH | T_CATCH | T_RPAREN | T_COMMA | T_COLON | T_SEMI | T_RBRACKET | T_BAR_RBRACKET | T_BAR | T_LBRACE | T_RBRACE | T_AMPERAMPER | T_AMPER | T_CARET | T_BARBAR | T_PIPE | T_PIPE_LEFT | T_ELSE | T_IF | T_FAT_ARROW | T_AND | T_IMPLIES => Reduce(3, NT_infix_expr, yy_action_908) + _ => Error + } +} + +fn yy_state_240(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + NT_multiline_string => Shift(yy_state_2) + T_MULTILINE_INTERP => Shift(yy_state_4) + T_MULTILINE_STRING => Shift(yy_state_5) + T_REGEX_LITERAL => Shift(yy_state_6) + T_STRING => Shift(yy_state_7) + T_FLOAT => Shift(yy_state_8) + T_DOUBLE => Shift(yy_state_9) + T_INT => Shift(yy_state_10) + T_CHAR => Shift(yy_state_11) + T_BYTES => Shift(yy_state_12) + T_BYTE => Shift(yy_state_13) + T_FALSE => Shift(yy_state_14) + T_TRUE => Shift(yy_state_15) + T_BYTES_INTERP => Shift(yy_state_16) + T_INTERP => Shift(yy_state_17) + NT_non_empty_list_multiline_string_ => Shift(yy_state_18) + NT_simple_constant => Shift(yy_state_19) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + NT_tuple_expr => Shift(yy_state_27) + T_LBRACKET_BAR => Shift(yy_state_28) + T_LBRACKET => Shift(yy_state_36) + NT_constr => Shift(yy_state_47) + NT_qual_ident_simple_expr => Shift(yy_state_48) + T_UNDERSCORE => Shift(yy_state_49) + NT_atomic_expr => Shift(yy_state_50) + NT_anony_fn => Shift(yy_state_51) + T_LBRACE => Shift(yy_state_52) + T_FN => Shift(yy_state_61) + NT_type_name => Shift(yy_state_139) + T_ASYNC => Shift(yy_state_152) + NT_simple_expr => Shift(yy_state_165) + T_EXCLAMATION => Shift(yy_state_176) + T_LPAREN => Shift(yy_state_177) + T_MINUS => Shift(yy_state_191) + T_PLUS => Shift(yy_state_193) + T_UIDENT => Shift(yy_state_195) + T_PACKAGE_NAME => Shift(yy_state_196) + T_EXTEND => Shift(yy_state_199) + T_LIDENT => Shift(yy_state_200) + NT_prefix_expr => Shift(yy_state_201) + NT_range_expr => Shift(yy_state_212) + NT_postfix_expr => Shift(yy_state_223) + NT_infix_expr => Shift(yy_state_241) + _ => Error + } +} + +fn yy_state_241(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_INFIX3 => Shift(yy_state_248) + T_INFIX4 => Shift(yy_state_250) + T_INFIX1 | T_INFIX2 | T_EOF | T_WITH | T_CATCH | T_RPAREN | T_COMMA | T_MINUS | T_COLON | T_SEMI | T_PLUS | T_RBRACKET | T_BAR_RBRACKET | T_BAR | T_LBRACE | T_RBRACE | T_AMPERAMPER | T_AMPER | T_CARET | T_BARBAR | T_PIPE | T_PIPE_LEFT | T_ELSE | T_IF | T_FAT_ARROW | T_AND | T_IMPLIES => Reduce(3, NT_infix_expr, yy_action_906) + _ => Error + } +} + +fn yy_state_242(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + NT_multiline_string => Shift(yy_state_2) + T_MULTILINE_INTERP => Shift(yy_state_4) + T_MULTILINE_STRING => Shift(yy_state_5) + T_REGEX_LITERAL => Shift(yy_state_6) + T_STRING => Shift(yy_state_7) + T_FLOAT => Shift(yy_state_8) + T_DOUBLE => Shift(yy_state_9) + T_INT => Shift(yy_state_10) + T_CHAR => Shift(yy_state_11) + T_BYTES => Shift(yy_state_12) + T_BYTE => Shift(yy_state_13) + T_FALSE => Shift(yy_state_14) + T_TRUE => Shift(yy_state_15) + T_BYTES_INTERP => Shift(yy_state_16) + T_INTERP => Shift(yy_state_17) + NT_non_empty_list_multiline_string_ => Shift(yy_state_18) + NT_simple_constant => Shift(yy_state_19) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + NT_tuple_expr => Shift(yy_state_27) + T_LBRACKET_BAR => Shift(yy_state_28) + T_LBRACKET => Shift(yy_state_36) + NT_constr => Shift(yy_state_47) + NT_qual_ident_simple_expr => Shift(yy_state_48) + T_UNDERSCORE => Shift(yy_state_49) + NT_atomic_expr => Shift(yy_state_50) + NT_anony_fn => Shift(yy_state_51) + T_LBRACE => Shift(yy_state_52) + T_FN => Shift(yy_state_61) + NT_type_name => Shift(yy_state_139) + T_ASYNC => Shift(yy_state_152) + NT_simple_expr => Shift(yy_state_165) + T_EXCLAMATION => Shift(yy_state_176) + T_LPAREN => Shift(yy_state_177) + T_MINUS => Shift(yy_state_191) + T_PLUS => Shift(yy_state_193) + T_UIDENT => Shift(yy_state_195) + T_PACKAGE_NAME => Shift(yy_state_196) + T_EXTEND => Shift(yy_state_199) + T_LIDENT => Shift(yy_state_200) + NT_prefix_expr => Shift(yy_state_201) + NT_range_expr => Shift(yy_state_212) + NT_postfix_expr => Shift(yy_state_223) + NT_infix_expr => Shift(yy_state_243) + _ => Error + } +} + +fn yy_state_243(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_INFIX3 => Shift(yy_state_248) + T_INFIX4 => Shift(yy_state_250) + T_INFIX1 | T_INFIX2 | T_EOF | T_WITH | T_CATCH | T_RPAREN | T_COMMA | T_MINUS | T_COLON | T_SEMI | T_PLUS | T_RBRACKET | T_BAR_RBRACKET | T_BAR | T_LBRACE | T_RBRACE | T_AMPERAMPER | T_AMPER | T_CARET | T_BARBAR | T_PIPE | T_PIPE_LEFT | T_ELSE | T_IF | T_FAT_ARROW | T_AND | T_IMPLIES => Reduce(3, NT_infix_expr, yy_action_904) + _ => Error + } +} + +fn yy_state_244(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + NT_multiline_string => Shift(yy_state_2) + T_MULTILINE_INTERP => Shift(yy_state_4) + T_MULTILINE_STRING => Shift(yy_state_5) + T_REGEX_LITERAL => Shift(yy_state_6) + T_STRING => Shift(yy_state_7) + T_FLOAT => Shift(yy_state_8) + T_DOUBLE => Shift(yy_state_9) + T_INT => Shift(yy_state_10) + T_CHAR => Shift(yy_state_11) + T_BYTES => Shift(yy_state_12) + T_BYTE => Shift(yy_state_13) + T_FALSE => Shift(yy_state_14) + T_TRUE => Shift(yy_state_15) + T_BYTES_INTERP => Shift(yy_state_16) + T_INTERP => Shift(yy_state_17) + NT_non_empty_list_multiline_string_ => Shift(yy_state_18) + NT_simple_constant => Shift(yy_state_19) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + NT_tuple_expr => Shift(yy_state_27) + T_LBRACKET_BAR => Shift(yy_state_28) + T_LBRACKET => Shift(yy_state_36) + NT_constr => Shift(yy_state_47) + NT_qual_ident_simple_expr => Shift(yy_state_48) + T_UNDERSCORE => Shift(yy_state_49) + NT_atomic_expr => Shift(yy_state_50) + NT_anony_fn => Shift(yy_state_51) + T_LBRACE => Shift(yy_state_52) + T_FN => Shift(yy_state_61) + NT_type_name => Shift(yy_state_139) + T_ASYNC => Shift(yy_state_152) + NT_simple_expr => Shift(yy_state_165) + T_EXCLAMATION => Shift(yy_state_176) + T_LPAREN => Shift(yy_state_177) + T_MINUS => Shift(yy_state_191) + T_PLUS => Shift(yy_state_193) + T_UIDENT => Shift(yy_state_195) + T_PACKAGE_NAME => Shift(yy_state_196) + T_EXTEND => Shift(yy_state_199) + T_LIDENT => Shift(yy_state_200) + NT_prefix_expr => Shift(yy_state_201) + NT_range_expr => Shift(yy_state_212) + NT_postfix_expr => Shift(yy_state_223) + NT_infix_expr => Shift(yy_state_245) + _ => Error + } +} + +fn yy_state_245(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_MINUS => Shift(yy_state_240) + T_PLUS => Shift(yy_state_242) + T_INFIX2 => Shift(yy_state_246) + T_INFIX3 => Shift(yy_state_248) + T_INFIX4 => Shift(yy_state_250) + T_INFIX1 | T_EOF | T_WITH | T_CATCH | T_RPAREN | T_COMMA | T_COLON | T_SEMI | T_RBRACKET | T_BAR_RBRACKET | T_BAR | T_LBRACE | T_RBRACE | T_AMPERAMPER | T_AMPER | T_CARET | T_BARBAR | T_PIPE | T_PIPE_LEFT | T_ELSE | T_IF | T_FAT_ARROW | T_AND | T_IMPLIES => Reduce(3, NT_infix_expr, yy_action_902) + _ => Error + } +} + +fn yy_state_246(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + NT_multiline_string => Shift(yy_state_2) + T_MULTILINE_INTERP => Shift(yy_state_4) + T_MULTILINE_STRING => Shift(yy_state_5) + T_REGEX_LITERAL => Shift(yy_state_6) + T_STRING => Shift(yy_state_7) + T_FLOAT => Shift(yy_state_8) + T_DOUBLE => Shift(yy_state_9) + T_INT => Shift(yy_state_10) + T_CHAR => Shift(yy_state_11) + T_BYTES => Shift(yy_state_12) + T_BYTE => Shift(yy_state_13) + T_FALSE => Shift(yy_state_14) + T_TRUE => Shift(yy_state_15) + T_BYTES_INTERP => Shift(yy_state_16) + T_INTERP => Shift(yy_state_17) + NT_non_empty_list_multiline_string_ => Shift(yy_state_18) + NT_simple_constant => Shift(yy_state_19) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + NT_tuple_expr => Shift(yy_state_27) + T_LBRACKET_BAR => Shift(yy_state_28) + T_LBRACKET => Shift(yy_state_36) + NT_constr => Shift(yy_state_47) + NT_qual_ident_simple_expr => Shift(yy_state_48) + T_UNDERSCORE => Shift(yy_state_49) + NT_atomic_expr => Shift(yy_state_50) + NT_anony_fn => Shift(yy_state_51) + T_LBRACE => Shift(yy_state_52) + T_FN => Shift(yy_state_61) + NT_type_name => Shift(yy_state_139) + T_ASYNC => Shift(yy_state_152) + NT_simple_expr => Shift(yy_state_165) + T_EXCLAMATION => Shift(yy_state_176) + T_LPAREN => Shift(yy_state_177) + T_MINUS => Shift(yy_state_191) + T_PLUS => Shift(yy_state_193) + T_UIDENT => Shift(yy_state_195) + T_PACKAGE_NAME => Shift(yy_state_196) + T_EXTEND => Shift(yy_state_199) + T_LIDENT => Shift(yy_state_200) + NT_prefix_expr => Shift(yy_state_201) + NT_range_expr => Shift(yy_state_212) + NT_postfix_expr => Shift(yy_state_223) + NT_infix_expr => Shift(yy_state_247) + _ => Error + } +} + +fn yy_state_247(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_MINUS => Shift(yy_state_240) + T_PLUS => Shift(yy_state_242) + T_INFIX3 => Shift(yy_state_248) + T_INFIX4 => Shift(yy_state_250) + T_INFIX1 | T_INFIX2 | T_EOF | T_WITH | T_CATCH | T_RPAREN | T_COMMA | T_COLON | T_SEMI | T_RBRACKET | T_BAR_RBRACKET | T_BAR | T_LBRACE | T_RBRACE | T_AMPERAMPER | T_AMPER | T_CARET | T_BARBAR | T_PIPE | T_PIPE_LEFT | T_ELSE | T_IF | T_FAT_ARROW | T_AND | T_IMPLIES => Reduce(3, NT_infix_expr, yy_action_900) + _ => Error + } +} + +fn yy_state_248(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + NT_multiline_string => Shift(yy_state_2) + T_MULTILINE_INTERP => Shift(yy_state_4) + T_MULTILINE_STRING => Shift(yy_state_5) + T_REGEX_LITERAL => Shift(yy_state_6) + T_STRING => Shift(yy_state_7) + T_FLOAT => Shift(yy_state_8) + T_DOUBLE => Shift(yy_state_9) + T_INT => Shift(yy_state_10) + T_CHAR => Shift(yy_state_11) + T_BYTES => Shift(yy_state_12) + T_BYTE => Shift(yy_state_13) + T_FALSE => Shift(yy_state_14) + T_TRUE => Shift(yy_state_15) + T_BYTES_INTERP => Shift(yy_state_16) + T_INTERP => Shift(yy_state_17) + NT_non_empty_list_multiline_string_ => Shift(yy_state_18) + NT_simple_constant => Shift(yy_state_19) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + NT_tuple_expr => Shift(yy_state_27) + T_LBRACKET_BAR => Shift(yy_state_28) + T_LBRACKET => Shift(yy_state_36) + NT_constr => Shift(yy_state_47) + NT_qual_ident_simple_expr => Shift(yy_state_48) + T_UNDERSCORE => Shift(yy_state_49) + NT_atomic_expr => Shift(yy_state_50) + NT_anony_fn => Shift(yy_state_51) + T_LBRACE => Shift(yy_state_52) + T_FN => Shift(yy_state_61) + NT_type_name => Shift(yy_state_139) + T_ASYNC => Shift(yy_state_152) + NT_simple_expr => Shift(yy_state_165) + T_EXCLAMATION => Shift(yy_state_176) + T_LPAREN => Shift(yy_state_177) + T_MINUS => Shift(yy_state_191) + T_PLUS => Shift(yy_state_193) + T_UIDENT => Shift(yy_state_195) + T_PACKAGE_NAME => Shift(yy_state_196) + T_EXTEND => Shift(yy_state_199) + T_LIDENT => Shift(yy_state_200) + NT_prefix_expr => Shift(yy_state_201) + NT_range_expr => Shift(yy_state_212) + NT_postfix_expr => Shift(yy_state_223) + NT_infix_expr => Shift(yy_state_249) + _ => Error + } +} + +fn yy_state_249(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_INFIX4 => Shift(yy_state_250) + T_INFIX1 | T_INFIX2 | T_INFIX3 | T_EOF | T_WITH | T_CATCH | T_RPAREN | T_COMMA | T_MINUS | T_COLON | T_SEMI | T_PLUS | T_RBRACKET | T_BAR_RBRACKET | T_BAR | T_LBRACE | T_RBRACE | T_AMPERAMPER | T_AMPER | T_CARET | T_BARBAR | T_PIPE | T_PIPE_LEFT | T_ELSE | T_IF | T_FAT_ARROW | T_AND | T_IMPLIES => Reduce(3, NT_infix_expr, yy_action_898) + _ => Error + } +} + +fn yy_state_250(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + NT_multiline_string => Shift(yy_state_2) + T_MULTILINE_INTERP => Shift(yy_state_4) + T_MULTILINE_STRING => Shift(yy_state_5) + T_REGEX_LITERAL => Shift(yy_state_6) + T_STRING => Shift(yy_state_7) + T_FLOAT => Shift(yy_state_8) + T_DOUBLE => Shift(yy_state_9) + T_INT => Shift(yy_state_10) + T_CHAR => Shift(yy_state_11) + T_BYTES => Shift(yy_state_12) + T_BYTE => Shift(yy_state_13) + T_FALSE => Shift(yy_state_14) + T_TRUE => Shift(yy_state_15) + T_BYTES_INTERP => Shift(yy_state_16) + T_INTERP => Shift(yy_state_17) + NT_non_empty_list_multiline_string_ => Shift(yy_state_18) + NT_simple_constant => Shift(yy_state_19) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + NT_tuple_expr => Shift(yy_state_27) + T_LBRACKET_BAR => Shift(yy_state_28) + T_LBRACKET => Shift(yy_state_36) + NT_constr => Shift(yy_state_47) + NT_qual_ident_simple_expr => Shift(yy_state_48) + T_UNDERSCORE => Shift(yy_state_49) + NT_atomic_expr => Shift(yy_state_50) + NT_anony_fn => Shift(yy_state_51) + T_LBRACE => Shift(yy_state_52) + T_FN => Shift(yy_state_61) + NT_type_name => Shift(yy_state_139) + T_ASYNC => Shift(yy_state_152) + NT_simple_expr => Shift(yy_state_165) + T_EXCLAMATION => Shift(yy_state_176) + T_LPAREN => Shift(yy_state_177) + T_MINUS => Shift(yy_state_191) + T_PLUS => Shift(yy_state_193) + T_UIDENT => Shift(yy_state_195) + T_PACKAGE_NAME => Shift(yy_state_196) + T_EXTEND => Shift(yy_state_199) + T_LIDENT => Shift(yy_state_200) + NT_prefix_expr => Shift(yy_state_201) + NT_range_expr => Shift(yy_state_212) + NT_postfix_expr => Shift(yy_state_223) + NT_infix_expr => Shift(yy_state_251) + _ => Error + } +} + +fn yy_state_251(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_infix_expr, yy_action_896) +} + +fn yy_state_252(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + NT_multiline_string => Shift(yy_state_2) + T_MULTILINE_INTERP => Shift(yy_state_4) + T_MULTILINE_STRING => Shift(yy_state_5) + T_REGEX_LITERAL => Shift(yy_state_6) + T_STRING => Shift(yy_state_7) + T_FLOAT => Shift(yy_state_8) + T_DOUBLE => Shift(yy_state_9) + T_INT => Shift(yy_state_10) + T_CHAR => Shift(yy_state_11) + T_BYTES => Shift(yy_state_12) + T_BYTE => Shift(yy_state_13) + T_FALSE => Shift(yy_state_14) + T_TRUE => Shift(yy_state_15) + T_BYTES_INTERP => Shift(yy_state_16) + T_INTERP => Shift(yy_state_17) + NT_non_empty_list_multiline_string_ => Shift(yy_state_18) + NT_simple_constant => Shift(yy_state_19) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + NT_tuple_expr => Shift(yy_state_27) + T_LBRACKET_BAR => Shift(yy_state_28) + T_LBRACKET => Shift(yy_state_36) + NT_constr => Shift(yy_state_47) + NT_qual_ident_simple_expr => Shift(yy_state_48) + T_UNDERSCORE => Shift(yy_state_49) + NT_atomic_expr => Shift(yy_state_50) + NT_anony_fn => Shift(yy_state_51) + T_LBRACE => Shift(yy_state_52) + T_FN => Shift(yy_state_61) + NT_type_name => Shift(yy_state_139) + T_ASYNC => Shift(yy_state_152) + NT_simple_expr => Shift(yy_state_165) + T_EXCLAMATION => Shift(yy_state_176) + T_LPAREN => Shift(yy_state_177) + T_MINUS => Shift(yy_state_191) + T_PLUS => Shift(yy_state_193) + T_UIDENT => Shift(yy_state_195) + T_PACKAGE_NAME => Shift(yy_state_196) + T_EXTEND => Shift(yy_state_199) + T_LIDENT => Shift(yy_state_200) + NT_prefix_expr => Shift(yy_state_201) + NT_range_expr => Shift(yy_state_212) + NT_postfix_expr => Shift(yy_state_223) + NT_infix_expr => Shift(yy_state_253) + _ => Error + } +} + +fn yy_state_253(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_BARBAR => Shift(yy_state_230) + T_AMPERAMPER => Shift(yy_state_232) + T_BAR => Shift(yy_state_234) + T_CARET => Shift(yy_state_236) + T_AMPER => Shift(yy_state_238) + T_MINUS => Shift(yy_state_240) + T_PLUS => Shift(yy_state_242) + T_INFIX1 => Shift(yy_state_244) + T_INFIX2 => Shift(yy_state_246) + T_INFIX3 => Shift(yy_state_248) + T_INFIX4 => Shift(yy_state_250) + T_IMPLIES => Shift(yy_state_252) + T_EOF | T_WITH | T_CATCH | T_RPAREN | T_COMMA | T_COLON | T_SEMI | T_RBRACKET | T_BAR_RBRACKET | T_LBRACE | T_RBRACE | T_PIPE | T_PIPE_LEFT | T_ELSE | T_IF | T_FAT_ARROW | T_AND => Reduce(3, NT_infix_expr, yy_action_895) + _ => Error + } +} + +fn yy_state_254(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_quantifier_body_expr, yy_action_894) +} + +fn yy_state_255(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(6, NT_quantifier_expr, yy_action_893) +} + +fn yy_state_256(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_EXTEND => Shift(yy_state_257) + T_LIDENT => Shift(yy_state_262) + _ => Error + } +} + +fn yy_state_257(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_COLON => Shift(yy_state_258) + _ => Error + } +} + +fn yy_state_258(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_ASYNC => Shift(yy_state_65) + T_UNDERSCORE => Shift(yy_state_70) + T_AMPER => Shift(yy_state_71) + T_PACKAGE_NAME => Shift(yy_state_73) + T_UIDENT => Shift(yy_state_80) + T_LPAREN => Shift(yy_state_84) + NT_simple_type => Shift(yy_state_110) + NT_type_ => Shift(yy_state_259) + _ => Error + } +} + +fn yy_state_259(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_COMMA => Shift(yy_state_260) + _ => Error + } +} + +fn yy_state_260(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + NT_multiline_string => Shift(yy_state_2) + T_MULTILINE_INTERP => Shift(yy_state_4) + T_MULTILINE_STRING => Shift(yy_state_5) + T_REGEX_LITERAL => Shift(yy_state_6) + T_STRING => Shift(yy_state_7) + T_FLOAT => Shift(yy_state_8) + T_DOUBLE => Shift(yy_state_9) + T_INT => Shift(yy_state_10) + T_CHAR => Shift(yy_state_11) + T_BYTES => Shift(yy_state_12) + T_BYTE => Shift(yy_state_13) + T_FALSE => Shift(yy_state_14) + T_TRUE => Shift(yy_state_15) + T_BYTES_INTERP => Shift(yy_state_16) + T_INTERP => Shift(yy_state_17) + NT_non_empty_list_multiline_string_ => Shift(yy_state_18) + NT_simple_constant => Shift(yy_state_19) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + NT_tuple_expr => Shift(yy_state_27) + T_LBRACKET_BAR => Shift(yy_state_28) + T_LBRACKET => Shift(yy_state_36) + NT_constr => Shift(yy_state_47) + NT_qual_ident_simple_expr => Shift(yy_state_48) + T_UNDERSCORE => Shift(yy_state_49) + NT_atomic_expr => Shift(yy_state_50) + NT_anony_fn => Shift(yy_state_51) + T_LBRACE => Shift(yy_state_52) + T_FN => Shift(yy_state_61) + NT_type_name => Shift(yy_state_139) + T_ASYNC => Shift(yy_state_152) + NT_simple_expr => Shift(yy_state_165) + T_EXCLAMATION => Shift(yy_state_176) + T_LPAREN => Shift(yy_state_177) + T_MINUS => Shift(yy_state_191) + T_PLUS => Shift(yy_state_193) + T_UIDENT => Shift(yy_state_195) + T_PACKAGE_NAME => Shift(yy_state_196) + T_EXTEND => Shift(yy_state_199) + T_LIDENT => Shift(yy_state_200) + NT_prefix_expr => Shift(yy_state_201) + NT_range_expr => Shift(yy_state_212) + NT_postfix_expr => Shift(yy_state_223) + T_EXISTS => Shift(yy_state_224) + NT_infix_expr => Shift(yy_state_229) + NT_quantifier_expr => Shift(yy_state_254) + T_FORALL => Shift(yy_state_256) + NT_quantifier_body_expr => Shift(yy_state_261) + _ => Error + } +} + +fn yy_state_261(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(6, NT_quantifier_expr, yy_action_892) +} + +fn yy_state_262(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_COLON => Shift(yy_state_263) + _ => Error + } +} + +fn yy_state_263(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_ASYNC => Shift(yy_state_65) + T_UNDERSCORE => Shift(yy_state_70) + T_AMPER => Shift(yy_state_71) + T_PACKAGE_NAME => Shift(yy_state_73) + T_UIDENT => Shift(yy_state_80) + T_LPAREN => Shift(yy_state_84) + NT_simple_type => Shift(yy_state_110) + NT_type_ => Shift(yy_state_264) + _ => Error + } +} + +fn yy_state_264(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_COMMA => Shift(yy_state_265) + _ => Error + } +} + +fn yy_state_265(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + NT_multiline_string => Shift(yy_state_2) + T_MULTILINE_INTERP => Shift(yy_state_4) + T_MULTILINE_STRING => Shift(yy_state_5) + T_REGEX_LITERAL => Shift(yy_state_6) + T_STRING => Shift(yy_state_7) + T_FLOAT => Shift(yy_state_8) + T_DOUBLE => Shift(yy_state_9) + T_INT => Shift(yy_state_10) + T_CHAR => Shift(yy_state_11) + T_BYTES => Shift(yy_state_12) + T_BYTE => Shift(yy_state_13) + T_FALSE => Shift(yy_state_14) + T_TRUE => Shift(yy_state_15) + T_BYTES_INTERP => Shift(yy_state_16) + T_INTERP => Shift(yy_state_17) + NT_non_empty_list_multiline_string_ => Shift(yy_state_18) + NT_simple_constant => Shift(yy_state_19) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + NT_tuple_expr => Shift(yy_state_27) + T_LBRACKET_BAR => Shift(yy_state_28) + T_LBRACKET => Shift(yy_state_36) + NT_constr => Shift(yy_state_47) + NT_qual_ident_simple_expr => Shift(yy_state_48) + T_UNDERSCORE => Shift(yy_state_49) + NT_atomic_expr => Shift(yy_state_50) + NT_anony_fn => Shift(yy_state_51) + T_LBRACE => Shift(yy_state_52) + T_FN => Shift(yy_state_61) + NT_type_name => Shift(yy_state_139) + T_ASYNC => Shift(yy_state_152) + NT_simple_expr => Shift(yy_state_165) + T_EXCLAMATION => Shift(yy_state_176) + T_LPAREN => Shift(yy_state_177) + T_MINUS => Shift(yy_state_191) + T_PLUS => Shift(yy_state_193) + T_UIDENT => Shift(yy_state_195) + T_PACKAGE_NAME => Shift(yy_state_196) + T_EXTEND => Shift(yy_state_199) + T_LIDENT => Shift(yy_state_200) + NT_prefix_expr => Shift(yy_state_201) + NT_range_expr => Shift(yy_state_212) + NT_postfix_expr => Shift(yy_state_223) + T_EXISTS => Shift(yy_state_224) + NT_infix_expr => Shift(yy_state_229) + NT_quantifier_expr => Shift(yy_state_254) + T_FORALL => Shift(yy_state_256) + NT_quantifier_body_expr => Shift(yy_state_266) + _ => Error + } +} + +fn yy_state_266(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(6, NT_quantifier_expr, yy_action_891) +} + +fn yy_state_267(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_COLON => Shift(yy_state_268) + _ => Error + } +} + +fn yy_state_268(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_ASYNC => Shift(yy_state_65) + T_UNDERSCORE => Shift(yy_state_70) + T_AMPER => Shift(yy_state_71) + T_PACKAGE_NAME => Shift(yy_state_73) + T_UIDENT => Shift(yy_state_80) + T_LPAREN => Shift(yy_state_84) + NT_simple_type => Shift(yy_state_110) + NT_type_ => Shift(yy_state_269) + _ => Error + } +} + +fn yy_state_269(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_COMMA => Shift(yy_state_270) + _ => Error + } +} + +fn yy_state_270(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + NT_multiline_string => Shift(yy_state_2) + T_MULTILINE_INTERP => Shift(yy_state_4) + T_MULTILINE_STRING => Shift(yy_state_5) + T_REGEX_LITERAL => Shift(yy_state_6) + T_STRING => Shift(yy_state_7) + T_FLOAT => Shift(yy_state_8) + T_DOUBLE => Shift(yy_state_9) + T_INT => Shift(yy_state_10) + T_CHAR => Shift(yy_state_11) + T_BYTES => Shift(yy_state_12) + T_BYTE => Shift(yy_state_13) + T_FALSE => Shift(yy_state_14) + T_TRUE => Shift(yy_state_15) + T_BYTES_INTERP => Shift(yy_state_16) + T_INTERP => Shift(yy_state_17) + NT_non_empty_list_multiline_string_ => Shift(yy_state_18) + NT_simple_constant => Shift(yy_state_19) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + NT_tuple_expr => Shift(yy_state_27) + T_LBRACKET_BAR => Shift(yy_state_28) + T_LBRACKET => Shift(yy_state_36) + NT_constr => Shift(yy_state_47) + NT_qual_ident_simple_expr => Shift(yy_state_48) + T_UNDERSCORE => Shift(yy_state_49) + NT_atomic_expr => Shift(yy_state_50) + NT_anony_fn => Shift(yy_state_51) + T_LBRACE => Shift(yy_state_52) + T_FN => Shift(yy_state_61) + NT_type_name => Shift(yy_state_139) + T_ASYNC => Shift(yy_state_152) + NT_simple_expr => Shift(yy_state_165) + T_EXCLAMATION => Shift(yy_state_176) + T_LPAREN => Shift(yy_state_177) + T_MINUS => Shift(yy_state_191) + T_PLUS => Shift(yy_state_193) + T_UIDENT => Shift(yy_state_195) + T_PACKAGE_NAME => Shift(yy_state_196) + T_EXTEND => Shift(yy_state_199) + T_LIDENT => Shift(yy_state_200) + NT_prefix_expr => Shift(yy_state_201) + NT_range_expr => Shift(yy_state_212) + NT_postfix_expr => Shift(yy_state_223) + T_EXISTS => Shift(yy_state_224) + NT_infix_expr => Shift(yy_state_229) + NT_quantifier_expr => Shift(yy_state_254) + T_FORALL => Shift(yy_state_256) + NT_quantifier_body_expr => Shift(yy_state_271) + _ => Error + } +} + +fn yy_state_271(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(6, NT_quantifier_expr, yy_action_890) +} + +fn yy_state_272(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_BARBAR => Shift(yy_state_230) + T_AMPERAMPER => Shift(yy_state_232) + T_BAR => Shift(yy_state_234) + T_CARET => Shift(yy_state_236) + T_AMPER => Shift(yy_state_238) + T_MINUS => Shift(yy_state_240) + T_PLUS => Shift(yy_state_242) + T_INFIX1 => Shift(yy_state_244) + T_INFIX2 => Shift(yy_state_246) + T_INFIX3 => Shift(yy_state_248) + T_INFIX4 => Shift(yy_state_250) + T_IMPLIES => Shift(yy_state_252) + T_EOF | T_CATCH | T_RPAREN | T_COMMA | T_COLON | T_SEMI | T_RBRACKET | T_BAR_RBRACKET | T_LBRACE | T_RBRACE | T_PIPE | T_PIPE_LEFT | T_AND => Reduce(1, NT_pipe_expr, yy_action_889) + _ => Error + } +} + +fn yy_state_273(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_FAT_ARROW => Shift(yy_state_274) + T_INFIX1 | T_INFIX2 | T_INFIX3 | T_INFIX4 | T_EOF | T_CATCH | T_EQ_TILDE | T_LPAREN | T_RPAREN | T_COMMA | T_MINUS | T_DOT_LIDENT | T_DOT_INT | T_COLON | T_SEMI | T_LBRACKET | T_PLUS | T_RBRACKET | T_BAR_RBRACKET | T_BAR | T_LBRACE | T_RBRACE | T_AMPERAMPER | T_AMPER | T_CARET | T_BARBAR | T_AS | T_PIPE | T_PIPE_LEFT | T_LT_PLUS | T_LT_QUESTION | T_DOTDOT | T_RANGE_INCLUSIVE | T_RANGE_LT_INCLUSIVE | T_RANGE_EXCLUSIVE | T_RANGE_INCLUSIVE_REV | T_RANGE_EXCLUSIVE_REV | T_IS | T_AND | T_IMPLIES | T_LEXMATCH_QUESTION => Reduce(1, NT_simple_expr, yy_action_1031) + _ => Error + } +} + +fn yy_state_274(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + NT_multiline_string => Shift(yy_state_2) + T_MULTILINE_INTERP => Shift(yy_state_4) + T_MULTILINE_STRING => Shift(yy_state_5) + T_REGEX_LITERAL => Shift(yy_state_6) + T_STRING => Shift(yy_state_7) + T_FLOAT => Shift(yy_state_8) + T_DOUBLE => Shift(yy_state_9) + T_INT => Shift(yy_state_10) + T_CHAR => Shift(yy_state_11) + T_BYTES => Shift(yy_state_12) + T_BYTE => Shift(yy_state_13) + T_FALSE => Shift(yy_state_14) + T_TRUE => Shift(yy_state_15) + T_BYTES_INTERP => Shift(yy_state_16) + T_INTERP => Shift(yy_state_17) + NT_non_empty_list_multiline_string_ => Shift(yy_state_18) + NT_simple_constant => Shift(yy_state_19) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + NT_tuple_expr => Shift(yy_state_27) + T_LBRACKET_BAR => Shift(yy_state_28) + T_LBRACKET => Shift(yy_state_36) + NT_constr => Shift(yy_state_47) + NT_qual_ident_simple_expr => Shift(yy_state_48) + NT_atomic_expr => Shift(yy_state_50) + NT_anony_fn => Shift(yy_state_51) + T_LBRACE => Shift(yy_state_52) + T_FN => Shift(yy_state_61) + NT_type_name => Shift(yy_state_139) + T_ASYNC => Shift(yy_state_152) + T_EXCLAMATION => Shift(yy_state_176) + T_MINUS => Shift(yy_state_191) + T_PLUS => Shift(yy_state_193) + T_UIDENT => Shift(yy_state_195) + NT_prefix_expr => Shift(yy_state_201) + NT_range_expr => Shift(yy_state_212) + NT_postfix_expr => Shift(yy_state_223) + T_EXISTS => Shift(yy_state_224) + T_FORALL => Shift(yy_state_256) + NT_infix_expr => Shift(yy_state_272) + T_UNDERSCORE => Shift(yy_state_273) + NT_qual_ident => Shift(yy_state_275) + NT_simple_expr => Shift(yy_state_276) + T_LPAREN => Shift(yy_state_281) + NT_pipe_expr => Shift(yy_state_325) + NT_arrow_fn_expr => Shift(yy_state_344) + NT_quantifier_expr => Shift(yy_state_345) + NT_simple_try_expr => Shift(yy_state_346) + NT_lexscan_expr => Shift(yy_state_347) + NT_lexmatch_expr => Shift(yy_state_348) + NT_match_expr => Shift(yy_state_349) + NT_if_expr => Shift(yy_state_350) + NT_try_expr => Shift(yy_state_351) + NT_while_expr => Shift(yy_state_352) + NT_foreach_expr => Shift(yy_state_353) + NT_for_expr => Shift(yy_state_354) + T_LEXSCAN => Shift(yy_state_355) + NT_lexscan_header => Shift(yy_state_358) + T_LEXMATCH => Shift(yy_state_391) + NT_lexmatch_header => Shift(yy_state_399) + NT_match_header => Shift(yy_state_444) + T_MATCH => Shift(yy_state_605) + T_IF => Shift(yy_state_608) + T_TRY_EXCLAMATION => Shift(yy_state_614) + T_TRY_QUESTION => Shift(yy_state_616) + T_TRY => Shift(yy_state_618) + NT_loop_label_colon => Shift(yy_state_632) + T_POST_LABEL => Shift(yy_state_639) + NT_expr => Shift(yy_state_644) + NT_left_value => Shift(yy_state_645) + T_ELLIPSIS => Shift(yy_state_651) + T_RAISE => Shift(yy_state_652) + T_PACKAGE_NAME => Shift(yy_state_654) + T_EXTEND => Shift(yy_state_656) + T_LIDENT => Shift(yy_state_657) + NT_expr_statement_no_break_continue_return => Shift(yy_state_944) + T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_1071) + _ => Error + } +} + +fn yy_state_275(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_left_value, yy_action_887) +} + +fn yy_state_276(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_DOTDOT => Shift(yy_state_167) + T_LPAREN => Shift(yy_state_277) + T_LBRACKET => Shift(yy_state_932) + T_DOT_INT => Shift(yy_state_939) + T_DOT_LIDENT => Shift(yy_state_940) + T_INFIX1 | T_INFIX2 | T_INFIX3 | T_INFIX4 | T_EOF | T_CATCH | T_EQ_TILDE | T_RPAREN | T_COMMA | T_MINUS | T_COLON | T_SEMI | T_PLUS | T_RBRACKET | T_BAR_RBRACKET | T_BAR | T_LBRACE | T_RBRACE | T_AMPERAMPER | T_AMPER | T_CARET | T_BARBAR | T_AS | T_PIPE | T_PIPE_LEFT | T_LT_PLUS | T_LT_QUESTION | T_RANGE_INCLUSIVE | T_RANGE_LT_INCLUSIVE | T_RANGE_EXCLUSIVE | T_RANGE_INCLUSIVE_REV | T_RANGE_EXCLUSIVE_REV | T_IS | T_AND | T_IMPLIES | T_LEXMATCH_QUESTION => Reduce(1, NT_prefix_expr, yy_action_957) + _ => Error + } +} + +fn yy_state_277(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + NT_multiline_string => Shift(yy_state_2) + T_MULTILINE_INTERP => Shift(yy_state_4) + T_MULTILINE_STRING => Shift(yy_state_5) + T_REGEX_LITERAL => Shift(yy_state_6) + T_STRING => Shift(yy_state_7) + T_FLOAT => Shift(yy_state_8) + T_DOUBLE => Shift(yy_state_9) + T_INT => Shift(yy_state_10) + T_CHAR => Shift(yy_state_11) + T_BYTES => Shift(yy_state_12) + T_BYTE => Shift(yy_state_13) + T_FALSE => Shift(yy_state_14) + T_TRUE => Shift(yy_state_15) + T_BYTES_INTERP => Shift(yy_state_16) + T_INTERP => Shift(yy_state_17) + NT_non_empty_list_multiline_string_ => Shift(yy_state_18) + NT_simple_constant => Shift(yy_state_19) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + NT_tuple_expr => Shift(yy_state_27) + T_LBRACKET_BAR => Shift(yy_state_28) + T_LBRACKET => Shift(yy_state_36) + NT_constr => Shift(yy_state_47) + NT_qual_ident_simple_expr => Shift(yy_state_48) + NT_atomic_expr => Shift(yy_state_50) + NT_anony_fn => Shift(yy_state_51) + T_LBRACE => Shift(yy_state_52) + T_FN => Shift(yy_state_61) + NT_type_name => Shift(yy_state_139) + T_ASYNC => Shift(yy_state_152) + NT_simple_expr => Shift(yy_state_165) + NT_argument => Shift(yy_state_170) + NT_non_empty_list_commas_rev_argument_ => Shift(yy_state_171) + NT_expr => Shift(yy_state_175) + T_EXCLAMATION => Shift(yy_state_176) + T_MINUS => Shift(yy_state_191) + T_PLUS => Shift(yy_state_193) + T_UIDENT => Shift(yy_state_195) + T_PACKAGE_NAME => Shift(yy_state_196) + NT_prefix_expr => Shift(yy_state_201) + NT_range_expr => Shift(yy_state_212) + NT_postfix_expr => Shift(yy_state_223) + T_EXISTS => Shift(yy_state_224) + T_FORALL => Shift(yy_state_256) + NT_infix_expr => Shift(yy_state_272) + T_UNDERSCORE => Shift(yy_state_273) + NT_non_empty_list_commas_argument_ => Shift(yy_state_278) + NT_list_commas_argument_ => Shift(yy_state_279) + T_LPAREN => Shift(yy_state_281) + NT_pipe_expr => Shift(yy_state_325) + NT_arrow_fn_expr => Shift(yy_state_344) + NT_quantifier_expr => Shift(yy_state_345) + NT_simple_try_expr => Shift(yy_state_346) + NT_lexscan_expr => Shift(yy_state_347) + NT_lexmatch_expr => Shift(yy_state_348) + NT_match_expr => Shift(yy_state_349) + NT_if_expr => Shift(yy_state_350) + NT_try_expr => Shift(yy_state_351) + NT_while_expr => Shift(yy_state_352) + NT_foreach_expr => Shift(yy_state_353) + NT_for_expr => Shift(yy_state_354) + T_LEXSCAN => Shift(yy_state_355) + NT_lexscan_header => Shift(yy_state_358) + T_LEXMATCH => Shift(yy_state_391) + NT_lexmatch_header => Shift(yy_state_399) + NT_match_header => Shift(yy_state_444) + T_MATCH => Shift(yy_state_605) + T_IF => Shift(yy_state_608) + T_TRY_EXCLAMATION => Shift(yy_state_614) + T_TRY_QUESTION => Shift(yy_state_616) + T_TRY => Shift(yy_state_618) + NT_loop_label_colon => Shift(yy_state_632) + T_POST_LABEL => Shift(yy_state_921) + T_EXTEND => Shift(yy_state_922) + T_LIDENT => Shift(yy_state_927) + T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_1071) + T_RPAREN => Reduce(0, NT_list_commas_argument_, yy_action_955) + _ => Error + } +} + +fn yy_state_278(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_list_commas_argument_, yy_action_886) +} + +fn yy_state_279(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_RPAREN => Shift(yy_state_280) + _ => Error + } +} + +fn yy_state_280(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(4, NT_simple_expr, yy_action_885) +} + +fn yy_state_281(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + NT_multiline_string => Shift(yy_state_2) + T_MULTILINE_INTERP => Shift(yy_state_4) + T_MULTILINE_STRING => Shift(yy_state_5) + T_REGEX_LITERAL => Shift(yy_state_6) + T_STRING => Shift(yy_state_7) + T_FLOAT => Shift(yy_state_8) + T_DOUBLE => Shift(yy_state_9) + T_INT => Shift(yy_state_10) + T_CHAR => Shift(yy_state_11) + T_BYTES => Shift(yy_state_12) + T_BYTE => Shift(yy_state_13) + T_FALSE => Shift(yy_state_14) + T_TRUE => Shift(yy_state_15) + T_BYTES_INTERP => Shift(yy_state_16) + T_INTERP => Shift(yy_state_17) + NT_non_empty_list_multiline_string_ => Shift(yy_state_18) + NT_simple_constant => Shift(yy_state_19) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + NT_tuple_expr => Shift(yy_state_27) + T_LBRACKET_BAR => Shift(yy_state_28) + T_LBRACKET => Shift(yy_state_36) + NT_constr => Shift(yy_state_47) + NT_qual_ident_simple_expr => Shift(yy_state_48) + NT_atomic_expr => Shift(yy_state_50) + NT_anony_fn => Shift(yy_state_51) + T_LBRACE => Shift(yy_state_52) + T_FN => Shift(yy_state_61) + NT_type_name => Shift(yy_state_139) + T_ASYNC => Shift(yy_state_152) + NT_simple_expr => Shift(yy_state_165) + T_EXCLAMATION => Shift(yy_state_176) + NT_non_empty_tuple_elems_with_prefix => Shift(yy_state_179) + NT_arrow_fn_prefix_no_constraint => Shift(yy_state_180) + NT_non_empty_tuple_elems => Shift(yy_state_181) + NT_expr => Shift(yy_state_182) + T_MINUS => Shift(yy_state_191) + T_PLUS => Shift(yy_state_193) + T_UIDENT => Shift(yy_state_195) + T_PACKAGE_NAME => Shift(yy_state_196) + NT_prefix_expr => Shift(yy_state_201) + NT_range_expr => Shift(yy_state_212) + NT_postfix_expr => Shift(yy_state_223) + T_EXISTS => Shift(yy_state_224) + T_FORALL => Shift(yy_state_256) + NT_infix_expr => Shift(yy_state_272) + T_LPAREN => Shift(yy_state_281) + T_UNDERSCORE => Shift(yy_state_282) + NT_pipe_expr => Shift(yy_state_325) + NT_arrow_fn_expr => Shift(yy_state_344) + NT_quantifier_expr => Shift(yy_state_345) + NT_simple_try_expr => Shift(yy_state_346) + NT_lexscan_expr => Shift(yy_state_347) + NT_lexmatch_expr => Shift(yy_state_348) + NT_match_expr => Shift(yy_state_349) + NT_if_expr => Shift(yy_state_350) + NT_try_expr => Shift(yy_state_351) + NT_while_expr => Shift(yy_state_352) + NT_foreach_expr => Shift(yy_state_353) + NT_for_expr => Shift(yy_state_354) + T_LEXSCAN => Shift(yy_state_355) + NT_lexscan_header => Shift(yy_state_358) + T_LEXMATCH => Shift(yy_state_391) + NT_lexmatch_header => Shift(yy_state_399) + NT_match_header => Shift(yy_state_444) + T_MATCH => Shift(yy_state_605) + T_IF => Shift(yy_state_608) + T_TRY_EXCLAMATION => Shift(yy_state_614) + T_TRY_QUESTION => Shift(yy_state_616) + T_TRY => Shift(yy_state_618) + NT_loop_label_colon => Shift(yy_state_632) + T_POST_LABEL => Shift(yy_state_639) + NT_arrow_fn_prefix => Shift(yy_state_813) + T_EXTEND => Shift(yy_state_883) + T_LIDENT => Shift(yy_state_899) + T_RPAREN => Shift(yy_state_920) + T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_1071) + _ => Error + } +} + +fn yy_state_282(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_FAT_ARROW => Shift(yy_state_274) + T_COLON => Shift(yy_state_283) + T_COMMA => Shift(yy_state_319) + T_RPAREN => Shift(yy_state_324) + T_INFIX1 | T_INFIX2 | T_INFIX3 | T_INFIX4 | T_CATCH | T_EQ_TILDE | T_LPAREN | T_MINUS | T_DOT_LIDENT | T_DOT_INT | T_LBRACKET | T_PLUS | T_BAR | T_AMPERAMPER | T_AMPER | T_CARET | T_BARBAR | T_AS | T_PIPE | T_PIPE_LEFT | T_LT_PLUS | T_LT_QUESTION | T_DOTDOT | T_RANGE_INCLUSIVE | T_RANGE_LT_INCLUSIVE | T_RANGE_EXCLUSIVE | T_RANGE_INCLUSIVE_REV | T_RANGE_EXCLUSIVE_REV | T_IS | T_IMPLIES | T_LEXMATCH_QUESTION => Reduce(1, NT_simple_expr, yy_action_1031) + _ => Error + } +} + +fn yy_state_283(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_ASYNC => Shift(yy_state_65) + T_UNDERSCORE => Shift(yy_state_70) + T_AMPER => Shift(yy_state_71) + T_PACKAGE_NAME => Shift(yy_state_73) + T_UIDENT => Shift(yy_state_80) + T_LPAREN => Shift(yy_state_84) + NT_simple_type => Shift(yy_state_110) + NT_type_ => Shift(yy_state_284) + _ => Error + } +} + +fn yy_state_284(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_COMMA => Shift(yy_state_285) + T_RPAREN => Shift(yy_state_318) + _ => Error + } +} + +fn yy_state_285(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + NT_arrow_fn_prefix => Shift(yy_state_286) + T_RPAREN => Shift(yy_state_287) + T_UNDERSCORE => Shift(yy_state_288) + T_EXTEND => Shift(yy_state_295) + T_LIDENT => Shift(yy_state_301) + _ => Error + } +} + +fn yy_state_286(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(5, NT_arrow_fn_prefix, yy_action_884) +} + +fn yy_state_287(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(5, NT_arrow_fn_prefix, yy_action_883) +} + +fn yy_state_288(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_COLON => Shift(yy_state_289) + T_COMMA => Shift(yy_state_292) + T_RPAREN => Shift(yy_state_317) + _ => Error + } +} + +fn yy_state_289(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_ASYNC => Shift(yy_state_65) + T_UNDERSCORE => Shift(yy_state_70) + T_AMPER => Shift(yy_state_71) + T_PACKAGE_NAME => Shift(yy_state_73) + T_UIDENT => Shift(yy_state_80) + T_LPAREN => Shift(yy_state_84) + NT_simple_type => Shift(yy_state_110) + NT_type_ => Shift(yy_state_290) + _ => Error + } +} + +fn yy_state_290(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_COMMA => Shift(yy_state_285) + T_RPAREN => Shift(yy_state_291) + _ => Error + } +} + +fn yy_state_291(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(4, NT_arrow_fn_prefix, yy_action_882) +} + +fn yy_state_292(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_UNDERSCORE => Shift(yy_state_288) + NT_arrow_fn_prefix => Shift(yy_state_293) + T_RPAREN => Shift(yy_state_294) + T_EXTEND => Shift(yy_state_295) + T_LIDENT => Shift(yy_state_301) + _ => Error + } +} + +fn yy_state_293(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_arrow_fn_prefix, yy_action_881) +} + +fn yy_state_294(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_arrow_fn_prefix, yy_action_880) +} + +fn yy_state_295(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_COLON => Shift(yy_state_296) + T_COMMA => Shift(yy_state_313) + T_RPAREN => Shift(yy_state_316) + _ => Error + } +} + +fn yy_state_296(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_ASYNC => Shift(yy_state_65) + T_UNDERSCORE => Shift(yy_state_70) + T_AMPER => Shift(yy_state_71) + T_PACKAGE_NAME => Shift(yy_state_73) + T_UIDENT => Shift(yy_state_80) + T_LPAREN => Shift(yy_state_84) + NT_simple_type => Shift(yy_state_110) + NT_type_ => Shift(yy_state_297) + _ => Error + } +} + +fn yy_state_297(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_COMMA => Shift(yy_state_298) + T_RPAREN => Shift(yy_state_312) + _ => Error + } +} + +fn yy_state_298(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_UNDERSCORE => Shift(yy_state_288) + T_EXTEND => Shift(yy_state_295) + NT_arrow_fn_prefix => Shift(yy_state_299) + T_RPAREN => Shift(yy_state_300) + T_LIDENT => Shift(yy_state_301) + _ => Error + } +} + +fn yy_state_299(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(5, NT_arrow_fn_prefix, yy_action_879) +} + +fn yy_state_300(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(5, NT_arrow_fn_prefix, yy_action_878) +} + +fn yy_state_301(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_COLON => Shift(yy_state_302) + T_COMMA => Shift(yy_state_308) + T_RPAREN => Shift(yy_state_311) + _ => Error + } +} + +fn yy_state_302(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_ASYNC => Shift(yy_state_65) + T_UNDERSCORE => Shift(yy_state_70) + T_AMPER => Shift(yy_state_71) + T_PACKAGE_NAME => Shift(yy_state_73) + T_UIDENT => Shift(yy_state_80) + T_LPAREN => Shift(yy_state_84) + NT_simple_type => Shift(yy_state_110) + NT_type_ => Shift(yy_state_303) + _ => Error + } +} + +fn yy_state_303(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_COMMA => Shift(yy_state_304) + T_RPAREN => Shift(yy_state_307) + _ => Error + } +} + +fn yy_state_304(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_UNDERSCORE => Shift(yy_state_288) + T_EXTEND => Shift(yy_state_295) + T_LIDENT => Shift(yy_state_301) + NT_arrow_fn_prefix => Shift(yy_state_305) + T_RPAREN => Shift(yy_state_306) + _ => Error + } +} + +fn yy_state_305(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(5, NT_arrow_fn_prefix, yy_action_877) +} + +fn yy_state_306(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(5, NT_arrow_fn_prefix, yy_action_876) +} + +fn yy_state_307(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(4, NT_arrow_fn_prefix, yy_action_875) +} + +fn yy_state_308(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_UNDERSCORE => Shift(yy_state_288) + T_EXTEND => Shift(yy_state_295) + T_LIDENT => Shift(yy_state_301) + NT_arrow_fn_prefix => Shift(yy_state_309) + T_RPAREN => Shift(yy_state_310) + _ => Error + } +} + +fn yy_state_309(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_arrow_fn_prefix, yy_action_874) +} + +fn yy_state_310(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_arrow_fn_prefix, yy_action_873) +} + +fn yy_state_311(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(2, NT_arrow_fn_prefix, yy_action_872) +} + +fn yy_state_312(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(4, NT_arrow_fn_prefix, yy_action_871) +} + +fn yy_state_313(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_UNDERSCORE => Shift(yy_state_288) + T_EXTEND => Shift(yy_state_295) + T_LIDENT => Shift(yy_state_301) + NT_arrow_fn_prefix => Shift(yy_state_314) + T_RPAREN => Shift(yy_state_315) + _ => Error + } +} + +fn yy_state_314(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_arrow_fn_prefix, yy_action_870) +} + +fn yy_state_315(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_arrow_fn_prefix, yy_action_869) +} + +fn yy_state_316(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(2, NT_arrow_fn_prefix, yy_action_868) +} + +fn yy_state_317(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(2, NT_arrow_fn_prefix, yy_action_867) +} + +fn yy_state_318(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_FAT_ARROW => Reduce(4, NT_arrow_fn_prefix, yy_action_882) + T_INFIX1 | T_INFIX2 | T_INFIX3 | T_INFIX4 | T_EOF | T_CATCH | T_EQ_TILDE | T_LPAREN | T_RPAREN | T_COMMA | T_MINUS | T_DOT_LIDENT | T_DOT_INT | T_COLON | T_SEMI | T_LBRACKET | T_PLUS | T_RBRACKET | T_BAR_RBRACKET | T_BAR | T_LBRACE | T_RBRACE | T_AMPERAMPER | T_AMPER | T_CARET | T_BARBAR | T_AS | T_PIPE | T_PIPE_LEFT | T_LT_PLUS | T_LT_QUESTION | T_DOTDOT | T_RANGE_INCLUSIVE | T_RANGE_LT_INCLUSIVE | T_RANGE_EXCLUSIVE | T_RANGE_INCLUSIVE_REV | T_RANGE_EXCLUSIVE_REV | T_IS | T_AND | T_IMPLIES | T_LEXMATCH_QUESTION => Reduce(5, NT_tuple_expr, yy_action_866) + _ => Error + } +} + +fn yy_state_319(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + NT_multiline_string => Shift(yy_state_2) + T_MULTILINE_INTERP => Shift(yy_state_4) + T_MULTILINE_STRING => Shift(yy_state_5) + T_REGEX_LITERAL => Shift(yy_state_6) + T_STRING => Shift(yy_state_7) + T_FLOAT => Shift(yy_state_8) + T_DOUBLE => Shift(yy_state_9) + T_INT => Shift(yy_state_10) + T_CHAR => Shift(yy_state_11) + T_BYTES => Shift(yy_state_12) + T_BYTE => Shift(yy_state_13) + T_FALSE => Shift(yy_state_14) + T_TRUE => Shift(yy_state_15) + T_BYTES_INTERP => Shift(yy_state_16) + T_INTERP => Shift(yy_state_17) + NT_non_empty_list_multiline_string_ => Shift(yy_state_18) + NT_simple_constant => Shift(yy_state_19) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + NT_tuple_expr => Shift(yy_state_27) + T_LBRACKET_BAR => Shift(yy_state_28) + T_LBRACKET => Shift(yy_state_36) + NT_constr => Shift(yy_state_47) + NT_qual_ident_simple_expr => Shift(yy_state_48) + NT_atomic_expr => Shift(yy_state_50) + NT_anony_fn => Shift(yy_state_51) + T_LBRACE => Shift(yy_state_52) + T_FN => Shift(yy_state_61) + NT_type_name => Shift(yy_state_139) + T_ASYNC => Shift(yy_state_152) + NT_simple_expr => Shift(yy_state_165) + T_EXCLAMATION => Shift(yy_state_176) + NT_non_empty_tuple_elems => Shift(yy_state_181) + NT_expr => Shift(yy_state_189) + T_MINUS => Shift(yy_state_191) + T_PLUS => Shift(yy_state_193) + T_UIDENT => Shift(yy_state_195) + T_PACKAGE_NAME => Shift(yy_state_196) + NT_prefix_expr => Shift(yy_state_201) + NT_range_expr => Shift(yy_state_212) + NT_postfix_expr => Shift(yy_state_223) + T_EXISTS => Shift(yy_state_224) + T_FORALL => Shift(yy_state_256) + NT_infix_expr => Shift(yy_state_272) + T_LPAREN => Shift(yy_state_281) + NT_arrow_fn_prefix => Shift(yy_state_293) + NT_non_empty_tuple_elems_with_prefix => Shift(yy_state_320) + NT_arrow_fn_prefix_no_constraint => Shift(yy_state_321) + T_RPAREN => Shift(yy_state_322) + T_UNDERSCORE => Shift(yy_state_323) + NT_pipe_expr => Shift(yy_state_325) + NT_arrow_fn_expr => Shift(yy_state_344) + NT_quantifier_expr => Shift(yy_state_345) + NT_simple_try_expr => Shift(yy_state_346) + NT_lexscan_expr => Shift(yy_state_347) + NT_lexmatch_expr => Shift(yy_state_348) + NT_match_expr => Shift(yy_state_349) + NT_if_expr => Shift(yy_state_350) + NT_try_expr => Shift(yy_state_351) + NT_while_expr => Shift(yy_state_352) + NT_foreach_expr => Shift(yy_state_353) + NT_for_expr => Shift(yy_state_354) + T_LEXSCAN => Shift(yy_state_355) + NT_lexscan_header => Shift(yy_state_358) + T_LEXMATCH => Shift(yy_state_391) + NT_lexmatch_header => Shift(yy_state_399) + NT_match_header => Shift(yy_state_444) + T_MATCH => Shift(yy_state_605) + T_IF => Shift(yy_state_608) + T_TRY_EXCLAMATION => Shift(yy_state_614) + T_TRY_QUESTION => Shift(yy_state_616) + T_TRY => Shift(yy_state_618) + NT_loop_label_colon => Shift(yy_state_632) + T_POST_LABEL => Shift(yy_state_639) + T_EXTEND => Shift(yy_state_891) + T_LIDENT => Shift(yy_state_893) + T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_1071) + _ => Error + } +} + +fn yy_state_320(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_non_empty_tuple_elems_with_prefix, yy_action_865) +} + +fn yy_state_321(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_arrow_fn_prefix_no_constraint, yy_action_864) +} + +fn yy_state_322(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_FAT_ARROW => Reduce(3, NT_arrow_fn_prefix, yy_action_880) + T_INFIX1 | T_INFIX2 | T_INFIX3 | T_INFIX4 | T_EOF | T_CATCH | T_EQ_TILDE | T_LPAREN | T_RPAREN | T_COMMA | T_MINUS | T_DOT_LIDENT | T_DOT_INT | T_COLON | T_SEMI | T_LBRACKET | T_PLUS | T_RBRACKET | T_BAR_RBRACKET | T_BAR | T_LBRACE | T_RBRACE | T_AMPERAMPER | T_AMPER | T_CARET | T_BARBAR | T_AS | T_PIPE | T_PIPE_LEFT | T_LT_PLUS | T_LT_QUESTION | T_DOTDOT | T_RANGE_INCLUSIVE | T_RANGE_LT_INCLUSIVE | T_RANGE_EXCLUSIVE | T_RANGE_INCLUSIVE_REV | T_RANGE_EXCLUSIVE_REV | T_IS | T_AND | T_IMPLIES | T_LEXMATCH_QUESTION => Reduce(3, NT_arrow_fn_prefix_no_constraint, yy_action_863) + _ => Error + } +} + +fn yy_state_323(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_FAT_ARROW => Shift(yy_state_274) + T_COLON => Shift(yy_state_289) + T_COMMA => Shift(yy_state_319) + T_RPAREN => Shift(yy_state_324) + T_INFIX1 | T_INFIX2 | T_INFIX3 | T_INFIX4 | T_CATCH | T_EQ_TILDE | T_LPAREN | T_MINUS | T_DOT_LIDENT | T_DOT_INT | T_LBRACKET | T_PLUS | T_BAR | T_AMPERAMPER | T_AMPER | T_CARET | T_BARBAR | T_AS | T_PIPE | T_PIPE_LEFT | T_LT_PLUS | T_LT_QUESTION | T_DOTDOT | T_RANGE_INCLUSIVE | T_RANGE_LT_INCLUSIVE | T_RANGE_EXCLUSIVE | T_RANGE_INCLUSIVE_REV | T_RANGE_EXCLUSIVE_REV | T_IS | T_IMPLIES | T_LEXMATCH_QUESTION => Reduce(1, NT_simple_expr, yy_action_1031) + _ => Error + } +} + +fn yy_state_324(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_FAT_ARROW => Reduce(2, NT_arrow_fn_prefix, yy_action_867) + T_INFIX1 | T_INFIX2 | T_INFIX3 | T_INFIX4 | T_EOF | T_CATCH | T_EQ_TILDE | T_LPAREN | T_RPAREN | T_COMMA | T_MINUS | T_DOT_LIDENT | T_DOT_INT | T_COLON | T_SEMI | T_LBRACKET | T_PLUS | T_RBRACKET | T_BAR_RBRACKET | T_BAR | T_LBRACE | T_RBRACE | T_AMPERAMPER | T_AMPER | T_CARET | T_BARBAR | T_AS | T_PIPE | T_PIPE_LEFT | T_LT_PLUS | T_LT_QUESTION | T_DOTDOT | T_RANGE_INCLUSIVE | T_RANGE_LT_INCLUSIVE | T_RANGE_EXCLUSIVE | T_RANGE_INCLUSIVE_REV | T_RANGE_EXCLUSIVE_REV | T_IS | T_AND | T_IMPLIES | T_LEXMATCH_QUESTION => Reduce(2, NT_arrow_fn_prefix_no_constraint, yy_action_862) + _ => Error + } +} + +fn yy_state_325(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_PIPE => Shift(yy_state_326) + T_PIPE_LEFT => Shift(yy_state_334) + T_CATCH => Shift(yy_state_629) + NT_catch_keyword => Shift(yy_state_913) + T_EOF | T_RPAREN | T_COMMA | T_COLON | T_SEMI | T_RBRACKET | T_BAR_RBRACKET | T_LBRACE | T_RBRACE | T_AND => Reduce(1, NT_simple_try_expr, yy_action_861) + _ => Error + } +} + +fn yy_state_326(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + NT_multiline_string => Shift(yy_state_2) + T_MULTILINE_INTERP => Shift(yy_state_4) + T_MULTILINE_STRING => Shift(yy_state_5) + T_REGEX_LITERAL => Shift(yy_state_6) + T_STRING => Shift(yy_state_7) + T_FLOAT => Shift(yy_state_8) + T_DOUBLE => Shift(yy_state_9) + T_INT => Shift(yy_state_10) + T_CHAR => Shift(yy_state_11) + T_BYTES => Shift(yy_state_12) + T_BYTE => Shift(yy_state_13) + T_FALSE => Shift(yy_state_14) + T_TRUE => Shift(yy_state_15) + T_BYTES_INTERP => Shift(yy_state_16) + T_INTERP => Shift(yy_state_17) + NT_non_empty_list_multiline_string_ => Shift(yy_state_18) + NT_simple_constant => Shift(yy_state_19) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + NT_tuple_expr => Shift(yy_state_27) + T_LBRACKET_BAR => Shift(yy_state_28) + T_LBRACKET => Shift(yy_state_36) + NT_constr => Shift(yy_state_47) + NT_qual_ident_simple_expr => Shift(yy_state_48) + T_UNDERSCORE => Shift(yy_state_49) + NT_atomic_expr => Shift(yy_state_50) + NT_anony_fn => Shift(yy_state_51) + T_LBRACE => Shift(yy_state_52) + T_FN => Shift(yy_state_61) + NT_type_name => Shift(yy_state_139) + T_ASYNC => Shift(yy_state_152) + NT_simple_expr => Shift(yy_state_165) + T_EXCLAMATION => Shift(yy_state_176) + T_LPAREN => Shift(yy_state_177) + T_MINUS => Shift(yy_state_191) + T_PLUS => Shift(yy_state_193) + T_UIDENT => Shift(yy_state_195) + T_PACKAGE_NAME => Shift(yy_state_196) + NT_prefix_expr => Shift(yy_state_201) + NT_range_expr => Shift(yy_state_212) + NT_postfix_expr => Shift(yy_state_223) + NT_infix_expr => Shift(yy_state_327) + T_EXTEND => Shift(yy_state_328) + T_LIDENT => Shift(yy_state_331) + _ => Error + } +} + +fn yy_state_327(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_BARBAR => Shift(yy_state_230) + T_AMPERAMPER => Shift(yy_state_232) + T_BAR => Shift(yy_state_234) + T_CARET => Shift(yy_state_236) + T_AMPER => Shift(yy_state_238) + T_MINUS => Shift(yy_state_240) + T_PLUS => Shift(yy_state_242) + T_INFIX1 => Shift(yy_state_244) + T_INFIX2 => Shift(yy_state_246) + T_INFIX3 => Shift(yy_state_248) + T_INFIX4 => Shift(yy_state_250) + T_IMPLIES => Shift(yy_state_252) + T_EOF | T_CATCH | T_RPAREN | T_COMMA | T_COLON | T_SEMI | T_RBRACKET | T_BAR_RBRACKET | T_LBRACE | T_RBRACE | T_PIPE | T_PIPE_LEFT | T_AND => Reduce(3, NT_pipe_expr, yy_action_860) + _ => Error + } +} + +fn yy_state_328(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_FAT_ARROW => Shift(yy_state_329) + T_INFIX1 | T_INFIX2 | T_INFIX3 | T_INFIX4 | T_EOF | T_CATCH | T_EQ_TILDE | T_LPAREN | T_RPAREN | T_COMMA | T_MINUS | T_DOT_LIDENT | T_DOT_INT | T_COLON | T_SEMI | T_LBRACKET | T_PLUS | T_RBRACKET | T_BAR_RBRACKET | T_BAR | T_LBRACE | T_RBRACE | T_AMPERAMPER | T_AMPER | T_CARET | T_BARBAR | T_AS | T_PIPE | T_PIPE_LEFT | T_LT_PLUS | T_LT_QUESTION | T_DOTDOT | T_RANGE_INCLUSIVE | T_RANGE_LT_INCLUSIVE | T_RANGE_EXCLUSIVE | T_RANGE_INCLUSIVE_REV | T_RANGE_EXCLUSIVE_REV | T_IS | T_AND | T_IMPLIES | T_LEXMATCH_QUESTION => Reduce(1, NT_qual_ident_simple_expr, yy_action_933) + _ => Error + } +} + +fn yy_state_329(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_LBRACE => Shift(yy_state_133) + NT_block_expr => Shift(yy_state_330) + _ => Error + } +} + +fn yy_state_330(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(5, NT_pipe_expr, yy_action_859) +} + +fn yy_state_331(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_FAT_ARROW => Shift(yy_state_332) + T_INFIX1 | T_INFIX2 | T_INFIX3 | T_INFIX4 | T_EOF | T_CATCH | T_EQ_TILDE | T_LPAREN | T_RPAREN | T_COMMA | T_MINUS | T_DOT_LIDENT | T_DOT_INT | T_COLON | T_SEMI | T_LBRACKET | T_PLUS | T_RBRACKET | T_BAR_RBRACKET | T_BAR | T_LBRACE | T_RBRACE | T_AMPERAMPER | T_AMPER | T_CARET | T_BARBAR | T_AS | T_PIPE | T_PIPE_LEFT | T_LT_PLUS | T_LT_QUESTION | T_DOTDOT | T_RANGE_INCLUSIVE | T_RANGE_LT_INCLUSIVE | T_RANGE_EXCLUSIVE | T_RANGE_INCLUSIVE_REV | T_RANGE_EXCLUSIVE_REV | T_IS | T_AND | T_IMPLIES | T_LEXMATCH_QUESTION => Reduce(1, NT_qual_ident_simple_expr, yy_action_932) + _ => Error + } +} + +fn yy_state_332(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_LBRACE => Shift(yy_state_133) + NT_block_expr => Shift(yy_state_333) + _ => Error + } +} + +fn yy_state_333(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(5, NT_pipe_expr, yy_action_858) +} + +fn yy_state_334(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + NT_multiline_string => Shift(yy_state_2) + T_MULTILINE_INTERP => Shift(yy_state_4) + T_MULTILINE_STRING => Shift(yy_state_5) + T_REGEX_LITERAL => Shift(yy_state_6) + T_STRING => Shift(yy_state_7) + T_FLOAT => Shift(yy_state_8) + T_DOUBLE => Shift(yy_state_9) + T_INT => Shift(yy_state_10) + T_CHAR => Shift(yy_state_11) + T_BYTES => Shift(yy_state_12) + T_BYTE => Shift(yy_state_13) + T_FALSE => Shift(yy_state_14) + T_TRUE => Shift(yy_state_15) + T_BYTES_INTERP => Shift(yy_state_16) + T_INTERP => Shift(yy_state_17) + NT_non_empty_list_multiline_string_ => Shift(yy_state_18) + NT_simple_constant => Shift(yy_state_19) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + NT_tuple_expr => Shift(yy_state_27) + T_LBRACKET_BAR => Shift(yy_state_28) + T_LBRACKET => Shift(yy_state_36) + NT_constr => Shift(yy_state_47) + NT_qual_ident_simple_expr => Shift(yy_state_48) + NT_atomic_expr => Shift(yy_state_50) + NT_anony_fn => Shift(yy_state_51) + T_LBRACE => Shift(yy_state_52) + T_FN => Shift(yy_state_61) + NT_type_name => Shift(yy_state_139) + T_ASYNC => Shift(yy_state_152) + NT_simple_expr => Shift(yy_state_165) + T_EXCLAMATION => Shift(yy_state_176) + T_MINUS => Shift(yy_state_191) + T_PLUS => Shift(yy_state_193) + T_UIDENT => Shift(yy_state_195) + T_PACKAGE_NAME => Shift(yy_state_196) + NT_prefix_expr => Shift(yy_state_201) + NT_range_expr => Shift(yy_state_212) + NT_postfix_expr => Shift(yy_state_223) + NT_backward_pipeline_rhs => Shift(yy_state_335) + NT_infix_expr => Shift(yy_state_336) + NT_arrow_fn_with_explicit_braces => Shift(yy_state_337) + T_UNDERSCORE => Shift(yy_state_338) + T_LPAREN => Shift(yy_state_872) + T_EXTEND => Shift(yy_state_903) + T_LIDENT => Shift(yy_state_908) + _ => Error + } +} + +fn yy_state_335(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_pipe_expr, yy_action_857) +} + +fn yy_state_336(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_BARBAR => Shift(yy_state_230) + T_AMPERAMPER => Shift(yy_state_232) + T_BAR => Shift(yy_state_234) + T_CARET => Shift(yy_state_236) + T_AMPER => Shift(yy_state_238) + T_MINUS => Shift(yy_state_240) + T_PLUS => Shift(yy_state_242) + T_INFIX1 => Shift(yy_state_244) + T_INFIX2 => Shift(yy_state_246) + T_INFIX3 => Shift(yy_state_248) + T_INFIX4 => Shift(yy_state_250) + T_IMPLIES => Shift(yy_state_252) + T_EOF | T_CATCH | T_RPAREN | T_COMMA | T_COLON | T_SEMI | T_RBRACKET | T_BAR_RBRACKET | T_LBRACE | T_RBRACE | T_PIPE | T_PIPE_LEFT | T_AND => Reduce(1, NT_backward_pipeline_rhs, yy_action_856) + _ => Error + } +} + +fn yy_state_337(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_backward_pipeline_rhs, yy_action_855) +} + +fn yy_state_338(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_FAT_ARROW => Shift(yy_state_339) + T_INFIX1 | T_INFIX2 | T_INFIX3 | T_INFIX4 | T_EOF | T_CATCH | T_EQ_TILDE | T_LPAREN | T_RPAREN | T_COMMA | T_MINUS | T_DOT_LIDENT | T_DOT_INT | T_COLON | T_SEMI | T_LBRACKET | T_PLUS | T_RBRACKET | T_BAR_RBRACKET | T_BAR | T_LBRACE | T_RBRACE | T_AMPERAMPER | T_AMPER | T_CARET | T_BARBAR | T_AS | T_PIPE | T_PIPE_LEFT | T_LT_PLUS | T_LT_QUESTION | T_DOTDOT | T_RANGE_INCLUSIVE | T_RANGE_LT_INCLUSIVE | T_RANGE_EXCLUSIVE | T_RANGE_INCLUSIVE_REV | T_RANGE_EXCLUSIVE_REV | T_IS | T_AND | T_IMPLIES | T_LEXMATCH_QUESTION => Reduce(1, NT_simple_expr, yy_action_1031) + _ => Error + } +} + +fn yy_state_339(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_LBRACE => Shift(yy_state_340) + _ => Error + } +} + +fn yy_state_340(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + NT_multiline_string => Shift(yy_state_2) + T_MULTILINE_INTERP => Shift(yy_state_4) + T_MULTILINE_STRING => Shift(yy_state_5) + T_REGEX_LITERAL => Shift(yy_state_6) + T_STRING => Shift(yy_state_7) + T_FLOAT => Shift(yy_state_8) + T_DOUBLE => Shift(yy_state_9) + T_INT => Shift(yy_state_10) + T_CHAR => Shift(yy_state_11) + T_BYTES => Shift(yy_state_12) + T_BYTE => Shift(yy_state_13) + T_FALSE => Shift(yy_state_14) + T_TRUE => Shift(yy_state_15) + T_BYTES_INTERP => Shift(yy_state_16) + T_INTERP => Shift(yy_state_17) + NT_non_empty_list_multiline_string_ => Shift(yy_state_18) + NT_simple_constant => Shift(yy_state_19) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + NT_tuple_expr => Shift(yy_state_27) + T_LBRACKET_BAR => Shift(yy_state_28) + T_LBRACKET => Shift(yy_state_36) + NT_constr => Shift(yy_state_47) + NT_qual_ident_simple_expr => Shift(yy_state_48) + NT_atomic_expr => Shift(yy_state_50) + NT_anony_fn => Shift(yy_state_51) + T_LBRACE => Shift(yy_state_52) + NT_statement => Shift(yy_state_134) + NT_non_empty_list_semi_rev_aux_statement_ => Shift(yy_state_135) + NT_type_name => Shift(yy_state_139) + T_EXCLAMATION => Shift(yy_state_176) + T_MINUS => Shift(yy_state_191) + T_PLUS => Shift(yy_state_193) + T_UIDENT => Shift(yy_state_195) + NT_prefix_expr => Shift(yy_state_201) + NT_range_expr => Shift(yy_state_212) + NT_postfix_expr => Shift(yy_state_223) + T_EXISTS => Shift(yy_state_224) + T_FORALL => Shift(yy_state_256) + NT_infix_expr => Shift(yy_state_272) + T_UNDERSCORE => Shift(yy_state_273) + NT_qual_ident => Shift(yy_state_275) + NT_simple_expr => Shift(yy_state_276) + T_LPAREN => Shift(yy_state_281) + NT_pipe_expr => Shift(yy_state_325) + NT_non_empty_list_semis_rev_statement_ => Shift(yy_state_341) + NT_list_semis_rev_statement_ => Shift(yy_state_342) + NT_arrow_fn_expr => Shift(yy_state_344) + NT_quantifier_expr => Shift(yy_state_345) + NT_simple_try_expr => Shift(yy_state_346) + NT_lexscan_expr => Shift(yy_state_347) + NT_lexmatch_expr => Shift(yy_state_348) + NT_match_expr => Shift(yy_state_349) + NT_if_expr => Shift(yy_state_350) + NT_try_expr => Shift(yy_state_351) + NT_while_expr => Shift(yy_state_352) + NT_foreach_expr => Shift(yy_state_353) + NT_for_expr => Shift(yy_state_354) + T_LEXSCAN => Shift(yy_state_355) + NT_lexscan_header => Shift(yy_state_358) + T_LEXMATCH => Shift(yy_state_391) + NT_lexmatch_header => Shift(yy_state_399) + NT_match_header => Shift(yy_state_444) + T_MATCH => Shift(yy_state_605) + T_IF => Shift(yy_state_608) + T_TRY_EXCLAMATION => Shift(yy_state_614) + T_TRY_QUESTION => Shift(yy_state_616) + T_TRY => Shift(yy_state_618) + NT_loop_label_colon => Shift(yy_state_632) + T_POST_LABEL => Shift(yy_state_639) + NT_expr => Shift(yy_state_644) + NT_left_value => Shift(yy_state_645) + T_ELLIPSIS => Shift(yy_state_651) + T_RAISE => Shift(yy_state_652) + T_PACKAGE_NAME => Shift(yy_state_654) + T_EXTEND => Shift(yy_state_656) + T_LIDENT => Shift(yy_state_657) + NT_expr_statement_no_break_continue_return => Shift(yy_state_734) + T_RETURN => Shift(yy_state_735) + T_CONTINUE => Shift(yy_state_738) + T_BREAK => Shift(yy_state_747) + T_GUARD => Shift(yy_state_765) + NT_expr_statement => Shift(yy_state_769) + T_PROOF_LET => Shift(yy_state_770) + T_PROOF_ASSERT => Shift(yy_state_777) + T_DEFER => Shift(yy_state_779) + NT_guard_statement => Shift(yy_state_781) + T_FN => Shift(yy_state_782) + T_ASYNC => Shift(yy_state_791) + T_LETREC => Shift(yy_state_801) + T_LET => Shift(yy_state_849) + T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_1071) + T_RBRACE => Reduce(0, NT_list_semis_rev_statement_, yy_action_978) + _ => Error + } +} + +fn yy_state_341(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_list_semis_rev_statement_, yy_action_854) +} + +fn yy_state_342(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_RBRACE => Shift(yy_state_343) + _ => Error + } +} + +fn yy_state_343(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(5, NT_arrow_fn_with_explicit_braces, yy_action_853) +} + +fn yy_state_344(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_expr, yy_action_852) +} + +fn yy_state_345(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_expr, yy_action_851) +} + +fn yy_state_346(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_expr, yy_action_850) +} + +fn yy_state_347(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_expr, yy_action_849) +} + +fn yy_state_348(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_expr, yy_action_848) +} + +fn yy_state_349(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_expr, yy_action_847) +} + +fn yy_state_350(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_expr, yy_action_846) +} + +fn yy_state_351(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_expr, yy_action_845) +} + +fn yy_state_352(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_expr, yy_action_844) +} + +fn yy_state_353(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_expr, yy_action_843) +} + +fn yy_state_354(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_expr, yy_action_842) +} + +fn yy_state_355(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + NT_multiline_string => Shift(yy_state_2) + T_MULTILINE_INTERP => Shift(yy_state_4) + T_MULTILINE_STRING => Shift(yy_state_5) + T_REGEX_LITERAL => Shift(yy_state_6) + T_STRING => Shift(yy_state_7) + T_FLOAT => Shift(yy_state_8) + T_DOUBLE => Shift(yy_state_9) + T_INT => Shift(yy_state_10) + T_CHAR => Shift(yy_state_11) + T_BYTES => Shift(yy_state_12) + T_BYTE => Shift(yy_state_13) + T_FALSE => Shift(yy_state_14) + T_TRUE => Shift(yy_state_15) + T_BYTES_INTERP => Shift(yy_state_16) + T_INTERP => Shift(yy_state_17) + NT_non_empty_list_multiline_string_ => Shift(yy_state_18) + NT_simple_constant => Shift(yy_state_19) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + NT_tuple_expr => Shift(yy_state_27) + T_LBRACKET_BAR => Shift(yy_state_28) + T_LBRACKET => Shift(yy_state_36) + NT_constr => Shift(yy_state_47) + NT_qual_ident_simple_expr => Shift(yy_state_48) + T_UNDERSCORE => Shift(yy_state_49) + NT_atomic_expr => Shift(yy_state_50) + NT_anony_fn => Shift(yy_state_51) + T_LBRACE => Shift(yy_state_52) + T_FN => Shift(yy_state_61) + NT_type_name => Shift(yy_state_139) + T_ASYNC => Shift(yy_state_152) + NT_simple_expr => Shift(yy_state_165) + T_EXCLAMATION => Shift(yy_state_176) + T_LPAREN => Shift(yy_state_177) + T_MINUS => Shift(yy_state_191) + T_PLUS => Shift(yy_state_193) + T_UIDENT => Shift(yy_state_195) + T_PACKAGE_NAME => Shift(yy_state_196) + T_EXTEND => Shift(yy_state_199) + T_LIDENT => Shift(yy_state_200) + NT_prefix_expr => Shift(yy_state_201) + NT_range_expr => Shift(yy_state_212) + NT_postfix_expr => Shift(yy_state_223) + NT_infix_expr => Shift(yy_state_356) + _ => Error + } +} + +fn yy_state_356(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_BARBAR => Shift(yy_state_230) + T_AMPERAMPER => Shift(yy_state_232) + T_BAR => Shift(yy_state_234) + T_CARET => Shift(yy_state_236) + T_AMPER => Shift(yy_state_238) + T_MINUS => Shift(yy_state_240) + T_PLUS => Shift(yy_state_242) + T_INFIX1 => Shift(yy_state_244) + T_INFIX2 => Shift(yy_state_246) + T_INFIX3 => Shift(yy_state_248) + T_INFIX4 => Shift(yy_state_250) + T_IMPLIES => Shift(yy_state_252) + T_LBRACE => Shift(yy_state_357) + _ => Error + } +} + +fn yy_state_357(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_lexscan_header, yy_action_841) +} + +fn yy_state_358(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + NT_lexscan_case => Shift(yy_state_359) + T_LPAREN => Shift(yy_state_363) + T_PACKAGE_NAME => Shift(yy_state_366) + T_UIDENT => Shift(yy_state_368) + T_REGEX_LITERAL => Shift(yy_state_369) + NT_regex_sequence_pattern => Shift(yy_state_370) + NT_regex_atom_pattern => Shift(yy_state_373) + NT_regex_or_pattern => Shift(yy_state_377) + T_UNDERSCORE => Shift(yy_state_381) + T_EXTEND => Shift(yy_state_382) + T_LIDENT => Shift(yy_state_383) + NT_regex_as_pattern => Shift(yy_state_384) + T_ELLIPSIS => Shift(yy_state_385) + NT_lexscan_case_pattern => Shift(yy_state_386) + NT_non_empty_list_semis_lexscan_case_ => Shift(yy_state_762) + NT_list_semis_lexscan_case_ => Shift(yy_state_763) + T_RBRACE => Reduce(0, NT_list_semis_lexscan_case_, yy_action_840) + _ => Error + } +} + +fn yy_state_359(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + NT_option_SEMI_ => Shift(yy_state_360) + T_SEMI => Shift(yy_state_361) + T_RBRACE => Reduce(0, NT_option_SEMI_, yy_action_976) + _ => Error + } +} + +fn yy_state_360(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(2, NT_non_empty_list_semis_lexscan_case_, yy_action_839) +} + +fn yy_state_361(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + NT_lexscan_case => Shift(yy_state_359) + NT_non_empty_list_semis_lexscan_case_ => Shift(yy_state_362) + T_LPAREN => Shift(yy_state_363) + T_PACKAGE_NAME => Shift(yy_state_366) + T_UIDENT => Shift(yy_state_368) + T_REGEX_LITERAL => Shift(yy_state_369) + NT_regex_sequence_pattern => Shift(yy_state_370) + NT_regex_atom_pattern => Shift(yy_state_373) + NT_regex_or_pattern => Shift(yy_state_377) + T_UNDERSCORE => Shift(yy_state_381) + T_EXTEND => Shift(yy_state_382) + T_LIDENT => Shift(yy_state_383) + NT_regex_as_pattern => Shift(yy_state_384) + T_ELLIPSIS => Shift(yy_state_385) + NT_lexscan_case_pattern => Shift(yy_state_386) + T_RBRACE => Reduce(1, NT_option_SEMI_, yy_action_974) + _ => Error + } +} + +fn yy_state_362(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_non_empty_list_semis_lexscan_case_, yy_action_838) +} + +fn yy_state_363(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_LPAREN => Shift(yy_state_363) + NT_regex_as_pattern => Shift(yy_state_364) + T_PACKAGE_NAME => Shift(yy_state_366) + T_UIDENT => Shift(yy_state_368) + T_REGEX_LITERAL => Shift(yy_state_369) + NT_regex_sequence_pattern => Shift(yy_state_370) + NT_regex_atom_pattern => Shift(yy_state_373) + NT_regex_or_pattern => Shift(yy_state_377) + _ => Error + } +} + +fn yy_state_364(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_RPAREN => Shift(yy_state_365) + _ => Error + } +} + +fn yy_state_365(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_regex_atom_pattern, yy_action_837) +} + +fn yy_state_366(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_DOT_UIDENT => Shift(yy_state_367) + _ => Error + } +} + +fn yy_state_367(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(2, NT_regex_atom_pattern, yy_action_836) +} + +fn yy_state_368(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_regex_atom_pattern, yy_action_835) +} + +fn yy_state_369(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_regex_atom_pattern, yy_action_834) +} + +fn yy_state_370(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_PLUS => Shift(yy_state_371) + T_RPAREN | T_COMMA | T_BAR | T_IF | T_FAT_ARROW => Reduce(1, NT_regex_or_pattern, yy_action_833) + _ => Error + } +} + +fn yy_state_371(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_LPAREN => Shift(yy_state_363) + T_PACKAGE_NAME => Shift(yy_state_366) + T_UIDENT => Shift(yy_state_368) + T_REGEX_LITERAL => Shift(yy_state_369) + NT_regex_atom_pattern => Shift(yy_state_372) + _ => Error + } +} + +fn yy_state_372(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_regex_sequence_pattern, yy_action_832) +} + +fn yy_state_373(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_AS => Shift(yy_state_374) + T_RPAREN | T_COMMA | T_PLUS | T_BAR | T_IF | T_FAT_ARROW => Reduce(1, NT_regex_sequence_pattern, yy_action_831) + _ => Error + } +} + +fn yy_state_374(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_EXTEND => Shift(yy_state_375) + T_LIDENT => Shift(yy_state_376) + _ => Error + } +} + +fn yy_state_375(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_regex_as_pattern, yy_action_830) +} + +fn yy_state_376(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_regex_as_pattern, yy_action_829) +} + +fn yy_state_377(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_BAR => Shift(yy_state_378) + T_RPAREN | T_COMMA | T_IF | T_FAT_ARROW => Reduce(1, NT_regex_as_pattern, yy_action_828) + _ => Error + } +} + +fn yy_state_378(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_LPAREN => Shift(yy_state_363) + T_PACKAGE_NAME => Shift(yy_state_366) + T_UIDENT => Shift(yy_state_368) + T_REGEX_LITERAL => Shift(yy_state_369) + NT_regex_atom_pattern => Shift(yy_state_379) + NT_regex_sequence_pattern => Shift(yy_state_380) + _ => Error + } +} + +fn yy_state_379(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_regex_sequence_pattern, yy_action_831) +} + +fn yy_state_380(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_PLUS => Shift(yy_state_371) + T_RPAREN | T_COMMA | T_BAR | T_IF | T_FAT_ARROW => Reduce(3, NT_regex_or_pattern, yy_action_827) + _ => Error + } +} + +fn yy_state_381(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_lexscan_case_pattern, yy_action_826) +} + +fn yy_state_382(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_lexscan_case_pattern, yy_action_825) +} + +fn yy_state_383(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_lexscan_case_pattern, yy_action_824) +} + +fn yy_state_384(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_lexscan_case_pattern, yy_action_823) +} + +fn yy_state_385(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_lexscan_case, yy_action_822) +} + +fn yy_state_386(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_IF => Shift(yy_state_387) + T_FAT_ARROW => Shift(yy_state_760) + _ => Error + } +} + +fn yy_state_387(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + NT_multiline_string => Shift(yy_state_2) + T_MULTILINE_INTERP => Shift(yy_state_4) + T_MULTILINE_STRING => Shift(yy_state_5) + T_REGEX_LITERAL => Shift(yy_state_6) + T_STRING => Shift(yy_state_7) + T_FLOAT => Shift(yy_state_8) + T_DOUBLE => Shift(yy_state_9) + T_INT => Shift(yy_state_10) + T_CHAR => Shift(yy_state_11) + T_BYTES => Shift(yy_state_12) + T_BYTE => Shift(yy_state_13) + T_FALSE => Shift(yy_state_14) + T_TRUE => Shift(yy_state_15) + T_BYTES_INTERP => Shift(yy_state_16) + T_INTERP => Shift(yy_state_17) + NT_non_empty_list_multiline_string_ => Shift(yy_state_18) + NT_simple_constant => Shift(yy_state_19) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + NT_tuple_expr => Shift(yy_state_27) + T_LBRACKET_BAR => Shift(yy_state_28) + T_LBRACKET => Shift(yy_state_36) + NT_constr => Shift(yy_state_47) + NT_qual_ident_simple_expr => Shift(yy_state_48) + T_UNDERSCORE => Shift(yy_state_49) + NT_atomic_expr => Shift(yy_state_50) + NT_anony_fn => Shift(yy_state_51) + T_LBRACE => Shift(yy_state_52) + T_FN => Shift(yy_state_61) + NT_type_name => Shift(yy_state_139) + T_ASYNC => Shift(yy_state_152) + NT_simple_expr => Shift(yy_state_165) + T_EXCLAMATION => Shift(yy_state_176) + T_LPAREN => Shift(yy_state_177) + T_MINUS => Shift(yy_state_191) + T_PLUS => Shift(yy_state_193) + T_UIDENT => Shift(yy_state_195) + T_PACKAGE_NAME => Shift(yy_state_196) + T_EXTEND => Shift(yy_state_199) + T_LIDENT => Shift(yy_state_200) + NT_prefix_expr => Shift(yy_state_201) + NT_range_expr => Shift(yy_state_212) + NT_postfix_expr => Shift(yy_state_223) + NT_infix_expr => Shift(yy_state_388) + _ => Error + } +} + +fn yy_state_388(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_BARBAR => Shift(yy_state_230) + T_AMPERAMPER => Shift(yy_state_232) + T_BAR => Shift(yy_state_234) + T_CARET => Shift(yy_state_236) + T_AMPER => Shift(yy_state_238) + T_MINUS => Shift(yy_state_240) + T_PLUS => Shift(yy_state_242) + T_INFIX1 => Shift(yy_state_244) + T_INFIX2 => Shift(yy_state_246) + T_INFIX3 => Shift(yy_state_248) + T_INFIX4 => Shift(yy_state_250) + T_IMPLIES => Shift(yy_state_252) + T_FAT_ARROW => Shift(yy_state_389) + _ => Error + } +} + +fn yy_state_389(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + NT_multiline_string => Shift(yy_state_2) + T_MULTILINE_INTERP => Shift(yy_state_4) + T_MULTILINE_STRING => Shift(yy_state_5) + T_REGEX_LITERAL => Shift(yy_state_6) + T_STRING => Shift(yy_state_7) + T_FLOAT => Shift(yy_state_8) + T_DOUBLE => Shift(yy_state_9) + T_INT => Shift(yy_state_10) + T_CHAR => Shift(yy_state_11) + T_BYTES => Shift(yy_state_12) + T_BYTE => Shift(yy_state_13) + T_FALSE => Shift(yy_state_14) + T_TRUE => Shift(yy_state_15) + T_BYTES_INTERP => Shift(yy_state_16) + T_INTERP => Shift(yy_state_17) + NT_non_empty_list_multiline_string_ => Shift(yy_state_18) + NT_simple_constant => Shift(yy_state_19) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + NT_tuple_expr => Shift(yy_state_27) + T_LBRACKET_BAR => Shift(yy_state_28) + T_LBRACKET => Shift(yy_state_36) + NT_constr => Shift(yy_state_47) + NT_qual_ident_simple_expr => Shift(yy_state_48) + NT_atomic_expr => Shift(yy_state_50) + NT_anony_fn => Shift(yy_state_51) + T_LBRACE => Shift(yy_state_52) + T_FN => Shift(yy_state_61) + NT_type_name => Shift(yy_state_139) + T_ASYNC => Shift(yy_state_152) + T_EXCLAMATION => Shift(yy_state_176) + T_MINUS => Shift(yy_state_191) + T_PLUS => Shift(yy_state_193) + T_UIDENT => Shift(yy_state_195) + NT_prefix_expr => Shift(yy_state_201) + NT_range_expr => Shift(yy_state_212) + NT_postfix_expr => Shift(yy_state_223) + T_EXISTS => Shift(yy_state_224) + T_FORALL => Shift(yy_state_256) + NT_infix_expr => Shift(yy_state_272) + T_UNDERSCORE => Shift(yy_state_273) + NT_qual_ident => Shift(yy_state_275) + NT_simple_expr => Shift(yy_state_276) + T_LPAREN => Shift(yy_state_281) + NT_pipe_expr => Shift(yy_state_325) + NT_arrow_fn_expr => Shift(yy_state_344) + NT_quantifier_expr => Shift(yy_state_345) + NT_simple_try_expr => Shift(yy_state_346) + NT_lexscan_expr => Shift(yy_state_347) + NT_lexmatch_expr => Shift(yy_state_348) + NT_match_expr => Shift(yy_state_349) + NT_if_expr => Shift(yy_state_350) + NT_try_expr => Shift(yy_state_351) + NT_while_expr => Shift(yy_state_352) + NT_foreach_expr => Shift(yy_state_353) + NT_for_expr => Shift(yy_state_354) + T_LEXSCAN => Shift(yy_state_355) + NT_lexscan_header => Shift(yy_state_358) + NT_expr_statement => Shift(yy_state_390) + T_LEXMATCH => Shift(yy_state_391) + NT_lexmatch_header => Shift(yy_state_399) + NT_match_header => Shift(yy_state_444) + T_MATCH => Shift(yy_state_605) + T_IF => Shift(yy_state_608) + T_TRY_EXCLAMATION => Shift(yy_state_614) + T_TRY_QUESTION => Shift(yy_state_616) + T_TRY => Shift(yy_state_618) + NT_loop_label_colon => Shift(yy_state_632) + T_POST_LABEL => Shift(yy_state_639) + NT_expr => Shift(yy_state_644) + NT_left_value => Shift(yy_state_645) + T_ELLIPSIS => Shift(yy_state_651) + T_RAISE => Shift(yy_state_652) + T_PACKAGE_NAME => Shift(yy_state_654) + T_EXTEND => Shift(yy_state_656) + T_LIDENT => Shift(yy_state_657) + NT_expr_statement_no_break_continue_return => Shift(yy_state_734) + T_RETURN => Shift(yy_state_735) + T_CONTINUE => Shift(yy_state_738) + T_BREAK => Shift(yy_state_747) + T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_1071) + _ => Error + } +} + +fn yy_state_390(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(5, NT_lexscan_case, yy_action_821) +} + +fn yy_state_391(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_expression => Shift(yy_state_1) NT_multiline_string => Shift(yy_state_2) T_MULTILINE_INTERP => Shift(yy_state_4) T_MULTILINE_STRING => Shift(yy_state_5) @@ -16697,568 +26099,401 @@ fn yy_state_0(_lookahead : YYSymbol) -> YYDecision { T_BYTE => Shift(yy_state_13) T_FALSE => Shift(yy_state_14) T_TRUE => Shift(yy_state_15) - T_INTERP => Shift(yy_state_16) - NT_non_empty_list_multiline_string_ => Shift(yy_state_17) - NT_simple_constant => Shift(yy_state_18) - T_AMPER => Shift(yy_state_19) - NT_qual_ident_ty => Shift(yy_state_25) - NT_tuple_expr => Shift(yy_state_26) - T_LBRACKET => Shift(yy_state_27) - NT_constr => Shift(yy_state_35) - NT_qual_ident_simple_expr => Shift(yy_state_36) - NT_atomic_expr => Shift(yy_state_37) - NT_anony_fn => Shift(yy_state_38) - T_LBRACE => Shift(yy_state_39) - T_FN => Shift(yy_state_48) - NT_type_name => Shift(yy_state_126) - T_ASYNC => Shift(yy_state_138) - NT_simple_expr => Shift(yy_state_151) - T_EXCLAMATION => Shift(yy_state_162) - T_MINUS => Shift(yy_state_178) - T_PLUS => Shift(yy_state_180) - T_UIDENT => Shift(yy_state_182) - T_PACKAGE_NAME => Shift(yy_state_183) - NT_prefix_expr => Shift(yy_state_187) - NT_range_expr => Shift(yy_state_198) - NT_postfix_expr => Shift(yy_state_416) - T_EXISTS => Shift(yy_state_417) - T_FORALL => Shift(yy_state_449) - NT_infix_expr => Shift(yy_state_455) - T_UNDERSCORE => Shift(yy_state_456) - T_LPAREN => Shift(yy_state_464) - NT_pipe_expr => Shift(yy_state_497) - NT_arrow_fn_expr => Shift(yy_state_513) - NT_quantifier_expr => Shift(yy_state_514) - NT_simple_try_expr => Shift(yy_state_515) - NT_lexmatch_expr => Shift(yy_state_516) - NT_match_expr => Shift(yy_state_517) - NT_if_expr => Shift(yy_state_518) - NT_try_expr => Shift(yy_state_519) - NT_while_expr => Shift(yy_state_520) - NT_foreach_expr => Shift(yy_state_521) - NT_for_expr => Shift(yy_state_522) - T_LEXMATCH => Shift(yy_state_523) - NT_lexmatch_header => Shift(yy_state_529) - NT_match_header => Shift(yy_state_540) - T_MATCH => Shift(yy_state_550) - T_IF => Shift(yy_state_553) - T_TRY_EXCLAMATION => Shift(yy_state_559) - T_TRY_QUESTION => Shift(yy_state_561) - T_TRY => Shift(yy_state_563) - NT_loop_label_colon => Shift(yy_state_577) - T_POST_LABEL => Shift(yy_state_585) - T_LIDENT => Shift(yy_state_587) - NT_expr => Shift(yy_state_938) - T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_902) + T_BYTES_INTERP => Shift(yy_state_16) + T_INTERP => Shift(yy_state_17) + NT_non_empty_list_multiline_string_ => Shift(yy_state_18) + NT_simple_constant => Shift(yy_state_19) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + NT_tuple_expr => Shift(yy_state_27) + T_LBRACKET_BAR => Shift(yy_state_28) + T_LBRACKET => Shift(yy_state_36) + NT_constr => Shift(yy_state_47) + NT_qual_ident_simple_expr => Shift(yy_state_48) + T_UNDERSCORE => Shift(yy_state_49) + NT_atomic_expr => Shift(yy_state_50) + NT_anony_fn => Shift(yy_state_51) + T_LBRACE => Shift(yy_state_52) + T_FN => Shift(yy_state_61) + NT_type_name => Shift(yy_state_139) + T_ASYNC => Shift(yy_state_152) + NT_simple_expr => Shift(yy_state_165) + T_EXCLAMATION => Shift(yy_state_176) + T_LPAREN => Shift(yy_state_177) + T_MINUS => Shift(yy_state_191) + T_PLUS => Shift(yy_state_193) + T_UIDENT => Shift(yy_state_195) + T_PACKAGE_NAME => Shift(yy_state_196) + T_EXTEND => Shift(yy_state_199) + T_LIDENT => Shift(yy_state_200) + NT_prefix_expr => Shift(yy_state_201) + NT_range_expr => Shift(yy_state_212) + NT_postfix_expr => Shift(yy_state_223) + NT_infix_expr => Shift(yy_state_392) + _ => Error + } +} + +fn yy_state_392(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_BARBAR => Shift(yy_state_230) + T_AMPERAMPER => Shift(yy_state_232) + T_BAR => Shift(yy_state_234) + T_CARET => Shift(yy_state_236) + T_AMPER => Shift(yy_state_238) + T_MINUS => Shift(yy_state_240) + T_PLUS => Shift(yy_state_242) + T_INFIX1 => Shift(yy_state_244) + T_INFIX2 => Shift(yy_state_246) + T_INFIX3 => Shift(yy_state_248) + T_INFIX4 => Shift(yy_state_250) + T_IMPLIES => Shift(yy_state_252) + T_WITH => Shift(yy_state_393) + T_LBRACE => Shift(yy_state_398) + _ => Error + } +} + +fn yy_state_393(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_EXTEND => Shift(yy_state_394) + T_LIDENT => Shift(yy_state_396) + _ => Error + } +} + +fn yy_state_394(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_LBRACE => Shift(yy_state_395) + _ => Error + } +} + +fn yy_state_395(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(5, NT_lexmatch_header, yy_action_820) +} + +fn yy_state_396(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_LBRACE => Shift(yy_state_397) _ => Error } } -fn yy_state_1(_lookahead : YYSymbol) -> YYDecision { - Accept +fn yy_state_397(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(5, NT_lexmatch_header, yy_action_819) } -fn yy_state_2(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_398(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_lexmatch_header, yy_action_818) +} + +fn yy_state_399(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_multiline_string => Shift(yy_state_2) - NT_non_empty_list_multiline_string_ => Shift(yy_state_3) - T_MULTILINE_INTERP => Shift(yy_state_4) - T_MULTILINE_STRING => Shift(yy_state_5) - T_INFIX1 | T_INFIX2 | T_INFIX3 | T_INFIX4 | T_EOF | T_WITH | T_CATCH | T_EQ_TILDE | T_LPAREN | T_RPAREN | T_COMMA | T_MINUS | T_DOT_LIDENT | T_DOT_INT | T_COLON | T_SEMI | T_LBRACKET | T_PLUS | T_RBRACKET | T_BAR | T_LBRACE | T_RBRACE | T_AMPERAMPER | T_AMPER | T_CARET | T_BARBAR | T_AS | T_PIPE | T_PIPE_LEFT | T_LT_PLUS | T_ELSE | T_IF | T_FAT_ARROW | T_DOTDOT | T_RANGE_INCLUSIVE | T_RANGE_LT_INCLUSIVE | T_RANGE_EXCLUSIVE | T_RANGE_INCLUSIVE_REV | T_RANGE_EXCLUSIVE_REV | T_IS | T_AND | T_IMPLIES | T_LEXMATCH_QUESTION => Reduce(1, NT_non_empty_list_multiline_string_, yy_action_901) + NT_lex_case => Shift(yy_state_400) + T_PACKAGE_NAME => Shift(yy_state_404) + T_UIDENT => Shift(yy_state_406) + T_INTERP => Shift(yy_state_407) + T_STRING => Shift(yy_state_408) + T_REGEX_INTERP => Shift(yy_state_409) + T_REGEX_LITERAL => Shift(yy_state_410) + NT_lex_simple_atom_pattern => Shift(yy_state_411) + T_EXTEND => Shift(yy_state_412) + T_LIDENT => Shift(yy_state_413) + T_UNDERSCORE => Shift(yy_state_414) + T_LPAREN => Shift(yy_state_415) + T_ELLIPSIS => Shift(yy_state_438) + NT_lex_pattern => Shift(yy_state_439) + NT_non_empty_list_semis_lex_case_ => Shift(yy_state_757) + NT_list_semis_lex_case_ => Shift(yy_state_758) + T_RBRACE => Reduce(0, NT_list_semis_lex_case_, yy_action_817) _ => Error } } -fn yy_state_3(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(2, NT_non_empty_list_multiline_string_, yy_action_900) -} - -fn yy_state_4(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_multiline_string, yy_action_899) +fn yy_state_400(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + NT_option_SEMI_ => Shift(yy_state_401) + T_SEMI => Shift(yy_state_402) + T_RBRACE => Reduce(0, NT_option_SEMI_, yy_action_976) + _ => Error + } } -fn yy_state_5(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_multiline_string, yy_action_898) +fn yy_state_401(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(2, NT_non_empty_list_semis_lex_case_, yy_action_816) } -fn yy_state_6(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_simple_constant, yy_action_897) +fn yy_state_402(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + NT_lex_case => Shift(yy_state_400) + NT_non_empty_list_semis_lex_case_ => Shift(yy_state_403) + T_PACKAGE_NAME => Shift(yy_state_404) + T_UIDENT => Shift(yy_state_406) + T_INTERP => Shift(yy_state_407) + T_STRING => Shift(yy_state_408) + T_REGEX_INTERP => Shift(yy_state_409) + T_REGEX_LITERAL => Shift(yy_state_410) + NT_lex_simple_atom_pattern => Shift(yy_state_411) + T_EXTEND => Shift(yy_state_412) + T_LIDENT => Shift(yy_state_413) + T_UNDERSCORE => Shift(yy_state_414) + T_LPAREN => Shift(yy_state_415) + T_ELLIPSIS => Shift(yy_state_438) + NT_lex_pattern => Shift(yy_state_439) + T_RBRACE => Reduce(1, NT_option_SEMI_, yy_action_974) + _ => Error + } } -fn yy_state_7(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_simple_constant, yy_action_896) +fn yy_state_403(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_non_empty_list_semis_lex_case_, yy_action_815) } -fn yy_state_8(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_simple_constant, yy_action_895) +fn yy_state_404(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_DOT_UIDENT => Shift(yy_state_405) + _ => Error + } } -fn yy_state_9(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_simple_constant, yy_action_894) +fn yy_state_405(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(2, NT_lex_simple_atom_pattern, yy_action_813) } -fn yy_state_10(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_simple_constant, yy_action_893) +fn yy_state_406(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_lex_simple_atom_pattern, yy_action_811) } -fn yy_state_11(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_simple_constant, yy_action_892) +fn yy_state_407(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_lex_simple_atom_pattern, yy_action_810) } -fn yy_state_12(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_simple_constant, yy_action_891) +fn yy_state_408(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_lex_simple_atom_pattern, yy_action_809) } -fn yy_state_13(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_simple_constant, yy_action_890) +fn yy_state_409(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_lex_simple_atom_pattern, yy_action_808) } -fn yy_state_14(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_simple_constant, yy_action_889) +fn yy_state_410(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_lex_simple_atom_pattern, yy_action_807) } -fn yy_state_15(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_simple_constant, yy_action_888) +fn yy_state_411(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_lex_pattern, yy_action_806) } -fn yy_state_16(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_atomic_expr, yy_action_887) +fn yy_state_412(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_lex_pattern, yy_action_805) } -fn yy_state_17(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_atomic_expr, yy_action_886) +fn yy_state_413(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_lex_pattern, yy_action_804) } -fn yy_state_18(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_atomic_expr, yy_action_885) +fn yy_state_414(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_lex_pattern, yy_action_803) } -fn yy_state_19(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_415(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_qual_ident_ty => Shift(yy_state_20) - T_PACKAGE_NAME => Shift(yy_state_21) - T_UIDENT => Shift(yy_state_24) + T_PACKAGE_NAME => Shift(yy_state_404) + T_UIDENT => Shift(yy_state_406) + T_INTERP => Shift(yy_state_407) + T_STRING => Shift(yy_state_408) + T_REGEX_INTERP => Shift(yy_state_409) + T_REGEX_LITERAL => Shift(yy_state_410) + NT_lex_top_pattern => Shift(yy_state_416) + T_LPAREN => Shift(yy_state_419) + NT_lex_simple_atom_pattern => Shift(yy_state_422) + NT_lex_atom_pattern => Shift(yy_state_423) + NT_lex_pattern_sequence => Shift(yy_state_431) + T_EXTEND => Shift(yy_state_432) + T_LIDENT => Shift(yy_state_433) + T_UNDERSCORE => Shift(yy_state_434) + NT_lex_as_pattern => Shift(yy_state_435) + NT_separated_nonempty_list_COMMA_lex_top_pattern_ => Shift(yy_state_436) _ => Error } } -fn yy_state_20(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(2, NT_type_name, yy_action_884) +fn yy_state_416(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_COMMA => Shift(yy_state_417) + T_RPAREN => Reduce(1, NT_separated_nonempty_list_COMMA_lex_top_pattern_, yy_action_802) + _ => Error + } } -fn yy_state_21(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_417(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_DOT_UIDENT => Shift(yy_state_22) - T_DOT_LIDENT => Shift(yy_state_23) + T_PACKAGE_NAME => Shift(yy_state_404) + T_UIDENT => Shift(yy_state_406) + T_INTERP => Shift(yy_state_407) + T_STRING => Shift(yy_state_408) + T_REGEX_INTERP => Shift(yy_state_409) + T_REGEX_LITERAL => Shift(yy_state_410) + NT_lex_top_pattern => Shift(yy_state_416) + NT_separated_nonempty_list_COMMA_lex_top_pattern_ => Shift(yy_state_418) + T_LPAREN => Shift(yy_state_419) + NT_lex_simple_atom_pattern => Shift(yy_state_422) + NT_lex_atom_pattern => Shift(yy_state_423) + NT_lex_pattern_sequence => Shift(yy_state_431) + T_EXTEND => Shift(yy_state_432) + T_LIDENT => Shift(yy_state_433) + T_UNDERSCORE => Shift(yy_state_434) + NT_lex_as_pattern => Shift(yy_state_435) _ => Error } } -fn yy_state_22(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(2, NT_qual_ident_ty, yy_action_883) +fn yy_state_418(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_separated_nonempty_list_COMMA_lex_top_pattern_, yy_action_801) } -fn yy_state_23(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(2, NT_qual_ident_ty, yy_action_882) +fn yy_state_419(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_PACKAGE_NAME => Shift(yy_state_404) + T_UIDENT => Shift(yy_state_406) + T_INTERP => Shift(yy_state_407) + T_STRING => Shift(yy_state_408) + T_REGEX_INTERP => Shift(yy_state_409) + T_REGEX_LITERAL => Shift(yy_state_410) + T_LPAREN => Shift(yy_state_419) + NT_lex_as_pattern => Shift(yy_state_420) + NT_lex_simple_atom_pattern => Shift(yy_state_422) + NT_lex_atom_pattern => Shift(yy_state_423) + NT_lex_pattern_sequence => Shift(yy_state_431) + _ => Error + } } -fn yy_state_24(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_qual_ident_ty, yy_action_881) +fn yy_state_420(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_RPAREN => Shift(yy_state_421) + _ => Error + } } -fn yy_state_25(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_type_name, yy_action_880) +fn yy_state_421(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_lex_atom_pattern, yy_action_800) } -fn yy_state_26(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_simple_expr, yy_action_879) +fn yy_state_422(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_lex_atom_pattern, yy_action_799) } -fn yy_state_27(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_423(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_multiline_string => Shift(yy_state_2) - T_MULTILINE_INTERP => Shift(yy_state_4) - T_MULTILINE_STRING => Shift(yy_state_5) - T_REGEX_LITERAL => Shift(yy_state_6) - T_STRING => Shift(yy_state_7) - T_FLOAT => Shift(yy_state_8) - T_DOUBLE => Shift(yy_state_9) - T_INT => Shift(yy_state_10) - T_CHAR => Shift(yy_state_11) - T_BYTES => Shift(yy_state_12) - T_BYTE => Shift(yy_state_13) - T_FALSE => Shift(yy_state_14) - T_TRUE => Shift(yy_state_15) - T_INTERP => Shift(yy_state_16) - NT_non_empty_list_multiline_string_ => Shift(yy_state_17) - NT_simple_constant => Shift(yy_state_18) - T_AMPER => Shift(yy_state_19) - NT_qual_ident_ty => Shift(yy_state_25) - NT_tuple_expr => Shift(yy_state_26) - T_LBRACKET => Shift(yy_state_27) - NT_spreadable_elem => Shift(yy_state_28) - NT_non_empty_list_commas_rev_spreadable_elem_ => Shift(yy_state_29) - T_DOTDOT => Shift(yy_state_33) - NT_constr => Shift(yy_state_35) - NT_qual_ident_simple_expr => Shift(yy_state_36) - NT_atomic_expr => Shift(yy_state_37) - NT_anony_fn => Shift(yy_state_38) - T_LBRACE => Shift(yy_state_39) - T_FN => Shift(yy_state_48) - NT_type_name => Shift(yy_state_126) - T_ASYNC => Shift(yy_state_138) - NT_simple_expr => Shift(yy_state_151) - T_EXCLAMATION => Shift(yy_state_162) - T_MINUS => Shift(yy_state_178) - T_PLUS => Shift(yy_state_180) - T_UIDENT => Shift(yy_state_182) - T_PACKAGE_NAME => Shift(yy_state_183) - NT_prefix_expr => Shift(yy_state_187) - NT_range_expr => Shift(yy_state_198) - NT_postfix_expr => Shift(yy_state_416) - T_EXISTS => Shift(yy_state_417) - T_FORALL => Shift(yy_state_449) - NT_infix_expr => Shift(yy_state_455) - T_UNDERSCORE => Shift(yy_state_456) - T_LPAREN => Shift(yy_state_464) - NT_pipe_expr => Shift(yy_state_497) - NT_arrow_fn_expr => Shift(yy_state_513) - NT_quantifier_expr => Shift(yy_state_514) - NT_simple_try_expr => Shift(yy_state_515) - NT_lexmatch_expr => Shift(yy_state_516) - NT_match_expr => Shift(yy_state_517) - NT_if_expr => Shift(yy_state_518) - NT_try_expr => Shift(yy_state_519) - NT_while_expr => Shift(yy_state_520) - NT_foreach_expr => Shift(yy_state_521) - NT_for_expr => Shift(yy_state_522) - T_LEXMATCH => Shift(yy_state_523) - NT_lexmatch_header => Shift(yy_state_529) - NT_match_header => Shift(yy_state_540) - T_MATCH => Shift(yy_state_550) - T_IF => Shift(yy_state_553) - T_TRY_EXCLAMATION => Shift(yy_state_559) - T_TRY_QUESTION => Shift(yy_state_561) - T_TRY => Shift(yy_state_563) - NT_loop_label_colon => Shift(yy_state_577) - T_POST_LABEL => Shift(yy_state_585) - T_LIDENT => Shift(yy_state_587) - NT_expr => Shift(yy_state_899) - NT_non_empty_list_commas_spreadable_elem_ => Shift(yy_state_900) - NT_list_commas_spreadable_elem_ => Shift(yy_state_901) - T_FOR => Shift(yy_state_903) - T_WHILE => Reduce(0, NT_loop_label_colon, yy_action_902) - T_RBRACKET => Reduce(0, NT_list_commas_spreadable_elem_, yy_action_878) + T_SEMI => Shift(yy_state_424) + NT_option_SEMI_ => Shift(yy_state_425) + T_AS => Shift(yy_state_428) + T_STRING | T_INTERP | T_REGEX_LITERAL | T_REGEX_INTERP | T_UIDENT | T_LPAREN | T_PACKAGE_NAME => Reduce(0, NT_option_SEMI_, yy_action_976) + T_RPAREN | T_COMMA => Reduce(1, NT_lex_pattern_sequence, yy_action_798) _ => Error } } -fn yy_state_28(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_non_empty_list_commas_rev_spreadable_elem_, yy_action_877) +fn yy_state_424(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_option_SEMI_, yy_action_974) } -fn yy_state_29(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_425(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_option_COMMA_ => Shift(yy_state_30) - T_COMMA => Shift(yy_state_31) - T_RBRACKET => Reduce(0, NT_option_COMMA_, yy_action_876) + T_PACKAGE_NAME => Shift(yy_state_404) + T_UIDENT => Shift(yy_state_406) + T_INTERP => Shift(yy_state_407) + T_STRING => Shift(yy_state_408) + T_REGEX_INTERP => Shift(yy_state_409) + T_REGEX_LITERAL => Shift(yy_state_410) + T_LPAREN => Shift(yy_state_419) + NT_lex_simple_atom_pattern => Shift(yy_state_422) + NT_lex_pattern_sequence => Shift(yy_state_426) + NT_lex_atom_pattern => Shift(yy_state_427) _ => Error } } -fn yy_state_30(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(2, NT_non_empty_list_commas_spreadable_elem_, yy_action_875) +fn yy_state_426(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_lex_pattern_sequence, yy_action_797) } -fn yy_state_31(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_427(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_multiline_string => Shift(yy_state_2) - T_MULTILINE_INTERP => Shift(yy_state_4) - T_MULTILINE_STRING => Shift(yy_state_5) - T_REGEX_LITERAL => Shift(yy_state_6) - T_STRING => Shift(yy_state_7) - T_FLOAT => Shift(yy_state_8) - T_DOUBLE => Shift(yy_state_9) - T_INT => Shift(yy_state_10) - T_CHAR => Shift(yy_state_11) - T_BYTES => Shift(yy_state_12) - T_BYTE => Shift(yy_state_13) - T_FALSE => Shift(yy_state_14) - T_TRUE => Shift(yy_state_15) - T_INTERP => Shift(yy_state_16) - NT_non_empty_list_multiline_string_ => Shift(yy_state_17) - NT_simple_constant => Shift(yy_state_18) - T_AMPER => Shift(yy_state_19) - NT_qual_ident_ty => Shift(yy_state_25) - NT_tuple_expr => Shift(yy_state_26) - T_LBRACKET => Shift(yy_state_27) - NT_spreadable_elem => Shift(yy_state_32) - T_DOTDOT => Shift(yy_state_33) - NT_constr => Shift(yy_state_35) - NT_qual_ident_simple_expr => Shift(yy_state_36) - NT_atomic_expr => Shift(yy_state_37) - NT_anony_fn => Shift(yy_state_38) - T_LBRACE => Shift(yy_state_39) - T_FN => Shift(yy_state_48) - NT_type_name => Shift(yy_state_126) - T_ASYNC => Shift(yy_state_138) - NT_simple_expr => Shift(yy_state_151) - T_EXCLAMATION => Shift(yy_state_162) - T_MINUS => Shift(yy_state_178) - T_PLUS => Shift(yy_state_180) - T_UIDENT => Shift(yy_state_182) - T_PACKAGE_NAME => Shift(yy_state_183) - NT_prefix_expr => Shift(yy_state_187) - NT_range_expr => Shift(yy_state_198) - NT_postfix_expr => Shift(yy_state_416) - T_EXISTS => Shift(yy_state_417) - T_FORALL => Shift(yy_state_449) - NT_infix_expr => Shift(yy_state_455) - T_UNDERSCORE => Shift(yy_state_456) - T_LPAREN => Shift(yy_state_464) - NT_pipe_expr => Shift(yy_state_497) - NT_arrow_fn_expr => Shift(yy_state_513) - NT_quantifier_expr => Shift(yy_state_514) - NT_simple_try_expr => Shift(yy_state_515) - NT_lexmatch_expr => Shift(yy_state_516) - NT_match_expr => Shift(yy_state_517) - NT_if_expr => Shift(yy_state_518) - NT_try_expr => Shift(yy_state_519) - NT_while_expr => Shift(yy_state_520) - NT_foreach_expr => Shift(yy_state_521) - NT_for_expr => Shift(yy_state_522) - T_LEXMATCH => Shift(yy_state_523) - NT_lexmatch_header => Shift(yy_state_529) - NT_match_header => Shift(yy_state_540) - T_MATCH => Shift(yy_state_550) - T_IF => Shift(yy_state_553) - T_TRY_EXCLAMATION => Shift(yy_state_559) - T_TRY_QUESTION => Shift(yy_state_561) - T_TRY => Shift(yy_state_563) - NT_loop_label_colon => Shift(yy_state_577) - T_POST_LABEL => Shift(yy_state_585) - T_LIDENT => Shift(yy_state_587) - NT_expr => Shift(yy_state_899) - T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_902) - T_RBRACKET => Reduce(1, NT_option_COMMA_, yy_action_874) + T_SEMI => Shift(yy_state_424) + NT_option_SEMI_ => Shift(yy_state_425) + T_STRING | T_INTERP | T_REGEX_LITERAL | T_REGEX_INTERP | T_UIDENT | T_LPAREN | T_PACKAGE_NAME => Reduce(0, NT_option_SEMI_, yy_action_976) + T_RPAREN | T_COMMA => Reduce(1, NT_lex_pattern_sequence, yy_action_798) _ => Error } } -fn yy_state_32(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_non_empty_list_commas_rev_spreadable_elem_, yy_action_873) -} - -fn yy_state_33(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_428(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_multiline_string => Shift(yy_state_2) - T_MULTILINE_INTERP => Shift(yy_state_4) - T_MULTILINE_STRING => Shift(yy_state_5) - T_REGEX_LITERAL => Shift(yy_state_6) - T_STRING => Shift(yy_state_7) - T_FLOAT => Shift(yy_state_8) - T_DOUBLE => Shift(yy_state_9) - T_INT => Shift(yy_state_10) - T_CHAR => Shift(yy_state_11) - T_BYTES => Shift(yy_state_12) - T_BYTE => Shift(yy_state_13) - T_FALSE => Shift(yy_state_14) - T_TRUE => Shift(yy_state_15) - T_INTERP => Shift(yy_state_16) - NT_non_empty_list_multiline_string_ => Shift(yy_state_17) - NT_simple_constant => Shift(yy_state_18) - T_AMPER => Shift(yy_state_19) - NT_qual_ident_ty => Shift(yy_state_25) - NT_tuple_expr => Shift(yy_state_26) - T_LBRACKET => Shift(yy_state_27) - NT_expr => Shift(yy_state_34) - NT_constr => Shift(yy_state_35) - NT_qual_ident_simple_expr => Shift(yy_state_36) - NT_atomic_expr => Shift(yy_state_37) - NT_anony_fn => Shift(yy_state_38) - T_LBRACE => Shift(yy_state_39) - T_FN => Shift(yy_state_48) - NT_type_name => Shift(yy_state_126) - T_ASYNC => Shift(yy_state_138) - NT_simple_expr => Shift(yy_state_151) - T_EXCLAMATION => Shift(yy_state_162) - T_MINUS => Shift(yy_state_178) - T_PLUS => Shift(yy_state_180) - T_UIDENT => Shift(yy_state_182) - T_PACKAGE_NAME => Shift(yy_state_183) - NT_prefix_expr => Shift(yy_state_187) - NT_range_expr => Shift(yy_state_198) - NT_postfix_expr => Shift(yy_state_416) - T_EXISTS => Shift(yy_state_417) - T_FORALL => Shift(yy_state_449) - NT_infix_expr => Shift(yy_state_455) - T_UNDERSCORE => Shift(yy_state_456) - T_LPAREN => Shift(yy_state_464) - NT_pipe_expr => Shift(yy_state_497) - NT_arrow_fn_expr => Shift(yy_state_513) - NT_quantifier_expr => Shift(yy_state_514) - NT_simple_try_expr => Shift(yy_state_515) - NT_lexmatch_expr => Shift(yy_state_516) - NT_match_expr => Shift(yy_state_517) - NT_if_expr => Shift(yy_state_518) - NT_try_expr => Shift(yy_state_519) - NT_while_expr => Shift(yy_state_520) - NT_foreach_expr => Shift(yy_state_521) - NT_for_expr => Shift(yy_state_522) - T_LEXMATCH => Shift(yy_state_523) - NT_lexmatch_header => Shift(yy_state_529) - NT_match_header => Shift(yy_state_540) - T_MATCH => Shift(yy_state_550) - T_IF => Shift(yy_state_553) - T_TRY_EXCLAMATION => Shift(yy_state_559) - T_TRY_QUESTION => Shift(yy_state_561) - T_TRY => Shift(yy_state_563) - NT_loop_label_colon => Shift(yy_state_577) - T_POST_LABEL => Shift(yy_state_585) - T_LIDENT => Shift(yy_state_587) - T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_902) + T_EXTEND => Shift(yy_state_429) + T_LIDENT => Shift(yy_state_430) _ => Error } } -fn yy_state_34(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(2, NT_spreadable_elem, yy_action_872) +fn yy_state_429(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_lex_as_pattern, yy_action_796) } -fn yy_state_35(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_simple_expr, yy_action_871) +fn yy_state_430(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_lex_as_pattern, yy_action_795) } -fn yy_state_36(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_simple_expr, yy_action_870) +fn yy_state_431(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_lex_as_pattern, yy_action_794) } -fn yy_state_37(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_simple_expr, yy_action_869) +fn yy_state_432(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_lex_top_pattern, yy_action_793) } -fn yy_state_38(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_simple_expr, yy_action_868) +fn yy_state_433(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_lex_top_pattern, yy_action_792) } -fn yy_state_39(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_434(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_lex_top_pattern, yy_action_791) +} + +fn yy_state_435(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_lex_top_pattern, yy_action_790) +} + +fn yy_state_436(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_multiline_string => Shift(yy_state_2) - T_MULTILINE_INTERP => Shift(yy_state_4) - T_MULTILINE_STRING => Shift(yy_state_5) - T_REGEX_LITERAL => Shift(yy_state_6) - T_STRING => Shift(yy_state_7) - T_FLOAT => Shift(yy_state_8) - T_DOUBLE => Shift(yy_state_9) - T_INT => Shift(yy_state_10) - T_CHAR => Shift(yy_state_11) - T_BYTES => Shift(yy_state_12) - T_BYTE => Shift(yy_state_13) - T_FALSE => Shift(yy_state_14) - T_TRUE => Shift(yy_state_15) - T_INTERP => Shift(yy_state_16) - NT_non_empty_list_multiline_string_ => Shift(yy_state_17) - T_AMPER => Shift(yy_state_19) - NT_qual_ident_ty => Shift(yy_state_25) - NT_tuple_expr => Shift(yy_state_26) - T_LBRACKET => Shift(yy_state_27) - NT_constr => Shift(yy_state_35) - NT_qual_ident_simple_expr => Shift(yy_state_36) - NT_atomic_expr => Shift(yy_state_37) - NT_anony_fn => Shift(yy_state_38) - T_LBRACE => Shift(yy_state_39) - NT_map_expr_elem => Shift(yy_state_40) - NT_non_empty_list_commas_rev_map_expr_elem_ => Shift(yy_state_41) - NT_map_syntax_key => Shift(yy_state_45) - NT_statement => Shift(yy_state_121) - NT_type_name => Shift(yy_state_126) - T_EXCLAMATION => Shift(yy_state_162) - T_PLUS => Shift(yy_state_180) - T_UIDENT => Shift(yy_state_182) - NT_prefix_expr => Shift(yy_state_187) - NT_range_expr => Shift(yy_state_198) - NT_postfix_expr => Shift(yy_state_416) - T_EXISTS => Shift(yy_state_417) - T_FORALL => Shift(yy_state_449) - NT_infix_expr => Shift(yy_state_455) - T_UNDERSCORE => Shift(yy_state_456) - NT_qual_ident => Shift(yy_state_458) - NT_simple_expr => Shift(yy_state_459) - T_LPAREN => Shift(yy_state_464) - NT_pipe_expr => Shift(yy_state_497) - NT_arrow_fn_expr => Shift(yy_state_513) - NT_quantifier_expr => Shift(yy_state_514) - NT_simple_try_expr => Shift(yy_state_515) - NT_lexmatch_expr => Shift(yy_state_516) - NT_match_expr => Shift(yy_state_517) - NT_if_expr => Shift(yy_state_518) - NT_try_expr => Shift(yy_state_519) - NT_while_expr => Shift(yy_state_520) - NT_foreach_expr => Shift(yy_state_521) - NT_for_expr => Shift(yy_state_522) - T_LEXMATCH => Shift(yy_state_523) - NT_lexmatch_header => Shift(yy_state_529) - NT_match_header => Shift(yy_state_540) - T_MATCH => Shift(yy_state_550) - T_IF => Shift(yy_state_553) - T_TRY_EXCLAMATION => Shift(yy_state_559) - T_TRY_QUESTION => Shift(yy_state_561) - T_TRY => Shift(yy_state_563) - NT_loop_label_colon => Shift(yy_state_577) - T_POST_LABEL => Shift(yy_state_585) - NT_expr => Shift(yy_state_590) - NT_left_value => Shift(yy_state_591) - T_ELLIPSIS => Shift(yy_state_598) - T_RAISE => Shift(yy_state_599) - T_PACKAGE_NAME => Shift(yy_state_601) - NT_expr_statement_no_break_continue_return => Shift(yy_state_662) - T_RETURN => Shift(yy_state_663) - T_CONTINUE => Shift(yy_state_666) - T_BREAK => Shift(yy_state_675) - T_GUARD => Shift(yy_state_688) - NT_expr_statement => Shift(yy_state_692) - T_PROOF_LET => Shift(yy_state_693) - T_PROOF_ASSERT => Shift(yy_state_697) - T_DEFER => Shift(yy_state_699) - NT_guard_statement => Shift(yy_state_701) - T_FN => Shift(yy_state_702) - T_ASYNC => Shift(yy_state_707) - T_LETREC => Shift(yy_state_713) - T_LET => Shift(yy_state_744) - NT_non_empty_list_commas_map_expr_elem_ => Shift(yy_state_871) - NT_non_empty_list_semi_rev_aux_statement_ => Shift(yy_state_872) - NT_simple_constant => Shift(yy_state_874) - NT_list_commas_map_expr_elem_ => Shift(yy_state_875) - NT_none_empty_list_semis_rev_with_trailing_info_statement_ => Shift(yy_state_877) - T_DOTDOT => Shift(yy_state_879) - NT_record_defn => Shift(yy_state_885) - T_MINUS => Shift(yy_state_887) - T_LIDENT => Shift(yy_state_891) - T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_902) - T_RBRACE => Reduce(0, NT_list_commas_map_expr_elem_, yy_action_867) + T_RPAREN => Shift(yy_state_437) _ => Error } } -fn yy_state_40(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_non_empty_list_commas_rev_map_expr_elem_, yy_action_866) +fn yy_state_437(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_lex_pattern, yy_action_789) } -fn yy_state_41(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_438(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_lex_case, yy_action_788) +} + +fn yy_state_439(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_option_COMMA_ => Shift(yy_state_42) - T_COMMA => Shift(yy_state_43) - T_RBRACE => Reduce(0, NT_option_COMMA_, yy_action_876) + T_IF => Shift(yy_state_440) + T_FAT_ARROW => Shift(yy_state_755) _ => Error } } -fn yy_state_42(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(2, NT_non_empty_list_commas_map_expr_elem_, yy_action_865) -} - -fn yy_state_43(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_440(_lookahead : YYSymbol) -> YYDecision { match _lookahead { + NT_multiline_string => Shift(yy_state_2) + T_MULTILINE_INTERP => Shift(yy_state_4) + T_MULTILINE_STRING => Shift(yy_state_5) T_REGEX_LITERAL => Shift(yy_state_6) T_STRING => Shift(yy_state_7) T_FLOAT => Shift(yy_state_8) @@ -17269,27 +26504,61 @@ fn yy_state_43(_lookahead : YYSymbol) -> YYDecision { T_BYTE => Shift(yy_state_13) T_FALSE => Shift(yy_state_14) T_TRUE => Shift(yy_state_15) - NT_map_expr_elem => Shift(yy_state_44) - NT_map_syntax_key => Shift(yy_state_45) - T_MINUS => Shift(yy_state_385) - NT_simple_constant => Shift(yy_state_389) - T_RBRACE => Reduce(1, NT_option_COMMA_, yy_action_874) + T_BYTES_INTERP => Shift(yy_state_16) + T_INTERP => Shift(yy_state_17) + NT_non_empty_list_multiline_string_ => Shift(yy_state_18) + NT_simple_constant => Shift(yy_state_19) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + NT_tuple_expr => Shift(yy_state_27) + T_LBRACKET_BAR => Shift(yy_state_28) + T_LBRACKET => Shift(yy_state_36) + NT_constr => Shift(yy_state_47) + NT_qual_ident_simple_expr => Shift(yy_state_48) + T_UNDERSCORE => Shift(yy_state_49) + NT_atomic_expr => Shift(yy_state_50) + NT_anony_fn => Shift(yy_state_51) + T_LBRACE => Shift(yy_state_52) + T_FN => Shift(yy_state_61) + NT_type_name => Shift(yy_state_139) + T_ASYNC => Shift(yy_state_152) + NT_simple_expr => Shift(yy_state_165) + T_EXCLAMATION => Shift(yy_state_176) + T_LPAREN => Shift(yy_state_177) + T_MINUS => Shift(yy_state_191) + T_PLUS => Shift(yy_state_193) + T_UIDENT => Shift(yy_state_195) + T_PACKAGE_NAME => Shift(yy_state_196) + T_EXTEND => Shift(yy_state_199) + T_LIDENT => Shift(yy_state_200) + NT_prefix_expr => Shift(yy_state_201) + NT_range_expr => Shift(yy_state_212) + NT_postfix_expr => Shift(yy_state_223) + NT_infix_expr => Shift(yy_state_441) _ => Error } } -fn yy_state_44(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_non_empty_list_commas_rev_map_expr_elem_, yy_action_864) -} - -fn yy_state_45(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_441(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_COLON => Shift(yy_state_46) + T_BARBAR => Shift(yy_state_230) + T_AMPERAMPER => Shift(yy_state_232) + T_BAR => Shift(yy_state_234) + T_CARET => Shift(yy_state_236) + T_AMPER => Shift(yy_state_238) + T_MINUS => Shift(yy_state_240) + T_PLUS => Shift(yy_state_242) + T_INFIX1 => Shift(yy_state_244) + T_INFIX2 => Shift(yy_state_246) + T_INFIX3 => Shift(yy_state_248) + T_INFIX4 => Shift(yy_state_250) + T_IMPLIES => Shift(yy_state_252) + T_FAT_ARROW => Shift(yy_state_442) _ => Error } } -fn yy_state_46(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_442(_lookahead : YYSymbol) -> YYDecision { match _lookahead { NT_multiline_string => Shift(yy_state_2) T_MULTILINE_INTERP => Shift(yy_state_4) @@ -17304,1114 +26573,1381 @@ fn yy_state_46(_lookahead : YYSymbol) -> YYDecision { T_BYTE => Shift(yy_state_13) T_FALSE => Shift(yy_state_14) T_TRUE => Shift(yy_state_15) - T_INTERP => Shift(yy_state_16) - NT_non_empty_list_multiline_string_ => Shift(yy_state_17) - NT_simple_constant => Shift(yy_state_18) - T_AMPER => Shift(yy_state_19) - NT_qual_ident_ty => Shift(yy_state_25) - NT_tuple_expr => Shift(yy_state_26) - T_LBRACKET => Shift(yy_state_27) - NT_constr => Shift(yy_state_35) - NT_qual_ident_simple_expr => Shift(yy_state_36) - NT_atomic_expr => Shift(yy_state_37) - NT_anony_fn => Shift(yy_state_38) - T_LBRACE => Shift(yy_state_39) - NT_expr => Shift(yy_state_47) - T_FN => Shift(yy_state_48) - NT_type_name => Shift(yy_state_126) - T_ASYNC => Shift(yy_state_138) - NT_simple_expr => Shift(yy_state_151) - T_EXCLAMATION => Shift(yy_state_162) - T_MINUS => Shift(yy_state_178) - T_PLUS => Shift(yy_state_180) - T_UIDENT => Shift(yy_state_182) - T_PACKAGE_NAME => Shift(yy_state_183) - NT_prefix_expr => Shift(yy_state_187) - NT_range_expr => Shift(yy_state_198) - NT_postfix_expr => Shift(yy_state_416) - T_EXISTS => Shift(yy_state_417) - T_FORALL => Shift(yy_state_449) - NT_infix_expr => Shift(yy_state_455) - T_UNDERSCORE => Shift(yy_state_456) - T_LPAREN => Shift(yy_state_464) - NT_pipe_expr => Shift(yy_state_497) - NT_arrow_fn_expr => Shift(yy_state_513) - NT_quantifier_expr => Shift(yy_state_514) - NT_simple_try_expr => Shift(yy_state_515) - NT_lexmatch_expr => Shift(yy_state_516) - NT_match_expr => Shift(yy_state_517) - NT_if_expr => Shift(yy_state_518) - NT_try_expr => Shift(yy_state_519) - NT_while_expr => Shift(yy_state_520) - NT_foreach_expr => Shift(yy_state_521) - NT_for_expr => Shift(yy_state_522) - T_LEXMATCH => Shift(yy_state_523) - NT_lexmatch_header => Shift(yy_state_529) - NT_match_header => Shift(yy_state_540) - T_MATCH => Shift(yy_state_550) - T_IF => Shift(yy_state_553) - T_TRY_EXCLAMATION => Shift(yy_state_559) - T_TRY_QUESTION => Shift(yy_state_561) - T_TRY => Shift(yy_state_563) - NT_loop_label_colon => Shift(yy_state_577) - T_POST_LABEL => Shift(yy_state_585) - T_LIDENT => Shift(yy_state_587) - T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_902) + T_BYTES_INTERP => Shift(yy_state_16) + T_INTERP => Shift(yy_state_17) + NT_non_empty_list_multiline_string_ => Shift(yy_state_18) + NT_simple_constant => Shift(yy_state_19) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + NT_tuple_expr => Shift(yy_state_27) + T_LBRACKET_BAR => Shift(yy_state_28) + T_LBRACKET => Shift(yy_state_36) + NT_constr => Shift(yy_state_47) + NT_qual_ident_simple_expr => Shift(yy_state_48) + NT_atomic_expr => Shift(yy_state_50) + NT_anony_fn => Shift(yy_state_51) + T_LBRACE => Shift(yy_state_52) + T_FN => Shift(yy_state_61) + NT_type_name => Shift(yy_state_139) + T_ASYNC => Shift(yy_state_152) + T_EXCLAMATION => Shift(yy_state_176) + T_MINUS => Shift(yy_state_191) + T_PLUS => Shift(yy_state_193) + T_UIDENT => Shift(yy_state_195) + NT_prefix_expr => Shift(yy_state_201) + NT_range_expr => Shift(yy_state_212) + NT_postfix_expr => Shift(yy_state_223) + T_EXISTS => Shift(yy_state_224) + T_FORALL => Shift(yy_state_256) + NT_infix_expr => Shift(yy_state_272) + T_UNDERSCORE => Shift(yy_state_273) + NT_qual_ident => Shift(yy_state_275) + NT_simple_expr => Shift(yy_state_276) + T_LPAREN => Shift(yy_state_281) + NT_pipe_expr => Shift(yy_state_325) + NT_arrow_fn_expr => Shift(yy_state_344) + NT_quantifier_expr => Shift(yy_state_345) + NT_simple_try_expr => Shift(yy_state_346) + NT_lexscan_expr => Shift(yy_state_347) + NT_lexmatch_expr => Shift(yy_state_348) + NT_match_expr => Shift(yy_state_349) + NT_if_expr => Shift(yy_state_350) + NT_try_expr => Shift(yy_state_351) + NT_while_expr => Shift(yy_state_352) + NT_foreach_expr => Shift(yy_state_353) + NT_for_expr => Shift(yy_state_354) + T_LEXSCAN => Shift(yy_state_355) + NT_lexscan_header => Shift(yy_state_358) + T_LEXMATCH => Shift(yy_state_391) + NT_lexmatch_header => Shift(yy_state_399) + NT_expr_statement => Shift(yy_state_443) + NT_match_header => Shift(yy_state_444) + T_MATCH => Shift(yy_state_605) + T_IF => Shift(yy_state_608) + T_TRY_EXCLAMATION => Shift(yy_state_614) + T_TRY_QUESTION => Shift(yy_state_616) + T_TRY => Shift(yy_state_618) + NT_loop_label_colon => Shift(yy_state_632) + T_POST_LABEL => Shift(yy_state_639) + NT_expr => Shift(yy_state_644) + NT_left_value => Shift(yy_state_645) + T_ELLIPSIS => Shift(yy_state_651) + T_RAISE => Shift(yy_state_652) + T_PACKAGE_NAME => Shift(yy_state_654) + T_EXTEND => Shift(yy_state_656) + T_LIDENT => Shift(yy_state_657) + NT_expr_statement_no_break_continue_return => Shift(yy_state_734) + T_RETURN => Shift(yy_state_735) + T_CONTINUE => Shift(yy_state_738) + T_BREAK => Shift(yy_state_747) + T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_1071) _ => Error } } -fn yy_state_47(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_map_expr_elem, yy_action_863) +fn yy_state_443(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(5, NT_lex_case, yy_action_787) } -fn yy_state_48(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_444(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_parameters => Shift(yy_state_49) - T_LPAREN => Shift(yy_state_143) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + T_UIDENT => Shift(yy_state_195) + NT_single_pattern_case => Shift(yy_state_445) + T_LBRACE => Shift(yy_state_448) + T_LBRACKET => Shift(yy_state_452) + T_LPAREN => Shift(yy_state_466) + NT_constr => Shift(yy_state_467) + T_EXTEND => Shift(yy_state_480) + T_LIDENT => Shift(yy_state_487) + T_UNDERSCORE => Shift(yy_state_491) + T_BYTES => Shift(yy_state_492) + T_STRING => Shift(yy_state_493) + T_MINUS => Shift(yy_state_494) + T_FLOAT => Shift(yy_state_498) + T_DOUBLE => Shift(yy_state_499) + T_BYTE => Shift(yy_state_500) + T_INT => Shift(yy_state_501) + T_CHAR => Shift(yy_state_502) + T_FALSE => Shift(yy_state_503) + T_TRUE => Shift(yy_state_504) + NT_simple_pattern => Shift(yy_state_505) + NT_type_name => Shift(yy_state_508) + T_PACKAGE_NAME => Shift(yy_state_513) + NT_range_pattern => Shift(yy_state_516) + NT_or_pattern => Shift(yy_state_519) + T_ELLIPSIS => Shift(yy_state_599) + NT_pattern => Shift(yy_state_600) + T_RBRACE => Shift(yy_state_752) + NT_non_empty_list_semis_single_pattern_case_ => Shift(yy_state_753) _ => Error } } -fn yy_state_49(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_445(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_error_annotation => Shift(yy_state_50) - T_THIN_ARROW => Shift(yy_state_51) - T_NORAISE => Shift(yy_state_78) - T_RAISE => Shift(yy_state_79) - NT_func_return_type => Shift(yy_state_118) - T_LBRACE => Reduce(0, NT_func_return_type, yy_action_862) + T_SEMI => Shift(yy_state_446) + NT_option_SEMI_ => Shift(yy_state_751) + T_RBRACE => Reduce(0, NT_option_SEMI_, yy_action_976) _ => Error } } -fn yy_state_50(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_func_return_type, yy_action_861) -} - -fn yy_state_51(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_446(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_ASYNC => Shift(yy_state_52) - T_UNDERSCORE => Shift(yy_state_57) - T_AMPER => Shift(yy_state_58) - T_PACKAGE_NAME => Shift(yy_state_60) - T_UIDENT => Shift(yy_state_67) - T_LPAREN => Shift(yy_state_71) - NT_simple_type => Shift(yy_state_75) - NT_type_ => Shift(yy_state_84) - NT_return_type => Shift(yy_state_117) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + T_UIDENT => Shift(yy_state_195) + NT_single_pattern_case => Shift(yy_state_445) + NT_non_empty_list_semis_single_pattern_case_ => Shift(yy_state_447) + T_LBRACE => Shift(yy_state_448) + T_LBRACKET => Shift(yy_state_452) + T_LPAREN => Shift(yy_state_466) + NT_constr => Shift(yy_state_467) + T_EXTEND => Shift(yy_state_480) + T_LIDENT => Shift(yy_state_487) + T_UNDERSCORE => Shift(yy_state_491) + T_BYTES => Shift(yy_state_492) + T_STRING => Shift(yy_state_493) + T_MINUS => Shift(yy_state_494) + T_FLOAT => Shift(yy_state_498) + T_DOUBLE => Shift(yy_state_499) + T_BYTE => Shift(yy_state_500) + T_INT => Shift(yy_state_501) + T_CHAR => Shift(yy_state_502) + T_FALSE => Shift(yy_state_503) + T_TRUE => Shift(yy_state_504) + NT_simple_pattern => Shift(yy_state_505) + NT_type_name => Shift(yy_state_508) + T_PACKAGE_NAME => Shift(yy_state_513) + NT_range_pattern => Shift(yy_state_516) + NT_or_pattern => Shift(yy_state_519) + T_ELLIPSIS => Shift(yy_state_599) + NT_pattern => Shift(yy_state_600) + T_RBRACE => Reduce(1, NT_option_SEMI_, yy_action_974) _ => Error } } -fn yy_state_52(_lookahead : YYSymbol) -> YYDecision { - match _lookahead { - T_LPAREN => Shift(yy_state_53) - _ => Error - } +fn yy_state_447(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_non_empty_list_semis_single_pattern_case_, yy_action_786) } -fn yy_state_53(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_448(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_ASYNC => Shift(yy_state_52) - T_RPAREN => Shift(yy_state_54) - T_UNDERSCORE => Shift(yy_state_57) - T_AMPER => Shift(yy_state_58) - T_PACKAGE_NAME => Shift(yy_state_60) - T_UIDENT => Shift(yy_state_67) - T_LPAREN => Shift(yy_state_71) - NT_simple_type => Shift(yy_state_97) - NT_type_ => Shift(yy_state_105) + T_REGEX_LITERAL => Shift(yy_state_6) + T_STRING => Shift(yy_state_7) + T_FLOAT => Shift(yy_state_8) + T_DOUBLE => Shift(yy_state_9) + T_INT => Shift(yy_state_10) + T_CHAR => Shift(yy_state_11) + T_BYTES => Shift(yy_state_12) + T_BYTE => Shift(yy_state_13) + T_FALSE => Shift(yy_state_14) + T_TRUE => Shift(yy_state_15) + NT_map_syntax_key => Shift(yy_state_449) + NT_fields_pat_single => Shift(yy_state_560) + NT_non_empty_list_commas_rev_map_elem_pat_ => Shift(yy_state_561) + T_MINUS => Shift(yy_state_568) + NT_simple_constant => Shift(yy_state_572) + NT_non_empty_list_commas_rev_fields_pat_single_ => Shift(yy_state_573) + T_EXTEND => Shift(yy_state_577) + T_LIDENT => Shift(yy_state_580) + NT_non_empty_list_commas_with_tail_map_elem_pat_ => Shift(yy_state_583) + NT_non_empty_list_commas_map_elem_pat_ => Shift(yy_state_586) + NT_non_empty_list_commas_with_tail_fields_pat_single_ => Shift(yy_state_587) + NT_non_empty_list_commas_fields_pat_single_ => Shift(yy_state_590) + NT_non_empty_map_elems_pat => Shift(yy_state_591) + NT_non_empty_fields_pat => Shift(yy_state_593) + T_DOTDOT => Shift(yy_state_595) + T_RBRACE => Shift(yy_state_598) _ => Error } } -fn yy_state_54(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_449(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_THIN_ARROW => Shift(yy_state_55) + NT_option_QUESTION_ => Shift(yy_state_450) + T_QUESTION => Shift(yy_state_559) + T_COLON => Reduce(0, NT_option_QUESTION_, yy_action_785) _ => Error } } -fn yy_state_55(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_450(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_ASYNC => Shift(yy_state_52) - NT_return_type => Shift(yy_state_56) - T_UNDERSCORE => Shift(yy_state_57) - T_AMPER => Shift(yy_state_58) - T_PACKAGE_NAME => Shift(yy_state_60) - T_UIDENT => Shift(yy_state_67) - T_LPAREN => Shift(yy_state_71) - NT_simple_type => Shift(yy_state_75) - NT_type_ => Shift(yy_state_84) + T_COLON => Shift(yy_state_451) _ => Error } } -fn yy_state_56(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(5, NT_type_, yy_action_860) -} - -fn yy_state_57(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_simple_type, yy_action_859) -} - -fn yy_state_58(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_451(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_PACKAGE_NAME => Shift(yy_state_21) - T_UIDENT => Shift(yy_state_24) - NT_qual_ident_ty => Shift(yy_state_59) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + T_UIDENT => Shift(yy_state_195) + T_LBRACE => Shift(yy_state_448) + T_LBRACKET => Shift(yy_state_452) + T_LPAREN => Shift(yy_state_466) + NT_constr => Shift(yy_state_467) + T_EXTEND => Shift(yy_state_480) + T_LIDENT => Shift(yy_state_487) + T_UNDERSCORE => Shift(yy_state_491) + T_BYTES => Shift(yy_state_492) + T_STRING => Shift(yy_state_493) + T_MINUS => Shift(yy_state_494) + T_FLOAT => Shift(yy_state_498) + T_DOUBLE => Shift(yy_state_499) + T_BYTE => Shift(yy_state_500) + T_INT => Shift(yy_state_501) + T_CHAR => Shift(yy_state_502) + T_FALSE => Shift(yy_state_503) + T_TRUE => Shift(yy_state_504) + NT_simple_pattern => Shift(yy_state_505) + NT_type_name => Shift(yy_state_508) + T_PACKAGE_NAME => Shift(yy_state_513) + NT_range_pattern => Shift(yy_state_516) + NT_or_pattern => Shift(yy_state_519) + NT_pattern => Shift(yy_state_558) _ => Error } } -fn yy_state_59(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(2, NT_simple_type, yy_action_858) -} - -fn yy_state_60(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_452(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_DOT_UIDENT => Shift(yy_state_61) - T_DOT_LIDENT => Shift(yy_state_101) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + T_UIDENT => Shift(yy_state_195) + T_LBRACE => Shift(yy_state_448) + T_LBRACKET => Shift(yy_state_452) + NT_dotdot_binder => Shift(yy_state_453) + T_LPAREN => Shift(yy_state_466) + NT_constr => Shift(yy_state_467) + T_EXTEND => Shift(yy_state_480) + T_LIDENT => Shift(yy_state_487) + T_UNDERSCORE => Shift(yy_state_491) + T_BYTES => Shift(yy_state_492) + T_STRING => Shift(yy_state_493) + T_MINUS => Shift(yy_state_494) + T_FLOAT => Shift(yy_state_498) + T_DOUBLE => Shift(yy_state_499) + T_BYTE => Shift(yy_state_500) + T_INT => Shift(yy_state_501) + T_CHAR => Shift(yy_state_502) + T_FALSE => Shift(yy_state_503) + T_TRUE => Shift(yy_state_504) + NT_simple_pattern => Shift(yy_state_505) + NT_type_name => Shift(yy_state_508) + T_PACKAGE_NAME => Shift(yy_state_513) + NT_range_pattern => Shift(yy_state_516) + NT_or_pattern => Shift(yy_state_519) + NT_pattern => Shift(yy_state_544) + NT_array_sub_pattern => Shift(yy_state_546) + T_DOTDOT => Shift(yy_state_549) + NT_array_sub_patterns => Shift(yy_state_556) + T_RBRACKET => Reduce(0, NT_array_sub_patterns, yy_action_784) _ => Error } } -fn yy_state_61(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_453(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACKET => Shift(yy_state_62) - T_EOF | T_DERIVE | T_WITH | T_RAISE | T_EQUAL | T_RPAREN | T_COMMA | T_QUESTION | T_SEMI | T_RBRACKET | T_LBRACE | T_RBRACE | T_NORAISE | T_WHERE => Reduce(2, NT_simple_type, yy_action_856) + T_COMMA => Shift(yy_state_454) + T_RBRACKET => Reduce(1, NT_array_sub_patterns, yy_action_783) _ => Error } } -fn yy_state_62(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_454(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_ASYNC => Shift(yy_state_52) - T_UNDERSCORE => Shift(yy_state_57) - T_AMPER => Shift(yy_state_58) - T_PACKAGE_NAME => Shift(yy_state_60) - NT_type_ => Shift(yy_state_63) - NT_non_empty_list_commas_rev_type__ => Shift(yy_state_64) - T_UIDENT => Shift(yy_state_67) - T_LPAREN => Shift(yy_state_71) - NT_simple_type => Shift(yy_state_97) - NT_non_empty_list_commas_type__ => Shift(yy_state_99) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + T_UIDENT => Shift(yy_state_195) + T_LBRACE => Shift(yy_state_448) + T_LBRACKET => Shift(yy_state_452) + NT_array_sub_pattern => Shift(yy_state_455) + NT_non_empty_list_commas_rev_array_sub_pattern_ => Shift(yy_state_456) + T_DOTDOT => Shift(yy_state_460) + T_LPAREN => Shift(yy_state_466) + NT_constr => Shift(yy_state_467) + T_EXTEND => Shift(yy_state_480) + T_LIDENT => Shift(yy_state_487) + T_UNDERSCORE => Shift(yy_state_491) + T_BYTES => Shift(yy_state_492) + T_STRING => Shift(yy_state_493) + T_MINUS => Shift(yy_state_494) + T_FLOAT => Shift(yy_state_498) + T_DOUBLE => Shift(yy_state_499) + T_BYTE => Shift(yy_state_500) + T_INT => Shift(yy_state_501) + T_CHAR => Shift(yy_state_502) + T_FALSE => Shift(yy_state_503) + T_TRUE => Shift(yy_state_504) + NT_simple_pattern => Shift(yy_state_505) + NT_type_name => Shift(yy_state_508) + T_PACKAGE_NAME => Shift(yy_state_513) + NT_range_pattern => Shift(yy_state_516) + NT_or_pattern => Shift(yy_state_519) + NT_pattern => Shift(yy_state_544) + NT_non_empty_list_commas_array_sub_pattern_ => Shift(yy_state_545) + T_RBRACKET => Reduce(2, NT_array_sub_patterns, yy_action_782) _ => Error } } -fn yy_state_63(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_non_empty_list_commas_rev_type__, yy_action_855) -} - -fn yy_state_64(_lookahead : YYSymbol) -> YYDecision { - match _lookahead { - T_COMMA => Shift(yy_state_65) - NT_option_COMMA_ => Shift(yy_state_98) - T_RPAREN | T_RBRACKET => Reduce(0, NT_option_COMMA_, yy_action_876) - _ => Error - } +fn yy_state_455(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_non_empty_list_commas_rev_array_sub_pattern_, yy_action_781) } -fn yy_state_65(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_456(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_ASYNC => Shift(yy_state_52) - T_UNDERSCORE => Shift(yy_state_57) - T_AMPER => Shift(yy_state_58) - T_PACKAGE_NAME => Shift(yy_state_60) - NT_type_ => Shift(yy_state_66) - T_UIDENT => Shift(yy_state_67) - T_LPAREN => Shift(yy_state_71) - NT_simple_type => Shift(yy_state_97) - T_RPAREN | T_RBRACKET => Reduce(1, NT_option_COMMA_, yy_action_874) + NT_option_COMMA_ => Shift(yy_state_457) + T_COMMA => Shift(yy_state_458) + T_RBRACKET => Reduce(0, NT_option_COMMA_, yy_action_1044) _ => Error } } -fn yy_state_66(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_non_empty_list_commas_rev_type__, yy_action_854) +fn yy_state_457(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(2, NT_non_empty_list_commas_array_sub_pattern_, yy_action_780) } -fn yy_state_67(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_458(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACKET => Shift(yy_state_68) - T_EOF | T_DERIVE | T_WITH | T_RAISE | T_EQUAL | T_RPAREN | T_COMMA | T_QUESTION | T_SEMI | T_RBRACKET | T_LBRACE | T_RBRACE | T_NORAISE | T_WHERE => Reduce(1, NT_simple_type, yy_action_853) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + T_UIDENT => Shift(yy_state_195) + T_LBRACE => Shift(yy_state_448) + T_LBRACKET => Shift(yy_state_452) + NT_array_sub_pattern => Shift(yy_state_459) + T_DOTDOT => Shift(yy_state_460) + T_LPAREN => Shift(yy_state_466) + NT_constr => Shift(yy_state_467) + T_EXTEND => Shift(yy_state_480) + T_LIDENT => Shift(yy_state_487) + T_UNDERSCORE => Shift(yy_state_491) + T_BYTES => Shift(yy_state_492) + T_STRING => Shift(yy_state_493) + T_MINUS => Shift(yy_state_494) + T_FLOAT => Shift(yy_state_498) + T_DOUBLE => Shift(yy_state_499) + T_BYTE => Shift(yy_state_500) + T_INT => Shift(yy_state_501) + T_CHAR => Shift(yy_state_502) + T_FALSE => Shift(yy_state_503) + T_TRUE => Shift(yy_state_504) + NT_simple_pattern => Shift(yy_state_505) + NT_type_name => Shift(yy_state_508) + T_PACKAGE_NAME => Shift(yy_state_513) + NT_range_pattern => Shift(yy_state_516) + NT_or_pattern => Shift(yy_state_519) + NT_pattern => Shift(yy_state_544) + T_RBRACKET => Reduce(1, NT_option_COMMA_, yy_action_1042) _ => Error } } -fn yy_state_68(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_459(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_non_empty_list_commas_rev_array_sub_pattern_, yy_action_779) +} + +fn yy_state_460(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_ASYNC => Shift(yy_state_52) - T_UNDERSCORE => Shift(yy_state_57) - T_AMPER => Shift(yy_state_58) - T_PACKAGE_NAME => Shift(yy_state_60) - NT_type_ => Shift(yy_state_63) - NT_non_empty_list_commas_rev_type__ => Shift(yy_state_64) - T_UIDENT => Shift(yy_state_67) - NT_non_empty_list_commas_type__ => Shift(yy_state_69) - T_LPAREN => Shift(yy_state_71) - NT_simple_type => Shift(yy_state_97) + T_PACKAGE_NAME => Shift(yy_state_461) + T_UIDENT => Shift(yy_state_463) + T_BYTES => Shift(yy_state_464) + T_STRING => Shift(yy_state_465) _ => Error } } -fn yy_state_69(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_461(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RBRACKET => Shift(yy_state_70) + T_DOT_UIDENT => Shift(yy_state_462) _ => Error } } -fn yy_state_70(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(4, NT_simple_type, yy_action_849) +fn yy_state_462(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_array_sub_pattern, yy_action_778) } -fn yy_state_71(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_463(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(2, NT_array_sub_pattern, yy_action_777) +} + +fn yy_state_464(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(2, NT_array_sub_pattern, yy_action_776) +} + +fn yy_state_465(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(2, NT_array_sub_pattern, yy_action_775) +} + +fn yy_state_466(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_ASYNC => Shift(yy_state_52) - T_UNDERSCORE => Shift(yy_state_57) - T_AMPER => Shift(yy_state_58) - T_PACKAGE_NAME => Shift(yy_state_60) - T_UIDENT => Shift(yy_state_67) - T_LPAREN => Shift(yy_state_71) - T_RPAREN => Shift(yy_state_72) - NT_type_ => Shift(yy_state_85) - NT_simple_type => Shift(yy_state_97) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + T_UIDENT => Shift(yy_state_195) + T_LBRACE => Shift(yy_state_448) + T_LBRACKET => Shift(yy_state_452) + T_LPAREN => Shift(yy_state_466) + NT_constr => Shift(yy_state_467) + T_EXTEND => Shift(yy_state_480) + T_LIDENT => Shift(yy_state_487) + T_UNDERSCORE => Shift(yy_state_491) + T_BYTES => Shift(yy_state_492) + T_STRING => Shift(yy_state_493) + T_MINUS => Shift(yy_state_494) + T_FLOAT => Shift(yy_state_498) + T_DOUBLE => Shift(yy_state_499) + T_BYTE => Shift(yy_state_500) + T_INT => Shift(yy_state_501) + T_CHAR => Shift(yy_state_502) + T_FALSE => Shift(yy_state_503) + T_TRUE => Shift(yy_state_504) + NT_simple_pattern => Shift(yy_state_505) + NT_type_name => Shift(yy_state_508) + T_PACKAGE_NAME => Shift(yy_state_513) + NT_range_pattern => Shift(yy_state_516) + NT_or_pattern => Shift(yy_state_519) + NT_pattern => Shift(yy_state_531) _ => Error } } -fn yy_state_72(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_467(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_THIN_ARROW => Shift(yy_state_73) + T_LPAREN => Shift(yy_state_468) + NT_option_delimited_LPAREN_constr_pat_arguments_RPAREN__ => Shift(yy_state_530) + T_INFIX1 | T_INFIX2 | T_INFIX3 | T_INFIX4 | T_EOF | T_WITH | T_CATCH | T_EQUAL | T_RPAREN | T_COMMA | T_MINUS | T_COLON | T_SEMI | T_PLUS | T_RBRACKET | T_BAR_RBRACKET | T_BAR | T_LBRACE | T_RBRACE | T_AMPERAMPER | T_AMPER | T_CARET | T_BARBAR | T_AS | T_PIPE | T_PIPE_LEFT | T_ELSE | T_IF | T_FAT_ARROW | T_RANGE_INCLUSIVE | T_RANGE_EXCLUSIVE | T_AND | T_IMPLIES => Reduce(0, NT_option_delimited_LPAREN_constr_pat_arguments_RPAREN__, yy_action_774) _ => Error } } -fn yy_state_73(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_468(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_ASYNC => Shift(yy_state_52) - T_UNDERSCORE => Shift(yy_state_57) - T_AMPER => Shift(yy_state_58) - T_PACKAGE_NAME => Shift(yy_state_60) - T_UIDENT => Shift(yy_state_67) - T_LPAREN => Shift(yy_state_71) - NT_return_type => Shift(yy_state_74) - NT_simple_type => Shift(yy_state_75) - NT_type_ => Shift(yy_state_84) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + T_UIDENT => Shift(yy_state_195) + T_LBRACE => Shift(yy_state_448) + T_LBRACKET => Shift(yy_state_452) + T_LPAREN => Shift(yy_state_466) + NT_constr => Shift(yy_state_467) + NT_constr_pat_arguments => Shift(yy_state_469) + T_POST_LABEL => Shift(yy_state_471) + T_DOTDOT => Shift(yy_state_472) + NT_constr_pat_argument => Shift(yy_state_475) + T_EXTEND => Shift(yy_state_478) + T_LIDENT => Shift(yy_state_485) + T_UNDERSCORE => Shift(yy_state_491) + T_BYTES => Shift(yy_state_492) + T_STRING => Shift(yy_state_493) + T_MINUS => Shift(yy_state_494) + T_FLOAT => Shift(yy_state_498) + T_DOUBLE => Shift(yy_state_499) + T_BYTE => Shift(yy_state_500) + T_INT => Shift(yy_state_501) + T_CHAR => Shift(yy_state_502) + T_FALSE => Shift(yy_state_503) + T_TRUE => Shift(yy_state_504) + NT_simple_pattern => Shift(yy_state_505) + NT_type_name => Shift(yy_state_508) + T_PACKAGE_NAME => Shift(yy_state_513) + NT_range_pattern => Shift(yy_state_516) + NT_or_pattern => Shift(yy_state_519) + NT_pattern => Shift(yy_state_520) _ => Error } } -fn yy_state_74(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(4, NT_type_, yy_action_848) -} - -fn yy_state_75(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_469(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_QUESTION => Shift(yy_state_76) - NT_error_annotation => Shift(yy_state_77) - T_NORAISE => Shift(yy_state_78) - T_RAISE => Shift(yy_state_79) - T_EOF | T_DERIVE | T_WITH | T_EQUAL | T_RPAREN | T_COMMA | T_SEMI | T_RBRACKET | T_LBRACE | T_RBRACE | T_WHERE => Reduce(1, NT_type_, yy_action_847) + T_RPAREN => Shift(yy_state_470) _ => Error } } -fn yy_state_76(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(2, NT_simple_type, yy_action_846) -} - -fn yy_state_77(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(2, NT_return_type, yy_action_845) +fn yy_state_470(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_option_delimited_LPAREN_constr_pat_arguments_RPAREN__, yy_action_772) } -fn yy_state_78(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_error_annotation, yy_action_844) +fn yy_state_471(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_constr_pat_argument, yy_action_771) } -fn yy_state_79(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_472(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_PACKAGE_NAME => Shift(yy_state_21) - T_UIDENT => Shift(yy_state_24) - T_UNDERSCORE => Shift(yy_state_80) - NT_qual_ident_ty => Shift(yy_state_81) - T_QUESTION => Shift(yy_state_82) - NT_error_type => Shift(yy_state_83) - T_EOF | T_DERIVE | T_WITH | T_EQUAL | T_RPAREN | T_COMMA | T_SEMI | T_RBRACKET | T_LBRACE | T_RBRACE | T_WHERE => Reduce(1, NT_error_annotation, yy_action_843) + T_COMMA => Shift(yy_state_473) + NT_option_COMMA_ => Shift(yy_state_474) + T_RPAREN => Reduce(0, NT_option_COMMA_, yy_action_1044) _ => Error } } -fn yy_state_80(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_error_type, yy_action_842) +fn yy_state_473(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_option_COMMA_, yy_action_1042) } -fn yy_state_81(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_error_type, yy_action_841) +fn yy_state_474(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(2, NT_constr_pat_arguments, yy_action_770) } -fn yy_state_82(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(2, NT_error_annotation, yy_action_840) +fn yy_state_475(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_COMMA => Shift(yy_state_476) + NT_option_COMMA_ => Shift(yy_state_529) + T_RPAREN => Reduce(0, NT_option_COMMA_, yy_action_1044) + _ => Error + } } -fn yy_state_83(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(2, NT_error_annotation, yy_action_839) +fn yy_state_476(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + T_UIDENT => Shift(yy_state_195) + T_LBRACE => Shift(yy_state_448) + T_LBRACKET => Shift(yy_state_452) + T_LPAREN => Shift(yy_state_466) + NT_constr => Shift(yy_state_467) + T_POST_LABEL => Shift(yy_state_471) + T_DOTDOT => Shift(yy_state_472) + NT_constr_pat_argument => Shift(yy_state_475) + NT_constr_pat_arguments => Shift(yy_state_477) + T_EXTEND => Shift(yy_state_478) + T_LIDENT => Shift(yy_state_485) + T_UNDERSCORE => Shift(yy_state_491) + T_BYTES => Shift(yy_state_492) + T_STRING => Shift(yy_state_493) + T_MINUS => Shift(yy_state_494) + T_FLOAT => Shift(yy_state_498) + T_DOUBLE => Shift(yy_state_499) + T_BYTE => Shift(yy_state_500) + T_INT => Shift(yy_state_501) + T_CHAR => Shift(yy_state_502) + T_FALSE => Shift(yy_state_503) + T_TRUE => Shift(yy_state_504) + NT_simple_pattern => Shift(yy_state_505) + NT_type_name => Shift(yy_state_508) + T_PACKAGE_NAME => Shift(yy_state_513) + NT_range_pattern => Shift(yy_state_516) + NT_or_pattern => Shift(yy_state_519) + NT_pattern => Shift(yy_state_520) + T_RPAREN => Reduce(1, NT_option_COMMA_, yy_action_1042) + _ => Error + } } -fn yy_state_84(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_return_type, yy_action_838) +fn yy_state_477(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_constr_pat_arguments, yy_action_769) } -fn yy_state_85(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_478(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RPAREN => Shift(yy_state_86) - T_COMMA => Shift(yy_state_89) + T_EQUAL => Shift(yy_state_479) + T_LPAREN => Shift(yy_state_481) + T_RPAREN | T_COMMA | T_BAR | T_AS | T_RANGE_INCLUSIVE | T_RANGE_EXCLUSIVE => Reduce(1, NT_simple_pattern, yy_action_768) _ => Error } } -fn yy_state_86(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_479(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_THIN_ARROW => Shift(yy_state_87) - T_EOF | T_DERIVE | T_WITH | T_RAISE | T_EQUAL | T_RPAREN | T_COMMA | T_QUESTION | T_SEMI | T_RBRACKET | T_LBRACE | T_RBRACE | T_NORAISE | T_WHERE => Reduce(3, NT_simple_type, yy_action_837) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + T_UIDENT => Shift(yy_state_195) + T_LBRACE => Shift(yy_state_448) + T_LBRACKET => Shift(yy_state_452) + T_LPAREN => Shift(yy_state_466) + NT_constr => Shift(yy_state_467) + T_EXTEND => Shift(yy_state_480) + T_LIDENT => Shift(yy_state_487) + T_UNDERSCORE => Shift(yy_state_491) + T_BYTES => Shift(yy_state_492) + T_STRING => Shift(yy_state_493) + T_MINUS => Shift(yy_state_494) + T_FLOAT => Shift(yy_state_498) + T_DOUBLE => Shift(yy_state_499) + T_BYTE => Shift(yy_state_500) + T_INT => Shift(yy_state_501) + T_CHAR => Shift(yy_state_502) + T_FALSE => Shift(yy_state_503) + T_TRUE => Shift(yy_state_504) + NT_simple_pattern => Shift(yy_state_505) + NT_type_name => Shift(yy_state_508) + T_PACKAGE_NAME => Shift(yy_state_513) + NT_range_pattern => Shift(yy_state_516) + NT_or_pattern => Shift(yy_state_519) + NT_pattern => Shift(yy_state_528) _ => Error } } -fn yy_state_87(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_480(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_ASYNC => Shift(yy_state_52) - T_UNDERSCORE => Shift(yy_state_57) - T_AMPER => Shift(yy_state_58) - T_PACKAGE_NAME => Shift(yy_state_60) - T_UIDENT => Shift(yy_state_67) - T_LPAREN => Shift(yy_state_71) - NT_simple_type => Shift(yy_state_75) - NT_type_ => Shift(yy_state_84) - NT_return_type => Shift(yy_state_88) + T_LPAREN => Shift(yy_state_481) + T_INFIX1 | T_INFIX2 | T_INFIX3 | T_INFIX4 | T_EOF | T_WITH | T_CATCH | T_EQUAL | T_RPAREN | T_COMMA | T_MINUS | T_COLON | T_SEMI | T_PLUS | T_RBRACKET | T_BAR_RBRACKET | T_BAR | T_LBRACE | T_RBRACE | T_AMPERAMPER | T_AMPER | T_CARET | T_BARBAR | T_AS | T_PIPE | T_PIPE_LEFT | T_ELSE | T_IF | T_FAT_ARROW | T_RANGE_INCLUSIVE | T_RANGE_EXCLUSIVE | T_AND | T_IMPLIES => Reduce(1, NT_simple_pattern, yy_action_768) _ => Error } } -fn yy_state_88(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(5, NT_type_, yy_action_836) -} - -fn yy_state_89(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_481(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_ASYNC => Shift(yy_state_52) - T_UNDERSCORE => Shift(yy_state_57) - T_AMPER => Shift(yy_state_58) - T_PACKAGE_NAME => Shift(yy_state_60) - NT_type_ => Shift(yy_state_63) - NT_non_empty_list_commas_rev_type__ => Shift(yy_state_64) - T_UIDENT => Shift(yy_state_67) - T_LPAREN => Shift(yy_state_71) - T_RPAREN => Shift(yy_state_90) - NT_non_empty_list_commas_type__ => Shift(yy_state_93) - NT_simple_type => Shift(yy_state_97) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + T_UIDENT => Shift(yy_state_195) + T_LBRACE => Shift(yy_state_448) + T_LBRACKET => Shift(yy_state_452) + T_LPAREN => Shift(yy_state_466) + NT_constr => Shift(yy_state_467) + T_POST_LABEL => Shift(yy_state_471) + T_EXTEND => Shift(yy_state_478) + NT_constr_pat_argument => Shift(yy_state_482) + T_LIDENT => Shift(yy_state_485) + T_UNDERSCORE => Shift(yy_state_491) + T_BYTES => Shift(yy_state_492) + T_STRING => Shift(yy_state_493) + T_MINUS => Shift(yy_state_494) + T_FLOAT => Shift(yy_state_498) + T_DOUBLE => Shift(yy_state_499) + T_BYTE => Shift(yy_state_500) + T_INT => Shift(yy_state_501) + T_CHAR => Shift(yy_state_502) + T_FALSE => Shift(yy_state_503) + T_TRUE => Shift(yy_state_504) + NT_simple_pattern => Shift(yy_state_505) + NT_type_name => Shift(yy_state_508) + T_PACKAGE_NAME => Shift(yy_state_513) + NT_range_pattern => Shift(yy_state_516) + NT_or_pattern => Shift(yy_state_519) + NT_pattern => Shift(yy_state_520) + NT_constr_pat_arguments_no_open => Shift(yy_state_526) _ => Error } } -fn yy_state_90(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_482(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_THIN_ARROW => Shift(yy_state_91) + T_COMMA => Shift(yy_state_483) + NT_option_COMMA_ => Shift(yy_state_525) + T_RPAREN => Reduce(0, NT_option_COMMA_, yy_action_1044) _ => Error } } -fn yy_state_91(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_483(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_ASYNC => Shift(yy_state_52) - T_UNDERSCORE => Shift(yy_state_57) - T_AMPER => Shift(yy_state_58) - T_PACKAGE_NAME => Shift(yy_state_60) - T_UIDENT => Shift(yy_state_67) - T_LPAREN => Shift(yy_state_71) - NT_simple_type => Shift(yy_state_75) - NT_type_ => Shift(yy_state_84) - NT_return_type => Shift(yy_state_92) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + T_UIDENT => Shift(yy_state_195) + T_LBRACE => Shift(yy_state_448) + T_LBRACKET => Shift(yy_state_452) + T_LPAREN => Shift(yy_state_466) + NT_constr => Shift(yy_state_467) + T_POST_LABEL => Shift(yy_state_471) + T_EXTEND => Shift(yy_state_478) + NT_constr_pat_argument => Shift(yy_state_482) + NT_constr_pat_arguments_no_open => Shift(yy_state_484) + T_LIDENT => Shift(yy_state_485) + T_UNDERSCORE => Shift(yy_state_491) + T_BYTES => Shift(yy_state_492) + T_STRING => Shift(yy_state_493) + T_MINUS => Shift(yy_state_494) + T_FLOAT => Shift(yy_state_498) + T_DOUBLE => Shift(yy_state_499) + T_BYTE => Shift(yy_state_500) + T_INT => Shift(yy_state_501) + T_CHAR => Shift(yy_state_502) + T_FALSE => Shift(yy_state_503) + T_TRUE => Shift(yy_state_504) + NT_simple_pattern => Shift(yy_state_505) + NT_type_name => Shift(yy_state_508) + T_PACKAGE_NAME => Shift(yy_state_513) + NT_range_pattern => Shift(yy_state_516) + NT_or_pattern => Shift(yy_state_519) + NT_pattern => Shift(yy_state_520) + T_RPAREN => Reduce(1, NT_option_COMMA_, yy_action_1042) _ => Error } } -fn yy_state_92(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(6, NT_type_, yy_action_835) +fn yy_state_484(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_constr_pat_arguments_no_open, yy_action_767) } -fn yy_state_93(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_485(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RPAREN => Shift(yy_state_94) + T_EQUAL => Shift(yy_state_486) + T_LPAREN => Shift(yy_state_488) + T_RPAREN | T_COMMA | T_BAR | T_AS | T_RANGE_INCLUSIVE | T_RANGE_EXCLUSIVE => Reduce(1, NT_simple_pattern, yy_action_766) _ => Error } } -fn yy_state_94(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_486(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_THIN_ARROW => Shift(yy_state_95) - T_EOF | T_DERIVE | T_WITH | T_RAISE | T_EQUAL | T_RPAREN | T_COMMA | T_QUESTION | T_SEMI | T_RBRACKET | T_LBRACE | T_RBRACE | T_NORAISE | T_WHERE => Reduce(5, NT_simple_type, yy_action_834) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + T_UIDENT => Shift(yy_state_195) + T_LBRACE => Shift(yy_state_448) + T_LBRACKET => Shift(yy_state_452) + T_LPAREN => Shift(yy_state_466) + NT_constr => Shift(yy_state_467) + T_EXTEND => Shift(yy_state_480) + T_LIDENT => Shift(yy_state_487) + T_UNDERSCORE => Shift(yy_state_491) + T_BYTES => Shift(yy_state_492) + T_STRING => Shift(yy_state_493) + T_MINUS => Shift(yy_state_494) + T_FLOAT => Shift(yy_state_498) + T_DOUBLE => Shift(yy_state_499) + T_BYTE => Shift(yy_state_500) + T_INT => Shift(yy_state_501) + T_CHAR => Shift(yy_state_502) + T_FALSE => Shift(yy_state_503) + T_TRUE => Shift(yy_state_504) + NT_simple_pattern => Shift(yy_state_505) + NT_type_name => Shift(yy_state_508) + T_PACKAGE_NAME => Shift(yy_state_513) + NT_range_pattern => Shift(yy_state_516) + NT_or_pattern => Shift(yy_state_519) + NT_pattern => Shift(yy_state_524) _ => Error } } -fn yy_state_95(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_487(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_ASYNC => Shift(yy_state_52) - T_UNDERSCORE => Shift(yy_state_57) - T_AMPER => Shift(yy_state_58) - T_PACKAGE_NAME => Shift(yy_state_60) - T_UIDENT => Shift(yy_state_67) - T_LPAREN => Shift(yy_state_71) - NT_simple_type => Shift(yy_state_75) - NT_type_ => Shift(yy_state_84) - NT_return_type => Shift(yy_state_96) + T_LPAREN => Shift(yy_state_488) + T_INFIX1 | T_INFIX2 | T_INFIX3 | T_INFIX4 | T_EOF | T_WITH | T_CATCH | T_EQUAL | T_RPAREN | T_COMMA | T_MINUS | T_COLON | T_SEMI | T_PLUS | T_RBRACKET | T_BAR_RBRACKET | T_BAR | T_LBRACE | T_RBRACE | T_AMPERAMPER | T_AMPER | T_CARET | T_BARBAR | T_AS | T_PIPE | T_PIPE_LEFT | T_ELSE | T_IF | T_FAT_ARROW | T_RANGE_INCLUSIVE | T_RANGE_EXCLUSIVE | T_AND | T_IMPLIES => Reduce(1, NT_simple_pattern, yy_action_766) _ => Error } } -fn yy_state_96(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(7, NT_type_, yy_action_833) +fn yy_state_488(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + T_UIDENT => Shift(yy_state_195) + T_LBRACE => Shift(yy_state_448) + T_LBRACKET => Shift(yy_state_452) + T_LPAREN => Shift(yy_state_466) + NT_constr => Shift(yy_state_467) + T_POST_LABEL => Shift(yy_state_471) + T_EXTEND => Shift(yy_state_478) + NT_constr_pat_argument => Shift(yy_state_482) + T_LIDENT => Shift(yy_state_485) + NT_constr_pat_arguments_no_open => Shift(yy_state_489) + T_UNDERSCORE => Shift(yy_state_491) + T_BYTES => Shift(yy_state_492) + T_STRING => Shift(yy_state_493) + T_MINUS => Shift(yy_state_494) + T_FLOAT => Shift(yy_state_498) + T_DOUBLE => Shift(yy_state_499) + T_BYTE => Shift(yy_state_500) + T_INT => Shift(yy_state_501) + T_CHAR => Shift(yy_state_502) + T_FALSE => Shift(yy_state_503) + T_TRUE => Shift(yy_state_504) + NT_simple_pattern => Shift(yy_state_505) + NT_type_name => Shift(yy_state_508) + T_PACKAGE_NAME => Shift(yy_state_513) + NT_range_pattern => Shift(yy_state_516) + NT_or_pattern => Shift(yy_state_519) + NT_pattern => Shift(yy_state_520) + _ => Error + } } -fn yy_state_97(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_489(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_QUESTION => Shift(yy_state_76) - T_EOF | T_DERIVE | T_WITH | T_EQUAL | T_RPAREN | T_COMMA | T_SEMI | T_RBRACKET | T_RBRACE => Reduce(1, NT_type_, yy_action_847) + T_RPAREN => Shift(yy_state_490) _ => Error } } -fn yy_state_98(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(2, NT_non_empty_list_commas_type__, yy_action_832) +fn yy_state_490(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(4, NT_simple_pattern, yy_action_765) } -fn yy_state_99(_lookahead : YYSymbol) -> YYDecision { - match _lookahead { - T_RBRACKET => Shift(yy_state_100) - _ => Error - } +fn yy_state_491(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_simple_pattern, yy_action_764) } -fn yy_state_100(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(5, NT_simple_type, yy_action_830) +fn yy_state_492(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_simple_pattern, yy_action_763) } -fn yy_state_101(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_493(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_simple_pattern, yy_action_762) +} + +fn yy_state_494(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACKET => Shift(yy_state_102) - T_EOF | T_DERIVE | T_WITH | T_RAISE | T_EQUAL | T_RPAREN | T_COMMA | T_QUESTION | T_SEMI | T_RBRACKET | T_LBRACE | T_RBRACE | T_NORAISE | T_WHERE => Reduce(2, NT_simple_type, yy_action_828) + T_FLOAT => Shift(yy_state_495) + T_DOUBLE => Shift(yy_state_496) + T_INT => Shift(yy_state_497) _ => Error } } -fn yy_state_102(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_495(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(2, NT_simple_pattern, yy_action_761) +} + +fn yy_state_496(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(2, NT_simple_pattern, yy_action_760) +} + +fn yy_state_497(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(2, NT_simple_pattern, yy_action_759) +} + +fn yy_state_498(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_simple_pattern, yy_action_758) +} + +fn yy_state_499(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_simple_pattern, yy_action_757) +} + +fn yy_state_500(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_simple_pattern, yy_action_756) +} + +fn yy_state_501(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_simple_pattern, yy_action_755) +} + +fn yy_state_502(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_simple_pattern, yy_action_754) +} + +fn yy_state_503(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_simple_pattern, yy_action_753) +} + +fn yy_state_504(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_simple_pattern, yy_action_752) +} + +fn yy_state_505(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_ASYNC => Shift(yy_state_52) - T_UNDERSCORE => Shift(yy_state_57) - T_AMPER => Shift(yy_state_58) - T_PACKAGE_NAME => Shift(yy_state_60) - NT_type_ => Shift(yy_state_63) - NT_non_empty_list_commas_rev_type__ => Shift(yy_state_64) - T_UIDENT => Shift(yy_state_67) - T_LPAREN => Shift(yy_state_71) - NT_simple_type => Shift(yy_state_97) - NT_non_empty_list_commas_type__ => Shift(yy_state_103) + T_RANGE_INCLUSIVE => Shift(yy_state_506) + T_RANGE_EXCLUSIVE => Shift(yy_state_514) + T_INFIX1 | T_INFIX2 | T_INFIX3 | T_INFIX4 | T_EOF | T_WITH | T_CATCH | T_EQUAL | T_RPAREN | T_COMMA | T_MINUS | T_COLON | T_SEMI | T_PLUS | T_RBRACKET | T_BAR_RBRACKET | T_BAR | T_LBRACE | T_RBRACE | T_AMPERAMPER | T_AMPER | T_CARET | T_BARBAR | T_AS | T_PIPE | T_PIPE_LEFT | T_ELSE | T_IF | T_FAT_ARROW | T_AND | T_IMPLIES => Reduce(1, NT_range_pattern, yy_action_751) _ => Error } } -fn yy_state_103(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_506(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RBRACKET => Shift(yy_state_104) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + T_UIDENT => Shift(yy_state_195) + T_LBRACE => Shift(yy_state_448) + T_LBRACKET => Shift(yy_state_452) + T_LPAREN => Shift(yy_state_466) + NT_constr => Shift(yy_state_467) + T_EXTEND => Shift(yy_state_480) + T_LIDENT => Shift(yy_state_487) + T_UNDERSCORE => Shift(yy_state_491) + T_BYTES => Shift(yy_state_492) + T_STRING => Shift(yy_state_493) + T_MINUS => Shift(yy_state_494) + T_FLOAT => Shift(yy_state_498) + T_DOUBLE => Shift(yy_state_499) + T_BYTE => Shift(yy_state_500) + T_INT => Shift(yy_state_501) + T_CHAR => Shift(yy_state_502) + T_FALSE => Shift(yy_state_503) + T_TRUE => Shift(yy_state_504) + NT_simple_pattern => Shift(yy_state_507) + NT_type_name => Shift(yy_state_508) + T_PACKAGE_NAME => Shift(yy_state_513) _ => Error } } -fn yy_state_104(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(5, NT_simple_type, yy_action_825) +fn yy_state_507(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_range_pattern, yy_action_750) } -fn yy_state_105(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_508(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RPAREN => Shift(yy_state_106) - T_COMMA => Shift(yy_state_109) + T_COLONCOLON => Shift(yy_state_509) _ => Error } } -fn yy_state_106(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_509(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_THIN_ARROW => Shift(yy_state_107) + T_PACKAGE_NAME => Shift(yy_state_510) + T_UIDENT => Shift(yy_state_512) _ => Error } } -fn yy_state_107(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_510(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_ASYNC => Shift(yy_state_52) - T_UNDERSCORE => Shift(yy_state_57) - T_AMPER => Shift(yy_state_58) - T_PACKAGE_NAME => Shift(yy_state_60) - T_UIDENT => Shift(yy_state_67) - T_LPAREN => Shift(yy_state_71) - NT_simple_type => Shift(yy_state_75) - NT_type_ => Shift(yy_state_84) - NT_return_type => Shift(yy_state_108) + T_DOT_UIDENT => Shift(yy_state_511) _ => Error } } -fn yy_state_108(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(6, NT_type_, yy_action_824) +fn yy_state_511(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(4, NT_constr, yy_action_749) } -fn yy_state_109(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_512(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_constr, yy_action_748) +} + +fn yy_state_513(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_ASYNC => Shift(yy_state_52) - T_UNDERSCORE => Shift(yy_state_57) - T_AMPER => Shift(yy_state_58) - T_PACKAGE_NAME => Shift(yy_state_60) - NT_type_ => Shift(yy_state_63) - NT_non_empty_list_commas_rev_type__ => Shift(yy_state_64) - T_UIDENT => Shift(yy_state_67) - T_LPAREN => Shift(yy_state_71) - NT_simple_type => Shift(yy_state_97) - NT_non_empty_list_commas_type__ => Shift(yy_state_110) - T_RPAREN => Shift(yy_state_114) + T_DOT_LIDENT => Shift(yy_state_24) + T_DOT_UIDENT => Shift(yy_state_197) _ => Error } } -fn yy_state_110(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_514(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RPAREN => Shift(yy_state_111) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + T_UIDENT => Shift(yy_state_195) + T_LBRACE => Shift(yy_state_448) + T_LBRACKET => Shift(yy_state_452) + T_LPAREN => Shift(yy_state_466) + NT_constr => Shift(yy_state_467) + T_EXTEND => Shift(yy_state_480) + T_LIDENT => Shift(yy_state_487) + T_UNDERSCORE => Shift(yy_state_491) + T_BYTES => Shift(yy_state_492) + T_STRING => Shift(yy_state_493) + T_MINUS => Shift(yy_state_494) + T_FLOAT => Shift(yy_state_498) + T_DOUBLE => Shift(yy_state_499) + T_BYTE => Shift(yy_state_500) + T_INT => Shift(yy_state_501) + T_CHAR => Shift(yy_state_502) + T_FALSE => Shift(yy_state_503) + T_TRUE => Shift(yy_state_504) + NT_type_name => Shift(yy_state_508) + T_PACKAGE_NAME => Shift(yy_state_513) + NT_simple_pattern => Shift(yy_state_515) _ => Error } } -fn yy_state_111(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_515(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_range_pattern, yy_action_747) +} + +fn yy_state_516(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_THIN_ARROW => Shift(yy_state_112) + T_BAR => Shift(yy_state_517) + T_EQUAL | T_RPAREN | T_COMMA | T_COLON | T_RBRACKET | T_RBRACE | T_AS | T_IF | T_FAT_ARROW => Reduce(1, NT_or_pattern, yy_action_746) _ => Error } } -fn yy_state_112(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_517(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_ASYNC => Shift(yy_state_52) - T_UNDERSCORE => Shift(yy_state_57) - T_AMPER => Shift(yy_state_58) - T_PACKAGE_NAME => Shift(yy_state_60) - T_UIDENT => Shift(yy_state_67) - T_LPAREN => Shift(yy_state_71) - NT_simple_type => Shift(yy_state_75) - NT_type_ => Shift(yy_state_84) - NT_return_type => Shift(yy_state_113) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + T_UIDENT => Shift(yy_state_195) + T_LBRACE => Shift(yy_state_448) + T_LBRACKET => Shift(yy_state_452) + T_LPAREN => Shift(yy_state_466) + NT_constr => Shift(yy_state_467) + T_EXTEND => Shift(yy_state_480) + T_LIDENT => Shift(yy_state_487) + T_UNDERSCORE => Shift(yy_state_491) + T_BYTES => Shift(yy_state_492) + T_STRING => Shift(yy_state_493) + T_MINUS => Shift(yy_state_494) + T_FLOAT => Shift(yy_state_498) + T_DOUBLE => Shift(yy_state_499) + T_BYTE => Shift(yy_state_500) + T_INT => Shift(yy_state_501) + T_CHAR => Shift(yy_state_502) + T_FALSE => Shift(yy_state_503) + T_TRUE => Shift(yy_state_504) + NT_simple_pattern => Shift(yy_state_505) + NT_type_name => Shift(yy_state_508) + T_PACKAGE_NAME => Shift(yy_state_513) + NT_range_pattern => Shift(yy_state_516) + NT_or_pattern => Shift(yy_state_518) _ => Error } } -fn yy_state_113(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(8, NT_type_, yy_action_822) +fn yy_state_518(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_or_pattern, yy_action_745) } -fn yy_state_114(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_519(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_pattern, yy_action_744) +} + +fn yy_state_520(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_THIN_ARROW => Shift(yy_state_115) + T_AS => Shift(yy_state_521) + T_RPAREN | T_COMMA => Reduce(1, NT_constr_pat_argument, yy_action_743) _ => Error } } -fn yy_state_115(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_521(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_ASYNC => Shift(yy_state_52) - T_UNDERSCORE => Shift(yy_state_57) - T_AMPER => Shift(yy_state_58) - T_PACKAGE_NAME => Shift(yy_state_60) - T_UIDENT => Shift(yy_state_67) - T_LPAREN => Shift(yy_state_71) - NT_simple_type => Shift(yy_state_75) - NT_type_ => Shift(yy_state_84) - NT_return_type => Shift(yy_state_116) + T_EXTEND => Shift(yy_state_522) + T_LIDENT => Shift(yy_state_523) _ => Error } } -fn yy_state_116(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(7, NT_type_, yy_action_820) +fn yy_state_522(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_pattern, yy_action_742) } -fn yy_state_117(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(2, NT_func_return_type, yy_action_819) +fn yy_state_523(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_pattern, yy_action_741) } -fn yy_state_118(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_524(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_block_expr => Shift(yy_state_119) - T_LBRACE => Shift(yy_state_120) + T_AS => Shift(yy_state_521) + T_RPAREN | T_COMMA => Reduce(3, NT_constr_pat_argument, yy_action_740) _ => Error } } -fn yy_state_119(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(4, NT_anony_fn, yy_action_818) +fn yy_state_525(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(2, NT_constr_pat_arguments_no_open, yy_action_739) } -fn yy_state_120(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_526(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_multiline_string => Shift(yy_state_2) - T_MULTILINE_INTERP => Shift(yy_state_4) - T_MULTILINE_STRING => Shift(yy_state_5) - T_REGEX_LITERAL => Shift(yy_state_6) - T_STRING => Shift(yy_state_7) - T_FLOAT => Shift(yy_state_8) - T_DOUBLE => Shift(yy_state_9) - T_INT => Shift(yy_state_10) - T_CHAR => Shift(yy_state_11) - T_BYTES => Shift(yy_state_12) - T_BYTE => Shift(yy_state_13) - T_FALSE => Shift(yy_state_14) - T_TRUE => Shift(yy_state_15) - T_INTERP => Shift(yy_state_16) - NT_non_empty_list_multiline_string_ => Shift(yy_state_17) - NT_simple_constant => Shift(yy_state_18) - T_AMPER => Shift(yy_state_19) - NT_qual_ident_ty => Shift(yy_state_25) - NT_tuple_expr => Shift(yy_state_26) - T_LBRACKET => Shift(yy_state_27) - NT_constr => Shift(yy_state_35) - NT_qual_ident_simple_expr => Shift(yy_state_36) - NT_atomic_expr => Shift(yy_state_37) - NT_anony_fn => Shift(yy_state_38) - T_LBRACE => Shift(yy_state_39) - NT_statement => Shift(yy_state_121) - NT_non_empty_list_semi_rev_aux_statement_ => Shift(yy_state_122) - NT_type_name => Shift(yy_state_126) - T_EXCLAMATION => Shift(yy_state_162) - T_MINUS => Shift(yy_state_178) - T_PLUS => Shift(yy_state_180) - T_UIDENT => Shift(yy_state_182) - NT_prefix_expr => Shift(yy_state_187) - NT_range_expr => Shift(yy_state_198) - NT_postfix_expr => Shift(yy_state_416) - T_EXISTS => Shift(yy_state_417) - T_FORALL => Shift(yy_state_449) - NT_infix_expr => Shift(yy_state_455) - T_UNDERSCORE => Shift(yy_state_456) - NT_qual_ident => Shift(yy_state_458) - NT_simple_expr => Shift(yy_state_459) - T_LPAREN => Shift(yy_state_464) - NT_pipe_expr => Shift(yy_state_497) - NT_non_empty_list_semis_rev_statement_ => Shift(yy_state_510) - NT_arrow_fn_expr => Shift(yy_state_513) - NT_quantifier_expr => Shift(yy_state_514) - NT_simple_try_expr => Shift(yy_state_515) - NT_lexmatch_expr => Shift(yy_state_516) - NT_match_expr => Shift(yy_state_517) - NT_if_expr => Shift(yy_state_518) - NT_try_expr => Shift(yy_state_519) - NT_while_expr => Shift(yy_state_520) - NT_foreach_expr => Shift(yy_state_521) - NT_for_expr => Shift(yy_state_522) - T_LEXMATCH => Shift(yy_state_523) - NT_lexmatch_header => Shift(yy_state_529) - NT_match_header => Shift(yy_state_540) - T_MATCH => Shift(yy_state_550) - T_IF => Shift(yy_state_553) - T_TRY_EXCLAMATION => Shift(yy_state_559) - T_TRY_QUESTION => Shift(yy_state_561) - T_TRY => Shift(yy_state_563) - NT_loop_label_colon => Shift(yy_state_577) - T_POST_LABEL => Shift(yy_state_585) - NT_expr => Shift(yy_state_590) - NT_left_value => Shift(yy_state_591) - T_ELLIPSIS => Shift(yy_state_598) - T_RAISE => Shift(yy_state_599) - T_PACKAGE_NAME => Shift(yy_state_601) - T_LIDENT => Shift(yy_state_603) - NT_expr_statement_no_break_continue_return => Shift(yy_state_662) - T_RETURN => Shift(yy_state_663) - T_CONTINUE => Shift(yy_state_666) - T_BREAK => Shift(yy_state_675) - T_GUARD => Shift(yy_state_688) - NT_expr_statement => Shift(yy_state_692) - T_PROOF_LET => Shift(yy_state_693) - T_PROOF_ASSERT => Shift(yy_state_697) - T_DEFER => Shift(yy_state_699) - NT_guard_statement => Shift(yy_state_701) - T_FN => Shift(yy_state_702) - T_ASYNC => Shift(yy_state_707) - T_LETREC => Shift(yy_state_713) - T_LET => Shift(yy_state_744) - NT_list_semis_rev_statement_ => Shift(yy_state_869) - T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_902) - T_RBRACE => Reduce(0, NT_list_semis_rev_statement_, yy_action_817) + T_RPAREN => Shift(yy_state_527) _ => Error } } -fn yy_state_121(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_non_empty_list_semi_rev_aux_statement_, yy_action_816) +fn yy_state_527(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(4, NT_simple_pattern, yy_action_737) } -fn yy_state_122(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_528(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_option_SEMI_ => Shift(yy_state_123) - T_SEMI => Shift(yy_state_124) - T_RBRACE => Reduce(0, NT_option_SEMI_, yy_action_815) + T_AS => Shift(yy_state_521) + T_RPAREN | T_COMMA => Reduce(3, NT_constr_pat_argument, yy_action_736) _ => Error } } -fn yy_state_123(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(2, NT_non_empty_list_semis_rev_statement_, yy_action_814) +fn yy_state_529(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(2, NT_constr_pat_arguments, yy_action_735) } -fn yy_state_124(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_530(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(2, NT_simple_pattern, yy_action_734) +} + +fn yy_state_531(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_multiline_string => Shift(yy_state_2) - T_MULTILINE_INTERP => Shift(yy_state_4) - T_MULTILINE_STRING => Shift(yy_state_5) - T_REGEX_LITERAL => Shift(yy_state_6) - T_STRING => Shift(yy_state_7) - T_FLOAT => Shift(yy_state_8) - T_DOUBLE => Shift(yy_state_9) - T_INT => Shift(yy_state_10) - T_CHAR => Shift(yy_state_11) - T_BYTES => Shift(yy_state_12) - T_BYTE => Shift(yy_state_13) - T_FALSE => Shift(yy_state_14) - T_TRUE => Shift(yy_state_15) - T_INTERP => Shift(yy_state_16) - NT_non_empty_list_multiline_string_ => Shift(yy_state_17) - NT_simple_constant => Shift(yy_state_18) - T_AMPER => Shift(yy_state_19) - NT_qual_ident_ty => Shift(yy_state_25) - NT_tuple_expr => Shift(yy_state_26) - T_LBRACKET => Shift(yy_state_27) - NT_constr => Shift(yy_state_35) - NT_qual_ident_simple_expr => Shift(yy_state_36) - NT_atomic_expr => Shift(yy_state_37) - NT_anony_fn => Shift(yy_state_38) - T_LBRACE => Shift(yy_state_39) - NT_statement => Shift(yy_state_125) - NT_type_name => Shift(yy_state_126) - T_EXCLAMATION => Shift(yy_state_162) - T_MINUS => Shift(yy_state_178) - T_PLUS => Shift(yy_state_180) - T_UIDENT => Shift(yy_state_182) - NT_prefix_expr => Shift(yy_state_187) - NT_range_expr => Shift(yy_state_198) - NT_postfix_expr => Shift(yy_state_416) - T_EXISTS => Shift(yy_state_417) - T_FORALL => Shift(yy_state_449) - NT_infix_expr => Shift(yy_state_455) - T_UNDERSCORE => Shift(yy_state_456) - NT_qual_ident => Shift(yy_state_458) - NT_simple_expr => Shift(yy_state_459) - T_LPAREN => Shift(yy_state_464) - NT_pipe_expr => Shift(yy_state_497) - NT_arrow_fn_expr => Shift(yy_state_513) - NT_quantifier_expr => Shift(yy_state_514) - NT_simple_try_expr => Shift(yy_state_515) - NT_lexmatch_expr => Shift(yy_state_516) - NT_match_expr => Shift(yy_state_517) - NT_if_expr => Shift(yy_state_518) - NT_try_expr => Shift(yy_state_519) - NT_while_expr => Shift(yy_state_520) - NT_foreach_expr => Shift(yy_state_521) - NT_for_expr => Shift(yy_state_522) - T_LEXMATCH => Shift(yy_state_523) - NT_lexmatch_header => Shift(yy_state_529) - NT_match_header => Shift(yy_state_540) - T_MATCH => Shift(yy_state_550) - T_IF => Shift(yy_state_553) - T_TRY_EXCLAMATION => Shift(yy_state_559) - T_TRY_QUESTION => Shift(yy_state_561) - T_TRY => Shift(yy_state_563) - NT_loop_label_colon => Shift(yy_state_577) - T_POST_LABEL => Shift(yy_state_585) - NT_expr => Shift(yy_state_590) - NT_left_value => Shift(yy_state_591) - T_ELLIPSIS => Shift(yy_state_598) - T_RAISE => Shift(yy_state_599) - T_PACKAGE_NAME => Shift(yy_state_601) - T_LIDENT => Shift(yy_state_603) - NT_expr_statement_no_break_continue_return => Shift(yy_state_662) - T_RETURN => Shift(yy_state_663) - T_CONTINUE => Shift(yy_state_666) - T_BREAK => Shift(yy_state_675) - T_GUARD => Shift(yy_state_688) - NT_expr_statement => Shift(yy_state_692) - T_PROOF_LET => Shift(yy_state_693) - T_PROOF_ASSERT => Shift(yy_state_697) - T_DEFER => Shift(yy_state_699) - NT_guard_statement => Shift(yy_state_701) - T_FN => Shift(yy_state_702) - T_ASYNC => Shift(yy_state_707) - T_LETREC => Shift(yy_state_713) - T_LET => Shift(yy_state_744) - T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_902) - T_RBRACE => Reduce(1, NT_option_SEMI_, yy_action_813) + T_AS => Shift(yy_state_521) + T_COLON => Shift(yy_state_532) + T_COMMA => Shift(yy_state_535) + T_RPAREN => Shift(yy_state_543) _ => Error } } -fn yy_state_125(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_non_empty_list_semi_rev_aux_statement_, yy_action_812) -} - -fn yy_state_126(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_532(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_COLONCOLON => Shift(yy_state_127) + T_ASYNC => Shift(yy_state_65) + T_UNDERSCORE => Shift(yy_state_70) + T_AMPER => Shift(yy_state_71) + T_PACKAGE_NAME => Shift(yy_state_73) + T_UIDENT => Shift(yy_state_80) + T_LPAREN => Shift(yy_state_84) + NT_simple_type => Shift(yy_state_110) + NT_type_ => Shift(yy_state_533) _ => Error } } -fn yy_state_127(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_533(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LIDENT => Shift(yy_state_128) - T_LBRACE => Shift(yy_state_129) - T_PACKAGE_NAME => Shift(yy_state_331) - T_UIDENT => Shift(yy_state_333) + T_RPAREN => Shift(yy_state_534) _ => Error } } -fn yy_state_128(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_simple_expr, yy_action_811) +fn yy_state_534(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(5, NT_simple_pattern, yy_action_733) } -fn yy_state_129(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_535(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_record_defn_single => Shift(yy_state_130) - NT_non_empty_list_commas_rev_record_defn_single_ => Shift(yy_state_131) - T_LIDENT => Shift(yy_state_135) - NT_non_empty_list_commas_with_trailing_info_record_defn_single_ => Shift(yy_state_857) - T_DOTDOT => Shift(yy_state_858) - NT_list_commas_with_trailing_info_record_defn_single_ => Shift(yy_state_867) - T_RBRACE => Reduce(0, NT_list_commas_with_trailing_info_record_defn_single_, yy_action_810) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + T_UIDENT => Shift(yy_state_195) + T_LBRACE => Shift(yy_state_448) + T_LBRACKET => Shift(yy_state_452) + T_LPAREN => Shift(yy_state_466) + NT_constr => Shift(yy_state_467) + T_EXTEND => Shift(yy_state_480) + T_LIDENT => Shift(yy_state_487) + T_UNDERSCORE => Shift(yy_state_491) + T_BYTES => Shift(yy_state_492) + T_STRING => Shift(yy_state_493) + T_MINUS => Shift(yy_state_494) + T_FLOAT => Shift(yy_state_498) + T_DOUBLE => Shift(yy_state_499) + T_BYTE => Shift(yy_state_500) + T_INT => Shift(yy_state_501) + T_CHAR => Shift(yy_state_502) + T_FALSE => Shift(yy_state_503) + T_TRUE => Shift(yy_state_504) + NT_simple_pattern => Shift(yy_state_505) + NT_type_name => Shift(yy_state_508) + T_PACKAGE_NAME => Shift(yy_state_513) + NT_range_pattern => Shift(yy_state_516) + NT_or_pattern => Shift(yy_state_519) + NT_non_empty_list_commas_rev_pattern_ => Shift(yy_state_536) + NT_non_empty_list_commas_pattern_ => Shift(yy_state_540) + NT_pattern => Shift(yy_state_542) _ => Error } } -fn yy_state_130(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_non_empty_list_commas_rev_record_defn_single_, yy_action_809) -} - -fn yy_state_131(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_536(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_option_COMMA_ => Shift(yy_state_132) - T_COMMA => Shift(yy_state_133) - T_RBRACE => Reduce(0, NT_option_COMMA_, yy_action_876) + T_COMMA => Shift(yy_state_537) + NT_option_COMMA_ => Shift(yy_state_539) + T_RPAREN => Reduce(0, NT_option_COMMA_, yy_action_1044) _ => Error } } -fn yy_state_132(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(2, NT_non_empty_list_commas_with_trailing_info_record_defn_single_, yy_action_808) +fn yy_state_537(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + T_UIDENT => Shift(yy_state_195) + T_LBRACE => Shift(yy_state_448) + T_LBRACKET => Shift(yy_state_452) + T_LPAREN => Shift(yy_state_466) + NT_constr => Shift(yy_state_467) + T_EXTEND => Shift(yy_state_480) + T_LIDENT => Shift(yy_state_487) + T_UNDERSCORE => Shift(yy_state_491) + T_BYTES => Shift(yy_state_492) + T_STRING => Shift(yy_state_493) + T_MINUS => Shift(yy_state_494) + T_FLOAT => Shift(yy_state_498) + T_DOUBLE => Shift(yy_state_499) + T_BYTE => Shift(yy_state_500) + T_INT => Shift(yy_state_501) + T_CHAR => Shift(yy_state_502) + T_FALSE => Shift(yy_state_503) + T_TRUE => Shift(yy_state_504) + NT_simple_pattern => Shift(yy_state_505) + NT_type_name => Shift(yy_state_508) + T_PACKAGE_NAME => Shift(yy_state_513) + NT_range_pattern => Shift(yy_state_516) + NT_or_pattern => Shift(yy_state_519) + NT_pattern => Shift(yy_state_538) + T_RPAREN => Reduce(1, NT_option_COMMA_, yy_action_1042) + _ => Error + } } -fn yy_state_133(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_538(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_record_defn_single => Shift(yy_state_134) - T_LIDENT => Shift(yy_state_135) - T_RBRACE => Reduce(1, NT_option_COMMA_, yy_action_874) + T_AS => Shift(yy_state_521) + T_RPAREN | T_COMMA => Reduce(3, NT_non_empty_list_commas_rev_pattern_, yy_action_732) _ => Error } } -fn yy_state_134(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_non_empty_list_commas_rev_record_defn_single_, yy_action_807) +fn yy_state_539(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(2, NT_non_empty_list_commas_pattern_, yy_action_731) } -fn yy_state_135(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_540(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_COLON => Shift(yy_state_136) - T_COMMA | T_RBRACE => Reduce(1, NT_record_defn_single, yy_action_806) + T_RPAREN => Shift(yy_state_541) _ => Error } } -fn yy_state_136(_lookahead : YYSymbol) -> YYDecision { - match _lookahead { - NT_multiline_string => Shift(yy_state_2) - T_MULTILINE_INTERP => Shift(yy_state_4) - T_MULTILINE_STRING => Shift(yy_state_5) - T_REGEX_LITERAL => Shift(yy_state_6) - T_STRING => Shift(yy_state_7) - T_FLOAT => Shift(yy_state_8) - T_DOUBLE => Shift(yy_state_9) - T_INT => Shift(yy_state_10) - T_CHAR => Shift(yy_state_11) - T_BYTES => Shift(yy_state_12) - T_BYTE => Shift(yy_state_13) - T_FALSE => Shift(yy_state_14) - T_TRUE => Shift(yy_state_15) - T_INTERP => Shift(yy_state_16) - NT_non_empty_list_multiline_string_ => Shift(yy_state_17) - NT_simple_constant => Shift(yy_state_18) - T_AMPER => Shift(yy_state_19) - NT_qual_ident_ty => Shift(yy_state_25) - NT_tuple_expr => Shift(yy_state_26) - T_LBRACKET => Shift(yy_state_27) - NT_constr => Shift(yy_state_35) - NT_qual_ident_simple_expr => Shift(yy_state_36) - NT_atomic_expr => Shift(yy_state_37) - NT_anony_fn => Shift(yy_state_38) - T_LBRACE => Shift(yy_state_39) - T_FN => Shift(yy_state_48) - NT_type_name => Shift(yy_state_126) - NT_expr => Shift(yy_state_137) - T_ASYNC => Shift(yy_state_138) - NT_simple_expr => Shift(yy_state_151) - T_EXCLAMATION => Shift(yy_state_162) - T_MINUS => Shift(yy_state_178) - T_PLUS => Shift(yy_state_180) - T_UIDENT => Shift(yy_state_182) - T_PACKAGE_NAME => Shift(yy_state_183) - NT_prefix_expr => Shift(yy_state_187) - NT_range_expr => Shift(yy_state_198) - NT_postfix_expr => Shift(yy_state_416) - T_EXISTS => Shift(yy_state_417) - T_FORALL => Shift(yy_state_449) - NT_infix_expr => Shift(yy_state_455) - T_UNDERSCORE => Shift(yy_state_456) - T_LPAREN => Shift(yy_state_464) - NT_pipe_expr => Shift(yy_state_497) - NT_arrow_fn_expr => Shift(yy_state_513) - NT_quantifier_expr => Shift(yy_state_514) - NT_simple_try_expr => Shift(yy_state_515) - NT_lexmatch_expr => Shift(yy_state_516) - NT_match_expr => Shift(yy_state_517) - NT_if_expr => Shift(yy_state_518) - NT_try_expr => Shift(yy_state_519) - NT_while_expr => Shift(yy_state_520) - NT_foreach_expr => Shift(yy_state_521) - NT_for_expr => Shift(yy_state_522) - T_LEXMATCH => Shift(yy_state_523) - NT_lexmatch_header => Shift(yy_state_529) - NT_match_header => Shift(yy_state_540) - T_MATCH => Shift(yy_state_550) - T_IF => Shift(yy_state_553) - T_TRY_EXCLAMATION => Shift(yy_state_559) - T_TRY_QUESTION => Shift(yy_state_561) - T_TRY => Shift(yy_state_563) - NT_loop_label_colon => Shift(yy_state_577) - T_POST_LABEL => Shift(yy_state_585) - T_LIDENT => Shift(yy_state_587) - T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_902) +fn yy_state_541(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(5, NT_simple_pattern, yy_action_730) +} + +fn yy_state_542(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_AS => Shift(yy_state_521) + T_RPAREN | T_COMMA => Reduce(1, NT_non_empty_list_commas_rev_pattern_, yy_action_729) _ => Error } } -fn yy_state_137(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_record_defn_single, yy_action_805) +fn yy_state_543(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_simple_pattern, yy_action_728) } -fn yy_state_138(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_544(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_FN => Shift(yy_state_139) + T_AS => Shift(yy_state_521) + T_COMMA | T_RBRACKET => Reduce(1, NT_array_sub_pattern, yy_action_727) _ => Error } } -fn yy_state_139(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_545(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_array_sub_patterns, yy_action_726) +} + +fn yy_state_546(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_parameters => Shift(yy_state_140) - T_LPAREN => Shift(yy_state_143) + T_COMMA => Shift(yy_state_547) + T_RBRACKET => Reduce(1, NT_array_sub_patterns, yy_action_725) _ => Error } } -fn yy_state_140(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_547(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_error_annotation => Shift(yy_state_50) - T_THIN_ARROW => Shift(yy_state_51) - T_NORAISE => Shift(yy_state_78) - T_RAISE => Shift(yy_state_79) - NT_func_return_type => Shift(yy_state_141) - T_LBRACE => Reduce(0, NT_func_return_type, yy_action_862) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + T_UIDENT => Shift(yy_state_195) + T_LBRACE => Shift(yy_state_448) + T_LBRACKET => Shift(yy_state_452) + NT_dotdot_binder => Shift(yy_state_453) + T_LPAREN => Shift(yy_state_466) + NT_constr => Shift(yy_state_467) + T_EXTEND => Shift(yy_state_480) + T_LIDENT => Shift(yy_state_487) + T_UNDERSCORE => Shift(yy_state_491) + T_BYTES => Shift(yy_state_492) + T_STRING => Shift(yy_state_493) + T_MINUS => Shift(yy_state_494) + T_FLOAT => Shift(yy_state_498) + T_DOUBLE => Shift(yy_state_499) + T_BYTE => Shift(yy_state_500) + T_INT => Shift(yy_state_501) + T_CHAR => Shift(yy_state_502) + T_FALSE => Shift(yy_state_503) + T_TRUE => Shift(yy_state_504) + NT_simple_pattern => Shift(yy_state_505) + NT_type_name => Shift(yy_state_508) + T_PACKAGE_NAME => Shift(yy_state_513) + NT_range_pattern => Shift(yy_state_516) + NT_or_pattern => Shift(yy_state_519) + NT_pattern => Shift(yy_state_544) + NT_array_sub_pattern => Shift(yy_state_546) + NT_array_sub_patterns => Shift(yy_state_548) + T_DOTDOT => Shift(yy_state_549) + T_RBRACKET => Reduce(0, NT_array_sub_patterns, yy_action_784) _ => Error } } -fn yy_state_141(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_548(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_array_sub_patterns, yy_action_724) +} + +fn yy_state_549(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACE => Shift(yy_state_120) - NT_block_expr => Shift(yy_state_142) + T_PACKAGE_NAME => Shift(yy_state_461) + T_UIDENT => Shift(yy_state_463) + T_BYTES => Shift(yy_state_464) + T_STRING => Shift(yy_state_465) + T_AS => Shift(yy_state_550) + T_UNDERSCORE => Shift(yy_state_553) + T_EXTEND => Shift(yy_state_554) + T_LIDENT => Shift(yy_state_555) + T_COMMA | T_RBRACKET => Reduce(1, NT_dotdot_binder, yy_action_723) _ => Error } } -fn yy_state_142(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(5, NT_anony_fn, yy_action_804) -} - -fn yy_state_143(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_550(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_parameter => Shift(yy_state_144) - NT_non_empty_list_commas_rev_parameter_ => Shift(yy_state_145) - T_POST_LABEL => Shift(yy_state_149) - T_LIDENT => Shift(yy_state_841) - T_UNDERSCORE => Shift(yy_state_851) - NT_non_empty_list_commas_parameter_ => Shift(yy_state_854) - NT_list_commas_parameter_ => Shift(yy_state_855) - T_RPAREN => Reduce(0, NT_list_commas_parameter_, yy_action_803) + T_EXTEND => Shift(yy_state_551) + T_LIDENT => Shift(yy_state_552) _ => Error } } -fn yy_state_144(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_non_empty_list_commas_rev_parameter_, yy_action_802) +fn yy_state_551(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_dotdot_binder, yy_action_722) } -fn yy_state_145(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_552(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_dotdot_binder, yy_action_721) +} + +fn yy_state_553(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(2, NT_dotdot_binder, yy_action_720) +} + +fn yy_state_554(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(2, NT_dotdot_binder, yy_action_719) +} + +fn yy_state_555(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(2, NT_dotdot_binder, yy_action_718) +} + +fn yy_state_556(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_option_COMMA_ => Shift(yy_state_146) - T_COMMA => Shift(yy_state_147) - T_RPAREN => Reduce(0, NT_option_COMMA_, yy_action_876) + T_RBRACKET => Shift(yy_state_557) _ => Error } } -fn yy_state_146(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(2, NT_non_empty_list_commas_parameter_, yy_action_801) +fn yy_state_557(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_simple_pattern, yy_action_717) } -fn yy_state_147(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_558(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_parameter => Shift(yy_state_148) - T_POST_LABEL => Shift(yy_state_149) - T_LIDENT => Shift(yy_state_841) - T_UNDERSCORE => Shift(yy_state_851) - T_RPAREN => Reduce(1, NT_option_COMMA_, yy_action_874) + T_AS => Shift(yy_state_521) + T_COMMA | T_RBRACE => Reduce(4, NT_non_empty_list_commas_rev_map_elem_pat_, yy_action_716) _ => Error } } -fn yy_state_148(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_non_empty_list_commas_rev_parameter_, yy_action_800) +fn yy_state_559(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_option_QUESTION_, yy_action_715) } -fn yy_state_149(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_560(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_non_empty_list_commas_rev_fields_pat_single_, yy_action_714) +} + +fn yy_state_561(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_EQUAL => Shift(yy_state_150) - T_COLON => Shift(yy_state_837) - T_RPAREN | T_COMMA => Reduce(1, NT_parameter, yy_action_798) + NT_option_COMMA_ => Shift(yy_state_562) + T_COMMA => Shift(yy_state_563) + T_RBRACE => Reduce(0, NT_option_COMMA_, yy_action_1044) _ => Error } } -fn yy_state_150(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_562(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(2, NT_non_empty_list_commas_map_elem_pat_, yy_action_713) +} + +fn yy_state_563(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_multiline_string => Shift(yy_state_2) - T_MULTILINE_INTERP => Shift(yy_state_4) - T_MULTILINE_STRING => Shift(yy_state_5) T_REGEX_LITERAL => Shift(yy_state_6) T_STRING => Shift(yy_state_7) T_FLOAT => Shift(yy_state_8) @@ -18422,682 +27958,329 @@ fn yy_state_150(_lookahead : YYSymbol) -> YYDecision { T_BYTE => Shift(yy_state_13) T_FALSE => Shift(yy_state_14) T_TRUE => Shift(yy_state_15) - T_INTERP => Shift(yy_state_16) - NT_non_empty_list_multiline_string_ => Shift(yy_state_17) - NT_simple_constant => Shift(yy_state_18) - T_AMPER => Shift(yy_state_19) - NT_qual_ident_ty => Shift(yy_state_25) - NT_tuple_expr => Shift(yy_state_26) - T_LBRACKET => Shift(yy_state_27) - NT_constr => Shift(yy_state_35) - NT_qual_ident_simple_expr => Shift(yy_state_36) - NT_atomic_expr => Shift(yy_state_37) - NT_anony_fn => Shift(yy_state_38) - T_LBRACE => Shift(yy_state_39) - T_FN => Shift(yy_state_48) - NT_type_name => Shift(yy_state_126) - T_ASYNC => Shift(yy_state_138) - NT_simple_expr => Shift(yy_state_151) - T_EXCLAMATION => Shift(yy_state_162) - T_MINUS => Shift(yy_state_178) - T_PLUS => Shift(yy_state_180) - T_UIDENT => Shift(yy_state_182) - T_PACKAGE_NAME => Shift(yy_state_183) - NT_prefix_expr => Shift(yy_state_187) - NT_range_expr => Shift(yy_state_198) - NT_postfix_expr => Shift(yy_state_416) - T_EXISTS => Shift(yy_state_417) - T_FORALL => Shift(yy_state_449) - NT_infix_expr => Shift(yy_state_455) - T_UNDERSCORE => Shift(yy_state_456) - T_LPAREN => Shift(yy_state_464) - NT_pipe_expr => Shift(yy_state_497) - NT_arrow_fn_expr => Shift(yy_state_513) - NT_quantifier_expr => Shift(yy_state_514) - NT_simple_try_expr => Shift(yy_state_515) - NT_lexmatch_expr => Shift(yy_state_516) - NT_match_expr => Shift(yy_state_517) - NT_if_expr => Shift(yy_state_518) - NT_try_expr => Shift(yy_state_519) - NT_while_expr => Shift(yy_state_520) - NT_foreach_expr => Shift(yy_state_521) - NT_for_expr => Shift(yy_state_522) - T_LEXMATCH => Shift(yy_state_523) - NT_lexmatch_header => Shift(yy_state_529) - NT_match_header => Shift(yy_state_540) - T_MATCH => Shift(yy_state_550) - T_IF => Shift(yy_state_553) - T_TRY_EXCLAMATION => Shift(yy_state_559) - T_TRY_QUESTION => Shift(yy_state_561) - T_TRY => Shift(yy_state_563) - NT_loop_label_colon => Shift(yy_state_577) - T_POST_LABEL => Shift(yy_state_585) - T_LIDENT => Shift(yy_state_587) - NT_expr => Shift(yy_state_836) - T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_902) + NT_map_syntax_key => Shift(yy_state_564) + T_MINUS => Shift(yy_state_568) + NT_simple_constant => Shift(yy_state_572) + T_RBRACE => Reduce(1, NT_option_COMMA_, yy_action_1042) + T_DOTDOT => Reduce(2, NT_non_empty_list_commas_with_tail_map_elem_pat_, yy_action_712) _ => Error } } -fn yy_state_151(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_564(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_DOT_INT => Shift(yy_state_152) - T_DOTDOT => Shift(yy_state_153) - T_LPAREN => Shift(yy_state_460) - T_DOT_LIDENT => Shift(yy_state_832) - T_LBRACKET => Shift(yy_state_833) - T_INFIX1 | T_INFIX2 | T_INFIX3 | T_INFIX4 | T_EOF | T_WITH | T_CATCH | T_EQ_TILDE | T_RPAREN | T_COMMA | T_MINUS | T_COLON | T_SEMI | T_PLUS | T_RBRACKET | T_BAR | T_LBRACE | T_RBRACE | T_AMPERAMPER | T_AMPER | T_CARET | T_BARBAR | T_AS | T_PIPE | T_PIPE_LEFT | T_LT_PLUS | T_ELSE | T_IF | T_FAT_ARROW | T_RANGE_INCLUSIVE | T_RANGE_LT_INCLUSIVE | T_RANGE_EXCLUSIVE | T_RANGE_INCLUSIVE_REV | T_RANGE_EXCLUSIVE_REV | T_IS | T_AND | T_IMPLIES | T_LEXMATCH_QUESTION => Reduce(1, NT_prefix_expr, yy_action_797) + T_QUESTION => Shift(yy_state_559) + NT_option_QUESTION_ => Shift(yy_state_565) + T_COLON => Reduce(0, NT_option_QUESTION_, yy_action_785) _ => Error } } -fn yy_state_152(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(2, NT_simple_expr, yy_action_796) -} - -fn yy_state_153(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_565(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LIDENT => Shift(yy_state_154) + T_COLON => Shift(yy_state_566) _ => Error } } -fn yy_state_154(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_566(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LPAREN => Shift(yy_state_155) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + T_UIDENT => Shift(yy_state_195) + T_LBRACE => Shift(yy_state_448) + T_LBRACKET => Shift(yy_state_452) + T_LPAREN => Shift(yy_state_466) + NT_constr => Shift(yy_state_467) + T_EXTEND => Shift(yy_state_480) + T_LIDENT => Shift(yy_state_487) + T_UNDERSCORE => Shift(yy_state_491) + T_BYTES => Shift(yy_state_492) + T_STRING => Shift(yy_state_493) + T_MINUS => Shift(yy_state_494) + T_FLOAT => Shift(yy_state_498) + T_DOUBLE => Shift(yy_state_499) + T_BYTE => Shift(yy_state_500) + T_INT => Shift(yy_state_501) + T_CHAR => Shift(yy_state_502) + T_FALSE => Shift(yy_state_503) + T_TRUE => Shift(yy_state_504) + NT_simple_pattern => Shift(yy_state_505) + NT_type_name => Shift(yy_state_508) + T_PACKAGE_NAME => Shift(yy_state_513) + NT_range_pattern => Shift(yy_state_516) + NT_or_pattern => Shift(yy_state_519) + NT_pattern => Shift(yy_state_567) _ => Error } } -fn yy_state_155(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_567(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_multiline_string => Shift(yy_state_2) - T_MULTILINE_INTERP => Shift(yy_state_4) - T_MULTILINE_STRING => Shift(yy_state_5) - T_REGEX_LITERAL => Shift(yy_state_6) - T_STRING => Shift(yy_state_7) - T_FLOAT => Shift(yy_state_8) - T_DOUBLE => Shift(yy_state_9) - T_INT => Shift(yy_state_10) - T_CHAR => Shift(yy_state_11) - T_BYTES => Shift(yy_state_12) - T_BYTE => Shift(yy_state_13) - T_FALSE => Shift(yy_state_14) - T_TRUE => Shift(yy_state_15) - T_INTERP => Shift(yy_state_16) - NT_non_empty_list_multiline_string_ => Shift(yy_state_17) - NT_simple_constant => Shift(yy_state_18) - T_AMPER => Shift(yy_state_19) - NT_qual_ident_ty => Shift(yy_state_25) - NT_tuple_expr => Shift(yy_state_26) - T_LBRACKET => Shift(yy_state_27) - NT_constr => Shift(yy_state_35) - NT_qual_ident_simple_expr => Shift(yy_state_36) - NT_atomic_expr => Shift(yy_state_37) - NT_anony_fn => Shift(yy_state_38) - T_LBRACE => Shift(yy_state_39) - T_FN => Shift(yy_state_48) - NT_type_name => Shift(yy_state_126) - T_ASYNC => Shift(yy_state_138) - NT_simple_expr => Shift(yy_state_151) - NT_argument => Shift(yy_state_156) - NT_non_empty_list_commas_rev_argument_ => Shift(yy_state_157) - NT_expr => Shift(yy_state_161) - T_EXCLAMATION => Shift(yy_state_162) - T_MINUS => Shift(yy_state_178) - T_PLUS => Shift(yy_state_180) - T_UIDENT => Shift(yy_state_182) - T_PACKAGE_NAME => Shift(yy_state_183) - NT_prefix_expr => Shift(yy_state_187) - NT_range_expr => Shift(yy_state_198) - NT_postfix_expr => Shift(yy_state_416) - T_EXISTS => Shift(yy_state_417) - T_FORALL => Shift(yy_state_449) - NT_infix_expr => Shift(yy_state_455) - T_UNDERSCORE => Shift(yy_state_456) - NT_non_empty_list_commas_argument_ => Shift(yy_state_461) - T_LPAREN => Shift(yy_state_464) - NT_pipe_expr => Shift(yy_state_497) - NT_arrow_fn_expr => Shift(yy_state_513) - NT_quantifier_expr => Shift(yy_state_514) - NT_simple_try_expr => Shift(yy_state_515) - NT_lexmatch_expr => Shift(yy_state_516) - NT_match_expr => Shift(yy_state_517) - NT_if_expr => Shift(yy_state_518) - NT_try_expr => Shift(yy_state_519) - NT_while_expr => Shift(yy_state_520) - NT_foreach_expr => Shift(yy_state_521) - NT_for_expr => Shift(yy_state_522) - T_LEXMATCH => Shift(yy_state_523) - NT_lexmatch_header => Shift(yy_state_529) - NT_match_header => Shift(yy_state_540) - T_MATCH => Shift(yy_state_550) - T_IF => Shift(yy_state_553) - T_TRY_EXCLAMATION => Shift(yy_state_559) - T_TRY_QUESTION => Shift(yy_state_561) - T_TRY => Shift(yy_state_563) - NT_loop_label_colon => Shift(yy_state_577) - T_POST_LABEL => Shift(yy_state_794) - T_LIDENT => Shift(yy_state_795) - NT_list_commas_argument_ => Shift(yy_state_830) - T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_902) - T_RPAREN => Reduce(0, NT_list_commas_argument_, yy_action_795) + T_AS => Shift(yy_state_521) + T_COMMA | T_RBRACE => Reduce(6, NT_non_empty_list_commas_rev_map_elem_pat_, yy_action_710) _ => Error } } -fn yy_state_156(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_non_empty_list_commas_rev_argument_, yy_action_794) -} - -fn yy_state_157(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_568(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_option_COMMA_ => Shift(yy_state_158) - T_COMMA => Shift(yy_state_159) - T_RPAREN => Reduce(0, NT_option_COMMA_, yy_action_876) + T_FLOAT => Shift(yy_state_569) + T_DOUBLE => Shift(yy_state_570) + T_INT => Shift(yy_state_571) _ => Error } } -fn yy_state_158(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(2, NT_non_empty_list_commas_argument_, yy_action_793) +fn yy_state_569(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(2, NT_map_syntax_key, yy_action_709) } -fn yy_state_159(_lookahead : YYSymbol) -> YYDecision { - match _lookahead { - NT_multiline_string => Shift(yy_state_2) - T_MULTILINE_INTERP => Shift(yy_state_4) - T_MULTILINE_STRING => Shift(yy_state_5) - T_REGEX_LITERAL => Shift(yy_state_6) - T_STRING => Shift(yy_state_7) - T_FLOAT => Shift(yy_state_8) - T_DOUBLE => Shift(yy_state_9) - T_INT => Shift(yy_state_10) - T_CHAR => Shift(yy_state_11) - T_BYTES => Shift(yy_state_12) - T_BYTE => Shift(yy_state_13) - T_FALSE => Shift(yy_state_14) - T_TRUE => Shift(yy_state_15) - T_INTERP => Shift(yy_state_16) - NT_non_empty_list_multiline_string_ => Shift(yy_state_17) - NT_simple_constant => Shift(yy_state_18) - T_AMPER => Shift(yy_state_19) - NT_qual_ident_ty => Shift(yy_state_25) - NT_tuple_expr => Shift(yy_state_26) - T_LBRACKET => Shift(yy_state_27) - NT_constr => Shift(yy_state_35) - NT_qual_ident_simple_expr => Shift(yy_state_36) - NT_atomic_expr => Shift(yy_state_37) - NT_anony_fn => Shift(yy_state_38) - T_LBRACE => Shift(yy_state_39) - T_FN => Shift(yy_state_48) - NT_type_name => Shift(yy_state_126) - T_ASYNC => Shift(yy_state_138) - NT_simple_expr => Shift(yy_state_151) - NT_argument => Shift(yy_state_160) - NT_expr => Shift(yy_state_161) - T_EXCLAMATION => Shift(yy_state_162) - T_MINUS => Shift(yy_state_178) - T_PLUS => Shift(yy_state_180) - T_UIDENT => Shift(yy_state_182) - T_PACKAGE_NAME => Shift(yy_state_183) - NT_prefix_expr => Shift(yy_state_187) - NT_range_expr => Shift(yy_state_198) - NT_postfix_expr => Shift(yy_state_416) - T_EXISTS => Shift(yy_state_417) - T_FORALL => Shift(yy_state_449) - NT_infix_expr => Shift(yy_state_455) - T_UNDERSCORE => Shift(yy_state_456) - T_LPAREN => Shift(yy_state_464) - NT_pipe_expr => Shift(yy_state_497) - NT_arrow_fn_expr => Shift(yy_state_513) - NT_quantifier_expr => Shift(yy_state_514) - NT_simple_try_expr => Shift(yy_state_515) - NT_lexmatch_expr => Shift(yy_state_516) - NT_match_expr => Shift(yy_state_517) - NT_if_expr => Shift(yy_state_518) - NT_try_expr => Shift(yy_state_519) - NT_while_expr => Shift(yy_state_520) - NT_foreach_expr => Shift(yy_state_521) - NT_for_expr => Shift(yy_state_522) - T_LEXMATCH => Shift(yy_state_523) - NT_lexmatch_header => Shift(yy_state_529) - NT_match_header => Shift(yy_state_540) - T_MATCH => Shift(yy_state_550) - T_IF => Shift(yy_state_553) - T_TRY_EXCLAMATION => Shift(yy_state_559) - T_TRY_QUESTION => Shift(yy_state_561) - T_TRY => Shift(yy_state_563) - NT_loop_label_colon => Shift(yy_state_577) - T_POST_LABEL => Shift(yy_state_794) - T_LIDENT => Shift(yy_state_795) - T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_902) - T_RPAREN => Reduce(1, NT_option_COMMA_, yy_action_874) - _ => Error - } +fn yy_state_570(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(2, NT_map_syntax_key, yy_action_708) } -fn yy_state_160(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_non_empty_list_commas_rev_argument_, yy_action_792) +fn yy_state_571(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(2, NT_map_syntax_key, yy_action_707) } -fn yy_state_161(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_argument, yy_action_791) +fn yy_state_572(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_map_syntax_key, yy_action_706) } -fn yy_state_162(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_573(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_multiline_string => Shift(yy_state_2) - T_MULTILINE_INTERP => Shift(yy_state_4) - T_MULTILINE_STRING => Shift(yy_state_5) - T_REGEX_LITERAL => Shift(yy_state_6) - T_STRING => Shift(yy_state_7) - T_FLOAT => Shift(yy_state_8) - T_DOUBLE => Shift(yy_state_9) - T_INT => Shift(yy_state_10) - T_CHAR => Shift(yy_state_11) - T_BYTES => Shift(yy_state_12) - T_BYTE => Shift(yy_state_13) - T_FALSE => Shift(yy_state_14) - T_TRUE => Shift(yy_state_15) - T_INTERP => Shift(yy_state_16) - NT_non_empty_list_multiline_string_ => Shift(yy_state_17) - NT_simple_constant => Shift(yy_state_18) - T_AMPER => Shift(yy_state_19) - NT_qual_ident_ty => Shift(yy_state_25) - NT_tuple_expr => Shift(yy_state_26) - T_LBRACKET => Shift(yy_state_27) - NT_constr => Shift(yy_state_35) - NT_qual_ident_simple_expr => Shift(yy_state_36) - NT_atomic_expr => Shift(yy_state_37) - NT_anony_fn => Shift(yy_state_38) - T_LBRACE => Shift(yy_state_39) - T_FN => Shift(yy_state_48) - NT_type_name => Shift(yy_state_126) - T_ASYNC => Shift(yy_state_138) - NT_simple_expr => Shift(yy_state_151) - T_EXCLAMATION => Shift(yy_state_162) - T_UNDERSCORE => Shift(yy_state_163) - T_LPAREN => Shift(yy_state_164) - T_MINUS => Shift(yy_state_178) - T_PLUS => Shift(yy_state_180) - T_UIDENT => Shift(yy_state_182) - T_PACKAGE_NAME => Shift(yy_state_183) - T_LIDENT => Shift(yy_state_186) - NT_prefix_expr => Shift(yy_state_829) + NT_option_COMMA_ => Shift(yy_state_574) + T_COMMA => Shift(yy_state_575) + T_RBRACE => Reduce(0, NT_option_COMMA_, yy_action_1044) _ => Error } } -fn yy_state_163(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_simple_expr, yy_action_790) +fn yy_state_574(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(2, NT_non_empty_list_commas_fields_pat_single_, yy_action_705) } -fn yy_state_164(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_575(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_multiline_string => Shift(yy_state_2) - T_MULTILINE_INTERP => Shift(yy_state_4) - T_MULTILINE_STRING => Shift(yy_state_5) - T_REGEX_LITERAL => Shift(yy_state_6) - T_STRING => Shift(yy_state_7) - T_FLOAT => Shift(yy_state_8) - T_DOUBLE => Shift(yy_state_9) - T_INT => Shift(yy_state_10) - T_CHAR => Shift(yy_state_11) - T_BYTES => Shift(yy_state_12) - T_BYTE => Shift(yy_state_13) - T_FALSE => Shift(yy_state_14) - T_TRUE => Shift(yy_state_15) - T_INTERP => Shift(yy_state_16) - NT_non_empty_list_multiline_string_ => Shift(yy_state_17) - NT_simple_constant => Shift(yy_state_18) - T_AMPER => Shift(yy_state_19) - NT_qual_ident_ty => Shift(yy_state_25) - NT_tuple_expr => Shift(yy_state_26) - T_LBRACKET => Shift(yy_state_27) - NT_constr => Shift(yy_state_35) - NT_qual_ident_simple_expr => Shift(yy_state_36) - NT_atomic_expr => Shift(yy_state_37) - NT_anony_fn => Shift(yy_state_38) - T_LBRACE => Shift(yy_state_39) - T_FN => Shift(yy_state_48) - NT_type_name => Shift(yy_state_126) - T_ASYNC => Shift(yy_state_138) - NT_simple_expr => Shift(yy_state_151) - T_EXCLAMATION => Shift(yy_state_162) - T_RPAREN => Shift(yy_state_165) - NT_non_empty_tuple_elems_with_prefix => Shift(yy_state_166) - NT_arrow_fn_prefix_no_constraint => Shift(yy_state_167) - NT_non_empty_tuple_elems => Shift(yy_state_168) - NT_expr => Shift(yy_state_169) - T_MINUS => Shift(yy_state_178) - T_PLUS => Shift(yy_state_180) - T_UIDENT => Shift(yy_state_182) - T_PACKAGE_NAME => Shift(yy_state_183) - NT_prefix_expr => Shift(yy_state_187) - NT_range_expr => Shift(yy_state_198) - NT_postfix_expr => Shift(yy_state_416) - T_EXISTS => Shift(yy_state_417) - T_FORALL => Shift(yy_state_449) - NT_infix_expr => Shift(yy_state_455) - T_LPAREN => Shift(yy_state_464) - NT_pipe_expr => Shift(yy_state_497) - NT_arrow_fn_expr => Shift(yy_state_513) - NT_quantifier_expr => Shift(yy_state_514) - NT_simple_try_expr => Shift(yy_state_515) - NT_lexmatch_expr => Shift(yy_state_516) - NT_match_expr => Shift(yy_state_517) - NT_if_expr => Shift(yy_state_518) - NT_try_expr => Shift(yy_state_519) - NT_while_expr => Shift(yy_state_520) - NT_foreach_expr => Shift(yy_state_521) - NT_for_expr => Shift(yy_state_522) - T_LEXMATCH => Shift(yy_state_523) - NT_lexmatch_header => Shift(yy_state_529) - NT_match_header => Shift(yy_state_540) - T_MATCH => Shift(yy_state_550) - T_IF => Shift(yy_state_553) - T_TRY_EXCLAMATION => Shift(yy_state_559) - T_TRY_QUESTION => Shift(yy_state_561) - T_TRY => Shift(yy_state_563) - NT_loop_label_colon => Shift(yy_state_577) - T_POST_LABEL => Shift(yy_state_585) - T_UNDERSCORE => Shift(yy_state_813) - T_LIDENT => Shift(yy_state_825) - T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_902) + NT_fields_pat_single => Shift(yy_state_576) + T_EXTEND => Shift(yy_state_577) + T_LIDENT => Shift(yy_state_580) + T_RBRACE => Reduce(1, NT_option_COMMA_, yy_action_1042) + T_DOTDOT => Reduce(2, NT_non_empty_list_commas_with_tail_fields_pat_single_, yy_action_704) _ => Error } } -fn yy_state_165(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(2, NT_tuple_expr, yy_action_789) +fn yy_state_576(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_non_empty_list_commas_rev_fields_pat_single_, yy_action_703) } -fn yy_state_166(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(2, NT_tuple_expr, yy_action_788) +fn yy_state_577(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_COLON => Shift(yy_state_578) + T_COMMA | T_RBRACE => Reduce(1, NT_fields_pat_single, yy_action_701) + _ => Error + } } -fn yy_state_167(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(2, NT_tuple_expr, yy_action_787) +fn yy_state_578(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + T_UIDENT => Shift(yy_state_195) + T_LBRACE => Shift(yy_state_448) + T_LBRACKET => Shift(yy_state_452) + T_LPAREN => Shift(yy_state_466) + NT_constr => Shift(yy_state_467) + T_EXTEND => Shift(yy_state_480) + T_LIDENT => Shift(yy_state_487) + T_UNDERSCORE => Shift(yy_state_491) + T_BYTES => Shift(yy_state_492) + T_STRING => Shift(yy_state_493) + T_MINUS => Shift(yy_state_494) + T_FLOAT => Shift(yy_state_498) + T_DOUBLE => Shift(yy_state_499) + T_BYTE => Shift(yy_state_500) + T_INT => Shift(yy_state_501) + T_CHAR => Shift(yy_state_502) + T_FALSE => Shift(yy_state_503) + T_TRUE => Shift(yy_state_504) + NT_simple_pattern => Shift(yy_state_505) + NT_type_name => Shift(yy_state_508) + T_PACKAGE_NAME => Shift(yy_state_513) + NT_range_pattern => Shift(yy_state_516) + NT_or_pattern => Shift(yy_state_519) + NT_pattern => Shift(yy_state_579) + _ => Error + } } -fn yy_state_168(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_non_empty_tuple_elems_with_prefix, yy_action_786) +fn yy_state_579(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_AS => Shift(yy_state_521) + T_COMMA | T_RBRACE => Reduce(3, NT_fields_pat_single, yy_action_699) + _ => Error + } } -fn yy_state_169(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_580(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_COLON => Shift(yy_state_170) - T_COMMA => Shift(yy_state_173) - T_RPAREN => Shift(yy_state_177) + T_COLON => Shift(yy_state_581) + T_COMMA | T_RBRACE => Reduce(1, NT_fields_pat_single, yy_action_697) _ => Error } } -fn yy_state_170(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_581(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_ASYNC => Shift(yy_state_52) - T_UNDERSCORE => Shift(yy_state_57) - T_AMPER => Shift(yy_state_58) - T_PACKAGE_NAME => Shift(yy_state_60) - T_UIDENT => Shift(yy_state_67) - T_LPAREN => Shift(yy_state_71) - NT_simple_type => Shift(yy_state_97) - NT_type_ => Shift(yy_state_171) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + T_UIDENT => Shift(yy_state_195) + T_LBRACE => Shift(yy_state_448) + T_LBRACKET => Shift(yy_state_452) + T_LPAREN => Shift(yy_state_466) + NT_constr => Shift(yy_state_467) + T_EXTEND => Shift(yy_state_480) + T_LIDENT => Shift(yy_state_487) + T_UNDERSCORE => Shift(yy_state_491) + T_BYTES => Shift(yy_state_492) + T_STRING => Shift(yy_state_493) + T_MINUS => Shift(yy_state_494) + T_FLOAT => Shift(yy_state_498) + T_DOUBLE => Shift(yy_state_499) + T_BYTE => Shift(yy_state_500) + T_INT => Shift(yy_state_501) + T_CHAR => Shift(yy_state_502) + T_FALSE => Shift(yy_state_503) + T_TRUE => Shift(yy_state_504) + NT_simple_pattern => Shift(yy_state_505) + NT_type_name => Shift(yy_state_508) + T_PACKAGE_NAME => Shift(yy_state_513) + NT_range_pattern => Shift(yy_state_516) + NT_or_pattern => Shift(yy_state_519) + NT_pattern => Shift(yy_state_582) _ => Error } } -fn yy_state_171(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_582(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RPAREN => Shift(yy_state_172) + T_AS => Shift(yy_state_521) + T_COMMA | T_RBRACE => Reduce(3, NT_fields_pat_single, yy_action_695) _ => Error } } -fn yy_state_172(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(5, NT_tuple_expr, yy_action_785) +fn yy_state_583(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_DOTDOT => Shift(yy_state_584) + _ => Error + } } -fn yy_state_173(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_584(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_multiline_string => Shift(yy_state_2) - T_MULTILINE_INTERP => Shift(yy_state_4) - T_MULTILINE_STRING => Shift(yy_state_5) - T_REGEX_LITERAL => Shift(yy_state_6) - T_STRING => Shift(yy_state_7) - T_FLOAT => Shift(yy_state_8) - T_DOUBLE => Shift(yy_state_9) - T_INT => Shift(yy_state_10) - T_CHAR => Shift(yy_state_11) - T_BYTES => Shift(yy_state_12) - T_BYTE => Shift(yy_state_13) - T_FALSE => Shift(yy_state_14) - T_TRUE => Shift(yy_state_15) - T_INTERP => Shift(yy_state_16) - NT_non_empty_list_multiline_string_ => Shift(yy_state_17) - NT_simple_constant => Shift(yy_state_18) - T_AMPER => Shift(yy_state_19) - NT_qual_ident_ty => Shift(yy_state_25) - NT_tuple_expr => Shift(yy_state_26) - T_LBRACKET => Shift(yy_state_27) - NT_constr => Shift(yy_state_35) - NT_qual_ident_simple_expr => Shift(yy_state_36) - NT_atomic_expr => Shift(yy_state_37) - NT_anony_fn => Shift(yy_state_38) - T_LBRACE => Shift(yy_state_39) - T_FN => Shift(yy_state_48) - NT_type_name => Shift(yy_state_126) - T_ASYNC => Shift(yy_state_138) - NT_simple_expr => Shift(yy_state_151) - T_EXCLAMATION => Shift(yy_state_162) - NT_non_empty_tuple_elems => Shift(yy_state_174) - T_RPAREN => Shift(yy_state_175) - NT_expr => Shift(yy_state_176) - T_MINUS => Shift(yy_state_178) - T_PLUS => Shift(yy_state_180) - T_UIDENT => Shift(yy_state_182) - T_PACKAGE_NAME => Shift(yy_state_183) - NT_prefix_expr => Shift(yy_state_187) - NT_range_expr => Shift(yy_state_198) - NT_postfix_expr => Shift(yy_state_416) - T_EXISTS => Shift(yy_state_417) - T_FORALL => Shift(yy_state_449) - NT_infix_expr => Shift(yy_state_455) - T_UNDERSCORE => Shift(yy_state_456) - T_LPAREN => Shift(yy_state_464) - NT_pipe_expr => Shift(yy_state_497) - NT_arrow_fn_expr => Shift(yy_state_513) - NT_quantifier_expr => Shift(yy_state_514) - NT_simple_try_expr => Shift(yy_state_515) - NT_lexmatch_expr => Shift(yy_state_516) - NT_match_expr => Shift(yy_state_517) - NT_if_expr => Shift(yy_state_518) - NT_try_expr => Shift(yy_state_519) - NT_while_expr => Shift(yy_state_520) - NT_foreach_expr => Shift(yy_state_521) - NT_for_expr => Shift(yy_state_522) - T_LEXMATCH => Shift(yy_state_523) - NT_lexmatch_header => Shift(yy_state_529) - NT_match_header => Shift(yy_state_540) - T_MATCH => Shift(yy_state_550) - T_IF => Shift(yy_state_553) - T_TRY_EXCLAMATION => Shift(yy_state_559) - T_TRY_QUESTION => Shift(yy_state_561) - T_TRY => Shift(yy_state_563) - NT_loop_label_colon => Shift(yy_state_577) - T_POST_LABEL => Shift(yy_state_585) - T_LIDENT => Shift(yy_state_587) - T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_902) + T_COMMA => Shift(yy_state_473) + NT_option_COMMA_ => Shift(yy_state_585) + T_RBRACE => Reduce(0, NT_option_COMMA_, yy_action_1044) _ => Error } } -fn yy_state_174(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_non_empty_tuple_elems, yy_action_784) +fn yy_state_585(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_non_empty_map_elems_pat, yy_action_694) } -fn yy_state_175(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_non_empty_tuple_elems, yy_action_783) +fn yy_state_586(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_non_empty_map_elems_pat, yy_action_693) } -fn yy_state_176(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_587(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_COMMA => Shift(yy_state_173) - T_RPAREN => Shift(yy_state_177) + T_DOTDOT => Shift(yy_state_588) _ => Error } } -fn yy_state_177(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(2, NT_non_empty_tuple_elems, yy_action_782) -} - -fn yy_state_178(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_588(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_multiline_string => Shift(yy_state_2) - T_MULTILINE_INTERP => Shift(yy_state_4) - T_MULTILINE_STRING => Shift(yy_state_5) - T_REGEX_LITERAL => Shift(yy_state_6) - T_STRING => Shift(yy_state_7) - T_FLOAT => Shift(yy_state_8) - T_DOUBLE => Shift(yy_state_9) - T_INT => Shift(yy_state_10) - T_CHAR => Shift(yy_state_11) - T_BYTES => Shift(yy_state_12) - T_BYTE => Shift(yy_state_13) - T_FALSE => Shift(yy_state_14) - T_TRUE => Shift(yy_state_15) - T_INTERP => Shift(yy_state_16) - NT_non_empty_list_multiline_string_ => Shift(yy_state_17) - NT_simple_constant => Shift(yy_state_18) - T_AMPER => Shift(yy_state_19) - NT_qual_ident_ty => Shift(yy_state_25) - NT_tuple_expr => Shift(yy_state_26) - T_LBRACKET => Shift(yy_state_27) - NT_constr => Shift(yy_state_35) - NT_qual_ident_simple_expr => Shift(yy_state_36) - NT_atomic_expr => Shift(yy_state_37) - NT_anony_fn => Shift(yy_state_38) - T_LBRACE => Shift(yy_state_39) - T_FN => Shift(yy_state_48) - NT_type_name => Shift(yy_state_126) - T_ASYNC => Shift(yy_state_138) - NT_simple_expr => Shift(yy_state_151) - T_EXCLAMATION => Shift(yy_state_162) - T_UNDERSCORE => Shift(yy_state_163) - T_LPAREN => Shift(yy_state_164) - T_MINUS => Shift(yy_state_178) - NT_prefix_expr => Shift(yy_state_179) - T_PLUS => Shift(yy_state_180) - T_UIDENT => Shift(yy_state_182) - T_PACKAGE_NAME => Shift(yy_state_183) - T_LIDENT => Shift(yy_state_186) + T_COMMA => Shift(yy_state_473) + NT_option_COMMA_ => Shift(yy_state_589) + T_RBRACE => Reduce(0, NT_option_COMMA_, yy_action_1044) _ => Error } } -fn yy_state_179(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(2, NT_prefix_expr, yy_action_779) +fn yy_state_589(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_non_empty_fields_pat, yy_action_692) } -fn yy_state_180(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_590(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_non_empty_fields_pat, yy_action_691) +} + +fn yy_state_591(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_multiline_string => Shift(yy_state_2) - T_MULTILINE_INTERP => Shift(yy_state_4) - T_MULTILINE_STRING => Shift(yy_state_5) - T_REGEX_LITERAL => Shift(yy_state_6) - T_STRING => Shift(yy_state_7) - T_FLOAT => Shift(yy_state_8) - T_DOUBLE => Shift(yy_state_9) - T_INT => Shift(yy_state_10) - T_CHAR => Shift(yy_state_11) - T_BYTES => Shift(yy_state_12) - T_BYTE => Shift(yy_state_13) - T_FALSE => Shift(yy_state_14) - T_TRUE => Shift(yy_state_15) - T_INTERP => Shift(yy_state_16) - NT_non_empty_list_multiline_string_ => Shift(yy_state_17) - NT_simple_constant => Shift(yy_state_18) - T_AMPER => Shift(yy_state_19) - NT_qual_ident_ty => Shift(yy_state_25) - NT_tuple_expr => Shift(yy_state_26) - T_LBRACKET => Shift(yy_state_27) - NT_constr => Shift(yy_state_35) - NT_qual_ident_simple_expr => Shift(yy_state_36) - NT_atomic_expr => Shift(yy_state_37) - NT_anony_fn => Shift(yy_state_38) - T_LBRACE => Shift(yy_state_39) - T_FN => Shift(yy_state_48) - NT_type_name => Shift(yy_state_126) - T_ASYNC => Shift(yy_state_138) - NT_simple_expr => Shift(yy_state_151) - T_EXCLAMATION => Shift(yy_state_162) - T_UNDERSCORE => Shift(yy_state_163) - T_LPAREN => Shift(yy_state_164) - T_MINUS => Shift(yy_state_178) - T_PLUS => Shift(yy_state_180) - NT_prefix_expr => Shift(yy_state_181) - T_UIDENT => Shift(yy_state_182) - T_PACKAGE_NAME => Shift(yy_state_183) - T_LIDENT => Shift(yy_state_186) + T_RBRACE => Shift(yy_state_592) _ => Error } } -fn yy_state_181(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(2, NT_prefix_expr, yy_action_776) +fn yy_state_592(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_simple_pattern, yy_action_690) } -fn yy_state_182(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_593(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_COLONCOLON => Reduce(1, NT_qual_ident_ty, yy_action_881) - T_INFIX1 | T_INFIX2 | T_INFIX3 | T_INFIX4 | T_EOF | T_WITH | T_CATCH | T_EQUAL | T_EQ_TILDE | T_LPAREN | T_RPAREN | T_COMMA | T_MINUS | T_DOT_LIDENT | T_DOT_INT | T_COLON | T_SEMI | T_LBRACKET | T_PLUS | T_RBRACKET | T_BAR | T_LBRACE | T_RBRACE | T_AMPERAMPER | T_AMPER | T_CARET | T_BARBAR | T_AS | T_PIPE | T_PIPE_LEFT | T_LT_PLUS | T_ELSE | T_IF | T_FAT_ARROW | T_DOTDOT | T_RANGE_INCLUSIVE | T_RANGE_LT_INCLUSIVE | T_RANGE_EXCLUSIVE | T_RANGE_INCLUSIVE_REV | T_RANGE_EXCLUSIVE_REV | T_IS | T_AND | T_IMPLIES | T_LEXMATCH_QUESTION => Reduce(1, NT_constr, yy_action_775) + T_RBRACE => Shift(yy_state_594) _ => Error } } -fn yy_state_183(_lookahead : YYSymbol) -> YYDecision { - match _lookahead { - T_DOT_UIDENT => Shift(yy_state_184) - T_DOT_LIDENT => Shift(yy_state_185) - _ => Error - } +fn yy_state_594(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_simple_pattern, yy_action_689) } -fn yy_state_184(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_595(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_COLONCOLON => Reduce(2, NT_qual_ident_ty, yy_action_883) - T_INFIX1 | T_INFIX2 | T_INFIX3 | T_INFIX4 | T_EOF | T_WITH | T_CATCH | T_EQUAL | T_EQ_TILDE | T_LPAREN | T_RPAREN | T_COMMA | T_MINUS | T_DOT_LIDENT | T_DOT_INT | T_COLON | T_SEMI | T_LBRACKET | T_PLUS | T_RBRACKET | T_BAR | T_LBRACE | T_RBRACE | T_AMPERAMPER | T_AMPER | T_CARET | T_BARBAR | T_AS | T_PIPE | T_PIPE_LEFT | T_LT_PLUS | T_ELSE | T_IF | T_FAT_ARROW | T_DOTDOT | T_RANGE_INCLUSIVE | T_RANGE_LT_INCLUSIVE | T_RANGE_EXCLUSIVE | T_RANGE_INCLUSIVE_REV | T_RANGE_EXCLUSIVE_REV | T_IS | T_AND | T_IMPLIES | T_LEXMATCH_QUESTION => Reduce(2, NT_constr, yy_action_774) + T_COMMA => Shift(yy_state_473) + NT_option_COMMA_ => Shift(yy_state_596) + T_RBRACE => Reduce(0, NT_option_COMMA_, yy_action_1044) _ => Error } } -fn yy_state_185(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_596(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_INFIX1 | T_INFIX2 | T_INFIX3 | T_INFIX4 | T_EOF | T_WITH | T_CATCH | T_EQ_TILDE | T_LPAREN | T_RPAREN | T_COMMA | T_MINUS | T_DOT_LIDENT | T_DOT_INT | T_COLON | T_SEMI | T_LBRACKET | T_PLUS | T_RBRACKET | T_BAR | T_LBRACE | T_RBRACE | T_AMPERAMPER | T_AMPER | T_CARET | T_BARBAR | T_AS | T_PIPE | T_PIPE_LEFT | T_LT_PLUS | T_ELSE | T_IF | T_FAT_ARROW | T_DOTDOT | T_RANGE_INCLUSIVE | T_RANGE_LT_INCLUSIVE | T_RANGE_EXCLUSIVE | T_RANGE_INCLUSIVE_REV | T_RANGE_EXCLUSIVE_REV | T_IS | T_AND | T_IMPLIES | T_LEXMATCH_QUESTION => Reduce(2, NT_qual_ident_simple_expr, yy_action_773) - T_COLONCOLON => Reduce(2, NT_qual_ident_ty, yy_action_882) + T_RBRACE => Shift(yy_state_597) _ => Error } } -fn yy_state_186(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_qual_ident_simple_expr, yy_action_772) +fn yy_state_597(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(4, NT_simple_pattern, yy_action_688) } -fn yy_state_187(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_598(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(2, NT_simple_pattern, yy_action_687) +} + +fn yy_state_599(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_single_pattern_case, yy_action_686) +} + +fn yy_state_600(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RANGE_EXCLUSIVE_REV => Shift(yy_state_188) - T_RANGE_INCLUSIVE_REV => Shift(yy_state_190) - T_RANGE_LT_INCLUSIVE => Shift(yy_state_192) - T_RANGE_INCLUSIVE => Shift(yy_state_194) - T_RANGE_EXCLUSIVE => Shift(yy_state_196) - T_INFIX1 | T_INFIX2 | T_INFIX3 | T_INFIX4 | T_EOF | T_WITH | T_CATCH | T_EQ_TILDE | T_RPAREN | T_COMMA | T_MINUS | T_COLON | T_SEMI | T_PLUS | T_RBRACKET | T_BAR | T_LBRACE | T_RBRACE | T_AMPERAMPER | T_AMPER | T_CARET | T_BARBAR | T_AS | T_PIPE | T_PIPE_LEFT | T_LT_PLUS | T_ELSE | T_IF | T_FAT_ARROW | T_IS | T_AND | T_IMPLIES | T_LEXMATCH_QUESTION => Reduce(1, NT_range_expr, yy_action_771) + T_AS => Shift(yy_state_521) + T_IF => Shift(yy_state_601) + NT_option_preceded_IF_infix_expr__ => Shift(yy_state_603) + T_FAT_ARROW => Reduce(0, NT_option_preceded_IF_infix_expr__, yy_action_685) _ => Error } } -fn yy_state_188(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_601(_lookahead : YYSymbol) -> YYDecision { match _lookahead { NT_multiline_string => Shift(yy_state_2) T_MULTILINE_INTERP => Shift(yy_state_4) @@ -19112,88 +28295,68 @@ fn yy_state_188(_lookahead : YYSymbol) -> YYDecision { T_BYTE => Shift(yy_state_13) T_FALSE => Shift(yy_state_14) T_TRUE => Shift(yy_state_15) - T_INTERP => Shift(yy_state_16) - NT_non_empty_list_multiline_string_ => Shift(yy_state_17) - NT_simple_constant => Shift(yy_state_18) - T_AMPER => Shift(yy_state_19) - NT_qual_ident_ty => Shift(yy_state_25) - NT_tuple_expr => Shift(yy_state_26) - T_LBRACKET => Shift(yy_state_27) - NT_constr => Shift(yy_state_35) - NT_qual_ident_simple_expr => Shift(yy_state_36) - NT_atomic_expr => Shift(yy_state_37) - NT_anony_fn => Shift(yy_state_38) - T_LBRACE => Shift(yy_state_39) - T_FN => Shift(yy_state_48) - NT_type_name => Shift(yy_state_126) - T_ASYNC => Shift(yy_state_138) - NT_simple_expr => Shift(yy_state_151) - T_EXCLAMATION => Shift(yy_state_162) - T_UNDERSCORE => Shift(yy_state_163) - T_LPAREN => Shift(yy_state_164) - T_MINUS => Shift(yy_state_178) - T_PLUS => Shift(yy_state_180) - T_UIDENT => Shift(yy_state_182) - T_PACKAGE_NAME => Shift(yy_state_183) - T_LIDENT => Shift(yy_state_186) - NT_prefix_expr => Shift(yy_state_189) + T_BYTES_INTERP => Shift(yy_state_16) + T_INTERP => Shift(yy_state_17) + NT_non_empty_list_multiline_string_ => Shift(yy_state_18) + NT_simple_constant => Shift(yy_state_19) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + NT_tuple_expr => Shift(yy_state_27) + T_LBRACKET_BAR => Shift(yy_state_28) + T_LBRACKET => Shift(yy_state_36) + NT_constr => Shift(yy_state_47) + NT_qual_ident_simple_expr => Shift(yy_state_48) + T_UNDERSCORE => Shift(yy_state_49) + NT_atomic_expr => Shift(yy_state_50) + NT_anony_fn => Shift(yy_state_51) + T_LBRACE => Shift(yy_state_52) + T_FN => Shift(yy_state_61) + NT_type_name => Shift(yy_state_139) + T_ASYNC => Shift(yy_state_152) + NT_simple_expr => Shift(yy_state_165) + T_EXCLAMATION => Shift(yy_state_176) + T_LPAREN => Shift(yy_state_177) + T_MINUS => Shift(yy_state_191) + T_PLUS => Shift(yy_state_193) + T_UIDENT => Shift(yy_state_195) + T_PACKAGE_NAME => Shift(yy_state_196) + T_EXTEND => Shift(yy_state_199) + T_LIDENT => Shift(yy_state_200) + NT_prefix_expr => Shift(yy_state_201) + NT_range_expr => Shift(yy_state_212) + NT_postfix_expr => Shift(yy_state_223) + NT_infix_expr => Shift(yy_state_602) _ => Error } } -fn yy_state_189(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_range_expr, yy_action_770) -} - -fn yy_state_190(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_602(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_multiline_string => Shift(yy_state_2) - T_MULTILINE_INTERP => Shift(yy_state_4) - T_MULTILINE_STRING => Shift(yy_state_5) - T_REGEX_LITERAL => Shift(yy_state_6) - T_STRING => Shift(yy_state_7) - T_FLOAT => Shift(yy_state_8) - T_DOUBLE => Shift(yy_state_9) - T_INT => Shift(yy_state_10) - T_CHAR => Shift(yy_state_11) - T_BYTES => Shift(yy_state_12) - T_BYTE => Shift(yy_state_13) - T_FALSE => Shift(yy_state_14) - T_TRUE => Shift(yy_state_15) - T_INTERP => Shift(yy_state_16) - NT_non_empty_list_multiline_string_ => Shift(yy_state_17) - NT_simple_constant => Shift(yy_state_18) - T_AMPER => Shift(yy_state_19) - NT_qual_ident_ty => Shift(yy_state_25) - NT_tuple_expr => Shift(yy_state_26) - T_LBRACKET => Shift(yy_state_27) - NT_constr => Shift(yy_state_35) - NT_qual_ident_simple_expr => Shift(yy_state_36) - NT_atomic_expr => Shift(yy_state_37) - NT_anony_fn => Shift(yy_state_38) - T_LBRACE => Shift(yy_state_39) - T_FN => Shift(yy_state_48) - NT_type_name => Shift(yy_state_126) - T_ASYNC => Shift(yy_state_138) - NT_simple_expr => Shift(yy_state_151) - T_EXCLAMATION => Shift(yy_state_162) - T_UNDERSCORE => Shift(yy_state_163) - T_LPAREN => Shift(yy_state_164) - T_MINUS => Shift(yy_state_178) - T_PLUS => Shift(yy_state_180) - T_UIDENT => Shift(yy_state_182) - T_PACKAGE_NAME => Shift(yy_state_183) - T_LIDENT => Shift(yy_state_186) - NT_prefix_expr => Shift(yy_state_191) + T_BARBAR => Shift(yy_state_230) + T_AMPERAMPER => Shift(yy_state_232) + T_BAR => Shift(yy_state_234) + T_CARET => Shift(yy_state_236) + T_AMPER => Shift(yy_state_238) + T_MINUS => Shift(yy_state_240) + T_PLUS => Shift(yy_state_242) + T_INFIX1 => Shift(yy_state_244) + T_INFIX2 => Shift(yy_state_246) + T_INFIX3 => Shift(yy_state_248) + T_INFIX4 => Shift(yy_state_250) + T_IMPLIES => Shift(yy_state_252) + T_FAT_ARROW => Reduce(2, NT_option_preceded_IF_infix_expr__, yy_action_683) _ => Error } } -fn yy_state_191(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_range_expr, yy_action_769) +fn yy_state_603(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_FAT_ARROW => Shift(yy_state_604) + _ => Error + } } -fn yy_state_192(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_604(_lookahead : YYSymbol) -> YYDecision { match _lookahead { NT_multiline_string => Shift(yy_state_2) T_MULTILINE_INTERP => Shift(yy_state_4) @@ -19208,40 +28371,79 @@ fn yy_state_192(_lookahead : YYSymbol) -> YYDecision { T_BYTE => Shift(yy_state_13) T_FALSE => Shift(yy_state_14) T_TRUE => Shift(yy_state_15) - T_INTERP => Shift(yy_state_16) - NT_non_empty_list_multiline_string_ => Shift(yy_state_17) - NT_simple_constant => Shift(yy_state_18) - T_AMPER => Shift(yy_state_19) - NT_qual_ident_ty => Shift(yy_state_25) - NT_tuple_expr => Shift(yy_state_26) - T_LBRACKET => Shift(yy_state_27) - NT_constr => Shift(yy_state_35) - NT_qual_ident_simple_expr => Shift(yy_state_36) - NT_atomic_expr => Shift(yy_state_37) - NT_anony_fn => Shift(yy_state_38) - T_LBRACE => Shift(yy_state_39) - T_FN => Shift(yy_state_48) - NT_type_name => Shift(yy_state_126) - T_ASYNC => Shift(yy_state_138) - NT_simple_expr => Shift(yy_state_151) - T_EXCLAMATION => Shift(yy_state_162) - T_UNDERSCORE => Shift(yy_state_163) - T_LPAREN => Shift(yy_state_164) - T_MINUS => Shift(yy_state_178) - T_PLUS => Shift(yy_state_180) - T_UIDENT => Shift(yy_state_182) - T_PACKAGE_NAME => Shift(yy_state_183) - T_LIDENT => Shift(yy_state_186) - NT_prefix_expr => Shift(yy_state_193) + T_BYTES_INTERP => Shift(yy_state_16) + T_INTERP => Shift(yy_state_17) + NT_non_empty_list_multiline_string_ => Shift(yy_state_18) + NT_simple_constant => Shift(yy_state_19) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + NT_tuple_expr => Shift(yy_state_27) + T_LBRACKET_BAR => Shift(yy_state_28) + T_LBRACKET => Shift(yy_state_36) + NT_constr => Shift(yy_state_47) + NT_qual_ident_simple_expr => Shift(yy_state_48) + NT_atomic_expr => Shift(yy_state_50) + NT_anony_fn => Shift(yy_state_51) + T_LBRACE => Shift(yy_state_52) + T_FN => Shift(yy_state_61) + NT_type_name => Shift(yy_state_139) + T_ASYNC => Shift(yy_state_152) + T_EXCLAMATION => Shift(yy_state_176) + T_MINUS => Shift(yy_state_191) + T_PLUS => Shift(yy_state_193) + T_UIDENT => Shift(yy_state_195) + NT_prefix_expr => Shift(yy_state_201) + NT_range_expr => Shift(yy_state_212) + NT_postfix_expr => Shift(yy_state_223) + T_EXISTS => Shift(yy_state_224) + T_FORALL => Shift(yy_state_256) + NT_infix_expr => Shift(yy_state_272) + T_UNDERSCORE => Shift(yy_state_273) + NT_qual_ident => Shift(yy_state_275) + NT_simple_expr => Shift(yy_state_276) + T_LPAREN => Shift(yy_state_281) + NT_pipe_expr => Shift(yy_state_325) + NT_arrow_fn_expr => Shift(yy_state_344) + NT_quantifier_expr => Shift(yy_state_345) + NT_simple_try_expr => Shift(yy_state_346) + NT_lexscan_expr => Shift(yy_state_347) + NT_lexmatch_expr => Shift(yy_state_348) + NT_match_expr => Shift(yy_state_349) + NT_if_expr => Shift(yy_state_350) + NT_try_expr => Shift(yy_state_351) + NT_while_expr => Shift(yy_state_352) + NT_foreach_expr => Shift(yy_state_353) + NT_for_expr => Shift(yy_state_354) + T_LEXSCAN => Shift(yy_state_355) + NT_lexscan_header => Shift(yy_state_358) + T_LEXMATCH => Shift(yy_state_391) + NT_lexmatch_header => Shift(yy_state_399) + NT_match_header => Shift(yy_state_444) + T_MATCH => Shift(yy_state_605) + T_IF => Shift(yy_state_608) + T_TRY_EXCLAMATION => Shift(yy_state_614) + T_TRY_QUESTION => Shift(yy_state_616) + T_TRY => Shift(yy_state_618) + NT_expr_statement => Shift(yy_state_631) + NT_loop_label_colon => Shift(yy_state_632) + T_POST_LABEL => Shift(yy_state_639) + NT_expr => Shift(yy_state_644) + NT_left_value => Shift(yy_state_645) + T_ELLIPSIS => Shift(yy_state_651) + T_RAISE => Shift(yy_state_652) + T_PACKAGE_NAME => Shift(yy_state_654) + T_EXTEND => Shift(yy_state_656) + T_LIDENT => Shift(yy_state_657) + NT_expr_statement_no_break_continue_return => Shift(yy_state_734) + T_RETURN => Shift(yy_state_735) + T_CONTINUE => Shift(yy_state_738) + T_BREAK => Shift(yy_state_747) + T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_1071) _ => Error } } -fn yy_state_193(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_range_expr, yy_action_768) -} - -fn yy_state_194(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_605(_lookahead : YYSymbol) -> YYDecision { match _lookahead { NT_multiline_string => Shift(yy_state_2) T_MULTILINE_INTERP => Shift(yy_state_4) @@ -19256,40 +28458,65 @@ fn yy_state_194(_lookahead : YYSymbol) -> YYDecision { T_BYTE => Shift(yy_state_13) T_FALSE => Shift(yy_state_14) T_TRUE => Shift(yy_state_15) - T_INTERP => Shift(yy_state_16) - NT_non_empty_list_multiline_string_ => Shift(yy_state_17) - NT_simple_constant => Shift(yy_state_18) - T_AMPER => Shift(yy_state_19) - NT_qual_ident_ty => Shift(yy_state_25) - NT_tuple_expr => Shift(yy_state_26) - T_LBRACKET => Shift(yy_state_27) - NT_constr => Shift(yy_state_35) - NT_qual_ident_simple_expr => Shift(yy_state_36) - NT_atomic_expr => Shift(yy_state_37) - NT_anony_fn => Shift(yy_state_38) - T_LBRACE => Shift(yy_state_39) - T_FN => Shift(yy_state_48) - NT_type_name => Shift(yy_state_126) - T_ASYNC => Shift(yy_state_138) - NT_simple_expr => Shift(yy_state_151) - T_EXCLAMATION => Shift(yy_state_162) - T_UNDERSCORE => Shift(yy_state_163) - T_LPAREN => Shift(yy_state_164) - T_MINUS => Shift(yy_state_178) - T_PLUS => Shift(yy_state_180) - T_UIDENT => Shift(yy_state_182) - T_PACKAGE_NAME => Shift(yy_state_183) - T_LIDENT => Shift(yy_state_186) - NT_prefix_expr => Shift(yy_state_195) + T_BYTES_INTERP => Shift(yy_state_16) + T_INTERP => Shift(yy_state_17) + NT_non_empty_list_multiline_string_ => Shift(yy_state_18) + NT_simple_constant => Shift(yy_state_19) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + NT_tuple_expr => Shift(yy_state_27) + T_LBRACKET_BAR => Shift(yy_state_28) + T_LBRACKET => Shift(yy_state_36) + NT_constr => Shift(yy_state_47) + NT_qual_ident_simple_expr => Shift(yy_state_48) + T_UNDERSCORE => Shift(yy_state_49) + NT_atomic_expr => Shift(yy_state_50) + NT_anony_fn => Shift(yy_state_51) + T_LBRACE => Shift(yy_state_52) + T_FN => Shift(yy_state_61) + NT_type_name => Shift(yy_state_139) + T_ASYNC => Shift(yy_state_152) + NT_simple_expr => Shift(yy_state_165) + T_EXCLAMATION => Shift(yy_state_176) + T_LPAREN => Shift(yy_state_177) + T_MINUS => Shift(yy_state_191) + T_PLUS => Shift(yy_state_193) + T_UIDENT => Shift(yy_state_195) + T_PACKAGE_NAME => Shift(yy_state_196) + T_EXTEND => Shift(yy_state_199) + T_LIDENT => Shift(yy_state_200) + NT_prefix_expr => Shift(yy_state_201) + NT_range_expr => Shift(yy_state_212) + NT_postfix_expr => Shift(yy_state_223) + NT_infix_expr => Shift(yy_state_606) _ => Error } } -fn yy_state_195(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_range_expr, yy_action_767) +fn yy_state_606(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_BARBAR => Shift(yy_state_230) + T_AMPERAMPER => Shift(yy_state_232) + T_BAR => Shift(yy_state_234) + T_CARET => Shift(yy_state_236) + T_AMPER => Shift(yy_state_238) + T_MINUS => Shift(yy_state_240) + T_PLUS => Shift(yy_state_242) + T_INFIX1 => Shift(yy_state_244) + T_INFIX2 => Shift(yy_state_246) + T_INFIX3 => Shift(yy_state_248) + T_INFIX4 => Shift(yy_state_250) + T_IMPLIES => Shift(yy_state_252) + T_LBRACE => Shift(yy_state_607) + _ => Error + } } -fn yy_state_196(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_607(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_match_header, yy_action_682) +} + +fn yy_state_608(_lookahead : YYSymbol) -> YYDecision { match _lookahead { NT_multiline_string => Shift(yy_state_2) T_MULTILINE_INTERP => Shift(yy_state_4) @@ -19304,600 +28531,835 @@ fn yy_state_196(_lookahead : YYSymbol) -> YYDecision { T_BYTE => Shift(yy_state_13) T_FALSE => Shift(yy_state_14) T_TRUE => Shift(yy_state_15) - T_INTERP => Shift(yy_state_16) - NT_non_empty_list_multiline_string_ => Shift(yy_state_17) - NT_simple_constant => Shift(yy_state_18) - T_AMPER => Shift(yy_state_19) - NT_qual_ident_ty => Shift(yy_state_25) - NT_tuple_expr => Shift(yy_state_26) - T_LBRACKET => Shift(yy_state_27) - NT_constr => Shift(yy_state_35) - NT_qual_ident_simple_expr => Shift(yy_state_36) - NT_atomic_expr => Shift(yy_state_37) - NT_anony_fn => Shift(yy_state_38) - T_LBRACE => Shift(yy_state_39) - T_FN => Shift(yy_state_48) - NT_type_name => Shift(yy_state_126) - T_ASYNC => Shift(yy_state_138) - NT_simple_expr => Shift(yy_state_151) - T_EXCLAMATION => Shift(yy_state_162) - T_UNDERSCORE => Shift(yy_state_163) - T_LPAREN => Shift(yy_state_164) - T_MINUS => Shift(yy_state_178) - T_PLUS => Shift(yy_state_180) - T_UIDENT => Shift(yy_state_182) - T_PACKAGE_NAME => Shift(yy_state_183) - T_LIDENT => Shift(yy_state_186) - NT_prefix_expr => Shift(yy_state_197) - _ => Error - } -} - -fn yy_state_197(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_range_expr, yy_action_766) -} - -fn yy_state_198(_lookahead : YYSymbol) -> YYDecision { - match _lookahead { - T_LT_PLUS => Shift(yy_state_199) - T_EQ_TILDE => Shift(yy_state_204) - T_LEXMATCH_QUESTION => Shift(yy_state_239) - T_IS => Shift(yy_state_274) - T_AS => Shift(yy_state_414) - T_INFIX1 | T_INFIX2 | T_INFIX3 | T_INFIX4 | T_EOF | T_WITH | T_CATCH | T_RPAREN | T_COMMA | T_MINUS | T_COLON | T_SEMI | T_PLUS | T_RBRACKET | T_BAR | T_LBRACE | T_RBRACE | T_AMPERAMPER | T_AMPER | T_CARET | T_BARBAR | T_PIPE | T_PIPE_LEFT | T_ELSE | T_IF | T_FAT_ARROW | T_AND | T_IMPLIES => Reduce(1, NT_postfix_expr, yy_action_765) + T_BYTES_INTERP => Shift(yy_state_16) + T_INTERP => Shift(yy_state_17) + NT_non_empty_list_multiline_string_ => Shift(yy_state_18) + NT_simple_constant => Shift(yy_state_19) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + NT_tuple_expr => Shift(yy_state_27) + T_LBRACKET_BAR => Shift(yy_state_28) + T_LBRACKET => Shift(yy_state_36) + NT_constr => Shift(yy_state_47) + NT_qual_ident_simple_expr => Shift(yy_state_48) + T_UNDERSCORE => Shift(yy_state_49) + NT_atomic_expr => Shift(yy_state_50) + NT_anony_fn => Shift(yy_state_51) + T_LBRACE => Shift(yy_state_52) + T_FN => Shift(yy_state_61) + NT_type_name => Shift(yy_state_139) + T_ASYNC => Shift(yy_state_152) + NT_simple_expr => Shift(yy_state_165) + T_EXCLAMATION => Shift(yy_state_176) + T_LPAREN => Shift(yy_state_177) + T_MINUS => Shift(yy_state_191) + T_PLUS => Shift(yy_state_193) + T_UIDENT => Shift(yy_state_195) + T_PACKAGE_NAME => Shift(yy_state_196) + T_EXTEND => Shift(yy_state_199) + T_LIDENT => Shift(yy_state_200) + NT_prefix_expr => Shift(yy_state_201) + NT_range_expr => Shift(yy_state_212) + NT_postfix_expr => Shift(yy_state_223) + NT_infix_expr => Shift(yy_state_609) _ => Error } } -fn yy_state_199(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_609(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_multiline_string => Shift(yy_state_2) - T_MULTILINE_INTERP => Shift(yy_state_4) - T_MULTILINE_STRING => Shift(yy_state_5) - NT_template_rhs => Shift(yy_state_200) - NT_non_empty_list_multiline_string_ => Shift(yy_state_201) - T_STRING => Shift(yy_state_202) - T_INTERP => Shift(yy_state_203) + T_LBRACE => Shift(yy_state_133) + T_BARBAR => Shift(yy_state_230) + T_AMPERAMPER => Shift(yy_state_232) + T_BAR => Shift(yy_state_234) + T_CARET => Shift(yy_state_236) + T_AMPER => Shift(yy_state_238) + T_MINUS => Shift(yy_state_240) + T_PLUS => Shift(yy_state_242) + T_INFIX1 => Shift(yy_state_244) + T_INFIX2 => Shift(yy_state_246) + T_INFIX3 => Shift(yy_state_248) + T_INFIX4 => Shift(yy_state_250) + T_IMPLIES => Shift(yy_state_252) + NT_block_expr => Shift(yy_state_610) _ => Error } } -fn yy_state_200(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_postfix_expr, yy_action_764) -} - -fn yy_state_201(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_template_rhs, yy_action_763) -} - -fn yy_state_202(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_template_rhs, yy_action_762) -} - -fn yy_state_203(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_template_rhs, yy_action_761) -} - -fn yy_state_204(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_610(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_PACKAGE_NAME => Shift(yy_state_205) - T_UIDENT => Shift(yy_state_207) - T_REGEX_LITERAL => Shift(yy_state_208) - T_LPAREN => Shift(yy_state_209) - NT_regex_atom_pattern => Shift(yy_state_237) - NT_regex_match_rhs => Shift(yy_state_238) + T_ELSE => Shift(yy_state_611) + T_EOF | T_RPAREN | T_COMMA | T_COLON | T_SEMI | T_RBRACKET | T_BAR_RBRACKET | T_LBRACE | T_RBRACE | T_AND => Reduce(3, NT_if_expr, yy_action_681) _ => Error } } -fn yy_state_205(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_611(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_DOT_UIDENT => Shift(yy_state_206) + T_LBRACE => Shift(yy_state_133) + T_IF => Shift(yy_state_608) + NT_if_expr => Shift(yy_state_612) + NT_block_expr => Shift(yy_state_613) _ => Error } } -fn yy_state_206(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(2, NT_regex_atom_pattern, yy_action_760) -} - -fn yy_state_207(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_regex_atom_pattern, yy_action_759) -} - -fn yy_state_208(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_regex_atom_pattern, yy_action_758) -} - -fn yy_state_209(_lookahead : YYSymbol) -> YYDecision { - match _lookahead { - T_PACKAGE_NAME => Shift(yy_state_205) - T_UIDENT => Shift(yy_state_207) - T_REGEX_LITERAL => Shift(yy_state_208) - T_LPAREN => Shift(yy_state_210) - NT_regex_sequence_pattern => Shift(yy_state_213) - NT_regex_atom_pattern => Shift(yy_state_216) - NT_regex_or_pattern => Shift(yy_state_219) - NT_regex_as_pattern => Shift(yy_state_223) - _ => Error - } +fn yy_state_612(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(5, NT_if_expr, yy_action_680) } -fn yy_state_210(_lookahead : YYSymbol) -> YYDecision { - match _lookahead { - T_PACKAGE_NAME => Shift(yy_state_205) - T_UIDENT => Shift(yy_state_207) - T_REGEX_LITERAL => Shift(yy_state_208) - T_LPAREN => Shift(yy_state_210) - NT_regex_as_pattern => Shift(yy_state_211) - NT_regex_sequence_pattern => Shift(yy_state_213) - NT_regex_atom_pattern => Shift(yy_state_216) - NT_regex_or_pattern => Shift(yy_state_219) - _ => Error - } +fn yy_state_613(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(5, NT_if_expr, yy_action_679) } -fn yy_state_211(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_614(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RPAREN => Shift(yy_state_212) + NT_multiline_string => Shift(yy_state_2) + T_MULTILINE_INTERP => Shift(yy_state_4) + T_MULTILINE_STRING => Shift(yy_state_5) + T_REGEX_LITERAL => Shift(yy_state_6) + T_STRING => Shift(yy_state_7) + T_FLOAT => Shift(yy_state_8) + T_DOUBLE => Shift(yy_state_9) + T_INT => Shift(yy_state_10) + T_CHAR => Shift(yy_state_11) + T_BYTES => Shift(yy_state_12) + T_BYTE => Shift(yy_state_13) + T_FALSE => Shift(yy_state_14) + T_TRUE => Shift(yy_state_15) + T_BYTES_INTERP => Shift(yy_state_16) + T_INTERP => Shift(yy_state_17) + NT_non_empty_list_multiline_string_ => Shift(yy_state_18) + NT_simple_constant => Shift(yy_state_19) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + NT_tuple_expr => Shift(yy_state_27) + T_LBRACKET_BAR => Shift(yy_state_28) + T_LBRACKET => Shift(yy_state_36) + NT_constr => Shift(yy_state_47) + NT_qual_ident_simple_expr => Shift(yy_state_48) + T_UNDERSCORE => Shift(yy_state_49) + NT_atomic_expr => Shift(yy_state_50) + NT_anony_fn => Shift(yy_state_51) + T_LBRACE => Shift(yy_state_52) + T_FN => Shift(yy_state_61) + NT_type_name => Shift(yy_state_139) + T_ASYNC => Shift(yy_state_152) + NT_simple_expr => Shift(yy_state_165) + T_EXCLAMATION => Shift(yy_state_176) + T_LPAREN => Shift(yy_state_177) + T_MINUS => Shift(yy_state_191) + T_PLUS => Shift(yy_state_193) + T_UIDENT => Shift(yy_state_195) + T_PACKAGE_NAME => Shift(yy_state_196) + T_EXTEND => Shift(yy_state_199) + T_LIDENT => Shift(yy_state_200) + NT_prefix_expr => Shift(yy_state_201) + NT_range_expr => Shift(yy_state_212) + NT_postfix_expr => Shift(yy_state_223) + NT_infix_expr => Shift(yy_state_272) + NT_pipe_expr => Shift(yy_state_615) _ => Error } } -fn yy_state_212(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_regex_atom_pattern, yy_action_757) -} - -fn yy_state_213(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_615(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_PLUS => Shift(yy_state_214) - T_RPAREN | T_COMMA | T_BAR => Reduce(1, NT_regex_or_pattern, yy_action_756) + T_PIPE => Shift(yy_state_326) + T_PIPE_LEFT => Shift(yy_state_334) + T_EOF | T_RPAREN | T_COMMA | T_COLON | T_SEMI | T_RBRACKET | T_BAR_RBRACKET | T_LBRACE | T_RBRACE | T_AND => Reduce(2, NT_try_expr, yy_action_678) _ => Error } } -fn yy_state_214(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_616(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_PACKAGE_NAME => Shift(yy_state_205) - T_UIDENT => Shift(yy_state_207) - T_REGEX_LITERAL => Shift(yy_state_208) - T_LPAREN => Shift(yy_state_210) - NT_regex_atom_pattern => Shift(yy_state_215) + NT_multiline_string => Shift(yy_state_2) + T_MULTILINE_INTERP => Shift(yy_state_4) + T_MULTILINE_STRING => Shift(yy_state_5) + T_REGEX_LITERAL => Shift(yy_state_6) + T_STRING => Shift(yy_state_7) + T_FLOAT => Shift(yy_state_8) + T_DOUBLE => Shift(yy_state_9) + T_INT => Shift(yy_state_10) + T_CHAR => Shift(yy_state_11) + T_BYTES => Shift(yy_state_12) + T_BYTE => Shift(yy_state_13) + T_FALSE => Shift(yy_state_14) + T_TRUE => Shift(yy_state_15) + T_BYTES_INTERP => Shift(yy_state_16) + T_INTERP => Shift(yy_state_17) + NT_non_empty_list_multiline_string_ => Shift(yy_state_18) + NT_simple_constant => Shift(yy_state_19) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + NT_tuple_expr => Shift(yy_state_27) + T_LBRACKET_BAR => Shift(yy_state_28) + T_LBRACKET => Shift(yy_state_36) + NT_constr => Shift(yy_state_47) + NT_qual_ident_simple_expr => Shift(yy_state_48) + T_UNDERSCORE => Shift(yy_state_49) + NT_atomic_expr => Shift(yy_state_50) + NT_anony_fn => Shift(yy_state_51) + T_LBRACE => Shift(yy_state_52) + T_FN => Shift(yy_state_61) + NT_type_name => Shift(yy_state_139) + T_ASYNC => Shift(yy_state_152) + NT_simple_expr => Shift(yy_state_165) + T_EXCLAMATION => Shift(yy_state_176) + T_LPAREN => Shift(yy_state_177) + T_MINUS => Shift(yy_state_191) + T_PLUS => Shift(yy_state_193) + T_UIDENT => Shift(yy_state_195) + T_PACKAGE_NAME => Shift(yy_state_196) + T_EXTEND => Shift(yy_state_199) + T_LIDENT => Shift(yy_state_200) + NT_prefix_expr => Shift(yy_state_201) + NT_range_expr => Shift(yy_state_212) + NT_postfix_expr => Shift(yy_state_223) + NT_infix_expr => Shift(yy_state_272) + NT_pipe_expr => Shift(yy_state_617) _ => Error } } -fn yy_state_215(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_regex_sequence_pattern, yy_action_755) -} - -fn yy_state_216(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_617(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_AS => Shift(yy_state_217) - T_RPAREN | T_COMMA | T_PLUS | T_BAR => Reduce(1, NT_regex_sequence_pattern, yy_action_754) + T_PIPE => Shift(yy_state_326) + T_PIPE_LEFT => Shift(yy_state_334) + T_EOF | T_RPAREN | T_COMMA | T_COLON | T_SEMI | T_RBRACKET | T_BAR_RBRACKET | T_LBRACE | T_RBRACE | T_AND => Reduce(2, NT_try_expr, yy_action_677) _ => Error } } -fn yy_state_217(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_618(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LIDENT => Shift(yy_state_218) + NT_multiline_string => Shift(yy_state_2) + T_MULTILINE_INTERP => Shift(yy_state_4) + T_MULTILINE_STRING => Shift(yy_state_5) + T_REGEX_LITERAL => Shift(yy_state_6) + T_STRING => Shift(yy_state_7) + T_FLOAT => Shift(yy_state_8) + T_DOUBLE => Shift(yy_state_9) + T_INT => Shift(yy_state_10) + T_CHAR => Shift(yy_state_11) + T_BYTES => Shift(yy_state_12) + T_BYTE => Shift(yy_state_13) + T_FALSE => Shift(yy_state_14) + T_TRUE => Shift(yy_state_15) + T_BYTES_INTERP => Shift(yy_state_16) + T_INTERP => Shift(yy_state_17) + NT_non_empty_list_multiline_string_ => Shift(yy_state_18) + NT_simple_constant => Shift(yy_state_19) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + NT_tuple_expr => Shift(yy_state_27) + T_LBRACKET_BAR => Shift(yy_state_28) + T_LBRACKET => Shift(yy_state_36) + NT_constr => Shift(yy_state_47) + NT_qual_ident_simple_expr => Shift(yy_state_48) + T_UNDERSCORE => Shift(yy_state_49) + NT_atomic_expr => Shift(yy_state_50) + NT_anony_fn => Shift(yy_state_51) + T_LBRACE => Shift(yy_state_52) + T_FN => Shift(yy_state_61) + NT_type_name => Shift(yy_state_139) + T_ASYNC => Shift(yy_state_152) + NT_simple_expr => Shift(yy_state_165) + T_EXCLAMATION => Shift(yy_state_176) + T_LPAREN => Shift(yy_state_177) + T_MINUS => Shift(yy_state_191) + T_PLUS => Shift(yy_state_193) + T_UIDENT => Shift(yy_state_195) + T_PACKAGE_NAME => Shift(yy_state_196) + T_EXTEND => Shift(yy_state_199) + T_LIDENT => Shift(yy_state_200) + NT_prefix_expr => Shift(yy_state_201) + NT_range_expr => Shift(yy_state_212) + NT_postfix_expr => Shift(yy_state_223) + NT_infix_expr => Shift(yy_state_272) + NT_pipe_expr => Shift(yy_state_619) _ => Error } } -fn yy_state_218(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_regex_as_pattern, yy_action_753) -} - -fn yy_state_219(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_619(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_BAR => Shift(yy_state_220) - T_RPAREN | T_COMMA => Reduce(1, NT_regex_as_pattern, yy_action_752) + T_PIPE => Shift(yy_state_326) + T_PIPE_LEFT => Shift(yy_state_334) + NT_catch_keyword => Shift(yy_state_620) + T_CATCH => Shift(yy_state_629) _ => Error } } -fn yy_state_220(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_620(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_PACKAGE_NAME => Shift(yy_state_205) - T_UIDENT => Shift(yy_state_207) - T_REGEX_LITERAL => Shift(yy_state_208) - T_LPAREN => Shift(yy_state_210) - NT_regex_atom_pattern => Shift(yy_state_221) - NT_regex_sequence_pattern => Shift(yy_state_222) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + T_UIDENT => Shift(yy_state_195) + NT_single_pattern_case => Shift(yy_state_445) + T_LBRACE => Shift(yy_state_448) + T_LBRACKET => Shift(yy_state_452) + T_LPAREN => Shift(yy_state_466) + NT_constr => Shift(yy_state_467) + T_EXTEND => Shift(yy_state_480) + T_LIDENT => Shift(yy_state_487) + T_UNDERSCORE => Shift(yy_state_491) + T_BYTES => Shift(yy_state_492) + T_STRING => Shift(yy_state_493) + T_MINUS => Shift(yy_state_494) + T_FLOAT => Shift(yy_state_498) + T_DOUBLE => Shift(yy_state_499) + T_BYTE => Shift(yy_state_500) + T_INT => Shift(yy_state_501) + T_CHAR => Shift(yy_state_502) + T_FALSE => Shift(yy_state_503) + T_TRUE => Shift(yy_state_504) + NT_simple_pattern => Shift(yy_state_505) + NT_type_name => Shift(yy_state_508) + T_PACKAGE_NAME => Shift(yy_state_513) + NT_range_pattern => Shift(yy_state_516) + NT_or_pattern => Shift(yy_state_519) + T_ELLIPSIS => Shift(yy_state_599) + NT_pattern => Shift(yy_state_600) + NT_non_empty_list_semis_single_pattern_case_ => Shift(yy_state_621) + NT_single_pattern_cases => Shift(yy_state_622) + NT_list_semis_single_pattern_case_ => Shift(yy_state_628) + T_RBRACE => Reduce(0, NT_list_semis_single_pattern_case_, yy_action_676) _ => Error } } -fn yy_state_221(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_regex_sequence_pattern, yy_action_754) +fn yy_state_621(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_list_semis_single_pattern_case_, yy_action_675) } -fn yy_state_222(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_622(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_PLUS => Shift(yy_state_214) - T_RPAREN | T_COMMA | T_BAR => Reduce(3, NT_regex_or_pattern, yy_action_751) + T_RBRACE => Shift(yy_state_623) _ => Error } } -fn yy_state_223(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_623(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RPAREN => Shift(yy_state_212) - T_COMMA => Shift(yy_state_224) + T_NORAISE => Shift(yy_state_624) + T_EOF | T_RPAREN | T_COMMA | T_COLON | T_SEMI | T_RBRACKET | T_BAR_RBRACKET | T_LBRACE | T_RBRACE | T_AND => Reduce(5, NT_try_expr, yy_action_674) _ => Error } } -fn yy_state_224(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_624(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_regex_match_binding => Shift(yy_state_225) - NT_non_empty_list_commas_rev_regex_match_binding_ => Shift(yy_state_226) - T_POST_LABEL => Shift(yy_state_230) - T_LIDENT => Shift(yy_state_231) - NT_non_empty_list_commas_regex_match_binding_ => Shift(yy_state_234) - NT_list_commas_regex_match_binding_ => Shift(yy_state_235) - T_RPAREN => Reduce(0, NT_list_commas_regex_match_binding_, yy_action_750) + T_LBRACE => Shift(yy_state_625) _ => Error } } -fn yy_state_225(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_non_empty_list_commas_rev_regex_match_binding_, yy_action_749) -} - -fn yy_state_226(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_625(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_option_COMMA_ => Shift(yy_state_227) - T_COMMA => Shift(yy_state_228) - T_RPAREN => Reduce(0, NT_option_COMMA_, yy_action_876) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + T_UIDENT => Shift(yy_state_195) + NT_single_pattern_case => Shift(yy_state_445) + T_LBRACE => Shift(yy_state_448) + T_LBRACKET => Shift(yy_state_452) + T_LPAREN => Shift(yy_state_466) + NT_constr => Shift(yy_state_467) + T_EXTEND => Shift(yy_state_480) + T_LIDENT => Shift(yy_state_487) + T_UNDERSCORE => Shift(yy_state_491) + T_BYTES => Shift(yy_state_492) + T_STRING => Shift(yy_state_493) + T_MINUS => Shift(yy_state_494) + T_FLOAT => Shift(yy_state_498) + T_DOUBLE => Shift(yy_state_499) + T_BYTE => Shift(yy_state_500) + T_INT => Shift(yy_state_501) + T_CHAR => Shift(yy_state_502) + T_FALSE => Shift(yy_state_503) + T_TRUE => Shift(yy_state_504) + NT_simple_pattern => Shift(yy_state_505) + NT_type_name => Shift(yy_state_508) + T_PACKAGE_NAME => Shift(yy_state_513) + NT_range_pattern => Shift(yy_state_516) + NT_or_pattern => Shift(yy_state_519) + T_ELLIPSIS => Shift(yy_state_599) + NT_pattern => Shift(yy_state_600) + NT_non_empty_list_semis_single_pattern_case_ => Shift(yy_state_621) + NT_single_pattern_cases => Shift(yy_state_626) + NT_list_semis_single_pattern_case_ => Shift(yy_state_628) + T_RBRACE => Reduce(0, NT_list_semis_single_pattern_case_, yy_action_676) _ => Error } } -fn yy_state_227(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(2, NT_non_empty_list_commas_regex_match_binding_, yy_action_748) -} - -fn yy_state_228(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_626(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_regex_match_binding => Shift(yy_state_229) - T_POST_LABEL => Shift(yy_state_230) - T_LIDENT => Shift(yy_state_231) - T_RPAREN => Reduce(1, NT_option_COMMA_, yy_action_874) + T_RBRACE => Shift(yy_state_627) _ => Error } } -fn yy_state_229(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_non_empty_list_commas_rev_regex_match_binding_, yy_action_747) -} - -fn yy_state_230(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_regex_match_binding, yy_action_746) +fn yy_state_627(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(9, NT_try_expr, yy_action_673) } -fn yy_state_231(_lookahead : YYSymbol) -> YYDecision { - match _lookahead { - T_EQUAL => Shift(yy_state_232) - _ => Error - } +fn yy_state_628(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_single_pattern_cases, yy_action_672) } -fn yy_state_232(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_629(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LIDENT => Shift(yy_state_233) + T_LBRACE => Shift(yy_state_630) _ => Error } } -fn yy_state_233(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_regex_match_binding, yy_action_745) +fn yy_state_630(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(2, NT_catch_keyword, yy_action_671) } -fn yy_state_234(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_list_commas_regex_match_binding_, yy_action_744) +fn yy_state_631(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(4, NT_single_pattern_case, yy_action_670) } -fn yy_state_235(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_632(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RPAREN => Shift(yy_state_236) + T_FOR => Shift(yy_state_633) + T_WHILE => Shift(yy_state_730) _ => Error } } -fn yy_state_236(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(5, NT_regex_match_rhs, yy_action_743) -} - -fn yy_state_237(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_regex_match_rhs, yy_action_742) -} - -fn yy_state_238(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_postfix_expr, yy_action_741) -} - -fn yy_state_239(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_633(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_lex_pattern => Shift(yy_state_240) - T_PACKAGE_NAME => Shift(yy_state_243) - T_UIDENT => Shift(yy_state_245) - T_INTERP => Shift(yy_state_246) - T_STRING => Shift(yy_state_247) - T_REGEX_INTERP => Shift(yy_state_248) - T_REGEX_LITERAL => Shift(yy_state_249) - NT_lex_simple_atom_pattern => Shift(yy_state_250) - T_LIDENT => Shift(yy_state_251) - T_UNDERSCORE => Shift(yy_state_252) - T_LPAREN => Shift(yy_state_253) + NT_foreach_binder => Shift(yy_state_42) + NT_non_empty_list_commas_rev_separated_pair_binder_EQUAL_expr__ => Shift(yy_state_634) + NT_non_empty_list_commas_rev_foreach_binder_ => Shift(yy_state_665) + T_UNDERSCORE => Shift(yy_state_668) + NT_non_empty_list_commas_no_trailing_separated_pair_binder_EQUAL_expr__ => Shift(yy_state_672) + T_EXTEND => Shift(yy_state_673) + T_LIDENT => Shift(yy_state_676) + NT_non_empty_list_commas_foreach_binder_ => Shift(yy_state_679) + NT_list_commas_no_trailing_separated_pair_binder_EQUAL_expr__ => Shift(yy_state_688) + NT_for_binders => Shift(yy_state_715) + T_SEMI | T_LBRACE => Reduce(0, NT_list_commas_no_trailing_separated_pair_binder_EQUAL_expr__, yy_action_669) _ => Error } } -fn yy_state_240(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_634(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_WITH => Shift(yy_state_241) - T_INFIX1 | T_INFIX2 | T_INFIX3 | T_INFIX4 | T_EOF | T_CATCH | T_RPAREN | T_COMMA | T_MINUS | T_COLON | T_SEMI | T_PLUS | T_RBRACKET | T_BAR | T_LBRACE | T_RBRACE | T_AMPERAMPER | T_AMPER | T_CARET | T_BARBAR | T_PIPE | T_PIPE_LEFT | T_ELSE | T_IF | T_FAT_ARROW | T_AND | T_IMPLIES => Reduce(3, NT_postfix_expr, yy_action_740) + T_COMMA => Shift(yy_state_635) + T_SEMI | T_LBRACE => Reduce(1, NT_non_empty_list_commas_no_trailing_separated_pair_binder_EQUAL_expr__, yy_action_668) _ => Error } } -fn yy_state_241(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_635(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LIDENT => Shift(yy_state_242) + T_EXTEND => Shift(yy_state_636) + T_LIDENT => Shift(yy_state_662) _ => Error } } -fn yy_state_242(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(5, NT_postfix_expr, yy_action_739) -} - -fn yy_state_243(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_636(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_DOT_UIDENT => Shift(yy_state_244) + T_EQUAL => Shift(yy_state_637) _ => Error } } -fn yy_state_244(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(2, NT_lex_simple_atom_pattern, yy_action_737) -} - -fn yy_state_245(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_lex_simple_atom_pattern, yy_action_735) -} - -fn yy_state_246(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_lex_simple_atom_pattern, yy_action_734) -} - -fn yy_state_247(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_lex_simple_atom_pattern, yy_action_733) -} - -fn yy_state_248(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_lex_simple_atom_pattern, yy_action_732) -} - -fn yy_state_249(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_lex_simple_atom_pattern, yy_action_731) -} - -fn yy_state_250(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_lex_pattern, yy_action_730) -} - -fn yy_state_251(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_lex_pattern, yy_action_729) -} - -fn yy_state_252(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_lex_pattern, yy_action_728) -} - -fn yy_state_253(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_637(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_PACKAGE_NAME => Shift(yy_state_243) - T_UIDENT => Shift(yy_state_245) - T_INTERP => Shift(yy_state_246) - T_STRING => Shift(yy_state_247) - T_REGEX_INTERP => Shift(yy_state_248) - T_REGEX_LITERAL => Shift(yy_state_249) - NT_lex_top_pattern => Shift(yy_state_254) - T_LPAREN => Shift(yy_state_257) - NT_lex_simple_atom_pattern => Shift(yy_state_260) - NT_lex_atom_pattern => Shift(yy_state_261) - NT_lex_pattern_sequence => Shift(yy_state_268) - T_LIDENT => Shift(yy_state_269) - T_UNDERSCORE => Shift(yy_state_270) - NT_lex_as_pattern => Shift(yy_state_271) - NT_separated_nonempty_list_COMMA_lex_top_pattern_ => Shift(yy_state_272) + NT_multiline_string => Shift(yy_state_2) + T_MULTILINE_INTERP => Shift(yy_state_4) + T_MULTILINE_STRING => Shift(yy_state_5) + T_REGEX_LITERAL => Shift(yy_state_6) + T_STRING => Shift(yy_state_7) + T_FLOAT => Shift(yy_state_8) + T_DOUBLE => Shift(yy_state_9) + T_INT => Shift(yy_state_10) + T_CHAR => Shift(yy_state_11) + T_BYTES => Shift(yy_state_12) + T_BYTE => Shift(yy_state_13) + T_FALSE => Shift(yy_state_14) + T_TRUE => Shift(yy_state_15) + T_BYTES_INTERP => Shift(yy_state_16) + T_INTERP => Shift(yy_state_17) + NT_non_empty_list_multiline_string_ => Shift(yy_state_18) + NT_simple_constant => Shift(yy_state_19) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + NT_tuple_expr => Shift(yy_state_27) + T_LBRACKET_BAR => Shift(yy_state_28) + T_LBRACKET => Shift(yy_state_36) + NT_constr => Shift(yy_state_47) + NT_qual_ident_simple_expr => Shift(yy_state_48) + NT_atomic_expr => Shift(yy_state_50) + NT_anony_fn => Shift(yy_state_51) + T_LBRACE => Shift(yy_state_52) + T_FN => Shift(yy_state_61) + NT_type_name => Shift(yy_state_139) + T_ASYNC => Shift(yy_state_152) + NT_simple_expr => Shift(yy_state_165) + T_EXCLAMATION => Shift(yy_state_176) + T_MINUS => Shift(yy_state_191) + T_PLUS => Shift(yy_state_193) + T_UIDENT => Shift(yy_state_195) + T_PACKAGE_NAME => Shift(yy_state_196) + NT_prefix_expr => Shift(yy_state_201) + NT_range_expr => Shift(yy_state_212) + NT_postfix_expr => Shift(yy_state_223) + T_EXISTS => Shift(yy_state_224) + T_FORALL => Shift(yy_state_256) + NT_infix_expr => Shift(yy_state_272) + T_UNDERSCORE => Shift(yy_state_273) + T_LPAREN => Shift(yy_state_281) + NT_pipe_expr => Shift(yy_state_325) + NT_arrow_fn_expr => Shift(yy_state_344) + NT_quantifier_expr => Shift(yy_state_345) + NT_simple_try_expr => Shift(yy_state_346) + NT_lexscan_expr => Shift(yy_state_347) + NT_lexmatch_expr => Shift(yy_state_348) + NT_match_expr => Shift(yy_state_349) + NT_if_expr => Shift(yy_state_350) + NT_try_expr => Shift(yy_state_351) + NT_while_expr => Shift(yy_state_352) + NT_foreach_expr => Shift(yy_state_353) + NT_for_expr => Shift(yy_state_354) + T_LEXSCAN => Shift(yy_state_355) + NT_lexscan_header => Shift(yy_state_358) + T_LEXMATCH => Shift(yy_state_391) + NT_lexmatch_header => Shift(yy_state_399) + NT_match_header => Shift(yy_state_444) + T_MATCH => Shift(yy_state_605) + T_IF => Shift(yy_state_608) + T_TRY_EXCLAMATION => Shift(yy_state_614) + T_TRY_QUESTION => Shift(yy_state_616) + T_TRY => Shift(yy_state_618) + NT_loop_label_colon => Shift(yy_state_632) + NT_expr => Shift(yy_state_638) + T_POST_LABEL => Shift(yy_state_639) + T_EXTEND => Shift(yy_state_641) + T_LIDENT => Shift(yy_state_648) + T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_1071) _ => Error } } -fn yy_state_254(_lookahead : YYSymbol) -> YYDecision { - match _lookahead { - T_COMMA => Shift(yy_state_255) - T_RPAREN => Reduce(1, NT_separated_nonempty_list_COMMA_lex_top_pattern_, yy_action_727) - _ => Error - } +fn yy_state_638(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(5, NT_non_empty_list_commas_rev_separated_pair_binder_EQUAL_expr__, yy_action_667) } -fn yy_state_255(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_639(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_PACKAGE_NAME => Shift(yy_state_243) - T_UIDENT => Shift(yy_state_245) - T_INTERP => Shift(yy_state_246) - T_STRING => Shift(yy_state_247) - T_REGEX_INTERP => Shift(yy_state_248) - T_REGEX_LITERAL => Shift(yy_state_249) - NT_lex_top_pattern => Shift(yy_state_254) - NT_separated_nonempty_list_COMMA_lex_top_pattern_ => Shift(yy_state_256) - T_LPAREN => Shift(yy_state_257) - NT_lex_simple_atom_pattern => Shift(yy_state_260) - NT_lex_atom_pattern => Shift(yy_state_261) - NT_lex_pattern_sequence => Shift(yy_state_268) - T_LIDENT => Shift(yy_state_269) - T_UNDERSCORE => Shift(yy_state_270) - NT_lex_as_pattern => Shift(yy_state_271) + T_COLON => Shift(yy_state_640) _ => Error } } -fn yy_state_256(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_separated_nonempty_list_COMMA_lex_top_pattern_, yy_action_726) +fn yy_state_640(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(2, NT_loop_label_colon, yy_action_666) } -fn yy_state_257(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_641(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_PACKAGE_NAME => Shift(yy_state_243) - T_UIDENT => Shift(yy_state_245) - T_INTERP => Shift(yy_state_246) - T_STRING => Shift(yy_state_247) - T_REGEX_INTERP => Shift(yy_state_248) - T_REGEX_LITERAL => Shift(yy_state_249) - T_LPAREN => Shift(yy_state_257) - NT_lex_as_pattern => Shift(yy_state_258) - NT_lex_simple_atom_pattern => Shift(yy_state_260) - NT_lex_atom_pattern => Shift(yy_state_261) - NT_lex_pattern_sequence => Shift(yy_state_268) + T_FAT_ARROW => Shift(yy_state_642) + T_INFIX1 | T_INFIX2 | T_INFIX3 | T_INFIX4 | T_EOF | T_CATCH | T_EQ_TILDE | T_LPAREN | T_RPAREN | T_COMMA | T_MINUS | T_DOT_LIDENT | T_DOT_INT | T_COLON | T_SEMI | T_LBRACKET | T_PLUS | T_RBRACKET | T_BAR_RBRACKET | T_BAR | T_LBRACE | T_RBRACE | T_AMPERAMPER | T_AMPER | T_CARET | T_BARBAR | T_AS | T_PIPE | T_PIPE_LEFT | T_LT_PLUS | T_LT_QUESTION | T_DOTDOT | T_RANGE_INCLUSIVE | T_RANGE_LT_INCLUSIVE | T_RANGE_EXCLUSIVE | T_RANGE_INCLUSIVE_REV | T_RANGE_EXCLUSIVE_REV | T_IS | T_AND | T_IMPLIES | T_LEXMATCH_QUESTION => Reduce(1, NT_qual_ident_simple_expr, yy_action_933) _ => Error } } -fn yy_state_258(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_642(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RPAREN => Shift(yy_state_259) + NT_multiline_string => Shift(yy_state_2) + T_MULTILINE_INTERP => Shift(yy_state_4) + T_MULTILINE_STRING => Shift(yy_state_5) + T_REGEX_LITERAL => Shift(yy_state_6) + T_STRING => Shift(yy_state_7) + T_FLOAT => Shift(yy_state_8) + T_DOUBLE => Shift(yy_state_9) + T_INT => Shift(yy_state_10) + T_CHAR => Shift(yy_state_11) + T_BYTES => Shift(yy_state_12) + T_BYTE => Shift(yy_state_13) + T_FALSE => Shift(yy_state_14) + T_TRUE => Shift(yy_state_15) + T_BYTES_INTERP => Shift(yy_state_16) + T_INTERP => Shift(yy_state_17) + NT_non_empty_list_multiline_string_ => Shift(yy_state_18) + NT_simple_constant => Shift(yy_state_19) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + NT_tuple_expr => Shift(yy_state_27) + T_LBRACKET_BAR => Shift(yy_state_28) + T_LBRACKET => Shift(yy_state_36) + NT_constr => Shift(yy_state_47) + NT_qual_ident_simple_expr => Shift(yy_state_48) + NT_atomic_expr => Shift(yy_state_50) + NT_anony_fn => Shift(yy_state_51) + T_LBRACE => Shift(yy_state_52) + T_FN => Shift(yy_state_61) + NT_type_name => Shift(yy_state_139) + T_ASYNC => Shift(yy_state_152) + T_EXCLAMATION => Shift(yy_state_176) + T_MINUS => Shift(yy_state_191) + T_PLUS => Shift(yy_state_193) + T_UIDENT => Shift(yy_state_195) + NT_prefix_expr => Shift(yy_state_201) + NT_range_expr => Shift(yy_state_212) + NT_postfix_expr => Shift(yy_state_223) + T_EXISTS => Shift(yy_state_224) + T_FORALL => Shift(yy_state_256) + NT_infix_expr => Shift(yy_state_272) + T_UNDERSCORE => Shift(yy_state_273) + NT_qual_ident => Shift(yy_state_275) + NT_simple_expr => Shift(yy_state_276) + T_LPAREN => Shift(yy_state_281) + NT_pipe_expr => Shift(yy_state_325) + NT_arrow_fn_expr => Shift(yy_state_344) + NT_quantifier_expr => Shift(yy_state_345) + NT_simple_try_expr => Shift(yy_state_346) + NT_lexscan_expr => Shift(yy_state_347) + NT_lexmatch_expr => Shift(yy_state_348) + NT_match_expr => Shift(yy_state_349) + NT_if_expr => Shift(yy_state_350) + NT_try_expr => Shift(yy_state_351) + NT_while_expr => Shift(yy_state_352) + NT_foreach_expr => Shift(yy_state_353) + NT_for_expr => Shift(yy_state_354) + T_LEXSCAN => Shift(yy_state_355) + NT_lexscan_header => Shift(yy_state_358) + T_LEXMATCH => Shift(yy_state_391) + NT_lexmatch_header => Shift(yy_state_399) + NT_match_header => Shift(yy_state_444) + T_MATCH => Shift(yy_state_605) + T_IF => Shift(yy_state_608) + T_TRY_EXCLAMATION => Shift(yy_state_614) + T_TRY_QUESTION => Shift(yy_state_616) + T_TRY => Shift(yy_state_618) + NT_loop_label_colon => Shift(yy_state_632) + T_POST_LABEL => Shift(yy_state_639) + NT_expr_statement_no_break_continue_return => Shift(yy_state_643) + NT_expr => Shift(yy_state_644) + NT_left_value => Shift(yy_state_645) + T_ELLIPSIS => Shift(yy_state_651) + T_RAISE => Shift(yy_state_652) + T_PACKAGE_NAME => Shift(yy_state_654) + T_EXTEND => Shift(yy_state_656) + T_LIDENT => Shift(yy_state_657) + T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_1071) _ => Error } } -fn yy_state_259(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_lex_atom_pattern, yy_action_725) +fn yy_state_643(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_arrow_fn_expr, yy_action_665) } -fn yy_state_260(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_lex_atom_pattern, yy_action_724) +fn yy_state_644(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_expr_statement_no_break_continue_return, yy_action_664) } -fn yy_state_261(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_645(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_SEMI => Shift(yy_state_262) - NT_option_SEMI_ => Shift(yy_state_263) - T_AS => Shift(yy_state_266) - T_STRING | T_INTERP | T_REGEX_LITERAL | T_REGEX_INTERP | T_UIDENT | T_LPAREN | T_PACKAGE_NAME => Reduce(0, NT_option_SEMI_, yy_action_815) - T_RPAREN | T_COMMA => Reduce(1, NT_lex_pattern_sequence, yy_action_723) + T_EQUAL => Shift(yy_state_646) + T_AUGMENTED_ASSIGNMENT => Shift(yy_state_658) + T_PLUS_EQUAL => Shift(yy_state_660) _ => Error } } -fn yy_state_262(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_option_SEMI_, yy_action_813) -} - -fn yy_state_263(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_646(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_PACKAGE_NAME => Shift(yy_state_243) - T_UIDENT => Shift(yy_state_245) - T_INTERP => Shift(yy_state_246) - T_STRING => Shift(yy_state_247) - T_REGEX_INTERP => Shift(yy_state_248) - T_REGEX_LITERAL => Shift(yy_state_249) - T_LPAREN => Shift(yy_state_257) - NT_lex_simple_atom_pattern => Shift(yy_state_260) - NT_lex_pattern_sequence => Shift(yy_state_264) - NT_lex_atom_pattern => Shift(yy_state_265) + NT_multiline_string => Shift(yy_state_2) + T_MULTILINE_INTERP => Shift(yy_state_4) + T_MULTILINE_STRING => Shift(yy_state_5) + T_REGEX_LITERAL => Shift(yy_state_6) + T_STRING => Shift(yy_state_7) + T_FLOAT => Shift(yy_state_8) + T_DOUBLE => Shift(yy_state_9) + T_INT => Shift(yy_state_10) + T_CHAR => Shift(yy_state_11) + T_BYTES => Shift(yy_state_12) + T_BYTE => Shift(yy_state_13) + T_FALSE => Shift(yy_state_14) + T_TRUE => Shift(yy_state_15) + T_BYTES_INTERP => Shift(yy_state_16) + T_INTERP => Shift(yy_state_17) + NT_non_empty_list_multiline_string_ => Shift(yy_state_18) + NT_simple_constant => Shift(yy_state_19) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + NT_tuple_expr => Shift(yy_state_27) + T_LBRACKET_BAR => Shift(yy_state_28) + T_LBRACKET => Shift(yy_state_36) + NT_constr => Shift(yy_state_47) + NT_qual_ident_simple_expr => Shift(yy_state_48) + NT_atomic_expr => Shift(yy_state_50) + NT_anony_fn => Shift(yy_state_51) + T_LBRACE => Shift(yy_state_52) + T_FN => Shift(yy_state_61) + NT_type_name => Shift(yy_state_139) + T_ASYNC => Shift(yy_state_152) + NT_simple_expr => Shift(yy_state_165) + T_EXCLAMATION => Shift(yy_state_176) + T_MINUS => Shift(yy_state_191) + T_PLUS => Shift(yy_state_193) + T_UIDENT => Shift(yy_state_195) + T_PACKAGE_NAME => Shift(yy_state_196) + NT_prefix_expr => Shift(yy_state_201) + NT_range_expr => Shift(yy_state_212) + NT_postfix_expr => Shift(yy_state_223) + T_EXISTS => Shift(yy_state_224) + T_FORALL => Shift(yy_state_256) + NT_infix_expr => Shift(yy_state_272) + T_UNDERSCORE => Shift(yy_state_273) + T_LPAREN => Shift(yy_state_281) + NT_pipe_expr => Shift(yy_state_325) + NT_arrow_fn_expr => Shift(yy_state_344) + NT_quantifier_expr => Shift(yy_state_345) + NT_simple_try_expr => Shift(yy_state_346) + NT_lexscan_expr => Shift(yy_state_347) + NT_lexmatch_expr => Shift(yy_state_348) + NT_match_expr => Shift(yy_state_349) + NT_if_expr => Shift(yy_state_350) + NT_try_expr => Shift(yy_state_351) + NT_while_expr => Shift(yy_state_352) + NT_foreach_expr => Shift(yy_state_353) + NT_for_expr => Shift(yy_state_354) + T_LEXSCAN => Shift(yy_state_355) + NT_lexscan_header => Shift(yy_state_358) + T_LEXMATCH => Shift(yy_state_391) + NT_lexmatch_header => Shift(yy_state_399) + NT_match_header => Shift(yy_state_444) + T_MATCH => Shift(yy_state_605) + T_IF => Shift(yy_state_608) + T_TRY_EXCLAMATION => Shift(yy_state_614) + T_TRY_QUESTION => Shift(yy_state_616) + T_TRY => Shift(yy_state_618) + NT_loop_label_colon => Shift(yy_state_632) + T_POST_LABEL => Shift(yy_state_639) + T_EXTEND => Shift(yy_state_641) + NT_expr => Shift(yy_state_647) + T_LIDENT => Shift(yy_state_648) + T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_1071) _ => Error } } -fn yy_state_264(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_lex_pattern_sequence, yy_action_722) -} - -fn yy_state_265(_lookahead : YYSymbol) -> YYDecision { - match _lookahead { - T_SEMI => Shift(yy_state_262) - NT_option_SEMI_ => Shift(yy_state_263) - T_STRING | T_INTERP | T_REGEX_LITERAL | T_REGEX_INTERP | T_UIDENT | T_LPAREN | T_PACKAGE_NAME => Reduce(0, NT_option_SEMI_, yy_action_815) - T_RPAREN | T_COMMA => Reduce(1, NT_lex_pattern_sequence, yy_action_723) - _ => Error - } +fn yy_state_647(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_expr_statement_no_break_continue_return, yy_action_662) } -fn yy_state_266(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_648(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LIDENT => Shift(yy_state_267) + T_FAT_ARROW => Shift(yy_state_649) + T_INFIX1 | T_INFIX2 | T_INFIX3 | T_INFIX4 | T_EOF | T_CATCH | T_EQ_TILDE | T_LPAREN | T_RPAREN | T_COMMA | T_MINUS | T_DOT_LIDENT | T_DOT_INT | T_COLON | T_SEMI | T_LBRACKET | T_PLUS | T_RBRACKET | T_BAR_RBRACKET | T_BAR | T_LBRACE | T_RBRACE | T_AMPERAMPER | T_AMPER | T_CARET | T_BARBAR | T_AS | T_PIPE | T_PIPE_LEFT | T_LT_PLUS | T_LT_QUESTION | T_DOTDOT | T_RANGE_INCLUSIVE | T_RANGE_LT_INCLUSIVE | T_RANGE_EXCLUSIVE | T_RANGE_INCLUSIVE_REV | T_RANGE_EXCLUSIVE_REV | T_IS | T_AND | T_IMPLIES | T_LEXMATCH_QUESTION => Reduce(1, NT_qual_ident_simple_expr, yy_action_932) _ => Error } } -fn yy_state_267(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_lex_as_pattern, yy_action_721) -} - -fn yy_state_268(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_lex_as_pattern, yy_action_720) -} - -fn yy_state_269(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_lex_top_pattern, yy_action_719) -} - -fn yy_state_270(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_lex_top_pattern, yy_action_718) -} - -fn yy_state_271(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_lex_top_pattern, yy_action_717) -} - -fn yy_state_272(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_649(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RPAREN => Shift(yy_state_273) + NT_multiline_string => Shift(yy_state_2) + T_MULTILINE_INTERP => Shift(yy_state_4) + T_MULTILINE_STRING => Shift(yy_state_5) + T_REGEX_LITERAL => Shift(yy_state_6) + T_STRING => Shift(yy_state_7) + T_FLOAT => Shift(yy_state_8) + T_DOUBLE => Shift(yy_state_9) + T_INT => Shift(yy_state_10) + T_CHAR => Shift(yy_state_11) + T_BYTES => Shift(yy_state_12) + T_BYTE => Shift(yy_state_13) + T_FALSE => Shift(yy_state_14) + T_TRUE => Shift(yy_state_15) + T_BYTES_INTERP => Shift(yy_state_16) + T_INTERP => Shift(yy_state_17) + NT_non_empty_list_multiline_string_ => Shift(yy_state_18) + NT_simple_constant => Shift(yy_state_19) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + NT_tuple_expr => Shift(yy_state_27) + T_LBRACKET_BAR => Shift(yy_state_28) + T_LBRACKET => Shift(yy_state_36) + NT_constr => Shift(yy_state_47) + NT_qual_ident_simple_expr => Shift(yy_state_48) + NT_atomic_expr => Shift(yy_state_50) + NT_anony_fn => Shift(yy_state_51) + T_LBRACE => Shift(yy_state_52) + T_FN => Shift(yy_state_61) + NT_type_name => Shift(yy_state_139) + T_ASYNC => Shift(yy_state_152) + T_EXCLAMATION => Shift(yy_state_176) + T_MINUS => Shift(yy_state_191) + T_PLUS => Shift(yy_state_193) + T_UIDENT => Shift(yy_state_195) + NT_prefix_expr => Shift(yy_state_201) + NT_range_expr => Shift(yy_state_212) + NT_postfix_expr => Shift(yy_state_223) + T_EXISTS => Shift(yy_state_224) + T_FORALL => Shift(yy_state_256) + NT_infix_expr => Shift(yy_state_272) + T_UNDERSCORE => Shift(yy_state_273) + NT_qual_ident => Shift(yy_state_275) + NT_simple_expr => Shift(yy_state_276) + T_LPAREN => Shift(yy_state_281) + NT_pipe_expr => Shift(yy_state_325) + NT_arrow_fn_expr => Shift(yy_state_344) + NT_quantifier_expr => Shift(yy_state_345) + NT_simple_try_expr => Shift(yy_state_346) + NT_lexscan_expr => Shift(yy_state_347) + NT_lexmatch_expr => Shift(yy_state_348) + NT_match_expr => Shift(yy_state_349) + NT_if_expr => Shift(yy_state_350) + NT_try_expr => Shift(yy_state_351) + NT_while_expr => Shift(yy_state_352) + NT_foreach_expr => Shift(yy_state_353) + NT_for_expr => Shift(yy_state_354) + T_LEXSCAN => Shift(yy_state_355) + NT_lexscan_header => Shift(yy_state_358) + T_LEXMATCH => Shift(yy_state_391) + NT_lexmatch_header => Shift(yy_state_399) + NT_match_header => Shift(yy_state_444) + T_MATCH => Shift(yy_state_605) + T_IF => Shift(yy_state_608) + T_TRY_EXCLAMATION => Shift(yy_state_614) + T_TRY_QUESTION => Shift(yy_state_616) + T_TRY => Shift(yy_state_618) + NT_loop_label_colon => Shift(yy_state_632) + T_POST_LABEL => Shift(yy_state_639) + NT_expr => Shift(yy_state_644) + NT_left_value => Shift(yy_state_645) + NT_expr_statement_no_break_continue_return => Shift(yy_state_650) + T_ELLIPSIS => Shift(yy_state_651) + T_RAISE => Shift(yy_state_652) + T_PACKAGE_NAME => Shift(yy_state_654) + T_EXTEND => Shift(yy_state_656) + T_LIDENT => Shift(yy_state_657) + T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_1071) _ => Error } } -fn yy_state_273(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_lex_pattern, yy_action_716) +fn yy_state_650(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_arrow_fn_expr, yy_action_661) } -fn yy_state_274(_lookahead : YYSymbol) -> YYDecision { - match _lookahead { - T_AMPER => Shift(yy_state_19) - NT_qual_ident_ty => Shift(yy_state_25) - T_UIDENT => Shift(yy_state_182) - T_LBRACE => Shift(yy_state_275) - T_LBRACKET => Shift(yy_state_279) - T_LPAREN => Shift(yy_state_293) - NT_constr => Shift(yy_state_294) - T_LIDENT => Shift(yy_state_307) - T_UNDERSCORE => Shift(yy_state_312) - T_BYTES => Shift(yy_state_313) - T_STRING => Shift(yy_state_314) - T_MINUS => Shift(yy_state_315) - T_FLOAT => Shift(yy_state_319) - T_DOUBLE => Shift(yy_state_320) - T_BYTE => Shift(yy_state_321) - T_INT => Shift(yy_state_322) - T_CHAR => Shift(yy_state_323) - T_FALSE => Shift(yy_state_324) - T_TRUE => Shift(yy_state_325) - NT_simple_pattern => Shift(yy_state_326) - NT_type_name => Shift(yy_state_329) - T_PACKAGE_NAME => Shift(yy_state_334) - NT_range_pattern => Shift(yy_state_413) - _ => Error - } +fn yy_state_651(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_expr_statement_no_break_continue_return, yy_action_660) } -fn yy_state_275(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_652(_lookahead : YYSymbol) -> YYDecision { match _lookahead { + NT_multiline_string => Shift(yy_state_2) + T_MULTILINE_INTERP => Shift(yy_state_4) + T_MULTILINE_STRING => Shift(yy_state_5) T_REGEX_LITERAL => Shift(yy_state_6) T_STRING => Shift(yy_state_7) T_FLOAT => Shift(yy_state_8) @@ -19908,1073 +29370,1369 @@ fn yy_state_275(_lookahead : YYSymbol) -> YYDecision { T_BYTE => Shift(yy_state_13) T_FALSE => Shift(yy_state_14) T_TRUE => Shift(yy_state_15) - NT_map_syntax_key => Shift(yy_state_276) - NT_fields_pat_single => Shift(yy_state_377) - NT_non_empty_list_commas_rev_map_elem_pat_ => Shift(yy_state_378) - T_MINUS => Shift(yy_state_385) - NT_simple_constant => Shift(yy_state_389) - NT_non_empty_list_commas_rev_fields_pat_single_ => Shift(yy_state_390) - T_LIDENT => Shift(yy_state_394) - NT_non_empty_list_commas_with_tail_map_elem_pat_ => Shift(yy_state_397) - NT_non_empty_list_commas_map_elem_pat_ => Shift(yy_state_400) - NT_non_empty_list_commas_with_tail_fields_pat_single_ => Shift(yy_state_401) - NT_non_empty_list_commas_fields_pat_single_ => Shift(yy_state_404) - NT_non_empty_map_elems_pat => Shift(yy_state_405) - NT_non_empty_fields_pat => Shift(yy_state_407) - T_DOTDOT => Shift(yy_state_409) - T_RBRACE => Shift(yy_state_412) + T_BYTES_INTERP => Shift(yy_state_16) + T_INTERP => Shift(yy_state_17) + NT_non_empty_list_multiline_string_ => Shift(yy_state_18) + NT_simple_constant => Shift(yy_state_19) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + NT_tuple_expr => Shift(yy_state_27) + T_LBRACKET_BAR => Shift(yy_state_28) + T_LBRACKET => Shift(yy_state_36) + NT_constr => Shift(yy_state_47) + NT_qual_ident_simple_expr => Shift(yy_state_48) + NT_atomic_expr => Shift(yy_state_50) + NT_anony_fn => Shift(yy_state_51) + T_LBRACE => Shift(yy_state_52) + T_FN => Shift(yy_state_61) + NT_type_name => Shift(yy_state_139) + T_ASYNC => Shift(yy_state_152) + NT_simple_expr => Shift(yy_state_165) + T_EXCLAMATION => Shift(yy_state_176) + T_MINUS => Shift(yy_state_191) + T_PLUS => Shift(yy_state_193) + T_UIDENT => Shift(yy_state_195) + T_PACKAGE_NAME => Shift(yy_state_196) + NT_prefix_expr => Shift(yy_state_201) + NT_range_expr => Shift(yy_state_212) + NT_postfix_expr => Shift(yy_state_223) + T_EXISTS => Shift(yy_state_224) + T_FORALL => Shift(yy_state_256) + NT_infix_expr => Shift(yy_state_272) + T_UNDERSCORE => Shift(yy_state_273) + T_LPAREN => Shift(yy_state_281) + NT_pipe_expr => Shift(yy_state_325) + NT_arrow_fn_expr => Shift(yy_state_344) + NT_quantifier_expr => Shift(yy_state_345) + NT_simple_try_expr => Shift(yy_state_346) + NT_lexscan_expr => Shift(yy_state_347) + NT_lexmatch_expr => Shift(yy_state_348) + NT_match_expr => Shift(yy_state_349) + NT_if_expr => Shift(yy_state_350) + NT_try_expr => Shift(yy_state_351) + NT_while_expr => Shift(yy_state_352) + NT_foreach_expr => Shift(yy_state_353) + NT_for_expr => Shift(yy_state_354) + T_LEXSCAN => Shift(yy_state_355) + NT_lexscan_header => Shift(yy_state_358) + T_LEXMATCH => Shift(yy_state_391) + NT_lexmatch_header => Shift(yy_state_399) + NT_match_header => Shift(yy_state_444) + T_MATCH => Shift(yy_state_605) + T_IF => Shift(yy_state_608) + T_TRY_EXCLAMATION => Shift(yy_state_614) + T_TRY_QUESTION => Shift(yy_state_616) + T_TRY => Shift(yy_state_618) + NT_loop_label_colon => Shift(yy_state_632) + T_POST_LABEL => Shift(yy_state_639) + T_EXTEND => Shift(yy_state_641) + T_LIDENT => Shift(yy_state_648) + NT_expr => Shift(yy_state_653) + T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_1071) _ => Error } } -fn yy_state_276(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_653(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(2, NT_expr_statement_no_break_continue_return, yy_action_659) +} + +fn yy_state_654(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_option_QUESTION_ => Shift(yy_state_277) - T_QUESTION => Shift(yy_state_376) - T_COLON => Reduce(0, NT_option_QUESTION_, yy_action_715) + T_DOT_UIDENT => Shift(yy_state_197) + T_DOT_LIDENT => Shift(yy_state_655) _ => Error } } -fn yy_state_277(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_655(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_COLON => Shift(yy_state_278) + T_AUGMENTED_ASSIGNMENT | T_PLUS_EQUAL | T_EQUAL => Reduce(2, NT_qual_ident, yy_action_658) + T_INFIX1 | T_INFIX2 | T_INFIX3 | T_INFIX4 | T_EOF | T_CATCH | T_EQ_TILDE | T_LPAREN | T_RPAREN | T_COMMA | T_MINUS | T_DOT_LIDENT | T_DOT_INT | T_COLON | T_SEMI | T_LBRACKET | T_PLUS | T_RBRACKET | T_BAR_RBRACKET | T_BAR | T_LBRACE | T_RBRACE | T_AMPERAMPER | T_AMPER | T_CARET | T_BARBAR | T_AS | T_PIPE | T_PIPE_LEFT | T_LT_PLUS | T_LT_QUESTION | T_DOTDOT | T_RANGE_INCLUSIVE | T_RANGE_LT_INCLUSIVE | T_RANGE_EXCLUSIVE | T_RANGE_INCLUSIVE_REV | T_RANGE_EXCLUSIVE_REV | T_IS | T_AND | T_IMPLIES | T_LEXMATCH_QUESTION => Reduce(2, NT_qual_ident_simple_expr, yy_action_934) + T_COLONCOLON => Reduce(2, NT_qual_ident_ty, yy_action_1050) _ => Error } } -fn yy_state_278(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_656(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_AMPER => Shift(yy_state_19) - NT_qual_ident_ty => Shift(yy_state_25) - T_UIDENT => Shift(yy_state_182) - T_LBRACE => Shift(yy_state_275) - T_LBRACKET => Shift(yy_state_279) - T_LPAREN => Shift(yy_state_293) - NT_constr => Shift(yy_state_294) - T_LIDENT => Shift(yy_state_307) - T_UNDERSCORE => Shift(yy_state_312) - T_BYTES => Shift(yy_state_313) - T_STRING => Shift(yy_state_314) - T_MINUS => Shift(yy_state_315) - T_FLOAT => Shift(yy_state_319) - T_DOUBLE => Shift(yy_state_320) - T_BYTE => Shift(yy_state_321) - T_INT => Shift(yy_state_322) - T_CHAR => Shift(yy_state_323) - T_FALSE => Shift(yy_state_324) - T_TRUE => Shift(yy_state_325) - NT_simple_pattern => Shift(yy_state_326) - NT_type_name => Shift(yy_state_329) - T_PACKAGE_NAME => Shift(yy_state_334) - NT_range_pattern => Shift(yy_state_337) - NT_or_pattern => Shift(yy_state_340) - NT_pattern => Shift(yy_state_375) + T_FAT_ARROW => Shift(yy_state_642) + T_AUGMENTED_ASSIGNMENT | T_PLUS_EQUAL | T_EQUAL => Reduce(1, NT_qual_ident, yy_action_657) + T_INFIX1 | T_INFIX2 | T_INFIX3 | T_INFIX4 | T_EOF | T_CATCH | T_EQ_TILDE | T_LPAREN | T_RPAREN | T_COMMA | T_MINUS | T_DOT_LIDENT | T_DOT_INT | T_COLON | T_SEMI | T_LBRACKET | T_PLUS | T_RBRACKET | T_BAR_RBRACKET | T_BAR | T_LBRACE | T_RBRACE | T_AMPERAMPER | T_AMPER | T_CARET | T_BARBAR | T_AS | T_PIPE | T_PIPE_LEFT | T_LT_PLUS | T_LT_QUESTION | T_DOTDOT | T_RANGE_INCLUSIVE | T_RANGE_LT_INCLUSIVE | T_RANGE_EXCLUSIVE | T_RANGE_INCLUSIVE_REV | T_RANGE_EXCLUSIVE_REV | T_IS | T_AND | T_IMPLIES | T_LEXMATCH_QUESTION => Reduce(1, NT_qual_ident_simple_expr, yy_action_933) _ => Error } } -fn yy_state_279(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_657(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_AMPER => Shift(yy_state_19) - NT_qual_ident_ty => Shift(yy_state_25) - T_UIDENT => Shift(yy_state_182) - T_LBRACE => Shift(yy_state_275) - T_LBRACKET => Shift(yy_state_279) - NT_dotdot_binder => Shift(yy_state_280) - T_LPAREN => Shift(yy_state_293) - NT_constr => Shift(yy_state_294) - T_LIDENT => Shift(yy_state_307) - T_UNDERSCORE => Shift(yy_state_312) - T_BYTES => Shift(yy_state_313) - T_STRING => Shift(yy_state_314) - T_MINUS => Shift(yy_state_315) - T_FLOAT => Shift(yy_state_319) - T_DOUBLE => Shift(yy_state_320) - T_BYTE => Shift(yy_state_321) - T_INT => Shift(yy_state_322) - T_CHAR => Shift(yy_state_323) - T_FALSE => Shift(yy_state_324) - T_TRUE => Shift(yy_state_325) - NT_simple_pattern => Shift(yy_state_326) - NT_type_name => Shift(yy_state_329) - T_PACKAGE_NAME => Shift(yy_state_334) - NT_range_pattern => Shift(yy_state_337) - NT_or_pattern => Shift(yy_state_340) - NT_pattern => Shift(yy_state_363) - NT_array_sub_pattern => Shift(yy_state_365) - T_DOTDOT => Shift(yy_state_368) - NT_array_sub_patterns => Shift(yy_state_373) - T_RBRACKET => Reduce(0, NT_array_sub_patterns, yy_action_714) + T_FAT_ARROW => Shift(yy_state_649) + T_AUGMENTED_ASSIGNMENT | T_PLUS_EQUAL | T_EQUAL => Reduce(1, NT_qual_ident, yy_action_656) + T_INFIX1 | T_INFIX2 | T_INFIX3 | T_INFIX4 | T_EOF | T_CATCH | T_EQ_TILDE | T_LPAREN | T_RPAREN | T_COMMA | T_MINUS | T_DOT_LIDENT | T_DOT_INT | T_COLON | T_SEMI | T_LBRACKET | T_PLUS | T_RBRACKET | T_BAR_RBRACKET | T_BAR | T_LBRACE | T_RBRACE | T_AMPERAMPER | T_AMPER | T_CARET | T_BARBAR | T_AS | T_PIPE | T_PIPE_LEFT | T_LT_PLUS | T_LT_QUESTION | T_DOTDOT | T_RANGE_INCLUSIVE | T_RANGE_LT_INCLUSIVE | T_RANGE_EXCLUSIVE | T_RANGE_INCLUSIVE_REV | T_RANGE_EXCLUSIVE_REV | T_IS | T_AND | T_IMPLIES | T_LEXMATCH_QUESTION => Reduce(1, NT_qual_ident_simple_expr, yy_action_932) _ => Error } } -fn yy_state_280(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_658(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_COMMA => Shift(yy_state_281) - T_RBRACKET => Reduce(1, NT_array_sub_patterns, yy_action_713) + NT_multiline_string => Shift(yy_state_2) + T_MULTILINE_INTERP => Shift(yy_state_4) + T_MULTILINE_STRING => Shift(yy_state_5) + T_REGEX_LITERAL => Shift(yy_state_6) + T_STRING => Shift(yy_state_7) + T_FLOAT => Shift(yy_state_8) + T_DOUBLE => Shift(yy_state_9) + T_INT => Shift(yy_state_10) + T_CHAR => Shift(yy_state_11) + T_BYTES => Shift(yy_state_12) + T_BYTE => Shift(yy_state_13) + T_FALSE => Shift(yy_state_14) + T_TRUE => Shift(yy_state_15) + T_BYTES_INTERP => Shift(yy_state_16) + T_INTERP => Shift(yy_state_17) + NT_non_empty_list_multiline_string_ => Shift(yy_state_18) + NT_simple_constant => Shift(yy_state_19) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + NT_tuple_expr => Shift(yy_state_27) + T_LBRACKET_BAR => Shift(yy_state_28) + T_LBRACKET => Shift(yy_state_36) + NT_constr => Shift(yy_state_47) + NT_qual_ident_simple_expr => Shift(yy_state_48) + NT_atomic_expr => Shift(yy_state_50) + NT_anony_fn => Shift(yy_state_51) + T_LBRACE => Shift(yy_state_52) + T_FN => Shift(yy_state_61) + NT_type_name => Shift(yy_state_139) + T_ASYNC => Shift(yy_state_152) + NT_simple_expr => Shift(yy_state_165) + T_EXCLAMATION => Shift(yy_state_176) + T_MINUS => Shift(yy_state_191) + T_PLUS => Shift(yy_state_193) + T_UIDENT => Shift(yy_state_195) + T_PACKAGE_NAME => Shift(yy_state_196) + NT_prefix_expr => Shift(yy_state_201) + NT_range_expr => Shift(yy_state_212) + NT_postfix_expr => Shift(yy_state_223) + T_EXISTS => Shift(yy_state_224) + T_FORALL => Shift(yy_state_256) + NT_infix_expr => Shift(yy_state_272) + T_UNDERSCORE => Shift(yy_state_273) + T_LPAREN => Shift(yy_state_281) + NT_pipe_expr => Shift(yy_state_325) + NT_arrow_fn_expr => Shift(yy_state_344) + NT_quantifier_expr => Shift(yy_state_345) + NT_simple_try_expr => Shift(yy_state_346) + NT_lexscan_expr => Shift(yy_state_347) + NT_lexmatch_expr => Shift(yy_state_348) + NT_match_expr => Shift(yy_state_349) + NT_if_expr => Shift(yy_state_350) + NT_try_expr => Shift(yy_state_351) + NT_while_expr => Shift(yy_state_352) + NT_foreach_expr => Shift(yy_state_353) + NT_for_expr => Shift(yy_state_354) + T_LEXSCAN => Shift(yy_state_355) + NT_lexscan_header => Shift(yy_state_358) + T_LEXMATCH => Shift(yy_state_391) + NT_lexmatch_header => Shift(yy_state_399) + NT_match_header => Shift(yy_state_444) + T_MATCH => Shift(yy_state_605) + T_IF => Shift(yy_state_608) + T_TRY_EXCLAMATION => Shift(yy_state_614) + T_TRY_QUESTION => Shift(yy_state_616) + T_TRY => Shift(yy_state_618) + NT_loop_label_colon => Shift(yy_state_632) + T_POST_LABEL => Shift(yy_state_639) + T_EXTEND => Shift(yy_state_641) + T_LIDENT => Shift(yy_state_648) + NT_expr => Shift(yy_state_659) + T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_1071) _ => Error } } -fn yy_state_281(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_659(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_expr_statement_no_break_continue_return, yy_action_653) +} + +fn yy_state_660(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_AMPER => Shift(yy_state_19) - NT_qual_ident_ty => Shift(yy_state_25) - T_UIDENT => Shift(yy_state_182) - T_LBRACE => Shift(yy_state_275) - T_LBRACKET => Shift(yy_state_279) - NT_array_sub_pattern => Shift(yy_state_282) - NT_non_empty_list_commas_rev_array_sub_pattern_ => Shift(yy_state_283) - T_DOTDOT => Shift(yy_state_287) - T_LPAREN => Shift(yy_state_293) - NT_constr => Shift(yy_state_294) - T_LIDENT => Shift(yy_state_307) - T_UNDERSCORE => Shift(yy_state_312) - T_BYTES => Shift(yy_state_313) - T_STRING => Shift(yy_state_314) - T_MINUS => Shift(yy_state_315) - T_FLOAT => Shift(yy_state_319) - T_DOUBLE => Shift(yy_state_320) - T_BYTE => Shift(yy_state_321) - T_INT => Shift(yy_state_322) - T_CHAR => Shift(yy_state_323) - T_FALSE => Shift(yy_state_324) - T_TRUE => Shift(yy_state_325) - NT_simple_pattern => Shift(yy_state_326) - NT_type_name => Shift(yy_state_329) - T_PACKAGE_NAME => Shift(yy_state_334) - NT_range_pattern => Shift(yy_state_337) - NT_or_pattern => Shift(yy_state_340) - NT_pattern => Shift(yy_state_363) - NT_non_empty_list_commas_array_sub_pattern_ => Shift(yy_state_364) - T_RBRACKET => Reduce(2, NT_array_sub_patterns, yy_action_712) + NT_multiline_string => Shift(yy_state_2) + T_MULTILINE_INTERP => Shift(yy_state_4) + T_MULTILINE_STRING => Shift(yy_state_5) + T_REGEX_LITERAL => Shift(yy_state_6) + T_STRING => Shift(yy_state_7) + T_FLOAT => Shift(yy_state_8) + T_DOUBLE => Shift(yy_state_9) + T_INT => Shift(yy_state_10) + T_CHAR => Shift(yy_state_11) + T_BYTES => Shift(yy_state_12) + T_BYTE => Shift(yy_state_13) + T_FALSE => Shift(yy_state_14) + T_TRUE => Shift(yy_state_15) + T_BYTES_INTERP => Shift(yy_state_16) + T_INTERP => Shift(yy_state_17) + NT_non_empty_list_multiline_string_ => Shift(yy_state_18) + NT_simple_constant => Shift(yy_state_19) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + NT_tuple_expr => Shift(yy_state_27) + T_LBRACKET_BAR => Shift(yy_state_28) + T_LBRACKET => Shift(yy_state_36) + NT_constr => Shift(yy_state_47) + NT_qual_ident_simple_expr => Shift(yy_state_48) + NT_atomic_expr => Shift(yy_state_50) + NT_anony_fn => Shift(yy_state_51) + T_LBRACE => Shift(yy_state_52) + T_FN => Shift(yy_state_61) + NT_type_name => Shift(yy_state_139) + T_ASYNC => Shift(yy_state_152) + NT_simple_expr => Shift(yy_state_165) + T_EXCLAMATION => Shift(yy_state_176) + T_MINUS => Shift(yy_state_191) + T_PLUS => Shift(yy_state_193) + T_UIDENT => Shift(yy_state_195) + T_PACKAGE_NAME => Shift(yy_state_196) + NT_prefix_expr => Shift(yy_state_201) + NT_range_expr => Shift(yy_state_212) + NT_postfix_expr => Shift(yy_state_223) + T_EXISTS => Shift(yy_state_224) + T_FORALL => Shift(yy_state_256) + NT_infix_expr => Shift(yy_state_272) + T_UNDERSCORE => Shift(yy_state_273) + T_LPAREN => Shift(yy_state_281) + NT_pipe_expr => Shift(yy_state_325) + NT_arrow_fn_expr => Shift(yy_state_344) + NT_quantifier_expr => Shift(yy_state_345) + NT_simple_try_expr => Shift(yy_state_346) + NT_lexscan_expr => Shift(yy_state_347) + NT_lexmatch_expr => Shift(yy_state_348) + NT_match_expr => Shift(yy_state_349) + NT_if_expr => Shift(yy_state_350) + NT_try_expr => Shift(yy_state_351) + NT_while_expr => Shift(yy_state_352) + NT_foreach_expr => Shift(yy_state_353) + NT_for_expr => Shift(yy_state_354) + T_LEXSCAN => Shift(yy_state_355) + NT_lexscan_header => Shift(yy_state_358) + T_LEXMATCH => Shift(yy_state_391) + NT_lexmatch_header => Shift(yy_state_399) + NT_match_header => Shift(yy_state_444) + T_MATCH => Shift(yy_state_605) + T_IF => Shift(yy_state_608) + T_TRY_EXCLAMATION => Shift(yy_state_614) + T_TRY_QUESTION => Shift(yy_state_616) + T_TRY => Shift(yy_state_618) + NT_loop_label_colon => Shift(yy_state_632) + T_POST_LABEL => Shift(yy_state_639) + T_EXTEND => Shift(yy_state_641) + T_LIDENT => Shift(yy_state_648) + NT_expr => Shift(yy_state_661) + T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_1071) _ => Error } } -fn yy_state_282(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_non_empty_list_commas_rev_array_sub_pattern_, yy_action_711) +fn yy_state_661(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_expr_statement_no_break_continue_return, yy_action_650) } -fn yy_state_283(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_662(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_option_COMMA_ => Shift(yy_state_284) - T_COMMA => Shift(yy_state_285) - T_RBRACKET => Reduce(0, NT_option_COMMA_, yy_action_876) + T_EQUAL => Shift(yy_state_663) _ => Error } } -fn yy_state_284(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(2, NT_non_empty_list_commas_array_sub_pattern_, yy_action_710) -} - -fn yy_state_285(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_663(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_AMPER => Shift(yy_state_19) - NT_qual_ident_ty => Shift(yy_state_25) - T_UIDENT => Shift(yy_state_182) - T_LBRACE => Shift(yy_state_275) - T_LBRACKET => Shift(yy_state_279) - NT_array_sub_pattern => Shift(yy_state_286) - T_DOTDOT => Shift(yy_state_287) - T_LPAREN => Shift(yy_state_293) - NT_constr => Shift(yy_state_294) - T_LIDENT => Shift(yy_state_307) - T_UNDERSCORE => Shift(yy_state_312) - T_BYTES => Shift(yy_state_313) - T_STRING => Shift(yy_state_314) - T_MINUS => Shift(yy_state_315) - T_FLOAT => Shift(yy_state_319) - T_DOUBLE => Shift(yy_state_320) - T_BYTE => Shift(yy_state_321) - T_INT => Shift(yy_state_322) - T_CHAR => Shift(yy_state_323) - T_FALSE => Shift(yy_state_324) - T_TRUE => Shift(yy_state_325) - NT_simple_pattern => Shift(yy_state_326) - NT_type_name => Shift(yy_state_329) - T_PACKAGE_NAME => Shift(yy_state_334) - NT_range_pattern => Shift(yy_state_337) - NT_or_pattern => Shift(yy_state_340) - NT_pattern => Shift(yy_state_363) - T_RBRACKET => Reduce(1, NT_option_COMMA_, yy_action_874) + NT_multiline_string => Shift(yy_state_2) + T_MULTILINE_INTERP => Shift(yy_state_4) + T_MULTILINE_STRING => Shift(yy_state_5) + T_REGEX_LITERAL => Shift(yy_state_6) + T_STRING => Shift(yy_state_7) + T_FLOAT => Shift(yy_state_8) + T_DOUBLE => Shift(yy_state_9) + T_INT => Shift(yy_state_10) + T_CHAR => Shift(yy_state_11) + T_BYTES => Shift(yy_state_12) + T_BYTE => Shift(yy_state_13) + T_FALSE => Shift(yy_state_14) + T_TRUE => Shift(yy_state_15) + T_BYTES_INTERP => Shift(yy_state_16) + T_INTERP => Shift(yy_state_17) + NT_non_empty_list_multiline_string_ => Shift(yy_state_18) + NT_simple_constant => Shift(yy_state_19) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + NT_tuple_expr => Shift(yy_state_27) + T_LBRACKET_BAR => Shift(yy_state_28) + T_LBRACKET => Shift(yy_state_36) + NT_constr => Shift(yy_state_47) + NT_qual_ident_simple_expr => Shift(yy_state_48) + NT_atomic_expr => Shift(yy_state_50) + NT_anony_fn => Shift(yy_state_51) + T_LBRACE => Shift(yy_state_52) + T_FN => Shift(yy_state_61) + NT_type_name => Shift(yy_state_139) + T_ASYNC => Shift(yy_state_152) + NT_simple_expr => Shift(yy_state_165) + T_EXCLAMATION => Shift(yy_state_176) + T_MINUS => Shift(yy_state_191) + T_PLUS => Shift(yy_state_193) + T_UIDENT => Shift(yy_state_195) + T_PACKAGE_NAME => Shift(yy_state_196) + NT_prefix_expr => Shift(yy_state_201) + NT_range_expr => Shift(yy_state_212) + NT_postfix_expr => Shift(yy_state_223) + T_EXISTS => Shift(yy_state_224) + T_FORALL => Shift(yy_state_256) + NT_infix_expr => Shift(yy_state_272) + T_UNDERSCORE => Shift(yy_state_273) + T_LPAREN => Shift(yy_state_281) + NT_pipe_expr => Shift(yy_state_325) + NT_arrow_fn_expr => Shift(yy_state_344) + NT_quantifier_expr => Shift(yy_state_345) + NT_simple_try_expr => Shift(yy_state_346) + NT_lexscan_expr => Shift(yy_state_347) + NT_lexmatch_expr => Shift(yy_state_348) + NT_match_expr => Shift(yy_state_349) + NT_if_expr => Shift(yy_state_350) + NT_try_expr => Shift(yy_state_351) + NT_while_expr => Shift(yy_state_352) + NT_foreach_expr => Shift(yy_state_353) + NT_for_expr => Shift(yy_state_354) + T_LEXSCAN => Shift(yy_state_355) + NT_lexscan_header => Shift(yy_state_358) + T_LEXMATCH => Shift(yy_state_391) + NT_lexmatch_header => Shift(yy_state_399) + NT_match_header => Shift(yy_state_444) + T_MATCH => Shift(yy_state_605) + T_IF => Shift(yy_state_608) + T_TRY_EXCLAMATION => Shift(yy_state_614) + T_TRY_QUESTION => Shift(yy_state_616) + T_TRY => Shift(yy_state_618) + NT_loop_label_colon => Shift(yy_state_632) + T_POST_LABEL => Shift(yy_state_639) + T_EXTEND => Shift(yy_state_641) + T_LIDENT => Shift(yy_state_648) + NT_expr => Shift(yy_state_664) + T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_1071) _ => Error } } -fn yy_state_286(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_non_empty_list_commas_rev_array_sub_pattern_, yy_action_709) +fn yy_state_664(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(5, NT_non_empty_list_commas_rev_separated_pair_binder_EQUAL_expr__, yy_action_649) } -fn yy_state_287(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_665(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_PACKAGE_NAME => Shift(yy_state_288) - T_UIDENT => Shift(yy_state_290) - T_BYTES => Shift(yy_state_291) - T_STRING => Shift(yy_state_292) + T_COMMA => Shift(yy_state_666) + NT_option_COMMA_ => Shift(yy_state_671) + T_IN => Reduce(0, NT_option_COMMA_, yy_action_1044) _ => Error } } -fn yy_state_288(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_666(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_DOT_UIDENT => Shift(yy_state_289) + NT_foreach_binder => Shift(yy_state_667) + T_UNDERSCORE => Shift(yy_state_668) + T_EXTEND => Shift(yy_state_669) + T_LIDENT => Shift(yy_state_670) + T_IN => Reduce(1, NT_option_COMMA_, yy_action_1042) _ => Error } } -fn yy_state_289(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_array_sub_pattern, yy_action_708) +fn yy_state_667(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_non_empty_list_commas_rev_foreach_binder_, yy_action_648) } -fn yy_state_290(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(2, NT_array_sub_pattern, yy_action_707) +fn yy_state_668(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_foreach_binder, yy_action_647) } -fn yy_state_291(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(2, NT_array_sub_pattern, yy_action_706) +fn yy_state_669(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_foreach_binder, yy_action_646) } -fn yy_state_292(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(2, NT_array_sub_pattern, yy_action_705) +fn yy_state_670(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_foreach_binder, yy_action_645) } -fn yy_state_293(_lookahead : YYSymbol) -> YYDecision { - match _lookahead { - T_AMPER => Shift(yy_state_19) - NT_qual_ident_ty => Shift(yy_state_25) - T_UIDENT => Shift(yy_state_182) - T_LBRACE => Shift(yy_state_275) - T_LBRACKET => Shift(yy_state_279) - T_LPAREN => Shift(yy_state_293) - NT_constr => Shift(yy_state_294) - T_LIDENT => Shift(yy_state_307) - T_UNDERSCORE => Shift(yy_state_312) - T_BYTES => Shift(yy_state_313) - T_STRING => Shift(yy_state_314) - T_MINUS => Shift(yy_state_315) - T_FLOAT => Shift(yy_state_319) - T_DOUBLE => Shift(yy_state_320) - T_BYTE => Shift(yy_state_321) - T_INT => Shift(yy_state_322) - T_CHAR => Shift(yy_state_323) - T_FALSE => Shift(yy_state_324) - T_TRUE => Shift(yy_state_325) - NT_simple_pattern => Shift(yy_state_326) - NT_type_name => Shift(yy_state_329) - T_PACKAGE_NAME => Shift(yy_state_334) - NT_range_pattern => Shift(yy_state_337) - NT_or_pattern => Shift(yy_state_340) - NT_pattern => Shift(yy_state_350) - _ => Error - } +fn yy_state_671(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(2, NT_non_empty_list_commas_foreach_binder_, yy_action_644) } -fn yy_state_294(_lookahead : YYSymbol) -> YYDecision { - match _lookahead { - T_LPAREN => Shift(yy_state_295) - NT_option_delimited_LPAREN_constr_pat_arguments_RPAREN__ => Shift(yy_state_349) - T_INFIX1 | T_INFIX2 | T_INFIX3 | T_INFIX4 | T_EOF | T_WITH | T_CATCH | T_EQUAL | T_RPAREN | T_COMMA | T_MINUS | T_COLON | T_SEMI | T_PLUS | T_RBRACKET | T_BAR | T_LBRACE | T_RBRACE | T_AMPERAMPER | T_AMPER | T_CARET | T_BARBAR | T_AS | T_PIPE | T_PIPE_LEFT | T_ELSE | T_IF | T_FAT_ARROW | T_RANGE_INCLUSIVE | T_RANGE_EXCLUSIVE | T_AND | T_IMPLIES => Reduce(0, NT_option_delimited_LPAREN_constr_pat_arguments_RPAREN__, yy_action_704) - _ => Error - } +fn yy_state_672(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_list_commas_no_trailing_separated_pair_binder_EQUAL_expr__, yy_action_643) } -fn yy_state_295(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_673(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_AMPER => Shift(yy_state_19) - NT_qual_ident_ty => Shift(yy_state_25) - T_UIDENT => Shift(yy_state_182) - T_LBRACE => Shift(yy_state_275) - T_LBRACKET => Shift(yy_state_279) - T_LPAREN => Shift(yy_state_293) - NT_constr => Shift(yy_state_294) - NT_constr_pat_arguments => Shift(yy_state_296) - T_POST_LABEL => Shift(yy_state_298) - T_DOTDOT => Shift(yy_state_299) - NT_constr_pat_argument => Shift(yy_state_302) - T_LIDENT => Shift(yy_state_305) - T_UNDERSCORE => Shift(yy_state_312) - T_BYTES => Shift(yy_state_313) - T_STRING => Shift(yy_state_314) - T_MINUS => Shift(yy_state_315) - T_FLOAT => Shift(yy_state_319) - T_DOUBLE => Shift(yy_state_320) - T_BYTE => Shift(yy_state_321) - T_INT => Shift(yy_state_322) - T_CHAR => Shift(yy_state_323) - T_FALSE => Shift(yy_state_324) - T_TRUE => Shift(yy_state_325) - NT_simple_pattern => Shift(yy_state_326) - NT_type_name => Shift(yy_state_329) - T_PACKAGE_NAME => Shift(yy_state_334) - NT_range_pattern => Shift(yy_state_337) - NT_or_pattern => Shift(yy_state_340) - NT_pattern => Shift(yy_state_341) + T_EQUAL => Shift(yy_state_674) + T_COMMA | T_IN => Reduce(1, NT_foreach_binder, yy_action_646) _ => Error } } -fn yy_state_296(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_674(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RPAREN => Shift(yy_state_297) + NT_multiline_string => Shift(yy_state_2) + T_MULTILINE_INTERP => Shift(yy_state_4) + T_MULTILINE_STRING => Shift(yy_state_5) + T_REGEX_LITERAL => Shift(yy_state_6) + T_STRING => Shift(yy_state_7) + T_FLOAT => Shift(yy_state_8) + T_DOUBLE => Shift(yy_state_9) + T_INT => Shift(yy_state_10) + T_CHAR => Shift(yy_state_11) + T_BYTES => Shift(yy_state_12) + T_BYTE => Shift(yy_state_13) + T_FALSE => Shift(yy_state_14) + T_TRUE => Shift(yy_state_15) + T_BYTES_INTERP => Shift(yy_state_16) + T_INTERP => Shift(yy_state_17) + NT_non_empty_list_multiline_string_ => Shift(yy_state_18) + NT_simple_constant => Shift(yy_state_19) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + NT_tuple_expr => Shift(yy_state_27) + T_LBRACKET_BAR => Shift(yy_state_28) + T_LBRACKET => Shift(yy_state_36) + NT_constr => Shift(yy_state_47) + NT_qual_ident_simple_expr => Shift(yy_state_48) + NT_atomic_expr => Shift(yy_state_50) + NT_anony_fn => Shift(yy_state_51) + T_LBRACE => Shift(yy_state_52) + T_FN => Shift(yy_state_61) + NT_type_name => Shift(yy_state_139) + T_ASYNC => Shift(yy_state_152) + NT_simple_expr => Shift(yy_state_165) + T_EXCLAMATION => Shift(yy_state_176) + T_MINUS => Shift(yy_state_191) + T_PLUS => Shift(yy_state_193) + T_UIDENT => Shift(yy_state_195) + T_PACKAGE_NAME => Shift(yy_state_196) + NT_prefix_expr => Shift(yy_state_201) + NT_range_expr => Shift(yy_state_212) + NT_postfix_expr => Shift(yy_state_223) + T_EXISTS => Shift(yy_state_224) + T_FORALL => Shift(yy_state_256) + NT_infix_expr => Shift(yy_state_272) + T_UNDERSCORE => Shift(yy_state_273) + T_LPAREN => Shift(yy_state_281) + NT_pipe_expr => Shift(yy_state_325) + NT_arrow_fn_expr => Shift(yy_state_344) + NT_quantifier_expr => Shift(yy_state_345) + NT_simple_try_expr => Shift(yy_state_346) + NT_lexscan_expr => Shift(yy_state_347) + NT_lexmatch_expr => Shift(yy_state_348) + NT_match_expr => Shift(yy_state_349) + NT_if_expr => Shift(yy_state_350) + NT_try_expr => Shift(yy_state_351) + NT_while_expr => Shift(yy_state_352) + NT_foreach_expr => Shift(yy_state_353) + NT_for_expr => Shift(yy_state_354) + T_LEXSCAN => Shift(yy_state_355) + NT_lexscan_header => Shift(yy_state_358) + T_LEXMATCH => Shift(yy_state_391) + NT_lexmatch_header => Shift(yy_state_399) + NT_match_header => Shift(yy_state_444) + T_MATCH => Shift(yy_state_605) + T_IF => Shift(yy_state_608) + T_TRY_EXCLAMATION => Shift(yy_state_614) + T_TRY_QUESTION => Shift(yy_state_616) + T_TRY => Shift(yy_state_618) + NT_loop_label_colon => Shift(yy_state_632) + T_POST_LABEL => Shift(yy_state_639) + T_EXTEND => Shift(yy_state_641) + T_LIDENT => Shift(yy_state_648) + NT_expr => Shift(yy_state_675) + T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_1071) _ => Error } } -fn yy_state_297(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_option_delimited_LPAREN_constr_pat_arguments_RPAREN__, yy_action_702) -} - -fn yy_state_298(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_constr_pat_argument, yy_action_701) +fn yy_state_675(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_non_empty_list_commas_rev_separated_pair_binder_EQUAL_expr__, yy_action_641) } -fn yy_state_299(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_676(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_COMMA => Shift(yy_state_300) - NT_option_COMMA_ => Shift(yy_state_301) - T_RPAREN => Reduce(0, NT_option_COMMA_, yy_action_876) + T_EQUAL => Shift(yy_state_677) + T_COMMA | T_IN => Reduce(1, NT_foreach_binder, yy_action_645) _ => Error } } -fn yy_state_300(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_option_COMMA_, yy_action_874) +fn yy_state_677(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + NT_multiline_string => Shift(yy_state_2) + T_MULTILINE_INTERP => Shift(yy_state_4) + T_MULTILINE_STRING => Shift(yy_state_5) + T_REGEX_LITERAL => Shift(yy_state_6) + T_STRING => Shift(yy_state_7) + T_FLOAT => Shift(yy_state_8) + T_DOUBLE => Shift(yy_state_9) + T_INT => Shift(yy_state_10) + T_CHAR => Shift(yy_state_11) + T_BYTES => Shift(yy_state_12) + T_BYTE => Shift(yy_state_13) + T_FALSE => Shift(yy_state_14) + T_TRUE => Shift(yy_state_15) + T_BYTES_INTERP => Shift(yy_state_16) + T_INTERP => Shift(yy_state_17) + NT_non_empty_list_multiline_string_ => Shift(yy_state_18) + NT_simple_constant => Shift(yy_state_19) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + NT_tuple_expr => Shift(yy_state_27) + T_LBRACKET_BAR => Shift(yy_state_28) + T_LBRACKET => Shift(yy_state_36) + NT_constr => Shift(yy_state_47) + NT_qual_ident_simple_expr => Shift(yy_state_48) + NT_atomic_expr => Shift(yy_state_50) + NT_anony_fn => Shift(yy_state_51) + T_LBRACE => Shift(yy_state_52) + T_FN => Shift(yy_state_61) + NT_type_name => Shift(yy_state_139) + T_ASYNC => Shift(yy_state_152) + NT_simple_expr => Shift(yy_state_165) + T_EXCLAMATION => Shift(yy_state_176) + T_MINUS => Shift(yy_state_191) + T_PLUS => Shift(yy_state_193) + T_UIDENT => Shift(yy_state_195) + T_PACKAGE_NAME => Shift(yy_state_196) + NT_prefix_expr => Shift(yy_state_201) + NT_range_expr => Shift(yy_state_212) + NT_postfix_expr => Shift(yy_state_223) + T_EXISTS => Shift(yy_state_224) + T_FORALL => Shift(yy_state_256) + NT_infix_expr => Shift(yy_state_272) + T_UNDERSCORE => Shift(yy_state_273) + T_LPAREN => Shift(yy_state_281) + NT_pipe_expr => Shift(yy_state_325) + NT_arrow_fn_expr => Shift(yy_state_344) + NT_quantifier_expr => Shift(yy_state_345) + NT_simple_try_expr => Shift(yy_state_346) + NT_lexscan_expr => Shift(yy_state_347) + NT_lexmatch_expr => Shift(yy_state_348) + NT_match_expr => Shift(yy_state_349) + NT_if_expr => Shift(yy_state_350) + NT_try_expr => Shift(yy_state_351) + NT_while_expr => Shift(yy_state_352) + NT_foreach_expr => Shift(yy_state_353) + NT_for_expr => Shift(yy_state_354) + T_LEXSCAN => Shift(yy_state_355) + NT_lexscan_header => Shift(yy_state_358) + T_LEXMATCH => Shift(yy_state_391) + NT_lexmatch_header => Shift(yy_state_399) + NT_match_header => Shift(yy_state_444) + T_MATCH => Shift(yy_state_605) + T_IF => Shift(yy_state_608) + T_TRY_EXCLAMATION => Shift(yy_state_614) + T_TRY_QUESTION => Shift(yy_state_616) + T_TRY => Shift(yy_state_618) + NT_loop_label_colon => Shift(yy_state_632) + T_POST_LABEL => Shift(yy_state_639) + T_EXTEND => Shift(yy_state_641) + T_LIDENT => Shift(yy_state_648) + NT_expr => Shift(yy_state_678) + T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_1071) + _ => Error + } } -fn yy_state_301(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(2, NT_constr_pat_arguments, yy_action_700) +fn yy_state_678(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_non_empty_list_commas_rev_separated_pair_binder_EQUAL_expr__, yy_action_639) } -fn yy_state_302(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_679(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_COMMA => Shift(yy_state_303) - NT_option_COMMA_ => Shift(yy_state_348) - T_RPAREN => Reduce(0, NT_option_COMMA_, yy_action_876) + T_IN => Shift(yy_state_680) _ => Error } } -fn yy_state_303(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_680(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_AMPER => Shift(yy_state_19) - NT_qual_ident_ty => Shift(yy_state_25) - T_UIDENT => Shift(yy_state_182) - T_LBRACE => Shift(yy_state_275) - T_LBRACKET => Shift(yy_state_279) - T_LPAREN => Shift(yy_state_293) - NT_constr => Shift(yy_state_294) - T_POST_LABEL => Shift(yy_state_298) - T_DOTDOT => Shift(yy_state_299) - NT_constr_pat_argument => Shift(yy_state_302) - NT_constr_pat_arguments => Shift(yy_state_304) - T_LIDENT => Shift(yy_state_305) - T_UNDERSCORE => Shift(yy_state_312) - T_BYTES => Shift(yy_state_313) - T_STRING => Shift(yy_state_314) - T_MINUS => Shift(yy_state_315) - T_FLOAT => Shift(yy_state_319) - T_DOUBLE => Shift(yy_state_320) - T_BYTE => Shift(yy_state_321) - T_INT => Shift(yy_state_322) - T_CHAR => Shift(yy_state_323) - T_FALSE => Shift(yy_state_324) - T_TRUE => Shift(yy_state_325) - NT_simple_pattern => Shift(yy_state_326) - NT_type_name => Shift(yy_state_329) - T_PACKAGE_NAME => Shift(yy_state_334) - NT_range_pattern => Shift(yy_state_337) - NT_or_pattern => Shift(yy_state_340) - NT_pattern => Shift(yy_state_341) - T_RPAREN => Reduce(1, NT_option_COMMA_, yy_action_874) + NT_multiline_string => Shift(yy_state_2) + T_MULTILINE_INTERP => Shift(yy_state_4) + T_MULTILINE_STRING => Shift(yy_state_5) + T_REGEX_LITERAL => Shift(yy_state_6) + T_STRING => Shift(yy_state_7) + T_FLOAT => Shift(yy_state_8) + T_DOUBLE => Shift(yy_state_9) + T_INT => Shift(yy_state_10) + T_CHAR => Shift(yy_state_11) + T_BYTES => Shift(yy_state_12) + T_BYTE => Shift(yy_state_13) + T_FALSE => Shift(yy_state_14) + T_TRUE => Shift(yy_state_15) + T_BYTES_INTERP => Shift(yy_state_16) + T_INTERP => Shift(yy_state_17) + NT_non_empty_list_multiline_string_ => Shift(yy_state_18) + NT_simple_constant => Shift(yy_state_19) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + NT_tuple_expr => Shift(yy_state_27) + T_LBRACKET_BAR => Shift(yy_state_28) + T_LBRACKET => Shift(yy_state_36) + NT_constr => Shift(yy_state_47) + NT_qual_ident_simple_expr => Shift(yy_state_48) + NT_atomic_expr => Shift(yy_state_50) + NT_anony_fn => Shift(yy_state_51) + T_LBRACE => Shift(yy_state_52) + T_FN => Shift(yy_state_61) + NT_type_name => Shift(yy_state_139) + T_ASYNC => Shift(yy_state_152) + NT_simple_expr => Shift(yy_state_165) + T_EXCLAMATION => Shift(yy_state_176) + T_MINUS => Shift(yy_state_191) + T_PLUS => Shift(yy_state_193) + T_UIDENT => Shift(yy_state_195) + T_PACKAGE_NAME => Shift(yy_state_196) + NT_prefix_expr => Shift(yy_state_201) + NT_range_expr => Shift(yy_state_212) + NT_postfix_expr => Shift(yy_state_223) + T_EXISTS => Shift(yy_state_224) + T_FORALL => Shift(yy_state_256) + NT_infix_expr => Shift(yy_state_272) + T_UNDERSCORE => Shift(yy_state_273) + T_LPAREN => Shift(yy_state_281) + NT_pipe_expr => Shift(yy_state_325) + NT_arrow_fn_expr => Shift(yy_state_344) + NT_quantifier_expr => Shift(yy_state_345) + NT_simple_try_expr => Shift(yy_state_346) + NT_lexscan_expr => Shift(yy_state_347) + NT_lexmatch_expr => Shift(yy_state_348) + NT_match_expr => Shift(yy_state_349) + NT_if_expr => Shift(yy_state_350) + NT_try_expr => Shift(yy_state_351) + NT_while_expr => Shift(yy_state_352) + NT_foreach_expr => Shift(yy_state_353) + NT_for_expr => Shift(yy_state_354) + T_LEXSCAN => Shift(yy_state_355) + NT_lexscan_header => Shift(yy_state_358) + T_LEXMATCH => Shift(yy_state_391) + NT_lexmatch_header => Shift(yy_state_399) + NT_match_header => Shift(yy_state_444) + T_MATCH => Shift(yy_state_605) + T_IF => Shift(yy_state_608) + T_TRY_EXCLAMATION => Shift(yy_state_614) + T_TRY_QUESTION => Shift(yy_state_616) + T_TRY => Shift(yy_state_618) + NT_loop_label_colon => Shift(yy_state_632) + T_POST_LABEL => Shift(yy_state_639) + T_EXTEND => Shift(yy_state_641) + T_LIDENT => Shift(yy_state_648) + NT_expr => Shift(yy_state_681) + T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_1071) _ => Error } } -fn yy_state_304(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_constr_pat_arguments, yy_action_699) -} - -fn yy_state_305(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_681(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_EQUAL => Shift(yy_state_306) - T_LPAREN => Shift(yy_state_308) - T_RPAREN | T_COMMA | T_BAR | T_AS | T_RANGE_INCLUSIVE | T_RANGE_EXCLUSIVE => Reduce(1, NT_simple_pattern, yy_action_698) + T_SEMI => Shift(yy_state_682) + NT_foreach_optional_loop_vars => Shift(yy_state_689) + T_LBRACE => Reduce(0, NT_foreach_optional_loop_vars, yy_action_638) _ => Error } } -fn yy_state_306(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_682(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_AMPER => Shift(yy_state_19) - NT_qual_ident_ty => Shift(yy_state_25) - T_UIDENT => Shift(yy_state_182) - T_LBRACE => Shift(yy_state_275) - T_LBRACKET => Shift(yy_state_279) - T_LPAREN => Shift(yy_state_293) - NT_constr => Shift(yy_state_294) - T_LIDENT => Shift(yy_state_307) - T_UNDERSCORE => Shift(yy_state_312) - T_BYTES => Shift(yy_state_313) - T_STRING => Shift(yy_state_314) - T_MINUS => Shift(yy_state_315) - T_FLOAT => Shift(yy_state_319) - T_DOUBLE => Shift(yy_state_320) - T_BYTE => Shift(yy_state_321) - T_INT => Shift(yy_state_322) - T_CHAR => Shift(yy_state_323) - T_FALSE => Shift(yy_state_324) - T_TRUE => Shift(yy_state_325) - NT_simple_pattern => Shift(yy_state_326) - NT_type_name => Shift(yy_state_329) - T_PACKAGE_NAME => Shift(yy_state_334) - NT_range_pattern => Shift(yy_state_337) - NT_or_pattern => Shift(yy_state_340) - NT_pattern => Shift(yy_state_347) + NT_non_empty_list_commas_rev_separated_pair_binder_EQUAL_expr__ => Shift(yy_state_634) + NT_non_empty_list_commas_no_trailing_separated_pair_binder_EQUAL_expr__ => Shift(yy_state_672) + T_EXTEND => Shift(yy_state_683) + T_LIDENT => Shift(yy_state_684) + NT_for_binders => Shift(yy_state_685) + NT_list_commas_no_trailing_separated_pair_binder_EQUAL_expr__ => Shift(yy_state_688) + T_SEMI | T_LBRACE => Reduce(0, NT_list_commas_no_trailing_separated_pair_binder_EQUAL_expr__, yy_action_669) _ => Error } } -fn yy_state_307(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_683(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LPAREN => Shift(yy_state_308) - T_INFIX1 | T_INFIX2 | T_INFIX3 | T_INFIX4 | T_EOF | T_WITH | T_CATCH | T_EQUAL | T_RPAREN | T_COMMA | T_MINUS | T_COLON | T_SEMI | T_PLUS | T_RBRACKET | T_BAR | T_LBRACE | T_RBRACE | T_AMPERAMPER | T_AMPER | T_CARET | T_BARBAR | T_AS | T_PIPE | T_PIPE_LEFT | T_ELSE | T_IF | T_FAT_ARROW | T_RANGE_INCLUSIVE | T_RANGE_EXCLUSIVE | T_AND | T_IMPLIES => Reduce(1, NT_simple_pattern, yy_action_698) + T_EQUAL => Shift(yy_state_674) _ => Error } } -fn yy_state_308(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_684(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_AMPER => Shift(yy_state_19) - NT_qual_ident_ty => Shift(yy_state_25) - T_UIDENT => Shift(yy_state_182) - T_LBRACE => Shift(yy_state_275) - T_LBRACKET => Shift(yy_state_279) - T_LPAREN => Shift(yy_state_293) - NT_constr => Shift(yy_state_294) - T_POST_LABEL => Shift(yy_state_298) - T_LIDENT => Shift(yy_state_305) - NT_constr_pat_argument => Shift(yy_state_309) - T_UNDERSCORE => Shift(yy_state_312) - T_BYTES => Shift(yy_state_313) - T_STRING => Shift(yy_state_314) - T_MINUS => Shift(yy_state_315) - T_FLOAT => Shift(yy_state_319) - T_DOUBLE => Shift(yy_state_320) - T_BYTE => Shift(yy_state_321) - T_INT => Shift(yy_state_322) - T_CHAR => Shift(yy_state_323) - T_FALSE => Shift(yy_state_324) - T_TRUE => Shift(yy_state_325) - NT_simple_pattern => Shift(yy_state_326) - NT_type_name => Shift(yy_state_329) - T_PACKAGE_NAME => Shift(yy_state_334) - NT_range_pattern => Shift(yy_state_337) - NT_or_pattern => Shift(yy_state_340) - NT_pattern => Shift(yy_state_341) - NT_constr_pat_arguments_no_open => Shift(yy_state_345) + T_EQUAL => Shift(yy_state_677) _ => Error } } -fn yy_state_309(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_685(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_COMMA => Shift(yy_state_310) - NT_option_COMMA_ => Shift(yy_state_344) - T_RPAREN => Reduce(0, NT_option_COMMA_, yy_action_876) + T_SEMI => Shift(yy_state_686) + T_LBRACE => Reduce(2, NT_foreach_optional_loop_vars, yy_action_637) _ => Error } } -fn yy_state_310(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_686(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_AMPER => Shift(yy_state_19) - NT_qual_ident_ty => Shift(yy_state_25) - T_UIDENT => Shift(yy_state_182) - T_LBRACE => Shift(yy_state_275) - T_LBRACKET => Shift(yy_state_279) - T_LPAREN => Shift(yy_state_293) - NT_constr => Shift(yy_state_294) - T_POST_LABEL => Shift(yy_state_298) - T_LIDENT => Shift(yy_state_305) - NT_constr_pat_argument => Shift(yy_state_309) - NT_constr_pat_arguments_no_open => Shift(yy_state_311) - T_UNDERSCORE => Shift(yy_state_312) - T_BYTES => Shift(yy_state_313) - T_STRING => Shift(yy_state_314) - T_MINUS => Shift(yy_state_315) - T_FLOAT => Shift(yy_state_319) - T_DOUBLE => Shift(yy_state_320) - T_BYTE => Shift(yy_state_321) - T_INT => Shift(yy_state_322) - T_CHAR => Shift(yy_state_323) - T_FALSE => Shift(yy_state_324) - T_TRUE => Shift(yy_state_325) - NT_simple_pattern => Shift(yy_state_326) - NT_type_name => Shift(yy_state_329) - T_PACKAGE_NAME => Shift(yy_state_334) - NT_range_pattern => Shift(yy_state_337) - NT_or_pattern => Shift(yy_state_340) - NT_pattern => Shift(yy_state_341) - T_RPAREN => Reduce(1, NT_option_COMMA_, yy_action_874) + NT_non_empty_list_commas_rev_separated_pair_binder_EQUAL_expr__ => Shift(yy_state_634) + NT_non_empty_list_commas_no_trailing_separated_pair_binder_EQUAL_expr__ => Shift(yy_state_672) + T_EXTEND => Shift(yy_state_683) + T_LIDENT => Shift(yy_state_684) + NT_for_binders => Shift(yy_state_687) + NT_list_commas_no_trailing_separated_pair_binder_EQUAL_expr__ => Shift(yy_state_688) + T_LBRACE => Reduce(0, NT_list_commas_no_trailing_separated_pair_binder_EQUAL_expr__, yy_action_669) _ => Error } } -fn yy_state_311(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_constr_pat_arguments_no_open, yy_action_697) -} - -fn yy_state_312(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_simple_pattern, yy_action_696) -} - -fn yy_state_313(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_simple_pattern, yy_action_695) +fn yy_state_687(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(4, NT_foreach_optional_loop_vars, yy_action_636) } -fn yy_state_314(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_simple_pattern, yy_action_694) +fn yy_state_688(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_for_binders, yy_action_635) } -fn yy_state_315(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_689(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_FLOAT => Shift(yy_state_316) - T_DOUBLE => Shift(yy_state_317) - T_INT => Shift(yy_state_318) + T_LBRACE => Shift(yy_state_133) + NT_block_expr => Shift(yy_state_690) _ => Error } } -fn yy_state_316(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(2, NT_simple_pattern, yy_action_693) -} - -fn yy_state_317(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(2, NT_simple_pattern, yy_action_692) -} - -fn yy_state_318(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(2, NT_simple_pattern, yy_action_691) -} - -fn yy_state_319(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_simple_pattern, yy_action_690) -} - -fn yy_state_320(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_simple_pattern, yy_action_689) -} - -fn yy_state_321(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_simple_pattern, yy_action_688) -} - -fn yy_state_322(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_simple_pattern, yy_action_687) -} - -fn yy_state_323(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_simple_pattern, yy_action_686) -} - -fn yy_state_324(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_simple_pattern, yy_action_685) -} - -fn yy_state_325(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_simple_pattern, yy_action_684) -} - -fn yy_state_326(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_690(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RANGE_INCLUSIVE => Shift(yy_state_327) - T_RANGE_EXCLUSIVE => Shift(yy_state_335) - T_INFIX1 | T_INFIX2 | T_INFIX3 | T_INFIX4 | T_EOF | T_WITH | T_CATCH | T_EQUAL | T_RPAREN | T_COMMA | T_MINUS | T_COLON | T_SEMI | T_PLUS | T_RBRACKET | T_BAR | T_LBRACE | T_RBRACE | T_AMPERAMPER | T_AMPER | T_CARET | T_BARBAR | T_AS | T_PIPE | T_PIPE_LEFT | T_ELSE | T_IF | T_FAT_ARROW | T_AND | T_IMPLIES => Reduce(1, NT_range_pattern, yy_action_683) + NT_optional_nobreak => Shift(yy_state_691) + T_NOBREAK => Shift(yy_state_713) + T_EOF | T_RPAREN | T_COMMA | T_COLON | T_SEMI | T_RBRACKET | T_BAR_RBRACKET | T_LBRACE | T_RBRACE | T_AND | T_WHERE => Reduce(0, NT_optional_nobreak, yy_action_634) _ => Error } } -fn yy_state_327(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_691(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_AMPER => Shift(yy_state_19) - NT_qual_ident_ty => Shift(yy_state_25) - T_UIDENT => Shift(yy_state_182) - T_LBRACE => Shift(yy_state_275) - T_LBRACKET => Shift(yy_state_279) - T_LPAREN => Shift(yy_state_293) - NT_constr => Shift(yy_state_294) - T_LIDENT => Shift(yy_state_307) - T_UNDERSCORE => Shift(yy_state_312) - T_BYTES => Shift(yy_state_313) - T_STRING => Shift(yy_state_314) - T_MINUS => Shift(yy_state_315) - T_FLOAT => Shift(yy_state_319) - T_DOUBLE => Shift(yy_state_320) - T_BYTE => Shift(yy_state_321) - T_INT => Shift(yy_state_322) - T_CHAR => Shift(yy_state_323) - T_FALSE => Shift(yy_state_324) - T_TRUE => Shift(yy_state_325) - NT_simple_pattern => Shift(yy_state_328) - NT_type_name => Shift(yy_state_329) - T_PACKAGE_NAME => Shift(yy_state_334) + NT_optional_where_clause => Shift(yy_state_692) + T_WHERE => Shift(yy_state_693) + T_EOF | T_RPAREN | T_COMMA | T_COLON | T_SEMI | T_RBRACKET | T_BAR_RBRACKET | T_LBRACE | T_RBRACE | T_AND => Reduce(0, NT_optional_where_clause, yy_action_633) _ => Error } } -fn yy_state_328(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_range_pattern, yy_action_682) +fn yy_state_692(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(9, NT_foreach_expr, yy_action_632) } -fn yy_state_329(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_693(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_COLONCOLON => Shift(yy_state_330) + T_LBRACE => Shift(yy_state_694) _ => Error } } -fn yy_state_330(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_694(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_PACKAGE_NAME => Shift(yy_state_331) - T_UIDENT => Shift(yy_state_333) + T_EXTEND => Shift(yy_state_695) + T_LIDENT => Shift(yy_state_698) + NT_non_empty_list_commas_rev_labeled_expr_ => Shift(yy_state_701) + NT_non_empty_list_commas_labeled_expr_ => Shift(yy_state_710) + NT_list_commas_labeled_expr_ => Shift(yy_state_711) + T_RBRACE => Reduce(0, NT_list_commas_labeled_expr_, yy_action_631) _ => Error } } -fn yy_state_331(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_695(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_DOT_UIDENT => Shift(yy_state_332) + T_COLON => Shift(yy_state_696) _ => Error } } -fn yy_state_332(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(4, NT_constr, yy_action_681) +fn yy_state_696(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + NT_multiline_string => Shift(yy_state_2) + T_MULTILINE_INTERP => Shift(yy_state_4) + T_MULTILINE_STRING => Shift(yy_state_5) + T_REGEX_LITERAL => Shift(yy_state_6) + T_STRING => Shift(yy_state_7) + T_FLOAT => Shift(yy_state_8) + T_DOUBLE => Shift(yy_state_9) + T_INT => Shift(yy_state_10) + T_CHAR => Shift(yy_state_11) + T_BYTES => Shift(yy_state_12) + T_BYTE => Shift(yy_state_13) + T_FALSE => Shift(yy_state_14) + T_TRUE => Shift(yy_state_15) + T_BYTES_INTERP => Shift(yy_state_16) + T_INTERP => Shift(yy_state_17) + NT_non_empty_list_multiline_string_ => Shift(yy_state_18) + NT_simple_constant => Shift(yy_state_19) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + NT_tuple_expr => Shift(yy_state_27) + T_LBRACKET_BAR => Shift(yy_state_28) + T_LBRACKET => Shift(yy_state_36) + NT_constr => Shift(yy_state_47) + NT_qual_ident_simple_expr => Shift(yy_state_48) + NT_atomic_expr => Shift(yy_state_50) + NT_anony_fn => Shift(yy_state_51) + T_LBRACE => Shift(yy_state_52) + T_FN => Shift(yy_state_61) + NT_type_name => Shift(yy_state_139) + T_ASYNC => Shift(yy_state_152) + NT_simple_expr => Shift(yy_state_165) + T_EXCLAMATION => Shift(yy_state_176) + T_MINUS => Shift(yy_state_191) + T_PLUS => Shift(yy_state_193) + T_UIDENT => Shift(yy_state_195) + T_PACKAGE_NAME => Shift(yy_state_196) + NT_prefix_expr => Shift(yy_state_201) + NT_range_expr => Shift(yy_state_212) + NT_postfix_expr => Shift(yy_state_223) + T_EXISTS => Shift(yy_state_224) + T_FORALL => Shift(yy_state_256) + NT_infix_expr => Shift(yy_state_272) + T_UNDERSCORE => Shift(yy_state_273) + T_LPAREN => Shift(yy_state_281) + NT_pipe_expr => Shift(yy_state_325) + NT_arrow_fn_expr => Shift(yy_state_344) + NT_quantifier_expr => Shift(yy_state_345) + NT_simple_try_expr => Shift(yy_state_346) + NT_lexscan_expr => Shift(yy_state_347) + NT_lexmatch_expr => Shift(yy_state_348) + NT_match_expr => Shift(yy_state_349) + NT_if_expr => Shift(yy_state_350) + NT_try_expr => Shift(yy_state_351) + NT_while_expr => Shift(yy_state_352) + NT_foreach_expr => Shift(yy_state_353) + NT_for_expr => Shift(yy_state_354) + T_LEXSCAN => Shift(yy_state_355) + NT_lexscan_header => Shift(yy_state_358) + T_LEXMATCH => Shift(yy_state_391) + NT_lexmatch_header => Shift(yy_state_399) + NT_match_header => Shift(yy_state_444) + T_MATCH => Shift(yy_state_605) + T_IF => Shift(yy_state_608) + T_TRY_EXCLAMATION => Shift(yy_state_614) + T_TRY_QUESTION => Shift(yy_state_616) + T_TRY => Shift(yy_state_618) + NT_loop_label_colon => Shift(yy_state_632) + T_POST_LABEL => Shift(yy_state_639) + T_EXTEND => Shift(yy_state_641) + T_LIDENT => Shift(yy_state_648) + NT_expr => Shift(yy_state_697) + T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_1071) + _ => Error + } } -fn yy_state_333(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_constr, yy_action_680) +fn yy_state_697(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_non_empty_list_commas_rev_labeled_expr_, yy_action_630) } -fn yy_state_334(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_698(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_DOT_LIDENT => Shift(yy_state_23) - T_DOT_UIDENT => Shift(yy_state_184) + T_COLON => Shift(yy_state_699) _ => Error } } -fn yy_state_335(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_699(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_AMPER => Shift(yy_state_19) - NT_qual_ident_ty => Shift(yy_state_25) - T_UIDENT => Shift(yy_state_182) - T_LBRACE => Shift(yy_state_275) - T_LBRACKET => Shift(yy_state_279) - T_LPAREN => Shift(yy_state_293) - NT_constr => Shift(yy_state_294) - T_LIDENT => Shift(yy_state_307) - T_UNDERSCORE => Shift(yy_state_312) - T_BYTES => Shift(yy_state_313) - T_STRING => Shift(yy_state_314) - T_MINUS => Shift(yy_state_315) - T_FLOAT => Shift(yy_state_319) - T_DOUBLE => Shift(yy_state_320) - T_BYTE => Shift(yy_state_321) - T_INT => Shift(yy_state_322) - T_CHAR => Shift(yy_state_323) - T_FALSE => Shift(yy_state_324) - T_TRUE => Shift(yy_state_325) - NT_type_name => Shift(yy_state_329) - T_PACKAGE_NAME => Shift(yy_state_334) - NT_simple_pattern => Shift(yy_state_336) + NT_multiline_string => Shift(yy_state_2) + T_MULTILINE_INTERP => Shift(yy_state_4) + T_MULTILINE_STRING => Shift(yy_state_5) + T_REGEX_LITERAL => Shift(yy_state_6) + T_STRING => Shift(yy_state_7) + T_FLOAT => Shift(yy_state_8) + T_DOUBLE => Shift(yy_state_9) + T_INT => Shift(yy_state_10) + T_CHAR => Shift(yy_state_11) + T_BYTES => Shift(yy_state_12) + T_BYTE => Shift(yy_state_13) + T_FALSE => Shift(yy_state_14) + T_TRUE => Shift(yy_state_15) + T_BYTES_INTERP => Shift(yy_state_16) + T_INTERP => Shift(yy_state_17) + NT_non_empty_list_multiline_string_ => Shift(yy_state_18) + NT_simple_constant => Shift(yy_state_19) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + NT_tuple_expr => Shift(yy_state_27) + T_LBRACKET_BAR => Shift(yy_state_28) + T_LBRACKET => Shift(yy_state_36) + NT_constr => Shift(yy_state_47) + NT_qual_ident_simple_expr => Shift(yy_state_48) + NT_atomic_expr => Shift(yy_state_50) + NT_anony_fn => Shift(yy_state_51) + T_LBRACE => Shift(yy_state_52) + T_FN => Shift(yy_state_61) + NT_type_name => Shift(yy_state_139) + T_ASYNC => Shift(yy_state_152) + NT_simple_expr => Shift(yy_state_165) + T_EXCLAMATION => Shift(yy_state_176) + T_MINUS => Shift(yy_state_191) + T_PLUS => Shift(yy_state_193) + T_UIDENT => Shift(yy_state_195) + T_PACKAGE_NAME => Shift(yy_state_196) + NT_prefix_expr => Shift(yy_state_201) + NT_range_expr => Shift(yy_state_212) + NT_postfix_expr => Shift(yy_state_223) + T_EXISTS => Shift(yy_state_224) + T_FORALL => Shift(yy_state_256) + NT_infix_expr => Shift(yy_state_272) + T_UNDERSCORE => Shift(yy_state_273) + T_LPAREN => Shift(yy_state_281) + NT_pipe_expr => Shift(yy_state_325) + NT_arrow_fn_expr => Shift(yy_state_344) + NT_quantifier_expr => Shift(yy_state_345) + NT_simple_try_expr => Shift(yy_state_346) + NT_lexscan_expr => Shift(yy_state_347) + NT_lexmatch_expr => Shift(yy_state_348) + NT_match_expr => Shift(yy_state_349) + NT_if_expr => Shift(yy_state_350) + NT_try_expr => Shift(yy_state_351) + NT_while_expr => Shift(yy_state_352) + NT_foreach_expr => Shift(yy_state_353) + NT_for_expr => Shift(yy_state_354) + T_LEXSCAN => Shift(yy_state_355) + NT_lexscan_header => Shift(yy_state_358) + T_LEXMATCH => Shift(yy_state_391) + NT_lexmatch_header => Shift(yy_state_399) + NT_match_header => Shift(yy_state_444) + T_MATCH => Shift(yy_state_605) + T_IF => Shift(yy_state_608) + T_TRY_EXCLAMATION => Shift(yy_state_614) + T_TRY_QUESTION => Shift(yy_state_616) + T_TRY => Shift(yy_state_618) + NT_loop_label_colon => Shift(yy_state_632) + T_POST_LABEL => Shift(yy_state_639) + T_EXTEND => Shift(yy_state_641) + T_LIDENT => Shift(yy_state_648) + NT_expr => Shift(yy_state_700) + T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_1071) _ => Error } } -fn yy_state_336(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_range_pattern, yy_action_679) -} - -fn yy_state_337(_lookahead : YYSymbol) -> YYDecision { - match _lookahead { - T_BAR => Shift(yy_state_338) - T_EQUAL | T_RPAREN | T_COMMA | T_COLON | T_RBRACKET | T_RBRACE | T_AS | T_IF | T_FAT_ARROW => Reduce(1, NT_or_pattern, yy_action_678) - _ => Error - } +fn yy_state_700(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_non_empty_list_commas_rev_labeled_expr_, yy_action_629) } -fn yy_state_338(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_701(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_AMPER => Shift(yy_state_19) - NT_qual_ident_ty => Shift(yy_state_25) - T_UIDENT => Shift(yy_state_182) - T_LBRACE => Shift(yy_state_275) - T_LBRACKET => Shift(yy_state_279) - T_LPAREN => Shift(yy_state_293) - NT_constr => Shift(yy_state_294) - T_LIDENT => Shift(yy_state_307) - T_UNDERSCORE => Shift(yy_state_312) - T_BYTES => Shift(yy_state_313) - T_STRING => Shift(yy_state_314) - T_MINUS => Shift(yy_state_315) - T_FLOAT => Shift(yy_state_319) - T_DOUBLE => Shift(yy_state_320) - T_BYTE => Shift(yy_state_321) - T_INT => Shift(yy_state_322) - T_CHAR => Shift(yy_state_323) - T_FALSE => Shift(yy_state_324) - T_TRUE => Shift(yy_state_325) - NT_simple_pattern => Shift(yy_state_326) - NT_type_name => Shift(yy_state_329) - T_PACKAGE_NAME => Shift(yy_state_334) - NT_range_pattern => Shift(yy_state_337) - NT_or_pattern => Shift(yy_state_339) + NT_option_COMMA_ => Shift(yy_state_702) + T_COMMA => Shift(yy_state_703) + T_RBRACE => Reduce(0, NT_option_COMMA_, yy_action_1044) _ => Error } } -fn yy_state_339(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_or_pattern, yy_action_677) -} - -fn yy_state_340(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_pattern, yy_action_676) +fn yy_state_702(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(2, NT_non_empty_list_commas_labeled_expr_, yy_action_628) } -fn yy_state_341(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_703(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_AS => Shift(yy_state_342) - T_RPAREN | T_COMMA => Reduce(1, NT_constr_pat_argument, yy_action_675) + T_EXTEND => Shift(yy_state_704) + T_LIDENT => Shift(yy_state_707) + T_RBRACE => Reduce(1, NT_option_COMMA_, yy_action_1042) _ => Error } } -fn yy_state_342(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_704(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LIDENT => Shift(yy_state_343) + T_COLON => Shift(yy_state_705) _ => Error } } -fn yy_state_343(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_pattern, yy_action_674) -} - -fn yy_state_344(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(2, NT_constr_pat_arguments_no_open, yy_action_673) -} - -fn yy_state_345(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_705(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RPAREN => Shift(yy_state_346) + NT_multiline_string => Shift(yy_state_2) + T_MULTILINE_INTERP => Shift(yy_state_4) + T_MULTILINE_STRING => Shift(yy_state_5) + T_REGEX_LITERAL => Shift(yy_state_6) + T_STRING => Shift(yy_state_7) + T_FLOAT => Shift(yy_state_8) + T_DOUBLE => Shift(yy_state_9) + T_INT => Shift(yy_state_10) + T_CHAR => Shift(yy_state_11) + T_BYTES => Shift(yy_state_12) + T_BYTE => Shift(yy_state_13) + T_FALSE => Shift(yy_state_14) + T_TRUE => Shift(yy_state_15) + T_BYTES_INTERP => Shift(yy_state_16) + T_INTERP => Shift(yy_state_17) + NT_non_empty_list_multiline_string_ => Shift(yy_state_18) + NT_simple_constant => Shift(yy_state_19) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + NT_tuple_expr => Shift(yy_state_27) + T_LBRACKET_BAR => Shift(yy_state_28) + T_LBRACKET => Shift(yy_state_36) + NT_constr => Shift(yy_state_47) + NT_qual_ident_simple_expr => Shift(yy_state_48) + NT_atomic_expr => Shift(yy_state_50) + NT_anony_fn => Shift(yy_state_51) + T_LBRACE => Shift(yy_state_52) + T_FN => Shift(yy_state_61) + NT_type_name => Shift(yy_state_139) + T_ASYNC => Shift(yy_state_152) + NT_simple_expr => Shift(yy_state_165) + T_EXCLAMATION => Shift(yy_state_176) + T_MINUS => Shift(yy_state_191) + T_PLUS => Shift(yy_state_193) + T_UIDENT => Shift(yy_state_195) + T_PACKAGE_NAME => Shift(yy_state_196) + NT_prefix_expr => Shift(yy_state_201) + NT_range_expr => Shift(yy_state_212) + NT_postfix_expr => Shift(yy_state_223) + T_EXISTS => Shift(yy_state_224) + T_FORALL => Shift(yy_state_256) + NT_infix_expr => Shift(yy_state_272) + T_UNDERSCORE => Shift(yy_state_273) + T_LPAREN => Shift(yy_state_281) + NT_pipe_expr => Shift(yy_state_325) + NT_arrow_fn_expr => Shift(yy_state_344) + NT_quantifier_expr => Shift(yy_state_345) + NT_simple_try_expr => Shift(yy_state_346) + NT_lexscan_expr => Shift(yy_state_347) + NT_lexmatch_expr => Shift(yy_state_348) + NT_match_expr => Shift(yy_state_349) + NT_if_expr => Shift(yy_state_350) + NT_try_expr => Shift(yy_state_351) + NT_while_expr => Shift(yy_state_352) + NT_foreach_expr => Shift(yy_state_353) + NT_for_expr => Shift(yy_state_354) + T_LEXSCAN => Shift(yy_state_355) + NT_lexscan_header => Shift(yy_state_358) + T_LEXMATCH => Shift(yy_state_391) + NT_lexmatch_header => Shift(yy_state_399) + NT_match_header => Shift(yy_state_444) + T_MATCH => Shift(yy_state_605) + T_IF => Shift(yy_state_608) + T_TRY_EXCLAMATION => Shift(yy_state_614) + T_TRY_QUESTION => Shift(yy_state_616) + T_TRY => Shift(yy_state_618) + NT_loop_label_colon => Shift(yy_state_632) + T_POST_LABEL => Shift(yy_state_639) + T_EXTEND => Shift(yy_state_641) + T_LIDENT => Shift(yy_state_648) + NT_expr => Shift(yy_state_706) + T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_1071) _ => Error } } -fn yy_state_346(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(4, NT_simple_pattern, yy_action_671) +fn yy_state_706(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(5, NT_non_empty_list_commas_rev_labeled_expr_, yy_action_627) } -fn yy_state_347(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_707(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_AS => Shift(yy_state_342) - T_RPAREN | T_COMMA => Reduce(3, NT_constr_pat_argument, yy_action_670) + T_COLON => Shift(yy_state_708) _ => Error } } -fn yy_state_348(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(2, NT_constr_pat_arguments, yy_action_669) -} - -fn yy_state_349(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(2, NT_simple_pattern, yy_action_668) -} - -fn yy_state_350(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_708(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_AS => Shift(yy_state_342) - T_COLON => Shift(yy_state_351) - T_COMMA => Shift(yy_state_354) - T_RPAREN => Shift(yy_state_362) + NT_multiline_string => Shift(yy_state_2) + T_MULTILINE_INTERP => Shift(yy_state_4) + T_MULTILINE_STRING => Shift(yy_state_5) + T_REGEX_LITERAL => Shift(yy_state_6) + T_STRING => Shift(yy_state_7) + T_FLOAT => Shift(yy_state_8) + T_DOUBLE => Shift(yy_state_9) + T_INT => Shift(yy_state_10) + T_CHAR => Shift(yy_state_11) + T_BYTES => Shift(yy_state_12) + T_BYTE => Shift(yy_state_13) + T_FALSE => Shift(yy_state_14) + T_TRUE => Shift(yy_state_15) + T_BYTES_INTERP => Shift(yy_state_16) + T_INTERP => Shift(yy_state_17) + NT_non_empty_list_multiline_string_ => Shift(yy_state_18) + NT_simple_constant => Shift(yy_state_19) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + NT_tuple_expr => Shift(yy_state_27) + T_LBRACKET_BAR => Shift(yy_state_28) + T_LBRACKET => Shift(yy_state_36) + NT_constr => Shift(yy_state_47) + NT_qual_ident_simple_expr => Shift(yy_state_48) + NT_atomic_expr => Shift(yy_state_50) + NT_anony_fn => Shift(yy_state_51) + T_LBRACE => Shift(yy_state_52) + T_FN => Shift(yy_state_61) + NT_type_name => Shift(yy_state_139) + T_ASYNC => Shift(yy_state_152) + NT_simple_expr => Shift(yy_state_165) + T_EXCLAMATION => Shift(yy_state_176) + T_MINUS => Shift(yy_state_191) + T_PLUS => Shift(yy_state_193) + T_UIDENT => Shift(yy_state_195) + T_PACKAGE_NAME => Shift(yy_state_196) + NT_prefix_expr => Shift(yy_state_201) + NT_range_expr => Shift(yy_state_212) + NT_postfix_expr => Shift(yy_state_223) + T_EXISTS => Shift(yy_state_224) + T_FORALL => Shift(yy_state_256) + NT_infix_expr => Shift(yy_state_272) + T_UNDERSCORE => Shift(yy_state_273) + T_LPAREN => Shift(yy_state_281) + NT_pipe_expr => Shift(yy_state_325) + NT_arrow_fn_expr => Shift(yy_state_344) + NT_quantifier_expr => Shift(yy_state_345) + NT_simple_try_expr => Shift(yy_state_346) + NT_lexscan_expr => Shift(yy_state_347) + NT_lexmatch_expr => Shift(yy_state_348) + NT_match_expr => Shift(yy_state_349) + NT_if_expr => Shift(yy_state_350) + NT_try_expr => Shift(yy_state_351) + NT_while_expr => Shift(yy_state_352) + NT_foreach_expr => Shift(yy_state_353) + NT_for_expr => Shift(yy_state_354) + T_LEXSCAN => Shift(yy_state_355) + NT_lexscan_header => Shift(yy_state_358) + T_LEXMATCH => Shift(yy_state_391) + NT_lexmatch_header => Shift(yy_state_399) + NT_match_header => Shift(yy_state_444) + T_MATCH => Shift(yy_state_605) + T_IF => Shift(yy_state_608) + T_TRY_EXCLAMATION => Shift(yy_state_614) + T_TRY_QUESTION => Shift(yy_state_616) + T_TRY => Shift(yy_state_618) + NT_loop_label_colon => Shift(yy_state_632) + T_POST_LABEL => Shift(yy_state_639) + T_EXTEND => Shift(yy_state_641) + T_LIDENT => Shift(yy_state_648) + NT_expr => Shift(yy_state_709) + T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_1071) _ => Error } } -fn yy_state_351(_lookahead : YYSymbol) -> YYDecision { - match _lookahead { - T_ASYNC => Shift(yy_state_52) - T_UNDERSCORE => Shift(yy_state_57) - T_AMPER => Shift(yy_state_58) - T_PACKAGE_NAME => Shift(yy_state_60) - T_UIDENT => Shift(yy_state_67) - T_LPAREN => Shift(yy_state_71) - NT_simple_type => Shift(yy_state_97) - NT_type_ => Shift(yy_state_352) - _ => Error - } +fn yy_state_709(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(5, NT_non_empty_list_commas_rev_labeled_expr_, yy_action_626) } -fn yy_state_352(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_710(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_list_commas_labeled_expr_, yy_action_625) +} + +fn yy_state_711(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RPAREN => Shift(yy_state_353) + T_RBRACE => Shift(yy_state_712) _ => Error } } -fn yy_state_353(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(5, NT_simple_pattern, yy_action_667) +fn yy_state_712(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(4, NT_optional_where_clause, yy_action_624) } -fn yy_state_354(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_713(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_AMPER => Shift(yy_state_19) - NT_qual_ident_ty => Shift(yy_state_25) - T_UIDENT => Shift(yy_state_182) - T_LBRACE => Shift(yy_state_275) - T_LBRACKET => Shift(yy_state_279) - T_LPAREN => Shift(yy_state_293) - NT_constr => Shift(yy_state_294) - T_LIDENT => Shift(yy_state_307) - T_UNDERSCORE => Shift(yy_state_312) - T_BYTES => Shift(yy_state_313) - T_STRING => Shift(yy_state_314) - T_MINUS => Shift(yy_state_315) - T_FLOAT => Shift(yy_state_319) - T_DOUBLE => Shift(yy_state_320) - T_BYTE => Shift(yy_state_321) - T_INT => Shift(yy_state_322) - T_CHAR => Shift(yy_state_323) - T_FALSE => Shift(yy_state_324) - T_TRUE => Shift(yy_state_325) - NT_simple_pattern => Shift(yy_state_326) - NT_type_name => Shift(yy_state_329) - T_PACKAGE_NAME => Shift(yy_state_334) - NT_range_pattern => Shift(yy_state_337) - NT_or_pattern => Shift(yy_state_340) - NT_non_empty_list_commas_rev_pattern_ => Shift(yy_state_355) - NT_non_empty_list_commas_pattern_ => Shift(yy_state_359) - NT_pattern => Shift(yy_state_361) + T_LBRACE => Shift(yy_state_133) + NT_block_expr => Shift(yy_state_714) _ => Error } } -fn yy_state_355(_lookahead : YYSymbol) -> YYDecision { - match _lookahead { - T_COMMA => Shift(yy_state_356) - NT_option_COMMA_ => Shift(yy_state_358) - T_RPAREN => Reduce(0, NT_option_COMMA_, yy_action_876) - _ => Error - } +fn yy_state_714(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(2, NT_optional_nobreak, yy_action_623) } -fn yy_state_356(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_715(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_AMPER => Shift(yy_state_19) - NT_qual_ident_ty => Shift(yy_state_25) - T_UIDENT => Shift(yy_state_182) - T_LBRACE => Shift(yy_state_275) - T_LBRACKET => Shift(yy_state_279) - T_LPAREN => Shift(yy_state_293) - NT_constr => Shift(yy_state_294) - T_LIDENT => Shift(yy_state_307) - T_UNDERSCORE => Shift(yy_state_312) - T_BYTES => Shift(yy_state_313) - T_STRING => Shift(yy_state_314) - T_MINUS => Shift(yy_state_315) - T_FLOAT => Shift(yy_state_319) - T_DOUBLE => Shift(yy_state_320) - T_BYTE => Shift(yy_state_321) - T_INT => Shift(yy_state_322) - T_CHAR => Shift(yy_state_323) - T_FALSE => Shift(yy_state_324) - T_TRUE => Shift(yy_state_325) - NT_simple_pattern => Shift(yy_state_326) - NT_type_name => Shift(yy_state_329) - T_PACKAGE_NAME => Shift(yy_state_334) - NT_range_pattern => Shift(yy_state_337) - NT_or_pattern => Shift(yy_state_340) - NT_pattern => Shift(yy_state_357) - T_RPAREN => Reduce(1, NT_option_COMMA_, yy_action_874) + T_LBRACE => Shift(yy_state_133) + NT_block_expr => Shift(yy_state_716) + T_SEMI => Shift(yy_state_719) _ => Error } } -fn yy_state_357(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_716(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_AS => Shift(yy_state_342) - T_RPAREN | T_COMMA => Reduce(3, NT_non_empty_list_commas_rev_pattern_, yy_action_666) + T_NOBREAK => Shift(yy_state_713) + NT_optional_nobreak => Shift(yy_state_717) + T_EOF | T_RPAREN | T_COMMA | T_COLON | T_SEMI | T_RBRACKET | T_BAR_RBRACKET | T_LBRACE | T_RBRACE | T_AND | T_WHERE => Reduce(0, NT_optional_nobreak, yy_action_634) _ => Error } } -fn yy_state_358(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(2, NT_non_empty_list_commas_pattern_, yy_action_665) -} - -fn yy_state_359(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_717(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RPAREN => Shift(yy_state_360) + T_WHERE => Shift(yy_state_693) + NT_optional_where_clause => Shift(yy_state_718) + T_EOF | T_RPAREN | T_COMMA | T_COLON | T_SEMI | T_RBRACKET | T_BAR_RBRACKET | T_LBRACE | T_RBRACE | T_AND => Reduce(0, NT_optional_where_clause, yy_action_633) _ => Error } } -fn yy_state_360(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(5, NT_simple_pattern, yy_action_664) +fn yy_state_718(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(6, NT_for_expr, yy_action_622) } -fn yy_state_361(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_719(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_AS => Shift(yy_state_342) - T_RPAREN | T_COMMA => Reduce(1, NT_non_empty_list_commas_rev_pattern_, yy_action_663) + NT_multiline_string => Shift(yy_state_2) + T_MULTILINE_INTERP => Shift(yy_state_4) + T_MULTILINE_STRING => Shift(yy_state_5) + T_REGEX_LITERAL => Shift(yy_state_6) + T_STRING => Shift(yy_state_7) + T_FLOAT => Shift(yy_state_8) + T_DOUBLE => Shift(yy_state_9) + T_INT => Shift(yy_state_10) + T_CHAR => Shift(yy_state_11) + T_BYTES => Shift(yy_state_12) + T_BYTE => Shift(yy_state_13) + T_FALSE => Shift(yy_state_14) + T_TRUE => Shift(yy_state_15) + T_BYTES_INTERP => Shift(yy_state_16) + T_INTERP => Shift(yy_state_17) + NT_non_empty_list_multiline_string_ => Shift(yy_state_18) + NT_simple_constant => Shift(yy_state_19) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + NT_tuple_expr => Shift(yy_state_27) + T_LBRACKET_BAR => Shift(yy_state_28) + T_LBRACKET => Shift(yy_state_36) + NT_constr => Shift(yy_state_47) + NT_qual_ident_simple_expr => Shift(yy_state_48) + T_UNDERSCORE => Shift(yy_state_49) + NT_atomic_expr => Shift(yy_state_50) + NT_anony_fn => Shift(yy_state_51) + T_LBRACE => Shift(yy_state_52) + T_FN => Shift(yy_state_61) + NT_type_name => Shift(yy_state_139) + T_ASYNC => Shift(yy_state_152) + NT_simple_expr => Shift(yy_state_165) + T_EXCLAMATION => Shift(yy_state_176) + T_LPAREN => Shift(yy_state_177) + T_MINUS => Shift(yy_state_191) + T_PLUS => Shift(yy_state_193) + T_UIDENT => Shift(yy_state_195) + T_PACKAGE_NAME => Shift(yy_state_196) + T_EXTEND => Shift(yy_state_199) + T_LIDENT => Shift(yy_state_200) + NT_prefix_expr => Shift(yy_state_201) + NT_range_expr => Shift(yy_state_212) + NT_postfix_expr => Shift(yy_state_223) + NT_infix_expr => Shift(yy_state_720) + NT_option_infix_expr_ => Shift(yy_state_724) + T_SEMI => Reduce(0, NT_option_infix_expr_, yy_action_621) _ => Error } } -fn yy_state_362(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_simple_pattern, yy_action_662) -} - -fn yy_state_363(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_720(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_AS => Shift(yy_state_342) - T_COMMA | T_RBRACKET => Reduce(1, NT_array_sub_pattern, yy_action_661) + T_LBRACE => Shift(yy_state_133) + T_BARBAR => Shift(yy_state_230) + T_AMPERAMPER => Shift(yy_state_232) + T_BAR => Shift(yy_state_234) + T_CARET => Shift(yy_state_236) + T_AMPER => Shift(yy_state_238) + T_MINUS => Shift(yy_state_240) + T_PLUS => Shift(yy_state_242) + T_INFIX1 => Shift(yy_state_244) + T_INFIX2 => Shift(yy_state_246) + T_INFIX3 => Shift(yy_state_248) + T_INFIX4 => Shift(yy_state_250) + T_IMPLIES => Shift(yy_state_252) + NT_block_expr => Shift(yy_state_721) + T_SEMI => Reduce(1, NT_option_infix_expr_, yy_action_620) _ => Error } } -fn yy_state_364(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_array_sub_patterns, yy_action_660) -} - -fn yy_state_365(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_721(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_COMMA => Shift(yy_state_366) - T_RBRACKET => Reduce(1, NT_array_sub_patterns, yy_action_659) + T_NOBREAK => Shift(yy_state_713) + NT_optional_nobreak => Shift(yy_state_722) + T_EOF | T_RPAREN | T_COMMA | T_COLON | T_SEMI | T_RBRACKET | T_BAR_RBRACKET | T_LBRACE | T_RBRACE | T_AND | T_WHERE => Reduce(0, NT_optional_nobreak, yy_action_634) _ => Error } } -fn yy_state_366(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_722(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_AMPER => Shift(yy_state_19) - NT_qual_ident_ty => Shift(yy_state_25) - T_UIDENT => Shift(yy_state_182) - T_LBRACE => Shift(yy_state_275) - T_LBRACKET => Shift(yy_state_279) - NT_dotdot_binder => Shift(yy_state_280) - T_LPAREN => Shift(yy_state_293) - NT_constr => Shift(yy_state_294) - T_LIDENT => Shift(yy_state_307) - T_UNDERSCORE => Shift(yy_state_312) - T_BYTES => Shift(yy_state_313) - T_STRING => Shift(yy_state_314) - T_MINUS => Shift(yy_state_315) - T_FLOAT => Shift(yy_state_319) - T_DOUBLE => Shift(yy_state_320) - T_BYTE => Shift(yy_state_321) - T_INT => Shift(yy_state_322) - T_CHAR => Shift(yy_state_323) - T_FALSE => Shift(yy_state_324) - T_TRUE => Shift(yy_state_325) - NT_simple_pattern => Shift(yy_state_326) - NT_type_name => Shift(yy_state_329) - T_PACKAGE_NAME => Shift(yy_state_334) - NT_range_pattern => Shift(yy_state_337) - NT_or_pattern => Shift(yy_state_340) - NT_pattern => Shift(yy_state_363) - NT_array_sub_pattern => Shift(yy_state_365) - NT_array_sub_patterns => Shift(yy_state_367) - T_DOTDOT => Shift(yy_state_368) - T_RBRACKET => Reduce(0, NT_array_sub_patterns, yy_action_714) + T_WHERE => Shift(yy_state_693) + NT_optional_where_clause => Shift(yy_state_723) + T_EOF | T_RPAREN | T_COMMA | T_COLON | T_SEMI | T_RBRACKET | T_BAR_RBRACKET | T_LBRACE | T_RBRACE | T_AND => Reduce(0, NT_optional_where_clause, yy_action_633) _ => Error } } -fn yy_state_367(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_array_sub_patterns, yy_action_658) +fn yy_state_723(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(8, NT_for_expr, yy_action_619) } -fn yy_state_368(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_724(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_PACKAGE_NAME => Shift(yy_state_288) - T_UIDENT => Shift(yy_state_290) - T_BYTES => Shift(yy_state_291) - T_STRING => Shift(yy_state_292) - T_AS => Shift(yy_state_369) - T_UNDERSCORE => Shift(yy_state_371) - T_LIDENT => Shift(yy_state_372) - T_COMMA | T_RBRACKET => Reduce(1, NT_dotdot_binder, yy_action_657) + T_SEMI => Shift(yy_state_725) _ => Error } } -fn yy_state_369(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_725(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LIDENT => Shift(yy_state_370) + NT_non_empty_list_commas_rev_separated_pair_binder_EQUAL_expr__ => Shift(yy_state_634) + NT_non_empty_list_commas_no_trailing_separated_pair_binder_EQUAL_expr__ => Shift(yy_state_672) + T_EXTEND => Shift(yy_state_683) + T_LIDENT => Shift(yy_state_684) + NT_list_commas_no_trailing_separated_pair_binder_EQUAL_expr__ => Shift(yy_state_726) + T_LBRACE => Reduce(0, NT_list_commas_no_trailing_separated_pair_binder_EQUAL_expr__, yy_action_669) _ => Error } } -fn yy_state_370(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_dotdot_binder, yy_action_656) -} - -fn yy_state_371(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(2, NT_dotdot_binder, yy_action_655) -} - -fn yy_state_372(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(2, NT_dotdot_binder, yy_action_654) -} - -fn yy_state_373(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_726(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RBRACKET => Shift(yy_state_374) + T_LBRACE => Shift(yy_state_133) + NT_block_expr => Shift(yy_state_727) _ => Error } } -fn yy_state_374(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_simple_pattern, yy_action_653) -} - -fn yy_state_375(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_727(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_AS => Shift(yy_state_342) - T_COMMA | T_RBRACE => Reduce(4, NT_non_empty_list_commas_rev_map_elem_pat_, yy_action_652) + T_NOBREAK => Shift(yy_state_713) + NT_optional_nobreak => Shift(yy_state_728) + T_EOF | T_RPAREN | T_COMMA | T_COLON | T_SEMI | T_RBRACKET | T_BAR_RBRACKET | T_LBRACE | T_RBRACE | T_AND | T_WHERE => Reduce(0, NT_optional_nobreak, yy_action_634) _ => Error } } -fn yy_state_376(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_option_QUESTION_, yy_action_651) -} - -fn yy_state_377(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_non_empty_list_commas_rev_fields_pat_single_, yy_action_650) -} - -fn yy_state_378(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_728(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_option_COMMA_ => Shift(yy_state_379) - T_COMMA => Shift(yy_state_380) - T_RBRACE => Reduce(0, NT_option_COMMA_, yy_action_876) + T_WHERE => Shift(yy_state_693) + NT_optional_where_clause => Shift(yy_state_729) + T_EOF | T_RPAREN | T_COMMA | T_COLON | T_SEMI | T_RBRACKET | T_BAR_RBRACKET | T_LBRACE | T_RBRACE | T_AND => Reduce(0, NT_optional_where_clause, yy_action_633) _ => Error } } -fn yy_state_379(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(2, NT_non_empty_list_commas_map_elem_pat_, yy_action_649) +fn yy_state_729(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(10, NT_for_expr, yy_action_618) } -fn yy_state_380(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_730(_lookahead : YYSymbol) -> YYDecision { match _lookahead { + NT_multiline_string => Shift(yy_state_2) + T_MULTILINE_INTERP => Shift(yy_state_4) + T_MULTILINE_STRING => Shift(yy_state_5) T_REGEX_LITERAL => Shift(yy_state_6) T_STRING => Shift(yy_state_7) T_FLOAT => Shift(yy_state_8) @@ -20985,322 +30743,838 @@ fn yy_state_380(_lookahead : YYSymbol) -> YYDecision { T_BYTE => Shift(yy_state_13) T_FALSE => Shift(yy_state_14) T_TRUE => Shift(yy_state_15) - NT_map_syntax_key => Shift(yy_state_381) - T_MINUS => Shift(yy_state_385) - NT_simple_constant => Shift(yy_state_389) - T_RBRACE => Reduce(1, NT_option_COMMA_, yy_action_874) - T_DOTDOT => Reduce(2, NT_non_empty_list_commas_with_tail_map_elem_pat_, yy_action_648) + T_BYTES_INTERP => Shift(yy_state_16) + T_INTERP => Shift(yy_state_17) + NT_non_empty_list_multiline_string_ => Shift(yy_state_18) + NT_simple_constant => Shift(yy_state_19) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + NT_tuple_expr => Shift(yy_state_27) + T_LBRACKET_BAR => Shift(yy_state_28) + T_LBRACKET => Shift(yy_state_36) + NT_constr => Shift(yy_state_47) + NT_qual_ident_simple_expr => Shift(yy_state_48) + T_UNDERSCORE => Shift(yy_state_49) + NT_atomic_expr => Shift(yy_state_50) + NT_anony_fn => Shift(yy_state_51) + T_LBRACE => Shift(yy_state_52) + T_FN => Shift(yy_state_61) + NT_type_name => Shift(yy_state_139) + T_ASYNC => Shift(yy_state_152) + NT_simple_expr => Shift(yy_state_165) + T_EXCLAMATION => Shift(yy_state_176) + T_LPAREN => Shift(yy_state_177) + T_MINUS => Shift(yy_state_191) + T_PLUS => Shift(yy_state_193) + T_UIDENT => Shift(yy_state_195) + T_PACKAGE_NAME => Shift(yy_state_196) + T_EXTEND => Shift(yy_state_199) + T_LIDENT => Shift(yy_state_200) + NT_prefix_expr => Shift(yy_state_201) + NT_range_expr => Shift(yy_state_212) + NT_postfix_expr => Shift(yy_state_223) + NT_infix_expr => Shift(yy_state_731) _ => Error } } -fn yy_state_381(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_731(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_QUESTION => Shift(yy_state_376) - NT_option_QUESTION_ => Shift(yy_state_382) - T_COLON => Reduce(0, NT_option_QUESTION_, yy_action_715) + T_LBRACE => Shift(yy_state_133) + T_BARBAR => Shift(yy_state_230) + T_AMPERAMPER => Shift(yy_state_232) + T_BAR => Shift(yy_state_234) + T_CARET => Shift(yy_state_236) + T_AMPER => Shift(yy_state_238) + T_MINUS => Shift(yy_state_240) + T_PLUS => Shift(yy_state_242) + T_INFIX1 => Shift(yy_state_244) + T_INFIX2 => Shift(yy_state_246) + T_INFIX3 => Shift(yy_state_248) + T_INFIX4 => Shift(yy_state_250) + T_IMPLIES => Shift(yy_state_252) + NT_block_expr => Shift(yy_state_732) _ => Error } } -fn yy_state_382(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_732(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_COLON => Shift(yy_state_383) + T_NOBREAK => Shift(yy_state_713) + NT_optional_nobreak => Shift(yy_state_733) + T_EOF | T_RPAREN | T_COMMA | T_COLON | T_SEMI | T_RBRACKET | T_BAR_RBRACKET | T_LBRACE | T_RBRACE | T_AND => Reduce(0, NT_optional_nobreak, yy_action_634) _ => Error } } -fn yy_state_383(_lookahead : YYSymbol) -> YYDecision { - match _lookahead { - T_AMPER => Shift(yy_state_19) - NT_qual_ident_ty => Shift(yy_state_25) - T_UIDENT => Shift(yy_state_182) - T_LBRACE => Shift(yy_state_275) - T_LBRACKET => Shift(yy_state_279) - T_LPAREN => Shift(yy_state_293) - NT_constr => Shift(yy_state_294) - T_LIDENT => Shift(yy_state_307) - T_UNDERSCORE => Shift(yy_state_312) - T_BYTES => Shift(yy_state_313) - T_STRING => Shift(yy_state_314) - T_MINUS => Shift(yy_state_315) - T_FLOAT => Shift(yy_state_319) - T_DOUBLE => Shift(yy_state_320) - T_BYTE => Shift(yy_state_321) - T_INT => Shift(yy_state_322) - T_CHAR => Shift(yy_state_323) - T_FALSE => Shift(yy_state_324) - T_TRUE => Shift(yy_state_325) - NT_simple_pattern => Shift(yy_state_326) - NT_type_name => Shift(yy_state_329) - T_PACKAGE_NAME => Shift(yy_state_334) - NT_range_pattern => Shift(yy_state_337) - NT_or_pattern => Shift(yy_state_340) - NT_pattern => Shift(yy_state_384) - _ => Error - } +fn yy_state_733(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(5, NT_while_expr, yy_action_617) } -fn yy_state_384(_lookahead : YYSymbol) -> YYDecision { - match _lookahead { - T_AS => Shift(yy_state_342) - T_COMMA | T_RBRACE => Reduce(6, NT_non_empty_list_commas_rev_map_elem_pat_, yy_action_646) - _ => Error - } +fn yy_state_734(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_expr_statement, yy_action_616) } -fn yy_state_385(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_735(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_FLOAT => Shift(yy_state_386) - T_DOUBLE => Shift(yy_state_387) - T_INT => Shift(yy_state_388) + NT_multiline_string => Shift(yy_state_2) + T_MULTILINE_INTERP => Shift(yy_state_4) + T_MULTILINE_STRING => Shift(yy_state_5) + T_REGEX_LITERAL => Shift(yy_state_6) + T_STRING => Shift(yy_state_7) + T_FLOAT => Shift(yy_state_8) + T_DOUBLE => Shift(yy_state_9) + T_INT => Shift(yy_state_10) + T_CHAR => Shift(yy_state_11) + T_BYTES => Shift(yy_state_12) + T_BYTE => Shift(yy_state_13) + T_FALSE => Shift(yy_state_14) + T_TRUE => Shift(yy_state_15) + T_BYTES_INTERP => Shift(yy_state_16) + T_INTERP => Shift(yy_state_17) + NT_non_empty_list_multiline_string_ => Shift(yy_state_18) + NT_simple_constant => Shift(yy_state_19) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + NT_tuple_expr => Shift(yy_state_27) + T_LBRACKET_BAR => Shift(yy_state_28) + T_LBRACKET => Shift(yy_state_36) + NT_constr => Shift(yy_state_47) + NT_qual_ident_simple_expr => Shift(yy_state_48) + NT_atomic_expr => Shift(yy_state_50) + NT_anony_fn => Shift(yy_state_51) + T_LBRACE => Shift(yy_state_52) + T_FN => Shift(yy_state_61) + NT_type_name => Shift(yy_state_139) + T_ASYNC => Shift(yy_state_152) + NT_simple_expr => Shift(yy_state_165) + T_EXCLAMATION => Shift(yy_state_176) + T_MINUS => Shift(yy_state_191) + T_PLUS => Shift(yy_state_193) + T_UIDENT => Shift(yy_state_195) + T_PACKAGE_NAME => Shift(yy_state_196) + NT_prefix_expr => Shift(yy_state_201) + NT_range_expr => Shift(yy_state_212) + NT_postfix_expr => Shift(yy_state_223) + T_EXISTS => Shift(yy_state_224) + T_FORALL => Shift(yy_state_256) + NT_infix_expr => Shift(yy_state_272) + T_UNDERSCORE => Shift(yy_state_273) + T_LPAREN => Shift(yy_state_281) + NT_pipe_expr => Shift(yy_state_325) + NT_arrow_fn_expr => Shift(yy_state_344) + NT_quantifier_expr => Shift(yy_state_345) + NT_simple_try_expr => Shift(yy_state_346) + NT_lexscan_expr => Shift(yy_state_347) + NT_lexmatch_expr => Shift(yy_state_348) + NT_match_expr => Shift(yy_state_349) + NT_if_expr => Shift(yy_state_350) + NT_try_expr => Shift(yy_state_351) + NT_while_expr => Shift(yy_state_352) + NT_foreach_expr => Shift(yy_state_353) + NT_for_expr => Shift(yy_state_354) + T_LEXSCAN => Shift(yy_state_355) + NT_lexscan_header => Shift(yy_state_358) + T_LEXMATCH => Shift(yy_state_391) + NT_lexmatch_header => Shift(yy_state_399) + NT_match_header => Shift(yy_state_444) + T_MATCH => Shift(yy_state_605) + T_IF => Shift(yy_state_608) + T_TRY_EXCLAMATION => Shift(yy_state_614) + T_TRY_QUESTION => Shift(yy_state_616) + T_TRY => Shift(yy_state_618) + NT_loop_label_colon => Shift(yy_state_632) + T_POST_LABEL => Shift(yy_state_639) + T_EXTEND => Shift(yy_state_641) + T_LIDENT => Shift(yy_state_648) + NT_expr => Shift(yy_state_736) + NT_option_expr_ => Shift(yy_state_737) + T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_1071) + T_SEMI | T_RBRACE => Reduce(0, NT_option_expr_, yy_action_615) _ => Error } } -fn yy_state_386(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(2, NT_map_syntax_key, yy_action_645) +fn yy_state_736(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_option_expr_, yy_action_614) } -fn yy_state_387(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(2, NT_map_syntax_key, yy_action_644) +fn yy_state_737(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(2, NT_expr_statement, yy_action_613) } -fn yy_state_388(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(2, NT_map_syntax_key, yy_action_643) +fn yy_state_738(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + NT_multiline_string => Shift(yy_state_2) + T_MULTILINE_INTERP => Shift(yy_state_4) + T_MULTILINE_STRING => Shift(yy_state_5) + T_REGEX_LITERAL => Shift(yy_state_6) + T_STRING => Shift(yy_state_7) + T_FLOAT => Shift(yy_state_8) + T_DOUBLE => Shift(yy_state_9) + T_INT => Shift(yy_state_10) + T_CHAR => Shift(yy_state_11) + T_BYTES => Shift(yy_state_12) + T_BYTE => Shift(yy_state_13) + T_FALSE => Shift(yy_state_14) + T_TRUE => Shift(yy_state_15) + T_BYTES_INTERP => Shift(yy_state_16) + T_INTERP => Shift(yy_state_17) + NT_non_empty_list_multiline_string_ => Shift(yy_state_18) + NT_simple_constant => Shift(yy_state_19) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + NT_tuple_expr => Shift(yy_state_27) + T_LBRACKET_BAR => Shift(yy_state_28) + T_LBRACKET => Shift(yy_state_36) + NT_constr => Shift(yy_state_47) + NT_qual_ident_simple_expr => Shift(yy_state_48) + NT_atomic_expr => Shift(yy_state_50) + NT_anony_fn => Shift(yy_state_51) + T_LBRACE => Shift(yy_state_52) + T_FN => Shift(yy_state_61) + NT_type_name => Shift(yy_state_139) + T_ASYNC => Shift(yy_state_152) + NT_simple_expr => Shift(yy_state_165) + T_EXCLAMATION => Shift(yy_state_176) + T_MINUS => Shift(yy_state_191) + T_PLUS => Shift(yy_state_193) + T_UIDENT => Shift(yy_state_195) + T_PACKAGE_NAME => Shift(yy_state_196) + NT_prefix_expr => Shift(yy_state_201) + NT_range_expr => Shift(yy_state_212) + NT_postfix_expr => Shift(yy_state_223) + T_EXISTS => Shift(yy_state_224) + T_FORALL => Shift(yy_state_256) + NT_infix_expr => Shift(yy_state_272) + T_UNDERSCORE => Shift(yy_state_273) + T_LPAREN => Shift(yy_state_281) + NT_pipe_expr => Shift(yy_state_325) + NT_arrow_fn_expr => Shift(yy_state_344) + NT_quantifier_expr => Shift(yy_state_345) + NT_simple_try_expr => Shift(yy_state_346) + NT_lexscan_expr => Shift(yy_state_347) + NT_lexmatch_expr => Shift(yy_state_348) + NT_match_expr => Shift(yy_state_349) + NT_if_expr => Shift(yy_state_350) + NT_try_expr => Shift(yy_state_351) + NT_while_expr => Shift(yy_state_352) + NT_foreach_expr => Shift(yy_state_353) + NT_for_expr => Shift(yy_state_354) + T_LEXSCAN => Shift(yy_state_355) + NT_lexscan_header => Shift(yy_state_358) + T_LEXMATCH => Shift(yy_state_391) + NT_lexmatch_header => Shift(yy_state_399) + NT_match_header => Shift(yy_state_444) + T_MATCH => Shift(yy_state_605) + T_IF => Shift(yy_state_608) + T_TRY_EXCLAMATION => Shift(yy_state_614) + T_TRY_QUESTION => Shift(yy_state_616) + T_TRY => Shift(yy_state_618) + NT_loop_label_colon => Shift(yy_state_632) + T_EXTEND => Shift(yy_state_641) + T_LIDENT => Shift(yy_state_648) + NT_expr => Shift(yy_state_739) + NT_non_empty_list_commas_rev_expr_ => Shift(yy_state_740) + NT_non_empty_list_commas_no_trailing_expr_ => Shift(yy_state_743) + NT_list_commas_no_trailing_expr_ => Shift(yy_state_744) + T_POST_LABEL => Shift(yy_state_745) + T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_1071) + T_SEMI | T_RBRACE => Reduce(0, NT_list_commas_no_trailing_expr_, yy_action_612) + _ => Error + } } -fn yy_state_389(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_map_syntax_key, yy_action_642) +fn yy_state_739(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_non_empty_list_commas_rev_expr_, yy_action_611) } -fn yy_state_390(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_740(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_option_COMMA_ => Shift(yy_state_391) - T_COMMA => Shift(yy_state_392) - T_RBRACE => Reduce(0, NT_option_COMMA_, yy_action_876) + T_COMMA => Shift(yy_state_741) + T_SEMI | T_RBRACE => Reduce(1, NT_non_empty_list_commas_no_trailing_expr_, yy_action_610) _ => Error } } -fn yy_state_391(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(2, NT_non_empty_list_commas_fields_pat_single_, yy_action_641) -} - -fn yy_state_392(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_741(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_fields_pat_single => Shift(yy_state_393) - T_LIDENT => Shift(yy_state_394) - T_RBRACE => Reduce(1, NT_option_COMMA_, yy_action_874) - T_DOTDOT => Reduce(2, NT_non_empty_list_commas_with_tail_fields_pat_single_, yy_action_640) + NT_multiline_string => Shift(yy_state_2) + T_MULTILINE_INTERP => Shift(yy_state_4) + T_MULTILINE_STRING => Shift(yy_state_5) + T_REGEX_LITERAL => Shift(yy_state_6) + T_STRING => Shift(yy_state_7) + T_FLOAT => Shift(yy_state_8) + T_DOUBLE => Shift(yy_state_9) + T_INT => Shift(yy_state_10) + T_CHAR => Shift(yy_state_11) + T_BYTES => Shift(yy_state_12) + T_BYTE => Shift(yy_state_13) + T_FALSE => Shift(yy_state_14) + T_TRUE => Shift(yy_state_15) + T_BYTES_INTERP => Shift(yy_state_16) + T_INTERP => Shift(yy_state_17) + NT_non_empty_list_multiline_string_ => Shift(yy_state_18) + NT_simple_constant => Shift(yy_state_19) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + NT_tuple_expr => Shift(yy_state_27) + T_LBRACKET_BAR => Shift(yy_state_28) + T_LBRACKET => Shift(yy_state_36) + NT_constr => Shift(yy_state_47) + NT_qual_ident_simple_expr => Shift(yy_state_48) + NT_atomic_expr => Shift(yy_state_50) + NT_anony_fn => Shift(yy_state_51) + T_LBRACE => Shift(yy_state_52) + T_FN => Shift(yy_state_61) + NT_type_name => Shift(yy_state_139) + T_ASYNC => Shift(yy_state_152) + NT_simple_expr => Shift(yy_state_165) + T_EXCLAMATION => Shift(yy_state_176) + T_MINUS => Shift(yy_state_191) + T_PLUS => Shift(yy_state_193) + T_UIDENT => Shift(yy_state_195) + T_PACKAGE_NAME => Shift(yy_state_196) + NT_prefix_expr => Shift(yy_state_201) + NT_range_expr => Shift(yy_state_212) + NT_postfix_expr => Shift(yy_state_223) + T_EXISTS => Shift(yy_state_224) + T_FORALL => Shift(yy_state_256) + NT_infix_expr => Shift(yy_state_272) + T_UNDERSCORE => Shift(yy_state_273) + T_LPAREN => Shift(yy_state_281) + NT_pipe_expr => Shift(yy_state_325) + NT_arrow_fn_expr => Shift(yy_state_344) + NT_quantifier_expr => Shift(yy_state_345) + NT_simple_try_expr => Shift(yy_state_346) + NT_lexscan_expr => Shift(yy_state_347) + NT_lexmatch_expr => Shift(yy_state_348) + NT_match_expr => Shift(yy_state_349) + NT_if_expr => Shift(yy_state_350) + NT_try_expr => Shift(yy_state_351) + NT_while_expr => Shift(yy_state_352) + NT_foreach_expr => Shift(yy_state_353) + NT_for_expr => Shift(yy_state_354) + T_LEXSCAN => Shift(yy_state_355) + NT_lexscan_header => Shift(yy_state_358) + T_LEXMATCH => Shift(yy_state_391) + NT_lexmatch_header => Shift(yy_state_399) + NT_match_header => Shift(yy_state_444) + T_MATCH => Shift(yy_state_605) + T_IF => Shift(yy_state_608) + T_TRY_EXCLAMATION => Shift(yy_state_614) + T_TRY_QUESTION => Shift(yy_state_616) + T_TRY => Shift(yy_state_618) + NT_loop_label_colon => Shift(yy_state_632) + T_POST_LABEL => Shift(yy_state_639) + T_EXTEND => Shift(yy_state_641) + T_LIDENT => Shift(yy_state_648) + NT_expr => Shift(yy_state_742) + T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_1071) _ => Error } } -fn yy_state_393(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_non_empty_list_commas_rev_fields_pat_single_, yy_action_639) +fn yy_state_742(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_non_empty_list_commas_rev_expr_, yy_action_609) } -fn yy_state_394(_lookahead : YYSymbol) -> YYDecision { - match _lookahead { - T_COLON => Shift(yy_state_395) - T_COMMA | T_RBRACE => Reduce(1, NT_fields_pat_single, yy_action_637) - _ => Error - } +fn yy_state_743(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_list_commas_no_trailing_expr_, yy_action_608) } -fn yy_state_395(_lookahead : YYSymbol) -> YYDecision { - match _lookahead { - T_AMPER => Shift(yy_state_19) - NT_qual_ident_ty => Shift(yy_state_25) - T_UIDENT => Shift(yy_state_182) - T_LBRACE => Shift(yy_state_275) - T_LBRACKET => Shift(yy_state_279) - T_LPAREN => Shift(yy_state_293) - NT_constr => Shift(yy_state_294) - T_LIDENT => Shift(yy_state_307) - T_UNDERSCORE => Shift(yy_state_312) - T_BYTES => Shift(yy_state_313) - T_STRING => Shift(yy_state_314) - T_MINUS => Shift(yy_state_315) - T_FLOAT => Shift(yy_state_319) - T_DOUBLE => Shift(yy_state_320) - T_BYTE => Shift(yy_state_321) - T_INT => Shift(yy_state_322) - T_CHAR => Shift(yy_state_323) - T_FALSE => Shift(yy_state_324) - T_TRUE => Shift(yy_state_325) - NT_simple_pattern => Shift(yy_state_326) - NT_type_name => Shift(yy_state_329) - T_PACKAGE_NAME => Shift(yy_state_334) - NT_range_pattern => Shift(yy_state_337) - NT_or_pattern => Shift(yy_state_340) - NT_pattern => Shift(yy_state_396) - _ => Error - } +fn yy_state_744(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(2, NT_expr_statement, yy_action_607) } -fn yy_state_396(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_745(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_AS => Shift(yy_state_342) - T_COMMA | T_RBRACE => Reduce(3, NT_fields_pat_single, yy_action_635) + NT_multiline_string => Shift(yy_state_2) + T_MULTILINE_INTERP => Shift(yy_state_4) + T_MULTILINE_STRING => Shift(yy_state_5) + T_REGEX_LITERAL => Shift(yy_state_6) + T_STRING => Shift(yy_state_7) + T_FLOAT => Shift(yy_state_8) + T_DOUBLE => Shift(yy_state_9) + T_INT => Shift(yy_state_10) + T_CHAR => Shift(yy_state_11) + T_BYTES => Shift(yy_state_12) + T_BYTE => Shift(yy_state_13) + T_FALSE => Shift(yy_state_14) + T_TRUE => Shift(yy_state_15) + T_BYTES_INTERP => Shift(yy_state_16) + T_INTERP => Shift(yy_state_17) + NT_non_empty_list_multiline_string_ => Shift(yy_state_18) + NT_simple_constant => Shift(yy_state_19) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + NT_tuple_expr => Shift(yy_state_27) + T_LBRACKET_BAR => Shift(yy_state_28) + T_LBRACKET => Shift(yy_state_36) + NT_constr => Shift(yy_state_47) + NT_qual_ident_simple_expr => Shift(yy_state_48) + NT_atomic_expr => Shift(yy_state_50) + NT_anony_fn => Shift(yy_state_51) + T_LBRACE => Shift(yy_state_52) + T_FN => Shift(yy_state_61) + NT_type_name => Shift(yy_state_139) + T_ASYNC => Shift(yy_state_152) + NT_simple_expr => Shift(yy_state_165) + T_EXCLAMATION => Shift(yy_state_176) + T_MINUS => Shift(yy_state_191) + T_PLUS => Shift(yy_state_193) + T_UIDENT => Shift(yy_state_195) + T_PACKAGE_NAME => Shift(yy_state_196) + NT_prefix_expr => Shift(yy_state_201) + NT_range_expr => Shift(yy_state_212) + NT_postfix_expr => Shift(yy_state_223) + T_EXISTS => Shift(yy_state_224) + T_FORALL => Shift(yy_state_256) + NT_infix_expr => Shift(yy_state_272) + T_UNDERSCORE => Shift(yy_state_273) + T_LPAREN => Shift(yy_state_281) + NT_pipe_expr => Shift(yy_state_325) + NT_arrow_fn_expr => Shift(yy_state_344) + NT_quantifier_expr => Shift(yy_state_345) + NT_simple_try_expr => Shift(yy_state_346) + NT_lexscan_expr => Shift(yy_state_347) + NT_lexmatch_expr => Shift(yy_state_348) + NT_match_expr => Shift(yy_state_349) + NT_if_expr => Shift(yy_state_350) + NT_try_expr => Shift(yy_state_351) + NT_while_expr => Shift(yy_state_352) + NT_foreach_expr => Shift(yy_state_353) + NT_for_expr => Shift(yy_state_354) + T_LEXSCAN => Shift(yy_state_355) + NT_lexscan_header => Shift(yy_state_358) + T_LEXMATCH => Shift(yy_state_391) + NT_lexmatch_header => Shift(yy_state_399) + NT_match_header => Shift(yy_state_444) + T_MATCH => Shift(yy_state_605) + T_IF => Shift(yy_state_608) + T_TRY_EXCLAMATION => Shift(yy_state_614) + T_TRY_QUESTION => Shift(yy_state_616) + T_TRY => Shift(yy_state_618) + NT_loop_label_colon => Shift(yy_state_632) + T_POST_LABEL => Shift(yy_state_639) + T_COLON => Shift(yy_state_640) + T_EXTEND => Shift(yy_state_641) + T_LIDENT => Shift(yy_state_648) + NT_expr => Shift(yy_state_739) + NT_non_empty_list_commas_rev_expr_ => Shift(yy_state_740) + NT_non_empty_list_commas_no_trailing_expr_ => Shift(yy_state_743) + NT_list_commas_no_trailing_expr_ => Shift(yy_state_746) + T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_1071) + T_SEMI | T_RBRACE => Reduce(0, NT_list_commas_no_trailing_expr_, yy_action_612) _ => Error } } -fn yy_state_397(_lookahead : YYSymbol) -> YYDecision { - match _lookahead { - T_DOTDOT => Shift(yy_state_398) - _ => Error - } +fn yy_state_746(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_expr_statement, yy_action_606) } -fn yy_state_398(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_747(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_COMMA => Shift(yy_state_300) - NT_option_COMMA_ => Shift(yy_state_399) - T_RBRACE => Reduce(0, NT_option_COMMA_, yy_action_876) + NT_multiline_string => Shift(yy_state_2) + T_MULTILINE_INTERP => Shift(yy_state_4) + T_MULTILINE_STRING => Shift(yy_state_5) + T_REGEX_LITERAL => Shift(yy_state_6) + T_STRING => Shift(yy_state_7) + T_FLOAT => Shift(yy_state_8) + T_DOUBLE => Shift(yy_state_9) + T_INT => Shift(yy_state_10) + T_CHAR => Shift(yy_state_11) + T_BYTES => Shift(yy_state_12) + T_BYTE => Shift(yy_state_13) + T_FALSE => Shift(yy_state_14) + T_TRUE => Shift(yy_state_15) + T_BYTES_INTERP => Shift(yy_state_16) + T_INTERP => Shift(yy_state_17) + NT_non_empty_list_multiline_string_ => Shift(yy_state_18) + NT_simple_constant => Shift(yy_state_19) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + NT_tuple_expr => Shift(yy_state_27) + T_LBRACKET_BAR => Shift(yy_state_28) + T_LBRACKET => Shift(yy_state_36) + NT_constr => Shift(yy_state_47) + NT_qual_ident_simple_expr => Shift(yy_state_48) + NT_atomic_expr => Shift(yy_state_50) + NT_anony_fn => Shift(yy_state_51) + T_LBRACE => Shift(yy_state_52) + T_FN => Shift(yy_state_61) + NT_type_name => Shift(yy_state_139) + T_ASYNC => Shift(yy_state_152) + NT_simple_expr => Shift(yy_state_165) + T_EXCLAMATION => Shift(yy_state_176) + T_MINUS => Shift(yy_state_191) + T_PLUS => Shift(yy_state_193) + T_UIDENT => Shift(yy_state_195) + T_PACKAGE_NAME => Shift(yy_state_196) + NT_prefix_expr => Shift(yy_state_201) + NT_range_expr => Shift(yy_state_212) + NT_postfix_expr => Shift(yy_state_223) + T_EXISTS => Shift(yy_state_224) + T_FORALL => Shift(yy_state_256) + NT_infix_expr => Shift(yy_state_272) + T_UNDERSCORE => Shift(yy_state_273) + T_LPAREN => Shift(yy_state_281) + NT_pipe_expr => Shift(yy_state_325) + NT_arrow_fn_expr => Shift(yy_state_344) + NT_quantifier_expr => Shift(yy_state_345) + NT_simple_try_expr => Shift(yy_state_346) + NT_lexscan_expr => Shift(yy_state_347) + NT_lexmatch_expr => Shift(yy_state_348) + NT_match_expr => Shift(yy_state_349) + NT_if_expr => Shift(yy_state_350) + NT_try_expr => Shift(yy_state_351) + NT_while_expr => Shift(yy_state_352) + NT_foreach_expr => Shift(yy_state_353) + NT_for_expr => Shift(yy_state_354) + T_LEXSCAN => Shift(yy_state_355) + NT_lexscan_header => Shift(yy_state_358) + T_LEXMATCH => Shift(yy_state_391) + NT_lexmatch_header => Shift(yy_state_399) + NT_match_header => Shift(yy_state_444) + T_MATCH => Shift(yy_state_605) + T_IF => Shift(yy_state_608) + T_TRY_EXCLAMATION => Shift(yy_state_614) + T_TRY_QUESTION => Shift(yy_state_616) + T_TRY => Shift(yy_state_618) + NT_loop_label_colon => Shift(yy_state_632) + T_EXTEND => Shift(yy_state_641) + T_LIDENT => Shift(yy_state_648) + NT_expr => Shift(yy_state_736) + NT_option_expr_ => Shift(yy_state_748) + T_POST_LABEL => Shift(yy_state_749) + T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_1071) + T_SEMI | T_RBRACE => Reduce(0, NT_option_expr_, yy_action_615) _ => Error } } -fn yy_state_399(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_non_empty_map_elems_pat, yy_action_634) -} - -fn yy_state_400(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_non_empty_map_elems_pat, yy_action_633) +fn yy_state_748(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(2, NT_expr_statement, yy_action_605) } -fn yy_state_401(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_749(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_DOTDOT => Shift(yy_state_402) + NT_multiline_string => Shift(yy_state_2) + T_MULTILINE_INTERP => Shift(yy_state_4) + T_MULTILINE_STRING => Shift(yy_state_5) + T_REGEX_LITERAL => Shift(yy_state_6) + T_STRING => Shift(yy_state_7) + T_FLOAT => Shift(yy_state_8) + T_DOUBLE => Shift(yy_state_9) + T_INT => Shift(yy_state_10) + T_CHAR => Shift(yy_state_11) + T_BYTES => Shift(yy_state_12) + T_BYTE => Shift(yy_state_13) + T_FALSE => Shift(yy_state_14) + T_TRUE => Shift(yy_state_15) + T_BYTES_INTERP => Shift(yy_state_16) + T_INTERP => Shift(yy_state_17) + NT_non_empty_list_multiline_string_ => Shift(yy_state_18) + NT_simple_constant => Shift(yy_state_19) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + NT_tuple_expr => Shift(yy_state_27) + T_LBRACKET_BAR => Shift(yy_state_28) + T_LBRACKET => Shift(yy_state_36) + NT_constr => Shift(yy_state_47) + NT_qual_ident_simple_expr => Shift(yy_state_48) + NT_atomic_expr => Shift(yy_state_50) + NT_anony_fn => Shift(yy_state_51) + T_LBRACE => Shift(yy_state_52) + T_FN => Shift(yy_state_61) + NT_type_name => Shift(yy_state_139) + T_ASYNC => Shift(yy_state_152) + NT_simple_expr => Shift(yy_state_165) + T_EXCLAMATION => Shift(yy_state_176) + T_MINUS => Shift(yy_state_191) + T_PLUS => Shift(yy_state_193) + T_UIDENT => Shift(yy_state_195) + T_PACKAGE_NAME => Shift(yy_state_196) + NT_prefix_expr => Shift(yy_state_201) + NT_range_expr => Shift(yy_state_212) + NT_postfix_expr => Shift(yy_state_223) + T_EXISTS => Shift(yy_state_224) + T_FORALL => Shift(yy_state_256) + NT_infix_expr => Shift(yy_state_272) + T_UNDERSCORE => Shift(yy_state_273) + T_LPAREN => Shift(yy_state_281) + NT_pipe_expr => Shift(yy_state_325) + NT_arrow_fn_expr => Shift(yy_state_344) + NT_quantifier_expr => Shift(yy_state_345) + NT_simple_try_expr => Shift(yy_state_346) + NT_lexscan_expr => Shift(yy_state_347) + NT_lexmatch_expr => Shift(yy_state_348) + NT_match_expr => Shift(yy_state_349) + NT_if_expr => Shift(yy_state_350) + NT_try_expr => Shift(yy_state_351) + NT_while_expr => Shift(yy_state_352) + NT_foreach_expr => Shift(yy_state_353) + NT_for_expr => Shift(yy_state_354) + T_LEXSCAN => Shift(yy_state_355) + NT_lexscan_header => Shift(yy_state_358) + T_LEXMATCH => Shift(yy_state_391) + NT_lexmatch_header => Shift(yy_state_399) + NT_match_header => Shift(yy_state_444) + T_MATCH => Shift(yy_state_605) + T_IF => Shift(yy_state_608) + T_TRY_EXCLAMATION => Shift(yy_state_614) + T_TRY_QUESTION => Shift(yy_state_616) + T_TRY => Shift(yy_state_618) + NT_loop_label_colon => Shift(yy_state_632) + T_POST_LABEL => Shift(yy_state_639) + T_COLON => Shift(yy_state_640) + T_EXTEND => Shift(yy_state_641) + T_LIDENT => Shift(yy_state_648) + NT_expr => Shift(yy_state_736) + NT_option_expr_ => Shift(yy_state_750) + T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_1071) + T_SEMI | T_RBRACE => Reduce(0, NT_option_expr_, yy_action_615) _ => Error } } -fn yy_state_402(_lookahead : YYSymbol) -> YYDecision { - match _lookahead { - T_COMMA => Shift(yy_state_300) - NT_option_COMMA_ => Shift(yy_state_403) - T_RBRACE => Reduce(0, NT_option_COMMA_, yy_action_876) - _ => Error - } +fn yy_state_750(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_expr_statement, yy_action_604) } -fn yy_state_403(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_non_empty_fields_pat, yy_action_632) +fn yy_state_751(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(2, NT_non_empty_list_semis_single_pattern_case_, yy_action_603) } -fn yy_state_404(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_non_empty_fields_pat, yy_action_631) +fn yy_state_752(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(2, NT_match_expr, yy_action_602) } -fn yy_state_405(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_753(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RBRACE => Shift(yy_state_406) + T_RBRACE => Shift(yy_state_754) _ => Error } } -fn yy_state_406(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_simple_pattern, yy_action_630) +fn yy_state_754(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_match_expr, yy_action_601) } -fn yy_state_407(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_755(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RBRACE => Shift(yy_state_408) + NT_multiline_string => Shift(yy_state_2) + T_MULTILINE_INTERP => Shift(yy_state_4) + T_MULTILINE_STRING => Shift(yy_state_5) + T_REGEX_LITERAL => Shift(yy_state_6) + T_STRING => Shift(yy_state_7) + T_FLOAT => Shift(yy_state_8) + T_DOUBLE => Shift(yy_state_9) + T_INT => Shift(yy_state_10) + T_CHAR => Shift(yy_state_11) + T_BYTES => Shift(yy_state_12) + T_BYTE => Shift(yy_state_13) + T_FALSE => Shift(yy_state_14) + T_TRUE => Shift(yy_state_15) + T_BYTES_INTERP => Shift(yy_state_16) + T_INTERP => Shift(yy_state_17) + NT_non_empty_list_multiline_string_ => Shift(yy_state_18) + NT_simple_constant => Shift(yy_state_19) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + NT_tuple_expr => Shift(yy_state_27) + T_LBRACKET_BAR => Shift(yy_state_28) + T_LBRACKET => Shift(yy_state_36) + NT_constr => Shift(yy_state_47) + NT_qual_ident_simple_expr => Shift(yy_state_48) + NT_atomic_expr => Shift(yy_state_50) + NT_anony_fn => Shift(yy_state_51) + T_LBRACE => Shift(yy_state_52) + T_FN => Shift(yy_state_61) + NT_type_name => Shift(yy_state_139) + T_ASYNC => Shift(yy_state_152) + T_EXCLAMATION => Shift(yy_state_176) + T_MINUS => Shift(yy_state_191) + T_PLUS => Shift(yy_state_193) + T_UIDENT => Shift(yy_state_195) + NT_prefix_expr => Shift(yy_state_201) + NT_range_expr => Shift(yy_state_212) + NT_postfix_expr => Shift(yy_state_223) + T_EXISTS => Shift(yy_state_224) + T_FORALL => Shift(yy_state_256) + NT_infix_expr => Shift(yy_state_272) + T_UNDERSCORE => Shift(yy_state_273) + NT_qual_ident => Shift(yy_state_275) + NT_simple_expr => Shift(yy_state_276) + T_LPAREN => Shift(yy_state_281) + NT_pipe_expr => Shift(yy_state_325) + NT_arrow_fn_expr => Shift(yy_state_344) + NT_quantifier_expr => Shift(yy_state_345) + NT_simple_try_expr => Shift(yy_state_346) + NT_lexscan_expr => Shift(yy_state_347) + NT_lexmatch_expr => Shift(yy_state_348) + NT_match_expr => Shift(yy_state_349) + NT_if_expr => Shift(yy_state_350) + NT_try_expr => Shift(yy_state_351) + NT_while_expr => Shift(yy_state_352) + NT_foreach_expr => Shift(yy_state_353) + NT_for_expr => Shift(yy_state_354) + T_LEXSCAN => Shift(yy_state_355) + NT_lexscan_header => Shift(yy_state_358) + T_LEXMATCH => Shift(yy_state_391) + NT_lexmatch_header => Shift(yy_state_399) + NT_match_header => Shift(yy_state_444) + T_MATCH => Shift(yy_state_605) + T_IF => Shift(yy_state_608) + T_TRY_EXCLAMATION => Shift(yy_state_614) + T_TRY_QUESTION => Shift(yy_state_616) + T_TRY => Shift(yy_state_618) + NT_loop_label_colon => Shift(yy_state_632) + T_POST_LABEL => Shift(yy_state_639) + NT_expr => Shift(yy_state_644) + NT_left_value => Shift(yy_state_645) + T_ELLIPSIS => Shift(yy_state_651) + T_RAISE => Shift(yy_state_652) + T_PACKAGE_NAME => Shift(yy_state_654) + T_EXTEND => Shift(yy_state_656) + T_LIDENT => Shift(yy_state_657) + NT_expr_statement_no_break_continue_return => Shift(yy_state_734) + T_RETURN => Shift(yy_state_735) + T_CONTINUE => Shift(yy_state_738) + T_BREAK => Shift(yy_state_747) + NT_expr_statement => Shift(yy_state_756) + T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_1071) _ => Error } } -fn yy_state_408(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_simple_pattern, yy_action_629) +fn yy_state_756(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_lex_case, yy_action_600) } -fn yy_state_409(_lookahead : YYSymbol) -> YYDecision { - match _lookahead { - T_COMMA => Shift(yy_state_300) - NT_option_COMMA_ => Shift(yy_state_410) - T_RBRACE => Reduce(0, NT_option_COMMA_, yy_action_876) - _ => Error - } +fn yy_state_757(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_list_semis_lex_case_, yy_action_599) } -fn yy_state_410(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_758(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RBRACE => Shift(yy_state_411) + T_RBRACE => Shift(yy_state_759) _ => Error } } -fn yy_state_411(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(4, NT_simple_pattern, yy_action_628) -} - -fn yy_state_412(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(2, NT_simple_pattern, yy_action_627) -} - -fn yy_state_413(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_postfix_expr, yy_action_626) +fn yy_state_759(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_lexmatch_expr, yy_action_598) } -fn yy_state_414(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_760(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_AMPER => Shift(yy_state_19) - T_PACKAGE_NAME => Shift(yy_state_21) - T_UIDENT => Shift(yy_state_24) - NT_qual_ident_ty => Shift(yy_state_25) - NT_type_name => Shift(yy_state_415) + NT_multiline_string => Shift(yy_state_2) + T_MULTILINE_INTERP => Shift(yy_state_4) + T_MULTILINE_STRING => Shift(yy_state_5) + T_REGEX_LITERAL => Shift(yy_state_6) + T_STRING => Shift(yy_state_7) + T_FLOAT => Shift(yy_state_8) + T_DOUBLE => Shift(yy_state_9) + T_INT => Shift(yy_state_10) + T_CHAR => Shift(yy_state_11) + T_BYTES => Shift(yy_state_12) + T_BYTE => Shift(yy_state_13) + T_FALSE => Shift(yy_state_14) + T_TRUE => Shift(yy_state_15) + T_BYTES_INTERP => Shift(yy_state_16) + T_INTERP => Shift(yy_state_17) + NT_non_empty_list_multiline_string_ => Shift(yy_state_18) + NT_simple_constant => Shift(yy_state_19) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + NT_tuple_expr => Shift(yy_state_27) + T_LBRACKET_BAR => Shift(yy_state_28) + T_LBRACKET => Shift(yy_state_36) + NT_constr => Shift(yy_state_47) + NT_qual_ident_simple_expr => Shift(yy_state_48) + NT_atomic_expr => Shift(yy_state_50) + NT_anony_fn => Shift(yy_state_51) + T_LBRACE => Shift(yy_state_52) + T_FN => Shift(yy_state_61) + NT_type_name => Shift(yy_state_139) + T_ASYNC => Shift(yy_state_152) + T_EXCLAMATION => Shift(yy_state_176) + T_MINUS => Shift(yy_state_191) + T_PLUS => Shift(yy_state_193) + T_UIDENT => Shift(yy_state_195) + NT_prefix_expr => Shift(yy_state_201) + NT_range_expr => Shift(yy_state_212) + NT_postfix_expr => Shift(yy_state_223) + T_EXISTS => Shift(yy_state_224) + T_FORALL => Shift(yy_state_256) + NT_infix_expr => Shift(yy_state_272) + T_UNDERSCORE => Shift(yy_state_273) + NT_qual_ident => Shift(yy_state_275) + NT_simple_expr => Shift(yy_state_276) + T_LPAREN => Shift(yy_state_281) + NT_pipe_expr => Shift(yy_state_325) + NT_arrow_fn_expr => Shift(yy_state_344) + NT_quantifier_expr => Shift(yy_state_345) + NT_simple_try_expr => Shift(yy_state_346) + NT_lexscan_expr => Shift(yy_state_347) + NT_lexmatch_expr => Shift(yy_state_348) + NT_match_expr => Shift(yy_state_349) + NT_if_expr => Shift(yy_state_350) + NT_try_expr => Shift(yy_state_351) + NT_while_expr => Shift(yy_state_352) + NT_foreach_expr => Shift(yy_state_353) + NT_for_expr => Shift(yy_state_354) + T_LEXSCAN => Shift(yy_state_355) + NT_lexscan_header => Shift(yy_state_358) + T_LEXMATCH => Shift(yy_state_391) + NT_lexmatch_header => Shift(yy_state_399) + NT_match_header => Shift(yy_state_444) + T_MATCH => Shift(yy_state_605) + T_IF => Shift(yy_state_608) + T_TRY_EXCLAMATION => Shift(yy_state_614) + T_TRY_QUESTION => Shift(yy_state_616) + T_TRY => Shift(yy_state_618) + NT_loop_label_colon => Shift(yy_state_632) + T_POST_LABEL => Shift(yy_state_639) + NT_expr => Shift(yy_state_644) + NT_left_value => Shift(yy_state_645) + T_ELLIPSIS => Shift(yy_state_651) + T_RAISE => Shift(yy_state_652) + T_PACKAGE_NAME => Shift(yy_state_654) + T_EXTEND => Shift(yy_state_656) + T_LIDENT => Shift(yy_state_657) + NT_expr_statement_no_break_continue_return => Shift(yy_state_734) + T_RETURN => Shift(yy_state_735) + T_CONTINUE => Shift(yy_state_738) + T_BREAK => Shift(yy_state_747) + NT_expr_statement => Shift(yy_state_761) + T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_1071) _ => Error } } -fn yy_state_415(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_postfix_expr, yy_action_625) -} - -fn yy_state_416(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_infix_expr, yy_action_624) -} - -fn yy_state_417(_lookahead : YYSymbol) -> YYDecision { - match _lookahead { - T_LIDENT => Shift(yy_state_418) - _ => Error - } +fn yy_state_761(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_lexscan_case, yy_action_597) } -fn yy_state_418(_lookahead : YYSymbol) -> YYDecision { - match _lookahead { - T_COLON => Shift(yy_state_419) - _ => Error - } +fn yy_state_762(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_list_semis_lexscan_case_, yy_action_596) } -fn yy_state_419(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_763(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_ASYNC => Shift(yy_state_52) - T_UNDERSCORE => Shift(yy_state_57) - T_AMPER => Shift(yy_state_58) - T_PACKAGE_NAME => Shift(yy_state_60) - T_UIDENT => Shift(yy_state_67) - T_LPAREN => Shift(yy_state_71) - NT_simple_type => Shift(yy_state_97) - NT_type_ => Shift(yy_state_420) + T_RBRACE => Shift(yy_state_764) _ => Error } } -fn yy_state_420(_lookahead : YYSymbol) -> YYDecision { - match _lookahead { - T_COMMA => Shift(yy_state_421) - _ => Error - } +fn yy_state_764(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_lexscan_expr, yy_action_595) } -fn yy_state_421(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_765(_lookahead : YYSymbol) -> YYDecision { match _lookahead { NT_multiline_string => Shift(yy_state_2) T_MULTILINE_INTERP => Shift(yy_state_4) @@ -21315,62 +31589,93 @@ fn yy_state_421(_lookahead : YYSymbol) -> YYDecision { T_BYTE => Shift(yy_state_13) T_FALSE => Shift(yy_state_14) T_TRUE => Shift(yy_state_15) - T_INTERP => Shift(yy_state_16) - NT_non_empty_list_multiline_string_ => Shift(yy_state_17) - NT_simple_constant => Shift(yy_state_18) - T_AMPER => Shift(yy_state_19) - NT_qual_ident_ty => Shift(yy_state_25) - NT_tuple_expr => Shift(yy_state_26) - T_LBRACKET => Shift(yy_state_27) - NT_constr => Shift(yy_state_35) - NT_qual_ident_simple_expr => Shift(yy_state_36) - NT_atomic_expr => Shift(yy_state_37) - NT_anony_fn => Shift(yy_state_38) - T_LBRACE => Shift(yy_state_39) - T_FN => Shift(yy_state_48) - NT_type_name => Shift(yy_state_126) - T_ASYNC => Shift(yy_state_138) - NT_simple_expr => Shift(yy_state_151) - T_EXCLAMATION => Shift(yy_state_162) - T_UNDERSCORE => Shift(yy_state_163) - T_LPAREN => Shift(yy_state_164) - T_MINUS => Shift(yy_state_178) - T_PLUS => Shift(yy_state_180) - T_UIDENT => Shift(yy_state_182) - T_PACKAGE_NAME => Shift(yy_state_183) - T_LIDENT => Shift(yy_state_186) - NT_prefix_expr => Shift(yy_state_187) - NT_range_expr => Shift(yy_state_198) - NT_postfix_expr => Shift(yy_state_416) - T_EXISTS => Shift(yy_state_417) - NT_infix_expr => Shift(yy_state_422) - NT_quantifier_expr => Shift(yy_state_447) - NT_quantifier_body_expr => Shift(yy_state_448) - T_FORALL => Shift(yy_state_449) + T_BYTES_INTERP => Shift(yy_state_16) + T_INTERP => Shift(yy_state_17) + NT_non_empty_list_multiline_string_ => Shift(yy_state_18) + NT_simple_constant => Shift(yy_state_19) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + NT_tuple_expr => Shift(yy_state_27) + T_LBRACKET_BAR => Shift(yy_state_28) + T_LBRACKET => Shift(yy_state_36) + NT_constr => Shift(yy_state_47) + NT_qual_ident_simple_expr => Shift(yy_state_48) + T_UNDERSCORE => Shift(yy_state_49) + NT_atomic_expr => Shift(yy_state_50) + NT_anony_fn => Shift(yy_state_51) + T_LBRACE => Shift(yy_state_52) + T_FN => Shift(yy_state_61) + NT_type_name => Shift(yy_state_139) + T_ASYNC => Shift(yy_state_152) + NT_simple_expr => Shift(yy_state_165) + T_EXCLAMATION => Shift(yy_state_176) + T_LPAREN => Shift(yy_state_177) + T_MINUS => Shift(yy_state_191) + T_PLUS => Shift(yy_state_193) + T_UIDENT => Shift(yy_state_195) + T_PACKAGE_NAME => Shift(yy_state_196) + T_EXTEND => Shift(yy_state_199) + T_LIDENT => Shift(yy_state_200) + NT_prefix_expr => Shift(yy_state_201) + NT_range_expr => Shift(yy_state_212) + NT_postfix_expr => Shift(yy_state_223) + NT_infix_expr => Shift(yy_state_766) _ => Error } } -fn yy_state_422(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_766(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_BARBAR => Shift(yy_state_230) + T_AMPERAMPER => Shift(yy_state_232) + T_BAR => Shift(yy_state_234) + T_CARET => Shift(yy_state_236) + T_AMPER => Shift(yy_state_238) + T_MINUS => Shift(yy_state_240) + T_PLUS => Shift(yy_state_242) + T_INFIX1 => Shift(yy_state_244) + T_INFIX2 => Shift(yy_state_246) + T_INFIX3 => Shift(yy_state_248) + T_INFIX4 => Shift(yy_state_250) + T_IMPLIES => Shift(yy_state_252) + T_ELSE => Shift(yy_state_767) + T_SEMI | T_RBRACE => Reduce(2, NT_guard_statement, yy_action_594) + _ => Error + } +} + +fn yy_state_767(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_LBRACE => Shift(yy_state_133) + NT_block_expr => Shift(yy_state_768) + _ => Error + } +} + +fn yy_state_768(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(4, NT_guard_statement, yy_action_593) +} + +fn yy_state_769(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_statement, yy_action_592) +} + +fn yy_state_770(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_EXTEND => Shift(yy_state_771) + T_LIDENT => Shift(yy_state_774) + _ => Error + } +} + +fn yy_state_771(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_BARBAR => Shift(yy_state_423) - T_AMPERAMPER => Shift(yy_state_425) - T_BAR => Shift(yy_state_427) - T_CARET => Shift(yy_state_429) - T_AMPER => Shift(yy_state_431) - T_MINUS => Shift(yy_state_433) - T_PLUS => Shift(yy_state_435) - T_INFIX1 => Shift(yy_state_437) - T_INFIX2 => Shift(yy_state_439) - T_INFIX3 => Shift(yy_state_441) - T_INFIX4 => Shift(yy_state_443) - T_IMPLIES => Shift(yy_state_445) - T_EOF | T_RPAREN | T_COMMA | T_COLON | T_SEMI | T_RBRACKET | T_LBRACE | T_RBRACE | T_AND => Reduce(1, NT_quantifier_body_expr, yy_action_623) + T_EQUAL => Shift(yy_state_772) _ => Error } } -fn yy_state_423(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_772(_lookahead : YYSymbol) -> YYDecision { match _lookahead { NT_multiline_string => Shift(yy_state_2) T_MULTILINE_INTERP => Shift(yy_state_4) @@ -21385,57 +31690,81 @@ fn yy_state_423(_lookahead : YYSymbol) -> YYDecision { T_BYTE => Shift(yy_state_13) T_FALSE => Shift(yy_state_14) T_TRUE => Shift(yy_state_15) - T_INTERP => Shift(yy_state_16) - NT_non_empty_list_multiline_string_ => Shift(yy_state_17) - NT_simple_constant => Shift(yy_state_18) - T_AMPER => Shift(yy_state_19) - NT_qual_ident_ty => Shift(yy_state_25) - NT_tuple_expr => Shift(yy_state_26) - T_LBRACKET => Shift(yy_state_27) - NT_constr => Shift(yy_state_35) - NT_qual_ident_simple_expr => Shift(yy_state_36) - NT_atomic_expr => Shift(yy_state_37) - NT_anony_fn => Shift(yy_state_38) - T_LBRACE => Shift(yy_state_39) - T_FN => Shift(yy_state_48) - NT_type_name => Shift(yy_state_126) - T_ASYNC => Shift(yy_state_138) - NT_simple_expr => Shift(yy_state_151) - T_EXCLAMATION => Shift(yy_state_162) - T_UNDERSCORE => Shift(yy_state_163) - T_LPAREN => Shift(yy_state_164) - T_MINUS => Shift(yy_state_178) - T_PLUS => Shift(yy_state_180) - T_UIDENT => Shift(yy_state_182) - T_PACKAGE_NAME => Shift(yy_state_183) - T_LIDENT => Shift(yy_state_186) - NT_prefix_expr => Shift(yy_state_187) - NT_range_expr => Shift(yy_state_198) - NT_postfix_expr => Shift(yy_state_416) - NT_infix_expr => Shift(yy_state_424) + T_BYTES_INTERP => Shift(yy_state_16) + T_INTERP => Shift(yy_state_17) + NT_non_empty_list_multiline_string_ => Shift(yy_state_18) + NT_simple_constant => Shift(yy_state_19) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + NT_tuple_expr => Shift(yy_state_27) + T_LBRACKET_BAR => Shift(yy_state_28) + T_LBRACKET => Shift(yy_state_36) + NT_constr => Shift(yy_state_47) + NT_qual_ident_simple_expr => Shift(yy_state_48) + NT_atomic_expr => Shift(yy_state_50) + NT_anony_fn => Shift(yy_state_51) + T_LBRACE => Shift(yy_state_52) + T_FN => Shift(yy_state_61) + NT_type_name => Shift(yy_state_139) + T_ASYNC => Shift(yy_state_152) + NT_simple_expr => Shift(yy_state_165) + T_EXCLAMATION => Shift(yy_state_176) + T_MINUS => Shift(yy_state_191) + T_PLUS => Shift(yy_state_193) + T_UIDENT => Shift(yy_state_195) + T_PACKAGE_NAME => Shift(yy_state_196) + NT_prefix_expr => Shift(yy_state_201) + NT_range_expr => Shift(yy_state_212) + NT_postfix_expr => Shift(yy_state_223) + T_EXISTS => Shift(yy_state_224) + T_FORALL => Shift(yy_state_256) + NT_infix_expr => Shift(yy_state_272) + T_UNDERSCORE => Shift(yy_state_273) + T_LPAREN => Shift(yy_state_281) + NT_pipe_expr => Shift(yy_state_325) + NT_arrow_fn_expr => Shift(yy_state_344) + NT_quantifier_expr => Shift(yy_state_345) + NT_simple_try_expr => Shift(yy_state_346) + NT_lexscan_expr => Shift(yy_state_347) + NT_lexmatch_expr => Shift(yy_state_348) + NT_match_expr => Shift(yy_state_349) + NT_if_expr => Shift(yy_state_350) + NT_try_expr => Shift(yy_state_351) + NT_while_expr => Shift(yy_state_352) + NT_foreach_expr => Shift(yy_state_353) + NT_for_expr => Shift(yy_state_354) + T_LEXSCAN => Shift(yy_state_355) + NT_lexscan_header => Shift(yy_state_358) + T_LEXMATCH => Shift(yy_state_391) + NT_lexmatch_header => Shift(yy_state_399) + NT_match_header => Shift(yy_state_444) + T_MATCH => Shift(yy_state_605) + T_IF => Shift(yy_state_608) + T_TRY_EXCLAMATION => Shift(yy_state_614) + T_TRY_QUESTION => Shift(yy_state_616) + T_TRY => Shift(yy_state_618) + NT_loop_label_colon => Shift(yy_state_632) + T_POST_LABEL => Shift(yy_state_639) + T_EXTEND => Shift(yy_state_641) + T_LIDENT => Shift(yy_state_648) + NT_expr => Shift(yy_state_773) + T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_1071) _ => Error } } -fn yy_state_424(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_773(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(4, NT_statement, yy_action_591) +} + +fn yy_state_774(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_BARBAR => Shift(yy_state_423) - T_AMPERAMPER => Shift(yy_state_425) - T_BAR => Shift(yy_state_427) - T_CARET => Shift(yy_state_429) - T_AMPER => Shift(yy_state_431) - T_MINUS => Shift(yy_state_433) - T_PLUS => Shift(yy_state_435) - T_INFIX1 => Shift(yy_state_437) - T_INFIX2 => Shift(yy_state_439) - T_INFIX3 => Shift(yy_state_441) - T_INFIX4 => Shift(yy_state_443) - T_EOF | T_WITH | T_CATCH | T_RPAREN | T_COMMA | T_COLON | T_SEMI | T_RBRACKET | T_LBRACE | T_RBRACE | T_PIPE | T_PIPE_LEFT | T_ELSE | T_IF | T_FAT_ARROW | T_AND | T_IMPLIES => Reduce(3, NT_infix_expr, yy_action_621) + T_EQUAL => Shift(yy_state_775) _ => Error } } -fn yy_state_425(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_775(_lookahead : YYSymbol) -> YYDecision { match _lookahead { NT_multiline_string => Shift(yy_state_2) T_MULTILINE_INTERP => Shift(yy_state_4) @@ -21450,56 +31779,74 @@ fn yy_state_425(_lookahead : YYSymbol) -> YYDecision { T_BYTE => Shift(yy_state_13) T_FALSE => Shift(yy_state_14) T_TRUE => Shift(yy_state_15) - T_INTERP => Shift(yy_state_16) - NT_non_empty_list_multiline_string_ => Shift(yy_state_17) - NT_simple_constant => Shift(yy_state_18) - T_AMPER => Shift(yy_state_19) - NT_qual_ident_ty => Shift(yy_state_25) - NT_tuple_expr => Shift(yy_state_26) - T_LBRACKET => Shift(yy_state_27) - NT_constr => Shift(yy_state_35) - NT_qual_ident_simple_expr => Shift(yy_state_36) - NT_atomic_expr => Shift(yy_state_37) - NT_anony_fn => Shift(yy_state_38) - T_LBRACE => Shift(yy_state_39) - T_FN => Shift(yy_state_48) - NT_type_name => Shift(yy_state_126) - T_ASYNC => Shift(yy_state_138) - NT_simple_expr => Shift(yy_state_151) - T_EXCLAMATION => Shift(yy_state_162) - T_UNDERSCORE => Shift(yy_state_163) - T_LPAREN => Shift(yy_state_164) - T_MINUS => Shift(yy_state_178) - T_PLUS => Shift(yy_state_180) - T_UIDENT => Shift(yy_state_182) - T_PACKAGE_NAME => Shift(yy_state_183) - T_LIDENT => Shift(yy_state_186) - NT_prefix_expr => Shift(yy_state_187) - NT_range_expr => Shift(yy_state_198) - NT_postfix_expr => Shift(yy_state_416) - NT_infix_expr => Shift(yy_state_426) + T_BYTES_INTERP => Shift(yy_state_16) + T_INTERP => Shift(yy_state_17) + NT_non_empty_list_multiline_string_ => Shift(yy_state_18) + NT_simple_constant => Shift(yy_state_19) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + NT_tuple_expr => Shift(yy_state_27) + T_LBRACKET_BAR => Shift(yy_state_28) + T_LBRACKET => Shift(yy_state_36) + NT_constr => Shift(yy_state_47) + NT_qual_ident_simple_expr => Shift(yy_state_48) + NT_atomic_expr => Shift(yy_state_50) + NT_anony_fn => Shift(yy_state_51) + T_LBRACE => Shift(yy_state_52) + T_FN => Shift(yy_state_61) + NT_type_name => Shift(yy_state_139) + T_ASYNC => Shift(yy_state_152) + NT_simple_expr => Shift(yy_state_165) + T_EXCLAMATION => Shift(yy_state_176) + T_MINUS => Shift(yy_state_191) + T_PLUS => Shift(yy_state_193) + T_UIDENT => Shift(yy_state_195) + T_PACKAGE_NAME => Shift(yy_state_196) + NT_prefix_expr => Shift(yy_state_201) + NT_range_expr => Shift(yy_state_212) + NT_postfix_expr => Shift(yy_state_223) + T_EXISTS => Shift(yy_state_224) + T_FORALL => Shift(yy_state_256) + NT_infix_expr => Shift(yy_state_272) + T_UNDERSCORE => Shift(yy_state_273) + T_LPAREN => Shift(yy_state_281) + NT_pipe_expr => Shift(yy_state_325) + NT_arrow_fn_expr => Shift(yy_state_344) + NT_quantifier_expr => Shift(yy_state_345) + NT_simple_try_expr => Shift(yy_state_346) + NT_lexscan_expr => Shift(yy_state_347) + NT_lexmatch_expr => Shift(yy_state_348) + NT_match_expr => Shift(yy_state_349) + NT_if_expr => Shift(yy_state_350) + NT_try_expr => Shift(yy_state_351) + NT_while_expr => Shift(yy_state_352) + NT_foreach_expr => Shift(yy_state_353) + NT_for_expr => Shift(yy_state_354) + T_LEXSCAN => Shift(yy_state_355) + NT_lexscan_header => Shift(yy_state_358) + T_LEXMATCH => Shift(yy_state_391) + NT_lexmatch_header => Shift(yy_state_399) + NT_match_header => Shift(yy_state_444) + T_MATCH => Shift(yy_state_605) + T_IF => Shift(yy_state_608) + T_TRY_EXCLAMATION => Shift(yy_state_614) + T_TRY_QUESTION => Shift(yy_state_616) + T_TRY => Shift(yy_state_618) + NT_loop_label_colon => Shift(yy_state_632) + T_POST_LABEL => Shift(yy_state_639) + T_EXTEND => Shift(yy_state_641) + T_LIDENT => Shift(yy_state_648) + NT_expr => Shift(yy_state_776) + T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_1071) _ => Error } } -fn yy_state_426(_lookahead : YYSymbol) -> YYDecision { - match _lookahead { - T_AMPERAMPER => Shift(yy_state_425) - T_BAR => Shift(yy_state_427) - T_CARET => Shift(yy_state_429) - T_AMPER => Shift(yy_state_431) - T_MINUS => Shift(yy_state_433) - T_PLUS => Shift(yy_state_435) - T_INFIX1 => Shift(yy_state_437) - T_INFIX2 => Shift(yy_state_439) - T_INFIX3 => Shift(yy_state_441) - T_INFIX4 => Shift(yy_state_443) - T_EOF | T_WITH | T_CATCH | T_RPAREN | T_COMMA | T_COLON | T_SEMI | T_RBRACKET | T_LBRACE | T_RBRACE | T_BARBAR | T_PIPE | T_PIPE_LEFT | T_ELSE | T_IF | T_FAT_ARROW | T_AND | T_IMPLIES => Reduce(3, NT_infix_expr, yy_action_619) - _ => Error - } +fn yy_state_776(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(4, NT_statement, yy_action_590) } -fn yy_state_427(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_777(_lookahead : YYSymbol) -> YYDecision { match _lookahead { NT_multiline_string => Shift(yy_state_2) T_MULTILINE_INTERP => Shift(yy_state_4) @@ -21514,54 +31861,74 @@ fn yy_state_427(_lookahead : YYSymbol) -> YYDecision { T_BYTE => Shift(yy_state_13) T_FALSE => Shift(yy_state_14) T_TRUE => Shift(yy_state_15) - T_INTERP => Shift(yy_state_16) - NT_non_empty_list_multiline_string_ => Shift(yy_state_17) - NT_simple_constant => Shift(yy_state_18) - T_AMPER => Shift(yy_state_19) - NT_qual_ident_ty => Shift(yy_state_25) - NT_tuple_expr => Shift(yy_state_26) - T_LBRACKET => Shift(yy_state_27) - NT_constr => Shift(yy_state_35) - NT_qual_ident_simple_expr => Shift(yy_state_36) - NT_atomic_expr => Shift(yy_state_37) - NT_anony_fn => Shift(yy_state_38) - T_LBRACE => Shift(yy_state_39) - T_FN => Shift(yy_state_48) - NT_type_name => Shift(yy_state_126) - T_ASYNC => Shift(yy_state_138) - NT_simple_expr => Shift(yy_state_151) - T_EXCLAMATION => Shift(yy_state_162) - T_UNDERSCORE => Shift(yy_state_163) - T_LPAREN => Shift(yy_state_164) - T_MINUS => Shift(yy_state_178) - T_PLUS => Shift(yy_state_180) - T_UIDENT => Shift(yy_state_182) - T_PACKAGE_NAME => Shift(yy_state_183) - T_LIDENT => Shift(yy_state_186) - NT_prefix_expr => Shift(yy_state_187) - NT_range_expr => Shift(yy_state_198) - NT_postfix_expr => Shift(yy_state_416) - NT_infix_expr => Shift(yy_state_428) + T_BYTES_INTERP => Shift(yy_state_16) + T_INTERP => Shift(yy_state_17) + NT_non_empty_list_multiline_string_ => Shift(yy_state_18) + NT_simple_constant => Shift(yy_state_19) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + NT_tuple_expr => Shift(yy_state_27) + T_LBRACKET_BAR => Shift(yy_state_28) + T_LBRACKET => Shift(yy_state_36) + NT_constr => Shift(yy_state_47) + NT_qual_ident_simple_expr => Shift(yy_state_48) + NT_atomic_expr => Shift(yy_state_50) + NT_anony_fn => Shift(yy_state_51) + T_LBRACE => Shift(yy_state_52) + T_FN => Shift(yy_state_61) + NT_type_name => Shift(yy_state_139) + T_ASYNC => Shift(yy_state_152) + NT_simple_expr => Shift(yy_state_165) + T_EXCLAMATION => Shift(yy_state_176) + T_MINUS => Shift(yy_state_191) + T_PLUS => Shift(yy_state_193) + T_UIDENT => Shift(yy_state_195) + T_PACKAGE_NAME => Shift(yy_state_196) + NT_prefix_expr => Shift(yy_state_201) + NT_range_expr => Shift(yy_state_212) + NT_postfix_expr => Shift(yy_state_223) + T_EXISTS => Shift(yy_state_224) + T_FORALL => Shift(yy_state_256) + NT_infix_expr => Shift(yy_state_272) + T_UNDERSCORE => Shift(yy_state_273) + T_LPAREN => Shift(yy_state_281) + NT_pipe_expr => Shift(yy_state_325) + NT_arrow_fn_expr => Shift(yy_state_344) + NT_quantifier_expr => Shift(yy_state_345) + NT_simple_try_expr => Shift(yy_state_346) + NT_lexscan_expr => Shift(yy_state_347) + NT_lexmatch_expr => Shift(yy_state_348) + NT_match_expr => Shift(yy_state_349) + NT_if_expr => Shift(yy_state_350) + NT_try_expr => Shift(yy_state_351) + NT_while_expr => Shift(yy_state_352) + NT_foreach_expr => Shift(yy_state_353) + NT_for_expr => Shift(yy_state_354) + T_LEXSCAN => Shift(yy_state_355) + NT_lexscan_header => Shift(yy_state_358) + T_LEXMATCH => Shift(yy_state_391) + NT_lexmatch_header => Shift(yy_state_399) + NT_match_header => Shift(yy_state_444) + T_MATCH => Shift(yy_state_605) + T_IF => Shift(yy_state_608) + T_TRY_EXCLAMATION => Shift(yy_state_614) + T_TRY_QUESTION => Shift(yy_state_616) + T_TRY => Shift(yy_state_618) + NT_loop_label_colon => Shift(yy_state_632) + T_POST_LABEL => Shift(yy_state_639) + T_EXTEND => Shift(yy_state_641) + T_LIDENT => Shift(yy_state_648) + NT_expr => Shift(yy_state_778) + T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_1071) _ => Error } } -fn yy_state_428(_lookahead : YYSymbol) -> YYDecision { - match _lookahead { - T_CARET => Shift(yy_state_429) - T_AMPER => Shift(yy_state_431) - T_MINUS => Shift(yy_state_433) - T_PLUS => Shift(yy_state_435) - T_INFIX1 => Shift(yy_state_437) - T_INFIX2 => Shift(yy_state_439) - T_INFIX3 => Shift(yy_state_441) - T_INFIX4 => Shift(yy_state_443) - T_EOF | T_WITH | T_CATCH | T_RPAREN | T_COMMA | T_COLON | T_SEMI | T_RBRACKET | T_BAR | T_LBRACE | T_RBRACE | T_AMPERAMPER | T_BARBAR | T_PIPE | T_PIPE_LEFT | T_ELSE | T_IF | T_FAT_ARROW | T_AND | T_IMPLIES => Reduce(3, NT_infix_expr, yy_action_617) - _ => Error - } +fn yy_state_778(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(2, NT_statement, yy_action_589) } -fn yy_state_429(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_779(_lookahead : YYSymbol) -> YYDecision { match _lookahead { NT_multiline_string => Shift(yy_state_2) T_MULTILINE_INTERP => Shift(yy_state_4) @@ -21576,732 +31943,302 @@ fn yy_state_429(_lookahead : YYSymbol) -> YYDecision { T_BYTE => Shift(yy_state_13) T_FALSE => Shift(yy_state_14) T_TRUE => Shift(yy_state_15) - T_INTERP => Shift(yy_state_16) - NT_non_empty_list_multiline_string_ => Shift(yy_state_17) - NT_simple_constant => Shift(yy_state_18) - T_AMPER => Shift(yy_state_19) - NT_qual_ident_ty => Shift(yy_state_25) - NT_tuple_expr => Shift(yy_state_26) - T_LBRACKET => Shift(yy_state_27) - NT_constr => Shift(yy_state_35) - NT_qual_ident_simple_expr => Shift(yy_state_36) - NT_atomic_expr => Shift(yy_state_37) - NT_anony_fn => Shift(yy_state_38) - T_LBRACE => Shift(yy_state_39) - T_FN => Shift(yy_state_48) - NT_type_name => Shift(yy_state_126) - T_ASYNC => Shift(yy_state_138) - NT_simple_expr => Shift(yy_state_151) - T_EXCLAMATION => Shift(yy_state_162) - T_UNDERSCORE => Shift(yy_state_163) - T_LPAREN => Shift(yy_state_164) - T_MINUS => Shift(yy_state_178) - T_PLUS => Shift(yy_state_180) - T_UIDENT => Shift(yy_state_182) - T_PACKAGE_NAME => Shift(yy_state_183) - T_LIDENT => Shift(yy_state_186) - NT_prefix_expr => Shift(yy_state_187) - NT_range_expr => Shift(yy_state_198) - NT_postfix_expr => Shift(yy_state_416) - NT_infix_expr => Shift(yy_state_430) + T_BYTES_INTERP => Shift(yy_state_16) + T_INTERP => Shift(yy_state_17) + NT_non_empty_list_multiline_string_ => Shift(yy_state_18) + NT_simple_constant => Shift(yy_state_19) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + NT_tuple_expr => Shift(yy_state_27) + T_LBRACKET_BAR => Shift(yy_state_28) + T_LBRACKET => Shift(yy_state_36) + NT_constr => Shift(yy_state_47) + NT_qual_ident_simple_expr => Shift(yy_state_48) + T_UNDERSCORE => Shift(yy_state_49) + NT_atomic_expr => Shift(yy_state_50) + NT_anony_fn => Shift(yy_state_51) + T_LBRACE => Shift(yy_state_52) + T_FN => Shift(yy_state_61) + NT_type_name => Shift(yy_state_139) + T_ASYNC => Shift(yy_state_152) + NT_simple_expr => Shift(yy_state_165) + T_EXCLAMATION => Shift(yy_state_176) + T_LPAREN => Shift(yy_state_177) + T_MINUS => Shift(yy_state_191) + T_PLUS => Shift(yy_state_193) + T_UIDENT => Shift(yy_state_195) + T_PACKAGE_NAME => Shift(yy_state_196) + T_EXTEND => Shift(yy_state_199) + T_LIDENT => Shift(yy_state_200) + NT_prefix_expr => Shift(yy_state_201) + NT_range_expr => Shift(yy_state_212) + NT_postfix_expr => Shift(yy_state_223) + NT_infix_expr => Shift(yy_state_272) + NT_pipe_expr => Shift(yy_state_780) _ => Error } } -fn yy_state_430(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_780(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_AMPER => Shift(yy_state_431) - T_MINUS => Shift(yy_state_433) - T_PLUS => Shift(yy_state_435) - T_INFIX1 => Shift(yy_state_437) - T_INFIX2 => Shift(yy_state_439) - T_INFIX3 => Shift(yy_state_441) - T_INFIX4 => Shift(yy_state_443) - T_EOF | T_WITH | T_CATCH | T_RPAREN | T_COMMA | T_COLON | T_SEMI | T_RBRACKET | T_BAR | T_LBRACE | T_RBRACE | T_AMPERAMPER | T_CARET | T_BARBAR | T_PIPE | T_PIPE_LEFT | T_ELSE | T_IF | T_FAT_ARROW | T_AND | T_IMPLIES => Reduce(3, NT_infix_expr, yy_action_615) + T_PIPE => Shift(yy_state_326) + T_PIPE_LEFT => Shift(yy_state_334) + T_SEMI | T_RBRACE => Reduce(2, NT_statement, yy_action_588) _ => Error } } -fn yy_state_431(_lookahead : YYSymbol) -> YYDecision { - match _lookahead { - NT_multiline_string => Shift(yy_state_2) - T_MULTILINE_INTERP => Shift(yy_state_4) - T_MULTILINE_STRING => Shift(yy_state_5) - T_REGEX_LITERAL => Shift(yy_state_6) - T_STRING => Shift(yy_state_7) - T_FLOAT => Shift(yy_state_8) - T_DOUBLE => Shift(yy_state_9) - T_INT => Shift(yy_state_10) - T_CHAR => Shift(yy_state_11) - T_BYTES => Shift(yy_state_12) - T_BYTE => Shift(yy_state_13) - T_FALSE => Shift(yy_state_14) - T_TRUE => Shift(yy_state_15) - T_INTERP => Shift(yy_state_16) - NT_non_empty_list_multiline_string_ => Shift(yy_state_17) - NT_simple_constant => Shift(yy_state_18) - T_AMPER => Shift(yy_state_19) - NT_qual_ident_ty => Shift(yy_state_25) - NT_tuple_expr => Shift(yy_state_26) - T_LBRACKET => Shift(yy_state_27) - NT_constr => Shift(yy_state_35) - NT_qual_ident_simple_expr => Shift(yy_state_36) - NT_atomic_expr => Shift(yy_state_37) - NT_anony_fn => Shift(yy_state_38) - T_LBRACE => Shift(yy_state_39) - T_FN => Shift(yy_state_48) - NT_type_name => Shift(yy_state_126) - T_ASYNC => Shift(yy_state_138) - NT_simple_expr => Shift(yy_state_151) - T_EXCLAMATION => Shift(yy_state_162) - T_UNDERSCORE => Shift(yy_state_163) - T_LPAREN => Shift(yy_state_164) - T_MINUS => Shift(yy_state_178) - T_PLUS => Shift(yy_state_180) - T_UIDENT => Shift(yy_state_182) - T_PACKAGE_NAME => Shift(yy_state_183) - T_LIDENT => Shift(yy_state_186) - NT_prefix_expr => Shift(yy_state_187) - NT_range_expr => Shift(yy_state_198) - NT_postfix_expr => Shift(yy_state_416) - NT_infix_expr => Shift(yy_state_432) - _ => Error - } +fn yy_state_781(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_statement, yy_action_587) } -fn yy_state_432(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_782(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_MINUS => Shift(yy_state_433) - T_PLUS => Shift(yy_state_435) - T_INFIX1 => Shift(yy_state_437) - T_INFIX2 => Shift(yy_state_439) - T_INFIX3 => Shift(yy_state_441) - T_INFIX4 => Shift(yy_state_443) - T_EOF | T_WITH | T_CATCH | T_RPAREN | T_COMMA | T_COLON | T_SEMI | T_RBRACKET | T_BAR | T_LBRACE | T_RBRACE | T_AMPERAMPER | T_AMPER | T_CARET | T_BARBAR | T_PIPE | T_PIPE_LEFT | T_ELSE | T_IF | T_FAT_ARROW | T_AND | T_IMPLIES => Reduce(3, NT_infix_expr, yy_action_613) + NT_parameters => Shift(yy_state_62) + T_LPAREN => Shift(yy_state_157) + T_EXTEND => Shift(yy_state_783) + T_LIDENT => Shift(yy_state_787) _ => Error } } -fn yy_state_433(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_783(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_multiline_string => Shift(yy_state_2) - T_MULTILINE_INTERP => Shift(yy_state_4) - T_MULTILINE_STRING => Shift(yy_state_5) - T_REGEX_LITERAL => Shift(yy_state_6) - T_STRING => Shift(yy_state_7) - T_FLOAT => Shift(yy_state_8) - T_DOUBLE => Shift(yy_state_9) - T_INT => Shift(yy_state_10) - T_CHAR => Shift(yy_state_11) - T_BYTES => Shift(yy_state_12) - T_BYTE => Shift(yy_state_13) - T_FALSE => Shift(yy_state_14) - T_TRUE => Shift(yy_state_15) - T_INTERP => Shift(yy_state_16) - NT_non_empty_list_multiline_string_ => Shift(yy_state_17) - NT_simple_constant => Shift(yy_state_18) - T_AMPER => Shift(yy_state_19) - NT_qual_ident_ty => Shift(yy_state_25) - NT_tuple_expr => Shift(yy_state_26) - T_LBRACKET => Shift(yy_state_27) - NT_constr => Shift(yy_state_35) - NT_qual_ident_simple_expr => Shift(yy_state_36) - NT_atomic_expr => Shift(yy_state_37) - NT_anony_fn => Shift(yy_state_38) - T_LBRACE => Shift(yy_state_39) - T_FN => Shift(yy_state_48) - NT_type_name => Shift(yy_state_126) - T_ASYNC => Shift(yy_state_138) - NT_simple_expr => Shift(yy_state_151) - T_EXCLAMATION => Shift(yy_state_162) - T_UNDERSCORE => Shift(yy_state_163) - T_LPAREN => Shift(yy_state_164) - T_MINUS => Shift(yy_state_178) - T_PLUS => Shift(yy_state_180) - T_UIDENT => Shift(yy_state_182) - T_PACKAGE_NAME => Shift(yy_state_183) - T_LIDENT => Shift(yy_state_186) - NT_prefix_expr => Shift(yy_state_187) - NT_range_expr => Shift(yy_state_198) - NT_postfix_expr => Shift(yy_state_416) - NT_infix_expr => Shift(yy_state_434) + T_LPAREN => Shift(yy_state_157) + NT_parameters => Shift(yy_state_784) _ => Error } } -fn yy_state_434(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_784(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_INFIX3 => Shift(yy_state_441) - T_INFIX4 => Shift(yy_state_443) - T_INFIX1 | T_INFIX2 | T_EOF | T_WITH | T_CATCH | T_RPAREN | T_COMMA | T_MINUS | T_COLON | T_SEMI | T_PLUS | T_RBRACKET | T_BAR | T_LBRACE | T_RBRACE | T_AMPERAMPER | T_AMPER | T_CARET | T_BARBAR | T_PIPE | T_PIPE_LEFT | T_ELSE | T_IF | T_FAT_ARROW | T_AND | T_IMPLIES => Reduce(3, NT_infix_expr, yy_action_611) + NT_error_annotation => Shift(yy_state_63) + T_THIN_ARROW => Shift(yy_state_64) + T_NORAISE => Shift(yy_state_91) + T_RAISE => Shift(yy_state_92) + NT_func_return_type => Shift(yy_state_785) + T_LBRACE => Reduce(0, NT_func_return_type, yy_action_1023) _ => Error } } -fn yy_state_435(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_785(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_multiline_string => Shift(yy_state_2) - T_MULTILINE_INTERP => Shift(yy_state_4) - T_MULTILINE_STRING => Shift(yy_state_5) - T_REGEX_LITERAL => Shift(yy_state_6) - T_STRING => Shift(yy_state_7) - T_FLOAT => Shift(yy_state_8) - T_DOUBLE => Shift(yy_state_9) - T_INT => Shift(yy_state_10) - T_CHAR => Shift(yy_state_11) - T_BYTES => Shift(yy_state_12) - T_BYTE => Shift(yy_state_13) - T_FALSE => Shift(yy_state_14) - T_TRUE => Shift(yy_state_15) - T_INTERP => Shift(yy_state_16) - NT_non_empty_list_multiline_string_ => Shift(yy_state_17) - NT_simple_constant => Shift(yy_state_18) - T_AMPER => Shift(yy_state_19) - NT_qual_ident_ty => Shift(yy_state_25) - NT_tuple_expr => Shift(yy_state_26) - T_LBRACKET => Shift(yy_state_27) - NT_constr => Shift(yy_state_35) - NT_qual_ident_simple_expr => Shift(yy_state_36) - NT_atomic_expr => Shift(yy_state_37) - NT_anony_fn => Shift(yy_state_38) - T_LBRACE => Shift(yy_state_39) - T_FN => Shift(yy_state_48) - NT_type_name => Shift(yy_state_126) - T_ASYNC => Shift(yy_state_138) - NT_simple_expr => Shift(yy_state_151) - T_EXCLAMATION => Shift(yy_state_162) - T_UNDERSCORE => Shift(yy_state_163) - T_LPAREN => Shift(yy_state_164) - T_MINUS => Shift(yy_state_178) - T_PLUS => Shift(yy_state_180) - T_UIDENT => Shift(yy_state_182) - T_PACKAGE_NAME => Shift(yy_state_183) - T_LIDENT => Shift(yy_state_186) - NT_prefix_expr => Shift(yy_state_187) - NT_range_expr => Shift(yy_state_198) - NT_postfix_expr => Shift(yy_state_416) - NT_infix_expr => Shift(yy_state_436) + T_LBRACE => Shift(yy_state_133) + NT_block_expr => Shift(yy_state_786) _ => Error } } -fn yy_state_436(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_786(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(5, NT_statement, yy_action_586) +} + +fn yy_state_787(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_INFIX3 => Shift(yy_state_441) - T_INFIX4 => Shift(yy_state_443) - T_INFIX1 | T_INFIX2 | T_EOF | T_WITH | T_CATCH | T_RPAREN | T_COMMA | T_MINUS | T_COLON | T_SEMI | T_PLUS | T_RBRACKET | T_BAR | T_LBRACE | T_RBRACE | T_AMPERAMPER | T_AMPER | T_CARET | T_BARBAR | T_PIPE | T_PIPE_LEFT | T_ELSE | T_IF | T_FAT_ARROW | T_AND | T_IMPLIES => Reduce(3, NT_infix_expr, yy_action_609) + T_LPAREN => Shift(yy_state_157) + NT_parameters => Shift(yy_state_788) _ => Error } } -fn yy_state_437(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_788(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_multiline_string => Shift(yy_state_2) - T_MULTILINE_INTERP => Shift(yy_state_4) - T_MULTILINE_STRING => Shift(yy_state_5) - T_REGEX_LITERAL => Shift(yy_state_6) - T_STRING => Shift(yy_state_7) - T_FLOAT => Shift(yy_state_8) - T_DOUBLE => Shift(yy_state_9) - T_INT => Shift(yy_state_10) - T_CHAR => Shift(yy_state_11) - T_BYTES => Shift(yy_state_12) - T_BYTE => Shift(yy_state_13) - T_FALSE => Shift(yy_state_14) - T_TRUE => Shift(yy_state_15) - T_INTERP => Shift(yy_state_16) - NT_non_empty_list_multiline_string_ => Shift(yy_state_17) - NT_simple_constant => Shift(yy_state_18) - T_AMPER => Shift(yy_state_19) - NT_qual_ident_ty => Shift(yy_state_25) - NT_tuple_expr => Shift(yy_state_26) - T_LBRACKET => Shift(yy_state_27) - NT_constr => Shift(yy_state_35) - NT_qual_ident_simple_expr => Shift(yy_state_36) - NT_atomic_expr => Shift(yy_state_37) - NT_anony_fn => Shift(yy_state_38) - T_LBRACE => Shift(yy_state_39) - T_FN => Shift(yy_state_48) - NT_type_name => Shift(yy_state_126) - T_ASYNC => Shift(yy_state_138) - NT_simple_expr => Shift(yy_state_151) - T_EXCLAMATION => Shift(yy_state_162) - T_UNDERSCORE => Shift(yy_state_163) - T_LPAREN => Shift(yy_state_164) - T_MINUS => Shift(yy_state_178) - T_PLUS => Shift(yy_state_180) - T_UIDENT => Shift(yy_state_182) - T_PACKAGE_NAME => Shift(yy_state_183) - T_LIDENT => Shift(yy_state_186) - NT_prefix_expr => Shift(yy_state_187) - NT_range_expr => Shift(yy_state_198) - NT_postfix_expr => Shift(yy_state_416) - NT_infix_expr => Shift(yy_state_438) + NT_error_annotation => Shift(yy_state_63) + T_THIN_ARROW => Shift(yy_state_64) + T_NORAISE => Shift(yy_state_91) + T_RAISE => Shift(yy_state_92) + NT_func_return_type => Shift(yy_state_789) + T_LBRACE => Reduce(0, NT_func_return_type, yy_action_1023) _ => Error } } -fn yy_state_438(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_789(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_MINUS => Shift(yy_state_433) - T_PLUS => Shift(yy_state_435) - T_INFIX2 => Shift(yy_state_439) - T_INFIX3 => Shift(yy_state_441) - T_INFIX4 => Shift(yy_state_443) - T_INFIX1 | T_EOF | T_WITH | T_CATCH | T_RPAREN | T_COMMA | T_COLON | T_SEMI | T_RBRACKET | T_BAR | T_LBRACE | T_RBRACE | T_AMPERAMPER | T_AMPER | T_CARET | T_BARBAR | T_PIPE | T_PIPE_LEFT | T_ELSE | T_IF | T_FAT_ARROW | T_AND | T_IMPLIES => Reduce(3, NT_infix_expr, yy_action_607) + T_LBRACE => Shift(yy_state_133) + NT_block_expr => Shift(yy_state_790) _ => Error } } -fn yy_state_439(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_790(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(5, NT_statement, yy_action_585) +} + +fn yy_state_791(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_multiline_string => Shift(yy_state_2) - T_MULTILINE_INTERP => Shift(yy_state_4) - T_MULTILINE_STRING => Shift(yy_state_5) - T_REGEX_LITERAL => Shift(yy_state_6) - T_STRING => Shift(yy_state_7) - T_FLOAT => Shift(yy_state_8) - T_DOUBLE => Shift(yy_state_9) - T_INT => Shift(yy_state_10) - T_CHAR => Shift(yy_state_11) - T_BYTES => Shift(yy_state_12) - T_BYTE => Shift(yy_state_13) - T_FALSE => Shift(yy_state_14) - T_TRUE => Shift(yy_state_15) - T_INTERP => Shift(yy_state_16) - NT_non_empty_list_multiline_string_ => Shift(yy_state_17) - NT_simple_constant => Shift(yy_state_18) - T_AMPER => Shift(yy_state_19) - NT_qual_ident_ty => Shift(yy_state_25) - NT_tuple_expr => Shift(yy_state_26) - T_LBRACKET => Shift(yy_state_27) - NT_constr => Shift(yy_state_35) - NT_qual_ident_simple_expr => Shift(yy_state_36) - NT_atomic_expr => Shift(yy_state_37) - NT_anony_fn => Shift(yy_state_38) - T_LBRACE => Shift(yy_state_39) - T_FN => Shift(yy_state_48) - NT_type_name => Shift(yy_state_126) - T_ASYNC => Shift(yy_state_138) - NT_simple_expr => Shift(yy_state_151) - T_EXCLAMATION => Shift(yy_state_162) - T_UNDERSCORE => Shift(yy_state_163) - T_LPAREN => Shift(yy_state_164) - T_MINUS => Shift(yy_state_178) - T_PLUS => Shift(yy_state_180) - T_UIDENT => Shift(yy_state_182) - T_PACKAGE_NAME => Shift(yy_state_183) - T_LIDENT => Shift(yy_state_186) - NT_prefix_expr => Shift(yy_state_187) - NT_range_expr => Shift(yy_state_198) - NT_postfix_expr => Shift(yy_state_416) - NT_infix_expr => Shift(yy_state_440) + T_FN => Shift(yy_state_792) _ => Error } } -fn yy_state_440(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_792(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_MINUS => Shift(yy_state_433) - T_PLUS => Shift(yy_state_435) - T_INFIX3 => Shift(yy_state_441) - T_INFIX4 => Shift(yy_state_443) - T_INFIX1 | T_INFIX2 | T_EOF | T_WITH | T_CATCH | T_RPAREN | T_COMMA | T_COLON | T_SEMI | T_RBRACKET | T_BAR | T_LBRACE | T_RBRACE | T_AMPERAMPER | T_AMPER | T_CARET | T_BARBAR | T_PIPE | T_PIPE_LEFT | T_ELSE | T_IF | T_FAT_ARROW | T_AND | T_IMPLIES => Reduce(3, NT_infix_expr, yy_action_605) + NT_parameters => Shift(yy_state_154) + T_LPAREN => Shift(yy_state_157) + T_EXTEND => Shift(yy_state_793) + T_LIDENT => Shift(yy_state_797) _ => Error } } -fn yy_state_441(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_793(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_multiline_string => Shift(yy_state_2) - T_MULTILINE_INTERP => Shift(yy_state_4) - T_MULTILINE_STRING => Shift(yy_state_5) - T_REGEX_LITERAL => Shift(yy_state_6) - T_STRING => Shift(yy_state_7) - T_FLOAT => Shift(yy_state_8) - T_DOUBLE => Shift(yy_state_9) - T_INT => Shift(yy_state_10) - T_CHAR => Shift(yy_state_11) - T_BYTES => Shift(yy_state_12) - T_BYTE => Shift(yy_state_13) - T_FALSE => Shift(yy_state_14) - T_TRUE => Shift(yy_state_15) - T_INTERP => Shift(yy_state_16) - NT_non_empty_list_multiline_string_ => Shift(yy_state_17) - NT_simple_constant => Shift(yy_state_18) - T_AMPER => Shift(yy_state_19) - NT_qual_ident_ty => Shift(yy_state_25) - NT_tuple_expr => Shift(yy_state_26) - T_LBRACKET => Shift(yy_state_27) - NT_constr => Shift(yy_state_35) - NT_qual_ident_simple_expr => Shift(yy_state_36) - NT_atomic_expr => Shift(yy_state_37) - NT_anony_fn => Shift(yy_state_38) - T_LBRACE => Shift(yy_state_39) - T_FN => Shift(yy_state_48) - NT_type_name => Shift(yy_state_126) - T_ASYNC => Shift(yy_state_138) - NT_simple_expr => Shift(yy_state_151) - T_EXCLAMATION => Shift(yy_state_162) - T_UNDERSCORE => Shift(yy_state_163) - T_LPAREN => Shift(yy_state_164) - T_MINUS => Shift(yy_state_178) - T_PLUS => Shift(yy_state_180) - T_UIDENT => Shift(yy_state_182) - T_PACKAGE_NAME => Shift(yy_state_183) - T_LIDENT => Shift(yy_state_186) - NT_prefix_expr => Shift(yy_state_187) - NT_range_expr => Shift(yy_state_198) - NT_postfix_expr => Shift(yy_state_416) - NT_infix_expr => Shift(yy_state_442) + T_LPAREN => Shift(yy_state_157) + NT_parameters => Shift(yy_state_794) _ => Error } } -fn yy_state_442(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_794(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_INFIX4 => Shift(yy_state_443) - T_INFIX1 | T_INFIX2 | T_INFIX3 | T_EOF | T_WITH | T_CATCH | T_RPAREN | T_COMMA | T_MINUS | T_COLON | T_SEMI | T_PLUS | T_RBRACKET | T_BAR | T_LBRACE | T_RBRACE | T_AMPERAMPER | T_AMPER | T_CARET | T_BARBAR | T_PIPE | T_PIPE_LEFT | T_ELSE | T_IF | T_FAT_ARROW | T_AND | T_IMPLIES => Reduce(3, NT_infix_expr, yy_action_603) + NT_error_annotation => Shift(yy_state_63) + T_THIN_ARROW => Shift(yy_state_64) + T_NORAISE => Shift(yy_state_91) + T_RAISE => Shift(yy_state_92) + NT_func_return_type => Shift(yy_state_795) + T_LBRACE => Reduce(0, NT_func_return_type, yy_action_1023) _ => Error } } -fn yy_state_443(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_795(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_multiline_string => Shift(yy_state_2) - T_MULTILINE_INTERP => Shift(yy_state_4) - T_MULTILINE_STRING => Shift(yy_state_5) - T_REGEX_LITERAL => Shift(yy_state_6) - T_STRING => Shift(yy_state_7) - T_FLOAT => Shift(yy_state_8) - T_DOUBLE => Shift(yy_state_9) - T_INT => Shift(yy_state_10) - T_CHAR => Shift(yy_state_11) - T_BYTES => Shift(yy_state_12) - T_BYTE => Shift(yy_state_13) - T_FALSE => Shift(yy_state_14) - T_TRUE => Shift(yy_state_15) - T_INTERP => Shift(yy_state_16) - NT_non_empty_list_multiline_string_ => Shift(yy_state_17) - NT_simple_constant => Shift(yy_state_18) - T_AMPER => Shift(yy_state_19) - NT_qual_ident_ty => Shift(yy_state_25) - NT_tuple_expr => Shift(yy_state_26) - T_LBRACKET => Shift(yy_state_27) - NT_constr => Shift(yy_state_35) - NT_qual_ident_simple_expr => Shift(yy_state_36) - NT_atomic_expr => Shift(yy_state_37) - NT_anony_fn => Shift(yy_state_38) - T_LBRACE => Shift(yy_state_39) - T_FN => Shift(yy_state_48) - NT_type_name => Shift(yy_state_126) - T_ASYNC => Shift(yy_state_138) - NT_simple_expr => Shift(yy_state_151) - T_EXCLAMATION => Shift(yy_state_162) - T_UNDERSCORE => Shift(yy_state_163) - T_LPAREN => Shift(yy_state_164) - T_MINUS => Shift(yy_state_178) - T_PLUS => Shift(yy_state_180) - T_UIDENT => Shift(yy_state_182) - T_PACKAGE_NAME => Shift(yy_state_183) - T_LIDENT => Shift(yy_state_186) - NT_prefix_expr => Shift(yy_state_187) - NT_range_expr => Shift(yy_state_198) - NT_postfix_expr => Shift(yy_state_416) - NT_infix_expr => Shift(yy_state_444) + T_LBRACE => Shift(yy_state_133) + NT_block_expr => Shift(yy_state_796) _ => Error } } -fn yy_state_444(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_infix_expr, yy_action_601) +fn yy_state_796(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(6, NT_statement, yy_action_584) } -fn yy_state_445(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_797(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_multiline_string => Shift(yy_state_2) - T_MULTILINE_INTERP => Shift(yy_state_4) - T_MULTILINE_STRING => Shift(yy_state_5) - T_REGEX_LITERAL => Shift(yy_state_6) - T_STRING => Shift(yy_state_7) - T_FLOAT => Shift(yy_state_8) - T_DOUBLE => Shift(yy_state_9) - T_INT => Shift(yy_state_10) - T_CHAR => Shift(yy_state_11) - T_BYTES => Shift(yy_state_12) - T_BYTE => Shift(yy_state_13) - T_FALSE => Shift(yy_state_14) - T_TRUE => Shift(yy_state_15) - T_INTERP => Shift(yy_state_16) - NT_non_empty_list_multiline_string_ => Shift(yy_state_17) - NT_simple_constant => Shift(yy_state_18) - T_AMPER => Shift(yy_state_19) - NT_qual_ident_ty => Shift(yy_state_25) - NT_tuple_expr => Shift(yy_state_26) - T_LBRACKET => Shift(yy_state_27) - NT_constr => Shift(yy_state_35) - NT_qual_ident_simple_expr => Shift(yy_state_36) - NT_atomic_expr => Shift(yy_state_37) - NT_anony_fn => Shift(yy_state_38) - T_LBRACE => Shift(yy_state_39) - T_FN => Shift(yy_state_48) - NT_type_name => Shift(yy_state_126) - T_ASYNC => Shift(yy_state_138) - NT_simple_expr => Shift(yy_state_151) - T_EXCLAMATION => Shift(yy_state_162) - T_UNDERSCORE => Shift(yy_state_163) - T_LPAREN => Shift(yy_state_164) - T_MINUS => Shift(yy_state_178) - T_PLUS => Shift(yy_state_180) - T_UIDENT => Shift(yy_state_182) - T_PACKAGE_NAME => Shift(yy_state_183) - T_LIDENT => Shift(yy_state_186) - NT_prefix_expr => Shift(yy_state_187) - NT_range_expr => Shift(yy_state_198) - NT_postfix_expr => Shift(yy_state_416) - NT_infix_expr => Shift(yy_state_446) + T_LPAREN => Shift(yy_state_157) + NT_parameters => Shift(yy_state_798) _ => Error } } -fn yy_state_446(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_798(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_BARBAR => Shift(yy_state_423) - T_AMPERAMPER => Shift(yy_state_425) - T_BAR => Shift(yy_state_427) - T_CARET => Shift(yy_state_429) - T_AMPER => Shift(yy_state_431) - T_MINUS => Shift(yy_state_433) - T_PLUS => Shift(yy_state_435) - T_INFIX1 => Shift(yy_state_437) - T_INFIX2 => Shift(yy_state_439) - T_INFIX3 => Shift(yy_state_441) - T_INFIX4 => Shift(yy_state_443) - T_IMPLIES => Shift(yy_state_445) - T_EOF | T_WITH | T_CATCH | T_RPAREN | T_COMMA | T_COLON | T_SEMI | T_RBRACKET | T_LBRACE | T_RBRACE | T_PIPE | T_PIPE_LEFT | T_ELSE | T_IF | T_FAT_ARROW | T_AND => Reduce(3, NT_infix_expr, yy_action_600) + NT_error_annotation => Shift(yy_state_63) + T_THIN_ARROW => Shift(yy_state_64) + T_NORAISE => Shift(yy_state_91) + T_RAISE => Shift(yy_state_92) + NT_func_return_type => Shift(yy_state_799) + T_LBRACE => Reduce(0, NT_func_return_type, yy_action_1023) _ => Error } } -fn yy_state_447(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_quantifier_body_expr, yy_action_599) +fn yy_state_799(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_LBRACE => Shift(yy_state_133) + NT_block_expr => Shift(yy_state_800) + _ => Error + } } -fn yy_state_448(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(6, NT_quantifier_expr, yy_action_598) +fn yy_state_800(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(6, NT_statement, yy_action_583) } -fn yy_state_449(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_801(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LIDENT => Shift(yy_state_450) + T_EXTEND => Shift(yy_state_802) + T_LIDENT => Shift(yy_state_840) _ => Error } } -fn yy_state_450(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_802(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_COLON => Shift(yy_state_451) + T_COLON => Shift(yy_state_803) + T_EQUAL => Shift(yy_state_837) _ => Error } } -fn yy_state_451(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_803(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_ASYNC => Shift(yy_state_52) - T_UNDERSCORE => Shift(yy_state_57) - T_AMPER => Shift(yy_state_58) - T_PACKAGE_NAME => Shift(yy_state_60) - T_UIDENT => Shift(yy_state_67) - T_LPAREN => Shift(yy_state_71) - NT_simple_type => Shift(yy_state_97) - NT_type_ => Shift(yy_state_452) + T_ASYNC => Shift(yy_state_65) + T_UNDERSCORE => Shift(yy_state_70) + T_AMPER => Shift(yy_state_71) + T_PACKAGE_NAME => Shift(yy_state_73) + T_UIDENT => Shift(yy_state_80) + T_LPAREN => Shift(yy_state_84) + NT_simple_type => Shift(yy_state_110) + NT_type_ => Shift(yy_state_804) _ => Error } } -fn yy_state_452(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_804(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_COMMA => Shift(yy_state_453) + T_EQUAL => Shift(yy_state_805) _ => Error } } -fn yy_state_453(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_805(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_multiline_string => Shift(yy_state_2) - T_MULTILINE_INTERP => Shift(yy_state_4) - T_MULTILINE_STRING => Shift(yy_state_5) - T_REGEX_LITERAL => Shift(yy_state_6) - T_STRING => Shift(yy_state_7) - T_FLOAT => Shift(yy_state_8) - T_DOUBLE => Shift(yy_state_9) - T_INT => Shift(yy_state_10) - T_CHAR => Shift(yy_state_11) - T_BYTES => Shift(yy_state_12) - T_BYTE => Shift(yy_state_13) - T_FALSE => Shift(yy_state_14) - T_TRUE => Shift(yy_state_15) - T_INTERP => Shift(yy_state_16) - NT_non_empty_list_multiline_string_ => Shift(yy_state_17) - NT_simple_constant => Shift(yy_state_18) - T_AMPER => Shift(yy_state_19) - NT_qual_ident_ty => Shift(yy_state_25) - NT_tuple_expr => Shift(yy_state_26) - T_LBRACKET => Shift(yy_state_27) - NT_constr => Shift(yy_state_35) - NT_qual_ident_simple_expr => Shift(yy_state_36) - NT_atomic_expr => Shift(yy_state_37) - NT_anony_fn => Shift(yy_state_38) - T_LBRACE => Shift(yy_state_39) - T_FN => Shift(yy_state_48) - NT_type_name => Shift(yy_state_126) - T_ASYNC => Shift(yy_state_138) - NT_simple_expr => Shift(yy_state_151) - T_EXCLAMATION => Shift(yy_state_162) - T_UNDERSCORE => Shift(yy_state_163) - T_LPAREN => Shift(yy_state_164) - T_MINUS => Shift(yy_state_178) - T_PLUS => Shift(yy_state_180) - T_UIDENT => Shift(yy_state_182) - T_PACKAGE_NAME => Shift(yy_state_183) - T_LIDENT => Shift(yy_state_186) - NT_prefix_expr => Shift(yy_state_187) - NT_range_expr => Shift(yy_state_198) - NT_postfix_expr => Shift(yy_state_416) - T_EXISTS => Shift(yy_state_417) - NT_infix_expr => Shift(yy_state_422) - NT_quantifier_expr => Shift(yy_state_447) - T_FORALL => Shift(yy_state_449) - NT_quantifier_body_expr => Shift(yy_state_454) + T_FN => Shift(yy_state_61) + T_ASYNC => Shift(yy_state_152) + T_UNDERSCORE => Shift(yy_state_806) + T_EXTEND => Shift(yy_state_807) + T_LIDENT => Shift(yy_state_808) + T_LPAREN => Shift(yy_state_809) + NT_letand_func => Shift(yy_state_816) + NT_anony_fn => Shift(yy_state_825) + NT_arrow_fn_expr => Shift(yy_state_826) _ => Error } } -fn yy_state_454(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(6, NT_quantifier_expr, yy_action_597) -} - -fn yy_state_455(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_806(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_BARBAR => Shift(yy_state_423) - T_AMPERAMPER => Shift(yy_state_425) - T_BAR => Shift(yy_state_427) - T_CARET => Shift(yy_state_429) - T_AMPER => Shift(yy_state_431) - T_MINUS => Shift(yy_state_433) - T_PLUS => Shift(yy_state_435) - T_INFIX1 => Shift(yy_state_437) - T_INFIX2 => Shift(yy_state_439) - T_INFIX3 => Shift(yy_state_441) - T_INFIX4 => Shift(yy_state_443) - T_IMPLIES => Shift(yy_state_445) - T_EOF | T_CATCH | T_RPAREN | T_COMMA | T_COLON | T_SEMI | T_RBRACKET | T_LBRACE | T_RBRACE | T_PIPE | T_PIPE_LEFT | T_AND => Reduce(1, NT_pipe_expr, yy_action_596) + T_FAT_ARROW => Shift(yy_state_274) _ => Error } } -fn yy_state_456(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_807(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_FAT_ARROW => Shift(yy_state_457) - T_INFIX1 | T_INFIX2 | T_INFIX3 | T_INFIX4 | T_EOF | T_CATCH | T_EQ_TILDE | T_LPAREN | T_RPAREN | T_COMMA | T_MINUS | T_DOT_LIDENT | T_DOT_INT | T_COLON | T_SEMI | T_LBRACKET | T_PLUS | T_RBRACKET | T_BAR | T_LBRACE | T_RBRACE | T_AMPERAMPER | T_AMPER | T_CARET | T_BARBAR | T_AS | T_PIPE | T_PIPE_LEFT | T_LT_PLUS | T_DOTDOT | T_RANGE_INCLUSIVE | T_RANGE_LT_INCLUSIVE | T_RANGE_EXCLUSIVE | T_RANGE_INCLUSIVE_REV | T_RANGE_EXCLUSIVE_REV | T_IS | T_AND | T_IMPLIES | T_LEXMATCH_QUESTION => Reduce(1, NT_simple_expr, yy_action_790) + T_FAT_ARROW => Shift(yy_state_642) _ => Error } } -fn yy_state_457(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_808(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_multiline_string => Shift(yy_state_2) - T_MULTILINE_INTERP => Shift(yy_state_4) - T_MULTILINE_STRING => Shift(yy_state_5) - T_REGEX_LITERAL => Shift(yy_state_6) - T_STRING => Shift(yy_state_7) - T_FLOAT => Shift(yy_state_8) - T_DOUBLE => Shift(yy_state_9) - T_INT => Shift(yy_state_10) - T_CHAR => Shift(yy_state_11) - T_BYTES => Shift(yy_state_12) - T_BYTE => Shift(yy_state_13) - T_FALSE => Shift(yy_state_14) - T_TRUE => Shift(yy_state_15) - T_INTERP => Shift(yy_state_16) - NT_non_empty_list_multiline_string_ => Shift(yy_state_17) - NT_simple_constant => Shift(yy_state_18) - T_AMPER => Shift(yy_state_19) - NT_qual_ident_ty => Shift(yy_state_25) - NT_tuple_expr => Shift(yy_state_26) - T_LBRACKET => Shift(yy_state_27) - NT_constr => Shift(yy_state_35) - NT_qual_ident_simple_expr => Shift(yy_state_36) - NT_atomic_expr => Shift(yy_state_37) - NT_anony_fn => Shift(yy_state_38) - T_LBRACE => Shift(yy_state_39) - T_FN => Shift(yy_state_48) - NT_type_name => Shift(yy_state_126) - T_ASYNC => Shift(yy_state_138) - T_EXCLAMATION => Shift(yy_state_162) - T_MINUS => Shift(yy_state_178) - T_PLUS => Shift(yy_state_180) - T_UIDENT => Shift(yy_state_182) - NT_prefix_expr => Shift(yy_state_187) - NT_range_expr => Shift(yy_state_198) - NT_postfix_expr => Shift(yy_state_416) - T_EXISTS => Shift(yy_state_417) - T_FORALL => Shift(yy_state_449) - NT_infix_expr => Shift(yy_state_455) - T_UNDERSCORE => Shift(yy_state_456) - NT_qual_ident => Shift(yy_state_458) - NT_simple_expr => Shift(yy_state_459) - T_LPAREN => Shift(yy_state_464) - NT_pipe_expr => Shift(yy_state_497) - NT_arrow_fn_expr => Shift(yy_state_513) - NT_quantifier_expr => Shift(yy_state_514) - NT_simple_try_expr => Shift(yy_state_515) - NT_lexmatch_expr => Shift(yy_state_516) - NT_match_expr => Shift(yy_state_517) - NT_if_expr => Shift(yy_state_518) - NT_try_expr => Shift(yy_state_519) - NT_while_expr => Shift(yy_state_520) - NT_foreach_expr => Shift(yy_state_521) - NT_for_expr => Shift(yy_state_522) - T_LEXMATCH => Shift(yy_state_523) - NT_lexmatch_header => Shift(yy_state_529) - NT_match_header => Shift(yy_state_540) - T_MATCH => Shift(yy_state_550) - T_IF => Shift(yy_state_553) - T_TRY_EXCLAMATION => Shift(yy_state_559) - T_TRY_QUESTION => Shift(yy_state_561) - T_TRY => Shift(yy_state_563) - NT_loop_label_colon => Shift(yy_state_577) - T_POST_LABEL => Shift(yy_state_585) - NT_expr => Shift(yy_state_590) - NT_left_value => Shift(yy_state_591) - T_ELLIPSIS => Shift(yy_state_598) - T_RAISE => Shift(yy_state_599) - T_PACKAGE_NAME => Shift(yy_state_601) - T_LIDENT => Shift(yy_state_603) - NT_expr_statement_no_break_continue_return => Shift(yy_state_812) - T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_902) + T_FAT_ARROW => Shift(yy_state_649) _ => Error } } -fn yy_state_458(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_left_value, yy_action_594) +fn yy_state_809(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_UNDERSCORE => Shift(yy_state_288) + T_EXTEND => Shift(yy_state_295) + T_LIDENT => Shift(yy_state_301) + T_RPAREN => Shift(yy_state_810) + NT_arrow_fn_prefix => Shift(yy_state_813) + _ => Error + } } -fn yy_state_459(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_810(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_DOTDOT => Shift(yy_state_153) - T_LPAREN => Shift(yy_state_460) - T_LBRACKET => Shift(yy_state_800) - T_DOT_INT => Shift(yy_state_807) - T_DOT_LIDENT => Shift(yy_state_808) - T_INFIX1 | T_INFIX2 | T_INFIX3 | T_INFIX4 | T_EOF | T_CATCH | T_EQ_TILDE | T_RPAREN | T_COMMA | T_MINUS | T_COLON | T_SEMI | T_PLUS | T_RBRACKET | T_BAR | T_LBRACE | T_RBRACE | T_AMPERAMPER | T_AMPER | T_CARET | T_BARBAR | T_AS | T_PIPE | T_PIPE_LEFT | T_LT_PLUS | T_RANGE_INCLUSIVE | T_RANGE_LT_INCLUSIVE | T_RANGE_EXCLUSIVE | T_RANGE_INCLUSIVE_REV | T_RANGE_EXCLUSIVE_REV | T_IS | T_AND | T_IMPLIES | T_LEXMATCH_QUESTION => Reduce(1, NT_prefix_expr, yy_action_797) + T_FAT_ARROW => Shift(yy_state_811) _ => Error } } -fn yy_state_460(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_811(_lookahead : YYSymbol) -> YYDecision { match _lookahead { NT_multiline_string => Shift(yy_state_2) T_MULTILINE_INTERP => Shift(yy_state_4) @@ -22316,84 +32253,86 @@ fn yy_state_460(_lookahead : YYSymbol) -> YYDecision { T_BYTE => Shift(yy_state_13) T_FALSE => Shift(yy_state_14) T_TRUE => Shift(yy_state_15) - T_INTERP => Shift(yy_state_16) - NT_non_empty_list_multiline_string_ => Shift(yy_state_17) - NT_simple_constant => Shift(yy_state_18) - T_AMPER => Shift(yy_state_19) - NT_qual_ident_ty => Shift(yy_state_25) - NT_tuple_expr => Shift(yy_state_26) - T_LBRACKET => Shift(yy_state_27) - NT_constr => Shift(yy_state_35) - NT_qual_ident_simple_expr => Shift(yy_state_36) - NT_atomic_expr => Shift(yy_state_37) - NT_anony_fn => Shift(yy_state_38) - T_LBRACE => Shift(yy_state_39) - T_FN => Shift(yy_state_48) - NT_type_name => Shift(yy_state_126) - T_ASYNC => Shift(yy_state_138) - NT_simple_expr => Shift(yy_state_151) - NT_argument => Shift(yy_state_156) - NT_non_empty_list_commas_rev_argument_ => Shift(yy_state_157) - NT_expr => Shift(yy_state_161) - T_EXCLAMATION => Shift(yy_state_162) - T_MINUS => Shift(yy_state_178) - T_PLUS => Shift(yy_state_180) - T_UIDENT => Shift(yy_state_182) - T_PACKAGE_NAME => Shift(yy_state_183) - NT_prefix_expr => Shift(yy_state_187) - NT_range_expr => Shift(yy_state_198) - NT_postfix_expr => Shift(yy_state_416) - T_EXISTS => Shift(yy_state_417) - T_FORALL => Shift(yy_state_449) - NT_infix_expr => Shift(yy_state_455) - T_UNDERSCORE => Shift(yy_state_456) - NT_non_empty_list_commas_argument_ => Shift(yy_state_461) - NT_list_commas_argument_ => Shift(yy_state_462) - T_LPAREN => Shift(yy_state_464) - NT_pipe_expr => Shift(yy_state_497) - NT_arrow_fn_expr => Shift(yy_state_513) - NT_quantifier_expr => Shift(yy_state_514) - NT_simple_try_expr => Shift(yy_state_515) - NT_lexmatch_expr => Shift(yy_state_516) - NT_match_expr => Shift(yy_state_517) - NT_if_expr => Shift(yy_state_518) - NT_try_expr => Shift(yy_state_519) - NT_while_expr => Shift(yy_state_520) - NT_foreach_expr => Shift(yy_state_521) - NT_for_expr => Shift(yy_state_522) - T_LEXMATCH => Shift(yy_state_523) - NT_lexmatch_header => Shift(yy_state_529) - NT_match_header => Shift(yy_state_540) - T_MATCH => Shift(yy_state_550) - T_IF => Shift(yy_state_553) - T_TRY_EXCLAMATION => Shift(yy_state_559) - T_TRY_QUESTION => Shift(yy_state_561) - T_TRY => Shift(yy_state_563) - NT_loop_label_colon => Shift(yy_state_577) - T_POST_LABEL => Shift(yy_state_794) - T_LIDENT => Shift(yy_state_795) - T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_902) - T_RPAREN => Reduce(0, NT_list_commas_argument_, yy_action_795) + T_BYTES_INTERP => Shift(yy_state_16) + T_INTERP => Shift(yy_state_17) + NT_non_empty_list_multiline_string_ => Shift(yy_state_18) + NT_simple_constant => Shift(yy_state_19) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + NT_tuple_expr => Shift(yy_state_27) + T_LBRACKET_BAR => Shift(yy_state_28) + T_LBRACKET => Shift(yy_state_36) + NT_constr => Shift(yy_state_47) + NT_qual_ident_simple_expr => Shift(yy_state_48) + NT_atomic_expr => Shift(yy_state_50) + NT_anony_fn => Shift(yy_state_51) + T_LBRACE => Shift(yy_state_52) + T_FN => Shift(yy_state_61) + NT_type_name => Shift(yy_state_139) + T_ASYNC => Shift(yy_state_152) + T_EXCLAMATION => Shift(yy_state_176) + T_MINUS => Shift(yy_state_191) + T_PLUS => Shift(yy_state_193) + T_UIDENT => Shift(yy_state_195) + NT_prefix_expr => Shift(yy_state_201) + NT_range_expr => Shift(yy_state_212) + NT_postfix_expr => Shift(yy_state_223) + T_EXISTS => Shift(yy_state_224) + T_FORALL => Shift(yy_state_256) + NT_infix_expr => Shift(yy_state_272) + T_UNDERSCORE => Shift(yy_state_273) + NT_qual_ident => Shift(yy_state_275) + NT_simple_expr => Shift(yy_state_276) + T_LPAREN => Shift(yy_state_281) + NT_pipe_expr => Shift(yy_state_325) + NT_arrow_fn_expr => Shift(yy_state_344) + NT_quantifier_expr => Shift(yy_state_345) + NT_simple_try_expr => Shift(yy_state_346) + NT_lexscan_expr => Shift(yy_state_347) + NT_lexmatch_expr => Shift(yy_state_348) + NT_match_expr => Shift(yy_state_349) + NT_if_expr => Shift(yy_state_350) + NT_try_expr => Shift(yy_state_351) + NT_while_expr => Shift(yy_state_352) + NT_foreach_expr => Shift(yy_state_353) + NT_for_expr => Shift(yy_state_354) + T_LEXSCAN => Shift(yy_state_355) + NT_lexscan_header => Shift(yy_state_358) + T_LEXMATCH => Shift(yy_state_391) + NT_lexmatch_header => Shift(yy_state_399) + NT_match_header => Shift(yy_state_444) + T_MATCH => Shift(yy_state_605) + T_IF => Shift(yy_state_608) + T_TRY_EXCLAMATION => Shift(yy_state_614) + T_TRY_QUESTION => Shift(yy_state_616) + T_TRY => Shift(yy_state_618) + NT_loop_label_colon => Shift(yy_state_632) + T_POST_LABEL => Shift(yy_state_639) + NT_expr => Shift(yy_state_644) + NT_left_value => Shift(yy_state_645) + T_ELLIPSIS => Shift(yy_state_651) + T_RAISE => Shift(yy_state_652) + T_PACKAGE_NAME => Shift(yy_state_654) + T_EXTEND => Shift(yy_state_656) + T_LIDENT => Shift(yy_state_657) + NT_expr_statement_no_break_continue_return => Shift(yy_state_812) + T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_1071) _ => Error } } -fn yy_state_461(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_list_commas_argument_, yy_action_593) +fn yy_state_812(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(4, NT_arrow_fn_expr, yy_action_582) } -fn yy_state_462(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_813(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RPAREN => Shift(yy_state_463) + T_FAT_ARROW => Shift(yy_state_814) _ => Error } } -fn yy_state_463(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(4, NT_simple_expr, yy_action_592) -} - -fn yy_state_464(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_814(_lookahead : YYSymbol) -> YYDecision { match _lookahead { NT_multiline_string => Shift(yy_state_2) T_MULTILINE_INTERP => Shift(yy_state_4) @@ -22408,560 +32347,443 @@ fn yy_state_464(_lookahead : YYSymbol) -> YYDecision { T_BYTE => Shift(yy_state_13) T_FALSE => Shift(yy_state_14) T_TRUE => Shift(yy_state_15) - T_INTERP => Shift(yy_state_16) - NT_non_empty_list_multiline_string_ => Shift(yy_state_17) - NT_simple_constant => Shift(yy_state_18) - T_AMPER => Shift(yy_state_19) - NT_qual_ident_ty => Shift(yy_state_25) - NT_tuple_expr => Shift(yy_state_26) - T_LBRACKET => Shift(yy_state_27) - NT_constr => Shift(yy_state_35) - NT_qual_ident_simple_expr => Shift(yy_state_36) - NT_atomic_expr => Shift(yy_state_37) - NT_anony_fn => Shift(yy_state_38) - T_LBRACE => Shift(yy_state_39) - T_FN => Shift(yy_state_48) - NT_type_name => Shift(yy_state_126) - T_ASYNC => Shift(yy_state_138) - NT_simple_expr => Shift(yy_state_151) - T_EXCLAMATION => Shift(yy_state_162) - NT_non_empty_tuple_elems_with_prefix => Shift(yy_state_166) - NT_arrow_fn_prefix_no_constraint => Shift(yy_state_167) - NT_non_empty_tuple_elems => Shift(yy_state_168) - NT_expr => Shift(yy_state_169) - T_MINUS => Shift(yy_state_178) - T_PLUS => Shift(yy_state_180) - T_UIDENT => Shift(yy_state_182) - T_PACKAGE_NAME => Shift(yy_state_183) - NT_prefix_expr => Shift(yy_state_187) - NT_range_expr => Shift(yy_state_198) - NT_postfix_expr => Shift(yy_state_416) - T_EXISTS => Shift(yy_state_417) - T_FORALL => Shift(yy_state_449) - NT_infix_expr => Shift(yy_state_455) - T_LPAREN => Shift(yy_state_464) - T_UNDERSCORE => Shift(yy_state_465) - NT_pipe_expr => Shift(yy_state_497) - NT_arrow_fn_expr => Shift(yy_state_513) - NT_quantifier_expr => Shift(yy_state_514) - NT_simple_try_expr => Shift(yy_state_515) - NT_lexmatch_expr => Shift(yy_state_516) - NT_match_expr => Shift(yy_state_517) - NT_if_expr => Shift(yy_state_518) - NT_try_expr => Shift(yy_state_519) - NT_while_expr => Shift(yy_state_520) - NT_foreach_expr => Shift(yy_state_521) - NT_for_expr => Shift(yy_state_522) - T_LEXMATCH => Shift(yy_state_523) - NT_lexmatch_header => Shift(yy_state_529) - NT_match_header => Shift(yy_state_540) - T_MATCH => Shift(yy_state_550) - T_IF => Shift(yy_state_553) - T_TRY_EXCLAMATION => Shift(yy_state_559) - T_TRY_QUESTION => Shift(yy_state_561) - T_TRY => Shift(yy_state_563) - NT_loop_label_colon => Shift(yy_state_577) - T_POST_LABEL => Shift(yy_state_585) - NT_arrow_fn_prefix => Shift(yy_state_724) - T_LIDENT => Shift(yy_state_771) - T_RPAREN => Shift(yy_state_793) - T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_902) - _ => Error - } -} - -fn yy_state_465(_lookahead : YYSymbol) -> YYDecision { - match _lookahead { - T_FAT_ARROW => Shift(yy_state_457) - T_COLON => Shift(yy_state_466) - T_COMMA => Shift(yy_state_491) - T_RPAREN => Shift(yy_state_496) - T_INFIX1 | T_INFIX2 | T_INFIX3 | T_INFIX4 | T_CATCH | T_EQ_TILDE | T_LPAREN | T_MINUS | T_DOT_LIDENT | T_DOT_INT | T_LBRACKET | T_PLUS | T_BAR | T_AMPERAMPER | T_AMPER | T_CARET | T_BARBAR | T_AS | T_PIPE | T_PIPE_LEFT | T_LT_PLUS | T_DOTDOT | T_RANGE_INCLUSIVE | T_RANGE_LT_INCLUSIVE | T_RANGE_EXCLUSIVE | T_RANGE_INCLUSIVE_REV | T_RANGE_EXCLUSIVE_REV | T_IS | T_IMPLIES | T_LEXMATCH_QUESTION => Reduce(1, NT_simple_expr, yy_action_790) - _ => Error - } -} - -fn yy_state_466(_lookahead : YYSymbol) -> YYDecision { - match _lookahead { - T_ASYNC => Shift(yy_state_52) - T_UNDERSCORE => Shift(yy_state_57) - T_AMPER => Shift(yy_state_58) - T_PACKAGE_NAME => Shift(yy_state_60) - T_UIDENT => Shift(yy_state_67) - T_LPAREN => Shift(yy_state_71) - NT_simple_type => Shift(yy_state_97) - NT_type_ => Shift(yy_state_467) + T_BYTES_INTERP => Shift(yy_state_16) + T_INTERP => Shift(yy_state_17) + NT_non_empty_list_multiline_string_ => Shift(yy_state_18) + NT_simple_constant => Shift(yy_state_19) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + NT_tuple_expr => Shift(yy_state_27) + T_LBRACKET_BAR => Shift(yy_state_28) + T_LBRACKET => Shift(yy_state_36) + NT_constr => Shift(yy_state_47) + NT_qual_ident_simple_expr => Shift(yy_state_48) + NT_atomic_expr => Shift(yy_state_50) + NT_anony_fn => Shift(yy_state_51) + T_LBRACE => Shift(yy_state_52) + T_FN => Shift(yy_state_61) + NT_type_name => Shift(yy_state_139) + T_ASYNC => Shift(yy_state_152) + T_EXCLAMATION => Shift(yy_state_176) + T_MINUS => Shift(yy_state_191) + T_PLUS => Shift(yy_state_193) + T_UIDENT => Shift(yy_state_195) + NT_prefix_expr => Shift(yy_state_201) + NT_range_expr => Shift(yy_state_212) + NT_postfix_expr => Shift(yy_state_223) + T_EXISTS => Shift(yy_state_224) + T_FORALL => Shift(yy_state_256) + NT_infix_expr => Shift(yy_state_272) + T_UNDERSCORE => Shift(yy_state_273) + NT_qual_ident => Shift(yy_state_275) + NT_simple_expr => Shift(yy_state_276) + T_LPAREN => Shift(yy_state_281) + NT_pipe_expr => Shift(yy_state_325) + NT_arrow_fn_expr => Shift(yy_state_344) + NT_quantifier_expr => Shift(yy_state_345) + NT_simple_try_expr => Shift(yy_state_346) + NT_lexscan_expr => Shift(yy_state_347) + NT_lexmatch_expr => Shift(yy_state_348) + NT_match_expr => Shift(yy_state_349) + NT_if_expr => Shift(yy_state_350) + NT_try_expr => Shift(yy_state_351) + NT_while_expr => Shift(yy_state_352) + NT_foreach_expr => Shift(yy_state_353) + NT_for_expr => Shift(yy_state_354) + T_LEXSCAN => Shift(yy_state_355) + NT_lexscan_header => Shift(yy_state_358) + T_LEXMATCH => Shift(yy_state_391) + NT_lexmatch_header => Shift(yy_state_399) + NT_match_header => Shift(yy_state_444) + T_MATCH => Shift(yy_state_605) + T_IF => Shift(yy_state_608) + T_TRY_EXCLAMATION => Shift(yy_state_614) + T_TRY_QUESTION => Shift(yy_state_616) + T_TRY => Shift(yy_state_618) + NT_loop_label_colon => Shift(yy_state_632) + T_POST_LABEL => Shift(yy_state_639) + NT_expr => Shift(yy_state_644) + NT_left_value => Shift(yy_state_645) + T_ELLIPSIS => Shift(yy_state_651) + T_RAISE => Shift(yy_state_652) + T_PACKAGE_NAME => Shift(yy_state_654) + T_EXTEND => Shift(yy_state_656) + T_LIDENT => Shift(yy_state_657) + NT_expr_statement_no_break_continue_return => Shift(yy_state_815) + T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_1071) _ => Error } } -fn yy_state_467(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_815(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(4, NT_arrow_fn_expr, yy_action_581) +} + +fn yy_state_816(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_COMMA => Shift(yy_state_468) - T_RPAREN => Shift(yy_state_490) + NT_and_func => Shift(yy_state_817) + T_AND => Shift(yy_state_819) + NT_list_and_func_ => Shift(yy_state_836) + T_SEMI | T_RBRACE => Reduce(0, NT_list_and_func_, yy_action_580) _ => Error } } -fn yy_state_468(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_817(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_arrow_fn_prefix => Shift(yy_state_469) - T_RPAREN => Shift(yy_state_470) - T_UNDERSCORE => Shift(yy_state_471) - T_LIDENT => Shift(yy_state_478) + NT_and_func => Shift(yy_state_817) + NT_list_and_func_ => Shift(yy_state_818) + T_AND => Shift(yy_state_819) + T_SEMI | T_RBRACE => Reduce(0, NT_list_and_func_, yy_action_580) _ => Error } } -fn yy_state_469(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(5, NT_arrow_fn_prefix, yy_action_591) -} - -fn yy_state_470(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(5, NT_arrow_fn_prefix, yy_action_590) +fn yy_state_818(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(2, NT_list_and_func_, yy_action_579) } -fn yy_state_471(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_819(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_COLON => Shift(yy_state_472) - T_COMMA => Shift(yy_state_475) - T_RPAREN => Shift(yy_state_489) + T_EXTEND => Shift(yy_state_820) + T_LIDENT => Shift(yy_state_829) _ => Error } } -fn yy_state_472(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_820(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_ASYNC => Shift(yy_state_52) - T_UNDERSCORE => Shift(yy_state_57) - T_AMPER => Shift(yy_state_58) - T_PACKAGE_NAME => Shift(yy_state_60) - T_UIDENT => Shift(yy_state_67) - T_LPAREN => Shift(yy_state_71) - NT_simple_type => Shift(yy_state_97) - NT_type_ => Shift(yy_state_473) + T_COLON => Shift(yy_state_821) + T_EQUAL => Shift(yy_state_827) _ => Error } } -fn yy_state_473(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_821(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_COMMA => Shift(yy_state_468) - T_RPAREN => Shift(yy_state_474) + T_ASYNC => Shift(yy_state_65) + T_UNDERSCORE => Shift(yy_state_70) + T_AMPER => Shift(yy_state_71) + T_PACKAGE_NAME => Shift(yy_state_73) + T_UIDENT => Shift(yy_state_80) + T_LPAREN => Shift(yy_state_84) + NT_simple_type => Shift(yy_state_110) + NT_type_ => Shift(yy_state_822) _ => Error } } -fn yy_state_474(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(4, NT_arrow_fn_prefix, yy_action_589) +fn yy_state_822(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_EQUAL => Shift(yy_state_823) + _ => Error + } } -fn yy_state_475(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_823(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_UNDERSCORE => Shift(yy_state_471) - NT_arrow_fn_prefix => Shift(yy_state_476) - T_RPAREN => Shift(yy_state_477) - T_LIDENT => Shift(yy_state_478) + T_FN => Shift(yy_state_61) + T_ASYNC => Shift(yy_state_152) + T_UNDERSCORE => Shift(yy_state_806) + T_EXTEND => Shift(yy_state_807) + T_LIDENT => Shift(yy_state_808) + T_LPAREN => Shift(yy_state_809) + NT_letand_func => Shift(yy_state_824) + NT_anony_fn => Shift(yy_state_825) + NT_arrow_fn_expr => Shift(yy_state_826) _ => Error } } -fn yy_state_476(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_arrow_fn_prefix, yy_action_588) +fn yy_state_824(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(6, NT_and_func, yy_action_576) } -fn yy_state_477(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_arrow_fn_prefix, yy_action_587) +fn yy_state_825(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_letand_func, yy_action_575) } -fn yy_state_478(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_826(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_letand_func, yy_action_574) +} + +fn yy_state_827(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_COLON => Shift(yy_state_479) - T_COMMA => Shift(yy_state_485) - T_RPAREN => Shift(yy_state_488) + T_FN => Shift(yy_state_61) + T_ASYNC => Shift(yy_state_152) + T_UNDERSCORE => Shift(yy_state_806) + T_EXTEND => Shift(yy_state_807) + T_LIDENT => Shift(yy_state_808) + T_LPAREN => Shift(yy_state_809) + NT_anony_fn => Shift(yy_state_825) + NT_arrow_fn_expr => Shift(yy_state_826) + NT_letand_func => Shift(yy_state_828) _ => Error } } -fn yy_state_479(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_828(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(4, NT_and_func, yy_action_573) +} + +fn yy_state_829(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_ASYNC => Shift(yy_state_52) - T_UNDERSCORE => Shift(yy_state_57) - T_AMPER => Shift(yy_state_58) - T_PACKAGE_NAME => Shift(yy_state_60) - T_UIDENT => Shift(yy_state_67) - T_LPAREN => Shift(yy_state_71) - NT_simple_type => Shift(yy_state_97) - NT_type_ => Shift(yy_state_480) + T_COLON => Shift(yy_state_830) + T_EQUAL => Shift(yy_state_834) _ => Error } } -fn yy_state_480(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_830(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_COMMA => Shift(yy_state_481) - T_RPAREN => Shift(yy_state_484) + T_ASYNC => Shift(yy_state_65) + T_UNDERSCORE => Shift(yy_state_70) + T_AMPER => Shift(yy_state_71) + T_PACKAGE_NAME => Shift(yy_state_73) + T_UIDENT => Shift(yy_state_80) + T_LPAREN => Shift(yy_state_84) + NT_simple_type => Shift(yy_state_110) + NT_type_ => Shift(yy_state_831) _ => Error } } -fn yy_state_481(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_831(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_UNDERSCORE => Shift(yy_state_471) - T_LIDENT => Shift(yy_state_478) - NT_arrow_fn_prefix => Shift(yy_state_482) - T_RPAREN => Shift(yy_state_483) + T_EQUAL => Shift(yy_state_832) _ => Error } } -fn yy_state_482(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(5, NT_arrow_fn_prefix, yy_action_586) -} - -fn yy_state_483(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(5, NT_arrow_fn_prefix, yy_action_585) -} - -fn yy_state_484(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(4, NT_arrow_fn_prefix, yy_action_584) -} - -fn yy_state_485(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_832(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_UNDERSCORE => Shift(yy_state_471) - T_LIDENT => Shift(yy_state_478) - NT_arrow_fn_prefix => Shift(yy_state_486) - T_RPAREN => Shift(yy_state_487) + T_FN => Shift(yy_state_61) + T_ASYNC => Shift(yy_state_152) + T_UNDERSCORE => Shift(yy_state_806) + T_EXTEND => Shift(yy_state_807) + T_LIDENT => Shift(yy_state_808) + T_LPAREN => Shift(yy_state_809) + NT_anony_fn => Shift(yy_state_825) + NT_arrow_fn_expr => Shift(yy_state_826) + NT_letand_func => Shift(yy_state_833) _ => Error } } -fn yy_state_486(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_arrow_fn_prefix, yy_action_583) +fn yy_state_833(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(6, NT_and_func, yy_action_572) } -fn yy_state_487(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_arrow_fn_prefix, yy_action_582) +fn yy_state_834(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_FN => Shift(yy_state_61) + T_ASYNC => Shift(yy_state_152) + T_UNDERSCORE => Shift(yy_state_806) + T_EXTEND => Shift(yy_state_807) + T_LIDENT => Shift(yy_state_808) + T_LPAREN => Shift(yy_state_809) + NT_anony_fn => Shift(yy_state_825) + NT_arrow_fn_expr => Shift(yy_state_826) + NT_letand_func => Shift(yy_state_835) + _ => Error + } } -fn yy_state_488(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(2, NT_arrow_fn_prefix, yy_action_581) +fn yy_state_835(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(4, NT_and_func, yy_action_571) } -fn yy_state_489(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(2, NT_arrow_fn_prefix, yy_action_580) +fn yy_state_836(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(7, NT_statement, yy_action_570) } -fn yy_state_490(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_837(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_FAT_ARROW => Reduce(4, NT_arrow_fn_prefix, yy_action_589) - T_INFIX1 | T_INFIX2 | T_INFIX3 | T_INFIX4 | T_EOF | T_CATCH | T_EQ_TILDE | T_LPAREN | T_RPAREN | T_COMMA | T_MINUS | T_DOT_LIDENT | T_DOT_INT | T_COLON | T_SEMI | T_LBRACKET | T_PLUS | T_RBRACKET | T_BAR | T_LBRACE | T_RBRACE | T_AMPERAMPER | T_AMPER | T_CARET | T_BARBAR | T_AS | T_PIPE | T_PIPE_LEFT | T_LT_PLUS | T_DOTDOT | T_RANGE_INCLUSIVE | T_RANGE_LT_INCLUSIVE | T_RANGE_EXCLUSIVE | T_RANGE_INCLUSIVE_REV | T_RANGE_EXCLUSIVE_REV | T_IS | T_AND | T_IMPLIES | T_LEXMATCH_QUESTION => Reduce(5, NT_tuple_expr, yy_action_579) + T_FN => Shift(yy_state_61) + T_ASYNC => Shift(yy_state_152) + T_UNDERSCORE => Shift(yy_state_806) + T_EXTEND => Shift(yy_state_807) + T_LIDENT => Shift(yy_state_808) + T_LPAREN => Shift(yy_state_809) + NT_anony_fn => Shift(yy_state_825) + NT_arrow_fn_expr => Shift(yy_state_826) + NT_letand_func => Shift(yy_state_838) _ => Error } } -fn yy_state_491(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_838(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_multiline_string => Shift(yy_state_2) - T_MULTILINE_INTERP => Shift(yy_state_4) - T_MULTILINE_STRING => Shift(yy_state_5) - T_REGEX_LITERAL => Shift(yy_state_6) - T_STRING => Shift(yy_state_7) - T_FLOAT => Shift(yy_state_8) - T_DOUBLE => Shift(yy_state_9) - T_INT => Shift(yy_state_10) - T_CHAR => Shift(yy_state_11) - T_BYTES => Shift(yy_state_12) - T_BYTE => Shift(yy_state_13) - T_FALSE => Shift(yy_state_14) - T_TRUE => Shift(yy_state_15) - T_INTERP => Shift(yy_state_16) - NT_non_empty_list_multiline_string_ => Shift(yy_state_17) - NT_simple_constant => Shift(yy_state_18) - T_AMPER => Shift(yy_state_19) - NT_qual_ident_ty => Shift(yy_state_25) - NT_tuple_expr => Shift(yy_state_26) - T_LBRACKET => Shift(yy_state_27) - NT_constr => Shift(yy_state_35) - NT_qual_ident_simple_expr => Shift(yy_state_36) - NT_atomic_expr => Shift(yy_state_37) - NT_anony_fn => Shift(yy_state_38) - T_LBRACE => Shift(yy_state_39) - T_FN => Shift(yy_state_48) - NT_type_name => Shift(yy_state_126) - T_ASYNC => Shift(yy_state_138) - NT_simple_expr => Shift(yy_state_151) - T_EXCLAMATION => Shift(yy_state_162) - NT_non_empty_tuple_elems => Shift(yy_state_168) - NT_expr => Shift(yy_state_176) - T_MINUS => Shift(yy_state_178) - T_PLUS => Shift(yy_state_180) - T_UIDENT => Shift(yy_state_182) - T_PACKAGE_NAME => Shift(yy_state_183) - NT_prefix_expr => Shift(yy_state_187) - NT_range_expr => Shift(yy_state_198) - NT_postfix_expr => Shift(yy_state_416) - T_EXISTS => Shift(yy_state_417) - T_FORALL => Shift(yy_state_449) - NT_infix_expr => Shift(yy_state_455) - T_LPAREN => Shift(yy_state_464) - NT_arrow_fn_prefix => Shift(yy_state_476) - NT_non_empty_tuple_elems_with_prefix => Shift(yy_state_492) - NT_arrow_fn_prefix_no_constraint => Shift(yy_state_493) - T_RPAREN => Shift(yy_state_494) - T_UNDERSCORE => Shift(yy_state_495) - NT_pipe_expr => Shift(yy_state_497) - NT_arrow_fn_expr => Shift(yy_state_513) - NT_quantifier_expr => Shift(yy_state_514) - NT_simple_try_expr => Shift(yy_state_515) - NT_lexmatch_expr => Shift(yy_state_516) - NT_match_expr => Shift(yy_state_517) - NT_if_expr => Shift(yy_state_518) - NT_try_expr => Shift(yy_state_519) - NT_while_expr => Shift(yy_state_520) - NT_foreach_expr => Shift(yy_state_521) - NT_for_expr => Shift(yy_state_522) - T_LEXMATCH => Shift(yy_state_523) - NT_lexmatch_header => Shift(yy_state_529) - NT_match_header => Shift(yy_state_540) - T_MATCH => Shift(yy_state_550) - T_IF => Shift(yy_state_553) - T_TRY_EXCLAMATION => Shift(yy_state_559) - T_TRY_QUESTION => Shift(yy_state_561) - T_TRY => Shift(yy_state_563) - NT_loop_label_colon => Shift(yy_state_577) - T_POST_LABEL => Shift(yy_state_585) - T_LIDENT => Shift(yy_state_779) - T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_902) + NT_and_func => Shift(yy_state_817) + T_AND => Shift(yy_state_819) + NT_list_and_func_ => Shift(yy_state_839) + T_SEMI | T_RBRACE => Reduce(0, NT_list_and_func_, yy_action_580) _ => Error } } -fn yy_state_492(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_non_empty_tuple_elems_with_prefix, yy_action_578) -} - -fn yy_state_493(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_arrow_fn_prefix_no_constraint, yy_action_577) +fn yy_state_839(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(5, NT_statement, yy_action_569) } -fn yy_state_494(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_840(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_FAT_ARROW => Reduce(3, NT_arrow_fn_prefix, yy_action_587) - T_INFIX1 | T_INFIX2 | T_INFIX3 | T_INFIX4 | T_EOF | T_CATCH | T_EQ_TILDE | T_LPAREN | T_RPAREN | T_COMMA | T_MINUS | T_DOT_LIDENT | T_DOT_INT | T_COLON | T_SEMI | T_LBRACKET | T_PLUS | T_RBRACKET | T_BAR | T_LBRACE | T_RBRACE | T_AMPERAMPER | T_AMPER | T_CARET | T_BARBAR | T_AS | T_PIPE | T_PIPE_LEFT | T_LT_PLUS | T_DOTDOT | T_RANGE_INCLUSIVE | T_RANGE_LT_INCLUSIVE | T_RANGE_EXCLUSIVE | T_RANGE_INCLUSIVE_REV | T_RANGE_EXCLUSIVE_REV | T_IS | T_AND | T_IMPLIES | T_LEXMATCH_QUESTION => Reduce(3, NT_arrow_fn_prefix_no_constraint, yy_action_576) + T_COLON => Shift(yy_state_841) + T_EQUAL => Shift(yy_state_846) _ => Error } } -fn yy_state_495(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_841(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_FAT_ARROW => Shift(yy_state_457) - T_COLON => Shift(yy_state_472) - T_COMMA => Shift(yy_state_491) - T_RPAREN => Shift(yy_state_496) - T_INFIX1 | T_INFIX2 | T_INFIX3 | T_INFIX4 | T_CATCH | T_EQ_TILDE | T_LPAREN | T_MINUS | T_DOT_LIDENT | T_DOT_INT | T_LBRACKET | T_PLUS | T_BAR | T_AMPERAMPER | T_AMPER | T_CARET | T_BARBAR | T_AS | T_PIPE | T_PIPE_LEFT | T_LT_PLUS | T_DOTDOT | T_RANGE_INCLUSIVE | T_RANGE_LT_INCLUSIVE | T_RANGE_EXCLUSIVE | T_RANGE_INCLUSIVE_REV | T_RANGE_EXCLUSIVE_REV | T_IS | T_IMPLIES | T_LEXMATCH_QUESTION => Reduce(1, NT_simple_expr, yy_action_790) + T_ASYNC => Shift(yy_state_65) + T_UNDERSCORE => Shift(yy_state_70) + T_AMPER => Shift(yy_state_71) + T_PACKAGE_NAME => Shift(yy_state_73) + T_UIDENT => Shift(yy_state_80) + T_LPAREN => Shift(yy_state_84) + NT_simple_type => Shift(yy_state_110) + NT_type_ => Shift(yy_state_842) _ => Error } } -fn yy_state_496(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_842(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_FAT_ARROW => Reduce(2, NT_arrow_fn_prefix, yy_action_580) - T_INFIX1 | T_INFIX2 | T_INFIX3 | T_INFIX4 | T_EOF | T_CATCH | T_EQ_TILDE | T_LPAREN | T_RPAREN | T_COMMA | T_MINUS | T_DOT_LIDENT | T_DOT_INT | T_COLON | T_SEMI | T_LBRACKET | T_PLUS | T_RBRACKET | T_BAR | T_LBRACE | T_RBRACE | T_AMPERAMPER | T_AMPER | T_CARET | T_BARBAR | T_AS | T_PIPE | T_PIPE_LEFT | T_LT_PLUS | T_DOTDOT | T_RANGE_INCLUSIVE | T_RANGE_LT_INCLUSIVE | T_RANGE_EXCLUSIVE | T_RANGE_INCLUSIVE_REV | T_RANGE_EXCLUSIVE_REV | T_IS | T_AND | T_IMPLIES | T_LEXMATCH_QUESTION => Reduce(2, NT_arrow_fn_prefix_no_constraint, yy_action_575) + T_EQUAL => Shift(yy_state_843) _ => Error } } -fn yy_state_497(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_843(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_PIPE => Shift(yy_state_498) - T_PIPE_LEFT => Shift(yy_state_503) - T_CATCH => Shift(yy_state_574) - NT_catch_keyword => Shift(yy_state_786) - T_EOF | T_RPAREN | T_COMMA | T_COLON | T_SEMI | T_RBRACKET | T_LBRACE | T_RBRACE | T_AND => Reduce(1, NT_simple_try_expr, yy_action_574) + T_FN => Shift(yy_state_61) + T_ASYNC => Shift(yy_state_152) + T_UNDERSCORE => Shift(yy_state_806) + T_EXTEND => Shift(yy_state_807) + T_LIDENT => Shift(yy_state_808) + T_LPAREN => Shift(yy_state_809) + NT_anony_fn => Shift(yy_state_825) + NT_arrow_fn_expr => Shift(yy_state_826) + NT_letand_func => Shift(yy_state_844) _ => Error } } -fn yy_state_498(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_844(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_multiline_string => Shift(yy_state_2) - T_MULTILINE_INTERP => Shift(yy_state_4) - T_MULTILINE_STRING => Shift(yy_state_5) - T_REGEX_LITERAL => Shift(yy_state_6) - T_STRING => Shift(yy_state_7) - T_FLOAT => Shift(yy_state_8) - T_DOUBLE => Shift(yy_state_9) - T_INT => Shift(yy_state_10) - T_CHAR => Shift(yy_state_11) - T_BYTES => Shift(yy_state_12) - T_BYTE => Shift(yy_state_13) - T_FALSE => Shift(yy_state_14) - T_TRUE => Shift(yy_state_15) - T_INTERP => Shift(yy_state_16) - NT_non_empty_list_multiline_string_ => Shift(yy_state_17) - NT_simple_constant => Shift(yy_state_18) - T_AMPER => Shift(yy_state_19) - NT_qual_ident_ty => Shift(yy_state_25) - NT_tuple_expr => Shift(yy_state_26) - T_LBRACKET => Shift(yy_state_27) - NT_constr => Shift(yy_state_35) - NT_qual_ident_simple_expr => Shift(yy_state_36) - NT_atomic_expr => Shift(yy_state_37) - NT_anony_fn => Shift(yy_state_38) - T_LBRACE => Shift(yy_state_39) - T_FN => Shift(yy_state_48) - NT_type_name => Shift(yy_state_126) - T_ASYNC => Shift(yy_state_138) - NT_simple_expr => Shift(yy_state_151) - T_EXCLAMATION => Shift(yy_state_162) - T_UNDERSCORE => Shift(yy_state_163) - T_LPAREN => Shift(yy_state_164) - T_MINUS => Shift(yy_state_178) - T_PLUS => Shift(yy_state_180) - T_UIDENT => Shift(yy_state_182) - T_PACKAGE_NAME => Shift(yy_state_183) - NT_prefix_expr => Shift(yy_state_187) - NT_range_expr => Shift(yy_state_198) - NT_postfix_expr => Shift(yy_state_416) - NT_infix_expr => Shift(yy_state_499) - T_LIDENT => Shift(yy_state_500) + NT_and_func => Shift(yy_state_817) + T_AND => Shift(yy_state_819) + NT_list_and_func_ => Shift(yy_state_845) + T_SEMI | T_RBRACE => Reduce(0, NT_list_and_func_, yy_action_580) _ => Error } } -fn yy_state_499(_lookahead : YYSymbol) -> YYDecision { - match _lookahead { - T_BARBAR => Shift(yy_state_423) - T_AMPERAMPER => Shift(yy_state_425) - T_BAR => Shift(yy_state_427) - T_CARET => Shift(yy_state_429) - T_AMPER => Shift(yy_state_431) - T_MINUS => Shift(yy_state_433) - T_PLUS => Shift(yy_state_435) - T_INFIX1 => Shift(yy_state_437) - T_INFIX2 => Shift(yy_state_439) - T_INFIX3 => Shift(yy_state_441) - T_INFIX4 => Shift(yy_state_443) - T_IMPLIES => Shift(yy_state_445) - T_EOF | T_CATCH | T_RPAREN | T_COMMA | T_COLON | T_SEMI | T_RBRACKET | T_LBRACE | T_RBRACE | T_PIPE | T_PIPE_LEFT | T_AND => Reduce(3, NT_pipe_expr, yy_action_573) - _ => Error - } +fn yy_state_845(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(7, NT_statement, yy_action_568) } -fn yy_state_500(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_846(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_FAT_ARROW => Shift(yy_state_501) - T_INFIX1 | T_INFIX2 | T_INFIX3 | T_INFIX4 | T_EOF | T_CATCH | T_EQ_TILDE | T_LPAREN | T_RPAREN | T_COMMA | T_MINUS | T_DOT_LIDENT | T_DOT_INT | T_COLON | T_SEMI | T_LBRACKET | T_PLUS | T_RBRACKET | T_BAR | T_LBRACE | T_RBRACE | T_AMPERAMPER | T_AMPER | T_CARET | T_BARBAR | T_AS | T_PIPE | T_PIPE_LEFT | T_LT_PLUS | T_DOTDOT | T_RANGE_INCLUSIVE | T_RANGE_LT_INCLUSIVE | T_RANGE_EXCLUSIVE | T_RANGE_INCLUSIVE_REV | T_RANGE_EXCLUSIVE_REV | T_IS | T_AND | T_IMPLIES | T_LEXMATCH_QUESTION => Reduce(1, NT_qual_ident_simple_expr, yy_action_772) + T_FN => Shift(yy_state_61) + T_ASYNC => Shift(yy_state_152) + T_UNDERSCORE => Shift(yy_state_806) + T_EXTEND => Shift(yy_state_807) + T_LIDENT => Shift(yy_state_808) + T_LPAREN => Shift(yy_state_809) + NT_anony_fn => Shift(yy_state_825) + NT_arrow_fn_expr => Shift(yy_state_826) + NT_letand_func => Shift(yy_state_847) _ => Error } } -fn yy_state_501(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_847(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACE => Shift(yy_state_120) - NT_block_expr => Shift(yy_state_502) + NT_and_func => Shift(yy_state_817) + T_AND => Shift(yy_state_819) + NT_list_and_func_ => Shift(yy_state_848) + T_SEMI | T_RBRACE => Reduce(0, NT_list_and_func_, yy_action_580) _ => Error } } -fn yy_state_502(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(5, NT_pipe_expr, yy_action_572) +fn yy_state_848(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(5, NT_statement, yy_action_567) } -fn yy_state_503(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_849(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_multiline_string => Shift(yy_state_2) - T_MULTILINE_INTERP => Shift(yy_state_4) - T_MULTILINE_STRING => Shift(yy_state_5) - T_REGEX_LITERAL => Shift(yy_state_6) - T_STRING => Shift(yy_state_7) - T_FLOAT => Shift(yy_state_8) - T_DOUBLE => Shift(yy_state_9) - T_INT => Shift(yy_state_10) - T_CHAR => Shift(yy_state_11) - T_BYTES => Shift(yy_state_12) - T_BYTE => Shift(yy_state_13) - T_FALSE => Shift(yy_state_14) - T_TRUE => Shift(yy_state_15) - T_INTERP => Shift(yy_state_16) - NT_non_empty_list_multiline_string_ => Shift(yy_state_17) - NT_simple_constant => Shift(yy_state_18) - T_AMPER => Shift(yy_state_19) - NT_qual_ident_ty => Shift(yy_state_25) - NT_tuple_expr => Shift(yy_state_26) - T_LBRACKET => Shift(yy_state_27) - NT_constr => Shift(yy_state_35) - NT_qual_ident_simple_expr => Shift(yy_state_36) - NT_atomic_expr => Shift(yy_state_37) - NT_anony_fn => Shift(yy_state_38) - T_LBRACE => Shift(yy_state_39) - T_FN => Shift(yy_state_48) - NT_type_name => Shift(yy_state_126) - T_ASYNC => Shift(yy_state_138) - NT_simple_expr => Shift(yy_state_151) - T_EXCLAMATION => Shift(yy_state_162) - T_MINUS => Shift(yy_state_178) - T_PLUS => Shift(yy_state_180) - T_UIDENT => Shift(yy_state_182) - T_PACKAGE_NAME => Shift(yy_state_183) - NT_prefix_expr => Shift(yy_state_187) - NT_range_expr => Shift(yy_state_198) - NT_postfix_expr => Shift(yy_state_416) - NT_backward_pipeline_rhs => Shift(yy_state_504) - NT_infix_expr => Shift(yy_state_505) - NT_arrow_fn_with_explicit_braces => Shift(yy_state_506) - T_UNDERSCORE => Shift(yy_state_507) - T_LPAREN => Shift(yy_state_760) - T_LIDENT => Shift(yy_state_781) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + T_UIDENT => Shift(yy_state_195) + T_LBRACE => Shift(yy_state_448) + T_LBRACKET => Shift(yy_state_452) + T_LPAREN => Shift(yy_state_466) + NT_constr => Shift(yy_state_467) + T_EXTEND => Shift(yy_state_480) + T_LIDENT => Shift(yy_state_487) + T_UNDERSCORE => Shift(yy_state_491) + T_BYTES => Shift(yy_state_492) + T_STRING => Shift(yy_state_493) + T_MINUS => Shift(yy_state_494) + T_FLOAT => Shift(yy_state_498) + T_DOUBLE => Shift(yy_state_499) + T_BYTE => Shift(yy_state_500) + T_INT => Shift(yy_state_501) + T_CHAR => Shift(yy_state_502) + T_FALSE => Shift(yy_state_503) + T_TRUE => Shift(yy_state_504) + NT_simple_pattern => Shift(yy_state_505) + NT_type_name => Shift(yy_state_508) + T_PACKAGE_NAME => Shift(yy_state_513) + NT_range_pattern => Shift(yy_state_516) + NT_or_pattern => Shift(yy_state_519) + T_MUTABLE => Shift(yy_state_850) + NT_pattern => Shift(yy_state_865) _ => Error } } -fn yy_state_504(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_pipe_expr, yy_action_571) -} - -fn yy_state_505(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_850(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_BARBAR => Shift(yy_state_423) - T_AMPERAMPER => Shift(yy_state_425) - T_BAR => Shift(yy_state_427) - T_CARET => Shift(yy_state_429) - T_AMPER => Shift(yy_state_431) - T_MINUS => Shift(yy_state_433) - T_PLUS => Shift(yy_state_435) - T_INFIX1 => Shift(yy_state_437) - T_INFIX2 => Shift(yy_state_439) - T_INFIX3 => Shift(yy_state_441) - T_INFIX4 => Shift(yy_state_443) - T_IMPLIES => Shift(yy_state_445) - T_EOF | T_CATCH | T_RPAREN | T_COMMA | T_COLON | T_SEMI | T_RBRACKET | T_LBRACE | T_RBRACE | T_PIPE | T_PIPE_LEFT | T_AND => Reduce(1, NT_backward_pipeline_rhs, yy_action_570) + T_EXTEND => Shift(yy_state_851) + T_LIDENT => Shift(yy_state_858) _ => Error } } -fn yy_state_506(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_backward_pipeline_rhs, yy_action_569) +fn yy_state_851(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_COLON => Shift(yy_state_852) + T_EQUAL => Shift(yy_state_856) + _ => Error + } } -fn yy_state_507(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_852(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_FAT_ARROW => Shift(yy_state_508) - T_INFIX1 | T_INFIX2 | T_INFIX3 | T_INFIX4 | T_EOF | T_CATCH | T_EQ_TILDE | T_LPAREN | T_RPAREN | T_COMMA | T_MINUS | T_DOT_LIDENT | T_DOT_INT | T_COLON | T_SEMI | T_LBRACKET | T_PLUS | T_RBRACKET | T_BAR | T_LBRACE | T_RBRACE | T_AMPERAMPER | T_AMPER | T_CARET | T_BARBAR | T_AS | T_PIPE | T_PIPE_LEFT | T_LT_PLUS | T_DOTDOT | T_RANGE_INCLUSIVE | T_RANGE_LT_INCLUSIVE | T_RANGE_EXCLUSIVE | T_RANGE_INCLUSIVE_REV | T_RANGE_EXCLUSIVE_REV | T_IS | T_AND | T_IMPLIES | T_LEXMATCH_QUESTION => Reduce(1, NT_simple_expr, yy_action_790) + T_ASYNC => Shift(yy_state_65) + T_UNDERSCORE => Shift(yy_state_70) + T_AMPER => Shift(yy_state_71) + T_PACKAGE_NAME => Shift(yy_state_73) + T_UIDENT => Shift(yy_state_80) + T_LPAREN => Shift(yy_state_84) + NT_simple_type => Shift(yy_state_110) + NT_type_ => Shift(yy_state_853) _ => Error } } -fn yy_state_508(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_853(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACE => Shift(yy_state_509) + T_EQUAL => Shift(yy_state_854) _ => Error } } -fn yy_state_509(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_854(_lookahead : YYSymbol) -> YYDecision { match _lookahead { NT_multiline_string => Shift(yy_state_2) T_MULTILINE_INTERP => Shift(yy_state_4) @@ -22976,140 +32798,74 @@ fn yy_state_509(_lookahead : YYSymbol) -> YYDecision { T_BYTE => Shift(yy_state_13) T_FALSE => Shift(yy_state_14) T_TRUE => Shift(yy_state_15) - T_INTERP => Shift(yy_state_16) - NT_non_empty_list_multiline_string_ => Shift(yy_state_17) - NT_simple_constant => Shift(yy_state_18) - T_AMPER => Shift(yy_state_19) - NT_qual_ident_ty => Shift(yy_state_25) - NT_tuple_expr => Shift(yy_state_26) - T_LBRACKET => Shift(yy_state_27) - NT_constr => Shift(yy_state_35) - NT_qual_ident_simple_expr => Shift(yy_state_36) - NT_atomic_expr => Shift(yy_state_37) - NT_anony_fn => Shift(yy_state_38) - T_LBRACE => Shift(yy_state_39) - NT_statement => Shift(yy_state_121) - NT_non_empty_list_semi_rev_aux_statement_ => Shift(yy_state_122) - NT_type_name => Shift(yy_state_126) - T_EXCLAMATION => Shift(yy_state_162) - T_MINUS => Shift(yy_state_178) - T_PLUS => Shift(yy_state_180) - T_UIDENT => Shift(yy_state_182) - NT_prefix_expr => Shift(yy_state_187) - NT_range_expr => Shift(yy_state_198) - NT_postfix_expr => Shift(yy_state_416) - T_EXISTS => Shift(yy_state_417) - T_FORALL => Shift(yy_state_449) - NT_infix_expr => Shift(yy_state_455) - T_UNDERSCORE => Shift(yy_state_456) - NT_qual_ident => Shift(yy_state_458) - NT_simple_expr => Shift(yy_state_459) - T_LPAREN => Shift(yy_state_464) - NT_pipe_expr => Shift(yy_state_497) - NT_non_empty_list_semis_rev_statement_ => Shift(yy_state_510) - NT_list_semis_rev_statement_ => Shift(yy_state_511) - NT_arrow_fn_expr => Shift(yy_state_513) - NT_quantifier_expr => Shift(yy_state_514) - NT_simple_try_expr => Shift(yy_state_515) - NT_lexmatch_expr => Shift(yy_state_516) - NT_match_expr => Shift(yy_state_517) - NT_if_expr => Shift(yy_state_518) - NT_try_expr => Shift(yy_state_519) - NT_while_expr => Shift(yy_state_520) - NT_foreach_expr => Shift(yy_state_521) - NT_for_expr => Shift(yy_state_522) - T_LEXMATCH => Shift(yy_state_523) - NT_lexmatch_header => Shift(yy_state_529) - NT_match_header => Shift(yy_state_540) - T_MATCH => Shift(yy_state_550) - T_IF => Shift(yy_state_553) - T_TRY_EXCLAMATION => Shift(yy_state_559) - T_TRY_QUESTION => Shift(yy_state_561) - T_TRY => Shift(yy_state_563) - NT_loop_label_colon => Shift(yy_state_577) - T_POST_LABEL => Shift(yy_state_585) - NT_expr => Shift(yy_state_590) - NT_left_value => Shift(yy_state_591) - T_ELLIPSIS => Shift(yy_state_598) - T_RAISE => Shift(yy_state_599) - T_PACKAGE_NAME => Shift(yy_state_601) - T_LIDENT => Shift(yy_state_603) - NT_expr_statement_no_break_continue_return => Shift(yy_state_662) - T_RETURN => Shift(yy_state_663) - T_CONTINUE => Shift(yy_state_666) - T_BREAK => Shift(yy_state_675) - T_GUARD => Shift(yy_state_688) - NT_expr_statement => Shift(yy_state_692) - T_PROOF_LET => Shift(yy_state_693) - T_PROOF_ASSERT => Shift(yy_state_697) - T_DEFER => Shift(yy_state_699) - NT_guard_statement => Shift(yy_state_701) - T_FN => Shift(yy_state_702) - T_ASYNC => Shift(yy_state_707) - T_LETREC => Shift(yy_state_713) - T_LET => Shift(yy_state_744) - T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_902) - T_RBRACE => Reduce(0, NT_list_semis_rev_statement_, yy_action_817) - _ => Error - } -} - -fn yy_state_510(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_list_semis_rev_statement_, yy_action_568) -} - -fn yy_state_511(_lookahead : YYSymbol) -> YYDecision { - match _lookahead { - T_RBRACE => Shift(yy_state_512) + T_BYTES_INTERP => Shift(yy_state_16) + T_INTERP => Shift(yy_state_17) + NT_non_empty_list_multiline_string_ => Shift(yy_state_18) + NT_simple_constant => Shift(yy_state_19) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + NT_tuple_expr => Shift(yy_state_27) + T_LBRACKET_BAR => Shift(yy_state_28) + T_LBRACKET => Shift(yy_state_36) + NT_constr => Shift(yy_state_47) + NT_qual_ident_simple_expr => Shift(yy_state_48) + NT_atomic_expr => Shift(yy_state_50) + NT_anony_fn => Shift(yy_state_51) + T_LBRACE => Shift(yy_state_52) + T_FN => Shift(yy_state_61) + NT_type_name => Shift(yy_state_139) + T_ASYNC => Shift(yy_state_152) + NT_simple_expr => Shift(yy_state_165) + T_EXCLAMATION => Shift(yy_state_176) + T_MINUS => Shift(yy_state_191) + T_PLUS => Shift(yy_state_193) + T_UIDENT => Shift(yy_state_195) + T_PACKAGE_NAME => Shift(yy_state_196) + NT_prefix_expr => Shift(yy_state_201) + NT_range_expr => Shift(yy_state_212) + NT_postfix_expr => Shift(yy_state_223) + T_EXISTS => Shift(yy_state_224) + T_FORALL => Shift(yy_state_256) + NT_infix_expr => Shift(yy_state_272) + T_UNDERSCORE => Shift(yy_state_273) + T_LPAREN => Shift(yy_state_281) + NT_pipe_expr => Shift(yy_state_325) + NT_arrow_fn_expr => Shift(yy_state_344) + NT_quantifier_expr => Shift(yy_state_345) + NT_simple_try_expr => Shift(yy_state_346) + NT_lexscan_expr => Shift(yy_state_347) + NT_lexmatch_expr => Shift(yy_state_348) + NT_match_expr => Shift(yy_state_349) + NT_if_expr => Shift(yy_state_350) + NT_try_expr => Shift(yy_state_351) + NT_while_expr => Shift(yy_state_352) + NT_foreach_expr => Shift(yy_state_353) + NT_for_expr => Shift(yy_state_354) + T_LEXSCAN => Shift(yy_state_355) + NT_lexscan_header => Shift(yy_state_358) + T_LEXMATCH => Shift(yy_state_391) + NT_lexmatch_header => Shift(yy_state_399) + NT_match_header => Shift(yy_state_444) + T_MATCH => Shift(yy_state_605) + T_IF => Shift(yy_state_608) + T_TRY_EXCLAMATION => Shift(yy_state_614) + T_TRY_QUESTION => Shift(yy_state_616) + T_TRY => Shift(yy_state_618) + NT_loop_label_colon => Shift(yy_state_632) + T_POST_LABEL => Shift(yy_state_639) + T_EXTEND => Shift(yy_state_641) + T_LIDENT => Shift(yy_state_648) + NT_expr => Shift(yy_state_855) + T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_1071) _ => Error } } -fn yy_state_512(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(5, NT_arrow_fn_with_explicit_braces, yy_action_567) -} - -fn yy_state_513(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_expr, yy_action_566) -} - -fn yy_state_514(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_expr, yy_action_565) -} - -fn yy_state_515(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_expr, yy_action_564) -} - -fn yy_state_516(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_expr, yy_action_563) -} - -fn yy_state_517(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_expr, yy_action_562) -} - -fn yy_state_518(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_expr, yy_action_561) -} - -fn yy_state_519(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_expr, yy_action_560) -} - -fn yy_state_520(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_expr, yy_action_559) -} - -fn yy_state_521(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_expr, yy_action_558) -} - -fn yy_state_522(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_expr, yy_action_557) +fn yy_state_855(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(7, NT_statement, yy_action_566) } -fn yy_state_523(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_856(_lookahead : YYSymbol) -> YYDecision { match _lookahead { NT_multiline_string => Shift(yy_state_2) T_MULTILINE_INTERP => Shift(yy_state_4) @@ -23124,153 +32880,103 @@ fn yy_state_523(_lookahead : YYSymbol) -> YYDecision { T_BYTE => Shift(yy_state_13) T_FALSE => Shift(yy_state_14) T_TRUE => Shift(yy_state_15) - T_INTERP => Shift(yy_state_16) - NT_non_empty_list_multiline_string_ => Shift(yy_state_17) - NT_simple_constant => Shift(yy_state_18) - T_AMPER => Shift(yy_state_19) - NT_qual_ident_ty => Shift(yy_state_25) - NT_tuple_expr => Shift(yy_state_26) - T_LBRACKET => Shift(yy_state_27) - NT_constr => Shift(yy_state_35) - NT_qual_ident_simple_expr => Shift(yy_state_36) - NT_atomic_expr => Shift(yy_state_37) - NT_anony_fn => Shift(yy_state_38) - T_LBRACE => Shift(yy_state_39) - T_FN => Shift(yy_state_48) - NT_type_name => Shift(yy_state_126) - T_ASYNC => Shift(yy_state_138) - NT_simple_expr => Shift(yy_state_151) - T_EXCLAMATION => Shift(yy_state_162) - T_UNDERSCORE => Shift(yy_state_163) - T_LPAREN => Shift(yy_state_164) - T_MINUS => Shift(yy_state_178) - T_PLUS => Shift(yy_state_180) - T_UIDENT => Shift(yy_state_182) - T_PACKAGE_NAME => Shift(yy_state_183) - T_LIDENT => Shift(yy_state_186) - NT_prefix_expr => Shift(yy_state_187) - NT_range_expr => Shift(yy_state_198) - NT_postfix_expr => Shift(yy_state_416) - NT_infix_expr => Shift(yy_state_524) - _ => Error - } -} - -fn yy_state_524(_lookahead : YYSymbol) -> YYDecision { - match _lookahead { - T_BARBAR => Shift(yy_state_423) - T_AMPERAMPER => Shift(yy_state_425) - T_BAR => Shift(yy_state_427) - T_CARET => Shift(yy_state_429) - T_AMPER => Shift(yy_state_431) - T_MINUS => Shift(yy_state_433) - T_PLUS => Shift(yy_state_435) - T_INFIX1 => Shift(yy_state_437) - T_INFIX2 => Shift(yy_state_439) - T_INFIX3 => Shift(yy_state_441) - T_INFIX4 => Shift(yy_state_443) - T_IMPLIES => Shift(yy_state_445) - T_WITH => Shift(yy_state_525) - T_LBRACE => Shift(yy_state_528) - _ => Error - } -} - -fn yy_state_525(_lookahead : YYSymbol) -> YYDecision { - match _lookahead { - T_LIDENT => Shift(yy_state_526) - _ => Error - } -} - -fn yy_state_526(_lookahead : YYSymbol) -> YYDecision { - match _lookahead { - T_LBRACE => Shift(yy_state_527) + T_BYTES_INTERP => Shift(yy_state_16) + T_INTERP => Shift(yy_state_17) + NT_non_empty_list_multiline_string_ => Shift(yy_state_18) + NT_simple_constant => Shift(yy_state_19) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + NT_tuple_expr => Shift(yy_state_27) + T_LBRACKET_BAR => Shift(yy_state_28) + T_LBRACKET => Shift(yy_state_36) + NT_constr => Shift(yy_state_47) + NT_qual_ident_simple_expr => Shift(yy_state_48) + NT_atomic_expr => Shift(yy_state_50) + NT_anony_fn => Shift(yy_state_51) + T_LBRACE => Shift(yy_state_52) + T_FN => Shift(yy_state_61) + NT_type_name => Shift(yy_state_139) + T_ASYNC => Shift(yy_state_152) + NT_simple_expr => Shift(yy_state_165) + T_EXCLAMATION => Shift(yy_state_176) + T_MINUS => Shift(yy_state_191) + T_PLUS => Shift(yy_state_193) + T_UIDENT => Shift(yy_state_195) + T_PACKAGE_NAME => Shift(yy_state_196) + NT_prefix_expr => Shift(yy_state_201) + NT_range_expr => Shift(yy_state_212) + NT_postfix_expr => Shift(yy_state_223) + T_EXISTS => Shift(yy_state_224) + T_FORALL => Shift(yy_state_256) + NT_infix_expr => Shift(yy_state_272) + T_UNDERSCORE => Shift(yy_state_273) + T_LPAREN => Shift(yy_state_281) + NT_pipe_expr => Shift(yy_state_325) + NT_arrow_fn_expr => Shift(yy_state_344) + NT_quantifier_expr => Shift(yy_state_345) + NT_simple_try_expr => Shift(yy_state_346) + NT_lexscan_expr => Shift(yy_state_347) + NT_lexmatch_expr => Shift(yy_state_348) + NT_match_expr => Shift(yy_state_349) + NT_if_expr => Shift(yy_state_350) + NT_try_expr => Shift(yy_state_351) + NT_while_expr => Shift(yy_state_352) + NT_foreach_expr => Shift(yy_state_353) + NT_for_expr => Shift(yy_state_354) + T_LEXSCAN => Shift(yy_state_355) + NT_lexscan_header => Shift(yy_state_358) + T_LEXMATCH => Shift(yy_state_391) + NT_lexmatch_header => Shift(yy_state_399) + NT_match_header => Shift(yy_state_444) + T_MATCH => Shift(yy_state_605) + T_IF => Shift(yy_state_608) + T_TRY_EXCLAMATION => Shift(yy_state_614) + T_TRY_QUESTION => Shift(yy_state_616) + T_TRY => Shift(yy_state_618) + NT_loop_label_colon => Shift(yy_state_632) + T_POST_LABEL => Shift(yy_state_639) + T_EXTEND => Shift(yy_state_641) + T_LIDENT => Shift(yy_state_648) + NT_expr => Shift(yy_state_857) + T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_1071) _ => Error } } -fn yy_state_527(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(5, NT_lexmatch_header, yy_action_556) -} - -fn yy_state_528(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_lexmatch_header, yy_action_555) -} - -fn yy_state_529(_lookahead : YYSymbol) -> YYDecision { - match _lookahead { - T_PACKAGE_NAME => Shift(yy_state_243) - T_UIDENT => Shift(yy_state_245) - T_INTERP => Shift(yy_state_246) - T_STRING => Shift(yy_state_247) - T_REGEX_INTERP => Shift(yy_state_248) - T_REGEX_LITERAL => Shift(yy_state_249) - NT_lex_simple_atom_pattern => Shift(yy_state_250) - T_LIDENT => Shift(yy_state_251) - T_UNDERSCORE => Shift(yy_state_252) - T_LPAREN => Shift(yy_state_253) - NT_lex_case => Shift(yy_state_530) - T_ELLIPSIS => Shift(yy_state_534) - NT_lex_pattern => Shift(yy_state_535) - NT_non_empty_list_semis_lex_case_ => Shift(yy_state_685) - NT_list_semis_lex_case_ => Shift(yy_state_686) - T_RBRACE => Reduce(0, NT_list_semis_lex_case_, yy_action_554) - _ => Error - } +fn yy_state_857(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(5, NT_statement, yy_action_565) } -fn yy_state_530(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_858(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_option_SEMI_ => Shift(yy_state_531) - T_SEMI => Shift(yy_state_532) - T_RBRACE => Reduce(0, NT_option_SEMI_, yy_action_815) + T_COLON => Shift(yy_state_859) + T_EQUAL => Shift(yy_state_863) _ => Error } } -fn yy_state_531(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(2, NT_non_empty_list_semis_lex_case_, yy_action_553) -} - -fn yy_state_532(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_859(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_PACKAGE_NAME => Shift(yy_state_243) - T_UIDENT => Shift(yy_state_245) - T_INTERP => Shift(yy_state_246) - T_STRING => Shift(yy_state_247) - T_REGEX_INTERP => Shift(yy_state_248) - T_REGEX_LITERAL => Shift(yy_state_249) - NT_lex_simple_atom_pattern => Shift(yy_state_250) - T_LIDENT => Shift(yy_state_251) - T_UNDERSCORE => Shift(yy_state_252) - T_LPAREN => Shift(yy_state_253) - NT_lex_case => Shift(yy_state_530) - NT_non_empty_list_semis_lex_case_ => Shift(yy_state_533) - T_ELLIPSIS => Shift(yy_state_534) - NT_lex_pattern => Shift(yy_state_535) - T_RBRACE => Reduce(1, NT_option_SEMI_, yy_action_813) + T_ASYNC => Shift(yy_state_65) + T_UNDERSCORE => Shift(yy_state_70) + T_AMPER => Shift(yy_state_71) + T_PACKAGE_NAME => Shift(yy_state_73) + T_UIDENT => Shift(yy_state_80) + T_LPAREN => Shift(yy_state_84) + NT_simple_type => Shift(yy_state_110) + NT_type_ => Shift(yy_state_860) _ => Error } } -fn yy_state_533(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_non_empty_list_semis_lex_case_, yy_action_552) -} - -fn yy_state_534(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_lex_case, yy_action_551) -} - -fn yy_state_535(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_860(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_IF => Shift(yy_state_536) - T_FAT_ARROW => Shift(yy_state_683) + T_EQUAL => Shift(yy_state_861) _ => Error } } -fn yy_state_536(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_861(_lookahead : YYSymbol) -> YYDecision { match _lookahead { NT_multiline_string => Shift(yy_state_2) T_MULTILINE_INTERP => Shift(yy_state_4) @@ -23285,58 +32991,74 @@ fn yy_state_536(_lookahead : YYSymbol) -> YYDecision { T_BYTE => Shift(yy_state_13) T_FALSE => Shift(yy_state_14) T_TRUE => Shift(yy_state_15) - T_INTERP => Shift(yy_state_16) - NT_non_empty_list_multiline_string_ => Shift(yy_state_17) - NT_simple_constant => Shift(yy_state_18) - T_AMPER => Shift(yy_state_19) - NT_qual_ident_ty => Shift(yy_state_25) - NT_tuple_expr => Shift(yy_state_26) - T_LBRACKET => Shift(yy_state_27) - NT_constr => Shift(yy_state_35) - NT_qual_ident_simple_expr => Shift(yy_state_36) - NT_atomic_expr => Shift(yy_state_37) - NT_anony_fn => Shift(yy_state_38) - T_LBRACE => Shift(yy_state_39) - T_FN => Shift(yy_state_48) - NT_type_name => Shift(yy_state_126) - T_ASYNC => Shift(yy_state_138) - NT_simple_expr => Shift(yy_state_151) - T_EXCLAMATION => Shift(yy_state_162) - T_UNDERSCORE => Shift(yy_state_163) - T_LPAREN => Shift(yy_state_164) - T_MINUS => Shift(yy_state_178) - T_PLUS => Shift(yy_state_180) - T_UIDENT => Shift(yy_state_182) - T_PACKAGE_NAME => Shift(yy_state_183) - T_LIDENT => Shift(yy_state_186) - NT_prefix_expr => Shift(yy_state_187) - NT_range_expr => Shift(yy_state_198) - NT_postfix_expr => Shift(yy_state_416) - NT_infix_expr => Shift(yy_state_537) + T_BYTES_INTERP => Shift(yy_state_16) + T_INTERP => Shift(yy_state_17) + NT_non_empty_list_multiline_string_ => Shift(yy_state_18) + NT_simple_constant => Shift(yy_state_19) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + NT_tuple_expr => Shift(yy_state_27) + T_LBRACKET_BAR => Shift(yy_state_28) + T_LBRACKET => Shift(yy_state_36) + NT_constr => Shift(yy_state_47) + NT_qual_ident_simple_expr => Shift(yy_state_48) + NT_atomic_expr => Shift(yy_state_50) + NT_anony_fn => Shift(yy_state_51) + T_LBRACE => Shift(yy_state_52) + T_FN => Shift(yy_state_61) + NT_type_name => Shift(yy_state_139) + T_ASYNC => Shift(yy_state_152) + NT_simple_expr => Shift(yy_state_165) + T_EXCLAMATION => Shift(yy_state_176) + T_MINUS => Shift(yy_state_191) + T_PLUS => Shift(yy_state_193) + T_UIDENT => Shift(yy_state_195) + T_PACKAGE_NAME => Shift(yy_state_196) + NT_prefix_expr => Shift(yy_state_201) + NT_range_expr => Shift(yy_state_212) + NT_postfix_expr => Shift(yy_state_223) + T_EXISTS => Shift(yy_state_224) + T_FORALL => Shift(yy_state_256) + NT_infix_expr => Shift(yy_state_272) + T_UNDERSCORE => Shift(yy_state_273) + T_LPAREN => Shift(yy_state_281) + NT_pipe_expr => Shift(yy_state_325) + NT_arrow_fn_expr => Shift(yy_state_344) + NT_quantifier_expr => Shift(yy_state_345) + NT_simple_try_expr => Shift(yy_state_346) + NT_lexscan_expr => Shift(yy_state_347) + NT_lexmatch_expr => Shift(yy_state_348) + NT_match_expr => Shift(yy_state_349) + NT_if_expr => Shift(yy_state_350) + NT_try_expr => Shift(yy_state_351) + NT_while_expr => Shift(yy_state_352) + NT_foreach_expr => Shift(yy_state_353) + NT_for_expr => Shift(yy_state_354) + T_LEXSCAN => Shift(yy_state_355) + NT_lexscan_header => Shift(yy_state_358) + T_LEXMATCH => Shift(yy_state_391) + NT_lexmatch_header => Shift(yy_state_399) + NT_match_header => Shift(yy_state_444) + T_MATCH => Shift(yy_state_605) + T_IF => Shift(yy_state_608) + T_TRY_EXCLAMATION => Shift(yy_state_614) + T_TRY_QUESTION => Shift(yy_state_616) + T_TRY => Shift(yy_state_618) + NT_loop_label_colon => Shift(yy_state_632) + T_POST_LABEL => Shift(yy_state_639) + T_EXTEND => Shift(yy_state_641) + T_LIDENT => Shift(yy_state_648) + NT_expr => Shift(yy_state_862) + T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_1071) _ => Error } } -fn yy_state_537(_lookahead : YYSymbol) -> YYDecision { - match _lookahead { - T_BARBAR => Shift(yy_state_423) - T_AMPERAMPER => Shift(yy_state_425) - T_BAR => Shift(yy_state_427) - T_CARET => Shift(yy_state_429) - T_AMPER => Shift(yy_state_431) - T_MINUS => Shift(yy_state_433) - T_PLUS => Shift(yy_state_435) - T_INFIX1 => Shift(yy_state_437) - T_INFIX2 => Shift(yy_state_439) - T_INFIX3 => Shift(yy_state_441) - T_INFIX4 => Shift(yy_state_443) - T_IMPLIES => Shift(yy_state_445) - T_FAT_ARROW => Shift(yy_state_538) - _ => Error - } +fn yy_state_862(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(7, NT_statement, yy_action_564) } -fn yy_state_538(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_863(_lookahead : YYSymbol) -> YYDecision { match _lookahead { NT_multiline_string => Shift(yy_state_2) T_MULTILINE_INTERP => Shift(yy_state_4) @@ -23351,174 +33073,104 @@ fn yy_state_538(_lookahead : YYSymbol) -> YYDecision { T_BYTE => Shift(yy_state_13) T_FALSE => Shift(yy_state_14) T_TRUE => Shift(yy_state_15) - T_INTERP => Shift(yy_state_16) - NT_non_empty_list_multiline_string_ => Shift(yy_state_17) - NT_simple_constant => Shift(yy_state_18) - T_AMPER => Shift(yy_state_19) - NT_qual_ident_ty => Shift(yy_state_25) - NT_tuple_expr => Shift(yy_state_26) - T_LBRACKET => Shift(yy_state_27) - NT_constr => Shift(yy_state_35) - NT_qual_ident_simple_expr => Shift(yy_state_36) - NT_atomic_expr => Shift(yy_state_37) - NT_anony_fn => Shift(yy_state_38) - T_LBRACE => Shift(yy_state_39) - T_FN => Shift(yy_state_48) - NT_type_name => Shift(yy_state_126) - T_ASYNC => Shift(yy_state_138) - T_EXCLAMATION => Shift(yy_state_162) - T_MINUS => Shift(yy_state_178) - T_PLUS => Shift(yy_state_180) - T_UIDENT => Shift(yy_state_182) - NT_prefix_expr => Shift(yy_state_187) - NT_range_expr => Shift(yy_state_198) - NT_postfix_expr => Shift(yy_state_416) - T_EXISTS => Shift(yy_state_417) - T_FORALL => Shift(yy_state_449) - NT_infix_expr => Shift(yy_state_455) - T_UNDERSCORE => Shift(yy_state_456) - NT_qual_ident => Shift(yy_state_458) - NT_simple_expr => Shift(yy_state_459) - T_LPAREN => Shift(yy_state_464) - NT_pipe_expr => Shift(yy_state_497) - NT_arrow_fn_expr => Shift(yy_state_513) - NT_quantifier_expr => Shift(yy_state_514) - NT_simple_try_expr => Shift(yy_state_515) - NT_lexmatch_expr => Shift(yy_state_516) - NT_match_expr => Shift(yy_state_517) - NT_if_expr => Shift(yy_state_518) - NT_try_expr => Shift(yy_state_519) - NT_while_expr => Shift(yy_state_520) - NT_foreach_expr => Shift(yy_state_521) - NT_for_expr => Shift(yy_state_522) - T_LEXMATCH => Shift(yy_state_523) - NT_lexmatch_header => Shift(yy_state_529) - NT_expr_statement => Shift(yy_state_539) - NT_match_header => Shift(yy_state_540) - T_MATCH => Shift(yy_state_550) - T_IF => Shift(yy_state_553) - T_TRY_EXCLAMATION => Shift(yy_state_559) - T_TRY_QUESTION => Shift(yy_state_561) - T_TRY => Shift(yy_state_563) - NT_loop_label_colon => Shift(yy_state_577) - T_POST_LABEL => Shift(yy_state_585) - NT_expr => Shift(yy_state_590) - NT_left_value => Shift(yy_state_591) - T_ELLIPSIS => Shift(yy_state_598) - T_RAISE => Shift(yy_state_599) - T_PACKAGE_NAME => Shift(yy_state_601) - T_LIDENT => Shift(yy_state_603) - NT_expr_statement_no_break_continue_return => Shift(yy_state_662) - T_RETURN => Shift(yy_state_663) - T_CONTINUE => Shift(yy_state_666) - T_BREAK => Shift(yy_state_675) - T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_902) + T_BYTES_INTERP => Shift(yy_state_16) + T_INTERP => Shift(yy_state_17) + NT_non_empty_list_multiline_string_ => Shift(yy_state_18) + NT_simple_constant => Shift(yy_state_19) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + NT_tuple_expr => Shift(yy_state_27) + T_LBRACKET_BAR => Shift(yy_state_28) + T_LBRACKET => Shift(yy_state_36) + NT_constr => Shift(yy_state_47) + NT_qual_ident_simple_expr => Shift(yy_state_48) + NT_atomic_expr => Shift(yy_state_50) + NT_anony_fn => Shift(yy_state_51) + T_LBRACE => Shift(yy_state_52) + T_FN => Shift(yy_state_61) + NT_type_name => Shift(yy_state_139) + T_ASYNC => Shift(yy_state_152) + NT_simple_expr => Shift(yy_state_165) + T_EXCLAMATION => Shift(yy_state_176) + T_MINUS => Shift(yy_state_191) + T_PLUS => Shift(yy_state_193) + T_UIDENT => Shift(yy_state_195) + T_PACKAGE_NAME => Shift(yy_state_196) + NT_prefix_expr => Shift(yy_state_201) + NT_range_expr => Shift(yy_state_212) + NT_postfix_expr => Shift(yy_state_223) + T_EXISTS => Shift(yy_state_224) + T_FORALL => Shift(yy_state_256) + NT_infix_expr => Shift(yy_state_272) + T_UNDERSCORE => Shift(yy_state_273) + T_LPAREN => Shift(yy_state_281) + NT_pipe_expr => Shift(yy_state_325) + NT_arrow_fn_expr => Shift(yy_state_344) + NT_quantifier_expr => Shift(yy_state_345) + NT_simple_try_expr => Shift(yy_state_346) + NT_lexscan_expr => Shift(yy_state_347) + NT_lexmatch_expr => Shift(yy_state_348) + NT_match_expr => Shift(yy_state_349) + NT_if_expr => Shift(yy_state_350) + NT_try_expr => Shift(yy_state_351) + NT_while_expr => Shift(yy_state_352) + NT_foreach_expr => Shift(yy_state_353) + NT_for_expr => Shift(yy_state_354) + T_LEXSCAN => Shift(yy_state_355) + NT_lexscan_header => Shift(yy_state_358) + T_LEXMATCH => Shift(yy_state_391) + NT_lexmatch_header => Shift(yy_state_399) + NT_match_header => Shift(yy_state_444) + T_MATCH => Shift(yy_state_605) + T_IF => Shift(yy_state_608) + T_TRY_EXCLAMATION => Shift(yy_state_614) + T_TRY_QUESTION => Shift(yy_state_616) + T_TRY => Shift(yy_state_618) + NT_loop_label_colon => Shift(yy_state_632) + T_POST_LABEL => Shift(yy_state_639) + T_EXTEND => Shift(yy_state_641) + T_LIDENT => Shift(yy_state_648) + NT_expr => Shift(yy_state_864) + T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_1071) _ => Error } } -fn yy_state_539(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(5, NT_lex_case, yy_action_550) -} - -fn yy_state_540(_lookahead : YYSymbol) -> YYDecision { - match _lookahead { - T_AMPER => Shift(yy_state_19) - NT_qual_ident_ty => Shift(yy_state_25) - T_UIDENT => Shift(yy_state_182) - T_LBRACE => Shift(yy_state_275) - T_LBRACKET => Shift(yy_state_279) - T_LPAREN => Shift(yy_state_293) - NT_constr => Shift(yy_state_294) - T_LIDENT => Shift(yy_state_307) - T_UNDERSCORE => Shift(yy_state_312) - T_BYTES => Shift(yy_state_313) - T_STRING => Shift(yy_state_314) - T_MINUS => Shift(yy_state_315) - T_FLOAT => Shift(yy_state_319) - T_DOUBLE => Shift(yy_state_320) - T_BYTE => Shift(yy_state_321) - T_INT => Shift(yy_state_322) - T_CHAR => Shift(yy_state_323) - T_FALSE => Shift(yy_state_324) - T_TRUE => Shift(yy_state_325) - NT_simple_pattern => Shift(yy_state_326) - NT_type_name => Shift(yy_state_329) - T_PACKAGE_NAME => Shift(yy_state_334) - NT_range_pattern => Shift(yy_state_337) - NT_or_pattern => Shift(yy_state_340) - NT_single_pattern_case => Shift(yy_state_541) - T_ELLIPSIS => Shift(yy_state_544) - NT_pattern => Shift(yy_state_545) - T_RBRACE => Shift(yy_state_680) - NT_non_empty_list_semis_single_pattern_case_ => Shift(yy_state_681) - _ => Error - } +fn yy_state_864(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(5, NT_statement, yy_action_563) } -fn yy_state_541(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_865(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_SEMI => Shift(yy_state_542) - NT_option_SEMI_ => Shift(yy_state_679) - T_RBRACE => Reduce(0, NT_option_SEMI_, yy_action_815) + T_AS => Shift(yy_state_521) + T_COLON => Shift(yy_state_866) + T_EQUAL => Shift(yy_state_870) _ => Error } } -fn yy_state_542(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_866(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_AMPER => Shift(yy_state_19) - NT_qual_ident_ty => Shift(yy_state_25) - T_UIDENT => Shift(yy_state_182) - T_LBRACE => Shift(yy_state_275) - T_LBRACKET => Shift(yy_state_279) - T_LPAREN => Shift(yy_state_293) - NT_constr => Shift(yy_state_294) - T_LIDENT => Shift(yy_state_307) - T_UNDERSCORE => Shift(yy_state_312) - T_BYTES => Shift(yy_state_313) - T_STRING => Shift(yy_state_314) - T_MINUS => Shift(yy_state_315) - T_FLOAT => Shift(yy_state_319) - T_DOUBLE => Shift(yy_state_320) - T_BYTE => Shift(yy_state_321) - T_INT => Shift(yy_state_322) - T_CHAR => Shift(yy_state_323) - T_FALSE => Shift(yy_state_324) - T_TRUE => Shift(yy_state_325) - NT_simple_pattern => Shift(yy_state_326) - NT_type_name => Shift(yy_state_329) - T_PACKAGE_NAME => Shift(yy_state_334) - NT_range_pattern => Shift(yy_state_337) - NT_or_pattern => Shift(yy_state_340) - NT_single_pattern_case => Shift(yy_state_541) - NT_non_empty_list_semis_single_pattern_case_ => Shift(yy_state_543) - T_ELLIPSIS => Shift(yy_state_544) - NT_pattern => Shift(yy_state_545) - T_RBRACE => Reduce(1, NT_option_SEMI_, yy_action_813) + T_ASYNC => Shift(yy_state_65) + T_UNDERSCORE => Shift(yy_state_70) + T_AMPER => Shift(yy_state_71) + T_PACKAGE_NAME => Shift(yy_state_73) + T_UIDENT => Shift(yy_state_80) + T_LPAREN => Shift(yy_state_84) + NT_simple_type => Shift(yy_state_110) + NT_type_ => Shift(yy_state_867) _ => Error } } -fn yy_state_543(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_non_empty_list_semis_single_pattern_case_, yy_action_549) -} - -fn yy_state_544(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_single_pattern_case, yy_action_548) -} - -fn yy_state_545(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_867(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_AS => Shift(yy_state_342) - T_IF => Shift(yy_state_546) - NT_option_preceded_IF_infix_expr__ => Shift(yy_state_548) - T_FAT_ARROW => Reduce(0, NT_option_preceded_IF_infix_expr__, yy_action_547) + T_EQUAL => Shift(yy_state_868) _ => Error } } -fn yy_state_546(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_868(_lookahead : YYSymbol) -> YYDecision { match _lookahead { NT_multiline_string => Shift(yy_state_2) T_MULTILINE_INTERP => Shift(yy_state_4) @@ -23533,65 +33185,74 @@ fn yy_state_546(_lookahead : YYSymbol) -> YYDecision { T_BYTE => Shift(yy_state_13) T_FALSE => Shift(yy_state_14) T_TRUE => Shift(yy_state_15) - T_INTERP => Shift(yy_state_16) - NT_non_empty_list_multiline_string_ => Shift(yy_state_17) - NT_simple_constant => Shift(yy_state_18) - T_AMPER => Shift(yy_state_19) - NT_qual_ident_ty => Shift(yy_state_25) - NT_tuple_expr => Shift(yy_state_26) - T_LBRACKET => Shift(yy_state_27) - NT_constr => Shift(yy_state_35) - NT_qual_ident_simple_expr => Shift(yy_state_36) - NT_atomic_expr => Shift(yy_state_37) - NT_anony_fn => Shift(yy_state_38) - T_LBRACE => Shift(yy_state_39) - T_FN => Shift(yy_state_48) - NT_type_name => Shift(yy_state_126) - T_ASYNC => Shift(yy_state_138) - NT_simple_expr => Shift(yy_state_151) - T_EXCLAMATION => Shift(yy_state_162) - T_UNDERSCORE => Shift(yy_state_163) - T_LPAREN => Shift(yy_state_164) - T_MINUS => Shift(yy_state_178) - T_PLUS => Shift(yy_state_180) - T_UIDENT => Shift(yy_state_182) - T_PACKAGE_NAME => Shift(yy_state_183) - T_LIDENT => Shift(yy_state_186) - NT_prefix_expr => Shift(yy_state_187) - NT_range_expr => Shift(yy_state_198) - NT_postfix_expr => Shift(yy_state_416) - NT_infix_expr => Shift(yy_state_547) - _ => Error - } -} - -fn yy_state_547(_lookahead : YYSymbol) -> YYDecision { - match _lookahead { - T_BARBAR => Shift(yy_state_423) - T_AMPERAMPER => Shift(yy_state_425) - T_BAR => Shift(yy_state_427) - T_CARET => Shift(yy_state_429) - T_AMPER => Shift(yy_state_431) - T_MINUS => Shift(yy_state_433) - T_PLUS => Shift(yy_state_435) - T_INFIX1 => Shift(yy_state_437) - T_INFIX2 => Shift(yy_state_439) - T_INFIX3 => Shift(yy_state_441) - T_INFIX4 => Shift(yy_state_443) - T_IMPLIES => Shift(yy_state_445) - T_FAT_ARROW => Reduce(2, NT_option_preceded_IF_infix_expr__, yy_action_545) + T_BYTES_INTERP => Shift(yy_state_16) + T_INTERP => Shift(yy_state_17) + NT_non_empty_list_multiline_string_ => Shift(yy_state_18) + NT_simple_constant => Shift(yy_state_19) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + NT_tuple_expr => Shift(yy_state_27) + T_LBRACKET_BAR => Shift(yy_state_28) + T_LBRACKET => Shift(yy_state_36) + NT_constr => Shift(yy_state_47) + NT_qual_ident_simple_expr => Shift(yy_state_48) + NT_atomic_expr => Shift(yy_state_50) + NT_anony_fn => Shift(yy_state_51) + T_LBRACE => Shift(yy_state_52) + T_FN => Shift(yy_state_61) + NT_type_name => Shift(yy_state_139) + T_ASYNC => Shift(yy_state_152) + NT_simple_expr => Shift(yy_state_165) + T_EXCLAMATION => Shift(yy_state_176) + T_MINUS => Shift(yy_state_191) + T_PLUS => Shift(yy_state_193) + T_UIDENT => Shift(yy_state_195) + T_PACKAGE_NAME => Shift(yy_state_196) + NT_prefix_expr => Shift(yy_state_201) + NT_range_expr => Shift(yy_state_212) + NT_postfix_expr => Shift(yy_state_223) + T_EXISTS => Shift(yy_state_224) + T_FORALL => Shift(yy_state_256) + NT_infix_expr => Shift(yy_state_272) + T_UNDERSCORE => Shift(yy_state_273) + T_LPAREN => Shift(yy_state_281) + NT_pipe_expr => Shift(yy_state_325) + NT_arrow_fn_expr => Shift(yy_state_344) + NT_quantifier_expr => Shift(yy_state_345) + NT_simple_try_expr => Shift(yy_state_346) + NT_lexscan_expr => Shift(yy_state_347) + NT_lexmatch_expr => Shift(yy_state_348) + NT_match_expr => Shift(yy_state_349) + NT_if_expr => Shift(yy_state_350) + NT_try_expr => Shift(yy_state_351) + NT_while_expr => Shift(yy_state_352) + NT_foreach_expr => Shift(yy_state_353) + NT_for_expr => Shift(yy_state_354) + T_LEXSCAN => Shift(yy_state_355) + NT_lexscan_header => Shift(yy_state_358) + T_LEXMATCH => Shift(yy_state_391) + NT_lexmatch_header => Shift(yy_state_399) + NT_match_header => Shift(yy_state_444) + T_MATCH => Shift(yy_state_605) + T_IF => Shift(yy_state_608) + T_TRY_EXCLAMATION => Shift(yy_state_614) + T_TRY_QUESTION => Shift(yy_state_616) + T_TRY => Shift(yy_state_618) + NT_loop_label_colon => Shift(yy_state_632) + T_POST_LABEL => Shift(yy_state_639) + T_EXTEND => Shift(yy_state_641) + T_LIDENT => Shift(yy_state_648) + NT_expr => Shift(yy_state_869) + T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_1071) _ => Error } } -fn yy_state_548(_lookahead : YYSymbol) -> YYDecision { - match _lookahead { - T_FAT_ARROW => Shift(yy_state_549) - _ => Error - } +fn yy_state_869(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(6, NT_statement, yy_action_562) } -fn yy_state_549(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_870(_lookahead : YYSymbol) -> YYDecision { match _lookahead { NT_multiline_string => Shift(yy_state_2) T_MULTILINE_INTERP => Shift(yy_state_4) @@ -23606,73 +33267,74 @@ fn yy_state_549(_lookahead : YYSymbol) -> YYDecision { T_BYTE => Shift(yy_state_13) T_FALSE => Shift(yy_state_14) T_TRUE => Shift(yy_state_15) - T_INTERP => Shift(yy_state_16) - NT_non_empty_list_multiline_string_ => Shift(yy_state_17) - NT_simple_constant => Shift(yy_state_18) - T_AMPER => Shift(yy_state_19) - NT_qual_ident_ty => Shift(yy_state_25) - NT_tuple_expr => Shift(yy_state_26) - T_LBRACKET => Shift(yy_state_27) - NT_constr => Shift(yy_state_35) - NT_qual_ident_simple_expr => Shift(yy_state_36) - NT_atomic_expr => Shift(yy_state_37) - NT_anony_fn => Shift(yy_state_38) - T_LBRACE => Shift(yy_state_39) - T_FN => Shift(yy_state_48) - NT_type_name => Shift(yy_state_126) - T_ASYNC => Shift(yy_state_138) - T_EXCLAMATION => Shift(yy_state_162) - T_MINUS => Shift(yy_state_178) - T_PLUS => Shift(yy_state_180) - T_UIDENT => Shift(yy_state_182) - NT_prefix_expr => Shift(yy_state_187) - NT_range_expr => Shift(yy_state_198) - NT_postfix_expr => Shift(yy_state_416) - T_EXISTS => Shift(yy_state_417) - T_FORALL => Shift(yy_state_449) - NT_infix_expr => Shift(yy_state_455) - T_UNDERSCORE => Shift(yy_state_456) - NT_qual_ident => Shift(yy_state_458) - NT_simple_expr => Shift(yy_state_459) - T_LPAREN => Shift(yy_state_464) - NT_pipe_expr => Shift(yy_state_497) - NT_arrow_fn_expr => Shift(yy_state_513) - NT_quantifier_expr => Shift(yy_state_514) - NT_simple_try_expr => Shift(yy_state_515) - NT_lexmatch_expr => Shift(yy_state_516) - NT_match_expr => Shift(yy_state_517) - NT_if_expr => Shift(yy_state_518) - NT_try_expr => Shift(yy_state_519) - NT_while_expr => Shift(yy_state_520) - NT_foreach_expr => Shift(yy_state_521) - NT_for_expr => Shift(yy_state_522) - T_LEXMATCH => Shift(yy_state_523) - NT_lexmatch_header => Shift(yy_state_529) - NT_match_header => Shift(yy_state_540) - T_MATCH => Shift(yy_state_550) - T_IF => Shift(yy_state_553) - T_TRY_EXCLAMATION => Shift(yy_state_559) - T_TRY_QUESTION => Shift(yy_state_561) - T_TRY => Shift(yy_state_563) - NT_expr_statement => Shift(yy_state_576) - NT_loop_label_colon => Shift(yy_state_577) - T_POST_LABEL => Shift(yy_state_585) - NT_expr => Shift(yy_state_590) - NT_left_value => Shift(yy_state_591) - T_ELLIPSIS => Shift(yy_state_598) - T_RAISE => Shift(yy_state_599) - T_PACKAGE_NAME => Shift(yy_state_601) - T_LIDENT => Shift(yy_state_603) - NT_expr_statement_no_break_continue_return => Shift(yy_state_662) - T_RETURN => Shift(yy_state_663) - T_CONTINUE => Shift(yy_state_666) - T_BREAK => Shift(yy_state_675) - T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_902) + T_BYTES_INTERP => Shift(yy_state_16) + T_INTERP => Shift(yy_state_17) + NT_non_empty_list_multiline_string_ => Shift(yy_state_18) + NT_simple_constant => Shift(yy_state_19) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + NT_tuple_expr => Shift(yy_state_27) + T_LBRACKET_BAR => Shift(yy_state_28) + T_LBRACKET => Shift(yy_state_36) + NT_constr => Shift(yy_state_47) + NT_qual_ident_simple_expr => Shift(yy_state_48) + NT_atomic_expr => Shift(yy_state_50) + NT_anony_fn => Shift(yy_state_51) + T_LBRACE => Shift(yy_state_52) + T_FN => Shift(yy_state_61) + NT_type_name => Shift(yy_state_139) + T_ASYNC => Shift(yy_state_152) + NT_simple_expr => Shift(yy_state_165) + T_EXCLAMATION => Shift(yy_state_176) + T_MINUS => Shift(yy_state_191) + T_PLUS => Shift(yy_state_193) + T_UIDENT => Shift(yy_state_195) + T_PACKAGE_NAME => Shift(yy_state_196) + NT_prefix_expr => Shift(yy_state_201) + NT_range_expr => Shift(yy_state_212) + NT_postfix_expr => Shift(yy_state_223) + T_EXISTS => Shift(yy_state_224) + T_FORALL => Shift(yy_state_256) + NT_infix_expr => Shift(yy_state_272) + T_UNDERSCORE => Shift(yy_state_273) + T_LPAREN => Shift(yy_state_281) + NT_pipe_expr => Shift(yy_state_325) + NT_arrow_fn_expr => Shift(yy_state_344) + NT_quantifier_expr => Shift(yy_state_345) + NT_simple_try_expr => Shift(yy_state_346) + NT_lexscan_expr => Shift(yy_state_347) + NT_lexmatch_expr => Shift(yy_state_348) + NT_match_expr => Shift(yy_state_349) + NT_if_expr => Shift(yy_state_350) + NT_try_expr => Shift(yy_state_351) + NT_while_expr => Shift(yy_state_352) + NT_foreach_expr => Shift(yy_state_353) + NT_for_expr => Shift(yy_state_354) + T_LEXSCAN => Shift(yy_state_355) + NT_lexscan_header => Shift(yy_state_358) + T_LEXMATCH => Shift(yy_state_391) + NT_lexmatch_header => Shift(yy_state_399) + NT_match_header => Shift(yy_state_444) + T_MATCH => Shift(yy_state_605) + T_IF => Shift(yy_state_608) + T_TRY_EXCLAMATION => Shift(yy_state_614) + T_TRY_QUESTION => Shift(yy_state_616) + T_TRY => Shift(yy_state_618) + NT_loop_label_colon => Shift(yy_state_632) + T_POST_LABEL => Shift(yy_state_639) + T_EXTEND => Shift(yy_state_641) + T_LIDENT => Shift(yy_state_648) + NT_expr => Shift(yy_state_871) + T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_1071) _ => Error } } -fn yy_state_550(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_871(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(4, NT_statement, yy_action_561) +} + +fn yy_state_872(_lookahead : YYSymbol) -> YYDecision { match _lookahead { NT_multiline_string => Shift(yy_state_2) T_MULTILINE_INTERP => Shift(yy_state_4) @@ -23687,62 +33349,90 @@ fn yy_state_550(_lookahead : YYSymbol) -> YYDecision { T_BYTE => Shift(yy_state_13) T_FALSE => Shift(yy_state_14) T_TRUE => Shift(yy_state_15) - T_INTERP => Shift(yy_state_16) - NT_non_empty_list_multiline_string_ => Shift(yy_state_17) - NT_simple_constant => Shift(yy_state_18) - T_AMPER => Shift(yy_state_19) - NT_qual_ident_ty => Shift(yy_state_25) - NT_tuple_expr => Shift(yy_state_26) - T_LBRACKET => Shift(yy_state_27) - NT_constr => Shift(yy_state_35) - NT_qual_ident_simple_expr => Shift(yy_state_36) - NT_atomic_expr => Shift(yy_state_37) - NT_anony_fn => Shift(yy_state_38) - T_LBRACE => Shift(yy_state_39) - T_FN => Shift(yy_state_48) - NT_type_name => Shift(yy_state_126) - T_ASYNC => Shift(yy_state_138) - NT_simple_expr => Shift(yy_state_151) - T_EXCLAMATION => Shift(yy_state_162) - T_UNDERSCORE => Shift(yy_state_163) - T_LPAREN => Shift(yy_state_164) - T_MINUS => Shift(yy_state_178) - T_PLUS => Shift(yy_state_180) - T_UIDENT => Shift(yy_state_182) - T_PACKAGE_NAME => Shift(yy_state_183) - T_LIDENT => Shift(yy_state_186) - NT_prefix_expr => Shift(yy_state_187) - NT_range_expr => Shift(yy_state_198) - NT_postfix_expr => Shift(yy_state_416) - NT_infix_expr => Shift(yy_state_551) + T_BYTES_INTERP => Shift(yy_state_16) + T_INTERP => Shift(yy_state_17) + NT_non_empty_list_multiline_string_ => Shift(yy_state_18) + NT_simple_constant => Shift(yy_state_19) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + NT_tuple_expr => Shift(yy_state_27) + T_LBRACKET_BAR => Shift(yy_state_28) + T_LBRACKET => Shift(yy_state_36) + NT_constr => Shift(yy_state_47) + NT_qual_ident_simple_expr => Shift(yy_state_48) + NT_atomic_expr => Shift(yy_state_50) + NT_anony_fn => Shift(yy_state_51) + T_LBRACE => Shift(yy_state_52) + T_FN => Shift(yy_state_61) + NT_type_name => Shift(yy_state_139) + T_ASYNC => Shift(yy_state_152) + NT_simple_expr => Shift(yy_state_165) + T_EXCLAMATION => Shift(yy_state_176) + NT_non_empty_tuple_elems_with_prefix => Shift(yy_state_179) + NT_arrow_fn_prefix_no_constraint => Shift(yy_state_180) + NT_non_empty_tuple_elems => Shift(yy_state_181) + NT_expr => Shift(yy_state_182) + T_MINUS => Shift(yy_state_191) + T_PLUS => Shift(yy_state_193) + T_UIDENT => Shift(yy_state_195) + T_PACKAGE_NAME => Shift(yy_state_196) + NT_prefix_expr => Shift(yy_state_201) + NT_range_expr => Shift(yy_state_212) + NT_postfix_expr => Shift(yy_state_223) + T_EXISTS => Shift(yy_state_224) + T_FORALL => Shift(yy_state_256) + NT_infix_expr => Shift(yy_state_272) + T_LPAREN => Shift(yy_state_281) + T_UNDERSCORE => Shift(yy_state_282) + NT_pipe_expr => Shift(yy_state_325) + NT_arrow_fn_expr => Shift(yy_state_344) + NT_quantifier_expr => Shift(yy_state_345) + NT_simple_try_expr => Shift(yy_state_346) + NT_lexscan_expr => Shift(yy_state_347) + NT_lexmatch_expr => Shift(yy_state_348) + NT_match_expr => Shift(yy_state_349) + NT_if_expr => Shift(yy_state_350) + NT_try_expr => Shift(yy_state_351) + NT_while_expr => Shift(yy_state_352) + NT_foreach_expr => Shift(yy_state_353) + NT_for_expr => Shift(yy_state_354) + T_LEXSCAN => Shift(yy_state_355) + NT_lexscan_header => Shift(yy_state_358) + T_LEXMATCH => Shift(yy_state_391) + NT_lexmatch_header => Shift(yy_state_399) + NT_match_header => Shift(yy_state_444) + T_MATCH => Shift(yy_state_605) + T_IF => Shift(yy_state_608) + T_TRY_EXCLAMATION => Shift(yy_state_614) + T_TRY_QUESTION => Shift(yy_state_616) + T_TRY => Shift(yy_state_618) + NT_loop_label_colon => Shift(yy_state_632) + T_POST_LABEL => Shift(yy_state_639) + T_RPAREN => Shift(yy_state_873) + NT_arrow_fn_prefix => Shift(yy_state_878) + T_EXTEND => Shift(yy_state_883) + T_LIDENT => Shift(yy_state_899) + T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_1071) _ => Error } } -fn yy_state_551(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_873(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_BARBAR => Shift(yy_state_423) - T_AMPERAMPER => Shift(yy_state_425) - T_BAR => Shift(yy_state_427) - T_CARET => Shift(yy_state_429) - T_AMPER => Shift(yy_state_431) - T_MINUS => Shift(yy_state_433) - T_PLUS => Shift(yy_state_435) - T_INFIX1 => Shift(yy_state_437) - T_INFIX2 => Shift(yy_state_439) - T_INFIX3 => Shift(yy_state_441) - T_INFIX4 => Shift(yy_state_443) - T_IMPLIES => Shift(yy_state_445) - T_LBRACE => Shift(yy_state_552) + T_FAT_ARROW => Shift(yy_state_874) + T_INFIX1 | T_INFIX2 | T_INFIX3 | T_INFIX4 | T_EOF | T_CATCH | T_EQ_TILDE | T_LPAREN | T_RPAREN | T_COMMA | T_MINUS | T_DOT_LIDENT | T_DOT_INT | T_COLON | T_SEMI | T_LBRACKET | T_PLUS | T_RBRACKET | T_BAR_RBRACKET | T_BAR | T_LBRACE | T_RBRACE | T_AMPERAMPER | T_AMPER | T_CARET | T_BARBAR | T_AS | T_PIPE | T_PIPE_LEFT | T_LT_PLUS | T_LT_QUESTION | T_DOTDOT | T_RANGE_INCLUSIVE | T_RANGE_LT_INCLUSIVE | T_RANGE_EXCLUSIVE | T_RANGE_INCLUSIVE_REV | T_RANGE_EXCLUSIVE_REV | T_IS | T_AND | T_IMPLIES | T_LEXMATCH_QUESTION => Reduce(2, NT_tuple_expr, yy_action_950) _ => Error } } -fn yy_state_552(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_match_header, yy_action_544) +fn yy_state_874(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_LBRACE => Shift(yy_state_875) + _ => Error + } } -fn yy_state_553(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_875(_lookahead : YYSymbol) -> YYDecision { match _lookahead { NT_multiline_string => Shift(yy_state_2) T_MULTILINE_INTERP => Shift(yy_state_4) @@ -23757,85 +33447,116 @@ fn yy_state_553(_lookahead : YYSymbol) -> YYDecision { T_BYTE => Shift(yy_state_13) T_FALSE => Shift(yy_state_14) T_TRUE => Shift(yy_state_15) - T_INTERP => Shift(yy_state_16) - NT_non_empty_list_multiline_string_ => Shift(yy_state_17) - NT_simple_constant => Shift(yy_state_18) - T_AMPER => Shift(yy_state_19) - NT_qual_ident_ty => Shift(yy_state_25) - NT_tuple_expr => Shift(yy_state_26) - T_LBRACKET => Shift(yy_state_27) - NT_constr => Shift(yy_state_35) - NT_qual_ident_simple_expr => Shift(yy_state_36) - NT_atomic_expr => Shift(yy_state_37) - NT_anony_fn => Shift(yy_state_38) - T_LBRACE => Shift(yy_state_39) - T_FN => Shift(yy_state_48) - NT_type_name => Shift(yy_state_126) - T_ASYNC => Shift(yy_state_138) - NT_simple_expr => Shift(yy_state_151) - T_EXCLAMATION => Shift(yy_state_162) - T_UNDERSCORE => Shift(yy_state_163) - T_LPAREN => Shift(yy_state_164) - T_MINUS => Shift(yy_state_178) - T_PLUS => Shift(yy_state_180) - T_UIDENT => Shift(yy_state_182) - T_PACKAGE_NAME => Shift(yy_state_183) - T_LIDENT => Shift(yy_state_186) - NT_prefix_expr => Shift(yy_state_187) - NT_range_expr => Shift(yy_state_198) - NT_postfix_expr => Shift(yy_state_416) - NT_infix_expr => Shift(yy_state_554) + T_BYTES_INTERP => Shift(yy_state_16) + T_INTERP => Shift(yy_state_17) + NT_non_empty_list_multiline_string_ => Shift(yy_state_18) + NT_simple_constant => Shift(yy_state_19) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + NT_tuple_expr => Shift(yy_state_27) + T_LBRACKET_BAR => Shift(yy_state_28) + T_LBRACKET => Shift(yy_state_36) + NT_constr => Shift(yy_state_47) + NT_qual_ident_simple_expr => Shift(yy_state_48) + NT_atomic_expr => Shift(yy_state_50) + NT_anony_fn => Shift(yy_state_51) + T_LBRACE => Shift(yy_state_52) + NT_statement => Shift(yy_state_134) + NT_non_empty_list_semi_rev_aux_statement_ => Shift(yy_state_135) + NT_type_name => Shift(yy_state_139) + T_EXCLAMATION => Shift(yy_state_176) + T_MINUS => Shift(yy_state_191) + T_PLUS => Shift(yy_state_193) + T_UIDENT => Shift(yy_state_195) + NT_prefix_expr => Shift(yy_state_201) + NT_range_expr => Shift(yy_state_212) + NT_postfix_expr => Shift(yy_state_223) + T_EXISTS => Shift(yy_state_224) + T_FORALL => Shift(yy_state_256) + NT_infix_expr => Shift(yy_state_272) + T_UNDERSCORE => Shift(yy_state_273) + NT_qual_ident => Shift(yy_state_275) + NT_simple_expr => Shift(yy_state_276) + T_LPAREN => Shift(yy_state_281) + NT_pipe_expr => Shift(yy_state_325) + NT_non_empty_list_semis_rev_statement_ => Shift(yy_state_341) + NT_arrow_fn_expr => Shift(yy_state_344) + NT_quantifier_expr => Shift(yy_state_345) + NT_simple_try_expr => Shift(yy_state_346) + NT_lexscan_expr => Shift(yy_state_347) + NT_lexmatch_expr => Shift(yy_state_348) + NT_match_expr => Shift(yy_state_349) + NT_if_expr => Shift(yy_state_350) + NT_try_expr => Shift(yy_state_351) + NT_while_expr => Shift(yy_state_352) + NT_foreach_expr => Shift(yy_state_353) + NT_for_expr => Shift(yy_state_354) + T_LEXSCAN => Shift(yy_state_355) + NT_lexscan_header => Shift(yy_state_358) + T_LEXMATCH => Shift(yy_state_391) + NT_lexmatch_header => Shift(yy_state_399) + NT_match_header => Shift(yy_state_444) + T_MATCH => Shift(yy_state_605) + T_IF => Shift(yy_state_608) + T_TRY_EXCLAMATION => Shift(yy_state_614) + T_TRY_QUESTION => Shift(yy_state_616) + T_TRY => Shift(yy_state_618) + NT_loop_label_colon => Shift(yy_state_632) + T_POST_LABEL => Shift(yy_state_639) + NT_expr => Shift(yy_state_644) + NT_left_value => Shift(yy_state_645) + T_ELLIPSIS => Shift(yy_state_651) + T_RAISE => Shift(yy_state_652) + T_PACKAGE_NAME => Shift(yy_state_654) + T_EXTEND => Shift(yy_state_656) + T_LIDENT => Shift(yy_state_657) + NT_expr_statement_no_break_continue_return => Shift(yy_state_734) + T_RETURN => Shift(yy_state_735) + T_CONTINUE => Shift(yy_state_738) + T_BREAK => Shift(yy_state_747) + T_GUARD => Shift(yy_state_765) + NT_expr_statement => Shift(yy_state_769) + T_PROOF_LET => Shift(yy_state_770) + T_PROOF_ASSERT => Shift(yy_state_777) + T_DEFER => Shift(yy_state_779) + NT_guard_statement => Shift(yy_state_781) + T_FN => Shift(yy_state_782) + T_ASYNC => Shift(yy_state_791) + T_LETREC => Shift(yy_state_801) + T_LET => Shift(yy_state_849) + NT_list_semis_rev_statement_ => Shift(yy_state_876) + T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_1071) + T_RBRACE => Reduce(0, NT_list_semis_rev_statement_, yy_action_978) _ => Error } } -fn yy_state_554(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_876(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACE => Shift(yy_state_120) - T_BARBAR => Shift(yy_state_423) - T_AMPERAMPER => Shift(yy_state_425) - T_BAR => Shift(yy_state_427) - T_CARET => Shift(yy_state_429) - T_AMPER => Shift(yy_state_431) - T_MINUS => Shift(yy_state_433) - T_PLUS => Shift(yy_state_435) - T_INFIX1 => Shift(yy_state_437) - T_INFIX2 => Shift(yy_state_439) - T_INFIX3 => Shift(yy_state_441) - T_INFIX4 => Shift(yy_state_443) - T_IMPLIES => Shift(yy_state_445) - NT_block_expr => Shift(yy_state_555) + T_RBRACE => Shift(yy_state_877) _ => Error } } -fn yy_state_555(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_877(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(6, NT_arrow_fn_with_explicit_braces, yy_action_560) +} + +fn yy_state_878(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_ELSE => Shift(yy_state_556) - T_EOF | T_RPAREN | T_COMMA | T_COLON | T_SEMI | T_RBRACKET | T_LBRACE | T_RBRACE | T_AND => Reduce(3, NT_if_expr, yy_action_543) + T_FAT_ARROW => Shift(yy_state_879) _ => Error } } -fn yy_state_556(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_879(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACE => Shift(yy_state_120) - T_IF => Shift(yy_state_553) - NT_if_expr => Shift(yy_state_557) - NT_block_expr => Shift(yy_state_558) + T_LBRACE => Shift(yy_state_880) _ => Error } } -fn yy_state_557(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(5, NT_if_expr, yy_action_542) -} - -fn yy_state_558(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(5, NT_if_expr, yy_action_541) -} - -fn yy_state_559(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_880(_lookahead : YYSymbol) -> YYDecision { match _lookahead { NT_multiline_string => Shift(yy_state_2) T_MULTILINE_INTERP => Shift(yy_state_4) @@ -23850,49 +33571,143 @@ fn yy_state_559(_lookahead : YYSymbol) -> YYDecision { T_BYTE => Shift(yy_state_13) T_FALSE => Shift(yy_state_14) T_TRUE => Shift(yy_state_15) - T_INTERP => Shift(yy_state_16) - NT_non_empty_list_multiline_string_ => Shift(yy_state_17) - NT_simple_constant => Shift(yy_state_18) - T_AMPER => Shift(yy_state_19) - NT_qual_ident_ty => Shift(yy_state_25) - NT_tuple_expr => Shift(yy_state_26) - T_LBRACKET => Shift(yy_state_27) - NT_constr => Shift(yy_state_35) - NT_qual_ident_simple_expr => Shift(yy_state_36) - NT_atomic_expr => Shift(yy_state_37) - NT_anony_fn => Shift(yy_state_38) - T_LBRACE => Shift(yy_state_39) - T_FN => Shift(yy_state_48) - NT_type_name => Shift(yy_state_126) - T_ASYNC => Shift(yy_state_138) - NT_simple_expr => Shift(yy_state_151) - T_EXCLAMATION => Shift(yy_state_162) - T_UNDERSCORE => Shift(yy_state_163) - T_LPAREN => Shift(yy_state_164) - T_MINUS => Shift(yy_state_178) - T_PLUS => Shift(yy_state_180) - T_UIDENT => Shift(yy_state_182) - T_PACKAGE_NAME => Shift(yy_state_183) - T_LIDENT => Shift(yy_state_186) - NT_prefix_expr => Shift(yy_state_187) - NT_range_expr => Shift(yy_state_198) - NT_postfix_expr => Shift(yy_state_416) - NT_infix_expr => Shift(yy_state_455) - NT_pipe_expr => Shift(yy_state_560) + T_BYTES_INTERP => Shift(yy_state_16) + T_INTERP => Shift(yy_state_17) + NT_non_empty_list_multiline_string_ => Shift(yy_state_18) + NT_simple_constant => Shift(yy_state_19) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + NT_tuple_expr => Shift(yy_state_27) + T_LBRACKET_BAR => Shift(yy_state_28) + T_LBRACKET => Shift(yy_state_36) + NT_constr => Shift(yy_state_47) + NT_qual_ident_simple_expr => Shift(yy_state_48) + NT_atomic_expr => Shift(yy_state_50) + NT_anony_fn => Shift(yy_state_51) + T_LBRACE => Shift(yy_state_52) + NT_statement => Shift(yy_state_134) + NT_non_empty_list_semi_rev_aux_statement_ => Shift(yy_state_135) + NT_type_name => Shift(yy_state_139) + T_EXCLAMATION => Shift(yy_state_176) + T_MINUS => Shift(yy_state_191) + T_PLUS => Shift(yy_state_193) + T_UIDENT => Shift(yy_state_195) + NT_prefix_expr => Shift(yy_state_201) + NT_range_expr => Shift(yy_state_212) + NT_postfix_expr => Shift(yy_state_223) + T_EXISTS => Shift(yy_state_224) + T_FORALL => Shift(yy_state_256) + NT_infix_expr => Shift(yy_state_272) + T_UNDERSCORE => Shift(yy_state_273) + NT_qual_ident => Shift(yy_state_275) + NT_simple_expr => Shift(yy_state_276) + T_LPAREN => Shift(yy_state_281) + NT_pipe_expr => Shift(yy_state_325) + NT_non_empty_list_semis_rev_statement_ => Shift(yy_state_341) + NT_arrow_fn_expr => Shift(yy_state_344) + NT_quantifier_expr => Shift(yy_state_345) + NT_simple_try_expr => Shift(yy_state_346) + NT_lexscan_expr => Shift(yy_state_347) + NT_lexmatch_expr => Shift(yy_state_348) + NT_match_expr => Shift(yy_state_349) + NT_if_expr => Shift(yy_state_350) + NT_try_expr => Shift(yy_state_351) + NT_while_expr => Shift(yy_state_352) + NT_foreach_expr => Shift(yy_state_353) + NT_for_expr => Shift(yy_state_354) + T_LEXSCAN => Shift(yy_state_355) + NT_lexscan_header => Shift(yy_state_358) + T_LEXMATCH => Shift(yy_state_391) + NT_lexmatch_header => Shift(yy_state_399) + NT_match_header => Shift(yy_state_444) + T_MATCH => Shift(yy_state_605) + T_IF => Shift(yy_state_608) + T_TRY_EXCLAMATION => Shift(yy_state_614) + T_TRY_QUESTION => Shift(yy_state_616) + T_TRY => Shift(yy_state_618) + NT_loop_label_colon => Shift(yy_state_632) + T_POST_LABEL => Shift(yy_state_639) + NT_expr => Shift(yy_state_644) + NT_left_value => Shift(yy_state_645) + T_ELLIPSIS => Shift(yy_state_651) + T_RAISE => Shift(yy_state_652) + T_PACKAGE_NAME => Shift(yy_state_654) + T_EXTEND => Shift(yy_state_656) + T_LIDENT => Shift(yy_state_657) + NT_expr_statement_no_break_continue_return => Shift(yy_state_734) + T_RETURN => Shift(yy_state_735) + T_CONTINUE => Shift(yy_state_738) + T_BREAK => Shift(yy_state_747) + T_GUARD => Shift(yy_state_765) + NT_expr_statement => Shift(yy_state_769) + T_PROOF_LET => Shift(yy_state_770) + T_PROOF_ASSERT => Shift(yy_state_777) + T_DEFER => Shift(yy_state_779) + NT_guard_statement => Shift(yy_state_781) + T_FN => Shift(yy_state_782) + T_ASYNC => Shift(yy_state_791) + T_LETREC => Shift(yy_state_801) + T_LET => Shift(yy_state_849) + NT_list_semis_rev_statement_ => Shift(yy_state_881) + T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_1071) + T_RBRACE => Reduce(0, NT_list_semis_rev_statement_, yy_action_978) _ => Error } } -fn yy_state_560(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_881(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_PIPE => Shift(yy_state_498) - T_PIPE_LEFT => Shift(yy_state_503) - T_EOF | T_RPAREN | T_COMMA | T_COLON | T_SEMI | T_RBRACKET | T_LBRACE | T_RBRACE | T_AND => Reduce(2, NT_try_expr, yy_action_540) + T_RBRACE => Shift(yy_state_882) _ => Error } } -fn yy_state_561(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_882(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(6, NT_arrow_fn_with_explicit_braces, yy_action_559) +} + +fn yy_state_883(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_FAT_ARROW => Shift(yy_state_642) + T_COLON => Shift(yy_state_884) + T_COMMA => Shift(yy_state_887) + T_RPAREN => Shift(yy_state_892) + T_INFIX1 | T_INFIX2 | T_INFIX3 | T_INFIX4 | T_CATCH | T_EQ_TILDE | T_LPAREN | T_MINUS | T_DOT_LIDENT | T_DOT_INT | T_LBRACKET | T_PLUS | T_BAR | T_AMPERAMPER | T_AMPER | T_CARET | T_BARBAR | T_AS | T_PIPE | T_PIPE_LEFT | T_LT_PLUS | T_LT_QUESTION | T_DOTDOT | T_RANGE_INCLUSIVE | T_RANGE_LT_INCLUSIVE | T_RANGE_EXCLUSIVE | T_RANGE_INCLUSIVE_REV | T_RANGE_EXCLUSIVE_REV | T_IS | T_IMPLIES | T_LEXMATCH_QUESTION => Reduce(1, NT_qual_ident_simple_expr, yy_action_933) + _ => Error + } +} + +fn yy_state_884(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_ASYNC => Shift(yy_state_65) + T_UNDERSCORE => Shift(yy_state_70) + T_AMPER => Shift(yy_state_71) + T_PACKAGE_NAME => Shift(yy_state_73) + T_UIDENT => Shift(yy_state_80) + T_LPAREN => Shift(yy_state_84) + NT_simple_type => Shift(yy_state_110) + NT_type_ => Shift(yy_state_885) + _ => Error + } +} + +fn yy_state_885(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_COMMA => Shift(yy_state_298) + T_RPAREN => Shift(yy_state_886) + _ => Error + } +} + +fn yy_state_886(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_FAT_ARROW => Reduce(4, NT_arrow_fn_prefix, yy_action_871) + T_INFIX1 | T_INFIX2 | T_INFIX3 | T_INFIX4 | T_EOF | T_CATCH | T_EQ_TILDE | T_LPAREN | T_RPAREN | T_COMMA | T_MINUS | T_DOT_LIDENT | T_DOT_INT | T_COLON | T_SEMI | T_LBRACKET | T_PLUS | T_RBRACKET | T_BAR_RBRACKET | T_BAR | T_LBRACE | T_RBRACE | T_AMPERAMPER | T_AMPER | T_CARET | T_BARBAR | T_AS | T_PIPE | T_PIPE_LEFT | T_LT_PLUS | T_LT_QUESTION | T_DOTDOT | T_RANGE_INCLUSIVE | T_RANGE_LT_INCLUSIVE | T_RANGE_EXCLUSIVE | T_RANGE_INCLUSIVE_REV | T_RANGE_EXCLUSIVE_REV | T_IS | T_AND | T_IMPLIES | T_LEXMATCH_QUESTION => Reduce(5, NT_tuple_expr, yy_action_558) + _ => Error + } +} + +fn yy_state_887(_lookahead : YYSymbol) -> YYDecision { match _lookahead { NT_multiline_string => Shift(yy_state_2) T_MULTILINE_INTERP => Shift(yy_state_4) @@ -23907,49 +33722,121 @@ fn yy_state_561(_lookahead : YYSymbol) -> YYDecision { T_BYTE => Shift(yy_state_13) T_FALSE => Shift(yy_state_14) T_TRUE => Shift(yy_state_15) - T_INTERP => Shift(yy_state_16) - NT_non_empty_list_multiline_string_ => Shift(yy_state_17) - NT_simple_constant => Shift(yy_state_18) - T_AMPER => Shift(yy_state_19) - NT_qual_ident_ty => Shift(yy_state_25) - NT_tuple_expr => Shift(yy_state_26) - T_LBRACKET => Shift(yy_state_27) - NT_constr => Shift(yy_state_35) - NT_qual_ident_simple_expr => Shift(yy_state_36) - NT_atomic_expr => Shift(yy_state_37) - NT_anony_fn => Shift(yy_state_38) - T_LBRACE => Shift(yy_state_39) - T_FN => Shift(yy_state_48) - NT_type_name => Shift(yy_state_126) - T_ASYNC => Shift(yy_state_138) - NT_simple_expr => Shift(yy_state_151) - T_EXCLAMATION => Shift(yy_state_162) - T_UNDERSCORE => Shift(yy_state_163) - T_LPAREN => Shift(yy_state_164) - T_MINUS => Shift(yy_state_178) - T_PLUS => Shift(yy_state_180) - T_UIDENT => Shift(yy_state_182) - T_PACKAGE_NAME => Shift(yy_state_183) - T_LIDENT => Shift(yy_state_186) - NT_prefix_expr => Shift(yy_state_187) - NT_range_expr => Shift(yy_state_198) - NT_postfix_expr => Shift(yy_state_416) - NT_infix_expr => Shift(yy_state_455) - NT_pipe_expr => Shift(yy_state_562) + T_BYTES_INTERP => Shift(yy_state_16) + T_INTERP => Shift(yy_state_17) + NT_non_empty_list_multiline_string_ => Shift(yy_state_18) + NT_simple_constant => Shift(yy_state_19) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + NT_tuple_expr => Shift(yy_state_27) + T_LBRACKET_BAR => Shift(yy_state_28) + T_LBRACKET => Shift(yy_state_36) + NT_constr => Shift(yy_state_47) + NT_qual_ident_simple_expr => Shift(yy_state_48) + NT_atomic_expr => Shift(yy_state_50) + NT_anony_fn => Shift(yy_state_51) + T_LBRACE => Shift(yy_state_52) + T_FN => Shift(yy_state_61) + NT_type_name => Shift(yy_state_139) + T_ASYNC => Shift(yy_state_152) + NT_simple_expr => Shift(yy_state_165) + T_EXCLAMATION => Shift(yy_state_176) + NT_non_empty_tuple_elems => Shift(yy_state_181) + NT_expr => Shift(yy_state_189) + T_MINUS => Shift(yy_state_191) + T_PLUS => Shift(yy_state_193) + T_UIDENT => Shift(yy_state_195) + T_PACKAGE_NAME => Shift(yy_state_196) + NT_prefix_expr => Shift(yy_state_201) + NT_range_expr => Shift(yy_state_212) + NT_postfix_expr => Shift(yy_state_223) + T_EXISTS => Shift(yy_state_224) + T_FORALL => Shift(yy_state_256) + NT_infix_expr => Shift(yy_state_272) + T_LPAREN => Shift(yy_state_281) + NT_arrow_fn_prefix => Shift(yy_state_314) + T_UNDERSCORE => Shift(yy_state_323) + NT_pipe_expr => Shift(yy_state_325) + NT_arrow_fn_expr => Shift(yy_state_344) + NT_quantifier_expr => Shift(yy_state_345) + NT_simple_try_expr => Shift(yy_state_346) + NT_lexscan_expr => Shift(yy_state_347) + NT_lexmatch_expr => Shift(yy_state_348) + NT_match_expr => Shift(yy_state_349) + NT_if_expr => Shift(yy_state_350) + NT_try_expr => Shift(yy_state_351) + NT_while_expr => Shift(yy_state_352) + NT_foreach_expr => Shift(yy_state_353) + NT_for_expr => Shift(yy_state_354) + T_LEXSCAN => Shift(yy_state_355) + NT_lexscan_header => Shift(yy_state_358) + T_LEXMATCH => Shift(yy_state_391) + NT_lexmatch_header => Shift(yy_state_399) + NT_match_header => Shift(yy_state_444) + T_MATCH => Shift(yy_state_605) + T_IF => Shift(yy_state_608) + T_TRY_EXCLAMATION => Shift(yy_state_614) + T_TRY_QUESTION => Shift(yy_state_616) + T_TRY => Shift(yy_state_618) + NT_loop_label_colon => Shift(yy_state_632) + T_POST_LABEL => Shift(yy_state_639) + NT_non_empty_tuple_elems_with_prefix => Shift(yy_state_888) + NT_arrow_fn_prefix_no_constraint => Shift(yy_state_889) + T_RPAREN => Shift(yy_state_890) + T_EXTEND => Shift(yy_state_891) + T_LIDENT => Shift(yy_state_893) + T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_1071) _ => Error } } -fn yy_state_562(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_888(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_non_empty_tuple_elems_with_prefix, yy_action_557) +} + +fn yy_state_889(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_arrow_fn_prefix_no_constraint, yy_action_556) +} + +fn yy_state_890(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_PIPE => Shift(yy_state_498) - T_PIPE_LEFT => Shift(yy_state_503) - T_EOF | T_RPAREN | T_COMMA | T_COLON | T_SEMI | T_RBRACKET | T_LBRACE | T_RBRACE | T_AND => Reduce(2, NT_try_expr, yy_action_539) + T_FAT_ARROW => Reduce(3, NT_arrow_fn_prefix, yy_action_869) + T_INFIX1 | T_INFIX2 | T_INFIX3 | T_INFIX4 | T_EOF | T_CATCH | T_EQ_TILDE | T_LPAREN | T_RPAREN | T_COMMA | T_MINUS | T_DOT_LIDENT | T_DOT_INT | T_COLON | T_SEMI | T_LBRACKET | T_PLUS | T_RBRACKET | T_BAR_RBRACKET | T_BAR | T_LBRACE | T_RBRACE | T_AMPERAMPER | T_AMPER | T_CARET | T_BARBAR | T_AS | T_PIPE | T_PIPE_LEFT | T_LT_PLUS | T_LT_QUESTION | T_DOTDOT | T_RANGE_INCLUSIVE | T_RANGE_LT_INCLUSIVE | T_RANGE_EXCLUSIVE | T_RANGE_INCLUSIVE_REV | T_RANGE_EXCLUSIVE_REV | T_IS | T_AND | T_IMPLIES | T_LEXMATCH_QUESTION => Reduce(3, NT_arrow_fn_prefix_no_constraint, yy_action_555) _ => Error } } -fn yy_state_563(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_891(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_COLON => Shift(yy_state_296) + T_FAT_ARROW => Shift(yy_state_642) + T_COMMA => Shift(yy_state_887) + T_RPAREN => Shift(yy_state_892) + T_INFIX1 | T_INFIX2 | T_INFIX3 | T_INFIX4 | T_CATCH | T_EQ_TILDE | T_LPAREN | T_MINUS | T_DOT_LIDENT | T_DOT_INT | T_LBRACKET | T_PLUS | T_BAR | T_AMPERAMPER | T_AMPER | T_CARET | T_BARBAR | T_AS | T_PIPE | T_PIPE_LEFT | T_LT_PLUS | T_LT_QUESTION | T_DOTDOT | T_RANGE_INCLUSIVE | T_RANGE_LT_INCLUSIVE | T_RANGE_EXCLUSIVE | T_RANGE_INCLUSIVE_REV | T_RANGE_EXCLUSIVE_REV | T_IS | T_IMPLIES | T_LEXMATCH_QUESTION => Reduce(1, NT_qual_ident_simple_expr, yy_action_933) + _ => Error + } +} + +fn yy_state_892(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_FAT_ARROW => Reduce(2, NT_arrow_fn_prefix, yy_action_868) + T_INFIX1 | T_INFIX2 | T_INFIX3 | T_INFIX4 | T_EOF | T_CATCH | T_EQ_TILDE | T_LPAREN | T_RPAREN | T_COMMA | T_MINUS | T_DOT_LIDENT | T_DOT_INT | T_COLON | T_SEMI | T_LBRACKET | T_PLUS | T_RBRACKET | T_BAR_RBRACKET | T_BAR | T_LBRACE | T_RBRACE | T_AMPERAMPER | T_AMPER | T_CARET | T_BARBAR | T_AS | T_PIPE | T_PIPE_LEFT | T_LT_PLUS | T_LT_QUESTION | T_DOTDOT | T_RANGE_INCLUSIVE | T_RANGE_LT_INCLUSIVE | T_RANGE_EXCLUSIVE | T_RANGE_INCLUSIVE_REV | T_RANGE_EXCLUSIVE_REV | T_IS | T_AND | T_IMPLIES | T_LEXMATCH_QUESTION => Reduce(2, NT_arrow_fn_prefix_no_constraint, yy_action_554) + _ => Error + } +} + +fn yy_state_893(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_COLON => Shift(yy_state_302) + T_FAT_ARROW => Shift(yy_state_649) + T_COMMA => Shift(yy_state_894) + T_RPAREN => Shift(yy_state_898) + T_INFIX1 | T_INFIX2 | T_INFIX3 | T_INFIX4 | T_CATCH | T_EQ_TILDE | T_LPAREN | T_MINUS | T_DOT_LIDENT | T_DOT_INT | T_LBRACKET | T_PLUS | T_BAR | T_AMPERAMPER | T_AMPER | T_CARET | T_BARBAR | T_AS | T_PIPE | T_PIPE_LEFT | T_LT_PLUS | T_LT_QUESTION | T_DOTDOT | T_RANGE_INCLUSIVE | T_RANGE_LT_INCLUSIVE | T_RANGE_EXCLUSIVE | T_RANGE_INCLUSIVE_REV | T_RANGE_EXCLUSIVE_REV | T_IS | T_IMPLIES | T_LEXMATCH_QUESTION => Reduce(1, NT_qual_ident_simple_expr, yy_action_932) + _ => Error + } +} + +fn yy_state_894(_lookahead : YYSymbol) -> YYDecision { match _lookahead { NT_multiline_string => Shift(yy_state_2) T_MULTILINE_INTERP => Shift(yy_state_4) @@ -23964,325 +33851,533 @@ fn yy_state_563(_lookahead : YYSymbol) -> YYDecision { T_BYTE => Shift(yy_state_13) T_FALSE => Shift(yy_state_14) T_TRUE => Shift(yy_state_15) - T_INTERP => Shift(yy_state_16) - NT_non_empty_list_multiline_string_ => Shift(yy_state_17) - NT_simple_constant => Shift(yy_state_18) - T_AMPER => Shift(yy_state_19) - NT_qual_ident_ty => Shift(yy_state_25) - NT_tuple_expr => Shift(yy_state_26) - T_LBRACKET => Shift(yy_state_27) - NT_constr => Shift(yy_state_35) - NT_qual_ident_simple_expr => Shift(yy_state_36) - NT_atomic_expr => Shift(yy_state_37) - NT_anony_fn => Shift(yy_state_38) - T_LBRACE => Shift(yy_state_39) - T_FN => Shift(yy_state_48) - NT_type_name => Shift(yy_state_126) - T_ASYNC => Shift(yy_state_138) - NT_simple_expr => Shift(yy_state_151) - T_EXCLAMATION => Shift(yy_state_162) - T_UNDERSCORE => Shift(yy_state_163) - T_LPAREN => Shift(yy_state_164) - T_MINUS => Shift(yy_state_178) - T_PLUS => Shift(yy_state_180) - T_UIDENT => Shift(yy_state_182) - T_PACKAGE_NAME => Shift(yy_state_183) - T_LIDENT => Shift(yy_state_186) - NT_prefix_expr => Shift(yy_state_187) - NT_range_expr => Shift(yy_state_198) - NT_postfix_expr => Shift(yy_state_416) - NT_infix_expr => Shift(yy_state_455) - NT_pipe_expr => Shift(yy_state_564) + T_BYTES_INTERP => Shift(yy_state_16) + T_INTERP => Shift(yy_state_17) + NT_non_empty_list_multiline_string_ => Shift(yy_state_18) + NT_simple_constant => Shift(yy_state_19) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + NT_tuple_expr => Shift(yy_state_27) + T_LBRACKET_BAR => Shift(yy_state_28) + T_LBRACKET => Shift(yy_state_36) + NT_constr => Shift(yy_state_47) + NT_qual_ident_simple_expr => Shift(yy_state_48) + NT_atomic_expr => Shift(yy_state_50) + NT_anony_fn => Shift(yy_state_51) + T_LBRACE => Shift(yy_state_52) + T_FN => Shift(yy_state_61) + NT_type_name => Shift(yy_state_139) + T_ASYNC => Shift(yy_state_152) + NT_simple_expr => Shift(yy_state_165) + T_EXCLAMATION => Shift(yy_state_176) + NT_non_empty_tuple_elems => Shift(yy_state_181) + NT_expr => Shift(yy_state_189) + T_MINUS => Shift(yy_state_191) + T_PLUS => Shift(yy_state_193) + T_UIDENT => Shift(yy_state_195) + T_PACKAGE_NAME => Shift(yy_state_196) + NT_prefix_expr => Shift(yy_state_201) + NT_range_expr => Shift(yy_state_212) + NT_postfix_expr => Shift(yy_state_223) + T_EXISTS => Shift(yy_state_224) + T_FORALL => Shift(yy_state_256) + NT_infix_expr => Shift(yy_state_272) + T_LPAREN => Shift(yy_state_281) + NT_arrow_fn_prefix => Shift(yy_state_309) + T_UNDERSCORE => Shift(yy_state_323) + NT_pipe_expr => Shift(yy_state_325) + NT_arrow_fn_expr => Shift(yy_state_344) + NT_quantifier_expr => Shift(yy_state_345) + NT_simple_try_expr => Shift(yy_state_346) + NT_lexscan_expr => Shift(yy_state_347) + NT_lexmatch_expr => Shift(yy_state_348) + NT_match_expr => Shift(yy_state_349) + NT_if_expr => Shift(yy_state_350) + NT_try_expr => Shift(yy_state_351) + NT_while_expr => Shift(yy_state_352) + NT_foreach_expr => Shift(yy_state_353) + NT_for_expr => Shift(yy_state_354) + T_LEXSCAN => Shift(yy_state_355) + NT_lexscan_header => Shift(yy_state_358) + T_LEXMATCH => Shift(yy_state_391) + NT_lexmatch_header => Shift(yy_state_399) + NT_match_header => Shift(yy_state_444) + T_MATCH => Shift(yy_state_605) + T_IF => Shift(yy_state_608) + T_TRY_EXCLAMATION => Shift(yy_state_614) + T_TRY_QUESTION => Shift(yy_state_616) + T_TRY => Shift(yy_state_618) + NT_loop_label_colon => Shift(yy_state_632) + T_POST_LABEL => Shift(yy_state_639) + T_EXTEND => Shift(yy_state_891) + T_LIDENT => Shift(yy_state_893) + NT_non_empty_tuple_elems_with_prefix => Shift(yy_state_895) + NT_arrow_fn_prefix_no_constraint => Shift(yy_state_896) + T_RPAREN => Shift(yy_state_897) + T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_1071) _ => Error } } -fn yy_state_564(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_895(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_non_empty_tuple_elems_with_prefix, yy_action_553) +} + +fn yy_state_896(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_arrow_fn_prefix_no_constraint, yy_action_552) +} + +fn yy_state_897(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_PIPE => Shift(yy_state_498) - T_PIPE_LEFT => Shift(yy_state_503) - NT_catch_keyword => Shift(yy_state_565) - T_CATCH => Shift(yy_state_574) + T_FAT_ARROW => Reduce(3, NT_arrow_fn_prefix, yy_action_873) + T_INFIX1 | T_INFIX2 | T_INFIX3 | T_INFIX4 | T_EOF | T_CATCH | T_EQ_TILDE | T_LPAREN | T_RPAREN | T_COMMA | T_MINUS | T_DOT_LIDENT | T_DOT_INT | T_COLON | T_SEMI | T_LBRACKET | T_PLUS | T_RBRACKET | T_BAR_RBRACKET | T_BAR | T_LBRACE | T_RBRACE | T_AMPERAMPER | T_AMPER | T_CARET | T_BARBAR | T_AS | T_PIPE | T_PIPE_LEFT | T_LT_PLUS | T_LT_QUESTION | T_DOTDOT | T_RANGE_INCLUSIVE | T_RANGE_LT_INCLUSIVE | T_RANGE_EXCLUSIVE | T_RANGE_INCLUSIVE_REV | T_RANGE_EXCLUSIVE_REV | T_IS | T_AND | T_IMPLIES | T_LEXMATCH_QUESTION => Reduce(3, NT_arrow_fn_prefix_no_constraint, yy_action_550) _ => Error } } -fn yy_state_565(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_898(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_AMPER => Shift(yy_state_19) - NT_qual_ident_ty => Shift(yy_state_25) - T_UIDENT => Shift(yy_state_182) - T_LBRACE => Shift(yy_state_275) - T_LBRACKET => Shift(yy_state_279) - T_LPAREN => Shift(yy_state_293) - NT_constr => Shift(yy_state_294) - T_LIDENT => Shift(yy_state_307) - T_UNDERSCORE => Shift(yy_state_312) - T_BYTES => Shift(yy_state_313) - T_STRING => Shift(yy_state_314) - T_MINUS => Shift(yy_state_315) - T_FLOAT => Shift(yy_state_319) - T_DOUBLE => Shift(yy_state_320) - T_BYTE => Shift(yy_state_321) - T_INT => Shift(yy_state_322) - T_CHAR => Shift(yy_state_323) - T_FALSE => Shift(yy_state_324) - T_TRUE => Shift(yy_state_325) - NT_simple_pattern => Shift(yy_state_326) - NT_type_name => Shift(yy_state_329) - T_PACKAGE_NAME => Shift(yy_state_334) - NT_range_pattern => Shift(yy_state_337) - NT_or_pattern => Shift(yy_state_340) - NT_single_pattern_case => Shift(yy_state_541) - T_ELLIPSIS => Shift(yy_state_544) - NT_pattern => Shift(yy_state_545) - NT_non_empty_list_semis_single_pattern_case_ => Shift(yy_state_566) - NT_single_pattern_cases => Shift(yy_state_567) - NT_list_semis_single_pattern_case_ => Shift(yy_state_573) - T_RBRACE => Reduce(0, NT_list_semis_single_pattern_case_, yy_action_538) + T_FAT_ARROW => Reduce(2, NT_arrow_fn_prefix, yy_action_872) + T_INFIX1 | T_INFIX2 | T_INFIX3 | T_INFIX4 | T_EOF | T_CATCH | T_EQ_TILDE | T_LPAREN | T_RPAREN | T_COMMA | T_MINUS | T_DOT_LIDENT | T_DOT_INT | T_COLON | T_SEMI | T_LBRACKET | T_PLUS | T_RBRACKET | T_BAR_RBRACKET | T_BAR | T_LBRACE | T_RBRACE | T_AMPERAMPER | T_AMPER | T_CARET | T_BARBAR | T_AS | T_PIPE | T_PIPE_LEFT | T_LT_PLUS | T_LT_QUESTION | T_DOTDOT | T_RANGE_INCLUSIVE | T_RANGE_LT_INCLUSIVE | T_RANGE_EXCLUSIVE | T_RANGE_INCLUSIVE_REV | T_RANGE_EXCLUSIVE_REV | T_IS | T_AND | T_IMPLIES | T_LEXMATCH_QUESTION => Reduce(2, NT_arrow_fn_prefix_no_constraint, yy_action_548) _ => Error } } -fn yy_state_566(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_list_semis_single_pattern_case_, yy_action_537) +fn yy_state_899(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_FAT_ARROW => Shift(yy_state_649) + T_COMMA => Shift(yy_state_894) + T_RPAREN => Shift(yy_state_898) + T_COLON => Shift(yy_state_900) + T_INFIX1 | T_INFIX2 | T_INFIX3 | T_INFIX4 | T_CATCH | T_EQ_TILDE | T_LPAREN | T_MINUS | T_DOT_LIDENT | T_DOT_INT | T_LBRACKET | T_PLUS | T_BAR | T_AMPERAMPER | T_AMPER | T_CARET | T_BARBAR | T_AS | T_PIPE | T_PIPE_LEFT | T_LT_PLUS | T_LT_QUESTION | T_DOTDOT | T_RANGE_INCLUSIVE | T_RANGE_LT_INCLUSIVE | T_RANGE_EXCLUSIVE | T_RANGE_INCLUSIVE_REV | T_RANGE_EXCLUSIVE_REV | T_IS | T_IMPLIES | T_LEXMATCH_QUESTION => Reduce(1, NT_qual_ident_simple_expr, yy_action_932) + _ => Error + } } -fn yy_state_567(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_900(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RBRACE => Shift(yy_state_568) + T_ASYNC => Shift(yy_state_65) + T_UNDERSCORE => Shift(yy_state_70) + T_AMPER => Shift(yy_state_71) + T_PACKAGE_NAME => Shift(yy_state_73) + T_UIDENT => Shift(yy_state_80) + T_LPAREN => Shift(yy_state_84) + NT_simple_type => Shift(yy_state_110) + NT_type_ => Shift(yy_state_901) _ => Error } } -fn yy_state_568(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_901(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_NORAISE => Shift(yy_state_569) - T_EOF | T_RPAREN | T_COMMA | T_COLON | T_SEMI | T_RBRACKET | T_LBRACE | T_RBRACE | T_AND => Reduce(5, NT_try_expr, yy_action_536) + T_COMMA => Shift(yy_state_304) + T_RPAREN => Shift(yy_state_902) _ => Error } } -fn yy_state_569(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_902(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACE => Shift(yy_state_570) + T_FAT_ARROW => Reduce(4, NT_arrow_fn_prefix, yy_action_875) + T_INFIX1 | T_INFIX2 | T_INFIX3 | T_INFIX4 | T_EOF | T_CATCH | T_EQ_TILDE | T_LPAREN | T_RPAREN | T_COMMA | T_MINUS | T_DOT_LIDENT | T_DOT_INT | T_COLON | T_SEMI | T_LBRACKET | T_PLUS | T_RBRACKET | T_BAR_RBRACKET | T_BAR | T_LBRACE | T_RBRACE | T_AMPERAMPER | T_AMPER | T_CARET | T_BARBAR | T_AS | T_PIPE | T_PIPE_LEFT | T_LT_PLUS | T_LT_QUESTION | T_DOTDOT | T_RANGE_INCLUSIVE | T_RANGE_LT_INCLUSIVE | T_RANGE_EXCLUSIVE | T_RANGE_INCLUSIVE_REV | T_RANGE_EXCLUSIVE_REV | T_IS | T_AND | T_IMPLIES | T_LEXMATCH_QUESTION => Reduce(5, NT_tuple_expr, yy_action_547) _ => Error } } -fn yy_state_570(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_903(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_AMPER => Shift(yy_state_19) - NT_qual_ident_ty => Shift(yy_state_25) - T_UIDENT => Shift(yy_state_182) - T_LBRACE => Shift(yy_state_275) - T_LBRACKET => Shift(yy_state_279) - T_LPAREN => Shift(yy_state_293) - NT_constr => Shift(yy_state_294) - T_LIDENT => Shift(yy_state_307) - T_UNDERSCORE => Shift(yy_state_312) - T_BYTES => Shift(yy_state_313) - T_STRING => Shift(yy_state_314) - T_MINUS => Shift(yy_state_315) - T_FLOAT => Shift(yy_state_319) - T_DOUBLE => Shift(yy_state_320) - T_BYTE => Shift(yy_state_321) - T_INT => Shift(yy_state_322) - T_CHAR => Shift(yy_state_323) - T_FALSE => Shift(yy_state_324) - T_TRUE => Shift(yy_state_325) - NT_simple_pattern => Shift(yy_state_326) - NT_type_name => Shift(yy_state_329) - T_PACKAGE_NAME => Shift(yy_state_334) - NT_range_pattern => Shift(yy_state_337) - NT_or_pattern => Shift(yy_state_340) - NT_single_pattern_case => Shift(yy_state_541) - T_ELLIPSIS => Shift(yy_state_544) - NT_pattern => Shift(yy_state_545) - NT_non_empty_list_semis_single_pattern_case_ => Shift(yy_state_566) - NT_single_pattern_cases => Shift(yy_state_571) - NT_list_semis_single_pattern_case_ => Shift(yy_state_573) - T_RBRACE => Reduce(0, NT_list_semis_single_pattern_case_, yy_action_538) + T_FAT_ARROW => Shift(yy_state_904) + T_INFIX1 | T_INFIX2 | T_INFIX3 | T_INFIX4 | T_EOF | T_CATCH | T_EQ_TILDE | T_LPAREN | T_RPAREN | T_COMMA | T_MINUS | T_DOT_LIDENT | T_DOT_INT | T_COLON | T_SEMI | T_LBRACKET | T_PLUS | T_RBRACKET | T_BAR_RBRACKET | T_BAR | T_LBRACE | T_RBRACE | T_AMPERAMPER | T_AMPER | T_CARET | T_BARBAR | T_AS | T_PIPE | T_PIPE_LEFT | T_LT_PLUS | T_LT_QUESTION | T_DOTDOT | T_RANGE_INCLUSIVE | T_RANGE_LT_INCLUSIVE | T_RANGE_EXCLUSIVE | T_RANGE_INCLUSIVE_REV | T_RANGE_EXCLUSIVE_REV | T_IS | T_AND | T_IMPLIES | T_LEXMATCH_QUESTION => Reduce(1, NT_qual_ident_simple_expr, yy_action_933) _ => Error } } -fn yy_state_571(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_904(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RBRACE => Shift(yy_state_572) + T_LBRACE => Shift(yy_state_905) _ => Error } } -fn yy_state_572(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(9, NT_try_expr, yy_action_535) +fn yy_state_905(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + NT_multiline_string => Shift(yy_state_2) + T_MULTILINE_INTERP => Shift(yy_state_4) + T_MULTILINE_STRING => Shift(yy_state_5) + T_REGEX_LITERAL => Shift(yy_state_6) + T_STRING => Shift(yy_state_7) + T_FLOAT => Shift(yy_state_8) + T_DOUBLE => Shift(yy_state_9) + T_INT => Shift(yy_state_10) + T_CHAR => Shift(yy_state_11) + T_BYTES => Shift(yy_state_12) + T_BYTE => Shift(yy_state_13) + T_FALSE => Shift(yy_state_14) + T_TRUE => Shift(yy_state_15) + T_BYTES_INTERP => Shift(yy_state_16) + T_INTERP => Shift(yy_state_17) + NT_non_empty_list_multiline_string_ => Shift(yy_state_18) + NT_simple_constant => Shift(yy_state_19) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + NT_tuple_expr => Shift(yy_state_27) + T_LBRACKET_BAR => Shift(yy_state_28) + T_LBRACKET => Shift(yy_state_36) + NT_constr => Shift(yy_state_47) + NT_qual_ident_simple_expr => Shift(yy_state_48) + NT_atomic_expr => Shift(yy_state_50) + NT_anony_fn => Shift(yy_state_51) + T_LBRACE => Shift(yy_state_52) + NT_statement => Shift(yy_state_134) + NT_non_empty_list_semi_rev_aux_statement_ => Shift(yy_state_135) + NT_type_name => Shift(yy_state_139) + T_EXCLAMATION => Shift(yy_state_176) + T_MINUS => Shift(yy_state_191) + T_PLUS => Shift(yy_state_193) + T_UIDENT => Shift(yy_state_195) + NT_prefix_expr => Shift(yy_state_201) + NT_range_expr => Shift(yy_state_212) + NT_postfix_expr => Shift(yy_state_223) + T_EXISTS => Shift(yy_state_224) + T_FORALL => Shift(yy_state_256) + NT_infix_expr => Shift(yy_state_272) + T_UNDERSCORE => Shift(yy_state_273) + NT_qual_ident => Shift(yy_state_275) + NT_simple_expr => Shift(yy_state_276) + T_LPAREN => Shift(yy_state_281) + NT_pipe_expr => Shift(yy_state_325) + NT_non_empty_list_semis_rev_statement_ => Shift(yy_state_341) + NT_arrow_fn_expr => Shift(yy_state_344) + NT_quantifier_expr => Shift(yy_state_345) + NT_simple_try_expr => Shift(yy_state_346) + NT_lexscan_expr => Shift(yy_state_347) + NT_lexmatch_expr => Shift(yy_state_348) + NT_match_expr => Shift(yy_state_349) + NT_if_expr => Shift(yy_state_350) + NT_try_expr => Shift(yy_state_351) + NT_while_expr => Shift(yy_state_352) + NT_foreach_expr => Shift(yy_state_353) + NT_for_expr => Shift(yy_state_354) + T_LEXSCAN => Shift(yy_state_355) + NT_lexscan_header => Shift(yy_state_358) + T_LEXMATCH => Shift(yy_state_391) + NT_lexmatch_header => Shift(yy_state_399) + NT_match_header => Shift(yy_state_444) + T_MATCH => Shift(yy_state_605) + T_IF => Shift(yy_state_608) + T_TRY_EXCLAMATION => Shift(yy_state_614) + T_TRY_QUESTION => Shift(yy_state_616) + T_TRY => Shift(yy_state_618) + NT_loop_label_colon => Shift(yy_state_632) + T_POST_LABEL => Shift(yy_state_639) + NT_expr => Shift(yy_state_644) + NT_left_value => Shift(yy_state_645) + T_ELLIPSIS => Shift(yy_state_651) + T_RAISE => Shift(yy_state_652) + T_PACKAGE_NAME => Shift(yy_state_654) + T_EXTEND => Shift(yy_state_656) + T_LIDENT => Shift(yy_state_657) + NT_expr_statement_no_break_continue_return => Shift(yy_state_734) + T_RETURN => Shift(yy_state_735) + T_CONTINUE => Shift(yy_state_738) + T_BREAK => Shift(yy_state_747) + T_GUARD => Shift(yy_state_765) + NT_expr_statement => Shift(yy_state_769) + T_PROOF_LET => Shift(yy_state_770) + T_PROOF_ASSERT => Shift(yy_state_777) + T_DEFER => Shift(yy_state_779) + NT_guard_statement => Shift(yy_state_781) + T_FN => Shift(yy_state_782) + T_ASYNC => Shift(yy_state_791) + T_LETREC => Shift(yy_state_801) + T_LET => Shift(yy_state_849) + NT_list_semis_rev_statement_ => Shift(yy_state_906) + T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_1071) + T_RBRACE => Reduce(0, NT_list_semis_rev_statement_, yy_action_978) + _ => Error + } } -fn yy_state_573(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_single_pattern_cases, yy_action_534) +fn yy_state_906(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_RBRACE => Shift(yy_state_907) + _ => Error + } } -fn yy_state_574(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_907(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(5, NT_arrow_fn_with_explicit_braces, yy_action_546) +} + +fn yy_state_908(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACE => Shift(yy_state_575) + T_FAT_ARROW => Shift(yy_state_909) + T_INFIX1 | T_INFIX2 | T_INFIX3 | T_INFIX4 | T_EOF | T_CATCH | T_EQ_TILDE | T_LPAREN | T_RPAREN | T_COMMA | T_MINUS | T_DOT_LIDENT | T_DOT_INT | T_COLON | T_SEMI | T_LBRACKET | T_PLUS | T_RBRACKET | T_BAR_RBRACKET | T_BAR | T_LBRACE | T_RBRACE | T_AMPERAMPER | T_AMPER | T_CARET | T_BARBAR | T_AS | T_PIPE | T_PIPE_LEFT | T_LT_PLUS | T_LT_QUESTION | T_DOTDOT | T_RANGE_INCLUSIVE | T_RANGE_LT_INCLUSIVE | T_RANGE_EXCLUSIVE | T_RANGE_INCLUSIVE_REV | T_RANGE_EXCLUSIVE_REV | T_IS | T_AND | T_IMPLIES | T_LEXMATCH_QUESTION => Reduce(1, NT_qual_ident_simple_expr, yy_action_932) _ => Error } } -fn yy_state_575(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(2, NT_catch_keyword, yy_action_533) +fn yy_state_909(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_LBRACE => Shift(yy_state_910) + _ => Error + } } -fn yy_state_576(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(4, NT_single_pattern_case, yy_action_532) +fn yy_state_910(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + NT_multiline_string => Shift(yy_state_2) + T_MULTILINE_INTERP => Shift(yy_state_4) + T_MULTILINE_STRING => Shift(yy_state_5) + T_REGEX_LITERAL => Shift(yy_state_6) + T_STRING => Shift(yy_state_7) + T_FLOAT => Shift(yy_state_8) + T_DOUBLE => Shift(yy_state_9) + T_INT => Shift(yy_state_10) + T_CHAR => Shift(yy_state_11) + T_BYTES => Shift(yy_state_12) + T_BYTE => Shift(yy_state_13) + T_FALSE => Shift(yy_state_14) + T_TRUE => Shift(yy_state_15) + T_BYTES_INTERP => Shift(yy_state_16) + T_INTERP => Shift(yy_state_17) + NT_non_empty_list_multiline_string_ => Shift(yy_state_18) + NT_simple_constant => Shift(yy_state_19) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + NT_tuple_expr => Shift(yy_state_27) + T_LBRACKET_BAR => Shift(yy_state_28) + T_LBRACKET => Shift(yy_state_36) + NT_constr => Shift(yy_state_47) + NT_qual_ident_simple_expr => Shift(yy_state_48) + NT_atomic_expr => Shift(yy_state_50) + NT_anony_fn => Shift(yy_state_51) + T_LBRACE => Shift(yy_state_52) + NT_statement => Shift(yy_state_134) + NT_non_empty_list_semi_rev_aux_statement_ => Shift(yy_state_135) + NT_type_name => Shift(yy_state_139) + T_EXCLAMATION => Shift(yy_state_176) + T_MINUS => Shift(yy_state_191) + T_PLUS => Shift(yy_state_193) + T_UIDENT => Shift(yy_state_195) + NT_prefix_expr => Shift(yy_state_201) + NT_range_expr => Shift(yy_state_212) + NT_postfix_expr => Shift(yy_state_223) + T_EXISTS => Shift(yy_state_224) + T_FORALL => Shift(yy_state_256) + NT_infix_expr => Shift(yy_state_272) + T_UNDERSCORE => Shift(yy_state_273) + NT_qual_ident => Shift(yy_state_275) + NT_simple_expr => Shift(yy_state_276) + T_LPAREN => Shift(yy_state_281) + NT_pipe_expr => Shift(yy_state_325) + NT_non_empty_list_semis_rev_statement_ => Shift(yy_state_341) + NT_arrow_fn_expr => Shift(yy_state_344) + NT_quantifier_expr => Shift(yy_state_345) + NT_simple_try_expr => Shift(yy_state_346) + NT_lexscan_expr => Shift(yy_state_347) + NT_lexmatch_expr => Shift(yy_state_348) + NT_match_expr => Shift(yy_state_349) + NT_if_expr => Shift(yy_state_350) + NT_try_expr => Shift(yy_state_351) + NT_while_expr => Shift(yy_state_352) + NT_foreach_expr => Shift(yy_state_353) + NT_for_expr => Shift(yy_state_354) + T_LEXSCAN => Shift(yy_state_355) + NT_lexscan_header => Shift(yy_state_358) + T_LEXMATCH => Shift(yy_state_391) + NT_lexmatch_header => Shift(yy_state_399) + NT_match_header => Shift(yy_state_444) + T_MATCH => Shift(yy_state_605) + T_IF => Shift(yy_state_608) + T_TRY_EXCLAMATION => Shift(yy_state_614) + T_TRY_QUESTION => Shift(yy_state_616) + T_TRY => Shift(yy_state_618) + NT_loop_label_colon => Shift(yy_state_632) + T_POST_LABEL => Shift(yy_state_639) + NT_expr => Shift(yy_state_644) + NT_left_value => Shift(yy_state_645) + T_ELLIPSIS => Shift(yy_state_651) + T_RAISE => Shift(yy_state_652) + T_PACKAGE_NAME => Shift(yy_state_654) + T_EXTEND => Shift(yy_state_656) + T_LIDENT => Shift(yy_state_657) + NT_expr_statement_no_break_continue_return => Shift(yy_state_734) + T_RETURN => Shift(yy_state_735) + T_CONTINUE => Shift(yy_state_738) + T_BREAK => Shift(yy_state_747) + T_GUARD => Shift(yy_state_765) + NT_expr_statement => Shift(yy_state_769) + T_PROOF_LET => Shift(yy_state_770) + T_PROOF_ASSERT => Shift(yy_state_777) + T_DEFER => Shift(yy_state_779) + NT_guard_statement => Shift(yy_state_781) + T_FN => Shift(yy_state_782) + T_ASYNC => Shift(yy_state_791) + T_LETREC => Shift(yy_state_801) + T_LET => Shift(yy_state_849) + NT_list_semis_rev_statement_ => Shift(yy_state_911) + T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_1071) + T_RBRACE => Reduce(0, NT_list_semis_rev_statement_, yy_action_978) + _ => Error + } } -fn yy_state_577(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_911(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_FOR => Shift(yy_state_578) - T_WHILE => Shift(yy_state_658) + T_RBRACE => Shift(yy_state_912) _ => Error } } -fn yy_state_578(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_912(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(5, NT_arrow_fn_with_explicit_braces, yy_action_545) +} + +fn yy_state_913(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_foreach_binder => Shift(yy_state_579) - NT_non_empty_list_commas_rev_separated_pair_binder_EQUAL_expr__ => Shift(yy_state_580) - NT_non_empty_list_commas_rev_foreach_binder_ => Shift(yy_state_604) - T_UNDERSCORE => Shift(yy_state_607) - NT_non_empty_list_commas_no_trailing_separated_pair_binder_EQUAL_expr__ => Shift(yy_state_610) - T_LIDENT => Shift(yy_state_611) - NT_non_empty_list_commas_foreach_binder_ => Shift(yy_state_614) - NT_list_commas_no_trailing_separated_pair_binder_EQUAL_expr__ => Shift(yy_state_622) - NT_for_binders => Shift(yy_state_643) - T_SEMI | T_LBRACE => Reduce(0, NT_list_commas_no_trailing_separated_pair_binder_EQUAL_expr__, yy_action_531) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + T_UIDENT => Shift(yy_state_195) + NT_single_pattern_case => Shift(yy_state_445) + T_LBRACE => Shift(yy_state_448) + T_LBRACKET => Shift(yy_state_452) + T_LPAREN => Shift(yy_state_466) + NT_constr => Shift(yy_state_467) + T_EXTEND => Shift(yy_state_480) + T_LIDENT => Shift(yy_state_487) + T_UNDERSCORE => Shift(yy_state_491) + T_BYTES => Shift(yy_state_492) + T_STRING => Shift(yy_state_493) + T_MINUS => Shift(yy_state_494) + T_FLOAT => Shift(yy_state_498) + T_DOUBLE => Shift(yy_state_499) + T_BYTE => Shift(yy_state_500) + T_INT => Shift(yy_state_501) + T_CHAR => Shift(yy_state_502) + T_FALSE => Shift(yy_state_503) + T_TRUE => Shift(yy_state_504) + NT_simple_pattern => Shift(yy_state_505) + NT_type_name => Shift(yy_state_508) + T_PACKAGE_NAME => Shift(yy_state_513) + NT_range_pattern => Shift(yy_state_516) + NT_or_pattern => Shift(yy_state_519) + T_ELLIPSIS => Shift(yy_state_599) + NT_pattern => Shift(yy_state_600) + NT_non_empty_list_semis_single_pattern_case_ => Shift(yy_state_621) + NT_list_semis_single_pattern_case_ => Shift(yy_state_628) + NT_single_pattern_cases => Shift(yy_state_914) + T_RBRACE => Reduce(0, NT_list_semis_single_pattern_case_, yy_action_676) _ => Error } } -fn yy_state_579(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_non_empty_list_commas_rev_foreach_binder_, yy_action_530) +fn yy_state_914(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_RBRACE => Shift(yy_state_915) + _ => Error + } } -fn yy_state_580(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_915(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_COMMA => Shift(yy_state_581) - T_SEMI | T_LBRACE => Reduce(1, NT_non_empty_list_commas_no_trailing_separated_pair_binder_EQUAL_expr__, yy_action_529) + T_NORAISE => Shift(yy_state_916) + T_EOF | T_RPAREN | T_COMMA | T_COLON | T_SEMI | T_RBRACKET | T_BAR_RBRACKET | T_LBRACE | T_RBRACE | T_AND => Reduce(4, NT_simple_try_expr, yy_action_544) _ => Error } } -fn yy_state_581(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_916(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LIDENT => Shift(yy_state_582) + T_LBRACE => Shift(yy_state_917) _ => Error } } -fn yy_state_582(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_917(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_EQUAL => Shift(yy_state_583) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + T_UIDENT => Shift(yy_state_195) + NT_single_pattern_case => Shift(yy_state_445) + T_LBRACE => Shift(yy_state_448) + T_LBRACKET => Shift(yy_state_452) + T_LPAREN => Shift(yy_state_466) + NT_constr => Shift(yy_state_467) + T_EXTEND => Shift(yy_state_480) + T_LIDENT => Shift(yy_state_487) + T_UNDERSCORE => Shift(yy_state_491) + T_BYTES => Shift(yy_state_492) + T_STRING => Shift(yy_state_493) + T_MINUS => Shift(yy_state_494) + T_FLOAT => Shift(yy_state_498) + T_DOUBLE => Shift(yy_state_499) + T_BYTE => Shift(yy_state_500) + T_INT => Shift(yy_state_501) + T_CHAR => Shift(yy_state_502) + T_FALSE => Shift(yy_state_503) + T_TRUE => Shift(yy_state_504) + NT_simple_pattern => Shift(yy_state_505) + NT_type_name => Shift(yy_state_508) + T_PACKAGE_NAME => Shift(yy_state_513) + NT_range_pattern => Shift(yy_state_516) + NT_or_pattern => Shift(yy_state_519) + T_ELLIPSIS => Shift(yy_state_599) + NT_pattern => Shift(yy_state_600) + NT_non_empty_list_semis_single_pattern_case_ => Shift(yy_state_621) + NT_list_semis_single_pattern_case_ => Shift(yy_state_628) + NT_single_pattern_cases => Shift(yy_state_918) + T_RBRACE => Reduce(0, NT_list_semis_single_pattern_case_, yy_action_676) _ => Error } } -fn yy_state_583(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_918(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_multiline_string => Shift(yy_state_2) - T_MULTILINE_INTERP => Shift(yy_state_4) - T_MULTILINE_STRING => Shift(yy_state_5) - T_REGEX_LITERAL => Shift(yy_state_6) - T_STRING => Shift(yy_state_7) - T_FLOAT => Shift(yy_state_8) - T_DOUBLE => Shift(yy_state_9) - T_INT => Shift(yy_state_10) - T_CHAR => Shift(yy_state_11) - T_BYTES => Shift(yy_state_12) - T_BYTE => Shift(yy_state_13) - T_FALSE => Shift(yy_state_14) - T_TRUE => Shift(yy_state_15) - T_INTERP => Shift(yy_state_16) - NT_non_empty_list_multiline_string_ => Shift(yy_state_17) - NT_simple_constant => Shift(yy_state_18) - T_AMPER => Shift(yy_state_19) - NT_qual_ident_ty => Shift(yy_state_25) - NT_tuple_expr => Shift(yy_state_26) - T_LBRACKET => Shift(yy_state_27) - NT_constr => Shift(yy_state_35) - NT_qual_ident_simple_expr => Shift(yy_state_36) - NT_atomic_expr => Shift(yy_state_37) - NT_anony_fn => Shift(yy_state_38) - T_LBRACE => Shift(yy_state_39) - T_FN => Shift(yy_state_48) - NT_type_name => Shift(yy_state_126) - T_ASYNC => Shift(yy_state_138) - NT_simple_expr => Shift(yy_state_151) - T_EXCLAMATION => Shift(yy_state_162) - T_MINUS => Shift(yy_state_178) - T_PLUS => Shift(yy_state_180) - T_UIDENT => Shift(yy_state_182) - T_PACKAGE_NAME => Shift(yy_state_183) - NT_prefix_expr => Shift(yy_state_187) - NT_range_expr => Shift(yy_state_198) - NT_postfix_expr => Shift(yy_state_416) - T_EXISTS => Shift(yy_state_417) - T_FORALL => Shift(yy_state_449) - NT_infix_expr => Shift(yy_state_455) - T_UNDERSCORE => Shift(yy_state_456) - T_LPAREN => Shift(yy_state_464) - NT_pipe_expr => Shift(yy_state_497) - NT_arrow_fn_expr => Shift(yy_state_513) - NT_quantifier_expr => Shift(yy_state_514) - NT_simple_try_expr => Shift(yy_state_515) - NT_lexmatch_expr => Shift(yy_state_516) - NT_match_expr => Shift(yy_state_517) - NT_if_expr => Shift(yy_state_518) - NT_try_expr => Shift(yy_state_519) - NT_while_expr => Shift(yy_state_520) - NT_foreach_expr => Shift(yy_state_521) - NT_for_expr => Shift(yy_state_522) - T_LEXMATCH => Shift(yy_state_523) - NT_lexmatch_header => Shift(yy_state_529) - NT_match_header => Shift(yy_state_540) - T_MATCH => Shift(yy_state_550) - T_IF => Shift(yy_state_553) - T_TRY_EXCLAMATION => Shift(yy_state_559) - T_TRY_QUESTION => Shift(yy_state_561) - T_TRY => Shift(yy_state_563) - NT_loop_label_colon => Shift(yy_state_577) - NT_expr => Shift(yy_state_584) - T_POST_LABEL => Shift(yy_state_585) - T_LIDENT => Shift(yy_state_587) - T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_902) + T_RBRACE => Shift(yy_state_919) _ => Error } } -fn yy_state_584(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(5, NT_non_empty_list_commas_rev_separated_pair_binder_EQUAL_expr__, yy_action_528) +fn yy_state_919(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(8, NT_simple_try_expr, yy_action_542) } -fn yy_state_585(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_920(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_COLON => Shift(yy_state_586) + T_FAT_ARROW => Shift(yy_state_811) + T_INFIX1 | T_INFIX2 | T_INFIX3 | T_INFIX4 | T_EOF | T_CATCH | T_EQ_TILDE | T_LPAREN | T_RPAREN | T_COMMA | T_MINUS | T_DOT_LIDENT | T_DOT_INT | T_COLON | T_SEMI | T_LBRACKET | T_PLUS | T_RBRACKET | T_BAR_RBRACKET | T_BAR | T_LBRACE | T_RBRACE | T_AMPERAMPER | T_AMPER | T_CARET | T_BARBAR | T_AS | T_PIPE | T_PIPE_LEFT | T_LT_PLUS | T_LT_QUESTION | T_DOTDOT | T_RANGE_INCLUSIVE | T_RANGE_LT_INCLUSIVE | T_RANGE_EXCLUSIVE | T_RANGE_INCLUSIVE_REV | T_RANGE_EXCLUSIVE_REV | T_IS | T_AND | T_IMPLIES | T_LEXMATCH_QUESTION => Reduce(2, NT_tuple_expr, yy_action_950) _ => Error } } -fn yy_state_586(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(2, NT_loop_label_colon, yy_action_527) +fn yy_state_921(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_COLON => Shift(yy_state_640) + T_RPAREN | T_COMMA => Reduce(1, NT_argument, yy_action_541) + _ => Error + } } -fn yy_state_587(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_922(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_FAT_ARROW => Shift(yy_state_642) + NT_optional_question => Shift(yy_state_923) + T_QUESTION => Shift(yy_state_926) + T_EQUAL => Reduce(0, NT_optional_question, yy_action_540) + T_INFIX1 | T_INFIX2 | T_INFIX3 | T_INFIX4 | T_CATCH | T_EQ_TILDE | T_LPAREN | T_RPAREN | T_COMMA | T_MINUS | T_DOT_LIDENT | T_DOT_INT | T_LBRACKET | T_PLUS | T_BAR | T_AMPERAMPER | T_AMPER | T_CARET | T_BARBAR | T_AS | T_PIPE | T_PIPE_LEFT | T_LT_PLUS | T_LT_QUESTION | T_DOTDOT | T_RANGE_INCLUSIVE | T_RANGE_LT_INCLUSIVE | T_RANGE_EXCLUSIVE | T_RANGE_INCLUSIVE_REV | T_RANGE_EXCLUSIVE_REV | T_IS | T_IMPLIES | T_LEXMATCH_QUESTION => Reduce(1, NT_qual_ident_simple_expr, yy_action_933) + _ => Error + } +} + +fn yy_state_923(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_FAT_ARROW => Shift(yy_state_588) - T_INFIX1 | T_INFIX2 | T_INFIX3 | T_INFIX4 | T_EOF | T_CATCH | T_EQ_TILDE | T_LPAREN | T_RPAREN | T_COMMA | T_MINUS | T_DOT_LIDENT | T_DOT_INT | T_COLON | T_SEMI | T_LBRACKET | T_PLUS | T_RBRACKET | T_BAR | T_LBRACE | T_RBRACE | T_AMPERAMPER | T_AMPER | T_CARET | T_BARBAR | T_AS | T_PIPE | T_PIPE_LEFT | T_LT_PLUS | T_DOTDOT | T_RANGE_INCLUSIVE | T_RANGE_LT_INCLUSIVE | T_RANGE_EXCLUSIVE | T_RANGE_INCLUSIVE_REV | T_RANGE_EXCLUSIVE_REV | T_IS | T_AND | T_IMPLIES | T_LEXMATCH_QUESTION => Reduce(1, NT_qual_ident_simple_expr, yy_action_772) + T_EQUAL => Shift(yy_state_924) _ => Error } } -fn yy_state_588(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_924(_lookahead : YYSymbol) -> YYDecision { match _lookahead { NT_multiline_string => Shift(yy_state_2) T_MULTILINE_INTERP => Shift(yy_state_4) @@ -24297,86 +34392,100 @@ fn yy_state_588(_lookahead : YYSymbol) -> YYDecision { T_BYTE => Shift(yy_state_13) T_FALSE => Shift(yy_state_14) T_TRUE => Shift(yy_state_15) - T_INTERP => Shift(yy_state_16) - NT_non_empty_list_multiline_string_ => Shift(yy_state_17) - NT_simple_constant => Shift(yy_state_18) - T_AMPER => Shift(yy_state_19) - NT_qual_ident_ty => Shift(yy_state_25) - NT_tuple_expr => Shift(yy_state_26) - T_LBRACKET => Shift(yy_state_27) - NT_constr => Shift(yy_state_35) - NT_qual_ident_simple_expr => Shift(yy_state_36) - NT_atomic_expr => Shift(yy_state_37) - NT_anony_fn => Shift(yy_state_38) - T_LBRACE => Shift(yy_state_39) - T_FN => Shift(yy_state_48) - NT_type_name => Shift(yy_state_126) - T_ASYNC => Shift(yy_state_138) - T_EXCLAMATION => Shift(yy_state_162) - T_MINUS => Shift(yy_state_178) - T_PLUS => Shift(yy_state_180) - T_UIDENT => Shift(yy_state_182) - NT_prefix_expr => Shift(yy_state_187) - NT_range_expr => Shift(yy_state_198) - NT_postfix_expr => Shift(yy_state_416) - T_EXISTS => Shift(yy_state_417) - T_FORALL => Shift(yy_state_449) - NT_infix_expr => Shift(yy_state_455) - T_UNDERSCORE => Shift(yy_state_456) - NT_qual_ident => Shift(yy_state_458) - NT_simple_expr => Shift(yy_state_459) - T_LPAREN => Shift(yy_state_464) - NT_pipe_expr => Shift(yy_state_497) - NT_arrow_fn_expr => Shift(yy_state_513) - NT_quantifier_expr => Shift(yy_state_514) - NT_simple_try_expr => Shift(yy_state_515) - NT_lexmatch_expr => Shift(yy_state_516) - NT_match_expr => Shift(yy_state_517) - NT_if_expr => Shift(yy_state_518) - NT_try_expr => Shift(yy_state_519) - NT_while_expr => Shift(yy_state_520) - NT_foreach_expr => Shift(yy_state_521) - NT_for_expr => Shift(yy_state_522) - T_LEXMATCH => Shift(yy_state_523) - NT_lexmatch_header => Shift(yy_state_529) - NT_match_header => Shift(yy_state_540) - T_MATCH => Shift(yy_state_550) - T_IF => Shift(yy_state_553) - T_TRY_EXCLAMATION => Shift(yy_state_559) - T_TRY_QUESTION => Shift(yy_state_561) - T_TRY => Shift(yy_state_563) - NT_loop_label_colon => Shift(yy_state_577) - T_POST_LABEL => Shift(yy_state_585) - NT_expr_statement_no_break_continue_return => Shift(yy_state_589) - NT_expr => Shift(yy_state_590) - NT_left_value => Shift(yy_state_591) - T_ELLIPSIS => Shift(yy_state_598) - T_RAISE => Shift(yy_state_599) - T_PACKAGE_NAME => Shift(yy_state_601) - T_LIDENT => Shift(yy_state_603) - T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_902) + T_BYTES_INTERP => Shift(yy_state_16) + T_INTERP => Shift(yy_state_17) + NT_non_empty_list_multiline_string_ => Shift(yy_state_18) + NT_simple_constant => Shift(yy_state_19) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + NT_tuple_expr => Shift(yy_state_27) + T_LBRACKET_BAR => Shift(yy_state_28) + T_LBRACKET => Shift(yy_state_36) + NT_constr => Shift(yy_state_47) + NT_qual_ident_simple_expr => Shift(yy_state_48) + NT_atomic_expr => Shift(yy_state_50) + NT_anony_fn => Shift(yy_state_51) + T_LBRACE => Shift(yy_state_52) + T_FN => Shift(yy_state_61) + NT_type_name => Shift(yy_state_139) + T_ASYNC => Shift(yy_state_152) + NT_simple_expr => Shift(yy_state_165) + T_EXCLAMATION => Shift(yy_state_176) + T_MINUS => Shift(yy_state_191) + T_PLUS => Shift(yy_state_193) + T_UIDENT => Shift(yy_state_195) + T_PACKAGE_NAME => Shift(yy_state_196) + NT_prefix_expr => Shift(yy_state_201) + NT_range_expr => Shift(yy_state_212) + NT_postfix_expr => Shift(yy_state_223) + T_EXISTS => Shift(yy_state_224) + T_FORALL => Shift(yy_state_256) + NT_infix_expr => Shift(yy_state_272) + T_UNDERSCORE => Shift(yy_state_273) + T_LPAREN => Shift(yy_state_281) + NT_pipe_expr => Shift(yy_state_325) + NT_arrow_fn_expr => Shift(yy_state_344) + NT_quantifier_expr => Shift(yy_state_345) + NT_simple_try_expr => Shift(yy_state_346) + NT_lexscan_expr => Shift(yy_state_347) + NT_lexmatch_expr => Shift(yy_state_348) + NT_match_expr => Shift(yy_state_349) + NT_if_expr => Shift(yy_state_350) + NT_try_expr => Shift(yy_state_351) + NT_while_expr => Shift(yy_state_352) + NT_foreach_expr => Shift(yy_state_353) + NT_for_expr => Shift(yy_state_354) + T_LEXSCAN => Shift(yy_state_355) + NT_lexscan_header => Shift(yy_state_358) + T_LEXMATCH => Shift(yy_state_391) + NT_lexmatch_header => Shift(yy_state_399) + NT_match_header => Shift(yy_state_444) + T_MATCH => Shift(yy_state_605) + T_IF => Shift(yy_state_608) + T_TRY_EXCLAMATION => Shift(yy_state_614) + T_TRY_QUESTION => Shift(yy_state_616) + T_TRY => Shift(yy_state_618) + NT_loop_label_colon => Shift(yy_state_632) + T_POST_LABEL => Shift(yy_state_639) + T_EXTEND => Shift(yy_state_641) + T_LIDENT => Shift(yy_state_648) + NT_expr => Shift(yy_state_925) + T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_1071) _ => Error } } -fn yy_state_589(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_arrow_fn_expr, yy_action_526) +fn yy_state_925(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(4, NT_argument, yy_action_539) } -fn yy_state_590(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_expr_statement_no_break_continue_return, yy_action_525) +fn yy_state_926(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_EQUAL => Reduce(1, NT_optional_question, yy_action_538) + T_RPAREN | T_COMMA => Reduce(2, NT_argument, yy_action_537) + _ => Error + } } -fn yy_state_591(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_927(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_EQUAL => Shift(yy_state_592) - T_AUGMENTED_ASSIGNMENT => Shift(yy_state_594) - T_PLUS_EQUAL => Shift(yy_state_596) + T_FAT_ARROW => Shift(yy_state_649) + NT_optional_question => Shift(yy_state_928) + T_QUESTION => Shift(yy_state_931) + T_EQUAL => Reduce(0, NT_optional_question, yy_action_540) + T_INFIX1 | T_INFIX2 | T_INFIX3 | T_INFIX4 | T_CATCH | T_EQ_TILDE | T_LPAREN | T_RPAREN | T_COMMA | T_MINUS | T_DOT_LIDENT | T_DOT_INT | T_LBRACKET | T_PLUS | T_BAR | T_AMPERAMPER | T_AMPER | T_CARET | T_BARBAR | T_AS | T_PIPE | T_PIPE_LEFT | T_LT_PLUS | T_LT_QUESTION | T_DOTDOT | T_RANGE_INCLUSIVE | T_RANGE_LT_INCLUSIVE | T_RANGE_EXCLUSIVE | T_RANGE_INCLUSIVE_REV | T_RANGE_EXCLUSIVE_REV | T_IS | T_IMPLIES | T_LEXMATCH_QUESTION => Reduce(1, NT_qual_ident_simple_expr, yy_action_932) _ => Error } } -fn yy_state_592(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_928(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_EQUAL => Shift(yy_state_929) + _ => Error + } +} + +fn yy_state_929(_lookahead : YYSymbol) -> YYDecision { match _lookahead { NT_multiline_string => Shift(yy_state_2) T_MULTILINE_INTERP => Shift(yy_state_4) @@ -24391,68 +34500,82 @@ fn yy_state_592(_lookahead : YYSymbol) -> YYDecision { T_BYTE => Shift(yy_state_13) T_FALSE => Shift(yy_state_14) T_TRUE => Shift(yy_state_15) - T_INTERP => Shift(yy_state_16) - NT_non_empty_list_multiline_string_ => Shift(yy_state_17) - NT_simple_constant => Shift(yy_state_18) - T_AMPER => Shift(yy_state_19) - NT_qual_ident_ty => Shift(yy_state_25) - NT_tuple_expr => Shift(yy_state_26) - T_LBRACKET => Shift(yy_state_27) - NT_constr => Shift(yy_state_35) - NT_qual_ident_simple_expr => Shift(yy_state_36) - NT_atomic_expr => Shift(yy_state_37) - NT_anony_fn => Shift(yy_state_38) - T_LBRACE => Shift(yy_state_39) - T_FN => Shift(yy_state_48) - NT_type_name => Shift(yy_state_126) - T_ASYNC => Shift(yy_state_138) - NT_simple_expr => Shift(yy_state_151) - T_EXCLAMATION => Shift(yy_state_162) - T_MINUS => Shift(yy_state_178) - T_PLUS => Shift(yy_state_180) - T_UIDENT => Shift(yy_state_182) - T_PACKAGE_NAME => Shift(yy_state_183) - NT_prefix_expr => Shift(yy_state_187) - NT_range_expr => Shift(yy_state_198) - NT_postfix_expr => Shift(yy_state_416) - T_EXISTS => Shift(yy_state_417) - T_FORALL => Shift(yy_state_449) - NT_infix_expr => Shift(yy_state_455) - T_UNDERSCORE => Shift(yy_state_456) - T_LPAREN => Shift(yy_state_464) - NT_pipe_expr => Shift(yy_state_497) - NT_arrow_fn_expr => Shift(yy_state_513) - NT_quantifier_expr => Shift(yy_state_514) - NT_simple_try_expr => Shift(yy_state_515) - NT_lexmatch_expr => Shift(yy_state_516) - NT_match_expr => Shift(yy_state_517) - NT_if_expr => Shift(yy_state_518) - NT_try_expr => Shift(yy_state_519) - NT_while_expr => Shift(yy_state_520) - NT_foreach_expr => Shift(yy_state_521) - NT_for_expr => Shift(yy_state_522) - T_LEXMATCH => Shift(yy_state_523) - NT_lexmatch_header => Shift(yy_state_529) - NT_match_header => Shift(yy_state_540) - T_MATCH => Shift(yy_state_550) - T_IF => Shift(yy_state_553) - T_TRY_EXCLAMATION => Shift(yy_state_559) - T_TRY_QUESTION => Shift(yy_state_561) - T_TRY => Shift(yy_state_563) - NT_loop_label_colon => Shift(yy_state_577) - T_POST_LABEL => Shift(yy_state_585) - T_LIDENT => Shift(yy_state_587) - NT_expr => Shift(yy_state_593) - T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_902) + T_BYTES_INTERP => Shift(yy_state_16) + T_INTERP => Shift(yy_state_17) + NT_non_empty_list_multiline_string_ => Shift(yy_state_18) + NT_simple_constant => Shift(yy_state_19) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + NT_tuple_expr => Shift(yy_state_27) + T_LBRACKET_BAR => Shift(yy_state_28) + T_LBRACKET => Shift(yy_state_36) + NT_constr => Shift(yy_state_47) + NT_qual_ident_simple_expr => Shift(yy_state_48) + NT_atomic_expr => Shift(yy_state_50) + NT_anony_fn => Shift(yy_state_51) + T_LBRACE => Shift(yy_state_52) + T_FN => Shift(yy_state_61) + NT_type_name => Shift(yy_state_139) + T_ASYNC => Shift(yy_state_152) + NT_simple_expr => Shift(yy_state_165) + T_EXCLAMATION => Shift(yy_state_176) + T_MINUS => Shift(yy_state_191) + T_PLUS => Shift(yy_state_193) + T_UIDENT => Shift(yy_state_195) + T_PACKAGE_NAME => Shift(yy_state_196) + NT_prefix_expr => Shift(yy_state_201) + NT_range_expr => Shift(yy_state_212) + NT_postfix_expr => Shift(yy_state_223) + T_EXISTS => Shift(yy_state_224) + T_FORALL => Shift(yy_state_256) + NT_infix_expr => Shift(yy_state_272) + T_UNDERSCORE => Shift(yy_state_273) + T_LPAREN => Shift(yy_state_281) + NT_pipe_expr => Shift(yy_state_325) + NT_arrow_fn_expr => Shift(yy_state_344) + NT_quantifier_expr => Shift(yy_state_345) + NT_simple_try_expr => Shift(yy_state_346) + NT_lexscan_expr => Shift(yy_state_347) + NT_lexmatch_expr => Shift(yy_state_348) + NT_match_expr => Shift(yy_state_349) + NT_if_expr => Shift(yy_state_350) + NT_try_expr => Shift(yy_state_351) + NT_while_expr => Shift(yy_state_352) + NT_foreach_expr => Shift(yy_state_353) + NT_for_expr => Shift(yy_state_354) + T_LEXSCAN => Shift(yy_state_355) + NT_lexscan_header => Shift(yy_state_358) + T_LEXMATCH => Shift(yy_state_391) + NT_lexmatch_header => Shift(yy_state_399) + NT_match_header => Shift(yy_state_444) + T_MATCH => Shift(yy_state_605) + T_IF => Shift(yy_state_608) + T_TRY_EXCLAMATION => Shift(yy_state_614) + T_TRY_QUESTION => Shift(yy_state_616) + T_TRY => Shift(yy_state_618) + NT_loop_label_colon => Shift(yy_state_632) + T_POST_LABEL => Shift(yy_state_639) + T_EXTEND => Shift(yy_state_641) + T_LIDENT => Shift(yy_state_648) + NT_expr => Shift(yy_state_930) + T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_1071) _ => Error } } -fn yy_state_593(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_expr_statement_no_break_continue_return, yy_action_523) +fn yy_state_930(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(4, NT_argument, yy_action_536) } -fn yy_state_594(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_931(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_EQUAL => Reduce(1, NT_optional_question, yy_action_538) + T_RPAREN | T_COMMA => Reduce(2, NT_argument, yy_action_535) + _ => Error + } +} + +fn yy_state_932(_lookahead : YYSymbol) -> YYDecision { match _lookahead { NT_multiline_string => Shift(yy_state_2) T_MULTILINE_INTERP => Shift(yy_state_4) @@ -24467,68 +34590,79 @@ fn yy_state_594(_lookahead : YYSymbol) -> YYDecision { T_BYTE => Shift(yy_state_13) T_FALSE => Shift(yy_state_14) T_TRUE => Shift(yy_state_15) - T_INTERP => Shift(yy_state_16) - NT_non_empty_list_multiline_string_ => Shift(yy_state_17) - NT_simple_constant => Shift(yy_state_18) - T_AMPER => Shift(yy_state_19) - NT_qual_ident_ty => Shift(yy_state_25) - NT_tuple_expr => Shift(yy_state_26) - T_LBRACKET => Shift(yy_state_27) - NT_constr => Shift(yy_state_35) - NT_qual_ident_simple_expr => Shift(yy_state_36) - NT_atomic_expr => Shift(yy_state_37) - NT_anony_fn => Shift(yy_state_38) - T_LBRACE => Shift(yy_state_39) - T_FN => Shift(yy_state_48) - NT_type_name => Shift(yy_state_126) - T_ASYNC => Shift(yy_state_138) - NT_simple_expr => Shift(yy_state_151) - T_EXCLAMATION => Shift(yy_state_162) - T_MINUS => Shift(yy_state_178) - T_PLUS => Shift(yy_state_180) - T_UIDENT => Shift(yy_state_182) - T_PACKAGE_NAME => Shift(yy_state_183) - NT_prefix_expr => Shift(yy_state_187) - NT_range_expr => Shift(yy_state_198) - NT_postfix_expr => Shift(yy_state_416) - T_EXISTS => Shift(yy_state_417) - T_FORALL => Shift(yy_state_449) - NT_infix_expr => Shift(yy_state_455) - T_UNDERSCORE => Shift(yy_state_456) - T_LPAREN => Shift(yy_state_464) - NT_pipe_expr => Shift(yy_state_497) - NT_arrow_fn_expr => Shift(yy_state_513) - NT_quantifier_expr => Shift(yy_state_514) - NT_simple_try_expr => Shift(yy_state_515) - NT_lexmatch_expr => Shift(yy_state_516) - NT_match_expr => Shift(yy_state_517) - NT_if_expr => Shift(yy_state_518) - NT_try_expr => Shift(yy_state_519) - NT_while_expr => Shift(yy_state_520) - NT_foreach_expr => Shift(yy_state_521) - NT_for_expr => Shift(yy_state_522) - T_LEXMATCH => Shift(yy_state_523) - NT_lexmatch_header => Shift(yy_state_529) - NT_match_header => Shift(yy_state_540) - T_MATCH => Shift(yy_state_550) - T_IF => Shift(yy_state_553) - T_TRY_EXCLAMATION => Shift(yy_state_559) - T_TRY_QUESTION => Shift(yy_state_561) - T_TRY => Shift(yy_state_563) - NT_loop_label_colon => Shift(yy_state_577) - T_POST_LABEL => Shift(yy_state_585) - T_LIDENT => Shift(yy_state_587) - NT_expr => Shift(yy_state_595) - T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_902) + T_BYTES_INTERP => Shift(yy_state_16) + T_INTERP => Shift(yy_state_17) + NT_non_empty_list_multiline_string_ => Shift(yy_state_18) + NT_simple_constant => Shift(yy_state_19) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + NT_tuple_expr => Shift(yy_state_27) + T_LBRACKET_BAR => Shift(yy_state_28) + T_LBRACKET => Shift(yy_state_36) + NT_constr => Shift(yy_state_47) + NT_qual_ident_simple_expr => Shift(yy_state_48) + NT_atomic_expr => Shift(yy_state_50) + NT_anony_fn => Shift(yy_state_51) + T_LBRACE => Shift(yy_state_52) + T_FN => Shift(yy_state_61) + NT_type_name => Shift(yy_state_139) + T_ASYNC => Shift(yy_state_152) + NT_simple_expr => Shift(yy_state_165) + T_EXCLAMATION => Shift(yy_state_176) + T_MINUS => Shift(yy_state_191) + T_PLUS => Shift(yy_state_193) + T_UIDENT => Shift(yy_state_195) + T_PACKAGE_NAME => Shift(yy_state_196) + NT_prefix_expr => Shift(yy_state_201) + NT_range_expr => Shift(yy_state_212) + NT_postfix_expr => Shift(yy_state_223) + T_EXISTS => Shift(yy_state_224) + T_FORALL => Shift(yy_state_256) + NT_infix_expr => Shift(yy_state_272) + T_UNDERSCORE => Shift(yy_state_273) + T_LPAREN => Shift(yy_state_281) + NT_pipe_expr => Shift(yy_state_325) + NT_arrow_fn_expr => Shift(yy_state_344) + NT_quantifier_expr => Shift(yy_state_345) + NT_simple_try_expr => Shift(yy_state_346) + NT_lexscan_expr => Shift(yy_state_347) + NT_lexmatch_expr => Shift(yy_state_348) + NT_match_expr => Shift(yy_state_349) + NT_if_expr => Shift(yy_state_350) + NT_try_expr => Shift(yy_state_351) + NT_while_expr => Shift(yy_state_352) + NT_foreach_expr => Shift(yy_state_353) + NT_for_expr => Shift(yy_state_354) + T_LEXSCAN => Shift(yy_state_355) + NT_lexscan_header => Shift(yy_state_358) + T_LEXMATCH => Shift(yy_state_391) + NT_lexmatch_header => Shift(yy_state_399) + NT_match_header => Shift(yy_state_444) + T_MATCH => Shift(yy_state_605) + T_IF => Shift(yy_state_608) + T_TRY_EXCLAMATION => Shift(yy_state_614) + T_TRY_QUESTION => Shift(yy_state_616) + T_TRY => Shift(yy_state_618) + NT_loop_label_colon => Shift(yy_state_632) + T_POST_LABEL => Shift(yy_state_639) + T_EXTEND => Shift(yy_state_641) + T_LIDENT => Shift(yy_state_648) + NT_option_expr_ => Shift(yy_state_933) + NT_expr => Shift(yy_state_937) + T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_1071) + T_COLON => Reduce(0, NT_option_expr_, yy_action_615) _ => Error } } -fn yy_state_595(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_expr_statement_no_break_continue_return, yy_action_520) +fn yy_state_933(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_COLON => Shift(yy_state_934) + _ => Error + } } -fn yy_state_596(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_934(_lookahead : YYSymbol) -> YYDecision { match _lookahead { NT_multiline_string => Shift(yy_state_2) T_MULTILINE_INTERP => Shift(yy_state_4) @@ -24543,72 +34677,116 @@ fn yy_state_596(_lookahead : YYSymbol) -> YYDecision { T_BYTE => Shift(yy_state_13) T_FALSE => Shift(yy_state_14) T_TRUE => Shift(yy_state_15) - T_INTERP => Shift(yy_state_16) - NT_non_empty_list_multiline_string_ => Shift(yy_state_17) - NT_simple_constant => Shift(yy_state_18) - T_AMPER => Shift(yy_state_19) - NT_qual_ident_ty => Shift(yy_state_25) - NT_tuple_expr => Shift(yy_state_26) - T_LBRACKET => Shift(yy_state_27) - NT_constr => Shift(yy_state_35) - NT_qual_ident_simple_expr => Shift(yy_state_36) - NT_atomic_expr => Shift(yy_state_37) - NT_anony_fn => Shift(yy_state_38) - T_LBRACE => Shift(yy_state_39) - T_FN => Shift(yy_state_48) - NT_type_name => Shift(yy_state_126) - T_ASYNC => Shift(yy_state_138) - NT_simple_expr => Shift(yy_state_151) - T_EXCLAMATION => Shift(yy_state_162) - T_MINUS => Shift(yy_state_178) - T_PLUS => Shift(yy_state_180) - T_UIDENT => Shift(yy_state_182) - T_PACKAGE_NAME => Shift(yy_state_183) - NT_prefix_expr => Shift(yy_state_187) - NT_range_expr => Shift(yy_state_198) - NT_postfix_expr => Shift(yy_state_416) - T_EXISTS => Shift(yy_state_417) - T_FORALL => Shift(yy_state_449) - NT_infix_expr => Shift(yy_state_455) - T_UNDERSCORE => Shift(yy_state_456) - T_LPAREN => Shift(yy_state_464) - NT_pipe_expr => Shift(yy_state_497) - NT_arrow_fn_expr => Shift(yy_state_513) - NT_quantifier_expr => Shift(yy_state_514) - NT_simple_try_expr => Shift(yy_state_515) - NT_lexmatch_expr => Shift(yy_state_516) - NT_match_expr => Shift(yy_state_517) - NT_if_expr => Shift(yy_state_518) - NT_try_expr => Shift(yy_state_519) - NT_while_expr => Shift(yy_state_520) - NT_foreach_expr => Shift(yy_state_521) - NT_for_expr => Shift(yy_state_522) - T_LEXMATCH => Shift(yy_state_523) - NT_lexmatch_header => Shift(yy_state_529) - NT_match_header => Shift(yy_state_540) - T_MATCH => Shift(yy_state_550) - T_IF => Shift(yy_state_553) - T_TRY_EXCLAMATION => Shift(yy_state_559) - T_TRY_QUESTION => Shift(yy_state_561) - T_TRY => Shift(yy_state_563) - NT_loop_label_colon => Shift(yy_state_577) - T_POST_LABEL => Shift(yy_state_585) - T_LIDENT => Shift(yy_state_587) - NT_expr => Shift(yy_state_597) - T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_902) + T_BYTES_INTERP => Shift(yy_state_16) + T_INTERP => Shift(yy_state_17) + NT_non_empty_list_multiline_string_ => Shift(yy_state_18) + NT_simple_constant => Shift(yy_state_19) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + NT_tuple_expr => Shift(yy_state_27) + T_LBRACKET_BAR => Shift(yy_state_28) + T_LBRACKET => Shift(yy_state_36) + NT_constr => Shift(yy_state_47) + NT_qual_ident_simple_expr => Shift(yy_state_48) + NT_atomic_expr => Shift(yy_state_50) + NT_anony_fn => Shift(yy_state_51) + T_LBRACE => Shift(yy_state_52) + T_FN => Shift(yy_state_61) + NT_type_name => Shift(yy_state_139) + T_ASYNC => Shift(yy_state_152) + NT_simple_expr => Shift(yy_state_165) + T_EXCLAMATION => Shift(yy_state_176) + T_MINUS => Shift(yy_state_191) + T_PLUS => Shift(yy_state_193) + T_UIDENT => Shift(yy_state_195) + T_PACKAGE_NAME => Shift(yy_state_196) + NT_prefix_expr => Shift(yy_state_201) + NT_range_expr => Shift(yy_state_212) + NT_postfix_expr => Shift(yy_state_223) + T_EXISTS => Shift(yy_state_224) + T_FORALL => Shift(yy_state_256) + NT_infix_expr => Shift(yy_state_272) + T_UNDERSCORE => Shift(yy_state_273) + T_LPAREN => Shift(yy_state_281) + NT_pipe_expr => Shift(yy_state_325) + NT_arrow_fn_expr => Shift(yy_state_344) + NT_quantifier_expr => Shift(yy_state_345) + NT_simple_try_expr => Shift(yy_state_346) + NT_lexscan_expr => Shift(yy_state_347) + NT_lexmatch_expr => Shift(yy_state_348) + NT_match_expr => Shift(yy_state_349) + NT_if_expr => Shift(yy_state_350) + NT_try_expr => Shift(yy_state_351) + NT_while_expr => Shift(yy_state_352) + NT_foreach_expr => Shift(yy_state_353) + NT_for_expr => Shift(yy_state_354) + T_LEXSCAN => Shift(yy_state_355) + NT_lexscan_header => Shift(yy_state_358) + T_LEXMATCH => Shift(yy_state_391) + NT_lexmatch_header => Shift(yy_state_399) + NT_match_header => Shift(yy_state_444) + T_MATCH => Shift(yy_state_605) + T_IF => Shift(yy_state_608) + T_TRY_EXCLAMATION => Shift(yy_state_614) + T_TRY_QUESTION => Shift(yy_state_616) + T_TRY => Shift(yy_state_618) + NT_loop_label_colon => Shift(yy_state_632) + T_POST_LABEL => Shift(yy_state_639) + T_EXTEND => Shift(yy_state_641) + T_LIDENT => Shift(yy_state_648) + NT_expr => Shift(yy_state_736) + NT_option_expr_ => Shift(yy_state_935) + T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_1071) + T_RBRACKET => Reduce(0, NT_option_expr_, yy_action_615) _ => Error } } -fn yy_state_597(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_expr_statement_no_break_continue_return, yy_action_517) +fn yy_state_935(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_RBRACKET => Shift(yy_state_936) + _ => Error + } } -fn yy_state_598(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_expr_statement_no_break_continue_return, yy_action_516) +fn yy_state_936(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(6, NT_simple_expr, yy_action_534) } -fn yy_state_599(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_937(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_RBRACKET => Shift(yy_state_938) + T_COLON => Reduce(1, NT_option_expr_, yy_action_614) + _ => Error + } +} + +fn yy_state_938(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_AUGMENTED_ASSIGNMENT | T_PLUS_EQUAL | T_EQUAL => Reduce(4, NT_left_value, yy_action_532) + T_INFIX1 | T_INFIX2 | T_INFIX3 | T_INFIX4 | T_EOF | T_CATCH | T_EQ_TILDE | T_LPAREN | T_RPAREN | T_COMMA | T_MINUS | T_DOT_LIDENT | T_DOT_INT | T_COLON | T_SEMI | T_LBRACKET | T_PLUS | T_RBRACKET | T_BAR_RBRACKET | T_BAR | T_LBRACE | T_RBRACE | T_AMPERAMPER | T_AMPER | T_CARET | T_BARBAR | T_AS | T_PIPE | T_PIPE_LEFT | T_LT_PLUS | T_LT_QUESTION | T_DOTDOT | T_RANGE_INCLUSIVE | T_RANGE_LT_INCLUSIVE | T_RANGE_EXCLUSIVE | T_RANGE_INCLUSIVE_REV | T_RANGE_EXCLUSIVE_REV | T_IS | T_AND | T_IMPLIES | T_LEXMATCH_QUESTION => Reduce(4, NT_simple_expr, yy_action_533) + _ => Error + } +} + +fn yy_state_939(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_AUGMENTED_ASSIGNMENT | T_PLUS_EQUAL | T_EQUAL => Reduce(2, NT_left_value, yy_action_530) + T_INFIX1 | T_INFIX2 | T_INFIX3 | T_INFIX4 | T_EOF | T_CATCH | T_EQ_TILDE | T_LPAREN | T_RPAREN | T_COMMA | T_MINUS | T_DOT_LIDENT | T_DOT_INT | T_COLON | T_SEMI | T_LBRACKET | T_PLUS | T_RBRACKET | T_BAR_RBRACKET | T_BAR | T_LBRACE | T_RBRACE | T_AMPERAMPER | T_AMPER | T_CARET | T_BARBAR | T_AS | T_PIPE | T_PIPE_LEFT | T_LT_PLUS | T_LT_QUESTION | T_DOTDOT | T_RANGE_INCLUSIVE | T_RANGE_LT_INCLUSIVE | T_RANGE_EXCLUSIVE | T_RANGE_INCLUSIVE_REV | T_RANGE_EXCLUSIVE_REV | T_IS | T_AND | T_IMPLIES | T_LEXMATCH_QUESTION => Reduce(2, NT_simple_expr, yy_action_956) + _ => Error + } +} + +fn yy_state_940(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_LPAREN => Shift(yy_state_941) + T_AUGMENTED_ASSIGNMENT | T_PLUS_EQUAL | T_EQUAL => Reduce(2, NT_left_value, yy_action_527) + T_INFIX1 | T_INFIX2 | T_INFIX3 | T_INFIX4 | T_EOF | T_CATCH | T_EQ_TILDE | T_RPAREN | T_COMMA | T_MINUS | T_DOT_LIDENT | T_DOT_INT | T_COLON | T_SEMI | T_LBRACKET | T_PLUS | T_RBRACKET | T_BAR_RBRACKET | T_BAR | T_LBRACE | T_RBRACE | T_AMPERAMPER | T_AMPER | T_CARET | T_BARBAR | T_AS | T_PIPE | T_PIPE_LEFT | T_LT_PLUS | T_LT_QUESTION | T_DOTDOT | T_RANGE_INCLUSIVE | T_RANGE_LT_INCLUSIVE | T_RANGE_EXCLUSIVE | T_RANGE_INCLUSIVE_REV | T_RANGE_EXCLUSIVE_REV | T_IS | T_AND | T_IMPLIES | T_LEXMATCH_QUESTION => Reduce(2, NT_simple_expr, yy_action_529) + _ => Error + } +} + +fn yy_state_941(_lookahead : YYSymbol) -> YYDecision { match _lookahead { NT_multiline_string => Shift(yy_state_2) T_MULTILINE_INTERP => Shift(yy_state_4) @@ -24623,511 +34801,429 @@ fn yy_state_599(_lookahead : YYSymbol) -> YYDecision { T_BYTE => Shift(yy_state_13) T_FALSE => Shift(yy_state_14) T_TRUE => Shift(yy_state_15) - T_INTERP => Shift(yy_state_16) - NT_non_empty_list_multiline_string_ => Shift(yy_state_17) - NT_simple_constant => Shift(yy_state_18) - T_AMPER => Shift(yy_state_19) - NT_qual_ident_ty => Shift(yy_state_25) - NT_tuple_expr => Shift(yy_state_26) - T_LBRACKET => Shift(yy_state_27) - NT_constr => Shift(yy_state_35) - NT_qual_ident_simple_expr => Shift(yy_state_36) - NT_atomic_expr => Shift(yy_state_37) - NT_anony_fn => Shift(yy_state_38) - T_LBRACE => Shift(yy_state_39) - T_FN => Shift(yy_state_48) - NT_type_name => Shift(yy_state_126) - T_ASYNC => Shift(yy_state_138) - NT_simple_expr => Shift(yy_state_151) - T_EXCLAMATION => Shift(yy_state_162) - T_MINUS => Shift(yy_state_178) - T_PLUS => Shift(yy_state_180) - T_UIDENT => Shift(yy_state_182) - T_PACKAGE_NAME => Shift(yy_state_183) - NT_prefix_expr => Shift(yy_state_187) - NT_range_expr => Shift(yy_state_198) - NT_postfix_expr => Shift(yy_state_416) - T_EXISTS => Shift(yy_state_417) - T_FORALL => Shift(yy_state_449) - NT_infix_expr => Shift(yy_state_455) - T_UNDERSCORE => Shift(yy_state_456) - T_LPAREN => Shift(yy_state_464) - NT_pipe_expr => Shift(yy_state_497) - NT_arrow_fn_expr => Shift(yy_state_513) - NT_quantifier_expr => Shift(yy_state_514) - NT_simple_try_expr => Shift(yy_state_515) - NT_lexmatch_expr => Shift(yy_state_516) - NT_match_expr => Shift(yy_state_517) - NT_if_expr => Shift(yy_state_518) - NT_try_expr => Shift(yy_state_519) - NT_while_expr => Shift(yy_state_520) - NT_foreach_expr => Shift(yy_state_521) - NT_for_expr => Shift(yy_state_522) - T_LEXMATCH => Shift(yy_state_523) - NT_lexmatch_header => Shift(yy_state_529) - NT_match_header => Shift(yy_state_540) - T_MATCH => Shift(yy_state_550) - T_IF => Shift(yy_state_553) - T_TRY_EXCLAMATION => Shift(yy_state_559) - T_TRY_QUESTION => Shift(yy_state_561) - T_TRY => Shift(yy_state_563) - NT_loop_label_colon => Shift(yy_state_577) - T_POST_LABEL => Shift(yy_state_585) - T_LIDENT => Shift(yy_state_587) - NT_expr => Shift(yy_state_600) - T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_902) + T_BYTES_INTERP => Shift(yy_state_16) + T_INTERP => Shift(yy_state_17) + NT_non_empty_list_multiline_string_ => Shift(yy_state_18) + NT_simple_constant => Shift(yy_state_19) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + NT_tuple_expr => Shift(yy_state_27) + T_LBRACKET_BAR => Shift(yy_state_28) + T_LBRACKET => Shift(yy_state_36) + NT_constr => Shift(yy_state_47) + NT_qual_ident_simple_expr => Shift(yy_state_48) + NT_atomic_expr => Shift(yy_state_50) + NT_anony_fn => Shift(yy_state_51) + T_LBRACE => Shift(yy_state_52) + T_FN => Shift(yy_state_61) + NT_type_name => Shift(yy_state_139) + T_ASYNC => Shift(yy_state_152) + NT_simple_expr => Shift(yy_state_165) + NT_argument => Shift(yy_state_170) + NT_non_empty_list_commas_rev_argument_ => Shift(yy_state_171) + NT_expr => Shift(yy_state_175) + T_EXCLAMATION => Shift(yy_state_176) + T_MINUS => Shift(yy_state_191) + T_PLUS => Shift(yy_state_193) + T_UIDENT => Shift(yy_state_195) + T_PACKAGE_NAME => Shift(yy_state_196) + NT_prefix_expr => Shift(yy_state_201) + NT_range_expr => Shift(yy_state_212) + NT_postfix_expr => Shift(yy_state_223) + T_EXISTS => Shift(yy_state_224) + T_FORALL => Shift(yy_state_256) + NT_infix_expr => Shift(yy_state_272) + T_UNDERSCORE => Shift(yy_state_273) + NT_non_empty_list_commas_argument_ => Shift(yy_state_278) + T_LPAREN => Shift(yy_state_281) + NT_pipe_expr => Shift(yy_state_325) + NT_arrow_fn_expr => Shift(yy_state_344) + NT_quantifier_expr => Shift(yy_state_345) + NT_simple_try_expr => Shift(yy_state_346) + NT_lexscan_expr => Shift(yy_state_347) + NT_lexmatch_expr => Shift(yy_state_348) + NT_match_expr => Shift(yy_state_349) + NT_if_expr => Shift(yy_state_350) + NT_try_expr => Shift(yy_state_351) + NT_while_expr => Shift(yy_state_352) + NT_foreach_expr => Shift(yy_state_353) + NT_for_expr => Shift(yy_state_354) + T_LEXSCAN => Shift(yy_state_355) + NT_lexscan_header => Shift(yy_state_358) + T_LEXMATCH => Shift(yy_state_391) + NT_lexmatch_header => Shift(yy_state_399) + NT_match_header => Shift(yy_state_444) + T_MATCH => Shift(yy_state_605) + T_IF => Shift(yy_state_608) + T_TRY_EXCLAMATION => Shift(yy_state_614) + T_TRY_QUESTION => Shift(yy_state_616) + T_TRY => Shift(yy_state_618) + NT_loop_label_colon => Shift(yy_state_632) + T_POST_LABEL => Shift(yy_state_921) + T_EXTEND => Shift(yy_state_922) + T_LIDENT => Shift(yy_state_927) + NT_list_commas_argument_ => Shift(yy_state_942) + T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_1071) + T_RPAREN => Reduce(0, NT_list_commas_argument_, yy_action_955) _ => Error } } -fn yy_state_600(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(2, NT_expr_statement_no_break_continue_return, yy_action_515) -} - -fn yy_state_601(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_942(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_DOT_UIDENT => Shift(yy_state_184) - T_DOT_LIDENT => Shift(yy_state_602) + T_RPAREN => Shift(yy_state_943) _ => Error } } -fn yy_state_602(_lookahead : YYSymbol) -> YYDecision { - match _lookahead { - T_AUGMENTED_ASSIGNMENT | T_PLUS_EQUAL | T_EQUAL => Reduce(2, NT_qual_ident, yy_action_514) - T_INFIX1 | T_INFIX2 | T_INFIX3 | T_INFIX4 | T_EOF | T_CATCH | T_EQ_TILDE | T_LPAREN | T_RPAREN | T_COMMA | T_MINUS | T_DOT_LIDENT | T_DOT_INT | T_COLON | T_SEMI | T_LBRACKET | T_PLUS | T_RBRACKET | T_BAR | T_LBRACE | T_RBRACE | T_AMPERAMPER | T_AMPER | T_CARET | T_BARBAR | T_AS | T_PIPE | T_PIPE_LEFT | T_LT_PLUS | T_DOTDOT | T_RANGE_INCLUSIVE | T_RANGE_LT_INCLUSIVE | T_RANGE_EXCLUSIVE | T_RANGE_INCLUSIVE_REV | T_RANGE_EXCLUSIVE_REV | T_IS | T_AND | T_IMPLIES | T_LEXMATCH_QUESTION => Reduce(2, NT_qual_ident_simple_expr, yy_action_773) - T_COLONCOLON => Reduce(2, NT_qual_ident_ty, yy_action_882) - _ => Error - } +fn yy_state_943(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(5, NT_simple_expr, yy_action_526) } -fn yy_state_603(_lookahead : YYSymbol) -> YYDecision { - match _lookahead { - T_FAT_ARROW => Shift(yy_state_588) - T_AUGMENTED_ASSIGNMENT | T_PLUS_EQUAL | T_EQUAL => Reduce(1, NT_qual_ident, yy_action_513) - T_INFIX1 | T_INFIX2 | T_INFIX3 | T_INFIX4 | T_EOF | T_CATCH | T_EQ_TILDE | T_LPAREN | T_RPAREN | T_COMMA | T_MINUS | T_DOT_LIDENT | T_DOT_INT | T_COLON | T_SEMI | T_LBRACKET | T_PLUS | T_RBRACKET | T_BAR | T_LBRACE | T_RBRACE | T_AMPERAMPER | T_AMPER | T_CARET | T_BARBAR | T_AS | T_PIPE | T_PIPE_LEFT | T_LT_PLUS | T_DOTDOT | T_RANGE_INCLUSIVE | T_RANGE_LT_INCLUSIVE | T_RANGE_EXCLUSIVE | T_RANGE_INCLUSIVE_REV | T_RANGE_EXCLUSIVE_REV | T_IS | T_AND | T_IMPLIES | T_LEXMATCH_QUESTION => Reduce(1, NT_qual_ident_simple_expr, yy_action_772) - _ => Error - } +fn yy_state_944(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_arrow_fn_expr, yy_action_525) } -fn yy_state_604(_lookahead : YYSymbol) -> YYDecision { - match _lookahead { - T_COMMA => Shift(yy_state_605) - NT_option_COMMA_ => Shift(yy_state_609) - T_IN => Reduce(0, NT_option_COMMA_, yy_action_876) - _ => Error - } +fn yy_state_945(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_template_object_elem, yy_action_524) } -fn yy_state_605(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_946(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_list_commas_template_object_elem_, yy_action_523) +} + +fn yy_state_947(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_foreach_binder => Shift(yy_state_606) - T_UNDERSCORE => Shift(yy_state_607) - T_LIDENT => Shift(yy_state_608) - T_IN => Reduce(1, NT_option_COMMA_, yy_action_874) + T_RBRACE => Shift(yy_state_948) _ => Error } } -fn yy_state_606(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_non_empty_list_commas_rev_foreach_binder_, yy_action_512) +fn yy_state_948(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_template_rhs, yy_action_522) } -fn yy_state_607(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_foreach_binder, yy_action_511) +fn yy_state_949(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_template_rhs, yy_action_521) } -fn yy_state_608(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_foreach_binder, yy_action_510) +fn yy_state_950(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_template_rhs, yy_action_520) } -fn yy_state_609(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(2, NT_non_empty_list_commas_foreach_binder_, yy_action_509) +fn yy_state_951(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_template_rhs, yy_action_519) } -fn yy_state_610(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_list_commas_no_trailing_separated_pair_binder_EQUAL_expr__, yy_action_508) +fn yy_state_952(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_template_rhs, yy_action_518) } -fn yy_state_611(_lookahead : YYSymbol) -> YYDecision { - match _lookahead { - T_EQUAL => Shift(yy_state_612) - T_COMMA | T_IN => Reduce(1, NT_foreach_binder, yy_action_510) - _ => Error - } +fn yy_state_953(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_template_rhs, yy_action_517) } -fn yy_state_612(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_954(_lookahead : YYSymbol) -> YYDecision { match _lookahead { NT_multiline_string => Shift(yy_state_2) T_MULTILINE_INTERP => Shift(yy_state_4) T_MULTILINE_STRING => Shift(yy_state_5) - T_REGEX_LITERAL => Shift(yy_state_6) - T_STRING => Shift(yy_state_7) - T_FLOAT => Shift(yy_state_8) - T_DOUBLE => Shift(yy_state_9) - T_INT => Shift(yy_state_10) - T_CHAR => Shift(yy_state_11) - T_BYTES => Shift(yy_state_12) - T_BYTE => Shift(yy_state_13) - T_FALSE => Shift(yy_state_14) - T_TRUE => Shift(yy_state_15) - T_INTERP => Shift(yy_state_16) - NT_non_empty_list_multiline_string_ => Shift(yy_state_17) - NT_simple_constant => Shift(yy_state_18) - T_AMPER => Shift(yy_state_19) - NT_qual_ident_ty => Shift(yy_state_25) - NT_tuple_expr => Shift(yy_state_26) - T_LBRACKET => Shift(yy_state_27) - NT_constr => Shift(yy_state_35) - NT_qual_ident_simple_expr => Shift(yy_state_36) - NT_atomic_expr => Shift(yy_state_37) - NT_anony_fn => Shift(yy_state_38) - T_LBRACE => Shift(yy_state_39) - T_FN => Shift(yy_state_48) - NT_type_name => Shift(yy_state_126) - T_ASYNC => Shift(yy_state_138) - NT_simple_expr => Shift(yy_state_151) - T_EXCLAMATION => Shift(yy_state_162) - T_MINUS => Shift(yy_state_178) - T_PLUS => Shift(yy_state_180) - T_UIDENT => Shift(yy_state_182) - T_PACKAGE_NAME => Shift(yy_state_183) - NT_prefix_expr => Shift(yy_state_187) - NT_range_expr => Shift(yy_state_198) - NT_postfix_expr => Shift(yy_state_416) - T_EXISTS => Shift(yy_state_417) - T_FORALL => Shift(yy_state_449) - NT_infix_expr => Shift(yy_state_455) - T_UNDERSCORE => Shift(yy_state_456) - T_LPAREN => Shift(yy_state_464) - NT_pipe_expr => Shift(yy_state_497) - NT_arrow_fn_expr => Shift(yy_state_513) - NT_quantifier_expr => Shift(yy_state_514) - NT_simple_try_expr => Shift(yy_state_515) - NT_lexmatch_expr => Shift(yy_state_516) - NT_match_expr => Shift(yy_state_517) - NT_if_expr => Shift(yy_state_518) - NT_try_expr => Shift(yy_state_519) - NT_while_expr => Shift(yy_state_520) - NT_foreach_expr => Shift(yy_state_521) - NT_for_expr => Shift(yy_state_522) - T_LEXMATCH => Shift(yy_state_523) - NT_lexmatch_header => Shift(yy_state_529) - NT_match_header => Shift(yy_state_540) - T_MATCH => Shift(yy_state_550) - T_IF => Shift(yy_state_553) - T_TRY_EXCLAMATION => Shift(yy_state_559) - T_TRY_QUESTION => Shift(yy_state_561) - T_TRY => Shift(yy_state_563) - NT_loop_label_colon => Shift(yy_state_577) - T_POST_LABEL => Shift(yy_state_585) - T_LIDENT => Shift(yy_state_587) - NT_expr => Shift(yy_state_613) - T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_902) + T_LBRACE => Shift(yy_state_215) + NT_non_empty_list_multiline_string_ => Shift(yy_state_949) + T_STRING => Shift(yy_state_950) + T_BYTES_INTERP => Shift(yy_state_951) + T_BYTES => Shift(yy_state_952) + T_INTERP => Shift(yy_state_953) + NT_template_rhs => Shift(yy_state_955) _ => Error } } -fn yy_state_613(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_non_empty_list_commas_rev_separated_pair_binder_EQUAL_expr__, yy_action_506) +fn yy_state_955(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_postfix_expr, yy_action_516) } -fn yy_state_614(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_956(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_IN => Shift(yy_state_615) + T_PACKAGE_NAME => Shift(yy_state_366) + T_UIDENT => Shift(yy_state_368) + T_REGEX_LITERAL => Shift(yy_state_369) + T_LPAREN => Shift(yy_state_957) + NT_regex_atom_pattern => Shift(yy_state_977) + NT_regex_match_rhs => Shift(yy_state_978) _ => Error } } -fn yy_state_615(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_957(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_multiline_string => Shift(yy_state_2) - T_MULTILINE_INTERP => Shift(yy_state_4) - T_MULTILINE_STRING => Shift(yy_state_5) - T_REGEX_LITERAL => Shift(yy_state_6) - T_STRING => Shift(yy_state_7) - T_FLOAT => Shift(yy_state_8) - T_DOUBLE => Shift(yy_state_9) - T_INT => Shift(yy_state_10) - T_CHAR => Shift(yy_state_11) - T_BYTES => Shift(yy_state_12) - T_BYTE => Shift(yy_state_13) - T_FALSE => Shift(yy_state_14) - T_TRUE => Shift(yy_state_15) - T_INTERP => Shift(yy_state_16) - NT_non_empty_list_multiline_string_ => Shift(yy_state_17) - NT_simple_constant => Shift(yy_state_18) - T_AMPER => Shift(yy_state_19) - NT_qual_ident_ty => Shift(yy_state_25) - NT_tuple_expr => Shift(yy_state_26) - T_LBRACKET => Shift(yy_state_27) - NT_constr => Shift(yy_state_35) - NT_qual_ident_simple_expr => Shift(yy_state_36) - NT_atomic_expr => Shift(yy_state_37) - NT_anony_fn => Shift(yy_state_38) - T_LBRACE => Shift(yy_state_39) - T_FN => Shift(yy_state_48) - NT_type_name => Shift(yy_state_126) - T_ASYNC => Shift(yy_state_138) - NT_simple_expr => Shift(yy_state_151) - T_EXCLAMATION => Shift(yy_state_162) - T_MINUS => Shift(yy_state_178) - T_PLUS => Shift(yy_state_180) - T_UIDENT => Shift(yy_state_182) - T_PACKAGE_NAME => Shift(yy_state_183) - NT_prefix_expr => Shift(yy_state_187) - NT_range_expr => Shift(yy_state_198) - NT_postfix_expr => Shift(yy_state_416) - T_EXISTS => Shift(yy_state_417) - T_FORALL => Shift(yy_state_449) - NT_infix_expr => Shift(yy_state_455) - T_UNDERSCORE => Shift(yy_state_456) - T_LPAREN => Shift(yy_state_464) - NT_pipe_expr => Shift(yy_state_497) - NT_arrow_fn_expr => Shift(yy_state_513) - NT_quantifier_expr => Shift(yy_state_514) - NT_simple_try_expr => Shift(yy_state_515) - NT_lexmatch_expr => Shift(yy_state_516) - NT_match_expr => Shift(yy_state_517) - NT_if_expr => Shift(yy_state_518) - NT_try_expr => Shift(yy_state_519) - NT_while_expr => Shift(yy_state_520) - NT_foreach_expr => Shift(yy_state_521) - NT_for_expr => Shift(yy_state_522) - T_LEXMATCH => Shift(yy_state_523) - NT_lexmatch_header => Shift(yy_state_529) - NT_match_header => Shift(yy_state_540) - T_MATCH => Shift(yy_state_550) - T_IF => Shift(yy_state_553) - T_TRY_EXCLAMATION => Shift(yy_state_559) - T_TRY_QUESTION => Shift(yy_state_561) - T_TRY => Shift(yy_state_563) - NT_loop_label_colon => Shift(yy_state_577) - T_POST_LABEL => Shift(yy_state_585) - T_LIDENT => Shift(yy_state_587) - NT_expr => Shift(yy_state_616) - T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_902) + T_LPAREN => Shift(yy_state_363) + T_PACKAGE_NAME => Shift(yy_state_366) + T_UIDENT => Shift(yy_state_368) + T_REGEX_LITERAL => Shift(yy_state_369) + NT_regex_sequence_pattern => Shift(yy_state_370) + NT_regex_atom_pattern => Shift(yy_state_373) + NT_regex_or_pattern => Shift(yy_state_377) + NT_regex_as_pattern => Shift(yy_state_958) _ => Error } } -fn yy_state_616(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_958(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_SEMI => Shift(yy_state_617) - NT_foreach_optional_loop_vars => Shift(yy_state_623) - T_LBRACE => Reduce(0, NT_foreach_optional_loop_vars, yy_action_505) + T_RPAREN => Shift(yy_state_365) + T_COMMA => Shift(yy_state_959) _ => Error } } -fn yy_state_617(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_959(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_non_empty_list_commas_rev_separated_pair_binder_EQUAL_expr__ => Shift(yy_state_580) - NT_non_empty_list_commas_no_trailing_separated_pair_binder_EQUAL_expr__ => Shift(yy_state_610) - T_LIDENT => Shift(yy_state_618) - NT_for_binders => Shift(yy_state_619) - NT_list_commas_no_trailing_separated_pair_binder_EQUAL_expr__ => Shift(yy_state_622) - T_SEMI | T_LBRACE => Reduce(0, NT_list_commas_no_trailing_separated_pair_binder_EQUAL_expr__, yy_action_531) + NT_regex_match_binding => Shift(yy_state_960) + NT_non_empty_list_commas_rev_regex_match_binding_ => Shift(yy_state_961) + T_POST_LABEL => Shift(yy_state_965) + T_EXTEND => Shift(yy_state_966) + T_LIDENT => Shift(yy_state_970) + NT_non_empty_list_commas_regex_match_binding_ => Shift(yy_state_974) + NT_list_commas_regex_match_binding_ => Shift(yy_state_975) + T_RPAREN => Reduce(0, NT_list_commas_regex_match_binding_, yy_action_515) _ => Error } } -fn yy_state_618(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_960(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_non_empty_list_commas_rev_regex_match_binding_, yy_action_514) +} + +fn yy_state_961(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_EQUAL => Shift(yy_state_612) + NT_option_COMMA_ => Shift(yy_state_962) + T_COMMA => Shift(yy_state_963) + T_RPAREN => Reduce(0, NT_option_COMMA_, yy_action_1044) _ => Error } } -fn yy_state_619(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_962(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(2, NT_non_empty_list_commas_regex_match_binding_, yy_action_513) +} + +fn yy_state_963(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_SEMI => Shift(yy_state_620) - T_LBRACE => Reduce(2, NT_foreach_optional_loop_vars, yy_action_504) + NT_regex_match_binding => Shift(yy_state_964) + T_POST_LABEL => Shift(yy_state_965) + T_EXTEND => Shift(yy_state_966) + T_LIDENT => Shift(yy_state_970) + T_RPAREN => Reduce(1, NT_option_COMMA_, yy_action_1042) _ => Error } } -fn yy_state_620(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_964(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_non_empty_list_commas_rev_regex_match_binding_, yy_action_512) +} + +fn yy_state_965(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_regex_match_binding, yy_action_511) +} + +fn yy_state_966(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_non_empty_list_commas_rev_separated_pair_binder_EQUAL_expr__ => Shift(yy_state_580) - NT_non_empty_list_commas_no_trailing_separated_pair_binder_EQUAL_expr__ => Shift(yy_state_610) - T_LIDENT => Shift(yy_state_618) - NT_for_binders => Shift(yy_state_621) - NT_list_commas_no_trailing_separated_pair_binder_EQUAL_expr__ => Shift(yy_state_622) - T_LBRACE => Reduce(0, NT_list_commas_no_trailing_separated_pair_binder_EQUAL_expr__, yy_action_531) + T_EQUAL => Shift(yy_state_967) _ => Error } } -fn yy_state_621(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(4, NT_foreach_optional_loop_vars, yy_action_503) +fn yy_state_967(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_EXTEND => Shift(yy_state_968) + T_LIDENT => Shift(yy_state_969) + _ => Error + } } -fn yy_state_622(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_for_binders, yy_action_502) +fn yy_state_968(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_regex_match_binding, yy_action_510) } -fn yy_state_623(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_969(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_regex_match_binding, yy_action_509) +} + +fn yy_state_970(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACE => Shift(yy_state_120) - NT_block_expr => Shift(yy_state_624) + T_EQUAL => Shift(yy_state_971) _ => Error } } -fn yy_state_624(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_971(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_optional_nobreak => Shift(yy_state_625) - T_NOBREAK => Shift(yy_state_641) - T_EOF | T_RPAREN | T_COMMA | T_COLON | T_SEMI | T_RBRACKET | T_LBRACE | T_RBRACE | T_AND | T_WHERE => Reduce(0, NT_optional_nobreak, yy_action_501) + T_EXTEND => Shift(yy_state_972) + T_LIDENT => Shift(yy_state_973) _ => Error } } -fn yy_state_625(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_972(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_regex_match_binding, yy_action_508) +} + +fn yy_state_973(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_regex_match_binding, yy_action_507) +} + +fn yy_state_974(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_list_commas_regex_match_binding_, yy_action_506) +} + +fn yy_state_975(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_optional_where_clause => Shift(yy_state_626) - T_WHERE => Shift(yy_state_627) - T_EOF | T_RPAREN | T_COMMA | T_COLON | T_SEMI | T_RBRACKET | T_LBRACE | T_RBRACE | T_AND => Reduce(0, NT_optional_where_clause, yy_action_500) + T_RPAREN => Shift(yy_state_976) _ => Error } } -fn yy_state_626(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(9, NT_foreach_expr, yy_action_499) +fn yy_state_976(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(5, NT_regex_match_rhs, yy_action_505) } -fn yy_state_627(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_977(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_regex_match_rhs, yy_action_504) +} + +fn yy_state_978(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_postfix_expr, yy_action_503) +} + +fn yy_state_979(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACE => Shift(yy_state_628) + T_PACKAGE_NAME => Shift(yy_state_404) + T_UIDENT => Shift(yy_state_406) + T_INTERP => Shift(yy_state_407) + T_STRING => Shift(yy_state_408) + T_REGEX_INTERP => Shift(yy_state_409) + T_REGEX_LITERAL => Shift(yy_state_410) + NT_lex_simple_atom_pattern => Shift(yy_state_411) + T_EXTEND => Shift(yy_state_412) + T_LIDENT => Shift(yy_state_413) + T_UNDERSCORE => Shift(yy_state_414) + T_LPAREN => Shift(yy_state_415) + NT_lex_pattern => Shift(yy_state_980) _ => Error } } -fn yy_state_628(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_980(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LIDENT => Shift(yy_state_629) - NT_non_empty_list_commas_rev_labeled_expr_ => Shift(yy_state_632) - NT_non_empty_list_commas_labeled_expr_ => Shift(yy_state_638) - NT_list_commas_labeled_expr_ => Shift(yy_state_639) - T_RBRACE => Reduce(0, NT_list_commas_labeled_expr_, yy_action_498) + T_WITH => Shift(yy_state_981) + T_INFIX1 | T_INFIX2 | T_INFIX3 | T_INFIX4 | T_EOF | T_CATCH | T_RPAREN | T_COMMA | T_MINUS | T_COLON | T_SEMI | T_PLUS | T_RBRACKET | T_BAR_RBRACKET | T_BAR | T_LBRACE | T_RBRACE | T_AMPERAMPER | T_AMPER | T_CARET | T_BARBAR | T_PIPE | T_PIPE_LEFT | T_ELSE | T_IF | T_FAT_ARROW | T_AND | T_IMPLIES => Reduce(3, NT_postfix_expr, yy_action_502) _ => Error } } -fn yy_state_629(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_981(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_COLON => Shift(yy_state_630) + T_EXTEND => Shift(yy_state_982) + T_LIDENT => Shift(yy_state_983) _ => Error } } -fn yy_state_630(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_982(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(5, NT_postfix_expr, yy_action_500) +} + +fn yy_state_983(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(5, NT_postfix_expr, yy_action_499) +} + +fn yy_state_984(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_multiline_string => Shift(yy_state_2) - T_MULTILINE_INTERP => Shift(yy_state_4) - T_MULTILINE_STRING => Shift(yy_state_5) - T_REGEX_LITERAL => Shift(yy_state_6) - T_STRING => Shift(yy_state_7) - T_FLOAT => Shift(yy_state_8) - T_DOUBLE => Shift(yy_state_9) - T_INT => Shift(yy_state_10) - T_CHAR => Shift(yy_state_11) - T_BYTES => Shift(yy_state_12) - T_BYTE => Shift(yy_state_13) - T_FALSE => Shift(yy_state_14) - T_TRUE => Shift(yy_state_15) - T_INTERP => Shift(yy_state_16) - NT_non_empty_list_multiline_string_ => Shift(yy_state_17) - NT_simple_constant => Shift(yy_state_18) - T_AMPER => Shift(yy_state_19) - NT_qual_ident_ty => Shift(yy_state_25) - NT_tuple_expr => Shift(yy_state_26) - T_LBRACKET => Shift(yy_state_27) - NT_constr => Shift(yy_state_35) - NT_qual_ident_simple_expr => Shift(yy_state_36) - NT_atomic_expr => Shift(yy_state_37) - NT_anony_fn => Shift(yy_state_38) - T_LBRACE => Shift(yy_state_39) - T_FN => Shift(yy_state_48) - NT_type_name => Shift(yy_state_126) - T_ASYNC => Shift(yy_state_138) - NT_simple_expr => Shift(yy_state_151) - T_EXCLAMATION => Shift(yy_state_162) - T_MINUS => Shift(yy_state_178) - T_PLUS => Shift(yy_state_180) - T_UIDENT => Shift(yy_state_182) - T_PACKAGE_NAME => Shift(yy_state_183) - NT_prefix_expr => Shift(yy_state_187) - NT_range_expr => Shift(yy_state_198) - NT_postfix_expr => Shift(yy_state_416) - T_EXISTS => Shift(yy_state_417) - T_FORALL => Shift(yy_state_449) - NT_infix_expr => Shift(yy_state_455) - T_UNDERSCORE => Shift(yy_state_456) - T_LPAREN => Shift(yy_state_464) - NT_pipe_expr => Shift(yy_state_497) - NT_arrow_fn_expr => Shift(yy_state_513) - NT_quantifier_expr => Shift(yy_state_514) - NT_simple_try_expr => Shift(yy_state_515) - NT_lexmatch_expr => Shift(yy_state_516) - NT_match_expr => Shift(yy_state_517) - NT_if_expr => Shift(yy_state_518) - NT_try_expr => Shift(yy_state_519) - NT_while_expr => Shift(yy_state_520) - NT_foreach_expr => Shift(yy_state_521) - NT_for_expr => Shift(yy_state_522) - T_LEXMATCH => Shift(yy_state_523) - NT_lexmatch_header => Shift(yy_state_529) - NT_match_header => Shift(yy_state_540) - T_MATCH => Shift(yy_state_550) - T_IF => Shift(yy_state_553) - T_TRY_EXCLAMATION => Shift(yy_state_559) - T_TRY_QUESTION => Shift(yy_state_561) - T_TRY => Shift(yy_state_563) - NT_loop_label_colon => Shift(yy_state_577) - T_POST_LABEL => Shift(yy_state_585) - T_LIDENT => Shift(yy_state_587) - NT_expr => Shift(yy_state_631) - T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_902) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + T_UIDENT => Shift(yy_state_195) + T_LBRACE => Shift(yy_state_448) + T_LBRACKET => Shift(yy_state_452) + T_LPAREN => Shift(yy_state_466) + NT_constr => Shift(yy_state_467) + T_EXTEND => Shift(yy_state_480) + T_LIDENT => Shift(yy_state_487) + T_UNDERSCORE => Shift(yy_state_491) + T_BYTES => Shift(yy_state_492) + T_STRING => Shift(yy_state_493) + T_MINUS => Shift(yy_state_494) + T_FLOAT => Shift(yy_state_498) + T_DOUBLE => Shift(yy_state_499) + T_BYTE => Shift(yy_state_500) + T_INT => Shift(yy_state_501) + T_CHAR => Shift(yy_state_502) + T_FALSE => Shift(yy_state_503) + T_TRUE => Shift(yy_state_504) + NT_simple_pattern => Shift(yy_state_505) + NT_type_name => Shift(yy_state_508) + T_PACKAGE_NAME => Shift(yy_state_513) + NT_range_pattern => Shift(yy_state_985) _ => Error } } -fn yy_state_631(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_non_empty_list_commas_rev_labeled_expr_, yy_action_497) +fn yy_state_985(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_postfix_expr, yy_action_498) } -fn yy_state_632(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_986(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_option_COMMA_ => Shift(yy_state_633) - T_COMMA => Shift(yy_state_634) - T_RBRACE => Reduce(0, NT_option_COMMA_, yy_action_876) + T_AMPER => Shift(yy_state_20) + T_PACKAGE_NAME => Shift(yy_state_22) + T_UIDENT => Shift(yy_state_25) + NT_qual_ident_ty => Shift(yy_state_26) + NT_type_name => Shift(yy_state_987) _ => Error } } -fn yy_state_633(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(2, NT_non_empty_list_commas_labeled_expr_, yy_action_496) +fn yy_state_987(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_postfix_expr, yy_action_497) } -fn yy_state_634(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_988(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LIDENT => Shift(yy_state_635) - T_RBRACE => Reduce(1, NT_option_COMMA_, yy_action_874) + T_FAT_ARROW => Shift(yy_state_274) + T_COLON => Shift(yy_state_989) + T_COMMA => Shift(yy_state_992) + T_RPAREN => Shift(yy_state_995) + T_INFIX1 | T_INFIX2 | T_INFIX3 | T_INFIX4 | T_CATCH | T_EQ_TILDE | T_LPAREN | T_MINUS | T_DOT_LIDENT | T_DOT_INT | T_LBRACKET | T_PLUS | T_BAR | T_AMPERAMPER | T_AMPER | T_CARET | T_BARBAR | T_AS | T_PIPE | T_PIPE_LEFT | T_LT_PLUS | T_LT_QUESTION | T_DOTDOT | T_RANGE_INCLUSIVE | T_RANGE_LT_INCLUSIVE | T_RANGE_EXCLUSIVE | T_RANGE_INCLUSIVE_REV | T_RANGE_EXCLUSIVE_REV | T_IS | T_IMPLIES | T_LEXMATCH_QUESTION => Reduce(1, NT_simple_expr, yy_action_1031) _ => Error } } -fn yy_state_635(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_989(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_COLON => Shift(yy_state_636) + T_ASYNC => Shift(yy_state_65) + T_UNDERSCORE => Shift(yy_state_70) + T_AMPER => Shift(yy_state_71) + T_PACKAGE_NAME => Shift(yy_state_73) + T_UIDENT => Shift(yy_state_80) + T_LPAREN => Shift(yy_state_84) + NT_simple_type => Shift(yy_state_110) + NT_type_ => Shift(yy_state_990) _ => Error } } -fn yy_state_636(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_990(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_RPAREN => Shift(yy_state_991) + _ => Error + } +} + +fn yy_state_991(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(5, NT_tuple_expr, yy_action_866) +} + +fn yy_state_992(_lookahead : YYSymbol) -> YYDecision { match _lookahead { NT_multiline_string => Shift(yy_state_2) T_MULTILINE_INTERP => Shift(yy_state_4) @@ -25141,127 +35237,199 @@ fn yy_state_636(_lookahead : YYSymbol) -> YYDecision { T_BYTES => Shift(yy_state_12) T_BYTE => Shift(yy_state_13) T_FALSE => Shift(yy_state_14) - T_TRUE => Shift(yy_state_15) - T_INTERP => Shift(yy_state_16) - NT_non_empty_list_multiline_string_ => Shift(yy_state_17) - NT_simple_constant => Shift(yy_state_18) - T_AMPER => Shift(yy_state_19) - NT_qual_ident_ty => Shift(yy_state_25) - NT_tuple_expr => Shift(yy_state_26) - T_LBRACKET => Shift(yy_state_27) - NT_constr => Shift(yy_state_35) - NT_qual_ident_simple_expr => Shift(yy_state_36) - NT_atomic_expr => Shift(yy_state_37) - NT_anony_fn => Shift(yy_state_38) - T_LBRACE => Shift(yy_state_39) - T_FN => Shift(yy_state_48) - NT_type_name => Shift(yy_state_126) - T_ASYNC => Shift(yy_state_138) - NT_simple_expr => Shift(yy_state_151) - T_EXCLAMATION => Shift(yy_state_162) - T_MINUS => Shift(yy_state_178) - T_PLUS => Shift(yy_state_180) - T_UIDENT => Shift(yy_state_182) - T_PACKAGE_NAME => Shift(yy_state_183) - NT_prefix_expr => Shift(yy_state_187) - NT_range_expr => Shift(yy_state_198) - NT_postfix_expr => Shift(yy_state_416) - T_EXISTS => Shift(yy_state_417) - T_FORALL => Shift(yy_state_449) - NT_infix_expr => Shift(yy_state_455) - T_UNDERSCORE => Shift(yy_state_456) - T_LPAREN => Shift(yy_state_464) - NT_pipe_expr => Shift(yy_state_497) - NT_arrow_fn_expr => Shift(yy_state_513) - NT_quantifier_expr => Shift(yy_state_514) - NT_simple_try_expr => Shift(yy_state_515) - NT_lexmatch_expr => Shift(yy_state_516) - NT_match_expr => Shift(yy_state_517) - NT_if_expr => Shift(yy_state_518) - NT_try_expr => Shift(yy_state_519) - NT_while_expr => Shift(yy_state_520) - NT_foreach_expr => Shift(yy_state_521) - NT_for_expr => Shift(yy_state_522) - T_LEXMATCH => Shift(yy_state_523) - NT_lexmatch_header => Shift(yy_state_529) - NT_match_header => Shift(yy_state_540) - T_MATCH => Shift(yy_state_550) - T_IF => Shift(yy_state_553) - T_TRY_EXCLAMATION => Shift(yy_state_559) - T_TRY_QUESTION => Shift(yy_state_561) - T_TRY => Shift(yy_state_563) - NT_loop_label_colon => Shift(yy_state_577) - T_POST_LABEL => Shift(yy_state_585) - T_LIDENT => Shift(yy_state_587) - NT_expr => Shift(yy_state_637) - T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_902) - _ => Error - } -} - -fn yy_state_637(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(5, NT_non_empty_list_commas_rev_labeled_expr_, yy_action_495) -} - -fn yy_state_638(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_list_commas_labeled_expr_, yy_action_494) -} - -fn yy_state_639(_lookahead : YYSymbol) -> YYDecision { - match _lookahead { - T_RBRACE => Shift(yy_state_640) + T_TRUE => Shift(yy_state_15) + T_BYTES_INTERP => Shift(yy_state_16) + T_INTERP => Shift(yy_state_17) + NT_non_empty_list_multiline_string_ => Shift(yy_state_18) + NT_simple_constant => Shift(yy_state_19) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + NT_tuple_expr => Shift(yy_state_27) + T_LBRACKET_BAR => Shift(yy_state_28) + T_LBRACKET => Shift(yy_state_36) + NT_constr => Shift(yy_state_47) + NT_qual_ident_simple_expr => Shift(yy_state_48) + NT_atomic_expr => Shift(yy_state_50) + NT_anony_fn => Shift(yy_state_51) + T_LBRACE => Shift(yy_state_52) + T_FN => Shift(yy_state_61) + NT_type_name => Shift(yy_state_139) + T_ASYNC => Shift(yy_state_152) + NT_simple_expr => Shift(yy_state_165) + T_EXCLAMATION => Shift(yy_state_176) + NT_non_empty_tuple_elems => Shift(yy_state_181) + NT_expr => Shift(yy_state_189) + T_MINUS => Shift(yy_state_191) + T_PLUS => Shift(yy_state_193) + T_UIDENT => Shift(yy_state_195) + T_PACKAGE_NAME => Shift(yy_state_196) + NT_prefix_expr => Shift(yy_state_201) + NT_range_expr => Shift(yy_state_212) + NT_postfix_expr => Shift(yy_state_223) + T_EXISTS => Shift(yy_state_224) + T_FORALL => Shift(yy_state_256) + NT_infix_expr => Shift(yy_state_272) + T_LPAREN => Shift(yy_state_281) + NT_non_empty_tuple_elems_with_prefix => Shift(yy_state_320) + NT_arrow_fn_prefix_no_constraint => Shift(yy_state_321) + NT_pipe_expr => Shift(yy_state_325) + NT_arrow_fn_expr => Shift(yy_state_344) + NT_quantifier_expr => Shift(yy_state_345) + NT_simple_try_expr => Shift(yy_state_346) + NT_lexscan_expr => Shift(yy_state_347) + NT_lexmatch_expr => Shift(yy_state_348) + NT_match_expr => Shift(yy_state_349) + NT_if_expr => Shift(yy_state_350) + NT_try_expr => Shift(yy_state_351) + NT_while_expr => Shift(yy_state_352) + NT_foreach_expr => Shift(yy_state_353) + NT_for_expr => Shift(yy_state_354) + T_LEXSCAN => Shift(yy_state_355) + NT_lexscan_header => Shift(yy_state_358) + T_LEXMATCH => Shift(yy_state_391) + NT_lexmatch_header => Shift(yy_state_399) + NT_match_header => Shift(yy_state_444) + T_MATCH => Shift(yy_state_605) + T_IF => Shift(yy_state_608) + T_TRY_EXCLAMATION => Shift(yy_state_614) + T_TRY_QUESTION => Shift(yy_state_616) + T_TRY => Shift(yy_state_618) + NT_loop_label_colon => Shift(yy_state_632) + T_POST_LABEL => Shift(yy_state_639) + T_RPAREN => Shift(yy_state_993) + T_UNDERSCORE => Shift(yy_state_994) + T_EXTEND => Shift(yy_state_996) + T_LIDENT => Shift(yy_state_999) + T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_1071) _ => Error } } -fn yy_state_640(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(4, NT_optional_where_clause, yy_action_493) +fn yy_state_993(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_arrow_fn_prefix_no_constraint, yy_action_863) } -fn yy_state_641(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_994(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACE => Shift(yy_state_120) - NT_block_expr => Shift(yy_state_642) + T_FAT_ARROW => Shift(yy_state_274) + T_COMMA => Shift(yy_state_992) + T_RPAREN => Shift(yy_state_995) + T_INFIX1 | T_INFIX2 | T_INFIX3 | T_INFIX4 | T_CATCH | T_EQ_TILDE | T_LPAREN | T_MINUS | T_DOT_LIDENT | T_DOT_INT | T_LBRACKET | T_PLUS | T_BAR | T_AMPERAMPER | T_AMPER | T_CARET | T_BARBAR | T_AS | T_PIPE | T_PIPE_LEFT | T_LT_PLUS | T_LT_QUESTION | T_DOTDOT | T_RANGE_INCLUSIVE | T_RANGE_LT_INCLUSIVE | T_RANGE_EXCLUSIVE | T_RANGE_INCLUSIVE_REV | T_RANGE_EXCLUSIVE_REV | T_IS | T_IMPLIES | T_LEXMATCH_QUESTION => Reduce(1, NT_simple_expr, yy_action_1031) _ => Error } } -fn yy_state_642(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(2, NT_optional_nobreak, yy_action_492) +fn yy_state_995(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(2, NT_arrow_fn_prefix_no_constraint, yy_action_862) } -fn yy_state_643(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_996(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACE => Shift(yy_state_120) - NT_block_expr => Shift(yy_state_644) - T_SEMI => Shift(yy_state_647) + T_FAT_ARROW => Shift(yy_state_642) + T_COMMA => Shift(yy_state_997) + T_RPAREN => Shift(yy_state_1003) + T_INFIX1 | T_INFIX2 | T_INFIX3 | T_INFIX4 | T_CATCH | T_EQ_TILDE | T_LPAREN | T_MINUS | T_DOT_LIDENT | T_DOT_INT | T_LBRACKET | T_PLUS | T_BAR | T_AMPERAMPER | T_AMPER | T_CARET | T_BARBAR | T_AS | T_PIPE | T_PIPE_LEFT | T_LT_PLUS | T_LT_QUESTION | T_DOTDOT | T_RANGE_INCLUSIVE | T_RANGE_LT_INCLUSIVE | T_RANGE_EXCLUSIVE | T_RANGE_INCLUSIVE_REV | T_RANGE_EXCLUSIVE_REV | T_IS | T_IMPLIES | T_LEXMATCH_QUESTION => Reduce(1, NT_qual_ident_simple_expr, yy_action_933) _ => Error } } -fn yy_state_644(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_997(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_NOBREAK => Shift(yy_state_641) - NT_optional_nobreak => Shift(yy_state_645) - T_EOF | T_RPAREN | T_COMMA | T_COLON | T_SEMI | T_RBRACKET | T_LBRACE | T_RBRACE | T_AND | T_WHERE => Reduce(0, NT_optional_nobreak, yy_action_501) + NT_multiline_string => Shift(yy_state_2) + T_MULTILINE_INTERP => Shift(yy_state_4) + T_MULTILINE_STRING => Shift(yy_state_5) + T_REGEX_LITERAL => Shift(yy_state_6) + T_STRING => Shift(yy_state_7) + T_FLOAT => Shift(yy_state_8) + T_DOUBLE => Shift(yy_state_9) + T_INT => Shift(yy_state_10) + T_CHAR => Shift(yy_state_11) + T_BYTES => Shift(yy_state_12) + T_BYTE => Shift(yy_state_13) + T_FALSE => Shift(yy_state_14) + T_TRUE => Shift(yy_state_15) + T_BYTES_INTERP => Shift(yy_state_16) + T_INTERP => Shift(yy_state_17) + NT_non_empty_list_multiline_string_ => Shift(yy_state_18) + NT_simple_constant => Shift(yy_state_19) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + NT_tuple_expr => Shift(yy_state_27) + T_LBRACKET_BAR => Shift(yy_state_28) + T_LBRACKET => Shift(yy_state_36) + NT_constr => Shift(yy_state_47) + NT_qual_ident_simple_expr => Shift(yy_state_48) + NT_atomic_expr => Shift(yy_state_50) + NT_anony_fn => Shift(yy_state_51) + T_LBRACE => Shift(yy_state_52) + T_FN => Shift(yy_state_61) + NT_type_name => Shift(yy_state_139) + T_ASYNC => Shift(yy_state_152) + NT_simple_expr => Shift(yy_state_165) + T_EXCLAMATION => Shift(yy_state_176) + NT_non_empty_tuple_elems => Shift(yy_state_181) + NT_expr => Shift(yy_state_189) + T_MINUS => Shift(yy_state_191) + T_PLUS => Shift(yy_state_193) + T_UIDENT => Shift(yy_state_195) + T_PACKAGE_NAME => Shift(yy_state_196) + NT_prefix_expr => Shift(yy_state_201) + NT_range_expr => Shift(yy_state_212) + NT_postfix_expr => Shift(yy_state_223) + T_EXISTS => Shift(yy_state_224) + T_FORALL => Shift(yy_state_256) + NT_infix_expr => Shift(yy_state_272) + T_LPAREN => Shift(yy_state_281) + NT_pipe_expr => Shift(yy_state_325) + NT_arrow_fn_expr => Shift(yy_state_344) + NT_quantifier_expr => Shift(yy_state_345) + NT_simple_try_expr => Shift(yy_state_346) + NT_lexscan_expr => Shift(yy_state_347) + NT_lexmatch_expr => Shift(yy_state_348) + NT_match_expr => Shift(yy_state_349) + NT_if_expr => Shift(yy_state_350) + NT_try_expr => Shift(yy_state_351) + NT_while_expr => Shift(yy_state_352) + NT_foreach_expr => Shift(yy_state_353) + NT_for_expr => Shift(yy_state_354) + T_LEXSCAN => Shift(yy_state_355) + NT_lexscan_header => Shift(yy_state_358) + T_LEXMATCH => Shift(yy_state_391) + NT_lexmatch_header => Shift(yy_state_399) + NT_match_header => Shift(yy_state_444) + T_MATCH => Shift(yy_state_605) + T_IF => Shift(yy_state_608) + T_TRY_EXCLAMATION => Shift(yy_state_614) + T_TRY_QUESTION => Shift(yy_state_616) + T_TRY => Shift(yy_state_618) + NT_loop_label_colon => Shift(yy_state_632) + T_POST_LABEL => Shift(yy_state_639) + NT_non_empty_tuple_elems_with_prefix => Shift(yy_state_888) + NT_arrow_fn_prefix_no_constraint => Shift(yy_state_889) + T_UNDERSCORE => Shift(yy_state_994) + T_EXTEND => Shift(yy_state_996) + T_RPAREN => Shift(yy_state_998) + T_LIDENT => Shift(yy_state_999) + T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_1071) _ => Error } } -fn yy_state_645(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_998(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_arrow_fn_prefix_no_constraint, yy_action_555) +} + +fn yy_state_999(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_WHERE => Shift(yy_state_627) - NT_optional_where_clause => Shift(yy_state_646) - T_EOF | T_RPAREN | T_COMMA | T_COLON | T_SEMI | T_RBRACKET | T_LBRACE | T_RBRACE | T_AND => Reduce(0, NT_optional_where_clause, yy_action_500) + T_FAT_ARROW => Shift(yy_state_649) + T_COMMA => Shift(yy_state_1000) + T_RPAREN => Shift(yy_state_1002) + T_INFIX1 | T_INFIX2 | T_INFIX3 | T_INFIX4 | T_CATCH | T_EQ_TILDE | T_LPAREN | T_MINUS | T_DOT_LIDENT | T_DOT_INT | T_LBRACKET | T_PLUS | T_BAR | T_AMPERAMPER | T_AMPER | T_CARET | T_BARBAR | T_AS | T_PIPE | T_PIPE_LEFT | T_LT_PLUS | T_LT_QUESTION | T_DOTDOT | T_RANGE_INCLUSIVE | T_RANGE_LT_INCLUSIVE | T_RANGE_EXCLUSIVE | T_RANGE_INCLUSIVE_REV | T_RANGE_EXCLUSIVE_REV | T_IS | T_IMPLIES | T_LEXMATCH_QUESTION => Reduce(1, NT_qual_ident_simple_expr, yy_action_932) _ => Error } } -fn yy_state_646(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(6, NT_for_expr, yy_action_491) -} - -fn yy_state_647(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1000(_lookahead : YYSymbol) -> YYDecision { match _lookahead { NT_multiline_string => Shift(yy_state_2) T_MULTILINE_INTERP => Shift(yy_state_4) @@ -25276,132 +35444,180 @@ fn yy_state_647(_lookahead : YYSymbol) -> YYDecision { T_BYTE => Shift(yy_state_13) T_FALSE => Shift(yy_state_14) T_TRUE => Shift(yy_state_15) - T_INTERP => Shift(yy_state_16) - NT_non_empty_list_multiline_string_ => Shift(yy_state_17) - NT_simple_constant => Shift(yy_state_18) - T_AMPER => Shift(yy_state_19) - NT_qual_ident_ty => Shift(yy_state_25) - NT_tuple_expr => Shift(yy_state_26) - T_LBRACKET => Shift(yy_state_27) - NT_constr => Shift(yy_state_35) - NT_qual_ident_simple_expr => Shift(yy_state_36) - NT_atomic_expr => Shift(yy_state_37) - NT_anony_fn => Shift(yy_state_38) - T_LBRACE => Shift(yy_state_39) - T_FN => Shift(yy_state_48) - NT_type_name => Shift(yy_state_126) - T_ASYNC => Shift(yy_state_138) - NT_simple_expr => Shift(yy_state_151) - T_EXCLAMATION => Shift(yy_state_162) - T_UNDERSCORE => Shift(yy_state_163) - T_LPAREN => Shift(yy_state_164) - T_MINUS => Shift(yy_state_178) - T_PLUS => Shift(yy_state_180) - T_UIDENT => Shift(yy_state_182) - T_PACKAGE_NAME => Shift(yy_state_183) - T_LIDENT => Shift(yy_state_186) - NT_prefix_expr => Shift(yy_state_187) - NT_range_expr => Shift(yy_state_198) - NT_postfix_expr => Shift(yy_state_416) - NT_infix_expr => Shift(yy_state_648) - NT_option_infix_expr_ => Shift(yy_state_652) - T_SEMI => Reduce(0, NT_option_infix_expr_, yy_action_490) + T_BYTES_INTERP => Shift(yy_state_16) + T_INTERP => Shift(yy_state_17) + NT_non_empty_list_multiline_string_ => Shift(yy_state_18) + NT_simple_constant => Shift(yy_state_19) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + NT_tuple_expr => Shift(yy_state_27) + T_LBRACKET_BAR => Shift(yy_state_28) + T_LBRACKET => Shift(yy_state_36) + NT_constr => Shift(yy_state_47) + NT_qual_ident_simple_expr => Shift(yy_state_48) + NT_atomic_expr => Shift(yy_state_50) + NT_anony_fn => Shift(yy_state_51) + T_LBRACE => Shift(yy_state_52) + T_FN => Shift(yy_state_61) + NT_type_name => Shift(yy_state_139) + T_ASYNC => Shift(yy_state_152) + NT_simple_expr => Shift(yy_state_165) + T_EXCLAMATION => Shift(yy_state_176) + NT_non_empty_tuple_elems => Shift(yy_state_181) + NT_expr => Shift(yy_state_189) + T_MINUS => Shift(yy_state_191) + T_PLUS => Shift(yy_state_193) + T_UIDENT => Shift(yy_state_195) + T_PACKAGE_NAME => Shift(yy_state_196) + NT_prefix_expr => Shift(yy_state_201) + NT_range_expr => Shift(yy_state_212) + NT_postfix_expr => Shift(yy_state_223) + T_EXISTS => Shift(yy_state_224) + T_FORALL => Shift(yy_state_256) + NT_infix_expr => Shift(yy_state_272) + T_LPAREN => Shift(yy_state_281) + NT_pipe_expr => Shift(yy_state_325) + NT_arrow_fn_expr => Shift(yy_state_344) + NT_quantifier_expr => Shift(yy_state_345) + NT_simple_try_expr => Shift(yy_state_346) + NT_lexscan_expr => Shift(yy_state_347) + NT_lexmatch_expr => Shift(yy_state_348) + NT_match_expr => Shift(yy_state_349) + NT_if_expr => Shift(yy_state_350) + NT_try_expr => Shift(yy_state_351) + NT_while_expr => Shift(yy_state_352) + NT_foreach_expr => Shift(yy_state_353) + NT_for_expr => Shift(yy_state_354) + T_LEXSCAN => Shift(yy_state_355) + NT_lexscan_header => Shift(yy_state_358) + T_LEXMATCH => Shift(yy_state_391) + NT_lexmatch_header => Shift(yy_state_399) + NT_match_header => Shift(yy_state_444) + T_MATCH => Shift(yy_state_605) + T_IF => Shift(yy_state_608) + T_TRY_EXCLAMATION => Shift(yy_state_614) + T_TRY_QUESTION => Shift(yy_state_616) + T_TRY => Shift(yy_state_618) + NT_loop_label_colon => Shift(yy_state_632) + T_POST_LABEL => Shift(yy_state_639) + NT_non_empty_tuple_elems_with_prefix => Shift(yy_state_895) + NT_arrow_fn_prefix_no_constraint => Shift(yy_state_896) + T_UNDERSCORE => Shift(yy_state_994) + T_EXTEND => Shift(yy_state_996) + T_LIDENT => Shift(yy_state_999) + T_RPAREN => Shift(yy_state_1001) + T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_1071) _ => Error } } -fn yy_state_648(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1001(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_arrow_fn_prefix_no_constraint, yy_action_550) +} + +fn yy_state_1002(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(2, NT_arrow_fn_prefix_no_constraint, yy_action_548) +} + +fn yy_state_1003(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(2, NT_arrow_fn_prefix_no_constraint, yy_action_554) +} + +fn yy_state_1004(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACE => Shift(yy_state_120) - T_BARBAR => Shift(yy_state_423) - T_AMPERAMPER => Shift(yy_state_425) - T_BAR => Shift(yy_state_427) - T_CARET => Shift(yy_state_429) - T_AMPER => Shift(yy_state_431) - T_MINUS => Shift(yy_state_433) - T_PLUS => Shift(yy_state_435) - T_INFIX1 => Shift(yy_state_437) - T_INFIX2 => Shift(yy_state_439) - T_INFIX3 => Shift(yy_state_441) - T_INFIX4 => Shift(yy_state_443) - T_IMPLIES => Shift(yy_state_445) - NT_block_expr => Shift(yy_state_649) - T_SEMI => Reduce(1, NT_option_infix_expr_, yy_action_489) + T_FAT_ARROW => Shift(yy_state_642) + T_COMMA => Shift(yy_state_997) + T_RPAREN => Shift(yy_state_1003) + T_COLON => Shift(yy_state_1005) + T_INFIX1 | T_INFIX2 | T_INFIX3 | T_INFIX4 | T_CATCH | T_EQ_TILDE | T_LPAREN | T_MINUS | T_DOT_LIDENT | T_DOT_INT | T_LBRACKET | T_PLUS | T_BAR | T_AMPERAMPER | T_AMPER | T_CARET | T_BARBAR | T_AS | T_PIPE | T_PIPE_LEFT | T_LT_PLUS | T_LT_QUESTION | T_DOTDOT | T_RANGE_INCLUSIVE | T_RANGE_LT_INCLUSIVE | T_RANGE_EXCLUSIVE | T_RANGE_INCLUSIVE_REV | T_RANGE_EXCLUSIVE_REV | T_IS | T_IMPLIES | T_LEXMATCH_QUESTION => Reduce(1, NT_qual_ident_simple_expr, yy_action_933) _ => Error } } -fn yy_state_649(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1005(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_NOBREAK => Shift(yy_state_641) - NT_optional_nobreak => Shift(yy_state_650) - T_EOF | T_RPAREN | T_COMMA | T_COLON | T_SEMI | T_RBRACKET | T_LBRACE | T_RBRACE | T_AND | T_WHERE => Reduce(0, NT_optional_nobreak, yy_action_501) + T_ASYNC => Shift(yy_state_65) + T_UNDERSCORE => Shift(yy_state_70) + T_AMPER => Shift(yy_state_71) + T_PACKAGE_NAME => Shift(yy_state_73) + T_UIDENT => Shift(yy_state_80) + T_LPAREN => Shift(yy_state_84) + NT_simple_type => Shift(yy_state_110) + NT_type_ => Shift(yy_state_1006) _ => Error } } -fn yy_state_650(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1006(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_WHERE => Shift(yy_state_627) - NT_optional_where_clause => Shift(yy_state_651) - T_EOF | T_RPAREN | T_COMMA | T_COLON | T_SEMI | T_RBRACKET | T_LBRACE | T_RBRACE | T_AND => Reduce(0, NT_optional_where_clause, yy_action_500) + T_RPAREN => Shift(yy_state_1007) _ => Error } } -fn yy_state_651(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(8, NT_for_expr, yy_action_488) +fn yy_state_1007(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(5, NT_tuple_expr, yy_action_558) } -fn yy_state_652(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1008(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_SEMI => Shift(yy_state_653) + T_FAT_ARROW => Shift(yy_state_649) + T_COMMA => Shift(yy_state_1000) + T_RPAREN => Shift(yy_state_1002) + T_COLON => Shift(yy_state_1009) + T_INFIX1 | T_INFIX2 | T_INFIX3 | T_INFIX4 | T_CATCH | T_EQ_TILDE | T_LPAREN | T_MINUS | T_DOT_LIDENT | T_DOT_INT | T_LBRACKET | T_PLUS | T_BAR | T_AMPERAMPER | T_AMPER | T_CARET | T_BARBAR | T_AS | T_PIPE | T_PIPE_LEFT | T_LT_PLUS | T_LT_QUESTION | T_DOTDOT | T_RANGE_INCLUSIVE | T_RANGE_LT_INCLUSIVE | T_RANGE_EXCLUSIVE | T_RANGE_INCLUSIVE_REV | T_RANGE_EXCLUSIVE_REV | T_IS | T_IMPLIES | T_LEXMATCH_QUESTION => Reduce(1, NT_qual_ident_simple_expr, yy_action_932) _ => Error } } -fn yy_state_653(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1009(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_non_empty_list_commas_rev_separated_pair_binder_EQUAL_expr__ => Shift(yy_state_580) - NT_non_empty_list_commas_no_trailing_separated_pair_binder_EQUAL_expr__ => Shift(yy_state_610) - T_LIDENT => Shift(yy_state_618) - NT_list_commas_no_trailing_separated_pair_binder_EQUAL_expr__ => Shift(yy_state_654) - T_LBRACE => Reduce(0, NT_list_commas_no_trailing_separated_pair_binder_EQUAL_expr__, yy_action_531) + T_ASYNC => Shift(yy_state_65) + T_UNDERSCORE => Shift(yy_state_70) + T_AMPER => Shift(yy_state_71) + T_PACKAGE_NAME => Shift(yy_state_73) + T_UIDENT => Shift(yy_state_80) + T_LPAREN => Shift(yy_state_84) + NT_simple_type => Shift(yy_state_110) + NT_type_ => Shift(yy_state_1010) _ => Error } } -fn yy_state_654(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1010(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACE => Shift(yy_state_120) - NT_block_expr => Shift(yy_state_655) + T_RPAREN => Shift(yy_state_1011) _ => Error } } -fn yy_state_655(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1011(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(5, NT_tuple_expr, yy_action_547) +} + +fn yy_state_1012(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(2, NT_prefix_expr, yy_action_496) +} + +fn yy_state_1013(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_NOBREAK => Shift(yy_state_641) - NT_optional_nobreak => Shift(yy_state_656) - T_EOF | T_RPAREN | T_COMMA | T_COLON | T_SEMI | T_RBRACKET | T_LBRACE | T_RBRACE | T_AND | T_WHERE => Reduce(0, NT_optional_nobreak, yy_action_501) + T_RPAREN => Shift(yy_state_1014) _ => Error } } -fn yy_state_656(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1014(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(6, NT_simple_expr, yy_action_495) +} + +fn yy_state_1015(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_WHERE => Shift(yy_state_627) - NT_optional_where_clause => Shift(yy_state_657) - T_EOF | T_RPAREN | T_COMMA | T_COLON | T_SEMI | T_RBRACKET | T_LBRACE | T_RBRACE | T_AND => Reduce(0, NT_optional_where_clause, yy_action_500) + T_LPAREN => Shift(yy_state_1016) _ => Error } } -fn yy_state_657(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(10, NT_for_expr, yy_action_487) -} - -fn yy_state_658(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1016(_lookahead : YYSymbol) -> YYDecision { match _lookahead { NT_multiline_string => Shift(yy_state_2) T_MULTILINE_INTERP => Shift(yy_state_4) @@ -25416,76 +35632,94 @@ fn yy_state_658(_lookahead : YYSymbol) -> YYDecision { T_BYTE => Shift(yy_state_13) T_FALSE => Shift(yy_state_14) T_TRUE => Shift(yy_state_15) - T_INTERP => Shift(yy_state_16) - NT_non_empty_list_multiline_string_ => Shift(yy_state_17) - NT_simple_constant => Shift(yy_state_18) - T_AMPER => Shift(yy_state_19) - NT_qual_ident_ty => Shift(yy_state_25) - NT_tuple_expr => Shift(yy_state_26) - T_LBRACKET => Shift(yy_state_27) - NT_constr => Shift(yy_state_35) - NT_qual_ident_simple_expr => Shift(yy_state_36) - NT_atomic_expr => Shift(yy_state_37) - NT_anony_fn => Shift(yy_state_38) - T_LBRACE => Shift(yy_state_39) - T_FN => Shift(yy_state_48) - NT_type_name => Shift(yy_state_126) - T_ASYNC => Shift(yy_state_138) - NT_simple_expr => Shift(yy_state_151) - T_EXCLAMATION => Shift(yy_state_162) - T_UNDERSCORE => Shift(yy_state_163) - T_LPAREN => Shift(yy_state_164) - T_MINUS => Shift(yy_state_178) - T_PLUS => Shift(yy_state_180) - T_UIDENT => Shift(yy_state_182) - T_PACKAGE_NAME => Shift(yy_state_183) - T_LIDENT => Shift(yy_state_186) - NT_prefix_expr => Shift(yy_state_187) - NT_range_expr => Shift(yy_state_198) - NT_postfix_expr => Shift(yy_state_416) - NT_infix_expr => Shift(yy_state_659) + T_BYTES_INTERP => Shift(yy_state_16) + T_INTERP => Shift(yy_state_17) + NT_non_empty_list_multiline_string_ => Shift(yy_state_18) + NT_simple_constant => Shift(yy_state_19) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + NT_tuple_expr => Shift(yy_state_27) + T_LBRACKET_BAR => Shift(yy_state_28) + T_LBRACKET => Shift(yy_state_36) + NT_constr => Shift(yy_state_47) + NT_qual_ident_simple_expr => Shift(yy_state_48) + NT_atomic_expr => Shift(yy_state_50) + NT_anony_fn => Shift(yy_state_51) + T_LBRACE => Shift(yy_state_52) + T_FN => Shift(yy_state_61) + NT_type_name => Shift(yy_state_139) + T_ASYNC => Shift(yy_state_152) + NT_simple_expr => Shift(yy_state_165) + NT_argument => Shift(yy_state_170) + NT_non_empty_list_commas_rev_argument_ => Shift(yy_state_171) + NT_expr => Shift(yy_state_175) + T_EXCLAMATION => Shift(yy_state_176) + T_MINUS => Shift(yy_state_191) + T_PLUS => Shift(yy_state_193) + T_UIDENT => Shift(yy_state_195) + T_PACKAGE_NAME => Shift(yy_state_196) + NT_prefix_expr => Shift(yy_state_201) + NT_range_expr => Shift(yy_state_212) + NT_postfix_expr => Shift(yy_state_223) + T_EXISTS => Shift(yy_state_224) + T_FORALL => Shift(yy_state_256) + NT_infix_expr => Shift(yy_state_272) + T_UNDERSCORE => Shift(yy_state_273) + NT_non_empty_list_commas_argument_ => Shift(yy_state_278) + T_LPAREN => Shift(yy_state_281) + NT_pipe_expr => Shift(yy_state_325) + NT_arrow_fn_expr => Shift(yy_state_344) + NT_quantifier_expr => Shift(yy_state_345) + NT_simple_try_expr => Shift(yy_state_346) + NT_lexscan_expr => Shift(yy_state_347) + NT_lexmatch_expr => Shift(yy_state_348) + NT_match_expr => Shift(yy_state_349) + NT_if_expr => Shift(yy_state_350) + NT_try_expr => Shift(yy_state_351) + NT_while_expr => Shift(yy_state_352) + NT_foreach_expr => Shift(yy_state_353) + NT_for_expr => Shift(yy_state_354) + T_LEXSCAN => Shift(yy_state_355) + NT_lexscan_header => Shift(yy_state_358) + T_LEXMATCH => Shift(yy_state_391) + NT_lexmatch_header => Shift(yy_state_399) + NT_match_header => Shift(yy_state_444) + T_MATCH => Shift(yy_state_605) + T_IF => Shift(yy_state_608) + T_TRY_EXCLAMATION => Shift(yy_state_614) + T_TRY_QUESTION => Shift(yy_state_616) + T_TRY => Shift(yy_state_618) + NT_loop_label_colon => Shift(yy_state_632) + T_POST_LABEL => Shift(yy_state_921) + T_EXTEND => Shift(yy_state_922) + T_LIDENT => Shift(yy_state_927) + NT_list_commas_argument_ => Shift(yy_state_1017) + T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_1071) + T_RPAREN => Reduce(0, NT_list_commas_argument_, yy_action_955) _ => Error } } -fn yy_state_659(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1017(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACE => Shift(yy_state_120) - T_BARBAR => Shift(yy_state_423) - T_AMPERAMPER => Shift(yy_state_425) - T_BAR => Shift(yy_state_427) - T_CARET => Shift(yy_state_429) - T_AMPER => Shift(yy_state_431) - T_MINUS => Shift(yy_state_433) - T_PLUS => Shift(yy_state_435) - T_INFIX1 => Shift(yy_state_437) - T_INFIX2 => Shift(yy_state_439) - T_INFIX3 => Shift(yy_state_441) - T_INFIX4 => Shift(yy_state_443) - T_IMPLIES => Shift(yy_state_445) - NT_block_expr => Shift(yy_state_660) + T_RPAREN => Shift(yy_state_1018) _ => Error } } -fn yy_state_660(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1018(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(6, NT_simple_expr, yy_action_494) +} + +fn yy_state_1019(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_NOBREAK => Shift(yy_state_641) - NT_optional_nobreak => Shift(yy_state_661) - T_EOF | T_RPAREN | T_COMMA | T_COLON | T_SEMI | T_RBRACKET | T_LBRACE | T_RBRACE | T_AND => Reduce(0, NT_optional_nobreak, yy_action_501) + T_LPAREN => Shift(yy_state_941) + T_INFIX1 | T_INFIX2 | T_INFIX3 | T_INFIX4 | T_EOF | T_WITH | T_CATCH | T_EQ_TILDE | T_RPAREN | T_COMMA | T_MINUS | T_DOT_LIDENT | T_DOT_INT | T_COLON | T_SEMI | T_LBRACKET | T_PLUS | T_RBRACKET | T_BAR_RBRACKET | T_BAR | T_LBRACE | T_RBRACE | T_AMPERAMPER | T_AMPER | T_CARET | T_BARBAR | T_AS | T_PIPE | T_PIPE_LEFT | T_LT_PLUS | T_LT_QUESTION | T_ELSE | T_IF | T_FAT_ARROW | T_DOTDOT | T_RANGE_INCLUSIVE | T_RANGE_LT_INCLUSIVE | T_RANGE_EXCLUSIVE | T_RANGE_INCLUSIVE_REV | T_RANGE_EXCLUSIVE_REV | T_IS | T_AND | T_IMPLIES | T_LEXMATCH_QUESTION => Reduce(2, NT_simple_expr, yy_action_529) _ => Error } } -fn yy_state_661(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(5, NT_while_expr, yy_action_486) -} - -fn yy_state_662(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_expr_statement, yy_action_485) -} - -fn yy_state_663(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1020(_lookahead : YYSymbol) -> YYDecision { match _lookahead { NT_multiline_string => Shift(yy_state_2) T_MULTILINE_INTERP => Shift(yy_state_4) @@ -25500,162 +35734,110 @@ fn yy_state_663(_lookahead : YYSymbol) -> YYDecision { T_BYTE => Shift(yy_state_13) T_FALSE => Shift(yy_state_14) T_TRUE => Shift(yy_state_15) - T_INTERP => Shift(yy_state_16) - NT_non_empty_list_multiline_string_ => Shift(yy_state_17) - NT_simple_constant => Shift(yy_state_18) - T_AMPER => Shift(yy_state_19) - NT_qual_ident_ty => Shift(yy_state_25) - NT_tuple_expr => Shift(yy_state_26) - T_LBRACKET => Shift(yy_state_27) - NT_constr => Shift(yy_state_35) - NT_qual_ident_simple_expr => Shift(yy_state_36) - NT_atomic_expr => Shift(yy_state_37) - NT_anony_fn => Shift(yy_state_38) - T_LBRACE => Shift(yy_state_39) - T_FN => Shift(yy_state_48) - NT_type_name => Shift(yy_state_126) - T_ASYNC => Shift(yy_state_138) - NT_simple_expr => Shift(yy_state_151) - T_EXCLAMATION => Shift(yy_state_162) - T_MINUS => Shift(yy_state_178) - T_PLUS => Shift(yy_state_180) - T_UIDENT => Shift(yy_state_182) - T_PACKAGE_NAME => Shift(yy_state_183) - NT_prefix_expr => Shift(yy_state_187) - NT_range_expr => Shift(yy_state_198) - NT_postfix_expr => Shift(yy_state_416) - T_EXISTS => Shift(yy_state_417) - T_FORALL => Shift(yy_state_449) - NT_infix_expr => Shift(yy_state_455) - T_UNDERSCORE => Shift(yy_state_456) - T_LPAREN => Shift(yy_state_464) - NT_pipe_expr => Shift(yy_state_497) - NT_arrow_fn_expr => Shift(yy_state_513) - NT_quantifier_expr => Shift(yy_state_514) - NT_simple_try_expr => Shift(yy_state_515) - NT_lexmatch_expr => Shift(yy_state_516) - NT_match_expr => Shift(yy_state_517) - NT_if_expr => Shift(yy_state_518) - NT_try_expr => Shift(yy_state_519) - NT_while_expr => Shift(yy_state_520) - NT_foreach_expr => Shift(yy_state_521) - NT_for_expr => Shift(yy_state_522) - T_LEXMATCH => Shift(yy_state_523) - NT_lexmatch_header => Shift(yy_state_529) - NT_match_header => Shift(yy_state_540) - T_MATCH => Shift(yy_state_550) - T_IF => Shift(yy_state_553) - T_TRY_EXCLAMATION => Shift(yy_state_559) - T_TRY_QUESTION => Shift(yy_state_561) - T_TRY => Shift(yy_state_563) - NT_loop_label_colon => Shift(yy_state_577) - T_POST_LABEL => Shift(yy_state_585) - T_LIDENT => Shift(yy_state_587) - NT_expr => Shift(yy_state_664) - NT_option_expr_ => Shift(yy_state_665) - T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_902) - T_SEMI | T_RBRACE => Reduce(0, NT_option_expr_, yy_action_484) + T_BYTES_INTERP => Shift(yy_state_16) + T_INTERP => Shift(yy_state_17) + NT_non_empty_list_multiline_string_ => Shift(yy_state_18) + NT_simple_constant => Shift(yy_state_19) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + NT_tuple_expr => Shift(yy_state_27) + T_LBRACKET_BAR => Shift(yy_state_28) + T_LBRACKET => Shift(yy_state_36) + NT_constr => Shift(yy_state_47) + NT_qual_ident_simple_expr => Shift(yy_state_48) + NT_atomic_expr => Shift(yy_state_50) + NT_anony_fn => Shift(yy_state_51) + T_LBRACE => Shift(yy_state_52) + T_FN => Shift(yy_state_61) + NT_type_name => Shift(yy_state_139) + T_ASYNC => Shift(yy_state_152) + NT_simple_expr => Shift(yy_state_165) + T_EXCLAMATION => Shift(yy_state_176) + T_MINUS => Shift(yy_state_191) + T_PLUS => Shift(yy_state_193) + T_UIDENT => Shift(yy_state_195) + T_PACKAGE_NAME => Shift(yy_state_196) + NT_prefix_expr => Shift(yy_state_201) + NT_range_expr => Shift(yy_state_212) + NT_postfix_expr => Shift(yy_state_223) + T_EXISTS => Shift(yy_state_224) + T_FORALL => Shift(yy_state_256) + NT_infix_expr => Shift(yy_state_272) + T_UNDERSCORE => Shift(yy_state_273) + T_LPAREN => Shift(yy_state_281) + NT_pipe_expr => Shift(yy_state_325) + NT_arrow_fn_expr => Shift(yy_state_344) + NT_quantifier_expr => Shift(yy_state_345) + NT_simple_try_expr => Shift(yy_state_346) + NT_lexscan_expr => Shift(yy_state_347) + NT_lexmatch_expr => Shift(yy_state_348) + NT_match_expr => Shift(yy_state_349) + NT_if_expr => Shift(yy_state_350) + NT_try_expr => Shift(yy_state_351) + NT_while_expr => Shift(yy_state_352) + NT_foreach_expr => Shift(yy_state_353) + NT_for_expr => Shift(yy_state_354) + T_LEXSCAN => Shift(yy_state_355) + NT_lexscan_header => Shift(yy_state_358) + T_LEXMATCH => Shift(yy_state_391) + NT_lexmatch_header => Shift(yy_state_399) + NT_match_header => Shift(yy_state_444) + T_MATCH => Shift(yy_state_605) + T_IF => Shift(yy_state_608) + T_TRY_EXCLAMATION => Shift(yy_state_614) + T_TRY_QUESTION => Shift(yy_state_616) + T_TRY => Shift(yy_state_618) + NT_loop_label_colon => Shift(yy_state_632) + T_POST_LABEL => Shift(yy_state_639) + T_EXTEND => Shift(yy_state_641) + T_LIDENT => Shift(yy_state_648) + NT_option_expr_ => Shift(yy_state_933) + NT_expr => Shift(yy_state_1021) + T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_1071) + T_COLON => Reduce(0, NT_option_expr_, yy_action_615) _ => Error } } -fn yy_state_664(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_option_expr_, yy_action_483) +fn yy_state_1021(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_RBRACKET => Shift(yy_state_1022) + T_COLON => Reduce(1, NT_option_expr_, yy_action_614) + _ => Error + } } -fn yy_state_665(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(2, NT_expr_statement, yy_action_482) +fn yy_state_1022(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(4, NT_simple_expr, yy_action_533) } -fn yy_state_666(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1023(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_parameter, yy_action_493) +} + +fn yy_state_1024(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_multiline_string => Shift(yy_state_2) - T_MULTILINE_INTERP => Shift(yy_state_4) - T_MULTILINE_STRING => Shift(yy_state_5) - T_REGEX_LITERAL => Shift(yy_state_6) - T_STRING => Shift(yy_state_7) - T_FLOAT => Shift(yy_state_8) - T_DOUBLE => Shift(yy_state_9) - T_INT => Shift(yy_state_10) - T_CHAR => Shift(yy_state_11) - T_BYTES => Shift(yy_state_12) - T_BYTE => Shift(yy_state_13) - T_FALSE => Shift(yy_state_14) - T_TRUE => Shift(yy_state_15) - T_INTERP => Shift(yy_state_16) - NT_non_empty_list_multiline_string_ => Shift(yy_state_17) - NT_simple_constant => Shift(yy_state_18) - T_AMPER => Shift(yy_state_19) - NT_qual_ident_ty => Shift(yy_state_25) - NT_tuple_expr => Shift(yy_state_26) - T_LBRACKET => Shift(yy_state_27) - NT_constr => Shift(yy_state_35) - NT_qual_ident_simple_expr => Shift(yy_state_36) - NT_atomic_expr => Shift(yy_state_37) - NT_anony_fn => Shift(yy_state_38) - T_LBRACE => Shift(yy_state_39) - T_FN => Shift(yy_state_48) - NT_type_name => Shift(yy_state_126) - T_ASYNC => Shift(yy_state_138) - NT_simple_expr => Shift(yy_state_151) - T_EXCLAMATION => Shift(yy_state_162) - T_MINUS => Shift(yy_state_178) - T_PLUS => Shift(yy_state_180) - T_UIDENT => Shift(yy_state_182) - T_PACKAGE_NAME => Shift(yy_state_183) - NT_prefix_expr => Shift(yy_state_187) - NT_range_expr => Shift(yy_state_198) - NT_postfix_expr => Shift(yy_state_416) - T_EXISTS => Shift(yy_state_417) - T_FORALL => Shift(yy_state_449) - NT_infix_expr => Shift(yy_state_455) - T_UNDERSCORE => Shift(yy_state_456) - T_LPAREN => Shift(yy_state_464) - NT_pipe_expr => Shift(yy_state_497) - NT_arrow_fn_expr => Shift(yy_state_513) - NT_quantifier_expr => Shift(yy_state_514) - NT_simple_try_expr => Shift(yy_state_515) - NT_lexmatch_expr => Shift(yy_state_516) - NT_match_expr => Shift(yy_state_517) - NT_if_expr => Shift(yy_state_518) - NT_try_expr => Shift(yy_state_519) - NT_while_expr => Shift(yy_state_520) - NT_foreach_expr => Shift(yy_state_521) - NT_for_expr => Shift(yy_state_522) - T_LEXMATCH => Shift(yy_state_523) - NT_lexmatch_header => Shift(yy_state_529) - NT_match_header => Shift(yy_state_540) - T_MATCH => Shift(yy_state_550) - T_IF => Shift(yy_state_553) - T_TRY_EXCLAMATION => Shift(yy_state_559) - T_TRY_QUESTION => Shift(yy_state_561) - T_TRY => Shift(yy_state_563) - NT_loop_label_colon => Shift(yy_state_577) - T_LIDENT => Shift(yy_state_587) - NT_expr => Shift(yy_state_667) - NT_non_empty_list_commas_rev_expr_ => Shift(yy_state_668) - NT_non_empty_list_commas_no_trailing_expr_ => Shift(yy_state_671) - NT_list_commas_no_trailing_expr_ => Shift(yy_state_672) - T_POST_LABEL => Shift(yy_state_673) - T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_902) - T_SEMI | T_RBRACE => Reduce(0, NT_list_commas_no_trailing_expr_, yy_action_481) + T_ASYNC => Shift(yy_state_65) + T_UNDERSCORE => Shift(yy_state_70) + T_AMPER => Shift(yy_state_71) + T_PACKAGE_NAME => Shift(yy_state_73) + T_UIDENT => Shift(yy_state_80) + T_LPAREN => Shift(yy_state_84) + NT_simple_type => Shift(yy_state_110) + NT_type_ => Shift(yy_state_1025) _ => Error } } -fn yy_state_667(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_non_empty_list_commas_rev_expr_, yy_action_480) -} - -fn yy_state_668(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1025(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_COMMA => Shift(yy_state_669) - T_SEMI | T_RBRACE => Reduce(1, NT_non_empty_list_commas_no_trailing_expr_, yy_action_479) + T_EQUAL => Shift(yy_state_1026) + T_RPAREN | T_COMMA => Reduce(3, NT_parameter, yy_action_492) _ => Error } } -fn yy_state_669(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1026(_lookahead : YYSymbol) -> YYDecision { match _lookahead { NT_multiline_string => Shift(yy_state_2) T_MULTILINE_INTERP => Shift(yy_state_4) @@ -25670,157 +35852,114 @@ fn yy_state_669(_lookahead : YYSymbol) -> YYDecision { T_BYTE => Shift(yy_state_13) T_FALSE => Shift(yy_state_14) T_TRUE => Shift(yy_state_15) - T_INTERP => Shift(yy_state_16) - NT_non_empty_list_multiline_string_ => Shift(yy_state_17) - NT_simple_constant => Shift(yy_state_18) - T_AMPER => Shift(yy_state_19) - NT_qual_ident_ty => Shift(yy_state_25) - NT_tuple_expr => Shift(yy_state_26) - T_LBRACKET => Shift(yy_state_27) - NT_constr => Shift(yy_state_35) - NT_qual_ident_simple_expr => Shift(yy_state_36) - NT_atomic_expr => Shift(yy_state_37) - NT_anony_fn => Shift(yy_state_38) - T_LBRACE => Shift(yy_state_39) - T_FN => Shift(yy_state_48) - NT_type_name => Shift(yy_state_126) - T_ASYNC => Shift(yy_state_138) - NT_simple_expr => Shift(yy_state_151) - T_EXCLAMATION => Shift(yy_state_162) - T_MINUS => Shift(yy_state_178) - T_PLUS => Shift(yy_state_180) - T_UIDENT => Shift(yy_state_182) - T_PACKAGE_NAME => Shift(yy_state_183) - NT_prefix_expr => Shift(yy_state_187) - NT_range_expr => Shift(yy_state_198) - NT_postfix_expr => Shift(yy_state_416) - T_EXISTS => Shift(yy_state_417) - T_FORALL => Shift(yy_state_449) - NT_infix_expr => Shift(yy_state_455) - T_UNDERSCORE => Shift(yy_state_456) - T_LPAREN => Shift(yy_state_464) - NT_pipe_expr => Shift(yy_state_497) - NT_arrow_fn_expr => Shift(yy_state_513) - NT_quantifier_expr => Shift(yy_state_514) - NT_simple_try_expr => Shift(yy_state_515) - NT_lexmatch_expr => Shift(yy_state_516) - NT_match_expr => Shift(yy_state_517) - NT_if_expr => Shift(yy_state_518) - NT_try_expr => Shift(yy_state_519) - NT_while_expr => Shift(yy_state_520) - NT_foreach_expr => Shift(yy_state_521) - NT_for_expr => Shift(yy_state_522) - T_LEXMATCH => Shift(yy_state_523) - NT_lexmatch_header => Shift(yy_state_529) - NT_match_header => Shift(yy_state_540) - T_MATCH => Shift(yy_state_550) - T_IF => Shift(yy_state_553) - T_TRY_EXCLAMATION => Shift(yy_state_559) - T_TRY_QUESTION => Shift(yy_state_561) - T_TRY => Shift(yy_state_563) - NT_loop_label_colon => Shift(yy_state_577) - T_POST_LABEL => Shift(yy_state_585) - T_LIDENT => Shift(yy_state_587) - NT_expr => Shift(yy_state_670) - T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_902) + T_BYTES_INTERP => Shift(yy_state_16) + T_INTERP => Shift(yy_state_17) + NT_non_empty_list_multiline_string_ => Shift(yy_state_18) + NT_simple_constant => Shift(yy_state_19) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + NT_tuple_expr => Shift(yy_state_27) + T_LBRACKET_BAR => Shift(yy_state_28) + T_LBRACKET => Shift(yy_state_36) + NT_constr => Shift(yy_state_47) + NT_qual_ident_simple_expr => Shift(yy_state_48) + NT_atomic_expr => Shift(yy_state_50) + NT_anony_fn => Shift(yy_state_51) + T_LBRACE => Shift(yy_state_52) + T_FN => Shift(yy_state_61) + NT_type_name => Shift(yy_state_139) + T_ASYNC => Shift(yy_state_152) + NT_simple_expr => Shift(yy_state_165) + T_EXCLAMATION => Shift(yy_state_176) + T_MINUS => Shift(yy_state_191) + T_PLUS => Shift(yy_state_193) + T_UIDENT => Shift(yy_state_195) + T_PACKAGE_NAME => Shift(yy_state_196) + NT_prefix_expr => Shift(yy_state_201) + NT_range_expr => Shift(yy_state_212) + NT_postfix_expr => Shift(yy_state_223) + T_EXISTS => Shift(yy_state_224) + T_FORALL => Shift(yy_state_256) + NT_infix_expr => Shift(yy_state_272) + T_UNDERSCORE => Shift(yy_state_273) + T_LPAREN => Shift(yy_state_281) + NT_pipe_expr => Shift(yy_state_325) + NT_arrow_fn_expr => Shift(yy_state_344) + NT_quantifier_expr => Shift(yy_state_345) + NT_simple_try_expr => Shift(yy_state_346) + NT_lexscan_expr => Shift(yy_state_347) + NT_lexmatch_expr => Shift(yy_state_348) + NT_match_expr => Shift(yy_state_349) + NT_if_expr => Shift(yy_state_350) + NT_try_expr => Shift(yy_state_351) + NT_while_expr => Shift(yy_state_352) + NT_foreach_expr => Shift(yy_state_353) + NT_for_expr => Shift(yy_state_354) + T_LEXSCAN => Shift(yy_state_355) + NT_lexscan_header => Shift(yy_state_358) + T_LEXMATCH => Shift(yy_state_391) + NT_lexmatch_header => Shift(yy_state_399) + NT_match_header => Shift(yy_state_444) + T_MATCH => Shift(yy_state_605) + T_IF => Shift(yy_state_608) + T_TRY_EXCLAMATION => Shift(yy_state_614) + T_TRY_QUESTION => Shift(yy_state_616) + T_TRY => Shift(yy_state_618) + NT_loop_label_colon => Shift(yy_state_632) + T_POST_LABEL => Shift(yy_state_639) + T_EXTEND => Shift(yy_state_641) + T_LIDENT => Shift(yy_state_648) + NT_expr => Shift(yy_state_1027) + T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_1071) _ => Error } } -fn yy_state_670(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_non_empty_list_commas_rev_expr_, yy_action_478) +fn yy_state_1027(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(5, NT_parameter, yy_action_491) } -fn yy_state_671(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_list_commas_no_trailing_expr_, yy_action_477) +fn yy_state_1028(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_QUESTION => Shift(yy_state_1029) + T_COLON => Shift(yy_state_1036) + T_RPAREN | T_COMMA => Reduce(1, NT_parameter, yy_action_490) + _ => Error + } } -fn yy_state_672(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(2, NT_expr_statement, yy_action_476) +fn yy_state_1029(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_COLON => Shift(yy_state_1030) + T_EQUAL => Shift(yy_state_1034) + T_RPAREN | T_COMMA => Reduce(2, NT_parameter, yy_action_489) + _ => Error + } } -fn yy_state_673(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1030(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_multiline_string => Shift(yy_state_2) - T_MULTILINE_INTERP => Shift(yy_state_4) - T_MULTILINE_STRING => Shift(yy_state_5) - T_REGEX_LITERAL => Shift(yy_state_6) - T_STRING => Shift(yy_state_7) - T_FLOAT => Shift(yy_state_8) - T_DOUBLE => Shift(yy_state_9) - T_INT => Shift(yy_state_10) - T_CHAR => Shift(yy_state_11) - T_BYTES => Shift(yy_state_12) - T_BYTE => Shift(yy_state_13) - T_FALSE => Shift(yy_state_14) - T_TRUE => Shift(yy_state_15) - T_INTERP => Shift(yy_state_16) - NT_non_empty_list_multiline_string_ => Shift(yy_state_17) - NT_simple_constant => Shift(yy_state_18) - T_AMPER => Shift(yy_state_19) - NT_qual_ident_ty => Shift(yy_state_25) - NT_tuple_expr => Shift(yy_state_26) - T_LBRACKET => Shift(yy_state_27) - NT_constr => Shift(yy_state_35) - NT_qual_ident_simple_expr => Shift(yy_state_36) - NT_atomic_expr => Shift(yy_state_37) - NT_anony_fn => Shift(yy_state_38) - T_LBRACE => Shift(yy_state_39) - T_FN => Shift(yy_state_48) - NT_type_name => Shift(yy_state_126) - T_ASYNC => Shift(yy_state_138) - NT_simple_expr => Shift(yy_state_151) - T_EXCLAMATION => Shift(yy_state_162) - T_MINUS => Shift(yy_state_178) - T_PLUS => Shift(yy_state_180) - T_UIDENT => Shift(yy_state_182) - T_PACKAGE_NAME => Shift(yy_state_183) - NT_prefix_expr => Shift(yy_state_187) - NT_range_expr => Shift(yy_state_198) - NT_postfix_expr => Shift(yy_state_416) - T_EXISTS => Shift(yy_state_417) - T_FORALL => Shift(yy_state_449) - NT_infix_expr => Shift(yy_state_455) - T_UNDERSCORE => Shift(yy_state_456) - T_LPAREN => Shift(yy_state_464) - NT_pipe_expr => Shift(yy_state_497) - NT_arrow_fn_expr => Shift(yy_state_513) - NT_quantifier_expr => Shift(yy_state_514) - NT_simple_try_expr => Shift(yy_state_515) - NT_lexmatch_expr => Shift(yy_state_516) - NT_match_expr => Shift(yy_state_517) - NT_if_expr => Shift(yy_state_518) - NT_try_expr => Shift(yy_state_519) - NT_while_expr => Shift(yy_state_520) - NT_foreach_expr => Shift(yy_state_521) - NT_for_expr => Shift(yy_state_522) - T_LEXMATCH => Shift(yy_state_523) - NT_lexmatch_header => Shift(yy_state_529) - NT_match_header => Shift(yy_state_540) - T_MATCH => Shift(yy_state_550) - T_IF => Shift(yy_state_553) - T_TRY_EXCLAMATION => Shift(yy_state_559) - T_TRY_QUESTION => Shift(yy_state_561) - T_TRY => Shift(yy_state_563) - NT_loop_label_colon => Shift(yy_state_577) - T_POST_LABEL => Shift(yy_state_585) - T_COLON => Shift(yy_state_586) - T_LIDENT => Shift(yy_state_587) - NT_expr => Shift(yy_state_667) - NT_non_empty_list_commas_rev_expr_ => Shift(yy_state_668) - NT_non_empty_list_commas_no_trailing_expr_ => Shift(yy_state_671) - NT_list_commas_no_trailing_expr_ => Shift(yy_state_674) - T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_902) - T_SEMI | T_RBRACE => Reduce(0, NT_list_commas_no_trailing_expr_, yy_action_481) + T_ASYNC => Shift(yy_state_65) + T_UNDERSCORE => Shift(yy_state_70) + T_AMPER => Shift(yy_state_71) + T_PACKAGE_NAME => Shift(yy_state_73) + T_UIDENT => Shift(yy_state_80) + T_LPAREN => Shift(yy_state_84) + NT_simple_type => Shift(yy_state_110) + NT_type_ => Shift(yy_state_1031) _ => Error } } -fn yy_state_674(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_expr_statement, yy_action_475) +fn yy_state_1031(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_EQUAL => Shift(yy_state_1032) + T_RPAREN | T_COMMA => Reduce(4, NT_parameter, yy_action_488) + _ => Error + } } -fn yy_state_675(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1032(_lookahead : YYSymbol) -> YYDecision { match _lookahead { NT_multiline_string => Shift(yy_state_2) T_MULTILINE_INTERP => Shift(yy_state_4) @@ -25835,70 +35974,74 @@ fn yy_state_675(_lookahead : YYSymbol) -> YYDecision { T_BYTE => Shift(yy_state_13) T_FALSE => Shift(yy_state_14) T_TRUE => Shift(yy_state_15) - T_INTERP => Shift(yy_state_16) - NT_non_empty_list_multiline_string_ => Shift(yy_state_17) - NT_simple_constant => Shift(yy_state_18) - T_AMPER => Shift(yy_state_19) - NT_qual_ident_ty => Shift(yy_state_25) - NT_tuple_expr => Shift(yy_state_26) - T_LBRACKET => Shift(yy_state_27) - NT_constr => Shift(yy_state_35) - NT_qual_ident_simple_expr => Shift(yy_state_36) - NT_atomic_expr => Shift(yy_state_37) - NT_anony_fn => Shift(yy_state_38) - T_LBRACE => Shift(yy_state_39) - T_FN => Shift(yy_state_48) - NT_type_name => Shift(yy_state_126) - T_ASYNC => Shift(yy_state_138) - NT_simple_expr => Shift(yy_state_151) - T_EXCLAMATION => Shift(yy_state_162) - T_MINUS => Shift(yy_state_178) - T_PLUS => Shift(yy_state_180) - T_UIDENT => Shift(yy_state_182) - T_PACKAGE_NAME => Shift(yy_state_183) - NT_prefix_expr => Shift(yy_state_187) - NT_range_expr => Shift(yy_state_198) - NT_postfix_expr => Shift(yy_state_416) - T_EXISTS => Shift(yy_state_417) - T_FORALL => Shift(yy_state_449) - NT_infix_expr => Shift(yy_state_455) - T_UNDERSCORE => Shift(yy_state_456) - T_LPAREN => Shift(yy_state_464) - NT_pipe_expr => Shift(yy_state_497) - NT_arrow_fn_expr => Shift(yy_state_513) - NT_quantifier_expr => Shift(yy_state_514) - NT_simple_try_expr => Shift(yy_state_515) - NT_lexmatch_expr => Shift(yy_state_516) - NT_match_expr => Shift(yy_state_517) - NT_if_expr => Shift(yy_state_518) - NT_try_expr => Shift(yy_state_519) - NT_while_expr => Shift(yy_state_520) - NT_foreach_expr => Shift(yy_state_521) - NT_for_expr => Shift(yy_state_522) - T_LEXMATCH => Shift(yy_state_523) - NT_lexmatch_header => Shift(yy_state_529) - NT_match_header => Shift(yy_state_540) - T_MATCH => Shift(yy_state_550) - T_IF => Shift(yy_state_553) - T_TRY_EXCLAMATION => Shift(yy_state_559) - T_TRY_QUESTION => Shift(yy_state_561) - T_TRY => Shift(yy_state_563) - NT_loop_label_colon => Shift(yy_state_577) - T_LIDENT => Shift(yy_state_587) - NT_expr => Shift(yy_state_664) - NT_option_expr_ => Shift(yy_state_676) - T_POST_LABEL => Shift(yy_state_677) - T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_902) - T_SEMI | T_RBRACE => Reduce(0, NT_option_expr_, yy_action_484) + T_BYTES_INTERP => Shift(yy_state_16) + T_INTERP => Shift(yy_state_17) + NT_non_empty_list_multiline_string_ => Shift(yy_state_18) + NT_simple_constant => Shift(yy_state_19) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + NT_tuple_expr => Shift(yy_state_27) + T_LBRACKET_BAR => Shift(yy_state_28) + T_LBRACKET => Shift(yy_state_36) + NT_constr => Shift(yy_state_47) + NT_qual_ident_simple_expr => Shift(yy_state_48) + NT_atomic_expr => Shift(yy_state_50) + NT_anony_fn => Shift(yy_state_51) + T_LBRACE => Shift(yy_state_52) + T_FN => Shift(yy_state_61) + NT_type_name => Shift(yy_state_139) + T_ASYNC => Shift(yy_state_152) + NT_simple_expr => Shift(yy_state_165) + T_EXCLAMATION => Shift(yy_state_176) + T_MINUS => Shift(yy_state_191) + T_PLUS => Shift(yy_state_193) + T_UIDENT => Shift(yy_state_195) + T_PACKAGE_NAME => Shift(yy_state_196) + NT_prefix_expr => Shift(yy_state_201) + NT_range_expr => Shift(yy_state_212) + NT_postfix_expr => Shift(yy_state_223) + T_EXISTS => Shift(yy_state_224) + T_FORALL => Shift(yy_state_256) + NT_infix_expr => Shift(yy_state_272) + T_UNDERSCORE => Shift(yy_state_273) + T_LPAREN => Shift(yy_state_281) + NT_pipe_expr => Shift(yy_state_325) + NT_arrow_fn_expr => Shift(yy_state_344) + NT_quantifier_expr => Shift(yy_state_345) + NT_simple_try_expr => Shift(yy_state_346) + NT_lexscan_expr => Shift(yy_state_347) + NT_lexmatch_expr => Shift(yy_state_348) + NT_match_expr => Shift(yy_state_349) + NT_if_expr => Shift(yy_state_350) + NT_try_expr => Shift(yy_state_351) + NT_while_expr => Shift(yy_state_352) + NT_foreach_expr => Shift(yy_state_353) + NT_for_expr => Shift(yy_state_354) + T_LEXSCAN => Shift(yy_state_355) + NT_lexscan_header => Shift(yy_state_358) + T_LEXMATCH => Shift(yy_state_391) + NT_lexmatch_header => Shift(yy_state_399) + NT_match_header => Shift(yy_state_444) + T_MATCH => Shift(yy_state_605) + T_IF => Shift(yy_state_608) + T_TRY_EXCLAMATION => Shift(yy_state_614) + T_TRY_QUESTION => Shift(yy_state_616) + T_TRY => Shift(yy_state_618) + NT_loop_label_colon => Shift(yy_state_632) + T_POST_LABEL => Shift(yy_state_639) + T_EXTEND => Shift(yy_state_641) + T_LIDENT => Shift(yy_state_648) + NT_expr => Shift(yy_state_1033) + T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_1071) _ => Error } } -fn yy_state_676(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(2, NT_expr_statement, yy_action_474) +fn yy_state_1033(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(6, NT_parameter, yy_action_487) } -fn yy_state_677(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1034(_lookahead : YYSymbol) -> YYDecision { match _lookahead { NT_multiline_string => Shift(yy_state_2) T_MULTILINE_INTERP => Shift(yy_state_4) @@ -25913,90 +36056,132 @@ fn yy_state_677(_lookahead : YYSymbol) -> YYDecision { T_BYTE => Shift(yy_state_13) T_FALSE => Shift(yy_state_14) T_TRUE => Shift(yy_state_15) - T_INTERP => Shift(yy_state_16) - NT_non_empty_list_multiline_string_ => Shift(yy_state_17) - NT_simple_constant => Shift(yy_state_18) - T_AMPER => Shift(yy_state_19) - NT_qual_ident_ty => Shift(yy_state_25) - NT_tuple_expr => Shift(yy_state_26) - T_LBRACKET => Shift(yy_state_27) - NT_constr => Shift(yy_state_35) - NT_qual_ident_simple_expr => Shift(yy_state_36) - NT_atomic_expr => Shift(yy_state_37) - NT_anony_fn => Shift(yy_state_38) - T_LBRACE => Shift(yy_state_39) - T_FN => Shift(yy_state_48) - NT_type_name => Shift(yy_state_126) - T_ASYNC => Shift(yy_state_138) - NT_simple_expr => Shift(yy_state_151) - T_EXCLAMATION => Shift(yy_state_162) - T_MINUS => Shift(yy_state_178) - T_PLUS => Shift(yy_state_180) - T_UIDENT => Shift(yy_state_182) - T_PACKAGE_NAME => Shift(yy_state_183) - NT_prefix_expr => Shift(yy_state_187) - NT_range_expr => Shift(yy_state_198) - NT_postfix_expr => Shift(yy_state_416) - T_EXISTS => Shift(yy_state_417) - T_FORALL => Shift(yy_state_449) - NT_infix_expr => Shift(yy_state_455) - T_UNDERSCORE => Shift(yy_state_456) - T_LPAREN => Shift(yy_state_464) - NT_pipe_expr => Shift(yy_state_497) - NT_arrow_fn_expr => Shift(yy_state_513) - NT_quantifier_expr => Shift(yy_state_514) - NT_simple_try_expr => Shift(yy_state_515) - NT_lexmatch_expr => Shift(yy_state_516) - NT_match_expr => Shift(yy_state_517) - NT_if_expr => Shift(yy_state_518) - NT_try_expr => Shift(yy_state_519) - NT_while_expr => Shift(yy_state_520) - NT_foreach_expr => Shift(yy_state_521) - NT_for_expr => Shift(yy_state_522) - T_LEXMATCH => Shift(yy_state_523) - NT_lexmatch_header => Shift(yy_state_529) - NT_match_header => Shift(yy_state_540) - T_MATCH => Shift(yy_state_550) - T_IF => Shift(yy_state_553) - T_TRY_EXCLAMATION => Shift(yy_state_559) - T_TRY_QUESTION => Shift(yy_state_561) - T_TRY => Shift(yy_state_563) - NT_loop_label_colon => Shift(yy_state_577) - T_POST_LABEL => Shift(yy_state_585) - T_COLON => Shift(yy_state_586) - T_LIDENT => Shift(yy_state_587) - NT_expr => Shift(yy_state_664) - NT_option_expr_ => Shift(yy_state_678) - T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_902) - T_SEMI | T_RBRACE => Reduce(0, NT_option_expr_, yy_action_484) + T_BYTES_INTERP => Shift(yy_state_16) + T_INTERP => Shift(yy_state_17) + NT_non_empty_list_multiline_string_ => Shift(yy_state_18) + NT_simple_constant => Shift(yy_state_19) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + NT_tuple_expr => Shift(yy_state_27) + T_LBRACKET_BAR => Shift(yy_state_28) + T_LBRACKET => Shift(yy_state_36) + NT_constr => Shift(yy_state_47) + NT_qual_ident_simple_expr => Shift(yy_state_48) + NT_atomic_expr => Shift(yy_state_50) + NT_anony_fn => Shift(yy_state_51) + T_LBRACE => Shift(yy_state_52) + T_FN => Shift(yy_state_61) + NT_type_name => Shift(yy_state_139) + T_ASYNC => Shift(yy_state_152) + NT_simple_expr => Shift(yy_state_165) + T_EXCLAMATION => Shift(yy_state_176) + T_MINUS => Shift(yy_state_191) + T_PLUS => Shift(yy_state_193) + T_UIDENT => Shift(yy_state_195) + T_PACKAGE_NAME => Shift(yy_state_196) + NT_prefix_expr => Shift(yy_state_201) + NT_range_expr => Shift(yy_state_212) + NT_postfix_expr => Shift(yy_state_223) + T_EXISTS => Shift(yy_state_224) + T_FORALL => Shift(yy_state_256) + NT_infix_expr => Shift(yy_state_272) + T_UNDERSCORE => Shift(yy_state_273) + T_LPAREN => Shift(yy_state_281) + NT_pipe_expr => Shift(yy_state_325) + NT_arrow_fn_expr => Shift(yy_state_344) + NT_quantifier_expr => Shift(yy_state_345) + NT_simple_try_expr => Shift(yy_state_346) + NT_lexscan_expr => Shift(yy_state_347) + NT_lexmatch_expr => Shift(yy_state_348) + NT_match_expr => Shift(yy_state_349) + NT_if_expr => Shift(yy_state_350) + NT_try_expr => Shift(yy_state_351) + NT_while_expr => Shift(yy_state_352) + NT_foreach_expr => Shift(yy_state_353) + NT_for_expr => Shift(yy_state_354) + T_LEXSCAN => Shift(yy_state_355) + NT_lexscan_header => Shift(yy_state_358) + T_LEXMATCH => Shift(yy_state_391) + NT_lexmatch_header => Shift(yy_state_399) + NT_match_header => Shift(yy_state_444) + T_MATCH => Shift(yy_state_605) + T_IF => Shift(yy_state_608) + T_TRY_EXCLAMATION => Shift(yy_state_614) + T_TRY_QUESTION => Shift(yy_state_616) + T_TRY => Shift(yy_state_618) + NT_loop_label_colon => Shift(yy_state_632) + T_POST_LABEL => Shift(yy_state_639) + T_EXTEND => Shift(yy_state_641) + T_LIDENT => Shift(yy_state_648) + NT_expr => Shift(yy_state_1035) + T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_1071) _ => Error } } -fn yy_state_678(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_expr_statement, yy_action_473) +fn yy_state_1035(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(4, NT_parameter, yy_action_486) } -fn yy_state_679(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(2, NT_non_empty_list_semis_single_pattern_case_, yy_action_472) +fn yy_state_1036(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_ASYNC => Shift(yy_state_65) + T_UNDERSCORE => Shift(yy_state_70) + T_AMPER => Shift(yy_state_71) + T_PACKAGE_NAME => Shift(yy_state_73) + T_UIDENT => Shift(yy_state_80) + T_LPAREN => Shift(yy_state_84) + NT_simple_type => Shift(yy_state_110) + NT_type_ => Shift(yy_state_1037) + _ => Error + } } -fn yy_state_680(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(2, NT_match_expr, yy_action_471) +fn yy_state_1037(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_parameter, yy_action_485) } -fn yy_state_681(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1038(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RBRACE => Shift(yy_state_682) + T_QUESTION => Shift(yy_state_1039) + T_COLON => Shift(yy_state_1046) + T_RPAREN | T_COMMA => Reduce(1, NT_parameter, yy_action_484) _ => Error } } -fn yy_state_682(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_match_expr, yy_action_470) +fn yy_state_1039(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_COLON => Shift(yy_state_1040) + T_EQUAL => Shift(yy_state_1044) + T_RPAREN | T_COMMA => Reduce(2, NT_parameter, yy_action_483) + _ => Error + } } -fn yy_state_683(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1040(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_ASYNC => Shift(yy_state_65) + T_UNDERSCORE => Shift(yy_state_70) + T_AMPER => Shift(yy_state_71) + T_PACKAGE_NAME => Shift(yy_state_73) + T_UIDENT => Shift(yy_state_80) + T_LPAREN => Shift(yy_state_84) + NT_simple_type => Shift(yy_state_110) + NT_type_ => Shift(yy_state_1041) + _ => Error + } +} + +fn yy_state_1041(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_EQUAL => Shift(yy_state_1042) + T_RPAREN | T_COMMA => Reduce(4, NT_parameter, yy_action_482) + _ => Error + } +} + +fn yy_state_1042(_lookahead : YYSymbol) -> YYDecision { match _lookahead { NT_multiline_string => Shift(yy_state_2) T_MULTILINE_INTERP => Shift(yy_state_4) @@ -26011,92 +36196,74 @@ fn yy_state_683(_lookahead : YYSymbol) -> YYDecision { T_BYTE => Shift(yy_state_13) T_FALSE => Shift(yy_state_14) T_TRUE => Shift(yy_state_15) - T_INTERP => Shift(yy_state_16) - NT_non_empty_list_multiline_string_ => Shift(yy_state_17) - NT_simple_constant => Shift(yy_state_18) - T_AMPER => Shift(yy_state_19) - NT_qual_ident_ty => Shift(yy_state_25) - NT_tuple_expr => Shift(yy_state_26) - T_LBRACKET => Shift(yy_state_27) - NT_constr => Shift(yy_state_35) - NT_qual_ident_simple_expr => Shift(yy_state_36) - NT_atomic_expr => Shift(yy_state_37) - NT_anony_fn => Shift(yy_state_38) - T_LBRACE => Shift(yy_state_39) - T_FN => Shift(yy_state_48) - NT_type_name => Shift(yy_state_126) - T_ASYNC => Shift(yy_state_138) - T_EXCLAMATION => Shift(yy_state_162) - T_MINUS => Shift(yy_state_178) - T_PLUS => Shift(yy_state_180) - T_UIDENT => Shift(yy_state_182) - NT_prefix_expr => Shift(yy_state_187) - NT_range_expr => Shift(yy_state_198) - NT_postfix_expr => Shift(yy_state_416) - T_EXISTS => Shift(yy_state_417) - T_FORALL => Shift(yy_state_449) - NT_infix_expr => Shift(yy_state_455) - T_UNDERSCORE => Shift(yy_state_456) - NT_qual_ident => Shift(yy_state_458) - NT_simple_expr => Shift(yy_state_459) - T_LPAREN => Shift(yy_state_464) - NT_pipe_expr => Shift(yy_state_497) - NT_arrow_fn_expr => Shift(yy_state_513) - NT_quantifier_expr => Shift(yy_state_514) - NT_simple_try_expr => Shift(yy_state_515) - NT_lexmatch_expr => Shift(yy_state_516) - NT_match_expr => Shift(yy_state_517) - NT_if_expr => Shift(yy_state_518) - NT_try_expr => Shift(yy_state_519) - NT_while_expr => Shift(yy_state_520) - NT_foreach_expr => Shift(yy_state_521) - NT_for_expr => Shift(yy_state_522) - T_LEXMATCH => Shift(yy_state_523) - NT_lexmatch_header => Shift(yy_state_529) - NT_match_header => Shift(yy_state_540) - T_MATCH => Shift(yy_state_550) - T_IF => Shift(yy_state_553) - T_TRY_EXCLAMATION => Shift(yy_state_559) - T_TRY_QUESTION => Shift(yy_state_561) - T_TRY => Shift(yy_state_563) - NT_loop_label_colon => Shift(yy_state_577) - T_POST_LABEL => Shift(yy_state_585) - NT_expr => Shift(yy_state_590) - NT_left_value => Shift(yy_state_591) - T_ELLIPSIS => Shift(yy_state_598) - T_RAISE => Shift(yy_state_599) - T_PACKAGE_NAME => Shift(yy_state_601) - T_LIDENT => Shift(yy_state_603) - NT_expr_statement_no_break_continue_return => Shift(yy_state_662) - T_RETURN => Shift(yy_state_663) - T_CONTINUE => Shift(yy_state_666) - T_BREAK => Shift(yy_state_675) - NT_expr_statement => Shift(yy_state_684) - T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_902) - _ => Error - } -} - -fn yy_state_684(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_lex_case, yy_action_469) -} - -fn yy_state_685(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_list_semis_lex_case_, yy_action_468) -} - -fn yy_state_686(_lookahead : YYSymbol) -> YYDecision { - match _lookahead { - T_RBRACE => Shift(yy_state_687) + T_BYTES_INTERP => Shift(yy_state_16) + T_INTERP => Shift(yy_state_17) + NT_non_empty_list_multiline_string_ => Shift(yy_state_18) + NT_simple_constant => Shift(yy_state_19) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + NT_tuple_expr => Shift(yy_state_27) + T_LBRACKET_BAR => Shift(yy_state_28) + T_LBRACKET => Shift(yy_state_36) + NT_constr => Shift(yy_state_47) + NT_qual_ident_simple_expr => Shift(yy_state_48) + NT_atomic_expr => Shift(yy_state_50) + NT_anony_fn => Shift(yy_state_51) + T_LBRACE => Shift(yy_state_52) + T_FN => Shift(yy_state_61) + NT_type_name => Shift(yy_state_139) + T_ASYNC => Shift(yy_state_152) + NT_simple_expr => Shift(yy_state_165) + T_EXCLAMATION => Shift(yy_state_176) + T_MINUS => Shift(yy_state_191) + T_PLUS => Shift(yy_state_193) + T_UIDENT => Shift(yy_state_195) + T_PACKAGE_NAME => Shift(yy_state_196) + NT_prefix_expr => Shift(yy_state_201) + NT_range_expr => Shift(yy_state_212) + NT_postfix_expr => Shift(yy_state_223) + T_EXISTS => Shift(yy_state_224) + T_FORALL => Shift(yy_state_256) + NT_infix_expr => Shift(yy_state_272) + T_UNDERSCORE => Shift(yy_state_273) + T_LPAREN => Shift(yy_state_281) + NT_pipe_expr => Shift(yy_state_325) + NT_arrow_fn_expr => Shift(yy_state_344) + NT_quantifier_expr => Shift(yy_state_345) + NT_simple_try_expr => Shift(yy_state_346) + NT_lexscan_expr => Shift(yy_state_347) + NT_lexmatch_expr => Shift(yy_state_348) + NT_match_expr => Shift(yy_state_349) + NT_if_expr => Shift(yy_state_350) + NT_try_expr => Shift(yy_state_351) + NT_while_expr => Shift(yy_state_352) + NT_foreach_expr => Shift(yy_state_353) + NT_for_expr => Shift(yy_state_354) + T_LEXSCAN => Shift(yy_state_355) + NT_lexscan_header => Shift(yy_state_358) + T_LEXMATCH => Shift(yy_state_391) + NT_lexmatch_header => Shift(yy_state_399) + NT_match_header => Shift(yy_state_444) + T_MATCH => Shift(yy_state_605) + T_IF => Shift(yy_state_608) + T_TRY_EXCLAMATION => Shift(yy_state_614) + T_TRY_QUESTION => Shift(yy_state_616) + T_TRY => Shift(yy_state_618) + NT_loop_label_colon => Shift(yy_state_632) + T_POST_LABEL => Shift(yy_state_639) + T_EXTEND => Shift(yy_state_641) + T_LIDENT => Shift(yy_state_648) + NT_expr => Shift(yy_state_1043) + T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_1071) _ => Error } } -fn yy_state_687(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_lexmatch_expr, yy_action_467) +fn yy_state_1043(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(6, NT_parameter, yy_action_481) } -fn yy_state_688(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1044(_lookahead : YYSymbol) -> YYDecision { match _lookahead { NT_multiline_string => Shift(yy_state_2) T_MULTILINE_INTERP => Shift(yy_state_4) @@ -26111,165 +36278,141 @@ fn yy_state_688(_lookahead : YYSymbol) -> YYDecision { T_BYTE => Shift(yy_state_13) T_FALSE => Shift(yy_state_14) T_TRUE => Shift(yy_state_15) - T_INTERP => Shift(yy_state_16) - NT_non_empty_list_multiline_string_ => Shift(yy_state_17) - NT_simple_constant => Shift(yy_state_18) - T_AMPER => Shift(yy_state_19) - NT_qual_ident_ty => Shift(yy_state_25) - NT_tuple_expr => Shift(yy_state_26) - T_LBRACKET => Shift(yy_state_27) - NT_constr => Shift(yy_state_35) - NT_qual_ident_simple_expr => Shift(yy_state_36) - NT_atomic_expr => Shift(yy_state_37) - NT_anony_fn => Shift(yy_state_38) - T_LBRACE => Shift(yy_state_39) - T_FN => Shift(yy_state_48) - NT_type_name => Shift(yy_state_126) - T_ASYNC => Shift(yy_state_138) - NT_simple_expr => Shift(yy_state_151) - T_EXCLAMATION => Shift(yy_state_162) - T_UNDERSCORE => Shift(yy_state_163) - T_LPAREN => Shift(yy_state_164) - T_MINUS => Shift(yy_state_178) - T_PLUS => Shift(yy_state_180) - T_UIDENT => Shift(yy_state_182) - T_PACKAGE_NAME => Shift(yy_state_183) - T_LIDENT => Shift(yy_state_186) - NT_prefix_expr => Shift(yy_state_187) - NT_range_expr => Shift(yy_state_198) - NT_postfix_expr => Shift(yy_state_416) - NT_infix_expr => Shift(yy_state_689) + T_BYTES_INTERP => Shift(yy_state_16) + T_INTERP => Shift(yy_state_17) + NT_non_empty_list_multiline_string_ => Shift(yy_state_18) + NT_simple_constant => Shift(yy_state_19) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + NT_tuple_expr => Shift(yy_state_27) + T_LBRACKET_BAR => Shift(yy_state_28) + T_LBRACKET => Shift(yy_state_36) + NT_constr => Shift(yy_state_47) + NT_qual_ident_simple_expr => Shift(yy_state_48) + NT_atomic_expr => Shift(yy_state_50) + NT_anony_fn => Shift(yy_state_51) + T_LBRACE => Shift(yy_state_52) + T_FN => Shift(yy_state_61) + NT_type_name => Shift(yy_state_139) + T_ASYNC => Shift(yy_state_152) + NT_simple_expr => Shift(yy_state_165) + T_EXCLAMATION => Shift(yy_state_176) + T_MINUS => Shift(yy_state_191) + T_PLUS => Shift(yy_state_193) + T_UIDENT => Shift(yy_state_195) + T_PACKAGE_NAME => Shift(yy_state_196) + NT_prefix_expr => Shift(yy_state_201) + NT_range_expr => Shift(yy_state_212) + NT_postfix_expr => Shift(yy_state_223) + T_EXISTS => Shift(yy_state_224) + T_FORALL => Shift(yy_state_256) + NT_infix_expr => Shift(yy_state_272) + T_UNDERSCORE => Shift(yy_state_273) + T_LPAREN => Shift(yy_state_281) + NT_pipe_expr => Shift(yy_state_325) + NT_arrow_fn_expr => Shift(yy_state_344) + NT_quantifier_expr => Shift(yy_state_345) + NT_simple_try_expr => Shift(yy_state_346) + NT_lexscan_expr => Shift(yy_state_347) + NT_lexmatch_expr => Shift(yy_state_348) + NT_match_expr => Shift(yy_state_349) + NT_if_expr => Shift(yy_state_350) + NT_try_expr => Shift(yy_state_351) + NT_while_expr => Shift(yy_state_352) + NT_foreach_expr => Shift(yy_state_353) + NT_for_expr => Shift(yy_state_354) + T_LEXSCAN => Shift(yy_state_355) + NT_lexscan_header => Shift(yy_state_358) + T_LEXMATCH => Shift(yy_state_391) + NT_lexmatch_header => Shift(yy_state_399) + NT_match_header => Shift(yy_state_444) + T_MATCH => Shift(yy_state_605) + T_IF => Shift(yy_state_608) + T_TRY_EXCLAMATION => Shift(yy_state_614) + T_TRY_QUESTION => Shift(yy_state_616) + T_TRY => Shift(yy_state_618) + NT_loop_label_colon => Shift(yy_state_632) + T_POST_LABEL => Shift(yy_state_639) + T_EXTEND => Shift(yy_state_641) + T_LIDENT => Shift(yy_state_648) + NT_expr => Shift(yy_state_1045) + T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_1071) _ => Error } } -fn yy_state_689(_lookahead : YYSymbol) -> YYDecision { - match _lookahead { - T_BARBAR => Shift(yy_state_423) - T_AMPERAMPER => Shift(yy_state_425) - T_BAR => Shift(yy_state_427) - T_CARET => Shift(yy_state_429) - T_AMPER => Shift(yy_state_431) - T_MINUS => Shift(yy_state_433) - T_PLUS => Shift(yy_state_435) - T_INFIX1 => Shift(yy_state_437) - T_INFIX2 => Shift(yy_state_439) - T_INFIX3 => Shift(yy_state_441) - T_INFIX4 => Shift(yy_state_443) - T_IMPLIES => Shift(yy_state_445) - T_ELSE => Shift(yy_state_690) - T_SEMI | T_RBRACE => Reduce(2, NT_guard_statement, yy_action_466) - _ => Error - } +fn yy_state_1045(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(4, NT_parameter, yy_action_480) } -fn yy_state_690(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1046(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACE => Shift(yy_state_120) - NT_block_expr => Shift(yy_state_691) + T_ASYNC => Shift(yy_state_65) + T_UNDERSCORE => Shift(yy_state_70) + T_AMPER => Shift(yy_state_71) + T_PACKAGE_NAME => Shift(yy_state_73) + T_UIDENT => Shift(yy_state_80) + T_LPAREN => Shift(yy_state_84) + NT_simple_type => Shift(yy_state_110) + NT_type_ => Shift(yy_state_1047) _ => Error } } -fn yy_state_691(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(4, NT_guard_statement, yy_action_465) -} - -fn yy_state_692(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_statement, yy_action_464) +fn yy_state_1047(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_parameter, yy_action_479) } -fn yy_state_693(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1048(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LIDENT => Shift(yy_state_694) + T_COLON => Shift(yy_state_1049) + T_RPAREN | T_COMMA => Reduce(1, NT_parameter, yy_action_478) _ => Error } } -fn yy_state_694(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1049(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_EQUAL => Shift(yy_state_695) + T_ASYNC => Shift(yy_state_65) + T_UNDERSCORE => Shift(yy_state_70) + T_AMPER => Shift(yy_state_71) + T_PACKAGE_NAME => Shift(yy_state_73) + T_UIDENT => Shift(yy_state_80) + T_LPAREN => Shift(yy_state_84) + NT_simple_type => Shift(yy_state_110) + NT_type_ => Shift(yy_state_1050) _ => Error } } -fn yy_state_695(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1050(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_parameter, yy_action_477) +} + +fn yy_state_1051(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_list_commas_parameter_, yy_action_476) +} + +fn yy_state_1052(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_multiline_string => Shift(yy_state_2) - T_MULTILINE_INTERP => Shift(yy_state_4) - T_MULTILINE_STRING => Shift(yy_state_5) - T_REGEX_LITERAL => Shift(yy_state_6) - T_STRING => Shift(yy_state_7) - T_FLOAT => Shift(yy_state_8) - T_DOUBLE => Shift(yy_state_9) - T_INT => Shift(yy_state_10) - T_CHAR => Shift(yy_state_11) - T_BYTES => Shift(yy_state_12) - T_BYTE => Shift(yy_state_13) - T_FALSE => Shift(yy_state_14) - T_TRUE => Shift(yy_state_15) - T_INTERP => Shift(yy_state_16) - NT_non_empty_list_multiline_string_ => Shift(yy_state_17) - NT_simple_constant => Shift(yy_state_18) - T_AMPER => Shift(yy_state_19) - NT_qual_ident_ty => Shift(yy_state_25) - NT_tuple_expr => Shift(yy_state_26) - T_LBRACKET => Shift(yy_state_27) - NT_constr => Shift(yy_state_35) - NT_qual_ident_simple_expr => Shift(yy_state_36) - NT_atomic_expr => Shift(yy_state_37) - NT_anony_fn => Shift(yy_state_38) - T_LBRACE => Shift(yy_state_39) - T_FN => Shift(yy_state_48) - NT_type_name => Shift(yy_state_126) - T_ASYNC => Shift(yy_state_138) - NT_simple_expr => Shift(yy_state_151) - T_EXCLAMATION => Shift(yy_state_162) - T_MINUS => Shift(yy_state_178) - T_PLUS => Shift(yy_state_180) - T_UIDENT => Shift(yy_state_182) - T_PACKAGE_NAME => Shift(yy_state_183) - NT_prefix_expr => Shift(yy_state_187) - NT_range_expr => Shift(yy_state_198) - NT_postfix_expr => Shift(yy_state_416) - T_EXISTS => Shift(yy_state_417) - T_FORALL => Shift(yy_state_449) - NT_infix_expr => Shift(yy_state_455) - T_UNDERSCORE => Shift(yy_state_456) - T_LPAREN => Shift(yy_state_464) - NT_pipe_expr => Shift(yy_state_497) - NT_arrow_fn_expr => Shift(yy_state_513) - NT_quantifier_expr => Shift(yy_state_514) - NT_simple_try_expr => Shift(yy_state_515) - NT_lexmatch_expr => Shift(yy_state_516) - NT_match_expr => Shift(yy_state_517) - NT_if_expr => Shift(yy_state_518) - NT_try_expr => Shift(yy_state_519) - NT_while_expr => Shift(yy_state_520) - NT_foreach_expr => Shift(yy_state_521) - NT_for_expr => Shift(yy_state_522) - T_LEXMATCH => Shift(yy_state_523) - NT_lexmatch_header => Shift(yy_state_529) - NT_match_header => Shift(yy_state_540) - T_MATCH => Shift(yy_state_550) - T_IF => Shift(yy_state_553) - T_TRY_EXCLAMATION => Shift(yy_state_559) - T_TRY_QUESTION => Shift(yy_state_561) - T_TRY => Shift(yy_state_563) - NT_loop_label_colon => Shift(yy_state_577) - T_POST_LABEL => Shift(yy_state_585) - T_LIDENT => Shift(yy_state_587) - NT_expr => Shift(yy_state_696) - T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_902) + T_RPAREN => Shift(yy_state_1053) _ => Error } } -fn yy_state_696(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(4, NT_statement, yy_action_463) +fn yy_state_1053(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_parameters, yy_action_474) } -fn yy_state_697(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1054(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_COLON => Shift(yy_state_1055) + T_COMMA | T_RBRACE => Reduce(1, NT_record_defn_single, yy_action_472) + _ => Error + } +} + +fn yy_state_1055(_lookahead : YYSymbol) -> YYDecision { match _lookahead { NT_multiline_string => Shift(yy_state_2) T_MULTILINE_INTERP => Shift(yy_state_4) @@ -26284,68 +36427,78 @@ fn yy_state_697(_lookahead : YYSymbol) -> YYDecision { T_BYTE => Shift(yy_state_13) T_FALSE => Shift(yy_state_14) T_TRUE => Shift(yy_state_15) - T_INTERP => Shift(yy_state_16) - NT_non_empty_list_multiline_string_ => Shift(yy_state_17) - NT_simple_constant => Shift(yy_state_18) - T_AMPER => Shift(yy_state_19) - NT_qual_ident_ty => Shift(yy_state_25) - NT_tuple_expr => Shift(yy_state_26) - T_LBRACKET => Shift(yy_state_27) - NT_constr => Shift(yy_state_35) - NT_qual_ident_simple_expr => Shift(yy_state_36) - NT_atomic_expr => Shift(yy_state_37) - NT_anony_fn => Shift(yy_state_38) - T_LBRACE => Shift(yy_state_39) - T_FN => Shift(yy_state_48) - NT_type_name => Shift(yy_state_126) - T_ASYNC => Shift(yy_state_138) - NT_simple_expr => Shift(yy_state_151) - T_EXCLAMATION => Shift(yy_state_162) - T_MINUS => Shift(yy_state_178) - T_PLUS => Shift(yy_state_180) - T_UIDENT => Shift(yy_state_182) - T_PACKAGE_NAME => Shift(yy_state_183) - NT_prefix_expr => Shift(yy_state_187) - NT_range_expr => Shift(yy_state_198) - NT_postfix_expr => Shift(yy_state_416) - T_EXISTS => Shift(yy_state_417) - T_FORALL => Shift(yy_state_449) - NT_infix_expr => Shift(yy_state_455) - T_UNDERSCORE => Shift(yy_state_456) - T_LPAREN => Shift(yy_state_464) - NT_pipe_expr => Shift(yy_state_497) - NT_arrow_fn_expr => Shift(yy_state_513) - NT_quantifier_expr => Shift(yy_state_514) - NT_simple_try_expr => Shift(yy_state_515) - NT_lexmatch_expr => Shift(yy_state_516) - NT_match_expr => Shift(yy_state_517) - NT_if_expr => Shift(yy_state_518) - NT_try_expr => Shift(yy_state_519) - NT_while_expr => Shift(yy_state_520) - NT_foreach_expr => Shift(yy_state_521) - NT_for_expr => Shift(yy_state_522) - T_LEXMATCH => Shift(yy_state_523) - NT_lexmatch_header => Shift(yy_state_529) - NT_match_header => Shift(yy_state_540) - T_MATCH => Shift(yy_state_550) - T_IF => Shift(yy_state_553) - T_TRY_EXCLAMATION => Shift(yy_state_559) - T_TRY_QUESTION => Shift(yy_state_561) - T_TRY => Shift(yy_state_563) - NT_loop_label_colon => Shift(yy_state_577) - T_POST_LABEL => Shift(yy_state_585) - T_LIDENT => Shift(yy_state_587) - NT_expr => Shift(yy_state_698) - T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_902) + T_BYTES_INTERP => Shift(yy_state_16) + T_INTERP => Shift(yy_state_17) + NT_non_empty_list_multiline_string_ => Shift(yy_state_18) + NT_simple_constant => Shift(yy_state_19) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + NT_tuple_expr => Shift(yy_state_27) + T_LBRACKET_BAR => Shift(yy_state_28) + T_LBRACKET => Shift(yy_state_36) + NT_constr => Shift(yy_state_47) + NT_qual_ident_simple_expr => Shift(yy_state_48) + NT_atomic_expr => Shift(yy_state_50) + NT_anony_fn => Shift(yy_state_51) + T_LBRACE => Shift(yy_state_52) + T_FN => Shift(yy_state_61) + NT_type_name => Shift(yy_state_139) + T_ASYNC => Shift(yy_state_152) + NT_simple_expr => Shift(yy_state_165) + T_EXCLAMATION => Shift(yy_state_176) + T_MINUS => Shift(yy_state_191) + T_PLUS => Shift(yy_state_193) + T_UIDENT => Shift(yy_state_195) + T_PACKAGE_NAME => Shift(yy_state_196) + NT_prefix_expr => Shift(yy_state_201) + NT_range_expr => Shift(yy_state_212) + NT_postfix_expr => Shift(yy_state_223) + T_EXISTS => Shift(yy_state_224) + T_FORALL => Shift(yy_state_256) + NT_infix_expr => Shift(yy_state_272) + T_UNDERSCORE => Shift(yy_state_273) + T_LPAREN => Shift(yy_state_281) + NT_pipe_expr => Shift(yy_state_325) + NT_arrow_fn_expr => Shift(yy_state_344) + NT_quantifier_expr => Shift(yy_state_345) + NT_simple_try_expr => Shift(yy_state_346) + NT_lexscan_expr => Shift(yy_state_347) + NT_lexmatch_expr => Shift(yy_state_348) + NT_match_expr => Shift(yy_state_349) + NT_if_expr => Shift(yy_state_350) + NT_try_expr => Shift(yy_state_351) + NT_while_expr => Shift(yy_state_352) + NT_foreach_expr => Shift(yy_state_353) + NT_for_expr => Shift(yy_state_354) + T_LEXSCAN => Shift(yy_state_355) + NT_lexscan_header => Shift(yy_state_358) + T_LEXMATCH => Shift(yy_state_391) + NT_lexmatch_header => Shift(yy_state_399) + NT_match_header => Shift(yy_state_444) + T_MATCH => Shift(yy_state_605) + T_IF => Shift(yy_state_608) + T_TRY_EXCLAMATION => Shift(yy_state_614) + T_TRY_QUESTION => Shift(yy_state_616) + T_TRY => Shift(yy_state_618) + NT_loop_label_colon => Shift(yy_state_632) + T_POST_LABEL => Shift(yy_state_639) + T_EXTEND => Shift(yy_state_641) + T_LIDENT => Shift(yy_state_648) + NT_expr => Shift(yy_state_1056) + T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_1071) _ => Error } } -fn yy_state_698(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(2, NT_statement, yy_action_462) +fn yy_state_1056(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_record_defn_single, yy_action_471) } -fn yy_state_699(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1057(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_list_commas_with_trailing_info_record_defn_single_, yy_action_470) +} + +fn yy_state_1058(_lookahead : YYSymbol) -> YYDecision { match _lookahead { NT_multiline_string => Shift(yy_state_2) T_MULTILINE_INTERP => Shift(yy_state_4) @@ -26360,223 +36513,192 @@ fn yy_state_699(_lookahead : YYSymbol) -> YYDecision { T_BYTE => Shift(yy_state_13) T_FALSE => Shift(yy_state_14) T_TRUE => Shift(yy_state_15) - T_INTERP => Shift(yy_state_16) - NT_non_empty_list_multiline_string_ => Shift(yy_state_17) - NT_simple_constant => Shift(yy_state_18) - T_AMPER => Shift(yy_state_19) - NT_qual_ident_ty => Shift(yy_state_25) - NT_tuple_expr => Shift(yy_state_26) - T_LBRACKET => Shift(yy_state_27) - NT_constr => Shift(yy_state_35) - NT_qual_ident_simple_expr => Shift(yy_state_36) - NT_atomic_expr => Shift(yy_state_37) - NT_anony_fn => Shift(yy_state_38) - T_LBRACE => Shift(yy_state_39) - T_FN => Shift(yy_state_48) - NT_type_name => Shift(yy_state_126) - T_ASYNC => Shift(yy_state_138) - NT_simple_expr => Shift(yy_state_151) - T_EXCLAMATION => Shift(yy_state_162) - T_UNDERSCORE => Shift(yy_state_163) - T_LPAREN => Shift(yy_state_164) - T_MINUS => Shift(yy_state_178) - T_PLUS => Shift(yy_state_180) - T_UIDENT => Shift(yy_state_182) - T_PACKAGE_NAME => Shift(yy_state_183) - T_LIDENT => Shift(yy_state_186) - NT_prefix_expr => Shift(yy_state_187) - NT_range_expr => Shift(yy_state_198) - NT_postfix_expr => Shift(yy_state_416) - NT_infix_expr => Shift(yy_state_455) - NT_pipe_expr => Shift(yy_state_700) - _ => Error - } -} - -fn yy_state_700(_lookahead : YYSymbol) -> YYDecision { - match _lookahead { - T_PIPE => Shift(yy_state_498) - T_PIPE_LEFT => Shift(yy_state_503) - T_SEMI | T_RBRACE => Reduce(2, NT_statement, yy_action_461) - _ => Error - } -} - -fn yy_state_701(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_statement, yy_action_460) -} - -fn yy_state_702(_lookahead : YYSymbol) -> YYDecision { - match _lookahead { - NT_parameters => Shift(yy_state_49) - T_LPAREN => Shift(yy_state_143) - T_LIDENT => Shift(yy_state_703) + T_BYTES_INTERP => Shift(yy_state_16) + T_INTERP => Shift(yy_state_17) + NT_non_empty_list_multiline_string_ => Shift(yy_state_18) + NT_simple_constant => Shift(yy_state_19) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + NT_tuple_expr => Shift(yy_state_27) + T_LBRACKET_BAR => Shift(yy_state_28) + T_LBRACKET => Shift(yy_state_36) + NT_constr => Shift(yy_state_47) + NT_qual_ident_simple_expr => Shift(yy_state_48) + NT_atomic_expr => Shift(yy_state_50) + NT_anony_fn => Shift(yy_state_51) + T_LBRACE => Shift(yy_state_52) + T_FN => Shift(yy_state_61) + NT_type_name => Shift(yy_state_139) + T_ASYNC => Shift(yy_state_152) + NT_simple_expr => Shift(yy_state_165) + T_EXCLAMATION => Shift(yy_state_176) + T_MINUS => Shift(yy_state_191) + T_PLUS => Shift(yy_state_193) + T_UIDENT => Shift(yy_state_195) + T_PACKAGE_NAME => Shift(yy_state_196) + NT_prefix_expr => Shift(yy_state_201) + NT_range_expr => Shift(yy_state_212) + NT_postfix_expr => Shift(yy_state_223) + T_EXISTS => Shift(yy_state_224) + T_FORALL => Shift(yy_state_256) + NT_infix_expr => Shift(yy_state_272) + T_UNDERSCORE => Shift(yy_state_273) + T_LPAREN => Shift(yy_state_281) + NT_pipe_expr => Shift(yy_state_325) + NT_arrow_fn_expr => Shift(yy_state_344) + NT_quantifier_expr => Shift(yy_state_345) + NT_simple_try_expr => Shift(yy_state_346) + NT_lexscan_expr => Shift(yy_state_347) + NT_lexmatch_expr => Shift(yy_state_348) + NT_match_expr => Shift(yy_state_349) + NT_if_expr => Shift(yy_state_350) + NT_try_expr => Shift(yy_state_351) + NT_while_expr => Shift(yy_state_352) + NT_foreach_expr => Shift(yy_state_353) + NT_for_expr => Shift(yy_state_354) + T_LEXSCAN => Shift(yy_state_355) + NT_lexscan_header => Shift(yy_state_358) + T_LEXMATCH => Shift(yy_state_391) + NT_lexmatch_header => Shift(yy_state_399) + NT_match_header => Shift(yy_state_444) + T_MATCH => Shift(yy_state_605) + T_IF => Shift(yy_state_608) + T_TRY_EXCLAMATION => Shift(yy_state_614) + T_TRY_QUESTION => Shift(yy_state_616) + T_TRY => Shift(yy_state_618) + NT_loop_label_colon => Shift(yy_state_632) + T_POST_LABEL => Shift(yy_state_639) + T_EXTEND => Shift(yy_state_641) + T_LIDENT => Shift(yy_state_648) + NT_expr => Shift(yy_state_1059) + T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_1071) _ => Error } } -fn yy_state_703(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1059(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LPAREN => Shift(yy_state_143) - NT_parameters => Shift(yy_state_704) + T_COMMA => Shift(yy_state_1060) + T_RBRACE => Shift(yy_state_1066) _ => Error } } -fn yy_state_704(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1060(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_error_annotation => Shift(yy_state_50) - T_THIN_ARROW => Shift(yy_state_51) - T_NORAISE => Shift(yy_state_78) - T_RAISE => Shift(yy_state_79) - NT_func_return_type => Shift(yy_state_705) - T_LBRACE => Reduce(0, NT_func_return_type, yy_action_862) + NT_record_defn_single => Shift(yy_state_144) + T_EXTEND => Shift(yy_state_149) + T_LIDENT => Shift(yy_state_1054) + NT_non_empty_list_commas_rev_record_defn_single_ => Shift(yy_state_1061) + NT_non_empty_list_commas_record_defn_single_ => Shift(yy_state_1063) + NT_list_commas_record_defn_single_ => Shift(yy_state_1064) + T_RBRACE => Reduce(0, NT_list_commas_record_defn_single_, yy_action_469) _ => Error } } -fn yy_state_705(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1061(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACE => Shift(yy_state_120) - NT_block_expr => Shift(yy_state_706) + T_COMMA => Shift(yy_state_147) + NT_option_COMMA_ => Shift(yy_state_1062) + T_RBRACE => Reduce(0, NT_option_COMMA_, yy_action_1044) _ => Error } } -fn yy_state_706(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(5, NT_statement, yy_action_459) +fn yy_state_1062(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(2, NT_non_empty_list_commas_record_defn_single_, yy_action_468) } -fn yy_state_707(_lookahead : YYSymbol) -> YYDecision { - match _lookahead { - T_FN => Shift(yy_state_708) - _ => Error - } +fn yy_state_1063(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_list_commas_record_defn_single_, yy_action_467) } -fn yy_state_708(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1064(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_parameters => Shift(yy_state_140) - T_LPAREN => Shift(yy_state_143) - T_LIDENT => Shift(yy_state_709) + T_RBRACE => Shift(yy_state_1065) _ => Error } } -fn yy_state_709(_lookahead : YYSymbol) -> YYDecision { - match _lookahead { - T_LPAREN => Shift(yy_state_143) - NT_parameters => Shift(yy_state_710) - _ => Error - } +fn yy_state_1065(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(8, NT_simple_expr, yy_action_465) } -fn yy_state_710(_lookahead : YYSymbol) -> YYDecision { - match _lookahead { - NT_error_annotation => Shift(yy_state_50) - T_THIN_ARROW => Shift(yy_state_51) - T_NORAISE => Shift(yy_state_78) - T_RAISE => Shift(yy_state_79) - NT_func_return_type => Shift(yy_state_711) - T_LBRACE => Reduce(0, NT_func_return_type, yy_action_862) - _ => Error - } +fn yy_state_1066(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(6, NT_simple_expr, yy_action_463) } -fn yy_state_711(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1067(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACE => Shift(yy_state_120) - NT_block_expr => Shift(yy_state_712) + T_RBRACE => Shift(yy_state_1068) _ => Error } } -fn yy_state_712(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(6, NT_statement, yy_action_458) +fn yy_state_1068(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(5, NT_simple_expr, yy_action_462) } -fn yy_state_713(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1069(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LIDENT => Shift(yy_state_714) + T_RBRACE => Shift(yy_state_1070) _ => Error } } -fn yy_state_714(_lookahead : YYSymbol) -> YYDecision { - match _lookahead { - T_COLON => Shift(yy_state_715) - T_EQUAL => Shift(yy_state_741) - _ => Error - } +fn yy_state_1070(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_block_expr, yy_action_461) } -fn yy_state_715(_lookahead : YYSymbol) -> YYDecision { - match _lookahead { - T_ASYNC => Shift(yy_state_52) - T_UNDERSCORE => Shift(yy_state_57) - T_AMPER => Shift(yy_state_58) - T_PACKAGE_NAME => Shift(yy_state_60) - T_UIDENT => Shift(yy_state_67) - T_LPAREN => Shift(yy_state_71) - NT_simple_type => Shift(yy_state_97) - NT_type_ => Shift(yy_state_716) - _ => Error - } +fn yy_state_1071(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_list_commas_map_expr_elem_, yy_action_460) } -fn yy_state_716(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1072(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_EQUAL => Shift(yy_state_717) + T_SEMI => Shift(yy_state_137) + NT_option_SEMI_ => Shift(yy_state_1073) + T_RBRACE => Reduce(0, NT_option_SEMI_, yy_action_976) _ => Error } } -fn yy_state_717(_lookahead : YYSymbol) -> YYDecision { - match _lookahead { - T_FN => Shift(yy_state_48) - T_ASYNC => Shift(yy_state_138) - T_UNDERSCORE => Shift(yy_state_718) - T_LIDENT => Shift(yy_state_719) - T_LPAREN => Shift(yy_state_720) - NT_letand_func => Shift(yy_state_727) - NT_anony_fn => Shift(yy_state_736) - NT_arrow_fn_expr => Shift(yy_state_737) - _ => Error - } +fn yy_state_1073(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(2, NT_none_empty_list_semis_rev_with_trailing_info_statement_, yy_action_459) } -fn yy_state_718(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1074(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_FAT_ARROW => Shift(yy_state_457) + T_INFIX1 | T_INFIX2 | T_INFIX3 | T_INFIX4 | T_CATCH | T_EQ_TILDE | T_LPAREN | T_MINUS | T_DOT_LIDENT | T_DOT_INT | T_SEMI | T_LBRACKET | T_PLUS | T_BAR | T_RBRACE | T_AMPERAMPER | T_AMPER | T_CARET | T_BARBAR | T_AS | T_PIPE | T_PIPE_LEFT | T_LT_PLUS | T_LT_QUESTION | T_DOTDOT | T_RANGE_INCLUSIVE | T_RANGE_LT_INCLUSIVE | T_RANGE_EXCLUSIVE | T_RANGE_INCLUSIVE_REV | T_RANGE_EXCLUSIVE_REV | T_IS | T_IMPLIES | T_LEXMATCH_QUESTION => Reduce(1, NT_atomic_expr, yy_action_1053) + T_COLON => Reduce(1, NT_map_syntax_key, yy_action_706) _ => Error } } -fn yy_state_719(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1075(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_FAT_ARROW => Shift(yy_state_588) + T_RBRACE => Shift(yy_state_1076) _ => Error } } -fn yy_state_720(_lookahead : YYSymbol) -> YYDecision { - match _lookahead { - T_UNDERSCORE => Shift(yy_state_471) - T_LIDENT => Shift(yy_state_478) - T_RPAREN => Shift(yy_state_721) - NT_arrow_fn_prefix => Shift(yy_state_724) - _ => Error - } +fn yy_state_1076(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_simple_expr, yy_action_458) } -fn yy_state_721(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1077(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_FAT_ARROW => Shift(yy_state_722) + T_RBRACE => Shift(yy_state_1078) _ => Error } } -fn yy_state_722(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1078(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_simple_expr, yy_action_456) +} + +fn yy_state_1079(_lookahead : YYSymbol) -> YYDecision { match _lookahead { NT_multiline_string => Shift(yy_state_2) T_MULTILINE_INTERP => Shift(yy_state_4) @@ -26591,365 +36713,334 @@ fn yy_state_722(_lookahead : YYSymbol) -> YYDecision { T_BYTE => Shift(yy_state_13) T_FALSE => Shift(yy_state_14) T_TRUE => Shift(yy_state_15) - T_INTERP => Shift(yy_state_16) - NT_non_empty_list_multiline_string_ => Shift(yy_state_17) - NT_simple_constant => Shift(yy_state_18) - T_AMPER => Shift(yy_state_19) - NT_qual_ident_ty => Shift(yy_state_25) - NT_tuple_expr => Shift(yy_state_26) - T_LBRACKET => Shift(yy_state_27) - NT_constr => Shift(yy_state_35) - NT_qual_ident_simple_expr => Shift(yy_state_36) - NT_atomic_expr => Shift(yy_state_37) - NT_anony_fn => Shift(yy_state_38) - T_LBRACE => Shift(yy_state_39) - T_FN => Shift(yy_state_48) - NT_type_name => Shift(yy_state_126) - T_ASYNC => Shift(yy_state_138) - T_EXCLAMATION => Shift(yy_state_162) - T_MINUS => Shift(yy_state_178) - T_PLUS => Shift(yy_state_180) - T_UIDENT => Shift(yy_state_182) - NT_prefix_expr => Shift(yy_state_187) - NT_range_expr => Shift(yy_state_198) - NT_postfix_expr => Shift(yy_state_416) - T_EXISTS => Shift(yy_state_417) - T_FORALL => Shift(yy_state_449) - NT_infix_expr => Shift(yy_state_455) - T_UNDERSCORE => Shift(yy_state_456) - NT_qual_ident => Shift(yy_state_458) - NT_simple_expr => Shift(yy_state_459) - T_LPAREN => Shift(yy_state_464) - NT_pipe_expr => Shift(yy_state_497) - NT_arrow_fn_expr => Shift(yy_state_513) - NT_quantifier_expr => Shift(yy_state_514) - NT_simple_try_expr => Shift(yy_state_515) - NT_lexmatch_expr => Shift(yy_state_516) - NT_match_expr => Shift(yy_state_517) - NT_if_expr => Shift(yy_state_518) - NT_try_expr => Shift(yy_state_519) - NT_while_expr => Shift(yy_state_520) - NT_foreach_expr => Shift(yy_state_521) - NT_for_expr => Shift(yy_state_522) - T_LEXMATCH => Shift(yy_state_523) - NT_lexmatch_header => Shift(yy_state_529) - NT_match_header => Shift(yy_state_540) - T_MATCH => Shift(yy_state_550) - T_IF => Shift(yy_state_553) - T_TRY_EXCLAMATION => Shift(yy_state_559) - T_TRY_QUESTION => Shift(yy_state_561) - T_TRY => Shift(yy_state_563) - NT_loop_label_colon => Shift(yy_state_577) - T_POST_LABEL => Shift(yy_state_585) - NT_expr => Shift(yy_state_590) - NT_left_value => Shift(yy_state_591) - T_ELLIPSIS => Shift(yy_state_598) - T_RAISE => Shift(yy_state_599) - T_PACKAGE_NAME => Shift(yy_state_601) - T_LIDENT => Shift(yy_state_603) - NT_expr_statement_no_break_continue_return => Shift(yy_state_723) - T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_902) + T_BYTES_INTERP => Shift(yy_state_16) + T_INTERP => Shift(yy_state_17) + NT_non_empty_list_multiline_string_ => Shift(yy_state_18) + NT_simple_constant => Shift(yy_state_19) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + NT_tuple_expr => Shift(yy_state_27) + T_LBRACKET_BAR => Shift(yy_state_28) + T_LBRACKET => Shift(yy_state_36) + NT_constr => Shift(yy_state_47) + NT_qual_ident_simple_expr => Shift(yy_state_48) + NT_atomic_expr => Shift(yy_state_50) + NT_anony_fn => Shift(yy_state_51) + T_LBRACE => Shift(yy_state_52) + T_FN => Shift(yy_state_61) + NT_type_name => Shift(yy_state_139) + T_ASYNC => Shift(yy_state_152) + NT_simple_expr => Shift(yy_state_165) + T_EXCLAMATION => Shift(yy_state_176) + T_MINUS => Shift(yy_state_191) + T_PLUS => Shift(yy_state_193) + T_UIDENT => Shift(yy_state_195) + T_PACKAGE_NAME => Shift(yy_state_196) + NT_prefix_expr => Shift(yy_state_201) + NT_range_expr => Shift(yy_state_212) + NT_postfix_expr => Shift(yy_state_223) + T_EXISTS => Shift(yy_state_224) + T_FORALL => Shift(yy_state_256) + NT_infix_expr => Shift(yy_state_272) + T_UNDERSCORE => Shift(yy_state_273) + T_LPAREN => Shift(yy_state_281) + NT_pipe_expr => Shift(yy_state_325) + NT_arrow_fn_expr => Shift(yy_state_344) + NT_quantifier_expr => Shift(yy_state_345) + NT_simple_try_expr => Shift(yy_state_346) + NT_lexscan_expr => Shift(yy_state_347) + NT_lexmatch_expr => Shift(yy_state_348) + NT_match_expr => Shift(yy_state_349) + NT_if_expr => Shift(yy_state_350) + NT_try_expr => Shift(yy_state_351) + NT_while_expr => Shift(yy_state_352) + NT_foreach_expr => Shift(yy_state_353) + NT_for_expr => Shift(yy_state_354) + T_LEXSCAN => Shift(yy_state_355) + NT_lexscan_header => Shift(yy_state_358) + T_LEXMATCH => Shift(yy_state_391) + NT_lexmatch_header => Shift(yy_state_399) + NT_match_header => Shift(yy_state_444) + T_MATCH => Shift(yy_state_605) + T_IF => Shift(yy_state_608) + T_TRY_EXCLAMATION => Shift(yy_state_614) + T_TRY_QUESTION => Shift(yy_state_616) + T_TRY => Shift(yy_state_618) + NT_loop_label_colon => Shift(yy_state_632) + T_POST_LABEL => Shift(yy_state_639) + T_EXTEND => Shift(yy_state_641) + T_LIDENT => Shift(yy_state_648) + NT_expr => Shift(yy_state_1080) + T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_1071) _ => Error } } -fn yy_state_723(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(4, NT_arrow_fn_expr, yy_action_457) +fn yy_state_1080(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_COMMA => Shift(yy_state_1081) + T_RBRACE => Shift(yy_state_1084) + _ => Error + } } -fn yy_state_724(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1081(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_FAT_ARROW => Shift(yy_state_725) + NT_record_defn_single => Shift(yy_state_144) + T_EXTEND => Shift(yy_state_149) + T_LIDENT => Shift(yy_state_1054) + NT_non_empty_list_commas_rev_record_defn_single_ => Shift(yy_state_1061) + NT_non_empty_list_commas_record_defn_single_ => Shift(yy_state_1063) + NT_list_commas_record_defn_single_ => Shift(yy_state_1082) + T_RBRACE => Reduce(0, NT_list_commas_record_defn_single_, yy_action_469) _ => Error } } -fn yy_state_725(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1082(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_multiline_string => Shift(yy_state_2) - T_MULTILINE_INTERP => Shift(yy_state_4) - T_MULTILINE_STRING => Shift(yy_state_5) - T_REGEX_LITERAL => Shift(yy_state_6) - T_STRING => Shift(yy_state_7) - T_FLOAT => Shift(yy_state_8) - T_DOUBLE => Shift(yy_state_9) - T_INT => Shift(yy_state_10) - T_CHAR => Shift(yy_state_11) - T_BYTES => Shift(yy_state_12) - T_BYTE => Shift(yy_state_13) - T_FALSE => Shift(yy_state_14) - T_TRUE => Shift(yy_state_15) - T_INTERP => Shift(yy_state_16) - NT_non_empty_list_multiline_string_ => Shift(yy_state_17) - NT_simple_constant => Shift(yy_state_18) - T_AMPER => Shift(yy_state_19) - NT_qual_ident_ty => Shift(yy_state_25) - NT_tuple_expr => Shift(yy_state_26) - T_LBRACKET => Shift(yy_state_27) - NT_constr => Shift(yy_state_35) - NT_qual_ident_simple_expr => Shift(yy_state_36) - NT_atomic_expr => Shift(yy_state_37) - NT_anony_fn => Shift(yy_state_38) - T_LBRACE => Shift(yy_state_39) - T_FN => Shift(yy_state_48) - NT_type_name => Shift(yy_state_126) - T_ASYNC => Shift(yy_state_138) - T_EXCLAMATION => Shift(yy_state_162) - T_MINUS => Shift(yy_state_178) - T_PLUS => Shift(yy_state_180) - T_UIDENT => Shift(yy_state_182) - NT_prefix_expr => Shift(yy_state_187) - NT_range_expr => Shift(yy_state_198) - NT_postfix_expr => Shift(yy_state_416) - T_EXISTS => Shift(yy_state_417) - T_FORALL => Shift(yy_state_449) - NT_infix_expr => Shift(yy_state_455) - T_UNDERSCORE => Shift(yy_state_456) - NT_qual_ident => Shift(yy_state_458) - NT_simple_expr => Shift(yy_state_459) - T_LPAREN => Shift(yy_state_464) - NT_pipe_expr => Shift(yy_state_497) - NT_arrow_fn_expr => Shift(yy_state_513) - NT_quantifier_expr => Shift(yy_state_514) - NT_simple_try_expr => Shift(yy_state_515) - NT_lexmatch_expr => Shift(yy_state_516) - NT_match_expr => Shift(yy_state_517) - NT_if_expr => Shift(yy_state_518) - NT_try_expr => Shift(yy_state_519) - NT_while_expr => Shift(yy_state_520) - NT_foreach_expr => Shift(yy_state_521) - NT_for_expr => Shift(yy_state_522) - T_LEXMATCH => Shift(yy_state_523) - NT_lexmatch_header => Shift(yy_state_529) - NT_match_header => Shift(yy_state_540) - T_MATCH => Shift(yy_state_550) - T_IF => Shift(yy_state_553) - T_TRY_EXCLAMATION => Shift(yy_state_559) - T_TRY_QUESTION => Shift(yy_state_561) - T_TRY => Shift(yy_state_563) - NT_loop_label_colon => Shift(yy_state_577) - T_POST_LABEL => Shift(yy_state_585) - NT_expr => Shift(yy_state_590) - NT_left_value => Shift(yy_state_591) - T_ELLIPSIS => Shift(yy_state_598) - T_RAISE => Shift(yy_state_599) - T_PACKAGE_NAME => Shift(yy_state_601) - T_LIDENT => Shift(yy_state_603) - NT_expr_statement_no_break_continue_return => Shift(yy_state_726) - T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_902) + T_RBRACE => Shift(yy_state_1083) _ => Error } } -fn yy_state_726(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(4, NT_arrow_fn_expr, yy_action_456) +fn yy_state_1083(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(6, NT_simple_expr, yy_action_455) } -fn yy_state_727(_lookahead : YYSymbol) -> YYDecision { - match _lookahead { - NT_and_func => Shift(yy_state_728) - T_AND => Shift(yy_state_730) - NT_list_and_func_ => Shift(yy_state_740) - T_SEMI | T_RBRACE => Reduce(0, NT_list_and_func_, yy_action_455) - _ => Error - } +fn yy_state_1084(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(4, NT_simple_expr, yy_action_453) } -fn yy_state_728(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1085(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_and_func => Shift(yy_state_728) - NT_list_and_func_ => Shift(yy_state_729) - T_AND => Shift(yy_state_730) - T_SEMI | T_RBRACE => Reduce(0, NT_list_and_func_, yy_action_455) + T_RBRACE => Shift(yy_state_1086) _ => Error } } -fn yy_state_729(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(2, NT_list_and_func_, yy_action_454) +fn yy_state_1086(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_simple_expr, yy_action_452) } -fn yy_state_730(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1087(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LIDENT => Shift(yy_state_731) + NT_multiline_string => Shift(yy_state_2) + T_MULTILINE_INTERP => Shift(yy_state_4) + T_MULTILINE_STRING => Shift(yy_state_5) + T_REGEX_LITERAL => Shift(yy_state_6) + T_STRING => Shift(yy_state_7) + T_CHAR => Shift(yy_state_11) + T_BYTES => Shift(yy_state_12) + T_BYTE => Shift(yy_state_13) + T_FALSE => Shift(yy_state_14) + T_TRUE => Shift(yy_state_15) + T_BYTES_INTERP => Shift(yy_state_16) + T_INTERP => Shift(yy_state_17) + NT_non_empty_list_multiline_string_ => Shift(yy_state_18) + NT_simple_constant => Shift(yy_state_19) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + NT_tuple_expr => Shift(yy_state_27) + T_LBRACKET_BAR => Shift(yy_state_28) + T_LBRACKET => Shift(yy_state_36) + NT_constr => Shift(yy_state_47) + NT_qual_ident_simple_expr => Shift(yy_state_48) + T_UNDERSCORE => Shift(yy_state_49) + NT_atomic_expr => Shift(yy_state_50) + NT_anony_fn => Shift(yy_state_51) + T_LBRACE => Shift(yy_state_52) + T_FN => Shift(yy_state_61) + NT_type_name => Shift(yy_state_139) + T_ASYNC => Shift(yy_state_152) + NT_simple_expr => Shift(yy_state_165) + T_EXCLAMATION => Shift(yy_state_176) + T_LPAREN => Shift(yy_state_177) + T_MINUS => Shift(yy_state_191) + NT_prefix_expr => Shift(yy_state_192) + T_PLUS => Shift(yy_state_193) + T_UIDENT => Shift(yy_state_195) + T_PACKAGE_NAME => Shift(yy_state_196) + T_EXTEND => Shift(yy_state_199) + T_LIDENT => Shift(yy_state_200) + T_FLOAT => Shift(yy_state_1088) + T_DOUBLE => Shift(yy_state_1089) + T_INT => Shift(yy_state_1090) _ => Error } } -fn yy_state_731(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1088(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_COLON => Shift(yy_state_732) - T_EQUAL => Shift(yy_state_738) + T_INFIX1 | T_INFIX2 | T_INFIX3 | T_INFIX4 | T_CATCH | T_EQ_TILDE | T_LPAREN | T_MINUS | T_DOT_LIDENT | T_DOT_INT | T_SEMI | T_LBRACKET | T_PLUS | T_BAR | T_RBRACE | T_AMPERAMPER | T_AMPER | T_CARET | T_BARBAR | T_AS | T_PIPE | T_PIPE_LEFT | T_LT_PLUS | T_LT_QUESTION | T_DOTDOT | T_RANGE_INCLUSIVE | T_RANGE_LT_INCLUSIVE | T_RANGE_EXCLUSIVE | T_RANGE_INCLUSIVE_REV | T_RANGE_EXCLUSIVE_REV | T_IS | T_IMPLIES | T_LEXMATCH_QUESTION => Reduce(1, NT_simple_constant, yy_action_1064) + T_COLON => Reduce(2, NT_map_syntax_key, yy_action_709) _ => Error } } -fn yy_state_732(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1089(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_ASYNC => Shift(yy_state_52) - T_UNDERSCORE => Shift(yy_state_57) - T_AMPER => Shift(yy_state_58) - T_PACKAGE_NAME => Shift(yy_state_60) - T_UIDENT => Shift(yy_state_67) - T_LPAREN => Shift(yy_state_71) - NT_simple_type => Shift(yy_state_97) - NT_type_ => Shift(yy_state_733) + T_INFIX1 | T_INFIX2 | T_INFIX3 | T_INFIX4 | T_CATCH | T_EQ_TILDE | T_LPAREN | T_MINUS | T_DOT_LIDENT | T_DOT_INT | T_SEMI | T_LBRACKET | T_PLUS | T_BAR | T_RBRACE | T_AMPERAMPER | T_AMPER | T_CARET | T_BARBAR | T_AS | T_PIPE | T_PIPE_LEFT | T_LT_PLUS | T_LT_QUESTION | T_DOTDOT | T_RANGE_INCLUSIVE | T_RANGE_LT_INCLUSIVE | T_RANGE_EXCLUSIVE | T_RANGE_INCLUSIVE_REV | T_RANGE_EXCLUSIVE_REV | T_IS | T_IMPLIES | T_LEXMATCH_QUESTION => Reduce(1, NT_simple_constant, yy_action_1063) + T_COLON => Reduce(2, NT_map_syntax_key, yy_action_708) _ => Error } } -fn yy_state_733(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1090(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_EQUAL => Shift(yy_state_734) + T_INFIX1 | T_INFIX2 | T_INFIX3 | T_INFIX4 | T_CATCH | T_EQ_TILDE | T_LPAREN | T_MINUS | T_DOT_LIDENT | T_DOT_INT | T_SEMI | T_LBRACKET | T_PLUS | T_BAR | T_RBRACE | T_AMPERAMPER | T_AMPER | T_CARET | T_BARBAR | T_AS | T_PIPE | T_PIPE_LEFT | T_LT_PLUS | T_LT_QUESTION | T_DOTDOT | T_RANGE_INCLUSIVE | T_RANGE_LT_INCLUSIVE | T_RANGE_EXCLUSIVE | T_RANGE_INCLUSIVE_REV | T_RANGE_EXCLUSIVE_REV | T_IS | T_IMPLIES | T_LEXMATCH_QUESTION => Reduce(1, NT_simple_constant, yy_action_1062) + T_COLON => Reduce(2, NT_map_syntax_key, yy_action_707) _ => Error } } -fn yy_state_734(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1091(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_FN => Shift(yy_state_48) - T_ASYNC => Shift(yy_state_138) - T_UNDERSCORE => Shift(yy_state_718) - T_LIDENT => Shift(yy_state_719) - T_LPAREN => Shift(yy_state_720) - NT_letand_func => Shift(yy_state_735) - NT_anony_fn => Shift(yy_state_736) - NT_arrow_fn_expr => Shift(yy_state_737) + T_FAT_ARROW => Shift(yy_state_642) + T_COLON => Shift(yy_state_1092) + T_COMMA => Shift(yy_state_1097) + T_AUGMENTED_ASSIGNMENT | T_PLUS_EQUAL | T_EQUAL => Reduce(1, NT_qual_ident, yy_action_657) + T_INFIX1 | T_INFIX2 | T_INFIX3 | T_INFIX4 | T_CATCH | T_EQ_TILDE | T_LPAREN | T_MINUS | T_DOT_LIDENT | T_DOT_INT | T_SEMI | T_LBRACKET | T_PLUS | T_BAR | T_RBRACE | T_AMPERAMPER | T_AMPER | T_CARET | T_BARBAR | T_AS | T_PIPE | T_PIPE_LEFT | T_LT_PLUS | T_LT_QUESTION | T_DOTDOT | T_RANGE_INCLUSIVE | T_RANGE_LT_INCLUSIVE | T_RANGE_EXCLUSIVE | T_RANGE_INCLUSIVE_REV | T_RANGE_EXCLUSIVE_REV | T_IS | T_IMPLIES | T_LEXMATCH_QUESTION => Reduce(1, NT_qual_ident_simple_expr, yy_action_933) _ => Error } } -fn yy_state_735(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(6, NT_and_func, yy_action_451) -} - -fn yy_state_736(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_letand_func, yy_action_450) -} - -fn yy_state_737(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_letand_func, yy_action_449) -} - -fn yy_state_738(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1092(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_FN => Shift(yy_state_48) - T_ASYNC => Shift(yy_state_138) - T_UNDERSCORE => Shift(yy_state_718) - T_LIDENT => Shift(yy_state_719) - T_LPAREN => Shift(yy_state_720) - NT_anony_fn => Shift(yy_state_736) - NT_arrow_fn_expr => Shift(yy_state_737) - NT_letand_func => Shift(yy_state_739) + NT_multiline_string => Shift(yy_state_2) + T_MULTILINE_INTERP => Shift(yy_state_4) + T_MULTILINE_STRING => Shift(yy_state_5) + T_REGEX_LITERAL => Shift(yy_state_6) + T_STRING => Shift(yy_state_7) + T_FLOAT => Shift(yy_state_8) + T_DOUBLE => Shift(yy_state_9) + T_INT => Shift(yy_state_10) + T_CHAR => Shift(yy_state_11) + T_BYTES => Shift(yy_state_12) + T_BYTE => Shift(yy_state_13) + T_FALSE => Shift(yy_state_14) + T_TRUE => Shift(yy_state_15) + T_BYTES_INTERP => Shift(yy_state_16) + T_INTERP => Shift(yy_state_17) + NT_non_empty_list_multiline_string_ => Shift(yy_state_18) + NT_simple_constant => Shift(yy_state_19) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + NT_tuple_expr => Shift(yy_state_27) + T_LBRACKET_BAR => Shift(yy_state_28) + T_LBRACKET => Shift(yy_state_36) + NT_constr => Shift(yy_state_47) + NT_qual_ident_simple_expr => Shift(yy_state_48) + NT_atomic_expr => Shift(yy_state_50) + NT_anony_fn => Shift(yy_state_51) + T_LBRACE => Shift(yy_state_52) + T_FN => Shift(yy_state_61) + NT_type_name => Shift(yy_state_139) + T_ASYNC => Shift(yy_state_152) + NT_simple_expr => Shift(yy_state_165) + T_EXCLAMATION => Shift(yy_state_176) + T_MINUS => Shift(yy_state_191) + T_PLUS => Shift(yy_state_193) + T_UIDENT => Shift(yy_state_195) + T_PACKAGE_NAME => Shift(yy_state_196) + NT_prefix_expr => Shift(yy_state_201) + NT_range_expr => Shift(yy_state_212) + NT_postfix_expr => Shift(yy_state_223) + T_EXISTS => Shift(yy_state_224) + T_FORALL => Shift(yy_state_256) + NT_infix_expr => Shift(yy_state_272) + T_UNDERSCORE => Shift(yy_state_273) + T_LPAREN => Shift(yy_state_281) + NT_pipe_expr => Shift(yy_state_325) + NT_arrow_fn_expr => Shift(yy_state_344) + NT_quantifier_expr => Shift(yy_state_345) + NT_simple_try_expr => Shift(yy_state_346) + NT_lexscan_expr => Shift(yy_state_347) + NT_lexmatch_expr => Shift(yy_state_348) + NT_match_expr => Shift(yy_state_349) + NT_if_expr => Shift(yy_state_350) + NT_try_expr => Shift(yy_state_351) + NT_while_expr => Shift(yy_state_352) + NT_foreach_expr => Shift(yy_state_353) + NT_for_expr => Shift(yy_state_354) + T_LEXSCAN => Shift(yy_state_355) + NT_lexscan_header => Shift(yy_state_358) + T_LEXMATCH => Shift(yy_state_391) + NT_lexmatch_header => Shift(yy_state_399) + NT_match_header => Shift(yy_state_444) + T_MATCH => Shift(yy_state_605) + T_IF => Shift(yy_state_608) + T_TRY_EXCLAMATION => Shift(yy_state_614) + T_TRY_QUESTION => Shift(yy_state_616) + T_TRY => Shift(yy_state_618) + NT_loop_label_colon => Shift(yy_state_632) + T_POST_LABEL => Shift(yy_state_639) + T_EXTEND => Shift(yy_state_641) + T_LIDENT => Shift(yy_state_648) + NT_expr => Shift(yy_state_1093) + T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_1071) _ => Error } } -fn yy_state_739(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(4, NT_and_func, yy_action_448) -} - -fn yy_state_740(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(7, NT_statement, yy_action_447) -} - -fn yy_state_741(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1093(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_FN => Shift(yy_state_48) - T_ASYNC => Shift(yy_state_138) - T_UNDERSCORE => Shift(yy_state_718) - T_LIDENT => Shift(yy_state_719) - T_LPAREN => Shift(yy_state_720) - NT_anony_fn => Shift(yy_state_736) - NT_arrow_fn_expr => Shift(yy_state_737) - NT_letand_func => Shift(yy_state_742) + T_COMMA => Shift(yy_state_1094) + NT_option_COMMA_ => Shift(yy_state_1096) + T_RBRACE => Reduce(0, NT_option_COMMA_, yy_action_1044) _ => Error } } -fn yy_state_742(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1094(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_and_func => Shift(yy_state_728) - T_AND => Shift(yy_state_730) - NT_list_and_func_ => Shift(yy_state_743) - T_SEMI | T_RBRACE => Reduce(0, NT_list_and_func_, yy_action_455) + NT_record_defn_single => Shift(yy_state_144) + NT_non_empty_list_commas_rev_record_defn_single_ => Shift(yy_state_145) + T_EXTEND => Shift(yy_state_149) + T_LIDENT => Shift(yy_state_1054) + NT_non_empty_list_commas_with_trailing_info_record_defn_single_ => Shift(yy_state_1095) + T_RBRACE => Reduce(1, NT_option_COMMA_, yy_action_1042) _ => Error } } -fn yy_state_743(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(5, NT_statement, yy_action_446) -} - -fn yy_state_744(_lookahead : YYSymbol) -> YYDecision { - match _lookahead { - T_AMPER => Shift(yy_state_19) - NT_qual_ident_ty => Shift(yy_state_25) - T_UIDENT => Shift(yy_state_182) - T_LBRACE => Shift(yy_state_275) - T_LBRACKET => Shift(yy_state_279) - T_LPAREN => Shift(yy_state_293) - NT_constr => Shift(yy_state_294) - T_LIDENT => Shift(yy_state_307) - T_UNDERSCORE => Shift(yy_state_312) - T_BYTES => Shift(yy_state_313) - T_STRING => Shift(yy_state_314) - T_MINUS => Shift(yy_state_315) - T_FLOAT => Shift(yy_state_319) - T_DOUBLE => Shift(yy_state_320) - T_BYTE => Shift(yy_state_321) - T_INT => Shift(yy_state_322) - T_CHAR => Shift(yy_state_323) - T_FALSE => Shift(yy_state_324) - T_TRUE => Shift(yy_state_325) - NT_simple_pattern => Shift(yy_state_326) - NT_type_name => Shift(yy_state_329) - T_PACKAGE_NAME => Shift(yy_state_334) - NT_range_pattern => Shift(yy_state_337) - NT_or_pattern => Shift(yy_state_340) - T_MUTABLE => Shift(yy_state_745) - NT_pattern => Shift(yy_state_753) - _ => Error - } +fn yy_state_1095(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(5, NT_record_defn, yy_action_451) } -fn yy_state_745(_lookahead : YYSymbol) -> YYDecision { - match _lookahead { - T_LIDENT => Shift(yy_state_746) - _ => Error - } +fn yy_state_1096(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(4, NT_record_defn, yy_action_449) } -fn yy_state_746(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1097(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_COLON => Shift(yy_state_747) - T_EQUAL => Shift(yy_state_751) + NT_record_defn_single => Shift(yy_state_144) + NT_non_empty_list_commas_rev_record_defn_single_ => Shift(yy_state_145) + T_EXTEND => Shift(yy_state_149) + T_LIDENT => Shift(yy_state_1054) + NT_non_empty_list_commas_with_trailing_info_record_defn_single_ => Shift(yy_state_1057) + NT_list_commas_with_trailing_info_record_defn_single_ => Shift(yy_state_1098) + T_RBRACE => Reduce(0, NT_list_commas_with_trailing_info_record_defn_single_, yy_action_970) _ => Error } } -fn yy_state_747(_lookahead : YYSymbol) -> YYDecision { - match _lookahead { - T_ASYNC => Shift(yy_state_52) - T_UNDERSCORE => Shift(yy_state_57) - T_AMPER => Shift(yy_state_58) - T_PACKAGE_NAME => Shift(yy_state_60) - T_UIDENT => Shift(yy_state_67) - T_LPAREN => Shift(yy_state_71) - NT_simple_type => Shift(yy_state_97) - NT_type_ => Shift(yy_state_748) - _ => Error - } +fn yy_state_1098(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_record_defn, yy_action_447) } -fn yy_state_748(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1099(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_EQUAL => Shift(yy_state_749) + T_FAT_ARROW => Shift(yy_state_649) + T_COLON => Shift(yy_state_1100) + T_COMMA => Shift(yy_state_1105) + T_AUGMENTED_ASSIGNMENT | T_PLUS_EQUAL | T_EQUAL => Reduce(1, NT_qual_ident, yy_action_656) + T_INFIX1 | T_INFIX2 | T_INFIX3 | T_INFIX4 | T_CATCH | T_EQ_TILDE | T_LPAREN | T_MINUS | T_DOT_LIDENT | T_DOT_INT | T_SEMI | T_LBRACKET | T_PLUS | T_BAR | T_RBRACE | T_AMPERAMPER | T_AMPER | T_CARET | T_BARBAR | T_AS | T_PIPE | T_PIPE_LEFT | T_LT_PLUS | T_LT_QUESTION | T_DOTDOT | T_RANGE_INCLUSIVE | T_RANGE_LT_INCLUSIVE | T_RANGE_EXCLUSIVE | T_RANGE_INCLUSIVE_REV | T_RANGE_EXCLUSIVE_REV | T_IS | T_IMPLIES | T_LEXMATCH_QUESTION => Reduce(1, NT_qual_ident_simple_expr, yy_action_932) _ => Error } } -fn yy_state_749(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1100(_lookahead : YYSymbol) -> YYDecision { match _lookahead { NT_multiline_string => Shift(yy_state_2) T_MULTILINE_INTERP => Shift(yy_state_4) @@ -26964,174 +37055,142 @@ fn yy_state_749(_lookahead : YYSymbol) -> YYDecision { T_BYTE => Shift(yy_state_13) T_FALSE => Shift(yy_state_14) T_TRUE => Shift(yy_state_15) - T_INTERP => Shift(yy_state_16) - NT_non_empty_list_multiline_string_ => Shift(yy_state_17) - NT_simple_constant => Shift(yy_state_18) - T_AMPER => Shift(yy_state_19) - NT_qual_ident_ty => Shift(yy_state_25) - NT_tuple_expr => Shift(yy_state_26) - T_LBRACKET => Shift(yy_state_27) - NT_constr => Shift(yy_state_35) - NT_qual_ident_simple_expr => Shift(yy_state_36) - NT_atomic_expr => Shift(yy_state_37) - NT_anony_fn => Shift(yy_state_38) - T_LBRACE => Shift(yy_state_39) - T_FN => Shift(yy_state_48) - NT_type_name => Shift(yy_state_126) - T_ASYNC => Shift(yy_state_138) - NT_simple_expr => Shift(yy_state_151) - T_EXCLAMATION => Shift(yy_state_162) - T_MINUS => Shift(yy_state_178) - T_PLUS => Shift(yy_state_180) - T_UIDENT => Shift(yy_state_182) - T_PACKAGE_NAME => Shift(yy_state_183) - NT_prefix_expr => Shift(yy_state_187) - NT_range_expr => Shift(yy_state_198) - NT_postfix_expr => Shift(yy_state_416) - T_EXISTS => Shift(yy_state_417) - T_FORALL => Shift(yy_state_449) - NT_infix_expr => Shift(yy_state_455) - T_UNDERSCORE => Shift(yy_state_456) - T_LPAREN => Shift(yy_state_464) - NT_pipe_expr => Shift(yy_state_497) - NT_arrow_fn_expr => Shift(yy_state_513) - NT_quantifier_expr => Shift(yy_state_514) - NT_simple_try_expr => Shift(yy_state_515) - NT_lexmatch_expr => Shift(yy_state_516) - NT_match_expr => Shift(yy_state_517) - NT_if_expr => Shift(yy_state_518) - NT_try_expr => Shift(yy_state_519) - NT_while_expr => Shift(yy_state_520) - NT_foreach_expr => Shift(yy_state_521) - NT_for_expr => Shift(yy_state_522) - T_LEXMATCH => Shift(yy_state_523) - NT_lexmatch_header => Shift(yy_state_529) - NT_match_header => Shift(yy_state_540) - T_MATCH => Shift(yy_state_550) - T_IF => Shift(yy_state_553) - T_TRY_EXCLAMATION => Shift(yy_state_559) - T_TRY_QUESTION => Shift(yy_state_561) - T_TRY => Shift(yy_state_563) - NT_loop_label_colon => Shift(yy_state_577) - T_POST_LABEL => Shift(yy_state_585) - T_LIDENT => Shift(yy_state_587) - NT_expr => Shift(yy_state_750) - T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_902) + T_BYTES_INTERP => Shift(yy_state_16) + T_INTERP => Shift(yy_state_17) + NT_non_empty_list_multiline_string_ => Shift(yy_state_18) + NT_simple_constant => Shift(yy_state_19) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + NT_tuple_expr => Shift(yy_state_27) + T_LBRACKET_BAR => Shift(yy_state_28) + T_LBRACKET => Shift(yy_state_36) + NT_constr => Shift(yy_state_47) + NT_qual_ident_simple_expr => Shift(yy_state_48) + NT_atomic_expr => Shift(yy_state_50) + NT_anony_fn => Shift(yy_state_51) + T_LBRACE => Shift(yy_state_52) + T_FN => Shift(yy_state_61) + NT_type_name => Shift(yy_state_139) + T_ASYNC => Shift(yy_state_152) + NT_simple_expr => Shift(yy_state_165) + T_EXCLAMATION => Shift(yy_state_176) + T_MINUS => Shift(yy_state_191) + T_PLUS => Shift(yy_state_193) + T_UIDENT => Shift(yy_state_195) + T_PACKAGE_NAME => Shift(yy_state_196) + NT_prefix_expr => Shift(yy_state_201) + NT_range_expr => Shift(yy_state_212) + NT_postfix_expr => Shift(yy_state_223) + T_EXISTS => Shift(yy_state_224) + T_FORALL => Shift(yy_state_256) + NT_infix_expr => Shift(yy_state_272) + T_UNDERSCORE => Shift(yy_state_273) + T_LPAREN => Shift(yy_state_281) + NT_pipe_expr => Shift(yy_state_325) + NT_arrow_fn_expr => Shift(yy_state_344) + NT_quantifier_expr => Shift(yy_state_345) + NT_simple_try_expr => Shift(yy_state_346) + NT_lexscan_expr => Shift(yy_state_347) + NT_lexmatch_expr => Shift(yy_state_348) + NT_match_expr => Shift(yy_state_349) + NT_if_expr => Shift(yy_state_350) + NT_try_expr => Shift(yy_state_351) + NT_while_expr => Shift(yy_state_352) + NT_foreach_expr => Shift(yy_state_353) + NT_for_expr => Shift(yy_state_354) + T_LEXSCAN => Shift(yy_state_355) + NT_lexscan_header => Shift(yy_state_358) + T_LEXMATCH => Shift(yy_state_391) + NT_lexmatch_header => Shift(yy_state_399) + NT_match_header => Shift(yy_state_444) + T_MATCH => Shift(yy_state_605) + T_IF => Shift(yy_state_608) + T_TRY_EXCLAMATION => Shift(yy_state_614) + T_TRY_QUESTION => Shift(yy_state_616) + T_TRY => Shift(yy_state_618) + NT_loop_label_colon => Shift(yy_state_632) + T_POST_LABEL => Shift(yy_state_639) + T_EXTEND => Shift(yy_state_641) + T_LIDENT => Shift(yy_state_648) + NT_expr => Shift(yy_state_1101) + T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_1071) _ => Error } } -fn yy_state_750(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(7, NT_statement, yy_action_445) +fn yy_state_1101(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_COMMA => Shift(yy_state_1102) + NT_option_COMMA_ => Shift(yy_state_1104) + T_RBRACE => Reduce(0, NT_option_COMMA_, yy_action_1044) + _ => Error + } } -fn yy_state_751(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1102(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_multiline_string => Shift(yy_state_2) - T_MULTILINE_INTERP => Shift(yy_state_4) - T_MULTILINE_STRING => Shift(yy_state_5) - T_REGEX_LITERAL => Shift(yy_state_6) - T_STRING => Shift(yy_state_7) - T_FLOAT => Shift(yy_state_8) - T_DOUBLE => Shift(yy_state_9) - T_INT => Shift(yy_state_10) - T_CHAR => Shift(yy_state_11) - T_BYTES => Shift(yy_state_12) - T_BYTE => Shift(yy_state_13) - T_FALSE => Shift(yy_state_14) - T_TRUE => Shift(yy_state_15) - T_INTERP => Shift(yy_state_16) - NT_non_empty_list_multiline_string_ => Shift(yy_state_17) - NT_simple_constant => Shift(yy_state_18) - T_AMPER => Shift(yy_state_19) - NT_qual_ident_ty => Shift(yy_state_25) - NT_tuple_expr => Shift(yy_state_26) - T_LBRACKET => Shift(yy_state_27) - NT_constr => Shift(yy_state_35) - NT_qual_ident_simple_expr => Shift(yy_state_36) - NT_atomic_expr => Shift(yy_state_37) - NT_anony_fn => Shift(yy_state_38) - T_LBRACE => Shift(yy_state_39) - T_FN => Shift(yy_state_48) - NT_type_name => Shift(yy_state_126) - T_ASYNC => Shift(yy_state_138) - NT_simple_expr => Shift(yy_state_151) - T_EXCLAMATION => Shift(yy_state_162) - T_MINUS => Shift(yy_state_178) - T_PLUS => Shift(yy_state_180) - T_UIDENT => Shift(yy_state_182) - T_PACKAGE_NAME => Shift(yy_state_183) - NT_prefix_expr => Shift(yy_state_187) - NT_range_expr => Shift(yy_state_198) - NT_postfix_expr => Shift(yy_state_416) - T_EXISTS => Shift(yy_state_417) - T_FORALL => Shift(yy_state_449) - NT_infix_expr => Shift(yy_state_455) - T_UNDERSCORE => Shift(yy_state_456) - T_LPAREN => Shift(yy_state_464) - NT_pipe_expr => Shift(yy_state_497) - NT_arrow_fn_expr => Shift(yy_state_513) - NT_quantifier_expr => Shift(yy_state_514) - NT_simple_try_expr => Shift(yy_state_515) - NT_lexmatch_expr => Shift(yy_state_516) - NT_match_expr => Shift(yy_state_517) - NT_if_expr => Shift(yy_state_518) - NT_try_expr => Shift(yy_state_519) - NT_while_expr => Shift(yy_state_520) - NT_foreach_expr => Shift(yy_state_521) - NT_for_expr => Shift(yy_state_522) - T_LEXMATCH => Shift(yy_state_523) - NT_lexmatch_header => Shift(yy_state_529) - NT_match_header => Shift(yy_state_540) - T_MATCH => Shift(yy_state_550) - T_IF => Shift(yy_state_553) - T_TRY_EXCLAMATION => Shift(yy_state_559) - T_TRY_QUESTION => Shift(yy_state_561) - T_TRY => Shift(yy_state_563) - NT_loop_label_colon => Shift(yy_state_577) - T_POST_LABEL => Shift(yy_state_585) - T_LIDENT => Shift(yy_state_587) - NT_expr => Shift(yy_state_752) - T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_902) + NT_record_defn_single => Shift(yy_state_144) + NT_non_empty_list_commas_rev_record_defn_single_ => Shift(yy_state_145) + T_EXTEND => Shift(yy_state_149) + T_LIDENT => Shift(yy_state_1054) + NT_non_empty_list_commas_with_trailing_info_record_defn_single_ => Shift(yy_state_1103) + T_RBRACE => Reduce(1, NT_option_COMMA_, yy_action_1042) _ => Error } } -fn yy_state_752(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(5, NT_statement, yy_action_444) +fn yy_state_1103(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(5, NT_record_defn, yy_action_446) } -fn yy_state_753(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1104(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(4, NT_record_defn, yy_action_444) +} + +fn yy_state_1105(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_AS => Shift(yy_state_342) - T_COLON => Shift(yy_state_754) - T_EQUAL => Shift(yy_state_758) + NT_record_defn_single => Shift(yy_state_144) + NT_non_empty_list_commas_rev_record_defn_single_ => Shift(yy_state_145) + T_EXTEND => Shift(yy_state_149) + T_LIDENT => Shift(yy_state_1054) + NT_non_empty_list_commas_with_trailing_info_record_defn_single_ => Shift(yy_state_1057) + NT_list_commas_with_trailing_info_record_defn_single_ => Shift(yy_state_1106) + T_RBRACE => Reduce(0, NT_list_commas_with_trailing_info_record_defn_single_, yy_action_970) _ => Error } } -fn yy_state_754(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1106(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_record_defn, yy_action_442) +} + +fn yy_state_1107(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_ASYNC => Shift(yy_state_52) - T_UNDERSCORE => Shift(yy_state_57) - T_AMPER => Shift(yy_state_58) - T_PACKAGE_NAME => Shift(yy_state_60) - T_UIDENT => Shift(yy_state_67) - T_LPAREN => Shift(yy_state_71) - NT_simple_type => Shift(yy_state_97) - NT_type_ => Shift(yy_state_755) + T_BARBAR => Shift(yy_state_230) + T_AMPERAMPER => Shift(yy_state_232) + T_BAR => Shift(yy_state_234) + T_CARET => Shift(yy_state_236) + T_AMPER => Shift(yy_state_238) + T_MINUS => Shift(yy_state_240) + T_PLUS => Shift(yy_state_242) + T_INFIX1 => Shift(yy_state_244) + T_INFIX2 => Shift(yy_state_246) + T_INFIX3 => Shift(yy_state_248) + T_INFIX4 => Shift(yy_state_250) + T_IMPLIES => Shift(yy_state_252) + T_COMMA | T_SEMI | T_IF | T_FAT_ARROW => Reduce(5, NT_non_empty_list_commas_rev_separated_pair_binder_EQUAL_infix_expr__, yy_action_441) _ => Error } } -fn yy_state_755(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1108(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_EQUAL => Shift(yy_state_756) + T_EQUAL => Shift(yy_state_1109) _ => Error } } -fn yy_state_756(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1109(_lookahead : YYSymbol) -> YYDecision { match _lookahead { NT_multiline_string => Shift(yy_state_2) T_MULTILINE_INTERP => Shift(yy_state_4) @@ -27146,144 +37205,81 @@ fn yy_state_756(_lookahead : YYSymbol) -> YYDecision { T_BYTE => Shift(yy_state_13) T_FALSE => Shift(yy_state_14) T_TRUE => Shift(yy_state_15) - T_INTERP => Shift(yy_state_16) - NT_non_empty_list_multiline_string_ => Shift(yy_state_17) - NT_simple_constant => Shift(yy_state_18) - T_AMPER => Shift(yy_state_19) - NT_qual_ident_ty => Shift(yy_state_25) - NT_tuple_expr => Shift(yy_state_26) - T_LBRACKET => Shift(yy_state_27) - NT_constr => Shift(yy_state_35) - NT_qual_ident_simple_expr => Shift(yy_state_36) - NT_atomic_expr => Shift(yy_state_37) - NT_anony_fn => Shift(yy_state_38) - T_LBRACE => Shift(yy_state_39) - T_FN => Shift(yy_state_48) - NT_type_name => Shift(yy_state_126) - T_ASYNC => Shift(yy_state_138) - NT_simple_expr => Shift(yy_state_151) - T_EXCLAMATION => Shift(yy_state_162) - T_MINUS => Shift(yy_state_178) - T_PLUS => Shift(yy_state_180) - T_UIDENT => Shift(yy_state_182) - T_PACKAGE_NAME => Shift(yy_state_183) - NT_prefix_expr => Shift(yy_state_187) - NT_range_expr => Shift(yy_state_198) - NT_postfix_expr => Shift(yy_state_416) - T_EXISTS => Shift(yy_state_417) - T_FORALL => Shift(yy_state_449) - NT_infix_expr => Shift(yy_state_455) - T_UNDERSCORE => Shift(yy_state_456) - T_LPAREN => Shift(yy_state_464) - NT_pipe_expr => Shift(yy_state_497) - NT_arrow_fn_expr => Shift(yy_state_513) - NT_quantifier_expr => Shift(yy_state_514) - NT_simple_try_expr => Shift(yy_state_515) - NT_lexmatch_expr => Shift(yy_state_516) - NT_match_expr => Shift(yy_state_517) - NT_if_expr => Shift(yy_state_518) - NT_try_expr => Shift(yy_state_519) - NT_while_expr => Shift(yy_state_520) - NT_foreach_expr => Shift(yy_state_521) - NT_for_expr => Shift(yy_state_522) - T_LEXMATCH => Shift(yy_state_523) - NT_lexmatch_header => Shift(yy_state_529) - NT_match_header => Shift(yy_state_540) - T_MATCH => Shift(yy_state_550) - T_IF => Shift(yy_state_553) - T_TRY_EXCLAMATION => Shift(yy_state_559) - T_TRY_QUESTION => Shift(yy_state_561) - T_TRY => Shift(yy_state_563) - NT_loop_label_colon => Shift(yy_state_577) - T_POST_LABEL => Shift(yy_state_585) - T_LIDENT => Shift(yy_state_587) - NT_expr => Shift(yy_state_757) - T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_902) + T_BYTES_INTERP => Shift(yy_state_16) + T_INTERP => Shift(yy_state_17) + NT_non_empty_list_multiline_string_ => Shift(yy_state_18) + NT_simple_constant => Shift(yy_state_19) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + NT_tuple_expr => Shift(yy_state_27) + T_LBRACKET_BAR => Shift(yy_state_28) + T_LBRACKET => Shift(yy_state_36) + NT_constr => Shift(yy_state_47) + NT_qual_ident_simple_expr => Shift(yy_state_48) + T_UNDERSCORE => Shift(yy_state_49) + NT_atomic_expr => Shift(yy_state_50) + NT_anony_fn => Shift(yy_state_51) + T_LBRACE => Shift(yy_state_52) + T_FN => Shift(yy_state_61) + NT_type_name => Shift(yy_state_139) + T_ASYNC => Shift(yy_state_152) + NT_simple_expr => Shift(yy_state_165) + T_EXCLAMATION => Shift(yy_state_176) + T_LPAREN => Shift(yy_state_177) + T_MINUS => Shift(yy_state_191) + T_PLUS => Shift(yy_state_193) + T_UIDENT => Shift(yy_state_195) + T_PACKAGE_NAME => Shift(yy_state_196) + T_EXTEND => Shift(yy_state_199) + T_LIDENT => Shift(yy_state_200) + NT_prefix_expr => Shift(yy_state_201) + NT_range_expr => Shift(yy_state_212) + NT_postfix_expr => Shift(yy_state_223) + NT_infix_expr => Shift(yy_state_1110) _ => Error } } -fn yy_state_757(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(6, NT_statement, yy_action_443) -} - -fn yy_state_758(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1110(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_multiline_string => Shift(yy_state_2) - T_MULTILINE_INTERP => Shift(yy_state_4) - T_MULTILINE_STRING => Shift(yy_state_5) - T_REGEX_LITERAL => Shift(yy_state_6) - T_STRING => Shift(yy_state_7) - T_FLOAT => Shift(yy_state_8) - T_DOUBLE => Shift(yy_state_9) - T_INT => Shift(yy_state_10) - T_CHAR => Shift(yy_state_11) - T_BYTES => Shift(yy_state_12) - T_BYTE => Shift(yy_state_13) - T_FALSE => Shift(yy_state_14) - T_TRUE => Shift(yy_state_15) - T_INTERP => Shift(yy_state_16) - NT_non_empty_list_multiline_string_ => Shift(yy_state_17) - NT_simple_constant => Shift(yy_state_18) - T_AMPER => Shift(yy_state_19) - NT_qual_ident_ty => Shift(yy_state_25) - NT_tuple_expr => Shift(yy_state_26) - T_LBRACKET => Shift(yy_state_27) - NT_constr => Shift(yy_state_35) - NT_qual_ident_simple_expr => Shift(yy_state_36) - NT_atomic_expr => Shift(yy_state_37) - NT_anony_fn => Shift(yy_state_38) - T_LBRACE => Shift(yy_state_39) - T_FN => Shift(yy_state_48) - NT_type_name => Shift(yy_state_126) - T_ASYNC => Shift(yy_state_138) - NT_simple_expr => Shift(yy_state_151) - T_EXCLAMATION => Shift(yy_state_162) - T_MINUS => Shift(yy_state_178) - T_PLUS => Shift(yy_state_180) - T_UIDENT => Shift(yy_state_182) - T_PACKAGE_NAME => Shift(yy_state_183) - NT_prefix_expr => Shift(yy_state_187) - NT_range_expr => Shift(yy_state_198) - NT_postfix_expr => Shift(yy_state_416) - T_EXISTS => Shift(yy_state_417) - T_FORALL => Shift(yy_state_449) - NT_infix_expr => Shift(yy_state_455) - T_UNDERSCORE => Shift(yy_state_456) - T_LPAREN => Shift(yy_state_464) - NT_pipe_expr => Shift(yy_state_497) - NT_arrow_fn_expr => Shift(yy_state_513) - NT_quantifier_expr => Shift(yy_state_514) - NT_simple_try_expr => Shift(yy_state_515) - NT_lexmatch_expr => Shift(yy_state_516) - NT_match_expr => Shift(yy_state_517) - NT_if_expr => Shift(yy_state_518) - NT_try_expr => Shift(yy_state_519) - NT_while_expr => Shift(yy_state_520) - NT_foreach_expr => Shift(yy_state_521) - NT_for_expr => Shift(yy_state_522) - T_LEXMATCH => Shift(yy_state_523) - NT_lexmatch_header => Shift(yy_state_529) - NT_match_header => Shift(yy_state_540) - T_MATCH => Shift(yy_state_550) - T_IF => Shift(yy_state_553) - T_TRY_EXCLAMATION => Shift(yy_state_559) - T_TRY_QUESTION => Shift(yy_state_561) - T_TRY => Shift(yy_state_563) - NT_loop_label_colon => Shift(yy_state_577) - T_POST_LABEL => Shift(yy_state_585) - T_LIDENT => Shift(yy_state_587) - NT_expr => Shift(yy_state_759) - T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_902) + T_BARBAR => Shift(yy_state_230) + T_AMPERAMPER => Shift(yy_state_232) + T_BAR => Shift(yy_state_234) + T_CARET => Shift(yy_state_236) + T_AMPER => Shift(yy_state_238) + T_MINUS => Shift(yy_state_240) + T_PLUS => Shift(yy_state_242) + T_INFIX1 => Shift(yy_state_244) + T_INFIX2 => Shift(yy_state_246) + T_INFIX3 => Shift(yy_state_248) + T_INFIX4 => Shift(yy_state_250) + T_IMPLIES => Shift(yy_state_252) + T_COMMA | T_SEMI | T_IF | T_FAT_ARROW => Reduce(5, NT_non_empty_list_commas_rev_separated_pair_binder_EQUAL_infix_expr__, yy_action_440) + _ => Error + } +} + +fn yy_state_1111(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_list_commas_no_trailing_separated_pair_binder_EQUAL_infix_expr__, yy_action_439) +} + +fn yy_state_1112(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_IF => Shift(yy_state_601) + NT_option_preceded_IF_infix_expr__ => Shift(yy_state_1113) + T_FAT_ARROW => Reduce(0, NT_option_preceded_IF_infix_expr__, yy_action_685) _ => Error } } -fn yy_state_759(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(4, NT_statement, yy_action_442) +fn yy_state_1113(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_FAT_ARROW => Shift(yy_state_1114) + _ => Error + } } -fn yy_state_760(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1114(_lookahead : YYSymbol) -> YYDecision { match _lookahead { NT_multiline_string => Shift(yy_state_2) T_MULTILINE_INTERP => Shift(yy_state_4) @@ -27298,84 +37294,88 @@ fn yy_state_760(_lookahead : YYSymbol) -> YYDecision { T_BYTE => Shift(yy_state_13) T_FALSE => Shift(yy_state_14) T_TRUE => Shift(yy_state_15) - T_INTERP => Shift(yy_state_16) - NT_non_empty_list_multiline_string_ => Shift(yy_state_17) - NT_simple_constant => Shift(yy_state_18) - T_AMPER => Shift(yy_state_19) - NT_qual_ident_ty => Shift(yy_state_25) - NT_tuple_expr => Shift(yy_state_26) - T_LBRACKET => Shift(yy_state_27) - NT_constr => Shift(yy_state_35) - NT_qual_ident_simple_expr => Shift(yy_state_36) - NT_atomic_expr => Shift(yy_state_37) - NT_anony_fn => Shift(yy_state_38) - T_LBRACE => Shift(yy_state_39) - T_FN => Shift(yy_state_48) - NT_type_name => Shift(yy_state_126) - T_ASYNC => Shift(yy_state_138) - NT_simple_expr => Shift(yy_state_151) - T_EXCLAMATION => Shift(yy_state_162) - NT_non_empty_tuple_elems_with_prefix => Shift(yy_state_166) - NT_arrow_fn_prefix_no_constraint => Shift(yy_state_167) - NT_non_empty_tuple_elems => Shift(yy_state_168) - NT_expr => Shift(yy_state_169) - T_MINUS => Shift(yy_state_178) - T_PLUS => Shift(yy_state_180) - T_UIDENT => Shift(yy_state_182) - T_PACKAGE_NAME => Shift(yy_state_183) - NT_prefix_expr => Shift(yy_state_187) - NT_range_expr => Shift(yy_state_198) - NT_postfix_expr => Shift(yy_state_416) - T_EXISTS => Shift(yy_state_417) - T_FORALL => Shift(yy_state_449) - NT_infix_expr => Shift(yy_state_455) - T_LPAREN => Shift(yy_state_464) - T_UNDERSCORE => Shift(yy_state_465) - NT_pipe_expr => Shift(yy_state_497) - NT_arrow_fn_expr => Shift(yy_state_513) - NT_quantifier_expr => Shift(yy_state_514) - NT_simple_try_expr => Shift(yy_state_515) - NT_lexmatch_expr => Shift(yy_state_516) - NT_match_expr => Shift(yy_state_517) - NT_if_expr => Shift(yy_state_518) - NT_try_expr => Shift(yy_state_519) - NT_while_expr => Shift(yy_state_520) - NT_foreach_expr => Shift(yy_state_521) - NT_for_expr => Shift(yy_state_522) - T_LEXMATCH => Shift(yy_state_523) - NT_lexmatch_header => Shift(yy_state_529) - NT_match_header => Shift(yy_state_540) - T_MATCH => Shift(yy_state_550) - T_IF => Shift(yy_state_553) - T_TRY_EXCLAMATION => Shift(yy_state_559) - T_TRY_QUESTION => Shift(yy_state_561) - T_TRY => Shift(yy_state_563) - NT_loop_label_colon => Shift(yy_state_577) - T_POST_LABEL => Shift(yy_state_585) - T_RPAREN => Shift(yy_state_761) - NT_arrow_fn_prefix => Shift(yy_state_766) - T_LIDENT => Shift(yy_state_771) - T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_902) + T_BYTES_INTERP => Shift(yy_state_16) + T_INTERP => Shift(yy_state_17) + NT_non_empty_list_multiline_string_ => Shift(yy_state_18) + NT_simple_constant => Shift(yy_state_19) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + NT_tuple_expr => Shift(yy_state_27) + T_LBRACKET_BAR => Shift(yy_state_28) + T_LBRACKET => Shift(yy_state_36) + NT_constr => Shift(yy_state_47) + NT_qual_ident_simple_expr => Shift(yy_state_48) + NT_atomic_expr => Shift(yy_state_50) + NT_anony_fn => Shift(yy_state_51) + T_LBRACE => Shift(yy_state_52) + T_FN => Shift(yy_state_61) + NT_type_name => Shift(yy_state_139) + T_ASYNC => Shift(yy_state_152) + NT_simple_expr => Shift(yy_state_165) + T_EXCLAMATION => Shift(yy_state_176) + T_MINUS => Shift(yy_state_191) + T_PLUS => Shift(yy_state_193) + T_UIDENT => Shift(yy_state_195) + T_PACKAGE_NAME => Shift(yy_state_196) + NT_prefix_expr => Shift(yy_state_201) + NT_range_expr => Shift(yy_state_212) + NT_postfix_expr => Shift(yy_state_223) + T_EXISTS => Shift(yy_state_224) + T_FORALL => Shift(yy_state_256) + NT_infix_expr => Shift(yy_state_272) + T_UNDERSCORE => Shift(yy_state_273) + T_LPAREN => Shift(yy_state_281) + NT_pipe_expr => Shift(yy_state_325) + NT_arrow_fn_expr => Shift(yy_state_344) + NT_quantifier_expr => Shift(yy_state_345) + NT_simple_try_expr => Shift(yy_state_346) + NT_lexscan_expr => Shift(yy_state_347) + NT_lexmatch_expr => Shift(yy_state_348) + NT_match_expr => Shift(yy_state_349) + NT_if_expr => Shift(yy_state_350) + NT_try_expr => Shift(yy_state_351) + NT_while_expr => Shift(yy_state_352) + NT_foreach_expr => Shift(yy_state_353) + NT_for_expr => Shift(yy_state_354) + T_LEXSCAN => Shift(yy_state_355) + NT_lexscan_header => Shift(yy_state_358) + T_LEXMATCH => Shift(yy_state_391) + NT_lexmatch_header => Shift(yy_state_399) + NT_match_header => Shift(yy_state_444) + T_MATCH => Shift(yy_state_605) + T_IF => Shift(yy_state_608) + T_TRY_EXCLAMATION => Shift(yy_state_614) + T_TRY_QUESTION => Shift(yy_state_616) + T_TRY => Shift(yy_state_618) + NT_loop_label_colon => Shift(yy_state_632) + T_POST_LABEL => Shift(yy_state_639) + T_EXTEND => Shift(yy_state_641) + T_LIDENT => Shift(yy_state_648) + NT_expr => Shift(yy_state_1115) + T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_1071) _ => Error } } -fn yy_state_761(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1115(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_FAT_ARROW => Shift(yy_state_762) - T_INFIX1 | T_INFIX2 | T_INFIX3 | T_INFIX4 | T_EOF | T_CATCH | T_EQ_TILDE | T_LPAREN | T_RPAREN | T_COMMA | T_MINUS | T_DOT_LIDENT | T_DOT_INT | T_COLON | T_SEMI | T_LBRACKET | T_PLUS | T_RBRACKET | T_BAR | T_LBRACE | T_RBRACE | T_AMPERAMPER | T_AMPER | T_CARET | T_BARBAR | T_AS | T_PIPE | T_PIPE_LEFT | T_LT_PLUS | T_DOTDOT | T_RANGE_INCLUSIVE | T_RANGE_LT_INCLUSIVE | T_RANGE_EXCLUSIVE | T_RANGE_INCLUSIVE_REV | T_RANGE_EXCLUSIVE_REV | T_IS | T_AND | T_IMPLIES | T_LEXMATCH_QUESTION => Reduce(2, NT_tuple_expr, yy_action_789) + T_RBRACKET => Shift(yy_state_1116) _ => Error } } -fn yy_state_762(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1116(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(7, NT_simple_expr, yy_action_438) +} + +fn yy_state_1117(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACE => Shift(yy_state_763) + T_IN => Shift(yy_state_1118) _ => Error } } -fn yy_state_763(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1118(_lookahead : YYSymbol) -> YYDecision { match _lookahead { NT_multiline_string => Shift(yy_state_2) T_MULTILINE_INTERP => Shift(yy_state_4) @@ -27390,110 +37390,79 @@ fn yy_state_763(_lookahead : YYSymbol) -> YYDecision { T_BYTE => Shift(yy_state_13) T_FALSE => Shift(yy_state_14) T_TRUE => Shift(yy_state_15) - T_INTERP => Shift(yy_state_16) - NT_non_empty_list_multiline_string_ => Shift(yy_state_17) - NT_simple_constant => Shift(yy_state_18) - T_AMPER => Shift(yy_state_19) - NT_qual_ident_ty => Shift(yy_state_25) - NT_tuple_expr => Shift(yy_state_26) - T_LBRACKET => Shift(yy_state_27) - NT_constr => Shift(yy_state_35) - NT_qual_ident_simple_expr => Shift(yy_state_36) - NT_atomic_expr => Shift(yy_state_37) - NT_anony_fn => Shift(yy_state_38) - T_LBRACE => Shift(yy_state_39) - NT_statement => Shift(yy_state_121) - NT_non_empty_list_semi_rev_aux_statement_ => Shift(yy_state_122) - NT_type_name => Shift(yy_state_126) - T_EXCLAMATION => Shift(yy_state_162) - T_MINUS => Shift(yy_state_178) - T_PLUS => Shift(yy_state_180) - T_UIDENT => Shift(yy_state_182) - NT_prefix_expr => Shift(yy_state_187) - NT_range_expr => Shift(yy_state_198) - NT_postfix_expr => Shift(yy_state_416) - T_EXISTS => Shift(yy_state_417) - T_FORALL => Shift(yy_state_449) - NT_infix_expr => Shift(yy_state_455) - T_UNDERSCORE => Shift(yy_state_456) - NT_qual_ident => Shift(yy_state_458) - NT_simple_expr => Shift(yy_state_459) - T_LPAREN => Shift(yy_state_464) - NT_pipe_expr => Shift(yy_state_497) - NT_non_empty_list_semis_rev_statement_ => Shift(yy_state_510) - NT_arrow_fn_expr => Shift(yy_state_513) - NT_quantifier_expr => Shift(yy_state_514) - NT_simple_try_expr => Shift(yy_state_515) - NT_lexmatch_expr => Shift(yy_state_516) - NT_match_expr => Shift(yy_state_517) - NT_if_expr => Shift(yy_state_518) - NT_try_expr => Shift(yy_state_519) - NT_while_expr => Shift(yy_state_520) - NT_foreach_expr => Shift(yy_state_521) - NT_for_expr => Shift(yy_state_522) - T_LEXMATCH => Shift(yy_state_523) - NT_lexmatch_header => Shift(yy_state_529) - NT_match_header => Shift(yy_state_540) - T_MATCH => Shift(yy_state_550) - T_IF => Shift(yy_state_553) - T_TRY_EXCLAMATION => Shift(yy_state_559) - T_TRY_QUESTION => Shift(yy_state_561) - T_TRY => Shift(yy_state_563) - NT_loop_label_colon => Shift(yy_state_577) - T_POST_LABEL => Shift(yy_state_585) - NT_expr => Shift(yy_state_590) - NT_left_value => Shift(yy_state_591) - T_ELLIPSIS => Shift(yy_state_598) - T_RAISE => Shift(yy_state_599) - T_PACKAGE_NAME => Shift(yy_state_601) - T_LIDENT => Shift(yy_state_603) - NT_expr_statement_no_break_continue_return => Shift(yy_state_662) - T_RETURN => Shift(yy_state_663) - T_CONTINUE => Shift(yy_state_666) - T_BREAK => Shift(yy_state_675) - T_GUARD => Shift(yy_state_688) - NT_expr_statement => Shift(yy_state_692) - T_PROOF_LET => Shift(yy_state_693) - T_PROOF_ASSERT => Shift(yy_state_697) - T_DEFER => Shift(yy_state_699) - NT_guard_statement => Shift(yy_state_701) - T_FN => Shift(yy_state_702) - T_ASYNC => Shift(yy_state_707) - T_LETREC => Shift(yy_state_713) - T_LET => Shift(yy_state_744) - NT_list_semis_rev_statement_ => Shift(yy_state_764) - T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_902) - T_RBRACE => Reduce(0, NT_list_semis_rev_statement_, yy_action_817) + T_BYTES_INTERP => Shift(yy_state_16) + T_INTERP => Shift(yy_state_17) + NT_non_empty_list_multiline_string_ => Shift(yy_state_18) + NT_simple_constant => Shift(yy_state_19) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + NT_tuple_expr => Shift(yy_state_27) + T_LBRACKET_BAR => Shift(yy_state_28) + T_LBRACKET => Shift(yy_state_36) + NT_constr => Shift(yy_state_47) + NT_qual_ident_simple_expr => Shift(yy_state_48) + T_UNDERSCORE => Shift(yy_state_49) + NT_atomic_expr => Shift(yy_state_50) + NT_anony_fn => Shift(yy_state_51) + T_LBRACE => Shift(yy_state_52) + T_FN => Shift(yy_state_61) + NT_type_name => Shift(yy_state_139) + T_ASYNC => Shift(yy_state_152) + NT_simple_expr => Shift(yy_state_165) + T_EXCLAMATION => Shift(yy_state_176) + T_LPAREN => Shift(yy_state_177) + T_MINUS => Shift(yy_state_191) + T_PLUS => Shift(yy_state_193) + T_UIDENT => Shift(yy_state_195) + T_PACKAGE_NAME => Shift(yy_state_196) + T_EXTEND => Shift(yy_state_199) + T_LIDENT => Shift(yy_state_200) + NT_prefix_expr => Shift(yy_state_201) + NT_range_expr => Shift(yy_state_212) + NT_postfix_expr => Shift(yy_state_223) + NT_infix_expr => Shift(yy_state_1119) _ => Error } } -fn yy_state_764(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1119(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RBRACE => Shift(yy_state_765) + T_BARBAR => Shift(yy_state_230) + T_AMPERAMPER => Shift(yy_state_232) + T_BAR => Shift(yy_state_234) + T_CARET => Shift(yy_state_236) + T_AMPER => Shift(yy_state_238) + T_MINUS => Shift(yy_state_240) + T_PLUS => Shift(yy_state_242) + T_INFIX1 => Shift(yy_state_244) + T_INFIX2 => Shift(yy_state_246) + T_INFIX3 => Shift(yy_state_248) + T_INFIX4 => Shift(yy_state_250) + T_IMPLIES => Shift(yy_state_252) + NT_foreach_optional_loop_vars_infix => Shift(yy_state_1120) + T_SEMI => Shift(yy_state_1125) + T_IF | T_FAT_ARROW => Reduce(0, NT_foreach_optional_loop_vars_infix, yy_action_437) _ => Error } } -fn yy_state_765(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(6, NT_arrow_fn_with_explicit_braces, yy_action_441) -} - -fn yy_state_766(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1120(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_FAT_ARROW => Shift(yy_state_767) + T_IF => Shift(yy_state_601) + NT_option_preceded_IF_infix_expr__ => Shift(yy_state_1121) + T_FAT_ARROW => Reduce(0, NT_option_preceded_IF_infix_expr__, yy_action_685) _ => Error } } -fn yy_state_767(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1121(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACE => Shift(yy_state_768) + T_FAT_ARROW => Shift(yy_state_1122) _ => Error } } -fn yy_state_768(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1122(_lookahead : YYSymbol) -> YYDecision { match _lookahead { NT_multiline_string => Shift(yy_state_2) T_MULTILINE_INTERP => Shift(yy_state_4) @@ -27508,137 +37477,177 @@ fn yy_state_768(_lookahead : YYSymbol) -> YYDecision { T_BYTE => Shift(yy_state_13) T_FALSE => Shift(yy_state_14) T_TRUE => Shift(yy_state_15) - T_INTERP => Shift(yy_state_16) - NT_non_empty_list_multiline_string_ => Shift(yy_state_17) - NT_simple_constant => Shift(yy_state_18) - T_AMPER => Shift(yy_state_19) - NT_qual_ident_ty => Shift(yy_state_25) - NT_tuple_expr => Shift(yy_state_26) - T_LBRACKET => Shift(yy_state_27) - NT_constr => Shift(yy_state_35) - NT_qual_ident_simple_expr => Shift(yy_state_36) - NT_atomic_expr => Shift(yy_state_37) - NT_anony_fn => Shift(yy_state_38) - T_LBRACE => Shift(yy_state_39) - NT_statement => Shift(yy_state_121) - NT_non_empty_list_semi_rev_aux_statement_ => Shift(yy_state_122) - NT_type_name => Shift(yy_state_126) - T_EXCLAMATION => Shift(yy_state_162) - T_MINUS => Shift(yy_state_178) - T_PLUS => Shift(yy_state_180) - T_UIDENT => Shift(yy_state_182) - NT_prefix_expr => Shift(yy_state_187) - NT_range_expr => Shift(yy_state_198) - NT_postfix_expr => Shift(yy_state_416) - T_EXISTS => Shift(yy_state_417) - T_FORALL => Shift(yy_state_449) - NT_infix_expr => Shift(yy_state_455) - T_UNDERSCORE => Shift(yy_state_456) - NT_qual_ident => Shift(yy_state_458) - NT_simple_expr => Shift(yy_state_459) - T_LPAREN => Shift(yy_state_464) - NT_pipe_expr => Shift(yy_state_497) - NT_non_empty_list_semis_rev_statement_ => Shift(yy_state_510) - NT_arrow_fn_expr => Shift(yy_state_513) - NT_quantifier_expr => Shift(yy_state_514) - NT_simple_try_expr => Shift(yy_state_515) - NT_lexmatch_expr => Shift(yy_state_516) - NT_match_expr => Shift(yy_state_517) - NT_if_expr => Shift(yy_state_518) - NT_try_expr => Shift(yy_state_519) - NT_while_expr => Shift(yy_state_520) - NT_foreach_expr => Shift(yy_state_521) - NT_for_expr => Shift(yy_state_522) - T_LEXMATCH => Shift(yy_state_523) - NT_lexmatch_header => Shift(yy_state_529) - NT_match_header => Shift(yy_state_540) - T_MATCH => Shift(yy_state_550) - T_IF => Shift(yy_state_553) - T_TRY_EXCLAMATION => Shift(yy_state_559) - T_TRY_QUESTION => Shift(yy_state_561) - T_TRY => Shift(yy_state_563) - NT_loop_label_colon => Shift(yy_state_577) - T_POST_LABEL => Shift(yy_state_585) - NT_expr => Shift(yy_state_590) - NT_left_value => Shift(yy_state_591) - T_ELLIPSIS => Shift(yy_state_598) - T_RAISE => Shift(yy_state_599) - T_PACKAGE_NAME => Shift(yy_state_601) - T_LIDENT => Shift(yy_state_603) - NT_expr_statement_no_break_continue_return => Shift(yy_state_662) - T_RETURN => Shift(yy_state_663) - T_CONTINUE => Shift(yy_state_666) - T_BREAK => Shift(yy_state_675) - T_GUARD => Shift(yy_state_688) - NT_expr_statement => Shift(yy_state_692) - T_PROOF_LET => Shift(yy_state_693) - T_PROOF_ASSERT => Shift(yy_state_697) - T_DEFER => Shift(yy_state_699) - NT_guard_statement => Shift(yy_state_701) - T_FN => Shift(yy_state_702) - T_ASYNC => Shift(yy_state_707) - T_LETREC => Shift(yy_state_713) - T_LET => Shift(yy_state_744) - NT_list_semis_rev_statement_ => Shift(yy_state_769) - T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_902) - T_RBRACE => Reduce(0, NT_list_semis_rev_statement_, yy_action_817) + T_BYTES_INTERP => Shift(yy_state_16) + T_INTERP => Shift(yy_state_17) + NT_non_empty_list_multiline_string_ => Shift(yy_state_18) + NT_simple_constant => Shift(yy_state_19) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + NT_tuple_expr => Shift(yy_state_27) + T_LBRACKET_BAR => Shift(yy_state_28) + T_LBRACKET => Shift(yy_state_36) + NT_constr => Shift(yy_state_47) + NT_qual_ident_simple_expr => Shift(yy_state_48) + NT_atomic_expr => Shift(yy_state_50) + NT_anony_fn => Shift(yy_state_51) + T_LBRACE => Shift(yy_state_52) + T_FN => Shift(yy_state_61) + NT_type_name => Shift(yy_state_139) + T_ASYNC => Shift(yy_state_152) + NT_simple_expr => Shift(yy_state_165) + T_EXCLAMATION => Shift(yy_state_176) + T_MINUS => Shift(yy_state_191) + T_PLUS => Shift(yy_state_193) + T_UIDENT => Shift(yy_state_195) + T_PACKAGE_NAME => Shift(yy_state_196) + NT_prefix_expr => Shift(yy_state_201) + NT_range_expr => Shift(yy_state_212) + NT_postfix_expr => Shift(yy_state_223) + T_EXISTS => Shift(yy_state_224) + T_FORALL => Shift(yy_state_256) + NT_infix_expr => Shift(yy_state_272) + T_UNDERSCORE => Shift(yy_state_273) + T_LPAREN => Shift(yy_state_281) + NT_pipe_expr => Shift(yy_state_325) + NT_arrow_fn_expr => Shift(yy_state_344) + NT_quantifier_expr => Shift(yy_state_345) + NT_simple_try_expr => Shift(yy_state_346) + NT_lexscan_expr => Shift(yy_state_347) + NT_lexmatch_expr => Shift(yy_state_348) + NT_match_expr => Shift(yy_state_349) + NT_if_expr => Shift(yy_state_350) + NT_try_expr => Shift(yy_state_351) + NT_while_expr => Shift(yy_state_352) + NT_foreach_expr => Shift(yy_state_353) + NT_for_expr => Shift(yy_state_354) + T_LEXSCAN => Shift(yy_state_355) + NT_lexscan_header => Shift(yy_state_358) + T_LEXMATCH => Shift(yy_state_391) + NT_lexmatch_header => Shift(yy_state_399) + NT_match_header => Shift(yy_state_444) + T_MATCH => Shift(yy_state_605) + T_IF => Shift(yy_state_608) + T_TRY_EXCLAMATION => Shift(yy_state_614) + T_TRY_QUESTION => Shift(yy_state_616) + T_TRY => Shift(yy_state_618) + NT_loop_label_colon => Shift(yy_state_632) + T_POST_LABEL => Shift(yy_state_639) + T_EXTEND => Shift(yy_state_641) + T_LIDENT => Shift(yy_state_648) + NT_expr => Shift(yy_state_1123) + T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_1071) _ => Error } } -fn yy_state_769(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1123(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RBRACE => Shift(yy_state_770) + T_RBRACKET => Shift(yy_state_1124) _ => Error } } -fn yy_state_770(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(6, NT_arrow_fn_with_explicit_braces, yy_action_440) +fn yy_state_1124(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(10, NT_simple_expr, yy_action_436) } -fn yy_state_771(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1125(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_FAT_ARROW => Shift(yy_state_588) - T_COLON => Shift(yy_state_772) - T_COMMA => Shift(yy_state_775) - T_RPAREN => Shift(yy_state_780) - T_INFIX1 | T_INFIX2 | T_INFIX3 | T_INFIX4 | T_CATCH | T_EQ_TILDE | T_LPAREN | T_MINUS | T_DOT_LIDENT | T_DOT_INT | T_LBRACKET | T_PLUS | T_BAR | T_AMPERAMPER | T_AMPER | T_CARET | T_BARBAR | T_AS | T_PIPE | T_PIPE_LEFT | T_LT_PLUS | T_DOTDOT | T_RANGE_INCLUSIVE | T_RANGE_LT_INCLUSIVE | T_RANGE_EXCLUSIVE | T_RANGE_INCLUSIVE_REV | T_RANGE_EXCLUSIVE_REV | T_IS | T_IMPLIES | T_LEXMATCH_QUESTION => Reduce(1, NT_qual_ident_simple_expr, yy_action_772) + NT_non_empty_list_commas_rev_separated_pair_binder_EQUAL_infix_expr__ => Shift(yy_state_43) + NT_non_empty_list_commas_no_trailing_separated_pair_binder_EQUAL_infix_expr__ => Shift(yy_state_1111) + T_EXTEND => Shift(yy_state_1126) + T_LIDENT => Shift(yy_state_1129) + NT_for_binders_infix => Shift(yy_state_1132) + NT_list_commas_no_trailing_separated_pair_binder_EQUAL_infix_expr__ => Shift(yy_state_1135) + T_SEMI | T_IF | T_FAT_ARROW => Reduce(0, NT_list_commas_no_trailing_separated_pair_binder_EQUAL_infix_expr__, yy_action_1036) _ => Error } } -fn yy_state_772(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1126(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_ASYNC => Shift(yy_state_52) - T_UNDERSCORE => Shift(yy_state_57) - T_AMPER => Shift(yy_state_58) - T_PACKAGE_NAME => Shift(yy_state_60) - T_UIDENT => Shift(yy_state_67) - T_LPAREN => Shift(yy_state_71) - NT_simple_type => Shift(yy_state_97) - NT_type_ => Shift(yy_state_773) + T_EQUAL => Shift(yy_state_1127) _ => Error } } -fn yy_state_773(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1127(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_COMMA => Shift(yy_state_481) - T_RPAREN => Shift(yy_state_774) + NT_multiline_string => Shift(yy_state_2) + T_MULTILINE_INTERP => Shift(yy_state_4) + T_MULTILINE_STRING => Shift(yy_state_5) + T_REGEX_LITERAL => Shift(yy_state_6) + T_STRING => Shift(yy_state_7) + T_FLOAT => Shift(yy_state_8) + T_DOUBLE => Shift(yy_state_9) + T_INT => Shift(yy_state_10) + T_CHAR => Shift(yy_state_11) + T_BYTES => Shift(yy_state_12) + T_BYTE => Shift(yy_state_13) + T_FALSE => Shift(yy_state_14) + T_TRUE => Shift(yy_state_15) + T_BYTES_INTERP => Shift(yy_state_16) + T_INTERP => Shift(yy_state_17) + NT_non_empty_list_multiline_string_ => Shift(yy_state_18) + NT_simple_constant => Shift(yy_state_19) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + NT_tuple_expr => Shift(yy_state_27) + T_LBRACKET_BAR => Shift(yy_state_28) + T_LBRACKET => Shift(yy_state_36) + NT_constr => Shift(yy_state_47) + NT_qual_ident_simple_expr => Shift(yy_state_48) + T_UNDERSCORE => Shift(yy_state_49) + NT_atomic_expr => Shift(yy_state_50) + NT_anony_fn => Shift(yy_state_51) + T_LBRACE => Shift(yy_state_52) + T_FN => Shift(yy_state_61) + NT_type_name => Shift(yy_state_139) + T_ASYNC => Shift(yy_state_152) + NT_simple_expr => Shift(yy_state_165) + T_EXCLAMATION => Shift(yy_state_176) + T_LPAREN => Shift(yy_state_177) + T_MINUS => Shift(yy_state_191) + T_PLUS => Shift(yy_state_193) + T_UIDENT => Shift(yy_state_195) + T_PACKAGE_NAME => Shift(yy_state_196) + T_EXTEND => Shift(yy_state_199) + T_LIDENT => Shift(yy_state_200) + NT_prefix_expr => Shift(yy_state_201) + NT_range_expr => Shift(yy_state_212) + NT_postfix_expr => Shift(yy_state_223) + NT_infix_expr => Shift(yy_state_1128) _ => Error } } -fn yy_state_774(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1128(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_FAT_ARROW => Reduce(4, NT_arrow_fn_prefix, yy_action_584) - T_INFIX1 | T_INFIX2 | T_INFIX3 | T_INFIX4 | T_EOF | T_CATCH | T_EQ_TILDE | T_LPAREN | T_RPAREN | T_COMMA | T_MINUS | T_DOT_LIDENT | T_DOT_INT | T_COLON | T_SEMI | T_LBRACKET | T_PLUS | T_RBRACKET | T_BAR | T_LBRACE | T_RBRACE | T_AMPERAMPER | T_AMPER | T_CARET | T_BARBAR | T_AS | T_PIPE | T_PIPE_LEFT | T_LT_PLUS | T_DOTDOT | T_RANGE_INCLUSIVE | T_RANGE_LT_INCLUSIVE | T_RANGE_EXCLUSIVE | T_RANGE_INCLUSIVE_REV | T_RANGE_EXCLUSIVE_REV | T_IS | T_AND | T_IMPLIES | T_LEXMATCH_QUESTION => Reduce(5, NT_tuple_expr, yy_action_439) + T_BARBAR => Shift(yy_state_230) + T_AMPERAMPER => Shift(yy_state_232) + T_BAR => Shift(yy_state_234) + T_CARET => Shift(yy_state_236) + T_AMPER => Shift(yy_state_238) + T_MINUS => Shift(yy_state_240) + T_PLUS => Shift(yy_state_242) + T_INFIX1 => Shift(yy_state_244) + T_INFIX2 => Shift(yy_state_246) + T_INFIX3 => Shift(yy_state_248) + T_INFIX4 => Shift(yy_state_250) + T_IMPLIES => Shift(yy_state_252) + T_COMMA | T_SEMI | T_IF | T_FAT_ARROW => Reduce(3, NT_non_empty_list_commas_rev_separated_pair_binder_EQUAL_infix_expr__, yy_action_434) _ => Error } } -fn yy_state_775(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1129(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_EQUAL => Shift(yy_state_1130) + _ => Error + } +} + +fn yy_state_1130(_lookahead : YYSymbol) -> YYDecision { match _lookahead { NT_multiline_string => Shift(yy_state_2) T_MULTILINE_INTERP => Shift(yy_state_4) @@ -27653,119 +37662,114 @@ fn yy_state_775(_lookahead : YYSymbol) -> YYDecision { T_BYTE => Shift(yy_state_13) T_FALSE => Shift(yy_state_14) T_TRUE => Shift(yy_state_15) - T_INTERP => Shift(yy_state_16) - NT_non_empty_list_multiline_string_ => Shift(yy_state_17) - NT_simple_constant => Shift(yy_state_18) - T_AMPER => Shift(yy_state_19) - NT_qual_ident_ty => Shift(yy_state_25) - NT_tuple_expr => Shift(yy_state_26) - T_LBRACKET => Shift(yy_state_27) - NT_constr => Shift(yy_state_35) - NT_qual_ident_simple_expr => Shift(yy_state_36) - NT_atomic_expr => Shift(yy_state_37) - NT_anony_fn => Shift(yy_state_38) - T_LBRACE => Shift(yy_state_39) - T_FN => Shift(yy_state_48) - NT_type_name => Shift(yy_state_126) - T_ASYNC => Shift(yy_state_138) - NT_simple_expr => Shift(yy_state_151) - T_EXCLAMATION => Shift(yy_state_162) - NT_non_empty_tuple_elems => Shift(yy_state_168) - NT_expr => Shift(yy_state_176) - T_MINUS => Shift(yy_state_178) - T_PLUS => Shift(yy_state_180) - T_UIDENT => Shift(yy_state_182) - T_PACKAGE_NAME => Shift(yy_state_183) - NT_prefix_expr => Shift(yy_state_187) - NT_range_expr => Shift(yy_state_198) - NT_postfix_expr => Shift(yy_state_416) - T_EXISTS => Shift(yy_state_417) - T_FORALL => Shift(yy_state_449) - NT_infix_expr => Shift(yy_state_455) - T_LPAREN => Shift(yy_state_464) - NT_arrow_fn_prefix => Shift(yy_state_486) - T_UNDERSCORE => Shift(yy_state_495) - NT_pipe_expr => Shift(yy_state_497) - NT_arrow_fn_expr => Shift(yy_state_513) - NT_quantifier_expr => Shift(yy_state_514) - NT_simple_try_expr => Shift(yy_state_515) - NT_lexmatch_expr => Shift(yy_state_516) - NT_match_expr => Shift(yy_state_517) - NT_if_expr => Shift(yy_state_518) - NT_try_expr => Shift(yy_state_519) - NT_while_expr => Shift(yy_state_520) - NT_foreach_expr => Shift(yy_state_521) - NT_for_expr => Shift(yy_state_522) - T_LEXMATCH => Shift(yy_state_523) - NT_lexmatch_header => Shift(yy_state_529) - NT_match_header => Shift(yy_state_540) - T_MATCH => Shift(yy_state_550) - T_IF => Shift(yy_state_553) - T_TRY_EXCLAMATION => Shift(yy_state_559) - T_TRY_QUESTION => Shift(yy_state_561) - T_TRY => Shift(yy_state_563) - NT_loop_label_colon => Shift(yy_state_577) - T_POST_LABEL => Shift(yy_state_585) - NT_non_empty_tuple_elems_with_prefix => Shift(yy_state_776) - NT_arrow_fn_prefix_no_constraint => Shift(yy_state_777) - T_RPAREN => Shift(yy_state_778) - T_LIDENT => Shift(yy_state_779) - T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_902) + T_BYTES_INTERP => Shift(yy_state_16) + T_INTERP => Shift(yy_state_17) + NT_non_empty_list_multiline_string_ => Shift(yy_state_18) + NT_simple_constant => Shift(yy_state_19) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + NT_tuple_expr => Shift(yy_state_27) + T_LBRACKET_BAR => Shift(yy_state_28) + T_LBRACKET => Shift(yy_state_36) + NT_constr => Shift(yy_state_47) + NT_qual_ident_simple_expr => Shift(yy_state_48) + T_UNDERSCORE => Shift(yy_state_49) + NT_atomic_expr => Shift(yy_state_50) + NT_anony_fn => Shift(yy_state_51) + T_LBRACE => Shift(yy_state_52) + T_FN => Shift(yy_state_61) + NT_type_name => Shift(yy_state_139) + T_ASYNC => Shift(yy_state_152) + NT_simple_expr => Shift(yy_state_165) + T_EXCLAMATION => Shift(yy_state_176) + T_LPAREN => Shift(yy_state_177) + T_MINUS => Shift(yy_state_191) + T_PLUS => Shift(yy_state_193) + T_UIDENT => Shift(yy_state_195) + T_PACKAGE_NAME => Shift(yy_state_196) + T_EXTEND => Shift(yy_state_199) + T_LIDENT => Shift(yy_state_200) + NT_prefix_expr => Shift(yy_state_201) + NT_range_expr => Shift(yy_state_212) + NT_postfix_expr => Shift(yy_state_223) + NT_infix_expr => Shift(yy_state_1131) _ => Error } } -fn yy_state_776(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_non_empty_tuple_elems_with_prefix, yy_action_438) -} - -fn yy_state_777(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_arrow_fn_prefix_no_constraint, yy_action_437) +fn yy_state_1131(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_BARBAR => Shift(yy_state_230) + T_AMPERAMPER => Shift(yy_state_232) + T_BAR => Shift(yy_state_234) + T_CARET => Shift(yy_state_236) + T_AMPER => Shift(yy_state_238) + T_MINUS => Shift(yy_state_240) + T_PLUS => Shift(yy_state_242) + T_INFIX1 => Shift(yy_state_244) + T_INFIX2 => Shift(yy_state_246) + T_INFIX3 => Shift(yy_state_248) + T_INFIX4 => Shift(yy_state_250) + T_IMPLIES => Shift(yy_state_252) + T_COMMA | T_SEMI | T_IF | T_FAT_ARROW => Reduce(3, NT_non_empty_list_commas_rev_separated_pair_binder_EQUAL_infix_expr__, yy_action_432) + _ => Error + } } -fn yy_state_778(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1132(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_FAT_ARROW => Reduce(3, NT_arrow_fn_prefix, yy_action_582) - T_INFIX1 | T_INFIX2 | T_INFIX3 | T_INFIX4 | T_EOF | T_CATCH | T_EQ_TILDE | T_LPAREN | T_RPAREN | T_COMMA | T_MINUS | T_DOT_LIDENT | T_DOT_INT | T_COLON | T_SEMI | T_LBRACKET | T_PLUS | T_RBRACKET | T_BAR | T_LBRACE | T_RBRACE | T_AMPERAMPER | T_AMPER | T_CARET | T_BARBAR | T_AS | T_PIPE | T_PIPE_LEFT | T_LT_PLUS | T_DOTDOT | T_RANGE_INCLUSIVE | T_RANGE_LT_INCLUSIVE | T_RANGE_EXCLUSIVE | T_RANGE_INCLUSIVE_REV | T_RANGE_EXCLUSIVE_REV | T_IS | T_AND | T_IMPLIES | T_LEXMATCH_QUESTION => Reduce(3, NT_arrow_fn_prefix_no_constraint, yy_action_435) + T_SEMI => Shift(yy_state_1133) + T_IF | T_FAT_ARROW => Reduce(2, NT_foreach_optional_loop_vars_infix, yy_action_431) _ => Error } } -fn yy_state_779(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1133(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_COLON => Shift(yy_state_479) - T_FAT_ARROW => Shift(yy_state_588) - T_COMMA => Shift(yy_state_775) - T_RPAREN => Shift(yy_state_780) - T_INFIX1 | T_INFIX2 | T_INFIX3 | T_INFIX4 | T_CATCH | T_EQ_TILDE | T_LPAREN | T_MINUS | T_DOT_LIDENT | T_DOT_INT | T_LBRACKET | T_PLUS | T_BAR | T_AMPERAMPER | T_AMPER | T_CARET | T_BARBAR | T_AS | T_PIPE | T_PIPE_LEFT | T_LT_PLUS | T_DOTDOT | T_RANGE_INCLUSIVE | T_RANGE_LT_INCLUSIVE | T_RANGE_EXCLUSIVE | T_RANGE_INCLUSIVE_REV | T_RANGE_EXCLUSIVE_REV | T_IS | T_IMPLIES | T_LEXMATCH_QUESTION => Reduce(1, NT_qual_ident_simple_expr, yy_action_772) + NT_non_empty_list_commas_rev_separated_pair_binder_EQUAL_infix_expr__ => Shift(yy_state_43) + NT_non_empty_list_commas_no_trailing_separated_pair_binder_EQUAL_infix_expr__ => Shift(yy_state_1111) + T_EXTEND => Shift(yy_state_1126) + T_LIDENT => Shift(yy_state_1129) + NT_for_binders_infix => Shift(yy_state_1134) + NT_list_commas_no_trailing_separated_pair_binder_EQUAL_infix_expr__ => Shift(yy_state_1135) + T_IF | T_FAT_ARROW => Reduce(0, NT_list_commas_no_trailing_separated_pair_binder_EQUAL_infix_expr__, yy_action_1036) _ => Error } } -fn yy_state_780(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1134(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(4, NT_foreach_optional_loop_vars_infix, yy_action_430) +} + +fn yy_state_1135(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_for_binders_infix, yy_action_429) +} + +fn yy_state_1136(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_FAT_ARROW => Reduce(2, NT_arrow_fn_prefix, yy_action_581) - T_INFIX1 | T_INFIX2 | T_INFIX3 | T_INFIX4 | T_EOF | T_CATCH | T_EQ_TILDE | T_LPAREN | T_RPAREN | T_COMMA | T_MINUS | T_DOT_LIDENT | T_DOT_INT | T_COLON | T_SEMI | T_LBRACKET | T_PLUS | T_RBRACKET | T_BAR | T_LBRACE | T_RBRACE | T_AMPERAMPER | T_AMPER | T_CARET | T_BARBAR | T_AS | T_PIPE | T_PIPE_LEFT | T_LT_PLUS | T_DOTDOT | T_RANGE_INCLUSIVE | T_RANGE_LT_INCLUSIVE | T_RANGE_EXCLUSIVE | T_RANGE_INCLUSIVE_REV | T_RANGE_EXCLUSIVE_REV | T_IS | T_AND | T_IMPLIES | T_LEXMATCH_QUESTION => Reduce(2, NT_arrow_fn_prefix_no_constraint, yy_action_433) + T_EQUAL => Shift(yy_state_1127) + T_COMMA | T_IN => Reduce(1, NT_foreach_binder, yy_action_646) _ => Error } } -fn yy_state_781(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1137(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_FAT_ARROW => Shift(yy_state_782) - T_INFIX1 | T_INFIX2 | T_INFIX3 | T_INFIX4 | T_EOF | T_CATCH | T_EQ_TILDE | T_LPAREN | T_RPAREN | T_COMMA | T_MINUS | T_DOT_LIDENT | T_DOT_INT | T_COLON | T_SEMI | T_LBRACKET | T_PLUS | T_RBRACKET | T_BAR | T_LBRACE | T_RBRACE | T_AMPERAMPER | T_AMPER | T_CARET | T_BARBAR | T_AS | T_PIPE | T_PIPE_LEFT | T_LT_PLUS | T_DOTDOT | T_RANGE_INCLUSIVE | T_RANGE_LT_INCLUSIVE | T_RANGE_EXCLUSIVE | T_RANGE_INCLUSIVE_REV | T_RANGE_EXCLUSIVE_REV | T_IS | T_AND | T_IMPLIES | T_LEXMATCH_QUESTION => Reduce(1, NT_qual_ident_simple_expr, yy_action_772) + T_EQUAL => Shift(yy_state_1130) + T_COMMA | T_IN => Reduce(1, NT_foreach_binder, yy_action_645) _ => Error } } -fn yy_state_782(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1138(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACE => Shift(yy_state_783) + T_SEMI => Shift(yy_state_1139) + T_IF | T_FAT_ARROW => Reduce(1, NT_list_comp_for_header, yy_action_428) _ => Error } } -fn yy_state_783(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1139(_lookahead : YYSymbol) -> YYDecision { match _lookahead { NT_multiline_string => Shift(yy_state_2) T_MULTILINE_INTERP => Shift(yy_state_4) @@ -27780,237 +37784,133 @@ fn yy_state_783(_lookahead : YYSymbol) -> YYDecision { T_BYTE => Shift(yy_state_13) T_FALSE => Shift(yy_state_14) T_TRUE => Shift(yy_state_15) - T_INTERP => Shift(yy_state_16) - NT_non_empty_list_multiline_string_ => Shift(yy_state_17) - NT_simple_constant => Shift(yy_state_18) - T_AMPER => Shift(yy_state_19) - NT_qual_ident_ty => Shift(yy_state_25) - NT_tuple_expr => Shift(yy_state_26) - T_LBRACKET => Shift(yy_state_27) - NT_constr => Shift(yy_state_35) - NT_qual_ident_simple_expr => Shift(yy_state_36) - NT_atomic_expr => Shift(yy_state_37) - NT_anony_fn => Shift(yy_state_38) - T_LBRACE => Shift(yy_state_39) - NT_statement => Shift(yy_state_121) - NT_non_empty_list_semi_rev_aux_statement_ => Shift(yy_state_122) - NT_type_name => Shift(yy_state_126) - T_EXCLAMATION => Shift(yy_state_162) - T_MINUS => Shift(yy_state_178) - T_PLUS => Shift(yy_state_180) - T_UIDENT => Shift(yy_state_182) - NT_prefix_expr => Shift(yy_state_187) - NT_range_expr => Shift(yy_state_198) - NT_postfix_expr => Shift(yy_state_416) - T_EXISTS => Shift(yy_state_417) - T_FORALL => Shift(yy_state_449) - NT_infix_expr => Shift(yy_state_455) - T_UNDERSCORE => Shift(yy_state_456) - NT_qual_ident => Shift(yy_state_458) - NT_simple_expr => Shift(yy_state_459) - T_LPAREN => Shift(yy_state_464) - NT_pipe_expr => Shift(yy_state_497) - NT_non_empty_list_semis_rev_statement_ => Shift(yy_state_510) - NT_arrow_fn_expr => Shift(yy_state_513) - NT_quantifier_expr => Shift(yy_state_514) - NT_simple_try_expr => Shift(yy_state_515) - NT_lexmatch_expr => Shift(yy_state_516) - NT_match_expr => Shift(yy_state_517) - NT_if_expr => Shift(yy_state_518) - NT_try_expr => Shift(yy_state_519) - NT_while_expr => Shift(yy_state_520) - NT_foreach_expr => Shift(yy_state_521) - NT_for_expr => Shift(yy_state_522) - T_LEXMATCH => Shift(yy_state_523) - NT_lexmatch_header => Shift(yy_state_529) - NT_match_header => Shift(yy_state_540) - T_MATCH => Shift(yy_state_550) - T_IF => Shift(yy_state_553) - T_TRY_EXCLAMATION => Shift(yy_state_559) - T_TRY_QUESTION => Shift(yy_state_561) - T_TRY => Shift(yy_state_563) - NT_loop_label_colon => Shift(yy_state_577) - T_POST_LABEL => Shift(yy_state_585) - NT_expr => Shift(yy_state_590) - NT_left_value => Shift(yy_state_591) - T_ELLIPSIS => Shift(yy_state_598) - T_RAISE => Shift(yy_state_599) - T_PACKAGE_NAME => Shift(yy_state_601) - T_LIDENT => Shift(yy_state_603) - NT_expr_statement_no_break_continue_return => Shift(yy_state_662) - T_RETURN => Shift(yy_state_663) - T_CONTINUE => Shift(yy_state_666) - T_BREAK => Shift(yy_state_675) - T_GUARD => Shift(yy_state_688) - NT_expr_statement => Shift(yy_state_692) - T_PROOF_LET => Shift(yy_state_693) - T_PROOF_ASSERT => Shift(yy_state_697) - T_DEFER => Shift(yy_state_699) - NT_guard_statement => Shift(yy_state_701) - T_FN => Shift(yy_state_702) - T_ASYNC => Shift(yy_state_707) - T_LETREC => Shift(yy_state_713) - T_LET => Shift(yy_state_744) - NT_list_semis_rev_statement_ => Shift(yy_state_784) - T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_902) - T_RBRACE => Reduce(0, NT_list_semis_rev_statement_, yy_action_817) - _ => Error - } -} - -fn yy_state_784(_lookahead : YYSymbol) -> YYDecision { - match _lookahead { - T_RBRACE => Shift(yy_state_785) - _ => Error - } -} - -fn yy_state_785(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(5, NT_arrow_fn_with_explicit_braces, yy_action_432) -} - -fn yy_state_786(_lookahead : YYSymbol) -> YYDecision { - match _lookahead { - T_AMPER => Shift(yy_state_19) - NT_qual_ident_ty => Shift(yy_state_25) - T_UIDENT => Shift(yy_state_182) - T_LBRACE => Shift(yy_state_275) - T_LBRACKET => Shift(yy_state_279) - T_LPAREN => Shift(yy_state_293) - NT_constr => Shift(yy_state_294) - T_LIDENT => Shift(yy_state_307) - T_UNDERSCORE => Shift(yy_state_312) - T_BYTES => Shift(yy_state_313) - T_STRING => Shift(yy_state_314) - T_MINUS => Shift(yy_state_315) - T_FLOAT => Shift(yy_state_319) - T_DOUBLE => Shift(yy_state_320) - T_BYTE => Shift(yy_state_321) - T_INT => Shift(yy_state_322) - T_CHAR => Shift(yy_state_323) - T_FALSE => Shift(yy_state_324) - T_TRUE => Shift(yy_state_325) - NT_simple_pattern => Shift(yy_state_326) - NT_type_name => Shift(yy_state_329) - T_PACKAGE_NAME => Shift(yy_state_334) - NT_range_pattern => Shift(yy_state_337) - NT_or_pattern => Shift(yy_state_340) - NT_single_pattern_case => Shift(yy_state_541) - T_ELLIPSIS => Shift(yy_state_544) - NT_pattern => Shift(yy_state_545) - NT_non_empty_list_semis_single_pattern_case_ => Shift(yy_state_566) - NT_list_semis_single_pattern_case_ => Shift(yy_state_573) - NT_single_pattern_cases => Shift(yy_state_787) - T_RBRACE => Reduce(0, NT_list_semis_single_pattern_case_, yy_action_538) + T_BYTES_INTERP => Shift(yy_state_16) + T_INTERP => Shift(yy_state_17) + NT_non_empty_list_multiline_string_ => Shift(yy_state_18) + NT_simple_constant => Shift(yy_state_19) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + NT_tuple_expr => Shift(yy_state_27) + T_LBRACKET_BAR => Shift(yy_state_28) + T_LBRACKET => Shift(yy_state_36) + NT_constr => Shift(yy_state_47) + NT_qual_ident_simple_expr => Shift(yy_state_48) + T_UNDERSCORE => Shift(yy_state_49) + NT_atomic_expr => Shift(yy_state_50) + NT_anony_fn => Shift(yy_state_51) + T_LBRACE => Shift(yy_state_52) + T_FN => Shift(yy_state_61) + NT_type_name => Shift(yy_state_139) + T_ASYNC => Shift(yy_state_152) + NT_simple_expr => Shift(yy_state_165) + T_EXCLAMATION => Shift(yy_state_176) + T_LPAREN => Shift(yy_state_177) + T_MINUS => Shift(yy_state_191) + T_PLUS => Shift(yy_state_193) + T_UIDENT => Shift(yy_state_195) + T_PACKAGE_NAME => Shift(yy_state_196) + T_EXTEND => Shift(yy_state_199) + T_LIDENT => Shift(yy_state_200) + NT_prefix_expr => Shift(yy_state_201) + NT_range_expr => Shift(yy_state_212) + NT_postfix_expr => Shift(yy_state_223) + NT_infix_expr => Shift(yy_state_1140) + NT_option_infix_expr_ => Shift(yy_state_1141) + T_SEMI | T_IF | T_FAT_ARROW => Reduce(0, NT_option_infix_expr_, yy_action_621) _ => Error } } -fn yy_state_787(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1140(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RBRACE => Shift(yy_state_788) + T_BARBAR => Shift(yy_state_230) + T_AMPERAMPER => Shift(yy_state_232) + T_BAR => Shift(yy_state_234) + T_CARET => Shift(yy_state_236) + T_AMPER => Shift(yy_state_238) + T_MINUS => Shift(yy_state_240) + T_PLUS => Shift(yy_state_242) + T_INFIX1 => Shift(yy_state_244) + T_INFIX2 => Shift(yy_state_246) + T_INFIX3 => Shift(yy_state_248) + T_INFIX4 => Shift(yy_state_250) + T_IMPLIES => Shift(yy_state_252) + T_SEMI | T_IF | T_FAT_ARROW => Reduce(1, NT_option_infix_expr_, yy_action_620) _ => Error } } -fn yy_state_788(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1141(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_NORAISE => Shift(yy_state_789) - T_EOF | T_RPAREN | T_COMMA | T_COLON | T_SEMI | T_RBRACKET | T_LBRACE | T_RBRACE | T_AND => Reduce(4, NT_simple_try_expr, yy_action_431) + T_SEMI => Shift(yy_state_1142) + T_IF | T_FAT_ARROW => Reduce(3, NT_list_comp_for_header, yy_action_427) _ => Error } } -fn yy_state_789(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1142(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACE => Shift(yy_state_790) + NT_non_empty_list_commas_rev_separated_pair_binder_EQUAL_infix_expr__ => Shift(yy_state_43) + NT_non_empty_list_commas_no_trailing_separated_pair_binder_EQUAL_infix_expr__ => Shift(yy_state_1111) + T_EXTEND => Shift(yy_state_1126) + T_LIDENT => Shift(yy_state_1129) + NT_list_commas_no_trailing_separated_pair_binder_EQUAL_infix_expr__ => Shift(yy_state_1135) + NT_for_binders_infix => Shift(yy_state_1143) + T_IF | T_FAT_ARROW => Reduce(0, NT_list_commas_no_trailing_separated_pair_binder_EQUAL_infix_expr__, yy_action_1036) _ => Error } } -fn yy_state_790(_lookahead : YYSymbol) -> YYDecision { - match _lookahead { - T_AMPER => Shift(yy_state_19) - NT_qual_ident_ty => Shift(yy_state_25) - T_UIDENT => Shift(yy_state_182) - T_LBRACE => Shift(yy_state_275) - T_LBRACKET => Shift(yy_state_279) - T_LPAREN => Shift(yy_state_293) - NT_constr => Shift(yy_state_294) - T_LIDENT => Shift(yy_state_307) - T_UNDERSCORE => Shift(yy_state_312) - T_BYTES => Shift(yy_state_313) - T_STRING => Shift(yy_state_314) - T_MINUS => Shift(yy_state_315) - T_FLOAT => Shift(yy_state_319) - T_DOUBLE => Shift(yy_state_320) - T_BYTE => Shift(yy_state_321) - T_INT => Shift(yy_state_322) - T_CHAR => Shift(yy_state_323) - T_FALSE => Shift(yy_state_324) - T_TRUE => Shift(yy_state_325) - NT_simple_pattern => Shift(yy_state_326) - NT_type_name => Shift(yy_state_329) - T_PACKAGE_NAME => Shift(yy_state_334) - NT_range_pattern => Shift(yy_state_337) - NT_or_pattern => Shift(yy_state_340) - NT_single_pattern_case => Shift(yy_state_541) - T_ELLIPSIS => Shift(yy_state_544) - NT_pattern => Shift(yy_state_545) - NT_non_empty_list_semis_single_pattern_case_ => Shift(yy_state_566) - NT_list_semis_single_pattern_case_ => Shift(yy_state_573) - NT_single_pattern_cases => Shift(yy_state_791) - T_RBRACE => Reduce(0, NT_list_semis_single_pattern_case_, yy_action_538) - _ => Error - } +fn yy_state_1143(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(5, NT_list_comp_for_header, yy_action_426) } -fn yy_state_791(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1144(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RBRACE => Shift(yy_state_792) + T_BAR_RBRACKET => Shift(yy_state_1145) _ => Error } } -fn yy_state_792(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(8, NT_simple_try_expr, yy_action_429) -} - -fn yy_state_793(_lookahead : YYSymbol) -> YYDecision { - match _lookahead { - T_FAT_ARROW => Shift(yy_state_722) - T_INFIX1 | T_INFIX2 | T_INFIX3 | T_INFIX4 | T_EOF | T_CATCH | T_EQ_TILDE | T_LPAREN | T_RPAREN | T_COMMA | T_MINUS | T_DOT_LIDENT | T_DOT_INT | T_COLON | T_SEMI | T_LBRACKET | T_PLUS | T_RBRACKET | T_BAR | T_LBRACE | T_RBRACE | T_AMPERAMPER | T_AMPER | T_CARET | T_BARBAR | T_AS | T_PIPE | T_PIPE_LEFT | T_LT_PLUS | T_DOTDOT | T_RANGE_INCLUSIVE | T_RANGE_LT_INCLUSIVE | T_RANGE_EXCLUSIVE | T_RANGE_INCLUSIVE_REV | T_RANGE_EXCLUSIVE_REV | T_IS | T_AND | T_IMPLIES | T_LEXMATCH_QUESTION => Reduce(2, NT_tuple_expr, yy_action_789) - _ => Error - } +fn yy_state_1145(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_simple_expr, yy_action_425) } -fn yy_state_794(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1146(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_COLON => Shift(yy_state_586) - T_RPAREN | T_COMMA => Reduce(1, NT_argument, yy_action_428) + NT_foreach_binder => Shift(yy_state_42) + NT_non_empty_list_commas_rev_separated_pair_binder_EQUAL_infix_expr__ => Shift(yy_state_43) + NT_non_empty_list_commas_rev_foreach_binder_ => Shift(yy_state_665) + T_UNDERSCORE => Shift(yy_state_668) + NT_non_empty_list_commas_no_trailing_separated_pair_binder_EQUAL_infix_expr__ => Shift(yy_state_1111) + NT_list_commas_no_trailing_separated_pair_binder_EQUAL_infix_expr__ => Shift(yy_state_1135) + T_EXTEND => Shift(yy_state_1136) + T_LIDENT => Shift(yy_state_1137) + NT_for_binders_infix => Shift(yy_state_1138) + NT_list_comp_for_header => Shift(yy_state_1147) + NT_non_empty_list_commas_foreach_binder_ => Shift(yy_state_1152) + T_SEMI | T_IF | T_FAT_ARROW => Reduce(0, NT_list_commas_no_trailing_separated_pair_binder_EQUAL_infix_expr__, yy_action_1036) _ => Error } } -fn yy_state_795(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1147(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_FAT_ARROW => Shift(yy_state_588) - NT_optional_question => Shift(yy_state_796) - T_QUESTION => Shift(yy_state_799) - T_EQUAL => Reduce(0, NT_optional_question, yy_action_427) - T_INFIX1 | T_INFIX2 | T_INFIX3 | T_INFIX4 | T_CATCH | T_EQ_TILDE | T_LPAREN | T_RPAREN | T_COMMA | T_MINUS | T_DOT_LIDENT | T_DOT_INT | T_LBRACKET | T_PLUS | T_BAR | T_AMPERAMPER | T_AMPER | T_CARET | T_BARBAR | T_AS | T_PIPE | T_PIPE_LEFT | T_LT_PLUS | T_DOTDOT | T_RANGE_INCLUSIVE | T_RANGE_LT_INCLUSIVE | T_RANGE_EXCLUSIVE | T_RANGE_INCLUSIVE_REV | T_RANGE_EXCLUSIVE_REV | T_IS | T_IMPLIES | T_LEXMATCH_QUESTION => Reduce(1, NT_qual_ident_simple_expr, yy_action_772) + T_IF => Shift(yy_state_601) + NT_option_preceded_IF_infix_expr__ => Shift(yy_state_1148) + T_FAT_ARROW => Reduce(0, NT_option_preceded_IF_infix_expr__, yy_action_685) _ => Error } } -fn yy_state_796(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1148(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_EQUAL => Shift(yy_state_797) + T_FAT_ARROW => Shift(yy_state_1149) _ => Error } } -fn yy_state_797(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1149(_lookahead : YYSymbol) -> YYDecision { match _lookahead { NT_multiline_string => Shift(yy_state_2) T_MULTILINE_INTERP => Shift(yy_state_4) @@ -28025,76 +37925,88 @@ fn yy_state_797(_lookahead : YYSymbol) -> YYDecision { T_BYTE => Shift(yy_state_13) T_FALSE => Shift(yy_state_14) T_TRUE => Shift(yy_state_15) - T_INTERP => Shift(yy_state_16) - NT_non_empty_list_multiline_string_ => Shift(yy_state_17) - NT_simple_constant => Shift(yy_state_18) - T_AMPER => Shift(yy_state_19) - NT_qual_ident_ty => Shift(yy_state_25) - NT_tuple_expr => Shift(yy_state_26) - T_LBRACKET => Shift(yy_state_27) - NT_constr => Shift(yy_state_35) - NT_qual_ident_simple_expr => Shift(yy_state_36) - NT_atomic_expr => Shift(yy_state_37) - NT_anony_fn => Shift(yy_state_38) - T_LBRACE => Shift(yy_state_39) - T_FN => Shift(yy_state_48) - NT_type_name => Shift(yy_state_126) - T_ASYNC => Shift(yy_state_138) - NT_simple_expr => Shift(yy_state_151) - T_EXCLAMATION => Shift(yy_state_162) - T_MINUS => Shift(yy_state_178) - T_PLUS => Shift(yy_state_180) - T_UIDENT => Shift(yy_state_182) - T_PACKAGE_NAME => Shift(yy_state_183) - NT_prefix_expr => Shift(yy_state_187) - NT_range_expr => Shift(yy_state_198) - NT_postfix_expr => Shift(yy_state_416) - T_EXISTS => Shift(yy_state_417) - T_FORALL => Shift(yy_state_449) - NT_infix_expr => Shift(yy_state_455) - T_UNDERSCORE => Shift(yy_state_456) - T_LPAREN => Shift(yy_state_464) - NT_pipe_expr => Shift(yy_state_497) - NT_arrow_fn_expr => Shift(yy_state_513) - NT_quantifier_expr => Shift(yy_state_514) - NT_simple_try_expr => Shift(yy_state_515) - NT_lexmatch_expr => Shift(yy_state_516) - NT_match_expr => Shift(yy_state_517) - NT_if_expr => Shift(yy_state_518) - NT_try_expr => Shift(yy_state_519) - NT_while_expr => Shift(yy_state_520) - NT_foreach_expr => Shift(yy_state_521) - NT_for_expr => Shift(yy_state_522) - T_LEXMATCH => Shift(yy_state_523) - NT_lexmatch_header => Shift(yy_state_529) - NT_match_header => Shift(yy_state_540) - T_MATCH => Shift(yy_state_550) - T_IF => Shift(yy_state_553) - T_TRY_EXCLAMATION => Shift(yy_state_559) - T_TRY_QUESTION => Shift(yy_state_561) - T_TRY => Shift(yy_state_563) - NT_loop_label_colon => Shift(yy_state_577) - T_POST_LABEL => Shift(yy_state_585) - T_LIDENT => Shift(yy_state_587) - NT_expr => Shift(yy_state_798) - T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_902) + T_BYTES_INTERP => Shift(yy_state_16) + T_INTERP => Shift(yy_state_17) + NT_non_empty_list_multiline_string_ => Shift(yy_state_18) + NT_simple_constant => Shift(yy_state_19) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + NT_tuple_expr => Shift(yy_state_27) + T_LBRACKET_BAR => Shift(yy_state_28) + T_LBRACKET => Shift(yy_state_36) + NT_constr => Shift(yy_state_47) + NT_qual_ident_simple_expr => Shift(yy_state_48) + NT_atomic_expr => Shift(yy_state_50) + NT_anony_fn => Shift(yy_state_51) + T_LBRACE => Shift(yy_state_52) + T_FN => Shift(yy_state_61) + NT_type_name => Shift(yy_state_139) + T_ASYNC => Shift(yy_state_152) + NT_simple_expr => Shift(yy_state_165) + T_EXCLAMATION => Shift(yy_state_176) + T_MINUS => Shift(yy_state_191) + T_PLUS => Shift(yy_state_193) + T_UIDENT => Shift(yy_state_195) + T_PACKAGE_NAME => Shift(yy_state_196) + NT_prefix_expr => Shift(yy_state_201) + NT_range_expr => Shift(yy_state_212) + NT_postfix_expr => Shift(yy_state_223) + T_EXISTS => Shift(yy_state_224) + T_FORALL => Shift(yy_state_256) + NT_infix_expr => Shift(yy_state_272) + T_UNDERSCORE => Shift(yy_state_273) + T_LPAREN => Shift(yy_state_281) + NT_pipe_expr => Shift(yy_state_325) + NT_arrow_fn_expr => Shift(yy_state_344) + NT_quantifier_expr => Shift(yy_state_345) + NT_simple_try_expr => Shift(yy_state_346) + NT_lexscan_expr => Shift(yy_state_347) + NT_lexmatch_expr => Shift(yy_state_348) + NT_match_expr => Shift(yy_state_349) + NT_if_expr => Shift(yy_state_350) + NT_try_expr => Shift(yy_state_351) + NT_while_expr => Shift(yy_state_352) + NT_foreach_expr => Shift(yy_state_353) + NT_for_expr => Shift(yy_state_354) + T_LEXSCAN => Shift(yy_state_355) + NT_lexscan_header => Shift(yy_state_358) + T_LEXMATCH => Shift(yy_state_391) + NT_lexmatch_header => Shift(yy_state_399) + NT_match_header => Shift(yy_state_444) + T_MATCH => Shift(yy_state_605) + T_IF => Shift(yy_state_608) + T_TRY_EXCLAMATION => Shift(yy_state_614) + T_TRY_QUESTION => Shift(yy_state_616) + T_TRY => Shift(yy_state_618) + NT_loop_label_colon => Shift(yy_state_632) + T_POST_LABEL => Shift(yy_state_639) + T_EXTEND => Shift(yy_state_641) + T_LIDENT => Shift(yy_state_648) + NT_expr => Shift(yy_state_1150) + T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_1071) _ => Error } } -fn yy_state_798(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(4, NT_argument, yy_action_425) +fn yy_state_1150(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_BAR_RBRACKET => Shift(yy_state_1151) + _ => Error + } } -fn yy_state_799(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1151(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(7, NT_simple_expr, yy_action_424) +} + +fn yy_state_1152(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_EQUAL => Reduce(1, NT_optional_question, yy_action_424) - T_RPAREN | T_COMMA => Reduce(2, NT_argument, yy_action_423) + T_IN => Shift(yy_state_1153) _ => Error } } -fn yy_state_800(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1153(_lookahead : YYSymbol) -> YYDecision { match _lookahead { NT_multiline_string => Shift(yy_state_2) T_MULTILINE_INTERP => Shift(yy_state_4) @@ -28109,73 +38021,79 @@ fn yy_state_800(_lookahead : YYSymbol) -> YYDecision { T_BYTE => Shift(yy_state_13) T_FALSE => Shift(yy_state_14) T_TRUE => Shift(yy_state_15) - T_INTERP => Shift(yy_state_16) - NT_non_empty_list_multiline_string_ => Shift(yy_state_17) - NT_simple_constant => Shift(yy_state_18) - T_AMPER => Shift(yy_state_19) - NT_qual_ident_ty => Shift(yy_state_25) - NT_tuple_expr => Shift(yy_state_26) - T_LBRACKET => Shift(yy_state_27) - NT_constr => Shift(yy_state_35) - NT_qual_ident_simple_expr => Shift(yy_state_36) - NT_atomic_expr => Shift(yy_state_37) - NT_anony_fn => Shift(yy_state_38) - T_LBRACE => Shift(yy_state_39) - T_FN => Shift(yy_state_48) - NT_type_name => Shift(yy_state_126) - T_ASYNC => Shift(yy_state_138) - NT_simple_expr => Shift(yy_state_151) - T_EXCLAMATION => Shift(yy_state_162) - T_MINUS => Shift(yy_state_178) - T_PLUS => Shift(yy_state_180) - T_UIDENT => Shift(yy_state_182) - T_PACKAGE_NAME => Shift(yy_state_183) - NT_prefix_expr => Shift(yy_state_187) - NT_range_expr => Shift(yy_state_198) - NT_postfix_expr => Shift(yy_state_416) - T_EXISTS => Shift(yy_state_417) - T_FORALL => Shift(yy_state_449) - NT_infix_expr => Shift(yy_state_455) - T_UNDERSCORE => Shift(yy_state_456) - T_LPAREN => Shift(yy_state_464) - NT_pipe_expr => Shift(yy_state_497) - NT_arrow_fn_expr => Shift(yy_state_513) - NT_quantifier_expr => Shift(yy_state_514) - NT_simple_try_expr => Shift(yy_state_515) - NT_lexmatch_expr => Shift(yy_state_516) - NT_match_expr => Shift(yy_state_517) - NT_if_expr => Shift(yy_state_518) - NT_try_expr => Shift(yy_state_519) - NT_while_expr => Shift(yy_state_520) - NT_foreach_expr => Shift(yy_state_521) - NT_for_expr => Shift(yy_state_522) - T_LEXMATCH => Shift(yy_state_523) - NT_lexmatch_header => Shift(yy_state_529) - NT_match_header => Shift(yy_state_540) - T_MATCH => Shift(yy_state_550) - T_IF => Shift(yy_state_553) - T_TRY_EXCLAMATION => Shift(yy_state_559) - T_TRY_QUESTION => Shift(yy_state_561) - T_TRY => Shift(yy_state_563) - NT_loop_label_colon => Shift(yy_state_577) - T_POST_LABEL => Shift(yy_state_585) - T_LIDENT => Shift(yy_state_587) - NT_option_expr_ => Shift(yy_state_801) - NT_expr => Shift(yy_state_805) - T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_902) - T_COLON => Reduce(0, NT_option_expr_, yy_action_484) + T_BYTES_INTERP => Shift(yy_state_16) + T_INTERP => Shift(yy_state_17) + NT_non_empty_list_multiline_string_ => Shift(yy_state_18) + NT_simple_constant => Shift(yy_state_19) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + NT_tuple_expr => Shift(yy_state_27) + T_LBRACKET_BAR => Shift(yy_state_28) + T_LBRACKET => Shift(yy_state_36) + NT_constr => Shift(yy_state_47) + NT_qual_ident_simple_expr => Shift(yy_state_48) + T_UNDERSCORE => Shift(yy_state_49) + NT_atomic_expr => Shift(yy_state_50) + NT_anony_fn => Shift(yy_state_51) + T_LBRACE => Shift(yy_state_52) + T_FN => Shift(yy_state_61) + NT_type_name => Shift(yy_state_139) + T_ASYNC => Shift(yy_state_152) + NT_simple_expr => Shift(yy_state_165) + T_EXCLAMATION => Shift(yy_state_176) + T_LPAREN => Shift(yy_state_177) + T_MINUS => Shift(yy_state_191) + T_PLUS => Shift(yy_state_193) + T_UIDENT => Shift(yy_state_195) + T_PACKAGE_NAME => Shift(yy_state_196) + T_EXTEND => Shift(yy_state_199) + T_LIDENT => Shift(yy_state_200) + NT_prefix_expr => Shift(yy_state_201) + NT_range_expr => Shift(yy_state_212) + NT_postfix_expr => Shift(yy_state_223) + NT_infix_expr => Shift(yy_state_1154) _ => Error } } -fn yy_state_801(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1154(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_COLON => Shift(yy_state_802) + T_BARBAR => Shift(yy_state_230) + T_AMPERAMPER => Shift(yy_state_232) + T_BAR => Shift(yy_state_234) + T_CARET => Shift(yy_state_236) + T_AMPER => Shift(yy_state_238) + T_MINUS => Shift(yy_state_240) + T_PLUS => Shift(yy_state_242) + T_INFIX1 => Shift(yy_state_244) + T_INFIX2 => Shift(yy_state_246) + T_INFIX3 => Shift(yy_state_248) + T_INFIX4 => Shift(yy_state_250) + T_IMPLIES => Shift(yy_state_252) + T_SEMI => Shift(yy_state_1125) + NT_foreach_optional_loop_vars_infix => Shift(yy_state_1155) + T_IF | T_FAT_ARROW => Reduce(0, NT_foreach_optional_loop_vars_infix, yy_action_437) _ => Error } } -fn yy_state_802(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1155(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_IF => Shift(yy_state_601) + NT_option_preceded_IF_infix_expr__ => Shift(yy_state_1156) + T_FAT_ARROW => Reduce(0, NT_option_preceded_IF_infix_expr__, yy_action_685) + _ => Error + } +} + +fn yy_state_1156(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_FAT_ARROW => Shift(yy_state_1157) + _ => Error + } +} + +fn yy_state_1157(_lookahead : YYSymbol) -> YYDecision { match _lookahead { NT_multiline_string => Shift(yy_state_2) T_MULTILINE_INTERP => Shift(yy_state_4) @@ -28190,11322 +38108,10980 @@ fn yy_state_802(_lookahead : YYSymbol) -> YYDecision { T_BYTE => Shift(yy_state_13) T_FALSE => Shift(yy_state_14) T_TRUE => Shift(yy_state_15) - T_INTERP => Shift(yy_state_16) - NT_non_empty_list_multiline_string_ => Shift(yy_state_17) - NT_simple_constant => Shift(yy_state_18) - T_AMPER => Shift(yy_state_19) - NT_qual_ident_ty => Shift(yy_state_25) - NT_tuple_expr => Shift(yy_state_26) - T_LBRACKET => Shift(yy_state_27) - NT_constr => Shift(yy_state_35) - NT_qual_ident_simple_expr => Shift(yy_state_36) - NT_atomic_expr => Shift(yy_state_37) - NT_anony_fn => Shift(yy_state_38) - T_LBRACE => Shift(yy_state_39) - T_FN => Shift(yy_state_48) - NT_type_name => Shift(yy_state_126) - T_ASYNC => Shift(yy_state_138) - NT_simple_expr => Shift(yy_state_151) - T_EXCLAMATION => Shift(yy_state_162) - T_MINUS => Shift(yy_state_178) - T_PLUS => Shift(yy_state_180) - T_UIDENT => Shift(yy_state_182) - T_PACKAGE_NAME => Shift(yy_state_183) - NT_prefix_expr => Shift(yy_state_187) - NT_range_expr => Shift(yy_state_198) - NT_postfix_expr => Shift(yy_state_416) - T_EXISTS => Shift(yy_state_417) - T_FORALL => Shift(yy_state_449) - NT_infix_expr => Shift(yy_state_455) - T_UNDERSCORE => Shift(yy_state_456) - T_LPAREN => Shift(yy_state_464) - NT_pipe_expr => Shift(yy_state_497) - NT_arrow_fn_expr => Shift(yy_state_513) - NT_quantifier_expr => Shift(yy_state_514) - NT_simple_try_expr => Shift(yy_state_515) - NT_lexmatch_expr => Shift(yy_state_516) - NT_match_expr => Shift(yy_state_517) - NT_if_expr => Shift(yy_state_518) - NT_try_expr => Shift(yy_state_519) - NT_while_expr => Shift(yy_state_520) - NT_foreach_expr => Shift(yy_state_521) - NT_for_expr => Shift(yy_state_522) - T_LEXMATCH => Shift(yy_state_523) - NT_lexmatch_header => Shift(yy_state_529) - NT_match_header => Shift(yy_state_540) - T_MATCH => Shift(yy_state_550) - T_IF => Shift(yy_state_553) - T_TRY_EXCLAMATION => Shift(yy_state_559) - T_TRY_QUESTION => Shift(yy_state_561) - T_TRY => Shift(yy_state_563) - NT_loop_label_colon => Shift(yy_state_577) - T_POST_LABEL => Shift(yy_state_585) - T_LIDENT => Shift(yy_state_587) - NT_expr => Shift(yy_state_664) - NT_option_expr_ => Shift(yy_state_803) - T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_902) - T_RBRACKET => Reduce(0, NT_option_expr_, yy_action_484) + T_BYTES_INTERP => Shift(yy_state_16) + T_INTERP => Shift(yy_state_17) + NT_non_empty_list_multiline_string_ => Shift(yy_state_18) + NT_simple_constant => Shift(yy_state_19) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + NT_tuple_expr => Shift(yy_state_27) + T_LBRACKET_BAR => Shift(yy_state_28) + T_LBRACKET => Shift(yy_state_36) + NT_constr => Shift(yy_state_47) + NT_qual_ident_simple_expr => Shift(yy_state_48) + NT_atomic_expr => Shift(yy_state_50) + NT_anony_fn => Shift(yy_state_51) + T_LBRACE => Shift(yy_state_52) + T_FN => Shift(yy_state_61) + NT_type_name => Shift(yy_state_139) + T_ASYNC => Shift(yy_state_152) + NT_simple_expr => Shift(yy_state_165) + T_EXCLAMATION => Shift(yy_state_176) + T_MINUS => Shift(yy_state_191) + T_PLUS => Shift(yy_state_193) + T_UIDENT => Shift(yy_state_195) + T_PACKAGE_NAME => Shift(yy_state_196) + NT_prefix_expr => Shift(yy_state_201) + NT_range_expr => Shift(yy_state_212) + NT_postfix_expr => Shift(yy_state_223) + T_EXISTS => Shift(yy_state_224) + T_FORALL => Shift(yy_state_256) + NT_infix_expr => Shift(yy_state_272) + T_UNDERSCORE => Shift(yy_state_273) + T_LPAREN => Shift(yy_state_281) + NT_pipe_expr => Shift(yy_state_325) + NT_arrow_fn_expr => Shift(yy_state_344) + NT_quantifier_expr => Shift(yy_state_345) + NT_simple_try_expr => Shift(yy_state_346) + NT_lexscan_expr => Shift(yy_state_347) + NT_lexmatch_expr => Shift(yy_state_348) + NT_match_expr => Shift(yy_state_349) + NT_if_expr => Shift(yy_state_350) + NT_try_expr => Shift(yy_state_351) + NT_while_expr => Shift(yy_state_352) + NT_foreach_expr => Shift(yy_state_353) + NT_for_expr => Shift(yy_state_354) + T_LEXSCAN => Shift(yy_state_355) + NT_lexscan_header => Shift(yy_state_358) + T_LEXMATCH => Shift(yy_state_391) + NT_lexmatch_header => Shift(yy_state_399) + NT_match_header => Shift(yy_state_444) + T_MATCH => Shift(yy_state_605) + T_IF => Shift(yy_state_608) + T_TRY_EXCLAMATION => Shift(yy_state_614) + T_TRY_QUESTION => Shift(yy_state_616) + T_TRY => Shift(yy_state_618) + NT_loop_label_colon => Shift(yy_state_632) + T_POST_LABEL => Shift(yy_state_639) + T_EXTEND => Shift(yy_state_641) + T_LIDENT => Shift(yy_state_648) + NT_expr => Shift(yy_state_1158) + T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_1071) _ => Error } } -fn yy_state_803(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1158(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RBRACKET => Shift(yy_state_804) + T_BAR_RBRACKET => Shift(yy_state_1159) _ => Error } } -fn yy_state_804(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(6, NT_simple_expr, yy_action_422) +fn yy_state_1159(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(10, NT_simple_expr, yy_action_423) } -fn yy_state_805(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1160(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RBRACKET => Shift(yy_state_806) - T_COLON => Reduce(1, NT_option_expr_, yy_action_483) + T_EOF => Shift(yy_state_1161) _ => Error } } -fn yy_state_806(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1161(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(2, NT_expression, yy_action_422) +} + +fn yy_state_1162(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_AUGMENTED_ASSIGNMENT | T_PLUS_EQUAL | T_EQUAL => Reduce(4, NT_left_value, yy_action_420) - T_INFIX1 | T_INFIX2 | T_INFIX3 | T_INFIX4 | T_EOF | T_CATCH | T_EQ_TILDE | T_LPAREN | T_RPAREN | T_COMMA | T_MINUS | T_DOT_LIDENT | T_DOT_INT | T_COLON | T_SEMI | T_LBRACKET | T_PLUS | T_RBRACKET | T_BAR | T_LBRACE | T_RBRACE | T_AMPERAMPER | T_AMPER | T_CARET | T_BARBAR | T_AS | T_PIPE | T_PIPE_LEFT | T_LT_PLUS | T_DOTDOT | T_RANGE_INCLUSIVE | T_RANGE_LT_INCLUSIVE | T_RANGE_EXCLUSIVE | T_RANGE_INCLUSIVE_REV | T_RANGE_EXCLUSIVE_REV | T_IS | T_AND | T_IMPLIES | T_LEXMATCH_QUESTION => Reduce(4, NT_simple_expr, yy_action_421) + NT_structure => Shift(yy_state_1163) + NT_structure_item => Shift(yy_state_1164) + T_ATTRIBUTE => Shift(yy_state_1168) + T_ENUM => Shift(yy_state_1170) + T_STRUCT => Shift(yy_state_1184) + T_SUBERROR => Shift(yy_state_1187) + T_TYPE => Shift(yy_state_1189) + T_USING => Shift(yy_state_1192) + T_ENUMVIEW => Shift(yy_state_1222) + T_IMPL => Shift(yy_state_1282) + T_TEST => Shift(yy_state_1312) + T_TRAIT => Shift(yy_state_1318) + NT_declare_fun_header => Shift(yy_state_1413) + NT_fun_header => Shift(yy_state_1414) + NT_extern_fun_header => Shift(yy_state_1423) + NT_val_header => Shift(yy_state_1428) + T_EXTENUM => Shift(yy_state_1431) + NT_enum_header => Shift(yy_state_1461) + NT_struct_header => Shift(yy_state_1466) + NT_suberror_header => Shift(yy_state_1590) + NT_type_header => Shift(yy_state_1596) + T_CONST => Shift(yy_state_1601) + T_LET => Shift(yy_state_1605) + T_EXTERN => Shift(yy_state_1612) + T_FN => Shift(yy_state_1627) + T_DECLARE => Shift(yy_state_1630) + NT_non_empty_list_attribute_ => Shift(yy_state_1775) + T_PUB => Shift(yy_state_2232) + T_PRIV => Shift(yy_state_2334) + NT_fun_header_generic => Shift(yy_state_2435) + T_ASYNC => Shift(yy_state_2438) + NT_non_empty_list_semis_structure_item_ => Shift(yy_state_2446) + NT_list_semis_structure_item_ => Shift(yy_state_2447) + T_EOF => Reduce(0, NT_list_semis_structure_item_, yy_action_421) _ => Error } } -fn yy_state_807(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1163(_lookahead : YYSymbol) -> YYDecision { + Accept +} + +fn yy_state_1164(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_AUGMENTED_ASSIGNMENT | T_PLUS_EQUAL | T_EQUAL => Reduce(2, NT_left_value, yy_action_418) - T_INFIX1 | T_INFIX2 | T_INFIX3 | T_INFIX4 | T_EOF | T_CATCH | T_EQ_TILDE | T_LPAREN | T_RPAREN | T_COMMA | T_MINUS | T_DOT_LIDENT | T_DOT_INT | T_COLON | T_SEMI | T_LBRACKET | T_PLUS | T_RBRACKET | T_BAR | T_LBRACE | T_RBRACE | T_AMPERAMPER | T_AMPER | T_CARET | T_BARBAR | T_AS | T_PIPE | T_PIPE_LEFT | T_LT_PLUS | T_DOTDOT | T_RANGE_INCLUSIVE | T_RANGE_LT_INCLUSIVE | T_RANGE_EXCLUSIVE | T_RANGE_INCLUSIVE_REV | T_RANGE_EXCLUSIVE_REV | T_IS | T_AND | T_IMPLIES | T_LEXMATCH_QUESTION => Reduce(2, NT_simple_expr, yy_action_796) + NT_option_SEMI_ => Shift(yy_state_1165) + T_SEMI => Shift(yy_state_1166) + T_EOF => Reduce(0, NT_option_SEMI_, yy_action_976) _ => Error } } -fn yy_state_808(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1165(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(2, NT_non_empty_list_semis_structure_item_, yy_action_420) +} + +fn yy_state_1166(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LPAREN => Shift(yy_state_809) - T_AUGMENTED_ASSIGNMENT | T_PLUS_EQUAL | T_EQUAL => Reduce(2, NT_left_value, yy_action_415) - T_INFIX1 | T_INFIX2 | T_INFIX3 | T_INFIX4 | T_EOF | T_CATCH | T_EQ_TILDE | T_RPAREN | T_COMMA | T_MINUS | T_DOT_LIDENT | T_DOT_INT | T_COLON | T_SEMI | T_LBRACKET | T_PLUS | T_RBRACKET | T_BAR | T_LBRACE | T_RBRACE | T_AMPERAMPER | T_AMPER | T_CARET | T_BARBAR | T_AS | T_PIPE | T_PIPE_LEFT | T_LT_PLUS | T_DOTDOT | T_RANGE_INCLUSIVE | T_RANGE_LT_INCLUSIVE | T_RANGE_EXCLUSIVE | T_RANGE_INCLUSIVE_REV | T_RANGE_EXCLUSIVE_REV | T_IS | T_AND | T_IMPLIES | T_LEXMATCH_QUESTION => Reduce(2, NT_simple_expr, yy_action_417) + NT_structure_item => Shift(yy_state_1164) + NT_non_empty_list_semis_structure_item_ => Shift(yy_state_1167) + T_ATTRIBUTE => Shift(yy_state_1168) + T_ENUM => Shift(yy_state_1170) + T_STRUCT => Shift(yy_state_1184) + T_SUBERROR => Shift(yy_state_1187) + T_TYPE => Shift(yy_state_1189) + T_USING => Shift(yy_state_1192) + T_ENUMVIEW => Shift(yy_state_1222) + T_IMPL => Shift(yy_state_1282) + T_TEST => Shift(yy_state_1312) + T_TRAIT => Shift(yy_state_1318) + NT_declare_fun_header => Shift(yy_state_1413) + NT_fun_header => Shift(yy_state_1414) + NT_extern_fun_header => Shift(yy_state_1423) + NT_val_header => Shift(yy_state_1428) + T_EXTENUM => Shift(yy_state_1431) + NT_enum_header => Shift(yy_state_1461) + NT_struct_header => Shift(yy_state_1466) + NT_suberror_header => Shift(yy_state_1590) + NT_type_header => Shift(yy_state_1596) + T_CONST => Shift(yy_state_1601) + T_LET => Shift(yy_state_1605) + T_EXTERN => Shift(yy_state_1612) + T_FN => Shift(yy_state_1627) + T_DECLARE => Shift(yy_state_1630) + NT_non_empty_list_attribute_ => Shift(yy_state_1775) + T_PUB => Shift(yy_state_2232) + T_PRIV => Shift(yy_state_2334) + NT_fun_header_generic => Shift(yy_state_2435) + T_ASYNC => Shift(yy_state_2438) + T_EOF => Reduce(1, NT_option_SEMI_, yy_action_974) _ => Error } } -fn yy_state_809(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1167(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_non_empty_list_semis_structure_item_, yy_action_419) +} + +fn yy_state_1168(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_multiline_string => Shift(yy_state_2) - T_MULTILINE_INTERP => Shift(yy_state_4) - T_MULTILINE_STRING => Shift(yy_state_5) - T_REGEX_LITERAL => Shift(yy_state_6) - T_STRING => Shift(yy_state_7) - T_FLOAT => Shift(yy_state_8) - T_DOUBLE => Shift(yy_state_9) - T_INT => Shift(yy_state_10) - T_CHAR => Shift(yy_state_11) - T_BYTES => Shift(yy_state_12) - T_BYTE => Shift(yy_state_13) - T_FALSE => Shift(yy_state_14) - T_TRUE => Shift(yy_state_15) - T_INTERP => Shift(yy_state_16) - NT_non_empty_list_multiline_string_ => Shift(yy_state_17) - NT_simple_constant => Shift(yy_state_18) - T_AMPER => Shift(yy_state_19) - NT_qual_ident_ty => Shift(yy_state_25) - NT_tuple_expr => Shift(yy_state_26) - T_LBRACKET => Shift(yy_state_27) - NT_constr => Shift(yy_state_35) - NT_qual_ident_simple_expr => Shift(yy_state_36) - NT_atomic_expr => Shift(yy_state_37) - NT_anony_fn => Shift(yy_state_38) - T_LBRACE => Shift(yy_state_39) - T_FN => Shift(yy_state_48) - NT_type_name => Shift(yy_state_126) - T_ASYNC => Shift(yy_state_138) - NT_simple_expr => Shift(yy_state_151) - NT_argument => Shift(yy_state_156) - NT_non_empty_list_commas_rev_argument_ => Shift(yy_state_157) - NT_expr => Shift(yy_state_161) - T_EXCLAMATION => Shift(yy_state_162) - T_MINUS => Shift(yy_state_178) - T_PLUS => Shift(yy_state_180) - T_UIDENT => Shift(yy_state_182) - T_PACKAGE_NAME => Shift(yy_state_183) - NT_prefix_expr => Shift(yy_state_187) - NT_range_expr => Shift(yy_state_198) - NT_postfix_expr => Shift(yy_state_416) - T_EXISTS => Shift(yy_state_417) - T_FORALL => Shift(yy_state_449) - NT_infix_expr => Shift(yy_state_455) - T_UNDERSCORE => Shift(yy_state_456) - NT_non_empty_list_commas_argument_ => Shift(yy_state_461) - T_LPAREN => Shift(yy_state_464) - NT_pipe_expr => Shift(yy_state_497) - NT_arrow_fn_expr => Shift(yy_state_513) - NT_quantifier_expr => Shift(yy_state_514) - NT_simple_try_expr => Shift(yy_state_515) - NT_lexmatch_expr => Shift(yy_state_516) - NT_match_expr => Shift(yy_state_517) - NT_if_expr => Shift(yy_state_518) - NT_try_expr => Shift(yy_state_519) - NT_while_expr => Shift(yy_state_520) - NT_foreach_expr => Shift(yy_state_521) - NT_for_expr => Shift(yy_state_522) - T_LEXMATCH => Shift(yy_state_523) - NT_lexmatch_header => Shift(yy_state_529) - NT_match_header => Shift(yy_state_540) - T_MATCH => Shift(yy_state_550) - T_IF => Shift(yy_state_553) - T_TRY_EXCLAMATION => Shift(yy_state_559) - T_TRY_QUESTION => Shift(yy_state_561) - T_TRY => Shift(yy_state_563) - NT_loop_label_colon => Shift(yy_state_577) - T_POST_LABEL => Shift(yy_state_794) - T_LIDENT => Shift(yy_state_795) - NT_list_commas_argument_ => Shift(yy_state_810) - T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_902) - T_RPAREN => Reduce(0, NT_list_commas_argument_, yy_action_795) + T_ATTRIBUTE => Shift(yy_state_1168) + NT_non_empty_list_attribute_ => Shift(yy_state_1169) + T_LIDENT | T_UIDENT | T_PUB | T_PRIV | T_EXTERN | T_STRUCT | T_ENUM | T_TRAIT | T_IMPL | T_ASYNC | T_FN | T_LET | T_CONST | T_USING | T_MUTABLE | T_TYPE | T_TEST | T_SUBERROR | T_ENUMVIEW | T_EXTENUM | T_DECLARE | T_EXTEND => Reduce(1, NT_non_empty_list_attribute_, yy_action_418) _ => Error } } -fn yy_state_810(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1169(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(2, NT_non_empty_list_attribute_, yy_action_416) +} + +fn yy_state_1170(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_UIDENT => Shift(yy_state_1171) + _ => Error + } +} + +fn yy_state_1171(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_LBRACKET => Shift(yy_state_1172) + NT_optional_type_parameters_no_constraints => Shift(yy_state_1182) + NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__ => Shift(yy_state_1183) + T_LBRACE => Reduce(0, NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__, yy_action_415) + _ => Error + } +} + +fn yy_state_1172(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + NT_type_decl_binder => Shift(yy_state_1173) + NT_non_empty_list_commas_id_type_decl_binder__ => Shift(yy_state_1174) + NT_non_empty_list_commas_rev_id_type_decl_binder__ => Shift(yy_state_1176) + T_UNDERSCORE => Shift(yy_state_1179) + T_UIDENT => Shift(yy_state_1180) + _ => Error + } +} + +fn yy_state_1173(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_non_empty_list_commas_rev_id_type_decl_binder__, yy_action_414) +} + +fn yy_state_1174(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_RBRACKET => Shift(yy_state_1175) + _ => Error + } +} + +fn yy_state_1175(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__, yy_action_412) +} + +fn yy_state_1176(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_COMMA => Shift(yy_state_1177) + NT_option_COMMA_ => Shift(yy_state_1181) + T_RBRACKET => Reduce(0, NT_option_COMMA_, yy_action_1044) + _ => Error + } +} + +fn yy_state_1177(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RPAREN => Shift(yy_state_811) + NT_type_decl_binder => Shift(yy_state_1178) + T_UNDERSCORE => Shift(yy_state_1179) + T_UIDENT => Shift(yy_state_1180) + T_RBRACKET => Reduce(1, NT_option_COMMA_, yy_action_1042) _ => Error } } -fn yy_state_811(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(5, NT_simple_expr, yy_action_414) +fn yy_state_1178(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_non_empty_list_commas_rev_id_type_decl_binder__, yy_action_410) +} + +fn yy_state_1179(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_type_decl_binder, yy_action_409) +} + +fn yy_state_1180(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_type_decl_binder, yy_action_408) +} + +fn yy_state_1181(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(2, NT_non_empty_list_commas_id_type_decl_binder__, yy_action_407) } -fn yy_state_812(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_arrow_fn_expr, yy_action_413) +fn yy_state_1182(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_enum_header, yy_action_406) } -fn yy_state_813(_lookahead : YYSymbol) -> YYDecision { - match _lookahead { - T_FAT_ARROW => Shift(yy_state_457) - T_COLON => Shift(yy_state_814) - T_COMMA => Shift(yy_state_817) - T_RPAREN => Shift(yy_state_820) - T_INFIX1 | T_INFIX2 | T_INFIX3 | T_INFIX4 | T_CATCH | T_EQ_TILDE | T_LPAREN | T_MINUS | T_DOT_LIDENT | T_DOT_INT | T_LBRACKET | T_PLUS | T_BAR | T_AMPERAMPER | T_AMPER | T_CARET | T_BARBAR | T_AS | T_PIPE | T_PIPE_LEFT | T_LT_PLUS | T_DOTDOT | T_RANGE_INCLUSIVE | T_RANGE_LT_INCLUSIVE | T_RANGE_EXCLUSIVE | T_RANGE_INCLUSIVE_REV | T_RANGE_EXCLUSIVE_REV | T_IS | T_IMPLIES | T_LEXMATCH_QUESTION => Reduce(1, NT_simple_expr, yy_action_790) - _ => Error - } +fn yy_state_1183(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_optional_type_parameters_no_constraints, yy_action_405) } -fn yy_state_814(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1184(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_ASYNC => Shift(yy_state_52) - T_UNDERSCORE => Shift(yy_state_57) - T_AMPER => Shift(yy_state_58) - T_PACKAGE_NAME => Shift(yy_state_60) - T_UIDENT => Shift(yy_state_67) - T_LPAREN => Shift(yy_state_71) - NT_simple_type => Shift(yy_state_97) - NT_type_ => Shift(yy_state_815) + T_UIDENT => Shift(yy_state_1185) _ => Error } } -fn yy_state_815(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1185(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RPAREN => Shift(yy_state_816) + T_LBRACKET => Shift(yy_state_1172) + NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__ => Shift(yy_state_1183) + NT_optional_type_parameters_no_constraints => Shift(yy_state_1186) + T_LPAREN | T_LBRACE => Reduce(0, NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__, yy_action_415) _ => Error } } -fn yy_state_816(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(5, NT_tuple_expr, yy_action_579) +fn yy_state_1186(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_struct_header, yy_action_404) } -fn yy_state_817(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1187(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_multiline_string => Shift(yy_state_2) - T_MULTILINE_INTERP => Shift(yy_state_4) - T_MULTILINE_STRING => Shift(yy_state_5) - T_REGEX_LITERAL => Shift(yy_state_6) - T_STRING => Shift(yy_state_7) - T_FLOAT => Shift(yy_state_8) - T_DOUBLE => Shift(yy_state_9) - T_INT => Shift(yy_state_10) - T_CHAR => Shift(yy_state_11) - T_BYTES => Shift(yy_state_12) - T_BYTE => Shift(yy_state_13) - T_FALSE => Shift(yy_state_14) - T_TRUE => Shift(yy_state_15) - T_INTERP => Shift(yy_state_16) - NT_non_empty_list_multiline_string_ => Shift(yy_state_17) - NT_simple_constant => Shift(yy_state_18) - T_AMPER => Shift(yy_state_19) - NT_qual_ident_ty => Shift(yy_state_25) - NT_tuple_expr => Shift(yy_state_26) - T_LBRACKET => Shift(yy_state_27) - NT_constr => Shift(yy_state_35) - NT_qual_ident_simple_expr => Shift(yy_state_36) - NT_atomic_expr => Shift(yy_state_37) - NT_anony_fn => Shift(yy_state_38) - T_LBRACE => Shift(yy_state_39) - T_FN => Shift(yy_state_48) - NT_type_name => Shift(yy_state_126) - T_ASYNC => Shift(yy_state_138) - NT_simple_expr => Shift(yy_state_151) - T_EXCLAMATION => Shift(yy_state_162) - NT_non_empty_tuple_elems => Shift(yy_state_168) - NT_expr => Shift(yy_state_176) - T_MINUS => Shift(yy_state_178) - T_PLUS => Shift(yy_state_180) - T_UIDENT => Shift(yy_state_182) - T_PACKAGE_NAME => Shift(yy_state_183) - NT_prefix_expr => Shift(yy_state_187) - NT_range_expr => Shift(yy_state_198) - NT_postfix_expr => Shift(yy_state_416) - T_EXISTS => Shift(yy_state_417) - T_FORALL => Shift(yy_state_449) - NT_infix_expr => Shift(yy_state_455) - T_LPAREN => Shift(yy_state_464) - NT_non_empty_tuple_elems_with_prefix => Shift(yy_state_492) - NT_arrow_fn_prefix_no_constraint => Shift(yy_state_493) - NT_pipe_expr => Shift(yy_state_497) - NT_arrow_fn_expr => Shift(yy_state_513) - NT_quantifier_expr => Shift(yy_state_514) - NT_simple_try_expr => Shift(yy_state_515) - NT_lexmatch_expr => Shift(yy_state_516) - NT_match_expr => Shift(yy_state_517) - NT_if_expr => Shift(yy_state_518) - NT_try_expr => Shift(yy_state_519) - NT_while_expr => Shift(yy_state_520) - NT_foreach_expr => Shift(yy_state_521) - NT_for_expr => Shift(yy_state_522) - T_LEXMATCH => Shift(yy_state_523) - NT_lexmatch_header => Shift(yy_state_529) - NT_match_header => Shift(yy_state_540) - T_MATCH => Shift(yy_state_550) - T_IF => Shift(yy_state_553) - T_TRY_EXCLAMATION => Shift(yy_state_559) - T_TRY_QUESTION => Shift(yy_state_561) - T_TRY => Shift(yy_state_563) - NT_loop_label_colon => Shift(yy_state_577) - T_POST_LABEL => Shift(yy_state_585) - T_RPAREN => Shift(yy_state_818) - T_UNDERSCORE => Shift(yy_state_819) - T_LIDENT => Shift(yy_state_821) - T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_902) + T_UIDENT => Shift(yy_state_1188) _ => Error } } -fn yy_state_818(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_arrow_fn_prefix_no_constraint, yy_action_576) +fn yy_state_1188(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(2, NT_suberror_header, yy_action_403) } -fn yy_state_819(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1189(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_FAT_ARROW => Shift(yy_state_457) - T_COMMA => Shift(yy_state_817) - T_RPAREN => Shift(yy_state_820) - T_INFIX1 | T_INFIX2 | T_INFIX3 | T_INFIX4 | T_CATCH | T_EQ_TILDE | T_LPAREN | T_MINUS | T_DOT_LIDENT | T_DOT_INT | T_LBRACKET | T_PLUS | T_BAR | T_AMPERAMPER | T_AMPER | T_CARET | T_BARBAR | T_AS | T_PIPE | T_PIPE_LEFT | T_LT_PLUS | T_DOTDOT | T_RANGE_INCLUSIVE | T_RANGE_LT_INCLUSIVE | T_RANGE_EXCLUSIVE | T_RANGE_INCLUSIVE_REV | T_RANGE_EXCLUSIVE_REV | T_IS | T_IMPLIES | T_LEXMATCH_QUESTION => Reduce(1, NT_simple_expr, yy_action_790) + T_UIDENT => Shift(yy_state_1190) _ => Error } } -fn yy_state_820(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(2, NT_arrow_fn_prefix_no_constraint, yy_action_575) -} - -fn yy_state_821(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1190(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_FAT_ARROW => Shift(yy_state_588) - T_COMMA => Shift(yy_state_822) - T_RPAREN => Shift(yy_state_824) - T_INFIX1 | T_INFIX2 | T_INFIX3 | T_INFIX4 | T_CATCH | T_EQ_TILDE | T_LPAREN | T_MINUS | T_DOT_LIDENT | T_DOT_INT | T_LBRACKET | T_PLUS | T_BAR | T_AMPERAMPER | T_AMPER | T_CARET | T_BARBAR | T_AS | T_PIPE | T_PIPE_LEFT | T_LT_PLUS | T_DOTDOT | T_RANGE_INCLUSIVE | T_RANGE_LT_INCLUSIVE | T_RANGE_EXCLUSIVE | T_RANGE_INCLUSIVE_REV | T_RANGE_EXCLUSIVE_REV | T_IS | T_IMPLIES | T_LEXMATCH_QUESTION => Reduce(1, NT_qual_ident_simple_expr, yy_action_772) + T_LBRACKET => Shift(yy_state_1172) + NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__ => Shift(yy_state_1183) + NT_optional_type_parameters_no_constraints => Shift(yy_state_1191) + T_EOF | T_DERIVE | T_EQUAL | T_SEMI => Reduce(0, NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__, yy_action_415) _ => Error } } -fn yy_state_822(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1191(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_type_header, yy_action_402) +} + +fn yy_state_1192(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_multiline_string => Shift(yy_state_2) - T_MULTILINE_INTERP => Shift(yy_state_4) - T_MULTILINE_STRING => Shift(yy_state_5) - T_REGEX_LITERAL => Shift(yy_state_6) - T_STRING => Shift(yy_state_7) - T_FLOAT => Shift(yy_state_8) - T_DOUBLE => Shift(yy_state_9) - T_INT => Shift(yy_state_10) - T_CHAR => Shift(yy_state_11) - T_BYTES => Shift(yy_state_12) - T_BYTE => Shift(yy_state_13) - T_FALSE => Shift(yy_state_14) - T_TRUE => Shift(yy_state_15) - T_INTERP => Shift(yy_state_16) - NT_non_empty_list_multiline_string_ => Shift(yy_state_17) - NT_simple_constant => Shift(yy_state_18) - T_AMPER => Shift(yy_state_19) - NT_qual_ident_ty => Shift(yy_state_25) - NT_tuple_expr => Shift(yy_state_26) - T_LBRACKET => Shift(yy_state_27) - NT_constr => Shift(yy_state_35) - NT_qual_ident_simple_expr => Shift(yy_state_36) - NT_atomic_expr => Shift(yy_state_37) - NT_anony_fn => Shift(yy_state_38) - T_LBRACE => Shift(yy_state_39) - T_FN => Shift(yy_state_48) - NT_type_name => Shift(yy_state_126) - T_ASYNC => Shift(yy_state_138) - NT_simple_expr => Shift(yy_state_151) - T_EXCLAMATION => Shift(yy_state_162) - NT_non_empty_tuple_elems => Shift(yy_state_168) - NT_expr => Shift(yy_state_176) - T_MINUS => Shift(yy_state_178) - T_PLUS => Shift(yy_state_180) - T_UIDENT => Shift(yy_state_182) - T_PACKAGE_NAME => Shift(yy_state_183) - NT_prefix_expr => Shift(yy_state_187) - NT_range_expr => Shift(yy_state_198) - NT_postfix_expr => Shift(yy_state_416) - T_EXISTS => Shift(yy_state_417) - T_FORALL => Shift(yy_state_449) - NT_infix_expr => Shift(yy_state_455) - T_LPAREN => Shift(yy_state_464) - NT_pipe_expr => Shift(yy_state_497) - NT_arrow_fn_expr => Shift(yy_state_513) - NT_quantifier_expr => Shift(yy_state_514) - NT_simple_try_expr => Shift(yy_state_515) - NT_lexmatch_expr => Shift(yy_state_516) - NT_match_expr => Shift(yy_state_517) - NT_if_expr => Shift(yy_state_518) - NT_try_expr => Shift(yy_state_519) - NT_while_expr => Shift(yy_state_520) - NT_foreach_expr => Shift(yy_state_521) - NT_for_expr => Shift(yy_state_522) - T_LEXMATCH => Shift(yy_state_523) - NT_lexmatch_header => Shift(yy_state_529) - NT_match_header => Shift(yy_state_540) - T_MATCH => Shift(yy_state_550) - T_IF => Shift(yy_state_553) - T_TRY_EXCLAMATION => Shift(yy_state_559) - T_TRY_QUESTION => Shift(yy_state_561) - T_TRY => Shift(yy_state_563) - NT_loop_label_colon => Shift(yy_state_577) - T_POST_LABEL => Shift(yy_state_585) - NT_non_empty_tuple_elems_with_prefix => Shift(yy_state_776) - NT_arrow_fn_prefix_no_constraint => Shift(yy_state_777) - T_UNDERSCORE => Shift(yy_state_819) - T_LIDENT => Shift(yy_state_821) - T_RPAREN => Shift(yy_state_823) - T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_902) + T_PACKAGE_NAME => Shift(yy_state_1193) _ => Error } } -fn yy_state_823(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_arrow_fn_prefix_no_constraint, yy_action_435) -} - -fn yy_state_824(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(2, NT_arrow_fn_prefix_no_constraint, yy_action_433) -} - -fn yy_state_825(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1193(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_FAT_ARROW => Shift(yy_state_588) - T_COMMA => Shift(yy_state_822) - T_RPAREN => Shift(yy_state_824) - T_COLON => Shift(yy_state_826) - T_INFIX1 | T_INFIX2 | T_INFIX3 | T_INFIX4 | T_CATCH | T_EQ_TILDE | T_LPAREN | T_MINUS | T_DOT_LIDENT | T_DOT_INT | T_LBRACKET | T_PLUS | T_BAR | T_AMPERAMPER | T_AMPER | T_CARET | T_BARBAR | T_AS | T_PIPE | T_PIPE_LEFT | T_LT_PLUS | T_DOTDOT | T_RANGE_INCLUSIVE | T_RANGE_LT_INCLUSIVE | T_RANGE_EXCLUSIVE | T_RANGE_INCLUSIVE_REV | T_RANGE_EXCLUSIVE_REV | T_IS | T_IMPLIES | T_LEXMATCH_QUESTION => Reduce(1, NT_qual_ident_simple_expr, yy_action_772) + T_LBRACE => Shift(yy_state_1194) _ => Error } } -fn yy_state_826(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1194(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_ASYNC => Shift(yy_state_52) - T_UNDERSCORE => Shift(yy_state_57) - T_AMPER => Shift(yy_state_58) - T_PACKAGE_NAME => Shift(yy_state_60) - T_UIDENT => Shift(yy_state_67) - T_LPAREN => Shift(yy_state_71) - NT_simple_type => Shift(yy_state_97) - NT_type_ => Shift(yy_state_827) + NT_using_binder => Shift(yy_state_1195) + NT_non_empty_list_commas_rev_using_binder_ => Shift(yy_state_1196) + T_TRAIT => Shift(yy_state_1200) + T_TYPE => Shift(yy_state_1204) + T_UIDENT => Shift(yy_state_1208) + T_EXTEND => Shift(yy_state_1211) + T_LIDENT => Shift(yy_state_1215) + NT_non_empty_list_commas_using_binder_ => Shift(yy_state_1219) + NT_list_commas_using_binder_ => Shift(yy_state_1220) + T_RBRACE => Reduce(0, NT_list_commas_using_binder_, yy_action_401) _ => Error } } -fn yy_state_827(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1195(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_non_empty_list_commas_rev_using_binder_, yy_action_400) +} + +fn yy_state_1196(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RPAREN => Shift(yy_state_828) + NT_option_COMMA_ => Shift(yy_state_1197) + T_COMMA => Shift(yy_state_1198) + T_RBRACE => Reduce(0, NT_option_COMMA_, yy_action_1044) _ => Error } } -fn yy_state_828(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(5, NT_tuple_expr, yy_action_439) -} - -fn yy_state_829(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(2, NT_prefix_expr, yy_action_412) +fn yy_state_1197(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(2, NT_non_empty_list_commas_using_binder_, yy_action_399) } -fn yy_state_830(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1198(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RPAREN => Shift(yy_state_831) + NT_using_binder => Shift(yy_state_1199) + T_TRAIT => Shift(yy_state_1200) + T_TYPE => Shift(yy_state_1204) + T_UIDENT => Shift(yy_state_1208) + T_EXTEND => Shift(yy_state_1211) + T_LIDENT => Shift(yy_state_1215) + T_RBRACE => Reduce(1, NT_option_COMMA_, yy_action_1042) _ => Error } } -fn yy_state_831(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(6, NT_simple_expr, yy_action_411) +fn yy_state_1199(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_non_empty_list_commas_rev_using_binder_, yy_action_398) } -fn yy_state_832(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1200(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LPAREN => Shift(yy_state_809) - T_INFIX1 | T_INFIX2 | T_INFIX3 | T_INFIX4 | T_EOF | T_WITH | T_CATCH | T_EQ_TILDE | T_RPAREN | T_COMMA | T_MINUS | T_DOT_LIDENT | T_DOT_INT | T_COLON | T_SEMI | T_LBRACKET | T_PLUS | T_RBRACKET | T_BAR | T_LBRACE | T_RBRACE | T_AMPERAMPER | T_AMPER | T_CARET | T_BARBAR | T_AS | T_PIPE | T_PIPE_LEFT | T_LT_PLUS | T_ELSE | T_IF | T_FAT_ARROW | T_DOTDOT | T_RANGE_INCLUSIVE | T_RANGE_LT_INCLUSIVE | T_RANGE_EXCLUSIVE | T_RANGE_INCLUSIVE_REV | T_RANGE_EXCLUSIVE_REV | T_IS | T_AND | T_IMPLIES | T_LEXMATCH_QUESTION => Reduce(2, NT_simple_expr, yy_action_417) + T_UIDENT => Shift(yy_state_1201) _ => Error } } -fn yy_state_833(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1201(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_multiline_string => Shift(yy_state_2) - T_MULTILINE_INTERP => Shift(yy_state_4) - T_MULTILINE_STRING => Shift(yy_state_5) - T_REGEX_LITERAL => Shift(yy_state_6) - T_STRING => Shift(yy_state_7) - T_FLOAT => Shift(yy_state_8) - T_DOUBLE => Shift(yy_state_9) - T_INT => Shift(yy_state_10) - T_CHAR => Shift(yy_state_11) - T_BYTES => Shift(yy_state_12) - T_BYTE => Shift(yy_state_13) - T_FALSE => Shift(yy_state_14) - T_TRUE => Shift(yy_state_15) - T_INTERP => Shift(yy_state_16) - NT_non_empty_list_multiline_string_ => Shift(yy_state_17) - NT_simple_constant => Shift(yy_state_18) - T_AMPER => Shift(yy_state_19) - NT_qual_ident_ty => Shift(yy_state_25) - NT_tuple_expr => Shift(yy_state_26) - T_LBRACKET => Shift(yy_state_27) - NT_constr => Shift(yy_state_35) - NT_qual_ident_simple_expr => Shift(yy_state_36) - NT_atomic_expr => Shift(yy_state_37) - NT_anony_fn => Shift(yy_state_38) - T_LBRACE => Shift(yy_state_39) - T_FN => Shift(yy_state_48) - NT_type_name => Shift(yy_state_126) - T_ASYNC => Shift(yy_state_138) - NT_simple_expr => Shift(yy_state_151) - T_EXCLAMATION => Shift(yy_state_162) - T_MINUS => Shift(yy_state_178) - T_PLUS => Shift(yy_state_180) - T_UIDENT => Shift(yy_state_182) - T_PACKAGE_NAME => Shift(yy_state_183) - NT_prefix_expr => Shift(yy_state_187) - NT_range_expr => Shift(yy_state_198) - NT_postfix_expr => Shift(yy_state_416) - T_EXISTS => Shift(yy_state_417) - T_FORALL => Shift(yy_state_449) - NT_infix_expr => Shift(yy_state_455) - T_UNDERSCORE => Shift(yy_state_456) - T_LPAREN => Shift(yy_state_464) - NT_pipe_expr => Shift(yy_state_497) - NT_arrow_fn_expr => Shift(yy_state_513) - NT_quantifier_expr => Shift(yy_state_514) - NT_simple_try_expr => Shift(yy_state_515) - NT_lexmatch_expr => Shift(yy_state_516) - NT_match_expr => Shift(yy_state_517) - NT_if_expr => Shift(yy_state_518) - NT_try_expr => Shift(yy_state_519) - NT_while_expr => Shift(yy_state_520) - NT_foreach_expr => Shift(yy_state_521) - NT_for_expr => Shift(yy_state_522) - T_LEXMATCH => Shift(yy_state_523) - NT_lexmatch_header => Shift(yy_state_529) - NT_match_header => Shift(yy_state_540) - T_MATCH => Shift(yy_state_550) - T_IF => Shift(yy_state_553) - T_TRY_EXCLAMATION => Shift(yy_state_559) - T_TRY_QUESTION => Shift(yy_state_561) - T_TRY => Shift(yy_state_563) - NT_loop_label_colon => Shift(yy_state_577) - T_POST_LABEL => Shift(yy_state_585) - T_LIDENT => Shift(yy_state_587) - NT_option_expr_ => Shift(yy_state_801) - NT_expr => Shift(yy_state_834) - T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_902) - T_COLON => Reduce(0, NT_option_expr_, yy_action_484) + T_AS => Shift(yy_state_1202) + T_COMMA | T_RBRACE => Reduce(2, NT_using_binder, yy_action_397) _ => Error } } -fn yy_state_834(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1202(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RBRACKET => Shift(yy_state_835) - T_COLON => Reduce(1, NT_option_expr_, yy_action_483) + T_UIDENT => Shift(yy_state_1203) _ => Error } } -fn yy_state_835(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(4, NT_simple_expr, yy_action_421) -} - -fn yy_state_836(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_parameter, yy_action_410) +fn yy_state_1203(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(4, NT_using_binder, yy_action_396) } -fn yy_state_837(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1204(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_ASYNC => Shift(yy_state_52) - T_UNDERSCORE => Shift(yy_state_57) - T_AMPER => Shift(yy_state_58) - T_PACKAGE_NAME => Shift(yy_state_60) - T_UIDENT => Shift(yy_state_67) - T_LPAREN => Shift(yy_state_71) - NT_simple_type => Shift(yy_state_97) - NT_type_ => Shift(yy_state_838) + T_UIDENT => Shift(yy_state_1205) _ => Error } } -fn yy_state_838(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1205(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_EQUAL => Shift(yy_state_839) - T_RPAREN | T_COMMA => Reduce(3, NT_parameter, yy_action_409) + T_AS => Shift(yy_state_1206) + T_COMMA | T_RBRACE => Reduce(2, NT_using_binder, yy_action_395) _ => Error } } -fn yy_state_839(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1206(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_multiline_string => Shift(yy_state_2) - T_MULTILINE_INTERP => Shift(yy_state_4) - T_MULTILINE_STRING => Shift(yy_state_5) - T_REGEX_LITERAL => Shift(yy_state_6) - T_STRING => Shift(yy_state_7) - T_FLOAT => Shift(yy_state_8) - T_DOUBLE => Shift(yy_state_9) - T_INT => Shift(yy_state_10) - T_CHAR => Shift(yy_state_11) - T_BYTES => Shift(yy_state_12) - T_BYTE => Shift(yy_state_13) - T_FALSE => Shift(yy_state_14) - T_TRUE => Shift(yy_state_15) - T_INTERP => Shift(yy_state_16) - NT_non_empty_list_multiline_string_ => Shift(yy_state_17) - NT_simple_constant => Shift(yy_state_18) - T_AMPER => Shift(yy_state_19) - NT_qual_ident_ty => Shift(yy_state_25) - NT_tuple_expr => Shift(yy_state_26) - T_LBRACKET => Shift(yy_state_27) - NT_constr => Shift(yy_state_35) - NT_qual_ident_simple_expr => Shift(yy_state_36) - NT_atomic_expr => Shift(yy_state_37) - NT_anony_fn => Shift(yy_state_38) - T_LBRACE => Shift(yy_state_39) - T_FN => Shift(yy_state_48) - NT_type_name => Shift(yy_state_126) - T_ASYNC => Shift(yy_state_138) - NT_simple_expr => Shift(yy_state_151) - T_EXCLAMATION => Shift(yy_state_162) - T_MINUS => Shift(yy_state_178) - T_PLUS => Shift(yy_state_180) - T_UIDENT => Shift(yy_state_182) - T_PACKAGE_NAME => Shift(yy_state_183) - NT_prefix_expr => Shift(yy_state_187) - NT_range_expr => Shift(yy_state_198) - NT_postfix_expr => Shift(yy_state_416) - T_EXISTS => Shift(yy_state_417) - T_FORALL => Shift(yy_state_449) - NT_infix_expr => Shift(yy_state_455) - T_UNDERSCORE => Shift(yy_state_456) - T_LPAREN => Shift(yy_state_464) - NT_pipe_expr => Shift(yy_state_497) - NT_arrow_fn_expr => Shift(yy_state_513) - NT_quantifier_expr => Shift(yy_state_514) - NT_simple_try_expr => Shift(yy_state_515) - NT_lexmatch_expr => Shift(yy_state_516) - NT_match_expr => Shift(yy_state_517) - NT_if_expr => Shift(yy_state_518) - NT_try_expr => Shift(yy_state_519) - NT_while_expr => Shift(yy_state_520) - NT_foreach_expr => Shift(yy_state_521) - NT_for_expr => Shift(yy_state_522) - T_LEXMATCH => Shift(yy_state_523) - NT_lexmatch_header => Shift(yy_state_529) - NT_match_header => Shift(yy_state_540) - T_MATCH => Shift(yy_state_550) - T_IF => Shift(yy_state_553) - T_TRY_EXCLAMATION => Shift(yy_state_559) - T_TRY_QUESTION => Shift(yy_state_561) - T_TRY => Shift(yy_state_563) - NT_loop_label_colon => Shift(yy_state_577) - T_POST_LABEL => Shift(yy_state_585) - T_LIDENT => Shift(yy_state_587) - NT_expr => Shift(yy_state_840) - T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_902) + T_UIDENT => Shift(yy_state_1207) _ => Error } } -fn yy_state_840(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(5, NT_parameter, yy_action_408) +fn yy_state_1207(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(4, NT_using_binder, yy_action_394) } -fn yy_state_841(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1208(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_QUESTION => Shift(yy_state_842) - T_COLON => Shift(yy_state_849) - T_RPAREN | T_COMMA => Reduce(1, NT_parameter, yy_action_407) + T_AS => Shift(yy_state_1209) + T_COMMA | T_RBRACE => Reduce(1, NT_using_binder, yy_action_393) _ => Error } } -fn yy_state_842(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1209(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_COLON => Shift(yy_state_843) - T_EQUAL => Shift(yy_state_847) - T_RPAREN | T_COMMA => Reduce(2, NT_parameter, yy_action_406) + T_UIDENT => Shift(yy_state_1210) _ => Error } } -fn yy_state_843(_lookahead : YYSymbol) -> YYDecision { - match _lookahead { - T_ASYNC => Shift(yy_state_52) - T_UNDERSCORE => Shift(yy_state_57) - T_AMPER => Shift(yy_state_58) - T_PACKAGE_NAME => Shift(yy_state_60) - T_UIDENT => Shift(yy_state_67) - T_LPAREN => Shift(yy_state_71) - NT_simple_type => Shift(yy_state_97) - NT_type_ => Shift(yy_state_844) - _ => Error - } +fn yy_state_1210(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_using_binder, yy_action_392) } -fn yy_state_844(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1211(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_EQUAL => Shift(yy_state_845) - T_RPAREN | T_COMMA => Reduce(4, NT_parameter, yy_action_405) + T_AS => Shift(yy_state_1212) + T_COMMA | T_RBRACE => Reduce(1, NT_using_binder, yy_action_391) _ => Error } } -fn yy_state_845(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1212(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_multiline_string => Shift(yy_state_2) - T_MULTILINE_INTERP => Shift(yy_state_4) - T_MULTILINE_STRING => Shift(yy_state_5) - T_REGEX_LITERAL => Shift(yy_state_6) - T_STRING => Shift(yy_state_7) - T_FLOAT => Shift(yy_state_8) - T_DOUBLE => Shift(yy_state_9) - T_INT => Shift(yy_state_10) - T_CHAR => Shift(yy_state_11) - T_BYTES => Shift(yy_state_12) - T_BYTE => Shift(yy_state_13) - T_FALSE => Shift(yy_state_14) - T_TRUE => Shift(yy_state_15) - T_INTERP => Shift(yy_state_16) - NT_non_empty_list_multiline_string_ => Shift(yy_state_17) - NT_simple_constant => Shift(yy_state_18) - T_AMPER => Shift(yy_state_19) - NT_qual_ident_ty => Shift(yy_state_25) - NT_tuple_expr => Shift(yy_state_26) - T_LBRACKET => Shift(yy_state_27) - NT_constr => Shift(yy_state_35) - NT_qual_ident_simple_expr => Shift(yy_state_36) - NT_atomic_expr => Shift(yy_state_37) - NT_anony_fn => Shift(yy_state_38) - T_LBRACE => Shift(yy_state_39) - T_FN => Shift(yy_state_48) - NT_type_name => Shift(yy_state_126) - T_ASYNC => Shift(yy_state_138) - NT_simple_expr => Shift(yy_state_151) - T_EXCLAMATION => Shift(yy_state_162) - T_MINUS => Shift(yy_state_178) - T_PLUS => Shift(yy_state_180) - T_UIDENT => Shift(yy_state_182) - T_PACKAGE_NAME => Shift(yy_state_183) - NT_prefix_expr => Shift(yy_state_187) - NT_range_expr => Shift(yy_state_198) - NT_postfix_expr => Shift(yy_state_416) - T_EXISTS => Shift(yy_state_417) - T_FORALL => Shift(yy_state_449) - NT_infix_expr => Shift(yy_state_455) - T_UNDERSCORE => Shift(yy_state_456) - T_LPAREN => Shift(yy_state_464) - NT_pipe_expr => Shift(yy_state_497) - NT_arrow_fn_expr => Shift(yy_state_513) - NT_quantifier_expr => Shift(yy_state_514) - NT_simple_try_expr => Shift(yy_state_515) - NT_lexmatch_expr => Shift(yy_state_516) - NT_match_expr => Shift(yy_state_517) - NT_if_expr => Shift(yy_state_518) - NT_try_expr => Shift(yy_state_519) - NT_while_expr => Shift(yy_state_520) - NT_foreach_expr => Shift(yy_state_521) - NT_for_expr => Shift(yy_state_522) - T_LEXMATCH => Shift(yy_state_523) - NT_lexmatch_header => Shift(yy_state_529) - NT_match_header => Shift(yy_state_540) - T_MATCH => Shift(yy_state_550) - T_IF => Shift(yy_state_553) - T_TRY_EXCLAMATION => Shift(yy_state_559) - T_TRY_QUESTION => Shift(yy_state_561) - T_TRY => Shift(yy_state_563) - NT_loop_label_colon => Shift(yy_state_577) - T_POST_LABEL => Shift(yy_state_585) - T_LIDENT => Shift(yy_state_587) - NT_expr => Shift(yy_state_846) - T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_902) + T_EXTEND => Shift(yy_state_1213) + T_LIDENT => Shift(yy_state_1214) _ => Error } } -fn yy_state_846(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(6, NT_parameter, yy_action_404) +fn yy_state_1213(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_using_binder, yy_action_390) } -fn yy_state_847(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1214(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_using_binder, yy_action_389) +} + +fn yy_state_1215(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_multiline_string => Shift(yy_state_2) - T_MULTILINE_INTERP => Shift(yy_state_4) - T_MULTILINE_STRING => Shift(yy_state_5) - T_REGEX_LITERAL => Shift(yy_state_6) - T_STRING => Shift(yy_state_7) - T_FLOAT => Shift(yy_state_8) - T_DOUBLE => Shift(yy_state_9) - T_INT => Shift(yy_state_10) - T_CHAR => Shift(yy_state_11) - T_BYTES => Shift(yy_state_12) - T_BYTE => Shift(yy_state_13) - T_FALSE => Shift(yy_state_14) - T_TRUE => Shift(yy_state_15) - T_INTERP => Shift(yy_state_16) - NT_non_empty_list_multiline_string_ => Shift(yy_state_17) - NT_simple_constant => Shift(yy_state_18) - T_AMPER => Shift(yy_state_19) - NT_qual_ident_ty => Shift(yy_state_25) - NT_tuple_expr => Shift(yy_state_26) - T_LBRACKET => Shift(yy_state_27) - NT_constr => Shift(yy_state_35) - NT_qual_ident_simple_expr => Shift(yy_state_36) - NT_atomic_expr => Shift(yy_state_37) - NT_anony_fn => Shift(yy_state_38) - T_LBRACE => Shift(yy_state_39) - T_FN => Shift(yy_state_48) - NT_type_name => Shift(yy_state_126) - T_ASYNC => Shift(yy_state_138) - NT_simple_expr => Shift(yy_state_151) - T_EXCLAMATION => Shift(yy_state_162) - T_MINUS => Shift(yy_state_178) - T_PLUS => Shift(yy_state_180) - T_UIDENT => Shift(yy_state_182) - T_PACKAGE_NAME => Shift(yy_state_183) - NT_prefix_expr => Shift(yy_state_187) - NT_range_expr => Shift(yy_state_198) - NT_postfix_expr => Shift(yy_state_416) - T_EXISTS => Shift(yy_state_417) - T_FORALL => Shift(yy_state_449) - NT_infix_expr => Shift(yy_state_455) - T_UNDERSCORE => Shift(yy_state_456) - T_LPAREN => Shift(yy_state_464) - NT_pipe_expr => Shift(yy_state_497) - NT_arrow_fn_expr => Shift(yy_state_513) - NT_quantifier_expr => Shift(yy_state_514) - NT_simple_try_expr => Shift(yy_state_515) - NT_lexmatch_expr => Shift(yy_state_516) - NT_match_expr => Shift(yy_state_517) - NT_if_expr => Shift(yy_state_518) - NT_try_expr => Shift(yy_state_519) - NT_while_expr => Shift(yy_state_520) - NT_foreach_expr => Shift(yy_state_521) - NT_for_expr => Shift(yy_state_522) - T_LEXMATCH => Shift(yy_state_523) - NT_lexmatch_header => Shift(yy_state_529) - NT_match_header => Shift(yy_state_540) - T_MATCH => Shift(yy_state_550) - T_IF => Shift(yy_state_553) - T_TRY_EXCLAMATION => Shift(yy_state_559) - T_TRY_QUESTION => Shift(yy_state_561) - T_TRY => Shift(yy_state_563) - NT_loop_label_colon => Shift(yy_state_577) - T_POST_LABEL => Shift(yy_state_585) - T_LIDENT => Shift(yy_state_587) - NT_expr => Shift(yy_state_848) - T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_902) + T_AS => Shift(yy_state_1216) + T_COMMA | T_RBRACE => Reduce(1, NT_using_binder, yy_action_388) _ => Error } } -fn yy_state_848(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(4, NT_parameter, yy_action_403) -} - -fn yy_state_849(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1216(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_ASYNC => Shift(yy_state_52) - T_UNDERSCORE => Shift(yy_state_57) - T_AMPER => Shift(yy_state_58) - T_PACKAGE_NAME => Shift(yy_state_60) - T_UIDENT => Shift(yy_state_67) - T_LPAREN => Shift(yy_state_71) - NT_simple_type => Shift(yy_state_97) - NT_type_ => Shift(yy_state_850) + T_EXTEND => Shift(yy_state_1217) + T_LIDENT => Shift(yy_state_1218) _ => Error } } -fn yy_state_850(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_parameter, yy_action_402) +fn yy_state_1217(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_using_binder, yy_action_387) } -fn yy_state_851(_lookahead : YYSymbol) -> YYDecision { - match _lookahead { - T_COLON => Shift(yy_state_852) - T_RPAREN | T_COMMA => Reduce(1, NT_parameter, yy_action_401) - _ => Error - } +fn yy_state_1218(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_using_binder, yy_action_386) } -fn yy_state_852(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1219(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_list_commas_using_binder_, yy_action_385) +} + +fn yy_state_1220(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_ASYNC => Shift(yy_state_52) - T_UNDERSCORE => Shift(yy_state_57) - T_AMPER => Shift(yy_state_58) - T_PACKAGE_NAME => Shift(yy_state_60) - T_UIDENT => Shift(yy_state_67) - T_LPAREN => Shift(yy_state_71) - NT_simple_type => Shift(yy_state_97) - NT_type_ => Shift(yy_state_853) + T_RBRACE => Shift(yy_state_1221) _ => Error } } -fn yy_state_853(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_parameter, yy_action_400) -} - -fn yy_state_854(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_list_commas_parameter_, yy_action_399) +fn yy_state_1221(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(5, NT_structure_item, yy_action_384) } -fn yy_state_855(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1222(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RPAREN => Shift(yy_state_856) + NT_type_parameters => Shift(yy_state_1223) + NT_optional_type_parameters => Shift(yy_state_1224) + NT_option_type_parameters_ => Shift(yy_state_1266) + T_LBRACKET => Shift(yy_state_1267) + T_UIDENT => Reduce(0, NT_option_type_parameters_, yy_action_383) _ => Error } } -fn yy_state_856(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_parameters, yy_action_397) -} - -fn yy_state_857(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_list_commas_with_trailing_info_record_defn_single_, yy_action_396) +fn yy_state_1223(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_option_type_parameters_, yy_action_382) } -fn yy_state_858(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1224(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_multiline_string => Shift(yy_state_2) - T_MULTILINE_INTERP => Shift(yy_state_4) - T_MULTILINE_STRING => Shift(yy_state_5) - T_REGEX_LITERAL => Shift(yy_state_6) - T_STRING => Shift(yy_state_7) - T_FLOAT => Shift(yy_state_8) - T_DOUBLE => Shift(yy_state_9) - T_INT => Shift(yy_state_10) - T_CHAR => Shift(yy_state_11) - T_BYTES => Shift(yy_state_12) - T_BYTE => Shift(yy_state_13) - T_FALSE => Shift(yy_state_14) - T_TRUE => Shift(yy_state_15) - T_INTERP => Shift(yy_state_16) - NT_non_empty_list_multiline_string_ => Shift(yy_state_17) - NT_simple_constant => Shift(yy_state_18) - T_AMPER => Shift(yy_state_19) - NT_qual_ident_ty => Shift(yy_state_25) - NT_tuple_expr => Shift(yy_state_26) - T_LBRACKET => Shift(yy_state_27) - NT_constr => Shift(yy_state_35) - NT_qual_ident_simple_expr => Shift(yy_state_36) - NT_atomic_expr => Shift(yy_state_37) - NT_anony_fn => Shift(yy_state_38) - T_LBRACE => Shift(yy_state_39) - T_FN => Shift(yy_state_48) - NT_type_name => Shift(yy_state_126) - T_ASYNC => Shift(yy_state_138) - NT_simple_expr => Shift(yy_state_151) - T_EXCLAMATION => Shift(yy_state_162) - T_MINUS => Shift(yy_state_178) - T_PLUS => Shift(yy_state_180) - T_UIDENT => Shift(yy_state_182) - T_PACKAGE_NAME => Shift(yy_state_183) - NT_prefix_expr => Shift(yy_state_187) - NT_range_expr => Shift(yy_state_198) - NT_postfix_expr => Shift(yy_state_416) - T_EXISTS => Shift(yy_state_417) - T_FORALL => Shift(yy_state_449) - NT_infix_expr => Shift(yy_state_455) - T_UNDERSCORE => Shift(yy_state_456) - T_LPAREN => Shift(yy_state_464) - NT_pipe_expr => Shift(yy_state_497) - NT_arrow_fn_expr => Shift(yy_state_513) - NT_quantifier_expr => Shift(yy_state_514) - NT_simple_try_expr => Shift(yy_state_515) - NT_lexmatch_expr => Shift(yy_state_516) - NT_match_expr => Shift(yy_state_517) - NT_if_expr => Shift(yy_state_518) - NT_try_expr => Shift(yy_state_519) - NT_while_expr => Shift(yy_state_520) - NT_foreach_expr => Shift(yy_state_521) - NT_for_expr => Shift(yy_state_522) - T_LEXMATCH => Shift(yy_state_523) - NT_lexmatch_header => Shift(yy_state_529) - NT_match_header => Shift(yy_state_540) - T_MATCH => Shift(yy_state_550) - T_IF => Shift(yy_state_553) - T_TRY_EXCLAMATION => Shift(yy_state_559) - T_TRY_QUESTION => Shift(yy_state_561) - T_TRY => Shift(yy_state_563) - NT_loop_label_colon => Shift(yy_state_577) - T_POST_LABEL => Shift(yy_state_585) - T_LIDENT => Shift(yy_state_587) - NT_expr => Shift(yy_state_859) - T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_902) + T_UIDENT => Shift(yy_state_1225) _ => Error } } -fn yy_state_859(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1225(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_COMMA => Shift(yy_state_860) - T_RBRACE => Shift(yy_state_866) + T_LBRACE => Shift(yy_state_1226) _ => Error } } -fn yy_state_860(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1226(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_record_defn_single => Shift(yy_state_130) - T_LIDENT => Shift(yy_state_135) - NT_non_empty_list_commas_rev_record_defn_single_ => Shift(yy_state_861) - NT_non_empty_list_commas_record_defn_single_ => Shift(yy_state_863) - NT_list_commas_record_defn_single_ => Shift(yy_state_864) - T_RBRACE => Reduce(0, NT_list_commas_record_defn_single_, yy_action_395) + T_ATTRIBUTE => Shift(yy_state_1168) + NT_enum_constructor => Shift(yy_state_1227) + NT_non_empty_list_attribute_ => Shift(yy_state_1231) + T_UIDENT => Shift(yy_state_1251) + NT_non_empty_list_semis_enum_constructor_ => Shift(yy_state_1254) + NT_list_semis_enum_constructor_ => Shift(yy_state_1255) + T_RBRACE => Reduce(0, NT_list_semis_enum_constructor_, yy_action_381) _ => Error } } -fn yy_state_861(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1227(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_COMMA => Shift(yy_state_133) - NT_option_COMMA_ => Shift(yy_state_862) - T_RBRACE => Reduce(0, NT_option_COMMA_, yy_action_876) + NT_option_SEMI_ => Shift(yy_state_1228) + T_SEMI => Shift(yy_state_1229) + T_RBRACE => Reduce(0, NT_option_SEMI_, yy_action_976) _ => Error } } -fn yy_state_862(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(2, NT_non_empty_list_commas_record_defn_single_, yy_action_394) -} - -fn yy_state_863(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_list_commas_record_defn_single_, yy_action_393) +fn yy_state_1228(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(2, NT_non_empty_list_semis_enum_constructor_, yy_action_380) } -fn yy_state_864(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1229(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RBRACE => Shift(yy_state_865) + T_ATTRIBUTE => Shift(yy_state_1168) + NT_enum_constructor => Shift(yy_state_1227) + NT_non_empty_list_semis_enum_constructor_ => Shift(yy_state_1230) + NT_non_empty_list_attribute_ => Shift(yy_state_1231) + T_UIDENT => Shift(yy_state_1251) + T_RBRACE => Reduce(1, NT_option_SEMI_, yy_action_974) _ => Error } } -fn yy_state_865(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(8, NT_simple_expr, yy_action_391) -} - -fn yy_state_866(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(6, NT_simple_expr, yy_action_389) +fn yy_state_1230(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_non_empty_list_semis_enum_constructor_, yy_action_379) } -fn yy_state_867(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1231(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RBRACE => Shift(yy_state_868) + T_UIDENT => Shift(yy_state_1232) _ => Error } } -fn yy_state_868(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(5, NT_simple_expr, yy_action_388) +fn yy_state_1232(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_LPAREN => Shift(yy_state_1233) + NT_option_delimited_LPAREN_non_empty_list_commas_constructor_param__RPAREN__ => Shift(yy_state_1247) + T_EQUAL | T_SEMI | T_RBRACE => Reduce(0, NT_option_delimited_LPAREN_non_empty_list_commas_constructor_param__RPAREN__, yy_action_378) + _ => Error + } } -fn yy_state_869(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1233(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RBRACE => Shift(yy_state_870) + NT_constructor_param => Shift(yy_state_1234) + NT_non_empty_list_commas_constructor_param_ => Shift(yy_state_1235) + NT_non_empty_list_commas_rev_constructor_param_ => Shift(yy_state_1237) + T_MUTABLE => Shift(yy_state_1241) + NT_option_MUTABLE_ => Shift(yy_state_1242) + T_UIDENT | T_POST_LABEL | T_ASYNC | T_LPAREN | T_UNDERSCORE | T_AMPER | T_PACKAGE_NAME => Reduce(0, NT_option_MUTABLE_, yy_action_377) _ => Error } } -fn yy_state_870(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_block_expr, yy_action_387) +fn yy_state_1234(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_non_empty_list_commas_rev_constructor_param_, yy_action_376) } -fn yy_state_871(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_list_commas_map_expr_elem_, yy_action_386) +fn yy_state_1235(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_RPAREN => Shift(yy_state_1236) + _ => Error + } +} + +fn yy_state_1236(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_option_delimited_LPAREN_non_empty_list_commas_constructor_param__RPAREN__, yy_action_374) } -fn yy_state_872(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1237(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_SEMI => Shift(yy_state_124) - NT_option_SEMI_ => Shift(yy_state_873) - T_RBRACE => Reduce(0, NT_option_SEMI_, yy_action_815) + NT_option_COMMA_ => Shift(yy_state_1238) + T_COMMA => Shift(yy_state_1239) + T_RPAREN => Reduce(0, NT_option_COMMA_, yy_action_1044) _ => Error } } -fn yy_state_873(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(2, NT_none_empty_list_semis_rev_with_trailing_info_statement_, yy_action_385) +fn yy_state_1238(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(2, NT_non_empty_list_commas_constructor_param_, yy_action_373) } -fn yy_state_874(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1239(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_INFIX1 | T_INFIX2 | T_INFIX3 | T_INFIX4 | T_CATCH | T_EQ_TILDE | T_LPAREN | T_MINUS | T_DOT_LIDENT | T_DOT_INT | T_SEMI | T_LBRACKET | T_PLUS | T_BAR | T_RBRACE | T_AMPERAMPER | T_AMPER | T_CARET | T_BARBAR | T_AS | T_PIPE | T_PIPE_LEFT | T_LT_PLUS | T_DOTDOT | T_RANGE_INCLUSIVE | T_RANGE_LT_INCLUSIVE | T_RANGE_EXCLUSIVE | T_RANGE_INCLUSIVE_REV | T_RANGE_EXCLUSIVE_REV | T_IS | T_IMPLIES | T_LEXMATCH_QUESTION => Reduce(1, NT_atomic_expr, yy_action_885) - T_COLON => Reduce(1, NT_map_syntax_key, yy_action_642) + NT_constructor_param => Shift(yy_state_1240) + T_MUTABLE => Shift(yy_state_1241) + NT_option_MUTABLE_ => Shift(yy_state_1242) + T_UIDENT | T_POST_LABEL | T_ASYNC | T_LPAREN | T_UNDERSCORE | T_AMPER | T_PACKAGE_NAME => Reduce(0, NT_option_MUTABLE_, yy_action_377) + T_RPAREN => Reduce(1, NT_option_COMMA_, yy_action_1042) _ => Error } } -fn yy_state_875(_lookahead : YYSymbol) -> YYDecision { - match _lookahead { - T_RBRACE => Shift(yy_state_876) - _ => Error - } +fn yy_state_1240(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_non_empty_list_commas_rev_constructor_param_, yy_action_372) } -fn yy_state_876(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_simple_expr, yy_action_384) +fn yy_state_1241(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_option_MUTABLE_, yy_action_371) } -fn yy_state_877(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1242(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RBRACE => Shift(yy_state_878) + T_ASYNC => Shift(yy_state_65) + T_UNDERSCORE => Shift(yy_state_70) + T_AMPER => Shift(yy_state_71) + T_PACKAGE_NAME => Shift(yy_state_73) + T_UIDENT => Shift(yy_state_80) + T_LPAREN => Shift(yy_state_84) + NT_simple_type => Shift(yy_state_110) + T_POST_LABEL => Shift(yy_state_1243) + NT_type_ => Shift(yy_state_1246) _ => Error } } -fn yy_state_878(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_simple_expr, yy_action_382) -} - -fn yy_state_879(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1243(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_multiline_string => Shift(yy_state_2) - T_MULTILINE_INTERP => Shift(yy_state_4) - T_MULTILINE_STRING => Shift(yy_state_5) - T_REGEX_LITERAL => Shift(yy_state_6) - T_STRING => Shift(yy_state_7) - T_FLOAT => Shift(yy_state_8) - T_DOUBLE => Shift(yy_state_9) - T_INT => Shift(yy_state_10) - T_CHAR => Shift(yy_state_11) - T_BYTES => Shift(yy_state_12) - T_BYTE => Shift(yy_state_13) - T_FALSE => Shift(yy_state_14) - T_TRUE => Shift(yy_state_15) - T_INTERP => Shift(yy_state_16) - NT_non_empty_list_multiline_string_ => Shift(yy_state_17) - NT_simple_constant => Shift(yy_state_18) - T_AMPER => Shift(yy_state_19) - NT_qual_ident_ty => Shift(yy_state_25) - NT_tuple_expr => Shift(yy_state_26) - T_LBRACKET => Shift(yy_state_27) - NT_constr => Shift(yy_state_35) - NT_qual_ident_simple_expr => Shift(yy_state_36) - NT_atomic_expr => Shift(yy_state_37) - NT_anony_fn => Shift(yy_state_38) - T_LBRACE => Shift(yy_state_39) - T_FN => Shift(yy_state_48) - NT_type_name => Shift(yy_state_126) - T_ASYNC => Shift(yy_state_138) - NT_simple_expr => Shift(yy_state_151) - T_EXCLAMATION => Shift(yy_state_162) - T_MINUS => Shift(yy_state_178) - T_PLUS => Shift(yy_state_180) - T_UIDENT => Shift(yy_state_182) - T_PACKAGE_NAME => Shift(yy_state_183) - NT_prefix_expr => Shift(yy_state_187) - NT_range_expr => Shift(yy_state_198) - NT_postfix_expr => Shift(yy_state_416) - T_EXISTS => Shift(yy_state_417) - T_FORALL => Shift(yy_state_449) - NT_infix_expr => Shift(yy_state_455) - T_UNDERSCORE => Shift(yy_state_456) - T_LPAREN => Shift(yy_state_464) - NT_pipe_expr => Shift(yy_state_497) - NT_arrow_fn_expr => Shift(yy_state_513) - NT_quantifier_expr => Shift(yy_state_514) - NT_simple_try_expr => Shift(yy_state_515) - NT_lexmatch_expr => Shift(yy_state_516) - NT_match_expr => Shift(yy_state_517) - NT_if_expr => Shift(yy_state_518) - NT_try_expr => Shift(yy_state_519) - NT_while_expr => Shift(yy_state_520) - NT_foreach_expr => Shift(yy_state_521) - NT_for_expr => Shift(yy_state_522) - T_LEXMATCH => Shift(yy_state_523) - NT_lexmatch_header => Shift(yy_state_529) - NT_match_header => Shift(yy_state_540) - T_MATCH => Shift(yy_state_550) - T_IF => Shift(yy_state_553) - T_TRY_EXCLAMATION => Shift(yy_state_559) - T_TRY_QUESTION => Shift(yy_state_561) - T_TRY => Shift(yy_state_563) - NT_loop_label_colon => Shift(yy_state_577) - T_POST_LABEL => Shift(yy_state_585) - T_LIDENT => Shift(yy_state_587) - NT_expr => Shift(yy_state_880) - T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_902) + T_COLON => Shift(yy_state_1244) _ => Error } } -fn yy_state_880(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1244(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_COMMA => Shift(yy_state_881) - T_RBRACE => Shift(yy_state_884) + T_ASYNC => Shift(yy_state_65) + T_UNDERSCORE => Shift(yy_state_70) + T_AMPER => Shift(yy_state_71) + T_PACKAGE_NAME => Shift(yy_state_73) + T_UIDENT => Shift(yy_state_80) + T_LPAREN => Shift(yy_state_84) + NT_simple_type => Shift(yy_state_110) + NT_type_ => Shift(yy_state_1245) _ => Error } } -fn yy_state_881(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1245(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(4, NT_constructor_param, yy_action_370) +} + +fn yy_state_1246(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(2, NT_constructor_param, yy_action_369) +} + +fn yy_state_1247(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_record_defn_single => Shift(yy_state_130) - T_LIDENT => Shift(yy_state_135) - NT_non_empty_list_commas_rev_record_defn_single_ => Shift(yy_state_861) - NT_non_empty_list_commas_record_defn_single_ => Shift(yy_state_863) - NT_list_commas_record_defn_single_ => Shift(yy_state_882) - T_RBRACE => Reduce(0, NT_list_commas_record_defn_single_, yy_action_395) + T_EQUAL => Shift(yy_state_1248) + NT_option_eq_int_tag_ => Shift(yy_state_1250) + T_SEMI | T_RBRACE => Reduce(0, NT_option_eq_int_tag_, yy_action_368) _ => Error } } -fn yy_state_882(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1248(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RBRACE => Shift(yy_state_883) + T_INT => Shift(yy_state_1249) _ => Error } } -fn yy_state_883(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(6, NT_simple_expr, yy_action_381) +fn yy_state_1249(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(2, NT_option_eq_int_tag_, yy_action_366) } -fn yy_state_884(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(4, NT_simple_expr, yy_action_379) +fn yy_state_1250(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(4, NT_enum_constructor, yy_action_365) } -fn yy_state_885(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1251(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RBRACE => Shift(yy_state_886) + T_LPAREN => Shift(yy_state_1233) + NT_option_delimited_LPAREN_non_empty_list_commas_constructor_param__RPAREN__ => Shift(yy_state_1252) + T_EQUAL | T_SEMI | T_RBRACE => Reduce(0, NT_option_delimited_LPAREN_non_empty_list_commas_constructor_param__RPAREN__, yy_action_378) _ => Error } } -fn yy_state_886(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_simple_expr, yy_action_378) -} - -fn yy_state_887(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1252(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_multiline_string => Shift(yy_state_2) - T_MULTILINE_INTERP => Shift(yy_state_4) - T_MULTILINE_STRING => Shift(yy_state_5) - T_REGEX_LITERAL => Shift(yy_state_6) - T_STRING => Shift(yy_state_7) - T_CHAR => Shift(yy_state_11) - T_BYTES => Shift(yy_state_12) - T_BYTE => Shift(yy_state_13) - T_FALSE => Shift(yy_state_14) - T_TRUE => Shift(yy_state_15) - T_INTERP => Shift(yy_state_16) - NT_non_empty_list_multiline_string_ => Shift(yy_state_17) - NT_simple_constant => Shift(yy_state_18) - T_AMPER => Shift(yy_state_19) - NT_qual_ident_ty => Shift(yy_state_25) - NT_tuple_expr => Shift(yy_state_26) - T_LBRACKET => Shift(yy_state_27) - NT_constr => Shift(yy_state_35) - NT_qual_ident_simple_expr => Shift(yy_state_36) - NT_atomic_expr => Shift(yy_state_37) - NT_anony_fn => Shift(yy_state_38) - T_LBRACE => Shift(yy_state_39) - T_FN => Shift(yy_state_48) - NT_type_name => Shift(yy_state_126) - T_ASYNC => Shift(yy_state_138) - NT_simple_expr => Shift(yy_state_151) - T_EXCLAMATION => Shift(yy_state_162) - T_UNDERSCORE => Shift(yy_state_163) - T_LPAREN => Shift(yy_state_164) - T_MINUS => Shift(yy_state_178) - NT_prefix_expr => Shift(yy_state_179) - T_PLUS => Shift(yy_state_180) - T_UIDENT => Shift(yy_state_182) - T_PACKAGE_NAME => Shift(yy_state_183) - T_LIDENT => Shift(yy_state_186) - T_FLOAT => Shift(yy_state_888) - T_DOUBLE => Shift(yy_state_889) - T_INT => Shift(yy_state_890) + T_EQUAL => Shift(yy_state_1248) + NT_option_eq_int_tag_ => Shift(yy_state_1253) + T_SEMI | T_RBRACE => Reduce(0, NT_option_eq_int_tag_, yy_action_368) _ => Error } } -fn yy_state_888(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1253(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_enum_constructor, yy_action_364) +} + +fn yy_state_1254(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_list_semis_enum_constructor_, yy_action_363) +} + +fn yy_state_1255(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_INFIX1 | T_INFIX2 | T_INFIX3 | T_INFIX4 | T_CATCH | T_EQ_TILDE | T_LPAREN | T_MINUS | T_DOT_LIDENT | T_DOT_INT | T_SEMI | T_LBRACKET | T_PLUS | T_BAR | T_RBRACE | T_AMPERAMPER | T_AMPER | T_CARET | T_BARBAR | T_AS | T_PIPE | T_PIPE_LEFT | T_LT_PLUS | T_DOTDOT | T_RANGE_INCLUSIVE | T_RANGE_LT_INCLUSIVE | T_RANGE_EXCLUSIVE | T_RANGE_INCLUSIVE_REV | T_RANGE_EXCLUSIVE_REV | T_IS | T_IMPLIES | T_LEXMATCH_QUESTION => Reduce(1, NT_simple_constant, yy_action_895) - T_COLON => Reduce(2, NT_map_syntax_key, yy_action_645) + T_RBRACE => Shift(yy_state_1256) _ => Error } } -fn yy_state_889(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1256(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_INFIX1 | T_INFIX2 | T_INFIX3 | T_INFIX4 | T_CATCH | T_EQ_TILDE | T_LPAREN | T_MINUS | T_DOT_LIDENT | T_DOT_INT | T_SEMI | T_LBRACKET | T_PLUS | T_BAR | T_RBRACE | T_AMPERAMPER | T_AMPER | T_CARET | T_BARBAR | T_AS | T_PIPE | T_PIPE_LEFT | T_LT_PLUS | T_DOTDOT | T_RANGE_INCLUSIVE | T_RANGE_LT_INCLUSIVE | T_RANGE_EXCLUSIVE | T_RANGE_INCLUSIVE_REV | T_RANGE_EXCLUSIVE_REV | T_IS | T_IMPLIES | T_LEXMATCH_QUESTION => Reduce(1, NT_simple_constant, yy_action_894) - T_COLON => Reduce(2, NT_map_syntax_key, yy_action_644) + T_FOR => Shift(yy_state_1257) _ => Error } } -fn yy_state_890(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1257(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_INFIX1 | T_INFIX2 | T_INFIX3 | T_INFIX4 | T_CATCH | T_EQ_TILDE | T_LPAREN | T_MINUS | T_DOT_LIDENT | T_DOT_INT | T_SEMI | T_LBRACKET | T_PLUS | T_BAR | T_RBRACE | T_AMPERAMPER | T_AMPER | T_CARET | T_BARBAR | T_AS | T_PIPE | T_PIPE_LEFT | T_LT_PLUS | T_DOTDOT | T_RANGE_INCLUSIVE | T_RANGE_LT_INCLUSIVE | T_RANGE_EXCLUSIVE | T_RANGE_INCLUSIVE_REV | T_RANGE_EXCLUSIVE_REV | T_IS | T_IMPLIES | T_LEXMATCH_QUESTION => Reduce(1, NT_simple_constant, yy_action_893) - T_COLON => Reduce(2, NT_map_syntax_key, yy_action_643) + T_ASYNC => Shift(yy_state_65) + T_UNDERSCORE => Shift(yy_state_70) + T_AMPER => Shift(yy_state_71) + T_PACKAGE_NAME => Shift(yy_state_73) + T_UIDENT => Shift(yy_state_80) + T_LPAREN => Shift(yy_state_84) + NT_simple_type => Shift(yy_state_110) + NT_type_ => Shift(yy_state_1258) _ => Error } } -fn yy_state_891(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1258(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_FAT_ARROW => Shift(yy_state_588) - T_COLON => Shift(yy_state_892) - T_COMMA => Shift(yy_state_897) - T_AUGMENTED_ASSIGNMENT | T_PLUS_EQUAL | T_EQUAL => Reduce(1, NT_qual_ident, yy_action_513) - T_INFIX1 | T_INFIX2 | T_INFIX3 | T_INFIX4 | T_CATCH | T_EQ_TILDE | T_LPAREN | T_MINUS | T_DOT_LIDENT | T_DOT_INT | T_SEMI | T_LBRACKET | T_PLUS | T_BAR | T_RBRACE | T_AMPERAMPER | T_AMPER | T_CARET | T_BARBAR | T_AS | T_PIPE | T_PIPE_LEFT | T_LT_PLUS | T_DOTDOT | T_RANGE_INCLUSIVE | T_RANGE_LT_INCLUSIVE | T_RANGE_EXCLUSIVE | T_RANGE_INCLUSIVE_REV | T_RANGE_EXCLUSIVE_REV | T_IS | T_IMPLIES | T_LEXMATCH_QUESTION => Reduce(1, NT_qual_ident_simple_expr, yy_action_772) + T_WITH => Shift(yy_state_1259) _ => Error } } -fn yy_state_892(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1259(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_multiline_string => Shift(yy_state_2) - T_MULTILINE_INTERP => Shift(yy_state_4) - T_MULTILINE_STRING => Shift(yy_state_5) - T_REGEX_LITERAL => Shift(yy_state_6) - T_STRING => Shift(yy_state_7) - T_FLOAT => Shift(yy_state_8) - T_DOUBLE => Shift(yy_state_9) - T_INT => Shift(yy_state_10) - T_CHAR => Shift(yy_state_11) - T_BYTES => Shift(yy_state_12) - T_BYTE => Shift(yy_state_13) - T_FALSE => Shift(yy_state_14) - T_TRUE => Shift(yy_state_15) - T_INTERP => Shift(yy_state_16) - NT_non_empty_list_multiline_string_ => Shift(yy_state_17) - NT_simple_constant => Shift(yy_state_18) - T_AMPER => Shift(yy_state_19) - NT_qual_ident_ty => Shift(yy_state_25) - NT_tuple_expr => Shift(yy_state_26) - T_LBRACKET => Shift(yy_state_27) - NT_constr => Shift(yy_state_35) - NT_qual_ident_simple_expr => Shift(yy_state_36) - NT_atomic_expr => Shift(yy_state_37) - NT_anony_fn => Shift(yy_state_38) - T_LBRACE => Shift(yy_state_39) - T_FN => Shift(yy_state_48) - NT_type_name => Shift(yy_state_126) - T_ASYNC => Shift(yy_state_138) - NT_simple_expr => Shift(yy_state_151) - T_EXCLAMATION => Shift(yy_state_162) - T_MINUS => Shift(yy_state_178) - T_PLUS => Shift(yy_state_180) - T_UIDENT => Shift(yy_state_182) - T_PACKAGE_NAME => Shift(yy_state_183) - NT_prefix_expr => Shift(yy_state_187) - NT_range_expr => Shift(yy_state_198) - NT_postfix_expr => Shift(yy_state_416) - T_EXISTS => Shift(yy_state_417) - T_FORALL => Shift(yy_state_449) - NT_infix_expr => Shift(yy_state_455) - T_UNDERSCORE => Shift(yy_state_456) - T_LPAREN => Shift(yy_state_464) - NT_pipe_expr => Shift(yy_state_497) - NT_arrow_fn_expr => Shift(yy_state_513) - NT_quantifier_expr => Shift(yy_state_514) - NT_simple_try_expr => Shift(yy_state_515) - NT_lexmatch_expr => Shift(yy_state_516) - NT_match_expr => Shift(yy_state_517) - NT_if_expr => Shift(yy_state_518) - NT_try_expr => Shift(yy_state_519) - NT_while_expr => Shift(yy_state_520) - NT_foreach_expr => Shift(yy_state_521) - NT_for_expr => Shift(yy_state_522) - T_LEXMATCH => Shift(yy_state_523) - NT_lexmatch_header => Shift(yy_state_529) - NT_match_header => Shift(yy_state_540) - T_MATCH => Shift(yy_state_550) - T_IF => Shift(yy_state_553) - T_TRY_EXCLAMATION => Shift(yy_state_559) - T_TRY_QUESTION => Shift(yy_state_561) - T_TRY => Shift(yy_state_563) - NT_loop_label_colon => Shift(yy_state_577) - T_POST_LABEL => Shift(yy_state_585) - T_LIDENT => Shift(yy_state_587) - NT_expr => Shift(yy_state_893) - T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_902) + T_EXTEND => Shift(yy_state_1260) + T_LIDENT => Shift(yy_state_1263) _ => Error } } -fn yy_state_893(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1260(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_COMMA => Shift(yy_state_894) - NT_option_COMMA_ => Shift(yy_state_896) - T_RBRACE => Reduce(0, NT_option_COMMA_, yy_action_876) + T_LPAREN => Shift(yy_state_157) + NT_parameters => Shift(yy_state_1261) _ => Error } } -fn yy_state_894(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1261(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_record_defn_single => Shift(yy_state_130) - NT_non_empty_list_commas_rev_record_defn_single_ => Shift(yy_state_131) - T_LIDENT => Shift(yy_state_135) - NT_non_empty_list_commas_with_trailing_info_record_defn_single_ => Shift(yy_state_895) - T_RBRACE => Reduce(1, NT_option_COMMA_, yy_action_874) + T_LBRACE => Shift(yy_state_133) + NT_block_expr => Shift(yy_state_1262) _ => Error } } -fn yy_state_895(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(5, NT_record_defn, yy_action_377) -} - -fn yy_state_896(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(4, NT_record_defn, yy_action_375) +fn yy_state_1262(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(12, NT_structure_item, yy_action_362) } -fn yy_state_897(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1263(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_record_defn_single => Shift(yy_state_130) - NT_non_empty_list_commas_rev_record_defn_single_ => Shift(yy_state_131) - T_LIDENT => Shift(yy_state_135) - NT_non_empty_list_commas_with_trailing_info_record_defn_single_ => Shift(yy_state_857) - NT_list_commas_with_trailing_info_record_defn_single_ => Shift(yy_state_898) - T_RBRACE => Reduce(0, NT_list_commas_with_trailing_info_record_defn_single_, yy_action_810) + T_LPAREN => Shift(yy_state_157) + NT_parameters => Shift(yy_state_1264) _ => Error } } -fn yy_state_898(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_record_defn, yy_action_373) +fn yy_state_1264(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_LBRACE => Shift(yy_state_133) + NT_block_expr => Shift(yy_state_1265) + _ => Error + } } -fn yy_state_899(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_spreadable_elem, yy_action_372) +fn yy_state_1265(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(12, NT_structure_item, yy_action_361) } -fn yy_state_900(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_list_commas_spreadable_elem_, yy_action_371) +fn yy_state_1266(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_optional_type_parameters, yy_action_360) } -fn yy_state_901(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1267(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RBRACKET => Shift(yy_state_902) + NT_tvar_binder => Shift(yy_state_1268) + NT_non_empty_list_commas_rev_id_tvar_binder__ => Shift(yy_state_1269) + T_UIDENT => Shift(yy_state_1272) + NT_non_empty_list_commas_id_tvar_binder__ => Shift(yy_state_1280) _ => Error } } -fn yy_state_902(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_simple_expr, yy_action_370) +fn yy_state_1268(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_non_empty_list_commas_rev_id_tvar_binder__, yy_action_359) } -fn yy_state_903(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1269(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_foreach_binder => Shift(yy_state_579) - NT_non_empty_list_commas_rev_foreach_binder_ => Shift(yy_state_604) - T_UNDERSCORE => Shift(yy_state_607) - NT_non_empty_list_commas_rev_separated_pair_binder_EQUAL_infix_expr__ => Shift(yy_state_904) - NT_non_empty_list_commas_no_trailing_separated_pair_binder_EQUAL_infix_expr__ => Shift(yy_state_909) - NT_list_comp_for_header => Shift(yy_state_910) - NT_non_empty_list_commas_foreach_binder_ => Shift(yy_state_915) - NT_list_commas_no_trailing_separated_pair_binder_EQUAL_infix_expr__ => Shift(yy_state_930) - T_LIDENT => Shift(yy_state_931) - NT_for_binders_infix => Shift(yy_state_932) - T_SEMI | T_IF | T_FAT_ARROW => Reduce(0, NT_list_commas_no_trailing_separated_pair_binder_EQUAL_infix_expr__, yy_action_369) + T_COMMA => Shift(yy_state_1270) + NT_option_COMMA_ => Shift(yy_state_1279) + T_RBRACKET => Reduce(0, NT_option_COMMA_, yy_action_1044) _ => Error } } -fn yy_state_904(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1270(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_COMMA => Shift(yy_state_905) - T_SEMI | T_IF | T_FAT_ARROW => Reduce(1, NT_non_empty_list_commas_no_trailing_separated_pair_binder_EQUAL_infix_expr__, yy_action_368) + NT_tvar_binder => Shift(yy_state_1271) + T_UIDENT => Shift(yy_state_1272) + T_RBRACKET => Reduce(1, NT_option_COMMA_, yy_action_1042) _ => Error } } -fn yy_state_905(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1271(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_non_empty_list_commas_rev_id_tvar_binder__, yy_action_357) +} + +fn yy_state_1272(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LIDENT => Shift(yy_state_906) + T_COLON => Shift(yy_state_1273) + T_COMMA | T_RBRACKET => Reduce(1, NT_tvar_binder, yy_action_356) _ => Error } } -fn yy_state_906(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1273(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_EQUAL => Shift(yy_state_907) + T_PACKAGE_NAME => Shift(yy_state_22) + T_UIDENT => Shift(yy_state_25) + NT_tvar_constraint => Shift(yy_state_1274) + NT_qual_ident_ty => Shift(yy_state_1277) + NT_separated_nonempty_list_PLUS_tvar_constraint_ => Shift(yy_state_1278) _ => Error } } -fn yy_state_907(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1274(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_multiline_string => Shift(yy_state_2) - T_MULTILINE_INTERP => Shift(yy_state_4) - T_MULTILINE_STRING => Shift(yy_state_5) - T_REGEX_LITERAL => Shift(yy_state_6) - T_STRING => Shift(yy_state_7) - T_FLOAT => Shift(yy_state_8) - T_DOUBLE => Shift(yy_state_9) - T_INT => Shift(yy_state_10) - T_CHAR => Shift(yy_state_11) - T_BYTES => Shift(yy_state_12) - T_BYTE => Shift(yy_state_13) - T_FALSE => Shift(yy_state_14) - T_TRUE => Shift(yy_state_15) - T_INTERP => Shift(yy_state_16) - NT_non_empty_list_multiline_string_ => Shift(yy_state_17) - NT_simple_constant => Shift(yy_state_18) - T_AMPER => Shift(yy_state_19) - NT_qual_ident_ty => Shift(yy_state_25) - NT_tuple_expr => Shift(yy_state_26) - T_LBRACKET => Shift(yy_state_27) - NT_constr => Shift(yy_state_35) - NT_qual_ident_simple_expr => Shift(yy_state_36) - NT_atomic_expr => Shift(yy_state_37) - NT_anony_fn => Shift(yy_state_38) - T_LBRACE => Shift(yy_state_39) - T_FN => Shift(yy_state_48) - NT_type_name => Shift(yy_state_126) - T_ASYNC => Shift(yy_state_138) - NT_simple_expr => Shift(yy_state_151) - T_EXCLAMATION => Shift(yy_state_162) - T_UNDERSCORE => Shift(yy_state_163) - T_LPAREN => Shift(yy_state_164) - T_MINUS => Shift(yy_state_178) - T_PLUS => Shift(yy_state_180) - T_UIDENT => Shift(yy_state_182) - T_PACKAGE_NAME => Shift(yy_state_183) - T_LIDENT => Shift(yy_state_186) - NT_prefix_expr => Shift(yy_state_187) - NT_range_expr => Shift(yy_state_198) - NT_postfix_expr => Shift(yy_state_416) - NT_infix_expr => Shift(yy_state_908) + T_PLUS => Shift(yy_state_1275) + T_COMMA | T_RBRACKET | T_LBRACE => Reduce(1, NT_separated_nonempty_list_PLUS_tvar_constraint_, yy_action_355) _ => Error } } -fn yy_state_908(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1275(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_BARBAR => Shift(yy_state_423) - T_AMPERAMPER => Shift(yy_state_425) - T_BAR => Shift(yy_state_427) - T_CARET => Shift(yy_state_429) - T_AMPER => Shift(yy_state_431) - T_MINUS => Shift(yy_state_433) - T_PLUS => Shift(yy_state_435) - T_INFIX1 => Shift(yy_state_437) - T_INFIX2 => Shift(yy_state_439) - T_INFIX3 => Shift(yy_state_441) - T_INFIX4 => Shift(yy_state_443) - T_IMPLIES => Shift(yy_state_445) - T_COMMA | T_SEMI | T_IF | T_FAT_ARROW => Reduce(5, NT_non_empty_list_commas_rev_separated_pair_binder_EQUAL_infix_expr__, yy_action_367) + T_PACKAGE_NAME => Shift(yy_state_22) + T_UIDENT => Shift(yy_state_25) + NT_tvar_constraint => Shift(yy_state_1274) + NT_separated_nonempty_list_PLUS_tvar_constraint_ => Shift(yy_state_1276) + NT_qual_ident_ty => Shift(yy_state_1277) _ => Error } } -fn yy_state_909(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_list_commas_no_trailing_separated_pair_binder_EQUAL_infix_expr__, yy_action_366) +fn yy_state_1276(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_separated_nonempty_list_PLUS_tvar_constraint_, yy_action_354) } -fn yy_state_910(_lookahead : YYSymbol) -> YYDecision { - match _lookahead { - T_IF => Shift(yy_state_546) - NT_option_preceded_IF_infix_expr__ => Shift(yy_state_911) - T_FAT_ARROW => Reduce(0, NT_option_preceded_IF_infix_expr__, yy_action_547) - _ => Error - } +fn yy_state_1277(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_tvar_constraint, yy_action_353) } -fn yy_state_911(_lookahead : YYSymbol) -> YYDecision { - match _lookahead { - T_FAT_ARROW => Shift(yy_state_912) - _ => Error - } +fn yy_state_1278(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_tvar_binder, yy_action_352) } -fn yy_state_912(_lookahead : YYSymbol) -> YYDecision { - match _lookahead { - NT_multiline_string => Shift(yy_state_2) - T_MULTILINE_INTERP => Shift(yy_state_4) - T_MULTILINE_STRING => Shift(yy_state_5) - T_REGEX_LITERAL => Shift(yy_state_6) - T_STRING => Shift(yy_state_7) - T_FLOAT => Shift(yy_state_8) - T_DOUBLE => Shift(yy_state_9) - T_INT => Shift(yy_state_10) - T_CHAR => Shift(yy_state_11) - T_BYTES => Shift(yy_state_12) - T_BYTE => Shift(yy_state_13) - T_FALSE => Shift(yy_state_14) - T_TRUE => Shift(yy_state_15) - T_INTERP => Shift(yy_state_16) - NT_non_empty_list_multiline_string_ => Shift(yy_state_17) - NT_simple_constant => Shift(yy_state_18) - T_AMPER => Shift(yy_state_19) - NT_qual_ident_ty => Shift(yy_state_25) - NT_tuple_expr => Shift(yy_state_26) - T_LBRACKET => Shift(yy_state_27) - NT_constr => Shift(yy_state_35) - NT_qual_ident_simple_expr => Shift(yy_state_36) - NT_atomic_expr => Shift(yy_state_37) - NT_anony_fn => Shift(yy_state_38) - T_LBRACE => Shift(yy_state_39) - T_FN => Shift(yy_state_48) - NT_type_name => Shift(yy_state_126) - T_ASYNC => Shift(yy_state_138) - NT_simple_expr => Shift(yy_state_151) - T_EXCLAMATION => Shift(yy_state_162) - T_MINUS => Shift(yy_state_178) - T_PLUS => Shift(yy_state_180) - T_UIDENT => Shift(yy_state_182) - T_PACKAGE_NAME => Shift(yy_state_183) - NT_prefix_expr => Shift(yy_state_187) - NT_range_expr => Shift(yy_state_198) - NT_postfix_expr => Shift(yy_state_416) - T_EXISTS => Shift(yy_state_417) - T_FORALL => Shift(yy_state_449) - NT_infix_expr => Shift(yy_state_455) - T_UNDERSCORE => Shift(yy_state_456) - T_LPAREN => Shift(yy_state_464) - NT_pipe_expr => Shift(yy_state_497) - NT_arrow_fn_expr => Shift(yy_state_513) - NT_quantifier_expr => Shift(yy_state_514) - NT_simple_try_expr => Shift(yy_state_515) - NT_lexmatch_expr => Shift(yy_state_516) - NT_match_expr => Shift(yy_state_517) - NT_if_expr => Shift(yy_state_518) - NT_try_expr => Shift(yy_state_519) - NT_while_expr => Shift(yy_state_520) - NT_foreach_expr => Shift(yy_state_521) - NT_for_expr => Shift(yy_state_522) - T_LEXMATCH => Shift(yy_state_523) - NT_lexmatch_header => Shift(yy_state_529) - NT_match_header => Shift(yy_state_540) - T_MATCH => Shift(yy_state_550) - T_IF => Shift(yy_state_553) - T_TRY_EXCLAMATION => Shift(yy_state_559) - T_TRY_QUESTION => Shift(yy_state_561) - T_TRY => Shift(yy_state_563) - NT_loop_label_colon => Shift(yy_state_577) - T_POST_LABEL => Shift(yy_state_585) - T_LIDENT => Shift(yy_state_587) - NT_expr => Shift(yy_state_913) - T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_902) - _ => Error - } +fn yy_state_1279(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(2, NT_non_empty_list_commas_id_tvar_binder__, yy_action_351) } -fn yy_state_913(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1280(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RBRACKET => Shift(yy_state_914) + T_RBRACKET => Shift(yy_state_1281) _ => Error } } -fn yy_state_914(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(7, NT_simple_expr, yy_action_365) +fn yy_state_1281(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_type_parameters, yy_action_349) } -fn yy_state_915(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1282(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_IN => Shift(yy_state_916) + NT_type_parameters => Shift(yy_state_1223) + NT_option_type_parameters_ => Shift(yy_state_1266) + T_LBRACKET => Shift(yy_state_1267) + NT_optional_type_parameters => Shift(yy_state_1283) + T_UIDENT | T_AMPER | T_PACKAGE_NAME => Reduce(0, NT_option_type_parameters_, yy_action_383) _ => Error } } -fn yy_state_916(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1283(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_multiline_string => Shift(yy_state_2) - T_MULTILINE_INTERP => Shift(yy_state_4) - T_MULTILINE_STRING => Shift(yy_state_5) - T_REGEX_LITERAL => Shift(yy_state_6) - T_STRING => Shift(yy_state_7) - T_FLOAT => Shift(yy_state_8) - T_DOUBLE => Shift(yy_state_9) - T_INT => Shift(yy_state_10) - T_CHAR => Shift(yy_state_11) - T_BYTES => Shift(yy_state_12) - T_BYTE => Shift(yy_state_13) - T_FALSE => Shift(yy_state_14) - T_TRUE => Shift(yy_state_15) - T_INTERP => Shift(yy_state_16) - NT_non_empty_list_multiline_string_ => Shift(yy_state_17) - NT_simple_constant => Shift(yy_state_18) - T_AMPER => Shift(yy_state_19) - NT_qual_ident_ty => Shift(yy_state_25) - NT_tuple_expr => Shift(yy_state_26) - T_LBRACKET => Shift(yy_state_27) - NT_constr => Shift(yy_state_35) - NT_qual_ident_simple_expr => Shift(yy_state_36) - NT_atomic_expr => Shift(yy_state_37) - NT_anony_fn => Shift(yy_state_38) - T_LBRACE => Shift(yy_state_39) - T_FN => Shift(yy_state_48) - NT_type_name => Shift(yy_state_126) - T_ASYNC => Shift(yy_state_138) - NT_simple_expr => Shift(yy_state_151) - T_EXCLAMATION => Shift(yy_state_162) - T_UNDERSCORE => Shift(yy_state_163) - T_LPAREN => Shift(yy_state_164) - T_MINUS => Shift(yy_state_178) - T_PLUS => Shift(yy_state_180) - T_UIDENT => Shift(yy_state_182) - T_PACKAGE_NAME => Shift(yy_state_183) - T_LIDENT => Shift(yy_state_186) - NT_prefix_expr => Shift(yy_state_187) - NT_range_expr => Shift(yy_state_198) - NT_postfix_expr => Shift(yy_state_416) - NT_infix_expr => Shift(yy_state_917) + T_AMPER => Shift(yy_state_20) + T_PACKAGE_NAME => Shift(yy_state_22) + T_UIDENT => Shift(yy_state_25) + NT_qual_ident_ty => Shift(yy_state_26) + NT_type_name => Shift(yy_state_1284) _ => Error } } -fn yy_state_917(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1284(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_BARBAR => Shift(yy_state_423) - T_AMPERAMPER => Shift(yy_state_425) - T_BAR => Shift(yy_state_427) - T_CARET => Shift(yy_state_429) - T_AMPER => Shift(yy_state_431) - T_MINUS => Shift(yy_state_433) - T_PLUS => Shift(yy_state_435) - T_INFIX1 => Shift(yy_state_437) - T_INFIX2 => Shift(yy_state_439) - T_INFIX3 => Shift(yy_state_441) - T_INFIX4 => Shift(yy_state_443) - T_IMPLIES => Shift(yy_state_445) - NT_foreach_optional_loop_vars_infix => Shift(yy_state_918) - T_SEMI => Shift(yy_state_923) - T_IF | T_FAT_ARROW => Reduce(0, NT_foreach_optional_loop_vars_infix, yy_action_364) + T_WITH => Shift(yy_state_1285) + T_FOR => Shift(yy_state_1300) _ => Error } } -fn yy_state_918(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1285(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_IF => Shift(yy_state_546) - NT_option_preceded_IF_infix_expr__ => Shift(yy_state_919) - T_FAT_ARROW => Reduce(0, NT_option_preceded_IF_infix_expr__, yy_action_547) + T_FN => Shift(yy_state_1286) + NT_impl_optional_fn => Shift(yy_state_1288) + T_LIDENT | T_EXTEND => Reduce(0, NT_impl_optional_fn, yy_action_348) _ => Error } } -fn yy_state_919(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1286(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_FAT_ARROW => Shift(yy_state_920) + NT_type_parameters => Shift(yy_state_1223) + NT_option_type_parameters_ => Shift(yy_state_1266) + T_LBRACKET => Shift(yy_state_1267) + NT_optional_type_parameters => Shift(yy_state_1287) + T_LIDENT | T_EXTEND => Reduce(0, NT_option_type_parameters_, yy_action_383) _ => Error } } -fn yy_state_920(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1287(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(2, NT_impl_optional_fn, yy_action_347) +} + +fn yy_state_1288(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_multiline_string => Shift(yy_state_2) - T_MULTILINE_INTERP => Shift(yy_state_4) - T_MULTILINE_STRING => Shift(yy_state_5) - T_REGEX_LITERAL => Shift(yy_state_6) - T_STRING => Shift(yy_state_7) - T_FLOAT => Shift(yy_state_8) - T_DOUBLE => Shift(yy_state_9) - T_INT => Shift(yy_state_10) - T_CHAR => Shift(yy_state_11) - T_BYTES => Shift(yy_state_12) - T_BYTE => Shift(yy_state_13) - T_FALSE => Shift(yy_state_14) - T_TRUE => Shift(yy_state_15) - T_INTERP => Shift(yy_state_16) - NT_non_empty_list_multiline_string_ => Shift(yy_state_17) - NT_simple_constant => Shift(yy_state_18) - T_AMPER => Shift(yy_state_19) - NT_qual_ident_ty => Shift(yy_state_25) - NT_tuple_expr => Shift(yy_state_26) - T_LBRACKET => Shift(yy_state_27) - NT_constr => Shift(yy_state_35) - NT_qual_ident_simple_expr => Shift(yy_state_36) - NT_atomic_expr => Shift(yy_state_37) - NT_anony_fn => Shift(yy_state_38) - T_LBRACE => Shift(yy_state_39) - T_FN => Shift(yy_state_48) - NT_type_name => Shift(yy_state_126) - T_ASYNC => Shift(yy_state_138) - NT_simple_expr => Shift(yy_state_151) - T_EXCLAMATION => Shift(yy_state_162) - T_MINUS => Shift(yy_state_178) - T_PLUS => Shift(yy_state_180) - T_UIDENT => Shift(yy_state_182) - T_PACKAGE_NAME => Shift(yy_state_183) - NT_prefix_expr => Shift(yy_state_187) - NT_range_expr => Shift(yy_state_198) - NT_postfix_expr => Shift(yy_state_416) - T_EXISTS => Shift(yy_state_417) - T_FORALL => Shift(yy_state_449) - NT_infix_expr => Shift(yy_state_455) - T_UNDERSCORE => Shift(yy_state_456) - T_LPAREN => Shift(yy_state_464) - NT_pipe_expr => Shift(yy_state_497) - NT_arrow_fn_expr => Shift(yy_state_513) - NT_quantifier_expr => Shift(yy_state_514) - NT_simple_try_expr => Shift(yy_state_515) - NT_lexmatch_expr => Shift(yy_state_516) - NT_match_expr => Shift(yy_state_517) - NT_if_expr => Shift(yy_state_518) - NT_try_expr => Shift(yy_state_519) - NT_while_expr => Shift(yy_state_520) - NT_foreach_expr => Shift(yy_state_521) - NT_for_expr => Shift(yy_state_522) - T_LEXMATCH => Shift(yy_state_523) - NT_lexmatch_header => Shift(yy_state_529) - NT_match_header => Shift(yy_state_540) - T_MATCH => Shift(yy_state_550) - T_IF => Shift(yy_state_553) - T_TRY_EXCLAMATION => Shift(yy_state_559) - T_TRY_QUESTION => Shift(yy_state_561) - T_TRY => Shift(yy_state_563) - NT_loop_label_colon => Shift(yy_state_577) - T_POST_LABEL => Shift(yy_state_585) - T_LIDENT => Shift(yy_state_587) - NT_expr => Shift(yy_state_921) - T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_902) + T_EXTEND => Shift(yy_state_1289) + T_LIDENT => Shift(yy_state_1296) _ => Error } } -fn yy_state_921(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1289(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RBRACKET => Shift(yy_state_922) + T_LPAREN => Shift(yy_state_157) + NT_parameters => Shift(yy_state_1290) _ => Error } } -fn yy_state_922(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(10, NT_simple_expr, yy_action_363) -} - -fn yy_state_923(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1290(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_non_empty_list_commas_rev_separated_pair_binder_EQUAL_infix_expr__ => Shift(yy_state_904) - NT_non_empty_list_commas_no_trailing_separated_pair_binder_EQUAL_infix_expr__ => Shift(yy_state_909) - T_LIDENT => Shift(yy_state_924) - NT_for_binders_infix => Shift(yy_state_927) - NT_list_commas_no_trailing_separated_pair_binder_EQUAL_infix_expr__ => Shift(yy_state_930) - T_SEMI | T_IF | T_FAT_ARROW => Reduce(0, NT_list_commas_no_trailing_separated_pair_binder_EQUAL_infix_expr__, yy_action_369) + NT_error_annotation => Shift(yy_state_63) + T_THIN_ARROW => Shift(yy_state_64) + T_NORAISE => Shift(yy_state_91) + T_RAISE => Shift(yy_state_92) + NT_func_return_type => Shift(yy_state_1291) + T_EQUAL | T_LBRACE => Reduce(0, NT_func_return_type, yy_action_1023) _ => Error } } -fn yy_state_924(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1291(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_EQUAL => Shift(yy_state_925) + T_LBRACE => Shift(yy_state_133) + NT_impl_body => Shift(yy_state_1292) + T_EQUAL => Shift(yy_state_1293) + NT_block_expr => Shift(yy_state_1295) _ => Error } } -fn yy_state_925(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1292(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(9, NT_structure_item, yy_action_346) +} + +fn yy_state_1293(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_multiline_string => Shift(yy_state_2) - T_MULTILINE_INTERP => Shift(yy_state_4) - T_MULTILINE_STRING => Shift(yy_state_5) - T_REGEX_LITERAL => Shift(yy_state_6) - T_STRING => Shift(yy_state_7) - T_FLOAT => Shift(yy_state_8) - T_DOUBLE => Shift(yy_state_9) - T_INT => Shift(yy_state_10) - T_CHAR => Shift(yy_state_11) - T_BYTES => Shift(yy_state_12) - T_BYTE => Shift(yy_state_13) - T_FALSE => Shift(yy_state_14) - T_TRUE => Shift(yy_state_15) - T_INTERP => Shift(yy_state_16) - NT_non_empty_list_multiline_string_ => Shift(yy_state_17) - NT_simple_constant => Shift(yy_state_18) - T_AMPER => Shift(yy_state_19) - NT_qual_ident_ty => Shift(yy_state_25) - NT_tuple_expr => Shift(yy_state_26) - T_LBRACKET => Shift(yy_state_27) - NT_constr => Shift(yy_state_35) - NT_qual_ident_simple_expr => Shift(yy_state_36) - NT_atomic_expr => Shift(yy_state_37) - NT_anony_fn => Shift(yy_state_38) - T_LBRACE => Shift(yy_state_39) - T_FN => Shift(yy_state_48) - NT_type_name => Shift(yy_state_126) - T_ASYNC => Shift(yy_state_138) - NT_simple_expr => Shift(yy_state_151) - T_EXCLAMATION => Shift(yy_state_162) - T_UNDERSCORE => Shift(yy_state_163) - T_LPAREN => Shift(yy_state_164) - T_MINUS => Shift(yy_state_178) - T_PLUS => Shift(yy_state_180) - T_UIDENT => Shift(yy_state_182) - T_PACKAGE_NAME => Shift(yy_state_183) - T_LIDENT => Shift(yy_state_186) - NT_prefix_expr => Shift(yy_state_187) - NT_range_expr => Shift(yy_state_198) - NT_postfix_expr => Shift(yy_state_416) - NT_infix_expr => Shift(yy_state_926) + T_STRING => Shift(yy_state_1294) _ => Error } } -fn yy_state_926(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1294(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(2, NT_impl_body, yy_action_345) +} + +fn yy_state_1295(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_impl_body, yy_action_344) +} + +fn yy_state_1296(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_BARBAR => Shift(yy_state_423) - T_AMPERAMPER => Shift(yy_state_425) - T_BAR => Shift(yy_state_427) - T_CARET => Shift(yy_state_429) - T_AMPER => Shift(yy_state_431) - T_MINUS => Shift(yy_state_433) - T_PLUS => Shift(yy_state_435) - T_INFIX1 => Shift(yy_state_437) - T_INFIX2 => Shift(yy_state_439) - T_INFIX3 => Shift(yy_state_441) - T_INFIX4 => Shift(yy_state_443) - T_IMPLIES => Shift(yy_state_445) - T_COMMA | T_SEMI | T_IF | T_FAT_ARROW => Reduce(3, NT_non_empty_list_commas_rev_separated_pair_binder_EQUAL_infix_expr__, yy_action_361) + T_LPAREN => Shift(yy_state_157) + NT_parameters => Shift(yy_state_1297) _ => Error } } -fn yy_state_927(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1297(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_SEMI => Shift(yy_state_928) - T_IF | T_FAT_ARROW => Reduce(2, NT_foreach_optional_loop_vars_infix, yy_action_360) + NT_error_annotation => Shift(yy_state_63) + T_THIN_ARROW => Shift(yy_state_64) + T_NORAISE => Shift(yy_state_91) + T_RAISE => Shift(yy_state_92) + NT_func_return_type => Shift(yy_state_1298) + T_EQUAL | T_LBRACE => Reduce(0, NT_func_return_type, yy_action_1023) _ => Error } } -fn yy_state_928(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1298(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_non_empty_list_commas_rev_separated_pair_binder_EQUAL_infix_expr__ => Shift(yy_state_904) - NT_non_empty_list_commas_no_trailing_separated_pair_binder_EQUAL_infix_expr__ => Shift(yy_state_909) - T_LIDENT => Shift(yy_state_924) - NT_for_binders_infix => Shift(yy_state_929) - NT_list_commas_no_trailing_separated_pair_binder_EQUAL_infix_expr__ => Shift(yy_state_930) - T_IF | T_FAT_ARROW => Reduce(0, NT_list_commas_no_trailing_separated_pair_binder_EQUAL_infix_expr__, yy_action_369) + T_LBRACE => Shift(yy_state_133) + T_EQUAL => Shift(yy_state_1293) + NT_block_expr => Shift(yy_state_1295) + NT_impl_body => Shift(yy_state_1299) _ => Error } } -fn yy_state_929(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(4, NT_foreach_optional_loop_vars_infix, yy_action_359) +fn yy_state_1299(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(9, NT_structure_item, yy_action_343) } -fn yy_state_930(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_for_binders_infix, yy_action_358) +fn yy_state_1300(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_ASYNC => Shift(yy_state_65) + T_UNDERSCORE => Shift(yy_state_70) + T_AMPER => Shift(yy_state_71) + T_PACKAGE_NAME => Shift(yy_state_73) + T_UIDENT => Shift(yy_state_80) + T_LPAREN => Shift(yy_state_84) + NT_simple_type => Shift(yy_state_110) + NT_type_ => Shift(yy_state_1301) + _ => Error + } } -fn yy_state_931(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1301(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_EQUAL => Shift(yy_state_925) - T_COMMA | T_IN => Reduce(1, NT_foreach_binder, yy_action_510) + T_WITH => Shift(yy_state_1302) + T_EOF | T_SEMI => Reduce(5, NT_structure_item, yy_action_342) _ => Error } } -fn yy_state_932(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1302(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_SEMI => Shift(yy_state_933) - T_IF | T_FAT_ARROW => Reduce(1, NT_list_comp_for_header, yy_action_357) + T_FN => Shift(yy_state_1286) + NT_impl_optional_fn => Shift(yy_state_1303) + T_LIDENT | T_EXTEND => Reduce(0, NT_impl_optional_fn, yy_action_348) _ => Error } } -fn yy_state_933(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1303(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_multiline_string => Shift(yy_state_2) - T_MULTILINE_INTERP => Shift(yy_state_4) - T_MULTILINE_STRING => Shift(yy_state_5) - T_REGEX_LITERAL => Shift(yy_state_6) - T_STRING => Shift(yy_state_7) - T_FLOAT => Shift(yy_state_8) - T_DOUBLE => Shift(yy_state_9) - T_INT => Shift(yy_state_10) - T_CHAR => Shift(yy_state_11) - T_BYTES => Shift(yy_state_12) - T_BYTE => Shift(yy_state_13) - T_FALSE => Shift(yy_state_14) - T_TRUE => Shift(yy_state_15) - T_INTERP => Shift(yy_state_16) - NT_non_empty_list_multiline_string_ => Shift(yy_state_17) - NT_simple_constant => Shift(yy_state_18) - T_AMPER => Shift(yy_state_19) - NT_qual_ident_ty => Shift(yy_state_25) - NT_tuple_expr => Shift(yy_state_26) - T_LBRACKET => Shift(yy_state_27) - NT_constr => Shift(yy_state_35) - NT_qual_ident_simple_expr => Shift(yy_state_36) - NT_atomic_expr => Shift(yy_state_37) - NT_anony_fn => Shift(yy_state_38) - T_LBRACE => Shift(yy_state_39) - T_FN => Shift(yy_state_48) - NT_type_name => Shift(yy_state_126) - T_ASYNC => Shift(yy_state_138) - NT_simple_expr => Shift(yy_state_151) - T_EXCLAMATION => Shift(yy_state_162) - T_UNDERSCORE => Shift(yy_state_163) - T_LPAREN => Shift(yy_state_164) - T_MINUS => Shift(yy_state_178) - T_PLUS => Shift(yy_state_180) - T_UIDENT => Shift(yy_state_182) - T_PACKAGE_NAME => Shift(yy_state_183) - T_LIDENT => Shift(yy_state_186) - NT_prefix_expr => Shift(yy_state_187) - NT_range_expr => Shift(yy_state_198) - NT_postfix_expr => Shift(yy_state_416) - NT_infix_expr => Shift(yy_state_934) - NT_option_infix_expr_ => Shift(yy_state_935) - T_SEMI | T_IF | T_FAT_ARROW => Reduce(0, NT_option_infix_expr_, yy_action_490) + T_EXTEND => Shift(yy_state_1304) + T_LIDENT => Shift(yy_state_1308) _ => Error } } -fn yy_state_934(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1304(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_BARBAR => Shift(yy_state_423) - T_AMPERAMPER => Shift(yy_state_425) - T_BAR => Shift(yy_state_427) - T_CARET => Shift(yy_state_429) - T_AMPER => Shift(yy_state_431) - T_MINUS => Shift(yy_state_433) - T_PLUS => Shift(yy_state_435) - T_INFIX1 => Shift(yy_state_437) - T_INFIX2 => Shift(yy_state_439) - T_INFIX3 => Shift(yy_state_441) - T_INFIX4 => Shift(yy_state_443) - T_IMPLIES => Shift(yy_state_445) - T_SEMI | T_IF | T_FAT_ARROW => Reduce(1, NT_option_infix_expr_, yy_action_489) + T_LPAREN => Shift(yy_state_157) + NT_parameters => Shift(yy_state_1305) _ => Error } } -fn yy_state_935(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1305(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_SEMI => Shift(yy_state_936) - T_IF | T_FAT_ARROW => Reduce(3, NT_list_comp_for_header, yy_action_356) + NT_error_annotation => Shift(yy_state_63) + T_THIN_ARROW => Shift(yy_state_64) + T_NORAISE => Shift(yy_state_91) + T_RAISE => Shift(yy_state_92) + NT_func_return_type => Shift(yy_state_1306) + T_EQUAL | T_LBRACE => Reduce(0, NT_func_return_type, yy_action_1023) _ => Error } } -fn yy_state_936(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1306(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_non_empty_list_commas_rev_separated_pair_binder_EQUAL_infix_expr__ => Shift(yy_state_904) - NT_non_empty_list_commas_no_trailing_separated_pair_binder_EQUAL_infix_expr__ => Shift(yy_state_909) - T_LIDENT => Shift(yy_state_924) - NT_list_commas_no_trailing_separated_pair_binder_EQUAL_infix_expr__ => Shift(yy_state_930) - NT_for_binders_infix => Shift(yy_state_937) - T_IF | T_FAT_ARROW => Reduce(0, NT_list_commas_no_trailing_separated_pair_binder_EQUAL_infix_expr__, yy_action_369) + T_LBRACE => Shift(yy_state_133) + T_EQUAL => Shift(yy_state_1293) + NT_block_expr => Shift(yy_state_1295) + NT_impl_body => Shift(yy_state_1307) _ => Error } } -fn yy_state_937(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(5, NT_list_comp_for_header, yy_action_355) +fn yy_state_1307(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(11, NT_structure_item, yy_action_341) } -fn yy_state_938(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1308(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_EOF => Shift(yy_state_939) + T_LPAREN => Shift(yy_state_157) + NT_parameters => Shift(yy_state_1309) _ => Error } } -fn yy_state_939(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(2, NT_expression, yy_action_354) +fn yy_state_1309(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + NT_error_annotation => Shift(yy_state_63) + T_THIN_ARROW => Shift(yy_state_64) + T_NORAISE => Shift(yy_state_91) + T_RAISE => Shift(yy_state_92) + NT_func_return_type => Shift(yy_state_1310) + T_EQUAL | T_LBRACE => Reduce(0, NT_func_return_type, yy_action_1023) + _ => Error + } } -fn yy_state_940(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1310(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_structure => Shift(yy_state_941) - NT_structure_item => Shift(yy_state_942) - T_ATTRIBUTE => Shift(yy_state_946) - T_ENUM => Shift(yy_state_948) - T_STRUCT => Shift(yy_state_962) - T_SUBERROR => Shift(yy_state_965) - T_TYPE => Shift(yy_state_967) - T_USING => Shift(yy_state_970) - T_ENUMVIEW => Shift(yy_state_995) - T_IMPL => Shift(yy_state_1052) - T_TEST => Shift(yy_state_1073) - T_TRAIT => Shift(yy_state_1079) - NT_declare_fun_header => Shift(yy_state_1144) - NT_fun_header => Shift(yy_state_1145) - NT_extern_fun_header => Shift(yy_state_1154) - NT_val_header => Shift(yy_state_1159) - T_EXTENUM => Shift(yy_state_1162) - NT_enum_header => Shift(yy_state_1192) - NT_struct_header => Shift(yy_state_1197) - NT_suberror_header => Shift(yy_state_1281) - NT_type_header => Shift(yy_state_1287) - T_CONST => Shift(yy_state_1292) - T_LET => Shift(yy_state_1296) - T_EXTERN => Shift(yy_state_1300) - T_FN => Shift(yy_state_1313) - T_DECLARE => Shift(yy_state_1316) - NT_non_empty_list_attribute_ => Shift(yy_state_1452) - T_PUB => Shift(yy_state_1858) - T_PRIV => Shift(yy_state_1946) - NT_fun_header_generic => Shift(yy_state_2033) - T_ASYNC => Shift(yy_state_2036) - NT_non_empty_list_semis_structure_item_ => Shift(yy_state_2044) - NT_list_semis_structure_item_ => Shift(yy_state_2045) - T_EOF => Reduce(0, NT_list_semis_structure_item_, yy_action_353) + T_LBRACE => Shift(yy_state_133) + T_EQUAL => Shift(yy_state_1293) + NT_block_expr => Shift(yy_state_1295) + NT_impl_body => Shift(yy_state_1311) _ => Error } } -fn yy_state_941(_lookahead : YYSymbol) -> YYDecision { - Accept +fn yy_state_1311(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(11, NT_structure_item, yy_action_340) } -fn yy_state_942(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1312(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_option_SEMI_ => Shift(yy_state_943) - T_SEMI => Shift(yy_state_944) - T_EOF => Reduce(0, NT_option_SEMI_, yy_action_815) + T_STRING => Shift(yy_state_1313) + NT_option_loced_string_ => Shift(yy_state_1314) + T_LPAREN | T_LBRACE => Reduce(0, NT_option_loced_string_, yy_action_339) _ => Error } } -fn yy_state_943(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(2, NT_non_empty_list_semis_structure_item_, yy_action_352) +fn yy_state_1313(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_option_loced_string_, yy_action_337) } -fn yy_state_944(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1314(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_structure_item => Shift(yy_state_942) - NT_non_empty_list_semis_structure_item_ => Shift(yy_state_945) - T_ATTRIBUTE => Shift(yy_state_946) - T_ENUM => Shift(yy_state_948) - T_STRUCT => Shift(yy_state_962) - T_SUBERROR => Shift(yy_state_965) - T_TYPE => Shift(yy_state_967) - T_USING => Shift(yy_state_970) - T_ENUMVIEW => Shift(yy_state_995) - T_IMPL => Shift(yy_state_1052) - T_TEST => Shift(yy_state_1073) - T_TRAIT => Shift(yy_state_1079) - NT_declare_fun_header => Shift(yy_state_1144) - NT_fun_header => Shift(yy_state_1145) - NT_extern_fun_header => Shift(yy_state_1154) - NT_val_header => Shift(yy_state_1159) - T_EXTENUM => Shift(yy_state_1162) - NT_enum_header => Shift(yy_state_1192) - NT_struct_header => Shift(yy_state_1197) - NT_suberror_header => Shift(yy_state_1281) - NT_type_header => Shift(yy_state_1287) - T_CONST => Shift(yy_state_1292) - T_LET => Shift(yy_state_1296) - T_EXTERN => Shift(yy_state_1300) - T_FN => Shift(yy_state_1313) - T_DECLARE => Shift(yy_state_1316) - NT_non_empty_list_attribute_ => Shift(yy_state_1452) - T_PUB => Shift(yy_state_1858) - T_PRIV => Shift(yy_state_1946) - NT_fun_header_generic => Shift(yy_state_2033) - T_ASYNC => Shift(yy_state_2036) - T_EOF => Reduce(1, NT_option_SEMI_, yy_action_813) + T_LPAREN => Shift(yy_state_157) + NT_parameters => Shift(yy_state_1315) + NT_option_parameters_ => Shift(yy_state_1316) + T_LBRACE => Reduce(0, NT_option_parameters_, yy_action_336) _ => Error } } -fn yy_state_945(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_non_empty_list_semis_structure_item_, yy_action_351) +fn yy_state_1315(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_option_parameters_, yy_action_335) } -fn yy_state_946(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1316(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_ATTRIBUTE => Shift(yy_state_946) - NT_non_empty_list_attribute_ => Shift(yy_state_947) - T_LIDENT | T_UIDENT | T_PUB | T_PRIV | T_EXTERN | T_STRUCT | T_ENUM | T_TRAIT | T_IMPL | T_ASYNC | T_FN | T_LET | T_CONST | T_USING | T_MUTABLE | T_TYPE | T_TEST | T_SUBERROR | T_ENUMVIEW | T_EXTENUM | T_DECLARE => Reduce(1, NT_non_empty_list_attribute_, yy_action_350) + T_LBRACE => Shift(yy_state_133) + NT_block_expr => Shift(yy_state_1317) _ => Error } } -fn yy_state_947(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(2, NT_non_empty_list_attribute_, yy_action_348) +fn yy_state_1317(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(4, NT_structure_item, yy_action_334) } -fn yy_state_948(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1318(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_UIDENT => Shift(yy_state_949) + T_UIDENT => Shift(yy_state_1319) _ => Error } } -fn yy_state_949(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1319(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACKET => Shift(yy_state_950) - NT_optional_type_parameters_no_constraints => Shift(yy_state_960) - NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__ => Shift(yy_state_961) - T_LBRACE => Reduce(0, NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__, yy_action_347) + T_COLON => Shift(yy_state_1320) + NT_option_preceded_COLON_separated_nonempty_list_PLUS_tvar_constraint___ => Shift(yy_state_1322) + T_LBRACE => Reduce(0, NT_option_preceded_COLON_separated_nonempty_list_PLUS_tvar_constraint___, yy_action_333) _ => Error } } -fn yy_state_950(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1320(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_type_decl_binder => Shift(yy_state_951) - NT_non_empty_list_commas_id_type_decl_binder__ => Shift(yy_state_952) - NT_non_empty_list_commas_rev_id_type_decl_binder__ => Shift(yy_state_954) - T_UNDERSCORE => Shift(yy_state_957) - T_UIDENT => Shift(yy_state_958) + T_PACKAGE_NAME => Shift(yy_state_22) + T_UIDENT => Shift(yy_state_25) + NT_tvar_constraint => Shift(yy_state_1274) + NT_qual_ident_ty => Shift(yy_state_1277) + NT_separated_nonempty_list_PLUS_tvar_constraint_ => Shift(yy_state_1321) _ => Error } } -fn yy_state_951(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_non_empty_list_commas_rev_id_type_decl_binder__, yy_action_346) +fn yy_state_1321(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(2, NT_option_preceded_COLON_separated_nonempty_list_PLUS_tvar_constraint___, yy_action_331) } -fn yy_state_952(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1322(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RBRACKET => Shift(yy_state_953) + T_LBRACE => Shift(yy_state_1323) _ => Error } } -fn yy_state_953(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__, yy_action_344) -} - -fn yy_state_954(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1323(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_COMMA => Shift(yy_state_955) - NT_option_COMMA_ => Shift(yy_state_959) - T_RBRACKET => Reduce(0, NT_option_COMMA_, yy_action_876) + T_ATTRIBUTE => Shift(yy_state_1168) + NT_trait_method_decl => Shift(yy_state_1324) + NT_non_empty_list_attribute_ => Shift(yy_state_1328) + T_FN => Shift(yy_state_1381) + NT_trait_method_fn_header => Shift(yy_state_1383) + T_ASYNC => Shift(yy_state_1396) + NT_non_empty_list_semis_trait_method_decl_ => Shift(yy_state_1410) + NT_list_semis_trait_method_decl_ => Shift(yy_state_1411) + T_LIDENT | T_EXTEND => Reduce(0, NT_trait_method_fn_header, yy_action_330) + T_RBRACE => Reduce(0, NT_list_semis_trait_method_decl_, yy_action_329) _ => Error } } -fn yy_state_955(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1324(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_type_decl_binder => Shift(yy_state_956) - T_UNDERSCORE => Shift(yy_state_957) - T_UIDENT => Shift(yy_state_958) - T_RBRACKET => Reduce(1, NT_option_COMMA_, yy_action_874) + NT_option_SEMI_ => Shift(yy_state_1325) + T_SEMI => Shift(yy_state_1326) + T_RBRACE => Reduce(0, NT_option_SEMI_, yy_action_976) _ => Error } } -fn yy_state_956(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_non_empty_list_commas_rev_id_type_decl_binder__, yy_action_342) +fn yy_state_1325(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(2, NT_non_empty_list_semis_trait_method_decl_, yy_action_328) } -fn yy_state_957(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_type_decl_binder, yy_action_341) +fn yy_state_1326(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_ATTRIBUTE => Shift(yy_state_1168) + NT_trait_method_decl => Shift(yy_state_1324) + NT_non_empty_list_semis_trait_method_decl_ => Shift(yy_state_1327) + NT_non_empty_list_attribute_ => Shift(yy_state_1328) + T_FN => Shift(yy_state_1381) + NT_trait_method_fn_header => Shift(yy_state_1383) + T_ASYNC => Shift(yy_state_1396) + T_LIDENT | T_EXTEND => Reduce(0, NT_trait_method_fn_header, yy_action_330) + T_RBRACE => Reduce(1, NT_option_SEMI_, yy_action_974) + _ => Error + } } -fn yy_state_958(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_type_decl_binder, yy_action_340) +fn yy_state_1327(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_non_empty_list_semis_trait_method_decl_, yy_action_327) } -fn yy_state_959(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(2, NT_non_empty_list_commas_id_type_decl_binder__, yy_action_339) +fn yy_state_1328(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + NT_trait_method_fn_header => Shift(yy_state_1329) + T_ASYNC => Shift(yy_state_1367) + T_FN => Shift(yy_state_1381) + T_LIDENT | T_EXTEND => Reduce(0, NT_trait_method_fn_header, yy_action_330) + _ => Error + } } -fn yy_state_960(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_enum_header, yy_action_338) +fn yy_state_1329(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_EXTEND => Shift(yy_state_1330) + T_LIDENT => Shift(yy_state_1361) + _ => Error + } } -fn yy_state_961(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_optional_type_parameters_no_constraints, yy_action_337) +fn yy_state_1330(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_LPAREN => Shift(yy_state_1331) + _ => Error + } } -fn yy_state_962(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1331(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_UIDENT => Shift(yy_state_963) + T_ASYNC => Shift(yy_state_65) + T_UNDERSCORE => Shift(yy_state_70) + T_AMPER => Shift(yy_state_71) + T_PACKAGE_NAME => Shift(yy_state_73) + T_UIDENT => Shift(yy_state_80) + T_LPAREN => Shift(yy_state_84) + NT_simple_type => Shift(yy_state_110) + NT_trait_method_param => Shift(yy_state_1332) + NT_non_empty_list_commas_rev_trait_method_param_ => Shift(yy_state_1333) + T_POST_LABEL => Shift(yy_state_1337) + T_EXTEND => Shift(yy_state_1340) + T_LIDENT => Shift(yy_state_1346) + NT_type_ => Shift(yy_state_1352) + NT_non_empty_list_commas_trait_method_param_ => Shift(yy_state_1353) + NT_list_commas_trait_method_param_ => Shift(yy_state_1354) + T_RPAREN => Reduce(0, NT_list_commas_trait_method_param_, yy_action_326) _ => Error } } -fn yy_state_963(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1332(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_non_empty_list_commas_rev_trait_method_param_, yy_action_325) +} + +fn yy_state_1333(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACKET => Shift(yy_state_950) - NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__ => Shift(yy_state_961) - NT_optional_type_parameters_no_constraints => Shift(yy_state_964) - T_LPAREN | T_LBRACE => Reduce(0, NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__, yy_action_347) + NT_option_COMMA_ => Shift(yy_state_1334) + T_COMMA => Shift(yy_state_1335) + T_RPAREN => Reduce(0, NT_option_COMMA_, yy_action_1044) _ => Error } } -fn yy_state_964(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_struct_header, yy_action_336) +fn yy_state_1334(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(2, NT_non_empty_list_commas_trait_method_param_, yy_action_324) } -fn yy_state_965(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1335(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_UIDENT => Shift(yy_state_966) + T_ASYNC => Shift(yy_state_65) + T_UNDERSCORE => Shift(yy_state_70) + T_AMPER => Shift(yy_state_71) + T_PACKAGE_NAME => Shift(yy_state_73) + T_UIDENT => Shift(yy_state_80) + T_LPAREN => Shift(yy_state_84) + NT_simple_type => Shift(yy_state_110) + NT_trait_method_param => Shift(yy_state_1336) + T_POST_LABEL => Shift(yy_state_1337) + T_EXTEND => Shift(yy_state_1340) + T_LIDENT => Shift(yy_state_1346) + NT_type_ => Shift(yy_state_1352) + T_RPAREN => Reduce(1, NT_option_COMMA_, yy_action_1042) _ => Error } } -fn yy_state_966(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(2, NT_suberror_header, yy_action_335) +fn yy_state_1336(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_non_empty_list_commas_rev_trait_method_param_, yy_action_323) } -fn yy_state_967(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1337(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_UIDENT => Shift(yy_state_968) + T_COLON => Shift(yy_state_1338) _ => Error } } -fn yy_state_968(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1338(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACKET => Shift(yy_state_950) - NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__ => Shift(yy_state_961) - NT_optional_type_parameters_no_constraints => Shift(yy_state_969) - T_EOF | T_DERIVE | T_EQUAL | T_SEMI => Reduce(0, NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__, yy_action_347) + T_ASYNC => Shift(yy_state_65) + T_UNDERSCORE => Shift(yy_state_70) + T_AMPER => Shift(yy_state_71) + T_PACKAGE_NAME => Shift(yy_state_73) + T_UIDENT => Shift(yy_state_80) + T_LPAREN => Shift(yy_state_84) + NT_simple_type => Shift(yy_state_110) + NT_type_ => Shift(yy_state_1339) _ => Error } } -fn yy_state_969(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_type_header, yy_action_334) +fn yy_state_1339(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_trait_method_param, yy_action_322) } -fn yy_state_970(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1340(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_PACKAGE_NAME => Shift(yy_state_971) + T_QUESTION => Shift(yy_state_1341) + T_COLON => Shift(yy_state_1344) _ => Error } } -fn yy_state_971(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1341(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACE => Shift(yy_state_972) + T_COLON => Shift(yy_state_1342) _ => Error } } -fn yy_state_972(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1342(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_using_binder => Shift(yy_state_973) - NT_non_empty_list_commas_rev_using_binder_ => Shift(yy_state_974) - T_TRAIT => Shift(yy_state_978) - T_TYPE => Shift(yy_state_982) - T_UIDENT => Shift(yy_state_986) - T_LIDENT => Shift(yy_state_989) - NT_non_empty_list_commas_using_binder_ => Shift(yy_state_992) - NT_list_commas_using_binder_ => Shift(yy_state_993) - T_RBRACE => Reduce(0, NT_list_commas_using_binder_, yy_action_333) + T_ASYNC => Shift(yy_state_65) + T_UNDERSCORE => Shift(yy_state_70) + T_AMPER => Shift(yy_state_71) + T_PACKAGE_NAME => Shift(yy_state_73) + T_UIDENT => Shift(yy_state_80) + T_LPAREN => Shift(yy_state_84) + NT_simple_type => Shift(yy_state_110) + NT_type_ => Shift(yy_state_1343) _ => Error } } -fn yy_state_973(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_non_empty_list_commas_rev_using_binder_, yy_action_332) +fn yy_state_1343(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(4, NT_trait_method_param, yy_action_321) } -fn yy_state_974(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1344(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_option_COMMA_ => Shift(yy_state_975) - T_COMMA => Shift(yy_state_976) - T_RBRACE => Reduce(0, NT_option_COMMA_, yy_action_876) + T_ASYNC => Shift(yy_state_65) + T_UNDERSCORE => Shift(yy_state_70) + T_AMPER => Shift(yy_state_71) + T_PACKAGE_NAME => Shift(yy_state_73) + T_UIDENT => Shift(yy_state_80) + T_LPAREN => Shift(yy_state_84) + NT_simple_type => Shift(yy_state_110) + NT_type_ => Shift(yy_state_1345) _ => Error } } -fn yy_state_975(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(2, NT_non_empty_list_commas_using_binder_, yy_action_331) +fn yy_state_1345(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_trait_method_param, yy_action_320) } -fn yy_state_976(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1346(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_using_binder => Shift(yy_state_977) - T_TRAIT => Shift(yy_state_978) - T_TYPE => Shift(yy_state_982) - T_UIDENT => Shift(yy_state_986) - T_LIDENT => Shift(yy_state_989) - T_RBRACE => Reduce(1, NT_option_COMMA_, yy_action_874) + T_QUESTION => Shift(yy_state_1347) + T_COLON => Shift(yy_state_1350) _ => Error } } -fn yy_state_977(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_non_empty_list_commas_rev_using_binder_, yy_action_330) -} - -fn yy_state_978(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1347(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_UIDENT => Shift(yy_state_979) + T_COLON => Shift(yy_state_1348) _ => Error } } -fn yy_state_979(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1348(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_AS => Shift(yy_state_980) - T_COMMA | T_RBRACE => Reduce(2, NT_using_binder, yy_action_329) + T_ASYNC => Shift(yy_state_65) + T_UNDERSCORE => Shift(yy_state_70) + T_AMPER => Shift(yy_state_71) + T_PACKAGE_NAME => Shift(yy_state_73) + T_UIDENT => Shift(yy_state_80) + T_LPAREN => Shift(yy_state_84) + NT_simple_type => Shift(yy_state_110) + NT_type_ => Shift(yy_state_1349) _ => Error } } -fn yy_state_980(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1349(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(4, NT_trait_method_param, yy_action_319) +} + +fn yy_state_1350(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_UIDENT => Shift(yy_state_981) + T_ASYNC => Shift(yy_state_65) + T_UNDERSCORE => Shift(yy_state_70) + T_AMPER => Shift(yy_state_71) + T_PACKAGE_NAME => Shift(yy_state_73) + T_UIDENT => Shift(yy_state_80) + T_LPAREN => Shift(yy_state_84) + NT_simple_type => Shift(yy_state_110) + NT_type_ => Shift(yy_state_1351) _ => Error } } -fn yy_state_981(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(4, NT_using_binder, yy_action_328) +fn yy_state_1351(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_trait_method_param, yy_action_318) } -fn yy_state_982(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1352(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_trait_method_param, yy_action_317) +} + +fn yy_state_1353(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_list_commas_trait_method_param_, yy_action_316) +} + +fn yy_state_1354(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_UIDENT => Shift(yy_state_983) + T_RPAREN => Shift(yy_state_1355) _ => Error } } -fn yy_state_983(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1355(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_AS => Shift(yy_state_984) - T_COMMA | T_RBRACE => Reduce(2, NT_using_binder, yy_action_327) + NT_error_annotation => Shift(yy_state_63) + T_THIN_ARROW => Shift(yy_state_64) + T_NORAISE => Shift(yy_state_91) + T_RAISE => Shift(yy_state_92) + NT_func_return_type => Shift(yy_state_1356) + T_EQUAL | T_SEMI | T_RBRACE => Reduce(0, NT_func_return_type, yy_action_1023) _ => Error } } -fn yy_state_984(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1356(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_UIDENT => Shift(yy_state_985) + T_EQUAL => Shift(yy_state_1357) + NT_option_preceded_EQUAL_wildcard__ => Shift(yy_state_1360) + T_SEMI | T_RBRACE => Reduce(0, NT_option_preceded_EQUAL_wildcard__, yy_action_315) _ => Error } } -fn yy_state_985(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(4, NT_using_binder, yy_action_326) -} - -fn yy_state_986(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1357(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_AS => Shift(yy_state_987) - T_COMMA | T_RBRACE => Reduce(1, NT_using_binder, yy_action_325) + NT_wildcard => Shift(yy_state_1358) + T_UNDERSCORE => Shift(yy_state_1359) _ => Error } } -fn yy_state_987(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1358(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(2, NT_option_preceded_EQUAL_wildcard__, yy_action_313) +} + +fn yy_state_1359(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_wildcard, yy_action_312) +} + +fn yy_state_1360(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(8, NT_trait_method_decl, yy_action_311) +} + +fn yy_state_1361(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_UIDENT => Shift(yy_state_988) + T_LPAREN => Shift(yy_state_1362) _ => Error } } -fn yy_state_988(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_using_binder, yy_action_324) +fn yy_state_1362(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_ASYNC => Shift(yy_state_65) + T_UNDERSCORE => Shift(yy_state_70) + T_AMPER => Shift(yy_state_71) + T_PACKAGE_NAME => Shift(yy_state_73) + T_UIDENT => Shift(yy_state_80) + T_LPAREN => Shift(yy_state_84) + NT_simple_type => Shift(yy_state_110) + NT_trait_method_param => Shift(yy_state_1332) + NT_non_empty_list_commas_rev_trait_method_param_ => Shift(yy_state_1333) + T_POST_LABEL => Shift(yy_state_1337) + T_EXTEND => Shift(yy_state_1340) + T_LIDENT => Shift(yy_state_1346) + NT_type_ => Shift(yy_state_1352) + NT_non_empty_list_commas_trait_method_param_ => Shift(yy_state_1353) + NT_list_commas_trait_method_param_ => Shift(yy_state_1363) + T_RPAREN => Reduce(0, NT_list_commas_trait_method_param_, yy_action_326) + _ => Error + } } -fn yy_state_989(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1363(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_AS => Shift(yy_state_990) - T_COMMA | T_RBRACE => Reduce(1, NT_using_binder, yy_action_323) + T_RPAREN => Shift(yy_state_1364) _ => Error } } -fn yy_state_990(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1364(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LIDENT => Shift(yy_state_991) + NT_error_annotation => Shift(yy_state_63) + T_THIN_ARROW => Shift(yy_state_64) + T_NORAISE => Shift(yy_state_91) + T_RAISE => Shift(yy_state_92) + NT_func_return_type => Shift(yy_state_1365) + T_EQUAL | T_SEMI | T_RBRACE => Reduce(0, NT_func_return_type, yy_action_1023) _ => Error } } -fn yy_state_991(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_using_binder, yy_action_322) +fn yy_state_1365(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_EQUAL => Shift(yy_state_1357) + NT_option_preceded_EQUAL_wildcard__ => Shift(yy_state_1366) + T_SEMI | T_RBRACE => Reduce(0, NT_option_preceded_EQUAL_wildcard__, yy_action_315) + _ => Error + } } -fn yy_state_992(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_list_commas_using_binder_, yy_action_321) +fn yy_state_1366(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(8, NT_trait_method_decl, yy_action_310) } -fn yy_state_993(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1367(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RBRACE => Shift(yy_state_994) + NT_trait_method_fn_header => Shift(yy_state_1368) + T_FN => Shift(yy_state_1381) + T_LIDENT | T_EXTEND => Reduce(0, NT_trait_method_fn_header, yy_action_330) _ => Error } } -fn yy_state_994(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(5, NT_structure_item, yy_action_320) -} - -fn yy_state_995(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1368(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_type_parameters => Shift(yy_state_996) - NT_optional_type_parameters => Shift(yy_state_997) - NT_option_type_parameters_ => Shift(yy_state_1036) - T_LBRACKET => Shift(yy_state_1037) - T_UIDENT => Reduce(0, NT_option_type_parameters_, yy_action_319) + T_EXTEND => Shift(yy_state_1369) + T_LIDENT => Shift(yy_state_1375) _ => Error } } -fn yy_state_996(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_option_type_parameters_, yy_action_318) +fn yy_state_1369(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_LPAREN => Shift(yy_state_1370) + _ => Error + } } -fn yy_state_997(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1370(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_UIDENT => Shift(yy_state_998) + T_ASYNC => Shift(yy_state_65) + T_UNDERSCORE => Shift(yy_state_70) + T_AMPER => Shift(yy_state_71) + T_PACKAGE_NAME => Shift(yy_state_73) + T_UIDENT => Shift(yy_state_80) + T_LPAREN => Shift(yy_state_84) + NT_simple_type => Shift(yy_state_110) + NT_trait_method_param => Shift(yy_state_1332) + NT_non_empty_list_commas_rev_trait_method_param_ => Shift(yy_state_1333) + T_POST_LABEL => Shift(yy_state_1337) + T_EXTEND => Shift(yy_state_1340) + T_LIDENT => Shift(yy_state_1346) + NT_type_ => Shift(yy_state_1352) + NT_non_empty_list_commas_trait_method_param_ => Shift(yy_state_1353) + NT_list_commas_trait_method_param_ => Shift(yy_state_1371) + T_RPAREN => Reduce(0, NT_list_commas_trait_method_param_, yy_action_326) _ => Error } } -fn yy_state_998(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1371(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACE => Shift(yy_state_999) + T_RPAREN => Shift(yy_state_1372) _ => Error } } -fn yy_state_999(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1372(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_ATTRIBUTE => Shift(yy_state_946) - NT_enum_constructor => Shift(yy_state_1000) - NT_non_empty_list_attribute_ => Shift(yy_state_1004) - T_UIDENT => Shift(yy_state_1024) - NT_non_empty_list_semis_enum_constructor_ => Shift(yy_state_1027) - NT_list_semis_enum_constructor_ => Shift(yy_state_1028) - T_RBRACE => Reduce(0, NT_list_semis_enum_constructor_, yy_action_317) + NT_error_annotation => Shift(yy_state_63) + T_THIN_ARROW => Shift(yy_state_64) + T_NORAISE => Shift(yy_state_91) + T_RAISE => Shift(yy_state_92) + NT_func_return_type => Shift(yy_state_1373) + T_EQUAL | T_SEMI | T_RBRACE => Reduce(0, NT_func_return_type, yy_action_1023) _ => Error } } -fn yy_state_1000(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1373(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_option_SEMI_ => Shift(yy_state_1001) - T_SEMI => Shift(yy_state_1002) - T_RBRACE => Reduce(0, NT_option_SEMI_, yy_action_815) + T_EQUAL => Shift(yy_state_1357) + NT_option_preceded_EQUAL_wildcard__ => Shift(yy_state_1374) + T_SEMI | T_RBRACE => Reduce(0, NT_option_preceded_EQUAL_wildcard__, yy_action_315) _ => Error } } -fn yy_state_1001(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(2, NT_non_empty_list_semis_enum_constructor_, yy_action_316) +fn yy_state_1374(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(9, NT_trait_method_decl, yy_action_309) } -fn yy_state_1002(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1375(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_ATTRIBUTE => Shift(yy_state_946) - NT_enum_constructor => Shift(yy_state_1000) - NT_non_empty_list_semis_enum_constructor_ => Shift(yy_state_1003) - NT_non_empty_list_attribute_ => Shift(yy_state_1004) - T_UIDENT => Shift(yy_state_1024) - T_RBRACE => Reduce(1, NT_option_SEMI_, yy_action_813) + T_LPAREN => Shift(yy_state_1376) _ => Error } } -fn yy_state_1003(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_non_empty_list_semis_enum_constructor_, yy_action_315) +fn yy_state_1376(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_ASYNC => Shift(yy_state_65) + T_UNDERSCORE => Shift(yy_state_70) + T_AMPER => Shift(yy_state_71) + T_PACKAGE_NAME => Shift(yy_state_73) + T_UIDENT => Shift(yy_state_80) + T_LPAREN => Shift(yy_state_84) + NT_simple_type => Shift(yy_state_110) + NT_trait_method_param => Shift(yy_state_1332) + NT_non_empty_list_commas_rev_trait_method_param_ => Shift(yy_state_1333) + T_POST_LABEL => Shift(yy_state_1337) + T_EXTEND => Shift(yy_state_1340) + T_LIDENT => Shift(yy_state_1346) + NT_type_ => Shift(yy_state_1352) + NT_non_empty_list_commas_trait_method_param_ => Shift(yy_state_1353) + NT_list_commas_trait_method_param_ => Shift(yy_state_1377) + T_RPAREN => Reduce(0, NT_list_commas_trait_method_param_, yy_action_326) + _ => Error + } } -fn yy_state_1004(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1377(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_UIDENT => Shift(yy_state_1005) + T_RPAREN => Shift(yy_state_1378) _ => Error } } -fn yy_state_1005(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1378(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LPAREN => Shift(yy_state_1006) - NT_option_delimited_LPAREN_non_empty_list_commas_constructor_param__RPAREN__ => Shift(yy_state_1020) - T_EQUAL | T_SEMI | T_RBRACE => Reduce(0, NT_option_delimited_LPAREN_non_empty_list_commas_constructor_param__RPAREN__, yy_action_314) + NT_error_annotation => Shift(yy_state_63) + T_THIN_ARROW => Shift(yy_state_64) + T_NORAISE => Shift(yy_state_91) + T_RAISE => Shift(yy_state_92) + NT_func_return_type => Shift(yy_state_1379) + T_EQUAL | T_SEMI | T_RBRACE => Reduce(0, NT_func_return_type, yy_action_1023) _ => Error } } -fn yy_state_1006(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1379(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_constructor_param => Shift(yy_state_1007) - NT_non_empty_list_commas_constructor_param_ => Shift(yy_state_1008) - NT_non_empty_list_commas_rev_constructor_param_ => Shift(yy_state_1010) - T_MUTABLE => Shift(yy_state_1014) - NT_option_MUTABLE_ => Shift(yy_state_1015) - T_UIDENT | T_POST_LABEL | T_ASYNC | T_LPAREN | T_UNDERSCORE | T_AMPER | T_PACKAGE_NAME => Reduce(0, NT_option_MUTABLE_, yy_action_313) + T_EQUAL => Shift(yy_state_1357) + NT_option_preceded_EQUAL_wildcard__ => Shift(yy_state_1380) + T_SEMI | T_RBRACE => Reduce(0, NT_option_preceded_EQUAL_wildcard__, yy_action_315) _ => Error } } -fn yy_state_1007(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_non_empty_list_commas_rev_constructor_param_, yy_action_312) +fn yy_state_1380(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(9, NT_trait_method_decl, yy_action_308) } -fn yy_state_1008(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1381(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RPAREN => Shift(yy_state_1009) + NT_type_parameters => Shift(yy_state_1223) + NT_option_type_parameters_ => Shift(yy_state_1266) + T_LBRACKET => Shift(yy_state_1267) + NT_optional_type_parameters => Shift(yy_state_1382) + T_LIDENT | T_EXTEND => Reduce(0, NT_option_type_parameters_, yy_action_383) _ => Error } } -fn yy_state_1009(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_option_delimited_LPAREN_non_empty_list_commas_constructor_param__RPAREN__, yy_action_310) +fn yy_state_1382(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(2, NT_trait_method_fn_header, yy_action_307) +} + +fn yy_state_1383(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_EXTEND => Shift(yy_state_1384) + T_LIDENT => Shift(yy_state_1390) + _ => Error + } +} + +fn yy_state_1384(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_LPAREN => Shift(yy_state_1385) + _ => Error + } } -fn yy_state_1010(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1385(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_option_COMMA_ => Shift(yy_state_1011) - T_COMMA => Shift(yy_state_1012) - T_RPAREN => Reduce(0, NT_option_COMMA_, yy_action_876) + T_ASYNC => Shift(yy_state_65) + T_UNDERSCORE => Shift(yy_state_70) + T_AMPER => Shift(yy_state_71) + T_PACKAGE_NAME => Shift(yy_state_73) + T_UIDENT => Shift(yy_state_80) + T_LPAREN => Shift(yy_state_84) + NT_simple_type => Shift(yy_state_110) + NT_trait_method_param => Shift(yy_state_1332) + NT_non_empty_list_commas_rev_trait_method_param_ => Shift(yy_state_1333) + T_POST_LABEL => Shift(yy_state_1337) + T_EXTEND => Shift(yy_state_1340) + T_LIDENT => Shift(yy_state_1346) + NT_type_ => Shift(yy_state_1352) + NT_non_empty_list_commas_trait_method_param_ => Shift(yy_state_1353) + NT_list_commas_trait_method_param_ => Shift(yy_state_1386) + T_RPAREN => Reduce(0, NT_list_commas_trait_method_param_, yy_action_326) _ => Error } } -fn yy_state_1011(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(2, NT_non_empty_list_commas_constructor_param_, yy_action_309) +fn yy_state_1386(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_RPAREN => Shift(yy_state_1387) + _ => Error + } } -fn yy_state_1012(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1387(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_constructor_param => Shift(yy_state_1013) - T_MUTABLE => Shift(yy_state_1014) - NT_option_MUTABLE_ => Shift(yy_state_1015) - T_UIDENT | T_POST_LABEL | T_ASYNC | T_LPAREN | T_UNDERSCORE | T_AMPER | T_PACKAGE_NAME => Reduce(0, NT_option_MUTABLE_, yy_action_313) - T_RPAREN => Reduce(1, NT_option_COMMA_, yy_action_874) + NT_error_annotation => Shift(yy_state_63) + T_THIN_ARROW => Shift(yy_state_64) + T_NORAISE => Shift(yy_state_91) + T_RAISE => Shift(yy_state_92) + NT_func_return_type => Shift(yy_state_1388) + T_EQUAL | T_SEMI | T_RBRACE => Reduce(0, NT_func_return_type, yy_action_1023) _ => Error } } -fn yy_state_1013(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_non_empty_list_commas_rev_constructor_param_, yy_action_308) +fn yy_state_1388(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_EQUAL => Shift(yy_state_1357) + NT_option_preceded_EQUAL_wildcard__ => Shift(yy_state_1389) + T_SEMI | T_RBRACE => Reduce(0, NT_option_preceded_EQUAL_wildcard__, yy_action_315) + _ => Error + } } -fn yy_state_1014(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_option_MUTABLE_, yy_action_307) +fn yy_state_1389(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(7, NT_trait_method_decl, yy_action_306) } -fn yy_state_1015(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1390(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_ASYNC => Shift(yy_state_52) - T_UNDERSCORE => Shift(yy_state_57) - T_AMPER => Shift(yy_state_58) - T_PACKAGE_NAME => Shift(yy_state_60) - T_UIDENT => Shift(yy_state_67) - T_LPAREN => Shift(yy_state_71) - NT_simple_type => Shift(yy_state_97) - T_POST_LABEL => Shift(yy_state_1016) - NT_type_ => Shift(yy_state_1019) + T_LPAREN => Shift(yy_state_1391) _ => Error } } -fn yy_state_1016(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1391(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_COLON => Shift(yy_state_1017) + T_ASYNC => Shift(yy_state_65) + T_UNDERSCORE => Shift(yy_state_70) + T_AMPER => Shift(yy_state_71) + T_PACKAGE_NAME => Shift(yy_state_73) + T_UIDENT => Shift(yy_state_80) + T_LPAREN => Shift(yy_state_84) + NT_simple_type => Shift(yy_state_110) + NT_trait_method_param => Shift(yy_state_1332) + NT_non_empty_list_commas_rev_trait_method_param_ => Shift(yy_state_1333) + T_POST_LABEL => Shift(yy_state_1337) + T_EXTEND => Shift(yy_state_1340) + T_LIDENT => Shift(yy_state_1346) + NT_type_ => Shift(yy_state_1352) + NT_non_empty_list_commas_trait_method_param_ => Shift(yy_state_1353) + NT_list_commas_trait_method_param_ => Shift(yy_state_1392) + T_RPAREN => Reduce(0, NT_list_commas_trait_method_param_, yy_action_326) _ => Error } } -fn yy_state_1017(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1392(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_ASYNC => Shift(yy_state_52) - T_UNDERSCORE => Shift(yy_state_57) - T_AMPER => Shift(yy_state_58) - T_PACKAGE_NAME => Shift(yy_state_60) - T_UIDENT => Shift(yy_state_67) - T_LPAREN => Shift(yy_state_71) - NT_simple_type => Shift(yy_state_97) - NT_type_ => Shift(yy_state_1018) + T_RPAREN => Shift(yy_state_1393) _ => Error } } -fn yy_state_1018(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(4, NT_constructor_param, yy_action_306) -} - -fn yy_state_1019(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(2, NT_constructor_param, yy_action_305) -} - -fn yy_state_1020(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1393(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_EQUAL => Shift(yy_state_1021) - NT_option_eq_int_tag_ => Shift(yy_state_1023) - T_SEMI | T_RBRACE => Reduce(0, NT_option_eq_int_tag_, yy_action_304) + NT_error_annotation => Shift(yy_state_63) + T_THIN_ARROW => Shift(yy_state_64) + T_NORAISE => Shift(yy_state_91) + T_RAISE => Shift(yy_state_92) + NT_func_return_type => Shift(yy_state_1394) + T_EQUAL | T_SEMI | T_RBRACE => Reduce(0, NT_func_return_type, yy_action_1023) _ => Error } } -fn yy_state_1021(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1394(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_INT => Shift(yy_state_1022) + T_EQUAL => Shift(yy_state_1357) + NT_option_preceded_EQUAL_wildcard__ => Shift(yy_state_1395) + T_SEMI | T_RBRACE => Reduce(0, NT_option_preceded_EQUAL_wildcard__, yy_action_315) _ => Error } } -fn yy_state_1022(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(2, NT_option_eq_int_tag_, yy_action_302) +fn yy_state_1395(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(7, NT_trait_method_decl, yy_action_305) } -fn yy_state_1023(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(4, NT_enum_constructor, yy_action_301) +fn yy_state_1396(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_FN => Shift(yy_state_1381) + NT_trait_method_fn_header => Shift(yy_state_1397) + T_LIDENT | T_EXTEND => Reduce(0, NT_trait_method_fn_header, yy_action_330) + _ => Error + } } -fn yy_state_1024(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1397(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LPAREN => Shift(yy_state_1006) - NT_option_delimited_LPAREN_non_empty_list_commas_constructor_param__RPAREN__ => Shift(yy_state_1025) - T_EQUAL | T_SEMI | T_RBRACE => Reduce(0, NT_option_delimited_LPAREN_non_empty_list_commas_constructor_param__RPAREN__, yy_action_314) + T_EXTEND => Shift(yy_state_1398) + T_LIDENT => Shift(yy_state_1404) _ => Error } } -fn yy_state_1025(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1398(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_EQUAL => Shift(yy_state_1021) - NT_option_eq_int_tag_ => Shift(yy_state_1026) - T_SEMI | T_RBRACE => Reduce(0, NT_option_eq_int_tag_, yy_action_304) + T_LPAREN => Shift(yy_state_1399) _ => Error } } -fn yy_state_1026(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_enum_constructor, yy_action_300) +fn yy_state_1399(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_ASYNC => Shift(yy_state_65) + T_UNDERSCORE => Shift(yy_state_70) + T_AMPER => Shift(yy_state_71) + T_PACKAGE_NAME => Shift(yy_state_73) + T_UIDENT => Shift(yy_state_80) + T_LPAREN => Shift(yy_state_84) + NT_simple_type => Shift(yy_state_110) + NT_trait_method_param => Shift(yy_state_1332) + NT_non_empty_list_commas_rev_trait_method_param_ => Shift(yy_state_1333) + T_POST_LABEL => Shift(yy_state_1337) + T_EXTEND => Shift(yy_state_1340) + T_LIDENT => Shift(yy_state_1346) + NT_type_ => Shift(yy_state_1352) + NT_non_empty_list_commas_trait_method_param_ => Shift(yy_state_1353) + NT_list_commas_trait_method_param_ => Shift(yy_state_1400) + T_RPAREN => Reduce(0, NT_list_commas_trait_method_param_, yy_action_326) + _ => Error + } } -fn yy_state_1027(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_list_semis_enum_constructor_, yy_action_299) +fn yy_state_1400(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_RPAREN => Shift(yy_state_1401) + _ => Error + } } -fn yy_state_1028(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1401(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RBRACE => Shift(yy_state_1029) + NT_error_annotation => Shift(yy_state_63) + T_THIN_ARROW => Shift(yy_state_64) + T_NORAISE => Shift(yy_state_91) + T_RAISE => Shift(yy_state_92) + NT_func_return_type => Shift(yy_state_1402) + T_EQUAL | T_SEMI | T_RBRACE => Reduce(0, NT_func_return_type, yy_action_1023) _ => Error } } -fn yy_state_1029(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1402(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_FOR => Shift(yy_state_1030) + T_EQUAL => Shift(yy_state_1357) + NT_option_preceded_EQUAL_wildcard__ => Shift(yy_state_1403) + T_SEMI | T_RBRACE => Reduce(0, NT_option_preceded_EQUAL_wildcard__, yy_action_315) _ => Error } } -fn yy_state_1030(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1403(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(8, NT_trait_method_decl, yy_action_304) +} + +fn yy_state_1404(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_ASYNC => Shift(yy_state_52) - T_UNDERSCORE => Shift(yy_state_57) - T_AMPER => Shift(yy_state_58) - T_PACKAGE_NAME => Shift(yy_state_60) - T_UIDENT => Shift(yy_state_67) - T_LPAREN => Shift(yy_state_71) - NT_simple_type => Shift(yy_state_97) - NT_type_ => Shift(yy_state_1031) + T_LPAREN => Shift(yy_state_1405) _ => Error } } -fn yy_state_1031(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1405(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_WITH => Shift(yy_state_1032) + T_ASYNC => Shift(yy_state_65) + T_UNDERSCORE => Shift(yy_state_70) + T_AMPER => Shift(yy_state_71) + T_PACKAGE_NAME => Shift(yy_state_73) + T_UIDENT => Shift(yy_state_80) + T_LPAREN => Shift(yy_state_84) + NT_simple_type => Shift(yy_state_110) + NT_trait_method_param => Shift(yy_state_1332) + NT_non_empty_list_commas_rev_trait_method_param_ => Shift(yy_state_1333) + T_POST_LABEL => Shift(yy_state_1337) + T_EXTEND => Shift(yy_state_1340) + T_LIDENT => Shift(yy_state_1346) + NT_type_ => Shift(yy_state_1352) + NT_non_empty_list_commas_trait_method_param_ => Shift(yy_state_1353) + NT_list_commas_trait_method_param_ => Shift(yy_state_1406) + T_RPAREN => Reduce(0, NT_list_commas_trait_method_param_, yy_action_326) _ => Error } } -fn yy_state_1032(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1406(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LIDENT => Shift(yy_state_1033) + T_RPAREN => Shift(yy_state_1407) _ => Error } } -fn yy_state_1033(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1407(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LPAREN => Shift(yy_state_143) - NT_parameters => Shift(yy_state_1034) + NT_error_annotation => Shift(yy_state_63) + T_THIN_ARROW => Shift(yy_state_64) + T_NORAISE => Shift(yy_state_91) + T_RAISE => Shift(yy_state_92) + NT_func_return_type => Shift(yy_state_1408) + T_EQUAL | T_SEMI | T_RBRACE => Reduce(0, NT_func_return_type, yy_action_1023) _ => Error } } -fn yy_state_1034(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1408(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACE => Shift(yy_state_120) - NT_block_expr => Shift(yy_state_1035) + T_EQUAL => Shift(yy_state_1357) + NT_option_preceded_EQUAL_wildcard__ => Shift(yy_state_1409) + T_SEMI | T_RBRACE => Reduce(0, NT_option_preceded_EQUAL_wildcard__, yy_action_315) _ => Error } } -fn yy_state_1035(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(12, NT_structure_item, yy_action_298) +fn yy_state_1409(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(8, NT_trait_method_decl, yy_action_303) } -fn yy_state_1036(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_optional_type_parameters, yy_action_297) +fn yy_state_1410(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_list_semis_trait_method_decl_, yy_action_302) } -fn yy_state_1037(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1411(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_tvar_binder => Shift(yy_state_1038) - NT_non_empty_list_commas_rev_id_tvar_binder__ => Shift(yy_state_1039) - T_UIDENT => Shift(yy_state_1042) - NT_non_empty_list_commas_id_tvar_binder__ => Shift(yy_state_1050) + T_RBRACE => Shift(yy_state_1412) _ => Error } } -fn yy_state_1038(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_non_empty_list_commas_rev_id_tvar_binder__, yy_action_296) +fn yy_state_1412(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(6, NT_structure_item, yy_action_301) } -fn yy_state_1039(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1413(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_structure_item, yy_action_300) +} + +fn yy_state_1414(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_COMMA => Shift(yy_state_1040) - NT_option_COMMA_ => Shift(yy_state_1049) - T_RBRACKET => Reduce(0, NT_option_COMMA_, yy_action_876) + T_WHERE => Shift(yy_state_693) + NT_optional_where_clause => Shift(yy_state_1415) + T_EQUAL => Shift(yy_state_1417) + T_LBRACE => Reduce(0, NT_optional_where_clause, yy_action_633) _ => Error } } -fn yy_state_1040(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1415(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_tvar_binder => Shift(yy_state_1041) - T_UIDENT => Shift(yy_state_1042) - T_RBRACKET => Reduce(1, NT_option_COMMA_, yy_action_874) + T_LBRACE => Shift(yy_state_133) + NT_block_expr => Shift(yy_state_1416) _ => Error } } -fn yy_state_1041(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_non_empty_list_commas_rev_id_tvar_binder__, yy_action_294) +fn yy_state_1416(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_structure_item, yy_action_299) } -fn yy_state_1042(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1417(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_COLON => Shift(yy_state_1043) - T_COMMA | T_RBRACKET => Reduce(1, NT_tvar_binder, yy_action_293) + T_MULTILINE_STRING => Shift(yy_state_1418) + NT_non_empty_list_MULTILINE_STRING_ => Shift(yy_state_1420) + T_STRING => Shift(yy_state_1421) _ => Error } } -fn yy_state_1043(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1418(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_PACKAGE_NAME => Shift(yy_state_21) - T_UIDENT => Shift(yy_state_24) - NT_tvar_constraint => Shift(yy_state_1044) - NT_qual_ident_ty => Shift(yy_state_1047) - NT_separated_nonempty_list_PLUS_tvar_constraint_ => Shift(yy_state_1048) + T_MULTILINE_STRING => Shift(yy_state_1418) + NT_non_empty_list_MULTILINE_STRING_ => Shift(yy_state_1419) + T_EOF | T_SEMI => Reduce(1, NT_non_empty_list_MULTILINE_STRING_, yy_action_298) _ => Error } } -fn yy_state_1044(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1419(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(2, NT_non_empty_list_MULTILINE_STRING_, yy_action_297) +} + +fn yy_state_1420(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_structure_item, yy_action_296) +} + +fn yy_state_1421(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_PLUS => Shift(yy_state_1045) - T_COMMA | T_RBRACKET | T_LBRACE => Reduce(1, NT_separated_nonempty_list_PLUS_tvar_constraint_, yy_action_292) + T_STRING => Shift(yy_state_1422) + T_EOF | T_SEMI => Reduce(3, NT_structure_item, yy_action_295) _ => Error } } -fn yy_state_1045(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1422(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(4, NT_structure_item, yy_action_294) +} + +fn yy_state_1423(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_PACKAGE_NAME => Shift(yy_state_21) - T_UIDENT => Shift(yy_state_24) - NT_tvar_constraint => Shift(yy_state_1044) - NT_separated_nonempty_list_PLUS_tvar_constraint_ => Shift(yy_state_1046) - NT_qual_ident_ty => Shift(yy_state_1047) + T_EQUAL => Shift(yy_state_1424) _ => Error } } -fn yy_state_1046(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_separated_nonempty_list_PLUS_tvar_constraint_, yy_action_291) +fn yy_state_1424(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_MULTILINE_STRING => Shift(yy_state_1418) + NT_non_empty_list_MULTILINE_STRING_ => Shift(yy_state_1425) + T_STRING => Shift(yy_state_1426) + _ => Error + } } -fn yy_state_1047(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_tvar_constraint, yy_action_290) +fn yy_state_1425(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_structure_item, yy_action_293) } -fn yy_state_1048(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_tvar_binder, yy_action_289) +fn yy_state_1426(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_STRING => Shift(yy_state_1427) + T_EOF | T_SEMI => Reduce(3, NT_structure_item, yy_action_292) + _ => Error + } } -fn yy_state_1049(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(2, NT_non_empty_list_commas_id_tvar_binder__, yy_action_288) +fn yy_state_1427(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(4, NT_structure_item, yy_action_291) } -fn yy_state_1050(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1428(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RBRACKET => Shift(yy_state_1051) + T_EQUAL => Shift(yy_state_1429) _ => Error } } -fn yy_state_1051(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_type_parameters, yy_action_286) -} - -fn yy_state_1052(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1429(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_type_parameters => Shift(yy_state_996) - NT_option_type_parameters_ => Shift(yy_state_1036) - T_LBRACKET => Shift(yy_state_1037) - NT_optional_type_parameters => Shift(yy_state_1053) - T_UIDENT | T_AMPER | T_PACKAGE_NAME => Reduce(0, NT_option_type_parameters_, yy_action_319) + NT_multiline_string => Shift(yy_state_2) + T_MULTILINE_INTERP => Shift(yy_state_4) + T_MULTILINE_STRING => Shift(yy_state_5) + T_REGEX_LITERAL => Shift(yy_state_6) + T_STRING => Shift(yy_state_7) + T_FLOAT => Shift(yy_state_8) + T_DOUBLE => Shift(yy_state_9) + T_INT => Shift(yy_state_10) + T_CHAR => Shift(yy_state_11) + T_BYTES => Shift(yy_state_12) + T_BYTE => Shift(yy_state_13) + T_FALSE => Shift(yy_state_14) + T_TRUE => Shift(yy_state_15) + T_BYTES_INTERP => Shift(yy_state_16) + T_INTERP => Shift(yy_state_17) + NT_non_empty_list_multiline_string_ => Shift(yy_state_18) + NT_simple_constant => Shift(yy_state_19) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + NT_tuple_expr => Shift(yy_state_27) + T_LBRACKET_BAR => Shift(yy_state_28) + T_LBRACKET => Shift(yy_state_36) + NT_constr => Shift(yy_state_47) + NT_qual_ident_simple_expr => Shift(yy_state_48) + NT_atomic_expr => Shift(yy_state_50) + NT_anony_fn => Shift(yy_state_51) + T_LBRACE => Shift(yy_state_52) + T_FN => Shift(yy_state_61) + NT_type_name => Shift(yy_state_139) + T_ASYNC => Shift(yy_state_152) + NT_simple_expr => Shift(yy_state_165) + T_EXCLAMATION => Shift(yy_state_176) + T_MINUS => Shift(yy_state_191) + T_PLUS => Shift(yy_state_193) + T_UIDENT => Shift(yy_state_195) + T_PACKAGE_NAME => Shift(yy_state_196) + NT_prefix_expr => Shift(yy_state_201) + NT_range_expr => Shift(yy_state_212) + NT_postfix_expr => Shift(yy_state_223) + T_EXISTS => Shift(yy_state_224) + T_FORALL => Shift(yy_state_256) + NT_infix_expr => Shift(yy_state_272) + T_UNDERSCORE => Shift(yy_state_273) + T_LPAREN => Shift(yy_state_281) + NT_pipe_expr => Shift(yy_state_325) + NT_arrow_fn_expr => Shift(yy_state_344) + NT_quantifier_expr => Shift(yy_state_345) + NT_simple_try_expr => Shift(yy_state_346) + NT_lexscan_expr => Shift(yy_state_347) + NT_lexmatch_expr => Shift(yy_state_348) + NT_match_expr => Shift(yy_state_349) + NT_if_expr => Shift(yy_state_350) + NT_try_expr => Shift(yy_state_351) + NT_while_expr => Shift(yy_state_352) + NT_foreach_expr => Shift(yy_state_353) + NT_for_expr => Shift(yy_state_354) + T_LEXSCAN => Shift(yy_state_355) + NT_lexscan_header => Shift(yy_state_358) + T_LEXMATCH => Shift(yy_state_391) + NT_lexmatch_header => Shift(yy_state_399) + NT_match_header => Shift(yy_state_444) + T_MATCH => Shift(yy_state_605) + T_IF => Shift(yy_state_608) + T_TRY_EXCLAMATION => Shift(yy_state_614) + T_TRY_QUESTION => Shift(yy_state_616) + T_TRY => Shift(yy_state_618) + NT_loop_label_colon => Shift(yy_state_632) + T_POST_LABEL => Shift(yy_state_639) + T_EXTEND => Shift(yy_state_641) + T_LIDENT => Shift(yy_state_648) + NT_expr => Shift(yy_state_1430) + T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_1071) _ => Error } } -fn yy_state_1053(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1430(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_structure_item, yy_action_290) +} + +fn yy_state_1431(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_AMPER => Shift(yy_state_19) - T_PACKAGE_NAME => Shift(yy_state_21) - T_UIDENT => Shift(yy_state_24) - NT_qual_ident_ty => Shift(yy_state_25) - NT_type_name => Shift(yy_state_1054) + T_PACKAGE_NAME => Shift(yy_state_1432) + NT_extenum_extension_target => Shift(yy_state_1435) + T_UIDENT => Shift(yy_state_1455) _ => Error } } -fn yy_state_1054(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1432(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_WITH => Shift(yy_state_1055) - T_FOR => Shift(yy_state_1065) + T_DOT_UIDENT => Shift(yy_state_1433) _ => Error } } -fn yy_state_1055(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1433(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_FN => Shift(yy_state_1056) - NT_option_FN_ => Shift(yy_state_1057) - T_LIDENT => Reduce(0, NT_option_FN_, yy_action_285) + T_LBRACKET => Shift(yy_state_1172) + NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__ => Shift(yy_state_1183) + NT_optional_type_parameters_no_constraints => Shift(yy_state_1434) + T_PLUS_EQUAL => Reduce(0, NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__, yy_action_415) _ => Error } } -fn yy_state_1056(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_option_FN_, yy_action_284) +fn yy_state_1434(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_extenum_extension_target, yy_action_289) } -fn yy_state_1057(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1435(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LIDENT => Shift(yy_state_1058) + T_PLUS_EQUAL => Shift(yy_state_1436) _ => Error } } -fn yy_state_1058(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1436(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LPAREN => Shift(yy_state_143) - NT_parameters => Shift(yy_state_1059) + T_LBRACE => Shift(yy_state_1437) _ => Error } } -fn yy_state_1059(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1437(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_error_annotation => Shift(yy_state_50) - T_THIN_ARROW => Shift(yy_state_51) - T_NORAISE => Shift(yy_state_78) - T_RAISE => Shift(yy_state_79) - NT_func_return_type => Shift(yy_state_1060) - T_EQUAL | T_LBRACE => Reduce(0, NT_func_return_type, yy_action_862) + T_ATTRIBUTE => Shift(yy_state_1168) + NT_enum_constructor => Shift(yy_state_1227) + NT_non_empty_list_attribute_ => Shift(yy_state_1231) + T_UIDENT => Shift(yy_state_1251) + NT_non_empty_list_semis_enum_constructor_ => Shift(yy_state_1254) + NT_list_semis_enum_constructor_ => Shift(yy_state_1438) + T_RBRACE => Reduce(0, NT_list_semis_enum_constructor_, yy_action_381) _ => Error } } -fn yy_state_1060(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1438(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACE => Shift(yy_state_120) - NT_impl_body => Shift(yy_state_1061) - T_EQUAL => Shift(yy_state_1062) - NT_block_expr => Shift(yy_state_1064) + T_RBRACE => Shift(yy_state_1439) _ => Error } } -fn yy_state_1061(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(9, NT_structure_item, yy_action_283) -} - -fn yy_state_1062(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1439(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_STRING => Shift(yy_state_1063) + T_DERIVE => Shift(yy_state_1440) + NT_deriving_directive_list => Shift(yy_state_1454) + T_EOF | T_SEMI => Reduce(0, NT_deriving_directive_list, yy_action_288) _ => Error } } -fn yy_state_1063(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(2, NT_impl_body, yy_action_282) -} - -fn yy_state_1064(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_impl_body, yy_action_281) -} - -fn yy_state_1065(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1440(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_ASYNC => Shift(yy_state_52) - T_UNDERSCORE => Shift(yy_state_57) - T_AMPER => Shift(yy_state_58) - T_PACKAGE_NAME => Shift(yy_state_60) - T_UIDENT => Shift(yy_state_67) - T_LPAREN => Shift(yy_state_71) - NT_simple_type => Shift(yy_state_97) - NT_type_ => Shift(yy_state_1066) + T_LPAREN => Shift(yy_state_1441) _ => Error } } -fn yy_state_1066(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1441(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_WITH => Shift(yy_state_1067) - T_EOF | T_SEMI => Reduce(5, NT_structure_item, yy_action_280) + T_AMPER => Shift(yy_state_20) + T_PACKAGE_NAME => Shift(yy_state_22) + T_UIDENT => Shift(yy_state_25) + NT_qual_ident_ty => Shift(yy_state_26) + NT_deriving_directive => Shift(yy_state_1442) + NT_non_empty_list_commas_rev_deriving_directive_ => Shift(yy_state_1443) + NT_type_name => Shift(yy_state_1447) + NT_non_empty_list_commas_deriving_directive_ => Shift(yy_state_1451) + NT_list_commas_deriving_directive_ => Shift(yy_state_1452) + T_RPAREN => Reduce(0, NT_list_commas_deriving_directive_, yy_action_287) _ => Error } } -fn yy_state_1067(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1442(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_non_empty_list_commas_rev_deriving_directive_, yy_action_286) +} + +fn yy_state_1443(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_FN => Shift(yy_state_1056) - NT_option_FN_ => Shift(yy_state_1068) - T_LIDENT => Reduce(0, NT_option_FN_, yy_action_285) + NT_option_COMMA_ => Shift(yy_state_1444) + T_COMMA => Shift(yy_state_1445) + T_RPAREN => Reduce(0, NT_option_COMMA_, yy_action_1044) _ => Error } } -fn yy_state_1068(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1444(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(2, NT_non_empty_list_commas_deriving_directive_, yy_action_285) +} + +fn yy_state_1445(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LIDENT => Shift(yy_state_1069) + T_AMPER => Shift(yy_state_20) + T_PACKAGE_NAME => Shift(yy_state_22) + T_UIDENT => Shift(yy_state_25) + NT_qual_ident_ty => Shift(yy_state_26) + NT_deriving_directive => Shift(yy_state_1446) + NT_type_name => Shift(yy_state_1447) + T_RPAREN => Reduce(1, NT_option_COMMA_, yy_action_1042) _ => Error } } -fn yy_state_1069(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1446(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_non_empty_list_commas_rev_deriving_directive_, yy_action_284) +} + +fn yy_state_1447(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LPAREN => Shift(yy_state_143) - NT_parameters => Shift(yy_state_1070) + T_LPAREN => Shift(yy_state_1448) + T_RPAREN | T_COMMA => Reduce(1, NT_deriving_directive, yy_action_283) _ => Error } } -fn yy_state_1070(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1448(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_error_annotation => Shift(yy_state_50) - T_THIN_ARROW => Shift(yy_state_51) - T_NORAISE => Shift(yy_state_78) - T_RAISE => Shift(yy_state_79) - NT_func_return_type => Shift(yy_state_1071) - T_EQUAL | T_LBRACE => Reduce(0, NT_func_return_type, yy_action_862) + NT_multiline_string => Shift(yy_state_2) + T_MULTILINE_INTERP => Shift(yy_state_4) + T_MULTILINE_STRING => Shift(yy_state_5) + T_REGEX_LITERAL => Shift(yy_state_6) + T_STRING => Shift(yy_state_7) + T_FLOAT => Shift(yy_state_8) + T_DOUBLE => Shift(yy_state_9) + T_INT => Shift(yy_state_10) + T_CHAR => Shift(yy_state_11) + T_BYTES => Shift(yy_state_12) + T_BYTE => Shift(yy_state_13) + T_FALSE => Shift(yy_state_14) + T_TRUE => Shift(yy_state_15) + T_BYTES_INTERP => Shift(yy_state_16) + T_INTERP => Shift(yy_state_17) + NT_non_empty_list_multiline_string_ => Shift(yy_state_18) + NT_simple_constant => Shift(yy_state_19) + T_AMPER => Shift(yy_state_20) + NT_qual_ident_ty => Shift(yy_state_26) + NT_tuple_expr => Shift(yy_state_27) + T_LBRACKET_BAR => Shift(yy_state_28) + T_LBRACKET => Shift(yy_state_36) + NT_constr => Shift(yy_state_47) + NT_qual_ident_simple_expr => Shift(yy_state_48) + NT_atomic_expr => Shift(yy_state_50) + NT_anony_fn => Shift(yy_state_51) + T_LBRACE => Shift(yy_state_52) + T_FN => Shift(yy_state_61) + NT_type_name => Shift(yy_state_139) + T_ASYNC => Shift(yy_state_152) + NT_simple_expr => Shift(yy_state_165) + NT_argument => Shift(yy_state_170) + NT_non_empty_list_commas_rev_argument_ => Shift(yy_state_171) + NT_expr => Shift(yy_state_175) + T_EXCLAMATION => Shift(yy_state_176) + T_MINUS => Shift(yy_state_191) + T_PLUS => Shift(yy_state_193) + T_UIDENT => Shift(yy_state_195) + T_PACKAGE_NAME => Shift(yy_state_196) + NT_prefix_expr => Shift(yy_state_201) + NT_range_expr => Shift(yy_state_212) + NT_postfix_expr => Shift(yy_state_223) + T_EXISTS => Shift(yy_state_224) + T_FORALL => Shift(yy_state_256) + NT_infix_expr => Shift(yy_state_272) + T_UNDERSCORE => Shift(yy_state_273) + NT_non_empty_list_commas_argument_ => Shift(yy_state_278) + T_LPAREN => Shift(yy_state_281) + NT_pipe_expr => Shift(yy_state_325) + NT_arrow_fn_expr => Shift(yy_state_344) + NT_quantifier_expr => Shift(yy_state_345) + NT_simple_try_expr => Shift(yy_state_346) + NT_lexscan_expr => Shift(yy_state_347) + NT_lexmatch_expr => Shift(yy_state_348) + NT_match_expr => Shift(yy_state_349) + NT_if_expr => Shift(yy_state_350) + NT_try_expr => Shift(yy_state_351) + NT_while_expr => Shift(yy_state_352) + NT_foreach_expr => Shift(yy_state_353) + NT_for_expr => Shift(yy_state_354) + T_LEXSCAN => Shift(yy_state_355) + NT_lexscan_header => Shift(yy_state_358) + T_LEXMATCH => Shift(yy_state_391) + NT_lexmatch_header => Shift(yy_state_399) + NT_match_header => Shift(yy_state_444) + T_MATCH => Shift(yy_state_605) + T_IF => Shift(yy_state_608) + T_TRY_EXCLAMATION => Shift(yy_state_614) + T_TRY_QUESTION => Shift(yy_state_616) + T_TRY => Shift(yy_state_618) + NT_loop_label_colon => Shift(yy_state_632) + T_POST_LABEL => Shift(yy_state_921) + T_EXTEND => Shift(yy_state_922) + T_LIDENT => Shift(yy_state_927) + NT_list_commas_argument_ => Shift(yy_state_1449) + T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_1071) + T_RPAREN => Reduce(0, NT_list_commas_argument_, yy_action_955) _ => Error } } -fn yy_state_1071(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1449(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACE => Shift(yy_state_120) - T_EQUAL => Shift(yy_state_1062) - NT_block_expr => Shift(yy_state_1064) - NT_impl_body => Shift(yy_state_1072) + T_RPAREN => Shift(yy_state_1450) _ => Error } } -fn yy_state_1072(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(11, NT_structure_item, yy_action_279) +fn yy_state_1450(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(4, NT_deriving_directive, yy_action_282) } -fn yy_state_1073(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1451(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_list_commas_deriving_directive_, yy_action_281) +} + +fn yy_state_1452(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_STRING => Shift(yy_state_1074) - NT_option_loced_string_ => Shift(yy_state_1075) - T_LPAREN | T_LBRACE => Reduce(0, NT_option_loced_string_, yy_action_278) + T_RPAREN => Shift(yy_state_1453) _ => Error } } -fn yy_state_1074(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_option_loced_string_, yy_action_276) +fn yy_state_1453(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(4, NT_deriving_directive_list, yy_action_280) } -fn yy_state_1075(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1454(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(7, NT_structure_item, yy_action_279) +} + +fn yy_state_1455(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LPAREN => Shift(yy_state_143) - NT_parameters => Shift(yy_state_1076) - NT_option_parameters_ => Shift(yy_state_1077) - T_LBRACE => Reduce(0, NT_option_parameters_, yy_action_275) + T_LBRACKET => Shift(yy_state_1172) + NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__ => Shift(yy_state_1183) + NT_optional_type_parameters_no_constraints => Shift(yy_state_1456) + T_PLUS_EQUAL | T_LBRACE => Reduce(0, NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__, yy_action_415) _ => Error } } -fn yy_state_1076(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_option_parameters_, yy_action_274) -} - -fn yy_state_1077(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1456(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACE => Shift(yy_state_120) - NT_block_expr => Shift(yy_state_1078) + T_LBRACE => Shift(yy_state_1457) + T_PLUS_EQUAL => Reduce(2, NT_extenum_extension_target, yy_action_278) _ => Error } } -fn yy_state_1078(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(4, NT_structure_item, yy_action_273) -} - -fn yy_state_1079(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1457(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_UIDENT => Shift(yy_state_1080) + T_ATTRIBUTE => Shift(yy_state_1168) + NT_enum_constructor => Shift(yy_state_1227) + NT_non_empty_list_attribute_ => Shift(yy_state_1231) + T_UIDENT => Shift(yy_state_1251) + NT_non_empty_list_semis_enum_constructor_ => Shift(yy_state_1254) + NT_list_semis_enum_constructor_ => Shift(yy_state_1458) + T_RBRACE => Reduce(0, NT_list_semis_enum_constructor_, yy_action_381) _ => Error } } -fn yy_state_1080(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1458(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_COLON => Shift(yy_state_1081) - NT_option_preceded_COLON_separated_nonempty_list_PLUS_tvar_constraint___ => Shift(yy_state_1083) - T_LBRACE => Reduce(0, NT_option_preceded_COLON_separated_nonempty_list_PLUS_tvar_constraint___, yy_action_272) + T_RBRACE => Shift(yy_state_1459) _ => Error } } -fn yy_state_1081(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1459(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_PACKAGE_NAME => Shift(yy_state_21) - T_UIDENT => Shift(yy_state_24) - NT_tvar_constraint => Shift(yy_state_1044) - NT_qual_ident_ty => Shift(yy_state_1047) - NT_separated_nonempty_list_PLUS_tvar_constraint_ => Shift(yy_state_1082) + T_DERIVE => Shift(yy_state_1440) + NT_deriving_directive_list => Shift(yy_state_1460) + T_EOF | T_SEMI => Reduce(0, NT_deriving_directive_list, yy_action_288) _ => Error } } -fn yy_state_1082(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(2, NT_option_preceded_COLON_separated_nonempty_list_PLUS_tvar_constraint___, yy_action_270) +fn yy_state_1460(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(7, NT_structure_item, yy_action_277) } -fn yy_state_1083(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1461(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACE => Shift(yy_state_1084) + T_LBRACE => Shift(yy_state_1462) _ => Error } } -fn yy_state_1084(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1462(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_ATTRIBUTE => Shift(yy_state_946) - NT_trait_method_decl => Shift(yy_state_1085) - NT_non_empty_list_attribute_ => Shift(yy_state_1089) - T_FN => Shift(yy_state_1124) - NT_trait_method_fn_header => Shift(yy_state_1126) - T_ASYNC => Shift(yy_state_1133) - NT_non_empty_list_semis_trait_method_decl_ => Shift(yy_state_1141) - NT_list_semis_trait_method_decl_ => Shift(yy_state_1142) - T_LIDENT => Reduce(0, NT_trait_method_fn_header, yy_action_269) - T_RBRACE => Reduce(0, NT_list_semis_trait_method_decl_, yy_action_268) + T_ATTRIBUTE => Shift(yy_state_1168) + NT_enum_constructor => Shift(yy_state_1227) + NT_non_empty_list_attribute_ => Shift(yy_state_1231) + T_UIDENT => Shift(yy_state_1251) + NT_non_empty_list_semis_enum_constructor_ => Shift(yy_state_1254) + NT_list_semis_enum_constructor_ => Shift(yy_state_1463) + T_RBRACE => Reduce(0, NT_list_semis_enum_constructor_, yy_action_381) _ => Error } } -fn yy_state_1085(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1463(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_option_SEMI_ => Shift(yy_state_1086) - T_SEMI => Shift(yy_state_1087) - T_RBRACE => Reduce(0, NT_option_SEMI_, yy_action_815) + T_RBRACE => Shift(yy_state_1464) _ => Error } } -fn yy_state_1086(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(2, NT_non_empty_list_semis_trait_method_decl_, yy_action_267) -} - -fn yy_state_1087(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1464(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_ATTRIBUTE => Shift(yy_state_946) - NT_trait_method_decl => Shift(yy_state_1085) - NT_non_empty_list_semis_trait_method_decl_ => Shift(yy_state_1088) - NT_non_empty_list_attribute_ => Shift(yy_state_1089) - T_FN => Shift(yy_state_1124) - NT_trait_method_fn_header => Shift(yy_state_1126) - T_ASYNC => Shift(yy_state_1133) - T_LIDENT => Reduce(0, NT_trait_method_fn_header, yy_action_269) - T_RBRACE => Reduce(1, NT_option_SEMI_, yy_action_813) + T_DERIVE => Shift(yy_state_1440) + NT_deriving_directive_list => Shift(yy_state_1465) + T_EOF | T_SEMI => Reduce(0, NT_deriving_directive_list, yy_action_288) _ => Error } } -fn yy_state_1088(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_non_empty_list_semis_trait_method_decl_, yy_action_266) +fn yy_state_1465(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(5, NT_structure_item, yy_action_276) } -fn yy_state_1089(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1466(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_trait_method_fn_header => Shift(yy_state_1090) - T_ASYNC => Shift(yy_state_1116) - T_FN => Shift(yy_state_1124) - T_LIDENT => Reduce(0, NT_trait_method_fn_header, yy_action_269) + T_LPAREN => Shift(yy_state_1467) + T_LBRACE => Shift(yy_state_1471) _ => Error } } -fn yy_state_1090(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1467(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LIDENT => Shift(yy_state_1091) + T_ASYNC => Shift(yy_state_65) + T_UNDERSCORE => Shift(yy_state_70) + T_AMPER => Shift(yy_state_71) + T_PACKAGE_NAME => Shift(yy_state_73) + NT_type_ => Shift(yy_state_76) + NT_non_empty_list_commas_rev_type__ => Shift(yy_state_77) + T_UIDENT => Shift(yy_state_80) + T_LPAREN => Shift(yy_state_84) + NT_simple_type => Shift(yy_state_110) + NT_non_empty_list_commas_type__ => Shift(yy_state_1468) _ => Error } } -fn yy_state_1091(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1468(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LPAREN => Shift(yy_state_1092) + T_RPAREN => Shift(yy_state_1469) _ => Error } } -fn yy_state_1092(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1469(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_ASYNC => Shift(yy_state_52) - T_UNDERSCORE => Shift(yy_state_57) - T_AMPER => Shift(yy_state_58) - T_PACKAGE_NAME => Shift(yy_state_60) - T_UIDENT => Shift(yy_state_67) - T_LPAREN => Shift(yy_state_71) - NT_simple_type => Shift(yy_state_97) - NT_trait_method_param => Shift(yy_state_1093) - NT_non_empty_list_commas_rev_trait_method_param_ => Shift(yy_state_1094) - T_POST_LABEL => Shift(yy_state_1098) - T_LIDENT => Shift(yy_state_1101) - NT_type_ => Shift(yy_state_1107) - NT_non_empty_list_commas_trait_method_param_ => Shift(yy_state_1108) - NT_list_commas_trait_method_param_ => Shift(yy_state_1109) - T_RPAREN => Reduce(0, NT_list_commas_trait_method_param_, yy_action_265) + T_DERIVE => Shift(yy_state_1440) + NT_deriving_directive_list => Shift(yy_state_1470) + T_EOF | T_SEMI => Reduce(0, NT_deriving_directive_list, yy_action_288) _ => Error } } -fn yy_state_1093(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_non_empty_list_commas_rev_trait_method_param_, yy_action_264) +fn yy_state_1470(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(5, NT_structure_item, yy_action_275) } -fn yy_state_1094(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1471(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_option_COMMA_ => Shift(yy_state_1095) - T_COMMA => Shift(yy_state_1096) - T_RPAREN => Reduce(0, NT_option_COMMA_, yy_action_876) + T_ATTRIBUTE => Shift(yy_state_1168) + T_MUTABLE => Shift(yy_state_1241) + NT_record_decl_field => Shift(yy_state_1472) + NT_non_empty_list_semi_rev_aux_record_decl_field_ => Shift(yy_state_1473) + T_FN => Shift(yy_state_1479) + T_ASYNC => Shift(yy_state_1491) + NT_non_empty_list_attribute_ => Shift(yy_state_1504) + T_PUB => Shift(yy_state_1561) + T_PRIV => Shift(yy_state_1570) + NT_option_MUTABLE_ => Shift(yy_state_1578) + NT_record_constr_decl => Shift(yy_state_1585) + NT_record_decl_body => Shift(yy_state_1587) + T_RBRACE => Reduce(0, NT_record_decl_body, yy_action_274) + T_LIDENT | T_EXTEND => Reduce(0, NT_option_MUTABLE_, yy_action_377) _ => Error } } -fn yy_state_1095(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(2, NT_non_empty_list_commas_trait_method_param_, yy_action_263) +fn yy_state_1472(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_non_empty_list_semi_rev_aux_record_decl_field_, yy_action_273) } -fn yy_state_1096(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1473(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_ASYNC => Shift(yy_state_52) - T_UNDERSCORE => Shift(yy_state_57) - T_AMPER => Shift(yy_state_58) - T_PACKAGE_NAME => Shift(yy_state_60) - T_UIDENT => Shift(yy_state_67) - T_LPAREN => Shift(yy_state_71) - NT_simple_type => Shift(yy_state_97) - NT_trait_method_param => Shift(yy_state_1097) - T_POST_LABEL => Shift(yy_state_1098) - T_LIDENT => Shift(yy_state_1101) - NT_type_ => Shift(yy_state_1107) - T_RPAREN => Reduce(1, NT_option_COMMA_, yy_action_874) + NT_option_SEMI_ => Shift(yy_state_1474) + T_SEMI => Shift(yy_state_1475) + T_RBRACE => Reduce(0, NT_option_SEMI_, yy_action_976) _ => Error } } -fn yy_state_1097(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_non_empty_list_commas_rev_trait_method_param_, yy_action_262) +fn yy_state_1474(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(2, NT_record_decl_body, yy_action_272) } -fn yy_state_1098(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1475(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_COLON => Shift(yy_state_1099) + T_ATTRIBUTE => Shift(yy_state_1168) + T_MUTABLE => Shift(yy_state_1241) + NT_record_decl_field => Shift(yy_state_1476) + NT_record_constr_decl => Shift(yy_state_1477) + T_FN => Shift(yy_state_1479) + T_ASYNC => Shift(yy_state_1491) + NT_non_empty_list_attribute_ => Shift(yy_state_1504) + T_PUB => Shift(yy_state_1561) + T_PRIV => Shift(yy_state_1570) + NT_option_MUTABLE_ => Shift(yy_state_1578) + T_LIDENT | T_EXTEND => Reduce(0, NT_option_MUTABLE_, yy_action_377) + T_RBRACE => Reduce(1, NT_option_SEMI_, yy_action_974) _ => Error } } -fn yy_state_1099(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1476(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_non_empty_list_semi_rev_aux_record_decl_field_, yy_action_271) +} + +fn yy_state_1477(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_ASYNC => Shift(yy_state_52) - T_UNDERSCORE => Shift(yy_state_57) - T_AMPER => Shift(yy_state_58) - T_PACKAGE_NAME => Shift(yy_state_60) - T_UIDENT => Shift(yy_state_67) - T_LPAREN => Shift(yy_state_71) - NT_simple_type => Shift(yy_state_97) - NT_type_ => Shift(yy_state_1100) + T_SEMI => Shift(yy_state_424) + NT_option_SEMI_ => Shift(yy_state_1478) + T_RBRACE => Reduce(0, NT_option_SEMI_, yy_action_976) _ => Error } } -fn yy_state_1100(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_trait_method_param, yy_action_261) +fn yy_state_1478(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(4, NT_record_decl_body, yy_action_270) } -fn yy_state_1101(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1479(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_QUESTION => Shift(yy_state_1102) - T_COLON => Shift(yy_state_1105) + NT_type_parameters => Shift(yy_state_1223) + NT_option_type_parameters_ => Shift(yy_state_1266) + T_LBRACKET => Shift(yy_state_1267) + NT_optional_type_parameters => Shift(yy_state_1480) + T_LIDENT | T_EXTEND => Reduce(0, NT_option_type_parameters_, yy_action_383) _ => Error } } -fn yy_state_1102(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1480(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_COLON => Shift(yy_state_1103) + T_EXTEND => Shift(yy_state_1481) + T_LIDENT => Shift(yy_state_1486) _ => Error } } -fn yy_state_1103(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1481(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_ASYNC => Shift(yy_state_52) - T_UNDERSCORE => Shift(yy_state_57) - T_AMPER => Shift(yy_state_58) - T_PACKAGE_NAME => Shift(yy_state_60) - T_UIDENT => Shift(yy_state_67) - T_LPAREN => Shift(yy_state_71) - NT_simple_type => Shift(yy_state_97) - NT_type_ => Shift(yy_state_1104) + T_LPAREN => Shift(yy_state_1482) _ => Error } } -fn yy_state_1104(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(4, NT_trait_method_param, yy_action_260) -} - -fn yy_state_1105(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1482(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_ASYNC => Shift(yy_state_52) - T_UNDERSCORE => Shift(yy_state_57) - T_AMPER => Shift(yy_state_58) - T_PACKAGE_NAME => Shift(yy_state_60) - T_UIDENT => Shift(yy_state_67) - T_LPAREN => Shift(yy_state_71) - NT_simple_type => Shift(yy_state_97) - NT_type_ => Shift(yy_state_1106) + T_ASYNC => Shift(yy_state_65) + T_UNDERSCORE => Shift(yy_state_70) + T_AMPER => Shift(yy_state_71) + T_PACKAGE_NAME => Shift(yy_state_73) + T_UIDENT => Shift(yy_state_80) + T_LPAREN => Shift(yy_state_84) + NT_simple_type => Shift(yy_state_110) + NT_trait_method_param => Shift(yy_state_1332) + NT_non_empty_list_commas_rev_trait_method_param_ => Shift(yy_state_1333) + T_POST_LABEL => Shift(yy_state_1337) + T_EXTEND => Shift(yy_state_1340) + T_LIDENT => Shift(yy_state_1346) + NT_type_ => Shift(yy_state_1352) + NT_non_empty_list_commas_trait_method_param_ => Shift(yy_state_1353) + NT_list_commas_trait_method_param_ => Shift(yy_state_1483) + T_RPAREN => Reduce(0, NT_list_commas_trait_method_param_, yy_action_326) _ => Error } } -fn yy_state_1106(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_trait_method_param, yy_action_259) +fn yy_state_1483(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_RPAREN => Shift(yy_state_1484) + _ => Error + } } -fn yy_state_1107(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_trait_method_param, yy_action_258) +fn yy_state_1484(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + NT_error_annotation => Shift(yy_state_63) + T_THIN_ARROW => Shift(yy_state_64) + T_NORAISE => Shift(yy_state_91) + T_RAISE => Shift(yy_state_92) + NT_func_return_type => Shift(yy_state_1485) + T_SEMI | T_RBRACE => Reduce(0, NT_func_return_type, yy_action_1023) + _ => Error + } } -fn yy_state_1108(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_list_commas_trait_method_param_, yy_action_257) +fn yy_state_1485(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(7, NT_record_constr_decl, yy_action_269) } -fn yy_state_1109(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1486(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RPAREN => Shift(yy_state_1110) + T_LPAREN => Shift(yy_state_1487) _ => Error } } -fn yy_state_1110(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1487(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_error_annotation => Shift(yy_state_50) - T_THIN_ARROW => Shift(yy_state_51) - T_NORAISE => Shift(yy_state_78) - T_RAISE => Shift(yy_state_79) - NT_func_return_type => Shift(yy_state_1111) - T_EQUAL | T_SEMI | T_RBRACE => Reduce(0, NT_func_return_type, yy_action_862) + T_ASYNC => Shift(yy_state_65) + T_UNDERSCORE => Shift(yy_state_70) + T_AMPER => Shift(yy_state_71) + T_PACKAGE_NAME => Shift(yy_state_73) + T_UIDENT => Shift(yy_state_80) + T_LPAREN => Shift(yy_state_84) + NT_simple_type => Shift(yy_state_110) + NT_trait_method_param => Shift(yy_state_1332) + NT_non_empty_list_commas_rev_trait_method_param_ => Shift(yy_state_1333) + T_POST_LABEL => Shift(yy_state_1337) + T_EXTEND => Shift(yy_state_1340) + T_LIDENT => Shift(yy_state_1346) + NT_type_ => Shift(yy_state_1352) + NT_non_empty_list_commas_trait_method_param_ => Shift(yy_state_1353) + NT_list_commas_trait_method_param_ => Shift(yy_state_1488) + T_RPAREN => Reduce(0, NT_list_commas_trait_method_param_, yy_action_326) _ => Error } } -fn yy_state_1111(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1488(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_EQUAL => Shift(yy_state_1112) - NT_option_preceded_EQUAL_wildcard__ => Shift(yy_state_1115) - T_SEMI | T_RBRACE => Reduce(0, NT_option_preceded_EQUAL_wildcard__, yy_action_256) + T_RPAREN => Shift(yy_state_1489) _ => Error } } -fn yy_state_1112(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1489(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_wildcard => Shift(yy_state_1113) - T_UNDERSCORE => Shift(yy_state_1114) + NT_error_annotation => Shift(yy_state_63) + T_THIN_ARROW => Shift(yy_state_64) + T_NORAISE => Shift(yy_state_91) + T_RAISE => Shift(yy_state_92) + NT_func_return_type => Shift(yy_state_1490) + T_SEMI | T_RBRACE => Reduce(0, NT_func_return_type, yy_action_1023) _ => Error } } -fn yy_state_1113(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(2, NT_option_preceded_EQUAL_wildcard__, yy_action_254) -} - -fn yy_state_1114(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_wildcard, yy_action_253) -} - -fn yy_state_1115(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(8, NT_trait_method_decl, yy_action_252) +fn yy_state_1490(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(7, NT_record_constr_decl, yy_action_268) } -fn yy_state_1116(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1491(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_trait_method_fn_header => Shift(yy_state_1117) - T_FN => Shift(yy_state_1124) - T_LIDENT => Reduce(0, NT_trait_method_fn_header, yy_action_269) + T_FN => Shift(yy_state_1492) _ => Error } } -fn yy_state_1117(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1492(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LIDENT => Shift(yy_state_1118) + NT_type_parameters => Shift(yy_state_1223) + NT_option_type_parameters_ => Shift(yy_state_1266) + T_LBRACKET => Shift(yy_state_1267) + NT_optional_type_parameters => Shift(yy_state_1493) + T_LIDENT | T_EXTEND => Reduce(0, NT_option_type_parameters_, yy_action_383) _ => Error } } -fn yy_state_1118(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1493(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LPAREN => Shift(yy_state_1119) + T_EXTEND => Shift(yy_state_1494) + T_LIDENT => Shift(yy_state_1499) _ => Error } } -fn yy_state_1119(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1494(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_ASYNC => Shift(yy_state_52) - T_UNDERSCORE => Shift(yy_state_57) - T_AMPER => Shift(yy_state_58) - T_PACKAGE_NAME => Shift(yy_state_60) - T_UIDENT => Shift(yy_state_67) - T_LPAREN => Shift(yy_state_71) - NT_simple_type => Shift(yy_state_97) - NT_trait_method_param => Shift(yy_state_1093) - NT_non_empty_list_commas_rev_trait_method_param_ => Shift(yy_state_1094) - T_POST_LABEL => Shift(yy_state_1098) - T_LIDENT => Shift(yy_state_1101) - NT_type_ => Shift(yy_state_1107) - NT_non_empty_list_commas_trait_method_param_ => Shift(yy_state_1108) - NT_list_commas_trait_method_param_ => Shift(yy_state_1120) - T_RPAREN => Reduce(0, NT_list_commas_trait_method_param_, yy_action_265) + T_LPAREN => Shift(yy_state_1495) _ => Error } } -fn yy_state_1120(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1495(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RPAREN => Shift(yy_state_1121) + T_ASYNC => Shift(yy_state_65) + T_UNDERSCORE => Shift(yy_state_70) + T_AMPER => Shift(yy_state_71) + T_PACKAGE_NAME => Shift(yy_state_73) + T_UIDENT => Shift(yy_state_80) + T_LPAREN => Shift(yy_state_84) + NT_simple_type => Shift(yy_state_110) + NT_trait_method_param => Shift(yy_state_1332) + NT_non_empty_list_commas_rev_trait_method_param_ => Shift(yy_state_1333) + T_POST_LABEL => Shift(yy_state_1337) + T_EXTEND => Shift(yy_state_1340) + T_LIDENT => Shift(yy_state_1346) + NT_type_ => Shift(yy_state_1352) + NT_non_empty_list_commas_trait_method_param_ => Shift(yy_state_1353) + NT_list_commas_trait_method_param_ => Shift(yy_state_1496) + T_RPAREN => Reduce(0, NT_list_commas_trait_method_param_, yy_action_326) _ => Error } } -fn yy_state_1121(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1496(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_error_annotation => Shift(yy_state_50) - T_THIN_ARROW => Shift(yy_state_51) - T_NORAISE => Shift(yy_state_78) - T_RAISE => Shift(yy_state_79) - NT_func_return_type => Shift(yy_state_1122) - T_EQUAL | T_SEMI | T_RBRACE => Reduce(0, NT_func_return_type, yy_action_862) + T_RPAREN => Shift(yy_state_1497) _ => Error } } -fn yy_state_1122(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1497(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_EQUAL => Shift(yy_state_1112) - NT_option_preceded_EQUAL_wildcard__ => Shift(yy_state_1123) - T_SEMI | T_RBRACE => Reduce(0, NT_option_preceded_EQUAL_wildcard__, yy_action_256) + NT_error_annotation => Shift(yy_state_63) + T_THIN_ARROW => Shift(yy_state_64) + T_NORAISE => Shift(yy_state_91) + T_RAISE => Shift(yy_state_92) + NT_func_return_type => Shift(yy_state_1498) + T_SEMI | T_RBRACE => Reduce(0, NT_func_return_type, yy_action_1023) _ => Error } } -fn yy_state_1123(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(9, NT_trait_method_decl, yy_action_251) +fn yy_state_1498(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(8, NT_record_constr_decl, yy_action_267) } -fn yy_state_1124(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1499(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_type_parameters => Shift(yy_state_996) - NT_option_type_parameters_ => Shift(yy_state_1036) - T_LBRACKET => Shift(yy_state_1037) - NT_optional_type_parameters => Shift(yy_state_1125) - T_LIDENT => Reduce(0, NT_option_type_parameters_, yy_action_319) + T_LPAREN => Shift(yy_state_1500) _ => Error } } -fn yy_state_1125(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(2, NT_trait_method_fn_header, yy_action_250) -} - -fn yy_state_1126(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1500(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LIDENT => Shift(yy_state_1127) + T_ASYNC => Shift(yy_state_65) + T_UNDERSCORE => Shift(yy_state_70) + T_AMPER => Shift(yy_state_71) + T_PACKAGE_NAME => Shift(yy_state_73) + T_UIDENT => Shift(yy_state_80) + T_LPAREN => Shift(yy_state_84) + NT_simple_type => Shift(yy_state_110) + NT_trait_method_param => Shift(yy_state_1332) + NT_non_empty_list_commas_rev_trait_method_param_ => Shift(yy_state_1333) + T_POST_LABEL => Shift(yy_state_1337) + T_EXTEND => Shift(yy_state_1340) + T_LIDENT => Shift(yy_state_1346) + NT_type_ => Shift(yy_state_1352) + NT_non_empty_list_commas_trait_method_param_ => Shift(yy_state_1353) + NT_list_commas_trait_method_param_ => Shift(yy_state_1501) + T_RPAREN => Reduce(0, NT_list_commas_trait_method_param_, yy_action_326) _ => Error } } -fn yy_state_1127(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1501(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LPAREN => Shift(yy_state_1128) + T_RPAREN => Shift(yy_state_1502) _ => Error } } -fn yy_state_1128(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1502(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_ASYNC => Shift(yy_state_52) - T_UNDERSCORE => Shift(yy_state_57) - T_AMPER => Shift(yy_state_58) - T_PACKAGE_NAME => Shift(yy_state_60) - T_UIDENT => Shift(yy_state_67) - T_LPAREN => Shift(yy_state_71) - NT_simple_type => Shift(yy_state_97) - NT_trait_method_param => Shift(yy_state_1093) - NT_non_empty_list_commas_rev_trait_method_param_ => Shift(yy_state_1094) - T_POST_LABEL => Shift(yy_state_1098) - T_LIDENT => Shift(yy_state_1101) - NT_type_ => Shift(yy_state_1107) - NT_non_empty_list_commas_trait_method_param_ => Shift(yy_state_1108) - NT_list_commas_trait_method_param_ => Shift(yy_state_1129) - T_RPAREN => Reduce(0, NT_list_commas_trait_method_param_, yy_action_265) + NT_error_annotation => Shift(yy_state_63) + T_THIN_ARROW => Shift(yy_state_64) + T_NORAISE => Shift(yy_state_91) + T_RAISE => Shift(yy_state_92) + NT_func_return_type => Shift(yy_state_1503) + T_SEMI | T_RBRACE => Reduce(0, NT_func_return_type, yy_action_1023) _ => Error } } -fn yy_state_1129(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1503(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(8, NT_record_constr_decl, yy_action_266) +} + +fn yy_state_1504(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RPAREN => Shift(yy_state_1130) + T_MUTABLE => Shift(yy_state_1241) + T_FN => Shift(yy_state_1505) + T_ASYNC => Shift(yy_state_1517) + T_PUB => Shift(yy_state_1530) + T_PRIV => Shift(yy_state_1546) + NT_option_MUTABLE_ => Shift(yy_state_1554) + T_LIDENT | T_EXTEND => Reduce(0, NT_option_MUTABLE_, yy_action_377) _ => Error } } -fn yy_state_1130(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1505(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_error_annotation => Shift(yy_state_50) - T_THIN_ARROW => Shift(yy_state_51) - T_NORAISE => Shift(yy_state_78) - T_RAISE => Shift(yy_state_79) - NT_func_return_type => Shift(yy_state_1131) - T_EQUAL | T_SEMI | T_RBRACE => Reduce(0, NT_func_return_type, yy_action_862) + NT_type_parameters => Shift(yy_state_1223) + NT_option_type_parameters_ => Shift(yy_state_1266) + T_LBRACKET => Shift(yy_state_1267) + NT_optional_type_parameters => Shift(yy_state_1506) + T_LIDENT | T_EXTEND => Reduce(0, NT_option_type_parameters_, yy_action_383) _ => Error } } -fn yy_state_1131(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1506(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_EQUAL => Shift(yy_state_1112) - NT_option_preceded_EQUAL_wildcard__ => Shift(yy_state_1132) - T_SEMI | T_RBRACE => Reduce(0, NT_option_preceded_EQUAL_wildcard__, yy_action_256) + T_EXTEND => Shift(yy_state_1507) + T_LIDENT => Shift(yy_state_1512) _ => Error } } -fn yy_state_1132(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(7, NT_trait_method_decl, yy_action_249) -} - -fn yy_state_1133(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1507(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_FN => Shift(yy_state_1124) - NT_trait_method_fn_header => Shift(yy_state_1134) - T_LIDENT => Reduce(0, NT_trait_method_fn_header, yy_action_269) + T_LPAREN => Shift(yy_state_1508) _ => Error } } -fn yy_state_1134(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1508(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LIDENT => Shift(yy_state_1135) + T_ASYNC => Shift(yy_state_65) + T_UNDERSCORE => Shift(yy_state_70) + T_AMPER => Shift(yy_state_71) + T_PACKAGE_NAME => Shift(yy_state_73) + T_UIDENT => Shift(yy_state_80) + T_LPAREN => Shift(yy_state_84) + NT_simple_type => Shift(yy_state_110) + NT_trait_method_param => Shift(yy_state_1332) + NT_non_empty_list_commas_rev_trait_method_param_ => Shift(yy_state_1333) + T_POST_LABEL => Shift(yy_state_1337) + T_EXTEND => Shift(yy_state_1340) + T_LIDENT => Shift(yy_state_1346) + NT_type_ => Shift(yy_state_1352) + NT_non_empty_list_commas_trait_method_param_ => Shift(yy_state_1353) + NT_list_commas_trait_method_param_ => Shift(yy_state_1509) + T_RPAREN => Reduce(0, NT_list_commas_trait_method_param_, yy_action_326) _ => Error } } -fn yy_state_1135(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1509(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LPAREN => Shift(yy_state_1136) + T_RPAREN => Shift(yy_state_1510) _ => Error } } -fn yy_state_1136(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1510(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_ASYNC => Shift(yy_state_52) - T_UNDERSCORE => Shift(yy_state_57) - T_AMPER => Shift(yy_state_58) - T_PACKAGE_NAME => Shift(yy_state_60) - T_UIDENT => Shift(yy_state_67) - T_LPAREN => Shift(yy_state_71) - NT_simple_type => Shift(yy_state_97) - NT_trait_method_param => Shift(yy_state_1093) - NT_non_empty_list_commas_rev_trait_method_param_ => Shift(yy_state_1094) - T_POST_LABEL => Shift(yy_state_1098) - T_LIDENT => Shift(yy_state_1101) - NT_type_ => Shift(yy_state_1107) - NT_non_empty_list_commas_trait_method_param_ => Shift(yy_state_1108) - NT_list_commas_trait_method_param_ => Shift(yy_state_1137) - T_RPAREN => Reduce(0, NT_list_commas_trait_method_param_, yy_action_265) + NT_error_annotation => Shift(yy_state_63) + T_THIN_ARROW => Shift(yy_state_64) + T_NORAISE => Shift(yy_state_91) + T_RAISE => Shift(yy_state_92) + NT_func_return_type => Shift(yy_state_1511) + T_SEMI | T_RBRACE => Reduce(0, NT_func_return_type, yy_action_1023) _ => Error } } -fn yy_state_1137(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1511(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(8, NT_record_constr_decl, yy_action_265) +} + +fn yy_state_1512(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RPAREN => Shift(yy_state_1138) + T_LPAREN => Shift(yy_state_1513) _ => Error } } -fn yy_state_1138(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1513(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_error_annotation => Shift(yy_state_50) - T_THIN_ARROW => Shift(yy_state_51) - T_NORAISE => Shift(yy_state_78) - T_RAISE => Shift(yy_state_79) - NT_func_return_type => Shift(yy_state_1139) - T_EQUAL | T_SEMI | T_RBRACE => Reduce(0, NT_func_return_type, yy_action_862) + T_ASYNC => Shift(yy_state_65) + T_UNDERSCORE => Shift(yy_state_70) + T_AMPER => Shift(yy_state_71) + T_PACKAGE_NAME => Shift(yy_state_73) + T_UIDENT => Shift(yy_state_80) + T_LPAREN => Shift(yy_state_84) + NT_simple_type => Shift(yy_state_110) + NT_trait_method_param => Shift(yy_state_1332) + NT_non_empty_list_commas_rev_trait_method_param_ => Shift(yy_state_1333) + T_POST_LABEL => Shift(yy_state_1337) + T_EXTEND => Shift(yy_state_1340) + T_LIDENT => Shift(yy_state_1346) + NT_type_ => Shift(yy_state_1352) + NT_non_empty_list_commas_trait_method_param_ => Shift(yy_state_1353) + NT_list_commas_trait_method_param_ => Shift(yy_state_1514) + T_RPAREN => Reduce(0, NT_list_commas_trait_method_param_, yy_action_326) _ => Error } } -fn yy_state_1139(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1514(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_EQUAL => Shift(yy_state_1112) - NT_option_preceded_EQUAL_wildcard__ => Shift(yy_state_1140) - T_SEMI | T_RBRACE => Reduce(0, NT_option_preceded_EQUAL_wildcard__, yy_action_256) + T_RPAREN => Shift(yy_state_1515) _ => Error } } -fn yy_state_1140(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(8, NT_trait_method_decl, yy_action_248) -} - -fn yy_state_1141(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_list_semis_trait_method_decl_, yy_action_247) -} - -fn yy_state_1142(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1515(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RBRACE => Shift(yy_state_1143) + NT_error_annotation => Shift(yy_state_63) + T_THIN_ARROW => Shift(yy_state_64) + T_NORAISE => Shift(yy_state_91) + T_RAISE => Shift(yy_state_92) + NT_func_return_type => Shift(yy_state_1516) + T_SEMI | T_RBRACE => Reduce(0, NT_func_return_type, yy_action_1023) _ => Error } } -fn yy_state_1143(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(6, NT_structure_item, yy_action_246) +fn yy_state_1516(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(8, NT_record_constr_decl, yy_action_264) } -fn yy_state_1144(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_structure_item, yy_action_245) +fn yy_state_1517(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_FN => Shift(yy_state_1518) + _ => Error + } } -fn yy_state_1145(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1518(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_WHERE => Shift(yy_state_627) - NT_optional_where_clause => Shift(yy_state_1146) - T_EQUAL => Shift(yy_state_1148) - T_LBRACE => Reduce(0, NT_optional_where_clause, yy_action_500) + NT_type_parameters => Shift(yy_state_1223) + NT_option_type_parameters_ => Shift(yy_state_1266) + T_LBRACKET => Shift(yy_state_1267) + NT_optional_type_parameters => Shift(yy_state_1519) + T_LIDENT | T_EXTEND => Reduce(0, NT_option_type_parameters_, yy_action_383) _ => Error } } -fn yy_state_1146(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1519(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACE => Shift(yy_state_120) - NT_block_expr => Shift(yy_state_1147) + T_EXTEND => Shift(yy_state_1520) + T_LIDENT => Shift(yy_state_1525) _ => Error } } -fn yy_state_1147(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_structure_item, yy_action_244) +fn yy_state_1520(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_LPAREN => Shift(yy_state_1521) + _ => Error + } } -fn yy_state_1148(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1521(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_MULTILINE_STRING => Shift(yy_state_1149) - NT_non_empty_list_MULTILINE_STRING_ => Shift(yy_state_1151) - T_STRING => Shift(yy_state_1152) + T_ASYNC => Shift(yy_state_65) + T_UNDERSCORE => Shift(yy_state_70) + T_AMPER => Shift(yy_state_71) + T_PACKAGE_NAME => Shift(yy_state_73) + T_UIDENT => Shift(yy_state_80) + T_LPAREN => Shift(yy_state_84) + NT_simple_type => Shift(yy_state_110) + NT_trait_method_param => Shift(yy_state_1332) + NT_non_empty_list_commas_rev_trait_method_param_ => Shift(yy_state_1333) + T_POST_LABEL => Shift(yy_state_1337) + T_EXTEND => Shift(yy_state_1340) + T_LIDENT => Shift(yy_state_1346) + NT_type_ => Shift(yy_state_1352) + NT_non_empty_list_commas_trait_method_param_ => Shift(yy_state_1353) + NT_list_commas_trait_method_param_ => Shift(yy_state_1522) + T_RPAREN => Reduce(0, NT_list_commas_trait_method_param_, yy_action_326) _ => Error } } -fn yy_state_1149(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1522(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_MULTILINE_STRING => Shift(yy_state_1149) - NT_non_empty_list_MULTILINE_STRING_ => Shift(yy_state_1150) - T_EOF | T_SEMI => Reduce(1, NT_non_empty_list_MULTILINE_STRING_, yy_action_243) + T_RPAREN => Shift(yy_state_1523) _ => Error } } -fn yy_state_1150(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(2, NT_non_empty_list_MULTILINE_STRING_, yy_action_242) +fn yy_state_1523(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + NT_error_annotation => Shift(yy_state_63) + T_THIN_ARROW => Shift(yy_state_64) + T_NORAISE => Shift(yy_state_91) + T_RAISE => Shift(yy_state_92) + NT_func_return_type => Shift(yy_state_1524) + T_SEMI | T_RBRACE => Reduce(0, NT_func_return_type, yy_action_1023) + _ => Error + } } -fn yy_state_1151(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_structure_item, yy_action_241) +fn yy_state_1524(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(9, NT_record_constr_decl, yy_action_263) } -fn yy_state_1152(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1525(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_STRING => Shift(yy_state_1153) - T_EOF | T_SEMI => Reduce(3, NT_structure_item, yy_action_240) + T_LPAREN => Shift(yy_state_1526) _ => Error } } -fn yy_state_1153(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(4, NT_structure_item, yy_action_239) +fn yy_state_1526(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_ASYNC => Shift(yy_state_65) + T_UNDERSCORE => Shift(yy_state_70) + T_AMPER => Shift(yy_state_71) + T_PACKAGE_NAME => Shift(yy_state_73) + T_UIDENT => Shift(yy_state_80) + T_LPAREN => Shift(yy_state_84) + NT_simple_type => Shift(yy_state_110) + NT_trait_method_param => Shift(yy_state_1332) + NT_non_empty_list_commas_rev_trait_method_param_ => Shift(yy_state_1333) + T_POST_LABEL => Shift(yy_state_1337) + T_EXTEND => Shift(yy_state_1340) + T_LIDENT => Shift(yy_state_1346) + NT_type_ => Shift(yy_state_1352) + NT_non_empty_list_commas_trait_method_param_ => Shift(yy_state_1353) + NT_list_commas_trait_method_param_ => Shift(yy_state_1527) + T_RPAREN => Reduce(0, NT_list_commas_trait_method_param_, yy_action_326) + _ => Error + } } -fn yy_state_1154(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1527(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_EQUAL => Shift(yy_state_1155) + T_RPAREN => Shift(yy_state_1528) _ => Error } } -fn yy_state_1155(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1528(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_MULTILINE_STRING => Shift(yy_state_1149) - NT_non_empty_list_MULTILINE_STRING_ => Shift(yy_state_1156) - T_STRING => Shift(yy_state_1157) + NT_error_annotation => Shift(yy_state_63) + T_THIN_ARROW => Shift(yy_state_64) + T_NORAISE => Shift(yy_state_91) + T_RAISE => Shift(yy_state_92) + NT_func_return_type => Shift(yy_state_1529) + T_SEMI | T_RBRACE => Reduce(0, NT_func_return_type, yy_action_1023) _ => Error } } -fn yy_state_1156(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_structure_item, yy_action_238) +fn yy_state_1529(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(9, NT_record_constr_decl, yy_action_262) } -fn yy_state_1157(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1530(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_STRING => Shift(yy_state_1158) - T_EOF | T_SEMI => Reduce(3, NT_structure_item, yy_action_237) + NT_pub_attr => Shift(yy_state_1531) + T_LPAREN => Shift(yy_state_1539) + T_LIDENT | T_MUTABLE | T_EXTEND => Reduce(0, NT_pub_attr, yy_action_261) _ => Error } } -fn yy_state_1158(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(4, NT_structure_item, yy_action_236) -} - -fn yy_state_1159(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1531(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_EQUAL => Shift(yy_state_1160) + T_MUTABLE => Shift(yy_state_1241) + NT_option_MUTABLE_ => Shift(yy_state_1532) + T_LIDENT | T_EXTEND => Reduce(0, NT_option_MUTABLE_, yy_action_377) _ => Error } } -fn yy_state_1160(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1532(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_multiline_string => Shift(yy_state_2) - T_MULTILINE_INTERP => Shift(yy_state_4) - T_MULTILINE_STRING => Shift(yy_state_5) - T_REGEX_LITERAL => Shift(yy_state_6) - T_STRING => Shift(yy_state_7) - T_FLOAT => Shift(yy_state_8) - T_DOUBLE => Shift(yy_state_9) - T_INT => Shift(yy_state_10) - T_CHAR => Shift(yy_state_11) - T_BYTES => Shift(yy_state_12) - T_BYTE => Shift(yy_state_13) - T_FALSE => Shift(yy_state_14) - T_TRUE => Shift(yy_state_15) - T_INTERP => Shift(yy_state_16) - NT_non_empty_list_multiline_string_ => Shift(yy_state_17) - NT_simple_constant => Shift(yy_state_18) - T_AMPER => Shift(yy_state_19) - NT_qual_ident_ty => Shift(yy_state_25) - NT_tuple_expr => Shift(yy_state_26) - T_LBRACKET => Shift(yy_state_27) - NT_constr => Shift(yy_state_35) - NT_qual_ident_simple_expr => Shift(yy_state_36) - NT_atomic_expr => Shift(yy_state_37) - NT_anony_fn => Shift(yy_state_38) - T_LBRACE => Shift(yy_state_39) - T_FN => Shift(yy_state_48) - NT_type_name => Shift(yy_state_126) - T_ASYNC => Shift(yy_state_138) - NT_simple_expr => Shift(yy_state_151) - T_EXCLAMATION => Shift(yy_state_162) - T_MINUS => Shift(yy_state_178) - T_PLUS => Shift(yy_state_180) - T_UIDENT => Shift(yy_state_182) - T_PACKAGE_NAME => Shift(yy_state_183) - NT_prefix_expr => Shift(yy_state_187) - NT_range_expr => Shift(yy_state_198) - NT_postfix_expr => Shift(yy_state_416) - T_EXISTS => Shift(yy_state_417) - T_FORALL => Shift(yy_state_449) - NT_infix_expr => Shift(yy_state_455) - T_UNDERSCORE => Shift(yy_state_456) - T_LPAREN => Shift(yy_state_464) - NT_pipe_expr => Shift(yy_state_497) - NT_arrow_fn_expr => Shift(yy_state_513) - NT_quantifier_expr => Shift(yy_state_514) - NT_simple_try_expr => Shift(yy_state_515) - NT_lexmatch_expr => Shift(yy_state_516) - NT_match_expr => Shift(yy_state_517) - NT_if_expr => Shift(yy_state_518) - NT_try_expr => Shift(yy_state_519) - NT_while_expr => Shift(yy_state_520) - NT_foreach_expr => Shift(yy_state_521) - NT_for_expr => Shift(yy_state_522) - T_LEXMATCH => Shift(yy_state_523) - NT_lexmatch_header => Shift(yy_state_529) - NT_match_header => Shift(yy_state_540) - T_MATCH => Shift(yy_state_550) - T_IF => Shift(yy_state_553) - T_TRY_EXCLAMATION => Shift(yy_state_559) - T_TRY_QUESTION => Shift(yy_state_561) - T_TRY => Shift(yy_state_563) - NT_loop_label_colon => Shift(yy_state_577) - T_POST_LABEL => Shift(yy_state_585) - T_LIDENT => Shift(yy_state_587) - NT_expr => Shift(yy_state_1161) - T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_902) + T_EXTEND => Shift(yy_state_1533) + T_LIDENT => Shift(yy_state_1536) _ => Error } } -fn yy_state_1161(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_structure_item, yy_action_235) +fn yy_state_1533(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_COLON => Shift(yy_state_1534) + _ => Error + } } -fn yy_state_1162(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1534(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_PACKAGE_NAME => Shift(yy_state_1163) - NT_extenum_extension_target => Shift(yy_state_1166) - T_UIDENT => Shift(yy_state_1186) + T_ASYNC => Shift(yy_state_65) + T_UNDERSCORE => Shift(yy_state_70) + T_AMPER => Shift(yy_state_71) + T_PACKAGE_NAME => Shift(yy_state_73) + T_UIDENT => Shift(yy_state_80) + T_LPAREN => Shift(yy_state_84) + NT_simple_type => Shift(yy_state_110) + NT_type_ => Shift(yy_state_1535) _ => Error } } -fn yy_state_1163(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1535(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(7, NT_record_decl_field, yy_action_260) +} + +fn yy_state_1536(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_DOT_UIDENT => Shift(yy_state_1164) + T_COLON => Shift(yy_state_1537) _ => Error } } -fn yy_state_1164(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1537(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACKET => Shift(yy_state_950) - NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__ => Shift(yy_state_961) - NT_optional_type_parameters_no_constraints => Shift(yy_state_1165) - T_PLUS_EQUAL => Reduce(0, NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__, yy_action_347) + T_ASYNC => Shift(yy_state_65) + T_UNDERSCORE => Shift(yy_state_70) + T_AMPER => Shift(yy_state_71) + T_PACKAGE_NAME => Shift(yy_state_73) + T_UIDENT => Shift(yy_state_80) + T_LPAREN => Shift(yy_state_84) + NT_simple_type => Shift(yy_state_110) + NT_type_ => Shift(yy_state_1538) _ => Error } } -fn yy_state_1165(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_extenum_extension_target, yy_action_234) +fn yy_state_1538(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(7, NT_record_decl_field, yy_action_259) } -fn yy_state_1166(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1539(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_PLUS_EQUAL => Shift(yy_state_1167) + T_EXTEND => Shift(yy_state_1540) + T_LIDENT => Shift(yy_state_1542) + T_READONLY => Shift(yy_state_1544) _ => Error } } -fn yy_state_1167(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1540(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACE => Shift(yy_state_1168) + T_RPAREN => Shift(yy_state_1541) _ => Error } } -fn yy_state_1168(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1541(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_pub_attr, yy_action_258) +} + +fn yy_state_1542(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_ATTRIBUTE => Shift(yy_state_946) - NT_enum_constructor => Shift(yy_state_1000) - NT_non_empty_list_attribute_ => Shift(yy_state_1004) - T_UIDENT => Shift(yy_state_1024) - NT_non_empty_list_semis_enum_constructor_ => Shift(yy_state_1027) - NT_list_semis_enum_constructor_ => Shift(yy_state_1169) - T_RBRACE => Reduce(0, NT_list_semis_enum_constructor_, yy_action_317) + T_RPAREN => Shift(yy_state_1543) _ => Error } } -fn yy_state_1169(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1543(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_pub_attr, yy_action_257) +} + +fn yy_state_1544(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RBRACE => Shift(yy_state_1170) + T_RPAREN => Shift(yy_state_1545) _ => Error } } -fn yy_state_1170(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1545(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_pub_attr, yy_action_256) +} + +fn yy_state_1546(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_DERIVE => Shift(yy_state_1171) - NT_deriving_directive_list => Shift(yy_state_1185) - T_EOF | T_SEMI => Reduce(0, NT_deriving_directive_list, yy_action_233) + T_MUTABLE => Shift(yy_state_1241) + NT_option_MUTABLE_ => Shift(yy_state_1547) + T_LIDENT | T_EXTEND => Reduce(0, NT_option_MUTABLE_, yy_action_377) _ => Error } } -fn yy_state_1171(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1547(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LPAREN => Shift(yy_state_1172) + T_EXTEND => Shift(yy_state_1548) + T_LIDENT => Shift(yy_state_1551) _ => Error } } -fn yy_state_1172(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1548(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_AMPER => Shift(yy_state_19) - T_PACKAGE_NAME => Shift(yy_state_21) - T_UIDENT => Shift(yy_state_24) - NT_qual_ident_ty => Shift(yy_state_25) - NT_deriving_directive => Shift(yy_state_1173) - NT_non_empty_list_commas_rev_deriving_directive_ => Shift(yy_state_1174) - NT_type_name => Shift(yy_state_1178) - NT_non_empty_list_commas_deriving_directive_ => Shift(yy_state_1182) - NT_list_commas_deriving_directive_ => Shift(yy_state_1183) - T_RPAREN => Reduce(0, NT_list_commas_deriving_directive_, yy_action_232) + T_COLON => Shift(yy_state_1549) _ => Error } } -fn yy_state_1173(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_non_empty_list_commas_rev_deriving_directive_, yy_action_231) -} - -fn yy_state_1174(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1549(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_option_COMMA_ => Shift(yy_state_1175) - T_COMMA => Shift(yy_state_1176) - T_RPAREN => Reduce(0, NT_option_COMMA_, yy_action_876) + T_ASYNC => Shift(yy_state_65) + T_UNDERSCORE => Shift(yy_state_70) + T_AMPER => Shift(yy_state_71) + T_PACKAGE_NAME => Shift(yy_state_73) + T_UIDENT => Shift(yy_state_80) + T_LPAREN => Shift(yy_state_84) + NT_simple_type => Shift(yy_state_110) + NT_type_ => Shift(yy_state_1550) _ => Error } } -fn yy_state_1175(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(2, NT_non_empty_list_commas_deriving_directive_, yy_action_230) +fn yy_state_1550(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(6, NT_record_decl_field, yy_action_255) } -fn yy_state_1176(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1551(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_AMPER => Shift(yy_state_19) - T_PACKAGE_NAME => Shift(yy_state_21) - T_UIDENT => Shift(yy_state_24) - NT_qual_ident_ty => Shift(yy_state_25) - NT_deriving_directive => Shift(yy_state_1177) - NT_type_name => Shift(yy_state_1178) - T_RPAREN => Reduce(1, NT_option_COMMA_, yy_action_874) + T_COLON => Shift(yy_state_1552) _ => Error } } -fn yy_state_1177(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_non_empty_list_commas_rev_deriving_directive_, yy_action_229) -} - -fn yy_state_1178(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1552(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LPAREN => Shift(yy_state_1179) - T_RPAREN | T_COMMA => Reduce(1, NT_deriving_directive, yy_action_228) + T_ASYNC => Shift(yy_state_65) + T_UNDERSCORE => Shift(yy_state_70) + T_AMPER => Shift(yy_state_71) + T_PACKAGE_NAME => Shift(yy_state_73) + T_UIDENT => Shift(yy_state_80) + T_LPAREN => Shift(yy_state_84) + NT_simple_type => Shift(yy_state_110) + NT_type_ => Shift(yy_state_1553) _ => Error } } -fn yy_state_1179(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1553(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(6, NT_record_decl_field, yy_action_254) +} + +fn yy_state_1554(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_multiline_string => Shift(yy_state_2) - T_MULTILINE_INTERP => Shift(yy_state_4) - T_MULTILINE_STRING => Shift(yy_state_5) - T_REGEX_LITERAL => Shift(yy_state_6) - T_STRING => Shift(yy_state_7) - T_FLOAT => Shift(yy_state_8) - T_DOUBLE => Shift(yy_state_9) - T_INT => Shift(yy_state_10) - T_CHAR => Shift(yy_state_11) - T_BYTES => Shift(yy_state_12) - T_BYTE => Shift(yy_state_13) - T_FALSE => Shift(yy_state_14) - T_TRUE => Shift(yy_state_15) - T_INTERP => Shift(yy_state_16) - NT_non_empty_list_multiline_string_ => Shift(yy_state_17) - NT_simple_constant => Shift(yy_state_18) - T_AMPER => Shift(yy_state_19) - NT_qual_ident_ty => Shift(yy_state_25) - NT_tuple_expr => Shift(yy_state_26) - T_LBRACKET => Shift(yy_state_27) - NT_constr => Shift(yy_state_35) - NT_qual_ident_simple_expr => Shift(yy_state_36) - NT_atomic_expr => Shift(yy_state_37) - NT_anony_fn => Shift(yy_state_38) - T_LBRACE => Shift(yy_state_39) - T_FN => Shift(yy_state_48) - NT_type_name => Shift(yy_state_126) - T_ASYNC => Shift(yy_state_138) - NT_simple_expr => Shift(yy_state_151) - NT_argument => Shift(yy_state_156) - NT_non_empty_list_commas_rev_argument_ => Shift(yy_state_157) - NT_expr => Shift(yy_state_161) - T_EXCLAMATION => Shift(yy_state_162) - T_MINUS => Shift(yy_state_178) - T_PLUS => Shift(yy_state_180) - T_UIDENT => Shift(yy_state_182) - T_PACKAGE_NAME => Shift(yy_state_183) - NT_prefix_expr => Shift(yy_state_187) - NT_range_expr => Shift(yy_state_198) - NT_postfix_expr => Shift(yy_state_416) - T_EXISTS => Shift(yy_state_417) - T_FORALL => Shift(yy_state_449) - NT_infix_expr => Shift(yy_state_455) - T_UNDERSCORE => Shift(yy_state_456) - NT_non_empty_list_commas_argument_ => Shift(yy_state_461) - T_LPAREN => Shift(yy_state_464) - NT_pipe_expr => Shift(yy_state_497) - NT_arrow_fn_expr => Shift(yy_state_513) - NT_quantifier_expr => Shift(yy_state_514) - NT_simple_try_expr => Shift(yy_state_515) - NT_lexmatch_expr => Shift(yy_state_516) - NT_match_expr => Shift(yy_state_517) - NT_if_expr => Shift(yy_state_518) - NT_try_expr => Shift(yy_state_519) - NT_while_expr => Shift(yy_state_520) - NT_foreach_expr => Shift(yy_state_521) - NT_for_expr => Shift(yy_state_522) - T_LEXMATCH => Shift(yy_state_523) - NT_lexmatch_header => Shift(yy_state_529) - NT_match_header => Shift(yy_state_540) - T_MATCH => Shift(yy_state_550) - T_IF => Shift(yy_state_553) - T_TRY_EXCLAMATION => Shift(yy_state_559) - T_TRY_QUESTION => Shift(yy_state_561) - T_TRY => Shift(yy_state_563) - NT_loop_label_colon => Shift(yy_state_577) - T_POST_LABEL => Shift(yy_state_794) - T_LIDENT => Shift(yy_state_795) - NT_list_commas_argument_ => Shift(yy_state_1180) - T_WHILE | T_FOR => Reduce(0, NT_loop_label_colon, yy_action_902) - T_RPAREN => Reduce(0, NT_list_commas_argument_, yy_action_795) + T_EXTEND => Shift(yy_state_1555) + T_LIDENT => Shift(yy_state_1558) _ => Error } } -fn yy_state_1180(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1555(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RPAREN => Shift(yy_state_1181) + T_COLON => Shift(yy_state_1556) _ => Error } } -fn yy_state_1181(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(4, NT_deriving_directive, yy_action_227) -} - -fn yy_state_1182(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_list_commas_deriving_directive_, yy_action_226) -} - -fn yy_state_1183(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1556(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RPAREN => Shift(yy_state_1184) + T_ASYNC => Shift(yy_state_65) + T_UNDERSCORE => Shift(yy_state_70) + T_AMPER => Shift(yy_state_71) + T_PACKAGE_NAME => Shift(yy_state_73) + T_UIDENT => Shift(yy_state_80) + T_LPAREN => Shift(yy_state_84) + NT_simple_type => Shift(yy_state_110) + NT_type_ => Shift(yy_state_1557) _ => Error } } -fn yy_state_1184(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(4, NT_deriving_directive_list, yy_action_225) -} - -fn yy_state_1185(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(7, NT_structure_item, yy_action_224) +fn yy_state_1557(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(5, NT_record_decl_field, yy_action_253) } -fn yy_state_1186(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1558(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACKET => Shift(yy_state_950) - NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__ => Shift(yy_state_961) - NT_optional_type_parameters_no_constraints => Shift(yy_state_1187) - T_PLUS_EQUAL | T_LBRACE => Reduce(0, NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__, yy_action_347) + T_COLON => Shift(yy_state_1559) _ => Error } } -fn yy_state_1187(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1559(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACE => Shift(yy_state_1188) - T_PLUS_EQUAL => Reduce(2, NT_extenum_extension_target, yy_action_223) + T_ASYNC => Shift(yy_state_65) + T_UNDERSCORE => Shift(yy_state_70) + T_AMPER => Shift(yy_state_71) + T_PACKAGE_NAME => Shift(yy_state_73) + T_UIDENT => Shift(yy_state_80) + T_LPAREN => Shift(yy_state_84) + NT_simple_type => Shift(yy_state_110) + NT_type_ => Shift(yy_state_1560) _ => Error } } -fn yy_state_1188(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1560(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(5, NT_record_decl_field, yy_action_252) +} + +fn yy_state_1561(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_ATTRIBUTE => Shift(yy_state_946) - NT_enum_constructor => Shift(yy_state_1000) - NT_non_empty_list_attribute_ => Shift(yy_state_1004) - T_UIDENT => Shift(yy_state_1024) - NT_non_empty_list_semis_enum_constructor_ => Shift(yy_state_1027) - NT_list_semis_enum_constructor_ => Shift(yy_state_1189) - T_RBRACE => Reduce(0, NT_list_semis_enum_constructor_, yy_action_317) + T_LPAREN => Shift(yy_state_1539) + NT_pub_attr => Shift(yy_state_1562) + T_LIDENT | T_MUTABLE | T_EXTEND => Reduce(0, NT_pub_attr, yy_action_261) _ => Error } } -fn yy_state_1189(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1562(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RBRACE => Shift(yy_state_1190) + T_MUTABLE => Shift(yy_state_1241) + NT_option_MUTABLE_ => Shift(yy_state_1563) + T_LIDENT | T_EXTEND => Reduce(0, NT_option_MUTABLE_, yy_action_377) _ => Error } } -fn yy_state_1190(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1563(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_DERIVE => Shift(yy_state_1171) - NT_deriving_directive_list => Shift(yy_state_1191) - T_EOF | T_SEMI => Reduce(0, NT_deriving_directive_list, yy_action_233) + T_EXTEND => Shift(yy_state_1564) + T_LIDENT => Shift(yy_state_1567) _ => Error } } -fn yy_state_1191(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(7, NT_structure_item, yy_action_222) -} - -fn yy_state_1192(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1564(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACE => Shift(yy_state_1193) + T_COLON => Shift(yy_state_1565) _ => Error } } -fn yy_state_1193(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1565(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_ATTRIBUTE => Shift(yy_state_946) - NT_enum_constructor => Shift(yy_state_1000) - NT_non_empty_list_attribute_ => Shift(yy_state_1004) - T_UIDENT => Shift(yy_state_1024) - NT_non_empty_list_semis_enum_constructor_ => Shift(yy_state_1027) - NT_list_semis_enum_constructor_ => Shift(yy_state_1194) - T_RBRACE => Reduce(0, NT_list_semis_enum_constructor_, yy_action_317) + T_ASYNC => Shift(yy_state_65) + T_UNDERSCORE => Shift(yy_state_70) + T_AMPER => Shift(yy_state_71) + T_PACKAGE_NAME => Shift(yy_state_73) + T_UIDENT => Shift(yy_state_80) + T_LPAREN => Shift(yy_state_84) + NT_simple_type => Shift(yy_state_110) + NT_type_ => Shift(yy_state_1566) _ => Error } } -fn yy_state_1194(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1566(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(6, NT_record_decl_field, yy_action_251) +} + +fn yy_state_1567(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RBRACE => Shift(yy_state_1195) + T_COLON => Shift(yy_state_1568) _ => Error } } -fn yy_state_1195(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1568(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_DERIVE => Shift(yy_state_1171) - NT_deriving_directive_list => Shift(yy_state_1196) - T_EOF | T_SEMI => Reduce(0, NT_deriving_directive_list, yy_action_233) + T_ASYNC => Shift(yy_state_65) + T_UNDERSCORE => Shift(yy_state_70) + T_AMPER => Shift(yy_state_71) + T_PACKAGE_NAME => Shift(yy_state_73) + T_UIDENT => Shift(yy_state_80) + T_LPAREN => Shift(yy_state_84) + NT_simple_type => Shift(yy_state_110) + NT_type_ => Shift(yy_state_1569) _ => Error } } -fn yy_state_1196(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(5, NT_structure_item, yy_action_221) +fn yy_state_1569(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(6, NT_record_decl_field, yy_action_250) } -fn yy_state_1197(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1570(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LPAREN => Shift(yy_state_1198) - T_LBRACE => Shift(yy_state_1202) + T_MUTABLE => Shift(yy_state_1241) + NT_option_MUTABLE_ => Shift(yy_state_1571) + T_LIDENT | T_EXTEND => Reduce(0, NT_option_MUTABLE_, yy_action_377) _ => Error } } -fn yy_state_1198(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1571(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_ASYNC => Shift(yy_state_52) - T_UNDERSCORE => Shift(yy_state_57) - T_AMPER => Shift(yy_state_58) - T_PACKAGE_NAME => Shift(yy_state_60) - NT_type_ => Shift(yy_state_63) - NT_non_empty_list_commas_rev_type__ => Shift(yy_state_64) - T_UIDENT => Shift(yy_state_67) - T_LPAREN => Shift(yy_state_71) - NT_simple_type => Shift(yy_state_97) - NT_non_empty_list_commas_type__ => Shift(yy_state_1199) + T_EXTEND => Shift(yy_state_1572) + T_LIDENT => Shift(yy_state_1575) _ => Error } } -fn yy_state_1199(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1572(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RPAREN => Shift(yy_state_1200) + T_COLON => Shift(yy_state_1573) _ => Error } } -fn yy_state_1200(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1573(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_DERIVE => Shift(yy_state_1171) - NT_deriving_directive_list => Shift(yy_state_1201) - T_EOF | T_SEMI => Reduce(0, NT_deriving_directive_list, yy_action_233) + T_ASYNC => Shift(yy_state_65) + T_UNDERSCORE => Shift(yy_state_70) + T_AMPER => Shift(yy_state_71) + T_PACKAGE_NAME => Shift(yy_state_73) + T_UIDENT => Shift(yy_state_80) + T_LPAREN => Shift(yy_state_84) + NT_simple_type => Shift(yy_state_110) + NT_type_ => Shift(yy_state_1574) _ => Error } } -fn yy_state_1201(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(5, NT_structure_item, yy_action_220) +fn yy_state_1574(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(5, NT_record_decl_field, yy_action_249) } -fn yy_state_1202(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1575(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_ATTRIBUTE => Shift(yy_state_946) - T_MUTABLE => Shift(yy_state_1014) - NT_record_decl_field => Shift(yy_state_1203) - NT_non_empty_list_semi_rev_aux_record_decl_field_ => Shift(yy_state_1204) - T_FN => Shift(yy_state_1210) - T_ASYNC => Shift(yy_state_1217) - NT_non_empty_list_attribute_ => Shift(yy_state_1225) - T_PUB => Shift(yy_state_1261) - T_PRIV => Shift(yy_state_1267) - NT_option_MUTABLE_ => Shift(yy_state_1272) - NT_record_constr_decl => Shift(yy_state_1276) - NT_record_decl_body => Shift(yy_state_1278) - T_RBRACE => Reduce(0, NT_record_decl_body, yy_action_219) - T_LIDENT => Reduce(0, NT_option_MUTABLE_, yy_action_313) + T_COLON => Shift(yy_state_1576) _ => Error } } -fn yy_state_1203(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_non_empty_list_semi_rev_aux_record_decl_field_, yy_action_218) -} - -fn yy_state_1204(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1576(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_option_SEMI_ => Shift(yy_state_1205) - T_SEMI => Shift(yy_state_1206) - T_RBRACE => Reduce(0, NT_option_SEMI_, yy_action_815) + T_ASYNC => Shift(yy_state_65) + T_UNDERSCORE => Shift(yy_state_70) + T_AMPER => Shift(yy_state_71) + T_PACKAGE_NAME => Shift(yy_state_73) + T_UIDENT => Shift(yy_state_80) + T_LPAREN => Shift(yy_state_84) + NT_simple_type => Shift(yy_state_110) + NT_type_ => Shift(yy_state_1577) _ => Error } } -fn yy_state_1205(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(2, NT_record_decl_body, yy_action_217) +fn yy_state_1577(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(5, NT_record_decl_field, yy_action_248) } -fn yy_state_1206(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1578(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_ATTRIBUTE => Shift(yy_state_946) - T_MUTABLE => Shift(yy_state_1014) - NT_record_decl_field => Shift(yy_state_1207) - NT_record_constr_decl => Shift(yy_state_1208) - T_FN => Shift(yy_state_1210) - T_ASYNC => Shift(yy_state_1217) - NT_non_empty_list_attribute_ => Shift(yy_state_1225) - T_PUB => Shift(yy_state_1261) - T_PRIV => Shift(yy_state_1267) - NT_option_MUTABLE_ => Shift(yy_state_1272) - T_LIDENT => Reduce(0, NT_option_MUTABLE_, yy_action_313) - T_RBRACE => Reduce(1, NT_option_SEMI_, yy_action_813) + T_EXTEND => Shift(yy_state_1579) + T_LIDENT => Shift(yy_state_1582) _ => Error } } -fn yy_state_1207(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_non_empty_list_semi_rev_aux_record_decl_field_, yy_action_216) +fn yy_state_1579(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_COLON => Shift(yy_state_1580) + _ => Error + } } -fn yy_state_1208(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1580(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_SEMI => Shift(yy_state_262) - NT_option_SEMI_ => Shift(yy_state_1209) - T_RBRACE => Reduce(0, NT_option_SEMI_, yy_action_815) + T_ASYNC => Shift(yy_state_65) + T_UNDERSCORE => Shift(yy_state_70) + T_AMPER => Shift(yy_state_71) + T_PACKAGE_NAME => Shift(yy_state_73) + T_UIDENT => Shift(yy_state_80) + T_LPAREN => Shift(yy_state_84) + NT_simple_type => Shift(yy_state_110) + NT_type_ => Shift(yy_state_1581) _ => Error } } -fn yy_state_1209(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(4, NT_record_decl_body, yy_action_215) +fn yy_state_1581(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(4, NT_record_decl_field, yy_action_247) } -fn yy_state_1210(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1582(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_type_parameters => Shift(yy_state_996) - NT_option_type_parameters_ => Shift(yy_state_1036) - T_LBRACKET => Shift(yy_state_1037) - NT_optional_type_parameters => Shift(yy_state_1211) - T_LIDENT => Reduce(0, NT_option_type_parameters_, yy_action_319) + T_COLON => Shift(yy_state_1583) _ => Error } } -fn yy_state_1211(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1583(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LIDENT => Shift(yy_state_1212) + T_ASYNC => Shift(yy_state_65) + T_UNDERSCORE => Shift(yy_state_70) + T_AMPER => Shift(yy_state_71) + T_PACKAGE_NAME => Shift(yy_state_73) + T_UIDENT => Shift(yy_state_80) + T_LPAREN => Shift(yy_state_84) + NT_simple_type => Shift(yy_state_110) + NT_type_ => Shift(yy_state_1584) _ => Error } } -fn yy_state_1212(_lookahead : YYSymbol) -> YYDecision { - match _lookahead { - T_LPAREN => Shift(yy_state_1213) - _ => Error - } +fn yy_state_1584(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(4, NT_record_decl_field, yy_action_246) } -fn yy_state_1213(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1585(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_ASYNC => Shift(yy_state_52) - T_UNDERSCORE => Shift(yy_state_57) - T_AMPER => Shift(yy_state_58) - T_PACKAGE_NAME => Shift(yy_state_60) - T_UIDENT => Shift(yy_state_67) - T_LPAREN => Shift(yy_state_71) - NT_simple_type => Shift(yy_state_97) - NT_trait_method_param => Shift(yy_state_1093) - NT_non_empty_list_commas_rev_trait_method_param_ => Shift(yy_state_1094) - T_POST_LABEL => Shift(yy_state_1098) - T_LIDENT => Shift(yy_state_1101) - NT_type_ => Shift(yy_state_1107) - NT_non_empty_list_commas_trait_method_param_ => Shift(yy_state_1108) - NT_list_commas_trait_method_param_ => Shift(yy_state_1214) - T_RPAREN => Reduce(0, NT_list_commas_trait_method_param_, yy_action_265) + T_SEMI => Shift(yy_state_424) + NT_option_SEMI_ => Shift(yy_state_1586) + T_RBRACE => Reduce(0, NT_option_SEMI_, yy_action_976) _ => Error } } -fn yy_state_1214(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1586(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(2, NT_record_decl_body, yy_action_245) +} + +fn yy_state_1587(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RPAREN => Shift(yy_state_1215) + T_RBRACE => Shift(yy_state_1588) _ => Error } } -fn yy_state_1215(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1588(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_error_annotation => Shift(yy_state_50) - T_THIN_ARROW => Shift(yy_state_51) - T_NORAISE => Shift(yy_state_78) - T_RAISE => Shift(yy_state_79) - NT_func_return_type => Shift(yy_state_1216) - T_SEMI | T_RBRACE => Reduce(0, NT_func_return_type, yy_action_862) + T_DERIVE => Shift(yy_state_1440) + NT_deriving_directive_list => Shift(yy_state_1589) + T_EOF | T_SEMI => Reduce(0, NT_deriving_directive_list, yy_action_288) _ => Error } } -fn yy_state_1216(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(7, NT_record_constr_decl, yy_action_214) +fn yy_state_1589(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(5, NT_structure_item, yy_action_244) } -fn yy_state_1217(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1590(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_FN => Shift(yy_state_1218) + T_DERIVE => Shift(yy_state_1440) + T_LBRACE => Shift(yy_state_1591) + NT_deriving_directive_list => Shift(yy_state_1595) + T_EOF | T_SEMI => Reduce(0, NT_deriving_directive_list, yy_action_288) _ => Error } } -fn yy_state_1218(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1591(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_type_parameters => Shift(yy_state_996) - NT_option_type_parameters_ => Shift(yy_state_1036) - T_LBRACKET => Shift(yy_state_1037) - NT_optional_type_parameters => Shift(yy_state_1219) - T_LIDENT => Reduce(0, NT_option_type_parameters_, yy_action_319) + T_ATTRIBUTE => Shift(yy_state_1168) + NT_enum_constructor => Shift(yy_state_1227) + NT_non_empty_list_attribute_ => Shift(yy_state_1231) + T_UIDENT => Shift(yy_state_1251) + NT_non_empty_list_semis_enum_constructor_ => Shift(yy_state_1254) + NT_list_semis_enum_constructor_ => Shift(yy_state_1592) + T_RBRACE => Reduce(0, NT_list_semis_enum_constructor_, yy_action_381) _ => Error } } -fn yy_state_1219(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1592(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LIDENT => Shift(yy_state_1220) + T_RBRACE => Shift(yy_state_1593) _ => Error } } -fn yy_state_1220(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1593(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LPAREN => Shift(yy_state_1221) + T_DERIVE => Shift(yy_state_1440) + NT_deriving_directive_list => Shift(yy_state_1594) + T_EOF | T_SEMI => Reduce(0, NT_deriving_directive_list, yy_action_288) _ => Error } } -fn yy_state_1221(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1594(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(5, NT_structure_item, yy_action_243) +} + +fn yy_state_1595(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(2, NT_structure_item, yy_action_242) +} + +fn yy_state_1596(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_ASYNC => Shift(yy_state_52) - T_UNDERSCORE => Shift(yy_state_57) - T_AMPER => Shift(yy_state_58) - T_PACKAGE_NAME => Shift(yy_state_60) - T_UIDENT => Shift(yy_state_67) - T_LPAREN => Shift(yy_state_71) - NT_simple_type => Shift(yy_state_97) - NT_trait_method_param => Shift(yy_state_1093) - NT_non_empty_list_commas_rev_trait_method_param_ => Shift(yy_state_1094) - T_POST_LABEL => Shift(yy_state_1098) - T_LIDENT => Shift(yy_state_1101) - NT_type_ => Shift(yy_state_1107) - NT_non_empty_list_commas_trait_method_param_ => Shift(yy_state_1108) - NT_list_commas_trait_method_param_ => Shift(yy_state_1222) - T_RPAREN => Reduce(0, NT_list_commas_trait_method_param_, yy_action_265) + T_DERIVE => Shift(yy_state_1440) + T_EQUAL => Shift(yy_state_1597) + NT_deriving_directive_list => Shift(yy_state_1600) + T_EOF | T_SEMI => Reduce(0, NT_deriving_directive_list, yy_action_288) _ => Error } } -fn yy_state_1222(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1597(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RPAREN => Shift(yy_state_1223) + T_ASYNC => Shift(yy_state_65) + T_UNDERSCORE => Shift(yy_state_70) + T_AMPER => Shift(yy_state_71) + T_PACKAGE_NAME => Shift(yy_state_73) + T_UIDENT => Shift(yy_state_80) + T_LPAREN => Shift(yy_state_84) + NT_simple_type => Shift(yy_state_110) + NT_type_ => Shift(yy_state_1598) _ => Error } } -fn yy_state_1223(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1598(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_error_annotation => Shift(yy_state_50) - T_THIN_ARROW => Shift(yy_state_51) - T_NORAISE => Shift(yy_state_78) - T_RAISE => Shift(yy_state_79) - NT_func_return_type => Shift(yy_state_1224) - T_SEMI | T_RBRACE => Reduce(0, NT_func_return_type, yy_action_862) + T_DERIVE => Shift(yy_state_1440) + NT_deriving_directive_list => Shift(yy_state_1599) + T_EOF | T_SEMI => Reduce(0, NT_deriving_directive_list, yy_action_288) _ => Error } } -fn yy_state_1224(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(8, NT_record_constr_decl, yy_action_213) +fn yy_state_1599(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(4, NT_structure_item, yy_action_241) } -fn yy_state_1225(_lookahead : YYSymbol) -> YYDecision { - match _lookahead { - T_MUTABLE => Shift(yy_state_1014) - T_FN => Shift(yy_state_1226) - T_ASYNC => Shift(yy_state_1233) - T_PUB => Shift(yy_state_1241) - T_PRIV => Shift(yy_state_1252) - NT_option_MUTABLE_ => Shift(yy_state_1257) - T_LIDENT => Reduce(0, NT_option_MUTABLE_, yy_action_313) - _ => Error - } +fn yy_state_1600(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(2, NT_structure_item, yy_action_240) } -fn yy_state_1226(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1601(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_type_parameters => Shift(yy_state_996) - NT_option_type_parameters_ => Shift(yy_state_1036) - T_LBRACKET => Shift(yy_state_1037) - NT_optional_type_parameters => Shift(yy_state_1227) - T_LIDENT => Reduce(0, NT_option_type_parameters_, yy_action_319) + T_UIDENT => Shift(yy_state_1602) _ => Error } } -fn yy_state_1227(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1602(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LIDENT => Shift(yy_state_1228) + T_COLON => Shift(yy_state_1603) + T_EQUAL => Reduce(2, NT_val_header, yy_action_239) _ => Error } } -fn yy_state_1228(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1603(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LPAREN => Shift(yy_state_1229) + T_ASYNC => Shift(yy_state_65) + T_UNDERSCORE => Shift(yy_state_70) + T_AMPER => Shift(yy_state_71) + T_PACKAGE_NAME => Shift(yy_state_73) + T_UIDENT => Shift(yy_state_80) + T_LPAREN => Shift(yy_state_84) + NT_simple_type => Shift(yy_state_110) + NT_type_ => Shift(yy_state_1604) _ => Error } } -fn yy_state_1229(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1604(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(4, NT_val_header, yy_action_238) +} + +fn yy_state_1605(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_ASYNC => Shift(yy_state_52) - T_UNDERSCORE => Shift(yy_state_57) - T_AMPER => Shift(yy_state_58) - T_PACKAGE_NAME => Shift(yy_state_60) - T_UIDENT => Shift(yy_state_67) - T_LPAREN => Shift(yy_state_71) - NT_simple_type => Shift(yy_state_97) - NT_trait_method_param => Shift(yy_state_1093) - NT_non_empty_list_commas_rev_trait_method_param_ => Shift(yy_state_1094) - T_POST_LABEL => Shift(yy_state_1098) - T_LIDENT => Shift(yy_state_1101) - NT_type_ => Shift(yy_state_1107) - NT_non_empty_list_commas_trait_method_param_ => Shift(yy_state_1108) - NT_list_commas_trait_method_param_ => Shift(yy_state_1230) - T_RPAREN => Reduce(0, NT_list_commas_trait_method_param_, yy_action_265) + T_EXTEND => Shift(yy_state_1606) + T_LIDENT => Shift(yy_state_1609) _ => Error } } -fn yy_state_1230(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1606(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RPAREN => Shift(yy_state_1231) + T_COLON => Shift(yy_state_1607) + T_EQUAL => Reduce(2, NT_val_header, yy_action_237) _ => Error } } -fn yy_state_1231(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1607(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_error_annotation => Shift(yy_state_50) - T_THIN_ARROW => Shift(yy_state_51) - T_NORAISE => Shift(yy_state_78) - T_RAISE => Shift(yy_state_79) - NT_func_return_type => Shift(yy_state_1232) - T_SEMI | T_RBRACE => Reduce(0, NT_func_return_type, yy_action_862) + T_ASYNC => Shift(yy_state_65) + T_UNDERSCORE => Shift(yy_state_70) + T_AMPER => Shift(yy_state_71) + T_PACKAGE_NAME => Shift(yy_state_73) + T_UIDENT => Shift(yy_state_80) + T_LPAREN => Shift(yy_state_84) + NT_simple_type => Shift(yy_state_110) + NT_type_ => Shift(yy_state_1608) _ => Error } } -fn yy_state_1232(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(8, NT_record_constr_decl, yy_action_212) +fn yy_state_1608(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(4, NT_val_header, yy_action_236) } -fn yy_state_1233(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1609(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_FN => Shift(yy_state_1234) + T_COLON => Shift(yy_state_1610) + T_EQUAL => Reduce(2, NT_val_header, yy_action_235) _ => Error } } -fn yy_state_1234(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1610(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_type_parameters => Shift(yy_state_996) - NT_option_type_parameters_ => Shift(yy_state_1036) - T_LBRACKET => Shift(yy_state_1037) - NT_optional_type_parameters => Shift(yy_state_1235) - T_LIDENT => Reduce(0, NT_option_type_parameters_, yy_action_319) + T_ASYNC => Shift(yy_state_65) + T_UNDERSCORE => Shift(yy_state_70) + T_AMPER => Shift(yy_state_71) + T_PACKAGE_NAME => Shift(yy_state_73) + T_UIDENT => Shift(yy_state_80) + T_LPAREN => Shift(yy_state_84) + NT_simple_type => Shift(yy_state_110) + NT_type_ => Shift(yy_state_1611) _ => Error } } -fn yy_state_1235(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1611(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(4, NT_val_header, yy_action_234) +} + +fn yy_state_1612(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LIDENT => Shift(yy_state_1236) + T_STRING => Shift(yy_state_1613) _ => Error } } -fn yy_state_1236(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1613(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LPAREN => Shift(yy_state_1237) + T_FN => Shift(yy_state_1614) _ => Error } } -fn yy_state_1237(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1614(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_ASYNC => Shift(yy_state_52) - T_UNDERSCORE => Shift(yy_state_57) - T_AMPER => Shift(yy_state_58) - T_PACKAGE_NAME => Shift(yy_state_60) - T_UIDENT => Shift(yy_state_67) - T_LPAREN => Shift(yy_state_71) - NT_simple_type => Shift(yy_state_97) - NT_trait_method_param => Shift(yy_state_1093) - NT_non_empty_list_commas_rev_trait_method_param_ => Shift(yy_state_1094) - T_POST_LABEL => Shift(yy_state_1098) - T_LIDENT => Shift(yy_state_1101) - NT_type_ => Shift(yy_state_1107) - NT_non_empty_list_commas_trait_method_param_ => Shift(yy_state_1108) - NT_list_commas_trait_method_param_ => Shift(yy_state_1238) - T_RPAREN => Reduce(0, NT_list_commas_trait_method_param_, yy_action_265) + NT_type_parameters => Shift(yy_state_1223) + NT_option_type_parameters_ => Shift(yy_state_1266) + T_LBRACKET => Shift(yy_state_1267) + NT_optional_type_parameters => Shift(yy_state_1615) + T_LIDENT | T_UIDENT | T_AMPER | T_PACKAGE_NAME | T_EXTEND => Reduce(0, NT_option_type_parameters_, yy_action_383) _ => Error } } -fn yy_state_1238(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1615(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RPAREN => Shift(yy_state_1239) + T_AMPER => Shift(yy_state_20) + T_PACKAGE_NAME => Shift(yy_state_22) + T_UIDENT => Shift(yy_state_25) + NT_qual_ident_ty => Shift(yy_state_26) + NT_fun_binder => Shift(yy_state_1616) + T_EXTEND => Shift(yy_state_1619) + T_LIDENT => Shift(yy_state_1620) + NT_type_name => Shift(yy_state_1621) _ => Error } } -fn yy_state_1239(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1616(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_error_annotation => Shift(yy_state_50) - T_THIN_ARROW => Shift(yy_state_51) - T_NORAISE => Shift(yy_state_78) - T_RAISE => Shift(yy_state_79) - NT_func_return_type => Shift(yy_state_1240) - T_SEMI | T_RBRACE => Reduce(0, NT_func_return_type, yy_action_862) + T_LPAREN => Shift(yy_state_157) + NT_parameters => Shift(yy_state_1315) + NT_option_parameters_ => Shift(yy_state_1617) + T_RAISE | T_EQUAL | T_THIN_ARROW | T_NORAISE => Reduce(0, NT_option_parameters_, yy_action_336) _ => Error } } -fn yy_state_1240(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(9, NT_record_constr_decl, yy_action_211) -} - -fn yy_state_1241(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1617(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_pub_attr => Shift(yy_state_1242) - T_LPAREN => Shift(yy_state_1247) - T_LIDENT | T_MUTABLE => Reduce(0, NT_pub_attr, yy_action_210) + NT_error_annotation => Shift(yy_state_63) + T_THIN_ARROW => Shift(yy_state_64) + T_NORAISE => Shift(yy_state_91) + T_RAISE => Shift(yy_state_92) + NT_func_return_type => Shift(yy_state_1618) + T_EQUAL => Reduce(0, NT_func_return_type, yy_action_1023) _ => Error } } -fn yy_state_1242(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1618(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(7, NT_extern_fun_header, yy_action_233) +} + +fn yy_state_1619(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_fun_binder, yy_action_232) +} + +fn yy_state_1620(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_fun_binder, yy_action_231) +} + +fn yy_state_1621(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_MUTABLE => Shift(yy_state_1014) - NT_option_MUTABLE_ => Shift(yy_state_1243) - T_LIDENT => Reduce(0, NT_option_MUTABLE_, yy_action_313) + T_COLONCOLON => Shift(yy_state_1622) _ => Error } } -fn yy_state_1243(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1622(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LIDENT => Shift(yy_state_1244) + NT_luident => Shift(yy_state_1623) + T_UIDENT => Shift(yy_state_1624) + T_EXTEND => Shift(yy_state_1625) + T_LIDENT => Shift(yy_state_1626) _ => Error } } -fn yy_state_1244(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1623(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_fun_binder, yy_action_230) +} + +fn yy_state_1624(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_luident, yy_action_229) +} + +fn yy_state_1625(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_luident, yy_action_227) +} + +fn yy_state_1626(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(1, NT_luident, yy_action_225) +} + +fn yy_state_1627(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_COLON => Shift(yy_state_1245) + NT_type_parameters => Shift(yy_state_1223) + NT_option_type_parameters_ => Shift(yy_state_1266) + T_LBRACKET => Shift(yy_state_1267) + NT_optional_type_parameters => Shift(yy_state_1628) + T_LIDENT | T_UIDENT | T_AMPER | T_PACKAGE_NAME | T_EXTEND => Reduce(0, NT_option_type_parameters_, yy_action_383) _ => Error } } -fn yy_state_1245(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1628(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_ASYNC => Shift(yy_state_52) - T_UNDERSCORE => Shift(yy_state_57) - T_AMPER => Shift(yy_state_58) - T_PACKAGE_NAME => Shift(yy_state_60) - T_UIDENT => Shift(yy_state_67) - T_LPAREN => Shift(yy_state_71) - NT_simple_type => Shift(yy_state_97) - NT_type_ => Shift(yy_state_1246) + T_AMPER => Shift(yy_state_20) + T_PACKAGE_NAME => Shift(yy_state_22) + T_UIDENT => Shift(yy_state_25) + NT_qual_ident_ty => Shift(yy_state_26) + T_EXTEND => Shift(yy_state_1619) + T_LIDENT => Shift(yy_state_1620) + NT_type_name => Shift(yy_state_1621) + NT_fun_binder => Shift(yy_state_1629) _ => Error } } -fn yy_state_1246(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(7, NT_record_decl_field, yy_action_209) +fn yy_state_1629(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_fun_header_generic, yy_action_224) } -fn yy_state_1247(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1630(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LIDENT => Shift(yy_state_1248) - T_READONLY => Shift(yy_state_1250) + T_FN => Shift(yy_state_1627) + T_SUBERROR => Shift(yy_state_1631) + T_TYPE => Shift(yy_state_1633) + T_IMPL => Shift(yy_state_1636) + T_TRAIT => Shift(yy_state_1641) + T_EXTENUM => Shift(yy_state_1647) + T_CONST => Shift(yy_state_1660) + T_LET => Shift(yy_state_1664) + T_PUB => Shift(yy_state_1671) + T_PRIV => Shift(yy_state_1720) + NT_fun_header_generic => Shift(yy_state_1768) + T_ASYNC => Shift(yy_state_1771) _ => Error } } -fn yy_state_1248(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1631(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RPAREN => Shift(yy_state_1249) + T_UIDENT => Shift(yy_state_1632) _ => Error } } -fn yy_state_1249(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_pub_attr, yy_action_208) +fn yy_state_1632(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_suberror_header, yy_action_223) } -fn yy_state_1250(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1633(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RPAREN => Shift(yy_state_1251) + T_UIDENT => Shift(yy_state_1634) _ => Error } } -fn yy_state_1251(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_pub_attr, yy_action_207) +fn yy_state_1634(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_LBRACKET => Shift(yy_state_1172) + NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__ => Shift(yy_state_1183) + NT_optional_type_parameters_no_constraints => Shift(yy_state_1635) + T_EOF | T_DERIVE | T_EQUAL | T_SEMI => Reduce(0, NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__, yy_action_415) + _ => Error + } } -fn yy_state_1252(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1635(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(4, NT_type_header, yy_action_222) +} + +fn yy_state_1636(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_MUTABLE => Shift(yy_state_1014) - NT_option_MUTABLE_ => Shift(yy_state_1253) - T_LIDENT => Reduce(0, NT_option_MUTABLE_, yy_action_313) + NT_type_parameters => Shift(yy_state_1223) + NT_option_type_parameters_ => Shift(yy_state_1266) + T_LBRACKET => Shift(yy_state_1267) + NT_optional_type_parameters => Shift(yy_state_1637) + T_UIDENT | T_AMPER | T_PACKAGE_NAME => Reduce(0, NT_option_type_parameters_, yy_action_383) _ => Error } } -fn yy_state_1253(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1637(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LIDENT => Shift(yy_state_1254) + T_AMPER => Shift(yy_state_20) + T_PACKAGE_NAME => Shift(yy_state_22) + T_UIDENT => Shift(yy_state_25) + NT_qual_ident_ty => Shift(yy_state_26) + NT_type_name => Shift(yy_state_1638) _ => Error } } -fn yy_state_1254(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1638(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_COLON => Shift(yy_state_1255) + T_FOR => Shift(yy_state_1639) _ => Error } } -fn yy_state_1255(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1639(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_ASYNC => Shift(yy_state_52) - T_UNDERSCORE => Shift(yy_state_57) - T_AMPER => Shift(yy_state_58) - T_PACKAGE_NAME => Shift(yy_state_60) - T_UIDENT => Shift(yy_state_67) - T_LPAREN => Shift(yy_state_71) - NT_simple_type => Shift(yy_state_97) - NT_type_ => Shift(yy_state_1256) + T_ASYNC => Shift(yy_state_65) + T_UNDERSCORE => Shift(yy_state_70) + T_AMPER => Shift(yy_state_71) + T_PACKAGE_NAME => Shift(yy_state_73) + T_UIDENT => Shift(yy_state_80) + T_LPAREN => Shift(yy_state_84) + NT_simple_type => Shift(yy_state_110) + NT_type_ => Shift(yy_state_1640) _ => Error } } -fn yy_state_1256(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(6, NT_record_decl_field, yy_action_206) +fn yy_state_1640(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(6, NT_structure_item, yy_action_221) } -fn yy_state_1257(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1641(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LIDENT => Shift(yy_state_1258) + T_UIDENT => Shift(yy_state_1642) _ => Error } } -fn yy_state_1258(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1642(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_COLON => Shift(yy_state_1259) + T_COLON => Shift(yy_state_1320) + NT_option_preceded_COLON_separated_nonempty_list_PLUS_tvar_constraint___ => Shift(yy_state_1643) + T_LBRACE => Reduce(0, NT_option_preceded_COLON_separated_nonempty_list_PLUS_tvar_constraint___, yy_action_333) _ => Error } } -fn yy_state_1259(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1643(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_ASYNC => Shift(yy_state_52) - T_UNDERSCORE => Shift(yy_state_57) - T_AMPER => Shift(yy_state_58) - T_PACKAGE_NAME => Shift(yy_state_60) - T_UIDENT => Shift(yy_state_67) - T_LPAREN => Shift(yy_state_71) - NT_simple_type => Shift(yy_state_97) - NT_type_ => Shift(yy_state_1260) + T_LBRACE => Shift(yy_state_1644) _ => Error } } -fn yy_state_1260(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(5, NT_record_decl_field, yy_action_205) -} - -fn yy_state_1261(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1644(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LPAREN => Shift(yy_state_1247) - NT_pub_attr => Shift(yy_state_1262) - T_LIDENT | T_MUTABLE => Reduce(0, NT_pub_attr, yy_action_210) + T_ATTRIBUTE => Shift(yy_state_1168) + NT_trait_method_decl => Shift(yy_state_1324) + NT_non_empty_list_attribute_ => Shift(yy_state_1328) + T_FN => Shift(yy_state_1381) + NT_trait_method_fn_header => Shift(yy_state_1383) + T_ASYNC => Shift(yy_state_1396) + NT_non_empty_list_semis_trait_method_decl_ => Shift(yy_state_1410) + NT_list_semis_trait_method_decl_ => Shift(yy_state_1645) + T_LIDENT | T_EXTEND => Reduce(0, NT_trait_method_fn_header, yy_action_330) + T_RBRACE => Reduce(0, NT_list_semis_trait_method_decl_, yy_action_329) _ => Error } } -fn yy_state_1262(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1645(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_MUTABLE => Shift(yy_state_1014) - NT_option_MUTABLE_ => Shift(yy_state_1263) - T_LIDENT => Reduce(0, NT_option_MUTABLE_, yy_action_313) + T_RBRACE => Shift(yy_state_1646) _ => Error } } -fn yy_state_1263(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1646(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(7, NT_structure_item, yy_action_220) +} + +fn yy_state_1647(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LIDENT => Shift(yy_state_1264) + T_PACKAGE_NAME => Shift(yy_state_1432) + NT_extenum_extension_target => Shift(yy_state_1648) + T_UIDENT => Shift(yy_state_1654) _ => Error } } -fn yy_state_1264(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1648(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_COLON => Shift(yy_state_1265) + T_PLUS_EQUAL => Shift(yy_state_1649) _ => Error } } -fn yy_state_1265(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1649(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_ASYNC => Shift(yy_state_52) - T_UNDERSCORE => Shift(yy_state_57) - T_AMPER => Shift(yy_state_58) - T_PACKAGE_NAME => Shift(yy_state_60) - T_UIDENT => Shift(yy_state_67) - T_LPAREN => Shift(yy_state_71) - NT_simple_type => Shift(yy_state_97) - NT_type_ => Shift(yy_state_1266) + T_LBRACE => Shift(yy_state_1650) _ => Error } } -fn yy_state_1266(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(6, NT_record_decl_field, yy_action_204) +fn yy_state_1650(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_ATTRIBUTE => Shift(yy_state_1168) + NT_enum_constructor => Shift(yy_state_1227) + NT_non_empty_list_attribute_ => Shift(yy_state_1231) + T_UIDENT => Shift(yy_state_1251) + NT_non_empty_list_semis_enum_constructor_ => Shift(yy_state_1254) + NT_list_semis_enum_constructor_ => Shift(yy_state_1651) + T_RBRACE => Reduce(0, NT_list_semis_enum_constructor_, yy_action_381) + _ => Error + } } -fn yy_state_1267(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1651(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_MUTABLE => Shift(yy_state_1014) - NT_option_MUTABLE_ => Shift(yy_state_1268) - T_LIDENT => Reduce(0, NT_option_MUTABLE_, yy_action_313) + T_RBRACE => Shift(yy_state_1652) _ => Error } } -fn yy_state_1268(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1652(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LIDENT => Shift(yy_state_1269) + T_DERIVE => Shift(yy_state_1440) + NT_deriving_directive_list => Shift(yy_state_1653) + T_EOF | T_SEMI => Reduce(0, NT_deriving_directive_list, yy_action_288) _ => Error } } -fn yy_state_1269(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1653(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(8, NT_structure_item, yy_action_219) +} + +fn yy_state_1654(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_COLON => Shift(yy_state_1270) + T_LBRACKET => Shift(yy_state_1172) + NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__ => Shift(yy_state_1183) + NT_optional_type_parameters_no_constraints => Shift(yy_state_1655) + T_PLUS_EQUAL | T_LBRACE => Reduce(0, NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__, yy_action_415) _ => Error } } -fn yy_state_1270(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1655(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_ASYNC => Shift(yy_state_52) - T_UNDERSCORE => Shift(yy_state_57) - T_AMPER => Shift(yy_state_58) - T_PACKAGE_NAME => Shift(yy_state_60) - T_UIDENT => Shift(yy_state_67) - T_LPAREN => Shift(yy_state_71) - NT_simple_type => Shift(yy_state_97) - NT_type_ => Shift(yy_state_1271) + T_LBRACE => Shift(yy_state_1656) + T_PLUS_EQUAL => Reduce(2, NT_extenum_extension_target, yy_action_278) _ => Error } } -fn yy_state_1271(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(5, NT_record_decl_field, yy_action_203) -} - -fn yy_state_1272(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1656(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LIDENT => Shift(yy_state_1273) + T_ATTRIBUTE => Shift(yy_state_1168) + NT_enum_constructor => Shift(yy_state_1227) + NT_non_empty_list_attribute_ => Shift(yy_state_1231) + T_UIDENT => Shift(yy_state_1251) + NT_non_empty_list_semis_enum_constructor_ => Shift(yy_state_1254) + NT_list_semis_enum_constructor_ => Shift(yy_state_1657) + T_RBRACE => Reduce(0, NT_list_semis_enum_constructor_, yy_action_381) _ => Error } } -fn yy_state_1273(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1657(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_COLON => Shift(yy_state_1274) + T_RBRACE => Shift(yy_state_1658) _ => Error } } -fn yy_state_1274(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1658(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_ASYNC => Shift(yy_state_52) - T_UNDERSCORE => Shift(yy_state_57) - T_AMPER => Shift(yy_state_58) - T_PACKAGE_NAME => Shift(yy_state_60) - T_UIDENT => Shift(yy_state_67) - T_LPAREN => Shift(yy_state_71) - NT_simple_type => Shift(yy_state_97) - NT_type_ => Shift(yy_state_1275) + T_DERIVE => Shift(yy_state_1440) + NT_deriving_directive_list => Shift(yy_state_1659) + T_EOF | T_SEMI => Reduce(0, NT_deriving_directive_list, yy_action_288) _ => Error } } -fn yy_state_1275(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(4, NT_record_decl_field, yy_action_202) +fn yy_state_1659(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(8, NT_structure_item, yy_action_218) } -fn yy_state_1276(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1660(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_SEMI => Shift(yy_state_262) - NT_option_SEMI_ => Shift(yy_state_1277) - T_RBRACE => Reduce(0, NT_option_SEMI_, yy_action_815) + T_UIDENT => Shift(yy_state_1661) _ => Error } } -fn yy_state_1277(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(2, NT_record_decl_body, yy_action_201) -} - -fn yy_state_1278(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1661(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RBRACE => Shift(yy_state_1279) + T_COLON => Shift(yy_state_1662) + T_EQUAL => Reduce(3, NT_val_header, yy_action_217) _ => Error } } -fn yy_state_1279(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1662(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_DERIVE => Shift(yy_state_1171) - NT_deriving_directive_list => Shift(yy_state_1280) - T_EOF | T_SEMI => Reduce(0, NT_deriving_directive_list, yy_action_233) + T_ASYNC => Shift(yy_state_65) + T_UNDERSCORE => Shift(yy_state_70) + T_AMPER => Shift(yy_state_71) + T_PACKAGE_NAME => Shift(yy_state_73) + T_UIDENT => Shift(yy_state_80) + T_LPAREN => Shift(yy_state_84) + NT_simple_type => Shift(yy_state_110) + NT_type_ => Shift(yy_state_1663) _ => Error } } -fn yy_state_1280(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(5, NT_structure_item, yy_action_200) +fn yy_state_1663(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(5, NT_val_header, yy_action_216) } -fn yy_state_1281(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1664(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_DERIVE => Shift(yy_state_1171) - T_LBRACE => Shift(yy_state_1282) - NT_deriving_directive_list => Shift(yy_state_1286) - T_EOF | T_SEMI => Reduce(0, NT_deriving_directive_list, yy_action_233) + T_EXTEND => Shift(yy_state_1665) + T_LIDENT => Shift(yy_state_1668) _ => Error } } -fn yy_state_1282(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1665(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_ATTRIBUTE => Shift(yy_state_946) - NT_enum_constructor => Shift(yy_state_1000) - NT_non_empty_list_attribute_ => Shift(yy_state_1004) - T_UIDENT => Shift(yy_state_1024) - NT_non_empty_list_semis_enum_constructor_ => Shift(yy_state_1027) - NT_list_semis_enum_constructor_ => Shift(yy_state_1283) - T_RBRACE => Reduce(0, NT_list_semis_enum_constructor_, yy_action_317) + T_COLON => Shift(yy_state_1666) + T_EQUAL => Reduce(3, NT_val_header, yy_action_215) _ => Error } } -fn yy_state_1283(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1666(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RBRACE => Shift(yy_state_1284) + T_ASYNC => Shift(yy_state_65) + T_UNDERSCORE => Shift(yy_state_70) + T_AMPER => Shift(yy_state_71) + T_PACKAGE_NAME => Shift(yy_state_73) + T_UIDENT => Shift(yy_state_80) + T_LPAREN => Shift(yy_state_84) + NT_simple_type => Shift(yy_state_110) + NT_type_ => Shift(yy_state_1667) _ => Error } } -fn yy_state_1284(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1667(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(5, NT_val_header, yy_action_214) +} + +fn yy_state_1668(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_DERIVE => Shift(yy_state_1171) - NT_deriving_directive_list => Shift(yy_state_1285) - T_EOF | T_SEMI => Reduce(0, NT_deriving_directive_list, yy_action_233) + T_COLON => Shift(yy_state_1669) + T_EQUAL => Reduce(3, NT_val_header, yy_action_213) _ => Error } } -fn yy_state_1285(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(5, NT_structure_item, yy_action_199) +fn yy_state_1669(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_ASYNC => Shift(yy_state_65) + T_UNDERSCORE => Shift(yy_state_70) + T_AMPER => Shift(yy_state_71) + T_PACKAGE_NAME => Shift(yy_state_73) + T_UIDENT => Shift(yy_state_80) + T_LPAREN => Shift(yy_state_84) + NT_simple_type => Shift(yy_state_110) + NT_type_ => Shift(yy_state_1670) + _ => Error + } } -fn yy_state_1286(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(2, NT_structure_item, yy_action_198) +fn yy_state_1670(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(5, NT_val_header, yy_action_212) } -fn yy_state_1287(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1671(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_DERIVE => Shift(yy_state_1171) - T_EQUAL => Shift(yy_state_1288) - NT_deriving_directive_list => Shift(yy_state_1291) - T_EOF | T_SEMI => Reduce(0, NT_deriving_directive_list, yy_action_233) + T_LPAREN => Shift(yy_state_1539) + NT_pub_attr => Shift(yy_state_1672) + T_TRAIT | T_IMPL | T_ASYNC | T_FN | T_LET | T_CONST | T_TYPE | T_SUBERROR | T_EXTENUM => Reduce(0, NT_pub_attr, yy_action_261) _ => Error } } -fn yy_state_1288(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1672(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_ASYNC => Shift(yy_state_52) - T_UNDERSCORE => Shift(yy_state_57) - T_AMPER => Shift(yy_state_58) - T_PACKAGE_NAME => Shift(yy_state_60) - T_UIDENT => Shift(yy_state_67) - T_LPAREN => Shift(yy_state_71) - NT_simple_type => Shift(yy_state_97) - NT_type_ => Shift(yy_state_1289) + T_FN => Shift(yy_state_1627) + T_SUBERROR => Shift(yy_state_1673) + T_TYPE => Shift(yy_state_1675) + T_IMPL => Shift(yy_state_1678) + T_TRAIT => Shift(yy_state_1683) + T_EXTENUM => Shift(yy_state_1689) + T_CONST => Shift(yy_state_1702) + T_LET => Shift(yy_state_1706) + NT_fun_header_generic => Shift(yy_state_1713) + T_ASYNC => Shift(yy_state_1716) _ => Error } } -fn yy_state_1289(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1673(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_DERIVE => Shift(yy_state_1171) - NT_deriving_directive_list => Shift(yy_state_1290) - T_EOF | T_SEMI => Reduce(0, NT_deriving_directive_list, yy_action_233) + T_UIDENT => Shift(yy_state_1674) _ => Error } } -fn yy_state_1290(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(4, NT_structure_item, yy_action_197) -} - -fn yy_state_1291(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(2, NT_structure_item, yy_action_196) +fn yy_state_1674(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(5, NT_suberror_header, yy_action_211) } -fn yy_state_1292(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1675(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_UIDENT => Shift(yy_state_1293) + T_UIDENT => Shift(yy_state_1676) _ => Error } } -fn yy_state_1293(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1676(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_COLON => Shift(yy_state_1294) - T_EQUAL => Reduce(2, NT_val_header, yy_action_195) + T_LBRACKET => Shift(yy_state_1172) + NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__ => Shift(yy_state_1183) + NT_optional_type_parameters_no_constraints => Shift(yy_state_1677) + T_EOF | T_DERIVE | T_EQUAL | T_SEMI => Reduce(0, NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__, yy_action_415) _ => Error } } -fn yy_state_1294(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1677(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(6, NT_type_header, yy_action_210) +} + +fn yy_state_1678(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_ASYNC => Shift(yy_state_52) - T_UNDERSCORE => Shift(yy_state_57) - T_AMPER => Shift(yy_state_58) - T_PACKAGE_NAME => Shift(yy_state_60) - T_UIDENT => Shift(yy_state_67) - T_LPAREN => Shift(yy_state_71) - NT_simple_type => Shift(yy_state_97) - NT_type_ => Shift(yy_state_1295) + NT_type_parameters => Shift(yy_state_1223) + NT_option_type_parameters_ => Shift(yy_state_1266) + T_LBRACKET => Shift(yy_state_1267) + NT_optional_type_parameters => Shift(yy_state_1679) + T_UIDENT | T_AMPER | T_PACKAGE_NAME => Reduce(0, NT_option_type_parameters_, yy_action_383) _ => Error } } -fn yy_state_1295(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(4, NT_val_header, yy_action_194) -} - -fn yy_state_1296(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1679(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LIDENT => Shift(yy_state_1297) + T_AMPER => Shift(yy_state_20) + T_PACKAGE_NAME => Shift(yy_state_22) + T_UIDENT => Shift(yy_state_25) + NT_qual_ident_ty => Shift(yy_state_26) + NT_type_name => Shift(yy_state_1680) _ => Error } } -fn yy_state_1297(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1680(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_COLON => Shift(yy_state_1298) - T_EQUAL => Reduce(2, NT_val_header, yy_action_193) + T_FOR => Shift(yy_state_1681) _ => Error } } -fn yy_state_1298(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1681(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_ASYNC => Shift(yy_state_52) - T_UNDERSCORE => Shift(yy_state_57) - T_AMPER => Shift(yy_state_58) - T_PACKAGE_NAME => Shift(yy_state_60) - T_UIDENT => Shift(yy_state_67) - T_LPAREN => Shift(yy_state_71) - NT_simple_type => Shift(yy_state_97) - NT_type_ => Shift(yy_state_1299) + T_ASYNC => Shift(yy_state_65) + T_UNDERSCORE => Shift(yy_state_70) + T_AMPER => Shift(yy_state_71) + T_PACKAGE_NAME => Shift(yy_state_73) + T_UIDENT => Shift(yy_state_80) + T_LPAREN => Shift(yy_state_84) + NT_simple_type => Shift(yy_state_110) + NT_type_ => Shift(yy_state_1682) _ => Error } } -fn yy_state_1299(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(4, NT_val_header, yy_action_192) +fn yy_state_1682(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(8, NT_structure_item, yy_action_209) } -fn yy_state_1300(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1683(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_STRING => Shift(yy_state_1301) + T_UIDENT => Shift(yy_state_1684) _ => Error } } -fn yy_state_1301(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1684(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_FN => Shift(yy_state_1302) + T_COLON => Shift(yy_state_1320) + NT_option_preceded_COLON_separated_nonempty_list_PLUS_tvar_constraint___ => Shift(yy_state_1685) + T_LBRACE => Reduce(0, NT_option_preceded_COLON_separated_nonempty_list_PLUS_tvar_constraint___, yy_action_333) _ => Error } } -fn yy_state_1302(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1685(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_type_parameters => Shift(yy_state_996) - NT_option_type_parameters_ => Shift(yy_state_1036) - T_LBRACKET => Shift(yy_state_1037) - NT_optional_type_parameters => Shift(yy_state_1303) - T_LIDENT | T_UIDENT | T_AMPER | T_PACKAGE_NAME => Reduce(0, NT_option_type_parameters_, yy_action_319) + T_LBRACE => Shift(yy_state_1686) _ => Error } } -fn yy_state_1303(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1686(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_AMPER => Shift(yy_state_19) - T_PACKAGE_NAME => Shift(yy_state_21) - T_UIDENT => Shift(yy_state_24) - NT_qual_ident_ty => Shift(yy_state_25) - NT_fun_binder => Shift(yy_state_1304) - T_LIDENT => Shift(yy_state_1307) - NT_type_name => Shift(yy_state_1308) + T_ATTRIBUTE => Shift(yy_state_1168) + NT_trait_method_decl => Shift(yy_state_1324) + NT_non_empty_list_attribute_ => Shift(yy_state_1328) + T_FN => Shift(yy_state_1381) + NT_trait_method_fn_header => Shift(yy_state_1383) + T_ASYNC => Shift(yy_state_1396) + NT_non_empty_list_semis_trait_method_decl_ => Shift(yy_state_1410) + NT_list_semis_trait_method_decl_ => Shift(yy_state_1687) + T_LIDENT | T_EXTEND => Reduce(0, NT_trait_method_fn_header, yy_action_330) + T_RBRACE => Reduce(0, NT_list_semis_trait_method_decl_, yy_action_329) _ => Error } } -fn yy_state_1304(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1687(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LPAREN => Shift(yy_state_143) - NT_parameters => Shift(yy_state_1076) - NT_option_parameters_ => Shift(yy_state_1305) - T_RAISE | T_EQUAL | T_THIN_ARROW | T_NORAISE => Reduce(0, NT_option_parameters_, yy_action_275) + T_RBRACE => Shift(yy_state_1688) _ => Error } } -fn yy_state_1305(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1688(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(9, NT_structure_item, yy_action_208) +} + +fn yy_state_1689(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_error_annotation => Shift(yy_state_50) - T_THIN_ARROW => Shift(yy_state_51) - T_NORAISE => Shift(yy_state_78) - T_RAISE => Shift(yy_state_79) - NT_func_return_type => Shift(yy_state_1306) - T_EQUAL => Reduce(0, NT_func_return_type, yy_action_862) + T_PACKAGE_NAME => Shift(yy_state_1432) + NT_extenum_extension_target => Shift(yy_state_1690) + T_UIDENT => Shift(yy_state_1696) _ => Error } } -fn yy_state_1306(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(7, NT_extern_fun_header, yy_action_191) -} - -fn yy_state_1307(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_fun_binder, yy_action_190) -} - -fn yy_state_1308(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1690(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_COLONCOLON => Shift(yy_state_1309) + T_PLUS_EQUAL => Shift(yy_state_1691) _ => Error } } -fn yy_state_1309(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1691(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_luident => Shift(yy_state_1310) - T_UIDENT => Shift(yy_state_1311) - T_LIDENT => Shift(yy_state_1312) + T_LBRACE => Shift(yy_state_1692) _ => Error } } -fn yy_state_1310(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_fun_binder, yy_action_189) -} - -fn yy_state_1311(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_luident, yy_action_188) -} - -fn yy_state_1312(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(1, NT_luident, yy_action_187) +fn yy_state_1692(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_ATTRIBUTE => Shift(yy_state_1168) + NT_enum_constructor => Shift(yy_state_1227) + NT_non_empty_list_attribute_ => Shift(yy_state_1231) + T_UIDENT => Shift(yy_state_1251) + NT_non_empty_list_semis_enum_constructor_ => Shift(yy_state_1254) + NT_list_semis_enum_constructor_ => Shift(yy_state_1693) + T_RBRACE => Reduce(0, NT_list_semis_enum_constructor_, yy_action_381) + _ => Error + } } -fn yy_state_1313(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1693(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_type_parameters => Shift(yy_state_996) - NT_option_type_parameters_ => Shift(yy_state_1036) - T_LBRACKET => Shift(yy_state_1037) - NT_optional_type_parameters => Shift(yy_state_1314) - T_LIDENT | T_UIDENT | T_AMPER | T_PACKAGE_NAME => Reduce(0, NT_option_type_parameters_, yy_action_319) + T_RBRACE => Shift(yy_state_1694) _ => Error } } -fn yy_state_1314(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1694(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_AMPER => Shift(yy_state_19) - T_PACKAGE_NAME => Shift(yy_state_21) - T_UIDENT => Shift(yy_state_24) - NT_qual_ident_ty => Shift(yy_state_25) - T_LIDENT => Shift(yy_state_1307) - NT_type_name => Shift(yy_state_1308) - NT_fun_binder => Shift(yy_state_1315) + T_DERIVE => Shift(yy_state_1440) + NT_deriving_directive_list => Shift(yy_state_1695) + T_EOF | T_SEMI => Reduce(0, NT_deriving_directive_list, yy_action_288) _ => Error } } -fn yy_state_1315(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_fun_header_generic, yy_action_186) +fn yy_state_1695(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(10, NT_structure_item, yy_action_207) } -fn yy_state_1316(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1696(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_FN => Shift(yy_state_1313) - T_SUBERROR => Shift(yy_state_1317) - T_TYPE => Shift(yy_state_1319) - T_IMPL => Shift(yy_state_1322) - T_TRAIT => Shift(yy_state_1327) - T_EXTENUM => Shift(yy_state_1333) - T_CONST => Shift(yy_state_1346) - T_LET => Shift(yy_state_1350) - T_PUB => Shift(yy_state_1354) - T_PRIV => Shift(yy_state_1400) - NT_fun_header_generic => Shift(yy_state_1445) - T_ASYNC => Shift(yy_state_1448) + T_LBRACKET => Shift(yy_state_1172) + NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__ => Shift(yy_state_1183) + NT_optional_type_parameters_no_constraints => Shift(yy_state_1697) + T_PLUS_EQUAL | T_LBRACE => Reduce(0, NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__, yy_action_415) _ => Error } } -fn yy_state_1317(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1697(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_UIDENT => Shift(yy_state_1318) + T_LBRACE => Shift(yy_state_1698) + T_PLUS_EQUAL => Reduce(2, NT_extenum_extension_target, yy_action_278) _ => Error } } -fn yy_state_1318(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_suberror_header, yy_action_185) -} - -fn yy_state_1319(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1698(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_UIDENT => Shift(yy_state_1320) + T_ATTRIBUTE => Shift(yy_state_1168) + NT_enum_constructor => Shift(yy_state_1227) + NT_non_empty_list_attribute_ => Shift(yy_state_1231) + T_UIDENT => Shift(yy_state_1251) + NT_non_empty_list_semis_enum_constructor_ => Shift(yy_state_1254) + NT_list_semis_enum_constructor_ => Shift(yy_state_1699) + T_RBRACE => Reduce(0, NT_list_semis_enum_constructor_, yy_action_381) _ => Error } } -fn yy_state_1320(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1699(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACKET => Shift(yy_state_950) - NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__ => Shift(yy_state_961) - NT_optional_type_parameters_no_constraints => Shift(yy_state_1321) - T_EOF | T_DERIVE | T_EQUAL | T_SEMI => Reduce(0, NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__, yy_action_347) + T_RBRACE => Shift(yy_state_1700) _ => Error } } -fn yy_state_1321(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(4, NT_type_header, yy_action_184) -} - -fn yy_state_1322(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1700(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_type_parameters => Shift(yy_state_996) - NT_option_type_parameters_ => Shift(yy_state_1036) - T_LBRACKET => Shift(yy_state_1037) - NT_optional_type_parameters => Shift(yy_state_1323) - T_UIDENT | T_AMPER | T_PACKAGE_NAME => Reduce(0, NT_option_type_parameters_, yy_action_319) + T_DERIVE => Shift(yy_state_1440) + NT_deriving_directive_list => Shift(yy_state_1701) + T_EOF | T_SEMI => Reduce(0, NT_deriving_directive_list, yy_action_288) _ => Error } } -fn yy_state_1323(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1701(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(10, NT_structure_item, yy_action_206) +} + +fn yy_state_1702(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_AMPER => Shift(yy_state_19) - T_PACKAGE_NAME => Shift(yy_state_21) - T_UIDENT => Shift(yy_state_24) - NT_qual_ident_ty => Shift(yy_state_25) - NT_type_name => Shift(yy_state_1324) + T_UIDENT => Shift(yy_state_1703) _ => Error } } -fn yy_state_1324(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1703(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_FOR => Shift(yy_state_1325) + T_COLON => Shift(yy_state_1704) + T_EQUAL => Reduce(5, NT_val_header, yy_action_205) _ => Error } } -fn yy_state_1325(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1704(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_ASYNC => Shift(yy_state_52) - T_UNDERSCORE => Shift(yy_state_57) - T_AMPER => Shift(yy_state_58) - T_PACKAGE_NAME => Shift(yy_state_60) - T_UIDENT => Shift(yy_state_67) - T_LPAREN => Shift(yy_state_71) - NT_simple_type => Shift(yy_state_97) - NT_type_ => Shift(yy_state_1326) + T_ASYNC => Shift(yy_state_65) + T_UNDERSCORE => Shift(yy_state_70) + T_AMPER => Shift(yy_state_71) + T_PACKAGE_NAME => Shift(yy_state_73) + T_UIDENT => Shift(yy_state_80) + T_LPAREN => Shift(yy_state_84) + NT_simple_type => Shift(yy_state_110) + NT_type_ => Shift(yy_state_1705) _ => Error } } -fn yy_state_1326(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(6, NT_structure_item, yy_action_183) +fn yy_state_1705(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(7, NT_val_header, yy_action_204) } -fn yy_state_1327(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1706(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_UIDENT => Shift(yy_state_1328) + T_EXTEND => Shift(yy_state_1707) + T_LIDENT => Shift(yy_state_1710) _ => Error } } -fn yy_state_1328(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1707(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_COLON => Shift(yy_state_1081) - NT_option_preceded_COLON_separated_nonempty_list_PLUS_tvar_constraint___ => Shift(yy_state_1329) - T_LBRACE => Reduce(0, NT_option_preceded_COLON_separated_nonempty_list_PLUS_tvar_constraint___, yy_action_272) + T_COLON => Shift(yy_state_1708) + T_EQUAL => Reduce(5, NT_val_header, yy_action_203) _ => Error } } -fn yy_state_1329(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1708(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACE => Shift(yy_state_1330) + T_ASYNC => Shift(yy_state_65) + T_UNDERSCORE => Shift(yy_state_70) + T_AMPER => Shift(yy_state_71) + T_PACKAGE_NAME => Shift(yy_state_73) + T_UIDENT => Shift(yy_state_80) + T_LPAREN => Shift(yy_state_84) + NT_simple_type => Shift(yy_state_110) + NT_type_ => Shift(yy_state_1709) _ => Error } } -fn yy_state_1330(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1709(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(7, NT_val_header, yy_action_202) +} + +fn yy_state_1710(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_ATTRIBUTE => Shift(yy_state_946) - NT_trait_method_decl => Shift(yy_state_1085) - NT_non_empty_list_attribute_ => Shift(yy_state_1089) - T_FN => Shift(yy_state_1124) - NT_trait_method_fn_header => Shift(yy_state_1126) - T_ASYNC => Shift(yy_state_1133) - NT_non_empty_list_semis_trait_method_decl_ => Shift(yy_state_1141) - NT_list_semis_trait_method_decl_ => Shift(yy_state_1331) - T_LIDENT => Reduce(0, NT_trait_method_fn_header, yy_action_269) - T_RBRACE => Reduce(0, NT_list_semis_trait_method_decl_, yy_action_268) + T_COLON => Shift(yy_state_1711) + T_EQUAL => Reduce(5, NT_val_header, yy_action_201) _ => Error } } -fn yy_state_1331(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1711(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RBRACE => Shift(yy_state_1332) + T_ASYNC => Shift(yy_state_65) + T_UNDERSCORE => Shift(yy_state_70) + T_AMPER => Shift(yy_state_71) + T_PACKAGE_NAME => Shift(yy_state_73) + T_UIDENT => Shift(yy_state_80) + T_LPAREN => Shift(yy_state_84) + NT_simple_type => Shift(yy_state_110) + NT_type_ => Shift(yy_state_1712) _ => Error } } -fn yy_state_1332(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(7, NT_structure_item, yy_action_182) +fn yy_state_1712(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(7, NT_val_header, yy_action_200) } -fn yy_state_1333(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1713(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_PACKAGE_NAME => Shift(yy_state_1163) - NT_extenum_extension_target => Shift(yy_state_1334) - T_UIDENT => Shift(yy_state_1340) + T_LPAREN => Shift(yy_state_157) + NT_parameters => Shift(yy_state_1315) + NT_option_parameters_ => Shift(yy_state_1714) + T_EOF | T_RAISE | T_SEMI | T_THIN_ARROW | T_NORAISE => Reduce(0, NT_option_parameters_, yy_action_336) _ => Error } } -fn yy_state_1334(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1714(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_PLUS_EQUAL => Shift(yy_state_1335) + NT_error_annotation => Shift(yy_state_63) + T_THIN_ARROW => Shift(yy_state_64) + T_NORAISE => Shift(yy_state_91) + T_RAISE => Shift(yy_state_92) + NT_func_return_type => Shift(yy_state_1715) + T_EOF | T_SEMI => Reduce(0, NT_func_return_type, yy_action_1023) _ => Error } } -fn yy_state_1335(_lookahead : YYSymbol) -> YYDecision { - match _lookahead { - T_LBRACE => Shift(yy_state_1336) - _ => Error - } +fn yy_state_1715(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(6, NT_declare_fun_header, yy_action_199) } -fn yy_state_1336(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1716(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_ATTRIBUTE => Shift(yy_state_946) - NT_enum_constructor => Shift(yy_state_1000) - NT_non_empty_list_attribute_ => Shift(yy_state_1004) - T_UIDENT => Shift(yy_state_1024) - NT_non_empty_list_semis_enum_constructor_ => Shift(yy_state_1027) - NT_list_semis_enum_constructor_ => Shift(yy_state_1337) - T_RBRACE => Reduce(0, NT_list_semis_enum_constructor_, yy_action_317) + T_FN => Shift(yy_state_1627) + NT_fun_header_generic => Shift(yy_state_1717) _ => Error } } -fn yy_state_1337(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1717(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RBRACE => Shift(yy_state_1338) + T_LPAREN => Shift(yy_state_157) + NT_parameters => Shift(yy_state_1315) + NT_option_parameters_ => Shift(yy_state_1718) + T_EOF | T_RAISE | T_SEMI | T_THIN_ARROW | T_NORAISE => Reduce(0, NT_option_parameters_, yy_action_336) _ => Error } } -fn yy_state_1338(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1718(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_DERIVE => Shift(yy_state_1171) - NT_deriving_directive_list => Shift(yy_state_1339) - T_EOF | T_SEMI => Reduce(0, NT_deriving_directive_list, yy_action_233) + NT_error_annotation => Shift(yy_state_63) + T_THIN_ARROW => Shift(yy_state_64) + T_NORAISE => Shift(yy_state_91) + T_RAISE => Shift(yy_state_92) + NT_func_return_type => Shift(yy_state_1719) + T_EOF | T_SEMI => Reduce(0, NT_func_return_type, yy_action_1023) _ => Error } } -fn yy_state_1339(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(8, NT_structure_item, yy_action_181) +fn yy_state_1719(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(7, NT_declare_fun_header, yy_action_198) } -fn yy_state_1340(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1720(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACKET => Shift(yy_state_950) - NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__ => Shift(yy_state_961) - NT_optional_type_parameters_no_constraints => Shift(yy_state_1341) - T_PLUS_EQUAL | T_LBRACE => Reduce(0, NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__, yy_action_347) + T_FN => Shift(yy_state_1627) + T_SUBERROR => Shift(yy_state_1721) + T_TYPE => Shift(yy_state_1723) + T_IMPL => Shift(yy_state_1726) + T_TRAIT => Shift(yy_state_1731) + T_EXTENUM => Shift(yy_state_1737) + T_CONST => Shift(yy_state_1750) + T_LET => Shift(yy_state_1754) + NT_fun_header_generic => Shift(yy_state_1761) + T_ASYNC => Shift(yy_state_1764) _ => Error } } -fn yy_state_1341(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1721(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACE => Shift(yy_state_1342) - T_PLUS_EQUAL => Reduce(2, NT_extenum_extension_target, yy_action_223) + T_UIDENT => Shift(yy_state_1722) _ => Error } } -fn yy_state_1342(_lookahead : YYSymbol) -> YYDecision { - match _lookahead { - T_ATTRIBUTE => Shift(yy_state_946) - NT_enum_constructor => Shift(yy_state_1000) - NT_non_empty_list_attribute_ => Shift(yy_state_1004) - T_UIDENT => Shift(yy_state_1024) - NT_non_empty_list_semis_enum_constructor_ => Shift(yy_state_1027) - NT_list_semis_enum_constructor_ => Shift(yy_state_1343) - T_RBRACE => Reduce(0, NT_list_semis_enum_constructor_, yy_action_317) - _ => Error - } +fn yy_state_1722(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(4, NT_suberror_header, yy_action_197) } -fn yy_state_1343(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1723(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RBRACE => Shift(yy_state_1344) + T_UIDENT => Shift(yy_state_1724) _ => Error } } -fn yy_state_1344(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1724(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_DERIVE => Shift(yy_state_1171) - NT_deriving_directive_list => Shift(yy_state_1345) - T_EOF | T_SEMI => Reduce(0, NT_deriving_directive_list, yy_action_233) + T_LBRACKET => Shift(yy_state_1172) + NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__ => Shift(yy_state_1183) + NT_optional_type_parameters_no_constraints => Shift(yy_state_1725) + T_EOF | T_DERIVE | T_EQUAL | T_SEMI => Reduce(0, NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__, yy_action_415) _ => Error } } -fn yy_state_1345(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(8, NT_structure_item, yy_action_180) +fn yy_state_1725(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(5, NT_type_header, yy_action_196) } -fn yy_state_1346(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1726(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_UIDENT => Shift(yy_state_1347) + NT_type_parameters => Shift(yy_state_1223) + NT_option_type_parameters_ => Shift(yy_state_1266) + T_LBRACKET => Shift(yy_state_1267) + NT_optional_type_parameters => Shift(yy_state_1727) + T_UIDENT | T_AMPER | T_PACKAGE_NAME => Reduce(0, NT_option_type_parameters_, yy_action_383) _ => Error } } -fn yy_state_1347(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1727(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_COLON => Shift(yy_state_1348) - T_EQUAL => Reduce(3, NT_val_header, yy_action_179) + T_AMPER => Shift(yy_state_20) + T_PACKAGE_NAME => Shift(yy_state_22) + T_UIDENT => Shift(yy_state_25) + NT_qual_ident_ty => Shift(yy_state_26) + NT_type_name => Shift(yy_state_1728) _ => Error } } -fn yy_state_1348(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1728(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_ASYNC => Shift(yy_state_52) - T_UNDERSCORE => Shift(yy_state_57) - T_AMPER => Shift(yy_state_58) - T_PACKAGE_NAME => Shift(yy_state_60) - T_UIDENT => Shift(yy_state_67) - T_LPAREN => Shift(yy_state_71) - NT_simple_type => Shift(yy_state_97) - NT_type_ => Shift(yy_state_1349) + T_FOR => Shift(yy_state_1729) _ => Error } } -fn yy_state_1349(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(5, NT_val_header, yy_action_178) -} - -fn yy_state_1350(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1729(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LIDENT => Shift(yy_state_1351) + T_ASYNC => Shift(yy_state_65) + T_UNDERSCORE => Shift(yy_state_70) + T_AMPER => Shift(yy_state_71) + T_PACKAGE_NAME => Shift(yy_state_73) + T_UIDENT => Shift(yy_state_80) + T_LPAREN => Shift(yy_state_84) + NT_simple_type => Shift(yy_state_110) + NT_type_ => Shift(yy_state_1730) _ => Error } } -fn yy_state_1351(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1730(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(7, NT_structure_item, yy_action_195) +} + +fn yy_state_1731(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_COLON => Shift(yy_state_1352) - T_EQUAL => Reduce(3, NT_val_header, yy_action_177) + T_UIDENT => Shift(yy_state_1732) _ => Error } } -fn yy_state_1352(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1732(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_ASYNC => Shift(yy_state_52) - T_UNDERSCORE => Shift(yy_state_57) - T_AMPER => Shift(yy_state_58) - T_PACKAGE_NAME => Shift(yy_state_60) - T_UIDENT => Shift(yy_state_67) - T_LPAREN => Shift(yy_state_71) - NT_simple_type => Shift(yy_state_97) - NT_type_ => Shift(yy_state_1353) + T_COLON => Shift(yy_state_1320) + NT_option_preceded_COLON_separated_nonempty_list_PLUS_tvar_constraint___ => Shift(yy_state_1733) + T_LBRACE => Reduce(0, NT_option_preceded_COLON_separated_nonempty_list_PLUS_tvar_constraint___, yy_action_333) _ => Error } } -fn yy_state_1353(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(5, NT_val_header, yy_action_176) -} - -fn yy_state_1354(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1733(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LPAREN => Shift(yy_state_1247) - NT_pub_attr => Shift(yy_state_1355) - T_TRAIT | T_IMPL | T_ASYNC | T_FN | T_LET | T_CONST | T_TYPE | T_SUBERROR | T_EXTENUM => Reduce(0, NT_pub_attr, yy_action_210) + T_LBRACE => Shift(yy_state_1734) _ => Error } } -fn yy_state_1355(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1734(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_FN => Shift(yy_state_1313) - T_SUBERROR => Shift(yy_state_1356) - T_TYPE => Shift(yy_state_1358) - T_IMPL => Shift(yy_state_1361) - T_TRAIT => Shift(yy_state_1366) - T_EXTENUM => Shift(yy_state_1372) - T_CONST => Shift(yy_state_1385) - T_LET => Shift(yy_state_1389) - NT_fun_header_generic => Shift(yy_state_1393) + T_ATTRIBUTE => Shift(yy_state_1168) + NT_trait_method_decl => Shift(yy_state_1324) + NT_non_empty_list_attribute_ => Shift(yy_state_1328) + T_FN => Shift(yy_state_1381) + NT_trait_method_fn_header => Shift(yy_state_1383) T_ASYNC => Shift(yy_state_1396) + NT_non_empty_list_semis_trait_method_decl_ => Shift(yy_state_1410) + NT_list_semis_trait_method_decl_ => Shift(yy_state_1735) + T_LIDENT | T_EXTEND => Reduce(0, NT_trait_method_fn_header, yy_action_330) + T_RBRACE => Reduce(0, NT_list_semis_trait_method_decl_, yy_action_329) _ => Error } } -fn yy_state_1356(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1735(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_UIDENT => Shift(yy_state_1357) + T_RBRACE => Shift(yy_state_1736) _ => Error } } -fn yy_state_1357(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(5, NT_suberror_header, yy_action_175) +fn yy_state_1736(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(8, NT_structure_item, yy_action_194) } -fn yy_state_1358(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1737(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_UIDENT => Shift(yy_state_1359) + T_PACKAGE_NAME => Shift(yy_state_1432) + NT_extenum_extension_target => Shift(yy_state_1738) + T_UIDENT => Shift(yy_state_1744) _ => Error } } -fn yy_state_1359(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1738(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACKET => Shift(yy_state_950) - NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__ => Shift(yy_state_961) - NT_optional_type_parameters_no_constraints => Shift(yy_state_1360) - T_EOF | T_DERIVE | T_EQUAL | T_SEMI => Reduce(0, NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__, yy_action_347) + T_PLUS_EQUAL => Shift(yy_state_1739) _ => Error } } -fn yy_state_1360(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(6, NT_type_header, yy_action_174) -} - -fn yy_state_1361(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1739(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_type_parameters => Shift(yy_state_996) - NT_option_type_parameters_ => Shift(yy_state_1036) - T_LBRACKET => Shift(yy_state_1037) - NT_optional_type_parameters => Shift(yy_state_1362) - T_UIDENT | T_AMPER | T_PACKAGE_NAME => Reduce(0, NT_option_type_parameters_, yy_action_319) + T_LBRACE => Shift(yy_state_1740) _ => Error } } -fn yy_state_1362(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1740(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_AMPER => Shift(yy_state_19) - T_PACKAGE_NAME => Shift(yy_state_21) - T_UIDENT => Shift(yy_state_24) - NT_qual_ident_ty => Shift(yy_state_25) - NT_type_name => Shift(yy_state_1363) + T_ATTRIBUTE => Shift(yy_state_1168) + NT_enum_constructor => Shift(yy_state_1227) + NT_non_empty_list_attribute_ => Shift(yy_state_1231) + T_UIDENT => Shift(yy_state_1251) + NT_non_empty_list_semis_enum_constructor_ => Shift(yy_state_1254) + NT_list_semis_enum_constructor_ => Shift(yy_state_1741) + T_RBRACE => Reduce(0, NT_list_semis_enum_constructor_, yy_action_381) _ => Error } } -fn yy_state_1363(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1741(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_FOR => Shift(yy_state_1364) + T_RBRACE => Shift(yy_state_1742) _ => Error } } -fn yy_state_1364(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1742(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_ASYNC => Shift(yy_state_52) - T_UNDERSCORE => Shift(yy_state_57) - T_AMPER => Shift(yy_state_58) - T_PACKAGE_NAME => Shift(yy_state_60) - T_UIDENT => Shift(yy_state_67) - T_LPAREN => Shift(yy_state_71) - NT_simple_type => Shift(yy_state_97) - NT_type_ => Shift(yy_state_1365) + T_DERIVE => Shift(yy_state_1440) + NT_deriving_directive_list => Shift(yy_state_1743) + T_EOF | T_SEMI => Reduce(0, NT_deriving_directive_list, yy_action_288) _ => Error } } -fn yy_state_1365(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(8, NT_structure_item, yy_action_173) +fn yy_state_1743(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(9, NT_structure_item, yy_action_193) } -fn yy_state_1366(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1744(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_UIDENT => Shift(yy_state_1367) + T_LBRACKET => Shift(yy_state_1172) + NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__ => Shift(yy_state_1183) + NT_optional_type_parameters_no_constraints => Shift(yy_state_1745) + T_PLUS_EQUAL | T_LBRACE => Reduce(0, NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__, yy_action_415) _ => Error } } -fn yy_state_1367(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1745(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_COLON => Shift(yy_state_1081) - NT_option_preceded_COLON_separated_nonempty_list_PLUS_tvar_constraint___ => Shift(yy_state_1368) - T_LBRACE => Reduce(0, NT_option_preceded_COLON_separated_nonempty_list_PLUS_tvar_constraint___, yy_action_272) + T_LBRACE => Shift(yy_state_1746) + T_PLUS_EQUAL => Reduce(2, NT_extenum_extension_target, yy_action_278) _ => Error } } -fn yy_state_1368(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1746(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACE => Shift(yy_state_1369) + T_ATTRIBUTE => Shift(yy_state_1168) + NT_enum_constructor => Shift(yy_state_1227) + NT_non_empty_list_attribute_ => Shift(yy_state_1231) + T_UIDENT => Shift(yy_state_1251) + NT_non_empty_list_semis_enum_constructor_ => Shift(yy_state_1254) + NT_list_semis_enum_constructor_ => Shift(yy_state_1747) + T_RBRACE => Reduce(0, NT_list_semis_enum_constructor_, yy_action_381) _ => Error } } -fn yy_state_1369(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1747(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_ATTRIBUTE => Shift(yy_state_946) - NT_trait_method_decl => Shift(yy_state_1085) - NT_non_empty_list_attribute_ => Shift(yy_state_1089) - T_FN => Shift(yy_state_1124) - NT_trait_method_fn_header => Shift(yy_state_1126) - T_ASYNC => Shift(yy_state_1133) - NT_non_empty_list_semis_trait_method_decl_ => Shift(yy_state_1141) - NT_list_semis_trait_method_decl_ => Shift(yy_state_1370) - T_LIDENT => Reduce(0, NT_trait_method_fn_header, yy_action_269) - T_RBRACE => Reduce(0, NT_list_semis_trait_method_decl_, yy_action_268) + T_RBRACE => Shift(yy_state_1748) _ => Error } } -fn yy_state_1370(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1748(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RBRACE => Shift(yy_state_1371) + T_DERIVE => Shift(yy_state_1440) + NT_deriving_directive_list => Shift(yy_state_1749) + T_EOF | T_SEMI => Reduce(0, NT_deriving_directive_list, yy_action_288) _ => Error } } -fn yy_state_1371(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(9, NT_structure_item, yy_action_172) +fn yy_state_1749(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(9, NT_structure_item, yy_action_192) } -fn yy_state_1372(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1750(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_PACKAGE_NAME => Shift(yy_state_1163) - NT_extenum_extension_target => Shift(yy_state_1373) - T_UIDENT => Shift(yy_state_1379) + T_UIDENT => Shift(yy_state_1751) _ => Error } } -fn yy_state_1373(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1751(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_PLUS_EQUAL => Shift(yy_state_1374) + T_COLON => Shift(yy_state_1752) + T_EQUAL => Reduce(4, NT_val_header, yy_action_191) _ => Error } } -fn yy_state_1374(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1752(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACE => Shift(yy_state_1375) + T_ASYNC => Shift(yy_state_65) + T_UNDERSCORE => Shift(yy_state_70) + T_AMPER => Shift(yy_state_71) + T_PACKAGE_NAME => Shift(yy_state_73) + T_UIDENT => Shift(yy_state_80) + T_LPAREN => Shift(yy_state_84) + NT_simple_type => Shift(yy_state_110) + NT_type_ => Shift(yy_state_1753) _ => Error } } -fn yy_state_1375(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1753(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(6, NT_val_header, yy_action_190) +} + +fn yy_state_1754(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_ATTRIBUTE => Shift(yy_state_946) - NT_enum_constructor => Shift(yy_state_1000) - NT_non_empty_list_attribute_ => Shift(yy_state_1004) - T_UIDENT => Shift(yy_state_1024) - NT_non_empty_list_semis_enum_constructor_ => Shift(yy_state_1027) - NT_list_semis_enum_constructor_ => Shift(yy_state_1376) - T_RBRACE => Reduce(0, NT_list_semis_enum_constructor_, yy_action_317) + T_EXTEND => Shift(yy_state_1755) + T_LIDENT => Shift(yy_state_1758) _ => Error } } -fn yy_state_1376(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1755(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RBRACE => Shift(yy_state_1377) + T_COLON => Shift(yy_state_1756) + T_EQUAL => Reduce(4, NT_val_header, yy_action_189) _ => Error } } -fn yy_state_1377(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1756(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_DERIVE => Shift(yy_state_1171) - NT_deriving_directive_list => Shift(yy_state_1378) - T_EOF | T_SEMI => Reduce(0, NT_deriving_directive_list, yy_action_233) + T_ASYNC => Shift(yy_state_65) + T_UNDERSCORE => Shift(yy_state_70) + T_AMPER => Shift(yy_state_71) + T_PACKAGE_NAME => Shift(yy_state_73) + T_UIDENT => Shift(yy_state_80) + T_LPAREN => Shift(yy_state_84) + NT_simple_type => Shift(yy_state_110) + NT_type_ => Shift(yy_state_1757) _ => Error } } -fn yy_state_1378(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(10, NT_structure_item, yy_action_171) +fn yy_state_1757(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(6, NT_val_header, yy_action_188) } -fn yy_state_1379(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1758(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACKET => Shift(yy_state_950) - NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__ => Shift(yy_state_961) - NT_optional_type_parameters_no_constraints => Shift(yy_state_1380) - T_PLUS_EQUAL | T_LBRACE => Reduce(0, NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__, yy_action_347) + T_COLON => Shift(yy_state_1759) + T_EQUAL => Reduce(4, NT_val_header, yy_action_187) _ => Error } } -fn yy_state_1380(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1759(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACE => Shift(yy_state_1381) - T_PLUS_EQUAL => Reduce(2, NT_extenum_extension_target, yy_action_223) + T_ASYNC => Shift(yy_state_65) + T_UNDERSCORE => Shift(yy_state_70) + T_AMPER => Shift(yy_state_71) + T_PACKAGE_NAME => Shift(yy_state_73) + T_UIDENT => Shift(yy_state_80) + T_LPAREN => Shift(yy_state_84) + NT_simple_type => Shift(yy_state_110) + NT_type_ => Shift(yy_state_1760) _ => Error } } -fn yy_state_1381(_lookahead : YYSymbol) -> YYDecision { - match _lookahead { - T_ATTRIBUTE => Shift(yy_state_946) - NT_enum_constructor => Shift(yy_state_1000) - NT_non_empty_list_attribute_ => Shift(yy_state_1004) - T_UIDENT => Shift(yy_state_1024) - NT_non_empty_list_semis_enum_constructor_ => Shift(yy_state_1027) - NT_list_semis_enum_constructor_ => Shift(yy_state_1382) - T_RBRACE => Reduce(0, NT_list_semis_enum_constructor_, yy_action_317) - _ => Error - } +fn yy_state_1760(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(6, NT_val_header, yy_action_186) } -fn yy_state_1382(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1761(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RBRACE => Shift(yy_state_1383) + T_LPAREN => Shift(yy_state_157) + NT_parameters => Shift(yy_state_1315) + NT_option_parameters_ => Shift(yy_state_1762) + T_EOF | T_RAISE | T_SEMI | T_THIN_ARROW | T_NORAISE => Reduce(0, NT_option_parameters_, yy_action_336) _ => Error } } -fn yy_state_1383(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1762(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_DERIVE => Shift(yy_state_1171) - NT_deriving_directive_list => Shift(yy_state_1384) - T_EOF | T_SEMI => Reduce(0, NT_deriving_directive_list, yy_action_233) + NT_error_annotation => Shift(yy_state_63) + T_THIN_ARROW => Shift(yy_state_64) + T_NORAISE => Shift(yy_state_91) + T_RAISE => Shift(yy_state_92) + NT_func_return_type => Shift(yy_state_1763) + T_EOF | T_SEMI => Reduce(0, NT_func_return_type, yy_action_1023) _ => Error } } -fn yy_state_1384(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(10, NT_structure_item, yy_action_170) +fn yy_state_1763(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(5, NT_declare_fun_header, yy_action_185) } -fn yy_state_1385(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1764(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_UIDENT => Shift(yy_state_1386) + T_FN => Shift(yy_state_1627) + NT_fun_header_generic => Shift(yy_state_1765) _ => Error } } -fn yy_state_1386(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1765(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_COLON => Shift(yy_state_1387) - T_EQUAL => Reduce(5, NT_val_header, yy_action_169) + T_LPAREN => Shift(yy_state_157) + NT_parameters => Shift(yy_state_1315) + NT_option_parameters_ => Shift(yy_state_1766) + T_EOF | T_RAISE | T_SEMI | T_THIN_ARROW | T_NORAISE => Reduce(0, NT_option_parameters_, yy_action_336) _ => Error } } -fn yy_state_1387(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1766(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_ASYNC => Shift(yy_state_52) - T_UNDERSCORE => Shift(yy_state_57) - T_AMPER => Shift(yy_state_58) - T_PACKAGE_NAME => Shift(yy_state_60) - T_UIDENT => Shift(yy_state_67) - T_LPAREN => Shift(yy_state_71) - NT_simple_type => Shift(yy_state_97) - NT_type_ => Shift(yy_state_1388) + NT_error_annotation => Shift(yy_state_63) + T_THIN_ARROW => Shift(yy_state_64) + T_NORAISE => Shift(yy_state_91) + T_RAISE => Shift(yy_state_92) + NT_func_return_type => Shift(yy_state_1767) + T_EOF | T_SEMI => Reduce(0, NT_func_return_type, yy_action_1023) _ => Error } } -fn yy_state_1388(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(7, NT_val_header, yy_action_168) +fn yy_state_1767(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(6, NT_declare_fun_header, yy_action_184) } -fn yy_state_1389(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1768(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LIDENT => Shift(yy_state_1390) + T_LPAREN => Shift(yy_state_157) + NT_parameters => Shift(yy_state_1315) + NT_option_parameters_ => Shift(yy_state_1769) + T_EOF | T_RAISE | T_SEMI | T_THIN_ARROW | T_NORAISE => Reduce(0, NT_option_parameters_, yy_action_336) _ => Error } } -fn yy_state_1390(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1769(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_COLON => Shift(yy_state_1391) - T_EQUAL => Reduce(5, NT_val_header, yy_action_167) + NT_error_annotation => Shift(yy_state_63) + T_THIN_ARROW => Shift(yy_state_64) + T_NORAISE => Shift(yy_state_91) + T_RAISE => Shift(yy_state_92) + NT_func_return_type => Shift(yy_state_1770) + T_EOF | T_SEMI => Reduce(0, NT_func_return_type, yy_action_1023) _ => Error } } -fn yy_state_1391(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1770(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(4, NT_declare_fun_header, yy_action_183) +} + +fn yy_state_1771(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_ASYNC => Shift(yy_state_52) - T_UNDERSCORE => Shift(yy_state_57) - T_AMPER => Shift(yy_state_58) - T_PACKAGE_NAME => Shift(yy_state_60) - T_UIDENT => Shift(yy_state_67) - T_LPAREN => Shift(yy_state_71) - NT_simple_type => Shift(yy_state_97) - NT_type_ => Shift(yy_state_1392) + T_FN => Shift(yy_state_1627) + NT_fun_header_generic => Shift(yy_state_1772) _ => Error } } -fn yy_state_1392(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(7, NT_val_header, yy_action_166) -} - -fn yy_state_1393(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1772(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LPAREN => Shift(yy_state_143) - NT_parameters => Shift(yy_state_1076) - NT_option_parameters_ => Shift(yy_state_1394) - T_EOF | T_RAISE | T_SEMI | T_THIN_ARROW | T_NORAISE => Reduce(0, NT_option_parameters_, yy_action_275) + T_LPAREN => Shift(yy_state_157) + NT_parameters => Shift(yy_state_1315) + NT_option_parameters_ => Shift(yy_state_1773) + T_EOF | T_RAISE | T_SEMI | T_THIN_ARROW | T_NORAISE => Reduce(0, NT_option_parameters_, yy_action_336) _ => Error } } -fn yy_state_1394(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1773(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_error_annotation => Shift(yy_state_50) - T_THIN_ARROW => Shift(yy_state_51) - T_NORAISE => Shift(yy_state_78) - T_RAISE => Shift(yy_state_79) - NT_func_return_type => Shift(yy_state_1395) - T_EOF | T_SEMI => Reduce(0, NT_func_return_type, yy_action_862) + NT_error_annotation => Shift(yy_state_63) + T_THIN_ARROW => Shift(yy_state_64) + T_NORAISE => Shift(yy_state_91) + T_RAISE => Shift(yy_state_92) + NT_func_return_type => Shift(yy_state_1774) + T_EOF | T_SEMI => Reduce(0, NT_func_return_type, yy_action_1023) _ => Error } } -fn yy_state_1395(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(6, NT_declare_fun_header, yy_action_165) +fn yy_state_1774(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(5, NT_declare_fun_header, yy_action_182) } -fn yy_state_1396(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1775(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_FN => Shift(yy_state_1313) - NT_fun_header_generic => Shift(yy_state_1397) + T_FN => Shift(yy_state_1627) + T_ENUM => Shift(yy_state_1776) + T_STRUCT => Shift(yy_state_1779) + T_SUBERROR => Shift(yy_state_1782) + T_TYPE => Shift(yy_state_1784) + T_USING => Shift(yy_state_1787) + T_ENUMVIEW => Shift(yy_state_1792) + T_IMPL => Shift(yy_state_1807) + T_TEST => Shift(yy_state_1832) + T_TRAIT => Shift(yy_state_1836) + T_EXTENUM => Shift(yy_state_1842) + T_CONST => Shift(yy_state_1855) + T_LET => Shift(yy_state_1859) + T_EXTERN => Shift(yy_state_1866) + T_DECLARE => Shift(yy_state_1873) + T_PUB => Shift(yy_state_2018) + T_PRIV => Shift(yy_state_2120) + NT_fun_header_generic => Shift(yy_state_2221) + T_ASYNC => Shift(yy_state_2224) _ => Error } } -fn yy_state_1397(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1776(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LPAREN => Shift(yy_state_143) - NT_parameters => Shift(yy_state_1076) - NT_option_parameters_ => Shift(yy_state_1398) - T_EOF | T_RAISE | T_SEMI | T_THIN_ARROW | T_NORAISE => Reduce(0, NT_option_parameters_, yy_action_275) + T_UIDENT => Shift(yy_state_1777) _ => Error } } -fn yy_state_1398(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1777(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_error_annotation => Shift(yy_state_50) - T_THIN_ARROW => Shift(yy_state_51) - T_NORAISE => Shift(yy_state_78) - T_RAISE => Shift(yy_state_79) - NT_func_return_type => Shift(yy_state_1399) - T_EOF | T_SEMI => Reduce(0, NT_func_return_type, yy_action_862) + T_LBRACKET => Shift(yy_state_1172) + NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__ => Shift(yy_state_1183) + NT_optional_type_parameters_no_constraints => Shift(yy_state_1778) + T_LBRACE => Reduce(0, NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__, yy_action_415) _ => Error } } -fn yy_state_1399(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(7, NT_declare_fun_header, yy_action_164) +fn yy_state_1778(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(4, NT_enum_header, yy_action_181) } -fn yy_state_1400(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1779(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_FN => Shift(yy_state_1313) - T_SUBERROR => Shift(yy_state_1401) - T_TYPE => Shift(yy_state_1403) - T_IMPL => Shift(yy_state_1406) - T_TRAIT => Shift(yy_state_1411) - T_EXTENUM => Shift(yy_state_1417) - T_CONST => Shift(yy_state_1430) - T_LET => Shift(yy_state_1434) - NT_fun_header_generic => Shift(yy_state_1438) - T_ASYNC => Shift(yy_state_1441) + T_UIDENT => Shift(yy_state_1780) _ => Error } } -fn yy_state_1401(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1780(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_UIDENT => Shift(yy_state_1402) + T_LBRACKET => Shift(yy_state_1172) + NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__ => Shift(yy_state_1183) + NT_optional_type_parameters_no_constraints => Shift(yy_state_1781) + T_LPAREN | T_LBRACE => Reduce(0, NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__, yy_action_415) _ => Error } } -fn yy_state_1402(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(4, NT_suberror_header, yy_action_163) +fn yy_state_1781(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(4, NT_struct_header, yy_action_180) } -fn yy_state_1403(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1782(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_UIDENT => Shift(yy_state_1404) + T_UIDENT => Shift(yy_state_1783) _ => Error } } -fn yy_state_1404(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1783(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_suberror_header, yy_action_179) +} + +fn yy_state_1784(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACKET => Shift(yy_state_950) - NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__ => Shift(yy_state_961) - NT_optional_type_parameters_no_constraints => Shift(yy_state_1405) - T_EOF | T_DERIVE | T_EQUAL | T_SEMI => Reduce(0, NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__, yy_action_347) + T_UIDENT => Shift(yy_state_1785) _ => Error } } -fn yy_state_1405(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(5, NT_type_header, yy_action_162) +fn yy_state_1785(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_LBRACKET => Shift(yy_state_1172) + NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__ => Shift(yy_state_1183) + NT_optional_type_parameters_no_constraints => Shift(yy_state_1786) + T_EOF | T_DERIVE | T_EQUAL | T_SEMI => Reduce(0, NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__, yy_action_415) + _ => Error + } } -fn yy_state_1406(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1786(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(4, NT_type_header, yy_action_178) +} + +fn yy_state_1787(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_type_parameters => Shift(yy_state_996) - NT_option_type_parameters_ => Shift(yy_state_1036) - T_LBRACKET => Shift(yy_state_1037) - NT_optional_type_parameters => Shift(yy_state_1407) - T_UIDENT | T_AMPER | T_PACKAGE_NAME => Reduce(0, NT_option_type_parameters_, yy_action_319) + T_PACKAGE_NAME => Shift(yy_state_1788) _ => Error } } -fn yy_state_1407(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1788(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_AMPER => Shift(yy_state_19) - T_PACKAGE_NAME => Shift(yy_state_21) - T_UIDENT => Shift(yy_state_24) - NT_qual_ident_ty => Shift(yy_state_25) - NT_type_name => Shift(yy_state_1408) + T_LBRACE => Shift(yy_state_1789) _ => Error } } -fn yy_state_1408(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1789(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_FOR => Shift(yy_state_1409) + NT_using_binder => Shift(yy_state_1195) + NT_non_empty_list_commas_rev_using_binder_ => Shift(yy_state_1196) + T_TRAIT => Shift(yy_state_1200) + T_TYPE => Shift(yy_state_1204) + T_UIDENT => Shift(yy_state_1208) + T_EXTEND => Shift(yy_state_1211) + T_LIDENT => Shift(yy_state_1215) + NT_non_empty_list_commas_using_binder_ => Shift(yy_state_1219) + NT_list_commas_using_binder_ => Shift(yy_state_1790) + T_RBRACE => Reduce(0, NT_list_commas_using_binder_, yy_action_401) _ => Error } } -fn yy_state_1409(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1790(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_ASYNC => Shift(yy_state_52) - T_UNDERSCORE => Shift(yy_state_57) - T_AMPER => Shift(yy_state_58) - T_PACKAGE_NAME => Shift(yy_state_60) - T_UIDENT => Shift(yy_state_67) - T_LPAREN => Shift(yy_state_71) - NT_simple_type => Shift(yy_state_97) - NT_type_ => Shift(yy_state_1410) + T_RBRACE => Shift(yy_state_1791) _ => Error } } -fn yy_state_1410(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(7, NT_structure_item, yy_action_161) +fn yy_state_1791(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(6, NT_structure_item, yy_action_177) } -fn yy_state_1411(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1792(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_UIDENT => Shift(yy_state_1412) + NT_type_parameters => Shift(yy_state_1223) + NT_option_type_parameters_ => Shift(yy_state_1266) + T_LBRACKET => Shift(yy_state_1267) + NT_optional_type_parameters => Shift(yy_state_1793) + T_UIDENT => Reduce(0, NT_option_type_parameters_, yy_action_383) _ => Error } } -fn yy_state_1412(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1793(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_COLON => Shift(yy_state_1081) - NT_option_preceded_COLON_separated_nonempty_list_PLUS_tvar_constraint___ => Shift(yy_state_1413) - T_LBRACE => Reduce(0, NT_option_preceded_COLON_separated_nonempty_list_PLUS_tvar_constraint___, yy_action_272) + T_UIDENT => Shift(yy_state_1794) _ => Error } } -fn yy_state_1413(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1794(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACE => Shift(yy_state_1414) + T_LBRACE => Shift(yy_state_1795) _ => Error } } -fn yy_state_1414(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1795(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_ATTRIBUTE => Shift(yy_state_946) - NT_trait_method_decl => Shift(yy_state_1085) - NT_non_empty_list_attribute_ => Shift(yy_state_1089) - T_FN => Shift(yy_state_1124) - NT_trait_method_fn_header => Shift(yy_state_1126) - T_ASYNC => Shift(yy_state_1133) - NT_non_empty_list_semis_trait_method_decl_ => Shift(yy_state_1141) - NT_list_semis_trait_method_decl_ => Shift(yy_state_1415) - T_LIDENT => Reduce(0, NT_trait_method_fn_header, yy_action_269) - T_RBRACE => Reduce(0, NT_list_semis_trait_method_decl_, yy_action_268) + T_ATTRIBUTE => Shift(yy_state_1168) + NT_enum_constructor => Shift(yy_state_1227) + NT_non_empty_list_attribute_ => Shift(yy_state_1231) + T_UIDENT => Shift(yy_state_1251) + NT_non_empty_list_semis_enum_constructor_ => Shift(yy_state_1254) + NT_list_semis_enum_constructor_ => Shift(yy_state_1796) + T_RBRACE => Reduce(0, NT_list_semis_enum_constructor_, yy_action_381) _ => Error } } -fn yy_state_1415(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1796(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RBRACE => Shift(yy_state_1416) + T_RBRACE => Shift(yy_state_1797) _ => Error } } -fn yy_state_1416(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(8, NT_structure_item, yy_action_160) -} - -fn yy_state_1417(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1797(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_PACKAGE_NAME => Shift(yy_state_1163) - NT_extenum_extension_target => Shift(yy_state_1418) - T_UIDENT => Shift(yy_state_1424) + T_FOR => Shift(yy_state_1798) _ => Error } } -fn yy_state_1418(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1798(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_PLUS_EQUAL => Shift(yy_state_1419) + T_ASYNC => Shift(yy_state_65) + T_UNDERSCORE => Shift(yy_state_70) + T_AMPER => Shift(yy_state_71) + T_PACKAGE_NAME => Shift(yy_state_73) + T_UIDENT => Shift(yy_state_80) + T_LPAREN => Shift(yy_state_84) + NT_simple_type => Shift(yy_state_110) + NT_type_ => Shift(yy_state_1799) _ => Error } } -fn yy_state_1419(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1799(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACE => Shift(yy_state_1420) + T_WITH => Shift(yy_state_1800) _ => Error } } -fn yy_state_1420(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1800(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_ATTRIBUTE => Shift(yy_state_946) - NT_enum_constructor => Shift(yy_state_1000) - NT_non_empty_list_attribute_ => Shift(yy_state_1004) - T_UIDENT => Shift(yy_state_1024) - NT_non_empty_list_semis_enum_constructor_ => Shift(yy_state_1027) - NT_list_semis_enum_constructor_ => Shift(yy_state_1421) - T_RBRACE => Reduce(0, NT_list_semis_enum_constructor_, yy_action_317) + T_EXTEND => Shift(yy_state_1801) + T_LIDENT => Shift(yy_state_1804) _ => Error } } -fn yy_state_1421(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1801(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RBRACE => Shift(yy_state_1422) + T_LPAREN => Shift(yy_state_157) + NT_parameters => Shift(yy_state_1802) _ => Error } } -fn yy_state_1422(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1802(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_DERIVE => Shift(yy_state_1171) - NT_deriving_directive_list => Shift(yy_state_1423) - T_EOF | T_SEMI => Reduce(0, NT_deriving_directive_list, yy_action_233) + T_LBRACE => Shift(yy_state_133) + NT_block_expr => Shift(yy_state_1803) _ => Error } } -fn yy_state_1423(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(9, NT_structure_item, yy_action_159) +fn yy_state_1803(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(13, NT_structure_item, yy_action_176) } -fn yy_state_1424(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1804(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACKET => Shift(yy_state_950) - NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__ => Shift(yy_state_961) - NT_optional_type_parameters_no_constraints => Shift(yy_state_1425) - T_PLUS_EQUAL | T_LBRACE => Reduce(0, NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__, yy_action_347) + T_LPAREN => Shift(yy_state_157) + NT_parameters => Shift(yy_state_1805) _ => Error } } -fn yy_state_1425(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1805(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACE => Shift(yy_state_1426) - T_PLUS_EQUAL => Reduce(2, NT_extenum_extension_target, yy_action_223) + T_LBRACE => Shift(yy_state_133) + NT_block_expr => Shift(yy_state_1806) _ => Error } } -fn yy_state_1426(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1806(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(13, NT_structure_item, yy_action_175) +} + +fn yy_state_1807(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_ATTRIBUTE => Shift(yy_state_946) - NT_enum_constructor => Shift(yy_state_1000) - NT_non_empty_list_attribute_ => Shift(yy_state_1004) - T_UIDENT => Shift(yy_state_1024) - NT_non_empty_list_semis_enum_constructor_ => Shift(yy_state_1027) - NT_list_semis_enum_constructor_ => Shift(yy_state_1427) - T_RBRACE => Reduce(0, NT_list_semis_enum_constructor_, yy_action_317) + NT_type_parameters => Shift(yy_state_1223) + NT_option_type_parameters_ => Shift(yy_state_1266) + T_LBRACKET => Shift(yy_state_1267) + NT_optional_type_parameters => Shift(yy_state_1808) + T_UIDENT | T_AMPER | T_PACKAGE_NAME => Reduce(0, NT_option_type_parameters_, yy_action_383) _ => Error } } -fn yy_state_1427(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1808(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RBRACE => Shift(yy_state_1428) + T_AMPER => Shift(yy_state_20) + T_PACKAGE_NAME => Shift(yy_state_22) + T_UIDENT => Shift(yy_state_25) + NT_qual_ident_ty => Shift(yy_state_26) + NT_type_name => Shift(yy_state_1809) _ => Error } } -fn yy_state_1428(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1809(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_DERIVE => Shift(yy_state_1171) - NT_deriving_directive_list => Shift(yy_state_1429) - T_EOF | T_SEMI => Reduce(0, NT_deriving_directive_list, yy_action_233) + T_WITH => Shift(yy_state_1810) + T_FOR => Shift(yy_state_1820) _ => Error } } -fn yy_state_1429(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(9, NT_structure_item, yy_action_158) +fn yy_state_1810(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_FN => Shift(yy_state_1286) + NT_impl_optional_fn => Shift(yy_state_1811) + T_LIDENT | T_EXTEND => Reduce(0, NT_impl_optional_fn, yy_action_348) + _ => Error + } } -fn yy_state_1430(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1811(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_UIDENT => Shift(yy_state_1431) + T_EXTEND => Shift(yy_state_1812) + T_LIDENT => Shift(yy_state_1816) _ => Error } } -fn yy_state_1431(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1812(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_COLON => Shift(yy_state_1432) - T_EQUAL => Reduce(4, NT_val_header, yy_action_157) + T_LPAREN => Shift(yy_state_157) + NT_parameters => Shift(yy_state_1813) _ => Error } } -fn yy_state_1432(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1813(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_ASYNC => Shift(yy_state_52) - T_UNDERSCORE => Shift(yy_state_57) - T_AMPER => Shift(yy_state_58) - T_PACKAGE_NAME => Shift(yy_state_60) - T_UIDENT => Shift(yy_state_67) - T_LPAREN => Shift(yy_state_71) - NT_simple_type => Shift(yy_state_97) - NT_type_ => Shift(yy_state_1433) + NT_error_annotation => Shift(yy_state_63) + T_THIN_ARROW => Shift(yy_state_64) + T_NORAISE => Shift(yy_state_91) + T_RAISE => Shift(yy_state_92) + NT_func_return_type => Shift(yy_state_1814) + T_EQUAL | T_LBRACE => Reduce(0, NT_func_return_type, yy_action_1023) _ => Error } } -fn yy_state_1433(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(6, NT_val_header, yy_action_156) +fn yy_state_1814(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_LBRACE => Shift(yy_state_133) + T_EQUAL => Shift(yy_state_1293) + NT_block_expr => Shift(yy_state_1295) + NT_impl_body => Shift(yy_state_1815) + _ => Error + } } -fn yy_state_1434(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1815(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(10, NT_structure_item, yy_action_174) +} + +fn yy_state_1816(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LIDENT => Shift(yy_state_1435) + T_LPAREN => Shift(yy_state_157) + NT_parameters => Shift(yy_state_1817) _ => Error } } -fn yy_state_1435(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1817(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_COLON => Shift(yy_state_1436) - T_EQUAL => Reduce(4, NT_val_header, yy_action_155) + NT_error_annotation => Shift(yy_state_63) + T_THIN_ARROW => Shift(yy_state_64) + T_NORAISE => Shift(yy_state_91) + T_RAISE => Shift(yy_state_92) + NT_func_return_type => Shift(yy_state_1818) + T_EQUAL | T_LBRACE => Reduce(0, NT_func_return_type, yy_action_1023) _ => Error } } -fn yy_state_1436(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1818(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_ASYNC => Shift(yy_state_52) - T_UNDERSCORE => Shift(yy_state_57) - T_AMPER => Shift(yy_state_58) - T_PACKAGE_NAME => Shift(yy_state_60) - T_UIDENT => Shift(yy_state_67) - T_LPAREN => Shift(yy_state_71) - NT_simple_type => Shift(yy_state_97) - NT_type_ => Shift(yy_state_1437) + T_LBRACE => Shift(yy_state_133) + T_EQUAL => Shift(yy_state_1293) + NT_block_expr => Shift(yy_state_1295) + NT_impl_body => Shift(yy_state_1819) _ => Error } } -fn yy_state_1437(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(6, NT_val_header, yy_action_154) +fn yy_state_1819(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(10, NT_structure_item, yy_action_173) } -fn yy_state_1438(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1820(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LPAREN => Shift(yy_state_143) - NT_parameters => Shift(yy_state_1076) - NT_option_parameters_ => Shift(yy_state_1439) - T_EOF | T_RAISE | T_SEMI | T_THIN_ARROW | T_NORAISE => Reduce(0, NT_option_parameters_, yy_action_275) + T_ASYNC => Shift(yy_state_65) + T_UNDERSCORE => Shift(yy_state_70) + T_AMPER => Shift(yy_state_71) + T_PACKAGE_NAME => Shift(yy_state_73) + T_UIDENT => Shift(yy_state_80) + T_LPAREN => Shift(yy_state_84) + NT_simple_type => Shift(yy_state_110) + NT_type_ => Shift(yy_state_1821) _ => Error } } -fn yy_state_1439(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1821(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_error_annotation => Shift(yy_state_50) - T_THIN_ARROW => Shift(yy_state_51) - T_NORAISE => Shift(yy_state_78) - T_RAISE => Shift(yy_state_79) - NT_func_return_type => Shift(yy_state_1440) - T_EOF | T_SEMI => Reduce(0, NT_func_return_type, yy_action_862) + T_WITH => Shift(yy_state_1822) + T_EOF | T_SEMI => Reduce(6, NT_structure_item, yy_action_172) _ => Error } } -fn yy_state_1440(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(5, NT_declare_fun_header, yy_action_153) -} - -fn yy_state_1441(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1822(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_FN => Shift(yy_state_1313) - NT_fun_header_generic => Shift(yy_state_1442) + T_FN => Shift(yy_state_1286) + NT_impl_optional_fn => Shift(yy_state_1823) + T_LIDENT | T_EXTEND => Reduce(0, NT_impl_optional_fn, yy_action_348) _ => Error } } -fn yy_state_1442(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1823(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LPAREN => Shift(yy_state_143) - NT_parameters => Shift(yy_state_1076) - NT_option_parameters_ => Shift(yy_state_1443) - T_EOF | T_RAISE | T_SEMI | T_THIN_ARROW | T_NORAISE => Reduce(0, NT_option_parameters_, yy_action_275) + T_EXTEND => Shift(yy_state_1824) + T_LIDENT => Shift(yy_state_1828) _ => Error } } -fn yy_state_1443(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1824(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_error_annotation => Shift(yy_state_50) - T_THIN_ARROW => Shift(yy_state_51) - T_NORAISE => Shift(yy_state_78) - T_RAISE => Shift(yy_state_79) - NT_func_return_type => Shift(yy_state_1444) - T_EOF | T_SEMI => Reduce(0, NT_func_return_type, yy_action_862) + T_LPAREN => Shift(yy_state_157) + NT_parameters => Shift(yy_state_1825) _ => Error } } -fn yy_state_1444(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(6, NT_declare_fun_header, yy_action_152) -} - -fn yy_state_1445(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1825(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LPAREN => Shift(yy_state_143) - NT_parameters => Shift(yy_state_1076) - NT_option_parameters_ => Shift(yy_state_1446) - T_EOF | T_RAISE | T_SEMI | T_THIN_ARROW | T_NORAISE => Reduce(0, NT_option_parameters_, yy_action_275) + NT_error_annotation => Shift(yy_state_63) + T_THIN_ARROW => Shift(yy_state_64) + T_NORAISE => Shift(yy_state_91) + T_RAISE => Shift(yy_state_92) + NT_func_return_type => Shift(yy_state_1826) + T_EQUAL | T_LBRACE => Reduce(0, NT_func_return_type, yy_action_1023) _ => Error } } -fn yy_state_1446(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1826(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_error_annotation => Shift(yy_state_50) - T_THIN_ARROW => Shift(yy_state_51) - T_NORAISE => Shift(yy_state_78) - T_RAISE => Shift(yy_state_79) - NT_func_return_type => Shift(yy_state_1447) - T_EOF | T_SEMI => Reduce(0, NT_func_return_type, yy_action_862) + T_LBRACE => Shift(yy_state_133) + T_EQUAL => Shift(yy_state_1293) + NT_block_expr => Shift(yy_state_1295) + NT_impl_body => Shift(yy_state_1827) _ => Error } } -fn yy_state_1447(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(4, NT_declare_fun_header, yy_action_151) +fn yy_state_1827(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(12, NT_structure_item, yy_action_171) } -fn yy_state_1448(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1828(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_FN => Shift(yy_state_1313) - NT_fun_header_generic => Shift(yy_state_1449) + T_LPAREN => Shift(yy_state_157) + NT_parameters => Shift(yy_state_1829) _ => Error } } -fn yy_state_1449(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1829(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LPAREN => Shift(yy_state_143) - NT_parameters => Shift(yy_state_1076) - NT_option_parameters_ => Shift(yy_state_1450) - T_EOF | T_RAISE | T_SEMI | T_THIN_ARROW | T_NORAISE => Reduce(0, NT_option_parameters_, yy_action_275) + NT_error_annotation => Shift(yy_state_63) + T_THIN_ARROW => Shift(yy_state_64) + T_NORAISE => Shift(yy_state_91) + T_RAISE => Shift(yy_state_92) + NT_func_return_type => Shift(yy_state_1830) + T_EQUAL | T_LBRACE => Reduce(0, NT_func_return_type, yy_action_1023) _ => Error } } -fn yy_state_1450(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1830(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_error_annotation => Shift(yy_state_50) - T_THIN_ARROW => Shift(yy_state_51) - T_NORAISE => Shift(yy_state_78) - T_RAISE => Shift(yy_state_79) - NT_func_return_type => Shift(yy_state_1451) - T_EOF | T_SEMI => Reduce(0, NT_func_return_type, yy_action_862) + T_LBRACE => Shift(yy_state_133) + T_EQUAL => Shift(yy_state_1293) + NT_block_expr => Shift(yy_state_1295) + NT_impl_body => Shift(yy_state_1831) _ => Error } } -fn yy_state_1451(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(5, NT_declare_fun_header, yy_action_150) +fn yy_state_1831(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(12, NT_structure_item, yy_action_170) } -fn yy_state_1452(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1832(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_FN => Shift(yy_state_1313) - T_ENUM => Shift(yy_state_1453) - T_STRUCT => Shift(yy_state_1456) - T_SUBERROR => Shift(yy_state_1459) - T_TYPE => Shift(yy_state_1461) - T_USING => Shift(yy_state_1464) - T_ENUMVIEW => Shift(yy_state_1469) - T_IMPL => Shift(yy_state_1481) - T_TEST => Shift(yy_state_1498) - T_TRAIT => Shift(yy_state_1502) - T_EXTENUM => Shift(yy_state_1508) - T_CONST => Shift(yy_state_1521) - T_LET => Shift(yy_state_1525) - T_EXTERN => Shift(yy_state_1529) - T_DECLARE => Shift(yy_state_1536) - T_PUB => Shift(yy_state_1672) - T_PRIV => Shift(yy_state_1760) - NT_fun_header_generic => Shift(yy_state_1847) - T_ASYNC => Shift(yy_state_1850) + T_STRING => Shift(yy_state_1313) + NT_option_loced_string_ => Shift(yy_state_1833) + T_LPAREN | T_LBRACE => Reduce(0, NT_option_loced_string_, yy_action_339) _ => Error } } -fn yy_state_1453(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1833(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_UIDENT => Shift(yy_state_1454) + T_LPAREN => Shift(yy_state_157) + NT_parameters => Shift(yy_state_1315) + NT_option_parameters_ => Shift(yy_state_1834) + T_LBRACE => Reduce(0, NT_option_parameters_, yy_action_336) _ => Error } } -fn yy_state_1454(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1834(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACKET => Shift(yy_state_950) - NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__ => Shift(yy_state_961) - NT_optional_type_parameters_no_constraints => Shift(yy_state_1455) - T_LBRACE => Reduce(0, NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__, yy_action_347) + T_LBRACE => Shift(yy_state_133) + NT_block_expr => Shift(yy_state_1835) _ => Error } } -fn yy_state_1455(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(4, NT_enum_header, yy_action_149) +fn yy_state_1835(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(5, NT_structure_item, yy_action_169) } -fn yy_state_1456(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1836(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_UIDENT => Shift(yy_state_1457) + T_UIDENT => Shift(yy_state_1837) _ => Error } } -fn yy_state_1457(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1837(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACKET => Shift(yy_state_950) - NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__ => Shift(yy_state_961) - NT_optional_type_parameters_no_constraints => Shift(yy_state_1458) - T_LPAREN | T_LBRACE => Reduce(0, NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__, yy_action_347) + T_COLON => Shift(yy_state_1320) + NT_option_preceded_COLON_separated_nonempty_list_PLUS_tvar_constraint___ => Shift(yy_state_1838) + T_LBRACE => Reduce(0, NT_option_preceded_COLON_separated_nonempty_list_PLUS_tvar_constraint___, yy_action_333) _ => Error } } -fn yy_state_1458(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(4, NT_struct_header, yy_action_148) -} - -fn yy_state_1459(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1838(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_UIDENT => Shift(yy_state_1460) + T_LBRACE => Shift(yy_state_1839) _ => Error } } -fn yy_state_1460(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_suberror_header, yy_action_147) +fn yy_state_1839(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_ATTRIBUTE => Shift(yy_state_1168) + NT_trait_method_decl => Shift(yy_state_1324) + NT_non_empty_list_attribute_ => Shift(yy_state_1328) + T_FN => Shift(yy_state_1381) + NT_trait_method_fn_header => Shift(yy_state_1383) + T_ASYNC => Shift(yy_state_1396) + NT_non_empty_list_semis_trait_method_decl_ => Shift(yy_state_1410) + NT_list_semis_trait_method_decl_ => Shift(yy_state_1840) + T_LIDENT | T_EXTEND => Reduce(0, NT_trait_method_fn_header, yy_action_330) + T_RBRACE => Reduce(0, NT_list_semis_trait_method_decl_, yy_action_329) + _ => Error + } } -fn yy_state_1461(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1840(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_UIDENT => Shift(yy_state_1462) + T_RBRACE => Shift(yy_state_1841) _ => Error } } -fn yy_state_1462(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1841(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(7, NT_structure_item, yy_action_168) +} + +fn yy_state_1842(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACKET => Shift(yy_state_950) - NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__ => Shift(yy_state_961) - NT_optional_type_parameters_no_constraints => Shift(yy_state_1463) - T_EOF | T_DERIVE | T_EQUAL | T_SEMI => Reduce(0, NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__, yy_action_347) + T_PACKAGE_NAME => Shift(yy_state_1432) + NT_extenum_extension_target => Shift(yy_state_1843) + T_UIDENT => Shift(yy_state_1849) _ => Error } } -fn yy_state_1463(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(4, NT_type_header, yy_action_146) +fn yy_state_1843(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_PLUS_EQUAL => Shift(yy_state_1844) + _ => Error + } } -fn yy_state_1464(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1844(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_PACKAGE_NAME => Shift(yy_state_1465) + T_LBRACE => Shift(yy_state_1845) _ => Error } } -fn yy_state_1465(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1845(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACE => Shift(yy_state_1466) + T_ATTRIBUTE => Shift(yy_state_1168) + NT_enum_constructor => Shift(yy_state_1227) + NT_non_empty_list_attribute_ => Shift(yy_state_1231) + T_UIDENT => Shift(yy_state_1251) + NT_non_empty_list_semis_enum_constructor_ => Shift(yy_state_1254) + NT_list_semis_enum_constructor_ => Shift(yy_state_1846) + T_RBRACE => Reduce(0, NT_list_semis_enum_constructor_, yy_action_381) _ => Error } } -fn yy_state_1466(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1846(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_using_binder => Shift(yy_state_973) - NT_non_empty_list_commas_rev_using_binder_ => Shift(yy_state_974) - T_TRAIT => Shift(yy_state_978) - T_TYPE => Shift(yy_state_982) - T_UIDENT => Shift(yy_state_986) - T_LIDENT => Shift(yy_state_989) - NT_non_empty_list_commas_using_binder_ => Shift(yy_state_992) - NT_list_commas_using_binder_ => Shift(yy_state_1467) - T_RBRACE => Reduce(0, NT_list_commas_using_binder_, yy_action_333) + T_RBRACE => Shift(yy_state_1847) _ => Error } } -fn yy_state_1467(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1847(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RBRACE => Shift(yy_state_1468) + T_DERIVE => Shift(yy_state_1440) + NT_deriving_directive_list => Shift(yy_state_1848) + T_EOF | T_SEMI => Reduce(0, NT_deriving_directive_list, yy_action_288) _ => Error } } -fn yy_state_1468(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(6, NT_structure_item, yy_action_145) +fn yy_state_1848(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(8, NT_structure_item, yy_action_167) } -fn yy_state_1469(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1849(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_type_parameters => Shift(yy_state_996) - NT_option_type_parameters_ => Shift(yy_state_1036) - T_LBRACKET => Shift(yy_state_1037) - NT_optional_type_parameters => Shift(yy_state_1470) - T_UIDENT => Reduce(0, NT_option_type_parameters_, yy_action_319) + T_LBRACKET => Shift(yy_state_1172) + NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__ => Shift(yy_state_1183) + NT_optional_type_parameters_no_constraints => Shift(yy_state_1850) + T_PLUS_EQUAL | T_LBRACE => Reduce(0, NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__, yy_action_415) _ => Error } } -fn yy_state_1470(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1850(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_UIDENT => Shift(yy_state_1471) + T_LBRACE => Shift(yy_state_1851) + T_PLUS_EQUAL => Reduce(2, NT_extenum_extension_target, yy_action_278) _ => Error } } -fn yy_state_1471(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1851(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACE => Shift(yy_state_1472) + T_ATTRIBUTE => Shift(yy_state_1168) + NT_enum_constructor => Shift(yy_state_1227) + NT_non_empty_list_attribute_ => Shift(yy_state_1231) + T_UIDENT => Shift(yy_state_1251) + NT_non_empty_list_semis_enum_constructor_ => Shift(yy_state_1254) + NT_list_semis_enum_constructor_ => Shift(yy_state_1852) + T_RBRACE => Reduce(0, NT_list_semis_enum_constructor_, yy_action_381) _ => Error } } -fn yy_state_1472(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1852(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_ATTRIBUTE => Shift(yy_state_946) - NT_enum_constructor => Shift(yy_state_1000) - NT_non_empty_list_attribute_ => Shift(yy_state_1004) - T_UIDENT => Shift(yy_state_1024) - NT_non_empty_list_semis_enum_constructor_ => Shift(yy_state_1027) - NT_list_semis_enum_constructor_ => Shift(yy_state_1473) - T_RBRACE => Reduce(0, NT_list_semis_enum_constructor_, yy_action_317) + T_RBRACE => Shift(yy_state_1853) _ => Error } } -fn yy_state_1473(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1853(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RBRACE => Shift(yy_state_1474) + T_DERIVE => Shift(yy_state_1440) + NT_deriving_directive_list => Shift(yy_state_1854) + T_EOF | T_SEMI => Reduce(0, NT_deriving_directive_list, yy_action_288) _ => Error } } -fn yy_state_1474(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1854(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(8, NT_structure_item, yy_action_166) +} + +fn yy_state_1855(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_FOR => Shift(yy_state_1475) + T_UIDENT => Shift(yy_state_1856) _ => Error } } -fn yy_state_1475(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1856(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_ASYNC => Shift(yy_state_52) - T_UNDERSCORE => Shift(yy_state_57) - T_AMPER => Shift(yy_state_58) - T_PACKAGE_NAME => Shift(yy_state_60) - T_UIDENT => Shift(yy_state_67) - T_LPAREN => Shift(yy_state_71) - NT_simple_type => Shift(yy_state_97) - NT_type_ => Shift(yy_state_1476) + T_COLON => Shift(yy_state_1857) + T_EQUAL => Reduce(3, NT_val_header, yy_action_165) _ => Error } } -fn yy_state_1476(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1857(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_WITH => Shift(yy_state_1477) + T_ASYNC => Shift(yy_state_65) + T_UNDERSCORE => Shift(yy_state_70) + T_AMPER => Shift(yy_state_71) + T_PACKAGE_NAME => Shift(yy_state_73) + T_UIDENT => Shift(yy_state_80) + T_LPAREN => Shift(yy_state_84) + NT_simple_type => Shift(yy_state_110) + NT_type_ => Shift(yy_state_1858) _ => Error } } -fn yy_state_1477(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1858(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(5, NT_val_header, yy_action_164) +} + +fn yy_state_1859(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LIDENT => Shift(yy_state_1478) + T_EXTEND => Shift(yy_state_1860) + T_LIDENT => Shift(yy_state_1863) _ => Error } } -fn yy_state_1478(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1860(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LPAREN => Shift(yy_state_143) - NT_parameters => Shift(yy_state_1479) + T_COLON => Shift(yy_state_1861) + T_EQUAL => Reduce(3, NT_val_header, yy_action_163) _ => Error } } -fn yy_state_1479(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1861(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACE => Shift(yy_state_120) - NT_block_expr => Shift(yy_state_1480) + T_ASYNC => Shift(yy_state_65) + T_UNDERSCORE => Shift(yy_state_70) + T_AMPER => Shift(yy_state_71) + T_PACKAGE_NAME => Shift(yy_state_73) + T_UIDENT => Shift(yy_state_80) + T_LPAREN => Shift(yy_state_84) + NT_simple_type => Shift(yy_state_110) + NT_type_ => Shift(yy_state_1862) _ => Error } } -fn yy_state_1480(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(13, NT_structure_item, yy_action_144) +fn yy_state_1862(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(5, NT_val_header, yy_action_162) } -fn yy_state_1481(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1863(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_type_parameters => Shift(yy_state_996) - NT_option_type_parameters_ => Shift(yy_state_1036) - T_LBRACKET => Shift(yy_state_1037) - NT_optional_type_parameters => Shift(yy_state_1482) - T_UIDENT | T_AMPER | T_PACKAGE_NAME => Reduce(0, NT_option_type_parameters_, yy_action_319) + T_COLON => Shift(yy_state_1864) + T_EQUAL => Reduce(3, NT_val_header, yy_action_161) _ => Error } } -fn yy_state_1482(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1864(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_AMPER => Shift(yy_state_19) - T_PACKAGE_NAME => Shift(yy_state_21) - T_UIDENT => Shift(yy_state_24) - NT_qual_ident_ty => Shift(yy_state_25) - NT_type_name => Shift(yy_state_1483) + T_ASYNC => Shift(yy_state_65) + T_UNDERSCORE => Shift(yy_state_70) + T_AMPER => Shift(yy_state_71) + T_PACKAGE_NAME => Shift(yy_state_73) + T_UIDENT => Shift(yy_state_80) + T_LPAREN => Shift(yy_state_84) + NT_simple_type => Shift(yy_state_110) + NT_type_ => Shift(yy_state_1865) _ => Error } } -fn yy_state_1483(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1865(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(5, NT_val_header, yy_action_160) +} + +fn yy_state_1866(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_WITH => Shift(yy_state_1484) - T_FOR => Shift(yy_state_1490) + T_STRING => Shift(yy_state_1867) _ => Error } } -fn yy_state_1484(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1867(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_FN => Shift(yy_state_1056) - NT_option_FN_ => Shift(yy_state_1485) - T_LIDENT => Reduce(0, NT_option_FN_, yy_action_285) + T_FN => Shift(yy_state_1868) _ => Error } } -fn yy_state_1485(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1868(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LIDENT => Shift(yy_state_1486) + NT_type_parameters => Shift(yy_state_1223) + NT_option_type_parameters_ => Shift(yy_state_1266) + T_LBRACKET => Shift(yy_state_1267) + NT_optional_type_parameters => Shift(yy_state_1869) + T_LIDENT | T_UIDENT | T_AMPER | T_PACKAGE_NAME | T_EXTEND => Reduce(0, NT_option_type_parameters_, yy_action_383) _ => Error } } -fn yy_state_1486(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1869(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LPAREN => Shift(yy_state_143) - NT_parameters => Shift(yy_state_1487) + T_AMPER => Shift(yy_state_20) + T_PACKAGE_NAME => Shift(yy_state_22) + T_UIDENT => Shift(yy_state_25) + NT_qual_ident_ty => Shift(yy_state_26) + T_EXTEND => Shift(yy_state_1619) + T_LIDENT => Shift(yy_state_1620) + NT_type_name => Shift(yy_state_1621) + NT_fun_binder => Shift(yy_state_1870) _ => Error } } -fn yy_state_1487(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1870(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_error_annotation => Shift(yy_state_50) - T_THIN_ARROW => Shift(yy_state_51) - T_NORAISE => Shift(yy_state_78) - T_RAISE => Shift(yy_state_79) - NT_func_return_type => Shift(yy_state_1488) - T_EQUAL | T_LBRACE => Reduce(0, NT_func_return_type, yy_action_862) + T_LPAREN => Shift(yy_state_157) + NT_parameters => Shift(yy_state_1315) + NT_option_parameters_ => Shift(yy_state_1871) + T_RAISE | T_EQUAL | T_THIN_ARROW | T_NORAISE => Reduce(0, NT_option_parameters_, yy_action_336) _ => Error } } -fn yy_state_1488(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1871(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACE => Shift(yy_state_120) - T_EQUAL => Shift(yy_state_1062) - NT_block_expr => Shift(yy_state_1064) - NT_impl_body => Shift(yy_state_1489) + NT_error_annotation => Shift(yy_state_63) + T_THIN_ARROW => Shift(yy_state_64) + T_NORAISE => Shift(yy_state_91) + T_RAISE => Shift(yy_state_92) + NT_func_return_type => Shift(yy_state_1872) + T_EQUAL => Reduce(0, NT_func_return_type, yy_action_1023) _ => Error } } -fn yy_state_1489(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(10, NT_structure_item, yy_action_143) +fn yy_state_1872(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(8, NT_extern_fun_header, yy_action_159) } -fn yy_state_1490(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1873(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_ASYNC => Shift(yy_state_52) - T_UNDERSCORE => Shift(yy_state_57) - T_AMPER => Shift(yy_state_58) - T_PACKAGE_NAME => Shift(yy_state_60) - T_UIDENT => Shift(yy_state_67) - T_LPAREN => Shift(yy_state_71) - NT_simple_type => Shift(yy_state_97) - NT_type_ => Shift(yy_state_1491) + T_FN => Shift(yy_state_1627) + T_SUBERROR => Shift(yy_state_1874) + T_TYPE => Shift(yy_state_1876) + T_IMPL => Shift(yy_state_1879) + T_TRAIT => Shift(yy_state_1884) + T_EXTENUM => Shift(yy_state_1890) + T_CONST => Shift(yy_state_1903) + T_LET => Shift(yy_state_1907) + T_PUB => Shift(yy_state_1914) + T_PRIV => Shift(yy_state_1963) + NT_fun_header_generic => Shift(yy_state_2011) + T_ASYNC => Shift(yy_state_2014) _ => Error } } -fn yy_state_1491(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1874(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_WITH => Shift(yy_state_1492) - T_EOF | T_SEMI => Reduce(6, NT_structure_item, yy_action_142) + T_UIDENT => Shift(yy_state_1875) _ => Error } } -fn yy_state_1492(_lookahead : YYSymbol) -> YYDecision { - match _lookahead { - T_FN => Shift(yy_state_1056) - NT_option_FN_ => Shift(yy_state_1493) - T_LIDENT => Reduce(0, NT_option_FN_, yy_action_285) - _ => Error - } +fn yy_state_1875(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(4, NT_suberror_header, yy_action_158) } -fn yy_state_1493(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1876(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LIDENT => Shift(yy_state_1494) + T_UIDENT => Shift(yy_state_1877) _ => Error } } -fn yy_state_1494(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1877(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LPAREN => Shift(yy_state_143) - NT_parameters => Shift(yy_state_1495) + T_LBRACKET => Shift(yy_state_1172) + NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__ => Shift(yy_state_1183) + NT_optional_type_parameters_no_constraints => Shift(yy_state_1878) + T_EOF | T_DERIVE | T_EQUAL | T_SEMI => Reduce(0, NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__, yy_action_415) _ => Error } } -fn yy_state_1495(_lookahead : YYSymbol) -> YYDecision { - match _lookahead { - NT_error_annotation => Shift(yy_state_50) - T_THIN_ARROW => Shift(yy_state_51) - T_NORAISE => Shift(yy_state_78) - T_RAISE => Shift(yy_state_79) - NT_func_return_type => Shift(yy_state_1496) - T_EQUAL | T_LBRACE => Reduce(0, NT_func_return_type, yy_action_862) - _ => Error - } +fn yy_state_1878(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(5, NT_type_header, yy_action_157) } -fn yy_state_1496(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1879(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACE => Shift(yy_state_120) - T_EQUAL => Shift(yy_state_1062) - NT_block_expr => Shift(yy_state_1064) - NT_impl_body => Shift(yy_state_1497) + NT_type_parameters => Shift(yy_state_1223) + NT_option_type_parameters_ => Shift(yy_state_1266) + T_LBRACKET => Shift(yy_state_1267) + NT_optional_type_parameters => Shift(yy_state_1880) + T_UIDENT | T_AMPER | T_PACKAGE_NAME => Reduce(0, NT_option_type_parameters_, yy_action_383) _ => Error } } -fn yy_state_1497(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(12, NT_structure_item, yy_action_141) -} - -fn yy_state_1498(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1880(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_STRING => Shift(yy_state_1074) - NT_option_loced_string_ => Shift(yy_state_1499) - T_LPAREN | T_LBRACE => Reduce(0, NT_option_loced_string_, yy_action_278) + T_AMPER => Shift(yy_state_20) + T_PACKAGE_NAME => Shift(yy_state_22) + T_UIDENT => Shift(yy_state_25) + NT_qual_ident_ty => Shift(yy_state_26) + NT_type_name => Shift(yy_state_1881) _ => Error } } -fn yy_state_1499(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1881(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LPAREN => Shift(yy_state_143) - NT_parameters => Shift(yy_state_1076) - NT_option_parameters_ => Shift(yy_state_1500) - T_LBRACE => Reduce(0, NT_option_parameters_, yy_action_275) + T_FOR => Shift(yy_state_1882) _ => Error } } -fn yy_state_1500(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1882(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACE => Shift(yy_state_120) - NT_block_expr => Shift(yy_state_1501) + T_ASYNC => Shift(yy_state_65) + T_UNDERSCORE => Shift(yy_state_70) + T_AMPER => Shift(yy_state_71) + T_PACKAGE_NAME => Shift(yy_state_73) + T_UIDENT => Shift(yy_state_80) + T_LPAREN => Shift(yy_state_84) + NT_simple_type => Shift(yy_state_110) + NT_type_ => Shift(yy_state_1883) _ => Error } } -fn yy_state_1501(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(5, NT_structure_item, yy_action_140) +fn yy_state_1883(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(7, NT_structure_item, yy_action_156) } -fn yy_state_1502(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1884(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_UIDENT => Shift(yy_state_1503) + T_UIDENT => Shift(yy_state_1885) _ => Error } } -fn yy_state_1503(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1885(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_COLON => Shift(yy_state_1081) - NT_option_preceded_COLON_separated_nonempty_list_PLUS_tvar_constraint___ => Shift(yy_state_1504) - T_LBRACE => Reduce(0, NT_option_preceded_COLON_separated_nonempty_list_PLUS_tvar_constraint___, yy_action_272) + T_COLON => Shift(yy_state_1320) + NT_option_preceded_COLON_separated_nonempty_list_PLUS_tvar_constraint___ => Shift(yy_state_1886) + T_LBRACE => Reduce(0, NT_option_preceded_COLON_separated_nonempty_list_PLUS_tvar_constraint___, yy_action_333) _ => Error } } -fn yy_state_1504(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1886(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACE => Shift(yy_state_1505) + T_LBRACE => Shift(yy_state_1887) _ => Error } } -fn yy_state_1505(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1887(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_ATTRIBUTE => Shift(yy_state_946) - NT_trait_method_decl => Shift(yy_state_1085) - NT_non_empty_list_attribute_ => Shift(yy_state_1089) - T_FN => Shift(yy_state_1124) - NT_trait_method_fn_header => Shift(yy_state_1126) - T_ASYNC => Shift(yy_state_1133) - NT_non_empty_list_semis_trait_method_decl_ => Shift(yy_state_1141) - NT_list_semis_trait_method_decl_ => Shift(yy_state_1506) - T_LIDENT => Reduce(0, NT_trait_method_fn_header, yy_action_269) - T_RBRACE => Reduce(0, NT_list_semis_trait_method_decl_, yy_action_268) + T_ATTRIBUTE => Shift(yy_state_1168) + NT_trait_method_decl => Shift(yy_state_1324) + NT_non_empty_list_attribute_ => Shift(yy_state_1328) + T_FN => Shift(yy_state_1381) + NT_trait_method_fn_header => Shift(yy_state_1383) + T_ASYNC => Shift(yy_state_1396) + NT_non_empty_list_semis_trait_method_decl_ => Shift(yy_state_1410) + NT_list_semis_trait_method_decl_ => Shift(yy_state_1888) + T_LIDENT | T_EXTEND => Reduce(0, NT_trait_method_fn_header, yy_action_330) + T_RBRACE => Reduce(0, NT_list_semis_trait_method_decl_, yy_action_329) _ => Error } } -fn yy_state_1506(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1888(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RBRACE => Shift(yy_state_1507) + T_RBRACE => Shift(yy_state_1889) _ => Error } } -fn yy_state_1507(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(7, NT_structure_item, yy_action_139) +fn yy_state_1889(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(8, NT_structure_item, yy_action_155) } -fn yy_state_1508(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1890(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_PACKAGE_NAME => Shift(yy_state_1163) - NT_extenum_extension_target => Shift(yy_state_1509) - T_UIDENT => Shift(yy_state_1515) + T_PACKAGE_NAME => Shift(yy_state_1432) + NT_extenum_extension_target => Shift(yy_state_1891) + T_UIDENT => Shift(yy_state_1897) _ => Error } } -fn yy_state_1509(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1891(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_PLUS_EQUAL => Shift(yy_state_1510) + T_PLUS_EQUAL => Shift(yy_state_1892) _ => Error } } -fn yy_state_1510(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1892(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACE => Shift(yy_state_1511) + T_LBRACE => Shift(yy_state_1893) _ => Error } } -fn yy_state_1511(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1893(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_ATTRIBUTE => Shift(yy_state_946) - NT_enum_constructor => Shift(yy_state_1000) - NT_non_empty_list_attribute_ => Shift(yy_state_1004) - T_UIDENT => Shift(yy_state_1024) - NT_non_empty_list_semis_enum_constructor_ => Shift(yy_state_1027) - NT_list_semis_enum_constructor_ => Shift(yy_state_1512) - T_RBRACE => Reduce(0, NT_list_semis_enum_constructor_, yy_action_317) + T_ATTRIBUTE => Shift(yy_state_1168) + NT_enum_constructor => Shift(yy_state_1227) + NT_non_empty_list_attribute_ => Shift(yy_state_1231) + T_UIDENT => Shift(yy_state_1251) + NT_non_empty_list_semis_enum_constructor_ => Shift(yy_state_1254) + NT_list_semis_enum_constructor_ => Shift(yy_state_1894) + T_RBRACE => Reduce(0, NT_list_semis_enum_constructor_, yy_action_381) _ => Error } } -fn yy_state_1512(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1894(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RBRACE => Shift(yy_state_1513) + T_RBRACE => Shift(yy_state_1895) _ => Error } } -fn yy_state_1513(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1895(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_DERIVE => Shift(yy_state_1171) - NT_deriving_directive_list => Shift(yy_state_1514) - T_EOF | T_SEMI => Reduce(0, NT_deriving_directive_list, yy_action_233) + T_DERIVE => Shift(yy_state_1440) + NT_deriving_directive_list => Shift(yy_state_1896) + T_EOF | T_SEMI => Reduce(0, NT_deriving_directive_list, yy_action_288) _ => Error } } -fn yy_state_1514(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(8, NT_structure_item, yy_action_138) +fn yy_state_1896(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(9, NT_structure_item, yy_action_154) } -fn yy_state_1515(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1897(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACKET => Shift(yy_state_950) - NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__ => Shift(yy_state_961) - NT_optional_type_parameters_no_constraints => Shift(yy_state_1516) - T_PLUS_EQUAL | T_LBRACE => Reduce(0, NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__, yy_action_347) + T_LBRACKET => Shift(yy_state_1172) + NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__ => Shift(yy_state_1183) + NT_optional_type_parameters_no_constraints => Shift(yy_state_1898) + T_PLUS_EQUAL | T_LBRACE => Reduce(0, NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__, yy_action_415) _ => Error } } -fn yy_state_1516(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1898(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACE => Shift(yy_state_1517) - T_PLUS_EQUAL => Reduce(2, NT_extenum_extension_target, yy_action_223) + T_LBRACE => Shift(yy_state_1899) + T_PLUS_EQUAL => Reduce(2, NT_extenum_extension_target, yy_action_278) _ => Error } } -fn yy_state_1517(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1899(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_ATTRIBUTE => Shift(yy_state_946) - NT_enum_constructor => Shift(yy_state_1000) - NT_non_empty_list_attribute_ => Shift(yy_state_1004) - T_UIDENT => Shift(yy_state_1024) - NT_non_empty_list_semis_enum_constructor_ => Shift(yy_state_1027) - NT_list_semis_enum_constructor_ => Shift(yy_state_1518) - T_RBRACE => Reduce(0, NT_list_semis_enum_constructor_, yy_action_317) + T_ATTRIBUTE => Shift(yy_state_1168) + NT_enum_constructor => Shift(yy_state_1227) + NT_non_empty_list_attribute_ => Shift(yy_state_1231) + T_UIDENT => Shift(yy_state_1251) + NT_non_empty_list_semis_enum_constructor_ => Shift(yy_state_1254) + NT_list_semis_enum_constructor_ => Shift(yy_state_1900) + T_RBRACE => Reduce(0, NT_list_semis_enum_constructor_, yy_action_381) _ => Error } } -fn yy_state_1518(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1900(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RBRACE => Shift(yy_state_1519) + T_RBRACE => Shift(yy_state_1901) _ => Error } } -fn yy_state_1519(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1901(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_DERIVE => Shift(yy_state_1171) - NT_deriving_directive_list => Shift(yy_state_1520) - T_EOF | T_SEMI => Reduce(0, NT_deriving_directive_list, yy_action_233) + T_DERIVE => Shift(yy_state_1440) + NT_deriving_directive_list => Shift(yy_state_1902) + T_EOF | T_SEMI => Reduce(0, NT_deriving_directive_list, yy_action_288) _ => Error } } -fn yy_state_1520(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(8, NT_structure_item, yy_action_137) +fn yy_state_1902(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(9, NT_structure_item, yy_action_153) } -fn yy_state_1521(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1903(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_UIDENT => Shift(yy_state_1522) + T_UIDENT => Shift(yy_state_1904) _ => Error } } -fn yy_state_1522(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1904(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_COLON => Shift(yy_state_1523) - T_EQUAL => Reduce(3, NT_val_header, yy_action_136) + T_COLON => Shift(yy_state_1905) + T_EQUAL => Reduce(4, NT_val_header, yy_action_152) _ => Error } } -fn yy_state_1523(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1905(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_ASYNC => Shift(yy_state_52) - T_UNDERSCORE => Shift(yy_state_57) - T_AMPER => Shift(yy_state_58) - T_PACKAGE_NAME => Shift(yy_state_60) - T_UIDENT => Shift(yy_state_67) - T_LPAREN => Shift(yy_state_71) - NT_simple_type => Shift(yy_state_97) - NT_type_ => Shift(yy_state_1524) + T_ASYNC => Shift(yy_state_65) + T_UNDERSCORE => Shift(yy_state_70) + T_AMPER => Shift(yy_state_71) + T_PACKAGE_NAME => Shift(yy_state_73) + T_UIDENT => Shift(yy_state_80) + T_LPAREN => Shift(yy_state_84) + NT_simple_type => Shift(yy_state_110) + NT_type_ => Shift(yy_state_1906) _ => Error } } -fn yy_state_1524(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(5, NT_val_header, yy_action_135) +fn yy_state_1906(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(6, NT_val_header, yy_action_151) } -fn yy_state_1525(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1907(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LIDENT => Shift(yy_state_1526) + T_EXTEND => Shift(yy_state_1908) + T_LIDENT => Shift(yy_state_1911) _ => Error } } -fn yy_state_1526(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1908(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_COLON => Shift(yy_state_1527) - T_EQUAL => Reduce(3, NT_val_header, yy_action_134) + T_COLON => Shift(yy_state_1909) + T_EQUAL => Reduce(4, NT_val_header, yy_action_150) _ => Error } } -fn yy_state_1527(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1909(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_ASYNC => Shift(yy_state_52) - T_UNDERSCORE => Shift(yy_state_57) - T_AMPER => Shift(yy_state_58) - T_PACKAGE_NAME => Shift(yy_state_60) - T_UIDENT => Shift(yy_state_67) - T_LPAREN => Shift(yy_state_71) - NT_simple_type => Shift(yy_state_97) - NT_type_ => Shift(yy_state_1528) + T_ASYNC => Shift(yy_state_65) + T_UNDERSCORE => Shift(yy_state_70) + T_AMPER => Shift(yy_state_71) + T_PACKAGE_NAME => Shift(yy_state_73) + T_UIDENT => Shift(yy_state_80) + T_LPAREN => Shift(yy_state_84) + NT_simple_type => Shift(yy_state_110) + NT_type_ => Shift(yy_state_1910) _ => Error } } -fn yy_state_1528(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(5, NT_val_header, yy_action_133) +fn yy_state_1910(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(6, NT_val_header, yy_action_149) } -fn yy_state_1529(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1911(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_STRING => Shift(yy_state_1530) + T_COLON => Shift(yy_state_1912) + T_EQUAL => Reduce(4, NT_val_header, yy_action_148) _ => Error } } -fn yy_state_1530(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1912(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_FN => Shift(yy_state_1531) + T_ASYNC => Shift(yy_state_65) + T_UNDERSCORE => Shift(yy_state_70) + T_AMPER => Shift(yy_state_71) + T_PACKAGE_NAME => Shift(yy_state_73) + T_UIDENT => Shift(yy_state_80) + T_LPAREN => Shift(yy_state_84) + NT_simple_type => Shift(yy_state_110) + NT_type_ => Shift(yy_state_1913) _ => Error } } -fn yy_state_1531(_lookahead : YYSymbol) -> YYDecision { - match _lookahead { - NT_type_parameters => Shift(yy_state_996) - NT_option_type_parameters_ => Shift(yy_state_1036) - T_LBRACKET => Shift(yy_state_1037) - NT_optional_type_parameters => Shift(yy_state_1532) - T_LIDENT | T_UIDENT | T_AMPER | T_PACKAGE_NAME => Reduce(0, NT_option_type_parameters_, yy_action_319) - _ => Error - } +fn yy_state_1913(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(6, NT_val_header, yy_action_147) } -fn yy_state_1532(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1914(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_AMPER => Shift(yy_state_19) - T_PACKAGE_NAME => Shift(yy_state_21) - T_UIDENT => Shift(yy_state_24) - NT_qual_ident_ty => Shift(yy_state_25) - T_LIDENT => Shift(yy_state_1307) - NT_type_name => Shift(yy_state_1308) - NT_fun_binder => Shift(yy_state_1533) + T_LPAREN => Shift(yy_state_1539) + NT_pub_attr => Shift(yy_state_1915) + T_TRAIT | T_IMPL | T_ASYNC | T_FN | T_LET | T_CONST | T_TYPE | T_SUBERROR | T_EXTENUM => Reduce(0, NT_pub_attr, yy_action_261) _ => Error } } -fn yy_state_1533(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1915(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LPAREN => Shift(yy_state_143) - NT_parameters => Shift(yy_state_1076) - NT_option_parameters_ => Shift(yy_state_1534) - T_RAISE | T_EQUAL | T_THIN_ARROW | T_NORAISE => Reduce(0, NT_option_parameters_, yy_action_275) + T_FN => Shift(yy_state_1627) + T_SUBERROR => Shift(yy_state_1916) + T_TYPE => Shift(yy_state_1918) + T_IMPL => Shift(yy_state_1921) + T_TRAIT => Shift(yy_state_1926) + T_EXTENUM => Shift(yy_state_1932) + T_CONST => Shift(yy_state_1945) + T_LET => Shift(yy_state_1949) + NT_fun_header_generic => Shift(yy_state_1956) + T_ASYNC => Shift(yy_state_1959) _ => Error } } -fn yy_state_1534(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1916(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_error_annotation => Shift(yy_state_50) - T_THIN_ARROW => Shift(yy_state_51) - T_NORAISE => Shift(yy_state_78) - T_RAISE => Shift(yy_state_79) - NT_func_return_type => Shift(yy_state_1535) - T_EQUAL => Reduce(0, NT_func_return_type, yy_action_862) + T_UIDENT => Shift(yy_state_1917) _ => Error } } -fn yy_state_1535(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(8, NT_extern_fun_header, yy_action_132) +fn yy_state_1917(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(6, NT_suberror_header, yy_action_146) } -fn yy_state_1536(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1918(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_FN => Shift(yy_state_1313) - T_SUBERROR => Shift(yy_state_1537) - T_TYPE => Shift(yy_state_1539) - T_IMPL => Shift(yy_state_1542) - T_TRAIT => Shift(yy_state_1547) - T_EXTENUM => Shift(yy_state_1553) - T_CONST => Shift(yy_state_1566) - T_LET => Shift(yy_state_1570) - T_PUB => Shift(yy_state_1574) - T_PRIV => Shift(yy_state_1620) - NT_fun_header_generic => Shift(yy_state_1665) - T_ASYNC => Shift(yy_state_1668) + T_UIDENT => Shift(yy_state_1919) _ => Error } } -fn yy_state_1537(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1919(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_UIDENT => Shift(yy_state_1538) + T_LBRACKET => Shift(yy_state_1172) + NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__ => Shift(yy_state_1183) + NT_optional_type_parameters_no_constraints => Shift(yy_state_1920) + T_EOF | T_DERIVE | T_EQUAL | T_SEMI => Reduce(0, NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__, yy_action_415) _ => Error } } -fn yy_state_1538(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(4, NT_suberror_header, yy_action_131) +fn yy_state_1920(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(7, NT_type_header, yy_action_145) } -fn yy_state_1539(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1921(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_UIDENT => Shift(yy_state_1540) + NT_type_parameters => Shift(yy_state_1223) + NT_option_type_parameters_ => Shift(yy_state_1266) + T_LBRACKET => Shift(yy_state_1267) + NT_optional_type_parameters => Shift(yy_state_1922) + T_UIDENT | T_AMPER | T_PACKAGE_NAME => Reduce(0, NT_option_type_parameters_, yy_action_383) _ => Error } } -fn yy_state_1540(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1922(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACKET => Shift(yy_state_950) - NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__ => Shift(yy_state_961) - NT_optional_type_parameters_no_constraints => Shift(yy_state_1541) - T_EOF | T_DERIVE | T_EQUAL | T_SEMI => Reduce(0, NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__, yy_action_347) + T_AMPER => Shift(yy_state_20) + T_PACKAGE_NAME => Shift(yy_state_22) + T_UIDENT => Shift(yy_state_25) + NT_qual_ident_ty => Shift(yy_state_26) + NT_type_name => Shift(yy_state_1923) _ => Error } } -fn yy_state_1541(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(5, NT_type_header, yy_action_130) +fn yy_state_1923(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_FOR => Shift(yy_state_1924) + _ => Error + } } -fn yy_state_1542(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1924(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_type_parameters => Shift(yy_state_996) - NT_option_type_parameters_ => Shift(yy_state_1036) - T_LBRACKET => Shift(yy_state_1037) - NT_optional_type_parameters => Shift(yy_state_1543) - T_UIDENT | T_AMPER | T_PACKAGE_NAME => Reduce(0, NT_option_type_parameters_, yy_action_319) + T_ASYNC => Shift(yy_state_65) + T_UNDERSCORE => Shift(yy_state_70) + T_AMPER => Shift(yy_state_71) + T_PACKAGE_NAME => Shift(yy_state_73) + T_UIDENT => Shift(yy_state_80) + T_LPAREN => Shift(yy_state_84) + NT_simple_type => Shift(yy_state_110) + NT_type_ => Shift(yy_state_1925) _ => Error } } -fn yy_state_1543(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1925(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(9, NT_structure_item, yy_action_144) +} + +fn yy_state_1926(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_AMPER => Shift(yy_state_19) - T_PACKAGE_NAME => Shift(yy_state_21) - T_UIDENT => Shift(yy_state_24) - NT_qual_ident_ty => Shift(yy_state_25) - NT_type_name => Shift(yy_state_1544) + T_UIDENT => Shift(yy_state_1927) _ => Error } } -fn yy_state_1544(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1927(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_FOR => Shift(yy_state_1545) + T_COLON => Shift(yy_state_1320) + NT_option_preceded_COLON_separated_nonempty_list_PLUS_tvar_constraint___ => Shift(yy_state_1928) + T_LBRACE => Reduce(0, NT_option_preceded_COLON_separated_nonempty_list_PLUS_tvar_constraint___, yy_action_333) _ => Error } } -fn yy_state_1545(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1928(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_ASYNC => Shift(yy_state_52) - T_UNDERSCORE => Shift(yy_state_57) - T_AMPER => Shift(yy_state_58) - T_PACKAGE_NAME => Shift(yy_state_60) - T_UIDENT => Shift(yy_state_67) - T_LPAREN => Shift(yy_state_71) - NT_simple_type => Shift(yy_state_97) - NT_type_ => Shift(yy_state_1546) + T_LBRACE => Shift(yy_state_1929) _ => Error } } -fn yy_state_1546(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(7, NT_structure_item, yy_action_129) +fn yy_state_1929(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_ATTRIBUTE => Shift(yy_state_1168) + NT_trait_method_decl => Shift(yy_state_1324) + NT_non_empty_list_attribute_ => Shift(yy_state_1328) + T_FN => Shift(yy_state_1381) + NT_trait_method_fn_header => Shift(yy_state_1383) + T_ASYNC => Shift(yy_state_1396) + NT_non_empty_list_semis_trait_method_decl_ => Shift(yy_state_1410) + NT_list_semis_trait_method_decl_ => Shift(yy_state_1930) + T_LIDENT | T_EXTEND => Reduce(0, NT_trait_method_fn_header, yy_action_330) + T_RBRACE => Reduce(0, NT_list_semis_trait_method_decl_, yy_action_329) + _ => Error + } } -fn yy_state_1547(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1930(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_UIDENT => Shift(yy_state_1548) + T_RBRACE => Shift(yy_state_1931) _ => Error } } -fn yy_state_1548(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1931(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(10, NT_structure_item, yy_action_143) +} + +fn yy_state_1932(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_COLON => Shift(yy_state_1081) - NT_option_preceded_COLON_separated_nonempty_list_PLUS_tvar_constraint___ => Shift(yy_state_1549) - T_LBRACE => Reduce(0, NT_option_preceded_COLON_separated_nonempty_list_PLUS_tvar_constraint___, yy_action_272) + T_PACKAGE_NAME => Shift(yy_state_1432) + NT_extenum_extension_target => Shift(yy_state_1933) + T_UIDENT => Shift(yy_state_1939) _ => Error } } -fn yy_state_1549(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1933(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACE => Shift(yy_state_1550) + T_PLUS_EQUAL => Shift(yy_state_1934) _ => Error } } -fn yy_state_1550(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1934(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_ATTRIBUTE => Shift(yy_state_946) - NT_trait_method_decl => Shift(yy_state_1085) - NT_non_empty_list_attribute_ => Shift(yy_state_1089) - T_FN => Shift(yy_state_1124) - NT_trait_method_fn_header => Shift(yy_state_1126) - T_ASYNC => Shift(yy_state_1133) - NT_non_empty_list_semis_trait_method_decl_ => Shift(yy_state_1141) - NT_list_semis_trait_method_decl_ => Shift(yy_state_1551) - T_LIDENT => Reduce(0, NT_trait_method_fn_header, yy_action_269) - T_RBRACE => Reduce(0, NT_list_semis_trait_method_decl_, yy_action_268) + T_LBRACE => Shift(yy_state_1935) _ => Error } } -fn yy_state_1551(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1935(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RBRACE => Shift(yy_state_1552) + T_ATTRIBUTE => Shift(yy_state_1168) + NT_enum_constructor => Shift(yy_state_1227) + NT_non_empty_list_attribute_ => Shift(yy_state_1231) + T_UIDENT => Shift(yy_state_1251) + NT_non_empty_list_semis_enum_constructor_ => Shift(yy_state_1254) + NT_list_semis_enum_constructor_ => Shift(yy_state_1936) + T_RBRACE => Reduce(0, NT_list_semis_enum_constructor_, yy_action_381) _ => Error } } -fn yy_state_1552(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(8, NT_structure_item, yy_action_128) +fn yy_state_1936(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_RBRACE => Shift(yy_state_1937) + _ => Error + } } -fn yy_state_1553(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1937(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_PACKAGE_NAME => Shift(yy_state_1163) - NT_extenum_extension_target => Shift(yy_state_1554) - T_UIDENT => Shift(yy_state_1560) + T_DERIVE => Shift(yy_state_1440) + NT_deriving_directive_list => Shift(yy_state_1938) + T_EOF | T_SEMI => Reduce(0, NT_deriving_directive_list, yy_action_288) _ => Error } } -fn yy_state_1554(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1938(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(11, NT_structure_item, yy_action_142) +} + +fn yy_state_1939(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_PLUS_EQUAL => Shift(yy_state_1555) + T_LBRACKET => Shift(yy_state_1172) + NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__ => Shift(yy_state_1183) + NT_optional_type_parameters_no_constraints => Shift(yy_state_1940) + T_PLUS_EQUAL | T_LBRACE => Reduce(0, NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__, yy_action_415) _ => Error } } -fn yy_state_1555(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1940(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACE => Shift(yy_state_1556) + T_LBRACE => Shift(yy_state_1941) + T_PLUS_EQUAL => Reduce(2, NT_extenum_extension_target, yy_action_278) _ => Error } } -fn yy_state_1556(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1941(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_ATTRIBUTE => Shift(yy_state_946) - NT_enum_constructor => Shift(yy_state_1000) - NT_non_empty_list_attribute_ => Shift(yy_state_1004) - T_UIDENT => Shift(yy_state_1024) - NT_non_empty_list_semis_enum_constructor_ => Shift(yy_state_1027) - NT_list_semis_enum_constructor_ => Shift(yy_state_1557) - T_RBRACE => Reduce(0, NT_list_semis_enum_constructor_, yy_action_317) + T_ATTRIBUTE => Shift(yy_state_1168) + NT_enum_constructor => Shift(yy_state_1227) + NT_non_empty_list_attribute_ => Shift(yy_state_1231) + T_UIDENT => Shift(yy_state_1251) + NT_non_empty_list_semis_enum_constructor_ => Shift(yy_state_1254) + NT_list_semis_enum_constructor_ => Shift(yy_state_1942) + T_RBRACE => Reduce(0, NT_list_semis_enum_constructor_, yy_action_381) _ => Error } } -fn yy_state_1557(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1942(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RBRACE => Shift(yy_state_1558) + T_RBRACE => Shift(yy_state_1943) _ => Error } } -fn yy_state_1558(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1943(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_DERIVE => Shift(yy_state_1171) - NT_deriving_directive_list => Shift(yy_state_1559) - T_EOF | T_SEMI => Reduce(0, NT_deriving_directive_list, yy_action_233) + T_DERIVE => Shift(yy_state_1440) + NT_deriving_directive_list => Shift(yy_state_1944) + T_EOF | T_SEMI => Reduce(0, NT_deriving_directive_list, yy_action_288) _ => Error } } -fn yy_state_1559(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(9, NT_structure_item, yy_action_127) +fn yy_state_1944(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(11, NT_structure_item, yy_action_141) } -fn yy_state_1560(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1945(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACKET => Shift(yy_state_950) - NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__ => Shift(yy_state_961) - NT_optional_type_parameters_no_constraints => Shift(yy_state_1561) - T_PLUS_EQUAL | T_LBRACE => Reduce(0, NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__, yy_action_347) + T_UIDENT => Shift(yy_state_1946) _ => Error } } -fn yy_state_1561(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1946(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACE => Shift(yy_state_1562) - T_PLUS_EQUAL => Reduce(2, NT_extenum_extension_target, yy_action_223) + T_COLON => Shift(yy_state_1947) + T_EQUAL => Reduce(6, NT_val_header, yy_action_140) _ => Error } } -fn yy_state_1562(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1947(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_ATTRIBUTE => Shift(yy_state_946) - NT_enum_constructor => Shift(yy_state_1000) - NT_non_empty_list_attribute_ => Shift(yy_state_1004) - T_UIDENT => Shift(yy_state_1024) - NT_non_empty_list_semis_enum_constructor_ => Shift(yy_state_1027) - NT_list_semis_enum_constructor_ => Shift(yy_state_1563) - T_RBRACE => Reduce(0, NT_list_semis_enum_constructor_, yy_action_317) + T_ASYNC => Shift(yy_state_65) + T_UNDERSCORE => Shift(yy_state_70) + T_AMPER => Shift(yy_state_71) + T_PACKAGE_NAME => Shift(yy_state_73) + T_UIDENT => Shift(yy_state_80) + T_LPAREN => Shift(yy_state_84) + NT_simple_type => Shift(yy_state_110) + NT_type_ => Shift(yy_state_1948) _ => Error } } -fn yy_state_1563(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1948(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(8, NT_val_header, yy_action_139) +} + +fn yy_state_1949(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RBRACE => Shift(yy_state_1564) + T_EXTEND => Shift(yy_state_1950) + T_LIDENT => Shift(yy_state_1953) _ => Error } } -fn yy_state_1564(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1950(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_DERIVE => Shift(yy_state_1171) - NT_deriving_directive_list => Shift(yy_state_1565) - T_EOF | T_SEMI => Reduce(0, NT_deriving_directive_list, yy_action_233) + T_COLON => Shift(yy_state_1951) + T_EQUAL => Reduce(6, NT_val_header, yy_action_138) _ => Error } } -fn yy_state_1565(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(9, NT_structure_item, yy_action_126) -} - -fn yy_state_1566(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1951(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_UIDENT => Shift(yy_state_1567) + T_ASYNC => Shift(yy_state_65) + T_UNDERSCORE => Shift(yy_state_70) + T_AMPER => Shift(yy_state_71) + T_PACKAGE_NAME => Shift(yy_state_73) + T_UIDENT => Shift(yy_state_80) + T_LPAREN => Shift(yy_state_84) + NT_simple_type => Shift(yy_state_110) + NT_type_ => Shift(yy_state_1952) _ => Error } } -fn yy_state_1567(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1952(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(8, NT_val_header, yy_action_137) +} + +fn yy_state_1953(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_COLON => Shift(yy_state_1568) - T_EQUAL => Reduce(4, NT_val_header, yy_action_125) + T_COLON => Shift(yy_state_1954) + T_EQUAL => Reduce(6, NT_val_header, yy_action_136) _ => Error } } -fn yy_state_1568(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1954(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_ASYNC => Shift(yy_state_52) - T_UNDERSCORE => Shift(yy_state_57) - T_AMPER => Shift(yy_state_58) - T_PACKAGE_NAME => Shift(yy_state_60) - T_UIDENT => Shift(yy_state_67) - T_LPAREN => Shift(yy_state_71) - NT_simple_type => Shift(yy_state_97) - NT_type_ => Shift(yy_state_1569) + T_ASYNC => Shift(yy_state_65) + T_UNDERSCORE => Shift(yy_state_70) + T_AMPER => Shift(yy_state_71) + T_PACKAGE_NAME => Shift(yy_state_73) + T_UIDENT => Shift(yy_state_80) + T_LPAREN => Shift(yy_state_84) + NT_simple_type => Shift(yy_state_110) + NT_type_ => Shift(yy_state_1955) _ => Error } } -fn yy_state_1569(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(6, NT_val_header, yy_action_124) +fn yy_state_1955(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(8, NT_val_header, yy_action_135) } -fn yy_state_1570(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1956(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LIDENT => Shift(yy_state_1571) + T_LPAREN => Shift(yy_state_157) + NT_parameters => Shift(yy_state_1315) + NT_option_parameters_ => Shift(yy_state_1957) + T_EOF | T_RAISE | T_SEMI | T_THIN_ARROW | T_NORAISE => Reduce(0, NT_option_parameters_, yy_action_336) _ => Error } } -fn yy_state_1571(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1957(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + NT_error_annotation => Shift(yy_state_63) + T_THIN_ARROW => Shift(yy_state_64) + T_NORAISE => Shift(yy_state_91) + T_RAISE => Shift(yy_state_92) + NT_func_return_type => Shift(yy_state_1958) + T_EOF | T_SEMI => Reduce(0, NT_func_return_type, yy_action_1023) + _ => Error + } +} + +fn yy_state_1958(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(7, NT_declare_fun_header, yy_action_134) +} + +fn yy_state_1959(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_COLON => Shift(yy_state_1572) - T_EQUAL => Reduce(4, NT_val_header, yy_action_123) + T_FN => Shift(yy_state_1627) + NT_fun_header_generic => Shift(yy_state_1960) _ => Error } } -fn yy_state_1572(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1960(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_ASYNC => Shift(yy_state_52) - T_UNDERSCORE => Shift(yy_state_57) - T_AMPER => Shift(yy_state_58) - T_PACKAGE_NAME => Shift(yy_state_60) - T_UIDENT => Shift(yy_state_67) - T_LPAREN => Shift(yy_state_71) - NT_simple_type => Shift(yy_state_97) - NT_type_ => Shift(yy_state_1573) + T_LPAREN => Shift(yy_state_157) + NT_parameters => Shift(yy_state_1315) + NT_option_parameters_ => Shift(yy_state_1961) + T_EOF | T_RAISE | T_SEMI | T_THIN_ARROW | T_NORAISE => Reduce(0, NT_option_parameters_, yy_action_336) _ => Error } } -fn yy_state_1573(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(6, NT_val_header, yy_action_122) -} - -fn yy_state_1574(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1961(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LPAREN => Shift(yy_state_1247) - NT_pub_attr => Shift(yy_state_1575) - T_TRAIT | T_IMPL | T_ASYNC | T_FN | T_LET | T_CONST | T_TYPE | T_SUBERROR | T_EXTENUM => Reduce(0, NT_pub_attr, yy_action_210) + NT_error_annotation => Shift(yy_state_63) + T_THIN_ARROW => Shift(yy_state_64) + T_NORAISE => Shift(yy_state_91) + T_RAISE => Shift(yy_state_92) + NT_func_return_type => Shift(yy_state_1962) + T_EOF | T_SEMI => Reduce(0, NT_func_return_type, yy_action_1023) _ => Error } } -fn yy_state_1575(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1962(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(8, NT_declare_fun_header, yy_action_133) +} + +fn yy_state_1963(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_FN => Shift(yy_state_1313) - T_SUBERROR => Shift(yy_state_1576) - T_TYPE => Shift(yy_state_1578) - T_IMPL => Shift(yy_state_1581) - T_TRAIT => Shift(yy_state_1586) - T_EXTENUM => Shift(yy_state_1592) - T_CONST => Shift(yy_state_1605) - T_LET => Shift(yy_state_1609) - NT_fun_header_generic => Shift(yy_state_1613) - T_ASYNC => Shift(yy_state_1616) + T_FN => Shift(yy_state_1627) + T_SUBERROR => Shift(yy_state_1964) + T_TYPE => Shift(yy_state_1966) + T_IMPL => Shift(yy_state_1969) + T_TRAIT => Shift(yy_state_1974) + T_EXTENUM => Shift(yy_state_1980) + T_CONST => Shift(yy_state_1993) + T_LET => Shift(yy_state_1997) + NT_fun_header_generic => Shift(yy_state_2004) + T_ASYNC => Shift(yy_state_2007) _ => Error } } -fn yy_state_1576(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1964(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_UIDENT => Shift(yy_state_1577) + T_UIDENT => Shift(yy_state_1965) _ => Error } } -fn yy_state_1577(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(6, NT_suberror_header, yy_action_121) +fn yy_state_1965(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(5, NT_suberror_header, yy_action_132) } -fn yy_state_1578(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1966(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_UIDENT => Shift(yy_state_1579) + T_UIDENT => Shift(yy_state_1967) _ => Error } } -fn yy_state_1579(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1967(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACKET => Shift(yy_state_950) - NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__ => Shift(yy_state_961) - NT_optional_type_parameters_no_constraints => Shift(yy_state_1580) - T_EOF | T_DERIVE | T_EQUAL | T_SEMI => Reduce(0, NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__, yy_action_347) + T_LBRACKET => Shift(yy_state_1172) + NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__ => Shift(yy_state_1183) + NT_optional_type_parameters_no_constraints => Shift(yy_state_1968) + T_EOF | T_DERIVE | T_EQUAL | T_SEMI => Reduce(0, NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__, yy_action_415) _ => Error } } -fn yy_state_1580(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(7, NT_type_header, yy_action_120) +fn yy_state_1968(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(6, NT_type_header, yy_action_131) } -fn yy_state_1581(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1969(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_type_parameters => Shift(yy_state_996) - NT_option_type_parameters_ => Shift(yy_state_1036) - T_LBRACKET => Shift(yy_state_1037) - NT_optional_type_parameters => Shift(yy_state_1582) - T_UIDENT | T_AMPER | T_PACKAGE_NAME => Reduce(0, NT_option_type_parameters_, yy_action_319) + NT_type_parameters => Shift(yy_state_1223) + NT_option_type_parameters_ => Shift(yy_state_1266) + T_LBRACKET => Shift(yy_state_1267) + NT_optional_type_parameters => Shift(yy_state_1970) + T_UIDENT | T_AMPER | T_PACKAGE_NAME => Reduce(0, NT_option_type_parameters_, yy_action_383) _ => Error } } -fn yy_state_1582(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1970(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_AMPER => Shift(yy_state_19) - T_PACKAGE_NAME => Shift(yy_state_21) - T_UIDENT => Shift(yy_state_24) - NT_qual_ident_ty => Shift(yy_state_25) - NT_type_name => Shift(yy_state_1583) + T_AMPER => Shift(yy_state_20) + T_PACKAGE_NAME => Shift(yy_state_22) + T_UIDENT => Shift(yy_state_25) + NT_qual_ident_ty => Shift(yy_state_26) + NT_type_name => Shift(yy_state_1971) _ => Error } } -fn yy_state_1583(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1971(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_FOR => Shift(yy_state_1584) + T_FOR => Shift(yy_state_1972) _ => Error } } -fn yy_state_1584(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1972(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_ASYNC => Shift(yy_state_52) - T_UNDERSCORE => Shift(yy_state_57) - T_AMPER => Shift(yy_state_58) - T_PACKAGE_NAME => Shift(yy_state_60) - T_UIDENT => Shift(yy_state_67) - T_LPAREN => Shift(yy_state_71) - NT_simple_type => Shift(yy_state_97) - NT_type_ => Shift(yy_state_1585) + T_ASYNC => Shift(yy_state_65) + T_UNDERSCORE => Shift(yy_state_70) + T_AMPER => Shift(yy_state_71) + T_PACKAGE_NAME => Shift(yy_state_73) + T_UIDENT => Shift(yy_state_80) + T_LPAREN => Shift(yy_state_84) + NT_simple_type => Shift(yy_state_110) + NT_type_ => Shift(yy_state_1973) _ => Error } } -fn yy_state_1585(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(9, NT_structure_item, yy_action_119) +fn yy_state_1973(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(8, NT_structure_item, yy_action_130) } -fn yy_state_1586(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1974(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_UIDENT => Shift(yy_state_1587) + T_UIDENT => Shift(yy_state_1975) _ => Error } } -fn yy_state_1587(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1975(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_COLON => Shift(yy_state_1081) - NT_option_preceded_COLON_separated_nonempty_list_PLUS_tvar_constraint___ => Shift(yy_state_1588) - T_LBRACE => Reduce(0, NT_option_preceded_COLON_separated_nonempty_list_PLUS_tvar_constraint___, yy_action_272) + T_COLON => Shift(yy_state_1320) + NT_option_preceded_COLON_separated_nonempty_list_PLUS_tvar_constraint___ => Shift(yy_state_1976) + T_LBRACE => Reduce(0, NT_option_preceded_COLON_separated_nonempty_list_PLUS_tvar_constraint___, yy_action_333) _ => Error } } -fn yy_state_1588(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1976(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACE => Shift(yy_state_1589) + T_LBRACE => Shift(yy_state_1977) _ => Error } } -fn yy_state_1589(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1977(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_ATTRIBUTE => Shift(yy_state_946) - NT_trait_method_decl => Shift(yy_state_1085) - NT_non_empty_list_attribute_ => Shift(yy_state_1089) - T_FN => Shift(yy_state_1124) - NT_trait_method_fn_header => Shift(yy_state_1126) - T_ASYNC => Shift(yy_state_1133) - NT_non_empty_list_semis_trait_method_decl_ => Shift(yy_state_1141) - NT_list_semis_trait_method_decl_ => Shift(yy_state_1590) - T_LIDENT => Reduce(0, NT_trait_method_fn_header, yy_action_269) - T_RBRACE => Reduce(0, NT_list_semis_trait_method_decl_, yy_action_268) + T_ATTRIBUTE => Shift(yy_state_1168) + NT_trait_method_decl => Shift(yy_state_1324) + NT_non_empty_list_attribute_ => Shift(yy_state_1328) + T_FN => Shift(yy_state_1381) + NT_trait_method_fn_header => Shift(yy_state_1383) + T_ASYNC => Shift(yy_state_1396) + NT_non_empty_list_semis_trait_method_decl_ => Shift(yy_state_1410) + NT_list_semis_trait_method_decl_ => Shift(yy_state_1978) + T_LIDENT | T_EXTEND => Reduce(0, NT_trait_method_fn_header, yy_action_330) + T_RBRACE => Reduce(0, NT_list_semis_trait_method_decl_, yy_action_329) _ => Error } } -fn yy_state_1590(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1978(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RBRACE => Shift(yy_state_1591) + T_RBRACE => Shift(yy_state_1979) _ => Error } } -fn yy_state_1591(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(10, NT_structure_item, yy_action_118) +fn yy_state_1979(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(9, NT_structure_item, yy_action_129) } -fn yy_state_1592(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1980(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_PACKAGE_NAME => Shift(yy_state_1163) - NT_extenum_extension_target => Shift(yy_state_1593) - T_UIDENT => Shift(yy_state_1599) + T_PACKAGE_NAME => Shift(yy_state_1432) + NT_extenum_extension_target => Shift(yy_state_1981) + T_UIDENT => Shift(yy_state_1987) _ => Error } } -fn yy_state_1593(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1981(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_PLUS_EQUAL => Shift(yy_state_1594) + T_PLUS_EQUAL => Shift(yy_state_1982) _ => Error } } -fn yy_state_1594(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1982(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACE => Shift(yy_state_1595) + T_LBRACE => Shift(yy_state_1983) _ => Error } } -fn yy_state_1595(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1983(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_ATTRIBUTE => Shift(yy_state_946) - NT_enum_constructor => Shift(yy_state_1000) - NT_non_empty_list_attribute_ => Shift(yy_state_1004) - T_UIDENT => Shift(yy_state_1024) - NT_non_empty_list_semis_enum_constructor_ => Shift(yy_state_1027) - NT_list_semis_enum_constructor_ => Shift(yy_state_1596) - T_RBRACE => Reduce(0, NT_list_semis_enum_constructor_, yy_action_317) + T_ATTRIBUTE => Shift(yy_state_1168) + NT_enum_constructor => Shift(yy_state_1227) + NT_non_empty_list_attribute_ => Shift(yy_state_1231) + T_UIDENT => Shift(yy_state_1251) + NT_non_empty_list_semis_enum_constructor_ => Shift(yy_state_1254) + NT_list_semis_enum_constructor_ => Shift(yy_state_1984) + T_RBRACE => Reduce(0, NT_list_semis_enum_constructor_, yy_action_381) _ => Error } } -fn yy_state_1596(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1984(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RBRACE => Shift(yy_state_1597) + T_RBRACE => Shift(yy_state_1985) _ => Error } } -fn yy_state_1597(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1985(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_DERIVE => Shift(yy_state_1171) - NT_deriving_directive_list => Shift(yy_state_1598) - T_EOF | T_SEMI => Reduce(0, NT_deriving_directive_list, yy_action_233) + T_DERIVE => Shift(yy_state_1440) + NT_deriving_directive_list => Shift(yy_state_1986) + T_EOF | T_SEMI => Reduce(0, NT_deriving_directive_list, yy_action_288) _ => Error } } -fn yy_state_1598(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(11, NT_structure_item, yy_action_117) +fn yy_state_1986(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(10, NT_structure_item, yy_action_128) } -fn yy_state_1599(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1987(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACKET => Shift(yy_state_950) - NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__ => Shift(yy_state_961) - NT_optional_type_parameters_no_constraints => Shift(yy_state_1600) - T_PLUS_EQUAL | T_LBRACE => Reduce(0, NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__, yy_action_347) + T_LBRACKET => Shift(yy_state_1172) + NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__ => Shift(yy_state_1183) + NT_optional_type_parameters_no_constraints => Shift(yy_state_1988) + T_PLUS_EQUAL | T_LBRACE => Reduce(0, NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__, yy_action_415) _ => Error } } -fn yy_state_1600(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1988(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACE => Shift(yy_state_1601) - T_PLUS_EQUAL => Reduce(2, NT_extenum_extension_target, yy_action_223) + T_LBRACE => Shift(yy_state_1989) + T_PLUS_EQUAL => Reduce(2, NT_extenum_extension_target, yy_action_278) _ => Error } } -fn yy_state_1601(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1989(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_ATTRIBUTE => Shift(yy_state_946) - NT_enum_constructor => Shift(yy_state_1000) - NT_non_empty_list_attribute_ => Shift(yy_state_1004) - T_UIDENT => Shift(yy_state_1024) - NT_non_empty_list_semis_enum_constructor_ => Shift(yy_state_1027) - NT_list_semis_enum_constructor_ => Shift(yy_state_1602) - T_RBRACE => Reduce(0, NT_list_semis_enum_constructor_, yy_action_317) + T_ATTRIBUTE => Shift(yy_state_1168) + NT_enum_constructor => Shift(yy_state_1227) + NT_non_empty_list_attribute_ => Shift(yy_state_1231) + T_UIDENT => Shift(yy_state_1251) + NT_non_empty_list_semis_enum_constructor_ => Shift(yy_state_1254) + NT_list_semis_enum_constructor_ => Shift(yy_state_1990) + T_RBRACE => Reduce(0, NT_list_semis_enum_constructor_, yy_action_381) _ => Error } } -fn yy_state_1602(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1990(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RBRACE => Shift(yy_state_1603) + T_RBRACE => Shift(yy_state_1991) _ => Error } } -fn yy_state_1603(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1991(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_DERIVE => Shift(yy_state_1171) - NT_deriving_directive_list => Shift(yy_state_1604) - T_EOF | T_SEMI => Reduce(0, NT_deriving_directive_list, yy_action_233) + T_DERIVE => Shift(yy_state_1440) + NT_deriving_directive_list => Shift(yy_state_1992) + T_EOF | T_SEMI => Reduce(0, NT_deriving_directive_list, yy_action_288) _ => Error } } -fn yy_state_1604(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(11, NT_structure_item, yy_action_116) +fn yy_state_1992(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(10, NT_structure_item, yy_action_127) } -fn yy_state_1605(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1993(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_UIDENT => Shift(yy_state_1606) + T_UIDENT => Shift(yy_state_1994) _ => Error } } -fn yy_state_1606(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1994(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_COLON => Shift(yy_state_1607) - T_EQUAL => Reduce(6, NT_val_header, yy_action_115) + T_COLON => Shift(yy_state_1995) + T_EQUAL => Reduce(5, NT_val_header, yy_action_126) _ => Error } } -fn yy_state_1607(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1995(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_ASYNC => Shift(yy_state_52) - T_UNDERSCORE => Shift(yy_state_57) - T_AMPER => Shift(yy_state_58) - T_PACKAGE_NAME => Shift(yy_state_60) - T_UIDENT => Shift(yy_state_67) - T_LPAREN => Shift(yy_state_71) - NT_simple_type => Shift(yy_state_97) - NT_type_ => Shift(yy_state_1608) + T_ASYNC => Shift(yy_state_65) + T_UNDERSCORE => Shift(yy_state_70) + T_AMPER => Shift(yy_state_71) + T_PACKAGE_NAME => Shift(yy_state_73) + T_UIDENT => Shift(yy_state_80) + T_LPAREN => Shift(yy_state_84) + NT_simple_type => Shift(yy_state_110) + NT_type_ => Shift(yy_state_1996) _ => Error } } -fn yy_state_1608(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(8, NT_val_header, yy_action_114) +fn yy_state_1996(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(7, NT_val_header, yy_action_125) } -fn yy_state_1609(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1997(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LIDENT => Shift(yy_state_1610) + T_EXTEND => Shift(yy_state_1998) + T_LIDENT => Shift(yy_state_2001) _ => Error } } -fn yy_state_1610(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1998(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_COLON => Shift(yy_state_1611) - T_EQUAL => Reduce(6, NT_val_header, yy_action_113) + T_COLON => Shift(yy_state_1999) + T_EQUAL => Reduce(5, NT_val_header, yy_action_124) _ => Error } } -fn yy_state_1611(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_1999(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_ASYNC => Shift(yy_state_52) - T_UNDERSCORE => Shift(yy_state_57) - T_AMPER => Shift(yy_state_58) - T_PACKAGE_NAME => Shift(yy_state_60) - T_UIDENT => Shift(yy_state_67) - T_LPAREN => Shift(yy_state_71) - NT_simple_type => Shift(yy_state_97) - NT_type_ => Shift(yy_state_1612) + T_ASYNC => Shift(yy_state_65) + T_UNDERSCORE => Shift(yy_state_70) + T_AMPER => Shift(yy_state_71) + T_PACKAGE_NAME => Shift(yy_state_73) + T_UIDENT => Shift(yy_state_80) + T_LPAREN => Shift(yy_state_84) + NT_simple_type => Shift(yy_state_110) + NT_type_ => Shift(yy_state_2000) _ => Error } } -fn yy_state_1612(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(8, NT_val_header, yy_action_112) +fn yy_state_2000(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(7, NT_val_header, yy_action_123) } -fn yy_state_1613(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2001(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LPAREN => Shift(yy_state_143) - NT_parameters => Shift(yy_state_1076) - NT_option_parameters_ => Shift(yy_state_1614) - T_EOF | T_RAISE | T_SEMI | T_THIN_ARROW | T_NORAISE => Reduce(0, NT_option_parameters_, yy_action_275) + T_COLON => Shift(yy_state_2002) + T_EQUAL => Reduce(5, NT_val_header, yy_action_122) _ => Error } } -fn yy_state_1614(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2002(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_error_annotation => Shift(yy_state_50) - T_THIN_ARROW => Shift(yy_state_51) - T_NORAISE => Shift(yy_state_78) - T_RAISE => Shift(yy_state_79) - NT_func_return_type => Shift(yy_state_1615) - T_EOF | T_SEMI => Reduce(0, NT_func_return_type, yy_action_862) + T_ASYNC => Shift(yy_state_65) + T_UNDERSCORE => Shift(yy_state_70) + T_AMPER => Shift(yy_state_71) + T_PACKAGE_NAME => Shift(yy_state_73) + T_UIDENT => Shift(yy_state_80) + T_LPAREN => Shift(yy_state_84) + NT_simple_type => Shift(yy_state_110) + NT_type_ => Shift(yy_state_2003) _ => Error } } -fn yy_state_1615(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(7, NT_declare_fun_header, yy_action_111) +fn yy_state_2003(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(7, NT_val_header, yy_action_120) } -fn yy_state_1616(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2004(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_FN => Shift(yy_state_1313) - NT_fun_header_generic => Shift(yy_state_1617) + T_LPAREN => Shift(yy_state_157) + NT_parameters => Shift(yy_state_1315) + NT_option_parameters_ => Shift(yy_state_2005) + T_EOF | T_RAISE | T_SEMI | T_THIN_ARROW | T_NORAISE => Reduce(0, NT_option_parameters_, yy_action_336) _ => Error } } -fn yy_state_1617(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2005(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LPAREN => Shift(yy_state_143) - NT_parameters => Shift(yy_state_1076) - NT_option_parameters_ => Shift(yy_state_1618) - T_EOF | T_RAISE | T_SEMI | T_THIN_ARROW | T_NORAISE => Reduce(0, NT_option_parameters_, yy_action_275) + NT_error_annotation => Shift(yy_state_63) + T_THIN_ARROW => Shift(yy_state_64) + T_NORAISE => Shift(yy_state_91) + T_RAISE => Shift(yy_state_92) + NT_func_return_type => Shift(yy_state_2006) + T_EOF | T_SEMI => Reduce(0, NT_func_return_type, yy_action_1023) _ => Error } } -fn yy_state_1618(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2006(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(6, NT_declare_fun_header, yy_action_119) +} + +fn yy_state_2007(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_error_annotation => Shift(yy_state_50) - T_THIN_ARROW => Shift(yy_state_51) - T_NORAISE => Shift(yy_state_78) - T_RAISE => Shift(yy_state_79) - NT_func_return_type => Shift(yy_state_1619) - T_EOF | T_SEMI => Reduce(0, NT_func_return_type, yy_action_862) + T_FN => Shift(yy_state_1627) + NT_fun_header_generic => Shift(yy_state_2008) _ => Error } } -fn yy_state_1619(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(8, NT_declare_fun_header, yy_action_110) -} - -fn yy_state_1620(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2008(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_FN => Shift(yy_state_1313) - T_SUBERROR => Shift(yy_state_1621) - T_TYPE => Shift(yy_state_1623) - T_IMPL => Shift(yy_state_1626) - T_TRAIT => Shift(yy_state_1631) - T_EXTENUM => Shift(yy_state_1637) - T_CONST => Shift(yy_state_1650) - T_LET => Shift(yy_state_1654) - NT_fun_header_generic => Shift(yy_state_1658) - T_ASYNC => Shift(yy_state_1661) + T_LPAREN => Shift(yy_state_157) + NT_parameters => Shift(yy_state_1315) + NT_option_parameters_ => Shift(yy_state_2009) + T_EOF | T_RAISE | T_SEMI | T_THIN_ARROW | T_NORAISE => Reduce(0, NT_option_parameters_, yy_action_336) _ => Error } } -fn yy_state_1621(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2009(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_UIDENT => Shift(yy_state_1622) + NT_error_annotation => Shift(yy_state_63) + T_THIN_ARROW => Shift(yy_state_64) + T_NORAISE => Shift(yy_state_91) + T_RAISE => Shift(yy_state_92) + NT_func_return_type => Shift(yy_state_2010) + T_EOF | T_SEMI => Reduce(0, NT_func_return_type, yy_action_1023) _ => Error } } -fn yy_state_1622(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(5, NT_suberror_header, yy_action_109) +fn yy_state_2010(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(7, NT_declare_fun_header, yy_action_118) } -fn yy_state_1623(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2011(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_UIDENT => Shift(yy_state_1624) + T_LPAREN => Shift(yy_state_157) + NT_parameters => Shift(yy_state_1315) + NT_option_parameters_ => Shift(yy_state_2012) + T_EOF | T_RAISE | T_SEMI | T_THIN_ARROW | T_NORAISE => Reduce(0, NT_option_parameters_, yy_action_336) _ => Error } } -fn yy_state_1624(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2012(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACKET => Shift(yy_state_950) - NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__ => Shift(yy_state_961) - NT_optional_type_parameters_no_constraints => Shift(yy_state_1625) - T_EOF | T_DERIVE | T_EQUAL | T_SEMI => Reduce(0, NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__, yy_action_347) + NT_error_annotation => Shift(yy_state_63) + T_THIN_ARROW => Shift(yy_state_64) + T_NORAISE => Shift(yy_state_91) + T_RAISE => Shift(yy_state_92) + NT_func_return_type => Shift(yy_state_2013) + T_EOF | T_SEMI => Reduce(0, NT_func_return_type, yy_action_1023) _ => Error } } -fn yy_state_1625(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(6, NT_type_header, yy_action_108) +fn yy_state_2013(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(5, NT_declare_fun_header, yy_action_117) } -fn yy_state_1626(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2014(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_type_parameters => Shift(yy_state_996) - NT_option_type_parameters_ => Shift(yy_state_1036) - T_LBRACKET => Shift(yy_state_1037) - NT_optional_type_parameters => Shift(yy_state_1627) - T_UIDENT | T_AMPER | T_PACKAGE_NAME => Reduce(0, NT_option_type_parameters_, yy_action_319) + T_FN => Shift(yy_state_1627) + NT_fun_header_generic => Shift(yy_state_2015) _ => Error } } -fn yy_state_1627(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2015(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_AMPER => Shift(yy_state_19) - T_PACKAGE_NAME => Shift(yy_state_21) - T_UIDENT => Shift(yy_state_24) - NT_qual_ident_ty => Shift(yy_state_25) - NT_type_name => Shift(yy_state_1628) + T_LPAREN => Shift(yy_state_157) + NT_parameters => Shift(yy_state_1315) + NT_option_parameters_ => Shift(yy_state_2016) + T_EOF | T_RAISE | T_SEMI | T_THIN_ARROW | T_NORAISE => Reduce(0, NT_option_parameters_, yy_action_336) _ => Error } } -fn yy_state_1628(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2016(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_FOR => Shift(yy_state_1629) + NT_error_annotation => Shift(yy_state_63) + T_THIN_ARROW => Shift(yy_state_64) + T_NORAISE => Shift(yy_state_91) + T_RAISE => Shift(yy_state_92) + NT_func_return_type => Shift(yy_state_2017) + T_EOF | T_SEMI => Reduce(0, NT_func_return_type, yy_action_1023) _ => Error } } -fn yy_state_1629(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2017(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(6, NT_declare_fun_header, yy_action_116) +} + +fn yy_state_2018(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_ASYNC => Shift(yy_state_52) - T_UNDERSCORE => Shift(yy_state_57) - T_AMPER => Shift(yy_state_58) - T_PACKAGE_NAME => Shift(yy_state_60) - T_UIDENT => Shift(yy_state_67) - T_LPAREN => Shift(yy_state_71) - NT_simple_type => Shift(yy_state_97) - NT_type_ => Shift(yy_state_1630) + T_LPAREN => Shift(yy_state_1539) + NT_pub_attr => Shift(yy_state_2019) + T_EXTERN | T_STRUCT | T_ENUM | T_TRAIT | T_IMPL | T_ASYNC | T_FN | T_LET | T_CONST | T_USING | T_TYPE | T_SUBERROR | T_ENUMVIEW | T_EXTENUM => Reduce(0, NT_pub_attr, yy_action_261) _ => Error } } -fn yy_state_1630(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(8, NT_structure_item, yy_action_107) +fn yy_state_2019(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_FN => Shift(yy_state_1627) + T_ENUM => Shift(yy_state_2020) + T_STRUCT => Shift(yy_state_2023) + T_SUBERROR => Shift(yy_state_2026) + T_TYPE => Shift(yy_state_2028) + T_USING => Shift(yy_state_2031) + T_ENUMVIEW => Shift(yy_state_2036) + T_IMPL => Shift(yy_state_2051) + T_TRAIT => Shift(yy_state_2076) + T_EXTENUM => Shift(yy_state_2082) + T_CONST => Shift(yy_state_2095) + T_LET => Shift(yy_state_2099) + T_EXTERN => Shift(yy_state_2106) + NT_fun_header_generic => Shift(yy_state_2113) + T_ASYNC => Shift(yy_state_2116) + _ => Error + } } -fn yy_state_1631(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2020(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_UIDENT => Shift(yy_state_1632) + T_UIDENT => Shift(yy_state_2021) _ => Error } } -fn yy_state_1632(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2021(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_COLON => Shift(yy_state_1081) - NT_option_preceded_COLON_separated_nonempty_list_PLUS_tvar_constraint___ => Shift(yy_state_1633) - T_LBRACE => Reduce(0, NT_option_preceded_COLON_separated_nonempty_list_PLUS_tvar_constraint___, yy_action_272) + T_LBRACKET => Shift(yy_state_1172) + NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__ => Shift(yy_state_1183) + NT_optional_type_parameters_no_constraints => Shift(yy_state_2022) + T_LBRACE => Reduce(0, NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__, yy_action_415) _ => Error } } -fn yy_state_1633(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2022(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(6, NT_enum_header, yy_action_115) +} + +fn yy_state_2023(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACE => Shift(yy_state_1634) + T_UIDENT => Shift(yy_state_2024) _ => Error } } -fn yy_state_1634(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2024(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_ATTRIBUTE => Shift(yy_state_946) - NT_trait_method_decl => Shift(yy_state_1085) - NT_non_empty_list_attribute_ => Shift(yy_state_1089) - T_FN => Shift(yy_state_1124) - NT_trait_method_fn_header => Shift(yy_state_1126) - T_ASYNC => Shift(yy_state_1133) - NT_non_empty_list_semis_trait_method_decl_ => Shift(yy_state_1141) - NT_list_semis_trait_method_decl_ => Shift(yy_state_1635) - T_LIDENT => Reduce(0, NT_trait_method_fn_header, yy_action_269) - T_RBRACE => Reduce(0, NT_list_semis_trait_method_decl_, yy_action_268) + T_LBRACKET => Shift(yy_state_1172) + NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__ => Shift(yy_state_1183) + NT_optional_type_parameters_no_constraints => Shift(yy_state_2025) + T_LPAREN | T_LBRACE => Reduce(0, NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__, yy_action_415) _ => Error } } -fn yy_state_1635(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2025(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(6, NT_struct_header, yy_action_114) +} + +fn yy_state_2026(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RBRACE => Shift(yy_state_1636) + T_UIDENT => Shift(yy_state_2027) _ => Error } } -fn yy_state_1636(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(9, NT_structure_item, yy_action_106) +fn yy_state_2027(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(5, NT_suberror_header, yy_action_113) } -fn yy_state_1637(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2028(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_PACKAGE_NAME => Shift(yy_state_1163) - NT_extenum_extension_target => Shift(yy_state_1638) - T_UIDENT => Shift(yy_state_1644) + T_UIDENT => Shift(yy_state_2029) _ => Error } } -fn yy_state_1638(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2029(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_PLUS_EQUAL => Shift(yy_state_1639) + T_LBRACKET => Shift(yy_state_1172) + NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__ => Shift(yy_state_1183) + NT_optional_type_parameters_no_constraints => Shift(yy_state_2030) + T_EOF | T_DERIVE | T_EQUAL | T_SEMI => Reduce(0, NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__, yy_action_415) _ => Error } } -fn yy_state_1639(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2030(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(6, NT_type_header, yy_action_112) +} + +fn yy_state_2031(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACE => Shift(yy_state_1640) + T_PACKAGE_NAME => Shift(yy_state_2032) _ => Error } } -fn yy_state_1640(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2032(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_ATTRIBUTE => Shift(yy_state_946) - NT_enum_constructor => Shift(yy_state_1000) - NT_non_empty_list_attribute_ => Shift(yy_state_1004) - T_UIDENT => Shift(yy_state_1024) - NT_non_empty_list_semis_enum_constructor_ => Shift(yy_state_1027) - NT_list_semis_enum_constructor_ => Shift(yy_state_1641) - T_RBRACE => Reduce(0, NT_list_semis_enum_constructor_, yy_action_317) + T_LBRACE => Shift(yy_state_2033) _ => Error } } -fn yy_state_1641(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2033(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RBRACE => Shift(yy_state_1642) + NT_using_binder => Shift(yy_state_1195) + NT_non_empty_list_commas_rev_using_binder_ => Shift(yy_state_1196) + T_TRAIT => Shift(yy_state_1200) + T_TYPE => Shift(yy_state_1204) + T_UIDENT => Shift(yy_state_1208) + T_EXTEND => Shift(yy_state_1211) + T_LIDENT => Shift(yy_state_1215) + NT_non_empty_list_commas_using_binder_ => Shift(yy_state_1219) + NT_list_commas_using_binder_ => Shift(yy_state_2034) + T_RBRACE => Reduce(0, NT_list_commas_using_binder_, yy_action_401) _ => Error } } -fn yy_state_1642(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2034(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_DERIVE => Shift(yy_state_1171) - NT_deriving_directive_list => Shift(yy_state_1643) - T_EOF | T_SEMI => Reduce(0, NT_deriving_directive_list, yy_action_233) + T_RBRACE => Shift(yy_state_2035) _ => Error } } -fn yy_state_1643(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(10, NT_structure_item, yy_action_105) +fn yy_state_2035(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(8, NT_structure_item, yy_action_111) } -fn yy_state_1644(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2036(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACKET => Shift(yy_state_950) - NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__ => Shift(yy_state_961) - NT_optional_type_parameters_no_constraints => Shift(yy_state_1645) - T_PLUS_EQUAL | T_LBRACE => Reduce(0, NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__, yy_action_347) + NT_type_parameters => Shift(yy_state_1223) + NT_option_type_parameters_ => Shift(yy_state_1266) + T_LBRACKET => Shift(yy_state_1267) + NT_optional_type_parameters => Shift(yy_state_2037) + T_UIDENT => Reduce(0, NT_option_type_parameters_, yy_action_383) _ => Error } } -fn yy_state_1645(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2037(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACE => Shift(yy_state_1646) - T_PLUS_EQUAL => Reduce(2, NT_extenum_extension_target, yy_action_223) + T_UIDENT => Shift(yy_state_2038) _ => Error } } -fn yy_state_1646(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2038(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_ATTRIBUTE => Shift(yy_state_946) - NT_enum_constructor => Shift(yy_state_1000) - NT_non_empty_list_attribute_ => Shift(yy_state_1004) - T_UIDENT => Shift(yy_state_1024) - NT_non_empty_list_semis_enum_constructor_ => Shift(yy_state_1027) - NT_list_semis_enum_constructor_ => Shift(yy_state_1647) - T_RBRACE => Reduce(0, NT_list_semis_enum_constructor_, yy_action_317) + T_LBRACE => Shift(yy_state_2039) _ => Error } } -fn yy_state_1647(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2039(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RBRACE => Shift(yy_state_1648) + T_ATTRIBUTE => Shift(yy_state_1168) + NT_enum_constructor => Shift(yy_state_1227) + NT_non_empty_list_attribute_ => Shift(yy_state_1231) + T_UIDENT => Shift(yy_state_1251) + NT_non_empty_list_semis_enum_constructor_ => Shift(yy_state_1254) + NT_list_semis_enum_constructor_ => Shift(yy_state_2040) + T_RBRACE => Reduce(0, NT_list_semis_enum_constructor_, yy_action_381) _ => Error } } -fn yy_state_1648(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2040(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_DERIVE => Shift(yy_state_1171) - NT_deriving_directive_list => Shift(yy_state_1649) - T_EOF | T_SEMI => Reduce(0, NT_deriving_directive_list, yy_action_233) + T_RBRACE => Shift(yy_state_2041) _ => Error } } -fn yy_state_1649(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(10, NT_structure_item, yy_action_104) +fn yy_state_2041(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_FOR => Shift(yy_state_2042) + _ => Error + } } -fn yy_state_1650(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2042(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_UIDENT => Shift(yy_state_1651) + T_ASYNC => Shift(yy_state_65) + T_UNDERSCORE => Shift(yy_state_70) + T_AMPER => Shift(yy_state_71) + T_PACKAGE_NAME => Shift(yy_state_73) + T_UIDENT => Shift(yy_state_80) + T_LPAREN => Shift(yy_state_84) + NT_simple_type => Shift(yy_state_110) + NT_type_ => Shift(yy_state_2043) _ => Error } } -fn yy_state_1651(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2043(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_COLON => Shift(yy_state_1652) - T_EQUAL => Reduce(5, NT_val_header, yy_action_103) + T_WITH => Shift(yy_state_2044) _ => Error } } -fn yy_state_1652(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2044(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_ASYNC => Shift(yy_state_52) - T_UNDERSCORE => Shift(yy_state_57) - T_AMPER => Shift(yy_state_58) - T_PACKAGE_NAME => Shift(yy_state_60) - T_UIDENT => Shift(yy_state_67) - T_LPAREN => Shift(yy_state_71) - NT_simple_type => Shift(yy_state_97) - NT_type_ => Shift(yy_state_1653) + T_EXTEND => Shift(yy_state_2045) + T_LIDENT => Shift(yy_state_2048) _ => Error } } -fn yy_state_1653(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(7, NT_val_header, yy_action_102) +fn yy_state_2045(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_LPAREN => Shift(yy_state_157) + NT_parameters => Shift(yy_state_2046) + _ => Error + } } -fn yy_state_1654(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2046(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LIDENT => Shift(yy_state_1655) + T_LBRACE => Shift(yy_state_133) + NT_block_expr => Shift(yy_state_2047) _ => Error } } -fn yy_state_1655(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2047(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(15, NT_structure_item, yy_action_110) +} + +fn yy_state_2048(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_COLON => Shift(yy_state_1656) - T_EQUAL => Reduce(5, NT_val_header, yy_action_101) + T_LPAREN => Shift(yy_state_157) + NT_parameters => Shift(yy_state_2049) _ => Error } } -fn yy_state_1656(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2049(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_ASYNC => Shift(yy_state_52) - T_UNDERSCORE => Shift(yy_state_57) - T_AMPER => Shift(yy_state_58) - T_PACKAGE_NAME => Shift(yy_state_60) - T_UIDENT => Shift(yy_state_67) - T_LPAREN => Shift(yy_state_71) - NT_simple_type => Shift(yy_state_97) - NT_type_ => Shift(yy_state_1657) + T_LBRACE => Shift(yy_state_133) + NT_block_expr => Shift(yy_state_2050) _ => Error } } -fn yy_state_1657(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(7, NT_val_header, yy_action_99) +fn yy_state_2050(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(15, NT_structure_item, yy_action_109) } -fn yy_state_1658(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2051(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LPAREN => Shift(yy_state_143) - NT_parameters => Shift(yy_state_1076) - NT_option_parameters_ => Shift(yy_state_1659) - T_EOF | T_RAISE | T_SEMI | T_THIN_ARROW | T_NORAISE => Reduce(0, NT_option_parameters_, yy_action_275) + NT_type_parameters => Shift(yy_state_1223) + NT_option_type_parameters_ => Shift(yy_state_1266) + T_LBRACKET => Shift(yy_state_1267) + NT_optional_type_parameters => Shift(yy_state_2052) + T_UIDENT | T_AMPER | T_PACKAGE_NAME => Reduce(0, NT_option_type_parameters_, yy_action_383) _ => Error } } -fn yy_state_1659(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2052(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_error_annotation => Shift(yy_state_50) - T_THIN_ARROW => Shift(yy_state_51) - T_NORAISE => Shift(yy_state_78) - T_RAISE => Shift(yy_state_79) - NT_func_return_type => Shift(yy_state_1660) - T_EOF | T_SEMI => Reduce(0, NT_func_return_type, yy_action_862) + T_AMPER => Shift(yy_state_20) + T_PACKAGE_NAME => Shift(yy_state_22) + T_UIDENT => Shift(yy_state_25) + NT_qual_ident_ty => Shift(yy_state_26) + NT_type_name => Shift(yy_state_2053) _ => Error } } -fn yy_state_1660(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(6, NT_declare_fun_header, yy_action_98) -} - -fn yy_state_1661(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2053(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_FN => Shift(yy_state_1313) - NT_fun_header_generic => Shift(yy_state_1662) + T_WITH => Shift(yy_state_2054) + T_FOR => Shift(yy_state_2064) _ => Error } } -fn yy_state_1662(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2054(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LPAREN => Shift(yy_state_143) - NT_parameters => Shift(yy_state_1076) - NT_option_parameters_ => Shift(yy_state_1663) - T_EOF | T_RAISE | T_SEMI | T_THIN_ARROW | T_NORAISE => Reduce(0, NT_option_parameters_, yy_action_275) + T_FN => Shift(yy_state_1286) + NT_impl_optional_fn => Shift(yy_state_2055) + T_LIDENT | T_EXTEND => Reduce(0, NT_impl_optional_fn, yy_action_348) _ => Error } } -fn yy_state_1663(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2055(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_error_annotation => Shift(yy_state_50) - T_THIN_ARROW => Shift(yy_state_51) - T_NORAISE => Shift(yy_state_78) - T_RAISE => Shift(yy_state_79) - NT_func_return_type => Shift(yy_state_1664) - T_EOF | T_SEMI => Reduce(0, NT_func_return_type, yy_action_862) + T_EXTEND => Shift(yy_state_2056) + T_LIDENT => Shift(yy_state_2060) _ => Error } } -fn yy_state_1664(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(7, NT_declare_fun_header, yy_action_97) +fn yy_state_2056(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_LPAREN => Shift(yy_state_157) + NT_parameters => Shift(yy_state_2057) + _ => Error + } } -fn yy_state_1665(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2057(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LPAREN => Shift(yy_state_143) - NT_parameters => Shift(yy_state_1076) - NT_option_parameters_ => Shift(yy_state_1666) - T_EOF | T_RAISE | T_SEMI | T_THIN_ARROW | T_NORAISE => Reduce(0, NT_option_parameters_, yy_action_275) + NT_error_annotation => Shift(yy_state_63) + T_THIN_ARROW => Shift(yy_state_64) + T_NORAISE => Shift(yy_state_91) + T_RAISE => Shift(yy_state_92) + NT_func_return_type => Shift(yy_state_2058) + T_EQUAL | T_LBRACE => Reduce(0, NT_func_return_type, yy_action_1023) _ => Error } } -fn yy_state_1666(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2058(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_error_annotation => Shift(yy_state_50) - T_THIN_ARROW => Shift(yy_state_51) - T_NORAISE => Shift(yy_state_78) - T_RAISE => Shift(yy_state_79) - NT_func_return_type => Shift(yy_state_1667) - T_EOF | T_SEMI => Reduce(0, NT_func_return_type, yy_action_862) + T_LBRACE => Shift(yy_state_133) + T_EQUAL => Shift(yy_state_1293) + NT_block_expr => Shift(yy_state_1295) + NT_impl_body => Shift(yy_state_2059) _ => Error } } -fn yy_state_1667(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(5, NT_declare_fun_header, yy_action_96) +fn yy_state_2059(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(12, NT_structure_item, yy_action_108) } -fn yy_state_1668(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2060(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_FN => Shift(yy_state_1313) - NT_fun_header_generic => Shift(yy_state_1669) + T_LPAREN => Shift(yy_state_157) + NT_parameters => Shift(yy_state_2061) _ => Error } } -fn yy_state_1669(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2061(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LPAREN => Shift(yy_state_143) - NT_parameters => Shift(yy_state_1076) - NT_option_parameters_ => Shift(yy_state_1670) - T_EOF | T_RAISE | T_SEMI | T_THIN_ARROW | T_NORAISE => Reduce(0, NT_option_parameters_, yy_action_275) + NT_error_annotation => Shift(yy_state_63) + T_THIN_ARROW => Shift(yy_state_64) + T_NORAISE => Shift(yy_state_91) + T_RAISE => Shift(yy_state_92) + NT_func_return_type => Shift(yy_state_2062) + T_EQUAL | T_LBRACE => Reduce(0, NT_func_return_type, yy_action_1023) _ => Error } } -fn yy_state_1670(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2062(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_error_annotation => Shift(yy_state_50) - T_THIN_ARROW => Shift(yy_state_51) - T_NORAISE => Shift(yy_state_78) - T_RAISE => Shift(yy_state_79) - NT_func_return_type => Shift(yy_state_1671) - T_EOF | T_SEMI => Reduce(0, NT_func_return_type, yy_action_862) + T_LBRACE => Shift(yy_state_133) + T_EQUAL => Shift(yy_state_1293) + NT_block_expr => Shift(yy_state_1295) + NT_impl_body => Shift(yy_state_2063) _ => Error } } -fn yy_state_1671(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(6, NT_declare_fun_header, yy_action_95) +fn yy_state_2063(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(12, NT_structure_item, yy_action_107) } -fn yy_state_1672(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2064(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LPAREN => Shift(yy_state_1247) - NT_pub_attr => Shift(yy_state_1673) - T_EXTERN | T_STRUCT | T_ENUM | T_TRAIT | T_IMPL | T_ASYNC | T_FN | T_LET | T_CONST | T_USING | T_TYPE | T_SUBERROR | T_ENUMVIEW | T_EXTENUM => Reduce(0, NT_pub_attr, yy_action_210) + T_ASYNC => Shift(yy_state_65) + T_UNDERSCORE => Shift(yy_state_70) + T_AMPER => Shift(yy_state_71) + T_PACKAGE_NAME => Shift(yy_state_73) + T_UIDENT => Shift(yy_state_80) + T_LPAREN => Shift(yy_state_84) + NT_simple_type => Shift(yy_state_110) + NT_type_ => Shift(yy_state_2065) _ => Error } } -fn yy_state_1673(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2065(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_FN => Shift(yy_state_1313) - T_ENUM => Shift(yy_state_1674) - T_STRUCT => Shift(yy_state_1677) - T_SUBERROR => Shift(yy_state_1680) - T_TYPE => Shift(yy_state_1682) - T_USING => Shift(yy_state_1685) - T_ENUMVIEW => Shift(yy_state_1690) - T_IMPL => Shift(yy_state_1702) - T_TRAIT => Shift(yy_state_1719) - T_EXTENUM => Shift(yy_state_1725) - T_CONST => Shift(yy_state_1738) - T_LET => Shift(yy_state_1742) - T_EXTERN => Shift(yy_state_1746) - NT_fun_header_generic => Shift(yy_state_1753) - T_ASYNC => Shift(yy_state_1756) + T_WITH => Shift(yy_state_2066) + T_EOF | T_SEMI => Reduce(8, NT_structure_item, yy_action_106) _ => Error } } -fn yy_state_1674(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2066(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_UIDENT => Shift(yy_state_1675) + T_FN => Shift(yy_state_1286) + NT_impl_optional_fn => Shift(yy_state_2067) + T_LIDENT | T_EXTEND => Reduce(0, NT_impl_optional_fn, yy_action_348) _ => Error } } -fn yy_state_1675(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2067(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACKET => Shift(yy_state_950) - NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__ => Shift(yy_state_961) - NT_optional_type_parameters_no_constraints => Shift(yy_state_1676) - T_LBRACE => Reduce(0, NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__, yy_action_347) + T_EXTEND => Shift(yy_state_2068) + T_LIDENT => Shift(yy_state_2072) _ => Error } } -fn yy_state_1676(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(6, NT_enum_header, yy_action_94) +fn yy_state_2068(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_LPAREN => Shift(yy_state_157) + NT_parameters => Shift(yy_state_2069) + _ => Error + } } -fn yy_state_1677(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2069(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_UIDENT => Shift(yy_state_1678) + NT_error_annotation => Shift(yy_state_63) + T_THIN_ARROW => Shift(yy_state_64) + T_NORAISE => Shift(yy_state_91) + T_RAISE => Shift(yy_state_92) + NT_func_return_type => Shift(yy_state_2070) + T_EQUAL | T_LBRACE => Reduce(0, NT_func_return_type, yy_action_1023) _ => Error } } -fn yy_state_1678(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2070(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACKET => Shift(yy_state_950) - NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__ => Shift(yy_state_961) - NT_optional_type_parameters_no_constraints => Shift(yy_state_1679) - T_LPAREN | T_LBRACE => Reduce(0, NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__, yy_action_347) + T_LBRACE => Shift(yy_state_133) + T_EQUAL => Shift(yy_state_1293) + NT_block_expr => Shift(yy_state_1295) + NT_impl_body => Shift(yy_state_2071) _ => Error } } -fn yy_state_1679(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(6, NT_struct_header, yy_action_93) +fn yy_state_2071(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(14, NT_structure_item, yy_action_105) } -fn yy_state_1680(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2072(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_UIDENT => Shift(yy_state_1681) + T_LPAREN => Shift(yy_state_157) + NT_parameters => Shift(yy_state_2073) _ => Error } } -fn yy_state_1681(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(5, NT_suberror_header, yy_action_92) -} - -fn yy_state_1682(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2073(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_UIDENT => Shift(yy_state_1683) + NT_error_annotation => Shift(yy_state_63) + T_THIN_ARROW => Shift(yy_state_64) + T_NORAISE => Shift(yy_state_91) + T_RAISE => Shift(yy_state_92) + NT_func_return_type => Shift(yy_state_2074) + T_EQUAL | T_LBRACE => Reduce(0, NT_func_return_type, yy_action_1023) _ => Error } } -fn yy_state_1683(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2074(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACKET => Shift(yy_state_950) - NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__ => Shift(yy_state_961) - NT_optional_type_parameters_no_constraints => Shift(yy_state_1684) - T_EOF | T_DERIVE | T_EQUAL | T_SEMI => Reduce(0, NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__, yy_action_347) + T_LBRACE => Shift(yy_state_133) + T_EQUAL => Shift(yy_state_1293) + NT_block_expr => Shift(yy_state_1295) + NT_impl_body => Shift(yy_state_2075) _ => Error } } -fn yy_state_1684(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(6, NT_type_header, yy_action_91) +fn yy_state_2075(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(14, NT_structure_item, yy_action_104) } -fn yy_state_1685(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2076(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_PACKAGE_NAME => Shift(yy_state_1686) + T_UIDENT => Shift(yy_state_2077) _ => Error } } -fn yy_state_1686(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2077(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACE => Shift(yy_state_1687) + T_COLON => Shift(yy_state_1320) + NT_option_preceded_COLON_separated_nonempty_list_PLUS_tvar_constraint___ => Shift(yy_state_2078) + T_LBRACE => Reduce(0, NT_option_preceded_COLON_separated_nonempty_list_PLUS_tvar_constraint___, yy_action_333) _ => Error } } -fn yy_state_1687(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2078(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_LBRACE => Shift(yy_state_2079) + _ => Error + } +} + +fn yy_state_2079(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_using_binder => Shift(yy_state_973) - NT_non_empty_list_commas_rev_using_binder_ => Shift(yy_state_974) - T_TRAIT => Shift(yy_state_978) - T_TYPE => Shift(yy_state_982) - T_UIDENT => Shift(yy_state_986) - T_LIDENT => Shift(yy_state_989) - NT_non_empty_list_commas_using_binder_ => Shift(yy_state_992) - NT_list_commas_using_binder_ => Shift(yy_state_1688) - T_RBRACE => Reduce(0, NT_list_commas_using_binder_, yy_action_333) + T_ATTRIBUTE => Shift(yy_state_1168) + NT_trait_method_decl => Shift(yy_state_1324) + NT_non_empty_list_attribute_ => Shift(yy_state_1328) + T_FN => Shift(yy_state_1381) + NT_trait_method_fn_header => Shift(yy_state_1383) + T_ASYNC => Shift(yy_state_1396) + NT_non_empty_list_semis_trait_method_decl_ => Shift(yy_state_1410) + NT_list_semis_trait_method_decl_ => Shift(yy_state_2080) + T_LIDENT | T_EXTEND => Reduce(0, NT_trait_method_fn_header, yy_action_330) + T_RBRACE => Reduce(0, NT_list_semis_trait_method_decl_, yy_action_329) _ => Error } } -fn yy_state_1688(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2080(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RBRACE => Shift(yy_state_1689) + T_RBRACE => Shift(yy_state_2081) _ => Error } } -fn yy_state_1689(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(8, NT_structure_item, yy_action_90) +fn yy_state_2081(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(9, NT_structure_item, yy_action_103) } -fn yy_state_1690(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2082(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_type_parameters => Shift(yy_state_996) - NT_option_type_parameters_ => Shift(yy_state_1036) - T_LBRACKET => Shift(yy_state_1037) - NT_optional_type_parameters => Shift(yy_state_1691) - T_UIDENT => Reduce(0, NT_option_type_parameters_, yy_action_319) + T_PACKAGE_NAME => Shift(yy_state_1432) + NT_extenum_extension_target => Shift(yy_state_2083) + T_UIDENT => Shift(yy_state_2089) _ => Error } } -fn yy_state_1691(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2083(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_UIDENT => Shift(yy_state_1692) + T_PLUS_EQUAL => Shift(yy_state_2084) _ => Error } } -fn yy_state_1692(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2084(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACE => Shift(yy_state_1693) + T_LBRACE => Shift(yy_state_2085) _ => Error } } -fn yy_state_1693(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2085(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_ATTRIBUTE => Shift(yy_state_946) - NT_enum_constructor => Shift(yy_state_1000) - NT_non_empty_list_attribute_ => Shift(yy_state_1004) - T_UIDENT => Shift(yy_state_1024) - NT_non_empty_list_semis_enum_constructor_ => Shift(yy_state_1027) - NT_list_semis_enum_constructor_ => Shift(yy_state_1694) - T_RBRACE => Reduce(0, NT_list_semis_enum_constructor_, yy_action_317) + T_ATTRIBUTE => Shift(yy_state_1168) + NT_enum_constructor => Shift(yy_state_1227) + NT_non_empty_list_attribute_ => Shift(yy_state_1231) + T_UIDENT => Shift(yy_state_1251) + NT_non_empty_list_semis_enum_constructor_ => Shift(yy_state_1254) + NT_list_semis_enum_constructor_ => Shift(yy_state_2086) + T_RBRACE => Reduce(0, NT_list_semis_enum_constructor_, yy_action_381) _ => Error } } -fn yy_state_1694(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2086(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RBRACE => Shift(yy_state_1695) + T_RBRACE => Shift(yy_state_2087) _ => Error } } -fn yy_state_1695(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2087(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_FOR => Shift(yy_state_1696) + T_DERIVE => Shift(yy_state_1440) + NT_deriving_directive_list => Shift(yy_state_2088) + T_EOF | T_SEMI => Reduce(0, NT_deriving_directive_list, yy_action_288) _ => Error } } -fn yy_state_1696(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2088(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(10, NT_structure_item, yy_action_102) +} + +fn yy_state_2089(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_ASYNC => Shift(yy_state_52) - T_UNDERSCORE => Shift(yy_state_57) - T_AMPER => Shift(yy_state_58) - T_PACKAGE_NAME => Shift(yy_state_60) - T_UIDENT => Shift(yy_state_67) - T_LPAREN => Shift(yy_state_71) - NT_simple_type => Shift(yy_state_97) - NT_type_ => Shift(yy_state_1697) + T_LBRACKET => Shift(yy_state_1172) + NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__ => Shift(yy_state_1183) + NT_optional_type_parameters_no_constraints => Shift(yy_state_2090) + T_PLUS_EQUAL | T_LBRACE => Reduce(0, NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__, yy_action_415) _ => Error } } -fn yy_state_1697(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2090(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_WITH => Shift(yy_state_1698) + T_LBRACE => Shift(yy_state_2091) + T_PLUS_EQUAL => Reduce(2, NT_extenum_extension_target, yy_action_278) _ => Error } } -fn yy_state_1698(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2091(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LIDENT => Shift(yy_state_1699) + T_ATTRIBUTE => Shift(yy_state_1168) + NT_enum_constructor => Shift(yy_state_1227) + NT_non_empty_list_attribute_ => Shift(yy_state_1231) + T_UIDENT => Shift(yy_state_1251) + NT_non_empty_list_semis_enum_constructor_ => Shift(yy_state_1254) + NT_list_semis_enum_constructor_ => Shift(yy_state_2092) + T_RBRACE => Reduce(0, NT_list_semis_enum_constructor_, yy_action_381) _ => Error } } -fn yy_state_1699(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2092(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LPAREN => Shift(yy_state_143) - NT_parameters => Shift(yy_state_1700) + T_RBRACE => Shift(yy_state_2093) _ => Error } } -fn yy_state_1700(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2093(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACE => Shift(yy_state_120) - NT_block_expr => Shift(yy_state_1701) + T_DERIVE => Shift(yy_state_1440) + NT_deriving_directive_list => Shift(yy_state_2094) + T_EOF | T_SEMI => Reduce(0, NT_deriving_directive_list, yy_action_288) _ => Error } } -fn yy_state_1701(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(15, NT_structure_item, yy_action_89) +fn yy_state_2094(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(10, NT_structure_item, yy_action_101) } -fn yy_state_1702(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2095(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_type_parameters => Shift(yy_state_996) - NT_option_type_parameters_ => Shift(yy_state_1036) - T_LBRACKET => Shift(yy_state_1037) - NT_optional_type_parameters => Shift(yy_state_1703) - T_UIDENT | T_AMPER | T_PACKAGE_NAME => Reduce(0, NT_option_type_parameters_, yy_action_319) + T_UIDENT => Shift(yy_state_2096) _ => Error } } -fn yy_state_1703(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2096(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_AMPER => Shift(yy_state_19) - T_PACKAGE_NAME => Shift(yy_state_21) - T_UIDENT => Shift(yy_state_24) - NT_qual_ident_ty => Shift(yy_state_25) - NT_type_name => Shift(yy_state_1704) + T_COLON => Shift(yy_state_2097) + T_EQUAL => Reduce(5, NT_val_header, yy_action_100) _ => Error } } -fn yy_state_1704(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2097(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_WITH => Shift(yy_state_1705) - T_FOR => Shift(yy_state_1711) + T_ASYNC => Shift(yy_state_65) + T_UNDERSCORE => Shift(yy_state_70) + T_AMPER => Shift(yy_state_71) + T_PACKAGE_NAME => Shift(yy_state_73) + T_UIDENT => Shift(yy_state_80) + T_LPAREN => Shift(yy_state_84) + NT_simple_type => Shift(yy_state_110) + NT_type_ => Shift(yy_state_2098) _ => Error } } -fn yy_state_1705(_lookahead : YYSymbol) -> YYDecision { - match _lookahead { - T_FN => Shift(yy_state_1056) - NT_option_FN_ => Shift(yy_state_1706) - T_LIDENT => Reduce(0, NT_option_FN_, yy_action_285) - _ => Error - } +fn yy_state_2098(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(7, NT_val_header, yy_action_99) } -fn yy_state_1706(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2099(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LIDENT => Shift(yy_state_1707) + T_EXTEND => Shift(yy_state_2100) + T_LIDENT => Shift(yy_state_2103) _ => Error } } -fn yy_state_1707(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2100(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LPAREN => Shift(yy_state_143) - NT_parameters => Shift(yy_state_1708) + T_COLON => Shift(yy_state_2101) + T_EQUAL => Reduce(5, NT_val_header, yy_action_98) _ => Error } } -fn yy_state_1708(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2101(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_error_annotation => Shift(yy_state_50) - T_THIN_ARROW => Shift(yy_state_51) - T_NORAISE => Shift(yy_state_78) - T_RAISE => Shift(yy_state_79) - NT_func_return_type => Shift(yy_state_1709) - T_EQUAL | T_LBRACE => Reduce(0, NT_func_return_type, yy_action_862) + T_ASYNC => Shift(yy_state_65) + T_UNDERSCORE => Shift(yy_state_70) + T_AMPER => Shift(yy_state_71) + T_PACKAGE_NAME => Shift(yy_state_73) + T_UIDENT => Shift(yy_state_80) + T_LPAREN => Shift(yy_state_84) + NT_simple_type => Shift(yy_state_110) + NT_type_ => Shift(yy_state_2102) _ => Error } } -fn yy_state_1709(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2102(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(7, NT_val_header, yy_action_97) +} + +fn yy_state_2103(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACE => Shift(yy_state_120) - T_EQUAL => Shift(yy_state_1062) - NT_block_expr => Shift(yy_state_1064) - NT_impl_body => Shift(yy_state_1710) + T_COLON => Shift(yy_state_2104) + T_EQUAL => Reduce(5, NT_val_header, yy_action_96) _ => Error } } -fn yy_state_1710(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(12, NT_structure_item, yy_action_88) -} - -fn yy_state_1711(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2104(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_ASYNC => Shift(yy_state_52) - T_UNDERSCORE => Shift(yy_state_57) - T_AMPER => Shift(yy_state_58) - T_PACKAGE_NAME => Shift(yy_state_60) - T_UIDENT => Shift(yy_state_67) - T_LPAREN => Shift(yy_state_71) - NT_simple_type => Shift(yy_state_97) - NT_type_ => Shift(yy_state_1712) + T_ASYNC => Shift(yy_state_65) + T_UNDERSCORE => Shift(yy_state_70) + T_AMPER => Shift(yy_state_71) + T_PACKAGE_NAME => Shift(yy_state_73) + T_UIDENT => Shift(yy_state_80) + T_LPAREN => Shift(yy_state_84) + NT_simple_type => Shift(yy_state_110) + NT_type_ => Shift(yy_state_2105) _ => Error } } -fn yy_state_1712(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2105(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(7, NT_val_header, yy_action_95) +} + +fn yy_state_2106(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_WITH => Shift(yy_state_1713) - T_EOF | T_SEMI => Reduce(8, NT_structure_item, yy_action_87) + T_STRING => Shift(yy_state_2107) _ => Error } } -fn yy_state_1713(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2107(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_FN => Shift(yy_state_1056) - NT_option_FN_ => Shift(yy_state_1714) - T_LIDENT => Reduce(0, NT_option_FN_, yy_action_285) + T_FN => Shift(yy_state_2108) _ => Error } } -fn yy_state_1714(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2108(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LIDENT => Shift(yy_state_1715) + NT_type_parameters => Shift(yy_state_1223) + NT_option_type_parameters_ => Shift(yy_state_1266) + T_LBRACKET => Shift(yy_state_1267) + NT_optional_type_parameters => Shift(yy_state_2109) + T_LIDENT | T_UIDENT | T_AMPER | T_PACKAGE_NAME | T_EXTEND => Reduce(0, NT_option_type_parameters_, yy_action_383) _ => Error } } -fn yy_state_1715(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2109(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LPAREN => Shift(yy_state_143) - NT_parameters => Shift(yy_state_1716) + T_AMPER => Shift(yy_state_20) + T_PACKAGE_NAME => Shift(yy_state_22) + T_UIDENT => Shift(yy_state_25) + NT_qual_ident_ty => Shift(yy_state_26) + T_EXTEND => Shift(yy_state_1619) + T_LIDENT => Shift(yy_state_1620) + NT_type_name => Shift(yy_state_1621) + NT_fun_binder => Shift(yy_state_2110) _ => Error } } -fn yy_state_1716(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2110(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_error_annotation => Shift(yy_state_50) - T_THIN_ARROW => Shift(yy_state_51) - T_NORAISE => Shift(yy_state_78) - T_RAISE => Shift(yy_state_79) - NT_func_return_type => Shift(yy_state_1717) - T_EQUAL | T_LBRACE => Reduce(0, NT_func_return_type, yy_action_862) + T_LPAREN => Shift(yy_state_157) + NT_parameters => Shift(yy_state_1315) + NT_option_parameters_ => Shift(yy_state_2111) + T_RAISE | T_EQUAL | T_THIN_ARROW | T_NORAISE => Reduce(0, NT_option_parameters_, yy_action_336) _ => Error } } -fn yy_state_1717(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2111(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACE => Shift(yy_state_120) - T_EQUAL => Shift(yy_state_1062) - NT_block_expr => Shift(yy_state_1064) - NT_impl_body => Shift(yy_state_1718) + NT_error_annotation => Shift(yy_state_63) + T_THIN_ARROW => Shift(yy_state_64) + T_NORAISE => Shift(yy_state_91) + T_RAISE => Shift(yy_state_92) + NT_func_return_type => Shift(yy_state_2112) + T_EQUAL => Reduce(0, NT_func_return_type, yy_action_1023) _ => Error } } -fn yy_state_1718(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(14, NT_structure_item, yy_action_86) +fn yy_state_2112(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(10, NT_extern_fun_header, yy_action_94) } -fn yy_state_1719(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2113(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_UIDENT => Shift(yy_state_1720) + T_LPAREN => Shift(yy_state_157) + NT_parameters => Shift(yy_state_1315) + NT_option_parameters_ => Shift(yy_state_2114) + T_RAISE | T_EQUAL | T_LBRACE | T_THIN_ARROW | T_NORAISE | T_WHERE => Reduce(0, NT_option_parameters_, yy_action_336) _ => Error } } -fn yy_state_1720(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2114(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_COLON => Shift(yy_state_1081) - NT_option_preceded_COLON_separated_nonempty_list_PLUS_tvar_constraint___ => Shift(yy_state_1721) - T_LBRACE => Reduce(0, NT_option_preceded_COLON_separated_nonempty_list_PLUS_tvar_constraint___, yy_action_272) + NT_error_annotation => Shift(yy_state_63) + T_THIN_ARROW => Shift(yy_state_64) + T_NORAISE => Shift(yy_state_91) + T_RAISE => Shift(yy_state_92) + NT_func_return_type => Shift(yy_state_2115) + T_EQUAL | T_LBRACE | T_WHERE => Reduce(0, NT_func_return_type, yy_action_1023) _ => Error } } -fn yy_state_1721(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2115(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(6, NT_fun_header, yy_action_93) +} + +fn yy_state_2116(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACE => Shift(yy_state_1722) + T_FN => Shift(yy_state_1627) + NT_fun_header_generic => Shift(yy_state_2117) _ => Error } } -fn yy_state_1722(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2117(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_ATTRIBUTE => Shift(yy_state_946) - NT_trait_method_decl => Shift(yy_state_1085) - NT_non_empty_list_attribute_ => Shift(yy_state_1089) - T_FN => Shift(yy_state_1124) - NT_trait_method_fn_header => Shift(yy_state_1126) - T_ASYNC => Shift(yy_state_1133) - NT_non_empty_list_semis_trait_method_decl_ => Shift(yy_state_1141) - NT_list_semis_trait_method_decl_ => Shift(yy_state_1723) - T_LIDENT => Reduce(0, NT_trait_method_fn_header, yy_action_269) - T_RBRACE => Reduce(0, NT_list_semis_trait_method_decl_, yy_action_268) + T_LPAREN => Shift(yy_state_157) + NT_parameters => Shift(yy_state_1315) + NT_option_parameters_ => Shift(yy_state_2118) + T_RAISE | T_EQUAL | T_LBRACE | T_THIN_ARROW | T_NORAISE | T_WHERE => Reduce(0, NT_option_parameters_, yy_action_336) _ => Error } } -fn yy_state_1723(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2118(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RBRACE => Shift(yy_state_1724) + NT_error_annotation => Shift(yy_state_63) + T_THIN_ARROW => Shift(yy_state_64) + T_NORAISE => Shift(yy_state_91) + T_RAISE => Shift(yy_state_92) + NT_func_return_type => Shift(yy_state_2119) + T_EQUAL | T_LBRACE | T_WHERE => Reduce(0, NT_func_return_type, yy_action_1023) _ => Error } } -fn yy_state_1724(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(9, NT_structure_item, yy_action_85) +fn yy_state_2119(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(7, NT_fun_header, yy_action_92) } -fn yy_state_1725(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2120(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_PACKAGE_NAME => Shift(yy_state_1163) - NT_extenum_extension_target => Shift(yy_state_1726) - T_UIDENT => Shift(yy_state_1732) + T_FN => Shift(yy_state_1627) + T_ENUM => Shift(yy_state_2121) + T_STRUCT => Shift(yy_state_2124) + T_SUBERROR => Shift(yy_state_2127) + T_TYPE => Shift(yy_state_2129) + T_USING => Shift(yy_state_2132) + T_ENUMVIEW => Shift(yy_state_2137) + T_IMPL => Shift(yy_state_2152) + T_TRAIT => Shift(yy_state_2177) + T_EXTENUM => Shift(yy_state_2183) + T_CONST => Shift(yy_state_2196) + T_LET => Shift(yy_state_2200) + T_EXTERN => Shift(yy_state_2207) + NT_fun_header_generic => Shift(yy_state_2214) + T_ASYNC => Shift(yy_state_2217) _ => Error } } -fn yy_state_1726(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2121(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_PLUS_EQUAL => Shift(yy_state_1727) + T_UIDENT => Shift(yy_state_2122) _ => Error } } -fn yy_state_1727(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2122(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACE => Shift(yy_state_1728) + T_LBRACKET => Shift(yy_state_1172) + NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__ => Shift(yy_state_1183) + NT_optional_type_parameters_no_constraints => Shift(yy_state_2123) + T_LBRACE => Reduce(0, NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__, yy_action_415) _ => Error } } -fn yy_state_1728(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2123(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(5, NT_enum_header, yy_action_91) +} + +fn yy_state_2124(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_ATTRIBUTE => Shift(yy_state_946) - NT_enum_constructor => Shift(yy_state_1000) - NT_non_empty_list_attribute_ => Shift(yy_state_1004) - T_UIDENT => Shift(yy_state_1024) - NT_non_empty_list_semis_enum_constructor_ => Shift(yy_state_1027) - NT_list_semis_enum_constructor_ => Shift(yy_state_1729) - T_RBRACE => Reduce(0, NT_list_semis_enum_constructor_, yy_action_317) + T_UIDENT => Shift(yy_state_2125) _ => Error } } -fn yy_state_1729(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2125(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RBRACE => Shift(yy_state_1730) + T_LBRACKET => Shift(yy_state_1172) + NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__ => Shift(yy_state_1183) + NT_optional_type_parameters_no_constraints => Shift(yy_state_2126) + T_LPAREN | T_LBRACE => Reduce(0, NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__, yy_action_415) _ => Error } } -fn yy_state_1730(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2126(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(5, NT_struct_header, yy_action_90) +} + +fn yy_state_2127(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_DERIVE => Shift(yy_state_1171) - NT_deriving_directive_list => Shift(yy_state_1731) - T_EOF | T_SEMI => Reduce(0, NT_deriving_directive_list, yy_action_233) + T_UIDENT => Shift(yy_state_2128) _ => Error } } -fn yy_state_1731(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(10, NT_structure_item, yy_action_84) +fn yy_state_2128(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(4, NT_suberror_header, yy_action_89) } -fn yy_state_1732(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2129(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACKET => Shift(yy_state_950) - NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__ => Shift(yy_state_961) - NT_optional_type_parameters_no_constraints => Shift(yy_state_1733) - T_PLUS_EQUAL | T_LBRACE => Reduce(0, NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__, yy_action_347) + T_UIDENT => Shift(yy_state_2130) _ => Error } } -fn yy_state_1733(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2130(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACE => Shift(yy_state_1734) - T_PLUS_EQUAL => Reduce(2, NT_extenum_extension_target, yy_action_223) + T_LBRACKET => Shift(yy_state_1172) + NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__ => Shift(yy_state_1183) + NT_optional_type_parameters_no_constraints => Shift(yy_state_2131) + T_EOF | T_DERIVE | T_EQUAL | T_SEMI => Reduce(0, NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__, yy_action_415) _ => Error } } -fn yy_state_1734(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2131(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(5, NT_type_header, yy_action_88) +} + +fn yy_state_2132(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_ATTRIBUTE => Shift(yy_state_946) - NT_enum_constructor => Shift(yy_state_1000) - NT_non_empty_list_attribute_ => Shift(yy_state_1004) - T_UIDENT => Shift(yy_state_1024) - NT_non_empty_list_semis_enum_constructor_ => Shift(yy_state_1027) - NT_list_semis_enum_constructor_ => Shift(yy_state_1735) - T_RBRACE => Reduce(0, NT_list_semis_enum_constructor_, yy_action_317) + T_PACKAGE_NAME => Shift(yy_state_2133) _ => Error } } -fn yy_state_1735(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2133(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RBRACE => Shift(yy_state_1736) + T_LBRACE => Shift(yy_state_2134) _ => Error } } -fn yy_state_1736(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2134(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_DERIVE => Shift(yy_state_1171) - NT_deriving_directive_list => Shift(yy_state_1737) - T_EOF | T_SEMI => Reduce(0, NT_deriving_directive_list, yy_action_233) + NT_using_binder => Shift(yy_state_1195) + NT_non_empty_list_commas_rev_using_binder_ => Shift(yy_state_1196) + T_TRAIT => Shift(yy_state_1200) + T_TYPE => Shift(yy_state_1204) + T_UIDENT => Shift(yy_state_1208) + T_EXTEND => Shift(yy_state_1211) + T_LIDENT => Shift(yy_state_1215) + NT_non_empty_list_commas_using_binder_ => Shift(yy_state_1219) + NT_list_commas_using_binder_ => Shift(yy_state_2135) + T_RBRACE => Reduce(0, NT_list_commas_using_binder_, yy_action_401) _ => Error } } -fn yy_state_1737(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(10, NT_structure_item, yy_action_83) -} - -fn yy_state_1738(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2135(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_UIDENT => Shift(yy_state_1739) + T_RBRACE => Shift(yy_state_2136) _ => Error } } -fn yy_state_1739(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2136(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(7, NT_structure_item, yy_action_87) +} + +fn yy_state_2137(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_COLON => Shift(yy_state_1740) - T_EQUAL => Reduce(5, NT_val_header, yy_action_82) + NT_type_parameters => Shift(yy_state_1223) + NT_option_type_parameters_ => Shift(yy_state_1266) + T_LBRACKET => Shift(yy_state_1267) + NT_optional_type_parameters => Shift(yy_state_2138) + T_UIDENT => Reduce(0, NT_option_type_parameters_, yy_action_383) _ => Error } } -fn yy_state_1740(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2138(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_ASYNC => Shift(yy_state_52) - T_UNDERSCORE => Shift(yy_state_57) - T_AMPER => Shift(yy_state_58) - T_PACKAGE_NAME => Shift(yy_state_60) - T_UIDENT => Shift(yy_state_67) - T_LPAREN => Shift(yy_state_71) - NT_simple_type => Shift(yy_state_97) - NT_type_ => Shift(yy_state_1741) + T_UIDENT => Shift(yy_state_2139) _ => Error } } -fn yy_state_1741(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(7, NT_val_header, yy_action_81) -} - -fn yy_state_1742(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2139(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LIDENT => Shift(yy_state_1743) + T_LBRACE => Shift(yy_state_2140) _ => Error } } -fn yy_state_1743(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2140(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_COLON => Shift(yy_state_1744) - T_EQUAL => Reduce(5, NT_val_header, yy_action_80) + T_ATTRIBUTE => Shift(yy_state_1168) + NT_enum_constructor => Shift(yy_state_1227) + NT_non_empty_list_attribute_ => Shift(yy_state_1231) + T_UIDENT => Shift(yy_state_1251) + NT_non_empty_list_semis_enum_constructor_ => Shift(yy_state_1254) + NT_list_semis_enum_constructor_ => Shift(yy_state_2141) + T_RBRACE => Reduce(0, NT_list_semis_enum_constructor_, yy_action_381) _ => Error } } -fn yy_state_1744(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2141(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_ASYNC => Shift(yy_state_52) - T_UNDERSCORE => Shift(yy_state_57) - T_AMPER => Shift(yy_state_58) - T_PACKAGE_NAME => Shift(yy_state_60) - T_UIDENT => Shift(yy_state_67) - T_LPAREN => Shift(yy_state_71) - NT_simple_type => Shift(yy_state_97) - NT_type_ => Shift(yy_state_1745) + T_RBRACE => Shift(yy_state_2142) _ => Error } } -fn yy_state_1745(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(7, NT_val_header, yy_action_79) -} - -fn yy_state_1746(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2142(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_STRING => Shift(yy_state_1747) + T_FOR => Shift(yy_state_2143) _ => Error } } -fn yy_state_1747(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2143(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_FN => Shift(yy_state_1748) + T_ASYNC => Shift(yy_state_65) + T_UNDERSCORE => Shift(yy_state_70) + T_AMPER => Shift(yy_state_71) + T_PACKAGE_NAME => Shift(yy_state_73) + T_UIDENT => Shift(yy_state_80) + T_LPAREN => Shift(yy_state_84) + NT_simple_type => Shift(yy_state_110) + NT_type_ => Shift(yy_state_2144) _ => Error } } -fn yy_state_1748(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2144(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_type_parameters => Shift(yy_state_996) - NT_option_type_parameters_ => Shift(yy_state_1036) - T_LBRACKET => Shift(yy_state_1037) - NT_optional_type_parameters => Shift(yy_state_1749) - T_LIDENT | T_UIDENT | T_AMPER | T_PACKAGE_NAME => Reduce(0, NT_option_type_parameters_, yy_action_319) + T_WITH => Shift(yy_state_2145) _ => Error } } -fn yy_state_1749(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2145(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_AMPER => Shift(yy_state_19) - T_PACKAGE_NAME => Shift(yy_state_21) - T_UIDENT => Shift(yy_state_24) - NT_qual_ident_ty => Shift(yy_state_25) - T_LIDENT => Shift(yy_state_1307) - NT_type_name => Shift(yy_state_1308) - NT_fun_binder => Shift(yy_state_1750) + T_EXTEND => Shift(yy_state_2146) + T_LIDENT => Shift(yy_state_2149) _ => Error } } -fn yy_state_1750(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2146(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LPAREN => Shift(yy_state_143) - NT_parameters => Shift(yy_state_1076) - NT_option_parameters_ => Shift(yy_state_1751) - T_RAISE | T_EQUAL | T_THIN_ARROW | T_NORAISE => Reduce(0, NT_option_parameters_, yy_action_275) + T_LPAREN => Shift(yy_state_157) + NT_parameters => Shift(yy_state_2147) _ => Error } } -fn yy_state_1751(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2147(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_error_annotation => Shift(yy_state_50) - T_THIN_ARROW => Shift(yy_state_51) - T_NORAISE => Shift(yy_state_78) - T_RAISE => Shift(yy_state_79) - NT_func_return_type => Shift(yy_state_1752) - T_EQUAL => Reduce(0, NT_func_return_type, yy_action_862) + T_LBRACE => Shift(yy_state_133) + NT_block_expr => Shift(yy_state_2148) _ => Error } } -fn yy_state_1752(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(10, NT_extern_fun_header, yy_action_78) +fn yy_state_2148(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(14, NT_structure_item, yy_action_86) } -fn yy_state_1753(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2149(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LPAREN => Shift(yy_state_143) - NT_parameters => Shift(yy_state_1076) - NT_option_parameters_ => Shift(yy_state_1754) - T_RAISE | T_EQUAL | T_LBRACE | T_THIN_ARROW | T_NORAISE | T_WHERE => Reduce(0, NT_option_parameters_, yy_action_275) + T_LPAREN => Shift(yy_state_157) + NT_parameters => Shift(yy_state_2150) _ => Error } } -fn yy_state_1754(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2150(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_error_annotation => Shift(yy_state_50) - T_THIN_ARROW => Shift(yy_state_51) - T_NORAISE => Shift(yy_state_78) - T_RAISE => Shift(yy_state_79) - NT_func_return_type => Shift(yy_state_1755) - T_EQUAL | T_LBRACE | T_WHERE => Reduce(0, NT_func_return_type, yy_action_862) + T_LBRACE => Shift(yy_state_133) + NT_block_expr => Shift(yy_state_2151) _ => Error } } -fn yy_state_1755(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(6, NT_fun_header, yy_action_77) +fn yy_state_2151(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(14, NT_structure_item, yy_action_85) } -fn yy_state_1756(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2152(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_FN => Shift(yy_state_1313) - NT_fun_header_generic => Shift(yy_state_1757) + NT_type_parameters => Shift(yy_state_1223) + NT_option_type_parameters_ => Shift(yy_state_1266) + T_LBRACKET => Shift(yy_state_1267) + NT_optional_type_parameters => Shift(yy_state_2153) + T_UIDENT | T_AMPER | T_PACKAGE_NAME => Reduce(0, NT_option_type_parameters_, yy_action_383) _ => Error } } -fn yy_state_1757(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2153(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LPAREN => Shift(yy_state_143) - NT_parameters => Shift(yy_state_1076) - NT_option_parameters_ => Shift(yy_state_1758) - T_RAISE | T_EQUAL | T_LBRACE | T_THIN_ARROW | T_NORAISE | T_WHERE => Reduce(0, NT_option_parameters_, yy_action_275) + T_AMPER => Shift(yy_state_20) + T_PACKAGE_NAME => Shift(yy_state_22) + T_UIDENT => Shift(yy_state_25) + NT_qual_ident_ty => Shift(yy_state_26) + NT_type_name => Shift(yy_state_2154) _ => Error } } -fn yy_state_1758(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2154(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_error_annotation => Shift(yy_state_50) - T_THIN_ARROW => Shift(yy_state_51) - T_NORAISE => Shift(yy_state_78) - T_RAISE => Shift(yy_state_79) - NT_func_return_type => Shift(yy_state_1759) - T_EQUAL | T_LBRACE | T_WHERE => Reduce(0, NT_func_return_type, yy_action_862) + T_WITH => Shift(yy_state_2155) + T_FOR => Shift(yy_state_2165) _ => Error } } -fn yy_state_1759(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(7, NT_fun_header, yy_action_76) -} - -fn yy_state_1760(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2155(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_FN => Shift(yy_state_1313) - T_ENUM => Shift(yy_state_1761) - T_STRUCT => Shift(yy_state_1764) - T_SUBERROR => Shift(yy_state_1767) - T_TYPE => Shift(yy_state_1769) - T_USING => Shift(yy_state_1772) - T_ENUMVIEW => Shift(yy_state_1777) - T_IMPL => Shift(yy_state_1789) - T_TRAIT => Shift(yy_state_1806) - T_EXTENUM => Shift(yy_state_1812) - T_CONST => Shift(yy_state_1825) - T_LET => Shift(yy_state_1829) - T_EXTERN => Shift(yy_state_1833) - NT_fun_header_generic => Shift(yy_state_1840) - T_ASYNC => Shift(yy_state_1843) + T_FN => Shift(yy_state_1286) + NT_impl_optional_fn => Shift(yy_state_2156) + T_LIDENT | T_EXTEND => Reduce(0, NT_impl_optional_fn, yy_action_348) _ => Error } } -fn yy_state_1761(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2156(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_UIDENT => Shift(yy_state_1762) + T_EXTEND => Shift(yy_state_2157) + T_LIDENT => Shift(yy_state_2161) _ => Error } } -fn yy_state_1762(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2157(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACKET => Shift(yy_state_950) - NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__ => Shift(yy_state_961) - NT_optional_type_parameters_no_constraints => Shift(yy_state_1763) - T_LBRACE => Reduce(0, NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__, yy_action_347) + T_LPAREN => Shift(yy_state_157) + NT_parameters => Shift(yy_state_2158) _ => Error } } -fn yy_state_1763(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(5, NT_enum_header, yy_action_75) -} - -fn yy_state_1764(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2158(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_UIDENT => Shift(yy_state_1765) + NT_error_annotation => Shift(yy_state_63) + T_THIN_ARROW => Shift(yy_state_64) + T_NORAISE => Shift(yy_state_91) + T_RAISE => Shift(yy_state_92) + NT_func_return_type => Shift(yy_state_2159) + T_EQUAL | T_LBRACE => Reduce(0, NT_func_return_type, yy_action_1023) _ => Error } } -fn yy_state_1765(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2159(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACKET => Shift(yy_state_950) - NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__ => Shift(yy_state_961) - NT_optional_type_parameters_no_constraints => Shift(yy_state_1766) - T_LPAREN | T_LBRACE => Reduce(0, NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__, yy_action_347) + T_LBRACE => Shift(yy_state_133) + T_EQUAL => Shift(yy_state_1293) + NT_block_expr => Shift(yy_state_1295) + NT_impl_body => Shift(yy_state_2160) _ => Error } } -fn yy_state_1766(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(5, NT_struct_header, yy_action_74) +fn yy_state_2160(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(11, NT_structure_item, yy_action_84) } -fn yy_state_1767(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2161(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_UIDENT => Shift(yy_state_1768) + T_LPAREN => Shift(yy_state_157) + NT_parameters => Shift(yy_state_2162) _ => Error } } -fn yy_state_1768(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(4, NT_suberror_header, yy_action_73) -} - -fn yy_state_1769(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2162(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_UIDENT => Shift(yy_state_1770) + NT_error_annotation => Shift(yy_state_63) + T_THIN_ARROW => Shift(yy_state_64) + T_NORAISE => Shift(yy_state_91) + T_RAISE => Shift(yy_state_92) + NT_func_return_type => Shift(yy_state_2163) + T_EQUAL | T_LBRACE => Reduce(0, NT_func_return_type, yy_action_1023) _ => Error } } -fn yy_state_1770(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2163(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACKET => Shift(yy_state_950) - NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__ => Shift(yy_state_961) - NT_optional_type_parameters_no_constraints => Shift(yy_state_1771) - T_EOF | T_DERIVE | T_EQUAL | T_SEMI => Reduce(0, NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__, yy_action_347) + T_LBRACE => Shift(yy_state_133) + T_EQUAL => Shift(yy_state_1293) + NT_block_expr => Shift(yy_state_1295) + NT_impl_body => Shift(yy_state_2164) _ => Error } } -fn yy_state_1771(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(5, NT_type_header, yy_action_72) +fn yy_state_2164(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(11, NT_structure_item, yy_action_83) } -fn yy_state_1772(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2165(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_PACKAGE_NAME => Shift(yy_state_1773) + T_ASYNC => Shift(yy_state_65) + T_UNDERSCORE => Shift(yy_state_70) + T_AMPER => Shift(yy_state_71) + T_PACKAGE_NAME => Shift(yy_state_73) + T_UIDENT => Shift(yy_state_80) + T_LPAREN => Shift(yy_state_84) + NT_simple_type => Shift(yy_state_110) + NT_type_ => Shift(yy_state_2166) _ => Error } } -fn yy_state_1773(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2166(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACE => Shift(yy_state_1774) + T_WITH => Shift(yy_state_2167) + T_EOF | T_SEMI => Reduce(7, NT_structure_item, yy_action_82) _ => Error } } -fn yy_state_1774(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2167(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_using_binder => Shift(yy_state_973) - NT_non_empty_list_commas_rev_using_binder_ => Shift(yy_state_974) - T_TRAIT => Shift(yy_state_978) - T_TYPE => Shift(yy_state_982) - T_UIDENT => Shift(yy_state_986) - T_LIDENT => Shift(yy_state_989) - NT_non_empty_list_commas_using_binder_ => Shift(yy_state_992) - NT_list_commas_using_binder_ => Shift(yy_state_1775) - T_RBRACE => Reduce(0, NT_list_commas_using_binder_, yy_action_333) + T_FN => Shift(yy_state_1286) + NT_impl_optional_fn => Shift(yy_state_2168) + T_LIDENT | T_EXTEND => Reduce(0, NT_impl_optional_fn, yy_action_348) _ => Error } } -fn yy_state_1775(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2168(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RBRACE => Shift(yy_state_1776) + T_EXTEND => Shift(yy_state_2169) + T_LIDENT => Shift(yy_state_2173) _ => Error } } -fn yy_state_1776(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(7, NT_structure_item, yy_action_71) -} - -fn yy_state_1777(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2169(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_type_parameters => Shift(yy_state_996) - NT_option_type_parameters_ => Shift(yy_state_1036) - T_LBRACKET => Shift(yy_state_1037) - NT_optional_type_parameters => Shift(yy_state_1778) - T_UIDENT => Reduce(0, NT_option_type_parameters_, yy_action_319) + T_LPAREN => Shift(yy_state_157) + NT_parameters => Shift(yy_state_2170) _ => Error } } -fn yy_state_1778(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2170(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_UIDENT => Shift(yy_state_1779) + NT_error_annotation => Shift(yy_state_63) + T_THIN_ARROW => Shift(yy_state_64) + T_NORAISE => Shift(yy_state_91) + T_RAISE => Shift(yy_state_92) + NT_func_return_type => Shift(yy_state_2171) + T_EQUAL | T_LBRACE => Reduce(0, NT_func_return_type, yy_action_1023) _ => Error } } -fn yy_state_1779(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2171(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACE => Shift(yy_state_1780) + T_LBRACE => Shift(yy_state_133) + T_EQUAL => Shift(yy_state_1293) + NT_block_expr => Shift(yy_state_1295) + NT_impl_body => Shift(yy_state_2172) _ => Error } } -fn yy_state_1780(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2172(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(13, NT_structure_item, yy_action_81) +} + +fn yy_state_2173(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_ATTRIBUTE => Shift(yy_state_946) - NT_enum_constructor => Shift(yy_state_1000) - NT_non_empty_list_attribute_ => Shift(yy_state_1004) - T_UIDENT => Shift(yy_state_1024) - NT_non_empty_list_semis_enum_constructor_ => Shift(yy_state_1027) - NT_list_semis_enum_constructor_ => Shift(yy_state_1781) - T_RBRACE => Reduce(0, NT_list_semis_enum_constructor_, yy_action_317) + T_LPAREN => Shift(yy_state_157) + NT_parameters => Shift(yy_state_2174) _ => Error } } -fn yy_state_1781(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2174(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RBRACE => Shift(yy_state_1782) + NT_error_annotation => Shift(yy_state_63) + T_THIN_ARROW => Shift(yy_state_64) + T_NORAISE => Shift(yy_state_91) + T_RAISE => Shift(yy_state_92) + NT_func_return_type => Shift(yy_state_2175) + T_EQUAL | T_LBRACE => Reduce(0, NT_func_return_type, yy_action_1023) _ => Error } } -fn yy_state_1782(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2175(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_FOR => Shift(yy_state_1783) + T_LBRACE => Shift(yy_state_133) + T_EQUAL => Shift(yy_state_1293) + NT_block_expr => Shift(yy_state_1295) + NT_impl_body => Shift(yy_state_2176) _ => Error } } -fn yy_state_1783(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2176(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(13, NT_structure_item, yy_action_80) +} + +fn yy_state_2177(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_ASYNC => Shift(yy_state_52) - T_UNDERSCORE => Shift(yy_state_57) - T_AMPER => Shift(yy_state_58) - T_PACKAGE_NAME => Shift(yy_state_60) - T_UIDENT => Shift(yy_state_67) - T_LPAREN => Shift(yy_state_71) - NT_simple_type => Shift(yy_state_97) - NT_type_ => Shift(yy_state_1784) + T_UIDENT => Shift(yy_state_2178) _ => Error } } -fn yy_state_1784(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2178(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_WITH => Shift(yy_state_1785) + T_COLON => Shift(yy_state_1320) + NT_option_preceded_COLON_separated_nonempty_list_PLUS_tvar_constraint___ => Shift(yy_state_2179) + T_LBRACE => Reduce(0, NT_option_preceded_COLON_separated_nonempty_list_PLUS_tvar_constraint___, yy_action_333) _ => Error } } -fn yy_state_1785(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2179(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LIDENT => Shift(yy_state_1786) + T_LBRACE => Shift(yy_state_2180) _ => Error } } -fn yy_state_1786(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2180(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LPAREN => Shift(yy_state_143) - NT_parameters => Shift(yy_state_1787) + T_ATTRIBUTE => Shift(yy_state_1168) + NT_trait_method_decl => Shift(yy_state_1324) + NT_non_empty_list_attribute_ => Shift(yy_state_1328) + T_FN => Shift(yy_state_1381) + NT_trait_method_fn_header => Shift(yy_state_1383) + T_ASYNC => Shift(yy_state_1396) + NT_non_empty_list_semis_trait_method_decl_ => Shift(yy_state_1410) + NT_list_semis_trait_method_decl_ => Shift(yy_state_2181) + T_LIDENT | T_EXTEND => Reduce(0, NT_trait_method_fn_header, yy_action_330) + T_RBRACE => Reduce(0, NT_list_semis_trait_method_decl_, yy_action_329) _ => Error } } -fn yy_state_1787(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2181(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACE => Shift(yy_state_120) - NT_block_expr => Shift(yy_state_1788) + T_RBRACE => Shift(yy_state_2182) _ => Error } } -fn yy_state_1788(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(14, NT_structure_item, yy_action_70) +fn yy_state_2182(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(8, NT_structure_item, yy_action_79) } -fn yy_state_1789(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2183(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_type_parameters => Shift(yy_state_996) - NT_option_type_parameters_ => Shift(yy_state_1036) - T_LBRACKET => Shift(yy_state_1037) - NT_optional_type_parameters => Shift(yy_state_1790) - T_UIDENT | T_AMPER | T_PACKAGE_NAME => Reduce(0, NT_option_type_parameters_, yy_action_319) + T_PACKAGE_NAME => Shift(yy_state_1432) + NT_extenum_extension_target => Shift(yy_state_2184) + T_UIDENT => Shift(yy_state_2190) _ => Error } } -fn yy_state_1790(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2184(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_AMPER => Shift(yy_state_19) - T_PACKAGE_NAME => Shift(yy_state_21) - T_UIDENT => Shift(yy_state_24) - NT_qual_ident_ty => Shift(yy_state_25) - NT_type_name => Shift(yy_state_1791) + T_PLUS_EQUAL => Shift(yy_state_2185) _ => Error } } -fn yy_state_1791(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2185(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_WITH => Shift(yy_state_1792) - T_FOR => Shift(yy_state_1798) + T_LBRACE => Shift(yy_state_2186) _ => Error } } -fn yy_state_1792(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2186(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_FN => Shift(yy_state_1056) - NT_option_FN_ => Shift(yy_state_1793) - T_LIDENT => Reduce(0, NT_option_FN_, yy_action_285) + T_ATTRIBUTE => Shift(yy_state_1168) + NT_enum_constructor => Shift(yy_state_1227) + NT_non_empty_list_attribute_ => Shift(yy_state_1231) + T_UIDENT => Shift(yy_state_1251) + NT_non_empty_list_semis_enum_constructor_ => Shift(yy_state_1254) + NT_list_semis_enum_constructor_ => Shift(yy_state_2187) + T_RBRACE => Reduce(0, NT_list_semis_enum_constructor_, yy_action_381) _ => Error } } -fn yy_state_1793(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2187(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LIDENT => Shift(yy_state_1794) + T_RBRACE => Shift(yy_state_2188) _ => Error } } -fn yy_state_1794(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2188(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LPAREN => Shift(yy_state_143) - NT_parameters => Shift(yy_state_1795) + T_DERIVE => Shift(yy_state_1440) + NT_deriving_directive_list => Shift(yy_state_2189) + T_EOF | T_SEMI => Reduce(0, NT_deriving_directive_list, yy_action_288) _ => Error } } -fn yy_state_1795(_lookahead : YYSymbol) -> YYDecision { - match _lookahead { - NT_error_annotation => Shift(yy_state_50) - T_THIN_ARROW => Shift(yy_state_51) - T_NORAISE => Shift(yy_state_78) - T_RAISE => Shift(yy_state_79) - NT_func_return_type => Shift(yy_state_1796) - T_EQUAL | T_LBRACE => Reduce(0, NT_func_return_type, yy_action_862) - _ => Error - } +fn yy_state_2189(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(9, NT_structure_item, yy_action_78) } -fn yy_state_1796(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2190(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACE => Shift(yy_state_120) - T_EQUAL => Shift(yy_state_1062) - NT_block_expr => Shift(yy_state_1064) - NT_impl_body => Shift(yy_state_1797) + T_LBRACKET => Shift(yy_state_1172) + NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__ => Shift(yy_state_1183) + NT_optional_type_parameters_no_constraints => Shift(yy_state_2191) + T_PLUS_EQUAL | T_LBRACE => Reduce(0, NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__, yy_action_415) _ => Error } } -fn yy_state_1797(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(11, NT_structure_item, yy_action_69) -} - -fn yy_state_1798(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2191(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_ASYNC => Shift(yy_state_52) - T_UNDERSCORE => Shift(yy_state_57) - T_AMPER => Shift(yy_state_58) - T_PACKAGE_NAME => Shift(yy_state_60) - T_UIDENT => Shift(yy_state_67) - T_LPAREN => Shift(yy_state_71) - NT_simple_type => Shift(yy_state_97) - NT_type_ => Shift(yy_state_1799) + T_LBRACE => Shift(yy_state_2192) + T_PLUS_EQUAL => Reduce(2, NT_extenum_extension_target, yy_action_278) _ => Error } } -fn yy_state_1799(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2192(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_WITH => Shift(yy_state_1800) - T_EOF | T_SEMI => Reduce(7, NT_structure_item, yy_action_68) + T_ATTRIBUTE => Shift(yy_state_1168) + NT_enum_constructor => Shift(yy_state_1227) + NT_non_empty_list_attribute_ => Shift(yy_state_1231) + T_UIDENT => Shift(yy_state_1251) + NT_non_empty_list_semis_enum_constructor_ => Shift(yy_state_1254) + NT_list_semis_enum_constructor_ => Shift(yy_state_2193) + T_RBRACE => Reduce(0, NT_list_semis_enum_constructor_, yy_action_381) _ => Error } } -fn yy_state_1800(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2193(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_FN => Shift(yy_state_1056) - NT_option_FN_ => Shift(yy_state_1801) - T_LIDENT => Reduce(0, NT_option_FN_, yy_action_285) + T_RBRACE => Shift(yy_state_2194) _ => Error } } -fn yy_state_1801(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2194(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LIDENT => Shift(yy_state_1802) + T_DERIVE => Shift(yy_state_1440) + NT_deriving_directive_list => Shift(yy_state_2195) + T_EOF | T_SEMI => Reduce(0, NT_deriving_directive_list, yy_action_288) _ => Error } } -fn yy_state_1802(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2195(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(9, NT_structure_item, yy_action_77) +} + +fn yy_state_2196(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LPAREN => Shift(yy_state_143) - NT_parameters => Shift(yy_state_1803) + T_UIDENT => Shift(yy_state_2197) _ => Error } } -fn yy_state_1803(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2197(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_error_annotation => Shift(yy_state_50) - T_THIN_ARROW => Shift(yy_state_51) - T_NORAISE => Shift(yy_state_78) - T_RAISE => Shift(yy_state_79) - NT_func_return_type => Shift(yy_state_1804) - T_EQUAL | T_LBRACE => Reduce(0, NT_func_return_type, yy_action_862) + T_COLON => Shift(yy_state_2198) + T_EQUAL => Reduce(4, NT_val_header, yy_action_76) _ => Error } } -fn yy_state_1804(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2198(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACE => Shift(yy_state_120) - T_EQUAL => Shift(yy_state_1062) - NT_block_expr => Shift(yy_state_1064) - NT_impl_body => Shift(yy_state_1805) + T_ASYNC => Shift(yy_state_65) + T_UNDERSCORE => Shift(yy_state_70) + T_AMPER => Shift(yy_state_71) + T_PACKAGE_NAME => Shift(yy_state_73) + T_UIDENT => Shift(yy_state_80) + T_LPAREN => Shift(yy_state_84) + NT_simple_type => Shift(yy_state_110) + NT_type_ => Shift(yy_state_2199) _ => Error } } -fn yy_state_1805(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(13, NT_structure_item, yy_action_67) +fn yy_state_2199(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(6, NT_val_header, yy_action_75) } -fn yy_state_1806(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2200(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_UIDENT => Shift(yy_state_1807) + T_EXTEND => Shift(yy_state_2201) + T_LIDENT => Shift(yy_state_2204) _ => Error } } -fn yy_state_1807(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2201(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_COLON => Shift(yy_state_1081) - NT_option_preceded_COLON_separated_nonempty_list_PLUS_tvar_constraint___ => Shift(yy_state_1808) - T_LBRACE => Reduce(0, NT_option_preceded_COLON_separated_nonempty_list_PLUS_tvar_constraint___, yy_action_272) + T_COLON => Shift(yy_state_2202) + T_EQUAL => Reduce(4, NT_val_header, yy_action_74) _ => Error } } -fn yy_state_1808(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2202(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACE => Shift(yy_state_1809) + T_ASYNC => Shift(yy_state_65) + T_UNDERSCORE => Shift(yy_state_70) + T_AMPER => Shift(yy_state_71) + T_PACKAGE_NAME => Shift(yy_state_73) + T_UIDENT => Shift(yy_state_80) + T_LPAREN => Shift(yy_state_84) + NT_simple_type => Shift(yy_state_110) + NT_type_ => Shift(yy_state_2203) _ => Error } } -fn yy_state_1809(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2203(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(6, NT_val_header, yy_action_73) +} + +fn yy_state_2204(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_ATTRIBUTE => Shift(yy_state_946) - NT_trait_method_decl => Shift(yy_state_1085) - NT_non_empty_list_attribute_ => Shift(yy_state_1089) - T_FN => Shift(yy_state_1124) - NT_trait_method_fn_header => Shift(yy_state_1126) - T_ASYNC => Shift(yy_state_1133) - NT_non_empty_list_semis_trait_method_decl_ => Shift(yy_state_1141) - NT_list_semis_trait_method_decl_ => Shift(yy_state_1810) - T_LIDENT => Reduce(0, NT_trait_method_fn_header, yy_action_269) - T_RBRACE => Reduce(0, NT_list_semis_trait_method_decl_, yy_action_268) + T_COLON => Shift(yy_state_2205) + T_EQUAL => Reduce(4, NT_val_header, yy_action_72) _ => Error } } -fn yy_state_1810(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2205(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RBRACE => Shift(yy_state_1811) + T_ASYNC => Shift(yy_state_65) + T_UNDERSCORE => Shift(yy_state_70) + T_AMPER => Shift(yy_state_71) + T_PACKAGE_NAME => Shift(yy_state_73) + T_UIDENT => Shift(yy_state_80) + T_LPAREN => Shift(yy_state_84) + NT_simple_type => Shift(yy_state_110) + NT_type_ => Shift(yy_state_2206) _ => Error } } -fn yy_state_1811(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(8, NT_structure_item, yy_action_66) +fn yy_state_2206(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(6, NT_val_header, yy_action_71) } -fn yy_state_1812(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2207(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_PACKAGE_NAME => Shift(yy_state_1163) - NT_extenum_extension_target => Shift(yy_state_1813) - T_UIDENT => Shift(yy_state_1819) + T_STRING => Shift(yy_state_2208) _ => Error } } -fn yy_state_1813(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2208(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_PLUS_EQUAL => Shift(yy_state_1814) + T_FN => Shift(yy_state_2209) _ => Error } } -fn yy_state_1814(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2209(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACE => Shift(yy_state_1815) + NT_type_parameters => Shift(yy_state_1223) + NT_option_type_parameters_ => Shift(yy_state_1266) + T_LBRACKET => Shift(yy_state_1267) + NT_optional_type_parameters => Shift(yy_state_2210) + T_LIDENT | T_UIDENT | T_AMPER | T_PACKAGE_NAME | T_EXTEND => Reduce(0, NT_option_type_parameters_, yy_action_383) _ => Error } } -fn yy_state_1815(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2210(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_ATTRIBUTE => Shift(yy_state_946) - NT_enum_constructor => Shift(yy_state_1000) - NT_non_empty_list_attribute_ => Shift(yy_state_1004) - T_UIDENT => Shift(yy_state_1024) - NT_non_empty_list_semis_enum_constructor_ => Shift(yy_state_1027) - NT_list_semis_enum_constructor_ => Shift(yy_state_1816) - T_RBRACE => Reduce(0, NT_list_semis_enum_constructor_, yy_action_317) + T_AMPER => Shift(yy_state_20) + T_PACKAGE_NAME => Shift(yy_state_22) + T_UIDENT => Shift(yy_state_25) + NT_qual_ident_ty => Shift(yy_state_26) + T_EXTEND => Shift(yy_state_1619) + T_LIDENT => Shift(yy_state_1620) + NT_type_name => Shift(yy_state_1621) + NT_fun_binder => Shift(yy_state_2211) _ => Error } } -fn yy_state_1816(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2211(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RBRACE => Shift(yy_state_1817) + T_LPAREN => Shift(yy_state_157) + NT_parameters => Shift(yy_state_1315) + NT_option_parameters_ => Shift(yy_state_2212) + T_RAISE | T_EQUAL | T_THIN_ARROW | T_NORAISE => Reduce(0, NT_option_parameters_, yy_action_336) _ => Error } } -fn yy_state_1817(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2212(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_DERIVE => Shift(yy_state_1171) - NT_deriving_directive_list => Shift(yy_state_1818) - T_EOF | T_SEMI => Reduce(0, NT_deriving_directive_list, yy_action_233) + NT_error_annotation => Shift(yy_state_63) + T_THIN_ARROW => Shift(yy_state_64) + T_NORAISE => Shift(yy_state_91) + T_RAISE => Shift(yy_state_92) + NT_func_return_type => Shift(yy_state_2213) + T_EQUAL => Reduce(0, NT_func_return_type, yy_action_1023) _ => Error } } -fn yy_state_1818(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(9, NT_structure_item, yy_action_65) +fn yy_state_2213(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(9, NT_extern_fun_header, yy_action_70) } -fn yy_state_1819(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2214(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACKET => Shift(yy_state_950) - NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__ => Shift(yy_state_961) - NT_optional_type_parameters_no_constraints => Shift(yy_state_1820) - T_PLUS_EQUAL | T_LBRACE => Reduce(0, NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__, yy_action_347) + T_LPAREN => Shift(yy_state_157) + NT_parameters => Shift(yy_state_1315) + NT_option_parameters_ => Shift(yy_state_2215) + T_RAISE | T_EQUAL | T_LBRACE | T_THIN_ARROW | T_NORAISE | T_WHERE => Reduce(0, NT_option_parameters_, yy_action_336) _ => Error } } -fn yy_state_1820(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2215(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACE => Shift(yy_state_1821) - T_PLUS_EQUAL => Reduce(2, NT_extenum_extension_target, yy_action_223) + NT_error_annotation => Shift(yy_state_63) + T_THIN_ARROW => Shift(yy_state_64) + T_NORAISE => Shift(yy_state_91) + T_RAISE => Shift(yy_state_92) + NT_func_return_type => Shift(yy_state_2216) + T_EQUAL | T_LBRACE | T_WHERE => Reduce(0, NT_func_return_type, yy_action_1023) _ => Error } } -fn yy_state_1821(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2216(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(5, NT_fun_header, yy_action_69) +} + +fn yy_state_2217(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_ATTRIBUTE => Shift(yy_state_946) - NT_enum_constructor => Shift(yy_state_1000) - NT_non_empty_list_attribute_ => Shift(yy_state_1004) - T_UIDENT => Shift(yy_state_1024) - NT_non_empty_list_semis_enum_constructor_ => Shift(yy_state_1027) - NT_list_semis_enum_constructor_ => Shift(yy_state_1822) - T_RBRACE => Reduce(0, NT_list_semis_enum_constructor_, yy_action_317) + T_FN => Shift(yy_state_1627) + NT_fun_header_generic => Shift(yy_state_2218) _ => Error } } -fn yy_state_1822(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2218(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RBRACE => Shift(yy_state_1823) + T_LPAREN => Shift(yy_state_157) + NT_parameters => Shift(yy_state_1315) + NT_option_parameters_ => Shift(yy_state_2219) + T_RAISE | T_EQUAL | T_LBRACE | T_THIN_ARROW | T_NORAISE | T_WHERE => Reduce(0, NT_option_parameters_, yy_action_336) _ => Error } } -fn yy_state_1823(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2219(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_DERIVE => Shift(yy_state_1171) - NT_deriving_directive_list => Shift(yy_state_1824) - T_EOF | T_SEMI => Reduce(0, NT_deriving_directive_list, yy_action_233) + NT_error_annotation => Shift(yy_state_63) + T_THIN_ARROW => Shift(yy_state_64) + T_NORAISE => Shift(yy_state_91) + T_RAISE => Shift(yy_state_92) + NT_func_return_type => Shift(yy_state_2220) + T_EQUAL | T_LBRACE | T_WHERE => Reduce(0, NT_func_return_type, yy_action_1023) _ => Error } } -fn yy_state_1824(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(9, NT_structure_item, yy_action_64) +fn yy_state_2220(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(6, NT_fun_header, yy_action_68) } -fn yy_state_1825(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2221(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_UIDENT => Shift(yy_state_1826) + T_LPAREN => Shift(yy_state_157) + NT_parameters => Shift(yy_state_1315) + NT_option_parameters_ => Shift(yy_state_2222) + T_RAISE | T_EQUAL | T_LBRACE | T_THIN_ARROW | T_NORAISE | T_WHERE => Reduce(0, NT_option_parameters_, yy_action_336) _ => Error } } -fn yy_state_1826(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2222(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_COLON => Shift(yy_state_1827) - T_EQUAL => Reduce(4, NT_val_header, yy_action_63) + NT_error_annotation => Shift(yy_state_63) + T_THIN_ARROW => Shift(yy_state_64) + T_NORAISE => Shift(yy_state_91) + T_RAISE => Shift(yy_state_92) + NT_func_return_type => Shift(yy_state_2223) + T_EQUAL | T_LBRACE | T_WHERE => Reduce(0, NT_func_return_type, yy_action_1023) _ => Error } } -fn yy_state_1827(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2223(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(4, NT_fun_header, yy_action_67) +} + +fn yy_state_2224(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_ASYNC => Shift(yy_state_52) - T_UNDERSCORE => Shift(yy_state_57) - T_AMPER => Shift(yy_state_58) - T_PACKAGE_NAME => Shift(yy_state_60) - T_UIDENT => Shift(yy_state_67) - T_LPAREN => Shift(yy_state_71) - NT_simple_type => Shift(yy_state_97) - NT_type_ => Shift(yy_state_1828) + T_FN => Shift(yy_state_1627) + T_TEST => Shift(yy_state_2225) + NT_fun_header_generic => Shift(yy_state_2229) _ => Error } } -fn yy_state_1828(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(6, NT_val_header, yy_action_62) -} - -fn yy_state_1829(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2225(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LIDENT => Shift(yy_state_1830) + T_STRING => Shift(yy_state_1313) + NT_option_loced_string_ => Shift(yy_state_2226) + T_LPAREN | T_LBRACE => Reduce(0, NT_option_loced_string_, yy_action_339) _ => Error } } -fn yy_state_1830(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2226(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_COLON => Shift(yy_state_1831) - T_EQUAL => Reduce(4, NT_val_header, yy_action_61) + T_LPAREN => Shift(yy_state_157) + NT_parameters => Shift(yy_state_1315) + NT_option_parameters_ => Shift(yy_state_2227) + T_LBRACE => Reduce(0, NT_option_parameters_, yy_action_336) _ => Error } } -fn yy_state_1831(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2227(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_ASYNC => Shift(yy_state_52) - T_UNDERSCORE => Shift(yy_state_57) - T_AMPER => Shift(yy_state_58) - T_PACKAGE_NAME => Shift(yy_state_60) - T_UIDENT => Shift(yy_state_67) - T_LPAREN => Shift(yy_state_71) - NT_simple_type => Shift(yy_state_97) - NT_type_ => Shift(yy_state_1832) + T_LBRACE => Shift(yy_state_133) + NT_block_expr => Shift(yy_state_2228) _ => Error } } -fn yy_state_1832(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(6, NT_val_header, yy_action_60) +fn yy_state_2228(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(6, NT_structure_item, yy_action_66) } -fn yy_state_1833(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2229(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_STRING => Shift(yy_state_1834) + T_LPAREN => Shift(yy_state_157) + NT_parameters => Shift(yy_state_1315) + NT_option_parameters_ => Shift(yy_state_2230) + T_RAISE | T_EQUAL | T_LBRACE | T_THIN_ARROW | T_NORAISE | T_WHERE => Reduce(0, NT_option_parameters_, yy_action_336) _ => Error } } -fn yy_state_1834(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2230(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_FN => Shift(yy_state_1835) + NT_error_annotation => Shift(yy_state_63) + T_THIN_ARROW => Shift(yy_state_64) + T_NORAISE => Shift(yy_state_91) + T_RAISE => Shift(yy_state_92) + NT_func_return_type => Shift(yy_state_2231) + T_EQUAL | T_LBRACE | T_WHERE => Reduce(0, NT_func_return_type, yy_action_1023) _ => Error } } -fn yy_state_1835(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2231(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(5, NT_fun_header, yy_action_64) +} + +fn yy_state_2232(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_type_parameters => Shift(yy_state_996) - NT_option_type_parameters_ => Shift(yy_state_1036) - T_LBRACKET => Shift(yy_state_1037) - NT_optional_type_parameters => Shift(yy_state_1836) - T_LIDENT | T_UIDENT | T_AMPER | T_PACKAGE_NAME => Reduce(0, NT_option_type_parameters_, yy_action_319) + T_LPAREN => Shift(yy_state_1539) + NT_pub_attr => Shift(yy_state_2233) + T_EXTERN | T_STRUCT | T_ENUM | T_TRAIT | T_IMPL | T_ASYNC | T_FN | T_LET | T_CONST | T_USING | T_TYPE | T_SUBERROR | T_ENUMVIEW | T_EXTENUM => Reduce(0, NT_pub_attr, yy_action_261) _ => Error } } -fn yy_state_1836(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2233(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_AMPER => Shift(yy_state_19) - T_PACKAGE_NAME => Shift(yy_state_21) - T_UIDENT => Shift(yy_state_24) - NT_qual_ident_ty => Shift(yy_state_25) - T_LIDENT => Shift(yy_state_1307) - NT_type_name => Shift(yy_state_1308) - NT_fun_binder => Shift(yy_state_1837) + T_FN => Shift(yy_state_1627) + T_ENUM => Shift(yy_state_2234) + T_STRUCT => Shift(yy_state_2237) + T_SUBERROR => Shift(yy_state_2240) + T_TYPE => Shift(yy_state_2242) + T_USING => Shift(yy_state_2245) + T_ENUMVIEW => Shift(yy_state_2250) + T_IMPL => Shift(yy_state_2265) + T_TRAIT => Shift(yy_state_2290) + T_EXTENUM => Shift(yy_state_2296) + T_CONST => Shift(yy_state_2309) + T_LET => Shift(yy_state_2313) + T_EXTERN => Shift(yy_state_2320) + NT_fun_header_generic => Shift(yy_state_2327) + T_ASYNC => Shift(yy_state_2330) _ => Error } } -fn yy_state_1837(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2234(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LPAREN => Shift(yy_state_143) - NT_parameters => Shift(yy_state_1076) - NT_option_parameters_ => Shift(yy_state_1838) - T_RAISE | T_EQUAL | T_THIN_ARROW | T_NORAISE => Reduce(0, NT_option_parameters_, yy_action_275) + T_UIDENT => Shift(yy_state_2235) _ => Error } } -fn yy_state_1838(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2235(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_error_annotation => Shift(yy_state_50) - T_THIN_ARROW => Shift(yy_state_51) - T_NORAISE => Shift(yy_state_78) - T_RAISE => Shift(yy_state_79) - NT_func_return_type => Shift(yy_state_1839) - T_EQUAL => Reduce(0, NT_func_return_type, yy_action_862) + T_LBRACKET => Shift(yy_state_1172) + NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__ => Shift(yy_state_1183) + NT_optional_type_parameters_no_constraints => Shift(yy_state_2236) + T_LBRACE => Reduce(0, NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__, yy_action_415) _ => Error } } -fn yy_state_1839(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(9, NT_extern_fun_header, yy_action_59) +fn yy_state_2236(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(5, NT_enum_header, yy_action_63) } -fn yy_state_1840(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2237(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LPAREN => Shift(yy_state_143) - NT_parameters => Shift(yy_state_1076) - NT_option_parameters_ => Shift(yy_state_1841) - T_RAISE | T_EQUAL | T_LBRACE | T_THIN_ARROW | T_NORAISE | T_WHERE => Reduce(0, NT_option_parameters_, yy_action_275) + T_UIDENT => Shift(yy_state_2238) _ => Error } } -fn yy_state_1841(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2238(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_error_annotation => Shift(yy_state_50) - T_THIN_ARROW => Shift(yy_state_51) - T_NORAISE => Shift(yy_state_78) - T_RAISE => Shift(yy_state_79) - NT_func_return_type => Shift(yy_state_1842) - T_EQUAL | T_LBRACE | T_WHERE => Reduce(0, NT_func_return_type, yy_action_862) + T_LBRACKET => Shift(yy_state_1172) + NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__ => Shift(yy_state_1183) + NT_optional_type_parameters_no_constraints => Shift(yy_state_2239) + T_LPAREN | T_LBRACE => Reduce(0, NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__, yy_action_415) _ => Error } } -fn yy_state_1842(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(5, NT_fun_header, yy_action_58) +fn yy_state_2239(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(5, NT_struct_header, yy_action_62) } -fn yy_state_1843(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2240(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_FN => Shift(yy_state_1313) - NT_fun_header_generic => Shift(yy_state_1844) + T_UIDENT => Shift(yy_state_2241) _ => Error } } -fn yy_state_1844(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2241(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(4, NT_suberror_header, yy_action_61) +} + +fn yy_state_2242(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LPAREN => Shift(yy_state_143) - NT_parameters => Shift(yy_state_1076) - NT_option_parameters_ => Shift(yy_state_1845) - T_RAISE | T_EQUAL | T_LBRACE | T_THIN_ARROW | T_NORAISE | T_WHERE => Reduce(0, NT_option_parameters_, yy_action_275) + T_UIDENT => Shift(yy_state_2243) _ => Error } } -fn yy_state_1845(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2243(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_error_annotation => Shift(yy_state_50) - T_THIN_ARROW => Shift(yy_state_51) - T_NORAISE => Shift(yy_state_78) - T_RAISE => Shift(yy_state_79) - NT_func_return_type => Shift(yy_state_1846) - T_EQUAL | T_LBRACE | T_WHERE => Reduce(0, NT_func_return_type, yy_action_862) + T_LBRACKET => Shift(yy_state_1172) + NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__ => Shift(yy_state_1183) + NT_optional_type_parameters_no_constraints => Shift(yy_state_2244) + T_EOF | T_DERIVE | T_EQUAL | T_SEMI => Reduce(0, NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__, yy_action_415) _ => Error } } -fn yy_state_1846(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(6, NT_fun_header, yy_action_57) +fn yy_state_2244(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(5, NT_type_header, yy_action_60) } -fn yy_state_1847(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2245(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LPAREN => Shift(yy_state_143) - NT_parameters => Shift(yy_state_1076) - NT_option_parameters_ => Shift(yy_state_1848) - T_RAISE | T_EQUAL | T_LBRACE | T_THIN_ARROW | T_NORAISE | T_WHERE => Reduce(0, NT_option_parameters_, yy_action_275) + T_PACKAGE_NAME => Shift(yy_state_2246) _ => Error } } -fn yy_state_1848(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2246(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_error_annotation => Shift(yy_state_50) - T_THIN_ARROW => Shift(yy_state_51) - T_NORAISE => Shift(yy_state_78) - T_RAISE => Shift(yy_state_79) - NT_func_return_type => Shift(yy_state_1849) - T_EQUAL | T_LBRACE | T_WHERE => Reduce(0, NT_func_return_type, yy_action_862) + T_LBRACE => Shift(yy_state_2247) _ => Error } } -fn yy_state_1849(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(4, NT_fun_header, yy_action_56) +fn yy_state_2247(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + NT_using_binder => Shift(yy_state_1195) + NT_non_empty_list_commas_rev_using_binder_ => Shift(yy_state_1196) + T_TRAIT => Shift(yy_state_1200) + T_TYPE => Shift(yy_state_1204) + T_UIDENT => Shift(yy_state_1208) + T_EXTEND => Shift(yy_state_1211) + T_LIDENT => Shift(yy_state_1215) + NT_non_empty_list_commas_using_binder_ => Shift(yy_state_1219) + NT_list_commas_using_binder_ => Shift(yy_state_2248) + T_RBRACE => Reduce(0, NT_list_commas_using_binder_, yy_action_401) + _ => Error + } } -fn yy_state_1850(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2248(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_FN => Shift(yy_state_1313) - T_TEST => Shift(yy_state_1851) - NT_fun_header_generic => Shift(yy_state_1855) + T_RBRACE => Shift(yy_state_2249) _ => Error } } -fn yy_state_1851(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2249(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(7, NT_structure_item, yy_action_59) +} + +fn yy_state_2250(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_STRING => Shift(yy_state_1074) - NT_option_loced_string_ => Shift(yy_state_1852) - T_LPAREN | T_LBRACE => Reduce(0, NT_option_loced_string_, yy_action_278) + NT_type_parameters => Shift(yy_state_1223) + NT_option_type_parameters_ => Shift(yy_state_1266) + T_LBRACKET => Shift(yy_state_1267) + NT_optional_type_parameters => Shift(yy_state_2251) + T_UIDENT => Reduce(0, NT_option_type_parameters_, yy_action_383) _ => Error } } -fn yy_state_1852(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2251(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LPAREN => Shift(yy_state_143) - NT_parameters => Shift(yy_state_1076) - NT_option_parameters_ => Shift(yy_state_1853) - T_LBRACE => Reduce(0, NT_option_parameters_, yy_action_275) + T_UIDENT => Shift(yy_state_2252) _ => Error } } -fn yy_state_1853(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2252(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACE => Shift(yy_state_120) - NT_block_expr => Shift(yy_state_1854) + T_LBRACE => Shift(yy_state_2253) _ => Error } } -fn yy_state_1854(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(6, NT_structure_item, yy_action_55) +fn yy_state_2253(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_ATTRIBUTE => Shift(yy_state_1168) + NT_enum_constructor => Shift(yy_state_1227) + NT_non_empty_list_attribute_ => Shift(yy_state_1231) + T_UIDENT => Shift(yy_state_1251) + NT_non_empty_list_semis_enum_constructor_ => Shift(yy_state_1254) + NT_list_semis_enum_constructor_ => Shift(yy_state_2254) + T_RBRACE => Reduce(0, NT_list_semis_enum_constructor_, yy_action_381) + _ => Error + } } -fn yy_state_1855(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2254(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LPAREN => Shift(yy_state_143) - NT_parameters => Shift(yy_state_1076) - NT_option_parameters_ => Shift(yy_state_1856) - T_RAISE | T_EQUAL | T_LBRACE | T_THIN_ARROW | T_NORAISE | T_WHERE => Reduce(0, NT_option_parameters_, yy_action_275) + T_RBRACE => Shift(yy_state_2255) _ => Error } } -fn yy_state_1856(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2255(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_error_annotation => Shift(yy_state_50) - T_THIN_ARROW => Shift(yy_state_51) - T_NORAISE => Shift(yy_state_78) - T_RAISE => Shift(yy_state_79) - NT_func_return_type => Shift(yy_state_1857) - T_EQUAL | T_LBRACE | T_WHERE => Reduce(0, NT_func_return_type, yy_action_862) + T_FOR => Shift(yy_state_2256) _ => Error } } -fn yy_state_1857(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(5, NT_fun_header, yy_action_53) +fn yy_state_2256(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_ASYNC => Shift(yy_state_65) + T_UNDERSCORE => Shift(yy_state_70) + T_AMPER => Shift(yy_state_71) + T_PACKAGE_NAME => Shift(yy_state_73) + T_UIDENT => Shift(yy_state_80) + T_LPAREN => Shift(yy_state_84) + NT_simple_type => Shift(yy_state_110) + NT_type_ => Shift(yy_state_2257) + _ => Error + } } -fn yy_state_1858(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2257(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LPAREN => Shift(yy_state_1247) - NT_pub_attr => Shift(yy_state_1859) - T_EXTERN | T_STRUCT | T_ENUM | T_TRAIT | T_IMPL | T_ASYNC | T_FN | T_LET | T_CONST | T_USING | T_TYPE | T_SUBERROR | T_ENUMVIEW | T_EXTENUM => Reduce(0, NT_pub_attr, yy_action_210) + T_WITH => Shift(yy_state_2258) _ => Error } } -fn yy_state_1859(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2258(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_FN => Shift(yy_state_1313) - T_ENUM => Shift(yy_state_1860) - T_STRUCT => Shift(yy_state_1863) - T_SUBERROR => Shift(yy_state_1866) - T_TYPE => Shift(yy_state_1868) - T_USING => Shift(yy_state_1871) - T_ENUMVIEW => Shift(yy_state_1876) - T_IMPL => Shift(yy_state_1888) - T_TRAIT => Shift(yy_state_1905) - T_EXTENUM => Shift(yy_state_1911) - T_CONST => Shift(yy_state_1924) - T_LET => Shift(yy_state_1928) - T_EXTERN => Shift(yy_state_1932) - NT_fun_header_generic => Shift(yy_state_1939) - T_ASYNC => Shift(yy_state_1942) + T_EXTEND => Shift(yy_state_2259) + T_LIDENT => Shift(yy_state_2262) _ => Error } } -fn yy_state_1860(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2259(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_UIDENT => Shift(yy_state_1861) + T_LPAREN => Shift(yy_state_157) + NT_parameters => Shift(yy_state_2260) _ => Error } } -fn yy_state_1861(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2260(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACKET => Shift(yy_state_950) - NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__ => Shift(yy_state_961) - NT_optional_type_parameters_no_constraints => Shift(yy_state_1862) - T_LBRACE => Reduce(0, NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__, yy_action_347) + T_LBRACE => Shift(yy_state_133) + NT_block_expr => Shift(yy_state_2261) _ => Error } } -fn yy_state_1862(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(5, NT_enum_header, yy_action_52) +fn yy_state_2261(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(14, NT_structure_item, yy_action_58) } -fn yy_state_1863(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2262(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_UIDENT => Shift(yy_state_1864) + T_LPAREN => Shift(yy_state_157) + NT_parameters => Shift(yy_state_2263) _ => Error } } -fn yy_state_1864(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2263(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACKET => Shift(yy_state_950) - NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__ => Shift(yy_state_961) - NT_optional_type_parameters_no_constraints => Shift(yy_state_1865) - T_LPAREN | T_LBRACE => Reduce(0, NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__, yy_action_347) + T_LBRACE => Shift(yy_state_133) + NT_block_expr => Shift(yy_state_2264) _ => Error } } -fn yy_state_1865(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(5, NT_struct_header, yy_action_51) +fn yy_state_2264(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(14, NT_structure_item, yy_action_57) } -fn yy_state_1866(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2265(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_UIDENT => Shift(yy_state_1867) + NT_type_parameters => Shift(yy_state_1223) + NT_option_type_parameters_ => Shift(yy_state_1266) + T_LBRACKET => Shift(yy_state_1267) + NT_optional_type_parameters => Shift(yy_state_2266) + T_UIDENT | T_AMPER | T_PACKAGE_NAME => Reduce(0, NT_option_type_parameters_, yy_action_383) _ => Error } } -fn yy_state_1867(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(4, NT_suberror_header, yy_action_50) -} - -fn yy_state_1868(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2266(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_UIDENT => Shift(yy_state_1869) + T_AMPER => Shift(yy_state_20) + T_PACKAGE_NAME => Shift(yy_state_22) + T_UIDENT => Shift(yy_state_25) + NT_qual_ident_ty => Shift(yy_state_26) + NT_type_name => Shift(yy_state_2267) _ => Error } } -fn yy_state_1869(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2267(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACKET => Shift(yy_state_950) - NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__ => Shift(yy_state_961) - NT_optional_type_parameters_no_constraints => Shift(yy_state_1870) - T_EOF | T_DERIVE | T_EQUAL | T_SEMI => Reduce(0, NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__, yy_action_347) + T_WITH => Shift(yy_state_2268) + T_FOR => Shift(yy_state_2278) _ => Error } } -fn yy_state_1870(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(5, NT_type_header, yy_action_49) +fn yy_state_2268(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_FN => Shift(yy_state_1286) + NT_impl_optional_fn => Shift(yy_state_2269) + T_LIDENT | T_EXTEND => Reduce(0, NT_impl_optional_fn, yy_action_348) + _ => Error + } } -fn yy_state_1871(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2269(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_PACKAGE_NAME => Shift(yy_state_1872) + T_EXTEND => Shift(yy_state_2270) + T_LIDENT => Shift(yy_state_2274) _ => Error } } -fn yy_state_1872(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2270(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACE => Shift(yy_state_1873) + T_LPAREN => Shift(yy_state_157) + NT_parameters => Shift(yy_state_2271) _ => Error } } -fn yy_state_1873(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2271(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_using_binder => Shift(yy_state_973) - NT_non_empty_list_commas_rev_using_binder_ => Shift(yy_state_974) - T_TRAIT => Shift(yy_state_978) - T_TYPE => Shift(yy_state_982) - T_UIDENT => Shift(yy_state_986) - T_LIDENT => Shift(yy_state_989) - NT_non_empty_list_commas_using_binder_ => Shift(yy_state_992) - NT_list_commas_using_binder_ => Shift(yy_state_1874) - T_RBRACE => Reduce(0, NT_list_commas_using_binder_, yy_action_333) + NT_error_annotation => Shift(yy_state_63) + T_THIN_ARROW => Shift(yy_state_64) + T_NORAISE => Shift(yy_state_91) + T_RAISE => Shift(yy_state_92) + NT_func_return_type => Shift(yy_state_2272) + T_EQUAL | T_LBRACE => Reduce(0, NT_func_return_type, yy_action_1023) _ => Error } } -fn yy_state_1874(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2272(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RBRACE => Shift(yy_state_1875) + T_LBRACE => Shift(yy_state_133) + T_EQUAL => Shift(yy_state_1293) + NT_block_expr => Shift(yy_state_1295) + NT_impl_body => Shift(yy_state_2273) _ => Error } } -fn yy_state_1875(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(7, NT_structure_item, yy_action_48) +fn yy_state_2273(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(11, NT_structure_item, yy_action_56) } -fn yy_state_1876(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2274(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_type_parameters => Shift(yy_state_996) - NT_option_type_parameters_ => Shift(yy_state_1036) - T_LBRACKET => Shift(yy_state_1037) - NT_optional_type_parameters => Shift(yy_state_1877) - T_UIDENT => Reduce(0, NT_option_type_parameters_, yy_action_319) + T_LPAREN => Shift(yy_state_157) + NT_parameters => Shift(yy_state_2275) _ => Error } } -fn yy_state_1877(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2275(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_UIDENT => Shift(yy_state_1878) + NT_error_annotation => Shift(yy_state_63) + T_THIN_ARROW => Shift(yy_state_64) + T_NORAISE => Shift(yy_state_91) + T_RAISE => Shift(yy_state_92) + NT_func_return_type => Shift(yy_state_2276) + T_EQUAL | T_LBRACE => Reduce(0, NT_func_return_type, yy_action_1023) _ => Error } } -fn yy_state_1878(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2276(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACE => Shift(yy_state_1879) + T_LBRACE => Shift(yy_state_133) + T_EQUAL => Shift(yy_state_1293) + NT_block_expr => Shift(yy_state_1295) + NT_impl_body => Shift(yy_state_2277) _ => Error } } -fn yy_state_1879(_lookahead : YYSymbol) -> YYDecision { - match _lookahead { - T_ATTRIBUTE => Shift(yy_state_946) - NT_enum_constructor => Shift(yy_state_1000) - NT_non_empty_list_attribute_ => Shift(yy_state_1004) - T_UIDENT => Shift(yy_state_1024) - NT_non_empty_list_semis_enum_constructor_ => Shift(yy_state_1027) - NT_list_semis_enum_constructor_ => Shift(yy_state_1880) - T_RBRACE => Reduce(0, NT_list_semis_enum_constructor_, yy_action_317) - _ => Error - } +fn yy_state_2277(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(11, NT_structure_item, yy_action_55) } -fn yy_state_1880(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2278(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RBRACE => Shift(yy_state_1881) + T_ASYNC => Shift(yy_state_65) + T_UNDERSCORE => Shift(yy_state_70) + T_AMPER => Shift(yy_state_71) + T_PACKAGE_NAME => Shift(yy_state_73) + T_UIDENT => Shift(yy_state_80) + T_LPAREN => Shift(yy_state_84) + NT_simple_type => Shift(yy_state_110) + NT_type_ => Shift(yy_state_2279) _ => Error } } -fn yy_state_1881(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2279(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_FOR => Shift(yy_state_1882) + T_WITH => Shift(yy_state_2280) + T_EOF | T_SEMI => Reduce(7, NT_structure_item, yy_action_54) _ => Error } } -fn yy_state_1882(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2280(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_ASYNC => Shift(yy_state_52) - T_UNDERSCORE => Shift(yy_state_57) - T_AMPER => Shift(yy_state_58) - T_PACKAGE_NAME => Shift(yy_state_60) - T_UIDENT => Shift(yy_state_67) - T_LPAREN => Shift(yy_state_71) - NT_simple_type => Shift(yy_state_97) - NT_type_ => Shift(yy_state_1883) + T_FN => Shift(yy_state_1286) + NT_impl_optional_fn => Shift(yy_state_2281) + T_LIDENT | T_EXTEND => Reduce(0, NT_impl_optional_fn, yy_action_348) _ => Error } } -fn yy_state_1883(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2281(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_WITH => Shift(yy_state_1884) + T_EXTEND => Shift(yy_state_2282) + T_LIDENT => Shift(yy_state_2286) _ => Error } } -fn yy_state_1884(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2282(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LIDENT => Shift(yy_state_1885) + T_LPAREN => Shift(yy_state_157) + NT_parameters => Shift(yy_state_2283) _ => Error } } -fn yy_state_1885(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2283(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LPAREN => Shift(yy_state_143) - NT_parameters => Shift(yy_state_1886) + NT_error_annotation => Shift(yy_state_63) + T_THIN_ARROW => Shift(yy_state_64) + T_NORAISE => Shift(yy_state_91) + T_RAISE => Shift(yy_state_92) + NT_func_return_type => Shift(yy_state_2284) + T_EQUAL | T_LBRACE => Reduce(0, NT_func_return_type, yy_action_1023) _ => Error } } -fn yy_state_1886(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2284(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACE => Shift(yy_state_120) - NT_block_expr => Shift(yy_state_1887) + T_LBRACE => Shift(yy_state_133) + T_EQUAL => Shift(yy_state_1293) + NT_block_expr => Shift(yy_state_1295) + NT_impl_body => Shift(yy_state_2285) _ => Error } } -fn yy_state_1887(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(14, NT_structure_item, yy_action_47) +fn yy_state_2285(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(13, NT_structure_item, yy_action_53) } -fn yy_state_1888(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2286(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_type_parameters => Shift(yy_state_996) - NT_option_type_parameters_ => Shift(yy_state_1036) - T_LBRACKET => Shift(yy_state_1037) - NT_optional_type_parameters => Shift(yy_state_1889) - T_UIDENT | T_AMPER | T_PACKAGE_NAME => Reduce(0, NT_option_type_parameters_, yy_action_319) + T_LPAREN => Shift(yy_state_157) + NT_parameters => Shift(yy_state_2287) _ => Error } } -fn yy_state_1889(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2287(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_AMPER => Shift(yy_state_19) - T_PACKAGE_NAME => Shift(yy_state_21) - T_UIDENT => Shift(yy_state_24) - NT_qual_ident_ty => Shift(yy_state_25) - NT_type_name => Shift(yy_state_1890) + NT_error_annotation => Shift(yy_state_63) + T_THIN_ARROW => Shift(yy_state_64) + T_NORAISE => Shift(yy_state_91) + T_RAISE => Shift(yy_state_92) + NT_func_return_type => Shift(yy_state_2288) + T_EQUAL | T_LBRACE => Reduce(0, NT_func_return_type, yy_action_1023) _ => Error } } -fn yy_state_1890(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2288(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_WITH => Shift(yy_state_1891) - T_FOR => Shift(yy_state_1897) + T_LBRACE => Shift(yy_state_133) + T_EQUAL => Shift(yy_state_1293) + NT_block_expr => Shift(yy_state_1295) + NT_impl_body => Shift(yy_state_2289) _ => Error } } -fn yy_state_1891(_lookahead : YYSymbol) -> YYDecision { - match _lookahead { - T_FN => Shift(yy_state_1056) - NT_option_FN_ => Shift(yy_state_1892) - T_LIDENT => Reduce(0, NT_option_FN_, yy_action_285) - _ => Error - } +fn yy_state_2289(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(13, NT_structure_item, yy_action_52) } -fn yy_state_1892(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2290(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LIDENT => Shift(yy_state_1893) + T_UIDENT => Shift(yy_state_2291) _ => Error } } -fn yy_state_1893(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2291(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LPAREN => Shift(yy_state_143) - NT_parameters => Shift(yy_state_1894) + T_COLON => Shift(yy_state_1320) + NT_option_preceded_COLON_separated_nonempty_list_PLUS_tvar_constraint___ => Shift(yy_state_2292) + T_LBRACE => Reduce(0, NT_option_preceded_COLON_separated_nonempty_list_PLUS_tvar_constraint___, yy_action_333) _ => Error } } -fn yy_state_1894(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2292(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_error_annotation => Shift(yy_state_50) - T_THIN_ARROW => Shift(yy_state_51) - T_NORAISE => Shift(yy_state_78) - T_RAISE => Shift(yy_state_79) - NT_func_return_type => Shift(yy_state_1895) - T_EQUAL | T_LBRACE => Reduce(0, NT_func_return_type, yy_action_862) + T_LBRACE => Shift(yy_state_2293) _ => Error } } -fn yy_state_1895(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2293(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACE => Shift(yy_state_120) - T_EQUAL => Shift(yy_state_1062) - NT_block_expr => Shift(yy_state_1064) - NT_impl_body => Shift(yy_state_1896) + T_ATTRIBUTE => Shift(yy_state_1168) + NT_trait_method_decl => Shift(yy_state_1324) + NT_non_empty_list_attribute_ => Shift(yy_state_1328) + T_FN => Shift(yy_state_1381) + NT_trait_method_fn_header => Shift(yy_state_1383) + T_ASYNC => Shift(yy_state_1396) + NT_non_empty_list_semis_trait_method_decl_ => Shift(yy_state_1410) + NT_list_semis_trait_method_decl_ => Shift(yy_state_2294) + T_LIDENT | T_EXTEND => Reduce(0, NT_trait_method_fn_header, yy_action_330) + T_RBRACE => Reduce(0, NT_list_semis_trait_method_decl_, yy_action_329) _ => Error } } -fn yy_state_1896(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(11, NT_structure_item, yy_action_46) -} - -fn yy_state_1897(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2294(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_ASYNC => Shift(yy_state_52) - T_UNDERSCORE => Shift(yy_state_57) - T_AMPER => Shift(yy_state_58) - T_PACKAGE_NAME => Shift(yy_state_60) - T_UIDENT => Shift(yy_state_67) - T_LPAREN => Shift(yy_state_71) - NT_simple_type => Shift(yy_state_97) - NT_type_ => Shift(yy_state_1898) + T_RBRACE => Shift(yy_state_2295) _ => Error } } -fn yy_state_1898(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2295(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(8, NT_structure_item, yy_action_51) +} + +fn yy_state_2296(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_WITH => Shift(yy_state_1899) - T_EOF | T_SEMI => Reduce(7, NT_structure_item, yy_action_45) + T_PACKAGE_NAME => Shift(yy_state_1432) + NT_extenum_extension_target => Shift(yy_state_2297) + T_UIDENT => Shift(yy_state_2303) _ => Error } } -fn yy_state_1899(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2297(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_FN => Shift(yy_state_1056) - NT_option_FN_ => Shift(yy_state_1900) - T_LIDENT => Reduce(0, NT_option_FN_, yy_action_285) + T_PLUS_EQUAL => Shift(yy_state_2298) _ => Error } } -fn yy_state_1900(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2298(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LIDENT => Shift(yy_state_1901) + T_LBRACE => Shift(yy_state_2299) _ => Error } } -fn yy_state_1901(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2299(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LPAREN => Shift(yy_state_143) - NT_parameters => Shift(yy_state_1902) + T_ATTRIBUTE => Shift(yy_state_1168) + NT_enum_constructor => Shift(yy_state_1227) + NT_non_empty_list_attribute_ => Shift(yy_state_1231) + T_UIDENT => Shift(yy_state_1251) + NT_non_empty_list_semis_enum_constructor_ => Shift(yy_state_1254) + NT_list_semis_enum_constructor_ => Shift(yy_state_2300) + T_RBRACE => Reduce(0, NT_list_semis_enum_constructor_, yy_action_381) _ => Error } } -fn yy_state_1902(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2300(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_error_annotation => Shift(yy_state_50) - T_THIN_ARROW => Shift(yy_state_51) - T_NORAISE => Shift(yy_state_78) - T_RAISE => Shift(yy_state_79) - NT_func_return_type => Shift(yy_state_1903) - T_EQUAL | T_LBRACE => Reduce(0, NT_func_return_type, yy_action_862) + T_RBRACE => Shift(yy_state_2301) _ => Error } } -fn yy_state_1903(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2301(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACE => Shift(yy_state_120) - T_EQUAL => Shift(yy_state_1062) - NT_block_expr => Shift(yy_state_1064) - NT_impl_body => Shift(yy_state_1904) + T_DERIVE => Shift(yy_state_1440) + NT_deriving_directive_list => Shift(yy_state_2302) + T_EOF | T_SEMI => Reduce(0, NT_deriving_directive_list, yy_action_288) _ => Error } } -fn yy_state_1904(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(13, NT_structure_item, yy_action_44) +fn yy_state_2302(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(9, NT_structure_item, yy_action_50) } -fn yy_state_1905(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2303(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_UIDENT => Shift(yy_state_1906) + T_LBRACKET => Shift(yy_state_1172) + NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__ => Shift(yy_state_1183) + NT_optional_type_parameters_no_constraints => Shift(yy_state_2304) + T_PLUS_EQUAL | T_LBRACE => Reduce(0, NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__, yy_action_415) _ => Error } } -fn yy_state_1906(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2304(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_COLON => Shift(yy_state_1081) - NT_option_preceded_COLON_separated_nonempty_list_PLUS_tvar_constraint___ => Shift(yy_state_1907) - T_LBRACE => Reduce(0, NT_option_preceded_COLON_separated_nonempty_list_PLUS_tvar_constraint___, yy_action_272) + T_LBRACE => Shift(yy_state_2305) + T_PLUS_EQUAL => Reduce(2, NT_extenum_extension_target, yy_action_278) _ => Error } } -fn yy_state_1907(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2305(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACE => Shift(yy_state_1908) + T_ATTRIBUTE => Shift(yy_state_1168) + NT_enum_constructor => Shift(yy_state_1227) + NT_non_empty_list_attribute_ => Shift(yy_state_1231) + T_UIDENT => Shift(yy_state_1251) + NT_non_empty_list_semis_enum_constructor_ => Shift(yy_state_1254) + NT_list_semis_enum_constructor_ => Shift(yy_state_2306) + T_RBRACE => Reduce(0, NT_list_semis_enum_constructor_, yy_action_381) _ => Error } } -fn yy_state_1908(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2306(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_ATTRIBUTE => Shift(yy_state_946) - NT_trait_method_decl => Shift(yy_state_1085) - NT_non_empty_list_attribute_ => Shift(yy_state_1089) - T_FN => Shift(yy_state_1124) - NT_trait_method_fn_header => Shift(yy_state_1126) - T_ASYNC => Shift(yy_state_1133) - NT_non_empty_list_semis_trait_method_decl_ => Shift(yy_state_1141) - NT_list_semis_trait_method_decl_ => Shift(yy_state_1909) - T_LIDENT => Reduce(0, NT_trait_method_fn_header, yy_action_269) - T_RBRACE => Reduce(0, NT_list_semis_trait_method_decl_, yy_action_268) + T_RBRACE => Shift(yy_state_2307) _ => Error } } -fn yy_state_1909(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2307(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RBRACE => Shift(yy_state_1910) + T_DERIVE => Shift(yy_state_1440) + NT_deriving_directive_list => Shift(yy_state_2308) + T_EOF | T_SEMI => Reduce(0, NT_deriving_directive_list, yy_action_288) _ => Error } } -fn yy_state_1910(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(8, NT_structure_item, yy_action_43) +fn yy_state_2308(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(9, NT_structure_item, yy_action_49) } -fn yy_state_1911(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2309(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_PACKAGE_NAME => Shift(yy_state_1163) - NT_extenum_extension_target => Shift(yy_state_1912) - T_UIDENT => Shift(yy_state_1918) + T_UIDENT => Shift(yy_state_2310) _ => Error } } -fn yy_state_1912(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2310(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_PLUS_EQUAL => Shift(yy_state_1913) + T_COLON => Shift(yy_state_2311) + T_EQUAL => Reduce(4, NT_val_header, yy_action_48) _ => Error } } -fn yy_state_1913(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2311(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACE => Shift(yy_state_1914) + T_ASYNC => Shift(yy_state_65) + T_UNDERSCORE => Shift(yy_state_70) + T_AMPER => Shift(yy_state_71) + T_PACKAGE_NAME => Shift(yy_state_73) + T_UIDENT => Shift(yy_state_80) + T_LPAREN => Shift(yy_state_84) + NT_simple_type => Shift(yy_state_110) + NT_type_ => Shift(yy_state_2312) _ => Error } } -fn yy_state_1914(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2312(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(6, NT_val_header, yy_action_47) +} + +fn yy_state_2313(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_ATTRIBUTE => Shift(yy_state_946) - NT_enum_constructor => Shift(yy_state_1000) - NT_non_empty_list_attribute_ => Shift(yy_state_1004) - T_UIDENT => Shift(yy_state_1024) - NT_non_empty_list_semis_enum_constructor_ => Shift(yy_state_1027) - NT_list_semis_enum_constructor_ => Shift(yy_state_1915) - T_RBRACE => Reduce(0, NT_list_semis_enum_constructor_, yy_action_317) + T_EXTEND => Shift(yy_state_2314) + T_LIDENT => Shift(yy_state_2317) _ => Error } } -fn yy_state_1915(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2314(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RBRACE => Shift(yy_state_1916) + T_COLON => Shift(yy_state_2315) + T_EQUAL => Reduce(4, NT_val_header, yy_action_46) _ => Error } } -fn yy_state_1916(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2315(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_DERIVE => Shift(yy_state_1171) - NT_deriving_directive_list => Shift(yy_state_1917) - T_EOF | T_SEMI => Reduce(0, NT_deriving_directive_list, yy_action_233) + T_ASYNC => Shift(yy_state_65) + T_UNDERSCORE => Shift(yy_state_70) + T_AMPER => Shift(yy_state_71) + T_PACKAGE_NAME => Shift(yy_state_73) + T_UIDENT => Shift(yy_state_80) + T_LPAREN => Shift(yy_state_84) + NT_simple_type => Shift(yy_state_110) + NT_type_ => Shift(yy_state_2316) _ => Error } } -fn yy_state_1917(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(9, NT_structure_item, yy_action_42) +fn yy_state_2316(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(6, NT_val_header, yy_action_45) } -fn yy_state_1918(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2317(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACKET => Shift(yy_state_950) - NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__ => Shift(yy_state_961) - NT_optional_type_parameters_no_constraints => Shift(yy_state_1919) - T_PLUS_EQUAL | T_LBRACE => Reduce(0, NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__, yy_action_347) + T_COLON => Shift(yy_state_2318) + T_EQUAL => Reduce(4, NT_val_header, yy_action_44) _ => Error } } -fn yy_state_1919(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2318(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACE => Shift(yy_state_1920) - T_PLUS_EQUAL => Reduce(2, NT_extenum_extension_target, yy_action_223) + T_ASYNC => Shift(yy_state_65) + T_UNDERSCORE => Shift(yy_state_70) + T_AMPER => Shift(yy_state_71) + T_PACKAGE_NAME => Shift(yy_state_73) + T_UIDENT => Shift(yy_state_80) + T_LPAREN => Shift(yy_state_84) + NT_simple_type => Shift(yy_state_110) + NT_type_ => Shift(yy_state_2319) _ => Error } } -fn yy_state_1920(_lookahead : YYSymbol) -> YYDecision { - match _lookahead { - T_ATTRIBUTE => Shift(yy_state_946) - NT_enum_constructor => Shift(yy_state_1000) - NT_non_empty_list_attribute_ => Shift(yy_state_1004) - T_UIDENT => Shift(yy_state_1024) - NT_non_empty_list_semis_enum_constructor_ => Shift(yy_state_1027) - NT_list_semis_enum_constructor_ => Shift(yy_state_1921) - T_RBRACE => Reduce(0, NT_list_semis_enum_constructor_, yy_action_317) - _ => Error - } +fn yy_state_2319(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(6, NT_val_header, yy_action_43) } -fn yy_state_1921(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2320(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RBRACE => Shift(yy_state_1922) + T_STRING => Shift(yy_state_2321) _ => Error } } -fn yy_state_1922(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2321(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_DERIVE => Shift(yy_state_1171) - NT_deriving_directive_list => Shift(yy_state_1923) - T_EOF | T_SEMI => Reduce(0, NT_deriving_directive_list, yy_action_233) + T_FN => Shift(yy_state_2322) _ => Error } } -fn yy_state_1923(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(9, NT_structure_item, yy_action_41) -} - -fn yy_state_1924(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2322(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_UIDENT => Shift(yy_state_1925) + NT_type_parameters => Shift(yy_state_1223) + NT_option_type_parameters_ => Shift(yy_state_1266) + T_LBRACKET => Shift(yy_state_1267) + NT_optional_type_parameters => Shift(yy_state_2323) + T_LIDENT | T_UIDENT | T_AMPER | T_PACKAGE_NAME | T_EXTEND => Reduce(0, NT_option_type_parameters_, yy_action_383) _ => Error } } -fn yy_state_1925(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2323(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_COLON => Shift(yy_state_1926) - T_EQUAL => Reduce(4, NT_val_header, yy_action_40) + T_AMPER => Shift(yy_state_20) + T_PACKAGE_NAME => Shift(yy_state_22) + T_UIDENT => Shift(yy_state_25) + NT_qual_ident_ty => Shift(yy_state_26) + T_EXTEND => Shift(yy_state_1619) + T_LIDENT => Shift(yy_state_1620) + NT_type_name => Shift(yy_state_1621) + NT_fun_binder => Shift(yy_state_2324) _ => Error } } -fn yy_state_1926(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2324(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_ASYNC => Shift(yy_state_52) - T_UNDERSCORE => Shift(yy_state_57) - T_AMPER => Shift(yy_state_58) - T_PACKAGE_NAME => Shift(yy_state_60) - T_UIDENT => Shift(yy_state_67) - T_LPAREN => Shift(yy_state_71) - NT_simple_type => Shift(yy_state_97) - NT_type_ => Shift(yy_state_1927) + T_LPAREN => Shift(yy_state_157) + NT_parameters => Shift(yy_state_1315) + NT_option_parameters_ => Shift(yy_state_2325) + T_RAISE | T_EQUAL | T_THIN_ARROW | T_NORAISE => Reduce(0, NT_option_parameters_, yy_action_336) _ => Error } } -fn yy_state_1927(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(6, NT_val_header, yy_action_39) -} - -fn yy_state_1928(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2325(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LIDENT => Shift(yy_state_1929) + NT_error_annotation => Shift(yy_state_63) + T_THIN_ARROW => Shift(yy_state_64) + T_NORAISE => Shift(yy_state_91) + T_RAISE => Shift(yy_state_92) + NT_func_return_type => Shift(yy_state_2326) + T_EQUAL => Reduce(0, NT_func_return_type, yy_action_1023) _ => Error } } -fn yy_state_1929(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2326(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(9, NT_extern_fun_header, yy_action_42) +} + +fn yy_state_2327(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_COLON => Shift(yy_state_1930) - T_EQUAL => Reduce(4, NT_val_header, yy_action_38) + T_LPAREN => Shift(yy_state_157) + NT_parameters => Shift(yy_state_1315) + NT_option_parameters_ => Shift(yy_state_2328) + T_RAISE | T_EQUAL | T_LBRACE | T_THIN_ARROW | T_NORAISE | T_WHERE => Reduce(0, NT_option_parameters_, yy_action_336) _ => Error } } -fn yy_state_1930(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2328(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_ASYNC => Shift(yy_state_52) - T_UNDERSCORE => Shift(yy_state_57) - T_AMPER => Shift(yy_state_58) - T_PACKAGE_NAME => Shift(yy_state_60) - T_UIDENT => Shift(yy_state_67) - T_LPAREN => Shift(yy_state_71) - NT_simple_type => Shift(yy_state_97) - NT_type_ => Shift(yy_state_1931) + NT_error_annotation => Shift(yy_state_63) + T_THIN_ARROW => Shift(yy_state_64) + T_NORAISE => Shift(yy_state_91) + T_RAISE => Shift(yy_state_92) + NT_func_return_type => Shift(yy_state_2329) + T_EQUAL | T_LBRACE | T_WHERE => Reduce(0, NT_func_return_type, yy_action_1023) _ => Error } } -fn yy_state_1931(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(6, NT_val_header, yy_action_37) +fn yy_state_2329(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(5, NT_fun_header, yy_action_41) } -fn yy_state_1932(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2330(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_STRING => Shift(yy_state_1933) + T_FN => Shift(yy_state_1627) + NT_fun_header_generic => Shift(yy_state_2331) _ => Error } } -fn yy_state_1933(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2331(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_FN => Shift(yy_state_1934) + T_LPAREN => Shift(yy_state_157) + NT_parameters => Shift(yy_state_1315) + NT_option_parameters_ => Shift(yy_state_2332) + T_RAISE | T_EQUAL | T_LBRACE | T_THIN_ARROW | T_NORAISE | T_WHERE => Reduce(0, NT_option_parameters_, yy_action_336) _ => Error } } -fn yy_state_1934(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2332(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_type_parameters => Shift(yy_state_996) - NT_option_type_parameters_ => Shift(yy_state_1036) - T_LBRACKET => Shift(yy_state_1037) - NT_optional_type_parameters => Shift(yy_state_1935) - T_LIDENT | T_UIDENT | T_AMPER | T_PACKAGE_NAME => Reduce(0, NT_option_type_parameters_, yy_action_319) + NT_error_annotation => Shift(yy_state_63) + T_THIN_ARROW => Shift(yy_state_64) + T_NORAISE => Shift(yy_state_91) + T_RAISE => Shift(yy_state_92) + NT_func_return_type => Shift(yy_state_2333) + T_EQUAL | T_LBRACE | T_WHERE => Reduce(0, NT_func_return_type, yy_action_1023) _ => Error } } -fn yy_state_1935(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2333(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(6, NT_fun_header, yy_action_39) +} + +fn yy_state_2334(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_AMPER => Shift(yy_state_19) - T_PACKAGE_NAME => Shift(yy_state_21) - T_UIDENT => Shift(yy_state_24) - NT_qual_ident_ty => Shift(yy_state_25) - T_LIDENT => Shift(yy_state_1307) - NT_type_name => Shift(yy_state_1308) - NT_fun_binder => Shift(yy_state_1936) + T_FN => Shift(yy_state_1627) + T_ENUM => Shift(yy_state_2335) + T_STRUCT => Shift(yy_state_2338) + T_SUBERROR => Shift(yy_state_2341) + T_TYPE => Shift(yy_state_2343) + T_USING => Shift(yy_state_2346) + T_ENUMVIEW => Shift(yy_state_2351) + T_IMPL => Shift(yy_state_2366) + T_TRAIT => Shift(yy_state_2391) + T_EXTENUM => Shift(yy_state_2397) + T_CONST => Shift(yy_state_2410) + T_LET => Shift(yy_state_2414) + T_EXTERN => Shift(yy_state_2421) + NT_fun_header_generic => Shift(yy_state_2428) + T_ASYNC => Shift(yy_state_2431) _ => Error } } -fn yy_state_1936(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2335(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LPAREN => Shift(yy_state_143) - NT_parameters => Shift(yy_state_1076) - NT_option_parameters_ => Shift(yy_state_1937) - T_RAISE | T_EQUAL | T_THIN_ARROW | T_NORAISE => Reduce(0, NT_option_parameters_, yy_action_275) + T_UIDENT => Shift(yy_state_2336) _ => Error } } -fn yy_state_1937(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2336(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_error_annotation => Shift(yy_state_50) - T_THIN_ARROW => Shift(yy_state_51) - T_NORAISE => Shift(yy_state_78) - T_RAISE => Shift(yy_state_79) - NT_func_return_type => Shift(yy_state_1938) - T_EQUAL => Reduce(0, NT_func_return_type, yy_action_862) + T_LBRACKET => Shift(yy_state_1172) + NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__ => Shift(yy_state_1183) + NT_optional_type_parameters_no_constraints => Shift(yy_state_2337) + T_LBRACE => Reduce(0, NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__, yy_action_415) _ => Error } } -fn yy_state_1938(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(9, NT_extern_fun_header, yy_action_36) +fn yy_state_2337(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(4, NT_enum_header, yy_action_38) } -fn yy_state_1939(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2338(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LPAREN => Shift(yy_state_143) - NT_parameters => Shift(yy_state_1076) - NT_option_parameters_ => Shift(yy_state_1940) - T_RAISE | T_EQUAL | T_LBRACE | T_THIN_ARROW | T_NORAISE | T_WHERE => Reduce(0, NT_option_parameters_, yy_action_275) + T_UIDENT => Shift(yy_state_2339) _ => Error } } -fn yy_state_1940(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2339(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_error_annotation => Shift(yy_state_50) - T_THIN_ARROW => Shift(yy_state_51) - T_NORAISE => Shift(yy_state_78) - T_RAISE => Shift(yy_state_79) - NT_func_return_type => Shift(yy_state_1941) - T_EQUAL | T_LBRACE | T_WHERE => Reduce(0, NT_func_return_type, yy_action_862) + T_LBRACKET => Shift(yy_state_1172) + NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__ => Shift(yy_state_1183) + NT_optional_type_parameters_no_constraints => Shift(yy_state_2340) + T_LPAREN | T_LBRACE => Reduce(0, NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__, yy_action_415) _ => Error } } -fn yy_state_1941(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(5, NT_fun_header, yy_action_35) +fn yy_state_2340(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(4, NT_struct_header, yy_action_37) } -fn yy_state_1942(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2341(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_FN => Shift(yy_state_1313) - NT_fun_header_generic => Shift(yy_state_1943) + T_UIDENT => Shift(yy_state_2342) _ => Error } } -fn yy_state_1943(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2342(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(3, NT_suberror_header, yy_action_36) +} + +fn yy_state_2343(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LPAREN => Shift(yy_state_143) - NT_parameters => Shift(yy_state_1076) - NT_option_parameters_ => Shift(yy_state_1944) - T_RAISE | T_EQUAL | T_LBRACE | T_THIN_ARROW | T_NORAISE | T_WHERE => Reduce(0, NT_option_parameters_, yy_action_275) + T_UIDENT => Shift(yy_state_2344) _ => Error } } -fn yy_state_1944(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2344(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_error_annotation => Shift(yy_state_50) - T_THIN_ARROW => Shift(yy_state_51) - T_NORAISE => Shift(yy_state_78) - T_RAISE => Shift(yy_state_79) - NT_func_return_type => Shift(yy_state_1945) - T_EQUAL | T_LBRACE | T_WHERE => Reduce(0, NT_func_return_type, yy_action_862) + T_LBRACKET => Shift(yy_state_1172) + NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__ => Shift(yy_state_1183) + NT_optional_type_parameters_no_constraints => Shift(yy_state_2345) + T_EOF | T_DERIVE | T_EQUAL | T_SEMI => Reduce(0, NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__, yy_action_415) _ => Error } } -fn yy_state_1945(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(6, NT_fun_header, yy_action_33) +fn yy_state_2345(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(4, NT_type_header, yy_action_35) } -fn yy_state_1946(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2346(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_FN => Shift(yy_state_1313) - T_ENUM => Shift(yy_state_1947) - T_STRUCT => Shift(yy_state_1950) - T_SUBERROR => Shift(yy_state_1953) - T_TYPE => Shift(yy_state_1955) - T_USING => Shift(yy_state_1958) - T_ENUMVIEW => Shift(yy_state_1963) - T_IMPL => Shift(yy_state_1975) - T_TRAIT => Shift(yy_state_1992) - T_EXTENUM => Shift(yy_state_1998) - T_CONST => Shift(yy_state_2011) - T_LET => Shift(yy_state_2015) - T_EXTERN => Shift(yy_state_2019) - NT_fun_header_generic => Shift(yy_state_2026) - T_ASYNC => Shift(yy_state_2029) + T_PACKAGE_NAME => Shift(yy_state_2347) _ => Error } } -fn yy_state_1947(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2347(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_UIDENT => Shift(yy_state_1948) + T_LBRACE => Shift(yy_state_2348) _ => Error } } -fn yy_state_1948(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2348(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACKET => Shift(yy_state_950) - NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__ => Shift(yy_state_961) - NT_optional_type_parameters_no_constraints => Shift(yy_state_1949) - T_LBRACE => Reduce(0, NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__, yy_action_347) + NT_using_binder => Shift(yy_state_1195) + NT_non_empty_list_commas_rev_using_binder_ => Shift(yy_state_1196) + T_TRAIT => Shift(yy_state_1200) + T_TYPE => Shift(yy_state_1204) + T_UIDENT => Shift(yy_state_1208) + T_EXTEND => Shift(yy_state_1211) + T_LIDENT => Shift(yy_state_1215) + NT_non_empty_list_commas_using_binder_ => Shift(yy_state_1219) + NT_list_commas_using_binder_ => Shift(yy_state_2349) + T_RBRACE => Reduce(0, NT_list_commas_using_binder_, yy_action_401) _ => Error } } -fn yy_state_1949(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(4, NT_enum_header, yy_action_32) -} - -fn yy_state_1950(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2349(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_UIDENT => Shift(yy_state_1951) + T_RBRACE => Shift(yy_state_2350) _ => Error } } -fn yy_state_1951(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2350(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(6, NT_structure_item, yy_action_34) +} + +fn yy_state_2351(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACKET => Shift(yy_state_950) - NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__ => Shift(yy_state_961) - NT_optional_type_parameters_no_constraints => Shift(yy_state_1952) - T_LPAREN | T_LBRACE => Reduce(0, NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__, yy_action_347) + NT_type_parameters => Shift(yy_state_1223) + NT_option_type_parameters_ => Shift(yy_state_1266) + T_LBRACKET => Shift(yy_state_1267) + NT_optional_type_parameters => Shift(yy_state_2352) + T_UIDENT => Reduce(0, NT_option_type_parameters_, yy_action_383) _ => Error } } -fn yy_state_1952(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(4, NT_struct_header, yy_action_31) +fn yy_state_2352(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_UIDENT => Shift(yy_state_2353) + _ => Error + } } -fn yy_state_1953(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2353(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_UIDENT => Shift(yy_state_1954) + T_LBRACE => Shift(yy_state_2354) _ => Error } } -fn yy_state_1954(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(3, NT_suberror_header, yy_action_30) +fn yy_state_2354(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_ATTRIBUTE => Shift(yy_state_1168) + NT_enum_constructor => Shift(yy_state_1227) + NT_non_empty_list_attribute_ => Shift(yy_state_1231) + T_UIDENT => Shift(yy_state_1251) + NT_non_empty_list_semis_enum_constructor_ => Shift(yy_state_1254) + NT_list_semis_enum_constructor_ => Shift(yy_state_2355) + T_RBRACE => Reduce(0, NT_list_semis_enum_constructor_, yy_action_381) + _ => Error + } } -fn yy_state_1955(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2355(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_UIDENT => Shift(yy_state_1956) + T_RBRACE => Shift(yy_state_2356) _ => Error } } -fn yy_state_1956(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2356(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACKET => Shift(yy_state_950) - NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__ => Shift(yy_state_961) - NT_optional_type_parameters_no_constraints => Shift(yy_state_1957) - T_EOF | T_DERIVE | T_EQUAL | T_SEMI => Reduce(0, NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__, yy_action_347) + T_FOR => Shift(yy_state_2357) _ => Error } } -fn yy_state_1957(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(4, NT_type_header, yy_action_29) +fn yy_state_2357(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_ASYNC => Shift(yy_state_65) + T_UNDERSCORE => Shift(yy_state_70) + T_AMPER => Shift(yy_state_71) + T_PACKAGE_NAME => Shift(yy_state_73) + T_UIDENT => Shift(yy_state_80) + T_LPAREN => Shift(yy_state_84) + NT_simple_type => Shift(yy_state_110) + NT_type_ => Shift(yy_state_2358) + _ => Error + } } -fn yy_state_1958(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2358(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_PACKAGE_NAME => Shift(yy_state_1959) + T_WITH => Shift(yy_state_2359) _ => Error } } -fn yy_state_1959(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2359(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACE => Shift(yy_state_1960) + T_EXTEND => Shift(yy_state_2360) + T_LIDENT => Shift(yy_state_2363) _ => Error } } -fn yy_state_1960(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2360(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_using_binder => Shift(yy_state_973) - NT_non_empty_list_commas_rev_using_binder_ => Shift(yy_state_974) - T_TRAIT => Shift(yy_state_978) - T_TYPE => Shift(yy_state_982) - T_UIDENT => Shift(yy_state_986) - T_LIDENT => Shift(yy_state_989) - NT_non_empty_list_commas_using_binder_ => Shift(yy_state_992) - NT_list_commas_using_binder_ => Shift(yy_state_1961) - T_RBRACE => Reduce(0, NT_list_commas_using_binder_, yy_action_333) + T_LPAREN => Shift(yy_state_157) + NT_parameters => Shift(yy_state_2361) _ => Error } } -fn yy_state_1961(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2361(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RBRACE => Shift(yy_state_1962) + T_LBRACE => Shift(yy_state_133) + NT_block_expr => Shift(yy_state_2362) _ => Error } } -fn yy_state_1962(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(6, NT_structure_item, yy_action_28) +fn yy_state_2362(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(13, NT_structure_item, yy_action_33) } -fn yy_state_1963(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2363(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_type_parameters => Shift(yy_state_996) - NT_option_type_parameters_ => Shift(yy_state_1036) - T_LBRACKET => Shift(yy_state_1037) - NT_optional_type_parameters => Shift(yy_state_1964) - T_UIDENT => Reduce(0, NT_option_type_parameters_, yy_action_319) + T_LPAREN => Shift(yy_state_157) + NT_parameters => Shift(yy_state_2364) _ => Error } } -fn yy_state_1964(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2364(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_UIDENT => Shift(yy_state_1965) + T_LBRACE => Shift(yy_state_133) + NT_block_expr => Shift(yy_state_2365) _ => Error } } -fn yy_state_1965(_lookahead : YYSymbol) -> YYDecision { - match _lookahead { - T_LBRACE => Shift(yy_state_1966) - _ => Error - } +fn yy_state_2365(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(13, NT_structure_item, yy_action_32) } -fn yy_state_1966(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2366(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_ATTRIBUTE => Shift(yy_state_946) - NT_enum_constructor => Shift(yy_state_1000) - NT_non_empty_list_attribute_ => Shift(yy_state_1004) - T_UIDENT => Shift(yy_state_1024) - NT_non_empty_list_semis_enum_constructor_ => Shift(yy_state_1027) - NT_list_semis_enum_constructor_ => Shift(yy_state_1967) - T_RBRACE => Reduce(0, NT_list_semis_enum_constructor_, yy_action_317) + NT_type_parameters => Shift(yy_state_1223) + NT_option_type_parameters_ => Shift(yy_state_1266) + T_LBRACKET => Shift(yy_state_1267) + NT_optional_type_parameters => Shift(yy_state_2367) + T_UIDENT | T_AMPER | T_PACKAGE_NAME => Reduce(0, NT_option_type_parameters_, yy_action_383) _ => Error } } -fn yy_state_1967(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2367(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RBRACE => Shift(yy_state_1968) + T_AMPER => Shift(yy_state_20) + T_PACKAGE_NAME => Shift(yy_state_22) + T_UIDENT => Shift(yy_state_25) + NT_qual_ident_ty => Shift(yy_state_26) + NT_type_name => Shift(yy_state_2368) _ => Error } } -fn yy_state_1968(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2368(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_FOR => Shift(yy_state_1969) + T_WITH => Shift(yy_state_2369) + T_FOR => Shift(yy_state_2379) _ => Error } } -fn yy_state_1969(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2369(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_ASYNC => Shift(yy_state_52) - T_UNDERSCORE => Shift(yy_state_57) - T_AMPER => Shift(yy_state_58) - T_PACKAGE_NAME => Shift(yy_state_60) - T_UIDENT => Shift(yy_state_67) - T_LPAREN => Shift(yy_state_71) - NT_simple_type => Shift(yy_state_97) - NT_type_ => Shift(yy_state_1970) + T_FN => Shift(yy_state_1286) + NT_impl_optional_fn => Shift(yy_state_2370) + T_LIDENT | T_EXTEND => Reduce(0, NT_impl_optional_fn, yy_action_348) _ => Error } } -fn yy_state_1970(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2370(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_WITH => Shift(yy_state_1971) + T_EXTEND => Shift(yy_state_2371) + T_LIDENT => Shift(yy_state_2375) _ => Error } } -fn yy_state_1971(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2371(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LIDENT => Shift(yy_state_1972) + T_LPAREN => Shift(yy_state_157) + NT_parameters => Shift(yy_state_2372) _ => Error } } -fn yy_state_1972(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2372(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LPAREN => Shift(yy_state_143) - NT_parameters => Shift(yy_state_1973) + NT_error_annotation => Shift(yy_state_63) + T_THIN_ARROW => Shift(yy_state_64) + T_NORAISE => Shift(yy_state_91) + T_RAISE => Shift(yy_state_92) + NT_func_return_type => Shift(yy_state_2373) + T_EQUAL | T_LBRACE => Reduce(0, NT_func_return_type, yy_action_1023) _ => Error } } -fn yy_state_1973(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2373(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACE => Shift(yy_state_120) - NT_block_expr => Shift(yy_state_1974) + T_LBRACE => Shift(yy_state_133) + T_EQUAL => Shift(yy_state_1293) + NT_block_expr => Shift(yy_state_1295) + NT_impl_body => Shift(yy_state_2374) _ => Error } } -fn yy_state_1974(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(13, NT_structure_item, yy_action_27) +fn yy_state_2374(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(10, NT_structure_item, yy_action_31) } -fn yy_state_1975(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2375(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_type_parameters => Shift(yy_state_996) - NT_option_type_parameters_ => Shift(yy_state_1036) - T_LBRACKET => Shift(yy_state_1037) - NT_optional_type_parameters => Shift(yy_state_1976) - T_UIDENT | T_AMPER | T_PACKAGE_NAME => Reduce(0, NT_option_type_parameters_, yy_action_319) + T_LPAREN => Shift(yy_state_157) + NT_parameters => Shift(yy_state_2376) _ => Error } } -fn yy_state_1976(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2376(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_AMPER => Shift(yy_state_19) - T_PACKAGE_NAME => Shift(yy_state_21) - T_UIDENT => Shift(yy_state_24) - NT_qual_ident_ty => Shift(yy_state_25) - NT_type_name => Shift(yy_state_1977) + NT_error_annotation => Shift(yy_state_63) + T_THIN_ARROW => Shift(yy_state_64) + T_NORAISE => Shift(yy_state_91) + T_RAISE => Shift(yy_state_92) + NT_func_return_type => Shift(yy_state_2377) + T_EQUAL | T_LBRACE => Reduce(0, NT_func_return_type, yy_action_1023) _ => Error } } -fn yy_state_1977(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2377(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_WITH => Shift(yy_state_1978) - T_FOR => Shift(yy_state_1984) + T_LBRACE => Shift(yy_state_133) + T_EQUAL => Shift(yy_state_1293) + NT_block_expr => Shift(yy_state_1295) + NT_impl_body => Shift(yy_state_2378) _ => Error } } -fn yy_state_1978(_lookahead : YYSymbol) -> YYDecision { - match _lookahead { - T_FN => Shift(yy_state_1056) - NT_option_FN_ => Shift(yy_state_1979) - T_LIDENT => Reduce(0, NT_option_FN_, yy_action_285) - _ => Error - } +fn yy_state_2378(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(10, NT_structure_item, yy_action_30) } -fn yy_state_1979(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2379(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LIDENT => Shift(yy_state_1980) + T_ASYNC => Shift(yy_state_65) + T_UNDERSCORE => Shift(yy_state_70) + T_AMPER => Shift(yy_state_71) + T_PACKAGE_NAME => Shift(yy_state_73) + T_UIDENT => Shift(yy_state_80) + T_LPAREN => Shift(yy_state_84) + NT_simple_type => Shift(yy_state_110) + NT_type_ => Shift(yy_state_2380) _ => Error } } -fn yy_state_1980(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2380(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LPAREN => Shift(yy_state_143) - NT_parameters => Shift(yy_state_1981) + T_WITH => Shift(yy_state_2381) + T_EOF | T_SEMI => Reduce(6, NT_structure_item, yy_action_29) _ => Error } } -fn yy_state_1981(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2381(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_error_annotation => Shift(yy_state_50) - T_THIN_ARROW => Shift(yy_state_51) - T_NORAISE => Shift(yy_state_78) - T_RAISE => Shift(yy_state_79) - NT_func_return_type => Shift(yy_state_1982) - T_EQUAL | T_LBRACE => Reduce(0, NT_func_return_type, yy_action_862) + T_FN => Shift(yy_state_1286) + NT_impl_optional_fn => Shift(yy_state_2382) + T_LIDENT | T_EXTEND => Reduce(0, NT_impl_optional_fn, yy_action_348) _ => Error } } -fn yy_state_1982(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2382(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACE => Shift(yy_state_120) - T_EQUAL => Shift(yy_state_1062) - NT_block_expr => Shift(yy_state_1064) - NT_impl_body => Shift(yy_state_1983) + T_EXTEND => Shift(yy_state_2383) + T_LIDENT => Shift(yy_state_2387) _ => Error } } -fn yy_state_1983(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(10, NT_structure_item, yy_action_26) -} - -fn yy_state_1984(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2383(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_ASYNC => Shift(yy_state_52) - T_UNDERSCORE => Shift(yy_state_57) - T_AMPER => Shift(yy_state_58) - T_PACKAGE_NAME => Shift(yy_state_60) - T_UIDENT => Shift(yy_state_67) - T_LPAREN => Shift(yy_state_71) - NT_simple_type => Shift(yy_state_97) - NT_type_ => Shift(yy_state_1985) + T_LPAREN => Shift(yy_state_157) + NT_parameters => Shift(yy_state_2384) _ => Error } } -fn yy_state_1985(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2384(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_WITH => Shift(yy_state_1986) - T_EOF | T_SEMI => Reduce(6, NT_structure_item, yy_action_25) + NT_error_annotation => Shift(yy_state_63) + T_THIN_ARROW => Shift(yy_state_64) + T_NORAISE => Shift(yy_state_91) + T_RAISE => Shift(yy_state_92) + NT_func_return_type => Shift(yy_state_2385) + T_EQUAL | T_LBRACE => Reduce(0, NT_func_return_type, yy_action_1023) _ => Error } } -fn yy_state_1986(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2385(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_FN => Shift(yy_state_1056) - NT_option_FN_ => Shift(yy_state_1987) - T_LIDENT => Reduce(0, NT_option_FN_, yy_action_285) + T_LBRACE => Shift(yy_state_133) + T_EQUAL => Shift(yy_state_1293) + NT_block_expr => Shift(yy_state_1295) + NT_impl_body => Shift(yy_state_2386) _ => Error } } -fn yy_state_1987(_lookahead : YYSymbol) -> YYDecision { - match _lookahead { - T_LIDENT => Shift(yy_state_1988) - _ => Error - } +fn yy_state_2386(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(12, NT_structure_item, yy_action_28) } -fn yy_state_1988(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2387(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LPAREN => Shift(yy_state_143) - NT_parameters => Shift(yy_state_1989) + T_LPAREN => Shift(yy_state_157) + NT_parameters => Shift(yy_state_2388) _ => Error } } -fn yy_state_1989(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2388(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_error_annotation => Shift(yy_state_50) - T_THIN_ARROW => Shift(yy_state_51) - T_NORAISE => Shift(yy_state_78) - T_RAISE => Shift(yy_state_79) - NT_func_return_type => Shift(yy_state_1990) - T_EQUAL | T_LBRACE => Reduce(0, NT_func_return_type, yy_action_862) + NT_error_annotation => Shift(yy_state_63) + T_THIN_ARROW => Shift(yy_state_64) + T_NORAISE => Shift(yy_state_91) + T_RAISE => Shift(yy_state_92) + NT_func_return_type => Shift(yy_state_2389) + T_EQUAL | T_LBRACE => Reduce(0, NT_func_return_type, yy_action_1023) _ => Error } } -fn yy_state_1990(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2389(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACE => Shift(yy_state_120) - T_EQUAL => Shift(yy_state_1062) - NT_block_expr => Shift(yy_state_1064) - NT_impl_body => Shift(yy_state_1991) + T_LBRACE => Shift(yy_state_133) + T_EQUAL => Shift(yy_state_1293) + NT_block_expr => Shift(yy_state_1295) + NT_impl_body => Shift(yy_state_2390) _ => Error } } -fn yy_state_1991(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(12, NT_structure_item, yy_action_24) +fn yy_state_2390(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(12, NT_structure_item, yy_action_27) } -fn yy_state_1992(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2391(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_UIDENT => Shift(yy_state_1993) + T_UIDENT => Shift(yy_state_2392) _ => Error } } -fn yy_state_1993(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2392(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_COLON => Shift(yy_state_1081) - NT_option_preceded_COLON_separated_nonempty_list_PLUS_tvar_constraint___ => Shift(yy_state_1994) - T_LBRACE => Reduce(0, NT_option_preceded_COLON_separated_nonempty_list_PLUS_tvar_constraint___, yy_action_272) + T_COLON => Shift(yy_state_1320) + NT_option_preceded_COLON_separated_nonempty_list_PLUS_tvar_constraint___ => Shift(yy_state_2393) + T_LBRACE => Reduce(0, NT_option_preceded_COLON_separated_nonempty_list_PLUS_tvar_constraint___, yy_action_333) _ => Error } } -fn yy_state_1994(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2393(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACE => Shift(yy_state_1995) + T_LBRACE => Shift(yy_state_2394) _ => Error } } -fn yy_state_1995(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2394(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_ATTRIBUTE => Shift(yy_state_946) - NT_trait_method_decl => Shift(yy_state_1085) - NT_non_empty_list_attribute_ => Shift(yy_state_1089) - T_FN => Shift(yy_state_1124) - NT_trait_method_fn_header => Shift(yy_state_1126) - T_ASYNC => Shift(yy_state_1133) - NT_non_empty_list_semis_trait_method_decl_ => Shift(yy_state_1141) - NT_list_semis_trait_method_decl_ => Shift(yy_state_1996) - T_LIDENT => Reduce(0, NT_trait_method_fn_header, yy_action_269) - T_RBRACE => Reduce(0, NT_list_semis_trait_method_decl_, yy_action_268) + T_ATTRIBUTE => Shift(yy_state_1168) + NT_trait_method_decl => Shift(yy_state_1324) + NT_non_empty_list_attribute_ => Shift(yy_state_1328) + T_FN => Shift(yy_state_1381) + NT_trait_method_fn_header => Shift(yy_state_1383) + T_ASYNC => Shift(yy_state_1396) + NT_non_empty_list_semis_trait_method_decl_ => Shift(yy_state_1410) + NT_list_semis_trait_method_decl_ => Shift(yy_state_2395) + T_LIDENT | T_EXTEND => Reduce(0, NT_trait_method_fn_header, yy_action_330) + T_RBRACE => Reduce(0, NT_list_semis_trait_method_decl_, yy_action_329) _ => Error } } -fn yy_state_1996(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2395(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RBRACE => Shift(yy_state_1997) + T_RBRACE => Shift(yy_state_2396) _ => Error } } -fn yy_state_1997(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(7, NT_structure_item, yy_action_23) +fn yy_state_2396(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(7, NT_structure_item, yy_action_26) } -fn yy_state_1998(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2397(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_PACKAGE_NAME => Shift(yy_state_1163) - NT_extenum_extension_target => Shift(yy_state_1999) - T_UIDENT => Shift(yy_state_2005) + T_PACKAGE_NAME => Shift(yy_state_1432) + NT_extenum_extension_target => Shift(yy_state_2398) + T_UIDENT => Shift(yy_state_2404) _ => Error } } -fn yy_state_1999(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2398(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_PLUS_EQUAL => Shift(yy_state_2000) + T_PLUS_EQUAL => Shift(yy_state_2399) _ => Error } } -fn yy_state_2000(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2399(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACE => Shift(yy_state_2001) + T_LBRACE => Shift(yy_state_2400) _ => Error } } -fn yy_state_2001(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2400(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_ATTRIBUTE => Shift(yy_state_946) - NT_enum_constructor => Shift(yy_state_1000) - NT_non_empty_list_attribute_ => Shift(yy_state_1004) - T_UIDENT => Shift(yy_state_1024) - NT_non_empty_list_semis_enum_constructor_ => Shift(yy_state_1027) - NT_list_semis_enum_constructor_ => Shift(yy_state_2002) - T_RBRACE => Reduce(0, NT_list_semis_enum_constructor_, yy_action_317) + T_ATTRIBUTE => Shift(yy_state_1168) + NT_enum_constructor => Shift(yy_state_1227) + NT_non_empty_list_attribute_ => Shift(yy_state_1231) + T_UIDENT => Shift(yy_state_1251) + NT_non_empty_list_semis_enum_constructor_ => Shift(yy_state_1254) + NT_list_semis_enum_constructor_ => Shift(yy_state_2401) + T_RBRACE => Reduce(0, NT_list_semis_enum_constructor_, yy_action_381) _ => Error } } -fn yy_state_2002(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2401(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RBRACE => Shift(yy_state_2003) + T_RBRACE => Shift(yy_state_2402) _ => Error } } -fn yy_state_2003(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2402(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_DERIVE => Shift(yy_state_1171) - NT_deriving_directive_list => Shift(yy_state_2004) - T_EOF | T_SEMI => Reduce(0, NT_deriving_directive_list, yy_action_233) + T_DERIVE => Shift(yy_state_1440) + NT_deriving_directive_list => Shift(yy_state_2403) + T_EOF | T_SEMI => Reduce(0, NT_deriving_directive_list, yy_action_288) _ => Error } } -fn yy_state_2004(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(8, NT_structure_item, yy_action_22) +fn yy_state_2403(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(8, NT_structure_item, yy_action_25) } -fn yy_state_2005(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2404(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACKET => Shift(yy_state_950) - NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__ => Shift(yy_state_961) - NT_optional_type_parameters_no_constraints => Shift(yy_state_2006) - T_PLUS_EQUAL | T_LBRACE => Reduce(0, NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__, yy_action_347) + T_LBRACKET => Shift(yy_state_1172) + NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__ => Shift(yy_state_1183) + NT_optional_type_parameters_no_constraints => Shift(yy_state_2405) + T_PLUS_EQUAL | T_LBRACE => Reduce(0, NT_option_delimited_LBRACKET_non_empty_list_commas_id_type_decl_binder___RBRACKET__, yy_action_415) _ => Error } } -fn yy_state_2006(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2405(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACE => Shift(yy_state_2007) - T_PLUS_EQUAL => Reduce(2, NT_extenum_extension_target, yy_action_223) + T_LBRACE => Shift(yy_state_2406) + T_PLUS_EQUAL => Reduce(2, NT_extenum_extension_target, yy_action_278) _ => Error } } -fn yy_state_2007(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2406(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_ATTRIBUTE => Shift(yy_state_946) - NT_enum_constructor => Shift(yy_state_1000) - NT_non_empty_list_attribute_ => Shift(yy_state_1004) - T_UIDENT => Shift(yy_state_1024) - NT_non_empty_list_semis_enum_constructor_ => Shift(yy_state_1027) - NT_list_semis_enum_constructor_ => Shift(yy_state_2008) - T_RBRACE => Reduce(0, NT_list_semis_enum_constructor_, yy_action_317) + T_ATTRIBUTE => Shift(yy_state_1168) + NT_enum_constructor => Shift(yy_state_1227) + NT_non_empty_list_attribute_ => Shift(yy_state_1231) + T_UIDENT => Shift(yy_state_1251) + NT_non_empty_list_semis_enum_constructor_ => Shift(yy_state_1254) + NT_list_semis_enum_constructor_ => Shift(yy_state_2407) + T_RBRACE => Reduce(0, NT_list_semis_enum_constructor_, yy_action_381) _ => Error } } -fn yy_state_2008(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2407(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_RBRACE => Shift(yy_state_2009) + T_RBRACE => Shift(yy_state_2408) _ => Error } } -fn yy_state_2009(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2408(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_DERIVE => Shift(yy_state_1171) - NT_deriving_directive_list => Shift(yy_state_2010) - T_EOF | T_SEMI => Reduce(0, NT_deriving_directive_list, yy_action_233) + T_DERIVE => Shift(yy_state_1440) + NT_deriving_directive_list => Shift(yy_state_2409) + T_EOF | T_SEMI => Reduce(0, NT_deriving_directive_list, yy_action_288) _ => Error } } -fn yy_state_2010(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(8, NT_structure_item, yy_action_21) +fn yy_state_2409(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(8, NT_structure_item, yy_action_24) } -fn yy_state_2011(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2410(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_UIDENT => Shift(yy_state_2012) + T_UIDENT => Shift(yy_state_2411) _ => Error } } -fn yy_state_2012(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2411(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_COLON => Shift(yy_state_2013) - T_EQUAL => Reduce(3, NT_val_header, yy_action_20) + T_COLON => Shift(yy_state_2412) + T_EQUAL => Reduce(3, NT_val_header, yy_action_23) _ => Error } } -fn yy_state_2013(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2412(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_ASYNC => Shift(yy_state_52) - T_UNDERSCORE => Shift(yy_state_57) - T_AMPER => Shift(yy_state_58) - T_PACKAGE_NAME => Shift(yy_state_60) - T_UIDENT => Shift(yy_state_67) - T_LPAREN => Shift(yy_state_71) - NT_simple_type => Shift(yy_state_97) - NT_type_ => Shift(yy_state_2014) + T_ASYNC => Shift(yy_state_65) + T_UNDERSCORE => Shift(yy_state_70) + T_AMPER => Shift(yy_state_71) + T_PACKAGE_NAME => Shift(yy_state_73) + T_UIDENT => Shift(yy_state_80) + T_LPAREN => Shift(yy_state_84) + NT_simple_type => Shift(yy_state_110) + NT_type_ => Shift(yy_state_2413) _ => Error } } -fn yy_state_2014(_lookahead : YYSymbol) -> YYDecision { - ReduceNoLookahead(5, NT_val_header, yy_action_19) +fn yy_state_2413(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(5, NT_val_header, yy_action_22) } -fn yy_state_2015(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2414(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LIDENT => Shift(yy_state_2016) + T_EXTEND => Shift(yy_state_2415) + T_LIDENT => Shift(yy_state_2418) _ => Error } } -fn yy_state_2016(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2415(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_COLON => Shift(yy_state_2416) + T_EQUAL => Reduce(3, NT_val_header, yy_action_21) + _ => Error + } +} + +fn yy_state_2416(_lookahead : YYSymbol) -> YYDecision { + match _lookahead { + T_ASYNC => Shift(yy_state_65) + T_UNDERSCORE => Shift(yy_state_70) + T_AMPER => Shift(yy_state_71) + T_PACKAGE_NAME => Shift(yy_state_73) + T_UIDENT => Shift(yy_state_80) + T_LPAREN => Shift(yy_state_84) + NT_simple_type => Shift(yy_state_110) + NT_type_ => Shift(yy_state_2417) + _ => Error + } +} + +fn yy_state_2417(_lookahead : YYSymbol) -> YYDecision { + ReduceNoLookahead(5, NT_val_header, yy_action_19) +} + +fn yy_state_2418(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_COLON => Shift(yy_state_2017) + T_COLON => Shift(yy_state_2419) T_EQUAL => Reduce(3, NT_val_header, yy_action_17) _ => Error } } -fn yy_state_2017(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2419(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_ASYNC => Shift(yy_state_52) - T_UNDERSCORE => Shift(yy_state_57) - T_AMPER => Shift(yy_state_58) - T_PACKAGE_NAME => Shift(yy_state_60) - T_UIDENT => Shift(yy_state_67) - T_LPAREN => Shift(yy_state_71) - NT_simple_type => Shift(yy_state_97) - NT_type_ => Shift(yy_state_2018) + T_ASYNC => Shift(yy_state_65) + T_UNDERSCORE => Shift(yy_state_70) + T_AMPER => Shift(yy_state_71) + T_PACKAGE_NAME => Shift(yy_state_73) + T_UIDENT => Shift(yy_state_80) + T_LPAREN => Shift(yy_state_84) + NT_simple_type => Shift(yy_state_110) + NT_type_ => Shift(yy_state_2420) _ => Error } } -fn yy_state_2018(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2420(_lookahead : YYSymbol) -> YYDecision { ReduceNoLookahead(5, NT_val_header, yy_action_13) } -fn yy_state_2019(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2421(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_STRING => Shift(yy_state_2020) + T_STRING => Shift(yy_state_2422) _ => Error } } -fn yy_state_2020(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2422(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_FN => Shift(yy_state_2021) + T_FN => Shift(yy_state_2423) _ => Error } } -fn yy_state_2021(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2423(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_type_parameters => Shift(yy_state_996) - NT_option_type_parameters_ => Shift(yy_state_1036) - T_LBRACKET => Shift(yy_state_1037) - NT_optional_type_parameters => Shift(yy_state_2022) - T_LIDENT | T_UIDENT | T_AMPER | T_PACKAGE_NAME => Reduce(0, NT_option_type_parameters_, yy_action_319) + NT_type_parameters => Shift(yy_state_1223) + NT_option_type_parameters_ => Shift(yy_state_1266) + T_LBRACKET => Shift(yy_state_1267) + NT_optional_type_parameters => Shift(yy_state_2424) + T_LIDENT | T_UIDENT | T_AMPER | T_PACKAGE_NAME | T_EXTEND => Reduce(0, NT_option_type_parameters_, yy_action_383) _ => Error } } -fn yy_state_2022(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2424(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_AMPER => Shift(yy_state_19) - T_PACKAGE_NAME => Shift(yy_state_21) - T_UIDENT => Shift(yy_state_24) - NT_qual_ident_ty => Shift(yy_state_25) - T_LIDENT => Shift(yy_state_1307) - NT_type_name => Shift(yy_state_1308) - NT_fun_binder => Shift(yy_state_2023) + T_AMPER => Shift(yy_state_20) + T_PACKAGE_NAME => Shift(yy_state_22) + T_UIDENT => Shift(yy_state_25) + NT_qual_ident_ty => Shift(yy_state_26) + T_EXTEND => Shift(yy_state_1619) + T_LIDENT => Shift(yy_state_1620) + NT_type_name => Shift(yy_state_1621) + NT_fun_binder => Shift(yy_state_2425) _ => Error } } -fn yy_state_2023(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2425(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LPAREN => Shift(yy_state_143) - NT_parameters => Shift(yy_state_1076) - NT_option_parameters_ => Shift(yy_state_2024) - T_RAISE | T_EQUAL | T_THIN_ARROW | T_NORAISE => Reduce(0, NT_option_parameters_, yy_action_275) + T_LPAREN => Shift(yy_state_157) + NT_parameters => Shift(yy_state_1315) + NT_option_parameters_ => Shift(yy_state_2426) + T_RAISE | T_EQUAL | T_THIN_ARROW | T_NORAISE => Reduce(0, NT_option_parameters_, yy_action_336) _ => Error } } -fn yy_state_2024(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2426(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_error_annotation => Shift(yy_state_50) - T_THIN_ARROW => Shift(yy_state_51) - T_NORAISE => Shift(yy_state_78) - T_RAISE => Shift(yy_state_79) - NT_func_return_type => Shift(yy_state_2025) - T_EQUAL => Reduce(0, NT_func_return_type, yy_action_862) + NT_error_annotation => Shift(yy_state_63) + T_THIN_ARROW => Shift(yy_state_64) + T_NORAISE => Shift(yy_state_91) + T_RAISE => Shift(yy_state_92) + NT_func_return_type => Shift(yy_state_2427) + T_EQUAL => Reduce(0, NT_func_return_type, yy_action_1023) _ => Error } } -fn yy_state_2025(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2427(_lookahead : YYSymbol) -> YYDecision { ReduceNoLookahead(8, NT_extern_fun_header, yy_action_12) } -fn yy_state_2026(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2428(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LPAREN => Shift(yy_state_143) - NT_parameters => Shift(yy_state_1076) - NT_option_parameters_ => Shift(yy_state_2027) - T_RAISE | T_EQUAL | T_LBRACE | T_THIN_ARROW | T_NORAISE | T_WHERE => Reduce(0, NT_option_parameters_, yy_action_275) + T_LPAREN => Shift(yy_state_157) + NT_parameters => Shift(yy_state_1315) + NT_option_parameters_ => Shift(yy_state_2429) + T_RAISE | T_EQUAL | T_LBRACE | T_THIN_ARROW | T_NORAISE | T_WHERE => Reduce(0, NT_option_parameters_, yy_action_336) _ => Error } } -fn yy_state_2027(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2429(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_error_annotation => Shift(yy_state_50) - T_THIN_ARROW => Shift(yy_state_51) - T_NORAISE => Shift(yy_state_78) - T_RAISE => Shift(yy_state_79) - NT_func_return_type => Shift(yy_state_2028) - T_EQUAL | T_LBRACE | T_WHERE => Reduce(0, NT_func_return_type, yy_action_862) + NT_error_annotation => Shift(yy_state_63) + T_THIN_ARROW => Shift(yy_state_64) + T_NORAISE => Shift(yy_state_91) + T_RAISE => Shift(yy_state_92) + NT_func_return_type => Shift(yy_state_2430) + T_EQUAL | T_LBRACE | T_WHERE => Reduce(0, NT_func_return_type, yy_action_1023) _ => Error } } -fn yy_state_2028(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2430(_lookahead : YYSymbol) -> YYDecision { ReduceNoLookahead(4, NT_fun_header, yy_action_11) } -fn yy_state_2029(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2431(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_FN => Shift(yy_state_1313) - NT_fun_header_generic => Shift(yy_state_2030) + T_FN => Shift(yy_state_1627) + NT_fun_header_generic => Shift(yy_state_2432) _ => Error } } -fn yy_state_2030(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2432(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LPAREN => Shift(yy_state_143) - NT_parameters => Shift(yy_state_1076) - NT_option_parameters_ => Shift(yy_state_2031) - T_RAISE | T_EQUAL | T_LBRACE | T_THIN_ARROW | T_NORAISE | T_WHERE => Reduce(0, NT_option_parameters_, yy_action_275) + T_LPAREN => Shift(yy_state_157) + NT_parameters => Shift(yy_state_1315) + NT_option_parameters_ => Shift(yy_state_2433) + T_RAISE | T_EQUAL | T_LBRACE | T_THIN_ARROW | T_NORAISE | T_WHERE => Reduce(0, NT_option_parameters_, yy_action_336) _ => Error } } -fn yy_state_2031(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2433(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_error_annotation => Shift(yy_state_50) - T_THIN_ARROW => Shift(yy_state_51) - T_NORAISE => Shift(yy_state_78) - T_RAISE => Shift(yy_state_79) - NT_func_return_type => Shift(yy_state_2032) - T_EQUAL | T_LBRACE | T_WHERE => Reduce(0, NT_func_return_type, yy_action_862) + NT_error_annotation => Shift(yy_state_63) + T_THIN_ARROW => Shift(yy_state_64) + T_NORAISE => Shift(yy_state_91) + T_RAISE => Shift(yy_state_92) + NT_func_return_type => Shift(yy_state_2434) + T_EQUAL | T_LBRACE | T_WHERE => Reduce(0, NT_func_return_type, yy_action_1023) _ => Error } } -fn yy_state_2032(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2434(_lookahead : YYSymbol) -> YYDecision { ReduceNoLookahead(5, NT_fun_header, yy_action_9) } -fn yy_state_2033(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2435(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LPAREN => Shift(yy_state_143) - NT_parameters => Shift(yy_state_1076) - NT_option_parameters_ => Shift(yy_state_2034) - T_RAISE | T_EQUAL | T_LBRACE | T_THIN_ARROW | T_NORAISE | T_WHERE => Reduce(0, NT_option_parameters_, yy_action_275) + T_LPAREN => Shift(yy_state_157) + NT_parameters => Shift(yy_state_1315) + NT_option_parameters_ => Shift(yy_state_2436) + T_RAISE | T_EQUAL | T_LBRACE | T_THIN_ARROW | T_NORAISE | T_WHERE => Reduce(0, NT_option_parameters_, yy_action_336) _ => Error } } -fn yy_state_2034(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2436(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_error_annotation => Shift(yy_state_50) - T_THIN_ARROW => Shift(yy_state_51) - T_NORAISE => Shift(yy_state_78) - T_RAISE => Shift(yy_state_79) - NT_func_return_type => Shift(yy_state_2035) - T_EQUAL | T_LBRACE | T_WHERE => Reduce(0, NT_func_return_type, yy_action_862) + NT_error_annotation => Shift(yy_state_63) + T_THIN_ARROW => Shift(yy_state_64) + T_NORAISE => Shift(yy_state_91) + T_RAISE => Shift(yy_state_92) + NT_func_return_type => Shift(yy_state_2437) + T_EQUAL | T_LBRACE | T_WHERE => Reduce(0, NT_func_return_type, yy_action_1023) _ => Error } } -fn yy_state_2035(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2437(_lookahead : YYSymbol) -> YYDecision { ReduceNoLookahead(3, NT_fun_header, yy_action_7) } -fn yy_state_2036(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2438(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_FN => Shift(yy_state_1313) - T_TEST => Shift(yy_state_2037) - NT_fun_header_generic => Shift(yy_state_2041) + T_FN => Shift(yy_state_1627) + T_TEST => Shift(yy_state_2439) + NT_fun_header_generic => Shift(yy_state_2443) _ => Error } } -fn yy_state_2037(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2439(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_STRING => Shift(yy_state_1074) - NT_option_loced_string_ => Shift(yy_state_2038) - T_LPAREN | T_LBRACE => Reduce(0, NT_option_loced_string_, yy_action_278) + T_STRING => Shift(yy_state_1313) + NT_option_loced_string_ => Shift(yy_state_2440) + T_LPAREN | T_LBRACE => Reduce(0, NT_option_loced_string_, yy_action_339) _ => Error } } -fn yy_state_2038(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2440(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LPAREN => Shift(yy_state_143) - NT_parameters => Shift(yy_state_1076) - NT_option_parameters_ => Shift(yy_state_2039) - T_LBRACE => Reduce(0, NT_option_parameters_, yy_action_275) + T_LPAREN => Shift(yy_state_157) + NT_parameters => Shift(yy_state_1315) + NT_option_parameters_ => Shift(yy_state_2441) + T_LBRACE => Reduce(0, NT_option_parameters_, yy_action_336) _ => Error } } -fn yy_state_2039(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2441(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LBRACE => Shift(yy_state_120) - NT_block_expr => Shift(yy_state_2040) + T_LBRACE => Shift(yy_state_133) + NT_block_expr => Shift(yy_state_2442) _ => Error } } -fn yy_state_2040(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2442(_lookahead : YYSymbol) -> YYDecision { ReduceNoLookahead(5, NT_structure_item, yy_action_6) } -fn yy_state_2041(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2443(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_LPAREN => Shift(yy_state_143) - NT_parameters => Shift(yy_state_1076) - NT_option_parameters_ => Shift(yy_state_2042) - T_RAISE | T_EQUAL | T_LBRACE | T_THIN_ARROW | T_NORAISE | T_WHERE => Reduce(0, NT_option_parameters_, yy_action_275) + T_LPAREN => Shift(yy_state_157) + NT_parameters => Shift(yy_state_1315) + NT_option_parameters_ => Shift(yy_state_2444) + T_RAISE | T_EQUAL | T_LBRACE | T_THIN_ARROW | T_NORAISE | T_WHERE => Reduce(0, NT_option_parameters_, yy_action_336) _ => Error } } -fn yy_state_2042(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2444(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - NT_error_annotation => Shift(yy_state_50) - T_THIN_ARROW => Shift(yy_state_51) - T_NORAISE => Shift(yy_state_78) - T_RAISE => Shift(yy_state_79) - NT_func_return_type => Shift(yy_state_2043) - T_EQUAL | T_LBRACE | T_WHERE => Reduce(0, NT_func_return_type, yy_action_862) + NT_error_annotation => Shift(yy_state_63) + T_THIN_ARROW => Shift(yy_state_64) + T_NORAISE => Shift(yy_state_91) + T_RAISE => Shift(yy_state_92) + NT_func_return_type => Shift(yy_state_2445) + T_EQUAL | T_LBRACE | T_WHERE => Reduce(0, NT_func_return_type, yy_action_1023) _ => Error } } -fn yy_state_2043(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2445(_lookahead : YYSymbol) -> YYDecision { ReduceNoLookahead(4, NT_fun_header, yy_action_2) } -fn yy_state_2044(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2446(_lookahead : YYSymbol) -> YYDecision { ReduceNoLookahead(1, NT_list_semis_structure_item_, yy_action_1) } -fn yy_state_2045(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2447(_lookahead : YYSymbol) -> YYDecision { match _lookahead { - T_EOF => Shift(yy_state_2046) + T_EOF => Shift(yy_state_2448) _ => Error } } -fn yy_state_2046(_lookahead : YYSymbol) -> YYDecision { +fn yy_state_2448(_lookahead : YYSymbol) -> YYDecision { ReduceNoLookahead(2, NT_structure, yy_action_0) } @@ -39620,7 +49196,7 @@ fn error(stack : @list.List[YYState], token : Token?, loc : (Position, Position) } go(stack) } - for term in ([(T_CHAR, TK_CHAR), (T_INT, TK_INT), (T_BYTE, TK_BYTE), (T_BYTES, TK_BYTES), (T_FLOAT, TK_FLOAT), (T_DOUBLE, TK_DOUBLE), (T_STRING, TK_STRING), (T_MULTILINE_STRING, TK_MULTILINE_STRING), (T_MULTILINE_INTERP, TK_MULTILINE_INTERP), (T_INTERP, TK_INTERP), (T_REGEX_LITERAL, TK_REGEX_LITERAL), (T_REGEX_INTERP, TK_REGEX_INTERP), (T_ATTRIBUTE, TK_ATTRIBUTE), (T_LIDENT, TK_LIDENT), (T_UIDENT, TK_UIDENT), (T_POST_LABEL, TK_POST_LABEL), (T_COMMENT, TK_COMMENT), (T_NEWLINE, TK_NEWLINE), (T_INFIX1, TK_INFIX1), (T_INFIX2, TK_INFIX2), (T_INFIX3, TK_INFIX3), (T_INFIX4, TK_INFIX4), (T_AUGMENTED_ASSIGNMENT, TK_AUGMENTED_ASSIGNMENT), (T_PLUS_EQUAL, TK_PLUS_EQUAL), (T_EOF, TK_EOF), (T_FALSE, TK_FALSE), (T_TRUE, TK_TRUE), (T_PUB, TK_PUB), (T_PRIV, TK_PRIV), (T_READONLY, TK_READONLY), (T_IMPORT, TK_IMPORT), (T_EXTERN, TK_EXTERN), (T_BREAK, TK_BREAK), (T_CONTINUE, TK_CONTINUE), (T_STRUCT, TK_STRUCT), (T_ENUM, TK_ENUM), (T_TRAIT, TK_TRAIT), (T_DERIVE, TK_DERIVE), (T_IMPL, TK_IMPL), (T_WITH, TK_WITH), (T_RAISE, TK_RAISE), (T_THROW, TK_THROW), (T_TRY, TK_TRY), (T_CATCH, TK_CATCH), (T_ASYNC, TK_ASYNC), (T_TYPEALIAS, TK_TYPEALIAS), (T_TRAITALIAS, TK_TRAITALIAS), (T_FNALIAS, TK_FNALIAS), (T_EQUAL, TK_EQUAL), (T_EQ_TILDE, TK_EQ_TILDE), (T_LPAREN, TK_LPAREN), (T_RPAREN, TK_RPAREN), (T_COMMA, TK_COMMA), (T_MINUS, TK_MINUS), (T_QUESTION, TK_QUESTION), (T_EXCLAMATION, TK_EXCLAMATION), (T_DOT_LIDENT, TK_DOT_LIDENT), (T_DOT_UIDENT, TK_DOT_UIDENT), (T_DOT_INT, TK_DOT_INT), (T_DOT_LPAREN, TK_DOT_LPAREN), (T_COLONCOLON, TK_COLONCOLON), (T_COLON, TK_COLON), (T_SEMI, TK_SEMI), (T_LBRACKET, TK_LBRACKET), (T_PLUS, TK_PLUS), (T_RBRACKET, TK_RBRACKET), (T_UNDERSCORE, TK_UNDERSCORE), (T_BAR, TK_BAR), (T_LBRACE, TK_LBRACE), (T_RBRACE, TK_RBRACE), (T_AMPERAMPER, TK_AMPERAMPER), (T_AMPER, TK_AMPER), (T_CARET, TK_CARET), (T_BARBAR, TK_BARBAR), (T_PACKAGE_NAME, TK_PACKAGE_NAME), (T_AS, TK_AS), (T_PIPE, TK_PIPE), (T_PIPE_LEFT, TK_PIPE_LEFT), (T_LT_PLUS, TK_LT_PLUS), (T_ELSE, TK_ELSE), (T_FN, TK_FN), (T_IF, TK_IF), (T_LET, TK_LET), (T_PROOF_ASSERT, TK_PROOF_ASSERT), (T_PROOF_LET, TK_PROOF_LET), (T_CONST, TK_CONST), (T_MATCH, TK_MATCH), (T_USING, TK_USING), (T_MUTABLE, TK_MUTABLE), (T_TYPE, TK_TYPE), (T_FAT_ARROW, TK_FAT_ARROW), (T_THIN_ARROW, TK_THIN_ARROW), (T_WHILE, TK_WHILE), (T_RETURN, TK_RETURN), (T_DOTDOT, TK_DOTDOT), (T_RANGE_INCLUSIVE, TK_RANGE_INCLUSIVE), (T_RANGE_LT_INCLUSIVE, TK_RANGE_LT_INCLUSIVE), (T_RANGE_EXCLUSIVE, TK_RANGE_EXCLUSIVE), (T_RANGE_INCLUSIVE_REV, TK_RANGE_INCLUSIVE_REV), (T_RANGE_EXCLUSIVE_REV, TK_RANGE_EXCLUSIVE_REV), (T_ELLIPSIS, TK_ELLIPSIS), (T_TEST, TK_TEST), (T_LOOP, TK_LOOP), (T_GUARD, TK_GUARD), (T_DEFER, TK_DEFER), (T_FOR, TK_FOR), (T_IN, TK_IN), (T_IS, TK_IS), (T_SUBERROR, TK_SUBERROR), (T_AND, TK_AND), (T_FORALL, TK_FORALL), (T_EXISTS, TK_EXISTS), (T_IMPLIES, TK_IMPLIES), (T_LETREC, TK_LETREC), (T_ENUMVIEW, TK_ENUMVIEW), (T_EXTENUM, TK_EXTENUM), (T_DECLARE, TK_DECLARE), (T_NORAISE, TK_NORAISE), (T_NOBREAK, TK_NOBREAK), (T_WHERE, TK_WHERE), (T_TRY_QUESTION, TK_TRY_QUESTION), (T_TRY_EXCLAMATION, TK_TRY_EXCLAMATION), (T_LEXMATCH, TK_LEXMATCH), (T_LEXMATCH_QUESTION, TK_LEXMATCH_QUESTION), (T_PACKAGE, TK_PACKAGE)] : Array[(YYSymbol, TokenKind)]) { + for term in ([(T_CHAR, TK_CHAR), (T_INT, TK_INT), (T_BYTE, TK_BYTE), (T_BYTES, TK_BYTES), (T_FLOAT, TK_FLOAT), (T_DOUBLE, TK_DOUBLE), (T_STRING, TK_STRING), (T_MULTILINE_STRING, TK_MULTILINE_STRING), (T_MULTILINE_INTERP, TK_MULTILINE_INTERP), (T_INTERP, TK_INTERP), (T_BYTES_INTERP, TK_BYTES_INTERP), (T_REGEX_LITERAL, TK_REGEX_LITERAL), (T_REGEX_INTERP, TK_REGEX_INTERP), (T_ATTRIBUTE, TK_ATTRIBUTE), (T_LIDENT, TK_LIDENT), (T_UIDENT, TK_UIDENT), (T_POST_LABEL, TK_POST_LABEL), (T_COMMENT, TK_COMMENT), (T_NEWLINE, TK_NEWLINE), (T_INFIX1, TK_INFIX1), (T_INFIX2, TK_INFIX2), (T_INFIX3, TK_INFIX3), (T_INFIX4, TK_INFIX4), (T_AUGMENTED_ASSIGNMENT, TK_AUGMENTED_ASSIGNMENT), (T_PLUS_EQUAL, TK_PLUS_EQUAL), (T_EOF, TK_EOF), (T_FALSE, TK_FALSE), (T_TRUE, TK_TRUE), (T_PUB, TK_PUB), (T_PRIV, TK_PRIV), (T_READONLY, TK_READONLY), (T_IMPORT, TK_IMPORT), (T_EXTERN, TK_EXTERN), (T_BREAK, TK_BREAK), (T_CONTINUE, TK_CONTINUE), (T_STRUCT, TK_STRUCT), (T_ENUM, TK_ENUM), (T_TRAIT, TK_TRAIT), (T_DERIVE, TK_DERIVE), (T_IMPL, TK_IMPL), (T_WITH, TK_WITH), (T_RAISE, TK_RAISE), (T_THROW, TK_THROW), (T_TRY, TK_TRY), (T_CATCH, TK_CATCH), (T_ASYNC, TK_ASYNC), (T_TYPEALIAS, TK_TYPEALIAS), (T_TRAITALIAS, TK_TRAITALIAS), (T_FNALIAS, TK_FNALIAS), (T_EQUAL, TK_EQUAL), (T_EQ_TILDE, TK_EQ_TILDE), (T_LPAREN, TK_LPAREN), (T_RPAREN, TK_RPAREN), (T_COMMA, TK_COMMA), (T_MINUS, TK_MINUS), (T_QUESTION, TK_QUESTION), (T_EXCLAMATION, TK_EXCLAMATION), (T_DOT_LIDENT, TK_DOT_LIDENT), (T_DOT_UIDENT, TK_DOT_UIDENT), (T_DOT_INT, TK_DOT_INT), (T_DOT_LPAREN, TK_DOT_LPAREN), (T_COLONCOLON, TK_COLONCOLON), (T_COLON, TK_COLON), (T_SEMI, TK_SEMI), (T_LBRACKET, TK_LBRACKET), (T_LBRACKET_BAR, TK_LBRACKET_BAR), (T_PLUS, TK_PLUS), (T_RBRACKET, TK_RBRACKET), (T_BAR_RBRACKET, TK_BAR_RBRACKET), (T_UNDERSCORE, TK_UNDERSCORE), (T_BAR, TK_BAR), (T_LBRACE, TK_LBRACE), (T_RBRACE, TK_RBRACE), (T_AMPERAMPER, TK_AMPERAMPER), (T_AMPER, TK_AMPER), (T_CARET, TK_CARET), (T_BARBAR, TK_BARBAR), (T_PACKAGE_NAME, TK_PACKAGE_NAME), (T_AS, TK_AS), (T_PIPE, TK_PIPE), (T_PIPE_LEFT, TK_PIPE_LEFT), (T_LT_PLUS, TK_LT_PLUS), (T_LT_QUESTION, TK_LT_QUESTION), (T_ELSE, TK_ELSE), (T_FN, TK_FN), (T_IF, TK_IF), (T_LET, TK_LET), (T_PROOF_ASSERT, TK_PROOF_ASSERT), (T_PROOF_LET, TK_PROOF_LET), (T_CONST, TK_CONST), (T_MATCH, TK_MATCH), (T_USING, TK_USING), (T_MUTABLE, TK_MUTABLE), (T_TYPE, TK_TYPE), (T_FAT_ARROW, TK_FAT_ARROW), (T_THIN_ARROW, TK_THIN_ARROW), (T_WHILE, TK_WHILE), (T_RETURN, TK_RETURN), (T_DOTDOT, TK_DOTDOT), (T_RANGE_INCLUSIVE, TK_RANGE_INCLUSIVE), (T_RANGE_LT_INCLUSIVE, TK_RANGE_LT_INCLUSIVE), (T_RANGE_EXCLUSIVE, TK_RANGE_EXCLUSIVE), (T_RANGE_INCLUSIVE_REV, TK_RANGE_INCLUSIVE_REV), (T_RANGE_EXCLUSIVE_REV, TK_RANGE_EXCLUSIVE_REV), (T_ELLIPSIS, TK_ELLIPSIS), (T_TEST, TK_TEST), (T_LOOP, TK_LOOP), (T_GUARD, TK_GUARD), (T_DEFER, TK_DEFER), (T_FOR, TK_FOR), (T_IN, TK_IN), (T_IS, TK_IS), (T_SUBERROR, TK_SUBERROR), (T_AND, TK_AND), (T_FORALL, TK_FORALL), (T_EXISTS, TK_EXISTS), (T_IMPLIES, TK_IMPLIES), (T_LETREC, TK_LETREC), (T_ENUMVIEW, TK_ENUMVIEW), (T_EXTENUM, TK_EXTENUM), (T_DECLARE, TK_DECLARE), (T_NORAISE, TK_NORAISE), (T_NOBREAK, TK_NOBREAK), (T_WHERE, TK_WHERE), (T_TRY_QUESTION, TK_TRY_QUESTION), (T_TRY_EXCLAMATION, TK_TRY_EXCLAMATION), (T_LEXMATCH, TK_LEXMATCH), (T_LEXMATCH_QUESTION, TK_LEXMATCH_QUESTION), (T_LEXSCAN, TK_LEXSCAN), (T_EXTEND, TK_EXTEND), (T_PACKAGE, TK_PACKAGE)] : Array[(YYSymbol, TokenKind)]) { try_add(term.0, term.1) } match token { @@ -39632,7 +49208,7 @@ fn error(stack : @list.List[YYState], token : Token?, loc : (Position, Position) pub fn structure(tokens : Array[(Token, Position, Position)], initial_pos? : Position) -> List[Impl] raise ParseError { yy_parse( tokens, - yy_state_940, + yy_state_1162, (it) => { guard it is YYObj_List_Impl_(result) result diff --git a/yacc_parser/parser.mbty b/yacc_parser/parser.mbty index 3d463c82..a1558fd3 100644 --- a/yacc_parser/parser.mbty +++ b/yacc_parser/parser.mbty @@ -18,6 +18,7 @@ %token MULTILINE_STRING %token MULTILINE_INTERP %token INTERP +%token BYTES_INTERP %token REGEX_LITERAL %token REGEX_INTERP %token<(String, String?, String)> ATTRIBUTE @@ -72,8 +73,10 @@ %token COLON ":" %token SEMI %token LBRACKET "[" +%token LBRACKET_BAR "[|" %token PLUS "+" %token RBRACKET "]" +%token BAR_RBRACKET "|]" %token UNDERSCORE "_" %token BAR "|" %token LBRACE "{" @@ -87,6 +90,7 @@ %token PIPE "|>" %token PIPE_LEFT "<|" %token LT_PLUS "<+" +%token LT_QUESTION " Parameter let binder = Binder::{ name: $1, loc: mk_loc($loc($1)).trim_last_char() } Optional(binder~, ty = $2, default = $4) } - | LIDENT "?" opt_annot "=" expr { + | lident_string "?" opt_annot "=" expr { let binder = Binder::{ name: $1, loc: mk_loc($loc($1)) } Optional(binder~, ty = $3, default = $5) } - | LIDENT "?" opt_annot { + | lident_string "?" opt_annot { let binder = Binder::{ name: $1, loc: mk_loc($loc($1)) } QuestionOptional(binder~, ty = $3) } @@ -324,8 +330,13 @@ optional_type_parameters_no_constraints -> List[TypeDeclBinder] } ; -luident -> String +%inline lident_string -> String : LIDENT { $1 } + | "extend" { "extend" } + ; + +luident -> String + : lident_string { $1 } | UIDENT { $1 } ; @@ -698,13 +709,14 @@ structure_item -> Impl doc = DocString::empty() ) } - | attributes visibility "impl" optional_type_parameters type_name "for" type_ "with" option("fn") binder parameters func_return_type impl_body { + | attributes visibility "impl" optional_type_parameters type_name "for" type_ "with" impl_optional_fn binder parameters func_return_type impl_body { let (ret_ty, err_ty) = $12 TopImpl( self_ty = Some($7), trait_ = $5, method_name = $10, quantifiers = $4, + method_quantifiers = $9, params = $11, ret_ty~, err_ty~, @@ -715,13 +727,14 @@ structure_item -> Impl doc = DocString::empty() ) } - | attributes visibility "impl" optional_type_parameters type_name "with" option("fn") binder parameters func_return_type impl_body { + | attributes visibility "impl" optional_type_parameters type_name "with" impl_optional_fn binder parameters func_return_type impl_body { let (ret_ty, err_ty) = $10 TopImpl( self_ty = None, trait_ = $5, method_name = $8, quantifiers = $4, + method_quantifiers = $7, params = $9, ret_ty~, err_ty~, @@ -776,6 +789,11 @@ structure_item -> Impl } ; +impl_optional_fn -> List[TypeVarBinder] + : { @list.empty() } + | "fn" optional_type_parameters { $2 } + ; + %inline attributes -> List[Attribute] : { @list.empty() } | non_empty_list(attribute) { $1 } @@ -794,7 +812,7 @@ structure_item -> Impl pub_attr -> String? : { None } | "(" "readonly" ")" { Some("readonly") } - | "(" LIDENT ")" { Some($2) } + | "(" lident_string ")" { Some($2) } ; %inline is_declare -> Bool @@ -861,25 +879,25 @@ batch_type_alias_target(UIDENT_MAYBE_DOT) -> AliasTarget ; func_alias_targets -> (Label?, Label?, Bool, List[AliasTarget]) - : ioption(func_alias_type_name(LIDENT, UIDENT)) func_alias_target(LIDENT) { + : ioption(func_alias_type_name(lident_string, UIDENT)) func_alias_target(lident_string) { (None, $1, false, @list.singleton($2)) } | PACKAGE_NAME func_alias_target(DOT_LIDENT) { let pkg = Label::{ name: $1, loc: mk_loc($loc($1)) } (Some(pkg), None, false, @list.singleton($2)) } - | PACKAGE_NAME func_alias_type_name(DOT_LIDENT, DOT_UIDENT) func_alias_target(LIDENT) { + | PACKAGE_NAME func_alias_type_name(DOT_LIDENT, DOT_UIDENT) func_alias_target(lident_string) { let pkg = Label::{ name: $1, loc: mk_loc($loc($1)) } (Some(pkg), Some($2), false, @list.singleton($3)) } - | option(func_alias_type_name(LIDENT, UIDENT)) "(" non_empty_list_commas(func_alias_target(LIDENT)) ")" { + | option(func_alias_type_name(lident_string, UIDENT)) "(" non_empty_list_commas(func_alias_target(lident_string)) ")" { (None, $1, true, $3) } - | PACKAGE_NAME ".(" non_empty_list_commas(func_alias_target(LIDENT)) ")" { + | PACKAGE_NAME ".(" non_empty_list_commas(func_alias_target(lident_string)) ")" { let pkg = Label::{ name: $1, loc: mk_loc($loc($1)) } (Some(pkg), None, true, $3) } - | PACKAGE_NAME func_alias_type_name(DOT_LIDENT, DOT_UIDENT) "(" non_empty_list_commas(func_alias_target(LIDENT)) ")" { + | PACKAGE_NAME func_alias_type_name(DOT_LIDENT, DOT_UIDENT) "(" non_empty_list_commas(func_alias_target(lident_string)) ")" { let pkg = Label::{ name: $1, loc: mk_loc($loc($1)) } (Some(pkg), Some($2), true, $4) } @@ -906,7 +924,13 @@ func_alias_target(LIDENT_MAYBE_DOT) -> AliasTarget ; using_binder -> (AliasTarget, UsingKind): - | LIDENT + | lident_string { + let binder = Binder::{ + name : $1, + loc : mk_loc($loc($1)) + } + ({ binder, target : None }, UsingKind::Value) + } | UIDENT { let binder = Binder::{ name : $1, @@ -914,7 +938,17 @@ using_binder -> (AliasTarget, UsingKind): } ({ binder, target : None }, UsingKind::Value) } - | LIDENT "as" LIDENT + | lident_string "as" lident_string { + let binder = Binder::{ + name : $3, + loc : mk_loc($loc($3)) + } + let target = Label::{ + name : $1, + loc : mk_loc($loc($1)) + } + ({ binder, target : Some(target) }, UsingKind::Value) + } | UIDENT "as" UIDENT { let binder = Binder::{ name : $3, @@ -1010,12 +1044,12 @@ trait_method_param -> Parameter ; qual_ident -> LongIdent - : LIDENT { Ident(name = $1) } + : lident_string { Ident(name = $1) } | PACKAGE_NAME DOT_LIDENT { Dot(pkg = $1, id = $2) } ; qual_ident_simple_expr -> LongIdent - : LIDENT %prec prec_apply_non_ident_fn { Ident(name = $1) } + : lident_string %prec prec_apply_non_ident_fn { Ident(name = $1) } | PACKAGE_NAME DOT_LIDENT { Dot(pkg = $1, id = $2) } ; @@ -1121,12 +1155,32 @@ template_rhs -> Expr : INTERP { make_interp_expr(loc = mk_loc($sloc), $1) } + | BYTES { + Expr::Constant(c = @syntax.Constant::Bytes($1), loc = mk_loc($sloc)) + } + | BYTES_INTERP { + make_bytes_interp_expr(loc = mk_loc($sloc), $1) + } | STRING { Expr::Constant(c = @syntax.Constant::String($1), loc = mk_loc($sloc)) } | non_empty_list(multiline_string) { Expr::MultilineString(elems = $1, loc = mk_loc($sloc)) } + | "{" list_commas(template_object_elem) "}" { + Map(elems = $2, loc = mk_loc($sloc)) + } + ; + +template_object_elem -> MapExprElem + : STRING ":" expr { + MapExprElem::{ + key: @syntax.Constant::String($1), + expr: $3, + key_loc: mk_loc($loc($1)), + loc: mk_loc($sloc) + } + } ; expr_statement_no_break_continue_return -> Expr @@ -1280,6 +1334,34 @@ lexmatch_header -> (Expr, Label?): ($2, Some($4)) } +lexscan_expr -> Expr: + | lexscan_header list_semis(lexscan_case) "}" { + LexScan(expr=$1, match_loc=mk_loc($loc($1)), cases=$2, loc=mk_loc($sloc)) + } + +lexscan_header -> Expr: + | "lexscan" infix_expr "{" { $2 } + +lexscan_case -> LexScanCase: + | lexscan_case_pattern "=>" expr_statement { + LexScanCase::{ pat: $1, guard_: None, body: $3 } + } + | lexscan_case_pattern "if" infix_expr "=>" expr_statement { + LexScanCase::{ pat: $1, guard_: Some($3), body: $5 } + } + | "..." { + LexScanCase::{ + pat: LexScanCasePattern::Wildcard(loc = mk_loc($loc($1))), + guard_: None, + body: Hole(loc = mk_loc($sloc), kind = Todo) + } + } + +lexscan_case_pattern -> LexScanCasePattern: + | regex_as_pattern { LexScanCasePattern::Pattern($1) } + | binder { LexScanCasePattern::Binder($1) } + | "_" { LexScanCasePattern::Wildcard(loc = mk_loc($sloc)) } + lex_case -> LexCase : | lex_pattern "=>" expr_statement { LexCase::{ @@ -1466,6 +1548,7 @@ expr -> Expr | if_expr { $1 } | match_expr { $1 } | lexmatch_expr { $1 } + | lexscan_expr { $1 } | simple_try_expr { $1 } | quantifier_expr { $1 } | arrow_fn_expr { Function(func = $1, loc = mk_loc($sloc)) } @@ -1618,7 +1701,10 @@ postfix_expr -> Expr RegexMatch(expr = $1, pat~, bindings~, loc = mk_loc($sloc)) } | range_expr "<+" template_rhs { - TemplateWriting(expr = $1, template = $3, loc = mk_loc($sloc)) + TemplateWriting(expr = $1, template = $3, is_conditional = false, loc = mk_loc($sloc)) + } + | range_expr " (RegexPattern, List[(Label, Binder?)]) ; regex_match_binding -> (Label, Binder?) - : LIDENT "=" binder { + : lident_string "=" binder { let label = Label::{ name : $1, loc : mk_loc($loc($1)) } (label, Some($3)) } @@ -1879,7 +1965,7 @@ simple_expr -> Expr loc = mk_loc($sloc) ) } - | simple_expr ".." LIDENT "(" list_commas(argument) ")" { + | simple_expr ".." lident_string "(" list_commas(argument) ")" { let method_name = Label::{ name: $3, loc: mk_loc($loc($3)) } DotApply( self = $1, @@ -1889,10 +1975,10 @@ simple_expr -> Expr loc = mk_loc($sloc) ) } - | simple_expr accessor %prec prec_field { + | simple_expr accessor %prec prec_field { Field(record = $1, accessor = $2, loc = mk_loc($sloc)) } - | type_name "::" LIDENT { + | type_name "::" lident_string { let method_name = Label::{ name: $3, loc: mk_loc($loc($3)) } Method(type_name = $1, method_name~, loc = mk_loc($sloc)) } @@ -1902,6 +1988,17 @@ simple_expr -> Expr kind = Foreach(binders = $3, expr = $5, init~, continue_block~), guard_ = $7, body = $9, + is_iter = false, + loc = mk_loc($sloc) + ) + } + | "[|" "for" non_empty_list_commas(foreach_binder) "in" infix_expr foreach_optional_loop_vars_infix option(preceded("if", infix_expr)) "=>" expr "|]" { + let (init, continue_block) = $6 + ListComprehension( + kind = Foreach(binders = $3, expr = $5, init~, continue_block~), + guard_ = $7, + body = $9, + is_iter = true, loc = mk_loc($sloc) ) } @@ -1911,15 +2008,27 @@ simple_expr -> Expr kind = For(binders~, condition~, continue_block~, for_loc~), guard_ = $4, body = $6, + is_iter = false, + loc = mk_loc($sloc) + ) + } + | "[|" "for" list_comp_for_header option(preceded("if", infix_expr)) "=>" expr "|]" { + let (binders, condition, continue_block, for_loc) = $3 + ListComprehension( + kind = For(binders~, condition~, continue_block~, for_loc~), + guard_ = $4, + body = $6, + is_iter = true, loc = mk_loc($sloc) ) } - | "[" list_commas(spreadable_elem) "]" { @syntax.make_array_expr(loc = mk_loc($sloc), $2) } + | "[" list_commas(spreadable_elem) "]" { @syntax.make_array_expr(loc = mk_loc($sloc), is_iter = false, $2) } + | "[|" list_commas(spreadable_elem) "|]" { @syntax.make_array_expr(loc = mk_loc($sloc), is_iter = true, $2) } | tuple_expr { $1 } ; %inline label -> Label - : LIDENT { Label::{ name: $1, loc: mk_loc($sloc) } } + : lident_string { Label::{ name: $1, loc: mk_loc($sloc) } } ; %inline accessor -> Accessor @@ -1934,7 +2043,7 @@ simple_expr -> Expr ; %inline binder -> Binder - : LIDENT { Binder::{ name: $1, loc: mk_loc($sloc) } } + : lident_string { Binder::{ name: $1, loc: mk_loc($sloc) } } ; tvar_binder -> TypeVarBinder @@ -1977,6 +2086,7 @@ atomic_expr -> Expr MultilineString(elems = $1, loc = mk_loc($sloc)) } | INTERP { make_interp_expr(loc = mk_loc($sloc), $1) } + | BYTES_INTERP { make_bytes_interp_expr(loc = mk_loc($sloc), $1) } ; simple_constant -> Constant @@ -2041,7 +2151,7 @@ argument -> Argument let arg_value = @syntax.make_ident_expr(loc = mk_loc($loc($1)), Var::{ name: Ident(name = $1), loc: mk_loc($loc($1)) }) Argument::{ value: arg_value, kind: LabelledPun(label) } } - | LIDENT "?" { + | lident_string "?" { let loc = mk_loc($loc($1)) let label = Label::{ name: $1, loc } let arg_value = @syntax.make_ident_expr(loc~, Var::{ name: Ident(name = $1), loc }) @@ -2234,7 +2344,7 @@ type_ -> Type ; record_decl_field -> FieldDecl - : attributes visibility option("mut") LIDENT ":" type_ { + : attributes visibility option("mut") lident_string ":" type_ { FieldDecl::{ name: FieldName::{ label: $4, loc: mk_loc($loc($4)) }, ty: $6,